From owner-svn-src-all@freebsd.org  Sun Jan 17 00:14:24 2016
Return-Path: <owner-svn-src-all@freebsd.org>
Delivered-To: svn-src-all@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2D4A4A84D71;
 Sun, 17 Jan 2016 00:14:24 +0000 (UTC)
 (envelope-from jhibbits@FreeBSD.org)
Received: from repo.freebsd.org (repo.freebsd.org
 [IPv6:2610:1c1:1:6068::e6a:0])
 (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
 (Client did not present a certificate)
 by mx1.freebsd.org (Postfix) with ESMTPS id F2CA71FE6;
 Sun, 17 Jan 2016 00:14:23 +0000 (UTC)
 (envelope-from jhibbits@FreeBSD.org)
Received: from repo.freebsd.org ([127.0.1.37])
 by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u0H0ENra067433;
 Sun, 17 Jan 2016 00:14:23 GMT (envelope-from jhibbits@FreeBSD.org)
Received: (from jhibbits@localhost)
 by repo.freebsd.org (8.15.2/8.15.2/Submit) id u0H0EMni067431;
 Sun, 17 Jan 2016 00:14:22 GMT (envelope-from jhibbits@FreeBSD.org)
Message-Id: <201601170014.u0H0EMni067431@repo.freebsd.org>
X-Authentication-Warning: repo.freebsd.org: jhibbits set sender to
 jhibbits@FreeBSD.org using -f
From: Justin Hibbits <jhibbits@FreeBSD.org>
Date: Sun, 17 Jan 2016 00:14:22 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-head@freebsd.org
Subject: svn commit: r294197 - head/sys/dev/hwpmc
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.20
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for &quot;
 user&quot; and &quot; projects&quot; \)" <svn-src-all.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-all/>
List-Post: <mailto:svn-src-all@freebsd.org>
List-Help: <mailto:svn-src-all-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Sun, 17 Jan 2016 00:14:24 -0000

Author: jhibbits
Date: Sun Jan 17 00:14:22 2016
New Revision: 294197
URL: https://svnweb.freebsd.org/changeset/base/294197

Log:
  e5500 HWPMC is identical to e500mc, so add support check for it.

Modified:
  head/sys/dev/hwpmc/hwpmc_e500.c
  head/sys/dev/hwpmc/hwpmc_powerpc.c

Modified: head/sys/dev/hwpmc/hwpmc_e500.c
==============================================================================
--- head/sys/dev/hwpmc/hwpmc_e500.c	Sat Jan 16 22:32:57 2016	(r294196)
+++ head/sys/dev/hwpmc/hwpmc_e500.c	Sun Jan 17 00:14:22 2016	(r294197)
@@ -523,6 +523,7 @@ e500_allocate_pmc(int cpu, int ri, struc
 		pe_cpu_mask = ev->pe_code & PMC_PPC_E500V2;
 		break;
 	case FSL_E500mc:
+	case FSL_E5500:
 		pe_cpu_mask = ev->pe_code & PMC_PPC_E500MC;
 		break;
 	}

Modified: head/sys/dev/hwpmc/hwpmc_powerpc.c
==============================================================================
--- head/sys/dev/hwpmc/hwpmc_powerpc.c	Sat Jan 16 22:32:57 2016	(r294196)
+++ head/sys/dev/hwpmc/hwpmc_powerpc.c	Sun Jan 17 00:14:22 2016	(r294197)
@@ -178,6 +178,7 @@ pmc_md_initialize()
 	case FSL_E500v1:
 	case FSL_E500v2:
 	case FSL_E500mc:
+	case FSL_E5500:
 		error = pmc_e500_initialize(pmc_mdep);
 		break;
 	default:

From owner-svn-src-all@freebsd.org  Sun Jan 17 00:52:22 2016
Return-Path: <owner-svn-src-all@freebsd.org>
Delivered-To: svn-src-all@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id C8819A6AB6C;
 Sun, 17 Jan 2016 00:52:22 +0000 (UTC)
 (envelope-from avos@FreeBSD.org)
Received: from repo.freebsd.org (repo.freebsd.org
 [IPv6:2610:1c1:1:6068::e6a:0])
 (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
 (Client did not present a certificate)
 by mx1.freebsd.org (Postfix) with ESMTPS id 896231EC8;
 Sun, 17 Jan 2016 00:52:22 +0000 (UTC)
 (envelope-from avos@FreeBSD.org)
Received: from repo.freebsd.org ([127.0.1.37])
 by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u0H0qLGc078701;
 Sun, 17 Jan 2016 00:52:21 GMT (envelope-from avos@FreeBSD.org)
Received: (from avos@localhost)
 by repo.freebsd.org (8.15.2/8.15.2/Submit) id u0H0qLB3078698;
 Sun, 17 Jan 2016 00:52:21 GMT (envelope-from avos@FreeBSD.org)
Message-Id: <201601170052.u0H0qLB3078698@repo.freebsd.org>
X-Authentication-Warning: repo.freebsd.org: avos set sender to
 avos@FreeBSD.org using -f
From: Andriy Voskoboinyk <avos@FreeBSD.org>
Date: Sun, 17 Jan 2016 00:52:21 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-head@freebsd.org
Subject: svn commit: r294198 - head/sys/dev/usb/wlan
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.20
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for &quot;
 user&quot; and &quot; projects&quot; \)" <svn-src-all.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-all/>
List-Post: <mailto:svn-src-all@freebsd.org>
List-Help: <mailto:svn-src-all-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Sun, 17 Jan 2016 00:52:23 -0000

Author: avos
Date: Sun Jan 17 00:52:21 2016
New Revision: 294198
URL: https://svnweb.freebsd.org/changeset/base/294198

Log:
  urtwn: add ROM structure for RTL8188EU
  
  - Add the structure with already known fields offsets
    (some of them were taken from this driver,
    some (channel_plan, rf_* fields) - from TP-LINK official driver)
  - Fix a typo / dehardcode a constant in RTL8192C ROM structure.
  
  Tested with RTL8188EU, STA mode
  
  Reviewed by:	kevlo
  Approved by:	adrian (mentor)
  Differential Revision:	https://reviews.freebsd.org/D4274

Modified:
  head/sys/dev/usb/wlan/if_urtwn.c
  head/sys/dev/usb/wlan/if_urtwnreg.h
  head/sys/dev/usb/wlan/if_urtwnvar.h

Modified: head/sys/dev/usb/wlan/if_urtwn.c
==============================================================================
--- head/sys/dev/usb/wlan/if_urtwn.c	Sun Jan 17 00:14:22 2016	(r294197)
+++ head/sys/dev/usb/wlan/if_urtwn.c	Sun Jan 17 00:52:21 2016	(r294198)
@@ -1707,27 +1707,22 @@ urtwn_read_rom(struct urtwn_softc *sc)
 static int
 urtwn_r88e_read_rom(struct urtwn_softc *sc)
 {
-	uint8_t *rom = sc->rom.r88e_rom;
-	uint16_t addr;
-	int error, i;
+	struct r88e_rom *rom = &sc->rom.r88e_rom;
+	int error;
 
-	error = urtwn_efuse_read(sc, rom, sizeof(sc->rom.r88e_rom));
+	error = urtwn_efuse_read(sc, (uint8_t *)rom, sizeof(sc->rom.r88e_rom));
 	if (error != 0)
 		return (error);
 
-	addr = 0x10;
-	for (i = 0; i < 6; i++)
-		sc->cck_tx_pwr[i] = rom[addr++];
-	for (i = 0; i < 5; i++)
-		sc->ht40_tx_pwr[i] = rom[addr++];
-	sc->bw20_tx_pwr_diff = (rom[addr] & 0xf0) >> 4;
+	sc->bw20_tx_pwr_diff = (rom->tx_pwr_diff >> 4);
 	if (sc->bw20_tx_pwr_diff & 0x08)
 		sc->bw20_tx_pwr_diff |= 0xf0;
-	sc->ofdm_tx_pwr_diff = (rom[addr] & 0xf);
+	sc->ofdm_tx_pwr_diff = (rom->tx_pwr_diff & 0xf);
 	if (sc->ofdm_tx_pwr_diff & 0x08)
 		sc->ofdm_tx_pwr_diff |= 0xf0;
-	sc->regulatory = MS(rom[0xc1], R92C_ROM_RF1_REGULATORY);
-	IEEE80211_ADDR_COPY(sc->sc_ic.ic_macaddr, &rom[0xd7]);
+	sc->regulatory = MS(rom->rf_board_opt, R92C_ROM_RF1_REGULATORY);
+	DPRINTF("regulatory type=%d\n", sc->regulatory);
+	IEEE80211_ADDR_COPY(sc->sc_ic.ic_macaddr, rom->macaddr);
 
 	sc->sc_rf_write = urtwn_r88e_rf_write;
 	sc->sc_power_on = urtwn_r88e_power_on;
@@ -3620,7 +3615,7 @@ urtwn_bb_init(struct urtwn_softc *sc)
 		urtwn_bb_write(sc, R92C_OFDM0_AGCCORE1(0), 0x69553420);
 		urtwn_ms_delay(sc);
 
-		crystalcap = sc->rom.r88e_rom[0xb9];
+		crystalcap = sc->rom.r88e_rom.crystalcap;
 		if (crystalcap == 0xff)
 			crystalcap = 0x20;
 		crystalcap &= 0x3f;
@@ -4002,6 +3997,7 @@ urtwn_r88e_get_txpower(struct urtwn_soft
     uint16_t power[URTWN_RIDX_COUNT])
 {
 	struct ieee80211com *ic = &sc->sc_ic;
+	struct r88e_rom *rom = &sc->rom.r88e_rom;
 	uint16_t cckpow, ofdmpow, bw20pow, htpow;
 	const struct urtwn_r88e_txpwr *base;
 	int ridx, chan, group;
@@ -4040,14 +4036,14 @@ urtwn_r88e_get_txpower(struct urtwn_soft
 	}
 
 	/* Compute per-CCK rate Tx power. */
-	cckpow = sc->cck_tx_pwr[group];
+	cckpow = rom->cck_tx_pwr[group];
 	for (ridx = URTWN_RIDX_CCK1; ridx <= URTWN_RIDX_CCK11; ridx++) {
 		power[ridx] += cckpow;
 		if (power[ridx] > R92C_MAX_TX_PWR)
 			power[ridx] = R92C_MAX_TX_PWR;
 	}
 
-	htpow = sc->ht40_tx_pwr[group];
+	htpow = rom->ht40_tx_pwr[group];
 
 	/* Compute per-OFDM rate Tx power. */
 	ofdmpow = htpow + sc->ofdm_tx_pwr_diff;

Modified: head/sys/dev/usb/wlan/if_urtwnreg.h
==============================================================================
--- head/sys/dev/usb/wlan/if_urtwnreg.h	Sun Jan 17 00:14:22 2016	(r294197)
+++ head/sys/dev/usb/wlan/if_urtwnreg.h	Sun Jan 17 00:52:21 2016	(r294198)
@@ -953,7 +953,7 @@ struct r92c_rom {
 	uint16_t	reserved3;
 	uint8_t		usb_phy;
 	uint8_t		reserved4[3];
-	uint8_t		macaddr[6];
+	uint8_t		macaddr[IEEE80211_ADDR_LEN];
 	uint8_t		string[61];	/* "Realtek" */
 	uint8_t		subcustomer_id;
 	uint8_t		cck_tx_pwr[R92C_MAX_CHAINS][3];
@@ -982,7 +982,37 @@ struct r92c_rom {
 	uint8_t		rf_opt4;
 	uint8_t		channel_plan;
 	uint8_t		version;
-	uint8_t		curstomer_id;
+	uint8_t		customer_id;
+} __packed;
+
+/*
+ * RTL8188EU ROM image.
+ */
+struct r88e_rom {
+	uint8_t		reserved1[16];
+	uint8_t		cck_tx_pwr[6];
+	uint8_t		ht40_tx_pwr[5];
+	uint8_t		tx_pwr_diff;
+	uint8_t		reserved2[156];
+	uint8_t		channel_plan;
+	uint8_t		crystalcap;
+	uint8_t		reserved3[7];
+	uint8_t		rf_board_opt;
+	uint8_t		rf_feature_opt;
+	uint8_t		rf_bt_opt;
+	uint8_t		version;
+	uint8_t		customer_id;
+	uint8_t		reserved4[3];
+	uint8_t		rf_ant_opt;
+	uint8_t		reserved5[6];
+	uint16_t	vid;
+	uint16_t	pid;
+	uint8_t		usb_opt;
+	uint8_t		reserved6[2];
+	uint8_t		macaddr[IEEE80211_ADDR_LEN];
+	uint8_t		reserved7[2];
+	uint8_t		string[33];	/* "realtek 802.11n NIC" */
+	uint8_t		reserved8[256];
 } __packed;
 
 #define	URTWN_EFUSE_MAX_LEN		512

Modified: head/sys/dev/usb/wlan/if_urtwnvar.h
==============================================================================
--- head/sys/dev/usb/wlan/if_urtwnvar.h	Sun Jan 17 00:14:22 2016	(r294197)
+++ head/sys/dev/usb/wlan/if_urtwnvar.h	Sun Jan 17 00:52:21 2016	(r294198)
@@ -141,7 +141,7 @@ enum {
 
 union urtwn_rom {
 	struct r92c_rom			r92c_rom;
-	uint8_t				r88e_rom[URTWN_EFUSE_MAX_LEN];
+	struct r88e_rom			r88e_rom;
 };
 
 struct urtwn_softc {
@@ -176,6 +176,8 @@ struct urtwn_softc {
 	uint8_t				board_type;
 	uint8_t				regulatory;
 	uint8_t				pa_setting;
+	int8_t				ofdm_tx_pwr_diff;
+	int8_t				bw20_tx_pwr_diff;
 	int				avg_pwdb;
 	int				thcal_state;
 	int				thcal_lctemp;
@@ -199,10 +201,6 @@ struct urtwn_softc {
 	void				*fw_virtaddr;
 
 	union urtwn_rom			rom;
-	uint8_t				cck_tx_pwr[6];
-	uint8_t				ht40_tx_pwr[5];
-	int8_t				bw20_tx_pwr_diff;
-	int8_t				ofdm_tx_pwr_diff;
 	uint16_t			last_rom_addr;
 		
 	struct callout			sc_watchdog_ch;

From owner-svn-src-all@freebsd.org  Sun Jan 17 00:52:30 2016
Return-Path: <owner-svn-src-all@freebsd.org>
Delivered-To: svn-src-all@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id 20596A6AB99;
 Sun, 17 Jan 2016 00:52:30 +0000 (UTC) (envelope-from dim@FreeBSD.org)
Received: from repo.freebsd.org (repo.freebsd.org
 [IPv6:2610:1c1:1:6068::e6a:0])
 (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
 (Client did not present a certificate)
 by mx1.freebsd.org (Postfix) with ESMTPS id E2668102E;
 Sun, 17 Jan 2016 00:52:29 +0000 (UTC) (envelope-from dim@FreeBSD.org)
Received: from repo.freebsd.org ([127.0.1.37])
 by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u0H0qSi3078751;
 Sun, 17 Jan 2016 00:52:28 GMT (envelope-from dim@FreeBSD.org)
Received: (from dim@localhost)
 by repo.freebsd.org (8.15.2/8.15.2/Submit) id u0H0qSKB078750;
 Sun, 17 Jan 2016 00:52:28 GMT (envelope-from dim@FreeBSD.org)
Message-Id: <201601170052.u0H0qSKB078750@repo.freebsd.org>
X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org
 using -f
From: Dimitry Andric <dim@FreeBSD.org>
Date: Sun, 17 Jan 2016 00:52:28 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-head@freebsd.org
Subject: svn commit: r294199 - head
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.20
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for &quot;
 user&quot; and &quot; projects&quot; \)" <svn-src-all.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-all/>
List-Post: <mailto:svn-src-all@freebsd.org>
List-Help: <mailto:svn-src-all-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Sun, 17 Jan 2016 00:52:30 -0000

Author: dim
Date: Sun Jan 17 00:52:28 2016
New Revision: 294199
URL: https://svnweb.freebsd.org/changeset/base/294199

Log:
  Remove leading slashes added to ObsoleteFiles.inc in r294113.

Modified:
  head/ObsoleteFiles.inc

Modified: head/ObsoleteFiles.inc
==============================================================================
--- head/ObsoleteFiles.inc	Sun Jan 17 00:52:21 2016	(r294198)
+++ head/ObsoleteFiles.inc	Sun Jan 17 00:52:28 2016	(r294199)
@@ -39,9 +39,9 @@
 # done
 
 # 20160116: Update mandoc to cvs snapshot 20160116
-OLD_FILES+=/usr/share/mdocml/example.style.css
-OLD_FILES+=/usr/share/mdocml/style.css
-OLD_DIRS+=/usr/share/mdocml
+OLD_FILES+=usr/share/mdocml/example.style.css
+OLD_FILES+=usr/share/mdocml/style.css
+OLD_DIRS+=usr/share/mdocml
 # 20151225: new clang import which bumps version from 3.7.0 to 3.7.1.
 OLD_FILES+=usr/lib/clang/3.7.0/include/sanitizer/allocator_interface.h
 OLD_FILES+=usr/lib/clang/3.7.0/include/sanitizer/asan_interface.h

From owner-svn-src-all@freebsd.org  Sun Jan 17 01:01:53 2016
Return-Path: <owner-svn-src-all@freebsd.org>
Delivered-To: svn-src-all@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id 114A3A6AF3C;
 Sun, 17 Jan 2016 01:01:53 +0000 (UTC)
 (envelope-from baptiste.daroussin@gmail.com)
Received: from mail-lb0-x22a.google.com (mail-lb0-x22a.google.com
 [IPv6:2a00:1450:4010:c04::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 89E351464;
 Sun, 17 Jan 2016 01:01:52 +0000 (UTC)
 (envelope-from baptiste.daroussin@gmail.com)
Received: by mail-lb0-x22a.google.com with SMTP id oh2so332170829lbb.3;
 Sat, 16 Jan 2016 17:01:52 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;
 h=sender:date:from:to:cc:subject:message-id:references:mime-version
 :content-type:content-disposition:in-reply-to:user-agent;
 bh=w//V5xeXQ40LyW1i6zTLp1ULtRoX0xYgl8NoRFExa3g=;
 b=jv6LUKtAKcV9uBCFwP6hQaExqIJO2n2qGy7/Egxr+IWU1GGN2MUwj1CfcgjctpE+ij
 MSkc/bCZRql9TwWiAtm6Nd8a0e2sQhKOoxcI+r+rskCwVQvuW5qQ58bsVLme1QQ6SCSu
 2GGsRkTp0HUaXQWB4a5WOFaV4/Df4kDJb/w0QRBx9C4xvF2apa0Z6iysDAUAjpup7XwH
 Z0AoAxMkcELz0TPl4pkr1e8CBt39dXz2OvqkLI3mwtYsOfIRGPrUdOdiQoOTrHmGaZI1
 EbtiFJkO4ybpD3ZJdCEvSk4fQZXFzNlc40gm/rM7ShbrFndKpt5oFr1fsfuHwDna8WyU
 lrmQ==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20130820;
 h=x-gm-message-state:sender:date:from:to:cc:subject:message-id
 :references:mime-version:content-type:content-disposition
 :in-reply-to:user-agent;
 bh=w//V5xeXQ40LyW1i6zTLp1ULtRoX0xYgl8NoRFExa3g=;
 b=gEjOTDdsFA3I7VlieNzYO3Tv1w7JwZTNvkhl1MsrZVLEye5K+5mLxQLpiCgDZE++W1
 tyvvTMYMIEL31bosev42Y2OD8YsoleBzl1gn4oZUNR3mYE7mtEgNT4AQi17XsOxgesiA
 OehTjoSYk0YskPclL5/2AG3+bECW28WpsjAoMOCVkQN63KcEhUiSw82RwZCBVd3G6VCQ
 HTIJWVvlJgd4Ll7XoMwJ3VMa7Kb0sTWJ4MVMV+s6u/2Kzr2Cp0MOwHSyd53bsxquPVzV
 R2PbOjhqo1LN8yaePVRDZmEwT5jjT7xeQxWp48ReLBakWCq8I/pNSVqG/D4PQ0jens57
 POlQ==
X-Gm-Message-State: ALoCoQl6TWtV+ChL4q+I+yRHygHM2lwOv8jGwD3l8iYkXH/Um2KY8WXuHpXF6gDuICY66Oky4iu9TBfpyTe/PKBBSt9BsXNKPQ==
X-Received: by 10.112.146.104 with SMTP id tb8mr5918587lbb.95.1452992509599;
 Sat, 16 Jan 2016 17:01:49 -0800 (PST)
Received: from ivaldir.etoilebsd.net ([2001:41d0:8:db4c::1])
 by smtp.gmail.com with ESMTPSA id k189sm2143590lfd.12.2016.01.16.17.01.48
 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);
 Sat, 16 Jan 2016 17:01:48 -0800 (PST)
Sender: Baptiste Daroussin <baptiste.daroussin@gmail.com>
Date: Sun, 17 Jan 2016 02:01:46 +0100
From: Baptiste Daroussin <bapt@FreeBSD.org>
To: Dimitry Andric <dim@FreeBSD.org>
Cc: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-head@freebsd.org
Subject: Re: svn commit: r294199 - head
Message-ID: <20160117010146.GF14674@ivaldir.etoilebsd.net>
References: <201601170052.u0H0qSKB078750@repo.freebsd.org>
MIME-Version: 1.0
Content-Type: multipart/signed; micalg=pgp-sha256;
 protocol="application/pgp-signature"; boundary="gneEPciiIl/aKvOT"
Content-Disposition: inline
In-Reply-To: <201601170052.u0H0qSKB078750@repo.freebsd.org>
User-Agent: Mutt/1.5.24 (2015-08-30)
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.20
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for &quot;
 user&quot; and &quot; projects&quot; \)" <svn-src-all.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-all/>
List-Post: <mailto:svn-src-all@freebsd.org>
List-Help: <mailto:svn-src-all-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Sun, 17 Jan 2016 01:01:53 -0000


--gneEPciiIl/aKvOT
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Sun, Jan 17, 2016 at 12:52:28AM +0000, Dimitry Andric wrote:
> Author: dim
> Date: Sun Jan 17 00:52:28 2016
> New Revision: 294199
> URL: https://svnweb.freebsd.org/changeset/base/294199
>=20
> Log:
>   Remove leading slashes added to ObsoleteFiles.inc in r294113.

Thank you!

Bapt

--gneEPciiIl/aKvOT
Content-Type: application/pgp-signature; name="signature.asc"

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2

iQIcBAEBCAAGBQJWmuf6AAoJEGOJi9zxtz5amsQQAIBDK4JWQ+y5k6g7SeZpLctE
DBotBEh82QCvc19rosfRYvuv6WDNZTkmHgGT61L1G2LVa6omCgJGqw6mrBFDBoS3
lFwy3oMxYq4R3OLe3dy9XliIkV+Jw9UkX3CJjfrPFXCLV5TqIqSJoGMVSDvTb61A
4EBevXNFoRygsqeSUNR+/YlDtSQo7k1QBTDOfx5COKIf1npBjY44VNLMbVlXV1c8
XEtJ1Tytym9p+hDuvIPWTducLtZUZr3d/XyVm7+twBrQIdjgsrBROdeLsgXG8Qy1
2urOBvKt7LzUxQkVuLWPx77ZChx4aaAVYBjoQ7DGVXsu5aTgUoO4fuDlwuAccX/T
8sGAMSJyx0F210Rr0pPQHZA5BENBr3Zd0UdmouQ8TrQvWqFm0smTwqbHtg38Pzqw
Ind3y/2KB1SG+3W4TuTR6hw+mbchIJ35PB2wjge41ukveq2g/cCrZz/+ZrUyxdgK
WegQkbz+hWCECixTx5FsaLnk2De3yU0Lwrofkquf6ut/Xm7f5WxGnC7mZUKFZtvo
+x68a/hochpYh/Q9qWBpI57noB27T7GU2YJ65/sv5gbDoFJSLnPYtjOu4usvtzVX
AaiR+6jfB7TcrVPtLw3u/ckty8peq//hQ7QlxNvsI3UabaJ4xLOnpd0cl90Nh+Yx
MZ5xFqkdUpyUg+XnflIQ
=OB0/
-----END PGP SIGNATURE-----

--gneEPciiIl/aKvOT--

From owner-svn-src-all@freebsd.org  Sun Jan 17 01:04:21 2016
Return-Path: <owner-svn-src-all@freebsd.org>
Delivered-To: svn-src-all@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id 94089A830C7;
 Sun, 17 Jan 2016 01:04:21 +0000 (UTC)
 (envelope-from rpokala@FreeBSD.org)
Received: from repo.freebsd.org (repo.freebsd.org
 [IPv6:2610:1c1:1:6068::e6a:0])
 (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
 (Client did not present a certificate)
 by mx1.freebsd.org (Postfix) with ESMTPS id 615CC1871;
 Sun, 17 Jan 2016 01:04:21 +0000 (UTC)
 (envelope-from rpokala@FreeBSD.org)
Received: from repo.freebsd.org ([127.0.1.37])
 by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u0H14K0Y081759;
 Sun, 17 Jan 2016 01:04:20 GMT (envelope-from rpokala@FreeBSD.org)
Received: (from rpokala@localhost)
 by repo.freebsd.org (8.15.2/8.15.2/Submit) id u0H14KaY081758;
 Sun, 17 Jan 2016 01:04:20 GMT (envelope-from rpokala@FreeBSD.org)
Message-Id: <201601170104.u0H14KaY081758@repo.freebsd.org>
X-Authentication-Warning: repo.freebsd.org: rpokala set sender to
 rpokala@FreeBSD.org using -f
From: Ravi Pokala <rpokala@FreeBSD.org>
Date: Sun, 17 Jan 2016 01:04:20 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-head@freebsd.org
Subject: svn commit: r294200 - head/sys/fs/nandfs
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.20
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for &quot;
 user&quot; and &quot; projects&quot; \)" <svn-src-all.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-all/>
List-Post: <mailto:svn-src-all@freebsd.org>
List-Help: <mailto:svn-src-all-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Sun, 17 Jan 2016 01:04:21 -0000

Author: rpokala
Date: Sun Jan 17 01:04:20 2016
New Revision: 294200
URL: https://svnweb.freebsd.org/changeset/base/294200

Log:
  [PR 206224] bv_cnt is sometimes examined without holding the bufobj lock
  
  Add locking around access to bv_cnt which is currently being done unlocked
  
  PR:		206224
  Reviewed by:	imp
  Approved by:	jhb
  MFC after:	1 week
  Sponsored by:	Panasas, Inc.
  Differential Revision:	https://reviews.freebsd.org/D4931

Modified:
  head/sys/fs/nandfs/nandfs_segment.c

Modified: head/sys/fs/nandfs/nandfs_segment.c
==============================================================================
--- head/sys/fs/nandfs/nandfs_segment.c	Sun Jan 17 00:52:28 2016	(r294199)
+++ head/sys/fs/nandfs/nandfs_segment.c	Sun Jan 17 01:04:20 2016	(r294200)
@@ -479,6 +479,7 @@ nandfs_iterate_dirty_vnodes(struct mount
 	struct nandfs_node *nandfs_node;
 	struct vnode *vp, *mvp;
 	struct thread *td;
+	struct bufobj *bo;
 	int error, update;
 
 	td = curthread;
@@ -499,17 +500,21 @@ nandfs_iterate_dirty_vnodes(struct mount
 			update = 1;
 		}
 
+		bo = &vp->v_bufobj;
+		BO_LOCK(bo);
 		if (vp->v_bufobj.bo_dirty.bv_cnt) {
 			error = nandfs_iterate_dirty_buf(vp, seginfo, 0);
 			if (error) {
 				nandfs_error("%s: cannot iterate vnode:%p "
 				    "err:%d\n", __func__, vp, error);
 				vput(vp);
+				BO_UNLOCK(bo);
 				return (error);
 			}
 			update = 1;
 		} else
 			vput(vp);
+		BO_UNLOCK(bo);
 
 		if (update)
 			nandfs_node_update(nandfs_node);

From owner-svn-src-all@freebsd.org  Sun Jan 17 05:12:39 2016
Return-Path: <owner-svn-src-all@freebsd.org>
Delivered-To: svn-src-all@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8225AA85D43;
 Sun, 17 Jan 2016 05:12:39 +0000 (UTC)
 (envelope-from arybchik@FreeBSD.org)
Received: from repo.freebsd.org (repo.freebsd.org
 [IPv6:2610:1c1:1:6068::e6a:0])
 (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
 (Client did not present a certificate)
 by mx1.freebsd.org (Postfix) with ESMTPS id 57EC81C30;
 Sun, 17 Jan 2016 05:12:39 +0000 (UTC)
 (envelope-from arybchik@FreeBSD.org)
Received: from repo.freebsd.org ([127.0.1.37])
 by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u0H5Ccs2055660;
 Sun, 17 Jan 2016 05:12:38 GMT (envelope-from arybchik@FreeBSD.org)
Received: (from arybchik@localhost)
 by repo.freebsd.org (8.15.2/8.15.2/Submit) id u0H5CbM3055654;
 Sun, 17 Jan 2016 05:12:37 GMT (envelope-from arybchik@FreeBSD.org)
Message-Id: <201601170512.u0H5CbM3055654@repo.freebsd.org>
X-Authentication-Warning: repo.freebsd.org: arybchik set sender to
 arybchik@FreeBSD.org using -f
From: Andrew Rybchenko <arybchik@FreeBSD.org>
Date: Sun, 17 Jan 2016 05:12:37 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-head@freebsd.org
Subject: svn commit: r294201 - head/sys/dev/sfxge/common
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.20
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for &quot;
 user&quot; and &quot; projects&quot; \)" <svn-src-all.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-all/>
List-Post: <mailto:svn-src-all@freebsd.org>
List-Help: <mailto:svn-src-all-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Sun, 17 Jan 2016 05:12:39 -0000

Author: arybchik
Date: Sun Jan 17 05:12:37 2016
New Revision: 294201
URL: https://svnweb.freebsd.org/changeset/base/294201

Log:
  sfxge: convert nvram erase method to use partition id
  
  Submitted by:   Andy Moreton <amoreton at solarflare.com>
  Sponsored by:   Solarflare Communications, Inc.
  MFC after:      2 days
  Differential Revision: https://reviews.freebsd.org/D4957

Modified:
  head/sys/dev/sfxge/common/efx_impl.h
  head/sys/dev/sfxge/common/efx_nvram.c
  head/sys/dev/sfxge/common/hunt_impl.h
  head/sys/dev/sfxge/common/hunt_nvram.c
  head/sys/dev/sfxge/common/siena_impl.h
  head/sys/dev/sfxge/common/siena_nvram.c

Modified: head/sys/dev/sfxge/common/efx_impl.h
==============================================================================
--- head/sys/dev/sfxge/common/efx_impl.h	Sun Jan 17 01:04:20 2016	(r294200)
+++ head/sys/dev/sfxge/common/efx_impl.h	Sun Jan 17 05:12:37 2016	(r294201)
@@ -486,7 +486,6 @@ typedef struct efx_nvram_ops_s {
 #endif	/* EFSYS_OPT_DIAG */
 	efx_rc_t	(*envo_get_version)(efx_nic_t *, efx_nvram_type_t,
 					    uint32_t *, uint16_t *);
-	efx_rc_t	(*envo_erase)(efx_nic_t *, efx_nvram_type_t);
 	efx_rc_t	(*envo_write_chunk)(efx_nic_t *, efx_nvram_type_t,
 					    unsigned int, caddr_t, size_t);
 	void		(*envo_rw_finish)(efx_nic_t *, efx_nvram_type_t);
@@ -499,6 +498,8 @@ typedef struct efx_nvram_ops_s {
 	efx_rc_t	(*envo_partn_rw_start)(efx_nic_t *, uint32_t, size_t *);
 	efx_rc_t	(*envo_partn_read)(efx_nic_t *, uint32_t,
 					    unsigned int, caddr_t, size_t);
+	efx_rc_t	(*envo_partn_erase)(efx_nic_t *, uint32_t,
+					    unsigned int, size_t);
 } efx_nvram_ops_t;
 #endif /* EFSYS_OPT_NVRAM */
 

Modified: head/sys/dev/sfxge/common/efx_nvram.c
==============================================================================
--- head/sys/dev/sfxge/common/efx_nvram.c	Sun Jan 17 01:04:20 2016	(r294200)
+++ head/sys/dev/sfxge/common/efx_nvram.c	Sun Jan 17 05:12:37 2016	(r294201)
@@ -43,7 +43,6 @@ static efx_nvram_ops_t	__efx_nvram_falco
 	falcon_nvram_test,		/* envo_test */
 #endif	/* EFSYS_OPT_DIAG */
 	falcon_nvram_get_version,	/* envo_get_version */
-	falcon_nvram_erase,		/* envo_erase */
 	falcon_nvram_write_chunk,	/* envo_write_chunk */
 	falcon_nvram_rw_finish,		/* envo_rw_finish */
 	falcon_nvram_set_version,	/* envo_set_version */
@@ -51,6 +50,7 @@ static efx_nvram_ops_t	__efx_nvram_falco
 	falcon_nvram_partn_size,	/* envo_partn_size */
 	falcon_nvram_partn_rw_start,	/* envo_partn_rw_start */
 	falcon_nvram_partn_read,	/* envo_partn_read */
+	falcon_nvram_partn_erase,	/* envo_partn_erase */
 };
 
 #endif	/* EFSYS_OPT_FALCON */
@@ -62,7 +62,6 @@ static efx_nvram_ops_t	__efx_nvram_siena
 	siena_nvram_test,		/* envo_test */
 #endif	/* EFSYS_OPT_DIAG */
 	siena_nvram_get_version,	/* envo_get_version */
-	siena_nvram_erase,		/* envo_erase */
 	siena_nvram_write_chunk,	/* envo_write_chunk */
 	siena_nvram_rw_finish,		/* envo_rw_finish */
 	siena_nvram_set_version,	/* envo_set_version */
@@ -70,6 +69,7 @@ static efx_nvram_ops_t	__efx_nvram_siena
 	siena_nvram_partn_size,		/* envo_partn_size */
 	siena_nvram_partn_rw_start,	/* envo_partn_rw_start */
 	siena_nvram_partn_read,		/* envo_partn_read */
+	siena_nvram_partn_erase,	/* envo_partn_erase */
 };
 
 #endif	/* EFSYS_OPT_SIENA */
@@ -81,7 +81,6 @@ static efx_nvram_ops_t	__efx_nvram_ef10_
 	ef10_nvram_test,		/* envo_test */
 #endif	/* EFSYS_OPT_DIAG */
 	ef10_nvram_get_version,		/* envo_get_version */
-	ef10_nvram_erase,		/* envo_erase */
 	ef10_nvram_write_chunk,		/* envo_write_chunk */
 	ef10_nvram_rw_finish,		/* envo_rw_finish */
 	ef10_nvram_set_version,		/* envo_set_version */
@@ -89,6 +88,7 @@ static efx_nvram_ops_t	__efx_nvram_ef10_
 	ef10_nvram_partn_size,		/* envo_partn_size */
 	ef10_nvram_partn_rw_start,	/* envo_partn_rw_start */
 	ef10_nvram_partn_read,		/* envo_partn_read */
+	ef10_nvram_partn_erase,		/* envo_partn_erase */
 };
 
 #endif	/* EFSYS_OPT_HUNTINGTON || EFSYS_OPT_MEDFORD */
@@ -308,6 +308,9 @@ efx_nvram_erase(
 	__in			efx_nvram_type_t type)
 {
 	efx_nvram_ops_t *envop = enp->en_envop;
+	unsigned int offset = 0;
+	size_t size = 0;
+	uint32_t partn;
 	efx_rc_t rc;
 
 	EFSYS_ASSERT3U(enp->en_magic, ==, EFX_NIC_MAGIC);
@@ -318,11 +321,21 @@ efx_nvram_erase(
 
 	EFSYS_ASSERT3U(enp->en_nvram_locked, ==, type);
 
-	if ((rc = envop->envo_erase(enp, type)) != 0)
+	if ((rc = envop->envo_type_to_partn(enp, type, &partn)) != 0)
 		goto fail1;
 
+	if ((rc = envop->envo_partn_size(enp, partn, &size)) != 0)
+		goto fail2;
+
+	if ((rc = envop->envo_partn_erase(enp, partn, offset, size)) != 0)
+		goto fail3;
+
 	return (0);
 
+fail3:
+	EFSYS_PROBE(fail3);
+fail2:
+	EFSYS_PROBE(fail2);
 fail1:
 	EFSYS_PROBE1(fail1, efx_rc_t, rc);
 

Modified: head/sys/dev/sfxge/common/hunt_impl.h
==============================================================================
--- head/sys/dev/sfxge/common/hunt_impl.h	Sun Jan 17 01:04:20 2016	(r294200)
+++ head/sys/dev/sfxge/common/hunt_impl.h	Sun Jan 17 05:12:37 2016	(r294201)
@@ -370,13 +370,6 @@ ef10_nvram_partn_lock(
 	__in			uint32_t partn);
 
 extern	__checkReturn		efx_rc_t
-ef10_nvram_partn_erase(
-	__in			efx_nic_t *enp,
-	__in			uint32_t partn,
-	__in			unsigned int offset,
-	__in			size_t size);
-
-extern	__checkReturn		efx_rc_t
 ef10_nvram_partn_write(
 	__in			efx_nic_t *enp,
 	__in			uint32_t partn,
@@ -408,11 +401,6 @@ ef10_nvram_get_version(
 	__out			uint32_t *subtypep,
 	__out_ecount(4)		uint16_t version[4]);
 
-extern	 __checkReturn		efx_rc_t
-ef10_nvram_erase(
-	__in			efx_nic_t *enp,
-	__in			efx_nvram_type_t type);
-
 extern	__checkReturn		efx_rc_t
 ef10_nvram_write_chunk(
 	__in			efx_nic_t *enp,
@@ -464,6 +452,13 @@ ef10_nvram_partn_read(
 	__out_bcount(size)	caddr_t data,
 	__in			size_t size);
 
+extern	__checkReturn		efx_rc_t
+ef10_nvram_partn_erase(
+	__in			efx_nic_t *enp,
+	__in			uint32_t partn,
+	__in			unsigned int offset,
+	__in			size_t size);
+
 #endif	/* EFSYS_OPT_NVRAM */
 
 

Modified: head/sys/dev/sfxge/common/hunt_nvram.c
==============================================================================
--- head/sys/dev/sfxge/common/hunt_nvram.c	Sun Jan 17 01:04:20 2016	(r294200)
+++ head/sys/dev/sfxge/common/hunt_nvram.c	Sun Jan 17 05:12:37 2016	(r294201)
@@ -1769,36 +1769,6 @@ fail1:
 }
 
 	__checkReturn		efx_rc_t
-ef10_nvram_erase(
-	__in			efx_nic_t *enp,
-	__in			efx_nvram_type_t type)
-{
-	uint32_t partn;
-	size_t size;
-	efx_rc_t rc;
-
-	if ((rc = ef10_nvram_type_to_partn(enp, type, &partn)) != 0)
-		goto fail1;
-
-	if ((rc = ef10_nvram_partn_size(enp, partn, &size)) != 0)
-		goto fail2;
-
-	if ((rc = ef10_nvram_partn_erase(enp, partn, 0, size)) != 0)
-		goto fail3;
-
-	return (0);
-
-fail3:
-	EFSYS_PROBE(fail3);
-fail2:
-	EFSYS_PROBE(fail2);
-fail1:
-	EFSYS_PROBE1(fail1, efx_rc_t, rc);
-
-	return (rc);
-}
-
-	__checkReturn		efx_rc_t
 ef10_nvram_write_chunk(
 	__in			efx_nic_t *enp,
 	__in			efx_nvram_type_t type,

Modified: head/sys/dev/sfxge/common/siena_impl.h
==============================================================================
--- head/sys/dev/sfxge/common/siena_impl.h	Sun Jan 17 01:04:20 2016	(r294200)
+++ head/sys/dev/sfxge/common/siena_impl.h	Sun Jan 17 05:12:37 2016	(r294201)
@@ -156,13 +156,6 @@ siena_nvram_partn_lock(
 	__in			uint32_t partn);
 
 extern	__checkReturn		efx_rc_t
-siena_nvram_partn_erase(
-	__in			efx_nic_t *enp,
-	__in			uint32_t partn,
-	__in			unsigned int offset,
-	__in			size_t size);
-
-extern	__checkReturn		efx_rc_t
 siena_nvram_partn_write(
 	__in			efx_nic_t *enp,
 	__in			uint32_t partn,
@@ -208,11 +201,6 @@ siena_nvram_get_version(
 	__out			uint32_t *subtypep,
 	__out_ecount(4)		uint16_t version[4]);
 
-extern	 __checkReturn		efx_rc_t
-siena_nvram_erase(
-	__in			efx_nic_t *enp,
-	__in			efx_nvram_type_t type);
-
 extern	__checkReturn		efx_rc_t
 siena_nvram_write_chunk(
 	__in			efx_nic_t *enp,
@@ -258,6 +246,13 @@ siena_nvram_partn_read(
 	__out_bcount(size)	caddr_t data,
 	__in			size_t size);
 
+extern	__checkReturn		efx_rc_t
+siena_nvram_partn_erase(
+	__in			efx_nic_t *enp,
+	__in			uint32_t partn,
+	__in			unsigned int offset,
+	__in			size_t size);
+
 #endif	/* EFSYS_OPT_NVRAM */
 
 #if EFSYS_OPT_VPD

Modified: head/sys/dev/sfxge/common/siena_nvram.c
==============================================================================
--- head/sys/dev/sfxge/common/siena_nvram.c	Sun Jan 17 01:04:20 2016	(r294200)
+++ head/sys/dev/sfxge/common/siena_nvram.c	Sun Jan 17 05:12:37 2016	(r294201)
@@ -594,36 +594,6 @@ fail1:
 }
 
 	__checkReturn		efx_rc_t
-siena_nvram_erase(
-	__in			efx_nic_t *enp,
-	__in			efx_nvram_type_t type)
-{
-	size_t size;
-	uint32_t partn;
-	efx_rc_t rc;
-
-	if ((rc = siena_nvram_type_to_partn(enp, type, &partn)) != 0)
-		goto fail1;
-
-	if ((rc = siena_nvram_partn_size(enp, partn, &size)) != 0)
-		goto fail2;
-
-	if ((rc = siena_nvram_partn_erase(enp, partn, 0, size)) != 0)
-		goto fail3;
-
-	return (0);
-
-fail3:
-	EFSYS_PROBE(fail3);
-fail2:
-	EFSYS_PROBE(fail2);
-fail1:
-	EFSYS_PROBE1(fail1, efx_rc_t, rc);
-
-	return (rc);
-}
-
-	__checkReturn		efx_rc_t
 siena_nvram_write_chunk(
 	__in			efx_nic_t *enp,
 	__in			efx_nvram_type_t type,

From owner-svn-src-all@freebsd.org  Sun Jan 17 05:38:05 2016
Return-Path: <owner-svn-src-all@freebsd.org>
Delivered-To: svn-src-all@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id 33961A6D579;
 Sun, 17 Jan 2016 05:38:05 +0000 (UTC)
 (envelope-from melifaro@FreeBSD.org)
Received: from repo.freebsd.org (repo.freebsd.org
 [IPv6:2610:1c1:1:6068::e6a:0])
 (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
 (Client did not present a certificate)
 by mx1.freebsd.org (Postfix) with ESMTPS id 0AEFA1587;
 Sun, 17 Jan 2016 05:38:04 +0000 (UTC)
 (envelope-from melifaro@FreeBSD.org)
Received: from repo.freebsd.org ([127.0.1.37])
 by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u0H5c3SK061926;
 Sun, 17 Jan 2016 05:38:03 GMT (envelope-from melifaro@FreeBSD.org)
Received: (from melifaro@localhost)
 by repo.freebsd.org (8.15.2/8.15.2/Submit) id u0H5c3l6061924;
 Sun, 17 Jan 2016 05:38:03 GMT (envelope-from melifaro@FreeBSD.org)
Message-Id: <201601170538.u0H5c3l6061924@repo.freebsd.org>
X-Authentication-Warning: repo.freebsd.org: melifaro set sender to
 melifaro@FreeBSD.org using -f
From: "Alexander V. Chernikov" <melifaro@FreeBSD.org>
Date: Sun, 17 Jan 2016 05:38:03 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org
Subject: svn commit: r294202 - in stable/10: sbin/ifconfig sys/net
X-SVN-Group: stable-10
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.20
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for &quot;
 user&quot; and &quot; projects&quot; \)" <svn-src-all.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-all/>
List-Post: <mailto:svn-src-all@freebsd.org>
List-Help: <mailto:svn-src-all-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Sun, 17 Jan 2016 05:38:05 -0000

Author: melifaro
Date: Sun Jan 17 05:38:03 2016
New Revision: 294202
URL: https://svnweb.freebsd.org/changeset/base/294202

Log:
  MFC r292831: Add SFF-8024 Extended Specification Compliance.
  
  Submitted by:		markb_mellanox.com
  Differential Revision:	https://reviews.freebsd.org/D4666

Modified:
  stable/10/sbin/ifconfig/sfp.c
  stable/10/sys/net/sff8436.h

Modified: stable/10/sbin/ifconfig/sfp.c
==============================================================================
--- stable/10/sbin/ifconfig/sfp.c	Sun Jan 17 05:12:37 2016	(r294201)
+++ stable/10/sbin/ifconfig/sfp.c	Sun Jan 17 05:38:03 2016	(r294202)
@@ -171,7 +171,7 @@ static struct _nv fc_speed[] = {
 
 /* 10/40G Ethernet compliance codes, byte 128 + 3 */
 static struct _nv eth_1040g[] = {
-	{ 0x80, "Reserved" },
+	{ 0x80, "Extended" },
 	{ 0x40, "10GBASE-LRM" },
 	{ 0x20, "10GBASE-LR" },
 	{ 0x10, "10GBASE-SR" },
@@ -181,6 +181,38 @@ static struct _nv eth_1040g[] = {
 	{ 0x01, "40G Active Cable" },
 	{ 0, NULL }
 };
+#define	SFF_8636_EXT_COMPLIANCE	0x80
+
+/* SFF-8024 Rev. 3.4 table 4.4: Extended Specification Compliance */
+static struct _nv eth_extended_comp[] = {
+	{ 0xFF, "Reserved" },
+	{ 0x1A, "2 lambda DWDM 100G" },
+	{ 0x19, "100G ACC or 25GAUI C2M ACC" },
+	{ 0x18, "100G AOC or 25GAUI C2M AOC" },
+	{ 0x17, "100G CLR4" },
+	{ 0x16, "10GBASE-T with SFI electrical interface" },
+	{ 0x15, "G959.1 profile P1L1-2D2" },
+	{ 0x14, "G959.1 profile P1S1-2D2" },
+	{ 0x13, "G959.1 profile P1I1-2D1" },
+	{ 0x12, "40G PSM4 Parallel SMF" },
+	{ 0x11, "4 x 10GBASE-SR" },
+	{ 0x10, "40GBASE-ER4" },
+	{ 0x0F, "Reserved" },
+	{ 0x0D, "25GBASE-CR CA-N" },
+	{ 0x0C, "25GBASE-CR CA-S" },
+	{ 0x0B, "100GBASE-CR4 or 25GBASE-CR CA-L" },
+	{ 0x0A, "Reserved" },
+	{ 0x09, "100G CWDM4 MSA without FEC" },
+	{ 0x08, "100G ACC (Active Copper Cable)" },
+	{ 0x07, "100G PSM4 Parallel SMF" },
+	{ 0x06, "100G CWDM4 MSA with FEC" },
+	{ 0x05, "100GBASE-SR10" },
+	{ 0x04, "100GBASE-ER4" },
+	{ 0x03, "100GBASE-LR4" },
+	{ 0x02, "100GBASE-SR4" },
+	{ 0x01, "100G AOC (Active Optical Cable) or 25GAUI C2M ACC" },
+	{ 0x00, "Unspecified" }
+};
 
 /* SFF-8636 Rev. 2.5 table 6.3: Revision compliance */
 static struct _nv rev_compl[] = {
@@ -371,9 +403,16 @@ get_qsfp_transceiver_class(struct i2c_in
 	const char *tech_class;
 	uint8_t code;
 
-	/* Check 10/40G Ethernet class only */
-	read_i2c(ii, SFF_8436_BASE, SFF_8436_CODE_E1040G, 1, &code);
-	tech_class = find_zero_bit(eth_1040g, code, 1);
+	read_i2c(ii, SFF_8436_BASE, SFF_8436_CODE_E1040100G, 1, &code);
+
+	/* Check for extended specification compliance */
+	if (code & SFF_8636_EXT_COMPLIANCE) {
+		read_i2c(ii, SFF_8436_BASE, SFF_8436_OPTIONS_START, 1, &code);
+		tech_class = find_value(eth_extended_comp, code);
+	} else
+		/* Check 10/40G Ethernet class only */
+		tech_class = find_zero_bit(eth_1040g, code, 1);
+
 	if (tech_class == NULL)
 		tech_class = "Unknown";
 
@@ -873,6 +912,7 @@ sfp_status(int s, struct ifreq *ifr, int
 	switch (id_byte) {
 	case SFF_8024_ID_QSFP:
 	case SFF_8024_ID_QSFPPLUS:
+	case SFF_8024_ID_QSFP28:
 		print_qsfp_status(&ii, verbose);
 		break;
 	default:

Modified: stable/10/sys/net/sff8436.h
==============================================================================
--- stable/10/sys/net/sff8436.h	Sun Jan 17 05:12:37 2016	(r294201)
+++ stable/10/sys/net/sff8436.h	Sun Jan 17 05:38:03 2016	(r294202)
@@ -131,7 +131,7 @@ enum {
 	SFF_8436_CONNECTOR	= 130,  /* Connector type (Table 32) */
 	SFF_8436_TRANS_START	= 131,  /* Electric or Optical Compatibility
 					 * (Table 33) */
-	SFF_8436_CODE_E1040G	= 131,	/* 10/40G Ethernet Compliance Code */
+	SFF_8436_CODE_E1040100G	= 131,	/* 10/40/100G Ethernet Compliance Code */
 	SFF_8436_CODE_SONET	= 132,	/* SONET Compliance codes */
 	SFF_8436_CODE_SATA	= 133,	/* SAS/SATA compliance codes */
 	SFF_8436_CODE_E1G	= 134,	/* Gigabit Ethernet Compliant codes */

From owner-svn-src-all@freebsd.org  Sun Jan 17 06:03:00 2016
Return-Path: <owner-svn-src-all@freebsd.org>
Delivered-To: svn-src-all@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id C753DA6DD53;
 Sun, 17 Jan 2016 06:03:00 +0000 (UTC)
 (envelope-from melifaro@FreeBSD.org)
Received: from repo.freebsd.org (repo.freebsd.org
 [IPv6:2610:1c1:1:6068::e6a:0])
 (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
 (Client did not present a certificate)
 by mx1.freebsd.org (Postfix) with ESMTPS id 967BF1F7D;
 Sun, 17 Jan 2016 06:03:00 +0000 (UTC)
 (envelope-from melifaro@FreeBSD.org)
Received: from repo.freebsd.org ([127.0.1.37])
 by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u0H62x74070229;
 Sun, 17 Jan 2016 06:02:59 GMT (envelope-from melifaro@FreeBSD.org)
Received: (from melifaro@localhost)
 by repo.freebsd.org (8.15.2/8.15.2/Submit) id u0H62xth070227;
 Sun, 17 Jan 2016 06:02:59 GMT (envelope-from melifaro@FreeBSD.org)
Message-Id: <201601170602.u0H62xth070227@repo.freebsd.org>
X-Authentication-Warning: repo.freebsd.org: melifaro set sender to
 melifaro@FreeBSD.org using -f
From: "Alexander V. Chernikov" <melifaro@FreeBSD.org>
Date: Sun, 17 Jan 2016 06:02:59 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org
Subject: svn commit: r294203 - in stable/10/usr.sbin: arp ndp
X-SVN-Group: stable-10
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.20
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for &quot;
 user&quot; and &quot; projects&quot; \)" <svn-src-all.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-all/>
List-Post: <mailto:svn-src-all@freebsd.org>
List-Help: <mailto:svn-src-all-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Sun, 17 Jan 2016 06:03:00 -0000

Author: melifaro
Date: Sun Jan 17 06:02:59 2016
New Revision: 294203
URL: https://svnweb.freebsd.org/changeset/base/294203

Log:
  MFC r288297 (userland part).
  
  If ever MFC is done for the new lltable code, this change will miminise
  ABI breakage.
  
  rtsock requests for deleting interface address lles started to return EPERM
    instead of old "ignore-and-return 0" in r287789. This broke arp -da /
    ndp -cn behavior (they exit on rtsock command failure). Fix this by
    translating LLE_IFADDR to RTM_PINNED flag, passing it to userland and
    making arp/ndp ignore these entries in batched delete.

Modified:
  stable/10/usr.sbin/arp/arp.c
  stable/10/usr.sbin/ndp/ndp.c

Modified: stable/10/usr.sbin/arp/arp.c
==============================================================================
--- stable/10/usr.sbin/arp/arp.c	Sun Jan 17 05:38:03 2016	(r294202)
+++ stable/10/usr.sbin/arp/arp.c	Sun Jan 17 06:02:59 2016	(r294203)
@@ -673,10 +673,13 @@ print_entry(struct sockaddr_dl *sdl,
  */
 static void
 nuke_entry(struct sockaddr_dl *sdl __unused,
-	struct sockaddr_in *addr, struct rt_msghdr *rtm __unused)
+	struct sockaddr_in *addr, struct rt_msghdr *rtm)
 {
 	char ip[20];
 
+	if (rtm->rtm_flags & RTF_PINNED)
+		return;
+
 	snprintf(ip, sizeof(ip), "%s", inet_ntoa(addr->sin_addr));
 	delete(ip);
 }

Modified: stable/10/usr.sbin/ndp/ndp.c
==============================================================================
--- stable/10/usr.sbin/ndp/ndp.c	Sun Jan 17 05:38:03 2016	(r294202)
+++ stable/10/usr.sbin/ndp/ndp.c	Sun Jan 17 06:02:59 2016	(r294203)
@@ -655,6 +655,8 @@ again:;
 			if (rtm->rtm_flags & RTF_CLONED)
 				delete(host_buf);
 #else
+			if (rtm->rtm_flags & RTF_PINNED)
+				continue;
 			delete(host_buf);
 #endif
 			continue;

From owner-svn-src-all@freebsd.org  Sun Jan 17 08:34:36 2016
Return-Path: <owner-svn-src-all@freebsd.org>
Delivered-To: svn-src-all@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id BCB24A6AD56;
 Sun, 17 Jan 2016 08:34:36 +0000 (UTC) (envelope-from kib@FreeBSD.org)
Received: from repo.freebsd.org (repo.freebsd.org
 [IPv6:2610:1c1:1:6068::e6a:0])
 (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
 (Client did not present a certificate)
 by mx1.freebsd.org (Postfix) with ESMTPS id 8A0DC1973;
 Sun, 17 Jan 2016 08:34:36 +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 u0H8YZYF014988;
 Sun, 17 Jan 2016 08:34:35 GMT (envelope-from kib@FreeBSD.org)
Received: (from kib@localhost)
 by repo.freebsd.org (8.15.2/8.15.2/Submit) id u0H8YZ12014987;
 Sun, 17 Jan 2016 08:34:35 GMT (envelope-from kib@FreeBSD.org)
Message-Id: <201601170834.u0H8YZ12014987@repo.freebsd.org>
X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org
 using -f
From: Konstantin Belousov <kib@FreeBSD.org>
Date: Sun, 17 Jan 2016 08:34:35 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-head@freebsd.org
Subject: svn commit: r294204 - 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-all@freebsd.org
X-Mailman-Version: 2.1.20
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for &quot;
 user&quot; and &quot; projects&quot; \)" <svn-src-all.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-all/>
List-Post: <mailto:svn-src-all@freebsd.org>
List-Help: <mailto:svn-src-all-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Sun, 17 Jan 2016 08:34:36 -0000

Author: kib
Date: Sun Jan 17 08:34:35 2016
New Revision: 294204
URL: https://svnweb.freebsd.org/changeset/base/294204

Log:
  Assert that the linkage between struct cdev_privdata and and struct
  file is consistent.
  
  Tested by:	pho
  Sponsored by:	The FreeBSD Foundation
  MFC after:	2 weeks

Modified:
  head/sys/fs/devfs/devfs_vnops.c

Modified: head/sys/fs/devfs/devfs_vnops.c
==============================================================================
--- head/sys/fs/devfs/devfs_vnops.c	Sun Jan 17 06:02:59 2016	(r294203)
+++ head/sys/fs/devfs/devfs_vnops.c	Sun Jan 17 08:34:35 2016	(r294204)
@@ -185,6 +185,8 @@ devfs_destroy_cdevpriv(struct cdev_privd
 {
 
 	mtx_assert(&cdevpriv_mtx, MA_OWNED);
+	KASSERT(p->cdpd_fp->f_cdevpriv == p,
+	    ("devfs_destoy_cdevpriv %p != %p", p->cdpd_fp->f_cdevpriv, p));
 	p->cdpd_fp->f_cdevpriv = NULL;
 	LIST_REMOVE(p, cdpd_list);
 	mtx_unlock(&cdevpriv_mtx);

From owner-svn-src-all@freebsd.org  Sun Jan 17 08:40:53 2016
Return-Path: <owner-svn-src-all@freebsd.org>
Delivered-To: svn-src-all@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id EE45FA6AF1B;
 Sun, 17 Jan 2016 08:40:52 +0000 (UTC) (envelope-from kib@FreeBSD.org)
Received: from repo.freebsd.org (repo.freebsd.org
 [IPv6:2610:1c1:1:6068::e6a:0])
 (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
 (Client did not present a certificate)
 by mx1.freebsd.org (Postfix) with ESMTPS id CB9F71BC5;
 Sun, 17 Jan 2016 08:40:52 +0000 (UTC) (envelope-from kib@FreeBSD.org)
Received: from repo.freebsd.org ([127.0.1.37])
 by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u0H8epOc015238;
 Sun, 17 Jan 2016 08:40:51 GMT (envelope-from kib@FreeBSD.org)
Received: (from kib@localhost)
 by repo.freebsd.org (8.15.2/8.15.2/Submit) id u0H8epU9015236;
 Sun, 17 Jan 2016 08:40:51 GMT (envelope-from kib@FreeBSD.org)
Message-Id: <201601170840.u0H8epU9015236@repo.freebsd.org>
X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org
 using -f
From: Konstantin Belousov <kib@FreeBSD.org>
Date: Sun, 17 Jan 2016 08:40:51 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-head@freebsd.org
Subject: svn commit: r294205 - in head/sys: kern sys
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.20
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for &quot;
 user&quot; and &quot; projects&quot; \)" <svn-src-all.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-all/>
List-Post: <mailto:svn-src-all@freebsd.org>
List-Help: <mailto:svn-src-all-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Sun, 17 Jan 2016 08:40:53 -0000

Author: kib
Date: Sun Jan 17 08:40:51 2016
New Revision: 294205
URL: https://svnweb.freebsd.org/changeset/base/294205

Log:
  When cleaning up from failed adv locking and checking for write, do
  not call VOP_CLOSE() manually.  Instead, delegate the close to
  fo_close() performed as part of the fdrop() on the file failed to
  open.  For this, finish constructing file on error, in particular, set
  f_vnode and f_ops.
  
  Forcibly resetting f_ops to badfileops disabled additional cleanups
  performed by fo_close() for some file types, in this case it was noted
  that cdevpriv data was corrupted.  Since fo_close() call must be
  enabled for some file types, it makes more sense to enable it for all
  files opened through vn_open_cred().
  
  In collaboration with:	pho
  Sponsored by:	The FreeBSD Foundation
  MFC after:	2 weeks

Modified:
  head/sys/kern/vfs_vnops.c
  head/sys/sys/fcntl.h

Modified: head/sys/kern/vfs_vnops.c
==============================================================================
--- head/sys/kern/vfs_vnops.c	Sun Jan 17 08:34:35 2016	(r294204)
+++ head/sys/kern/vfs_vnops.c	Sun Jan 17 08:40:51 2016	(r294205)
@@ -299,10 +299,9 @@ int
 vn_open_vnode(struct vnode *vp, int fmode, struct ucred *cred,
     struct thread *td, struct file *fp)
 {
-	struct mount *mp;
 	accmode_t accmode;
 	struct flock lf;
-	int error, have_flock, lock_flags, type;
+	int error, lock_flags, type;
 
 	if (vp->v_type == VLNK)
 		return (EMLINK);
@@ -365,10 +364,12 @@ vn_open_vnode(struct vnode *vp, int fmod
 		if ((fmode & FNONBLOCK) == 0)
 			type |= F_WAIT;
 		error = VOP_ADVLOCK(vp, (caddr_t)fp, F_SETLK, &lf, type);
-		have_flock = (error == 0);
+		if (error == 0)
+			fp->f_flag |= FHASLOCK;
 		vn_lock(vp, lock_flags | LK_RETRY);
 		if (error == 0 && vp->v_iflag & VI_DOOMED)
 			error = ENOENT;
+
 		/*
 		 * Another thread might have used this vnode as an
 		 * executable while the vnode lock was dropped.
@@ -377,34 +378,24 @@ vn_open_vnode(struct vnode *vp, int fmod
 		 */
 		if (error == 0 && accmode & VWRITE)
 			error = vn_writechk(vp);
-		if (error) {
-			VOP_UNLOCK(vp, 0);
-			if (have_flock) {
-				lf.l_whence = SEEK_SET;
-				lf.l_start = 0;
-				lf.l_len = 0;
-				lf.l_type = F_UNLCK;
-				(void) VOP_ADVLOCK(vp, fp, F_UNLCK, &lf,
-				    F_FLOCK);
+
+		if (error != 0) {
+			fp->f_flag |= FOPENFAILED;
+			fp->f_vnode = vp;
+			if (fp->f_ops == &badfileops) {
+				fp->f_type = DTYPE_VNODE;
+				fp->f_ops = &vnops;
 			}
-			vn_start_write(vp, &mp, V_WAIT);
-			vn_lock(vp, lock_flags | LK_RETRY);
-			(void)VOP_CLOSE(vp, fmode, cred, td);
-			vn_finished_write(mp);
-			/* Prevent second close from fdrop()->vn_close(). */
-			if (fp != NULL)
-				fp->f_ops= &badfileops;
-			return (error);
+			vref(vp);
 		}
-		fp->f_flag |= FHASLOCK;
 	}
-	if (fmode & FWRITE) {
+	if (error == 0 && fmode & FWRITE) {
 		VOP_ADD_WRITECOUNT(vp, 1);
 		CTR3(KTR_VFS, "%s: vp %p v_writecount increased to %d",
 		    __func__, vp, vp->v_writecount);
 	}
 	ASSERT_VOP_LOCKED(vp, "vn_open_vnode");
-	return (0);
+	return (error);
 }
 
 /*
@@ -449,7 +440,7 @@ vn_close(vp, flags, file_cred, td)
 
 	vn_start_write(vp, &mp, V_WAIT);
 	vn_lock(vp, lock_flags | LK_RETRY);
-	if (flags & FWRITE) {
+	if ((flags & (FWRITE | FOPENFAILED)) == FWRITE) {
 		VNASSERT(vp->v_writecount > 0, vp, 
 		    ("vn_close: negative writecount"));
 		VOP_ADD_WRITECOUNT(vp, -1);

Modified: head/sys/sys/fcntl.h
==============================================================================
--- head/sys/sys/fcntl.h	Sun Jan 17 08:34:35 2016	(r294204)
+++ head/sys/sys/fcntl.h	Sun Jan 17 08:40:51 2016	(r294205)
@@ -142,6 +142,8 @@ typedef	__pid_t		pid_t;
 /* Only for devfs d_close() flags. */
 #define	FLASTCLOSE	O_DIRECTORY
 #define	FREVOKE		O_VERIFY
+/* Only for fo_close() from half-succeeded open */
+#define	FOPENFAILED	O_TTY_INIT
 
 /* convert from open() flags to/from fflags; convert O_RD/WR to FREAD/FWRITE */
 #define	FFLAGS(oflags)	((oflags) & O_EXEC ? (oflags) : (oflags) + 1)

From owner-svn-src-all@freebsd.org  Sun Jan 17 11:59:43 2016
Return-Path: <owner-svn-src-all@freebsd.org>
Delivered-To: svn-src-all@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id A9BDAA85926;
 Sun, 17 Jan 2016 11:59:43 +0000 (UTC)
 (envelope-from tuexen@FreeBSD.org)
Received: from repo.freebsd.org (repo.freebsd.org
 [IPv6:2610:1c1:1:6068::e6a:0])
 (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
 (Client did not present a certificate)
 by mx1.freebsd.org (Postfix) with ESMTPS id 76D4D173C;
 Sun, 17 Jan 2016 11:59:43 +0000 (UTC)
 (envelope-from tuexen@FreeBSD.org)
Received: from repo.freebsd.org ([127.0.1.37])
 by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u0HBxg61074492;
 Sun, 17 Jan 2016 11:59:42 GMT (envelope-from tuexen@FreeBSD.org)
Received: (from tuexen@localhost)
 by repo.freebsd.org (8.15.2/8.15.2/Submit) id u0HBxgFZ074491;
 Sun, 17 Jan 2016 11:59:42 GMT (envelope-from tuexen@FreeBSD.org)
Message-Id: <201601171159.u0HBxgFZ074491@repo.freebsd.org>
X-Authentication-Warning: repo.freebsd.org: tuexen set sender to
 tuexen@FreeBSD.org using -f
From: Michael Tuexen <tuexen@FreeBSD.org>
Date: Sun, 17 Jan 2016 11:59:42 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org
Subject: svn commit: r294206 - stable/10/sys/netinet
X-SVN-Group: stable-10
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.20
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for &quot;
 user&quot; and &quot; projects&quot; \)" <svn-src-all.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-all/>
List-Post: <mailto:svn-src-all@freebsd.org>
List-Help: <mailto:svn-src-all-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Sun, 17 Jan 2016 11:59:43 -0000

Author: tuexen
Date: Sun Jan 17 11:59:42 2016
New Revision: 294206
URL: https://svnweb.freebsd.org/changeset/base/294206

Log:
  MFC r291376:
  When the sending of an SCTP outgoing stream reset request fails,
  don't report it to the user since all stream have been marked
  as pending.

Modified:
  stable/10/sys/netinet/sctp_usrreq.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/sys/netinet/sctp_usrreq.c
==============================================================================
--- stable/10/sys/netinet/sctp_usrreq.c	Sun Jan 17 08:40:51 2016	(r294205)
+++ stable/10/sys/netinet/sctp_usrreq.c	Sun Jan 17 11:59:42 2016	(r294206)
@@ -4651,11 +4651,20 @@ sctp_setopt(struct socket *so, int optna
 				error = sctp_send_str_reset_req(stcb, strrst->srs_number_streams,
 				    strrst->srs_stream_list,
 				    send_in, 0, 0, 0, 0, 0);
-			} else
+			} else {
 				error = sctp_send_stream_reset_out_if_possible(stcb, SCTP_SO_LOCKED);
-			if (!error)
+			}
+			if (error == 0) {
 				sctp_chunk_output(inp, stcb, SCTP_OUTPUT_FROM_STRRST_REQ, SCTP_SO_LOCKED);
-
+			} else {
+				/*
+				 * For outgoing streams don't report any
+				 * problems in sending the request to the
+				 * application. XXX: Double check resetting
+				 * incoming streams.
+				 */
+				error = 0;
+			}
 			SCTP_TCB_UNLOCK(stcb);
 			break;
 		}

From owner-svn-src-all@freebsd.org  Sun Jan 17 12:02:06 2016
Return-Path: <owner-svn-src-all@freebsd.org>
Delivered-To: svn-src-all@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1EF89A851AB;
 Sun, 17 Jan 2016 12:02:06 +0000 (UTC)
 (envelope-from tuexen@FreeBSD.org)
Received: from repo.freebsd.org (repo.freebsd.org
 [IPv6:2610:1c1:1:6068::e6a:0])
 (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
 (Client did not present a certificate)
 by mx1.freebsd.org (Postfix) with ESMTPS id CAA231CFD;
 Sun, 17 Jan 2016 12:02:05 +0000 (UTC)
 (envelope-from tuexen@FreeBSD.org)
Received: from repo.freebsd.org ([127.0.1.37])
 by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u0HC24KC077121;
 Sun, 17 Jan 2016 12:02:04 GMT (envelope-from tuexen@FreeBSD.org)
Received: (from tuexen@localhost)
 by repo.freebsd.org (8.15.2/8.15.2/Submit) id u0HC244D077120;
 Sun, 17 Jan 2016 12:02:04 GMT (envelope-from tuexen@FreeBSD.org)
Message-Id: <201601171202.u0HC244D077120@repo.freebsd.org>
X-Authentication-Warning: repo.freebsd.org: tuexen set sender to
 tuexen@FreeBSD.org using -f
From: Michael Tuexen <tuexen@FreeBSD.org>
Date: Sun, 17 Jan 2016 12:02:04 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org
Subject: svn commit: r294207 - stable/10/sys/netinet
X-SVN-Group: stable-10
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.20
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for &quot;
 user&quot; and &quot; projects&quot; \)" <svn-src-all.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-all/>
List-Post: <mailto:svn-src-all@freebsd.org>
List-Help: <mailto:svn-src-all-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Sun, 17 Jan 2016 12:02:06 -0000

Author: tuexen
Date: Sun Jan 17 12:02:04 2016
New Revision: 294207
URL: https://svnweb.freebsd.org/changeset/base/294207

Log:
  MFC r291410:
  Take also the send queue and sent queue into account when triggering
  the sending of outgoing stream reset requests.

Modified:
  stable/10/sys/netinet/sctp_output.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/sys/netinet/sctp_output.c
==============================================================================
--- stable/10/sys/netinet/sctp_output.c	Sun Jan 17 11:59:42 2016	(r294206)
+++ stable/10/sys/netinet/sctp_output.c	Sun Jan 17 12:02:04 2016	(r294207)
@@ -7169,7 +7169,8 @@ one_more_time:
 			}
 			atomic_subtract_int(&asoc->stream_queue_cnt, 1);
 			TAILQ_REMOVE(&strq->outqueue, sp, next);
-			if (strq->state == SCTP_STREAM_RESET_PENDING &&
+			if ((strq->state == SCTP_STREAM_RESET_PENDING) &&
+			    (strq->chunks_on_queues == 0) &&
 			    TAILQ_EMPTY(&strq->outqueue)) {
 				stcb->asoc.trigger_reset = 1;
 			}
@@ -7571,7 +7572,8 @@ dont_do_it:
 			send_lock_up = 1;
 		}
 		TAILQ_REMOVE(&strq->outqueue, sp, next);
-		if (strq->state == SCTP_STREAM_RESET_PENDING &&
+		if ((strq->state == SCTP_STREAM_RESET_PENDING) &&
+		    (strq->chunks_on_queues == 0) &&
 		    TAILQ_EMPTY(&strq->outqueue)) {
 			stcb->asoc.trigger_reset = 1;
 		}
@@ -11577,7 +11579,8 @@ sctp_add_stream_reset_out(struct sctp_tc
 	/* now how long will this param be? */
 	for (i = 0; i < stcb->asoc.streamoutcnt; i++) {
 		if ((stcb->asoc.strmout[i].state == SCTP_STREAM_RESET_PENDING) &&
-		    (TAILQ_EMPTY(&stcb->asoc.strmout[i].outqueue))) {
+		    (stcb->asoc.strmout[i].chunks_on_queues == 0) &&
+		    TAILQ_EMPTY(&stcb->asoc.strmout[i].outqueue)) {
 			number_entries++;
 		}
 	}
@@ -11600,7 +11603,8 @@ sctp_add_stream_reset_out(struct sctp_tc
 	if (number_entries) {
 		for (i = 0; i < stcb->asoc.streamoutcnt; i++) {
 			if ((stcb->asoc.strmout[i].state == SCTP_STREAM_RESET_PENDING) &&
-			    (TAILQ_EMPTY(&stcb->asoc.strmout[i].outqueue))) {
+			    (stcb->asoc.strmout[i].chunks_on_queues == 0) &&
+			    TAILQ_EMPTY(&stcb->asoc.strmout[i].outqueue)) {
 				req_out->list_of_streams[at] = htons(i);
 				at++;
 				stcb->asoc.strmout[i].state = SCTP_STREAM_RESET_IN_FLIGHT;

From owner-svn-src-all@freebsd.org  Sun Jan 17 12:04:00 2016
Return-Path: <owner-svn-src-all@freebsd.org>
Delivered-To: svn-src-all@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id 968D8A852BE;
 Sun, 17 Jan 2016 12:04:00 +0000 (UTC)
 (envelope-from tuexen@FreeBSD.org)
Received: from repo.freebsd.org (repo.freebsd.org
 [IPv6:2610:1c1:1:6068::e6a:0])
 (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
 (Client did not present a certificate)
 by mx1.freebsd.org (Postfix) with ESMTPS id 4A18B1031;
 Sun, 17 Jan 2016 12:04:00 +0000 (UTC)
 (envelope-from tuexen@FreeBSD.org)
Received: from repo.freebsd.org ([127.0.1.37])
 by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u0HC3xEe077404;
 Sun, 17 Jan 2016 12:03:59 GMT (envelope-from tuexen@FreeBSD.org)
Received: (from tuexen@localhost)
 by repo.freebsd.org (8.15.2/8.15.2/Submit) id u0HC3xDu077403;
 Sun, 17 Jan 2016 12:03:59 GMT (envelope-from tuexen@FreeBSD.org)
Message-Id: <201601171203.u0HC3xDu077403@repo.freebsd.org>
X-Authentication-Warning: repo.freebsd.org: tuexen set sender to
 tuexen@FreeBSD.org using -f
From: Michael Tuexen <tuexen@FreeBSD.org>
Date: Sun, 17 Jan 2016 12:03:59 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org
Subject: svn commit: r294208 - stable/10/sys/netinet
X-SVN-Group: stable-10
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.20
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for &quot;
 user&quot; and &quot; projects&quot; \)" <svn-src-all.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-all/>
List-Post: <mailto:svn-src-all@freebsd.org>
List-Help: <mailto:svn-src-all-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Sun, 17 Jan 2016 12:04:00 -0000

Author: tuexen
Date: Sun Jan 17 12:03:59 2016
New Revision: 294208
URL: https://svnweb.freebsd.org/changeset/base/294208

Log:
  MFC r291651:
  Adjust the MTU when accepting an SCTP association using
  UDP encapsulation.

Modified:
  stable/10/sys/netinet/sctp_input.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/sys/netinet/sctp_input.c
==============================================================================
--- stable/10/sys/netinet/sctp_input.c	Sun Jan 17 12:02:04 2016	(r294207)
+++ stable/10/sys/netinet/sctp_input.c	Sun Jan 17 12:03:59 2016	(r294208)
@@ -521,7 +521,6 @@ sctp_process_init_ack(struct mbuf *m, in
 	/* calculate the RTO */
 	net->RTO = sctp_calculate_rto(stcb, asoc, net, &asoc->time_entered, sctp_align_safe_nocopy,
 	    SCTP_RTT_FROM_NON_DATA);
-
 	retval = sctp_send_cookie_echo(m, offset, stcb, net);
 	if (retval < 0) {
 		/*
@@ -2347,12 +2346,17 @@ sctp_process_cookie_new(struct mbuf *m, 
 		sctp_timer_start(SCTP_TIMER_TYPE_AUTOCLOSE, inp, stcb, NULL);
 	}
 	(void)SCTP_GETTIME_TIMEVAL(&stcb->asoc.time_entered);
-	if ((netp) && (*netp)) {
+	if ((netp != NULL) && (*netp != NULL)) {
 		/* calculate the RTT and set the encaps port */
 		(*netp)->RTO = sctp_calculate_rto(stcb, asoc, *netp,
 		    &cookie->time_entered, sctp_align_unsafe_makecopy,
 		    SCTP_RTT_FROM_NON_DATA);
+#if defined(INET) || defined(INET6)
+		if (((*netp)->port == 0) && (port != 0)) {
+			sctp_pathmtu_adjustment(stcb, (*netp)->mtu - sizeof(struct udphdr));
+		}
 		(*netp)->port = port;
+#endif
 	}
 	/* respond with a COOKIE-ACK */
 	sctp_send_cookie_ack(stcb);
@@ -5847,7 +5851,7 @@ sctp_common_input_processing(struct mbuf
 			 */
 			inp = stcb->sctp_ep;
 #if defined(INET) || defined(INET6)
-			if ((net) && (port)) {
+			if ((net != NULL) && (port != 0)) {
 				if (net->port == 0) {
 					sctp_pathmtu_adjustment(stcb, net->mtu - sizeof(struct udphdr));
 				}

From owner-svn-src-all@freebsd.org  Sun Jan 17 12:05:45 2016
Return-Path: <owner-svn-src-all@freebsd.org>
Delivered-To: svn-src-all@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id 87C66A853EC;
 Sun, 17 Jan 2016 12:05:45 +0000 (UTC)
 (envelope-from tuexen@FreeBSD.org)
Received: from repo.freebsd.org (repo.freebsd.org
 [IPv6:2610:1c1:1:6068::e6a:0])
 (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
 (Client did not present a certificate)
 by mx1.freebsd.org (Postfix) with ESMTPS id 54A2F1337;
 Sun, 17 Jan 2016 12:05:45 +0000 (UTC)
 (envelope-from tuexen@FreeBSD.org)
Received: from repo.freebsd.org ([127.0.1.37])
 by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u0HC5iHb077665;
 Sun, 17 Jan 2016 12:05:44 GMT (envelope-from tuexen@FreeBSD.org)
Received: (from tuexen@localhost)
 by repo.freebsd.org (8.15.2/8.15.2/Submit) id u0HC5iGh077664;
 Sun, 17 Jan 2016 12:05:44 GMT (envelope-from tuexen@FreeBSD.org)
Message-Id: <201601171205.u0HC5iGh077664@repo.freebsd.org>
X-Authentication-Warning: repo.freebsd.org: tuexen set sender to
 tuexen@FreeBSD.org using -f
From: Michael Tuexen <tuexen@FreeBSD.org>
Date: Sun, 17 Jan 2016 12:05:44 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org
Subject: svn commit: r294209 - stable/10/sys/netinet
X-SVN-Group: stable-10
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.20
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for &quot;
 user&quot; and &quot; projects&quot; \)" <svn-src-all.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-all/>
List-Post: <mailto:svn-src-all@freebsd.org>
List-Help: <mailto:svn-src-all-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Sun, 17 Jan 2016 12:05:45 -0000

Author: tuexen
Date: Sun Jan 17 12:05:44 2016
New Revision: 294209
URL: https://svnweb.freebsd.org/changeset/base/294209

Log:
  MFC r291659:
  Minor cleanup. No functional change.

Modified:
  stable/10/sys/netinet/sctp_output.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/sys/netinet/sctp_output.c
==============================================================================
--- stable/10/sys/netinet/sctp_output.c	Sun Jan 17 12:03:59 2016	(r294208)
+++ stable/10/sys/netinet/sctp_output.c	Sun Jan 17 12:05:44 2016	(r294209)
@@ -12069,7 +12069,7 @@ sctp_send_str_reset_req(struct sctp_tcb 
 		oldstream = stcb->asoc.strmout;
 		/* get some more */
 		SCTP_MALLOC(stcb->asoc.strmout, struct sctp_stream_out *,
-		    ((stcb->asoc.streamoutcnt + adding_o) * sizeof(struct sctp_stream_out)),
+		    (stcb->asoc.streamoutcnt + adding_o) * sizeof(struct sctp_stream_out),
 		    SCTP_M_STRMO);
 		if (stcb->asoc.strmout == NULL) {
 			uint8_t x;

From owner-svn-src-all@freebsd.org  Sun Jan 17 12:07:49 2016
Return-Path: <owner-svn-src-all@freebsd.org>
Delivered-To: svn-src-all@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id 31C55A854B0;
 Sun, 17 Jan 2016 12:07:49 +0000 (UTC)
 (envelope-from tuexen@FreeBSD.org)
Received: from repo.freebsd.org (repo.freebsd.org
 [IPv6:2610:1c1:1:6068::e6a:0])
 (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
 (Client did not present a certificate)
 by mx1.freebsd.org (Postfix) with ESMTPS id E7A9F1507;
 Sun, 17 Jan 2016 12:07:48 +0000 (UTC)
 (envelope-from tuexen@FreeBSD.org)
Received: from repo.freebsd.org ([127.0.1.37])
 by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u0HC7lRX077789;
 Sun, 17 Jan 2016 12:07:47 GMT (envelope-from tuexen@FreeBSD.org)
Received: (from tuexen@localhost)
 by repo.freebsd.org (8.15.2/8.15.2/Submit) id u0HC7lAp077785;
 Sun, 17 Jan 2016 12:07:47 GMT (envelope-from tuexen@FreeBSD.org)
Message-Id: <201601171207.u0HC7lAp077785@repo.freebsd.org>
X-Authentication-Warning: repo.freebsd.org: tuexen set sender to
 tuexen@FreeBSD.org using -f
From: Michael Tuexen <tuexen@FreeBSD.org>
Date: Sun, 17 Jan 2016 12:07:47 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org
Subject: svn commit: r294210 - stable/10/sys/netinet
X-SVN-Group: stable-10
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.20
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for &quot;
 user&quot; and &quot; projects&quot; \)" <svn-src-all.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-all/>
List-Post: <mailto:svn-src-all@freebsd.org>
List-Help: <mailto:svn-src-all-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Sun, 17 Jan 2016 12:07:49 -0000

Author: tuexen
Date: Sun Jan 17 12:07:47 2016
New Revision: 294210
URL: https://svnweb.freebsd.org/changeset/base/294210

Log:
  MFC r291700:
  Ensure that outgoing streams get reset when they run dry.

Modified:
  stable/10/sys/netinet/sctp_indata.c
  stable/10/sys/netinet/sctp_input.c
  stable/10/sys/netinet/sctp_output.c
  stable/10/sys/netinet/sctp_timer.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/sys/netinet/sctp_indata.c
==============================================================================
--- stable/10/sys/netinet/sctp_indata.c	Sun Jan 17 12:05:44 2016	(r294209)
+++ stable/10/sys/netinet/sctp_indata.c	Sun Jan 17 12:07:47 2016	(r294210)
@@ -2763,6 +2763,11 @@ sctp_process_segment_range(struct sctp_t
 							panic("No chunks on the queues for sid %u.", tp1->rec.data.stream_number);
 #endif
 						}
+						if ((stcb->asoc.strmout[tp1->rec.data.stream_number].chunks_on_queues == 0) &&
+						    (stcb->asoc.strmout[tp1->rec.data.stream_number].state == SCTP_STREAM_RESET_PENDING) &&
+						    TAILQ_EMPTY(&stcb->asoc.strmout[tp1->rec.data.stream_number].outqueue)) {
+							stcb->asoc.trigger_reset = 1;
+						}
 						tp1->sent = SCTP_DATAGRAM_NR_ACKED;
 						if (tp1->data) {
 							/*
@@ -3736,6 +3741,11 @@ sctp_express_handle_sack(struct sctp_tcb
 #endif
 					}
 				}
+				if ((asoc->strmout[tp1->rec.data.stream_number].chunks_on_queues == 0) &&
+				    (asoc->strmout[tp1->rec.data.stream_number].state == SCTP_STREAM_RESET_PENDING) &&
+				    TAILQ_EMPTY(&asoc->strmout[tp1->rec.data.stream_number].outqueue)) {
+					asoc->trigger_reset = 1;
+				}
 				TAILQ_REMOVE(&asoc->sent_queue, tp1, sctp_next);
 				if (tp1->data) {
 					/* sa_ignore NO_NULL_CHK */
@@ -4461,6 +4471,11 @@ sctp_handle_sack(struct mbuf *m, int off
 #endif
 			}
 		}
+		if ((asoc->strmout[tp1->rec.data.stream_number].chunks_on_queues == 0) &&
+		    (asoc->strmout[tp1->rec.data.stream_number].state == SCTP_STREAM_RESET_PENDING) &&
+		    TAILQ_EMPTY(&asoc->strmout[tp1->rec.data.stream_number].outqueue)) {
+			asoc->trigger_reset = 1;
+		}
 		TAILQ_REMOVE(&asoc->sent_queue, tp1, sctp_next);
 		if (PR_SCTP_ENABLED(tp1->flags)) {
 			if (asoc->pr_sctp_cnt != 0)

Modified: stable/10/sys/netinet/sctp_input.c
==============================================================================
--- stable/10/sys/netinet/sctp_input.c	Sun Jan 17 12:05:44 2016	(r294209)
+++ stable/10/sys/netinet/sctp_input.c	Sun Jan 17 12:07:47 2016	(r294210)
@@ -6026,7 +6026,7 @@ trigger_send:
 	if (!TAILQ_EMPTY(&stcb->asoc.control_send_queue)) {
 		cnt_ctrl_ready = stcb->asoc.ctrl_queue_cnt - stcb->asoc.ecn_echo_cnt_onq;
 	}
-	if (cnt_ctrl_ready ||
+	if (cnt_ctrl_ready || stcb->asoc.trigger_reset ||
 	    ((un_sent) &&
 	    (stcb->asoc.peers_rwnd > 0 ||
 	    (stcb->asoc.peers_rwnd <= 0 && stcb->asoc.total_flight == 0)))) {

Modified: stable/10/sys/netinet/sctp_output.c
==============================================================================
--- stable/10/sys/netinet/sctp_output.c	Sun Jan 17 12:05:44 2016	(r294209)
+++ stable/10/sys/netinet/sctp_output.c	Sun Jan 17 12:07:47 2016	(r294210)
@@ -9913,7 +9913,6 @@ sctp_chunk_output(struct sctp_inpcb *inp
 	asoc = &stcb->asoc;
 do_it_again:
 	/* The Nagle algorithm is only applied when handling a send call. */
-	stcb->asoc.trigger_reset = 0;
 	if (from_where == SCTP_OUTPUT_FROM_USR_SEND) {
 		if (sctp_is_feature_on(inp, SCTP_PCB_FLAGS_NODELAY)) {
 			nagle_on = 0;
@@ -9930,7 +9929,8 @@ do_it_again:
 	if ((un_sent <= 0) &&
 	    (TAILQ_EMPTY(&asoc->control_send_queue)) &&
 	    (TAILQ_EMPTY(&asoc->asconf_send_queue)) &&
-	    (asoc->sent_queue_retran_cnt == 0)) {
+	    (asoc->sent_queue_retran_cnt == 0) &&
+	    (asoc->trigger_reset == 0)) {
 		/* Nothing to do unless there is something to be sent left */
 		return;
 	}
@@ -11901,6 +11901,7 @@ sctp_send_stream_reset_out_if_possible(s
 	uint32_t seq;
 
 	asoc = &stcb->asoc;
+	asoc->trigger_reset = 0;
 	if (asoc->stream_reset_outstanding) {
 		return (EALREADY);
 	}

Modified: stable/10/sys/netinet/sctp_timer.c
==============================================================================
--- stable/10/sys/netinet/sctp_timer.c	Sun Jan 17 12:05:44 2016	(r294209)
+++ stable/10/sys/netinet/sctp_timer.c	Sun Jan 17 12:07:47 2016	(r294210)
@@ -442,6 +442,11 @@ sctp_recover_sent_list(struct sctp_tcb *
 					asoc->strmout[chk->rec.data.stream_number].chunks_on_queues--;
 				}
 			}
+			if ((asoc->strmout[chk->rec.data.stream_number].chunks_on_queues == 0) &&
+			    (asoc->strmout[chk->rec.data.stream_number].state == SCTP_STREAM_RESET_PENDING) &&
+			    TAILQ_EMPTY(&asoc->strmout[chk->rec.data.stream_number].outqueue)) {
+				asoc->trigger_reset = 1;
+			}
 			TAILQ_REMOVE(&asoc->sent_queue, chk, sctp_next);
 			if (PR_SCTP_ENABLED(chk->flags)) {
 				if (asoc->pr_sctp_cnt != 0)

From owner-svn-src-all@freebsd.org  Sun Jan 17 12:13:22 2016
Return-Path: <owner-svn-src-all@freebsd.org>
Delivered-To: svn-src-all@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id EC962A8578A;
 Sun, 17 Jan 2016 12:13:22 +0000 (UTC)
 (envelope-from tuexen@FreeBSD.org)
Received: from repo.freebsd.org (repo.freebsd.org
 [IPv6:2610:1c1:1:6068::e6a:0])
 (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
 (Client did not present a certificate)
 by mx1.freebsd.org (Postfix) with ESMTPS id BB32F1D1A;
 Sun, 17 Jan 2016 12:13:22 +0000 (UTC)
 (envelope-from tuexen@FreeBSD.org)
Received: from repo.freebsd.org ([127.0.1.37])
 by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u0HCDLAK080582;
 Sun, 17 Jan 2016 12:13:21 GMT (envelope-from tuexen@FreeBSD.org)
Received: (from tuexen@localhost)
 by repo.freebsd.org (8.15.2/8.15.2/Submit) id u0HCDLv4080581;
 Sun, 17 Jan 2016 12:13:21 GMT (envelope-from tuexen@FreeBSD.org)
Message-Id: <201601171213.u0HCDLv4080581@repo.freebsd.org>
X-Authentication-Warning: repo.freebsd.org: tuexen set sender to
 tuexen@FreeBSD.org using -f
From: Michael Tuexen <tuexen@FreeBSD.org>
Date: Sun, 17 Jan 2016 12:13:21 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org
Subject: svn commit: r294213 - stable/10/sys/netinet
X-SVN-Group: stable-10
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.20
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for &quot;
 user&quot; and &quot; projects&quot; \)" <svn-src-all.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-all/>
List-Post: <mailto:svn-src-all@freebsd.org>
List-Help: <mailto:svn-src-all-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Sun, 17 Jan 2016 12:13:23 -0000

Author: tuexen
Date: Sun Jan 17 12:13:21 2016
New Revision: 294213
URL: https://svnweb.freebsd.org/changeset/base/294213

Log:
  MFC r291752:
  Fix a bug where a stream reset request wasn't retranmitted when the
  peer indicated "In progress".

Modified:
  stable/10/sys/netinet/sctp_input.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/sys/netinet/sctp_input.c
==============================================================================
--- stable/10/sys/netinet/sctp_input.c	Sun Jan 17 12:08:52 2016	(r294212)
+++ stable/10/sys/netinet/sctp_input.c	Sun Jan 17 12:13:21 2016	(r294213)
@@ -3651,6 +3651,7 @@ sctp_handle_stream_reset_response(struct
 					 * Set it up so we don't stop
 					 * retransmitting
 					 */
+					asoc->stream_reset_outstanding++;
 					stcb->asoc.str_reset_seq_out--;
 					asoc->stream_reset_out_is_outstanding = 1;
 					no_clear = 1;

From owner-svn-src-all@freebsd.org  Sun Jan 17 12:15:43 2016
Return-Path: <owner-svn-src-all@freebsd.org>
Delivered-To: svn-src-all@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id 95D9DA8586F;
 Sun, 17 Jan 2016 12:15:43 +0000 (UTC)
 (envelope-from tuexen@FreeBSD.org)
Received: from repo.freebsd.org (repo.freebsd.org
 [IPv6:2610:1c1:1:6068::e6a:0])
 (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
 (Client did not present a certificate)
 by mx1.freebsd.org (Postfix) with ESMTPS id 7347C1F76;
 Sun, 17 Jan 2016 12:15:43 +0000 (UTC)
 (envelope-from tuexen@FreeBSD.org)
Received: from repo.freebsd.org ([127.0.1.37])
 by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u0HCFgHe080765;
 Sun, 17 Jan 2016 12:15:42 GMT (envelope-from tuexen@FreeBSD.org)
Received: (from tuexen@localhost)
 by repo.freebsd.org (8.15.2/8.15.2/Submit) id u0HCFfQM080757;
 Sun, 17 Jan 2016 12:15:41 GMT (envelope-from tuexen@FreeBSD.org)
Message-Id: <201601171215.u0HCFfQM080757@repo.freebsd.org>
X-Authentication-Warning: repo.freebsd.org: tuexen set sender to
 tuexen@FreeBSD.org using -f
From: Michael Tuexen <tuexen@FreeBSD.org>
Date: Sun, 17 Jan 2016 12:15:41 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org
Subject: svn commit: r294215 - in stable/10/sys: netinet netinet6
X-SVN-Group: stable-10
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.20
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for &quot;
 user&quot; and &quot; projects&quot; \)" <svn-src-all.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-all/>
List-Post: <mailto:svn-src-all@freebsd.org>
List-Help: <mailto:svn-src-all-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Sun, 17 Jan 2016 12:15:43 -0000

Author: tuexen
Date: Sun Jan 17 12:15:41 2016
New Revision: 294215
URL: https://svnweb.freebsd.org/changeset/base/294215

Log:
  MFC r291904:
  Fix the allocation of outgoing streams:
  * When processing a cookie, use the number of
    streams announced in the INIT-ACK.
  * When sending an INIT-ACK for an existing
    association, use the value from the association,
    not from the end-point.

Modified:
  stable/10/sys/netinet/sctp_input.c
  stable/10/sys/netinet/sctp_output.c
  stable/10/sys/netinet/sctp_pcb.c
  stable/10/sys/netinet/sctp_pcb.h
  stable/10/sys/netinet/sctp_usrreq.c
  stable/10/sys/netinet/sctputil.c
  stable/10/sys/netinet/sctputil.h
  stable/10/sys/netinet6/sctp6_usrreq.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/sys/netinet/sctp_input.c
==============================================================================
--- stable/10/sys/netinet/sctp_input.c	Sun Jan 17 12:13:40 2016	(r294214)
+++ stable/10/sys/netinet/sctp_input.c	Sun Jan 17 12:15:41 2016	(r294215)
@@ -2103,6 +2103,7 @@ sctp_process_cookie_new(struct mbuf *m, 
 	 */
 	stcb = sctp_aloc_assoc(inp, init_src, &error,
 	    ntohl(initack_cp->init.initiate_tag), vrf_id,
+	    ntohs(initack_cp->init.num_outbound_streams),
 	    (struct thread *)NULL
 	    );
 	if (stcb == NULL) {

Modified: stable/10/sys/netinet/sctp_output.c
==============================================================================
--- stable/10/sys/netinet/sctp_output.c	Sun Jan 17 12:13:40 2016	(r294214)
+++ stable/10/sys/netinet/sctp_output.c	Sun Jan 17 12:15:41 2016	(r294215)
@@ -3652,6 +3652,7 @@ sctp_process_cmsgs_for_init(struct sctp_
 #endif
 						stcb->asoc.strmout[i].stream_no = i;
 						stcb->asoc.strmout[i].last_msg_incomplete = 0;
+						stcb->asoc.strmout[i].state = SCTP_STREAM_OPENING;
 						stcb->asoc.ss_functions.sctp_ss_init_stream(&stcb->asoc.strmout[i], NULL);
 					}
 				}
@@ -5841,10 +5842,10 @@ do_a_abort:
 	his_limit = ntohs(init_chk->init.num_inbound_streams);
 	/* choose what I want */
 	if (asoc != NULL) {
-		if (asoc->streamoutcnt > inp->sctp_ep.pre_open_stream_count) {
+		if (asoc->streamoutcnt > asoc->pre_open_streams) {
 			i_want = asoc->streamoutcnt;
 		} else {
-			i_want = inp->sctp_ep.pre_open_stream_count;
+			i_want = asoc->pre_open_streams;
 		}
 	} else {
 		i_want = inp->sctp_ep.pre_open_stream_count;
@@ -12617,6 +12618,7 @@ sctp_lower_sosend(struct socket *so,
 			}
 #endif
 			stcb = sctp_aloc_assoc(inp, addr, &error, 0, vrf_id,
+			    inp->sctp_ep.pre_open_stream_count,
 			    p
 			    );
 			if (stcb == NULL) {

Modified: stable/10/sys/netinet/sctp_pcb.c
==============================================================================
--- stable/10/sys/netinet/sctp_pcb.c	Sun Jan 17 12:13:40 2016	(r294214)
+++ stable/10/sys/netinet/sctp_pcb.c	Sun Jan 17 12:15:41 2016	(r294215)
@@ -4164,6 +4164,7 @@ try_again:
 struct sctp_tcb *
 sctp_aloc_assoc(struct sctp_inpcb *inp, struct sockaddr *firstaddr,
     int *error, uint32_t override_tag, uint32_t vrf_id,
+    uint16_t o_streams,
     struct thread *p
 )
 {
@@ -4322,7 +4323,7 @@ sctp_aloc_assoc(struct sctp_inpcb *inp, 
 	/* setup back pointer's */
 	stcb->sctp_ep = inp;
 	stcb->sctp_socket = inp->sctp_socket;
-	if ((err = sctp_init_asoc(inp, stcb, override_tag, vrf_id))) {
+	if ((err = sctp_init_asoc(inp, stcb, override_tag, vrf_id, o_streams))) {
 		/* failed */
 		SCTP_TCB_LOCK_DESTROY(stcb);
 		SCTP_TCB_SEND_LOCK_DESTROY(stcb);

Modified: stable/10/sys/netinet/sctp_pcb.h
==============================================================================
--- stable/10/sys/netinet/sctp_pcb.h	Sun Jan 17 12:13:40 2016	(r294214)
+++ stable/10/sys/netinet/sctp_pcb.h	Sun Jan 17 12:15:41 2016	(r294215)
@@ -584,7 +584,7 @@ void sctp_inpcb_free(struct sctp_inpcb *
 
 struct sctp_tcb *
 sctp_aloc_assoc(struct sctp_inpcb *, struct sockaddr *,
-    int *, uint32_t, uint32_t, struct thread *);
+    int *, uint32_t, uint32_t, uint16_t, struct thread *);
 
 int sctp_free_assoc(struct sctp_inpcb *, struct sctp_tcb *, int, int);
 

Modified: stable/10/sys/netinet/sctp_usrreq.c
==============================================================================
--- stable/10/sys/netinet/sctp_usrreq.c	Sun Jan 17 12:13:40 2016	(r294214)
+++ stable/10/sys/netinet/sctp_usrreq.c	Sun Jan 17 12:15:41 2016	(r294215)
@@ -1501,6 +1501,7 @@ sctp_do_connect_x(struct socket *so, str
 
 	/* We are GOOD to go */
 	stcb = sctp_aloc_assoc(inp, sa, &error, 0, vrf_id,
+	    inp->sctp_ep.pre_open_stream_count,
 	    (struct thread *)p
 	    );
 	if (stcb == NULL) {
@@ -6929,7 +6930,7 @@ sctp_connect(struct socket *so, struct s
 	}
 	vrf_id = inp->def_vrf_id;
 	/* We are GOOD to go */
-	stcb = sctp_aloc_assoc(inp, addr, &error, 0, vrf_id, p);
+	stcb = sctp_aloc_assoc(inp, addr, &error, 0, vrf_id, inp->sctp_ep.pre_open_stream_count, p);
 	if (stcb == NULL) {
 		/* Gak! no memory */
 		goto out_now;

Modified: stable/10/sys/netinet/sctputil.c
==============================================================================
--- stable/10/sys/netinet/sctputil.c	Sun Jan 17 12:13:40 2016	(r294214)
+++ stable/10/sys/netinet/sctputil.c	Sun Jan 17 12:15:41 2016	(r294215)
@@ -938,7 +938,7 @@ sctp_map_assoc_state(int kernel_state)
 
 int
 sctp_init_asoc(struct sctp_inpcb *inp, struct sctp_tcb *stcb,
-    uint32_t override_tag, uint32_t vrf_id)
+    uint32_t override_tag, uint32_t vrf_id, uint16_t o_strms)
 {
 	struct sctp_association *asoc;
 
@@ -1100,7 +1100,7 @@ sctp_init_asoc(struct sctp_inpcb *inp, s
 	 * that we request by default.
 	 */
 	asoc->strm_realoutsize = asoc->streamoutcnt = asoc->pre_open_streams =
-	    inp->sctp_ep.pre_open_stream_count;
+	    o_strms;
 	SCTP_MALLOC(asoc->strmout, struct sctp_stream_out *,
 	    asoc->streamoutcnt * sizeof(struct sctp_stream_out),
 	    SCTP_M_STRMO);

Modified: stable/10/sys/netinet/sctputil.h
==============================================================================
--- stable/10/sys/netinet/sctputil.h	Sun Jan 17 12:13:40 2016	(r294214)
+++ stable/10/sys/netinet/sctputil.h	Sun Jan 17 12:15:41 2016	(r294215)
@@ -83,7 +83,7 @@ uint32_t sctp_select_initial_TSN(struct 
 
 uint32_t sctp_select_a_tag(struct sctp_inpcb *, uint16_t lport, uint16_t rport, int);
 
-int sctp_init_asoc(struct sctp_inpcb *, struct sctp_tcb *, uint32_t, uint32_t);
+int sctp_init_asoc(struct sctp_inpcb *, struct sctp_tcb *, uint32_t, uint32_t, uint16_t);
 
 void sctp_fill_random_store(struct sctp_pcb *);
 

Modified: stable/10/sys/netinet6/sctp6_usrreq.c
==============================================================================
--- stable/10/sys/netinet6/sctp6_usrreq.c	Sun Jan 17 12:13:40 2016	(r294214)
+++ stable/10/sys/netinet6/sctp6_usrreq.c	Sun Jan 17 12:15:41 2016	(r294215)
@@ -953,7 +953,7 @@ sctp6_connect(struct socket *so, struct 
 		return (EALREADY);
 	}
 	/* We are GOOD to go */
-	stcb = sctp_aloc_assoc(inp, addr, &error, 0, vrf_id, p);
+	stcb = sctp_aloc_assoc(inp, addr, &error, 0, vrf_id, inp->sctp_ep.pre_open_stream_count, p);
 	SCTP_ASOC_CREATE_UNLOCK(inp);
 	if (stcb == NULL) {
 		/* Gak! no memory */

From owner-svn-src-all@freebsd.org  Sun Jan 17 12:18:03 2016
Return-Path: <owner-svn-src-all@freebsd.org>
Delivered-To: svn-src-all@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3D75AA85922;
 Sun, 17 Jan 2016 12:18:03 +0000 (UTC)
 (envelope-from tuexen@FreeBSD.org)
Received: from repo.freebsd.org (repo.freebsd.org
 [IPv6:2610:1c1:1:6068::e6a:0])
 (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
 (Client did not present a certificate)
 by mx1.freebsd.org (Postfix) with ESMTPS id E63511120;
 Sun, 17 Jan 2016 12:18:02 +0000 (UTC)
 (envelope-from tuexen@FreeBSD.org)
Received: from repo.freebsd.org ([127.0.1.37])
 by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u0HCI11e080898;
 Sun, 17 Jan 2016 12:18:01 GMT (envelope-from tuexen@FreeBSD.org)
Received: (from tuexen@localhost)
 by repo.freebsd.org (8.15.2/8.15.2/Submit) id u0HCI1GP080895;
 Sun, 17 Jan 2016 12:18:01 GMT (envelope-from tuexen@FreeBSD.org)
Message-Id: <201601171218.u0HCI1GP080895@repo.freebsd.org>
X-Authentication-Warning: repo.freebsd.org: tuexen set sender to
 tuexen@FreeBSD.org using -f
From: Michael Tuexen <tuexen@FreeBSD.org>
Date: Sun, 17 Jan 2016 12:18:01 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org
Subject: svn commit: r294216 - stable/10/sys/netinet
X-SVN-Group: stable-10
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.20
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for &quot;
 user&quot; and &quot; projects&quot; \)" <svn-src-all.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-all/>
List-Post: <mailto:svn-src-all@freebsd.org>
List-Help: <mailto:svn-src-all-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Sun, 17 Jan 2016 12:18:03 -0000

Author: tuexen
Date: Sun Jan 17 12:18:01 2016
New Revision: 294216
URL: https://svnweb.freebsd.org/changeset/base/294216

Log:
  MFC r292060:
  Retire sctp_validate_no_locks().
  
  This routine checks that there are no locks held for an inp,
  without having any lock on the inp. This breaks if the inp
  goes away when it is called. This happens on stress tests
  on a RPi B+.

Modified:
  stable/10/sys/netinet/sctp_input.c
  stable/10/sys/netinet/sctp_output.c
  stable/10/sys/netinet/sctp_pcb.h
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/sys/netinet/sctp_input.c
==============================================================================
--- stable/10/sys/netinet/sctp_input.c	Sun Jan 17 12:15:41 2016	(r294215)
+++ stable/10/sys/netinet/sctp_input.c	Sun Jan 17 12:18:01 2016	(r294216)
@@ -5641,30 +5641,6 @@ next_chunk:
 }
 
 
-#ifdef INVARIANTS
-#ifdef __GNUC__
-__attribute__((noinline))
-#endif
-	void
-	     sctp_validate_no_locks(struct sctp_inpcb *inp)
-{
-	struct sctp_tcb *lstcb;
-
-	LIST_FOREACH(lstcb, &inp->sctp_asoc_list, sctp_tcblist) {
-		if (mtx_owned(&lstcb->tcb_mtx)) {
-			panic("Own lock on stcb at return from input");
-		}
-	}
-	if (mtx_owned(&inp->inp_create_mtx)) {
-		panic("Own create lock on inp");
-	}
-	if (mtx_owned(&inp->inp_mtx)) {
-		panic("Own inp lock on inp");
-	}
-}
-
-#endif
-
 /*
  * common input chunk processing (v4 and v6)
  */
@@ -6050,11 +6026,6 @@ out:
 		SCTP_INP_DECR_REF(inp_decr);
 		SCTP_INP_WUNLOCK(inp_decr);
 	}
-#ifdef INVARIANTS
-	if (inp != NULL) {
-		sctp_validate_no_locks(inp);
-	}
-#endif
 	return;
 }
 

Modified: stable/10/sys/netinet/sctp_output.c
==============================================================================
--- stable/10/sys/netinet/sctp_output.c	Sun Jan 17 12:15:41 2016	(r294215)
+++ stable/10/sys/netinet/sctp_output.c	Sun Jan 17 12:18:01 2016	(r294216)
@@ -13554,13 +13554,6 @@ out_unlocked:
 		}
 	}
 #endif
-#ifdef INVARIANTS
-	if (inp) {
-		sctp_validate_no_locks(inp);
-	} else {
-		SCTP_PRINTF("Warning - inp is NULL so cant validate locks\n");
-	}
-#endif
 	if (top) {
 		sctp_m_freem(top);
 	}

Modified: stable/10/sys/netinet/sctp_pcb.h
==============================================================================
--- stable/10/sys/netinet/sctp_pcb.h	Sun Jan 17 12:15:41 2016	(r294215)
+++ stable/10/sys/netinet/sctp_pcb.h	Sun Jan 17 12:18:01 2016	(r294216)
@@ -654,11 +654,5 @@ void
 
 #endif
 
-#ifdef INVARIANTS
-void
-     sctp_validate_no_locks(struct sctp_inpcb *inp);
-
-#endif
-
 #endif				/* _KERNEL */
 #endif				/* !__sctp_pcb_h__ */

From owner-svn-src-all@freebsd.org  Sun Jan 17 12:39:36 2016
Return-Path: <owner-svn-src-all@freebsd.org>
Delivered-To: svn-src-all@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id F3503A8626A;
 Sun, 17 Jan 2016 12:39:36 +0000 (UTC)
 (envelope-from tuexen@FreeBSD.org)
Received: from repo.freebsd.org (repo.freebsd.org
 [IPv6:2610:1c1:1:6068::e6a:0])
 (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
 (Client did not present a certificate)
 by mx1.freebsd.org (Postfix) with ESMTPS id C49B11E2C;
 Sun, 17 Jan 2016 12:39:36 +0000 (UTC)
 (envelope-from tuexen@FreeBSD.org)
Received: from repo.freebsd.org ([127.0.1.37])
 by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u0HCdZfG087233;
 Sun, 17 Jan 2016 12:39:35 GMT (envelope-from tuexen@FreeBSD.org)
Received: (from tuexen@localhost)
 by repo.freebsd.org (8.15.2/8.15.2/Submit) id u0HCdZqx087232;
 Sun, 17 Jan 2016 12:39:35 GMT (envelope-from tuexen@FreeBSD.org)
Message-Id: <201601171239.u0HCdZqx087232@repo.freebsd.org>
X-Authentication-Warning: repo.freebsd.org: tuexen set sender to
 tuexen@FreeBSD.org using -f
From: Michael Tuexen <tuexen@FreeBSD.org>
Date: Sun, 17 Jan 2016 12:39:35 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org
Subject: svn commit: r294219 - stable/10/sys/netinet
X-SVN-Group: stable-10
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.20
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for &quot;
 user&quot; and &quot; projects&quot; \)" <svn-src-all.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-all/>
List-Post: <mailto:svn-src-all@freebsd.org>
List-Help: <mailto:svn-src-all-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Sun, 17 Jan 2016 12:39:37 -0000

Author: tuexen
Date: Sun Jan 17 12:39:35 2016
New Revision: 294219
URL: https://svnweb.freebsd.org/changeset/base/294219

Log:
  MFC r292558:
  Stop processing of a SACK when the association has been aborted.

Modified:
  stable/10/sys/netinet/sctp_indata.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/sys/netinet/sctp_indata.c
==============================================================================
--- stable/10/sys/netinet/sctp_indata.c	Sun Jan 17 12:24:02 2016	(r294218)
+++ stable/10/sys/netinet/sctp_indata.c	Sun Jan 17 12:39:35 2016	(r294219)
@@ -3994,6 +3994,7 @@ again:
 				op_err = sctp_generate_cause(SCTP_CAUSE_USER_INITIATED_ABT, "");
 				stcb->sctp_ep->last_abort_code = SCTP_FROM_SCTP_INDATA + SCTP_LOC_26;
 				sctp_abort_an_association(stcb->sctp_ep, stcb, op_err, SCTP_SO_NOT_LOCKED);
+				return;
 			} else {
 				struct sctp_nets *netp;
 

From owner-svn-src-all@freebsd.org  Sun Jan 17 12:41:48 2016
Return-Path: <owner-svn-src-all@freebsd.org>
Delivered-To: svn-src-all@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id 21662A863A4;
 Sun, 17 Jan 2016 12:41:48 +0000 (UTC)
 (envelope-from tuexen@FreeBSD.org)
Received: from repo.freebsd.org (repo.freebsd.org
 [IPv6:2610:1c1:1:6068::e6a:0])
 (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
 (Client did not present a certificate)
 by mx1.freebsd.org (Postfix) with ESMTPS id DFF3312AB;
 Sun, 17 Jan 2016 12:41:47 +0000 (UTC)
 (envelope-from tuexen@FreeBSD.org)
Received: from repo.freebsd.org ([127.0.1.37])
 by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u0HCfkRK089997;
 Sun, 17 Jan 2016 12:41:46 GMT (envelope-from tuexen@FreeBSD.org)
Received: (from tuexen@localhost)
 by repo.freebsd.org (8.15.2/8.15.2/Submit) id u0HCfkLO089996;
 Sun, 17 Jan 2016 12:41:46 GMT (envelope-from tuexen@FreeBSD.org)
Message-Id: <201601171241.u0HCfkLO089996@repo.freebsd.org>
X-Authentication-Warning: repo.freebsd.org: tuexen set sender to
 tuexen@FreeBSD.org using -f
From: Michael Tuexen <tuexen@FreeBSD.org>
Date: Sun, 17 Jan 2016 12:41:46 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org
Subject: svn commit: r294220 - stable/10/sys/netinet
X-SVN-Group: stable-10
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.20
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for &quot;
 user&quot; and &quot; projects&quot; \)" <svn-src-all.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-all/>
List-Post: <mailto:svn-src-all@freebsd.org>
List-Help: <mailto:svn-src-all-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Sun, 17 Jan 2016 12:41:48 -0000

Author: tuexen
Date: Sun Jan 17 12:41:46 2016
New Revision: 294220
URL: https://svnweb.freebsd.org/changeset/base/294220

Log:
  MFC r292734:
  Don't implicitly terminate a user message when moving it to the
  send_queue and the socket is closed. This results in strange
  race conditions for the application.
  While there, remove a stray character.

Modified:
  stable/10/sys/netinet/sctp_output.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/sys/netinet/sctp_output.c
==============================================================================
--- stable/10/sys/netinet/sctp_output.c	Sun Jan 17 12:39:35 2016	(r294219)
+++ stable/10/sys/netinet/sctp_output.c	Sun Jan 17 12:41:46 2016	(r294220)
@@ -7219,7 +7219,7 @@ one_more_time:
 			}
 			/* Whack down the size */
 			atomic_subtract_int(&stcb->asoc.total_output_queue_size, sp->length);
-			if ((stcb->sctp_socket != NULL) && \
+			if ((stcb->sctp_socket != NULL) &&
 			    ((stcb->sctp_ep->sctp_flags & SCTP_PCB_FLAGS_TCPTYPE) ||
 			    (stcb->sctp_ep->sctp_flags & SCTP_PCB_FLAGS_IN_TCPPOOL))) {
 				atomic_subtract_int(&stcb->sctp_socket->so_snd.sb_cc, sp->length);
@@ -7238,9 +7238,6 @@ one_more_time:
 		}
 	}
 	some_taken = sp->some_taken;
-	if (stcb->asoc.state & SCTP_STATE_CLOSED_SOCKET) {
-		sp->msg_is_complete = 1;
-	}
 re_look:
 	length = sp->length;
 	if (sp->msg_is_complete) {

From owner-svn-src-all@freebsd.org  Sun Jan 17 14:00:26 2016
Return-Path: <owner-svn-src-all@freebsd.org>
Delivered-To: svn-src-all@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id 626BEA85DA4;
 Sun, 17 Jan 2016 14:00:26 +0000 (UTC)
 (envelope-from tuexen@FreeBSD.org)
Received: from repo.freebsd.org (repo.freebsd.org
 [IPv6:2610:1c1:1:6068::e6a:0])
 (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
 (Client did not present a certificate)
 by mx1.freebsd.org (Postfix) with ESMTPS id 153211A4D;
 Sun, 17 Jan 2016 14:00:26 +0000 (UTC)
 (envelope-from tuexen@FreeBSD.org)
Received: from repo.freebsd.org ([127.0.1.37])
 by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u0HE0PdQ034243;
 Sun, 17 Jan 2016 14:00:25 GMT (envelope-from tuexen@FreeBSD.org)
Received: (from tuexen@localhost)
 by repo.freebsd.org (8.15.2/8.15.2/Submit) id u0HE0PaL034242;
 Sun, 17 Jan 2016 14:00:25 GMT (envelope-from tuexen@FreeBSD.org)
Message-Id: <201601171400.u0HE0PaL034242@repo.freebsd.org>
X-Authentication-Warning: repo.freebsd.org: tuexen set sender to
 tuexen@FreeBSD.org using -f
From: Michael Tuexen <tuexen@FreeBSD.org>
Date: Sun, 17 Jan 2016 14:00:25 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org
Subject: svn commit: r294221 - stable/10/sys/netinet
X-SVN-Group: stable-10
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.20
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for &quot;
 user&quot; and &quot; projects&quot; \)" <svn-src-all.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-all/>
List-Post: <mailto:svn-src-all@freebsd.org>
List-Help: <mailto:svn-src-all-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Sun, 17 Jan 2016 14:00:26 -0000

Author: tuexen
Date: Sun Jan 17 14:00:24 2016
New Revision: 294221
URL: https://svnweb.freebsd.org/changeset/base/294221

Log:
  MFC r293828:
  Store the timer type for logging, because the timer can be freed
  during processing the timerout.

Modified:
  stable/10/sys/netinet/sctputil.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/sys/netinet/sctputil.c
==============================================================================
--- stable/10/sys/netinet/sctputil.c	Sun Jan 17 12:41:46 2016	(r294220)
+++ stable/10/sys/netinet/sctputil.c	Sun Jan 17 14:00:24 2016	(r294221)
@@ -1495,6 +1495,7 @@ sctp_timeout_handler(void *t)
 
 #endif
 	int did_output;
+	int type;
 
 	tmr = (struct sctp_timer *)t;
 	inp = (struct sctp_inpcb *)tmr->ep;
@@ -1563,8 +1564,9 @@ sctp_timeout_handler(void *t)
 			return;
 		}
 	}
+	type = tmr->type;
 	tmr->stopped_from = 0xa005;
-	SCTPDBG(SCTP_DEBUG_TIMER1, "Timer type %d goes off\n", tmr->type);
+	SCTPDBG(SCTP_DEBUG_TIMER1, "Timer type %d goes off\n", type);
 	if (!SCTP_OS_TIMER_ACTIVE(&tmr->timer)) {
 		if (inp) {
 			SCTP_INP_DECR_REF(inp);
@@ -1580,7 +1582,7 @@ sctp_timeout_handler(void *t)
 	if (stcb) {
 		SCTP_TCB_LOCK(stcb);
 		atomic_add_int(&stcb->asoc.refcnt, -1);
-		if ((tmr->type != SCTP_TIMER_TYPE_ASOCKILL) &&
+		if ((type != SCTP_TIMER_TYPE_ASOCKILL) &&
 		    ((stcb->asoc.state == 0) ||
 		    (stcb->asoc.state & SCTP_STATE_ABOUT_TO_BE_FREED))) {
 			SCTP_TCB_UNLOCK(stcb);
@@ -1592,7 +1594,7 @@ sctp_timeout_handler(void *t)
 		}
 	}
 	/* record in stopped what t-o occured */
-	tmr->stopped_from = tmr->type;
+	tmr->stopped_from = type;
 
 	/* mark as being serviced now */
 	if (SCTP_OS_TIMER_PENDING(&tmr->timer)) {
@@ -1610,7 +1612,7 @@ sctp_timeout_handler(void *t)
 	SCTP_OS_TIMER_DEACTIVATE(&tmr->timer);
 
 	/* call the handler for the appropriate timer type */
-	switch (tmr->type) {
+	switch (type) {
 	case SCTP_TIMER_TYPE_ZERO_COPY:
 		if (inp == NULL) {
 			break;
@@ -1894,11 +1896,11 @@ sctp_timeout_handler(void *t)
 		goto out_no_decr;
 	default:
 		SCTPDBG(SCTP_DEBUG_TIMER1, "sctp_timeout_handler:unknown timer %d\n",
-		    tmr->type);
+		    type);
 		break;
 	}
 #ifdef SCTP_AUDITING_ENABLED
-	sctp_audit_log(0xF1, (uint8_t) tmr->type);
+	sctp_audit_log(0xF1, (uint8_t) type);
 	if (inp)
 		sctp_auditing(5, inp, stcb, net);
 #endif
@@ -1921,8 +1923,7 @@ out_decr:
 		SCTP_INP_DECR_REF(inp);
 	}
 out_no_decr:
-	SCTPDBG(SCTP_DEBUG_TIMER1, "Timer now complete (type %d)\n",
-	    tmr->type);
+	SCTPDBG(SCTP_DEBUG_TIMER1, "Timer now complete (type = %d)\n", type);
 	CURVNET_RESTORE();
 }
 

From owner-svn-src-all@freebsd.org  Sun Jan 17 14:10:38 2016
Return-Path: <owner-svn-src-all@freebsd.org>
Delivered-To: svn-src-all@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id D692FA862C7;
 Sun, 17 Jan 2016 14:10:38 +0000 (UTC)
 (envelope-from tuexen@FreeBSD.org)
Received: from repo.freebsd.org (repo.freebsd.org
 [IPv6:2610:1c1:1:6068::e6a:0])
 (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
 (Client did not present a certificate)
 by mx1.freebsd.org (Postfix) with ESMTPS id A376B1ADD;
 Sun, 17 Jan 2016 14:10:38 +0000 (UTC)
 (envelope-from tuexen@FreeBSD.org)
Received: from repo.freebsd.org ([127.0.1.37])
 by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u0HEAb0h038908;
 Sun, 17 Jan 2016 14:10:37 GMT (envelope-from tuexen@FreeBSD.org)
Received: (from tuexen@localhost)
 by repo.freebsd.org (8.15.2/8.15.2/Submit) id u0HEAbju038907;
 Sun, 17 Jan 2016 14:10:37 GMT (envelope-from tuexen@FreeBSD.org)
Message-Id: <201601171410.u0HEAbju038907@repo.freebsd.org>
X-Authentication-Warning: repo.freebsd.org: tuexen set sender to
 tuexen@FreeBSD.org using -f
From: Michael Tuexen <tuexen@FreeBSD.org>
Date: Sun, 17 Jan 2016 14:10:37 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org
Subject: svn commit: r294222 - stable/10/sys/netinet
X-SVN-Group: stable-10
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.20
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for &quot;
 user&quot; and &quot; projects&quot; \)" <svn-src-all.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-all/>
List-Post: <mailto:svn-src-all@freebsd.org>
List-Help: <mailto:svn-src-all-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Sun, 17 Jan 2016 14:10:38 -0000

Author: tuexen
Date: Sun Jan 17 14:10:37 2016
New Revision: 294222
URL: https://svnweb.freebsd.org/changeset/base/294222

Log:
  MFC r293913:
  Fail the SCTP_GET_ASSOC_NUMBER and SCTP_GET_ASSOC_ID_LIST
  socket options for 1-to-1 style sockets as specified in RFC 6458.

Modified:
  stable/10/sys/netinet/sctp_usrreq.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/sys/netinet/sctp_usrreq.c
==============================================================================
--- stable/10/sys/netinet/sctp_usrreq.c	Sun Jan 17 14:00:24 2016	(r294221)
+++ stable/10/sys/netinet/sctp_usrreq.c	Sun Jan 17 14:10:37 2016	(r294222)
@@ -1883,8 +1883,15 @@ flags_out:
 			uint32_t *value, cnt;
 
 			SCTP_CHECK_AND_CAST(value, optval, uint32_t, *optsize);
-			cnt = 0;
 			SCTP_INP_RLOCK(inp);
+			if ((inp->sctp_flags & SCTP_PCB_FLAGS_TCPTYPE) ||
+			    (inp->sctp_flags & SCTP_PCB_FLAGS_IN_TCPPOOL)) {
+				/* Can't do this for a 1-1 socket */
+				error = EINVAL;
+				SCTP_INP_RUNLOCK(inp);
+				break;
+			}
+			cnt = 0;
 			LIST_FOREACH(stcb, &inp->sctp_asoc_list, sctp_tcblist) {
 				cnt++;
 			}
@@ -1899,9 +1906,16 @@ flags_out:
 			unsigned int at, limit;
 
 			SCTP_CHECK_AND_CAST(ids, optval, struct sctp_assoc_ids, *optsize);
+			SCTP_INP_RLOCK(inp);
+			if ((inp->sctp_flags & SCTP_PCB_FLAGS_TCPTYPE) ||
+			    (inp->sctp_flags & SCTP_PCB_FLAGS_IN_TCPPOOL)) {
+				/* Can't do this for a 1-1 socket */
+				error = EINVAL;
+				SCTP_INP_RUNLOCK(inp);
+				break;
+			}
 			at = 0;
 			limit = (*optsize - sizeof(uint32_t)) / sizeof(sctp_assoc_t);
-			SCTP_INP_RLOCK(inp);
 			LIST_FOREACH(stcb, &inp->sctp_asoc_list, sctp_tcblist) {
 				if (at < limit) {
 					ids->gaids_assoc_id[at++] = sctp_get_associd(stcb);

From owner-svn-src-all@freebsd.org  Sun Jan 17 14:14:13 2016
Return-Path: <owner-svn-src-all@freebsd.org>
Delivered-To: svn-src-all@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id 909AAA8649A;
 Sun, 17 Jan 2016 14:14:13 +0000 (UTC)
 (envelope-from tuexen@FreeBSD.org)
Received: from repo.freebsd.org (repo.freebsd.org
 [IPv6:2610:1c1:1:6068::e6a:0])
 (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
 (Client did not present a certificate)
 by mx1.freebsd.org (Postfix) with ESMTPS id 41E541E73;
 Sun, 17 Jan 2016 14:14:13 +0000 (UTC)
 (envelope-from tuexen@FreeBSD.org)
Received: from repo.freebsd.org ([127.0.1.37])
 by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u0HEEC7X041781;
 Sun, 17 Jan 2016 14:14:12 GMT (envelope-from tuexen@FreeBSD.org)
Received: (from tuexen@localhost)
 by repo.freebsd.org (8.15.2/8.15.2/Submit) id u0HEECQZ041780;
 Sun, 17 Jan 2016 14:14:12 GMT (envelope-from tuexen@FreeBSD.org)
Message-Id: <201601171414.u0HEECQZ041780@repo.freebsd.org>
X-Authentication-Warning: repo.freebsd.org: tuexen set sender to
 tuexen@FreeBSD.org using -f
From: Michael Tuexen <tuexen@FreeBSD.org>
Date: Sun, 17 Jan 2016 14:14:12 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org
Subject: svn commit: r294223 - stable/10/sys/netinet
X-SVN-Group: stable-10
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.20
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for &quot;
 user&quot; and &quot; projects&quot; \)" <svn-src-all.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-all/>
List-Post: <mailto:svn-src-all@freebsd.org>
List-Help: <mailto:svn-src-all-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Sun, 17 Jan 2016 14:14:13 -0000

Author: tuexen
Date: Sun Jan 17 14:14:12 2016
New Revision: 294223
URL: https://svnweb.freebsd.org/changeset/base/294223

Log:
  MFC r294057:
  Fix a bug in INIT handling on accepted 1-to-1 style sockets when the
  listener is closed.
  This fix allows the following packetdrill test to pass:
  // Setup a connected, blocking 1-to-1 style socket
  +0.0 socket(..., SOCK_STREAM, IPPROTO_SCTP) = 3
  // Check the handshake with en empty(!) cookie
  +0.0 bind(3, ..., ...) = 0
  +0.0 listen(3, 1) = 0
  +0.0 < sctp: INIT[flgs=0, tag=1, a_rwnd=1500, os=1, is=1, tsn=1]
  +0.0 > sctp: INIT_ACK[flgs=0, tag=2, a_rwnd=..., os=..., is=..., tsn=1, ...]
  +0.0 < sctp: COOKIE_ECHO[flgs=0, len=..., val=...]
  +0.0 > sctp: COOKIE_ACK[flgs=0]
  +0.0 accept(3, ..., ...) = 4
  +0.0 close(3) = 0
  // Inject an INIT chunk and expect an INIT-ACK
  +0.0 < sctp: INIT[flgs=0, tag=3, a_rwnd=1500, os=1, is=1, tsn=1]
  +0.0 > sctp: INIT_ACK[flgs=0, tag=..., a_rwnd=..., os=..., is=..., tsn=..., ...]

Modified:
  stable/10/sys/netinet/sctp_pcb.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/sys/netinet/sctp_pcb.c
==============================================================================
--- stable/10/sys/netinet/sctp_pcb.c	Sun Jan 17 14:10:37 2016	(r294222)
+++ stable/10/sys/netinet/sctp_pcb.c	Sun Jan 17 14:14:12 2016	(r294223)
@@ -2269,8 +2269,12 @@ sctp_findassociation_addr(struct mbuf *m
 		}
 	}
 	find_tcp_pool = 0;
-	if ((ch->chunk_type != SCTP_INITIATION) &&
-	    (ch->chunk_type != SCTP_INITIATION_ACK) &&
+	/*
+	 * Don't consider INIT chunks since that breaks 1-to-1 sockets: When
+	 * a server closes the listener, incoming INIT chunks are not
+	 * responsed by an INIT-ACK chunk.
+	 */
+	if ((ch->chunk_type != SCTP_INITIATION_ACK) &&
 	    (ch->chunk_type != SCTP_COOKIE_ACK) &&
 	    (ch->chunk_type != SCTP_COOKIE_ECHO)) {
 		/* Other chunk types go to the tcp pool. */

From owner-svn-src-all@freebsd.org  Sun Jan 17 14:16:27 2016
Return-Path: <owner-svn-src-all@freebsd.org>
Delivered-To: svn-src-all@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id D469AA86584;
 Sun, 17 Jan 2016 14:16:27 +0000 (UTC)
 (envelope-from tuexen@FreeBSD.org)
Received: from repo.freebsd.org (repo.freebsd.org
 [IPv6:2610:1c1:1:6068::e6a:0])
 (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
 (Client did not present a certificate)
 by mx1.freebsd.org (Postfix) with ESMTPS id A16DE1FF0;
 Sun, 17 Jan 2016 14:16:27 +0000 (UTC)
 (envelope-from tuexen@FreeBSD.org)
Received: from repo.freebsd.org ([127.0.1.37])
 by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u0HEGQeH041992;
 Sun, 17 Jan 2016 14:16:26 GMT (envelope-from tuexen@FreeBSD.org)
Received: (from tuexen@localhost)
 by repo.freebsd.org (8.15.2/8.15.2/Submit) id u0HEGQUC041991;
 Sun, 17 Jan 2016 14:16:26 GMT (envelope-from tuexen@FreeBSD.org)
Message-Id: <201601171416.u0HEGQUC041991@repo.freebsd.org>
X-Authentication-Warning: repo.freebsd.org: tuexen set sender to
 tuexen@FreeBSD.org using -f
From: Michael Tuexen <tuexen@FreeBSD.org>
Date: Sun, 17 Jan 2016 14:16:26 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org
Subject: svn commit: r294224 - stable/10/sys/dev/e1000
X-SVN-Group: stable-10
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.20
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for &quot;
 user&quot; and &quot; projects&quot; \)" <svn-src-all.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-all/>
List-Post: <mailto:svn-src-all@freebsd.org>
List-Help: <mailto:svn-src-all-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Sun, 17 Jan 2016 14:16:27 -0000

Author: tuexen
Date: Sun Jan 17 14:16:26 2016
New Revision: 294224
URL: https://svnweb.freebsd.org/changeset/base/294224

Log:
  MFC r290641:
  Add support for SCTP checksum offloading for the 82580 controller
  similar to the 82576 controller.
  Tested with Intel i340 cards.

Modified:
  stable/10/sys/dev/e1000/if_igb.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/sys/dev/e1000/if_igb.c
==============================================================================
--- stable/10/sys/dev/e1000/if_igb.c	Sun Jan 17 14:14:12 2016	(r294223)
+++ stable/10/sys/dev/e1000/if_igb.c	Sun Jan 17 14:16:26 2016	(r294224)
@@ -1323,7 +1323,8 @@ igb_init_locked(struct adapter *adapter)
 	if (ifp->if_capenable & IFCAP_TXCSUM) {
 		ifp->if_hwassist |= (CSUM_TCP | CSUM_UDP);
 #if __FreeBSD_version >= 800000
-		if (adapter->hw.mac.type == e1000_82576)
+		if ((adapter->hw.mac.type == e1000_82576) ||
+		    (adapter->hw.mac.type == e1000_82580))
 			ifp->if_hwassist |= CSUM_SCTP;
 #endif
 	}
@@ -4609,8 +4610,9 @@ igb_initialize_receive_units(struct adap
 		rxcsum |= E1000_RXCSUM_PCSD;
 #if __FreeBSD_version >= 800000
 		/* For SCTP Offload */
-		if ((hw->mac.type == e1000_82576)
-		    && (ifp->if_capenable & IFCAP_RXCSUM))
+		if (((hw->mac.type == e1000_82576) ||
+		     (hw->mac.type == e1000_82580)) &&
+		    (ifp->if_capenable & IFCAP_RXCSUM))
 			rxcsum |= E1000_RXCSUM_CRCOFL;
 #endif
 	} else {
@@ -4618,7 +4620,8 @@ igb_initialize_receive_units(struct adap
 		if (ifp->if_capenable & IFCAP_RXCSUM) {
 			rxcsum |= E1000_RXCSUM_IPPCSE;
 #if __FreeBSD_version >= 800000
-			if (adapter->hw.mac.type == e1000_82576)
+			if ((adapter->hw.mac.type == e1000_82576) ||
+			    (adapter->hw.mac.type == e1000_82580))
 				rxcsum |= E1000_RXCSUM_CRCOFL;
 #endif
 		} else

From owner-svn-src-all@freebsd.org  Sun Jan 17 14:33:42 2016
Return-Path: <owner-svn-src-all@freebsd.org>
Delivered-To: svn-src-all@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id 536F2A86BBA;
 Sun, 17 Jan 2016 14:33:42 +0000 (UTC)
 (envelope-from tuexen@FreeBSD.org)
Received: from repo.freebsd.org (repo.freebsd.org
 [IPv6:2610:1c1:1:6068::e6a:0])
 (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
 (Client did not present a certificate)
 by mx1.freebsd.org (Postfix) with ESMTPS id 1633E1BDE;
 Sun, 17 Jan 2016 14:33:42 +0000 (UTC)
 (envelope-from tuexen@FreeBSD.org)
Received: from repo.freebsd.org ([127.0.1.37])
 by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u0HEXfLb048467;
 Sun, 17 Jan 2016 14:33:41 GMT (envelope-from tuexen@FreeBSD.org)
Received: (from tuexen@localhost)
 by repo.freebsd.org (8.15.2/8.15.2/Submit) id u0HEXfIP048465;
 Sun, 17 Jan 2016 14:33:41 GMT (envelope-from tuexen@FreeBSD.org)
Message-Id: <201601171433.u0HEXfIP048465@repo.freebsd.org>
X-Authentication-Warning: repo.freebsd.org: tuexen set sender to
 tuexen@FreeBSD.org using -f
From: Michael Tuexen <tuexen@FreeBSD.org>
Date: Sun, 17 Jan 2016 14:33:41 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org
Subject: svn commit: r294225 - stable/10/usr.bin/sockstat
X-SVN-Group: stable-10
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.20
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for &quot;
 user&quot; and &quot; projects&quot; \)" <svn-src-all.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-all/>
List-Post: <mailto:svn-src-all@freebsd.org>
List-Help: <mailto:svn-src-all-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Sun, 17 Jan 2016 14:33:42 -0000

Author: tuexen
Date: Sun Jan 17 14:33:40 2016
New Revision: 294225
URL: https://svnweb.freebsd.org/changeset/base/294225

Log:
  MFC r285630:
  Add a -s option which adds a column listing the connection state if
  applicable (currently only for TCP).
  
  This is work from des@ and MFCing was discussed with him.

Modified:
  stable/10/usr.bin/sockstat/sockstat.1
  stable/10/usr.bin/sockstat/sockstat.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/usr.bin/sockstat/sockstat.1
==============================================================================
--- stable/10/usr.bin/sockstat/sockstat.1	Sun Jan 17 14:16:26 2016	(r294224)
+++ stable/10/usr.bin/sockstat/sockstat.1	Sun Jan 17 14:33:40 2016	(r294225)
@@ -27,7 +27,7 @@
 .\"
 .\" $FreeBSD$
 .\"
-.Dd June 20, 2015
+.Dd July 14, 2015
 .Dt SOCKSTAT 1
 .Os
 .Sh NAME
@@ -35,7 +35,7 @@
 .Nd list open sockets
 .Sh SYNOPSIS
 .Nm
-.Op Fl 46cLlu
+.Op Fl 46cLlsu
 .Op Fl j Ar jid
 .Op Fl p Ar ports
 .Op Fl P Ar protocols
@@ -83,6 +83,9 @@ The
 argument is a comma-separated list of protocol names,
 as they are defined in
 .Xr protocols 5 .
+.It Fl s
+Display the protocol state, if applicable.
+This is currently only implemented for TCP.
 .It Fl u
 Show
 .Dv AF_LOCAL

Modified: stable/10/usr.bin/sockstat/sockstat.c
==============================================================================
--- stable/10/usr.bin/sockstat/sockstat.c	Sun Jan 17 14:16:26 2016	(r294224)
+++ stable/10/usr.bin/sockstat/sockstat.c	Sun Jan 17 14:33:40 2016	(r294225)
@@ -45,6 +45,8 @@ __FBSDID("$FreeBSD$");
 #include <netinet/in_pcb.h>
 #include <netinet/sctp.h>
 #include <netinet/tcp.h>
+#define TCPSTATES /* load state names */
+#include <netinet/tcp_fsm.h>
 #include <netinet/tcp_seq.h>
 #include <netinet/tcp_var.h>
 #include <arpa/inet.h>
@@ -71,6 +73,7 @@ static int	 opt_c;		/* Show connected so
 static int	 opt_j;		/* Show specified jail */
 static int	 opt_L;		/* Don't show IPv4 or IPv6 loopback sockets */
 static int	 opt_l;		/* Show listening sockets */
+static int	 opt_s;		/* Show protocol state if applicable */
 static int	 opt_u;		/* Show Unix domain sockets */
 static int	 opt_v;		/* Verbose mode */
 
@@ -101,6 +104,7 @@ struct sock {
 	int vflag;
 	int family;
 	int proto;
+	int state;
 	const char *protoname;
 	struct addr *laddr;
 	struct addr *faddr;
@@ -538,9 +542,9 @@ gather_inet(int proto)
 	const char *varname, *protoname;
 	size_t len, bufsize;
 	void *buf;
-	int hash, retry, vflag;
+	int hash, retry, state, vflag;
 
-	vflag = 0;
+	state = vflag = 0;
 	if (opt_4)
 		vflag |= INP_IPV4;
 	if (opt_6)
@@ -604,6 +608,7 @@ gather_inet(int proto)
 			inp = &xtp->xt_inp;
 			so = &xtp->xt_socket;
 			protoname = xtp->xt_tp.t_flags & TF_TOE ? "toe" : "tcp";
+			state = xtp->xt_tp.t_state;
 			break;
 		case IPPROTO_UDP:
 		case IPPROTO_DIVERT:
@@ -670,6 +675,8 @@ gather_inet(int proto)
 		sock->laddr = laddr;
 		sock->faddr = faddr;
 		sock->vflag = inp->inp_vflag;
+		if (proto == IPPROTO_TCP)
+			sock->state = xtp->xt_tp.t_state;
 		sock->protoname = protoname;
 		hash = (int)((uintptr_t)sock->socket % HASHSIZE);
 		sock->next = sockhash[hash];
@@ -977,7 +984,14 @@ displaysock(struct sock *s, int pos)
 			pos = 0;
 		}
 	}
-	xprintf("\n");
+	if (opt_s && s->proto == IPPROTO_TCP) {
+		while (pos < 80)
+			pos += xprintf(" ");
+		if (s->state >= 0 && s->state < TCP_NSTATES)
+			pos += xprintf("%s", tcpstates[s->state]);
+		else
+			pos += xprintf("?");
+	}
 }
 
 static void
@@ -988,9 +1002,12 @@ display(void)
 	struct sock *s;
 	int hash, n, pos;
 
-	printf("%-8s %-10s %-5s %-2s %-6s %-21s %-21s\n",
+	printf("%-8s %-10s %-5s %-2s %-6s %-21s %-21s",
 	    "USER", "COMMAND", "PID", "FD", "PROTO",
 	    "LOCAL ADDRESS", "FOREIGN ADDRESS");
+	if (opt_s)
+		printf(" %-12s", "STATE");
+	printf("\n");
 	setpassent(1);
 	for (xf = xfiles, n = 0; n < nxfiles; ++n, ++xf) {
 		if (xf->xf_data == NULL)
@@ -1019,6 +1036,7 @@ display(void)
 				pos += xprintf(" ");
 			pos += xprintf("%d ", xf->xf_fd);
 			displaysock(s, pos);
+			xprintf("\n");
 		}
 	}
 	if (opt_j >= 0)
@@ -1033,6 +1051,7 @@ display(void)
 			pos += xprintf("%-8s %-10s %-5s %-2s ",
 			    "?", "?", "?", "?");
 			displaysock(s, pos);
+			xprintf("\n");
 		}
 	}
 }
@@ -1061,7 +1080,7 @@ static void
 usage(void)
 {
 	fprintf(stderr,
-	    "Usage: sockstat [-46cLlu] [-j jid] [-p ports] [-P protocols]\n");
+	    "usage: sockstat [-46cLlsu] [-j jid] [-p ports] [-P protocols]\n");
 	exit(1);
 }
 
@@ -1072,7 +1091,7 @@ main(int argc, char *argv[])
 	int o, i;
 
 	opt_j = -1;
-	while ((o = getopt(argc, argv, "46cj:Llp:P:uv")) != -1)
+	while ((o = getopt(argc, argv, "46cj:Llp:P:suv")) != -1)
 		switch (o) {
 		case '4':
 			opt_4 = 1;
@@ -1098,6 +1117,9 @@ main(int argc, char *argv[])
 		case 'P':
 			protos_defined = parse_protos(optarg);
 			break;
+		case 's':
+			opt_s = 1;
+			break;
 		case 'u':
 			opt_u = 1;
 			break;

From owner-svn-src-all@freebsd.org  Sun Jan 17 14:35:39 2016
Return-Path: <owner-svn-src-all@freebsd.org>
Delivered-To: svn-src-all@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id 23074A86C43;
 Sun, 17 Jan 2016 14:35:39 +0000 (UTC)
 (envelope-from tuexen@FreeBSD.org)
Received: from repo.freebsd.org (repo.freebsd.org
 [IPv6:2610:1c1:1:6068::e6a:0])
 (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
 (Client did not present a certificate)
 by mx1.freebsd.org (Postfix) with ESMTPS id E3BA91D36;
 Sun, 17 Jan 2016 14:35:38 +0000 (UTC)
 (envelope-from tuexen@FreeBSD.org)
Received: from repo.freebsd.org ([127.0.1.37])
 by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u0HEZb9s048662;
 Sun, 17 Jan 2016 14:35:37 GMT (envelope-from tuexen@FreeBSD.org)
Received: (from tuexen@localhost)
 by repo.freebsd.org (8.15.2/8.15.2/Submit) id u0HEZbtU048661;
 Sun, 17 Jan 2016 14:35:37 GMT (envelope-from tuexen@FreeBSD.org)
Message-Id: <201601171435.u0HEZbtU048661@repo.freebsd.org>
X-Authentication-Warning: repo.freebsd.org: tuexen set sender to
 tuexen@FreeBSD.org using -f
From: Michael Tuexen <tuexen@FreeBSD.org>
Date: Sun, 17 Jan 2016 14:35:37 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org
Subject: svn commit: r294226 - stable/10/usr.bin/sockstat
X-SVN-Group: stable-10
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.20
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for &quot;
 user&quot; and &quot; projects&quot; \)" <svn-src-all.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-all/>
List-Post: <mailto:svn-src-all@freebsd.org>
List-Help: <mailto:svn-src-all-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Sun, 17 Jan 2016 14:35:39 -0000

Author: tuexen
Date: Sun Jan 17 14:35:37 2016
New Revision: 294226
URL: https://svnweb.freebsd.org/changeset/base/294226

Log:
  MFC r285651:
  Move assignments around to avoid a false-positive uninitialized variable
  warning which broke the sparc64 build.
  
  This is work from des@ and MFCing was discussed with him.

Modified:
  stable/10/usr.bin/sockstat/sockstat.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/usr.bin/sockstat/sockstat.c
==============================================================================
--- stable/10/usr.bin/sockstat/sockstat.c	Sun Jan 17 14:33:40 2016	(r294225)
+++ stable/10/usr.bin/sockstat/sockstat.c	Sun Jan 17 14:35:37 2016	(r294226)
@@ -598,9 +598,10 @@ gather_inet(int proto)
 		xig = (struct xinpgen *)(void *)((char *)xig + xig->xig_len);
 		if (xig >= exig)
 			break;
+		xip = (struct xinpcb *)xig;
+		xtp = (struct xtcpcb *)xig;
 		switch (proto) {
 		case IPPROTO_TCP:
-			xtp = (struct xtcpcb *)xig;
 			if (xtp->xt_len != sizeof(*xtp)) {
 				warnx("struct xtcpcb size mismatch");
 				goto out;
@@ -612,7 +613,6 @@ gather_inet(int proto)
 			break;
 		case IPPROTO_UDP:
 		case IPPROTO_DIVERT:
-			xip = (struct xinpcb *)xig;
 			if (xip->xi_len != sizeof(*xip)) {
 				warnx("struct xinpcb size mismatch");
 				goto out;

From owner-svn-src-all@freebsd.org  Sun Jan 17 15:21:26 2016
Return-Path: <owner-svn-src-all@freebsd.org>
Delivered-To: svn-src-all@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7D091A8600F;
 Sun, 17 Jan 2016 15:21:26 +0000 (UTC) (envelope-from br@FreeBSD.org)
Received: from repo.freebsd.org (repo.freebsd.org
 [IPv6:2610:1c1:1:6068::e6a:0])
 (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
 (Client did not present a certificate)
 by mx1.freebsd.org (Postfix) with ESMTPS id 20B4519B9;
 Sun, 17 Jan 2016 15:21:26 +0000 (UTC) (envelope-from br@FreeBSD.org)
Received: from repo.freebsd.org ([127.0.1.37])
 by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u0HFLPHu063040;
 Sun, 17 Jan 2016 15:21:25 GMT (envelope-from br@FreeBSD.org)
Received: (from br@localhost)
 by repo.freebsd.org (8.15.2/8.15.2/Submit) id u0HFLNvD063018;
 Sun, 17 Jan 2016 15:21:23 GMT (envelope-from br@FreeBSD.org)
Message-Id: <201601171521.u0HFLNvD063018@repo.freebsd.org>
X-Authentication-Warning: repo.freebsd.org: br set sender to br@FreeBSD.org
 using -f
From: Ruslan Bukin <br@FreeBSD.org>
Date: Sun, 17 Jan 2016 15:21:23 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-head@freebsd.org
Subject: svn commit: r294227 - in head/lib: libc libc/gen libc/riscv
 libc/riscv/gen libc/riscv/sys libc/xdr libstand
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.20
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for &quot;
 user&quot; and &quot; projects&quot; \)" <svn-src-all.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-all/>
List-Post: <mailto:svn-src-all@freebsd.org>
List-Help: <mailto:svn-src-all-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Sun, 17 Jan 2016 15:21:26 -0000

Author: br
Date: Sun Jan 17 15:21:23 2016
New Revision: 294227
URL: https://svnweb.freebsd.org/changeset/base/294227

Log:
  Bring in initial libc and libstand support for RISC-V.
  
  Reviewed by:	andrew, emaste, kib
  Sponsored by:	DARPA, AFRL
  Sponsored by:	HEIF5
  Differential Revision:	https://reviews.freebsd.org/D4943

Added:
  head/lib/libc/riscv/SYS.h   (contents, props changed)
  head/lib/libc/riscv/Symbol.map   (contents, props changed)
  head/lib/libc/riscv/_fpmath.h   (contents, props changed)
  head/lib/libc/riscv/arith.h   (contents, props changed)
  head/lib/libc/riscv/gd_qnan.h   (contents, props changed)
  head/lib/libc/riscv/gen/
  head/lib/libc/riscv/gen/Makefile.inc   (contents, props changed)
  head/lib/libc/riscv/gen/_ctx_start.S   (contents, props changed)
  head/lib/libc/riscv/gen/_set_tp.c   (contents, props changed)
  head/lib/libc/riscv/gen/_setjmp.S   (contents, props changed)
  head/lib/libc/riscv/gen/fabs.S   (contents, props changed)
  head/lib/libc/riscv/gen/flt_rounds.c   (contents, props changed)
  head/lib/libc/riscv/gen/infinity.c   (contents, props changed)
  head/lib/libc/riscv/gen/makecontext.c   (contents, props changed)
  head/lib/libc/riscv/gen/setjmp.S   (contents, props changed)
  head/lib/libc/riscv/gen/sigsetjmp.S   (contents, props changed)
  head/lib/libc/riscv/sys/
  head/lib/libc/riscv/sys/Makefile.inc   (contents, props changed)
  head/lib/libc/riscv/sys/brk.S   (contents, props changed)
  head/lib/libc/riscv/sys/cerror.S   (contents, props changed)
  head/lib/libc/riscv/sys/pipe.S   (contents, props changed)
  head/lib/libc/riscv/sys/sbrk.S   (contents, props changed)
  head/lib/libc/riscv/sys/shmat.S   (contents, props changed)
  head/lib/libc/riscv/sys/sigreturn.S   (contents, props changed)
  head/lib/libc/riscv/sys/syscall.S   (contents, props changed)
  head/lib/libc/riscv/sys/vfork.S   (contents, props changed)
Modified:
  head/lib/libc/Makefile
  head/lib/libc/gen/tls.c
  head/lib/libc/riscv/Makefile.inc
  head/lib/libc/xdr/xdr_float.c
  head/lib/libstand/Makefile

Modified: head/lib/libc/Makefile
==============================================================================
--- head/lib/libc/Makefile	Sun Jan 17 14:35:37 2016	(r294226)
+++ head/lib/libc/Makefile	Sun Jan 17 15:21:23 2016	(r294227)
@@ -83,6 +83,7 @@ NOASM=
 .if ${LIBC_ARCH} != "aarch64" && \
     ${LIBC_ARCH} != "amd64" && \
     ${LIBC_ARCH} != "powerpc64" && \
+    ${LIBC_ARCH} != "riscv" && \
     ${LIBC_ARCH} != "sparc64" && \
     ${MACHINE_ARCH:Mmipsn32*} == "" && \
     ${MACHINE_ARCH:Mmips64*} == ""
@@ -101,7 +102,7 @@ NOASM=
 .include "${LIBC_SRCTOP}/uuid/Makefile.inc"
 .include "${LIBC_SRCTOP}/xdr/Makefile.inc"
 .if (${LIBC_ARCH} == "arm" && ${MACHINE_ARCH} != "armv6hf") ||\
-     ${LIBC_ARCH} == "mips"
+     ${LIBC_ARCH} == "mips" && ${LIBC_ARCH} == "riscv"
 .include "${LIBC_SRCTOP}/softfloat/Makefile.inc"
 .endif
 .if ${MK_NIS} != "no"

Modified: head/lib/libc/gen/tls.c
==============================================================================
--- head/lib/libc/gen/tls.c	Sun Jan 17 14:35:37 2016	(r294226)
+++ head/lib/libc/gen/tls.c	Sun Jan 17 15:21:23 2016	(r294227)
@@ -64,15 +64,16 @@ void __libc_free_tls(void *tls, size_t t
 
 #if defined(__amd64__)
 #define TLS_TCB_ALIGN 16
-#elif defined(__powerpc__) || defined(__i386__) || defined(__arm__) || \
-    defined(__sparc64__) || defined(__mips__) || defined(__aarch64__)
+#elif defined(__aarch64__) || defined(__arm__) || defined(__i386__) || \
+    defined(__mips__) || defined(__powerpc__) || defined(__riscv__) || \
+    defined(__sparc64__)
 #define TLS_TCB_ALIGN sizeof(void *)
 #else
 #error TLS_TCB_ALIGN undefined for target architecture
 #endif
 
-#if defined(__arm__) || defined(__mips__) || defined(__powerpc__) || \
-    defined(__aarch64__)
+#if defined(__aarch64__) || defined(__arm__) || defined(__mips__) || \
+    defined(__powerpc__) || defined(__riscv__)
 #define TLS_VARIANT_I
 #endif
 #if defined(__i386__) || defined(__amd64__) || defined(__sparc64__)

Modified: head/lib/libc/riscv/Makefile.inc
==============================================================================
--- head/lib/libc/riscv/Makefile.inc	Sun Jan 17 14:35:37 2016	(r294226)
+++ head/lib/libc/riscv/Makefile.inc	Sun Jan 17 15:21:23 2016	(r294227)
@@ -1 +1,9 @@
 # $FreeBSD$
+#
+# Machine dependent definitions for the RISC-V architecture.
+#
+
+# Long double is quad precision
+GDTOASRCS+=strtorQ.c
+MDSRCS+=machdep_ldisQ.c
+SYM_MAPS+=${LIBC_SRCTOP}/riscv/Symbol.map

Added: head/lib/libc/riscv/SYS.h
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/lib/libc/riscv/SYS.h	Sun Jan 17 15:21:23 2016	(r294227)
@@ -0,0 +1,68 @@
+/*-
+ * Copyright (c) 2014 Andrew Turner
+ * Copyright (c) 2015 Ruslan Bukin <br@bsdpad.com>
+ * All rights reserved.
+ *
+ * Portions of this software were developed by SRI International and the
+ * University of Cambridge Computer Laboratory under DARPA/AFRL contract
+ * FA8750-10-C-0237 ("CTSRD"), as part of the DARPA CRASH research programme.
+ *
+ * Portions of this software were developed by the University of Cambridge
+ * Computer Laboratory as part of the CTSRD Project, with support from the
+ * UK Higher Education Innovation Fund (HEIF).
+ *
+ * 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$
+ */
+
+#include <sys/syscall.h>
+#include <machine/asm.h>
+
+#define	_SYSCALL(name)						\
+	li	t0, SYS_ ## name;				\
+	ecall
+
+#define	SYSCALL(name)						\
+ENTRY(__sys_##name);						\
+	WEAK_REFERENCE(__sys_##name, name);			\
+	WEAK_REFERENCE(__sys_##name, _##name);			\
+	_SYSCALL(name);						\
+	ret;							\
+END(__sys_##name)
+
+#define	PSEUDO(name)						\
+ENTRY(__sys_##name);						\
+	WEAK_REFERENCE(__sys_##name, _##name);			\
+	_SYSCALL(name);						\
+	bnez	t0, cerror; 					\
+	ret;							\
+END(__sys_##name)
+
+#define	RSYSCALL(name)						\
+ENTRY(__sys_##name);						\
+	WEAK_REFERENCE(__sys_##name, name);			\
+	WEAK_REFERENCE(__sys_##name, _##name);			\
+	_SYSCALL(name);						\
+	bnez	t0, cerror; 					\
+	ret;							\
+END(__sys_##name)

Added: head/lib/libc/riscv/Symbol.map
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/lib/libc/riscv/Symbol.map	Sun Jan 17 15:21:23 2016	(r294227)
@@ -0,0 +1,42 @@
+/*
+ * $FreeBSD$
+ */
+
+/*
+ * This only needs to contain symbols that are not listed in
+ * symbol maps from other parts of libc (i.e., not found in
+ * stdlib/Symbol.map, string/Symbol.map, sys/Symbol.map, ...).
+ */
+FBSD_1.0 {
+	/* PSEUDO syscalls */
+	_exit;
+
+	_setjmp;
+	_longjmp;
+	fabs;
+	__flt_rounds;
+	fpgetmask;
+	fpsetmask;
+	__infinity;
+	__nan;
+	setjmp;
+	longjmp;
+	sigsetjmp;
+	siglongjmp;
+	htonl;
+	htons;
+	ntohl;
+	ntohs;
+	vfork;
+	brk;
+	sbrk;
+	makecontext;
+};
+
+FBSDprivate_1.0 {
+	_set_tp;
+	_end;
+	curbrk;
+	minbrk;
+	__makecontext;
+};

Added: head/lib/libc/riscv/_fpmath.h
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/lib/libc/riscv/_fpmath.h	Sun Jan 17 15:21:23 2016	(r294227)
@@ -0,0 +1,71 @@
+/*-
+ * Copyright (c) 2002, 2003 David Schultz <das@FreeBSD.ORG>
+ * Copyright (c) 2014 The FreeBSD Foundation
+ * 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$
+ */
+
+union IEEEl2bits {
+	long double	e;
+	struct {
+		unsigned long	manl	:64;
+		unsigned long	manh	:48;
+		unsigned int	exp	:15;
+		unsigned int	sign	:1;
+	} bits;
+	struct {
+		unsigned long	manl	:64;
+		unsigned long	manh	:48;
+		unsigned int	expsign	:16;
+	} xbits;
+};
+
+#define	LDBL_NBIT	0
+#define	LDBL_IMPLICIT_NBIT
+#define	mask_nbit_l(u)	((void)0)
+
+#define	LDBL_MANH_SIZE	20
+#define	LDBL_MANL_SIZE	32
+
+#define	LDBL_TO_ARRAY32(u, a) do {			\
+	(a)[0] = (uint32_t)(u).bits.manl;		\
+	(a)[1] = (uint32_t)(u).bits.manh;		\
+} while(0)
+
+/*
+ * TODO: Due to compiler problem we are temporary using
+ * LDBL_PREC == 53. Use code below for LDBL_PREC == 113
+ */
+#if 0
+#define	LDBL_MANH_SIZE	48
+#define	LDBL_MANL_SIZE	64
+
+#define	LDBL_TO_ARRAY32(u, a) do {			\
+	(a)[0] = (uint32_t)(u).bits.manl;		\
+	(a)[1] = (uint32_t)((u).bits.manl >> 32);	\
+	(a)[2] = (uint32_t)(u).bits.manh;		\
+	(a)[3] = (uint32_t)((u).bits.manh >> 32);	\
+} while(0)
+#endif

Added: head/lib/libc/riscv/arith.h
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/lib/libc/riscv/arith.h	Sun Jan 17 15:21:23 2016	(r294227)
@@ -0,0 +1,19 @@
+/*
+ * MD header for contrib/gdtoa
+ *
+ * $FreeBSD$
+ */
+
+/*
+ * NOTE: The definitions in this file must be correct or strtod(3) and
+ * floating point formats in printf(3) will break!  The file can be
+ * generated by running contrib/gdtoa/arithchk.c on the target
+ * architecture.  See contrib/gdtoa/gdtoaimp.h for details.
+ */
+
+#define IEEE_8087
+#define Arith_Kind_ASL 1
+#define Long int
+#define Intcast (int)(long)
+#define Double_Align
+#define X64_bit_pointers

Added: head/lib/libc/riscv/gd_qnan.h
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/lib/libc/riscv/gd_qnan.h	Sun Jan 17 15:21:23 2016	(r294227)
@@ -0,0 +1,21 @@
+/*
+ * MD header for contrib/gdtoa
+ *
+ * This file can be generated by compiling and running contrib/gdtoa/qnan.c
+ * on the target architecture after arith.h has been generated.
+ *
+ * $FreeBSD$
+ */
+
+#define f_QNAN 0x7fc00000
+#define d_QNAN0 0x0
+#define d_QNAN1 0x7ff80000
+#define ld_QNAN0 0x0
+#define ld_QNAN1 0x7ff80000
+#define ld_QNAN2 0x0
+#define ld_QNAN3 0x0
+#define ldus_QNAN0 0x0
+#define ldus_QNAN1 0x0
+#define ldus_QNAN2 0x0
+#define ldus_QNAN3 0x7ff8
+#define ldus_QNAN4 0x0

Added: head/lib/libc/riscv/gen/Makefile.inc
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/lib/libc/riscv/gen/Makefile.inc	Sun Jan 17 15:21:23 2016	(r294227)
@@ -0,0 +1,13 @@
+# $FreeBSD$
+
+SRCS+=	_ctx_start.S \
+	fabs.S \
+	flt_rounds.c \
+	infinity.c \
+	ldexp.c \
+	makecontext.c \
+	_setjmp.S \
+	_set_tp.c \
+	setjmp.S \
+	sigsetjmp.S \
+	trivial-getcontextx.c

Added: head/lib/libc/riscv/gen/_ctx_start.S
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/lib/libc/riscv/gen/_ctx_start.S	Sun Jan 17 15:21:23 2016	(r294227)
@@ -0,0 +1,43 @@
+/*-
+ * Copyright (c) 2015 Ruslan Bukin <br@bsdpad.com>
+ * All rights reserved.
+ *
+ * Portions of this software were developed by SRI International and the
+ * University of Cambridge Computer Laboratory under DARPA/AFRL contract
+ * FA8750-10-C-0237 ("CTSRD"), as part of the DARPA CRASH research programme.
+ *
+ * Portions of this software were developed by the University of Cambridge
+ * Computer Laboratory as part of the CTSRD Project, with support from the
+ * UK Higher Education Innovation Fund (HEIF).
+ *
+ * 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 <machine/asm.h>
+__FBSDID("$FreeBSD$");
+
+ENTRY(_ctx_start)
+	jalr	s0		/* Call func from makecontext */
+	mv	a0, s1		/* Load ucp saved in makecontext */
+	call	_C_LABEL(ctx_done)
+	call	_C_LABEL(abort)
+END(_ctx_start)

Added: head/lib/libc/riscv/gen/_set_tp.c
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/lib/libc/riscv/gen/_set_tp.c	Sun Jan 17 15:21:23 2016	(r294227)
@@ -0,0 +1,50 @@
+/*-
+ * Copyright (c) 2015 Ruslan Bukin <br@bsdpad.com>
+ * All rights reserved.
+ *
+ * Portions of this software were developed by SRI International and the
+ * University of Cambridge Computer Laboratory under DARPA/AFRL contract
+ * FA8750-10-C-0237 ("CTSRD"), as part of the DARPA CRASH research programme.
+ *
+ * Portions of this software were developed by the University of Cambridge
+ * Computer Laboratory as part of the CTSRD Project, with support from the
+ * UK Higher Education Innovation Fund (HEIF).
+ *
+ * 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 <sys/cdefs.h>
+__FBSDID("$FreeBSD$");
+
+#include <string.h>
+#include <sys/types.h>
+
+#include <machine/sysarch.h>
+
+#include <stdlib.h>
+
+void
+_set_tp(void *tp)
+{
+
+	__asm __volatile("mv  tp, %0" :: "r"((char*)tp + 0x10));
+}

Added: head/lib/libc/riscv/gen/_setjmp.S
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/lib/libc/riscv/gen/_setjmp.S	Sun Jan 17 15:21:23 2016	(r294227)
@@ -0,0 +1,151 @@
+/*-
+ * Copyright (c) 2015 Ruslan Bukin <br@bsdpad.com>
+ * All rights reserved.
+ *
+ * Portions of this software were developed by SRI International and the
+ * University of Cambridge Computer Laboratory under DARPA/AFRL contract
+ * FA8750-10-C-0237 ("CTSRD"), as part of the DARPA CRASH research programme.
+ *
+ * Portions of this software were developed by the University of Cambridge
+ * Computer Laboratory as part of the CTSRD Project, with support from the
+ * UK Higher Education Innovation Fund (HEIF).
+ *
+ * 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 <machine/asm.h>
+__FBSDID("$FreeBSD$");
+
+#include <machine/setjmp.h>
+
+ENTRY(_setjmp)
+	/* Store the magic value and stack pointer */
+	la	t0, .Lmagic
+	ld	t0, 0(t0)
+	sd	t0, (0 * 8)(a0)
+	sd	sp, (1 * 8)(a0)
+	addi	a0, a0, (2 * 8)
+
+	/* Store the general purpose registers and ra */
+	sd	s0, (0 * 8)(a0)
+	sd	s1, (1 * 8)(a0)
+	sd	s2, (2 * 8)(a0)
+	sd	s3, (3 * 8)(a0)
+	sd	s4, (4 * 8)(a0)
+	sd	s5, (5 * 8)(a0)
+	sd	s6, (6 * 8)(a0)
+	sd	s7, (7 * 8)(a0)
+	sd	s8, (8 * 8)(a0)
+	sd	s9, (9 * 8)(a0)
+	sd	s10, (10 * 8)(a0)
+	sd	s11, (11 * 8)(a0)
+	sd	ra, (12 * 8)(a0)
+	addi	a0, a0, (13 * 8)
+
+#ifndef _STANDALONE
+#if 0
+	/* RISCVTODO */
+	/* Store the vfp registers */
+	fsq	fs0, (0 * 16)(a0)
+	fsq	fs1, (1 * 16)(a0)
+	fsq	fs2, (2 * 16)(a0)
+	fsq	fs3, (3 * 16)(a0)
+	fsq	fs4, (4 * 16)(a0)
+	fsq	fs5, (5 * 16)(a0)
+	fsq	fs6, (6 * 16)(a0)
+	fsq	fs7, (7 * 16)(a0)
+	fsq	fs8, (8 * 16)(a0)
+	fsq	fs9, (9 * 16)(a0)
+	fsq	fs10, (10 * 16)(a0)
+	fsq	fs11, (11 * 16)(a0)
+	addi	a0, a0, (12 * 16)
+#endif
+#endif
+
+	/* Return value */
+	li	a0, 0
+	ret
+	.align	3
+.Lmagic:
+	.quad	_JB_MAGIC__SETJMP
+END(_setjmp)
+
+ENTRY(_longjmp)
+	/* Check the magic value */
+	ld	t0, 0(a0)
+	la	t1, .Lmagic
+	ld	t1, 0(t1)
+	bne	t0, t1, botch
+
+	/* Restore the stack pointer */
+	ld	t0, 8(a0)
+	mv	sp, t0
+	addi	a0, a0, (2 * 8)
+
+	/* Restore the general purpose registers and ra */
+	ld	s0, (0 * 8)(a0)
+	ld	s1, (1 * 8)(a0)
+	ld	s2, (2 * 8)(a0)
+	ld	s3, (3 * 8)(a0)
+	ld	s4, (4 * 8)(a0)
+	ld	s5, (5 * 8)(a0)
+	ld	s6, (6 * 8)(a0)
+	ld	s7, (7 * 8)(a0)
+	ld	s8, (8 * 8)(a0)
+	ld	s9, (9 * 8)(a0)
+	ld	s10, (10 * 8)(a0)
+	ld	s11, (11 * 8)(a0)
+	ld	ra, (12 * 8)(a0)
+	addi	a0, a0, (13 * 8)
+
+#ifndef _STANDALONE
+#if 0
+	/* RISCVTODO */
+	/* Restore the vfp registers */
+	flq	fs0, (0 * 16)(a0)
+	flq	fs1, (1 * 16)(a0)
+	flq	fs2, (2 * 16)(a0)
+	flq	fs3, (3 * 16)(a0)
+	flq	fs4, (4 * 16)(a0)
+	flq	fs5, (5 * 16)(a0)
+	flq	fs6, (6 * 16)(a0)
+	flq	fs7, (7 * 16)(a0)
+	flq	fs8, (8 * 16)(a0)
+	flq	fs9, (9 * 16)(a0)
+	flq	fs10, (10 * 16)(a0)
+	flq	fs11, (11 * 16)(a0)
+	addi	a0, a0, (12 * 16)
+#endif
+#endif
+
+	/* Load the return value */
+	mv	a0, a1
+	ret
+
+botch:
+#ifdef _STANDALONE
+	j	botch
+#else
+	call	_C_LABEL(longjmperror)
+	call	_C_LABEL(abort)
+#endif
+END(_longjmp)

Added: head/lib/libc/riscv/gen/fabs.S
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/lib/libc/riscv/gen/fabs.S	Sun Jan 17 15:21:23 2016	(r294227)
@@ -0,0 +1,41 @@
+/*-
+ * Copyright (c) 2015 Ruslan Bukin <br@bsdpad.com>
+ * All rights reserved.
+ *
+ * Portions of this software were developed by SRI International and the
+ * University of Cambridge Computer Laboratory under DARPA/AFRL contract
+ * FA8750-10-C-0237 ("CTSRD"), as part of the DARPA CRASH research programme.
+ *
+ * Portions of this software were developed by the University of Cambridge
+ * Computer Laboratory as part of the CTSRD Project, with support from the
+ * UK Higher Education Innovation Fund (HEIF).
+ *
+ * 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 <machine/asm.h>
+__FBSDID("$FreeBSD$");
+
+ENTRY(fabs)
+	fabs.d	fa0, fa0
+	ret
+END(fabs)

Added: head/lib/libc/riscv/gen/flt_rounds.c
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/lib/libc/riscv/gen/flt_rounds.c	Sun Jan 17 15:21:23 2016	(r294227)
@@ -0,0 +1,71 @@
+/*-
+ * Copyright (c) 2015 Ruslan Bukin <br@bsdpad.com>
+ * All rights reserved.
+ *
+ * Portions of this software were developed by SRI International and the
+ * University of Cambridge Computer Laboratory under DARPA/AFRL contract
+ * FA8750-10-C-0237 ("CTSRD"), as part of the DARPA CRASH research programme.
+ *
+ * Portions of this software were developed by the University of Cambridge
+ * Computer Laboratory as part of the CTSRD Project, with support from the
+ * UK Higher Education Innovation Fund (HEIF).
+ *
+ * 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 <sys/cdefs.h>
+__FBSDID("$FreeBSD$");
+
+#include <sys/types.h>
+
+#include <fenv.h>
+#include <float.h>
+
+int
+__flt_rounds(void)
+{
+#if 0
+	uint64_t fcsr;
+#endif
+	int mode;
+
+#if 0
+	__asm __volatile("csrr    %0, fcsr" : "=r" (fcsr));
+	mode = (fcsr & _ROUND_MASK);
+#endif
+
+	/* RISCVTODO */
+	mode = FE_TOWARDZERO; /* softfloat rounding mode */
+
+	switch (mode) {
+	case FE_TOWARDZERO:
+		return (0);
+	case FE_TONEAREST:
+		return (1);
+	case FE_UPWARD:
+		return (2);
+	case FE_DOWNWARD:
+		return (3);
+	}
+
+	return (-1);
+}

Added: head/lib/libc/riscv/gen/infinity.c
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/lib/libc/riscv/gen/infinity.c	Sun Jan 17 15:21:23 2016	(r294227)
@@ -0,0 +1,14 @@
+/*
+ * infinity.c
+ */
+
+#include <sys/cdefs.h>
+__FBSDID("$FreeBSD$");
+
+#include <math.h>
+
+/* bytes for +Infinity on riscv */
+const union __infinity_un __infinity = { { 0, 0, 0, 0, 0, 0, 0xf0, 0x7f } };
+
+/* bytes for NaN */
+const union __nan_un __nan = { { 0, 0, 0xc0, 0xff } };

Added: head/lib/libc/riscv/gen/makecontext.c
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/lib/libc/riscv/gen/makecontext.c	Sun Jan 17 15:21:23 2016	(r294227)
@@ -0,0 +1,91 @@
+/*-
+ * Copyright (c) 2015 Ruslan Bukin <br@bsdpad.com>
+ * All rights reserved.
+ *
+ * Portions of this software were developed by SRI International and the
+ * University of Cambridge Computer Laboratory under DARPA/AFRL contract
+ * FA8750-10-C-0237 ("CTSRD"), as part of the DARPA CRASH research programme.
+ *
+ * Portions of this software were developed by the University of Cambridge
+ * Computer Laboratory as part of the CTSRD Project, with support from the
+ * UK Higher Education Innovation Fund (HEIF).
+ *
+ * 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 <sys/cdefs.h>
+__FBSDID("$FreeBSD$");
+
+#include <sys/param.h>
+
+#include <machine/riscvreg.h>
+
+#include <inttypes.h>
+#include <stdarg.h>
+#include <stdlib.h>
+#include <ucontext.h>
+
+void _ctx_start(void);
+
+void
+ctx_done(ucontext_t *ucp)
+{
+
+	if (ucp->uc_link == NULL) {
+		exit(0);
+	} else {
+		setcontext((const ucontext_t *)ucp->uc_link);
+		abort();
+	}
+}
+
+__weak_reference(__makecontext, makecontext);
+
+void
+__makecontext(ucontext_t *ucp, void (*func)(void), int argc, ...)
+{
+	struct gpregs *gp;
+	va_list ap;
+	int i;
+
+	/* A valid context is required. */
+	if (ucp == NULL)
+		return;
+
+	if ((argc < 0) || (argc > 8))
+		return;
+
+	gp = &ucp->uc_mcontext.mc_gpregs;
+
+	va_start(ap, argc);
+	/* Pass up to eight arguments in a0-7. */
+	for (i = 0; i < argc && i < 8; i++)
+		gp->gp_a[i] = va_arg(ap, uint64_t);
+	va_end(ap);
+
+	/* Set the stack */
+	gp->gp_sp = STACKALIGN(ucp->uc_stack.ss_sp + ucp->uc_stack.ss_size);
+	/* Arrange for return via the trampoline code. */
+	gp->gp_sepc = (__register_t)_ctx_start;
+	gp->gp_s[0] = (__register_t)func;
+	gp->gp_s[1] = (__register_t)ucp;
+}

Added: head/lib/libc/riscv/gen/setjmp.S
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/lib/libc/riscv/gen/setjmp.S	Sun Jan 17 15:21:23 2016	(r294227)
@@ -0,0 +1,173 @@
+/*-
+ * Copyright (c) 2015 Ruslan Bukin <br@bsdpad.com>
+ * All rights reserved.
+ *
+ * Portions of this software were developed by SRI International and the
+ * University of Cambridge Computer Laboratory under DARPA/AFRL contract
+ * FA8750-10-C-0237 ("CTSRD"), as part of the DARPA CRASH research programme.
+ *
+ * Portions of this software were developed by the University of Cambridge
+ * Computer Laboratory as part of the CTSRD Project, with support from the
+ * UK Higher Education Innovation Fund (HEIF).
+ *
+ * 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 <machine/asm.h>
+__FBSDID("$FreeBSD$");
+
+#include <machine/setjmp.h>
+
+ENTRY(setjmp)
+	addi	sp, sp, -(2 * 8)
+	sd	a0, 0(sp)
+	sd	ra, 8(sp)
+
+	/* Store the signal mask */
+	addi	a2, a0, (_JB_SIGMASK * 8)	/* oset */
+	li	a1, 0				/* set */
+	li	a0, 1				/* SIG_BLOCK */
+	jal	sigprocmask
+
+	ld	a0, 0(sp)
+	ld	ra, 8(sp)
+	addi	sp, sp, (2 * 8)
+
+	/* Store the magic value and stack pointer */
+	la	t0, .Lmagic
+	ld	t0, 0(t0)
+	sd	t0, (0 * 8)(a0)
+	sd	sp, (1 * 8)(a0)
+	addi	a0, a0, (2 * 8)
+
+	/* Store the general purpose registers and ra */
+	sd	s0, (0 * 8)(a0)
+	sd	s1, (1 * 8)(a0)
+	sd	s2, (2 * 8)(a0)
+	sd	s3, (3 * 8)(a0)
+	sd	s4, (4 * 8)(a0)
+	sd	s5, (5 * 8)(a0)
+	sd	s6, (6 * 8)(a0)
+	sd	s7, (7 * 8)(a0)
+	sd	s8, (8 * 8)(a0)
+	sd	s9, (9 * 8)(a0)
+	sd	s10, (10 * 8)(a0)
+	sd	s11, (11 * 8)(a0)
+	sd	ra, (12 * 8)(a0)
+	addi	a0, a0, (13 * 8)
+
+#if 0
+	/* RISCVTODO */
+	/* Store the vfp registers */
+	fsq	fs0, (0 * 16)(a0)
+	fsq	fs1, (1 * 16)(a0)
+	fsq	fs2, (2 * 16)(a0)
+	fsq	fs3, (3 * 16)(a0)
+	fsq	fs4, (4 * 16)(a0)
+	fsq	fs5, (5 * 16)(a0)
+	fsq	fs6, (6 * 16)(a0)
+	fsq	fs7, (7 * 16)(a0)
+	fsq	fs8, (8 * 16)(a0)
+	fsq	fs9, (9 * 16)(a0)
+	fsq	fs10, (10 * 16)(a0)
+	fsq	fs11, (11 * 16)(a0)
+	addi	a0, a0, (12 * 16)
+#endif
+
+	/* Return value */
+	li	a0, 0
+	ret
+	.align	3
+.Lmagic:
+	.quad	_JB_MAGIC_SETJMP
+END(setjmp)
+
+ENTRY(longjmp)
+	addi	sp, sp, -(4 * 8)
+	sd	a0, (0 * 8)(sp)
+	sd	ra, (1 * 8)(sp)
+	sd	a1, (2 * 8)(sp)
+
+	/* Restore the signal mask */
+	li	a2, 0				/* oset */
+	addi	a1, a0, (_JB_SIGMASK * 8)	/* set */
+	li	a0, 3				/* SIG_BLOCK */
+	jal	sigprocmask
+
+	ld	a1, (2 * 8)(sp)
+	ld	ra, (1 * 8)(sp)
+	ld	a0, (0 * 8)(sp)
+	addi	sp, sp, (4 * 8)
+
+	/* Check the magic value */
+	ld	t0, 0(a0)
+	la	t1, .Lmagic
+	ld	t1, 0(t1)
+	bne	t0, t1, botch
+
+	/* Restore the stack pointer */
+	ld	t0, 8(a0)
+	mv	sp, t0
+	addi	a0, a0, (2 * 8)
+
+	/* Restore the general purpose registers and ra */
+	ld	s0, (0 * 8)(a0)
+	ld	s1, (1 * 8)(a0)
+	ld	s2, (2 * 8)(a0)
+	ld	s3, (3 * 8)(a0)
+	ld	s4, (4 * 8)(a0)
+	ld	s5, (5 * 8)(a0)
+	ld	s6, (6 * 8)(a0)
+	ld	s7, (7 * 8)(a0)
+	ld	s8, (8 * 8)(a0)
+	ld	s9, (9 * 8)(a0)
+	ld	s10, (10 * 8)(a0)
+	ld	s11, (11 * 8)(a0)
+	ld	ra, (12 * 8)(a0)
+	addi	a0, a0, (13 * 8)
+
+#if 0
+	/* RISCVTODO */
+	/* Restore the vfp registers */
+	flq	fs0, (0 * 16)(a0)
+	flq	fs1, (1 * 16)(a0)
+	flq	fs2, (2 * 16)(a0)
+	flq	fs3, (3 * 16)(a0)
+	flq	fs4, (4 * 16)(a0)
+	flq	fs5, (5 * 16)(a0)
+	flq	fs6, (6 * 16)(a0)
+	flq	fs7, (7 * 16)(a0)
+	flq	fs8, (8 * 16)(a0)
+	flq	fs9, (9 * 16)(a0)
+	flq	fs10, (10 * 16)(a0)
+	flq	fs11, (11 * 16)(a0)
+	addi	a0, a0, (12 * 16)
+#endif
+
+	/* Load the return value */
+	mv	a0, a1
+	ret
+
+botch:
+	call	_C_LABEL(longjmperror)
+	call	_C_LABEL(abort)
+END(longjmp)

Added: head/lib/libc/riscv/gen/sigsetjmp.S
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/lib/libc/riscv/gen/sigsetjmp.S	Sun Jan 17 15:21:23 2016	(r294227)
@@ -0,0 +1,57 @@
+/*-
+ * Copyright (c) 2015 Ruslan Bukin <br@bsdpad.com>
+ * All rights reserved.
+ *
+ * Portions of this software were developed by SRI International and the
+ * University of Cambridge Computer Laboratory under DARPA/AFRL contract
+ * FA8750-10-C-0237 ("CTSRD"), as part of the DARPA CRASH research programme.
+ *
+ * Portions of this software were developed by the University of Cambridge
+ * Computer Laboratory as part of the CTSRD Project, with support from the
+ * UK Higher Education Innovation Fund (HEIF).
+ *
+ * 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.
+ */

*** DIFF OUTPUT TRUNCATED AT 1000 LINES ***

From owner-svn-src-all@freebsd.org  Sun Jan 17 18:07:33 2016
Return-Path: <owner-svn-src-all@freebsd.org>
Delivered-To: svn-src-all@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id F26D0A866B1;
 Sun, 17 Jan 2016 18:07:33 +0000 (UTC) (envelope-from des@FreeBSD.org)
Received: from repo.freebsd.org (repo.freebsd.org
 [IPv6:2610:1c1:1:6068::e6a:0])
 (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
 (Client did not present a certificate)
 by mx1.freebsd.org (Postfix) with ESMTPS id A95CE1084;
 Sun, 17 Jan 2016 18:07:33 +0000 (UTC) (envelope-from des@FreeBSD.org)
Received: from repo.freebsd.org ([127.0.1.37])
 by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u0HI7WOF013750;
 Sun, 17 Jan 2016 18:07:32 GMT (envelope-from des@FreeBSD.org)
Received: (from des@localhost)
 by repo.freebsd.org (8.15.2/8.15.2/Submit) id u0HI7WjP013749;
 Sun, 17 Jan 2016 18:07:32 GMT (envelope-from des@FreeBSD.org)
Message-Id: <201601171807.u0HI7WjP013749@repo.freebsd.org>
X-Authentication-Warning: repo.freebsd.org: des set sender to des@FreeBSD.org
 using -f
From: =?UTF-8?Q?Dag-Erling_Sm=c3=b8rgrav?= <des@FreeBSD.org>
Date: Sun, 17 Jan 2016 18:07:32 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org
Subject: svn commit: r294228 - stable/10/usr.bin/sockstat
X-SVN-Group: stable-10
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.20
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for &quot;
 user&quot; and &quot; projects&quot; \)" <svn-src-all.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-all/>
List-Post: <mailto:svn-src-all@freebsd.org>
List-Help: <mailto:svn-src-all-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Sun, 17 Jan 2016 18:07:34 -0000

Author: des
Date: Sun Jan 17 18:07:32 2016
New Revision: 294228
URL: https://svnweb.freebsd.org/changeset/base/294228

Log:
  MFH (r287178): print status on first line, not last.
  This revision has previously been (incorrectly) recorded as merged.

Modified:
  stable/10/usr.bin/sockstat/sockstat.c

Modified: stable/10/usr.bin/sockstat/sockstat.c
==============================================================================
--- stable/10/usr.bin/sockstat/sockstat.c	Sun Jan 17 15:21:23 2016	(r294227)
+++ stable/10/usr.bin/sockstat/sockstat.c	Sun Jan 17 18:07:32 2016	(r294228)
@@ -911,7 +911,7 @@ static void
 displaysock(struct sock *s, int pos)
 {
 	void *p;
-	int hash;
+	int hash, first;
 	struct addr *laddr, *faddr;
 	struct sock *s_tmp;
 
@@ -924,6 +924,7 @@ displaysock(struct sock *s, int pos)
 		pos += xprintf("6 ");
 	laddr = s->laddr;
 	faddr = s->faddr;
+	first = 1;
 	while (laddr != NULL || faddr != NULL) {
 		while (pos < 36)
 			pos += xprintf(" ");
@@ -975,6 +976,14 @@ displaysock(struct sock *s, int pos)
 		default:
 			abort();
 		}
+		if (first && opt_s && s->proto == IPPROTO_TCP) {
+			while (pos < 80)
+				pos += xprintf(" ");
+			if (s->state >= 0 && s->state < TCP_NSTATES)
+				pos += xprintf("%s", tcpstates[s->state]);
+			else
+				pos += xprintf("?");
+		}
 		if (laddr != NULL)
 			laddr = laddr->next;
 		if (faddr != NULL)
@@ -983,15 +992,9 @@ displaysock(struct sock *s, int pos)
 			xprintf("\n");
 			pos = 0;
 		}
+		first = 0;
 	}
-	if (opt_s && s->proto == IPPROTO_TCP) {
-		while (pos < 80)
-			pos += xprintf(" ");
-		if (s->state >= 0 && s->state < TCP_NSTATES)
-			pos += xprintf("%s", tcpstates[s->state]);
-		else
-			pos += xprintf("?");
-	}
+	xprintf("\n");
 }
 
 static void
@@ -1036,7 +1039,6 @@ display(void)
 				pos += xprintf(" ");
 			pos += xprintf("%d ", xf->xf_fd);
 			displaysock(s, pos);
-			xprintf("\n");
 		}
 	}
 	if (opt_j >= 0)
@@ -1051,7 +1053,6 @@ display(void)
 			pos += xprintf("%-8s %-10s %-5s %-2s ",
 			    "?", "?", "?", "?");
 			displaysock(s, pos);
-			xprintf("\n");
 		}
 	}
 }

From owner-svn-src-all@freebsd.org  Sun Jan 17 18:18:03 2016
Return-Path: <owner-svn-src-all@freebsd.org>
Delivered-To: svn-src-all@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id 912D3A86B8A;
 Sun, 17 Jan 2016 18:18:03 +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 5B4CA1AB0;
 Sun, 17 Jan 2016 18:18:03 +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 u0HII2jY017260;
 Sun, 17 Jan 2016 18:18:02 GMT (envelope-from ian@FreeBSD.org)
Received: (from ian@localhost)
 by repo.freebsd.org (8.15.2/8.15.2/Submit) id u0HII2YQ017255;
 Sun, 17 Jan 2016 18:18:02 GMT (envelope-from ian@FreeBSD.org)
Message-Id: <201601171818.u0HII2YQ017255@repo.freebsd.org>
X-Authentication-Warning: repo.freebsd.org: ian set sender to ian@FreeBSD.org
 using -f
From: Ian Lepore <ian@FreeBSD.org>
Date: Sun, 17 Jan 2016 18:18:02 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org
Subject: svn commit: r294229 - in stable/10: share/man/man4 sys/dev/uart
X-SVN-Group: stable-10
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.20
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for &quot;
 user&quot; and &quot; projects&quot; \)" <svn-src-all.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-all/>
List-Post: <mailto:svn-src-all@freebsd.org>
List-Help: <mailto:svn-src-all-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Sun, 17 Jan 2016 18:18:03 -0000

Author: ian
Date: Sun Jan 17 18:18:01 2016
New Revision: 294229
URL: https://svnweb.freebsd.org/changeset/base/294229

Log:
  MFC r293781:
  
    Restore uart PPS signal capture polarity to its historical norm, and add an
    option to invert the polarity in software. Also add an option to capture
    very narrow pulses by using the hardware's MSR delta-bit capability of
    latching line state changes.
  
  Relnotes:	yes

Added:
  stable/10/sys/dev/uart/uart_ppstypes.h
     - copied unchanged from r293781, head/sys/dev/uart/uart_ppstypes.h
Modified:
  stable/10/share/man/man4/uart.4
  stable/10/sys/dev/uart/uart_bus.h
  stable/10/sys/dev/uart/uart_core.c
  stable/10/sys/dev/uart/uart_dev_ns8250.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/share/man/man4/uart.4
==============================================================================
--- stable/10/share/man/man4/uart.4	Sun Jan 17 18:07:32 2016	(r294228)
+++ stable/10/share/man/man4/uart.4	Sun Jan 17 18:18:01 2016	(r294229)
@@ -25,7 +25,7 @@
 .\"
 .\" $FreeBSD$
 .\"
-.Dd August 10, 2015
+.Dd December 9, 2015
 .Dt UART 4
 .Os
 .Sh NAME
@@ -160,7 +160,9 @@ The API, accessed via
 is available on the tty device.
 To use the PPS capture feature with
 .Xr ntpd 8 ,
-symlink the tty device to
+symlink the tty callout device
+.Va /dev/cuau?
+to
 .Va /dev/pps0.
 .Pp
 The
@@ -175,15 +177,54 @@ it can be set in
 .Xr loader.conf 5
 or
 .Xr sysctl.conf 5 .
+.Pp
 The following capture modes are available:
 .Bl -tag -compact -offset "mmmm" -width "mmmm"
-.It 0
+.It 0x00
 Capture disabled.
-.It 1
+.It 0x01
 Capture pulses on the CTS line.
-.It 2
-Capture pulses on the DCD line (default).
+.It 0x02
+Capture pulses on the DCD line.
 .El
+.Pp
+The following values may be ORed with the capture mode to configure 
+capture processing options:
+.Bl -tag -compact -offset "mmmm" -width "mmmm"
+.It 0x10
+Invert the pulse (RS-232 logic low = ASSERT, high = CLEAR).
+.It 0x20
+Attempt to capture narrow pulses.
+.El
+.Pp
+Add the narrow pulse option when the incoming PPS pulse width is small
+enough to prevent reliable capture in normal mode.
+In narrow mode the driver uses the hardware's ability to latch a line
+state change; not all hardware has this capability.
+The hardware latch provides a reliable indication that a pulse occurred,
+but prevents distinguishing between the CLEAR and ASSERT edges of the pulse.
+For each detected pulse, the driver synthesizes both an ASSERT and a CLEAR
+event, using the same timestamp for each.
+To prevent spurious events when the hardware is intermittently able to
+see both edges of a pulse, the driver will not generate a new pair of
+events within a half second of the prior pair.
+Both normal and narrow pulse modes work with
+.Xr ntpd 8 .
+.Pp
+Add the invert option when the connection to the uart device uses TTL
+level signals, or when the PPS source emits inverted pulses.
+RFC 2783 defines an ASSERT event as a higher-voltage line level, and a CLEAR
+event as a lower-voltage line level, in the context of the RS-232 protocol.
+The modem control signals on a TTL-level connection are typically
+inverted from the RS-232 levels.
+For example, carrier presence is indicated by a high signal on an RS-232
+DCD line, and by a low signal on a TTL DCD line.
+This is due to the use of inverting line driver buffers to convert between
+TTL and RS-232 line levels in most hardware designs.
+Generally speaking, a connection to a DB-9 style connector is an RS-232
+level signal at up to 12 volts.
+A connection to header pins or an edge-connector on an embedded board
+is typically a TTL signal at 3.3 or 5 volts.
 .Sh FILES
 .Bl -tag -width ".Pa /dev/ttyu?.init" -compact
 .It Pa /dev/ttyu?

Modified: stable/10/sys/dev/uart/uart_bus.h
==============================================================================
--- stable/10/sys/dev/uart/uart_bus.h	Sun Jan 17 18:07:32 2016	(r294228)
+++ stable/10/sys/dev/uart/uart_bus.h	Sun Jan 17 18:18:01 2016	(r294229)
@@ -112,6 +112,7 @@ struct uart_softc {
 	/* Pulse capturing support (PPS). */
 	struct pps_state sc_pps;
 	int		 sc_pps_mode;
+	sbintime_t	 sc_pps_captime;
 
 	/* Upper layer data. */
 	void		*sc_softih;

Modified: stable/10/sys/dev/uart/uart_core.c
==============================================================================
--- stable/10/sys/dev/uart/uart_core.c	Sun Jan 17 18:07:32 2016	(r294228)
+++ stable/10/sys/dev/uart/uart_core.c	Sun Jan 17 18:18:01 2016	(r294229)
@@ -48,6 +48,7 @@ __FBSDID("$FreeBSD$");
 #include <dev/uart/uart.h>
 #include <dev/uart/uart_bus.h>
 #include <dev/uart/uart_cpu.h>
+#include <dev/uart/uart_ppstypes.h>
 
 #include "uart_if.h"
 
@@ -65,47 +66,47 @@ static MALLOC_DEFINE(M_UART, "UART", "UA
 static int uart_poll_freq = UART_POLL_FREQ;
 TUNABLE_INT("debug.uart_poll_freq", &uart_poll_freq);
 
-#define	PPS_MODE_DISABLED	0
-#define	PPS_MODE_CTS		1
-#define	PPS_MODE_DCD		2
-
 static inline int
-uart_pps_signal(int pps_mode)
+uart_pps_mode_valid(int pps_mode)
 {
+	int opt;
 
-	switch(pps_mode) {
-	case PPS_MODE_CTS:
-		return (SER_CTS);
-	case PPS_MODE_DCD:
-		return (SER_DCD);
-	}
-	return (0);
+	switch(pps_mode & UART_PPS_SIGNAL_MASK) {
+	case UART_PPS_DISABLED:
+	case UART_PPS_CTS:
+	case UART_PPS_DCD:
+		break;
+	default:
+		return (false);
+	}
+
+	opt = pps_mode & UART_PPS_OPTION_MASK;
+	if ((opt & ~(UART_PPS_INVERT_PULSE | UART_PPS_NARROW_PULSE)) != 0)
+		return (false);
+
+	return (true);
 }
-static inline int
-uart_pps_mode_valid(int pps_mode)
+
+static void
+uart_pps_print_mode(struct uart_softc *sc)
 {
 
-	switch(pps_mode) {
-	case PPS_MODE_DISABLED:
-	case PPS_MODE_CTS:
-	case PPS_MODE_DCD:
-		return (true);
-	}
-	return (false);
-}
-
-static const char *
-uart_pps_mode_name(int pps_mode)
-{
-	switch(pps_mode) {
-	case PPS_MODE_DISABLED:
-		return ("disabled");
-	case PPS_MODE_CTS:
-		return ("CTS");
-	case PPS_MODE_DCD:
-		return ("DCD");
-	}
-	return ("invalid");
+	device_printf(sc->sc_dev, "PPS capture mode: ");
+	switch(sc->sc_pps_mode) {
+	case UART_PPS_DISABLED:
+		printf("disabled");
+	case UART_PPS_CTS:
+		printf("CTS");
+	case UART_PPS_DCD:
+		printf("DCD");
+	default:
+		printf("invalid");
+	}
+	if (sc->sc_pps_mode & UART_PPS_INVERT_PULSE)
+		printf("-Inverted");
+	if (sc->sc_pps_mode & UART_PPS_NARROW_PULSE)
+		printf("-NarrowPulse");
+	printf("\n");
 }
 
 static int
@@ -126,6 +127,55 @@ uart_pps_mode_sysctl(SYSCTL_HANDLER_ARGS
 }
 
 static void
+uart_pps_process(struct uart_softc *sc, int ser_sig)
+{
+	sbintime_t now;
+	int is_assert, pps_sig;
+
+	/* Which signal is configured as PPS?  Early out if none. */
+	switch(sc->sc_pps_mode & UART_PPS_SIGNAL_MASK) {
+	case UART_PPS_CTS:
+		pps_sig = SER_CTS;
+		break;
+	case UART_PPS_DCD:
+		pps_sig = SER_DCD;
+		break;
+	default:
+		return;
+	}
+
+	/* Early out if there is no change in the signal configured as PPS. */
+	if ((ser_sig & SER_DELTA(pps_sig)) == 0)
+		return;
+
+	/*
+	 * In narrow-pulse mode we need to synthesize both capture and clear
+	 * events from a single "delta occurred" indication from the uart
+	 * hardware because the pulse width is too narrow to reliably detect
+	 * both edges.  However, when the pulse width is close to our interrupt
+	 * processing latency we might intermittantly catch both edges.  To
+	 * guard against generating spurious events when that happens, we use a
+	 * separate timer to ensure at least half a second elapses before we
+	 * generate another event.
+	 */
+	pps_capture(&sc->sc_pps);
+	if (sc->sc_pps_mode & UART_PPS_NARROW_PULSE) {
+		now = getsbinuptime();
+		if (now > sc->sc_pps_captime + 500 * SBT_1MS) {
+			sc->sc_pps_captime = now;
+			pps_event(&sc->sc_pps, PPS_CAPTUREASSERT);
+			pps_event(&sc->sc_pps, PPS_CAPTURECLEAR);
+		}
+	} else  {
+		is_assert = ser_sig & pps_sig;
+		if (sc->sc_pps_mode & UART_PPS_INVERT_PULSE)
+			is_assert = !is_assert;
+		pps_event(&sc->sc_pps, is_assert ? PPS_CAPTUREASSERT :
+		    PPS_CAPTURECLEAR);
+	}
+}
+
+static void
 uart_pps_init(struct uart_softc *sc)
 {
 	struct sysctl_ctx_list *ctx;
@@ -142,23 +192,23 @@ uart_pps_init(struct uart_softc *sc)
 	 * for one specific device.
 	 */
 #ifdef UART_PPS_ON_CTS
-	sc->sc_pps_mode = PPS_MODE_CTS;
+	sc->sc_pps_mode = UART_PPS_CTS;
 #else
-	sc->sc_pps_mode = PPS_MODE_DCD;
+	sc->sc_pps_mode = UART_PPS_DCD;
 #endif
 	TUNABLE_INT_FETCH("hw.uart.pps_mode", &sc->sc_pps_mode);
 	SYSCTL_ADD_PROC(ctx, SYSCTL_CHILDREN(tree), OID_AUTO, "pps_mode",
 	    CTLTYPE_INT | CTLFLAG_RWTUN, sc, 0, uart_pps_mode_sysctl, "I",
-	    "pulse capturing mode - 0/1/2 - disabled/CTS/DCD");
+	    "pulse mode: 0/1/2=disabled/CTS/DCD; "
+	    "add 0x10 to invert, 0x20 for narrow pulse");
 
 	if (!uart_pps_mode_valid(sc->sc_pps_mode)) {
 		device_printf(sc->sc_dev, 
-		    "Invalid pps_mode %d configured; disabling PPS capture\n",
+		    "Invalid pps_mode 0x%02x configured; disabling PPS capture\n",
 		    sc->sc_pps_mode);
-		sc->sc_pps_mode = PPS_MODE_DISABLED;
+		sc->sc_pps_mode = UART_PPS_DISABLED;
 	} else if (bootverbose) {
-		device_printf(sc->sc_dev, "PPS capture mode %d (%s)\n",
-		    sc->sc_pps_mode, uart_pps_mode_name(sc->sc_pps_mode));
+		uart_pps_print_mode(sc);
 	}
 
 	sc->sc_pps.ppscap = PPS_CAPTUREBOTH;
@@ -302,23 +352,16 @@ static __inline int
 uart_intr_sigchg(void *arg)
 {
 	struct uart_softc *sc = arg;
-	int new, old, pps_sig, sig;
+	int new, old, sig;
 
 	sig = UART_GETSIG(sc);
 
 	/*
-	 * Time pulse counting support. Note that both CTS and DCD are
-	 * active-low signals. The status bit is high to indicate that
-	 * the signal on the line is low, which corresponds to a PPS
-	 * clear event.
+	 * Time pulse counting support, invoked whenever the PPS parameters are
+	 * currently set to capture either edge of the signal.
 	 */
 	if (sc->sc_pps.ppsparam.mode & PPS_CAPTUREBOTH) {
-		pps_sig = uart_pps_signal(sc->sc_pps_mode);
-		if (sig & SER_DELTA(pps_sig)) {
-			pps_capture(&sc->sc_pps);
-			pps_event(&sc->sc_pps, (sig & pps_sig) ?
-			    PPS_CAPTURECLEAR : PPS_CAPTUREASSERT);
-		}
+		uart_pps_process(sc, sig);
 	}
 
 	/*

Modified: stable/10/sys/dev/uart/uart_dev_ns8250.c
==============================================================================
--- stable/10/sys/dev/uart/uart_dev_ns8250.c	Sun Jan 17 18:07:32 2016	(r294228)
+++ stable/10/sys/dev/uart/uart_dev_ns8250.c	Sun Jan 17 18:18:01 2016	(r294229)
@@ -50,6 +50,7 @@ __FBSDID("$FreeBSD$");
 #endif
 #include <dev/uart/uart_bus.h>
 #include <dev/uart/uart_dev_ns8250.h>
+#include <dev/uart/uart_ppstypes.h>
 
 #include <dev/ic/ns16550.h>
 
@@ -390,11 +391,40 @@ static struct ofw_compat_data compat_dat
 UART_FDT_CLASS_AND_DEVICE(compat_data);
 #endif
 
-#define	SIGCHG(c, i, s, d)				\
-	if (c) {					\
-		i |= (i & s) ? s : s | d;		\
-	} else {					\
-		i = (i & s) ? (i & ~s) | d : i;		\
+/* Use token-pasting to form SER_ and MSR_ named constants. */
+#define	SER(sig)	SER_##sig
+#define	SERD(sig)	SER_D##sig
+#define	MSR(sig)	MSR_##sig
+#define	MSRD(sig)	MSR_D##sig
+
+/*
+ * Detect signal changes using software delta detection.  The previous state of
+ * the signals is in 'var' the new hardware state is in 'msr', and 'sig' is the
+ * short name (DCD, CTS, etc) of the signal bit being processed; 'var' gets the
+ * new state of both the signal and the delta bits.
+ */
+#define SIGCHGSW(var, msr, sig)					\
+	if ((msr) & MSR(sig)) {					\
+		if ((var & SER(sig)) == 0)			\
+			var |= SERD(sig) | SER(sig);		\
+	} else {						\
+		if ((var & SER(sig)) != 0)			\
+			var = SERD(sig) | (var & ~SER(sig));	\
+	}
+
+/*
+ * Detect signal changes using the hardware msr delta bits.  This is currently
+ * used only when PPS timing information is being captured using the "narrow
+ * pulse" option.  With a narrow PPS pulse the signal may not still be asserted
+ * by time the interrupt handler is invoked.  The hardware will latch the fact
+ * that it changed in the delta bits.
+ */
+#define SIGCHGHW(var, msr, sig)					\
+	if ((msr) & MSRD(sig)) {				\
+		if (((msr) & MSR(sig)) != 0)			\
+			var |= SERD(sig) | SER(sig);		\
+		else						\
+			var = SERD(sig) | (var & ~SER(sig));	\
 	}
 
 int
@@ -521,21 +551,37 @@ ns8250_bus_flush(struct uart_softc *sc, 
 int
 ns8250_bus_getsig(struct uart_softc *sc)
 {
-	uint32_t new, old, sig;
+	uint32_t old, sig;
 	uint8_t msr;
 
+	/*
+	 * The delta bits are reputed to be broken on some hardware, so use
+	 * software delta detection by default.  Use the hardware delta bits
+	 * when capturing PPS pulses which are too narrow for software detection
+	 * to see the edges.  Hardware delta for RI doesn't work like the
+	 * others, so always use software for it.  Other threads may be changing
+	 * other (non-MSR) bits in sc_hwsig, so loop until it can succesfully
+	 * update without other changes happening.  Note that the SIGCHGxx()
+	 * macros carefully preserve the delta bits when we have to loop several
+	 * times and a signal transitions between iterations.
+	 */
 	do {
 		old = sc->sc_hwsig;
 		sig = old;
 		uart_lock(sc->sc_hwmtx);
 		msr = uart_getreg(&sc->sc_bas, REG_MSR);
 		uart_unlock(sc->sc_hwmtx);
-		SIGCHG(msr & MSR_DSR, sig, SER_DSR, SER_DDSR);
-		SIGCHG(msr & MSR_CTS, sig, SER_CTS, SER_DCTS);
-		SIGCHG(msr & MSR_DCD, sig, SER_DCD, SER_DDCD);
-		SIGCHG(msr & MSR_RI,  sig, SER_RI,  SER_DRI);
-		new = sig & ~SER_MASK_DELTA;
-	} while (!atomic_cmpset_32(&sc->sc_hwsig, old, new));
+		if (sc->sc_pps_mode & UART_PPS_NARROW_PULSE) {
+			SIGCHGHW(sig, msr, DSR);
+			SIGCHGHW(sig, msr, CTS);
+			SIGCHGHW(sig, msr, DCD);
+		} else {
+			SIGCHGSW(sig, msr, DSR);
+			SIGCHGSW(sig, msr, CTS);
+			SIGCHGSW(sig, msr, DCD);
+		}
+		SIGCHGSW(sig, msr, RI);
+	} while (!atomic_cmpset_32(&sc->sc_hwsig, old, sig & ~SER_MASK_DELTA));
 	return (sig);
 }
 
@@ -889,12 +935,10 @@ ns8250_bus_setsig(struct uart_softc *sc,
 		old = sc->sc_hwsig;
 		new = old;
 		if (sig & SER_DDTR) {
-			SIGCHG(sig & SER_DTR, new, SER_DTR,
-			    SER_DDTR);
+			new = (new & ~SER_DTR) | (sig & (SER_DTR | SER_DDTR));
 		}
 		if (sig & SER_DRTS) {
-			SIGCHG(sig & SER_RTS, new, SER_RTS,
-			    SER_DRTS);
+			new = (new & ~SER_RTS) | (sig & (SER_RTS | SER_DRTS));
 		}
 	} while (!atomic_cmpset_32(&sc->sc_hwsig, old, new));
 	uart_lock(sc->sc_hwmtx);

Copied: stable/10/sys/dev/uart/uart_ppstypes.h (from r293781, head/sys/dev/uart/uart_ppstypes.h)
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ stable/10/sys/dev/uart/uart_ppstypes.h	Sun Jan 17 18:18:01 2016	(r294229, copy of r293781, head/sys/dev/uart/uart_ppstypes.h)
@@ -0,0 +1,46 @@
+/*-
+ * Copyright (c) 2015 	Ian Lepore
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+ * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * $FreeBSD$
+ */
+
+#ifndef _DEV_UART_PPSTYPES_H_
+#define _DEV_UART_PPSTYPES_H_
+
+/*
+ * These constants are shared by several drivers including uart and usb_serial.
+ */
+
+#define	UART_PPS_SIGNAL_MASK	0x0f
+#define	UART_PPS_OPTION_MASK	0xf0
+
+#define	UART_PPS_DISABLED	0x00
+#define	UART_PPS_CTS		0x01
+#define	UART_PPS_DCD		0x02
+
+#define	UART_PPS_INVERT_PULSE	0x10
+#define	UART_PPS_NARROW_PULSE	0x20
+
+#endif /* _DEV_UART_PPSTYPES_H_ */

From owner-svn-src-all@freebsd.org  Sun Jan 17 18:35:47 2016
Return-Path: <owner-svn-src-all@freebsd.org>
Delivered-To: svn-src-all@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id A9E92A851AA;
 Sun, 17 Jan 2016 18:35:47 +0000 (UTC)
 (envelope-from tuexen@FreeBSD.org)
Received: from repo.freebsd.org (repo.freebsd.org
 [IPv6:2610:1c1:1:6068::e6a:0])
 (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
 (Client did not present a certificate)
 by mx1.freebsd.org (Postfix) with ESMTPS id 76E0B11D2;
 Sun, 17 Jan 2016 18:35:47 +0000 (UTC)
 (envelope-from tuexen@FreeBSD.org)
Received: from repo.freebsd.org ([127.0.1.37])
 by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u0HIZkGb023467;
 Sun, 17 Jan 2016 18:35:46 GMT (envelope-from tuexen@FreeBSD.org)
Received: (from tuexen@localhost)
 by repo.freebsd.org (8.15.2/8.15.2/Submit) id u0HIZkxu023466;
 Sun, 17 Jan 2016 18:35:46 GMT (envelope-from tuexen@FreeBSD.org)
Message-Id: <201601171835.u0HIZkxu023466@repo.freebsd.org>
X-Authentication-Warning: repo.freebsd.org: tuexen set sender to
 tuexen@FreeBSD.org using -f
From: Michael Tuexen <tuexen@FreeBSD.org>
Date: Sun, 17 Jan 2016 18:35:46 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org
Subject: svn commit: r294230 - stable/10/usr.bin/sockstat
X-SVN-Group: stable-10
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.20
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for &quot;
 user&quot; and &quot; projects&quot; \)" <svn-src-all.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-all/>
List-Post: <mailto:svn-src-all@freebsd.org>
List-Help: <mailto:svn-src-all-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Sun, 17 Jan 2016 18:35:47 -0000

Author: tuexen
Date: Sun Jan 17 18:35:46 2016
New Revision: 294230
URL: https://svnweb.freebsd.org/changeset/base/294230

Log:
  MFC r287179:
  Remove a variable which is set but never used.

Modified:
  stable/10/usr.bin/sockstat/sockstat.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/usr.bin/sockstat/sockstat.c
==============================================================================
--- stable/10/usr.bin/sockstat/sockstat.c	Sun Jan 17 18:18:01 2016	(r294229)
+++ stable/10/usr.bin/sockstat/sockstat.c	Sun Jan 17 18:35:46 2016	(r294230)
@@ -542,9 +542,9 @@ gather_inet(int proto)
 	const char *varname, *protoname;
 	size_t len, bufsize;
 	void *buf;
-	int hash, retry, state, vflag;
+	int hash, retry, vflag;
 
-	state = vflag = 0;
+	vflag = 0;
 	if (opt_4)
 		vflag |= INP_IPV4;
 	if (opt_6)
@@ -609,7 +609,6 @@ gather_inet(int proto)
 			inp = &xtp->xt_inp;
 			so = &xtp->xt_socket;
 			protoname = xtp->xt_tp.t_flags & TF_TOE ? "toe" : "tcp";
-			state = xtp->xt_tp.t_state;
 			break;
 		case IPPROTO_UDP:
 		case IPPROTO_DIVERT:

From owner-svn-src-all@freebsd.org  Sun Jan 17 18:37:38 2016
Return-Path: <owner-svn-src-all@freebsd.org>
Delivered-To: svn-src-all@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5884DA8524B;
 Sun, 17 Jan 2016 18:37:38 +0000 (UTC)
 (envelope-from tuexen@FreeBSD.org)
Received: from repo.freebsd.org (repo.freebsd.org
 [IPv6:2610:1c1:1:6068::e6a:0])
 (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
 (Client did not present a certificate)
 by mx1.freebsd.org (Postfix) with ESMTPS id 34C351372;
 Sun, 17 Jan 2016 18:37:38 +0000 (UTC)
 (envelope-from tuexen@FreeBSD.org)
Received: from repo.freebsd.org ([127.0.1.37])
 by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u0HIbbPA023630;
 Sun, 17 Jan 2016 18:37:37 GMT (envelope-from tuexen@FreeBSD.org)
Received: (from tuexen@localhost)
 by repo.freebsd.org (8.15.2/8.15.2/Submit) id u0HIbbAD023628;
 Sun, 17 Jan 2016 18:37:37 GMT (envelope-from tuexen@FreeBSD.org)
Message-Id: <201601171837.u0HIbbAD023628@repo.freebsd.org>
X-Authentication-Warning: repo.freebsd.org: tuexen set sender to
 tuexen@FreeBSD.org using -f
From: Michael Tuexen <tuexen@FreeBSD.org>
Date: Sun, 17 Jan 2016 18:37:37 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org
Subject: svn commit: r294231 - stable/10/usr.bin/sockstat
X-SVN-Group: stable-10
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.20
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for &quot;
 user&quot; and &quot; projects&quot; \)" <svn-src-all.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-all/>
List-Post: <mailto:svn-src-all@freebsd.org>
List-Help: <mailto:svn-src-all-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Sun, 17 Jan 2016 18:37:38 -0000

Author: tuexen
Date: Sun Jan 17 18:37:36 2016
New Revision: 294231
URL: https://svnweb.freebsd.org/changeset/base/294231

Log:
  MFC r287182:
  Add SCTP support.

Modified:
  stable/10/usr.bin/sockstat/sockstat.1
  stable/10/usr.bin/sockstat/sockstat.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/usr.bin/sockstat/sockstat.1
==============================================================================
--- stable/10/usr.bin/sockstat/sockstat.1	Sun Jan 17 18:35:46 2016	(r294230)
+++ stable/10/usr.bin/sockstat/sockstat.1	Sun Jan 17 18:37:36 2016	(r294231)
@@ -27,7 +27,7 @@
 .\"
 .\" $FreeBSD$
 .\"
-.Dd July 14, 2015
+.Dd August 27, 2015
 .Dt SOCKSTAT 1
 .Os
 .Sh NAME
@@ -85,7 +85,7 @@ as they are defined in
 .Xr protocols 5 .
 .It Fl s
 Display the protocol state, if applicable.
-This is currently only implemented for TCP.
+This is currently only implemented for SCTP and TCP.
 .It Fl u
 Show
 .Dv AF_LOCAL

Modified: stable/10/usr.bin/sockstat/sockstat.c
==============================================================================
--- stable/10/usr.bin/sockstat/sockstat.c	Sun Jan 17 18:35:46 2016	(r294230)
+++ stable/10/usr.bin/sockstat/sockstat.c	Sun Jan 17 18:37:36 2016	(r294231)
@@ -332,6 +332,12 @@ gather_sctp(void)
 		sock->socket = xinpcb->socket;
 		sock->proto = IPPROTO_SCTP;
 		sock->protoname = "sctp";
+		if (xinpcb->flags & SCTP_PCB_FLAGS_UNBOUND)
+			sock->state = SCTP_CLOSED;
+		else if (xinpcb->maxqlen == 0)
+			sock->state = SCTP_BOUND;
+		else
+			sock->state = SCTP_LISTEN;
 		if (xinpcb->flags & SCTP_PCB_FLAGS_BOUND_V6) {
 			sock->family = AF_INET6;
 			sock->vflag = INP_IPV6;
@@ -421,6 +427,7 @@ gather_sctp(void)
 				sock->socket = xinpcb->socket;
 				sock->proto = IPPROTO_SCTP;
 				sock->protoname = "sctp";
+				sock->state = (int)xstcb->state;
 				if (xinpcb->flags & SCTP_PCB_FLAGS_BOUND_V6) {
 					sock->family = AF_INET6;
 					sock->vflag = INP_IPV6;
@@ -906,6 +913,46 @@ check_ports(struct sock *s)
 	return (0);
 }
 
+static const char *
+sctp_state(int state)
+{
+	switch (state) {
+	case SCTP_CLOSED:
+		return "CLOSED";
+		break;
+	case SCTP_BOUND:
+		return "BOUND";
+		break;
+	case SCTP_LISTEN:
+		return "LISTEN";
+		break;
+	case SCTP_COOKIE_WAIT:
+		return "COOKIE_WAIT";
+		break;
+	case SCTP_COOKIE_ECHOED:
+		return "COOKIE_ECHOED";
+		break;
+	case SCTP_ESTABLISHED:
+		return "ESTABLISHED";
+		break;
+	case SCTP_SHUTDOWN_SENT:
+		return "SHUTDOWN_SENT";
+		break;
+	case SCTP_SHUTDOWN_RECEIVED:
+		return "SHUTDOWN_RECEIVED";
+		break;
+	case SCTP_SHUTDOWN_ACK_SENT:
+		return "SHUTDOWN_ACK_SENT";
+		break;
+	case SCTP_SHUTDOWN_PENDING:
+		return "SHUTDOWN_PENDING";
+		break;
+	default:
+		return "UNKNOWN";
+		break;
+	}
+}
+
 static void
 displaysock(struct sock *s, int pos)
 {
@@ -975,13 +1022,22 @@ displaysock(struct sock *s, int pos)
 		default:
 			abort();
 		}
-		if (first && opt_s && s->proto == IPPROTO_TCP) {
+		if (first && opt_s &&
+		    (s->proto == IPPROTO_SCTP || s->proto == IPPROTO_TCP)) {
 			while (pos < 80)
 				pos += xprintf(" ");
-			if (s->state >= 0 && s->state < TCP_NSTATES)
-				pos += xprintf("%s", tcpstates[s->state]);
-			else
-				pos += xprintf("?");
+			switch (s->proto) {
+			case IPPROTO_SCTP:
+				pos += xprintf("%s", sctp_state(s->state));
+				break;
+			case IPPROTO_TCP:
+				if (s->state >= 0 && s->state < TCP_NSTATES)
+					pos +=
+					    xprintf("%s", tcpstates[s->state]);
+				else
+					pos += xprintf("?");
+				break;
+			}
 		}
 		if (laddr != NULL)
 			laddr = laddr->next;

From owner-svn-src-all@freebsd.org  Sun Jan 17 18:39:02 2016
Return-Path: <owner-svn-src-all@freebsd.org>
Delivered-To: svn-src-all@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id 71E6BA8530A;
 Sun, 17 Jan 2016 18:39:02 +0000 (UTC)
 (envelope-from tuexen@FreeBSD.org)
Received: from repo.freebsd.org (repo.freebsd.org
 [IPv6:2610:1c1:1:6068::e6a:0])
 (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
 (Client did not present a certificate)
 by mx1.freebsd.org (Postfix) with ESMTPS id 451AA152A;
 Sun, 17 Jan 2016 18:39:02 +0000 (UTC)
 (envelope-from tuexen@FreeBSD.org)
Received: from repo.freebsd.org ([127.0.1.37])
 by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u0HId1G9023767;
 Sun, 17 Jan 2016 18:39:01 GMT (envelope-from tuexen@FreeBSD.org)
Received: (from tuexen@localhost)
 by repo.freebsd.org (8.15.2/8.15.2/Submit) id u0HId1nB023766;
 Sun, 17 Jan 2016 18:39:01 GMT (envelope-from tuexen@FreeBSD.org)
Message-Id: <201601171839.u0HId1nB023766@repo.freebsd.org>
X-Authentication-Warning: repo.freebsd.org: tuexen set sender to
 tuexen@FreeBSD.org using -f
From: Michael Tuexen <tuexen@FreeBSD.org>
Date: Sun, 17 Jan 2016 18:39:01 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org
Subject: svn commit: r294232 - stable/10/usr.bin/sockstat
X-SVN-Group: stable-10
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.20
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for &quot;
 user&quot; and &quot; projects&quot; \)" <svn-src-all.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-all/>
List-Post: <mailto:svn-src-all@freebsd.org>
List-Help: <mailto:svn-src-all-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Sun, 17 Jan 2016 18:39:02 -0000

Author: tuexen
Date: Sun Jan 17 18:39:01 2016
New Revision: 294232
URL: https://svnweb.freebsd.org/changeset/base/294232

Log:
  MFC r287281:
  Report CLOSED as state for bound sockets for consistency with
  netstat and the way TCP is handled.

Modified:
  stable/10/usr.bin/sockstat/sockstat.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/usr.bin/sockstat/sockstat.c
==============================================================================
--- stable/10/usr.bin/sockstat/sockstat.c	Sun Jan 17 18:37:36 2016	(r294231)
+++ stable/10/usr.bin/sockstat/sockstat.c	Sun Jan 17 18:39:01 2016	(r294232)
@@ -332,10 +332,8 @@ gather_sctp(void)
 		sock->socket = xinpcb->socket;
 		sock->proto = IPPROTO_SCTP;
 		sock->protoname = "sctp";
-		if (xinpcb->flags & SCTP_PCB_FLAGS_UNBOUND)
+		if (xinpcb->maxqlen == 0)
 			sock->state = SCTP_CLOSED;
-		else if (xinpcb->maxqlen == 0)
-			sock->state = SCTP_BOUND;
 		else
 			sock->state = SCTP_LISTEN;
 		if (xinpcb->flags & SCTP_PCB_FLAGS_BOUND_V6) {

From owner-svn-src-all@freebsd.org  Sun Jan 17 19:28:15 2016
Return-Path: <owner-svn-src-all@freebsd.org>
Delivered-To: svn-src-all@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4B8EBA86331;
 Sun, 17 Jan 2016 19:28:15 +0000 (UTC)
 (envelope-from dchagin@FreeBSD.org)
Received: from repo.freebsd.org (repo.freebsd.org
 [IPv6:2610:1c1:1:6068::e6a:0])
 (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
 (Client did not present a certificate)
 by mx1.freebsd.org (Postfix) with ESMTPS id 192B31B13;
 Sun, 17 Jan 2016 19:28:15 +0000 (UTC)
 (envelope-from dchagin@FreeBSD.org)
Received: from repo.freebsd.org ([127.0.1.37])
 by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u0HJSDTO040340;
 Sun, 17 Jan 2016 19:28:13 GMT (envelope-from dchagin@FreeBSD.org)
Received: (from dchagin@localhost)
 by repo.freebsd.org (8.15.2/8.15.2/Submit) id u0HJSDCl040339;
 Sun, 17 Jan 2016 19:28:13 GMT (envelope-from dchagin@FreeBSD.org)
Message-Id: <201601171928.u0HJSDCl040339@repo.freebsd.org>
X-Authentication-Warning: repo.freebsd.org: dchagin set sender to
 dchagin@FreeBSD.org using -f
From: Dmitry Chagin <dchagin@FreeBSD.org>
Date: Sun, 17 Jan 2016 19:28:13 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-head@freebsd.org
Subject: svn commit: r294233 - head/sys/compat/linux
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.20
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for &quot;
 user&quot; and &quot; projects&quot; \)" <svn-src-all.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-all/>
List-Post: <mailto:svn-src-all@freebsd.org>
List-Help: <mailto:svn-src-all-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Sun, 17 Jan 2016 19:28:15 -0000

Author: dchagin
Date: Sun Jan 17 19:28:13 2016
New Revision: 294233
URL: https://svnweb.freebsd.org/changeset/base/294233

Log:
  Prevent double free of control in common sendmsg path as sosend
  already freeing it.

Modified:
  head/sys/compat/linux/linux_socket.c

Modified: head/sys/compat/linux/linux_socket.c
==============================================================================
--- head/sys/compat/linux/linux_socket.c	Sun Jan 17 18:39:01 2016	(r294232)
+++ head/sys/compat/linux/linux_socket.c	Sun Jan 17 19:28:13 2016	(r294233)
@@ -1164,6 +1164,7 @@ linux_sendmsg_common(struct thread *td, 
 	msg.msg_iov = iov;
 	msg.msg_flags = 0;
 	error = linux_sendit(td, s, &msg, flags, control, UIO_USERSPACE);
+	control = NULL;
 
 bad:
 	m_freem(control);

From owner-svn-src-all@freebsd.org  Sun Jan 17 21:14:28 2016
Return-Path: <owner-svn-src-all@freebsd.org>
Delivered-To: svn-src-all@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id 86DF8A8566C;
 Sun, 17 Jan 2016 21:14:28 +0000 (UTC)
 (envelope-from jilles@FreeBSD.org)
Received: from repo.freebsd.org (repo.freebsd.org
 [IPv6:2610:1c1:1:6068::e6a:0])
 (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
 (Client did not present a certificate)
 by mx1.freebsd.org (Postfix) with ESMTPS id 5926C1D2B;
 Sun, 17 Jan 2016 21:14:28 +0000 (UTC)
 (envelope-from jilles@FreeBSD.org)
Received: from repo.freebsd.org ([127.0.1.37])
 by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u0HLERfc075026;
 Sun, 17 Jan 2016 21:14:27 GMT (envelope-from jilles@FreeBSD.org)
Received: (from jilles@localhost)
 by repo.freebsd.org (8.15.2/8.15.2/Submit) id u0HLERk6075025;
 Sun, 17 Jan 2016 21:14:27 GMT (envelope-from jilles@FreeBSD.org)
Message-Id: <201601172114.u0HLERk6075025@repo.freebsd.org>
X-Authentication-Warning: repo.freebsd.org: jilles set sender to
 jilles@FreeBSD.org using -f
From: Jilles Tjoelker <jilles@FreeBSD.org>
Date: Sun, 17 Jan 2016 21:14:27 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-head@freebsd.org
Subject: svn commit: r294234 - head/lib/libc/sys
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.20
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for &quot;
 user&quot; and &quot; projects&quot; \)" <svn-src-all.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-all/>
List-Post: <mailto:svn-src-all@freebsd.org>
List-Help: <mailto:svn-src-all-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Sun, 17 Jan 2016 21:14:28 -0000

Author: jilles
Date: Sun Jan 17 21:14:27 2016
New Revision: 294234
URL: https://svnweb.freebsd.org/changeset/base/294234

Log:
  utimensat(2): Correct description of [EINVAL] error.
  
  MFC after:	4 days

Modified:
  head/lib/libc/sys/utimensat.2

Modified: head/lib/libc/sys/utimensat.2
==============================================================================
--- head/lib/libc/sys/utimensat.2	Sun Jan 17 19:28:13 2016	(r294233)
+++ head/lib/libc/sys/utimensat.2	Sun Jan 17 21:14:27 2016	(r294234)
@@ -31,7 +31,7 @@
 .\"     @(#)utimes.2	8.1 (Berkeley) 6/4/93
 .\" $FreeBSD$
 .\"
-.Dd January 12, 2016
+.Dd January 17, 2016
 .Dt UTIMENSAT 2
 .Os
 .Sh NAME
@@ -183,10 +183,13 @@ argument
 points outside the process's allocated address space.
 .It Bq Er EINVAL
 The
-.Va tv_usec
+.Va tv_nsec
 component of at least one of the values specified by the
 .Fa times
-argument has a value less than 0 or greater than 999999.
+argument has a value less than 0 or greater than 999999999 and is not equal to
+.Dv UTIME_NOW
+or
+.Dv UTIME_OMIT .
 .It Bq Er EIO
 An I/O error occurred while reading or writing the affected inode.
 .It Bq Er EPERM

From owner-svn-src-all@freebsd.org  Sun Jan 17 21:19:47 2016
Return-Path: <owner-svn-src-all@freebsd.org>
Delivered-To: svn-src-all@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id 48CD4A857F9;
 Sun, 17 Jan 2016 21:19:47 +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 208DA1F7F;
 Sun, 17 Jan 2016 21:19:47 +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 u0HLJkgO075570;
 Sun, 17 Jan 2016 21:19:46 GMT (envelope-from ian@FreeBSD.org)
Received: (from ian@localhost)
 by repo.freebsd.org (8.15.2/8.15.2/Submit) id u0HLJkc2075569;
 Sun, 17 Jan 2016 21:19:46 GMT (envelope-from ian@FreeBSD.org)
Message-Id: <201601172119.u0HLJkc2075569@repo.freebsd.org>
X-Authentication-Warning: repo.freebsd.org: ian set sender to ian@FreeBSD.org
 using -f
From: Ian Lepore <ian@FreeBSD.org>
Date: Sun, 17 Jan 2016 21:19:46 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-head@freebsd.org
Subject: svn commit: r294235 - head/sys/dev/usb/serial
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.20
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for &quot;
 user&quot; and &quot; projects&quot; \)" <svn-src-all.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-all/>
List-Post: <mailto:svn-src-all@freebsd.org>
List-Help: <mailto:svn-src-all-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Sun, 17 Jan 2016 21:19:47 -0000

Author: ian
Date: Sun Jan 17 21:19:45 2016
New Revision: 294235
URL: https://svnweb.freebsd.org/changeset/base/294235

Log:
  Make PPS ASSERT/CLEAR events match the RS-232 signal levels as per RFC 2783.
  Previously the polarity was for TTL levels, which are the reverse of RS-232.
  
  Also add handling of the UART_PPS_INVERT_PULSE option bit in the sysctl
  value, the same as was recently added to uart(4), so that people using TTL
  level connections can request a logical inverting of the signal.
  
  Use the named constants from the new dev/uart/uart_ppstypes.h for the pps
  capture modes and option bits.

Modified:
  head/sys/dev/usb/serial/usb_serial.c

Modified: head/sys/dev/usb/serial/usb_serial.c
==============================================================================
--- head/sys/dev/usb/serial/usb_serial.c	Sun Jan 17 21:14:27 2016	(r294234)
+++ head/sys/dev/usb/serial/usb_serial.c	Sun Jan 17 21:19:45 2016	(r294235)
@@ -81,6 +81,8 @@ __FBSDID("$FreeBSD$");
 #include <sys/cons.h>
 #include <sys/kdb.h>
 
+#include <dev/uart/uart_ppstypes.h>
+
 #include <dev/usb/usb.h>
 #include <dev/usb/usbdi.h>
 #include <dev/usb/usbdi_util.h>
@@ -99,7 +101,8 @@ static SYSCTL_NODE(_hw_usb, OID_AUTO, uc
 static int ucom_pps_mode;
 
 SYSCTL_INT(_hw_usb_ucom, OID_AUTO, pps_mode, CTLFLAG_RWTUN,
-    &ucom_pps_mode, 0, "pulse capturing mode - 0/1/2 - disabled/CTS/DCD");
+    &ucom_pps_mode, 0, 
+    "pulse capture mode: 0/1/2=disabled/CTS/DCD; add 0x10 to invert");
 
 #ifdef USB_DEBUG
 static int ucom_debug = 0;
@@ -1071,10 +1074,12 @@ ucom_cfg_status_change(struct usb_proc_m
 	    (struct ucom_cfg_task *)_task;
 	struct ucom_softc *sc = task->sc;
 	struct tty *tp;
+	int onoff;
 	uint8_t new_msr;
 	uint8_t new_lsr;
 	uint8_t msr_delta;
 	uint8_t lsr_delta;
+	uint8_t pps_signal;
 
 	tp = sc->sc_tty;
 
@@ -1104,35 +1109,33 @@ ucom_cfg_status_change(struct usb_proc_m
 	sc->sc_lsr = new_lsr;
 
 	/*
-	 * Time pulse counting support. Note that both CTS and DCD are
-	 * active-low signals. The status bit is high to indicate that
-	 * the signal on the line is low, which corresponds to a PPS
-	 * clear event.
+	 * Time pulse counting support.
 	 */
-	switch(ucom_pps_mode) {
-	case 1:
-		if ((sc->sc_pps.ppsparam.mode & PPS_CAPTUREBOTH) &&
-		    (msr_delta & SER_CTS)) {
-			pps_capture(&sc->sc_pps);
-			pps_event(&sc->sc_pps, (sc->sc_msr & SER_CTS) ?
-			    PPS_CAPTURECLEAR : PPS_CAPTUREASSERT);
-		}
+	switch(ucom_pps_mode & UART_PPS_SIGNAL_MASK) {
+	case UART_PPS_CTS:
+		pps_signal = SER_CTS;
 		break;
-	case 2:
-		if ((sc->sc_pps.ppsparam.mode & PPS_CAPTUREBOTH) &&
-		    (msr_delta & SER_DCD)) {
-			pps_capture(&sc->sc_pps);
-			pps_event(&sc->sc_pps, (sc->sc_msr & SER_DCD) ?
-			    PPS_CAPTURECLEAR : PPS_CAPTUREASSERT);
-		}
+	case UART_PPS_DCD:
+		pps_signal = SER_DCD;
 		break;
 	default:
+		pps_signal = 0;
 		break;
 	}
 
+	if ((sc->sc_pps.ppsparam.mode & PPS_CAPTUREBOTH) &&
+	    (msr_delta & pps_signal)) {
+		pps_capture(&sc->sc_pps);
+		onoff = (sc->sc_msr & pps_signal) ? 1 : 0;
+		if (ucom_pps_mode & UART_PPS_INVERT_PULSE)
+			onoff = !onoff;
+		pps_event(&sc->sc_pps, onoff ? PPS_CAPTUREASSERT :
+		    PPS_CAPTURECLEAR);
+	}
+
 	if (msr_delta & SER_DCD) {
 
-		int onoff = (sc->sc_msr & SER_DCD) ? 1 : 0;
+		onoff = (sc->sc_msr & SER_DCD) ? 1 : 0;
 
 		DPRINTF("DCD changed to %d\n", onoff);
 

From owner-svn-src-all@freebsd.org  Sun Jan 17 23:03:23 2016
Return-Path: <owner-svn-src-all@freebsd.org>
Delivered-To: svn-src-all@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6465EA86A3C;
 Sun, 17 Jan 2016 23:03:23 +0000 (UTC)
 (envelope-from jhibbits@FreeBSD.org)
Received: from repo.freebsd.org (repo.freebsd.org
 [IPv6:2610:1c1:1:6068::e6a:0])
 (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
 (Client did not present a certificate)
 by mx1.freebsd.org (Postfix) with ESMTPS id 313421950;
 Sun, 17 Jan 2016 23:03:23 +0000 (UTC)
 (envelope-from jhibbits@FreeBSD.org)
Received: from repo.freebsd.org ([127.0.1.37])
 by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u0HN3Mjv008634;
 Sun, 17 Jan 2016 23:03:22 GMT (envelope-from jhibbits@FreeBSD.org)
Received: (from jhibbits@localhost)
 by repo.freebsd.org (8.15.2/8.15.2/Submit) id u0HN3M5P008633;
 Sun, 17 Jan 2016 23:03:22 GMT (envelope-from jhibbits@FreeBSD.org)
Message-Id: <201601172303.u0HN3M5P008633@repo.freebsd.org>
X-Authentication-Warning: repo.freebsd.org: jhibbits set sender to
 jhibbits@FreeBSD.org using -f
From: Justin Hibbits <jhibbits@FreeBSD.org>
Date: Sun, 17 Jan 2016 23:03:22 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-head@freebsd.org
Subject: svn commit: r294237 - head/sys/arm/freescale/imx
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.20
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for &quot;
 user&quot; and &quot; projects&quot; \)" <svn-src-all.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-all/>
List-Post: <mailto:svn-src-all@freebsd.org>
List-Help: <mailto:svn-src-all-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Sun, 17 Jan 2016 23:03:23 -0000

Author: jhibbits
Date: Sun Jan 17 23:03:21 2016
New Revision: 294237
URL: https://svnweb.freebsd.org/changeset/base/294237

Log:
  Quick exit after setting the clock control register.
  
  Discussed with:	ian

Modified:
  head/sys/arm/freescale/imx/imx_sdhci.c

Modified: head/sys/arm/freescale/imx/imx_sdhci.c
==============================================================================
--- head/sys/arm/freescale/imx/imx_sdhci.c	Sun Jan 17 22:05:48 2016	(r294236)
+++ head/sys/arm/freescale/imx/imx_sdhci.c	Sun Jan 17 23:03:21 2016	(r294237)
@@ -429,6 +429,7 @@ imx_sdhci_write_2(device_t dev, struct s
 		} else {
 			imx_sdhc_set_clock(sc, false);
 		}
+		return;
 	}
 
 	/*

From owner-svn-src-all@freebsd.org  Sun Jan 17 23:15:21 2016
Return-Path: <owner-svn-src-all@freebsd.org>
Delivered-To: svn-src-all@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id 37957A86DC1;
 Sun, 17 Jan 2016 23:15:21 +0000 (UTC) (envelope-from bz@FreeBSD.org)
Received: from mx1.sbone.de (mx1.sbone.de [IPv6:2a01:4f8:130:3ffc::401:25])
 (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits))
 (Client CN "mx1.sbone.de", Issuer "SBone.DE" (not verified))
 by mx1.freebsd.org (Postfix) with ESMTPS id BE3C21F8F;
 Sun, 17 Jan 2016 23:15:20 +0000 (UTC) (envelope-from bz@FreeBSD.org)
Received: from mail.sbone.de (mail.sbone.de [IPv6:fde9:577b:c1a9:31::2013:587])
 (using TLSv1 with cipher ADH-CAMELLIA256-SHA (256/256 bits))
 (No client certificate requested)
 by mx1.sbone.de (Postfix) with ESMTPS id E2B5025D385E;
 Sun, 17 Jan 2016 23:15:17 +0000 (UTC)
Received: from content-filter.sbone.de (content-filter.sbone.de
 [IPv6:fde9:577b:c1a9:31::2013:2742])
 (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits))
 (No client certificate requested)
 by mail.sbone.de (Postfix) with ESMTPS id 4C2E0C77007;
 Sun, 17 Jan 2016 23:15:16 +0000 (UTC)
X-Virus-Scanned: amavisd-new at sbone.de
Received: from mail.sbone.de ([IPv6:fde9:577b:c1a9:31::2013:587])
 by content-filter.sbone.de (content-filter.sbone.de
 [fde9:577b:c1a9:31::2013:2742]) (amavisd-new, port 10024)
 with ESMTP id 3aKzGnwO7QOr; Sun, 17 Jan 2016 23:15:13 +0000 (UTC)
Received: from [IPv6:fde9:577b:c1a9:4410:ddad:8f72:be17:1ea8] (unknown
 [IPv6:fde9:577b:c1a9:4410:ddad:8f72:be17:1ea8])
 (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits))
 (No client certificate requested)
 by mail.sbone.de (Postfix) with ESMTPSA id 15E3BC76FEE;
 Sun, 17 Jan 2016 23:15:12 +0000 (UTC)
Content-Type: text/plain; charset=utf-8
Mime-Version: 1.0 (Mac OS X Mail 8.2 \(2104\))
Subject: Re: svn commit: r294227 - in head/lib: libc libc/gen libc/riscv
 libc/riscv/gen libc/riscv/sys libc/xdr libstand
From: "Bjoern A. Zeeb" <bz@FreeBSD.org>
In-Reply-To: <201601171521.u0HFLNvD063018@repo.freebsd.org>
Date: Sun, 17 Jan 2016 23:14:53 +0000
Cc: src-committers <src-committers@freebsd.org>, svn-src-all@freebsd.org,
 svn-src-head@freebsd.org
Content-Transfer-Encoding: quoted-printable
Message-Id: <7A25B4D8-FA1C-47D7-889B-A17B4A3A52DC@FreeBSD.org>
References: <201601171521.u0HFLNvD063018@repo.freebsd.org>
To: Ruslan Bukin <br@FreeBSD.org>,
 Ed Maste <emaste@freebsd.org>
X-Mailer: Apple Mail (2.2104)
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.20
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for &quot;
 user&quot; and &quot; projects&quot; \)" <svn-src-all.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-all/>
List-Post: <mailto:svn-src-all@freebsd.org>
List-Help: <mailto:svn-src-all-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Sun, 17 Jan 2016 23:15:21 -0000


> On 17 Jan 2016, at 15:21 , Ruslan Bukin <br@FreeBSD.org> wrote:
>=20
> Author: br
> Date: Sun Jan 17 15:21:23 2016
> New Revision: 294227
> URL: https://svnweb.freebsd.org/changeset/base/294227
>=20
> Log:
>  Bring in initial libc and libstand support for RISC-V.
>=20
>  Reviewed by:	andrew, emaste, kib
>  Sponsored by:	DARPA, AFRL
>  Sponsored by:	HEIF5
>  Differential Revision:	https://reviews.freebsd.org/D4943
>=20
> Modified:
>  head/lib/libc/Makefile


I think this broke MIPS;  I see lots of the following with a couple of =
libraries:

=3D=3D=3D> lib/msun (all)
=3D=3D=3D> lib/msun/tests (all)
/storage/head/obj//mips.mips64/scratch/tmp/bz/head.svn/tmp/usr/bin/ld: =
BFD 2.17.50 [FreeBSD] 2007-07-03 assertion fail =
/scratch/tmp/bz/head.svn/gnu/usr.bin/binutils/libbfd/../../../../contrib/b=

inutils/bfd/elf-strtab.c:196
t_acos.o: In function `atfu_acos_is_plus_zero_body':
/scratch/tmp/bz/head.svn/contrib/netbsd-tests/lib/libm/t_acos.c:94: =
undefined reference to `__extendsfdf2'
/scratch/tmp/bz/head.svn/contrib/netbsd-tests/lib/libm/t_acos.c:94: =
undefined reference to `__extendsfdf2'
t_acos.o: In function `atfu_acos_inrange_body':
/scratch/tmp/bz/head.svn/contrib/netbsd-tests/lib/libm/t_acos.c:86: =
undefined reference to `__subdf3'
/scratch/tmp/bz/head.svn/contrib/netbsd-tests/lib/libm/t_acos.c:86: =
undefined reference to `__subdf3'
/scratch/tmp/bz/head.svn/contrib/netbsd-tests/lib/libm/t_acos.c:87: =
undefined reference to `__truncdfsf2'
/scratch/tmp/bz/head.svn/contrib/netbsd-tests/lib/libm/t_acos.c:87: =
undefined reference to `__truncdfsf2'
/scratch/tmp/bz/head.svn/contrib/netbsd-tests/lib/libm/t_acos.c:87: =
undefined reference to `__extendsfdf2'
/scratch/tmp/bz/head.svn/contrib/netbsd-tests/lib/libm/t_acos.c:87: =
undefined reference to `__extendsfdf2'
/scratch/tmp/bz/head.svn/contrib/netbsd-tests/lib/libm/t_acos.c:87: =
undefined reference to `__subdf3'
/scratch/tmp/bz/head.svn/contrib/netbsd-tests/lib/libm/t_acos.c:87: =
undefined reference to `__subdf3'
t_acos.o: In function `atfu_acos_is_nan_body':
/scratch/tmp/bz/head.svn/contrib/netbsd-tests/lib/libm/t_acos.c:58: =
undefined reference to `__truncdfsf2'
/scratch/tmp/bz/head.svn/contrib/netbsd-tests/lib/libm/t_acos.c:58: =
undefined reference to `__truncdfsf2'
/scratch/tmp/bz/head.svn/contrib/netbsd-tests/lib/libm/t_acos.c:58: =
undefined reference to `__extendsfdf2'
/scratch/tmp/bz/head.svn/contrib/netbsd-tests/lib/libm/t_acos.c:58: =
undefined reference to `__extendsfdf2'
=
/storage/head/obj//mips.mips64/scratch/tmp/bz/head.svn/tmp/usr/lib/libm.so=
: undefined reference to `__muldf3'
=
/storage/head/obj//mips.mips64/scratch/tmp/bz/head.svn/tmp/usr/lib/libm.so=
: undefined reference to `__floatsidf'
=
/storage/head/obj//mips.mips64/scratch/tmp/bz/head.svn/tmp/usr/lib/libm.so=
: undefined reference to `__divsf3'
=
/storage/head/obj//mips.mips64/scratch/tmp/bz/head.svn/tmp/usr/lib/libm.so=
: undefined reference to `__subsf3'
=
/storage/head/obj//mips.mips64/scratch/tmp/bz/head.svn/tmp/usr/lib/libm.so=
: undefined reference to `__floatsisf'
=
/storage/head/obj//mips.mips64/scratch/tmp/bz/head.svn/tmp/usr/lib/libm.so=
: undefined reference to `__addsf3'
=
/storage/head/obj//mips.mips64/scratch/tmp/bz/head.svn/tmp/usr/lib/libm.so=
: undefined reference to `__fixdfsi'
=
/storage/head/obj//mips.mips64/scratch/tmp/bz/head.svn/tmp/usr/lib/libm.so=
: undefined reference to `__adddf3'
=
/storage/head/obj//mips.mips64/scratch/tmp/bz/head.svn/tmp/usr/lib/libm.so=
: undefined reference to `__divdf3'
=
/storage/head/obj//mips.mips64/scratch/tmp/bz/head.svn/tmp/usr/lib/libm.so=
: undefined reference to `__fixsfsi'
=
/storage/head/obj//mips.mips64/scratch/tmp/bz/head.svn/tmp/usr/lib/libm.so=
: undefined reference to `__mulsf3'
/storage/head/obj//mips.mips64/scratch/tmp/bz/head.svn/tmp/usr/bin/ld: =
BFD 2.17.50 [FreeBSD] 2007-07-03 assertion fail =
/scratch/tmp/bz/head.svn/gnu/usr.bin/binutils/libbfd/../../../../contrib/b=

inutils/bfd/elf-strtab.c:243
--- acos_test.full ---
*** [acos_test.full] Error code 1

bmake: stopped in /scratch/tmp/bz/head.svn/lib/msun/tests
--- acos_test ---
*** [acos_test] Error code 1

bmake: stopped in /scratch/tmp/bz/head.svn/lib/msun/tests


> Modified: head/lib/libc/Makefile
> =
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=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/lib/libc/Makefile	Sun Jan 17 14:35:37 2016	=
(r294226)
> +++ head/lib/libc/Makefile	Sun Jan 17 15:21:23 2016	=
(r294227)
> @@ -83,6 +83,7 @@ NOASM=3D
> .if ${LIBC_ARCH} !=3D "aarch64" && \
>     ${LIBC_ARCH} !=3D "amd64" && \
>     ${LIBC_ARCH} !=3D "powerpc64" && \
> +    ${LIBC_ARCH} !=3D "riscv" && \
>     ${LIBC_ARCH} !=3D "sparc64" && \
>     ${MACHINE_ARCH:Mmipsn32*} =3D=3D "" && \
>     ${MACHINE_ARCH:Mmips64*} =3D=3D ""
> @@ -101,7 +102,7 @@ NOASM=3D
> .include "${LIBC_SRCTOP}/uuid/Makefile.inc"
> .include "${LIBC_SRCTOP}/xdr/Makefile.inc"
> .if (${LIBC_ARCH} =3D=3D "arm" && ${MACHINE_ARCH} !=3D "armv6hf") ||\
> -     ${LIBC_ARCH} =3D=3D "mips"
> +     ${LIBC_ARCH} =3D=3D "mips" && ${LIBC_ARCH} =3D=3D "riscv"
> .include "${LIBC_SRCTOP}/softfloat/Makefile.inc"
> .endif
> .if ${MK_NIS} !=3D =E2=80=9Cno"

Is this supposed to be a && ?




=E2=80=94=20
Bjoern A. Zeeb                                  Charles Haddon Spurgeon:
"Friendship is one of the sweetest joys of life.  Many might have failed
 beneath the bitterness of their trial  had they not found a friend."


From owner-svn-src-all@freebsd.org  Mon Jan 18 00:07:05 2016
Return-Path: <owner-svn-src-all@freebsd.org>
Delivered-To: svn-src-all@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id E6793A86DBD;
 Mon, 18 Jan 2016 00:07:05 +0000 (UTC)
 (envelope-from andrew@FreeBSD.org)
Received: from repo.freebsd.org (repo.freebsd.org
 [IPv6:2610:1c1:1:6068::e6a:0])
 (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
 (Client did not present a certificate)
 by mx1.freebsd.org (Postfix) with ESMTPS id B7AF1139A;
 Mon, 18 Jan 2016 00:07:05 +0000 (UTC)
 (envelope-from andrew@FreeBSD.org)
Received: from repo.freebsd.org ([127.0.1.37])
 by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u0I074Or026052;
 Mon, 18 Jan 2016 00:07:04 GMT (envelope-from andrew@FreeBSD.org)
Received: (from andrew@localhost)
 by repo.freebsd.org (8.15.2/8.15.2/Submit) id u0I074dX026051;
 Mon, 18 Jan 2016 00:07:04 GMT (envelope-from andrew@FreeBSD.org)
Message-Id: <201601180007.u0I074dX026051@repo.freebsd.org>
X-Authentication-Warning: repo.freebsd.org: andrew set sender to
 andrew@FreeBSD.org using -f
From: Andrew Turner <andrew@FreeBSD.org>
Date: Mon, 18 Jan 2016 00:07:04 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-head@freebsd.org
Subject: svn commit: r294238 - head/sys/arm/arm
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.20
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for &quot;
 user&quot; and &quot; projects&quot; \)" <svn-src-all.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-all/>
List-Post: <mailto:svn-src-all@freebsd.org>
List-Help: <mailto:svn-src-all-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Mon, 18 Jan 2016 00:07:06 -0000

Author: andrew
Date: Mon Jan 18 00:07:04 2016
New Revision: 294238
URL: https://svnweb.freebsd.org/changeset/base/294238

Log:
  Add extra checks to make sure the size is valid. We may get an integer
  underflow when we have small blocks of memory at the start and end of the
  32-bit address range.
  
  While here, only insert mappings pointing at a non-zero amount of memory.
  
  Sponsored by:	ABT Systems Ltd

Modified:
  head/sys/arm/arm/physmem.c

Modified: head/sys/arm/arm/physmem.c
==============================================================================
--- head/sys/arm/arm/physmem.c	Sun Jan 17 23:03:21 2016	(r294237)
+++ head/sys/arm/arm/physmem.c	Mon Jan 18 00:07:04 2016	(r294238)
@@ -292,9 +292,13 @@ arm_physmem_hardware_region(vm_paddr_t p
 	 * than leave some folks with an unusable system while we investigate.
 	 */
 	if (pa == 0) {
+		if (sz <= PAGE_SIZE)
+			return;
 		pa  = PAGE_SIZE;
 		sz -= PAGE_SIZE;
 	} else if (pa + sz == 0) {
+		if (sz <= 1024 * 1024)
+			return;
 		sz -= 1024 * 1024;
 	}
 
@@ -306,7 +310,7 @@ arm_physmem_hardware_region(vm_paddr_t p
 	pa  = round_page(pa);
 	sz  = trunc_page(sz - adj);
 
-	if (hwcnt < nitems(hwregions))
+	if (sz > 0 && hwcnt < nitems(hwregions))
 		insert_region(hwregions, hwcnt++, pa, sz, 0);
 }
 

From owner-svn-src-all@freebsd.org  Mon Jan 18 03:47:47 2016
Return-Path: <owner-svn-src-all@freebsd.org>
Delivered-To: svn-src-all@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id DE4F6A86611;
 Mon, 18 Jan 2016 03:47:47 +0000 (UTC)
 (envelope-from ngie@FreeBSD.org)
Received: from repo.freebsd.org (repo.freebsd.org
 [IPv6:2610:1c1:1:6068::e6a:0])
 (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
 (Client did not present a certificate)
 by mx1.freebsd.org (Postfix) with ESMTPS id ADBFD1B39;
 Mon, 18 Jan 2016 03:47:47 +0000 (UTC)
 (envelope-from ngie@FreeBSD.org)
Received: from repo.freebsd.org ([127.0.1.37])
 by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u0I3lkX8093809;
 Mon, 18 Jan 2016 03:47:46 GMT (envelope-from ngie@FreeBSD.org)
Received: (from ngie@localhost)
 by repo.freebsd.org (8.15.2/8.15.2/Submit) id u0I3lksD093808;
 Mon, 18 Jan 2016 03:47:46 GMT (envelope-from ngie@FreeBSD.org)
Message-Id: <201601180347.u0I3lksD093808@repo.freebsd.org>
X-Authentication-Warning: repo.freebsd.org: ngie set sender to
 ngie@FreeBSD.org using -f
From: Garrett Cooper <ngie@FreeBSD.org>
Date: Mon, 18 Jan 2016 03:47:46 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org
Subject: svn commit: r294239 - stable/10/lib/libc/rpc
X-SVN-Group: stable-10
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.20
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for &quot;
 user&quot; and &quot; projects&quot; \)" <svn-src-all.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-all/>
List-Post: <mailto:svn-src-all@freebsd.org>
List-Help: <mailto:svn-src-all-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Mon, 18 Jan 2016 03:47:48 -0000

Author: ngie
Date: Mon Jan 18 03:47:46 2016
New Revision: 294239
URL: https://svnweb.freebsd.org/changeset/base/294239

Log:
  MFC r293704:
  
  Fix theoretical leak of netconfig(3) resources in svcunix_create(..)
  
  In the event that the getconfig(3) call in svcunix_create is partly successful,
  some of the netconfig(3) resources allocated might be leaked if the call returns
  NULL as endnetconfig(3) wasn't called explicitly in that case. Ensure that the
  resources are fully cleaned up by going to the `done` label, which will call
  endnetconfig(3) for us.
  
  Submitted by: Miles Ohlrich <miles.ohlrich@isilon.com>

Modified:
  stable/10/lib/libc/rpc/rpc_soc.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/lib/libc/rpc/rpc_soc.c
==============================================================================
--- stable/10/lib/libc/rpc/rpc_soc.c	Mon Jan 18 00:07:04 2016	(r294238)
+++ stable/10/lib/libc/rpc/rpc_soc.c	Mon Jan 18 03:47:46 2016	(r294239)
@@ -525,7 +525,7 @@ svcunix_create(sock, sendsize, recvsize,
 			break;
 	}
 	if (nconf == NULL)
-		return(xprt);
+		goto done;
 
 	if ((sock = __rpc_nconf2fd(nconf)) < 0)
 		goto done;

From owner-svn-src-all@freebsd.org  Mon Jan 18 03:49:58 2016
Return-Path: <owner-svn-src-all@freebsd.org>
Delivered-To: svn-src-all@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id B7D9DA866EB;
 Mon, 18 Jan 2016 03:49:58 +0000 (UTC)
 (envelope-from ngie@FreeBSD.org)
Received: from repo.freebsd.org (repo.freebsd.org
 [IPv6:2610:1c1:1:6068::e6a:0])
 (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
 (Client did not present a certificate)
 by mx1.freebsd.org (Postfix) with ESMTPS id 895801CDF;
 Mon, 18 Jan 2016 03:49:58 +0000 (UTC)
 (envelope-from ngie@FreeBSD.org)
Received: from repo.freebsd.org ([127.0.1.37])
 by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u0I3nvB1093961;
 Mon, 18 Jan 2016 03:49:57 GMT (envelope-from ngie@FreeBSD.org)
Received: (from ngie@localhost)
 by repo.freebsd.org (8.15.2/8.15.2/Submit) id u0I3nvbF093960;
 Mon, 18 Jan 2016 03:49:57 GMT (envelope-from ngie@FreeBSD.org)
Message-Id: <201601180349.u0I3nvbF093960@repo.freebsd.org>
X-Authentication-Warning: repo.freebsd.org: ngie set sender to
 ngie@FreeBSD.org using -f
From: Garrett Cooper <ngie@FreeBSD.org>
Date: Mon, 18 Jan 2016 03:49:57 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org
Subject: svn commit: r294240 - stable/10/lib/libc/rpc
X-SVN-Group: stable-10
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.20
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for &quot;
 user&quot; and &quot; projects&quot; \)" <svn-src-all.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-all/>
List-Post: <mailto:svn-src-all@freebsd.org>
List-Help: <mailto:svn-src-all-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Mon, 18 Jan 2016 03:49:58 -0000

Author: ngie
Date: Mon Jan 18 03:49:57 2016
New Revision: 294240
URL: https://svnweb.freebsd.org/changeset/base/294240

Log:
  MFC r293705:
  
  Similar to r293704, fix theoretical leak of netconfig(3) resources in
  __rpcbind_is_up(..) if getnetconfig(3) is partly successful in allocating
  resources, but not completely successful by moving the endnetconfig(3) call
  up before we return from the function if nconf == NULL.
  
  Submitted by: Miles Ohlrich <miles.ohlrich@isilon.com>

Modified:
  stable/10/lib/libc/rpc/rpcb_clnt.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/lib/libc/rpc/rpcb_clnt.c
==============================================================================
--- stable/10/lib/libc/rpc/rpcb_clnt.c	Mon Jan 18 03:47:46 2016	(r294239)
+++ stable/10/lib/libc/rpc/rpcb_clnt.c	Mon Jan 18 03:49:57 2016	(r294240)
@@ -675,11 +675,11 @@ __rpcbind_is_up()
 		    strcmp(nconf->nc_protofmly, NC_LOOPBACK) == 0)
 			 break;
 	}
+	endnetconfig(localhandle);
+
 	if (nconf == NULL)
 		return (FALSE);
 
-	endnetconfig(localhandle);
-
 	memset(&sun, 0, sizeof sun);
 	sock = _socket(AF_LOCAL, SOCK_STREAM, 0);
 	if (sock < 0)

From owner-svn-src-all@freebsd.org  Mon Jan 18 03:51:39 2016
Return-Path: <owner-svn-src-all@freebsd.org>
Delivered-To: svn-src-all@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id D686AA86863;
 Mon, 18 Jan 2016 03:51:39 +0000 (UTC)
 (envelope-from ngie@FreeBSD.org)
Received: from repo.freebsd.org (repo.freebsd.org
 [IPv6:2610:1c1:1:6068::e6a:0])
 (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
 (Client did not present a certificate)
 by mx1.freebsd.org (Postfix) with ESMTPS id A3B9E1EEB;
 Mon, 18 Jan 2016 03:51:39 +0000 (UTC)
 (envelope-from ngie@FreeBSD.org)
Received: from repo.freebsd.org ([127.0.1.37])
 by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u0I3pciP096619;
 Mon, 18 Jan 2016 03:51:38 GMT (envelope-from ngie@FreeBSD.org)
Received: (from ngie@localhost)
 by repo.freebsd.org (8.15.2/8.15.2/Submit) id u0I3pcKn096618;
 Mon, 18 Jan 2016 03:51:38 GMT (envelope-from ngie@FreeBSD.org)
Message-Id: <201601180351.u0I3pcKn096618@repo.freebsd.org>
X-Authentication-Warning: repo.freebsd.org: ngie set sender to
 ngie@FreeBSD.org using -f
From: Garrett Cooper <ngie@FreeBSD.org>
Date: Mon, 18 Jan 2016 03:51:38 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org
Subject: svn commit: r294241 - stable/9/lib/libc/rpc
X-SVN-Group: stable-9
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.20
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for &quot;
 user&quot; and &quot; projects&quot; \)" <svn-src-all.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-all/>
List-Post: <mailto:svn-src-all@freebsd.org>
List-Help: <mailto:svn-src-all-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Mon, 18 Jan 2016 03:51:39 -0000

Author: ngie
Date: Mon Jan 18 03:51:38 2016
New Revision: 294241
URL: https://svnweb.freebsd.org/changeset/base/294241

Log:
  MFstable/10 r294239:
  
  MFC r293704:
  
  Fix theoretical leak of netconfig(3) resources in svcunix_create(..)
  
  In the event that the getconfig(3) call in svcunix_create is partly successful,
  some of the netconfig(3) resources allocated might be leaked if the call returns
  NULL as endnetconfig(3) wasn't called explicitly in that case. Ensure that the
  resources are fully cleaned up by going to the `done` label, which will call
  endnetconfig(3) for us.
  
  Submitted by: Miles Ohlrich <miles.ohlrich@isilon.com>

Modified:
  stable/9/lib/libc/rpc/rpc_soc.c
Directory Properties:
  stable/9/   (props changed)
  stable/9/lib/   (props changed)
  stable/9/lib/libc/   (props changed)

Modified: stable/9/lib/libc/rpc/rpc_soc.c
==============================================================================
--- stable/9/lib/libc/rpc/rpc_soc.c	Mon Jan 18 03:49:57 2016	(r294240)
+++ stable/9/lib/libc/rpc/rpc_soc.c	Mon Jan 18 03:51:38 2016	(r294241)
@@ -525,7 +525,7 @@ svcunix_create(sock, sendsize, recvsize,
 			break;
 	}
 	if (nconf == NULL)
-		return(xprt);
+		goto done;
 
 	if ((sock = __rpc_nconf2fd(nconf)) < 0)
 		goto done;

From owner-svn-src-all@freebsd.org  Mon Jan 18 03:52:45 2016
Return-Path: <owner-svn-src-all@freebsd.org>
Delivered-To: svn-src-all@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7B75EA868E9;
 Mon, 18 Jan 2016 03:52:45 +0000 (UTC)
 (envelope-from ngie@FreeBSD.org)
Received: from repo.freebsd.org (repo.freebsd.org
 [IPv6:2610:1c1:1:6068::e6a:0])
 (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
 (Client did not present a certificate)
 by mx1.freebsd.org (Postfix) with ESMTPS id 48D4711BF;
 Mon, 18 Jan 2016 03:52:45 +0000 (UTC)
 (envelope-from ngie@FreeBSD.org)
Received: from repo.freebsd.org ([127.0.1.37])
 by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u0I3qisZ096717;
 Mon, 18 Jan 2016 03:52:44 GMT (envelope-from ngie@FreeBSD.org)
Received: (from ngie@localhost)
 by repo.freebsd.org (8.15.2/8.15.2/Submit) id u0I3qieW096716;
 Mon, 18 Jan 2016 03:52:44 GMT (envelope-from ngie@FreeBSD.org)
Message-Id: <201601180352.u0I3qieW096716@repo.freebsd.org>
X-Authentication-Warning: repo.freebsd.org: ngie set sender to
 ngie@FreeBSD.org using -f
From: Garrett Cooper <ngie@FreeBSD.org>
Date: Mon, 18 Jan 2016 03:52:44 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org
Subject: svn commit: r294242 - stable/9/lib/libc/rpc
X-SVN-Group: stable-9
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.20
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for &quot;
 user&quot; and &quot; projects&quot; \)" <svn-src-all.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-all/>
List-Post: <mailto:svn-src-all@freebsd.org>
List-Help: <mailto:svn-src-all-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Mon, 18 Jan 2016 03:52:45 -0000

Author: ngie
Date: Mon Jan 18 03:52:44 2016
New Revision: 294242
URL: https://svnweb.freebsd.org/changeset/base/294242

Log:
  MFstable/10 r294240:
  
  MFC r293705:
  
  Similar to r293704, fix theoretical leak of netconfig(3) resources in
  __rpcbind_is_up(..) if getnetconfig(3) is partly successful in allocating
  resources, but not completely successful by moving the endnetconfig(3) call
  up before we return from the function if nconf == NULL.
  
  Submitted by: Miles Ohlrich <miles.ohlrich@isilon.com>

Modified:
  stable/9/lib/libc/rpc/rpcb_clnt.c
Directory Properties:
  stable/9/   (props changed)
  stable/9/lib/   (props changed)
  stable/9/lib/libc/   (props changed)

Modified: stable/9/lib/libc/rpc/rpcb_clnt.c
==============================================================================
--- stable/9/lib/libc/rpc/rpcb_clnt.c	Mon Jan 18 03:51:38 2016	(r294241)
+++ stable/9/lib/libc/rpc/rpcb_clnt.c	Mon Jan 18 03:52:44 2016	(r294242)
@@ -675,11 +675,11 @@ __rpcbind_is_up()
 		    strcmp(nconf->nc_protofmly, NC_LOOPBACK) == 0)
 			 break;
 	}
+	endnetconfig(localhandle);
+
 	if (nconf == NULL)
 		return (FALSE);
 
-	endnetconfig(localhandle);
-
 	memset(&sun, 0, sizeof sun);
 	sock = _socket(AF_LOCAL, SOCK_STREAM, 0);
 	if (sock < 0)

From owner-svn-src-all@freebsd.org  Mon Jan 18 03:55:41 2016
Return-Path: <owner-svn-src-all@freebsd.org>
Delivered-To: svn-src-all@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9984AA86A06;
 Mon, 18 Jan 2016 03:55:41 +0000 (UTC)
 (envelope-from ngie@FreeBSD.org)
Received: from repo.freebsd.org (repo.freebsd.org
 [IPv6:2610:1c1:1:6068::e6a:0])
 (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
 (Client did not present a certificate)
 by mx1.freebsd.org (Postfix) with ESMTPS id 63E9713DF;
 Mon, 18 Jan 2016 03:55:41 +0000 (UTC)
 (envelope-from ngie@FreeBSD.org)
Received: from repo.freebsd.org ([127.0.1.37])
 by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u0I3teA8096896;
 Mon, 18 Jan 2016 03:55:40 GMT (envelope-from ngie@FreeBSD.org)
Received: (from ngie@localhost)
 by repo.freebsd.org (8.15.2/8.15.2/Submit) id u0I3teA2096891;
 Mon, 18 Jan 2016 03:55:40 GMT (envelope-from ngie@FreeBSD.org)
Message-Id: <201601180355.u0I3teA2096891@repo.freebsd.org>
X-Authentication-Warning: repo.freebsd.org: ngie set sender to
 ngie@FreeBSD.org using -f
From: Garrett Cooper <ngie@FreeBSD.org>
Date: Mon, 18 Jan 2016 03:55:40 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org
Subject: svn commit: r294243 - stable/10/lib/msun/tests
X-SVN-Group: stable-10
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.20
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for &quot;
 user&quot; and &quot; projects&quot; \)" <svn-src-all.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-all/>
List-Post: <mailto:svn-src-all@freebsd.org>
List-Help: <mailto:svn-src-all-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Mon, 18 Jan 2016 03:55:41 -0000

Author: ngie
Date: Mon Jan 18 03:55:40 2016
New Revision: 294243
URL: https://svnweb.freebsd.org/changeset/base/294243

Log:
  MFC r292497:
  
  Integrate the remaining tools/regression/lib/msun testcases into the
  FreeBSD test suite under lib/msun/tests

Added:
  stable/10/lib/msun/tests/ctrig_test.c
     - copied unchanged from r292497, head/lib/msun/tests/ctrig_test.c
  stable/10/lib/msun/tests/exponential_test.c
     - copied unchanged from r292497, head/lib/msun/tests/exponential_test.c
  stable/10/lib/msun/tests/fma_test.c
     - copied unchanged from r292497, head/lib/msun/tests/fma_test.c
  stable/10/lib/msun/tests/invtrig_test.c
     - copied unchanged from r292497, head/lib/msun/tests/invtrig_test.c
  stable/10/lib/msun/tests/lround_test.c
     - copied unchanged from r292497, head/lib/msun/tests/lround_test.c
  stable/10/lib/msun/tests/lround_test.t
     - copied unchanged from r292497, head/lib/msun/tests/lround_test.t
  stable/10/lib/msun/tests/test-utils.h
     - copied unchanged from r292497, head/lib/msun/tests/test-utils.h
Modified:
  stable/10/lib/msun/tests/Makefile
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/lib/msun/tests/Makefile
==============================================================================
--- stable/10/lib/msun/tests/Makefile	Mon Jan 18 03:52:44 2016	(r294242)
+++ stable/10/lib/msun/tests/Makefile	Mon Jan 18 03:55:40 2016	(r294243)
@@ -39,12 +39,19 @@ NETBSD_ATF_TESTS_C+=	tanh_test
 TAP_TESTS_C+=	cexp_test
 TAP_TESTS_C+=	conj_test
 TAP_TESTS_C+=	csqrt_test
+TAP_TESTS_C+=	ctrig_test
+TAP_TESTS_C+=	exponential_test
 TAP_TESTS_C+=	fenv_test
+TAP_TESTS_C+=	fma_test
 TAP_TESTS_C+=	fmaxmin_test
 TAP_TESTS_C+=	ilogb_test
+TAP_TESTS_C+=	invtrig_test
 TAP_TESTS_C+=	invctrig_test
 TAP_TESTS_C+=	logarithm_test
 TAP_TESTS_C+=	lrint_test
+# XXX: the testcase crashes on all platforms, but only on head
+# (bug 205451)
+#TAP_TESTS_C+=	lround_test
 TAP_TESTS_C+=	nan_test
 TAP_TESTS_C+=	nearbyint_test
 TAP_TESTS_C+=	next_test
@@ -53,7 +60,6 @@ TAP_TESTS_C+=	trig_test
 
 .for t in ${TAP_TESTS_C}
 CFLAGS.$t+=	-O0
-CFLAGS.$t+=	-I${SRCTOP}/tools/regression/lib/msun
 .endfor
 
 CSTD=		c99

Copied: stable/10/lib/msun/tests/ctrig_test.c (from r292497, head/lib/msun/tests/ctrig_test.c)
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ stable/10/lib/msun/tests/ctrig_test.c	Mon Jan 18 03:55:40 2016	(r294243, copy of r292497, head/lib/msun/tests/ctrig_test.c)
@@ -0,0 +1,482 @@
+/*-
+ * Copyright (c) 2008-2011 David Schultz <das@FreeBSD.org>
+ * 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.
+ */
+
+/*
+ * Tests for csin[h](), ccos[h](), and ctan[h]().
+ */
+
+#include <sys/cdefs.h>
+__FBSDID("$FreeBSD$");
+
+#include <assert.h>
+#include <complex.h>
+#include <fenv.h>
+#include <float.h>
+#include <math.h>
+#include <stdio.h>
+
+#include "test-utils.h"
+
+#pragma STDC FENV_ACCESS	ON
+#pragma	STDC CX_LIMITED_RANGE	OFF
+
+/*
+ * Test that a function returns the correct value and sets the
+ * exception flags correctly. The exceptmask specifies which
+ * exceptions we should check. We need to be lenient for several
+ * reasons, but mainly because on some architectures it's impossible
+ * to raise FE_OVERFLOW without raising FE_INEXACT.
+ *
+ * These are macros instead of functions so that assert provides more
+ * meaningful error messages.
+ *
+ * XXX The volatile here is to avoid gcc's bogus constant folding and work
+ *     around the lack of support for the FENV_ACCESS pragma.
+ */
+#define	test_p(func, z, result, exceptmask, excepts, checksign)	do {	\
+	volatile long double complex _d = z;				\
+	debug("  testing %s(%Lg + %Lg I) == %Lg + %Lg I\n", #func,	\
+	    creall(_d), cimagl(_d), creall(result), cimagl(result));	\
+	assert(feclearexcept(FE_ALL_EXCEPT) == 0);			\
+	assert(cfpequal_cs((func)(_d), (result), (checksign)));		\
+	assert(((void)(func), fetestexcept(exceptmask) == (excepts)));	\
+} while (0)
+
+/*
+ * Test within a given tolerance.  The tolerance indicates relative error
+ * in ulps.  If result is 0, however, it measures absolute error in units
+ * of <format>_EPSILON.
+ */
+#define	test_p_tol(func, z, result, tol)			do {	\
+	volatile long double complex _d = z;				\
+	debug("  testing %s(%Lg + %Lg I) ~= %Lg + %Lg I\n", #func,	\
+	    creall(_d), cimagl(_d), creall(result), cimagl(result));	\
+	assert(cfpequal_tol((func)(_d), (result), (tol), FPE_ABS_ZERO)); \
+} while (0)
+
+/* These wrappers apply the identities f(conj(z)) = conj(f(z)). */
+#define	test(func, z, result, exceptmask, excepts, checksign)	do {	\
+	test_p(func, z, result, exceptmask, excepts, checksign);	\
+	test_p(func, conjl(z), conjl(result), exceptmask, excepts, checksign); \
+} while (0)
+#define	test_tol(func, z, result, tol)				do {	\
+	test_p_tol(func, z, result, tol);				\
+	test_p_tol(func, conjl(z), conjl(result), tol);			\
+} while (0)
+#define	test_odd_tol(func, z, result, tol)			do {	\
+	test_tol(func, z, result, tol);					\
+	test_tol(func, -(z), -(result), tol);				\
+} while (0)
+#define	test_even_tol(func, z, result, tol)			do {	\
+	test_tol(func, z, result, tol);					\
+	test_tol(func, -(z), result, tol);				\
+} while (0)
+
+/* Test the given function in all precisions. */
+#define	testall(func, x, result, exceptmask, excepts, checksign) do {	\
+	test(func, x, result, exceptmask, excepts, checksign);		\
+	test(func##f, x, result, exceptmask, excepts, checksign);	\
+} while (0)
+#define	testall_odd(func, x, result, exceptmask, excepts, checksign) do { \
+	testall(func, x, result, exceptmask, excepts, checksign);	\
+	testall(func, -x, -result, exceptmask, excepts, checksign);	\
+} while (0)
+#define	testall_even(func, x, result, exceptmask, excepts, checksign) do { \
+	testall(func, x, result, exceptmask, excepts, checksign);	\
+	testall(func, -x, result, exceptmask, excepts, checksign);	\
+} while (0)
+
+/*
+ * Test the given function in all precisions, within a given tolerance.
+ * The tolerance is specified in ulps.
+ */
+#define	testall_tol(func, x, result, tol)	       		   do { \
+	test_tol(func, x, result, tol * DBL_ULP());			\
+	test_tol(func##f, x, result, tol * FLT_ULP());			\
+} while (0)
+#define	testall_odd_tol(func, x, result, tol)	       		   do { \
+	test_odd_tol(func, x, result, tol * DBL_ULP());			\
+	test_odd_tol(func##f, x, result, tol * FLT_ULP());		\
+} while (0)
+#define	testall_even_tol(func, x, result, tol)	       		   do { \
+	test_even_tol(func, x, result, tol * DBL_ULP());		\
+	test_even_tol(func##f, x, result, tol * FLT_ULP());		\
+} while (0)
+
+
+/* Tests for 0 */
+void
+test_zero(void)
+{
+	long double complex zero = CMPLXL(0.0, 0.0);
+
+	/* csinh(0) = ctanh(0) = 0; ccosh(0) = 1 (no exceptions raised) */
+	testall_odd(csinh, zero, zero, ALL_STD_EXCEPT, 0, CS_BOTH);
+	testall_odd(csin, zero, zero, ALL_STD_EXCEPT, 0, CS_BOTH);
+	testall_even(ccosh, zero, 1.0, ALL_STD_EXCEPT, 0, CS_BOTH);
+	testall_even(ccos, zero, CMPLXL(1.0, -0.0), ALL_STD_EXCEPT, 0, CS_BOTH);
+	testall_odd(ctanh, zero, zero, ALL_STD_EXCEPT, 0, CS_BOTH);
+	testall_odd(ctan, zero, zero, ALL_STD_EXCEPT, 0, CS_BOTH);
+}
+
+/*
+ * Tests for NaN inputs.
+ */
+void
+test_nan()
+{
+	long double complex nan_nan = CMPLXL(NAN, NAN);
+	long double complex z;
+
+	/*
+	 * IN		CSINH		CCOSH		CTANH
+	 * NaN,NaN	NaN,NaN		NaN,NaN		NaN,NaN
+	 * finite,NaN	NaN,NaN [inval]	NaN,NaN [inval]	NaN,NaN [inval]
+	 * NaN,finite	NaN,NaN [inval]	NaN,NaN [inval]	NaN,NaN [inval]
+	 * NaN,Inf	NaN,NaN [inval]	NaN,NaN	[inval]	NaN,NaN [inval]
+	 * Inf,NaN	+-Inf,NaN	Inf,NaN		1,+-0
+	 * 0,NaN	+-0,NaN		NaN,+-0		NaN,NaN	[inval]
+	 * NaN,0	NaN,0		NaN,+-0		NaN,0
+	 */
+	z = nan_nan;
+	testall_odd(csinh, z, nan_nan, ALL_STD_EXCEPT, 0, 0);
+	testall_even(ccosh, z, nan_nan, ALL_STD_EXCEPT, 0, 0);
+	testall_odd(ctanh, z, nan_nan, ALL_STD_EXCEPT, 0, 0);
+	testall_odd(csin, z, nan_nan, ALL_STD_EXCEPT, 0, 0);
+	testall_even(ccos, z, nan_nan, ALL_STD_EXCEPT, 0, 0);
+	testall_odd(ctan, z, nan_nan, ALL_STD_EXCEPT, 0, 0);
+
+	z = CMPLXL(42, NAN);
+	testall_odd(csinh, z, nan_nan, OPT_INVALID, 0, 0);
+	testall_even(ccosh, z, nan_nan, OPT_INVALID, 0, 0);
+	/* XXX We allow a spurious inexact exception here. */
+	testall_odd(ctanh, z, nan_nan, OPT_INVALID & ~FE_INEXACT, 0, 0);
+	testall_odd(csin, z, nan_nan, OPT_INVALID, 0, 0);
+	testall_even(ccos, z, nan_nan, OPT_INVALID, 0, 0);
+	testall_odd(ctan, z, nan_nan, OPT_INVALID, 0, 0);
+
+	z = CMPLXL(NAN, 42);
+	testall_odd(csinh, z, nan_nan, OPT_INVALID, 0, 0);
+	testall_even(ccosh, z, nan_nan, OPT_INVALID, 0, 0);
+	testall_odd(ctanh, z, nan_nan, OPT_INVALID, 0, 0);
+	testall_odd(csin, z, nan_nan, OPT_INVALID, 0, 0);
+	testall_even(ccos, z, nan_nan, OPT_INVALID, 0, 0);
+	/* XXX We allow a spurious inexact exception here. */
+	testall_odd(ctan, z, nan_nan, OPT_INVALID & ~FE_INEXACT, 0, 0);
+
+	z = CMPLXL(NAN, INFINITY);
+	testall_odd(csinh, z, nan_nan, OPT_INVALID, 0, 0);
+	testall_even(ccosh, z, nan_nan, OPT_INVALID, 0, 0);
+	testall_odd(ctanh, z, nan_nan, OPT_INVALID, 0, 0);
+	testall_odd(csin, z, CMPLXL(NAN, INFINITY), ALL_STD_EXCEPT, 0, 0);
+	testall_even(ccos, z, CMPLXL(INFINITY, NAN), ALL_STD_EXCEPT, 0,
+	    CS_IMAG);
+	testall_odd(ctan, z, CMPLXL(0, 1), ALL_STD_EXCEPT, 0, CS_IMAG);
+
+	z = CMPLXL(INFINITY, NAN);
+	testall_odd(csinh, z, CMPLXL(INFINITY, NAN), ALL_STD_EXCEPT, 0, 0);
+	testall_even(ccosh, z, CMPLXL(INFINITY, NAN), ALL_STD_EXCEPT, 0,
+		     CS_REAL);
+	testall_odd(ctanh, z, CMPLXL(1, 0), ALL_STD_EXCEPT, 0, CS_REAL);
+	testall_odd(csin, z, nan_nan, OPT_INVALID, 0, 0);
+	testall_even(ccos, z, nan_nan, OPT_INVALID, 0, 0);
+	testall_odd(ctan, z, nan_nan, OPT_INVALID, 0, 0);
+
+	z = CMPLXL(0, NAN);
+	testall_odd(csinh, z, CMPLXL(0, NAN), ALL_STD_EXCEPT, 0, 0);
+	testall_even(ccosh, z, CMPLXL(NAN, 0), ALL_STD_EXCEPT, 0, 0);
+	testall_odd(ctanh, z, nan_nan, OPT_INVALID, 0, 0);
+	testall_odd(csin, z, CMPLXL(0, NAN), ALL_STD_EXCEPT, 0, CS_REAL);
+	testall_even(ccos, z, CMPLXL(NAN, 0), ALL_STD_EXCEPT, 0, 0);
+	testall_odd(ctan, z, CMPLXL(0, NAN), ALL_STD_EXCEPT, 0, CS_REAL);
+
+	z = CMPLXL(NAN, 0);
+	testall_odd(csinh, z, CMPLXL(NAN, 0), ALL_STD_EXCEPT, 0, CS_IMAG);
+	testall_even(ccosh, z, CMPLXL(NAN, 0), ALL_STD_EXCEPT, 0, 0);
+	testall_odd(ctanh, z, CMPLXL(NAN, 0), ALL_STD_EXCEPT, 0, CS_IMAG);
+	testall_odd(csin, z, CMPLXL(NAN, 0), ALL_STD_EXCEPT, 0, 0);
+	testall_even(ccos, z, CMPLXL(NAN, 0), ALL_STD_EXCEPT, 0, 0);
+	testall_odd(ctan, z, nan_nan, OPT_INVALID, 0, 0);
+}
+
+void
+test_inf(void)
+{
+	static const long double finites[] = {
+	    0, M_PI / 4, 3 * M_PI / 4, 5 * M_PI / 4,
+	};
+	long double complex z, c, s;
+	int i;
+
+	/*
+	 * IN		CSINH		CCOSH		CTANH
+	 * Inf,Inf	+-Inf,NaN inval	+-Inf,NaN inval	1,+-0
+	 * Inf,finite	Inf cis(finite)	Inf cis(finite)	1,0 sin(2 finite)
+	 * 0,Inf	+-0,NaN	inval	NaN,+-0 inval	NaN,NaN	inval
+	 * finite,Inf	NaN,NaN inval	NaN,NaN inval	NaN,NaN inval
+	 */
+	z = CMPLXL(INFINITY, INFINITY);
+	testall_odd(csinh, z, CMPLXL(INFINITY, NAN),
+		    ALL_STD_EXCEPT, FE_INVALID, 0);
+	testall_even(ccosh, z, CMPLXL(INFINITY, NAN),
+		     ALL_STD_EXCEPT, FE_INVALID, 0);
+	testall_odd(ctanh, z, CMPLXL(1, 0), ALL_STD_EXCEPT, 0, CS_REAL);
+	testall_odd(csin, z, CMPLXL(NAN, INFINITY),
+		    ALL_STD_EXCEPT, FE_INVALID, 0);
+	testall_even(ccos, z, CMPLXL(INFINITY, NAN),
+		     ALL_STD_EXCEPT, FE_INVALID, 0);
+	testall_odd(ctan, z, CMPLXL(0, 1), ALL_STD_EXCEPT, 0, CS_REAL);
+
+	/* XXX We allow spurious inexact exceptions here (hard to avoid). */
+	for (i = 0; i < sizeof(finites) / sizeof(finites[0]); i++) {
+		z = CMPLXL(INFINITY, finites[i]);
+		c = INFINITY * cosl(finites[i]);
+		s = finites[i] == 0 ? finites[i] : INFINITY * sinl(finites[i]);
+		testall_odd(csinh, z, CMPLXL(c, s), OPT_INEXACT, 0, CS_BOTH);
+		testall_even(ccosh, z, CMPLXL(c, s), OPT_INEXACT, 0, CS_BOTH);
+		testall_odd(ctanh, z, CMPLXL(1, 0 * sin(finites[i] * 2)),
+			    OPT_INEXACT, 0, CS_BOTH);
+		z = CMPLXL(finites[i], INFINITY);
+		testall_odd(csin, z, CMPLXL(s, c), OPT_INEXACT, 0, CS_BOTH);
+		testall_even(ccos, z, CMPLXL(c, -s), OPT_INEXACT, 0, CS_BOTH);
+		testall_odd(ctan, z, CMPLXL(0 * sin(finites[i] * 2), 1),
+			    OPT_INEXACT, 0, CS_BOTH);
+	}
+
+	z = CMPLXL(0, INFINITY);
+	testall_odd(csinh, z, CMPLXL(0, NAN), ALL_STD_EXCEPT, FE_INVALID, 0);
+	testall_even(ccosh, z, CMPLXL(NAN, 0), ALL_STD_EXCEPT, FE_INVALID, 0);
+	testall_odd(ctanh, z, CMPLXL(NAN, NAN), ALL_STD_EXCEPT, FE_INVALID, 0);
+	z = CMPLXL(INFINITY, 0);
+	testall_odd(csin, z, CMPLXL(NAN, 0), ALL_STD_EXCEPT, FE_INVALID, 0);
+	testall_even(ccos, z, CMPLXL(NAN, 0), ALL_STD_EXCEPT, FE_INVALID, 0);
+	testall_odd(ctan, z, CMPLXL(NAN, NAN), ALL_STD_EXCEPT, FE_INVALID, 0);
+
+	z = CMPLXL(42, INFINITY);
+	testall_odd(csinh, z, CMPLXL(NAN, NAN), ALL_STD_EXCEPT, FE_INVALID, 0);
+	testall_even(ccosh, z, CMPLXL(NAN, NAN), ALL_STD_EXCEPT, FE_INVALID, 0);
+	/* XXX We allow a spurious inexact exception here. */
+	testall_odd(ctanh, z, CMPLXL(NAN, NAN), OPT_INEXACT, FE_INVALID, 0);
+	z = CMPLXL(INFINITY, 42);
+	testall_odd(csin, z, CMPLXL(NAN, NAN), ALL_STD_EXCEPT, FE_INVALID, 0);
+	testall_even(ccos, z, CMPLXL(NAN, NAN), ALL_STD_EXCEPT, FE_INVALID, 0);
+	/* XXX We allow a spurious inexact exception here. */
+	testall_odd(ctan, z, CMPLXL(NAN, NAN), OPT_INEXACT, FE_INVALID, 0);
+}
+
+/* Tests along the real and imaginary axes. */
+void
+test_axes(void)
+{
+	static const long double nums[] = {
+	    M_PI / 4, M_PI / 2, 3 * M_PI / 4,
+	    5 * M_PI / 4, 3 * M_PI / 2, 7 * M_PI / 4,
+	};
+	long double complex z;
+	int i;
+
+	for (i = 0; i < sizeof(nums) / sizeof(nums[0]); i++) {
+		/* Real axis */
+		z = CMPLXL(nums[i], 0.0);
+		test_odd_tol(csinh, z, CMPLXL(sinh(nums[i]), 0), DBL_ULP());
+		test_even_tol(ccosh, z, CMPLXL(cosh(nums[i]), 0), DBL_ULP());
+		test_odd_tol(ctanh, z, CMPLXL(tanh(nums[i]), 0), DBL_ULP());
+		test_odd_tol(csin, z, CMPLXL(sin(nums[i]),
+		    copysign(0, cos(nums[i]))), DBL_ULP());
+		test_even_tol(ccos, z, CMPLXL(cos(nums[i]),
+		    -copysign(0, sin(nums[i]))), DBL_ULP());
+		test_odd_tol(ctan, z, CMPLXL(tan(nums[i]), 0), DBL_ULP());
+
+		test_odd_tol(csinhf, z, CMPLXL(sinhf(nums[i]), 0), FLT_ULP());
+		test_even_tol(ccoshf, z, CMPLXL(coshf(nums[i]), 0), FLT_ULP());
+		printf("%a %a\n", creal(z), cimag(z));
+		printf("%a %a\n", creal(ctanhf(z)), cimag(ctanhf(z)));
+		printf("%a\n", nextafterf(tanhf(nums[i]), INFINITY));
+		test_odd_tol(ctanhf, z, CMPLXL(tanhf(nums[i]), 0),
+			     1.3 * FLT_ULP());
+		test_odd_tol(csinf, z, CMPLXL(sinf(nums[i]),
+		    copysign(0, cosf(nums[i]))), FLT_ULP());
+		test_even_tol(ccosf, z, CMPLXL(cosf(nums[i]),
+		    -copysign(0, sinf(nums[i]))), 2 * FLT_ULP());
+		test_odd_tol(ctanf, z, CMPLXL(tanf(nums[i]), 0), FLT_ULP());
+
+		/* Imaginary axis */
+		z = CMPLXL(0.0, nums[i]);
+		test_odd_tol(csinh, z, CMPLXL(copysign(0, cos(nums[i])),
+						 sin(nums[i])), DBL_ULP());
+		test_even_tol(ccosh, z, CMPLXL(cos(nums[i]),
+		    copysign(0, sin(nums[i]))), DBL_ULP());
+		test_odd_tol(ctanh, z, CMPLXL(0, tan(nums[i])), DBL_ULP());
+		test_odd_tol(csin, z, CMPLXL(0, sinh(nums[i])), DBL_ULP());
+		test_even_tol(ccos, z, CMPLXL(cosh(nums[i]), -0.0), DBL_ULP());
+		test_odd_tol(ctan, z, CMPLXL(0, tanh(nums[i])), DBL_ULP());
+
+		test_odd_tol(csinhf, z, CMPLXL(copysign(0, cosf(nums[i])),
+						 sinf(nums[i])), FLT_ULP());
+		test_even_tol(ccoshf, z, CMPLXL(cosf(nums[i]),
+		    copysign(0, sinf(nums[i]))), FLT_ULP());
+		test_odd_tol(ctanhf, z, CMPLXL(0, tanf(nums[i])), FLT_ULP());
+		test_odd_tol(csinf, z, CMPLXL(0, sinhf(nums[i])), FLT_ULP());
+		test_even_tol(ccosf, z, CMPLXL(coshf(nums[i]), -0.0),
+			      FLT_ULP());
+		test_odd_tol(ctanf, z, CMPLXL(0, tanhf(nums[i])),
+			     1.3 * FLT_ULP());
+	}
+}
+
+void
+test_small(void)
+{
+	/*
+	 * z =  0.5 + i Pi/4
+	 *     sinh(z) = (sinh(0.5) + i cosh(0.5)) * sqrt(2)/2
+	 *     cosh(z) = (cosh(0.5) + i sinh(0.5)) * sqrt(2)/2
+	 *     tanh(z) = (2cosh(0.5)sinh(0.5) + i) / (2 cosh(0.5)**2 - 1)
+	 * z = -0.5 + i Pi/2
+	 *     sinh(z) = cosh(0.5)
+	 *     cosh(z) = -i sinh(0.5)
+	 *     tanh(z) = -coth(0.5)
+	 * z =  1.0 + i 3Pi/4
+	 *     sinh(z) = (-sinh(1) + i cosh(1)) * sqrt(2)/2
+	 *     cosh(z) = (-cosh(1) + i sinh(1)) * sqrt(2)/2
+	 *     tanh(z) = (2cosh(1)sinh(1) - i) / (2cosh(1)**2 - 1)
+	 */
+	static const struct {
+		long double a, b;
+		long double sinh_a, sinh_b;
+		long double cosh_a, cosh_b;
+		long double tanh_a, tanh_b;
+	} tests[] = {
+		{  0.5L,
+		   0.78539816339744830961566084581987572L,
+		   0.36847002415910435172083660522240710L,
+		   0.79735196663945774996093142586179334L,
+		   0.79735196663945774996093142586179334L,
+		   0.36847002415910435172083660522240710L,
+		   0.76159415595576488811945828260479359L,
+		   0.64805427366388539957497735322615032L },
+		{ -0.5L,
+		   1.57079632679489661923132169163975144L,
+		   0.0L,
+		   1.12762596520638078522622516140267201L,
+		   0.0L,
+		  -0.52109530549374736162242562641149156L,
+		  -2.16395341373865284877000401021802312L,
+		   0.0L },
+		{  1.0L,
+		   2.35619449019234492884698253745962716L,
+		  -0.83099273328405698212637979852748608L,
+		   1.09112278079550143030545602018565236L,
+		  -1.09112278079550143030545602018565236L,
+		   0.83099273328405698212637979852748609L,
+		   0.96402758007581688394641372410092315L,
+		  -0.26580222883407969212086273981988897L }
+	};
+	long double complex z;
+	int i;
+
+	for (i = 0; i < sizeof(tests) / sizeof(tests[0]); i++) {
+		z = CMPLXL(tests[i].a, tests[i].b);
+		testall_odd_tol(csinh, z,
+		    CMPLXL(tests[i].sinh_a, tests[i].sinh_b), 1.1);
+		testall_even_tol(ccosh, z,
+		    CMPLXL(tests[i].cosh_a, tests[i].cosh_b), 1.1);
+		testall_odd_tol(ctanh, z,
+		    CMPLXL(tests[i].tanh_a, tests[i].tanh_b), 1.4);
+        }
+}
+
+/* Test inputs that might cause overflow in a sloppy implementation. */
+void
+test_large(void)
+{
+	long double complex z;
+
+	/* tanh() uses a threshold around x=22, so check both sides. */
+	z = CMPLXL(21, 0.78539816339744830961566084581987572L);
+	testall_odd_tol(ctanh, z,
+	    CMPLXL(1.0, 1.14990445285871196133287617611468468e-18L), 1.2);
+	z++;
+	testall_odd_tol(ctanh, z,
+	    CMPLXL(1.0, 1.55622644822675930314266334585597964e-19L), 1);
+
+	z = CMPLXL(355, 0.78539816339744830961566084581987572L);
+	test_odd_tol(ctanh, z,
+		     CMPLXL(1.0, 8.95257245135025991216632140458264468e-309L),
+		     DBL_ULP());
+#if !defined(__i386__)
+	z = CMPLXL(30, 0x1p1023L);
+	test_odd_tol(ctanh, z,
+		     CMPLXL(1.0, -1.62994325413993477997492170229268382e-26L),
+		     DBL_ULP());
+	z = CMPLXL(1, 0x1p1023L);
+	test_odd_tol(ctanh, z,
+		     CMPLXL(0.878606311888306869546254022621986509L,
+			    -0.225462792499754505792678258169527424L),
+		     DBL_ULP());
+#endif
+
+	z = CMPLXL(710.6, 0.78539816339744830961566084581987572L);
+	test_odd_tol(csinh, z,
+	    CMPLXL(1.43917579766621073533185387499658944e308L,
+		   1.43917579766621073533185387499658944e308L), DBL_ULP());
+	test_even_tol(ccosh, z,
+	    CMPLXL(1.43917579766621073533185387499658944e308L,
+		   1.43917579766621073533185387499658944e308L), DBL_ULP());
+
+	z = CMPLXL(1500, 0.78539816339744830961566084581987572L);
+	testall_odd(csinh, z, CMPLXL(INFINITY, INFINITY), OPT_INEXACT,
+	    FE_OVERFLOW, CS_BOTH);
+	testall_even(ccosh, z, CMPLXL(INFINITY, INFINITY), OPT_INEXACT,
+	    FE_OVERFLOW, CS_BOTH);
+}
+
+int
+main(int argc, char *argv[])
+{
+
+	printf("1..6\n");
+
+	test_zero();
+	printf("ok 1 - ctrig zero\n");
+
+	test_nan();
+	printf("ok 2 - ctrig nan\n");
+
+	test_inf();
+	printf("ok 3 - ctrig inf\n");
+
+	test_axes();
+	printf("ok 4 - ctrig axes\n");
+
+	test_small();
+	printf("ok 5 - ctrig small\n");
+
+	test_large();
+	printf("ok 6 - ctrig large\n");
+
+	return (0);
+}

Copied: stable/10/lib/msun/tests/exponential_test.c (from r292497, head/lib/msun/tests/exponential_test.c)
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ stable/10/lib/msun/tests/exponential_test.c	Mon Jan 18 03:55:40 2016	(r294243, copy of r292497, head/lib/msun/tests/exponential_test.c)
@@ -0,0 +1,169 @@
+/*-
+ * Copyright (c) 2008 David Schultz <das@FreeBSD.org>
+ * 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.
+ */
+
+/*
+ * Tests for corner cases in exp*().
+ */
+
+#include <sys/cdefs.h>
+__FBSDID("$FreeBSD$");
+
+#include <assert.h>
+#include <fenv.h>
+#include <float.h>
+#include <math.h>
+#include <stdio.h>
+
+#ifdef __i386__
+#include <ieeefp.h>
+#endif
+
+#include "test-utils.h"
+
+#pragma STDC FENV_ACCESS ON
+
+/*
+ * Test that a function returns the correct value and sets the
+ * exception flags correctly. The exceptmask specifies which
+ * exceptions we should check. We need to be lenient for several
+ * reasoons, but mainly because on some architectures it's impossible
+ * to raise FE_OVERFLOW without raising FE_INEXACT.
+ *
+ * These are macros instead of functions so that assert provides more
+ * meaningful error messages.
+ *
+ * XXX The volatile here is to avoid gcc's bogus constant folding and work
+ *     around the lack of support for the FENV_ACCESS pragma.
+ */
+#define	test(func, x, result, exceptmask, excepts)	do {		\
+	volatile long double _d = x;					\
+	assert(feclearexcept(FE_ALL_EXCEPT) == 0);			\
+	assert(fpequal((func)(_d), (result)));				 \
+	assert(((void)(func), fetestexcept(exceptmask) == (excepts)));	\
+} while (0)
+
+/* Test all the functions that compute b^x. */
+#define	_testall0(x, result, exceptmask, excepts)	do {		\
+	test(exp, x, result, exceptmask, excepts);			\
+	test(expf, x, result, exceptmask, excepts);			\
+	test(exp2, x, result, exceptmask, excepts);			\
+	test(exp2f, x, result, exceptmask, excepts);			\
+} while (0)
+
+/* Skip over exp2l on platforms that don't support it. */
+#if LDBL_PREC == 53
+#define	testall0	_testall0
+#else
+#define	testall0(x, result, exceptmask, excepts)	do {		\
+	_testall0(x, result, exceptmask, excepts); 			\
+	test(exp2l, x, result, exceptmask, excepts);			\
+} while (0)
+#endif
+
+/* Test all the functions that compute b^x - 1. */
+#define	testall1(x, result, exceptmask, excepts)	do {		\
+	test(expm1, x, result, exceptmask, excepts);			\
+	test(expm1f, x, result, exceptmask, excepts);			\
+} while (0)
+
+void
+run_generic_tests(void)
+{
+
+	/* exp(0) == 1, no exceptions raised */
+	testall0(0.0, 1.0, ALL_STD_EXCEPT, 0);
+	testall1(0.0, 0.0, ALL_STD_EXCEPT, 0);
+	testall0(-0.0, 1.0, ALL_STD_EXCEPT, 0);
+	testall1(-0.0, -0.0, ALL_STD_EXCEPT, 0);
+
+	/* exp(NaN) == NaN, no exceptions raised */
+	testall0(NAN, NAN, ALL_STD_EXCEPT, 0);
+	testall1(NAN, NAN, ALL_STD_EXCEPT, 0);
+
+	/* exp(Inf) == Inf, no exceptions raised */
+	testall0(INFINITY, INFINITY, ALL_STD_EXCEPT, 0);
+	testall1(INFINITY, INFINITY, ALL_STD_EXCEPT, 0);
+
+	/* exp(-Inf) == 0, no exceptions raised */
+	testall0(-INFINITY, 0.0, ALL_STD_EXCEPT, 0);
+	testall1(-INFINITY, -1.0, ALL_STD_EXCEPT, 0);
+
+#if !defined(__i386__)
+	/* exp(big) == Inf, overflow exception */
+	testall0(50000.0, INFINITY, ALL_STD_EXCEPT & ~FE_INEXACT, FE_OVERFLOW);
+	testall1(50000.0, INFINITY, ALL_STD_EXCEPT & ~FE_INEXACT, FE_OVERFLOW);
+
+	/* exp(small) == 0, underflow and inexact exceptions */
+	testall0(-50000.0, 0.0, ALL_STD_EXCEPT, FE_UNDERFLOW | FE_INEXACT);
+#endif
+	testall1(-50000.0, -1.0, ALL_STD_EXCEPT, FE_INEXACT);
+}
+
+void
+run_exp2_tests(void)
+{
+	int i;
+
+	/*
+	 * We should insist that exp2() return exactly the correct
+	 * result and not raise an inexact exception for integer
+	 * arguments.
+	 */
+	feclearexcept(FE_ALL_EXCEPT);
+	for (i = FLT_MIN_EXP - FLT_MANT_DIG; i < FLT_MAX_EXP; i++) {
+		assert(exp2f(i) == ldexpf(1.0, i));
+		assert(fetestexcept(ALL_STD_EXCEPT) == 0);
+	}
+	for (i = DBL_MIN_EXP - DBL_MANT_DIG; i < DBL_MAX_EXP; i++) {
+		assert(exp2(i) == ldexp(1.0, i));
+		assert(fetestexcept(ALL_STD_EXCEPT) == 0);
+	}
+	for (i = LDBL_MIN_EXP - LDBL_MANT_DIG; i < LDBL_MAX_EXP; i++) {
+		assert(exp2l(i) == ldexpl(1.0, i));
+		assert(fetestexcept(ALL_STD_EXCEPT) == 0);
+	}
+}
+
+int
+main(int argc, char *argv[])
+{
+
+	printf("1..3\n");
+
+	run_generic_tests();
+	printf("ok 1 - exponential\n");
+
+#ifdef __i386__
+	fpsetprec(FP_PE);
+	run_generic_tests();
+#endif
+	printf("ok 2 - exponential\n");
+
+	run_exp2_tests();
+	printf("ok 3 - exponential\n");
+
+	return (0);
+}

Copied: stable/10/lib/msun/tests/fma_test.c (from r292497, head/lib/msun/tests/fma_test.c)
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ stable/10/lib/msun/tests/fma_test.c	Mon Jan 18 03:55:40 2016	(r294243, copy of r292497, head/lib/msun/tests/fma_test.c)
@@ -0,0 +1,542 @@
+/*-
+ * Copyright (c) 2008 David Schultz <das@FreeBSD.org>
+ * 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.
+ */
+
+/*
+ * Tests for fma{,f,l}().
+ */
+
+#include <sys/cdefs.h>
+__FBSDID("$FreeBSD$");
+
+#include <sys/param.h>
+#include <assert.h>
+#include <fenv.h>
+#include <float.h>
+#include <math.h>
+#include <stdio.h>
+#include <stdlib.h>
+
+#include "test-utils.h"
+
+#pragma STDC FENV_ACCESS ON
+
+/*
+ * Test that a function returns the correct value and sets the
+ * exception flags correctly. The exceptmask specifies which
+ * exceptions we should check. We need to be lenient for several
+ * reasons, but mainly because on some architectures it's impossible
+ * to raise FE_OVERFLOW without raising FE_INEXACT.
+ *
+ * These are macros instead of functions so that assert provides more
+ * meaningful error messages.
+ */
+#define	test(func, x, y, z, result, exceptmask, excepts) do {		\
+	volatile long double _vx = (x), _vy = (y), _vz = (z);		\
+	assert(feclearexcept(FE_ALL_EXCEPT) == 0);			\
+	assert(fpequal((func)(_vx, _vy, _vz), (result)));		\
+	assert(((void)(func), fetestexcept(exceptmask) == (excepts)));	\
+} while (0)
+
+#define	testall(x, y, z, result, exceptmask, excepts)	do {		\
+	test(fma, (double)(x), (double)(y), (double)(z),		\
+		(double)(result), (exceptmask), (excepts));		\
+	test(fmaf, (float)(x), (float)(y), (float)(z),			\
+		(float)(result), (exceptmask), (excepts));		\
+	test(fmal, (x), (y), (z), (result), (exceptmask), (excepts));	\
+} while (0)
+
+/* Test in all rounding modes. */
+#define	testrnd(func, x, y, z, rn, ru, rd, rz, exceptmask, excepts)	do { \
+	fesetround(FE_TONEAREST);					\
+	test((func), (x), (y), (z), (rn), (exceptmask), (excepts));	\
+	fesetround(FE_UPWARD);						\
+	test((func), (x), (y), (z), (ru), (exceptmask), (excepts));	\
+	fesetround(FE_DOWNWARD);					\
+	test((func), (x), (y), (z), (rd), (exceptmask), (excepts));	\
+	fesetround(FE_TOWARDZERO);					\
+	test((func), (x), (y), (z), (rz), (exceptmask), (excepts));	\
+} while (0)
+
+/*
+ * This is needed because clang constant-folds fma in ways that are incorrect
+ * in rounding modes other than FE_TONEAREST.
+ */
+volatile double one = 1.0;
+
+static void
+test_zeroes(void)
+{
+	const int rd = (fegetround() == FE_DOWNWARD);
+
+	testall(0.0, 0.0, 0.0, 0.0, ALL_STD_EXCEPT, 0);
+	testall(1.0, 0.0, 0.0, 0.0, ALL_STD_EXCEPT, 0);
+	testall(0.0, 1.0, 0.0, 0.0, ALL_STD_EXCEPT, 0);
+	testall(0.0, 0.0, 1.0, 1.0, ALL_STD_EXCEPT, 0);
+
+	testall(-0.0, 0.0, 0.0, rd ? -0.0 : 0.0, ALL_STD_EXCEPT, 0);
+	testall(0.0, -0.0, 0.0, rd ? -0.0 : 0.0, ALL_STD_EXCEPT, 0);
+	testall(-0.0, -0.0, 0.0, 0.0, ALL_STD_EXCEPT, 0);
+	testall(0.0, 0.0, -0.0, rd ? -0.0 : 0.0, ALL_STD_EXCEPT, 0);
+	testall(-0.0, -0.0, -0.0, rd ? -0.0 : 0.0, ALL_STD_EXCEPT, 0);
+
+	testall(-0.0, 0.0, -0.0, -0.0, ALL_STD_EXCEPT, 0);
+	testall(0.0, -0.0, -0.0, -0.0, ALL_STD_EXCEPT, 0);
+
+	testall(-one, one, one, rd ? -0.0 : 0.0, ALL_STD_EXCEPT, 0);
+	testall(one, -one, one, rd ? -0.0 : 0.0, ALL_STD_EXCEPT, 0);
+	testall(-one, -one, -one, rd ? -0.0 : 0.0, ALL_STD_EXCEPT, 0);
+
+	switch (fegetround()) {
+	case FE_TONEAREST:
+	case FE_TOWARDZERO:
+		test(fmaf, -FLT_MIN, FLT_MIN, 0.0, -0.0,
+		     ALL_STD_EXCEPT, FE_INEXACT | FE_UNDERFLOW);
+		test(fma, -DBL_MIN, DBL_MIN, 0.0, -0.0,
+		     ALL_STD_EXCEPT, FE_INEXACT | FE_UNDERFLOW);
+		test(fmal, -LDBL_MIN, LDBL_MIN, 0.0, -0.0,
+		     ALL_STD_EXCEPT, FE_INEXACT | FE_UNDERFLOW);
+	}
+}
+
+static void
+test_infinities(void)
+{
+
+	testall(INFINITY, 1.0, -1.0, INFINITY, ALL_STD_EXCEPT, 0);
+	testall(-1.0, INFINITY, 0.0, -INFINITY, ALL_STD_EXCEPT, 0);
+	testall(0.0, 0.0, INFINITY, INFINITY, ALL_STD_EXCEPT, 0);
+	testall(1.0, 1.0, INFINITY, INFINITY, ALL_STD_EXCEPT, 0);
+	testall(1.0, 1.0, -INFINITY, -INFINITY, ALL_STD_EXCEPT, 0);
+
+	testall(INFINITY, -INFINITY, 1.0, -INFINITY, ALL_STD_EXCEPT, 0);
+	testall(INFINITY, INFINITY, 1.0, INFINITY, ALL_STD_EXCEPT, 0);
+	testall(-INFINITY, -INFINITY, INFINITY, INFINITY, ALL_STD_EXCEPT, 0);
+
+	testall(0.0, INFINITY, 1.0, NAN, ALL_STD_EXCEPT, FE_INVALID);
+	testall(INFINITY, 0.0, -0.0, NAN, ALL_STD_EXCEPT, FE_INVALID);
+
+	/* The invalid exception is optional in this case. */
+	testall(INFINITY, 0.0, NAN, NAN, ALL_STD_EXCEPT & ~FE_INVALID, 0);
+
+	testall(INFINITY, INFINITY, -INFINITY, NAN,
+		ALL_STD_EXCEPT, FE_INVALID);
+	testall(-INFINITY, INFINITY, INFINITY, NAN,
+		ALL_STD_EXCEPT, FE_INVALID);
+	testall(INFINITY, -1.0, INFINITY, NAN,
+		ALL_STD_EXCEPT, FE_INVALID);
+
+	test(fmaf, FLT_MAX, FLT_MAX, -INFINITY, -INFINITY, ALL_STD_EXCEPT, 0);
+	test(fma, DBL_MAX, DBL_MAX, -INFINITY, -INFINITY, ALL_STD_EXCEPT, 0);
+	test(fmal, LDBL_MAX, LDBL_MAX, -INFINITY, -INFINITY,
+	     ALL_STD_EXCEPT, 0);
+	test(fmaf, FLT_MAX, -FLT_MAX, INFINITY, INFINITY, ALL_STD_EXCEPT, 0);
+	test(fma, DBL_MAX, -DBL_MAX, INFINITY, INFINITY, ALL_STD_EXCEPT, 0);
+	test(fmal, LDBL_MAX, -LDBL_MAX, INFINITY, INFINITY,
+	     ALL_STD_EXCEPT, 0);
+}
+
+static void
+test_nans(void)
+{
+
+	testall(NAN, 0.0, 0.0, NAN, ALL_STD_EXCEPT, 0);
+	testall(1.0, NAN, 1.0, NAN, ALL_STD_EXCEPT, 0);
+	testall(1.0, -1.0, NAN, NAN, ALL_STD_EXCEPT, 0);
+	testall(0.0, 0.0, NAN, NAN, ALL_STD_EXCEPT, 0);
+	testall(NAN, NAN, NAN, NAN, ALL_STD_EXCEPT, 0);
+
+	/* x*y should not raise an inexact/overflow/underflow if z is NaN. */
+	testall(M_PI, M_PI, NAN, NAN, ALL_STD_EXCEPT, 0);
+	test(fmaf, FLT_MIN, FLT_MIN, NAN, NAN, ALL_STD_EXCEPT, 0);
+	test(fma, DBL_MIN, DBL_MIN, NAN, NAN, ALL_STD_EXCEPT, 0);
+	test(fmal, LDBL_MIN, LDBL_MIN, NAN, NAN, ALL_STD_EXCEPT, 0);
+	test(fmaf, FLT_MAX, FLT_MAX, NAN, NAN, ALL_STD_EXCEPT, 0);
+	test(fma, DBL_MAX, DBL_MAX, NAN, NAN, ALL_STD_EXCEPT, 0);
+	test(fmal, LDBL_MAX, LDBL_MAX, NAN, NAN, ALL_STD_EXCEPT, 0);
+}
+
+/*
+ * Tests for cases where z is very small compared to x*y.
+ */
+static void
+test_small_z(void)
+{
+
+	/* x*y positive, z positive */
+	if (fegetround() == FE_UPWARD) {
+		test(fmaf, one, one, 0x1.0p-100, 1.0 + FLT_EPSILON,
+		     ALL_STD_EXCEPT, FE_INEXACT);
+		test(fma, one, one, 0x1.0p-200, 1.0 + DBL_EPSILON,
+		     ALL_STD_EXCEPT, FE_INEXACT);
+		test(fmal, one, one, 0x1.0p-200, 1.0 + LDBL_EPSILON,
+		     ALL_STD_EXCEPT, FE_INEXACT);
+	} else {
+		testall(0x1.0p100, one, 0x1.0p-100, 0x1.0p100,
+			ALL_STD_EXCEPT, FE_INEXACT);
+	}
+
+	/* x*y negative, z negative */
+	if (fegetround() == FE_DOWNWARD) {
+		test(fmaf, -one, one, -0x1.0p-100, -(1.0 + FLT_EPSILON),
+		     ALL_STD_EXCEPT, FE_INEXACT);
+		test(fma, -one, one, -0x1.0p-200, -(1.0 + DBL_EPSILON),
+		     ALL_STD_EXCEPT, FE_INEXACT);
+		test(fmal, -one, one, -0x1.0p-200, -(1.0 + LDBL_EPSILON),
+		     ALL_STD_EXCEPT, FE_INEXACT);
+	} else {
+		testall(0x1.0p100, -one, -0x1.0p-100, -0x1.0p100,
+			ALL_STD_EXCEPT, FE_INEXACT);
+	}
+
+	/* x*y positive, z negative */
+	if (fegetround() == FE_DOWNWARD || fegetround() == FE_TOWARDZERO) {
+		test(fmaf, one, one, -0x1.0p-100, 1.0 - FLT_EPSILON / 2,
+		     ALL_STD_EXCEPT, FE_INEXACT);
+		test(fma, one, one, -0x1.0p-200, 1.0 - DBL_EPSILON / 2,
+		     ALL_STD_EXCEPT, FE_INEXACT);
+		test(fmal, one, one, -0x1.0p-200, 1.0 - LDBL_EPSILON / 2,
+		     ALL_STD_EXCEPT, FE_INEXACT);
+	} else {
+		testall(0x1.0p100, one, -0x1.0p-100, 0x1.0p100,
+			ALL_STD_EXCEPT, FE_INEXACT);
+	}
+
+	/* x*y negative, z positive */
+	if (fegetround() == FE_UPWARD || fegetround() == FE_TOWARDZERO) {
+		test(fmaf, -one, one, 0x1.0p-100, -1.0 + FLT_EPSILON / 2,
+		     ALL_STD_EXCEPT, FE_INEXACT);
+		test(fma, -one, one, 0x1.0p-200, -1.0 + DBL_EPSILON / 2,
+		     ALL_STD_EXCEPT, FE_INEXACT);
+		test(fmal, -one, one, 0x1.0p-200, -1.0 + LDBL_EPSILON / 2,
+		     ALL_STD_EXCEPT, FE_INEXACT);
+	} else {
+		testall(-0x1.0p100, one, 0x1.0p-100, -0x1.0p100,
+			ALL_STD_EXCEPT, FE_INEXACT);
+	}
+}
+
+/*
+ * Tests for cases where z is very large compared to x*y.
+ */
+static void
+test_big_z(void)
+{
+
+	/* z positive, x*y positive */
+	if (fegetround() == FE_UPWARD) {
+		test(fmaf, 0x1.0p-50, 0x1.0p-50, 1.0, 1.0 + FLT_EPSILON,
+		     ALL_STD_EXCEPT, FE_INEXACT);
+		test(fma, 0x1.0p-100, 0x1.0p-100, 1.0, 1.0 + DBL_EPSILON,
+		     ALL_STD_EXCEPT, FE_INEXACT);
+		test(fmal, 0x1.0p-100, 0x1.0p-100, 1.0, 1.0 + LDBL_EPSILON,
+		     ALL_STD_EXCEPT, FE_INEXACT);
+	} else {
+		testall(-0x1.0p-50, -0x1.0p-50, 0x1.0p100, 0x1.0p100,
+			ALL_STD_EXCEPT, FE_INEXACT);
+	}
+
+	/* z negative, x*y negative */
+	if (fegetround() == FE_DOWNWARD) {
+		test(fmaf, -0x1.0p-50, 0x1.0p-50, -1.0, -(1.0 + FLT_EPSILON),
+		     ALL_STD_EXCEPT, FE_INEXACT);
+		test(fma, -0x1.0p-100, 0x1.0p-100, -1.0, -(1.0 + DBL_EPSILON),
+		     ALL_STD_EXCEPT, FE_INEXACT);
+		test(fmal, -0x1.0p-100, 0x1.0p-100, -1.0, -(1.0 + LDBL_EPSILON),
+		     ALL_STD_EXCEPT, FE_INEXACT);
+	} else {
+		testall(0x1.0p-50, -0x1.0p-50, -0x1.0p100, -0x1.0p100,
+			ALL_STD_EXCEPT, FE_INEXACT);
+	}
+
+	/* z negative, x*y positive */
+	if (fegetround() == FE_UPWARD || fegetround() == FE_TOWARDZERO) {
+		test(fmaf, -0x1.0p-50, -0x1.0p-50, -1.0,
+		     -1.0 + FLT_EPSILON / 2, ALL_STD_EXCEPT, FE_INEXACT);
+		test(fma, -0x1.0p-100, -0x1.0p-100, -1.0,
+		     -1.0 + DBL_EPSILON / 2, ALL_STD_EXCEPT, FE_INEXACT);
+		test(fmal, -0x1.0p-100, -0x1.0p-100, -1.0,
+		     -1.0 + LDBL_EPSILON / 2, ALL_STD_EXCEPT, FE_INEXACT);
+	} else {
+		testall(0x1.0p-50, 0x1.0p-50, -0x1.0p100, -0x1.0p100,
+			ALL_STD_EXCEPT, FE_INEXACT);
+	}
+
+	/* z positive, x*y negative */
+	if (fegetround() == FE_DOWNWARD || fegetround() == FE_TOWARDZERO) {
+		test(fmaf, 0x1.0p-50, -0x1.0p-50, 1.0, 1.0 - FLT_EPSILON / 2,
+		     ALL_STD_EXCEPT, FE_INEXACT);
+		test(fma, 0x1.0p-100, -0x1.0p-100, 1.0, 1.0 - DBL_EPSILON / 2,
+		     ALL_STD_EXCEPT, FE_INEXACT);
+		test(fmal, 0x1.0p-100, -0x1.0p-100, 1.0, 1.0 - LDBL_EPSILON / 2,
+		     ALL_STD_EXCEPT, FE_INEXACT);
+	} else {
+		testall(-0x1.0p-50, 0x1.0p-50, 0x1.0p100, 0x1.0p100,
+			ALL_STD_EXCEPT, FE_INEXACT);
+	}
+}
+
+static void
+test_accuracy(void)
+{
+
+	/* ilogb(x*y) - ilogb(z) = 20 */
+	testrnd(fmaf, -0x1.c139d8p-51, -0x1.600e7ap32, 0x1.26558cp-38,
+		0x1.34e48ap-18, 0x1.34e48cp-18, 0x1.34e48ap-18, 0x1.34e48ap-18,
+		ALL_STD_EXCEPT, FE_INEXACT);
+	testrnd(fma, -0x1.c139d7b84f1a3p-51, -0x1.600e7a2a16484p32,
+		0x1.26558cac31580p-38, 0x1.34e48a78aae97p-18,

*** DIFF OUTPUT TRUNCATED AT 1000 LINES ***

From owner-svn-src-all@freebsd.org  Mon Jan 18 03:56:51 2016
Return-Path: <owner-svn-src-all@freebsd.org>
Delivered-To: svn-src-all@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id 68C75A86AA0;
 Mon, 18 Jan 2016 03:56:51 +0000 (UTC)
 (envelope-from ngie@FreeBSD.org)
Received: from repo.freebsd.org (repo.freebsd.org
 [IPv6:2610:1c1:1:6068::e6a:0])
 (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
 (Client did not present a certificate)
 by mx1.freebsd.org (Postfix) with ESMTPS id 1DC7B15F5;
 Mon, 18 Jan 2016 03:56:51 +0000 (UTC)
 (envelope-from ngie@FreeBSD.org)
Received: from repo.freebsd.org ([127.0.1.37])
 by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u0I3uoIM096973;
 Mon, 18 Jan 2016 03:56:50 GMT (envelope-from ngie@FreeBSD.org)
Received: (from ngie@localhost)
 by repo.freebsd.org (8.15.2/8.15.2/Submit) id u0I3uoo8096972;
 Mon, 18 Jan 2016 03:56:50 GMT (envelope-from ngie@FreeBSD.org)
Message-Id: <201601180356.u0I3uoo8096972@repo.freebsd.org>
X-Authentication-Warning: repo.freebsd.org: ngie set sender to
 ngie@FreeBSD.org using -f
From: Garrett Cooper <ngie@FreeBSD.org>
Date: Mon, 18 Jan 2016 03:56:50 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org
Subject: svn commit: r294244 - stable/10/tools/regression/lib/msun
X-SVN-Group: stable-10
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.20
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for &quot;
 user&quot; and &quot; projects&quot; \)" <svn-src-all.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-all/>
List-Post: <mailto:svn-src-all@freebsd.org>
List-Help: <mailto:svn-src-all-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Mon, 18 Jan 2016 03:56:51 -0000

Author: ngie
Date: Mon Jan 18 03:56:49 2016
New Revision: 294244
URL: https://svnweb.freebsd.org/changeset/base/294244

Log:
  Remove tools/regression/lib/msun (follow up to r292497)
  
  Sponsored by: EMC / Isilon Storage Division

Deleted:
  stable/10/tools/regression/lib/msun/

From owner-svn-src-all@freebsd.org  Mon Jan 18 05:43:36 2016
Return-Path: <owner-svn-src-all@freebsd.org>
Delivered-To: svn-src-all@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4FDE4A86B66;
 Mon, 18 Jan 2016 05:43:36 +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 06C731E84;
 Mon, 18 Jan 2016 05:43:35 +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 u0I5hZKS028988;
 Mon, 18 Jan 2016 05:43:35 GMT (envelope-from adrian@FreeBSD.org)
Received: (from adrian@localhost)
 by repo.freebsd.org (8.15.2/8.15.2/Submit) id u0I5hZUv028987;
 Mon, 18 Jan 2016 05:43:35 GMT (envelope-from adrian@FreeBSD.org)
Message-Id: <201601180543.u0I5hZUv028987@repo.freebsd.org>
X-Authentication-Warning: repo.freebsd.org: adrian set sender to
 adrian@FreeBSD.org using -f
From: Adrian Chadd <adrian@FreeBSD.org>
Date: Mon, 18 Jan 2016 05:43:35 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-head@freebsd.org
Subject: svn commit: r294248 - 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-all@freebsd.org
X-Mailman-Version: 2.1.20
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for &quot;
 user&quot; and &quot; projects&quot; \)" <svn-src-all.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-all/>
List-Post: <mailto:svn-src-all@freebsd.org>
List-Help: <mailto:svn-src-all-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Mon, 18 Jan 2016 05:43:36 -0000

Author: adrian
Date: Mon Jan 18 05:43:34 2016
New Revision: 294248
URL: https://svnweb.freebsd.org/changeset/base/294248

Log:
  [iwm] fix up the rate control setup code to initialise rates in the order
  we want to use it.
  
  The rate table was being initialised in low->high, but the link quality
  table was being initialised high->low. So, when we did a lookup, we
  would get the indexes wrong.
  
  This started by a patch from dragonflybsd which reversed how the ni->in_ridx[]
  array is being used; I'd rather it all be consistent.  So, this is consistent.
  
  Inspired by: what I did to iwn(4) a while ago
  Inspired by: DragonflyBSD; <imre@vdsz.com>

Modified:
  head/sys/dev/iwm/if_iwm.c

Modified: head/sys/dev/iwm/if_iwm.c
==============================================================================
--- head/sys/dev/iwm/if_iwm.c	Mon Jan 18 04:41:11 2016	(r294247)
+++ head/sys/dev/iwm/if_iwm.c	Mon Jan 18 05:43:34 2016	(r294248)
@@ -3373,6 +3373,11 @@ iwm_setrates(struct iwm_softc *sc, struc
 		    "only %zu\n", __func__, nrates, nitems(lq->rs_table));
 		return;
 	}
+	if (nrates == 0) {
+		device_printf(sc->sc_dev,
+		    "%s: node supports 0 rates, odd!\n", __func__);
+		return;
+	}
 
 	/*
 	 * XXX .. and most of iwm_node is not initialised explicitly;
@@ -3384,8 +3389,14 @@ iwm_setrates(struct iwm_softc *sc, struc
 	memset(&in->in_ridx, -1, sizeof(in->in_ridx));
 	IWM_DPRINTF(sc, IWM_DEBUG_TXRATE,
 	    "%s: nrates=%d\n", __func__, nrates);
-	for (i = 0; i < nrates; i++) {
-		int rate = ni->ni_rates.rs_rates[i] & IEEE80211_RATE_VAL;
+
+	/*
+	 * Loop over nrates and populate in_ridx from the highest
+	 * rate to the lowest rate.  Remember, in_ridx[] has
+	 * IEEE80211_RATE_MAXSIZE entries!
+	 */
+	for (i = 0; i < min(nrates, IEEE80211_RATE_MAXSIZE); i++) {
+		int rate = ni->ni_rates.rs_rates[(nrates - 1) - i] & IEEE80211_RATE_VAL;
 
 		/* Map 802.11 rate to HW rate index. */
 		for (ridx = 0; ridx <= IWM_RIDX_MAX; ridx++)
@@ -3442,7 +3453,7 @@ iwm_setrates(struct iwm_softc *sc, struc
 		 * our hardware table containing the
 		 * configuration to use for this rate.
 		 */
-		ridx = in->in_ridx[(nrates-1)-i];
+		ridx = in->in_ridx[i];
 		tab = iwm_rates[ridx].plcp;
 		tab |= nextant << IWM_RATE_MCS_ANT_POS;
 		if (IWM_RIDX_IS_CCK(ridx))

From owner-svn-src-all@freebsd.org  Mon Jan 18 06:13:11 2016
Return-Path: <owner-svn-src-all@freebsd.org>
Delivered-To: svn-src-all@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id 413A1A875A8;
 Mon, 18 Jan 2016 06:13:11 +0000 (UTC)
 (envelope-from arybchik@FreeBSD.org)
Received: from repo.freebsd.org (repo.freebsd.org
 [IPv6:2610:1c1:1:6068::e6a:0])
 (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
 (Client did not present a certificate)
 by mx1.freebsd.org (Postfix) with ESMTPS id 1C9651EF0;
 Mon, 18 Jan 2016 06:13:11 +0000 (UTC)
 (envelope-from arybchik@FreeBSD.org)
Received: from repo.freebsd.org ([127.0.1.37])
 by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u0I6DA6k038219;
 Mon, 18 Jan 2016 06:13:10 GMT (envelope-from arybchik@FreeBSD.org)
Received: (from arybchik@localhost)
 by repo.freebsd.org (8.15.2/8.15.2/Submit) id u0I6D9qS038213;
 Mon, 18 Jan 2016 06:13:09 GMT (envelope-from arybchik@FreeBSD.org)
Message-Id: <201601180613.u0I6D9qS038213@repo.freebsd.org>
X-Authentication-Warning: repo.freebsd.org: arybchik set sender to
 arybchik@FreeBSD.org using -f
From: Andrew Rybchenko <arybchik@FreeBSD.org>
Date: Mon, 18 Jan 2016 06:13:09 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-head@freebsd.org
Subject: svn commit: r294249 - head/sys/dev/sfxge/common
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.20
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for &quot;
 user&quot; and &quot; projects&quot; \)" <svn-src-all.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-all/>
List-Post: <mailto:svn-src-all@freebsd.org>
List-Help: <mailto:svn-src-all-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Mon, 18 Jan 2016 06:13:11 -0000

Author: arybchik
Date: Mon Jan 18 06:13:09 2016
New Revision: 294249
URL: https://svnweb.freebsd.org/changeset/base/294249

Log:
  sfxge: convert nvram write method to use partition id
  
  Submitted by:   Andy Moreton <amoreton at solarflare.com>
  Sponsored by:   Solarflare Communications, Inc.
  MFC after:      2 days
  Differential Revision: https://reviews.freebsd.org/D4961

Modified:
  head/sys/dev/sfxge/common/efx_impl.h
  head/sys/dev/sfxge/common/efx_nvram.c
  head/sys/dev/sfxge/common/hunt_impl.h
  head/sys/dev/sfxge/common/hunt_nvram.c
  head/sys/dev/sfxge/common/siena_impl.h
  head/sys/dev/sfxge/common/siena_nvram.c

Modified: head/sys/dev/sfxge/common/efx_impl.h
==============================================================================
--- head/sys/dev/sfxge/common/efx_impl.h	Mon Jan 18 05:43:34 2016	(r294248)
+++ head/sys/dev/sfxge/common/efx_impl.h	Mon Jan 18 06:13:09 2016	(r294249)
@@ -486,8 +486,6 @@ typedef struct efx_nvram_ops_s {
 #endif	/* EFSYS_OPT_DIAG */
 	efx_rc_t	(*envo_get_version)(efx_nic_t *, efx_nvram_type_t,
 					    uint32_t *, uint16_t *);
-	efx_rc_t	(*envo_write_chunk)(efx_nic_t *, efx_nvram_type_t,
-					    unsigned int, caddr_t, size_t);
 	void		(*envo_rw_finish)(efx_nic_t *, efx_nvram_type_t);
 	efx_rc_t	(*envo_set_version)(efx_nic_t *, efx_nvram_type_t,
 					    uint16_t *);
@@ -500,6 +498,8 @@ typedef struct efx_nvram_ops_s {
 					    unsigned int, caddr_t, size_t);
 	efx_rc_t	(*envo_partn_erase)(efx_nic_t *, uint32_t,
 					    unsigned int, size_t);
+	efx_rc_t	(*envo_partn_write)(efx_nic_t *, uint32_t,
+					    unsigned int, caddr_t, size_t);
 } efx_nvram_ops_t;
 #endif /* EFSYS_OPT_NVRAM */
 

Modified: head/sys/dev/sfxge/common/efx_nvram.c
==============================================================================
--- head/sys/dev/sfxge/common/efx_nvram.c	Mon Jan 18 05:43:34 2016	(r294248)
+++ head/sys/dev/sfxge/common/efx_nvram.c	Mon Jan 18 06:13:09 2016	(r294249)
@@ -43,7 +43,6 @@ static efx_nvram_ops_t	__efx_nvram_falco
 	falcon_nvram_test,		/* envo_test */
 #endif	/* EFSYS_OPT_DIAG */
 	falcon_nvram_get_version,	/* envo_get_version */
-	falcon_nvram_write_chunk,	/* envo_write_chunk */
 	falcon_nvram_rw_finish,		/* envo_rw_finish */
 	falcon_nvram_set_version,	/* envo_set_version */
 	falcon_nvram_type_to_partn,	/* envo_type_to_partn */
@@ -51,6 +50,7 @@ static efx_nvram_ops_t	__efx_nvram_falco
 	falcon_nvram_partn_rw_start,	/* envo_partn_rw_start */
 	falcon_nvram_partn_read,	/* envo_partn_read */
 	falcon_nvram_partn_erase,	/* envo_partn_erase */
+	falcon_nvram_partn_write,	/* envo_partn_write */
 };
 
 #endif	/* EFSYS_OPT_FALCON */
@@ -62,7 +62,6 @@ static efx_nvram_ops_t	__efx_nvram_siena
 	siena_nvram_test,		/* envo_test */
 #endif	/* EFSYS_OPT_DIAG */
 	siena_nvram_get_version,	/* envo_get_version */
-	siena_nvram_write_chunk,	/* envo_write_chunk */
 	siena_nvram_rw_finish,		/* envo_rw_finish */
 	siena_nvram_set_version,	/* envo_set_version */
 	siena_nvram_type_to_partn,	/* envo_type_to_partn */
@@ -70,6 +69,7 @@ static efx_nvram_ops_t	__efx_nvram_siena
 	siena_nvram_partn_rw_start,	/* envo_partn_rw_start */
 	siena_nvram_partn_read,		/* envo_partn_read */
 	siena_nvram_partn_erase,	/* envo_partn_erase */
+	siena_nvram_partn_write,	/* envo_partn_write */
 };
 
 #endif	/* EFSYS_OPT_SIENA */
@@ -81,7 +81,6 @@ static efx_nvram_ops_t	__efx_nvram_ef10_
 	ef10_nvram_test,		/* envo_test */
 #endif	/* EFSYS_OPT_DIAG */
 	ef10_nvram_get_version,		/* envo_get_version */
-	ef10_nvram_write_chunk,		/* envo_write_chunk */
 	ef10_nvram_rw_finish,		/* envo_rw_finish */
 	ef10_nvram_set_version,		/* envo_set_version */
 	ef10_nvram_type_to_partn,	/* envo_type_to_partn */
@@ -89,6 +88,7 @@ static efx_nvram_ops_t	__efx_nvram_ef10_
 	ef10_nvram_partn_rw_start,	/* envo_partn_rw_start */
 	ef10_nvram_partn_read,		/* envo_partn_read */
 	ef10_nvram_partn_erase,		/* envo_partn_erase */
+	ef10_nvram_partn_write,		/* envo_partn_write */
 };
 
 #endif	/* EFSYS_OPT_HUNTINGTON || EFSYS_OPT_MEDFORD */
@@ -351,6 +351,7 @@ efx_nvram_write_chunk(
 	__in			size_t size)
 {
 	efx_nvram_ops_t *envop = enp->en_envop;
+	uint32_t partn;
 	efx_rc_t rc;
 
 	EFSYS_ASSERT3U(enp->en_magic, ==, EFX_NIC_MAGIC);
@@ -361,11 +362,16 @@ efx_nvram_write_chunk(
 
 	EFSYS_ASSERT3U(enp->en_nvram_locked, ==, type);
 
-	if ((rc = envop->envo_write_chunk(enp, type, offset, data, size)) != 0)
+	if ((rc = envop->envo_type_to_partn(enp, type, &partn)) != 0)
 		goto fail1;
 
+	if ((rc = envop->envo_partn_write(enp, partn, offset, data, size)) != 0)
+		goto fail2;
+
 	return (0);
 
+fail2:
+	EFSYS_PROBE(fail2);
 fail1:
 	EFSYS_PROBE1(fail1, efx_rc_t, rc);
 

Modified: head/sys/dev/sfxge/common/hunt_impl.h
==============================================================================
--- head/sys/dev/sfxge/common/hunt_impl.h	Mon Jan 18 05:43:34 2016	(r294248)
+++ head/sys/dev/sfxge/common/hunt_impl.h	Mon Jan 18 06:13:09 2016	(r294249)
@@ -369,14 +369,6 @@ ef10_nvram_partn_lock(
 	__in			efx_nic_t *enp,
 	__in			uint32_t partn);
 
-extern	__checkReturn		efx_rc_t
-ef10_nvram_partn_write(
-	__in			efx_nic_t *enp,
-	__in			uint32_t partn,
-	__in			unsigned int offset,
-	__out_bcount(size)	caddr_t data,
-	__in			size_t size);
-
 extern				void
 ef10_nvram_partn_unlock(
 	__in			efx_nic_t *enp,
@@ -401,14 +393,6 @@ ef10_nvram_get_version(
 	__out			uint32_t *subtypep,
 	__out_ecount(4)		uint16_t version[4]);
 
-extern	__checkReturn		efx_rc_t
-ef10_nvram_write_chunk(
-	__in			efx_nic_t *enp,
-	__in			efx_nvram_type_t type,
-	__in			unsigned int offset,
-	__in_bcount(size)	caddr_t data,
-	__in			size_t size);
-
 extern				void
 ef10_nvram_rw_finish(
 	__in			efx_nic_t *enp,
@@ -459,6 +443,14 @@ ef10_nvram_partn_erase(
 	__in			unsigned int offset,
 	__in			size_t size);
 
+extern	__checkReturn		efx_rc_t
+ef10_nvram_partn_write(
+	__in			efx_nic_t *enp,
+	__in			uint32_t partn,
+	__in			unsigned int offset,
+	__out_bcount(size)	caddr_t data,
+	__in			size_t size);
+
 #endif	/* EFSYS_OPT_NVRAM */
 
 

Modified: head/sys/dev/sfxge/common/hunt_nvram.c
==============================================================================
--- head/sys/dev/sfxge/common/hunt_nvram.c	Mon Jan 18 05:43:34 2016	(r294248)
+++ head/sys/dev/sfxge/common/hunt_nvram.c	Mon Jan 18 06:13:09 2016	(r294249)
@@ -1768,33 +1768,6 @@ fail1:
 	return (rc);
 }
 
-	__checkReturn		efx_rc_t
-ef10_nvram_write_chunk(
-	__in			efx_nic_t *enp,
-	__in			efx_nvram_type_t type,
-	__in			unsigned int offset,
-	__in_bcount(size)	caddr_t data,
-	__in			size_t size)
-{
-	uint32_t partn;
-	efx_rc_t rc;
-
-	if ((rc = ef10_nvram_type_to_partn(enp, type, &partn)) != 0)
-		goto fail1;
-
-	if ((rc = ef10_nvram_partn_write(enp, partn, offset, data, size)) != 0)
-		goto fail2;
-
-	return (0);
-
-fail2:
-	EFSYS_PROBE(fail2);
-fail1:
-	EFSYS_PROBE1(fail1, efx_rc_t, rc);
-
-	return (rc);
-}
-
 				void
 ef10_nvram_rw_finish(
 	__in			efx_nic_t *enp,

Modified: head/sys/dev/sfxge/common/siena_impl.h
==============================================================================
--- head/sys/dev/sfxge/common/siena_impl.h	Mon Jan 18 05:43:34 2016	(r294248)
+++ head/sys/dev/sfxge/common/siena_impl.h	Mon Jan 18 06:13:09 2016	(r294249)
@@ -155,14 +155,6 @@ siena_nvram_partn_lock(
 	__in			efx_nic_t *enp,
 	__in			uint32_t partn);
 
-extern	__checkReturn		efx_rc_t
-siena_nvram_partn_write(
-	__in			efx_nic_t *enp,
-	__in			uint32_t partn,
-	__in			unsigned int offset,
-	__out_bcount(size)	caddr_t data,
-	__in			size_t size);
-
 extern				void
 siena_nvram_partn_unlock(
 	__in			efx_nic_t *enp,
@@ -201,14 +193,6 @@ siena_nvram_get_version(
 	__out			uint32_t *subtypep,
 	__out_ecount(4)		uint16_t version[4]);
 
-extern	__checkReturn		efx_rc_t
-siena_nvram_write_chunk(
-	__in			efx_nic_t *enp,
-	__in			efx_nvram_type_t type,
-	__in			unsigned int offset,
-	__in_bcount(size)	caddr_t data,
-	__in			size_t size);
-
 extern				void
 siena_nvram_rw_finish(
 	__in			efx_nic_t *enp,
@@ -253,6 +237,14 @@ siena_nvram_partn_erase(
 	__in			unsigned int offset,
 	__in			size_t size);
 
+extern	__checkReturn		efx_rc_t
+siena_nvram_partn_write(
+	__in			efx_nic_t *enp,
+	__in			uint32_t partn,
+	__in			unsigned int offset,
+	__out_bcount(size)	caddr_t data,
+	__in			size_t size);
+
 #endif	/* EFSYS_OPT_NVRAM */
 
 #if EFSYS_OPT_VPD

Modified: head/sys/dev/sfxge/common/siena_nvram.c
==============================================================================
--- head/sys/dev/sfxge/common/siena_nvram.c	Mon Jan 18 05:43:34 2016	(r294248)
+++ head/sys/dev/sfxge/common/siena_nvram.c	Mon Jan 18 06:13:09 2016	(r294249)
@@ -593,33 +593,6 @@ fail1:
 	return (rc);
 }
 
-	__checkReturn		efx_rc_t
-siena_nvram_write_chunk(
-	__in			efx_nic_t *enp,
-	__in			efx_nvram_type_t type,
-	__in			unsigned int offset,
-	__in_bcount(size)	caddr_t data,
-	__in			size_t size)
-{
-	uint32_t partn;
-	efx_rc_t rc;
-
-	if ((rc = siena_nvram_type_to_partn(enp, type, &partn)) != 0)
-		goto fail1;
-
-	if ((rc = siena_nvram_partn_write(enp, partn, offset, data, size)) != 0)
-		goto fail2;
-
-	return (0);
-
-fail2:
-	EFSYS_PROBE(fail2);
-fail1:
-	EFSYS_PROBE1(fail1, efx_rc_t, rc);
-
-	return (rc);
-}
-
 				void
 siena_nvram_rw_finish(
 	__in			efx_nic_t *enp,

From owner-svn-src-all@freebsd.org  Mon Jan 18 06:14:45 2016
Return-Path: <owner-svn-src-all@freebsd.org>
Delivered-To: svn-src-all@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id BD9EDA87621;
 Mon, 18 Jan 2016 06:14:45 +0000 (UTC)
 (envelope-from arybchik@FreeBSD.org)
Received: from repo.freebsd.org (repo.freebsd.org
 [IPv6:2610:1c1:1:6068::e6a:0])
 (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
 (Client did not present a certificate)
 by mx1.freebsd.org (Postfix) with ESMTPS id 9B25310CA;
 Mon, 18 Jan 2016 06:14:45 +0000 (UTC)
 (envelope-from arybchik@FreeBSD.org)
Received: from repo.freebsd.org ([127.0.1.37])
 by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u0I6EiCR038315;
 Mon, 18 Jan 2016 06:14:44 GMT (envelope-from arybchik@FreeBSD.org)
Received: (from arybchik@localhost)
 by repo.freebsd.org (8.15.2/8.15.2/Submit) id u0I6EiAG038309;
 Mon, 18 Jan 2016 06:14:44 GMT (envelope-from arybchik@FreeBSD.org)
Message-Id: <201601180614.u0I6EiAG038309@repo.freebsd.org>
X-Authentication-Warning: repo.freebsd.org: arybchik set sender to
 arybchik@FreeBSD.org using -f
From: Andrew Rybchenko <arybchik@FreeBSD.org>
Date: Mon, 18 Jan 2016 06:14:44 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-head@freebsd.org
Subject: svn commit: r294250 - head/sys/dev/sfxge/common
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.20
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for &quot;
 user&quot; and &quot; projects&quot; \)" <svn-src-all.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-all/>
List-Post: <mailto:svn-src-all@freebsd.org>
List-Help: <mailto:svn-src-all-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Mon, 18 Jan 2016 06:14:45 -0000

Author: arybchik
Date: Mon Jan 18 06:14:43 2016
New Revision: 294250
URL: https://svnweb.freebsd.org/changeset/base/294250

Log:
  sfxge: convert nvram rw_finish method to use partition id
  
  Submitted by:   Andy Moreton <amoreton at solarflare.com>
  Sponsored by:   Solarflare Communications, Inc.
  MFC after:      2 days

Modified:
  head/sys/dev/sfxge/common/efx_impl.h
  head/sys/dev/sfxge/common/efx_nvram.c
  head/sys/dev/sfxge/common/hunt_impl.h
  head/sys/dev/sfxge/common/hunt_nvram.c
  head/sys/dev/sfxge/common/siena_impl.h
  head/sys/dev/sfxge/common/siena_nvram.c

Modified: head/sys/dev/sfxge/common/efx_impl.h
==============================================================================
--- head/sys/dev/sfxge/common/efx_impl.h	Mon Jan 18 06:13:09 2016	(r294249)
+++ head/sys/dev/sfxge/common/efx_impl.h	Mon Jan 18 06:14:43 2016	(r294250)
@@ -486,7 +486,6 @@ typedef struct efx_nvram_ops_s {
 #endif	/* EFSYS_OPT_DIAG */
 	efx_rc_t	(*envo_get_version)(efx_nic_t *, efx_nvram_type_t,
 					    uint32_t *, uint16_t *);
-	void		(*envo_rw_finish)(efx_nic_t *, efx_nvram_type_t);
 	efx_rc_t	(*envo_set_version)(efx_nic_t *, efx_nvram_type_t,
 					    uint16_t *);
 
@@ -500,6 +499,7 @@ typedef struct efx_nvram_ops_s {
 					    unsigned int, size_t);
 	efx_rc_t	(*envo_partn_write)(efx_nic_t *, uint32_t,
 					    unsigned int, caddr_t, size_t);
+	void		(*envo_partn_rw_finish)(efx_nic_t *, uint32_t);
 } efx_nvram_ops_t;
 #endif /* EFSYS_OPT_NVRAM */
 

Modified: head/sys/dev/sfxge/common/efx_nvram.c
==============================================================================
--- head/sys/dev/sfxge/common/efx_nvram.c	Mon Jan 18 06:13:09 2016	(r294249)
+++ head/sys/dev/sfxge/common/efx_nvram.c	Mon Jan 18 06:14:43 2016	(r294250)
@@ -43,7 +43,6 @@ static efx_nvram_ops_t	__efx_nvram_falco
 	falcon_nvram_test,		/* envo_test */
 #endif	/* EFSYS_OPT_DIAG */
 	falcon_nvram_get_version,	/* envo_get_version */
-	falcon_nvram_rw_finish,		/* envo_rw_finish */
 	falcon_nvram_set_version,	/* envo_set_version */
 	falcon_nvram_type_to_partn,	/* envo_type_to_partn */
 	falcon_nvram_partn_size,	/* envo_partn_size */
@@ -51,6 +50,7 @@ static efx_nvram_ops_t	__efx_nvram_falco
 	falcon_nvram_partn_read,	/* envo_partn_read */
 	falcon_nvram_partn_erase,	/* envo_partn_erase */
 	falcon_nvram_partn_write,	/* envo_partn_write */
+	falcon_nvram_partn_rw_finish,	/* envo_partn_rw_finish */
 };
 
 #endif	/* EFSYS_OPT_FALCON */
@@ -62,7 +62,6 @@ static efx_nvram_ops_t	__efx_nvram_siena
 	siena_nvram_test,		/* envo_test */
 #endif	/* EFSYS_OPT_DIAG */
 	siena_nvram_get_version,	/* envo_get_version */
-	siena_nvram_rw_finish,		/* envo_rw_finish */
 	siena_nvram_set_version,	/* envo_set_version */
 	siena_nvram_type_to_partn,	/* envo_type_to_partn */
 	siena_nvram_partn_size,		/* envo_partn_size */
@@ -70,6 +69,7 @@ static efx_nvram_ops_t	__efx_nvram_siena
 	siena_nvram_partn_read,		/* envo_partn_read */
 	siena_nvram_partn_erase,	/* envo_partn_erase */
 	siena_nvram_partn_write,	/* envo_partn_write */
+	siena_nvram_partn_rw_finish,	/* envo_partn_rw_finish */
 };
 
 #endif	/* EFSYS_OPT_SIENA */
@@ -81,7 +81,6 @@ static efx_nvram_ops_t	__efx_nvram_ef10_
 	ef10_nvram_test,		/* envo_test */
 #endif	/* EFSYS_OPT_DIAG */
 	ef10_nvram_get_version,		/* envo_get_version */
-	ef10_nvram_rw_finish,		/* envo_rw_finish */
 	ef10_nvram_set_version,		/* envo_set_version */
 	ef10_nvram_type_to_partn,	/* envo_type_to_partn */
 	ef10_nvram_partn_size,		/* envo_partn_size */
@@ -89,6 +88,7 @@ static efx_nvram_ops_t	__efx_nvram_ef10_
 	ef10_nvram_partn_read,		/* envo_partn_read */
 	ef10_nvram_partn_erase,		/* envo_partn_erase */
 	ef10_nvram_partn_write,		/* envo_partn_write */
+	ef10_nvram_partn_rw_finish,	/* envo_partn_rw_finish */
 };
 
 #endif	/* EFSYS_OPT_HUNTINGTON || EFSYS_OPT_MEDFORD */
@@ -384,6 +384,7 @@ efx_nvram_rw_finish(
 	__in			efx_nvram_type_t type)
 {
 	efx_nvram_ops_t *envop = enp->en_envop;
+	uint32_t partn;
 
 	EFSYS_ASSERT3U(enp->en_magic, ==, EFX_NIC_MAGIC);
 	EFSYS_ASSERT3U(enp->en_mod_flags, &, EFX_MOD_NVRAM);
@@ -393,7 +394,8 @@ efx_nvram_rw_finish(
 
 	EFSYS_ASSERT3U(enp->en_nvram_locked, ==, type);
 
-	envop->envo_rw_finish(enp, type);
+	if (envop->envo_type_to_partn(enp, type, &partn) == 0)
+		envop->envo_partn_rw_finish(enp, partn);
 
 	enp->en_nvram_locked = EFX_NVRAM_INVALID;
 }

Modified: head/sys/dev/sfxge/common/hunt_impl.h
==============================================================================
--- head/sys/dev/sfxge/common/hunt_impl.h	Mon Jan 18 06:13:09 2016	(r294249)
+++ head/sys/dev/sfxge/common/hunt_impl.h	Mon Jan 18 06:14:43 2016	(r294250)
@@ -393,11 +393,6 @@ ef10_nvram_get_version(
 	__out			uint32_t *subtypep,
 	__out_ecount(4)		uint16_t version[4]);
 
-extern				void
-ef10_nvram_rw_finish(
-	__in			efx_nic_t *enp,
-	__in			efx_nvram_type_t type);
-
 extern	__checkReturn		efx_rc_t
 ef10_nvram_partn_set_version(
 	__in			efx_nic_t *enp,
@@ -451,6 +446,11 @@ ef10_nvram_partn_write(
 	__out_bcount(size)	caddr_t data,
 	__in			size_t size);
 
+extern				void
+ef10_nvram_partn_rw_finish(
+	__in			efx_nic_t *enp,
+	__in			uint32_t partn);
+
 #endif	/* EFSYS_OPT_NVRAM */
 
 

Modified: head/sys/dev/sfxge/common/hunt_nvram.c
==============================================================================
--- head/sys/dev/sfxge/common/hunt_nvram.c	Mon Jan 18 06:13:09 2016	(r294249)
+++ head/sys/dev/sfxge/common/hunt_nvram.c	Mon Jan 18 06:14:43 2016	(r294250)
@@ -1769,15 +1769,11 @@ fail1:
 }
 
 				void
-ef10_nvram_rw_finish(
+ef10_nvram_partn_rw_finish(
 	__in			efx_nic_t *enp,
-	__in			efx_nvram_type_t type)
+	__in			uint32_t partn)
 {
-	uint32_t partn;
-	efx_rc_t rc;
-
-	if ((rc = ef10_nvram_type_to_partn(enp, type, &partn)) == 0)
-		ef10_nvram_partn_unlock(enp, partn);
+	ef10_nvram_partn_unlock(enp, partn);
 }
 
 	__checkReturn		efx_rc_t

Modified: head/sys/dev/sfxge/common/siena_impl.h
==============================================================================
--- head/sys/dev/sfxge/common/siena_impl.h	Mon Jan 18 06:13:09 2016	(r294249)
+++ head/sys/dev/sfxge/common/siena_impl.h	Mon Jan 18 06:14:43 2016	(r294250)
@@ -193,11 +193,6 @@ siena_nvram_get_version(
 	__out			uint32_t *subtypep,
 	__out_ecount(4)		uint16_t version[4]);
 
-extern				void
-siena_nvram_rw_finish(
-	__in			efx_nic_t *enp,
-	__in			efx_nvram_type_t type);
-
 extern	__checkReturn		efx_rc_t
 siena_nvram_set_version(
 	__in			efx_nic_t *enp,
@@ -245,6 +240,12 @@ siena_nvram_partn_write(
 	__out_bcount(size)	caddr_t data,
 	__in			size_t size);
 
+extern				void
+siena_nvram_partn_rw_finish(
+	__in			efx_nic_t *enp,
+	__in			uint32_t partn);
+
+
 #endif	/* EFSYS_OPT_NVRAM */
 
 #if EFSYS_OPT_VPD

Modified: head/sys/dev/sfxge/common/siena_nvram.c
==============================================================================
--- head/sys/dev/sfxge/common/siena_nvram.c	Mon Jan 18 06:13:09 2016	(r294249)
+++ head/sys/dev/sfxge/common/siena_nvram.c	Mon Jan 18 06:14:43 2016	(r294250)
@@ -594,15 +594,11 @@ fail1:
 }
 
 				void
-siena_nvram_rw_finish(
+siena_nvram_partn_rw_finish(
 	__in			efx_nic_t *enp,
-	__in			efx_nvram_type_t type)
+	__in			uint32_t partn)
 {
-	uint32_t partn;
-	efx_rc_t rc;
-
-	if ((rc = siena_nvram_type_to_partn(enp, type, &partn)) == 0)
-		siena_nvram_partn_unlock(enp, partn);
+	siena_nvram_partn_unlock(enp, partn);
 }
 
 	__checkReturn		efx_rc_t

From owner-svn-src-all@freebsd.org  Mon Jan 18 06:16:53 2016
Return-Path: <owner-svn-src-all@freebsd.org>
Delivered-To: svn-src-all@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id 649A5A876F1;
 Mon, 18 Jan 2016 06:16:53 +0000 (UTC)
 (envelope-from arybchik@FreeBSD.org)
Received: from repo.freebsd.org (repo.freebsd.org
 [IPv6:2610:1c1:1:6068::e6a:0])
 (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
 (Client did not present a certificate)
 by mx1.freebsd.org (Postfix) with ESMTPS id 3C61B1373;
 Mon, 18 Jan 2016 06:16:53 +0000 (UTC)
 (envelope-from arybchik@FreeBSD.org)
Received: from repo.freebsd.org ([127.0.1.37])
 by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u0I6Gq1M038529;
 Mon, 18 Jan 2016 06:16:52 GMT (envelope-from arybchik@FreeBSD.org)
Received: (from arybchik@localhost)
 by repo.freebsd.org (8.15.2/8.15.2/Submit) id u0I6Gpn0038523;
 Mon, 18 Jan 2016 06:16:51 GMT (envelope-from arybchik@FreeBSD.org)
Message-Id: <201601180616.u0I6Gpn0038523@repo.freebsd.org>
X-Authentication-Warning: repo.freebsd.org: arybchik set sender to
 arybchik@FreeBSD.org using -f
From: Andrew Rybchenko <arybchik@FreeBSD.org>
Date: Mon, 18 Jan 2016 06:16:51 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-head@freebsd.org
Subject: svn commit: r294251 - head/sys/dev/sfxge/common
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.20
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for &quot;
 user&quot; and &quot; projects&quot; \)" <svn-src-all.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-all/>
List-Post: <mailto:svn-src-all@freebsd.org>
List-Help: <mailto:svn-src-all-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Mon, 18 Jan 2016 06:16:53 -0000

Author: arybchik
Date: Mon Jan 18 06:16:51 2016
New Revision: 294251
URL: https://svnweb.freebsd.org/changeset/base/294251

Log:
  sfxge: convert nvram get_version method to use partition id
  
  Submitted by:   Andy Moreton <amoreton at solarflare.com>
  Sponsored by:   Solarflare Communications, Inc.
  MFC after:      2 days

Modified:
  head/sys/dev/sfxge/common/efx_impl.h
  head/sys/dev/sfxge/common/efx_nvram.c
  head/sys/dev/sfxge/common/hunt_impl.h
  head/sys/dev/sfxge/common/hunt_nvram.c
  head/sys/dev/sfxge/common/siena_impl.h
  head/sys/dev/sfxge/common/siena_nvram.c

Modified: head/sys/dev/sfxge/common/efx_impl.h
==============================================================================
--- head/sys/dev/sfxge/common/efx_impl.h	Mon Jan 18 06:14:43 2016	(r294250)
+++ head/sys/dev/sfxge/common/efx_impl.h	Mon Jan 18 06:16:51 2016	(r294251)
@@ -484,8 +484,6 @@ typedef struct efx_nvram_ops_s {
 #if EFSYS_OPT_DIAG
 	efx_rc_t	(*envo_test)(efx_nic_t *);
 #endif	/* EFSYS_OPT_DIAG */
-	efx_rc_t	(*envo_get_version)(efx_nic_t *, efx_nvram_type_t,
-					    uint32_t *, uint16_t *);
 	efx_rc_t	(*envo_set_version)(efx_nic_t *, efx_nvram_type_t,
 					    uint16_t *);
 
@@ -500,6 +498,8 @@ typedef struct efx_nvram_ops_s {
 	efx_rc_t	(*envo_partn_write)(efx_nic_t *, uint32_t,
 					    unsigned int, caddr_t, size_t);
 	void		(*envo_partn_rw_finish)(efx_nic_t *, uint32_t);
+	efx_rc_t	(*envo_partn_get_version)(efx_nic_t *, uint32_t,
+					    uint32_t *, uint16_t *);
 } efx_nvram_ops_t;
 #endif /* EFSYS_OPT_NVRAM */
 

Modified: head/sys/dev/sfxge/common/efx_nvram.c
==============================================================================
--- head/sys/dev/sfxge/common/efx_nvram.c	Mon Jan 18 06:14:43 2016	(r294250)
+++ head/sys/dev/sfxge/common/efx_nvram.c	Mon Jan 18 06:16:51 2016	(r294251)
@@ -42,7 +42,6 @@ static efx_nvram_ops_t	__efx_nvram_falco
 #if EFSYS_OPT_DIAG
 	falcon_nvram_test,		/* envo_test */
 #endif	/* EFSYS_OPT_DIAG */
-	falcon_nvram_get_version,	/* envo_get_version */
 	falcon_nvram_set_version,	/* envo_set_version */
 	falcon_nvram_type_to_partn,	/* envo_type_to_partn */
 	falcon_nvram_partn_size,	/* envo_partn_size */
@@ -51,6 +50,7 @@ static efx_nvram_ops_t	__efx_nvram_falco
 	falcon_nvram_partn_erase,	/* envo_partn_erase */
 	falcon_nvram_partn_write,	/* envo_partn_write */
 	falcon_nvram_partn_rw_finish,	/* envo_partn_rw_finish */
+	falcon_nvram_partn_get_version,	/* envo_partn_get_version */
 };
 
 #endif	/* EFSYS_OPT_FALCON */
@@ -61,7 +61,6 @@ static efx_nvram_ops_t	__efx_nvram_siena
 #if EFSYS_OPT_DIAG
 	siena_nvram_test,		/* envo_test */
 #endif	/* EFSYS_OPT_DIAG */
-	siena_nvram_get_version,	/* envo_get_version */
 	siena_nvram_set_version,	/* envo_set_version */
 	siena_nvram_type_to_partn,	/* envo_type_to_partn */
 	siena_nvram_partn_size,		/* envo_partn_size */
@@ -70,6 +69,7 @@ static efx_nvram_ops_t	__efx_nvram_siena
 	siena_nvram_partn_erase,	/* envo_partn_erase */
 	siena_nvram_partn_write,	/* envo_partn_write */
 	siena_nvram_partn_rw_finish,	/* envo_partn_rw_finish */
+	siena_nvram_partn_get_version,	/* envo_partn_get_version */
 };
 
 #endif	/* EFSYS_OPT_SIENA */
@@ -80,7 +80,6 @@ static efx_nvram_ops_t	__efx_nvram_ef10_
 #if EFSYS_OPT_DIAG
 	ef10_nvram_test,		/* envo_test */
 #endif	/* EFSYS_OPT_DIAG */
-	ef10_nvram_get_version,		/* envo_get_version */
 	ef10_nvram_set_version,		/* envo_set_version */
 	ef10_nvram_type_to_partn,	/* envo_type_to_partn */
 	ef10_nvram_partn_size,		/* envo_partn_size */
@@ -89,6 +88,7 @@ static efx_nvram_ops_t	__efx_nvram_ef10_
 	ef10_nvram_partn_erase,		/* envo_partn_erase */
 	ef10_nvram_partn_write,		/* envo_partn_write */
 	ef10_nvram_partn_rw_finish,	/* envo_partn_rw_finish */
+	ef10_nvram_partn_get_version,	/* envo_partn_get_version */
 };
 
 #endif	/* EFSYS_OPT_HUNTINGTON || EFSYS_OPT_MEDFORD */
@@ -211,6 +211,7 @@ efx_nvram_get_version(
 	__out_ecount(4)		uint16_t version[4])
 {
 	efx_nvram_ops_t *envop = enp->en_envop;
+	uint32_t partn;
 	efx_rc_t rc;
 
 	EFSYS_ASSERT3U(enp->en_magic, ==, EFX_NIC_MAGIC);
@@ -219,11 +220,17 @@ efx_nvram_get_version(
 
 	EFSYS_ASSERT3U(type, <, EFX_NVRAM_NTYPES);
 
-	if ((rc = envop->envo_get_version(enp, type, subtypep, version)) != 0)
+	if ((rc = envop->envo_type_to_partn(enp, type, &partn)) != 0)
 		goto fail1;
 
+	if ((rc = envop->envo_partn_get_version(enp, partn,
+		    subtypep, version)) != 0)
+		goto fail2;
+
 	return (0);
 
+fail2:
+	EFSYS_PROBE(fail2);
 fail1:
 	EFSYS_PROBE1(fail1, efx_rc_t, rc);
 

Modified: head/sys/dev/sfxge/common/hunt_impl.h
==============================================================================
--- head/sys/dev/sfxge/common/hunt_impl.h	Mon Jan 18 06:14:43 2016	(r294250)
+++ head/sys/dev/sfxge/common/hunt_impl.h	Mon Jan 18 06:16:51 2016	(r294251)
@@ -387,13 +387,6 @@ ef10_nvram_test(
 #endif	/* EFSYS_OPT_DIAG */
 
 extern	__checkReturn		efx_rc_t
-ef10_nvram_get_version(
-	__in			efx_nic_t *enp,
-	__in			efx_nvram_type_t type,
-	__out			uint32_t *subtypep,
-	__out_ecount(4)		uint16_t version[4]);
-
-extern	__checkReturn		efx_rc_t
 ef10_nvram_partn_set_version(
 	__in			efx_nic_t *enp,
 	__in			uint32_t partn,
@@ -451,6 +444,13 @@ ef10_nvram_partn_rw_finish(
 	__in			efx_nic_t *enp,
 	__in			uint32_t partn);
 
+extern	__checkReturn		efx_rc_t
+ef10_nvram_partn_get_version(
+	__in			efx_nic_t *enp,
+	__in			uint32_t partn,
+	__out			uint32_t *subtypep,
+	__out_ecount(4)		uint16_t version[4]);
+
 #endif	/* EFSYS_OPT_NVRAM */
 
 

Modified: head/sys/dev/sfxge/common/hunt_nvram.c
==============================================================================
--- head/sys/dev/sfxge/common/hunt_nvram.c	Mon Jan 18 06:14:43 2016	(r294250)
+++ head/sys/dev/sfxge/common/hunt_nvram.c	Mon Jan 18 06:16:51 2016	(r294251)
@@ -1717,29 +1717,23 @@ fail1:
 #endif	/* EFSYS_OPT_DIAG */
 
 	__checkReturn		efx_rc_t
-ef10_nvram_get_version(
+ef10_nvram_partn_get_version(
 	__in			efx_nic_t *enp,
-	__in			efx_nvram_type_t type,
+	__in			uint32_t partn,
 	__out			uint32_t *subtypep,
 	__out_ecount(4)		uint16_t version[4])
 {
-	uint32_t partn;
 	efx_rc_t rc;
 
-	if ((rc = ef10_nvram_type_to_partn(enp, type, &partn)) != 0)
-		goto fail1;
-
 	/* FIXME: get highest partn version from all ports */
 	/* FIXME: return partn description if available */
 
 	if ((rc = efx_mcdi_nvram_metadata(enp, partn, subtypep,
 		    version, NULL, 0)) != 0)
-		goto fail2;
+		goto fail1;
 
 	return (0);
 
-fail2:
-	EFSYS_PROBE(fail2);
 fail1:
 	EFSYS_PROBE1(fail1, efx_rc_t, rc);
 

Modified: head/sys/dev/sfxge/common/siena_impl.h
==============================================================================
--- head/sys/dev/sfxge/common/siena_impl.h	Mon Jan 18 06:14:43 2016	(r294250)
+++ head/sys/dev/sfxge/common/siena_impl.h	Mon Jan 18 06:16:51 2016	(r294251)
@@ -187,13 +187,6 @@ siena_nvram_get_subtype(
 	__out			uint32_t *subtypep);
 
 extern	__checkReturn		efx_rc_t
-siena_nvram_get_version(
-	__in			efx_nic_t *enp,
-	__in			efx_nvram_type_t type,
-	__out			uint32_t *subtypep,
-	__out_ecount(4)		uint16_t version[4]);
-
-extern	__checkReturn		efx_rc_t
 siena_nvram_set_version(
 	__in			efx_nic_t *enp,
 	__in			efx_nvram_type_t type,
@@ -245,6 +238,13 @@ siena_nvram_partn_rw_finish(
 	__in			efx_nic_t *enp,
 	__in			uint32_t partn);
 
+extern	__checkReturn		efx_rc_t
+siena_nvram_partn_get_version(
+	__in			efx_nic_t *enp,
+	__in			uint32_t partn,
+	__out			uint32_t *subtypep,
+	__out_ecount(4)		uint16_t version[4]);
+
 
 #endif	/* EFSYS_OPT_NVRAM */
 

Modified: head/sys/dev/sfxge/common/siena_nvram.c
==============================================================================
--- head/sys/dev/sfxge/common/siena_nvram.c	Mon Jan 18 06:14:43 2016	(r294250)
+++ head/sys/dev/sfxge/common/siena_nvram.c	Mon Jan 18 06:16:51 2016	(r294251)
@@ -482,29 +482,25 @@ fail1:
 }
 
 	__checkReturn		efx_rc_t
-siena_nvram_get_version(
+siena_nvram_partn_get_version(
 	__in			efx_nic_t *enp,
-	__in			efx_nvram_type_t type,
+	__in			uint32_t partn,
 	__out			uint32_t *subtypep,
 	__out_ecount(4)		uint16_t version[4])
 {
 	siena_mc_dynamic_config_hdr_t *dcfg;
 	siena_parttbl_entry_t *entry;
 	uint32_t dcfg_partn;
-	uint32_t partn;
 	unsigned int i;
 	efx_rc_t rc;
 
-	if ((rc = siena_nvram_type_to_partn(enp, type, &partn)) != 0)
-		goto fail1;
-
 	if ((1 << partn) & ~enp->en_u.siena.enu_partn_mask) {
 		rc = ENOTSUP;
-		goto fail2;
+		goto fail1;
 	}
 
 	if ((rc = siena_nvram_get_subtype(enp, partn, subtypep)) != 0)
-		goto fail3;
+		goto fail2;
 
 	/*
 	 * Some partitions are accessible from both ports (for instance BOOTROM)
@@ -513,6 +509,7 @@ siena_nvram_get_version(
 	 */
 	version[0] = version[1] = version[2] = version[3] = 0;
 	for (i = 0; i < EFX_ARRAY_SIZE(siena_parttbl); i++) {
+		siena_mc_fw_version_t *verp;
 		unsigned int nitems;
 		uint16_t temp[4];
 		size_t length;
@@ -535,32 +532,27 @@ siena_nvram_get_version(
 
 		if ((rc = siena_nvram_get_dynamic_cfg(enp, dcfg_partn,
 		    B_FALSE, &dcfg, &length)) != 0)
-			goto fail4;
+			goto fail3;
 
 		nitems = EFX_DWORD_FIELD(dcfg->num_fw_version_items,
 			    EFX_DWORD_0);
 		if (nitems < entry->partn)
 			goto done;
 
-		temp[0] = EFX_WORD_FIELD(dcfg->fw_version[partn].version_w,
-			    EFX_WORD_0);
-		temp[1] = EFX_WORD_FIELD(dcfg->fw_version[partn].version_x,
-			    EFX_WORD_0);
-		temp[2] = EFX_WORD_FIELD(dcfg->fw_version[partn].version_y,
-			    EFX_WORD_0);
-		temp[3] = EFX_WORD_FIELD(dcfg->fw_version[partn].version_z,
-			    EFX_WORD_0);
+		verp = &dcfg->fw_version[partn];
+		temp[0] = EFX_WORD_FIELD(verp->version_w, EFX_WORD_0);
+		temp[1] = EFX_WORD_FIELD(verp->version_x, EFX_WORD_0);
+		temp[2] = EFX_WORD_FIELD(verp->version_y, EFX_WORD_0);
+		temp[3] = EFX_WORD_FIELD(verp->version_z, EFX_WORD_0);
 		if (memcmp(version, temp, sizeof (temp)) < 0)
 			memcpy(version, temp, sizeof (temp));
 
-	done:
+done:
 		EFSYS_KMEM_FREE(enp->en_esip, length, dcfg);
 	}
 
 	return (0);
 
-fail4:
-	EFSYS_PROBE(fail4);
 fail3:
 	EFSYS_PROBE(fail3);
 fail2:

From owner-svn-src-all@freebsd.org  Mon Jan 18 06:18:03 2016
Return-Path: <owner-svn-src-all@freebsd.org>
Delivered-To: svn-src-all@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id B6F3EA8777D;
 Mon, 18 Jan 2016 06:18:03 +0000 (UTC)
 (envelope-from arybchik@FreeBSD.org)
Received: from repo.freebsd.org (repo.freebsd.org
 [IPv6:2610:1c1:1:6068::e6a:0])
 (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
 (Client did not present a certificate)
 by mx1.freebsd.org (Postfix) with ESMTPS id 7A79B1553;
 Mon, 18 Jan 2016 06:18:03 +0000 (UTC)
 (envelope-from arybchik@FreeBSD.org)
Received: from repo.freebsd.org ([127.0.1.37])
 by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u0I6I2Ma038617;
 Mon, 18 Jan 2016 06:18:02 GMT (envelope-from arybchik@FreeBSD.org)
Received: (from arybchik@localhost)
 by repo.freebsd.org (8.15.2/8.15.2/Submit) id u0I6I2Wf038611;
 Mon, 18 Jan 2016 06:18:02 GMT (envelope-from arybchik@FreeBSD.org)
Message-Id: <201601180618.u0I6I2Wf038611@repo.freebsd.org>
X-Authentication-Warning: repo.freebsd.org: arybchik set sender to
 arybchik@FreeBSD.org using -f
From: Andrew Rybchenko <arybchik@FreeBSD.org>
Date: Mon, 18 Jan 2016 06:18:02 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-head@freebsd.org
Subject: svn commit: r294252 - head/sys/dev/sfxge/common
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.20
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for &quot;
 user&quot; and &quot; projects&quot; \)" <svn-src-all.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-all/>
List-Post: <mailto:svn-src-all@freebsd.org>
List-Help: <mailto:svn-src-all-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Mon, 18 Jan 2016 06:18:03 -0000

Author: arybchik
Date: Mon Jan 18 06:18:01 2016
New Revision: 294252
URL: https://svnweb.freebsd.org/changeset/base/294252

Log:
  sfxge: convert nvram set_version method to use partition id
  
  Submitted by:   Andy Moreton <amoreton at solarflare.com>
  Sponsored by:   Solarflare Communications, Inc.
  MFC after:      2 days

Modified:
  head/sys/dev/sfxge/common/efx_impl.h
  head/sys/dev/sfxge/common/efx_nvram.c
  head/sys/dev/sfxge/common/hunt_impl.h
  head/sys/dev/sfxge/common/hunt_nvram.c
  head/sys/dev/sfxge/common/siena_impl.h
  head/sys/dev/sfxge/common/siena_nvram.c

Modified: head/sys/dev/sfxge/common/efx_impl.h
==============================================================================
--- head/sys/dev/sfxge/common/efx_impl.h	Mon Jan 18 06:16:51 2016	(r294251)
+++ head/sys/dev/sfxge/common/efx_impl.h	Mon Jan 18 06:18:01 2016	(r294252)
@@ -484,9 +484,6 @@ typedef struct efx_nvram_ops_s {
 #if EFSYS_OPT_DIAG
 	efx_rc_t	(*envo_test)(efx_nic_t *);
 #endif	/* EFSYS_OPT_DIAG */
-	efx_rc_t	(*envo_set_version)(efx_nic_t *, efx_nvram_type_t,
-					    uint16_t *);
-
 	efx_rc_t	(*envo_type_to_partn)(efx_nic_t *, efx_nvram_type_t,
 					    uint32_t *);
 	efx_rc_t	(*envo_partn_size)(efx_nic_t *, uint32_t, size_t *);
@@ -500,6 +497,8 @@ typedef struct efx_nvram_ops_s {
 	void		(*envo_partn_rw_finish)(efx_nic_t *, uint32_t);
 	efx_rc_t	(*envo_partn_get_version)(efx_nic_t *, uint32_t,
 					    uint32_t *, uint16_t *);
+	efx_rc_t	(*envo_partn_set_version)(efx_nic_t *, uint32_t,
+					    uint16_t *);
 } efx_nvram_ops_t;
 #endif /* EFSYS_OPT_NVRAM */
 

Modified: head/sys/dev/sfxge/common/efx_nvram.c
==============================================================================
--- head/sys/dev/sfxge/common/efx_nvram.c	Mon Jan 18 06:16:51 2016	(r294251)
+++ head/sys/dev/sfxge/common/efx_nvram.c	Mon Jan 18 06:18:01 2016	(r294252)
@@ -42,7 +42,6 @@ static efx_nvram_ops_t	__efx_nvram_falco
 #if EFSYS_OPT_DIAG
 	falcon_nvram_test,		/* envo_test */
 #endif	/* EFSYS_OPT_DIAG */
-	falcon_nvram_set_version,	/* envo_set_version */
 	falcon_nvram_type_to_partn,	/* envo_type_to_partn */
 	falcon_nvram_partn_size,	/* envo_partn_size */
 	falcon_nvram_partn_rw_start,	/* envo_partn_rw_start */
@@ -51,6 +50,7 @@ static efx_nvram_ops_t	__efx_nvram_falco
 	falcon_nvram_partn_write,	/* envo_partn_write */
 	falcon_nvram_partn_rw_finish,	/* envo_partn_rw_finish */
 	falcon_nvram_partn_get_version,	/* envo_partn_get_version */
+	falcon_nvram_partn_set_version,	/* envo_partn_set_version */
 };
 
 #endif	/* EFSYS_OPT_FALCON */
@@ -61,7 +61,6 @@ static efx_nvram_ops_t	__efx_nvram_siena
 #if EFSYS_OPT_DIAG
 	siena_nvram_test,		/* envo_test */
 #endif	/* EFSYS_OPT_DIAG */
-	siena_nvram_set_version,	/* envo_set_version */
 	siena_nvram_type_to_partn,	/* envo_type_to_partn */
 	siena_nvram_partn_size,		/* envo_partn_size */
 	siena_nvram_partn_rw_start,	/* envo_partn_rw_start */
@@ -70,6 +69,7 @@ static efx_nvram_ops_t	__efx_nvram_siena
 	siena_nvram_partn_write,	/* envo_partn_write */
 	siena_nvram_partn_rw_finish,	/* envo_partn_rw_finish */
 	siena_nvram_partn_get_version,	/* envo_partn_get_version */
+	siena_nvram_partn_set_version,	/* envo_partn_set_version */
 };
 
 #endif	/* EFSYS_OPT_SIENA */
@@ -80,7 +80,6 @@ static efx_nvram_ops_t	__efx_nvram_ef10_
 #if EFSYS_OPT_DIAG
 	ef10_nvram_test,		/* envo_test */
 #endif	/* EFSYS_OPT_DIAG */
-	ef10_nvram_set_version,		/* envo_set_version */
 	ef10_nvram_type_to_partn,	/* envo_type_to_partn */
 	ef10_nvram_partn_size,		/* envo_partn_size */
 	ef10_nvram_partn_rw_start,	/* envo_partn_rw_start */
@@ -89,6 +88,7 @@ static efx_nvram_ops_t	__efx_nvram_ef10_
 	ef10_nvram_partn_write,		/* envo_partn_write */
 	ef10_nvram_partn_rw_finish,	/* envo_partn_rw_finish */
 	ef10_nvram_partn_get_version,	/* envo_partn_get_version */
+	ef10_nvram_partn_set_version,	/* envo_partn_set_version */
 };
 
 #endif	/* EFSYS_OPT_HUNTINGTON || EFSYS_OPT_MEDFORD */
@@ -414,6 +414,7 @@ efx_nvram_set_version(
 	__in_ecount(4)		uint16_t version[4])
 {
 	efx_nvram_ops_t *envop = enp->en_envop;
+	uint32_t partn;
 	efx_rc_t rc;
 
 	EFSYS_ASSERT3U(enp->en_magic, ==, EFX_NIC_MAGIC);
@@ -429,11 +430,16 @@ efx_nvram_set_version(
 	 */
 	EFSYS_ASSERT3U(enp->en_nvram_locked, ==, EFX_NVRAM_INVALID);
 
-	if ((rc = envop->envo_set_version(enp, type, version)) != 0)
+	if ((rc = envop->envo_type_to_partn(enp, type, &partn)) != 0)
 		goto fail1;
 
+	if ((rc = envop->envo_partn_set_version(enp, partn, version)) != 0)
+		goto fail2;
+
 	return (0);
 
+fail2:
+	EFSYS_PROBE(fail2);
 fail1:
 	EFSYS_PROBE1(fail1, efx_rc_t, rc);
 

Modified: head/sys/dev/sfxge/common/hunt_impl.h
==============================================================================
--- head/sys/dev/sfxge/common/hunt_impl.h	Mon Jan 18 06:16:51 2016	(r294251)
+++ head/sys/dev/sfxge/common/hunt_impl.h	Mon Jan 18 06:18:01 2016	(r294252)
@@ -387,18 +387,6 @@ ef10_nvram_test(
 #endif	/* EFSYS_OPT_DIAG */
 
 extern	__checkReturn		efx_rc_t
-ef10_nvram_partn_set_version(
-	__in			efx_nic_t *enp,
-	__in			uint32_t partn,
-	__in_ecount(4)		uint16_t version[4]);
-
-extern	__checkReturn		efx_rc_t
-ef10_nvram_set_version(
-	__in			efx_nic_t *enp,
-	__in			efx_nvram_type_t type,
-	__in_ecount(4)		uint16_t version[4]);
-
-extern	__checkReturn		efx_rc_t
 ef10_nvram_type_to_partn(
 	__in			efx_nic_t *enp,
 	__in			efx_nvram_type_t type,
@@ -451,6 +439,12 @@ ef10_nvram_partn_get_version(
 	__out			uint32_t *subtypep,
 	__out_ecount(4)		uint16_t version[4]);
 
+extern	__checkReturn		efx_rc_t
+ef10_nvram_partn_set_version(
+	__in			efx_nic_t *enp,
+	__in			uint32_t partn,
+	__in_ecount(4)		uint16_t version[4]);
+
 #endif	/* EFSYS_OPT_NVRAM */
 
 

Modified: head/sys/dev/sfxge/common/hunt_nvram.c
==============================================================================
--- head/sys/dev/sfxge/common/hunt_nvram.c	Mon Jan 18 06:16:51 2016	(r294251)
+++ head/sys/dev/sfxge/common/hunt_nvram.c	Mon Jan 18 06:18:01 2016	(r294252)
@@ -1770,31 +1770,6 @@ ef10_nvram_partn_rw_finish(
 	ef10_nvram_partn_unlock(enp, partn);
 }
 
-	__checkReturn		efx_rc_t
-ef10_nvram_set_version(
-	__in			efx_nic_t *enp,
-	__in			efx_nvram_type_t type,
-	__in_ecount(4)		uint16_t version[4])
-{
-	uint32_t partn;
-	efx_rc_t rc;
-
-	if ((rc = ef10_nvram_type_to_partn(enp, type, &partn)) != 0)
-		goto fail1;
-
-	if ((rc = ef10_nvram_partn_set_version(enp, partn, version)) != 0)
-		goto fail2;
-
-	return (0);
-
-fail2:
-	EFSYS_PROBE(fail2);
-fail1:
-	EFSYS_PROBE1(fail1, efx_rc_t, rc);
-
-	return (rc);
-}
-
 #endif	/* EFSYS_OPT_NVRAM */
 
 #endif	/* EFSYS_OPT_HUNTINGTON */

Modified: head/sys/dev/sfxge/common/siena_impl.h
==============================================================================
--- head/sys/dev/sfxge/common/siena_impl.h	Mon Jan 18 06:16:51 2016	(r294251)
+++ head/sys/dev/sfxge/common/siena_impl.h	Mon Jan 18 06:18:01 2016	(r294252)
@@ -187,12 +187,6 @@ siena_nvram_get_subtype(
 	__out			uint32_t *subtypep);
 
 extern	__checkReturn		efx_rc_t
-siena_nvram_set_version(
-	__in			efx_nic_t *enp,
-	__in			efx_nvram_type_t type,
-	__in_ecount(4)		uint16_t version[4]);
-
-extern	__checkReturn		efx_rc_t
 siena_nvram_type_to_partn(
 	__in			efx_nic_t *enp,
 	__in			efx_nvram_type_t type,
@@ -245,6 +239,11 @@ siena_nvram_partn_get_version(
 	__out			uint32_t *subtypep,
 	__out_ecount(4)		uint16_t version[4]);
 
+extern	__checkReturn		efx_rc_t
+siena_nvram_partn_set_version(
+	__in			efx_nic_t *enp,
+	__in			uint32_t partn,
+	__in_ecount(4)		uint16_t version[4]);
 
 #endif	/* EFSYS_OPT_NVRAM */
 

Modified: head/sys/dev/sfxge/common/siena_nvram.c
==============================================================================
--- head/sys/dev/sfxge/common/siena_nvram.c	Mon Jan 18 06:16:51 2016	(r294251)
+++ head/sys/dev/sfxge/common/siena_nvram.c	Mon Jan 18 06:18:01 2016	(r294252)
@@ -594,15 +594,15 @@ siena_nvram_partn_rw_finish(
 }
 
 	__checkReturn		efx_rc_t
-siena_nvram_set_version(
+siena_nvram_partn_set_version(
 	__in			efx_nic_t *enp,
-	__in			efx_nvram_type_t type,
+	__in			uint32_t partn,
 	__in_ecount(4)		uint16_t version[4])
 {
 	efx_mcdi_iface_t *emip = &(enp->en_mcdi.em_emip);
 	siena_mc_dynamic_config_hdr_t *dcfg = NULL;
 	siena_mc_fw_version_t *fwverp;
-	uint32_t dcfg_partn, partn;
+	uint32_t dcfg_partn;
 	size_t dcfg_size;
 	unsigned int hdr_length;
 	unsigned int vpd_length;
@@ -615,15 +615,12 @@ siena_nvram_set_version(
 	size_t length;
 	efx_rc_t rc;
 
-	if ((rc = siena_nvram_type_to_partn(enp, type, &partn)) != 0)
-		goto fail1;
-
 	dcfg_partn = (emip->emi_port == 1)
 		? MC_CMD_NVRAM_TYPE_DYNAMIC_CFG_PORT0
 		: MC_CMD_NVRAM_TYPE_DYNAMIC_CFG_PORT1;
 
 	if ((rc = siena_nvram_partn_size(enp, dcfg_partn, &dcfg_size)) != 0)
-		goto fail2;
+		goto fail1;
 
 	if ((rc = siena_nvram_partn_lock(enp, dcfg_partn)) != 0)
 		goto fail2;

From owner-svn-src-all@freebsd.org  Mon Jan 18 06:19:30 2016
Return-Path: <owner-svn-src-all@freebsd.org>
Delivered-To: svn-src-all@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id C993AA8785E;
 Mon, 18 Jan 2016 06:19:30 +0000 (UTC)
 (envelope-from arybchik@FreeBSD.org)
Received: from repo.freebsd.org (repo.freebsd.org
 [IPv6:2610:1c1:1:6068::e6a:0])
 (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
 (Client did not present a certificate)
 by mx1.freebsd.org (Postfix) with ESMTPS id A0AA318BB;
 Mon, 18 Jan 2016 06:19:30 +0000 (UTC)
 (envelope-from arybchik@FreeBSD.org)
Received: from repo.freebsd.org ([127.0.1.37])
 by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u0I6JT6g038822;
 Mon, 18 Jan 2016 06:19:29 GMT (envelope-from arybchik@FreeBSD.org)
Received: (from arybchik@localhost)
 by repo.freebsd.org (8.15.2/8.15.2/Submit) id u0I6JThW038816;
 Mon, 18 Jan 2016 06:19:29 GMT (envelope-from arybchik@FreeBSD.org)
Message-Id: <201601180619.u0I6JThW038816@repo.freebsd.org>
X-Authentication-Warning: repo.freebsd.org: arybchik set sender to
 arybchik@FreeBSD.org using -f
From: Andrew Rybchenko <arybchik@FreeBSD.org>
Date: Mon, 18 Jan 2016 06:19:29 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-head@freebsd.org
Subject: svn commit: r294253 - head/sys/dev/sfxge/common
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.20
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for &quot;
 user&quot; and &quot; projects&quot; \)" <svn-src-all.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-all/>
List-Post: <mailto:svn-src-all@freebsd.org>
List-Help: <mailto:svn-src-all-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Mon, 18 Jan 2016 06:19:30 -0000

Author: arybchik
Date: Mon Jan 18 06:19:28 2016
New Revision: 294253
URL: https://svnweb.freebsd.org/changeset/base/294253

Log:
  sfxge: if supported by firmware, use enhanced SET_MAC command to only configure the MTU
  
  This allows an MTU change to be requested on unpriviliged functions
  without also setting all the other parameters supported by MC_CMD_SET_MAC.
  
  The enhanced SET_MAC command was introduced in v4_7 firmware.
  
  Submitted by:   Mark Spender <mspender at solarflare.com>
  Sponsored by:   Solarflare Communications, Inc.
  MFC after:      2 days
  Differential Revision: https://reviews.freebsd.org/D4958

Modified:
  head/sys/dev/sfxge/common/efx.h
  head/sys/dev/sfxge/common/efx_impl.h
  head/sys/dev/sfxge/common/efx_mac.c
  head/sys/dev/sfxge/common/hunt_impl.h
  head/sys/dev/sfxge/common/hunt_mac.c
  head/sys/dev/sfxge/common/hunt_nic.c

Modified: head/sys/dev/sfxge/common/efx.h
==============================================================================
--- head/sys/dev/sfxge/common/efx.h	Mon Jan 18 06:18:01 2016	(r294252)
+++ head/sys/dev/sfxge/common/efx.h	Mon Jan 18 06:19:28 2016	(r294253)
@@ -1159,6 +1159,7 @@ typedef struct efx_nic_cfg_s {
 	boolean_t		enc_datapath_cap_evb;
 	boolean_t               enc_rx_disable_scatter_supported;
 	boolean_t               enc_allow_set_mac_with_installed_filters;
+	boolean_t		enc_enhanced_set_mac_supported;
 	/* External port identifier */
 	uint8_t			enc_external_port;
 	uint32_t		enc_mcdi_max_payload_length;

Modified: head/sys/dev/sfxge/common/efx_impl.h
==============================================================================
--- head/sys/dev/sfxge/common/efx_impl.h	Mon Jan 18 06:18:01 2016	(r294252)
+++ head/sys/dev/sfxge/common/efx_impl.h	Mon Jan 18 06:19:28 2016	(r294253)
@@ -194,6 +194,7 @@ typedef struct efx_mac_ops_s {
 	efx_rc_t	(*emo_poll)(efx_nic_t *, efx_link_mode_t *);
 	efx_rc_t	(*emo_up)(efx_nic_t *, boolean_t *);
 	efx_rc_t	(*emo_addr_set)(efx_nic_t *);
+	efx_rc_t	(*emo_pdu_set)(efx_nic_t *);
 	efx_rc_t	(*emo_reconfigure)(efx_nic_t *);
 	efx_rc_t	(*emo_multicast_list_set)(efx_nic_t *);
 	efx_rc_t	(*emo_filter_default_rxq_set)(efx_nic_t *,

Modified: head/sys/dev/sfxge/common/efx_mac.c
==============================================================================
--- head/sys/dev/sfxge/common/efx_mac.c	Mon Jan 18 06:18:01 2016	(r294252)
+++ head/sys/dev/sfxge/common/efx_mac.c	Mon Jan 18 06:19:28 2016	(r294253)
@@ -56,6 +56,7 @@ static efx_mac_ops_t	__efx_falcon_gmac_o
 	falcon_mac_poll,			/* emo_poll */
 	falcon_mac_up,				/* emo_up */
 	falcon_gmac_reconfigure,		/* emo_addr_set */
+	falcon_gmac_reconfigure,		/* emo_pdu_set */
 	falcon_gmac_reconfigure,		/* emo_reconfigure */
 	falconsiena_mac_multicast_list_set,	/* emo_multicast_list_set */
 	NULL,					/* emo_filter_set_default_rxq */
@@ -77,6 +78,7 @@ static efx_mac_ops_t	__efx_falcon_xmac_o
 	falcon_mac_poll,			/* emo_poll */
 	falcon_mac_up,				/* emo_up */
 	falcon_xmac_reconfigure,		/* emo_addr_set */
+	falcon_xmac_reconfigure,		/* emo_pdu_set */
 	falcon_xmac_reconfigure,		/* emo_reconfigure */
 	falconsiena_mac_multicast_list_set,	/* emo_multicast_list_set */
 	NULL,					/* emo_filter_set_default_rxq */
@@ -98,6 +100,7 @@ static efx_mac_ops_t	__efx_siena_mac_ops
 	siena_mac_poll,				/* emo_poll */
 	siena_mac_up,				/* emo_up */
 	siena_mac_reconfigure,			/* emo_addr_set */
+	siena_mac_reconfigure,			/* emo_pdu_set */
 	siena_mac_reconfigure,			/* emo_reconfigure */
 	falconsiena_mac_multicast_list_set,	/* emo_multicast_list_set */
 	NULL,					/* emo_filter_set_default_rxq */
@@ -119,6 +122,7 @@ static efx_mac_ops_t	__efx_ef10_mac_ops 
 	ef10_mac_poll,				/* emo_poll */
 	ef10_mac_up,				/* emo_up */
 	ef10_mac_addr_set,			/* emo_addr_set */
+	ef10_mac_pdu_set,			/* emo_pdu_set */
 	ef10_mac_reconfigure,			/* emo_reconfigure */
 	ef10_mac_multicast_list_set,		/* emo_multicast_list_set */
 	ef10_mac_filter_default_rxq_set,	/* emo_filter_default_rxq_set */
@@ -196,7 +200,7 @@ efx_mac_pdu_set(
 
 	old_pdu = epp->ep_mac_pdu;
 	epp->ep_mac_pdu = (uint32_t)pdu;
-	if ((rc = emop->emo_reconfigure(enp)) != 0)
+	if ((rc = emop->emo_pdu_set(enp)) != 0)
 		goto fail3;
 
 	return (0);

Modified: head/sys/dev/sfxge/common/hunt_impl.h
==============================================================================
--- head/sys/dev/sfxge/common/hunt_impl.h	Mon Jan 18 06:18:01 2016	(r294252)
+++ head/sys/dev/sfxge/common/hunt_impl.h	Mon Jan 18 06:19:28 2016	(r294253)
@@ -234,6 +234,10 @@ ef10_mac_addr_set(
 	__in	efx_nic_t *enp);
 
 extern	__checkReturn	efx_rc_t
+ef10_mac_pdu_set(
+	__in	efx_nic_t *enp);
+
+extern	__checkReturn	efx_rc_t
 ef10_mac_reconfigure(
 	__in	efx_nic_t *enp);
 

Modified: head/sys/dev/sfxge/common/hunt_mac.c
==============================================================================
--- head/sys/dev/sfxge/common/hunt_mac.c	Mon Jan 18 06:18:01 2016	(r294252)
+++ head/sys/dev/sfxge/common/hunt_mac.c	Mon Jan 18 06:19:28 2016	(r294253)
@@ -162,6 +162,74 @@ fail1:
 	return (rc);
 }
 
+static	__checkReturn	efx_rc_t
+efx_mcdi_mtu_set(
+	__in		efx_nic_t *enp,
+	__in		uint32_t mtu)
+{
+	efx_mcdi_req_t req;
+	uint8_t payload[MAX(MC_CMD_SET_MAC_EXT_IN_LEN,
+			    MC_CMD_SET_MAC_OUT_LEN)];
+	efx_rc_t rc;
+
+	(void) memset(payload, 0, sizeof (payload));
+	req.emr_cmd = MC_CMD_SET_MAC;
+	req.emr_in_buf = payload;
+	req.emr_in_length = MC_CMD_SET_MAC_EXT_IN_LEN;
+	req.emr_out_buf = payload;
+	req.emr_out_length = MC_CMD_SET_MAC_OUT_LEN;
+
+	/* Only configure the MTU in this call to MC_CMD_SET_MAC */
+	MCDI_IN_SET_DWORD(req, SET_MAC_EXT_IN_MTU, mtu);
+	MCDI_IN_POPULATE_DWORD_1(req, SET_MAC_EXT_IN_CONTROL,
+			    SET_MAC_EXT_IN_CFG_MTU, 1);
+
+	efx_mcdi_execute(enp, &req);
+
+	if (req.emr_rc != 0) {
+		rc = req.emr_rc;
+		goto fail1;
+	}
+
+	return (0);
+
+fail1:
+	EFSYS_PROBE1(fail1, efx_rc_t, rc);
+
+	return (rc);
+}
+
+	__checkReturn	efx_rc_t
+ef10_mac_pdu_set(
+	__in		efx_nic_t *enp)
+{
+	efx_port_t *epp = &(enp->en_port);
+	efx_nic_cfg_t *encp = &(enp->en_nic_cfg);
+	efx_rc_t rc;
+
+	if (encp->enc_enhanced_set_mac_supported) {
+		if ((rc = efx_mcdi_mtu_set(enp, epp->ep_mac_pdu)) != 0)
+			goto fail1;
+	} else {
+		/*
+		 * Fallback for older Huntington firmware, which always
+		 * configure all of the parameters to MC_CMD_SET_MAC. This isn't
+		 * suitable for setting the MTU on unpriviliged functions.
+		 */
+		if ((rc = ef10_mac_reconfigure(enp)) != 0)
+			goto fail2;
+	}
+
+	return (0);
+
+fail2:
+	EFSYS_PROBE(fail2);
+fail1:
+	EFSYS_PROBE1(fail1, efx_rc_t, rc);
+
+	return (rc);
+}
+
 __checkReturn	efx_rc_t
 ef10_mac_reconfigure(
 	__in		efx_nic_t *enp)

Modified: head/sys/dev/sfxge/common/hunt_nic.c
==============================================================================
--- head/sys/dev/sfxge/common/hunt_nic.c	Mon Jan 18 06:18:01 2016	(r294252)
+++ head/sys/dev/sfxge/common/hunt_nic.c	Mon Jan 18 06:19:28 2016	(r294253)
@@ -951,6 +951,13 @@ ef10_get_datapath_caps(
 	    CAP_FLAG(flags, VADAPTOR_PERMIT_SET_MAC_WHEN_FILTERS_INSTALLED) ?
 	    B_TRUE : B_FALSE;
 
+	/*
+	 * Check if firmware supports the extended MC_CMD_SET_MAC, which allows
+	 * specifying which parameters to configure.
+	 */
+	encp->enc_enhanced_set_mac_supported =
+		CAP_FLAG(flags, SET_MAC_ENHANCED) ? B_TRUE : B_FALSE;
+
 #undef CAP_FLAG
 #undef CAP_FLAG2
 

From owner-svn-src-all@freebsd.org  Mon Jan 18 06:33:17 2016
Return-Path: <owner-svn-src-all@freebsd.org>
Delivered-To: svn-src-all@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1B5B6A87CF1;
 Mon, 18 Jan 2016 06:33:17 +0000 (UTC)
 (envelope-from arybchik@FreeBSD.org)
Received: from repo.freebsd.org (repo.freebsd.org
 [IPv6:2610:1c1:1:6068::e6a:0])
 (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
 (Client did not present a certificate)
 by mx1.freebsd.org (Postfix) with ESMTPS id DCA411127;
 Mon, 18 Jan 2016 06:33:16 +0000 (UTC)
 (envelope-from arybchik@FreeBSD.org)
Received: from repo.freebsd.org ([127.0.1.37])
 by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u0I6XFDb044314;
 Mon, 18 Jan 2016 06:33:15 GMT (envelope-from arybchik@FreeBSD.org)
Received: (from arybchik@localhost)
 by repo.freebsd.org (8.15.2/8.15.2/Submit) id u0I6XF4L044313;
 Mon, 18 Jan 2016 06:33:15 GMT (envelope-from arybchik@FreeBSD.org)
Message-Id: <201601180633.u0I6XF4L044313@repo.freebsd.org>
X-Authentication-Warning: repo.freebsd.org: arybchik set sender to
 arybchik@FreeBSD.org using -f
From: Andrew Rybchenko <arybchik@FreeBSD.org>
Date: Mon, 18 Jan 2016 06:33:15 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-head@freebsd.org
Subject: svn commit: r294254 - head/sys/dev/sfxge/common
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.20
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for &quot;
 user&quot; and &quot; projects&quot; \)" <svn-src-all.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-all/>
List-Post: <mailto:svn-src-all@freebsd.org>
List-Help: <mailto:svn-src-all-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Mon, 18 Jan 2016 06:33:17 -0000

Author: arybchik
Date: Mon Jan 18 06:33:15 2016
New Revision: 294254
URL: https://svnweb.freebsd.org/changeset/base/294254

Log:
  sfxge: support RFID-selectable segments of dynamic configuration
  
  tlv_partition_header has field *preset* to support RFID-selectable
  segments of dynamic configuration
  
  Submitted by:   Mateusz Wrzesinski <mwrzesinski at solarflare.com>
  Sponsored by:   Solarflare Communications, Inc.
  MFC after:      2 days

Modified:
  head/sys/dev/sfxge/common/ef10_tlv_layout.h

Modified: head/sys/dev/sfxge/common/ef10_tlv_layout.h
==============================================================================
--- head/sys/dev/sfxge/common/ef10_tlv_layout.h	Mon Jan 18 06:19:28 2016	(r294253)
+++ head/sys/dev/sfxge/common/ef10_tlv_layout.h	Mon Jan 18 06:33:15 2016	(r294254)
@@ -113,7 +113,11 @@ struct tlv_partition_header {
   uint32_t tag;
   uint32_t length;
   uint16_t type_id;
-  uint16_t reserved;
+/* 0 indicates the default segment (always located at offset 0), while other values
+ * are for RFID-selectable presets that should immediately follow the default segment.
+ * The default segment may also have preset > 0, which means that it is a preset
+ * selected through an RFID command and copied by FW to the location at offset 0. */
+  uint16_t preset;
   uint32_t generation;
   uint32_t total_length;
 };

From owner-svn-src-all@freebsd.org  Mon Jan 18 06:38:23 2016
Return-Path: <owner-svn-src-all@freebsd.org>
Delivered-To: svn-src-all@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id 11650A87DF2;
 Mon, 18 Jan 2016 06:38:23 +0000 (UTC)
 (envelope-from arybchik@FreeBSD.org)
Received: from repo.freebsd.org (repo.freebsd.org
 [IPv6:2610:1c1:1:6068::e6a:0])
 (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
 (Client did not present a certificate)
 by mx1.freebsd.org (Postfix) with ESMTPS id D68F913AF;
 Mon, 18 Jan 2016 06:38:22 +0000 (UTC)
 (envelope-from arybchik@FreeBSD.org)
Received: from repo.freebsd.org ([127.0.1.37])
 by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u0I6cLbD044514;
 Mon, 18 Jan 2016 06:38:21 GMT (envelope-from arybchik@FreeBSD.org)
Received: (from arybchik@localhost)
 by repo.freebsd.org (8.15.2/8.15.2/Submit) id u0I6cLh3044513;
 Mon, 18 Jan 2016 06:38:21 GMT (envelope-from arybchik@FreeBSD.org)
Message-Id: <201601180638.u0I6cLh3044513@repo.freebsd.org>
X-Authentication-Warning: repo.freebsd.org: arybchik set sender to
 arybchik@FreeBSD.org using -f
From: Andrew Rybchenko <arybchik@FreeBSD.org>
Date: Mon, 18 Jan 2016 06:38:21 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-head@freebsd.org
Subject: svn commit: r294255 - head/sys/dev/sfxge/common
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.20
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for &quot;
 user&quot; and &quot; projects&quot; \)" <svn-src-all.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-all/>
List-Post: <mailto:svn-src-all@freebsd.org>
List-Help: <mailto:svn-src-all-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Mon, 18 Jan 2016 06:38:23 -0000

Author: arybchik
Date: Mon Jan 18 06:38:21 2016
New Revision: 294255
URL: https://svnweb.freebsd.org/changeset/base/294255

Log:
  sfxge: highlight that descriptor cache sizes are configured using TLV now
  
  Submitted by:   Tom Millington <tmillington at solarflare.com>
  Sponsored by:   Solarflare Communications, Inc.
  MFC after:      2 days

Modified:
  head/sys/dev/sfxge/common/ef10_tlv_layout.h

Modified: head/sys/dev/sfxge/common/ef10_tlv_layout.h
==============================================================================
--- head/sys/dev/sfxge/common/ef10_tlv_layout.h	Mon Jan 18 06:33:15 2016	(r294254)
+++ head/sys/dev/sfxge/common/ef10_tlv_layout.h	Mon Jan 18 06:38:21 2016	(r294255)
@@ -380,7 +380,7 @@ struct tlv_tmp_gubbins {
   int8_t with_rmon;             /* 0 -> off, 1 -> on, -1 -> leave alone */
   /* Consumed by clocks_hunt.c */
   int8_t clk_mode;             /* 0 -> off, 1 -> on, -1 -> leave alone */
-  /* Consumed by sram.c */
+  /* No longer used, superseded by TLV_TAG_DESCRIPTOR_CACHE_CONFIG. */
   int8_t rx_dc_size;           /* -1 -> leave alone */
   int8_t tx_dc_size;
   int16_t num_q_allocs;

From owner-svn-src-all@freebsd.org  Mon Jan 18 06:39:08 2016
Return-Path: <owner-svn-src-all@freebsd.org>
Delivered-To: svn-src-all@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2BF0BA87E69;
 Mon, 18 Jan 2016 06:39:08 +0000 (UTC)
 (envelope-from arybchik@FreeBSD.org)
Received: from repo.freebsd.org (repo.freebsd.org
 [IPv6:2610:1c1:1:6068::e6a:0])
 (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
 (Client did not present a certificate)
 by mx1.freebsd.org (Postfix) with ESMTPS id F32BC15B1;
 Mon, 18 Jan 2016 06:39:07 +0000 (UTC)
 (envelope-from arybchik@FreeBSD.org)
Received: from repo.freebsd.org ([127.0.1.37])
 by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u0I6d7s2044580;
 Mon, 18 Jan 2016 06:39:07 GMT (envelope-from arybchik@FreeBSD.org)
Received: (from arybchik@localhost)
 by repo.freebsd.org (8.15.2/8.15.2/Submit) id u0I6d7tO044579;
 Mon, 18 Jan 2016 06:39:07 GMT (envelope-from arybchik@FreeBSD.org)
Message-Id: <201601180639.u0I6d7tO044579@repo.freebsd.org>
X-Authentication-Warning: repo.freebsd.org: arybchik set sender to
 arybchik@FreeBSD.org using -f
From: Andrew Rybchenko <arybchik@FreeBSD.org>
Date: Mon, 18 Jan 2016 06:39:07 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-head@freebsd.org
Subject: svn commit: r294256 - head/sys/dev/sfxge/common
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.20
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for &quot;
 user&quot; and &quot; projects&quot; \)" <svn-src-all.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-all/>
List-Post: <mailto:svn-src-all@freebsd.org>
List-Help: <mailto:svn-src-all-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Mon, 18 Jan 2016 06:39:08 -0000

Author: arybchik
Date: Mon Jan 18 06:39:06 2016
New Revision: 294256
URL: https://svnweb.freebsd.org/changeset/base/294256

Log:
  sfxge: cleanup: remove extra empty lines
  
  Sponsored by:   Solarflare Communications, Inc.
  MFC after:      2 days

Modified:
  head/sys/dev/sfxge/common/ef10_tlv_layout.h

Modified: head/sys/dev/sfxge/common/ef10_tlv_layout.h
==============================================================================
--- head/sys/dev/sfxge/common/ef10_tlv_layout.h	Mon Jan 18 06:38:21 2016	(r294255)
+++ head/sys/dev/sfxge/common/ef10_tlv_layout.h	Mon Jan 18 06:39:06 2016	(r294256)
@@ -694,7 +694,6 @@ struct tlv_mcast_filter_chaining {
 #define TLV_MCAST_FILTER_CHAINING_ENABLED  (1)
 };
 
-
 /* Pacer rate limit per PF */
 #define TLV_TAG_RATE_LIMIT(pf)    (0x101b0000 + (pf))
 
@@ -704,7 +703,6 @@ struct tlv_rate_limit {
   uint32_t rate_mbps;
 };
 
-
 /* OCSD Enable/Disable
  *
  * This setting allows OCSD to be disabled. This is a requirement for HP

From owner-svn-src-all@freebsd.org  Mon Jan 18 06:45:46 2016
Return-Path: <owner-svn-src-all@freebsd.org>
Delivered-To: svn-src-all@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9FCDBA860F8;
 Mon, 18 Jan 2016 06:45:46 +0000 (UTC)
 (envelope-from arybchik@FreeBSD.org)
Received: from repo.freebsd.org (repo.freebsd.org
 [IPv6:2610:1c1:1:6068::e6a:0])
 (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
 (Client did not present a certificate)
 by mx1.freebsd.org (Postfix) with ESMTPS id 70D601BFB;
 Mon, 18 Jan 2016 06:45:46 +0000 (UTC)
 (envelope-from arybchik@FreeBSD.org)
Received: from repo.freebsd.org ([127.0.1.37])
 by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u0I6jj0Z047539;
 Mon, 18 Jan 2016 06:45:45 GMT (envelope-from arybchik@FreeBSD.org)
Received: (from arybchik@localhost)
 by repo.freebsd.org (8.15.2/8.15.2/Submit) id u0I6jjrL047538;
 Mon, 18 Jan 2016 06:45:45 GMT (envelope-from arybchik@FreeBSD.org)
Message-Id: <201601180645.u0I6jjrL047538@repo.freebsd.org>
X-Authentication-Warning: repo.freebsd.org: arybchik set sender to
 arybchik@FreeBSD.org using -f
From: Andrew Rybchenko <arybchik@FreeBSD.org>
Date: Mon, 18 Jan 2016 06:45:45 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-head@freebsd.org
Subject: svn commit: r294257 - head/sys/dev/sfxge/common
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.20
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for &quot;
 user&quot; and &quot; projects&quot; \)" <svn-src-all.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-all/>
List-Post: <mailto:svn-src-all@freebsd.org>
List-Help: <mailto:svn-src-all-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Mon, 18 Jan 2016 06:45:46 -0000

Author: arybchik
Date: Mon Jan 18 06:45:45 2016
New Revision: 294257
URL: https://svnweb.freebsd.org/changeset/base/294257

Log:
  sfxge: regenerate siena_flash.h from FW sources
  
  Sponsored by:   Solarflare Communications, Inc.
  MFC after:      2 days

Modified:
  head/sys/dev/sfxge/common/siena_flash.h

Modified: head/sys/dev/sfxge/common/siena_flash.h
==============================================================================
--- head/sys/dev/sfxge/common/siena_flash.h	Mon Jan 18 06:39:06 2016	(r294256)
+++ head/sys/dev/sfxge/common/siena_flash.h	Mon Jan 18 06:45:45 2016	(r294257)
@@ -115,14 +115,14 @@ typedef struct siena_mc_boot_hdr_s {		/*
 	efx_word_t	checksum;		/* of whole header area + firmware image */
 	efx_word_t	firmware_version_d;
 	efx_byte_t	mcfw_subtype;
-	efx_byte_t	reserved_a[1];		/* (set to 0) */
+	efx_byte_t	generation;		/* Valid for medford, SBZ for earlier chips */
 	efx_dword_t	firmware_text_offset;	/* offset to firmware .text */
 	efx_dword_t	firmware_text_size;	/* length of firmware .text, in bytes */
 	efx_dword_t	firmware_data_offset;	/* offset to firmware .data */
 	efx_dword_t	firmware_data_size;	/* length of firmware .data, in bytes */
 	efx_byte_t	spi_rate;		/* SPI rate for reading image, 0 is BootROM default */
 	efx_byte_t	spi_phase_adj;		/* SPI SDO/SCL phase adjustment, 0 is default (no adj) */
-	efx_word_t	reserved_b[1];		/* (set to 0) */
+	efx_word_t	xpm_sector;		/* The sector that contains the key, or 0xffff if unsigned (medford) SBZ (earlier) */
 	efx_dword_t	reserved_c[7];		/* (set to 0) */
 } siena_mc_boot_hdr_t;
 

From owner-svn-src-all@freebsd.org  Mon Jan 18 06:45:47 2016
Return-Path: <owner-svn-src-all@freebsd.org>
Delivered-To: svn-src-all@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id EE572A860FC;
 Mon, 18 Jan 2016 06:45:46 +0000 (UTC)
 (envelope-from adrian.chadd@gmail.com)
Received: from mail-ig0-x229.google.com (mail-ig0-x229.google.com
 [IPv6:2607:f8b0:4001:c05::229])
 (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits))
 (Client CN "smtp.gmail.com",
 Issuer "Google Internet Authority G2" (verified OK))
 by mx1.freebsd.org (Postfix) with ESMTPS id B95911BFC;
 Mon, 18 Jan 2016 06:45:46 +0000 (UTC)
 (envelope-from adrian.chadd@gmail.com)
Received: by mail-ig0-x229.google.com with SMTP id ik10so49669188igb.1;
 Sun, 17 Jan 2016 22:45:46 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;
 h=mime-version:in-reply-to:references:date:message-id:subject:from:to
 :cc:content-type;
 bh=lmZ46+tNe7HQiumTLaOmyCBZRv13yti0t9jTerJbWdw=;
 b=zs8r3Fn4IQuXcVcn4yVdNvIeFWjCa2h4UnO0SXZwGyGHuc4PWM9v9jlJ+UMNXp940+
 CjLIGbRhwc98YzW1ABKhWZIzscT+MPISQAGbUCbLMH7UclUWUOHDeruwwBZkV+PEPJT9
 k4dQZW/ixOh4uI99AB1zZIyf+NDxLSEaLickIiAtl2MIVk5OB9ftS+QRHgbNUu1Xfuf+
 93FIWAa1mquceg9T8GFSNZ0jBEMKd2RWJplZ9kYqvbaO26yFZw5jBXbRwE0xg2JF5nqf
 W3izT1hqZIVNykzg9I9nycOY3MXYJN/N14cdCQVuf5l02rnA8EOhbXfCvpACmKiTzd0a
 3PuQ==
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:date
 :message-id:subject:from:to:cc:content-type;
 bh=lmZ46+tNe7HQiumTLaOmyCBZRv13yti0t9jTerJbWdw=;
 b=mBkdKXVZ9WkmTnrooWpKzziY/wQSOsQSh6YisJABlosErAp7mEiZFu9TdVcsfTtViW
 J+z4O8HSXiQDbX8j+7v7m6tUD+DoM/mVSZHCK2pY+FI8Qx6wj5dOv9P+x67jC+Yz360m
 SxxYgRPhGg6Ql7lvGb+0HSbX8WlsByR3G0ZwVpJmQtBRhQEcKRez96YIxMz3XHPpGhAb
 PyZtSn3HTsa1+EwVJvPBYk8eqYrFA08xDrkKs+geDz771GwRxUpBXAVYCSPJewqtxBAB
 AhCEayohGZNB3PdF1PwBgdBNMWFpnHFVGgHidIgmAazsdHPI0SqwLV+qood5bAO3EIeg
 XhWQ==
X-Gm-Message-State: AG10YOTgbvP8NpVBeAa5aC8pH7aqlOjQCUAVHURCqOZpxTLmnw5UQwZpIr+J4Aq8jOo/NOWe5AtHfBzUkGY4NA==
MIME-Version: 1.0
X-Received: by 10.50.137.41 with SMTP id qf9mr8733617igb.22.1453099545753;
 Sun, 17 Jan 2016 22:45:45 -0800 (PST)
Received: by 10.36.121.16 with HTTP; Sun, 17 Jan 2016 22:45:45 -0800 (PST)
In-Reply-To: <7A25B4D8-FA1C-47D7-889B-A17B4A3A52DC@FreeBSD.org>
References: <201601171521.u0HFLNvD063018@repo.freebsd.org>
 <7A25B4D8-FA1C-47D7-889B-A17B4A3A52DC@FreeBSD.org>
Date: Sun, 17 Jan 2016 22:45:45 -0800
Message-ID: <CAJ-VmomUgyCw2pAmhEfBJXPM_796A5NEZ+=ZfY2n19oEe2kj_w@mail.gmail.com>
Subject: Re: svn commit: r294227 - in head/lib: libc libc/gen libc/riscv
 libc/riscv/gen libc/riscv/sys libc/xdr libstand
From: Adrian Chadd <adrian.chadd@gmail.com>
To: "Bjoern A. Zeeb" <bz@freebsd.org>
Cc: Ruslan Bukin <br@freebsd.org>, Ed Maste <emaste@freebsd.org>, 
 src-committers <src-committers@freebsd.org>, 
 "svn-src-all@freebsd.org" <svn-src-all@freebsd.org>, 
 "svn-src-head@freebsd.org" <svn-src-head@freebsd.org>
Content-Type: text/plain; charset=UTF-8
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.20
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for &quot;
 user&quot; and &quot; projects&quot; \)" <svn-src-all.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-all/>
List-Post: <mailto:svn-src-all@freebsd.org>
List-Help: <mailto:svn-src-all-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Mon, 18 Jan 2016 06:45:47 -0000

Changing that && to || at line 105 doesn't fix it entirely:

/home/adrian/work/freebsd/head-embedded/src/../obj/mips_ap//mips.mips/usr/home/adrian/work/freebsd/head-embedded/src/tmp/usr/lib/libgcc_s.so:
undefined reference to `__gesf2'
/home/adrian/work/freebsd/head-embedded/src/../obj/mips_ap//mips.mips/usr/home/adrian/work/freebsd/head-embedded/src/tmp/usr/lib/libgcc_s.so:
undefined reference to `__ltdf2'
/home/adrian/work/freebsd/head-embedded/src/../obj/mips_ap//mips.mips/usr/home/adrian/work/freebsd/head-embedded/src/tmp/usr/lib/libgcc_s.so:
undefined reference to `__gedf2'
/home/adrian/work/freebsd/head-embedded/src/../obj/mips_ap//mips.mips/usr/home/adrian/work/freebsd/head-embedded/src/tmp/usr/lib/libgcc_s.so:
undefined reference to `__ltsf2'
/home/adrian/work/freebsd/head-embedded/src/../obj/mips_ap//mips.mips/usr/home/adrian/work/freebsd/head-embedded/src/tmp/usr/lib/libgcc_s.so:
undefined reference to `__eqsf2'
/home/adrian/work/freebsd/head-embedded/src/../obj/mips_ap//mips.mips/usr/home/adrian/work/freebsd/head-embedded/src/tmp/usr/lib/libgcc_s.so:
undefined reference to `__nesf2'
/home/adrian/work/freebsd/head-embedded/src/../obj/mips_ap//mips.mips/usr/home/adrian/work/freebsd/head-embedded/src/tmp/usr/lib/libgcc_s.so:
undefined reference to `__nedf2'
/home/adrian/work/freebsd/head-embedded/src/../obj/mips_ap//mips.mips/usr/home/adrian/work/freebsd/head-embedded/src/tmp/usr/lib/libgcc_s.so:
undefined reference to `__eqdf2'

ruslan - please do a make universe and fix it up; I can't do any MIPS
work now :(



-a

From owner-svn-src-all@freebsd.org  Mon Jan 18 06:54:16 2016
Return-Path: <owner-svn-src-all@freebsd.org>
Delivered-To: svn-src-all@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8D1BDA86483;
 Mon, 18 Jan 2016 06:54:16 +0000 (UTC)
 (envelope-from arybchik@FreeBSD.org)
Received: from repo.freebsd.org (repo.freebsd.org
 [IPv6:2610:1c1:1:6068::e6a:0])
 (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
 (Client did not present a certificate)
 by mx1.freebsd.org (Postfix) with ESMTPS id 59F73128F;
 Mon, 18 Jan 2016 06:54:16 +0000 (UTC)
 (envelope-from arybchik@FreeBSD.org)
Received: from repo.freebsd.org ([127.0.1.37])
 by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u0I6sF1t050405;
 Mon, 18 Jan 2016 06:54:15 GMT (envelope-from arybchik@FreeBSD.org)
Received: (from arybchik@localhost)
 by repo.freebsd.org (8.15.2/8.15.2/Submit) id u0I6sFSQ050404;
 Mon, 18 Jan 2016 06:54:15 GMT (envelope-from arybchik@FreeBSD.org)
Message-Id: <201601180654.u0I6sFSQ050404@repo.freebsd.org>
X-Authentication-Warning: repo.freebsd.org: arybchik set sender to
 arybchik@FreeBSD.org using -f
From: Andrew Rybchenko <arybchik@FreeBSD.org>
Date: Mon, 18 Jan 2016 06:54:15 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-head@freebsd.org
Subject: svn commit: r294258 - head/sys/dev/sfxge/common
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.20
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for &quot;
 user&quot; and &quot; projects&quot; \)" <svn-src-all.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-all/>
List-Post: <mailto:svn-src-all@freebsd.org>
List-Help: <mailto:svn-src-all-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Mon, 18 Jan 2016 06:54:16 -0000

Author: arybchik
Date: Mon Jan 18 06:54:15 2016
New Revision: 294258
URL: https://svnweb.freebsd.org/changeset/base/294258

Log:
  sfxge: fix unused function warning
  
  Sponsored by:   Solarflare Communications, Inc.
  MFC after:      2 days

Modified:
  head/sys/dev/sfxge/common/hunt_nvram.c

Modified: head/sys/dev/sfxge/common/hunt_nvram.c
==============================================================================
--- head/sys/dev/sfxge/common/hunt_nvram.c	Mon Jan 18 06:45:45 2016	(r294257)
+++ head/sys/dev/sfxge/common/hunt_nvram.c	Mon Jan 18 06:54:15 2016	(r294258)
@@ -1636,6 +1636,7 @@ ef10_nvram_type_to_partn(
 	return (ENOTSUP);
 }
 
+#if EFSYS_OPT_DIAG
 
 static	__checkReturn		efx_rc_t
 ef10_nvram_partn_to_type(
@@ -1665,9 +1666,6 @@ ef10_nvram_partn_to_type(
 	return (ENOTSUP);
 }
 
-
-#if EFSYS_OPT_DIAG
-
 	__checkReturn		efx_rc_t
 ef10_nvram_test(
 	__in			efx_nic_t *enp)

From owner-svn-src-all@freebsd.org  Mon Jan 18 06:59:01 2016
Return-Path: <owner-svn-src-all@freebsd.org>
Delivered-To: svn-src-all@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id D1C8AA865F2;
 Mon, 18 Jan 2016 06:59:01 +0000 (UTC)
 (envelope-from arybchik@FreeBSD.org)
Received: from repo.freebsd.org (repo.freebsd.org
 [IPv6:2610:1c1:1:6068::e6a:0])
 (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
 (Client did not present a certificate)
 by mx1.freebsd.org (Postfix) with ESMTPS id 896DF1458;
 Mon, 18 Jan 2016 06:59:01 +0000 (UTC)
 (envelope-from arybchik@FreeBSD.org)
Received: from repo.freebsd.org ([127.0.1.37])
 by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u0I6x0CL050618;
 Mon, 18 Jan 2016 06:59:00 GMT (envelope-from arybchik@FreeBSD.org)
Received: (from arybchik@localhost)
 by repo.freebsd.org (8.15.2/8.15.2/Submit) id u0I6x0qk050617;
 Mon, 18 Jan 2016 06:59:00 GMT (envelope-from arybchik@FreeBSD.org)
Message-Id: <201601180659.u0I6x0qk050617@repo.freebsd.org>
X-Authentication-Warning: repo.freebsd.org: arybchik set sender to
 arybchik@FreeBSD.org using -f
From: Andrew Rybchenko <arybchik@FreeBSD.org>
Date: Mon, 18 Jan 2016 06:59:00 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-head@freebsd.org
Subject: svn commit: r294259 - head/sys/dev/sfxge/common
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.20
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for &quot;
 user&quot; and &quot; projects&quot; \)" <svn-src-all.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-all/>
List-Post: <mailto:svn-src-all@freebsd.org>
List-Help: <mailto:svn-src-all-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Mon, 18 Jan 2016 06:59:01 -0000

Author: arybchik
Date: Mon Jan 18 06:59:00 2016
New Revision: 294259
URL: https://svnweb.freebsd.org/changeset/base/294259

Log:
  sfxge: regenerate EF10 registers definition for Medford
  
  Sponsored by:   Solarflare Communications, Inc.
  MFC after:      2 days

Modified:
  head/sys/dev/sfxge/common/efx_regs_ef10.h

Modified: head/sys/dev/sfxge/common/efx_regs_ef10.h
==============================================================================
--- head/sys/dev/sfxge/common/efx_regs_ef10.h	Mon Jan 18 06:54:15 2016	(r294258)
+++ head/sys/dev/sfxge/common/efx_regs_ef10.h	Mon Jan 18 06:59:00 2016	(r294259)
@@ -50,7 +50,7 @@ extern "C" {
  */
 
 #define	ER_DZ_BIU_HW_REV_ID_REG_OFST 0x00000000
-/* hunta0=pcie_pf_bar2 */
+/* hunta0,medforda0=pcie_pf_bar2 */
 #define	ER_DZ_BIU_HW_REV_ID_REG_RESET 0xeb14face
 
 
@@ -64,7 +64,7 @@ extern "C" {
  */
 
 #define	ER_DZ_BIU_MC_SFT_STATUS_REG_OFST 0x00000010
-/* hunta0=pcie_pf_bar2 */
+/* hunta0,medforda0=pcie_pf_bar2 */
 #define	ER_DZ_BIU_MC_SFT_STATUS_REG_STEP 4
 #define	ER_DZ_BIU_MC_SFT_STATUS_REG_ROWS 8
 #define	ER_DZ_BIU_MC_SFT_STATUS_REG_RESET 0x1111face
@@ -80,7 +80,7 @@ extern "C" {
  */
 
 #define	ER_DZ_BIU_INT_ISR_REG_OFST 0x00000090
-/* hunta0=pcie_pf_bar2 */
+/* hunta0,medforda0=pcie_pf_bar2 */
 #define	ER_DZ_BIU_INT_ISR_REG_RESET 0x0
 
 
@@ -94,7 +94,7 @@ extern "C" {
  */
 
 #define	ER_DZ_MC_DB_LWRD_REG_OFST 0x00000200
-/* hunta0=pcie_pf_bar2 */
+/* hunta0,medforda0=pcie_pf_bar2 */
 #define	ER_DZ_MC_DB_LWRD_REG_RESET 0x0
 
 
@@ -108,7 +108,7 @@ extern "C" {
  */
 
 #define	ER_DZ_MC_DB_HWRD_REG_OFST 0x00000204
-/* hunta0=pcie_pf_bar2 */
+/* hunta0,medforda0=pcie_pf_bar2 */
 #define	ER_DZ_MC_DB_HWRD_REG_RESET 0x0
 
 
@@ -122,7 +122,7 @@ extern "C" {
  */
 
 #define	ER_DZ_EVQ_RPTR_REG_OFST 0x00000400
-/* hunta0=pcie_pf_bar2 */
+/* hunta0,medforda0=pcie_pf_bar2 */
 #define	ER_DZ_EVQ_RPTR_REG_STEP 8192
 #define	ER_DZ_EVQ_RPTR_REG_ROWS 2048
 #define	ER_DZ_EVQ_RPTR_REG_RESET 0x0
@@ -140,7 +140,7 @@ extern "C" {
  */
 
 #define	ER_DZ_EVQ_TMR_REG_OFST 0x00000420
-/* hunta0=pcie_pf_bar2 */
+/* hunta0,medforda0=pcie_pf_bar2 */
 #define	ER_DZ_EVQ_TMR_REG_STEP 8192
 #define	ER_DZ_EVQ_TMR_REG_ROWS 2048
 #define	ER_DZ_EVQ_TMR_REG_RESET 0x0
@@ -158,7 +158,7 @@ extern "C" {
  */
 
 #define	ER_DZ_RX_DESC_UPD_REG_OFST 0x00000830
-/* hunta0=pcie_pf_bar2 */
+/* hunta0,medforda0=pcie_pf_bar2 */
 #define	ER_DZ_RX_DESC_UPD_REG_STEP 8192
 #define	ER_DZ_RX_DESC_UPD_REG_ROWS 2048
 #define	ER_DZ_RX_DESC_UPD_REG_RESET 0x0
@@ -174,7 +174,7 @@ extern "C" {
  */
 
 #define	ER_DZ_TX_DESC_UPD_REG_OFST 0x00000a10
-/* hunta0=pcie_pf_bar2 */
+/* hunta0,medforda0=pcie_pf_bar2 */
 #define	ER_DZ_TX_DESC_UPD_REG_STEP 8192
 #define	ER_DZ_TX_DESC_UPD_REG_ROWS 2048
 #define	ER_DZ_TX_DESC_UPD_REG_RESET 0x0
@@ -248,8 +248,14 @@ extern "C" {
 #define	ESF_DZ_RX_OVERRIDE_HOLDOFF_WIDTH 1
 #define	ESF_DZ_RX_DROP_EVENT_LBN 58
 #define	ESF_DZ_RX_DROP_EVENT_WIDTH 1
-#define	ESF_DZ_RX_EV_RSVD2_LBN 54
-#define	ESF_DZ_RX_EV_RSVD2_WIDTH 4
+#define	ESF_DD_RX_EV_RSVD2_LBN 54
+#define	ESF_DD_RX_EV_RSVD2_WIDTH 4
+#define	ESF_EZ_RX_TCP_UDP_INNER_CHKSUM_ERR_LBN 57
+#define	ESF_EZ_RX_TCP_UDP_INNER_CHKSUM_ERR_WIDTH 1
+#define	ESF_EZ_RX_IP_INNER_CHKSUM_ERR_LBN 56
+#define	ESF_EZ_RX_IP_INNER_CHKSUM_ERR_WIDTH 1
+#define	ESF_EZ_RX_EV_RSVD2_LBN 54
+#define	ESF_EZ_RX_EV_RSVD2_WIDTH 2
 #define	ESF_DZ_RX_EV_SOFT2_LBN 52
 #define	ESF_DZ_RX_EV_SOFT2_WIDTH 2
 #define	ESF_DZ_RX_DSC_PTR_LBITS_LBN 48
@@ -293,10 +299,21 @@ extern "C" {
 #define	ESF_DZ_RX_MAC_CLASS_WIDTH 1
 #define	ESE_DZ_MAC_CLASS_MCAST 1
 #define	ESE_DZ_MAC_CLASS_UCAST 0
-#define	ESF_DZ_RX_EV_SOFT1_LBN 32
-#define	ESF_DZ_RX_EV_SOFT1_WIDTH 3
-#define	ESF_DZ_RX_EV_RSVD1_LBN 30
-#define	ESF_DZ_RX_EV_RSVD1_WIDTH 2
+#define	ESF_DD_RX_EV_SOFT1_LBN 32
+#define	ESF_DD_RX_EV_SOFT1_WIDTH 3
+#define	ESF_EZ_RX_EV_SOFT1_LBN 34
+#define	ESF_EZ_RX_EV_SOFT1_WIDTH 1
+#define	ESF_EZ_RX_ENCAP_HDR_LBN 32
+#define	ESF_EZ_RX_ENCAP_HDR_WIDTH 2
+#define	ESE_EZ_ENCAP_HDR_GRE 2
+#define	ESE_EZ_ENCAP_HDR_VXLAN 1
+#define	ESE_EZ_ENCAP_HDR_NONE 0
+#define	ESF_DD_RX_EV_RSVD1_LBN 30
+#define	ESF_DD_RX_EV_RSVD1_WIDTH 2
+#define	ESF_EZ_RX_EV_RSVD1_LBN 31
+#define	ESF_EZ_RX_EV_RSVD1_WIDTH 1
+#define	ESF_EZ_RX_ABORT_LBN 30
+#define	ESF_EZ_RX_ABORT_WIDTH 1
 #define	ESF_DZ_RX_ECC_ERR_LBN 29
 #define	ESF_DZ_RX_ECC_ERR_WIDTH 1
 #define	ESF_DZ_RX_CRC1_ERR_LBN 28
@@ -369,12 +386,22 @@ extern "C" {
 #define	ESF_DZ_TX_OVERRIDE_HOLDOFF_WIDTH 1
 #define	ESF_DZ_TX_DROP_EVENT_LBN 58
 #define	ESF_DZ_TX_DROP_EVENT_WIDTH 1
-#define	ESF_DZ_TX_EV_RSVD_LBN 48
-#define	ESF_DZ_TX_EV_RSVD_WIDTH 10
+#define	ESF_DD_TX_EV_RSVD_LBN 48
+#define	ESF_DD_TX_EV_RSVD_WIDTH 10
+#define	ESF_EZ_TCP_UDP_INNER_CHKSUM_ERR_LBN 57
+#define	ESF_EZ_TCP_UDP_INNER_CHKSUM_ERR_WIDTH 1
+#define	ESF_EZ_IP_INNER_CHKSUM_ERR_LBN 56
+#define	ESF_EZ_IP_INNER_CHKSUM_ERR_WIDTH 1
+#define	ESF_EZ_TX_EV_RSVD_LBN 48
+#define	ESF_EZ_TX_EV_RSVD_WIDTH 8
 #define	ESF_DZ_TX_SOFT2_LBN 32
 #define	ESF_DZ_TX_SOFT2_WIDTH 16
-#define	ESF_DZ_TX_SOFT1_LBN 24
-#define	ESF_DZ_TX_SOFT1_WIDTH 8
+#define	ESF_DD_TX_SOFT1_LBN 24
+#define	ESF_DD_TX_SOFT1_WIDTH 8
+#define	ESF_EZ_TX_CAN_MERGE_LBN 31
+#define	ESF_EZ_TX_CAN_MERGE_WIDTH 1
+#define	ESF_EZ_TX_SOFT1_LBN 24
+#define	ESF_EZ_TX_SOFT1_WIDTH 7
 #define	ESF_DZ_TX_QLABEL_LBN 16
 #define	ESF_DZ_TX_QLABEL_WIDTH 5
 #define	ESF_DZ_TX_DESCR_INDX_LBN 0

From owner-svn-src-all@freebsd.org  Mon Jan 18 08:41:05 2016
Return-Path: <owner-svn-src-all@freebsd.org>
Delivered-To: svn-src-all@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id 214BFA866B8;
 Mon, 18 Jan 2016 08:41:05 +0000 (UTC)
 (envelope-from delphij@FreeBSD.org)
Received: from repo.freebsd.org (repo.freebsd.org
 [IPv6:2610:1c1:1:6068::e6a:0])
 (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
 (Client did not present a certificate)
 by mx1.freebsd.org (Postfix) with ESMTPS id E0EBC132F;
 Mon, 18 Jan 2016 08:41:04 +0000 (UTC)
 (envelope-from delphij@FreeBSD.org)
Received: from repo.freebsd.org ([127.0.1.37])
 by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u0I8f3W5079598;
 Mon, 18 Jan 2016 08:41:03 GMT (envelope-from delphij@FreeBSD.org)
Received: (from delphij@localhost)
 by repo.freebsd.org (8.15.2/8.15.2/Submit) id u0I8f3Mi079597;
 Mon, 18 Jan 2016 08:41:03 GMT (envelope-from delphij@FreeBSD.org)
Message-Id: <201601180841.u0I8f3Mi079597@repo.freebsd.org>
X-Authentication-Warning: repo.freebsd.org: delphij set sender to
 delphij@FreeBSD.org using -f
From: Xin LI <delphij@FreeBSD.org>
Date: Mon, 18 Jan 2016 08:41:03 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-vendor@freebsd.org
Subject: svn commit: r294260 - vendor/mdocml/dist
X-SVN-Group: vendor
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.20
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for &quot;
 user&quot; and &quot; projects&quot; \)" <svn-src-all.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-all/>
List-Post: <mailto:svn-src-all@freebsd.org>
List-Help: <mailto:svn-src-all-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Mon, 18 Jan 2016 08:41:05 -0000

Author: delphij
Date: Mon Jan 18 08:41:03 2016
New Revision: 294260
URL: https://svnweb.freebsd.org/changeset/base/294260

Log:
  Fix a wrong assertion in mandoc by applying OpenBSD
  main.c,v 1.170 (florian):
  
  Unbreak reading from stdin after recent parse() restructuring.
  OK schwarze@

Modified:
  vendor/mdocml/dist/main.c

Modified: vendor/mdocml/dist/main.c
==============================================================================
--- vendor/mdocml/dist/main.c	Mon Jan 18 06:59:00 2016	(r294259)
+++ vendor/mdocml/dist/main.c	Mon Jan 18 08:41:03 2016	(r294260)
@@ -720,7 +720,7 @@ parse(struct curparse *curp, int fd, con
 	/* Begin by parsing the file itself. */
 
 	assert(file);
-	assert(fd > 0);
+	assert(fd >= 0);
 
 	rctmp = mparse_readfd(curp->mp, fd, file);
 	if (fd != STDIN_FILENO)

From owner-svn-src-all@freebsd.org  Mon Jan 18 08:52:11 2016
Return-Path: <owner-svn-src-all@freebsd.org>
Delivered-To: svn-src-all@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id 55175A86D72;
 Mon, 18 Jan 2016 08:52:11 +0000 (UTC)
 (envelope-from delphij@FreeBSD.org)
Received: from repo.freebsd.org (repo.freebsd.org
 [IPv6:2610:1c1:1:6068::e6a:0])
 (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
 (Client did not present a certificate)
 by mx1.freebsd.org (Postfix) with ESMTPS id 26D7D1A1B;
 Mon, 18 Jan 2016 08:52:11 +0000 (UTC)
 (envelope-from delphij@FreeBSD.org)
Received: from repo.freebsd.org ([127.0.1.37])
 by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u0I8qAe8085180;
 Mon, 18 Jan 2016 08:52:10 GMT (envelope-from delphij@FreeBSD.org)
Received: (from delphij@localhost)
 by repo.freebsd.org (8.15.2/8.15.2/Submit) id u0I8qAO3085179;
 Mon, 18 Jan 2016 08:52:10 GMT (envelope-from delphij@FreeBSD.org)
Message-Id: <201601180852.u0I8qAO3085179@repo.freebsd.org>
X-Authentication-Warning: repo.freebsd.org: delphij set sender to
 delphij@FreeBSD.org using -f
From: Xin LI <delphij@FreeBSD.org>
Date: Mon, 18 Jan 2016 08:52:10 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-head@freebsd.org
Subject: svn commit: r294261 - head/contrib/mdocml
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.20
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for &quot;
 user&quot; and &quot; projects&quot; \)" <svn-src-all.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-all/>
List-Post: <mailto:svn-src-all@freebsd.org>
List-Help: <mailto:svn-src-all-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Mon, 18 Jan 2016 08:52:11 -0000

Author: delphij
Date: Mon Jan 18 08:52:09 2016
New Revision: 294261
URL: https://svnweb.freebsd.org/changeset/base/294261

Log:
  MFV r294260:
  
  Fix a wrong assertion in mandoc by applying OpenBSD
  main.c,v 1.170 (florian):
  
  Unbreak reading from stdin after recent parse() restructuring.
  OK schwarze@

Modified:
  head/contrib/mdocml/main.c
Directory Properties:
  head/contrib/mdocml/   (props changed)

Modified: head/contrib/mdocml/main.c
==============================================================================
--- head/contrib/mdocml/main.c	Mon Jan 18 08:41:03 2016	(r294260)
+++ head/contrib/mdocml/main.c	Mon Jan 18 08:52:09 2016	(r294261)
@@ -720,7 +720,7 @@ parse(struct curparse *curp, int fd, con
 	/* Begin by parsing the file itself. */
 
 	assert(file);
-	assert(fd > 0);
+	assert(fd >= 0);
 
 	rctmp = mparse_readfd(curp->mp, fd, file);
 	if (fd != STDIN_FILENO)

From owner-svn-src-all@freebsd.org  Mon Jan 18 09:36:11 2016
Return-Path: <owner-svn-src-all@freebsd.org>
Delivered-To: svn-src-all@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id 88F24A87FFC;
 Mon, 18 Jan 2016 09:36:11 +0000 (UTC) (envelope-from br@FreeBSD.org)
Received: from repo.freebsd.org (repo.freebsd.org
 [IPv6:2610:1c1:1:6068::e6a:0])
 (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
 (Client did not present a certificate)
 by mx1.freebsd.org (Postfix) with ESMTPS id 5BA861FED;
 Mon, 18 Jan 2016 09:36:11 +0000 (UTC) (envelope-from br@FreeBSD.org)
Received: from repo.freebsd.org ([127.0.1.37])
 by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u0I9aA5K097013;
 Mon, 18 Jan 2016 09:36:10 GMT (envelope-from br@FreeBSD.org)
Received: (from br@localhost)
 by repo.freebsd.org (8.15.2/8.15.2/Submit) id u0I9aAMj097012;
 Mon, 18 Jan 2016 09:36:10 GMT (envelope-from br@FreeBSD.org)
Message-Id: <201601180936.u0I9aAMj097012@repo.freebsd.org>
X-Authentication-Warning: repo.freebsd.org: br set sender to br@FreeBSD.org
 using -f
From: Ruslan Bukin <br@FreeBSD.org>
Date: Mon, 18 Jan 2016 09:36:10 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-head@freebsd.org
Subject: svn commit: r294262 - head/lib/libc
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.20
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for &quot;
 user&quot; and &quot; projects&quot; \)" <svn-src-all.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-all/>
List-Post: <mailto:svn-src-all@freebsd.org>
List-Help: <mailto:svn-src-all-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Mon, 18 Jan 2016 09:36:11 -0000

Author: br
Date: Mon Jan 18 09:36:10 2016
New Revision: 294262
URL: https://svnweb.freebsd.org/changeset/base/294262

Log:
  Fix compilation on MIPS (typo introduced in r294227).

Modified:
  head/lib/libc/Makefile

Modified: head/lib/libc/Makefile
==============================================================================
--- head/lib/libc/Makefile	Mon Jan 18 08:52:09 2016	(r294261)
+++ head/lib/libc/Makefile	Mon Jan 18 09:36:10 2016	(r294262)
@@ -102,7 +102,7 @@ NOASM=
 .include "${LIBC_SRCTOP}/uuid/Makefile.inc"
 .include "${LIBC_SRCTOP}/xdr/Makefile.inc"
 .if (${LIBC_ARCH} == "arm" && ${MACHINE_ARCH} != "armv6hf") ||\
-     ${LIBC_ARCH} == "mips" && ${LIBC_ARCH} == "riscv"
+     ${LIBC_ARCH} == "mips"
 .include "${LIBC_SRCTOP}/softfloat/Makefile.inc"
 .endif
 .if ${MK_NIS} != "no"

From owner-svn-src-all@freebsd.org  Mon Jan 18 11:47:05 2016
Return-Path: <owner-svn-src-all@freebsd.org>
Delivered-To: svn-src-all@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6EE15A86544;
 Mon, 18 Jan 2016 11:47:05 +0000 (UTC) (envelope-from ae@FreeBSD.org)
Received: from repo.freebsd.org (repo.freebsd.org
 [IPv6:2610:1c1:1:6068::e6a:0])
 (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
 (Client did not present a certificate)
 by mx1.freebsd.org (Postfix) with ESMTPS id 471DF1FAF;
 Mon, 18 Jan 2016 11:47:05 +0000 (UTC) (envelope-from ae@FreeBSD.org)
Received: from repo.freebsd.org ([127.0.1.37])
 by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u0IBl4Q3035324;
 Mon, 18 Jan 2016 11:47:04 GMT (envelope-from ae@FreeBSD.org)
Received: (from ae@localhost)
 by repo.freebsd.org (8.15.2/8.15.2/Submit) id u0IBl47o035321;
 Mon, 18 Jan 2016 11:47:04 GMT (envelope-from ae@FreeBSD.org)
Message-Id: <201601181147.u0IBl47o035321@repo.freebsd.org>
X-Authentication-Warning: repo.freebsd.org: ae set sender to ae@FreeBSD.org
 using -f
From: "Andrey V. Elsukov" <ae@FreeBSD.org>
Date: Mon, 18 Jan 2016 11:47:04 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org
Subject: svn commit: r294263 - stable/10/sys/fs/smbfs
X-SVN-Group: stable-10
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.20
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for &quot;
 user&quot; and &quot; projects&quot; \)" <svn-src-all.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-all/>
List-Post: <mailto:svn-src-all@freebsd.org>
List-Help: <mailto:svn-src-all-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Mon, 18 Jan 2016 11:47:05 -0000

Author: ae
Date: Mon Jan 18 11:47:03 2016
New Revision: 294263
URL: https://svnweb.freebsd.org/changeset/base/294263

Log:
  MFC r293679:
    Change the type of newsize argument in the smbfs_smb_setfsize() function
    from int to int64.
    MSDN says that SMB_SET_FILE_END_OF_FILE_INFO uses signed 64-bit integer
    to specify offset, but since smbfs_smb_setfsize() has used plain int,
    a value was truncated in case when offset was larger than 2G.
    	https://msdn.microsoft.com/en-us/library/ff469975.aspx
  
    In particular, now `truncate -s 10G` will work correctly on the mounted
    SMB share.

Modified:
  stable/10/sys/fs/smbfs/smbfs_smb.c
  stable/10/sys/fs/smbfs/smbfs_subr.h
  stable/10/sys/fs/smbfs/smbfs_vnops.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/sys/fs/smbfs/smbfs_smb.c
==============================================================================
--- stable/10/sys/fs/smbfs/smbfs_smb.c	Mon Jan 18 09:36:10 2016	(r294262)
+++ stable/10/sys/fs/smbfs/smbfs_smb.c	Mon Jan 18 11:47:03 2016	(r294263)
@@ -333,18 +333,18 @@ smbfs_smb_flush(struct smbnode *np, stru
 }
 
 int
-smbfs_smb_setfsize(struct smbnode *np, int newsize, struct smb_cred *scred)
+smbfs_smb_setfsize(struct smbnode *np, int64_t newsize, struct smb_cred *scred)
 {
 	struct smb_share *ssp = np->n_mount->sm_share;
 	struct smb_rq *rqp;
 	struct mbchain *mbp;
 	int error;
 
-	if (!smbfs_smb_seteof(np, (int64_t) newsize, scred)) {
+	if (!smbfs_smb_seteof(np, newsize, scred)) {
 		np->n_flag |= NFLUSHWIRE;
 		return (0);
 	}
-
+	/* XXX: We should use SMB_COM_WRITE_ANDX to support large offsets */
 	error = smb_rq_alloc(SSTOCP(ssp), SMB_COM_WRITE, scred, &rqp);
 	if (error)
 		return (error);
@@ -352,7 +352,7 @@ smbfs_smb_setfsize(struct smbnode *np, i
 	smb_rq_wstart(rqp);
 	mb_put_mem(mbp, (caddr_t)&np->n_fid, 2, MB_MSYSTEM);
 	mb_put_uint16le(mbp, 0);
-	mb_put_uint32le(mbp, newsize);
+	mb_put_uint32le(mbp, (uint32_t)newsize);
 	mb_put_uint16le(mbp, 0);
 	smb_rq_wend(rqp);
 	smb_rq_bstart(rqp);

Modified: stable/10/sys/fs/smbfs/smbfs_subr.h
==============================================================================
--- stable/10/sys/fs/smbfs/smbfs_subr.h	Mon Jan 18 09:36:10 2016	(r294262)
+++ stable/10/sys/fs/smbfs/smbfs_subr.h	Mon Jan 18 11:47:03 2016	(r294263)
@@ -128,7 +128,8 @@ int  smbfs_smb_lock(struct smbnode *np, 
 	off_t start, off_t end,	struct smb_cred *scred);
 int  smbfs_smb_statfs(struct smb_share *ssp, struct statfs *sbp,
 	struct smb_cred *scred);
-int  smbfs_smb_setfsize(struct smbnode *np, int newsize, struct smb_cred *scred);
+int  smbfs_smb_setfsize(struct smbnode *np, int64_t newsize,
+	struct smb_cred *scred);
 
 int  smbfs_smb_query_info(struct smbnode *np, const char *name, int len,
 	struct smbfattr *fap, struct smb_cred *scred);

Modified: stable/10/sys/fs/smbfs/smbfs_vnops.c
==============================================================================
--- stable/10/sys/fs/smbfs/smbfs_vnops.c	Mon Jan 18 09:36:10 2016	(r294262)
+++ stable/10/sys/fs/smbfs/smbfs_vnops.c	Mon Jan 18 11:47:03 2016	(r294263)
@@ -358,7 +358,8 @@ smbfs_setattr(ap)
 				doclose = 1;
 		}
 		if (error == 0)
-			error = smbfs_smb_setfsize(np, vap->va_size, scred);
+			error = smbfs_smb_setfsize(np,
+			    (int64_t)vap->va_size, scred);
 		if (doclose)
 			smbfs_smb_close(ssp, np->n_fid, NULL, scred);
 		if (error) {

From owner-svn-src-all@freebsd.org  Mon Jan 18 11:51:42 2016
Return-Path: <owner-svn-src-all@freebsd.org>
Delivered-To: svn-src-all@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id B8BB5A86689;
 Mon, 18 Jan 2016 11:51:42 +0000 (UTC) (envelope-from ae@FreeBSD.org)
Received: from repo.freebsd.org (repo.freebsd.org
 [IPv6:2610:1c1:1:6068::e6a:0])
 (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
 (Client did not present a certificate)
 by mx1.freebsd.org (Postfix) with ESMTPS id 9624F1271;
 Mon, 18 Jan 2016 11:51:42 +0000 (UTC) (envelope-from ae@FreeBSD.org)
Received: from repo.freebsd.org ([127.0.1.37])
 by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u0IBpfWc036143;
 Mon, 18 Jan 2016 11:51:41 GMT (envelope-from ae@FreeBSD.org)
Received: (from ae@localhost)
 by repo.freebsd.org (8.15.2/8.15.2/Submit) id u0IBpfYp036140;
 Mon, 18 Jan 2016 11:51:41 GMT (envelope-from ae@FreeBSD.org)
Message-Id: <201601181151.u0IBpfYp036140@repo.freebsd.org>
X-Authentication-Warning: repo.freebsd.org: ae set sender to ae@FreeBSD.org
 using -f
From: "Andrey V. Elsukov" <ae@FreeBSD.org>
Date: Mon, 18 Jan 2016 11:51:41 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org
Subject: svn commit: r294264 - stable/9/sys/fs/smbfs
X-SVN-Group: stable-9
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.20
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for &quot;
 user&quot; and &quot; projects&quot; \)" <svn-src-all.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-all/>
List-Post: <mailto:svn-src-all@freebsd.org>
List-Help: <mailto:svn-src-all-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Mon, 18 Jan 2016 11:51:42 -0000

Author: ae
Date: Mon Jan 18 11:51:41 2016
New Revision: 294264
URL: https://svnweb.freebsd.org/changeset/base/294264

Log:
  MFC r293679:
    Change the type of newsize argument in the smbfs_smb_setfsize() function
    from int to int64.
    MSDN says that SMB_SET_FILE_END_OF_FILE_INFO uses signed 64-bit integer
    to specify offset, but since smbfs_smb_setfsize() has used plain int,
    a value was truncated in case when offset was larger than 2G.
    	https://msdn.microsoft.com/en-us/library/ff469975.aspx
  
    In particular, now `truncate -s 10G` will work correctly on the mounted
    SMB share.

Modified:
  stable/9/sys/fs/smbfs/smbfs_smb.c
  stable/9/sys/fs/smbfs/smbfs_subr.h
  stable/9/sys/fs/smbfs/smbfs_vnops.c
Directory Properties:
  stable/9/sys/   (props changed)
  stable/9/sys/fs/   (props changed)

Modified: stable/9/sys/fs/smbfs/smbfs_smb.c
==============================================================================
--- stable/9/sys/fs/smbfs/smbfs_smb.c	Mon Jan 18 11:47:03 2016	(r294263)
+++ stable/9/sys/fs/smbfs/smbfs_smb.c	Mon Jan 18 11:51:41 2016	(r294264)
@@ -331,18 +331,18 @@ smbfs_smb_flush(struct smbnode *np, stru
 }
 
 int
-smbfs_smb_setfsize(struct smbnode *np, int newsize, struct smb_cred *scred)
+smbfs_smb_setfsize(struct smbnode *np, int64_t newsize, struct smb_cred *scred)
 {
 	struct smb_share *ssp = np->n_mount->sm_share;
 	struct smb_rq rq, *rqp = &rq;
 	struct mbchain *mbp;
 	int error;
 
-	if (!smbfs_smb_seteof(np, (int64_t) newsize, scred)) {
+	if (!smbfs_smb_seteof(np, newsize, scred)) {
 		np->n_flag |= NFLUSHWIRE;
 		return (0);
 	}
-
+	/* XXX: We should use SMB_COM_WRITE_ANDX to support large offsets */
 	error = smb_rq_init(rqp, SSTOCP(ssp), SMB_COM_WRITE, scred);
 	if (error)
 		return error;
@@ -350,7 +350,7 @@ smbfs_smb_setfsize(struct smbnode *np, i
 	smb_rq_wstart(rqp);
 	mb_put_mem(mbp, (caddr_t)&np->n_fid, 2, MB_MSYSTEM);
 	mb_put_uint16le(mbp, 0);
-	mb_put_uint32le(mbp, newsize);
+	mb_put_uint32le(mbp, (uint32_t)newsize);
 	mb_put_uint16le(mbp, 0);
 	smb_rq_wend(rqp);
 	smb_rq_bstart(rqp);

Modified: stable/9/sys/fs/smbfs/smbfs_subr.h
==============================================================================
--- stable/9/sys/fs/smbfs/smbfs_subr.h	Mon Jan 18 11:47:03 2016	(r294263)
+++ stable/9/sys/fs/smbfs/smbfs_subr.h	Mon Jan 18 11:51:41 2016	(r294264)
@@ -127,7 +127,8 @@ int  smbfs_smb_lock(struct smbnode *np, 
 	off_t start, off_t end,	struct smb_cred *scred);
 int  smbfs_smb_statfs(struct smb_share *ssp, struct statfs *sbp,
 	struct smb_cred *scred);
-int  smbfs_smb_setfsize(struct smbnode *np, int newsize, struct smb_cred *scred);
+int  smbfs_smb_setfsize(struct smbnode *np, int64_t newsize,
+	struct smb_cred *scred);
 
 int  smbfs_smb_query_info(struct smbnode *np, const char *name, int len,
 	struct smbfattr *fap, struct smb_cred *scred);

Modified: stable/9/sys/fs/smbfs/smbfs_vnops.c
==============================================================================
--- stable/9/sys/fs/smbfs/smbfs_vnops.c	Mon Jan 18 11:47:03 2016	(r294263)
+++ stable/9/sys/fs/smbfs/smbfs_vnops.c	Mon Jan 18 11:51:41 2016	(r294264)
@@ -332,7 +332,8 @@ smbfs_setattr(ap)
 				doclose = 1;
 		}
 		if (error == 0)
-			error = smbfs_smb_setfsize(np, vap->va_size, &scred);
+			error = smbfs_smb_setfsize(np,
+			    (int64_t)vap->va_size, &scred);
 		if (doclose)
 			smbfs_smb_close(ssp, np->n_fid, NULL, &scred);
 		if (error) {

From owner-svn-src-all@freebsd.org  Mon Jan 18 12:02:06 2016
Return-Path: <owner-svn-src-all@freebsd.org>
Delivered-To: svn-src-all@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id EA852A87094;
 Mon, 18 Jan 2016 12:02:06 +0000 (UTC) (envelope-from smh@FreeBSD.org)
Received: from repo.freebsd.org (repo.freebsd.org
 [IPv6:2610:1c1:1:6068::e6a:0])
 (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
 (Client did not present a certificate)
 by mx1.freebsd.org (Postfix) with ESMTPS id 9E1231D25;
 Mon, 18 Jan 2016 12:02:06 +0000 (UTC) (envelope-from smh@FreeBSD.org)
Received: from repo.freebsd.org ([127.0.1.37])
 by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u0IC25Fa041361;
 Mon, 18 Jan 2016 12:02:05 GMT (envelope-from smh@FreeBSD.org)
Received: (from smh@localhost)
 by repo.freebsd.org (8.15.2/8.15.2/Submit) id u0IC25qG041358;
 Mon, 18 Jan 2016 12:02:05 GMT (envelope-from smh@FreeBSD.org)
Message-Id: <201601181202.u0IC25qG041358@repo.freebsd.org>
X-Authentication-Warning: repo.freebsd.org: smh set sender to smh@FreeBSD.org
 using -f
From: Steven Hartland <smh@FreeBSD.org>
Date: Mon, 18 Jan 2016 12:02:05 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-head@freebsd.org
Subject: svn commit: r294265 - head/sys/boot/efi/boot1
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.20
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for &quot;
 user&quot; and &quot; projects&quot; \)" <svn-src-all.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-all/>
List-Post: <mailto:svn-src-all@freebsd.org>
List-Help: <mailto:svn-src-all-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Mon, 18 Jan 2016 12:02:07 -0000

Author: smh
Date: Mon Jan 18 12:02:05 2016
New Revision: 294265
URL: https://svnweb.freebsd.org/changeset/base/294265

Log:
  Fix EFI_DEBUG option
  
  Fix broken DPRINTF and wire up EFI_DEBUG so -DEFI_DEBUG to make works.
  
  MFC after:	2 weeks
  X-MFC-With:	r293268
  Sponsored by:	Multiplay

Modified:
  head/sys/boot/efi/boot1/Makefile
  head/sys/boot/efi/boot1/boot_module.h
  head/sys/boot/efi/boot1/zfs_module.c

Modified: head/sys/boot/efi/boot1/Makefile
==============================================================================
--- head/sys/boot/efi/boot1/Makefile	Mon Jan 18 11:51:41 2016	(r294264)
+++ head/sys/boot/efi/boot1/Makefile	Mon Jan 18 12:02:05 2016	(r294265)
@@ -33,6 +33,9 @@ CFLAGS+=	-I${.CURDIR}/../include/${MACHI
 CFLAGS+=	-I${.CURDIR}/../../../contrib/dev/acpica/include
 CFLAGS+=	-I${.CURDIR}/../../..
 CFLAGS+=	-DEFI_UFS_BOOT
+.ifdef(EFI_DEBUG)
+CFLAGS+=	-DEFI_DEBUG
+.endif
 
 .if ${MK_ZFS} != "no"
 CFLAGS+=	-I${.CURDIR}/../../zfs/

Modified: head/sys/boot/efi/boot1/boot_module.h
==============================================================================
--- head/sys/boot/efi/boot1/boot_module.h	Mon Jan 18 11:51:41 2016	(r294264)
+++ head/sys/boot/efi/boot1/boot_module.h	Mon Jan 18 12:02:05 2016	(r294265)
@@ -36,12 +36,9 @@
 #include <eficonsctl.h>
 
 #ifdef EFI_DEBUG
-#define DPRINTF(fmt, args...) \
-        do { \
-                printf(fmt, ##args) \
-        } while (0)
+#define DPRINTF(fmt, ...) printf(fmt, __VA_ARGS__)
 #else
-#define DPRINTF(fmt, args...) {}
+#define DPRINTF(fmt, ...) {}
 #endif
 
 /* EFI device info */

Modified: head/sys/boot/efi/boot1/zfs_module.c
==============================================================================
--- head/sys/boot/efi/boot1/zfs_module.c	Mon Jan 18 11:51:41 2016	(r294264)
+++ head/sys/boot/efi/boot1/zfs_module.c	Mon Jan 18 12:02:05 2016	(r294265)
@@ -53,9 +53,9 @@ vdev_read(vdev_t *vdev, void *priv, off_
 	status = devinfo->dev->ReadBlocks(devinfo->dev,
 	    devinfo->dev->Media->MediaId, lba, bytes, buf);
 	if (status != EFI_SUCCESS) {
-		DPRINTF("vdev_read: failed dev: %p, id: %u, lba: %lu, size: %d,"
+		DPRINTF("vdev_read: failed dev: %p, id: %u, lba: %zu, size: %zu,"
                     " status: %lu\n", devinfo->dev,
-                    devinfo->dev->Media->MediaId, lba, size,
+                    devinfo->dev->Media->MediaId, lba, bytes,
                     EFI_ERROR_CODE(status));
 		return (-1);
 	}

From owner-svn-src-all@freebsd.org  Mon Jan 18 13:31:31 2016
Return-Path: <owner-svn-src-all@freebsd.org>
Delivered-To: svn-src-all@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6591CA86E06;
 Mon, 18 Jan 2016 13:31:31 +0000 (UTC) (envelope-from zbb@FreeBSD.org)
Received: from repo.freebsd.org (repo.freebsd.org
 [IPv6:2610:1c1:1:6068::e6a:0])
 (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
 (Client did not present a certificate)
 by mx1.freebsd.org (Postfix) with ESMTPS id 236B7174F;
 Mon, 18 Jan 2016 13:31:31 +0000 (UTC) (envelope-from zbb@FreeBSD.org)
Received: from repo.freebsd.org ([127.0.1.37])
 by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u0IDVU61065344;
 Mon, 18 Jan 2016 13:31:30 GMT (envelope-from zbb@FreeBSD.org)
Received: (from zbb@localhost)
 by repo.freebsd.org (8.15.2/8.15.2/Submit) id u0IDVToj065340;
 Mon, 18 Jan 2016 13:31:29 GMT (envelope-from zbb@FreeBSD.org)
Message-Id: <201601181331.u0IDVToj065340@repo.freebsd.org>
X-Authentication-Warning: repo.freebsd.org: zbb set sender to zbb@FreeBSD.org
 using -f
From: Zbigniew Bodek <zbb@FreeBSD.org>
Date: Mon, 18 Jan 2016 13:31:29 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-head@freebsd.org
Subject: svn commit: r294266 - head/sys/arm64/cavium
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.20
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for &quot;
 user&quot; and &quot; projects&quot; \)" <svn-src-all.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-all/>
List-Post: <mailto:svn-src-all@freebsd.org>
List-Help: <mailto:svn-src-all-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Mon, 18 Jan 2016 13:31:31 -0000

Author: zbb
Date: Mon Jan 18 13:31:29 2016
New Revision: 294266
URL: https://svnweb.freebsd.org/changeset/base/294266

Log:
  Update ThunderX PCIe driver to fit new DTS layout
  
  In recent EFI the DTS entries changed for PCIe controller.
  This commit fixes internal PCIe, external is yet TBD.
  
  Submitted by:  Dominik Ermel <der@semihalf.com>
  Obtained from: Semihalf
  Sponsored by:  The FreeBSD Foundation
  Differential revision: https://reviews.freebsd.org/D4976

Modified:
  head/sys/arm64/cavium/thunder_pcie.c
  head/sys/arm64/cavium/thunder_pcie_common.c
  head/sys/arm64/cavium/thunder_pcie_common.h
  head/sys/arm64/cavium/thunder_pcie_pem.c

Modified: head/sys/arm64/cavium/thunder_pcie.c
==============================================================================
--- head/sys/arm64/cavium/thunder_pcie.c	Mon Jan 18 12:02:05 2016	(r294265)
+++ head/sys/arm64/cavium/thunder_pcie.c	Mon Jan 18 13:31:29 2016	(r294266)
@@ -92,7 +92,7 @@ __FBSDID("$FreeBSD$");
 #define	PCI_ADDR_CELL_SIZE	2
 
 struct thunder_pcie_softc {
-	struct pcie_range	ranges[MAX_RANGES_TUPLES];
+	struct pcie_range	ranges[RANGES_TUPLES_MAX];
 	struct rman		mem_rman;
 	struct resource		*res;
 	int			ecam;
@@ -132,7 +132,8 @@ thunder_pcie_probe(device_t dev)
 	if (!ofw_bus_status_okay(dev))
 		return (ENXIO);
 
-	if (ofw_bus_is_compatible(dev, "cavium,thunder-pcie")) {
+	if (ofw_bus_is_compatible(dev, "cavium,thunder-pcie") ||
+	    ofw_bus_is_compatible(dev, "cavium,pci-host-thunder-ecam")) {
 		device_set_desc(dev, "Cavium Integrated PCI/PCI-E Controller");
 		return (BUS_PROBE_DEFAULT);
 	}
@@ -180,7 +181,7 @@ thunder_pcie_attach(device_t dev)
 		return (error);
 	}
 
-	for (tuple = 0; tuple < MAX_RANGES_TUPLES; tuple++) {
+	for (tuple = 0; tuple < RANGES_TUPLES_MAX; tuple++) {
 		base = sc->ranges[tuple].phys_base;
 		size = sc->ranges[tuple].size;
 		if ((base == 0) || (size == 0))
@@ -245,8 +246,7 @@ parse_pci_mem_ranges(struct thunder_pcie
 
 	tuples_count = cells_count /
 	    (pci_addr_cells + parent_addr_cells + size_cells);
-	if ((tuples_count > MAX_RANGES_TUPLES) ||
-	    (tuples_count < MIN_RANGES_TUPLES)) {
+	if (tuples_count > RANGES_TUPLES_MAX) {
 		device_printf(sc->dev,
 		    "Unexpected number of 'ranges' tuples in FDT\n");
 		rv = ENXIO;
@@ -296,7 +296,7 @@ parse_pci_mem_ranges(struct thunder_pcie
 		}
 
 	}
-	for (; tuple < MAX_RANGES_TUPLES; tuple++) {
+	for (; tuple < RANGES_TUPLES_MAX; tuple++) {
 		/* zero-fill remaining tuples to mark empty elements in array */
 		sc->ranges[tuple].phys_base = 0;
 		sc->ranges[tuple].size = 0;

Modified: head/sys/arm64/cavium/thunder_pcie_common.c
==============================================================================
--- head/sys/arm64/cavium/thunder_pcie_common.c	Mon Jan 18 12:02:05 2016	(r294265)
+++ head/sys/arm64/cavium/thunder_pcie_common.c	Mon Jan 18 13:31:29 2016	(r294266)
@@ -48,7 +48,7 @@ range_addr_is_pci(struct pcie_range *ran
 	struct pcie_range *r;
 	int tuple;
 
-	for (tuple = 0; tuple < MAX_RANGES_TUPLES; tuple++) {
+	for (tuple = 0; tuple < RANGES_TUPLES_MAX; tuple++) {
 		r = &ranges[tuple];
 		if (addr >= r->pci_base &&
 		    addr < (r->pci_base + r->size) &&
@@ -68,7 +68,7 @@ range_addr_is_phys(struct pcie_range *ra
 	struct pcie_range *r;
 	int tuple;
 
-	for (tuple = 0; tuple < MAX_RANGES_TUPLES; tuple++) {
+	for (tuple = 0; tuple < RANGES_TUPLES_MAX; tuple++) {
 		r = &ranges[tuple];
 		if (addr >= r->phys_base &&
 		    addr < (r->phys_base + r->size) &&
@@ -90,7 +90,7 @@ range_addr_pci_to_phys(struct pcie_range
 	int tuple;
 
 	/* Find physical address corresponding to given bus address */
-	for (tuple = 0; tuple < MAX_RANGES_TUPLES; tuple++) {
+	for (tuple = 0; tuple < RANGES_TUPLES_MAX; tuple++) {
 		r = &ranges[tuple];
 		if (pci_addr >= r->pci_base &&
 		    pci_addr < (r->pci_base + r->size)) {

Modified: head/sys/arm64/cavium/thunder_pcie_common.h
==============================================================================
--- head/sys/arm64/cavium/thunder_pcie_common.h	Mon Jan 18 12:02:05 2016	(r294265)
+++ head/sys/arm64/cavium/thunder_pcie_common.h	Mon Jan 18 13:31:29 2016	(r294266)
@@ -29,8 +29,8 @@
 #ifndef _CAVIUM_THUNDER_PCIE_COMMON_H_
 #define	_CAVIUM_THUNDER_PCIE_COMMON_H_
 
-#define	MAX_RANGES_TUPLES	5
-#define	MIN_RANGES_TUPLES	2
+#define	RANGES_TUPLES_MAX	6
+#define	RANGES_TUPLES_INVALID (RANGES_TUPLES_MAX + 1)
 
 struct pcie_range {
 	uint64_t	pci_base;

Modified: head/sys/arm64/cavium/thunder_pcie_pem.c
==============================================================================
--- head/sys/arm64/cavium/thunder_pcie_pem.c	Mon Jan 18 12:02:05 2016	(r294265)
+++ head/sys/arm64/cavium/thunder_pcie_pem.c	Mon Jan 18 13:31:29 2016	(r294266)
@@ -114,7 +114,7 @@ struct thunder_pem_softc {
 	struct resource		*reg;
 	bus_space_tag_t		reg_bst;
 	bus_space_handle_t	reg_bsh;
-	struct pcie_range	ranges[MAX_RANGES_TUPLES];
+	struct pcie_range	ranges[RANGES_TUPLES_MAX];
 	struct rman		mem_rman;
 	struct rman		io_rman;
 	bus_space_handle_t	pem_sli_base;

From owner-svn-src-all@freebsd.org  Mon Jan 18 14:11:36 2016
Return-Path: <owner-svn-src-all@freebsd.org>
Delivered-To: svn-src-all@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1533FA87A34;
 Mon, 18 Jan 2016 14:11:36 +0000 (UTC) (envelope-from zbb@FreeBSD.org)
Received: from repo.freebsd.org (repo.freebsd.org
 [IPv6:2610:1c1:1:6068::e6a:0])
 (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
 (Client did not present a certificate)
 by mx1.freebsd.org (Postfix) with ESMTPS id D780E1A5D;
 Mon, 18 Jan 2016 14:11:35 +0000 (UTC) (envelope-from zbb@FreeBSD.org)
Received: from repo.freebsd.org ([127.0.1.37])
 by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u0IEBYEa078887;
 Mon, 18 Jan 2016 14:11:34 GMT (envelope-from zbb@FreeBSD.org)
Received: (from zbb@localhost)
 by repo.freebsd.org (8.15.2/8.15.2/Submit) id u0IEBYoQ078886;
 Mon, 18 Jan 2016 14:11:34 GMT (envelope-from zbb@FreeBSD.org)
Message-Id: <201601181411.u0IEBYoQ078886@repo.freebsd.org>
X-Authentication-Warning: repo.freebsd.org: zbb set sender to zbb@FreeBSD.org
 using -f
From: Zbigniew Bodek <zbb@FreeBSD.org>
Date: Mon, 18 Jan 2016 14:11:34 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-head@freebsd.org
Subject: svn commit: r294267 - head/sys/arm64/conf
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.20
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for &quot;
 user&quot; and &quot; projects&quot; \)" <svn-src-all.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-all/>
List-Post: <mailto:svn-src-all@freebsd.org>
List-Help: <mailto:svn-src-all-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Mon, 18 Jan 2016 14:11:36 -0000

Author: zbb
Date: Mon Jan 18 14:11:34 2016
New Revision: 294267
URL: https://svnweb.freebsd.org/changeset/base/294267

Log:
  Enable AIO interface on ARM64 platforms
  
  Add VFS_AIO to generic config to allow using of high-performance
  asynchronous disk AIO operation.
  
  Reviewed by:   imp
  Obtained from: Semihalf
  Sponsored by:  The FreeBSD Foundation
  Differential revision: https://reviews.freebsd.org/D4979

Modified:
  head/sys/arm64/conf/GENERIC

Modified: head/sys/arm64/conf/GENERIC
==============================================================================
--- head/sys/arm64/conf/GENERIC	Mon Jan 18 13:31:29 2016	(r294266)
+++ head/sys/arm64/conf/GENERIC	Mon Jan 18 14:11:34 2016	(r294267)
@@ -66,6 +66,7 @@ options 	MAC			# TrustedBSD MAC Framewor
 options 	KDTRACE_FRAME		# Ensure frames are compiled in
 options 	KDTRACE_HOOKS		# Kernel DTrace hooks
 options 	VFP			# Floating-point support
+options 	VFS_AIO			# Real implementations of the aio_* system calls
 options 	RACCT			# Resource accounting framework
 options 	RACCT_DEFAULT_TO_DISABLED # Set kern.racct.enable=0 by default
 options 	RCTL			# Resource limits

From owner-svn-src-all@freebsd.org  Mon Jan 18 14:19:56 2016
Return-Path: <owner-svn-src-all@freebsd.org>
Delivered-To: svn-src-all@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1AAFDA87D40;
 Mon, 18 Jan 2016 14:19:56 +0000 (UTC)
 (envelope-from andrew@fubar.geek.nz)
Received: from kif.fubar.geek.nz (kif.fubar.geek.nz [178.62.119.249])
 by mx1.freebsd.org (Postfix) with ESMTP id DFE071F5F;
 Mon, 18 Jan 2016 14:19:55 +0000 (UTC)
 (envelope-from andrew@fubar.geek.nz)
Received: from zapp (global-5-143.nat-2.net.cam.ac.uk [131.111.5.143])
 by kif.fubar.geek.nz (Postfix) with ESMTPSA id DE991D7A17;
 Mon, 18 Jan 2016 14:19:53 +0000 (UTC)
Date: Mon, 18 Jan 2016 14:19:52 +0000
From: Andrew Turner <andrew@fubar.geek.nz>
To: Zbigniew Bodek <zbb@FreeBSD.org>
Cc: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-head@freebsd.org
Subject: Re: svn commit: r294266 - head/sys/arm64/cavium
Message-ID: <20160118141952.0c987b26@zapp>
In-Reply-To: <201601181331.u0IDVToj065340@repo.freebsd.org>
References: <201601181331.u0IDVToj065340@repo.freebsd.org>
X-Mailer: Claws Mail 3.13.1 (GTK+ 2.24.29; amd64-portbld-freebsd11.0)
MIME-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.20
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for &quot;
 user&quot; and &quot; projects&quot; \)" <svn-src-all.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-all/>
List-Post: <mailto:svn-src-all@freebsd.org>
List-Help: <mailto:svn-src-all-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Mon, 18 Jan 2016 14:19:56 -0000

On Mon, 18 Jan 2016 13:31:29 +0000 (UTC)
Zbigniew Bodek <zbb@FreeBSD.org> wrote:

> Author: zbb
> Date: Mon Jan 18 13:31:29 2016
> New Revision: 294266
> URL: https://svnweb.freebsd.org/changeset/base/294266
> 
> Log:
>   Update ThunderX PCIe driver to fit new DTS layout
>   
>   In recent EFI the DTS entries changed for PCIe controller.

The commit message is missing an explanation on how they changed.

>   This commit fixes internal PCIe, external is yet TBD.
>   
>   Submitted by:  Dominik Ermel <der@semihalf.com>
>   Obtained from: Semihalf
>   Sponsored by:  The FreeBSD Foundation
>   Differential revision: https://reviews.freebsd.org/D4976
> 
> Modified:
>   head/sys/arm64/cavium/thunder_pcie.c
>   head/sys/arm64/cavium/thunder_pcie_common.c
>   head/sys/arm64/cavium/thunder_pcie_common.h
>   head/sys/arm64/cavium/thunder_pcie_pem.c
> 
> Modified: head/sys/arm64/cavium/thunder_pcie.c
> ==============================================================================
> --- head/sys/arm64/cavium/thunder_pcie.c	Mon Jan 18 12:02:05
> 2016	(r294265) +++ head/sys/arm64/cavium/thunder_pcie.c
> Mon Jan 18 13:31:29 2016	(r294266) @@ -92,7 +92,7 @@
> __FBSDID("$FreeBSD$"); #define	PCI_ADDR_CELL_SIZE	2
>  
>  struct thunder_pcie_softc {
> -	struct pcie_range	ranges[MAX_RANGES_TUPLES];
> +	struct pcie_range	ranges[RANGES_TUPLES_MAX];
>  	struct rman		mem_rman;
>  	struct resource		*res;
>  	int			ecam;
> @@ -132,7 +132,8 @@ thunder_pcie_probe(device_t dev)
>  	if (!ofw_bus_status_okay(dev))
>  		return (ENXIO);
>  
> -	if (ofw_bus_is_compatible(dev, "cavium,thunder-pcie")) {
> +	if (ofw_bus_is_compatible(dev, "cavium,thunder-pcie") ||
> +	    ofw_bus_is_compatible(dev,
> "cavium,pci-host-thunder-ecam")) {

Why not ofw_bus_search_compatible?


> Modified: head/sys/arm64/cavium/thunder_pcie_common.h
> ==============================================================================
> --- head/sys/arm64/cavium/thunder_pcie_common.h	Mon Jan 18
> 12:02:05 2016	(r294265) +++
> head/sys/arm64/cavium/thunder_pcie_common.h	Mon Jan 18
> 13:31:29 2016	(r294266) @@ -29,8 +29,8 @@ #ifndef
> _CAVIUM_THUNDER_PCIE_COMMON_H_ #define
> _CAVIUM_THUNDER_PCIE_COMMON_H_ 
> -#define	MAX_RANGES_TUPLES	5
> -#define	MIN_RANGES_TUPLES	2
> +#define	RANGES_TUPLES_MAX	6
> +#define	RANGES_TUPLES_INVALID (RANGES_TUPLES_MAX + 1)

Why is this changed?

Andrew

From owner-svn-src-all@freebsd.org  Mon Jan 18 14:21:08 2016
Return-Path: <owner-svn-src-all@freebsd.org>
Delivered-To: svn-src-all@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id 87067A87DCF;
 Mon, 18 Jan 2016 14:21:08 +0000 (UTC)
 (envelope-from andrew@fubar.geek.nz)
Received: from kif.fubar.geek.nz (kif.fubar.geek.nz [178.62.119.249])
 by mx1.freebsd.org (Postfix) with ESMTP id 57E5F1170;
 Mon, 18 Jan 2016 14:21:08 +0000 (UTC)
 (envelope-from andrew@fubar.geek.nz)
Received: from zapp (global-5-143.nat-2.net.cam.ac.uk [131.111.5.143])
 by kif.fubar.geek.nz (Postfix) with ESMTPSA id 19D42D7A17;
 Mon, 18 Jan 2016 14:21:08 +0000 (UTC)
Date: Mon, 18 Jan 2016 14:21:07 +0000
From: Andrew Turner <andrew@fubar.geek.nz>
To: Zbigniew Bodek <zbb@FreeBSD.org>
Cc: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-head@freebsd.org
Subject: Re: svn commit: r294267 - head/sys/arm64/conf
Message-ID: <20160118142107.2523f103@zapp>
In-Reply-To: <201601181411.u0IEBYoQ078886@repo.freebsd.org>
References: <201601181411.u0IEBYoQ078886@repo.freebsd.org>
X-Mailer: Claws Mail 3.13.1 (GTK+ 2.24.29; amd64-portbld-freebsd11.0)
MIME-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.20
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for &quot;
 user&quot; and &quot; projects&quot; \)" <svn-src-all.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-all/>
List-Post: <mailto:svn-src-all@freebsd.org>
List-Help: <mailto:svn-src-all-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Mon, 18 Jan 2016 14:21:08 -0000

On Mon, 18 Jan 2016 14:11:34 +0000 (UTC)
Zbigniew Bodek <zbb@FreeBSD.org> wrote:

> Author: zbb
> Date: Mon Jan 18 14:11:34 2016
> New Revision: 294267
> URL: https://svnweb.freebsd.org/changeset/base/294267
> 
> Log:
>   Enable AIO interface on ARM64 platforms
>   
>   Add VFS_AIO to generic config to allow using of high-performance
>   asynchronous disk AIO operation.

Why have you only enabled this on arm64? Is it not applicable to other
architectures?

Andrew

From owner-svn-src-all@freebsd.org  Mon Jan 18 15:30:17 2016
Return-Path: <owner-svn-src-all@freebsd.org>
Delivered-To: svn-src-all@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4E991A8755C;
 Mon, 18 Jan 2016 15:30:17 +0000 (UTC)
 (envelope-from emaste@FreeBSD.org)
Received: from repo.freebsd.org (repo.freebsd.org
 [IPv6:2610:1c1:1:6068::e6a:0])
 (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
 (Client did not present a certificate)
 by mx1.freebsd.org (Postfix) with ESMTPS id 072481588;
 Mon, 18 Jan 2016 15:30:16 +0000 (UTC)
 (envelope-from emaste@FreeBSD.org)
Received: from repo.freebsd.org ([127.0.1.37])
 by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u0IFUGPP000670;
 Mon, 18 Jan 2016 15:30:16 GMT (envelope-from emaste@FreeBSD.org)
Received: (from emaste@localhost)
 by repo.freebsd.org (8.15.2/8.15.2/Submit) id u0IFUFqC000668;
 Mon, 18 Jan 2016 15:30:15 GMT (envelope-from emaste@FreeBSD.org)
Message-Id: <201601181530.u0IFUFqC000668@repo.freebsd.org>
X-Authentication-Warning: repo.freebsd.org: emaste set sender to
 emaste@FreeBSD.org using -f
From: Ed Maste <emaste@FreeBSD.org>
Date: Mon, 18 Jan 2016 15:30:15 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org
Subject: svn commit: r294268 - in stable/10/sys/boot/efi: boot1 loader
X-SVN-Group: stable-10
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.20
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for &quot;
 user&quot; and &quot; projects&quot; \)" <svn-src-all.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-all/>
List-Post: <mailto:svn-src-all@freebsd.org>
List-Help: <mailto:svn-src-all-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Mon, 18 Jan 2016 15:30:17 -0000

Author: emaste
Date: Mon Jan 18 15:30:15 2016
New Revision: 294268
URL: https://svnweb.freebsd.org/changeset/base/294268

Log:
  MFC r287930: Various small cleanups to EFI loader Makefiles.

Modified:
  stable/10/sys/boot/efi/boot1/Makefile
  stable/10/sys/boot/efi/loader/Makefile
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/sys/boot/efi/boot1/Makefile
==============================================================================
--- stable/10/sys/boot/efi/boot1/Makefile	Mon Jan 18 14:11:34 2016	(r294267)
+++ stable/10/sys/boot/efi/boot1/Makefile	Mon Jan 18 15:30:15 2016	(r294268)
@@ -9,7 +9,7 @@ MAN=
 
 MK_SSP=		no
 
-PROG=		loader.sym
+PROG=		boot1.sym
 INTERNALPROG=
 
 # architecture-specific loader code
@@ -38,7 +38,7 @@ LDFLAGS=	-Wl,-T${LDSCRIPT} -Wl,-Bsymboli
 LDFLAGS+=	-Wl,-znocombreloc
 .endif
 
-${PROG}:	${LDSCRIPT}
+DPADD+=		${LDSCRIPT}
 
 OBJCOPY?=	objcopy
 OBJDUMP?=	objdump
@@ -49,19 +49,19 @@ EFI_TARGET=	efi-app-x86_64
 EFI_TARGET=	efi-app-ia32
 .endif
 
-boot1.efi: loader.sym
+boot1.efi: ${PROG}
 	if [ `${OBJDUMP} -t ${.ALLSRC} | fgrep '*UND*' | wc -l` != 0 ]; then \
 		${OBJDUMP} -t ${.ALLSRC} | fgrep '*UND*'; \
 		exit 1; \
 	fi
 	${OBJCOPY} -j .text -j .sdata -j .data \
 		-j .dynamic -j .dynsym -j .rel.dyn \
-		-j .rela.dyn -j .reloc -j .eh_frame -j set_Xcommand_set \
+		-j .rela.dyn -j .reloc -j .eh_frame \
 		--output-target=${EFI_TARGET} ${.ALLSRC} ${.TARGET}
 
 boot1.o: ${.CURDIR}/../../common/ufsread.c
 
-# The following inserts out objects into a template FAT file system
+# The following inserts our objects into a template FAT file system
 # created by generate-fat.sh
 
 .include "${.CURDIR}/Makefile.fat"

Modified: stable/10/sys/boot/efi/loader/Makefile
==============================================================================
--- stable/10/sys/boot/efi/loader/Makefile	Mon Jan 18 14:11:34 2016	(r294267)
+++ stable/10/sys/boot/efi/loader/Makefile	Mon Jan 18 15:30:15 2016	(r294268)
@@ -12,7 +12,6 @@ MK_SSP=		no
 PROG=		loader.sym
 INTERNALPROG=
 
-.PATH: ${.CURDIR}/../../efi/loader
 # architecture-specific loader code
 SRCS=	autoload.c \
 	bootinfo.c \
@@ -80,7 +79,7 @@ EFI_TARGET=	efi-app-x86_64
 EFI_TARGET=	efi-app-ia32
 .endif
 
-loader.efi: loader.sym
+loader.efi: ${PROG}
 	if [ `${OBJDUMP} -t ${.ALLSRC} | fgrep '*UND*' | wc -l` != 0 ]; then \
 		${OBJDUMP} -t ${.ALLSRC} | fgrep '*UND*'; \
 		exit 1; \

From owner-svn-src-all@freebsd.org  Mon Jan 18 15:34:11 2016
Return-Path: <owner-svn-src-all@freebsd.org>
Delivered-To: svn-src-all@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9A1C4A8774C;
 Mon, 18 Jan 2016 15:34:11 +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 66FA81A6E;
 Mon, 18 Jan 2016 15:34:11 +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 u0IFYAu1003431;
 Mon, 18 Jan 2016 15:34:10 GMT (envelope-from emaste@FreeBSD.org)
Received: (from emaste@localhost)
 by repo.freebsd.org (8.15.2/8.15.2/Submit) id u0IFYAdS003430;
 Mon, 18 Jan 2016 15:34:10 GMT (envelope-from emaste@FreeBSD.org)
Message-Id: <201601181534.u0IFYAdS003430@repo.freebsd.org>
X-Authentication-Warning: repo.freebsd.org: emaste set sender to
 emaste@FreeBSD.org using -f
From: Ed Maste <emaste@FreeBSD.org>
Date: Mon, 18 Jan 2016 15:34:10 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org
Subject: svn commit: r294269 - stable/10/sys/boot/efi/boot1
X-SVN-Group: stable-10
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.20
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for &quot;
 user&quot; and &quot; projects&quot; \)" <svn-src-all.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-all/>
List-Post: <mailto:svn-src-all@freebsd.org>
List-Help: <mailto:svn-src-all-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Mon, 18 Jan 2016 15:34:11 -0000

Author: emaste
Date: Mon Jan 18 15:34:10 2016
New Revision: 294269
URL: https://svnweb.freebsd.org/changeset/base/294269

Log:
  MFC r281117: Move boot1.efi to the global CLEANFILES list
  
  It's not x86 specific.

Modified:
  stable/10/sys/boot/efi/boot1/Makefile
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/sys/boot/efi/boot1/Makefile
==============================================================================
--- stable/10/sys/boot/efi/boot1/Makefile	Mon Jan 18 15:30:15 2016	(r294268)
+++ stable/10/sys/boot/efi/boot1/Makefile	Mon Jan 18 15:34:10 2016	(r294269)
@@ -73,7 +73,7 @@ boot1.efifat: boot1.efi
 	bzip2 -f -d ${.TARGET}.bz2
 	dd if=boot1.efi of=${.TARGET} seek=${BOOT1_OFFSET} conv=notrunc
 
-CLEANFILES= boot1.efifat
+CLEANFILES= boot1.efi boot1.efifat
 
 .endif # ${COMPILER_TYPE} != "gcc"
 
@@ -82,7 +82,7 @@ CLEANFILES= boot1.efifat
 .if ${MACHINE_CPUARCH} == "amd64" || ${MACHINE_CPUARCH} == "i386"
 beforedepend ${OBJS}: machine x86
 
-CLEANFILES+=   machine x86 boot1.efi
+CLEANFILES+=   machine x86
 
 machine:
 	ln -sf ${.CURDIR}/../../../amd64/include machine

From owner-svn-src-all@freebsd.org  Mon Jan 18 15:37:42 2016
Return-Path: <owner-svn-src-all@freebsd.org>
Delivered-To: svn-src-all@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id 83E65A87898;
 Mon, 18 Jan 2016 15:37:42 +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 537721C8C;
 Mon, 18 Jan 2016 15:37:42 +0000 (UTC)
 (envelope-from emaste@FreeBSD.org)
Received: from repo.freebsd.org ([127.0.1.37])
 by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u0IFbfJC003597;
 Mon, 18 Jan 2016 15:37:41 GMT (envelope-from emaste@FreeBSD.org)
Received: (from emaste@localhost)
 by repo.freebsd.org (8.15.2/8.15.2/Submit) id u0IFbf1k003596;
 Mon, 18 Jan 2016 15:37:41 GMT (envelope-from emaste@FreeBSD.org)
Message-Id: <201601181537.u0IFbf1k003596@repo.freebsd.org>
X-Authentication-Warning: repo.freebsd.org: emaste set sender to
 emaste@FreeBSD.org using -f
From: Ed Maste <emaste@FreeBSD.org>
Date: Mon, 18 Jan 2016 15:37:41 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org
Subject: svn commit: r294270 - stable/10/sys/boot/efi/loader
X-SVN-Group: stable-10
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.20
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for &quot;
 user&quot; and &quot; projects&quot; \)" <svn-src-all.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-all/>
List-Post: <mailto:svn-src-all@freebsd.org>
List-Help: <mailto:svn-src-all-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Mon, 18 Jan 2016 15:37:42 -0000

Author: emaste
Date: Mon Jan 18 15:37:41 2016
New Revision: 294270
URL: https://svnweb.freebsd.org/changeset/base/294270

Log:
  MFC r293165: loader.efi: support non-contiguous console modes

Modified:
  stable/10/sys/boot/efi/loader/main.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/sys/boot/efi/loader/main.c
==============================================================================
--- stable/10/sys/boot/efi/loader/main.c	Mon Jan 18 15:34:10 2016	(r294269)
+++ stable/10/sys/boot/efi/loader/main.c	Mon Jan 18 15:37:41 2016	(r294270)
@@ -333,10 +333,11 @@ command_mode(int argc, char *argv[])
 		return (CMD_OK);
 	}
 
-	for (i = 0; ; i++) {
+	printf("Current mode: %d\n", conout->Mode->Mode);
+	for (i = 0; i <= conout->Mode->MaxMode; i++) {
 		status = conout->QueryMode(conout, i, &cols, &rows);
 		if (EFI_ERROR(status))
-			break;
+			continue;
 		printf("Mode %d: %u columns, %u rows\n", i, (unsigned)cols,
 		    (unsigned)rows);
 	}

From owner-svn-src-all@freebsd.org  Mon Jan 18 15:39:34 2016
Return-Path: <owner-svn-src-all@freebsd.org>
Delivered-To: svn-src-all@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id 86659A8792A;
 Mon, 18 Jan 2016 15:39:34 +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 5D9711DF3;
 Mon, 18 Jan 2016 15:39:34 +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 u0IFdXd7003731;
 Mon, 18 Jan 2016 15:39:33 GMT (envelope-from pfg@FreeBSD.org)
Received: (from pfg@localhost)
 by repo.freebsd.org (8.15.2/8.15.2/Submit) id u0IFdWjU003727;
 Mon, 18 Jan 2016 15:39:32 GMT (envelope-from pfg@FreeBSD.org)
Message-Id: <201601181539.u0IFdWjU003727@repo.freebsd.org>
X-Authentication-Warning: repo.freebsd.org: pfg set sender to pfg@FreeBSD.org
 using -f
From: "Pedro F. Giffuni" <pfg@FreeBSD.org>
Date: Mon, 18 Jan 2016 15:39:32 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org
Subject: svn commit: r294271 - stable/10/sys/fs/ext2fs
X-SVN-Group: stable-10
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.20
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for &quot;
 user&quot; and &quot; projects&quot; \)" <svn-src-all.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-all/>
List-Post: <mailto:svn-src-all@freebsd.org>
List-Help: <mailto:svn-src-all-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Mon, 18 Jan 2016 15:39:34 -0000

Author: pfg
Date: Mon Jan 18 15:39:32 2016
New Revision: 294271
URL: https://svnweb.freebsd.org/changeset/base/294271

Log:
  MFC	r293680
  ext4: add support for reading sparse files
  
  Add support for sparse files in ext4. Also implement read-ahead, which
  greatly increases the performance when transferring files from ext4.
  The sparse file support has become very common in ext4.
  
  Both features implemented by Damjan Jovanovic.
  
  PR:		205816

Modified:
  stable/10/sys/fs/ext2fs/ext2_bmap.c
  stable/10/sys/fs/ext2fs/ext2_extents.c
  stable/10/sys/fs/ext2fs/ext2_extents.h
  stable/10/sys/fs/ext2fs/ext2_vnops.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/sys/fs/ext2fs/ext2_bmap.c
==============================================================================
--- stable/10/sys/fs/ext2fs/ext2_bmap.c	Mon Jan 18 15:37:41 2016	(r294270)
+++ stable/10/sys/fs/ext2fs/ext2_bmap.c	Mon Jan 18 15:39:32 2016	(r294271)
@@ -102,9 +102,6 @@ ext4_bmapext(struct vnode *vp, int32_t b
 	fs = ip->i_e2fs;
 	lbn = bn;
 
-	/*
-	 * TODO: need to implement read ahead to improve the performance.
-	 */
 	if (runp != NULL)
 		*runp = 0;
 
@@ -112,15 +109,25 @@ ext4_bmapext(struct vnode *vp, int32_t b
 		*runb = 0;
 
 	ext4_ext_find_extent(fs, ip, lbn, &path);
-	ep = path.ep_ext;
-	if (ep == NULL)
-		ret = EIO;
-	else {
-		*bnp = fsbtodb(fs, lbn - ep->e_blk +
-		    (ep->e_start_lo | (daddr_t)ep->e_start_hi << 32));
+	if (path.ep_is_sparse) {
+		*bnp = -1;
+		if (runp != NULL)
+			*runp = path.ep_sparse_ext.e_len -
+			    (lbn - path.ep_sparse_ext.e_blk) - 1;
+	} else {
+		ep = path.ep_ext;
+		if (ep == NULL)
+			ret = EIO;
+		else {
+			*bnp = fsbtodb(fs, lbn - ep->e_blk +
+			    (ep->e_start_lo | (daddr_t)ep->e_start_hi << 32));
 
-		if (*bnp == 0)
-			*bnp = -1;
+			if (*bnp == 0)
+				*bnp = -1;
+
+			if (runp != NULL)
+				*runp = ep->e_len - (lbn - ep->e_blk) - 1;
+		}
 	}
 
 	if (path.ep_bp != NULL) {

Modified: stable/10/sys/fs/ext2fs/ext2_extents.c
==============================================================================
--- stable/10/sys/fs/ext2fs/ext2_extents.c	Mon Jan 18 15:37:41 2016	(r294270)
+++ stable/10/sys/fs/ext2fs/ext2_extents.c	Mon Jan 18 15:39:32 2016	(r294271)
@@ -66,13 +66,14 @@ static void
 ext4_ext_binsearch(struct inode *ip, struct ext4_extent_path *path, daddr_t lbn)
 {
 	struct ext4_extent_header *ehp = path->ep_header;
-	struct ext4_extent *l, *r, *m;
+	struct ext4_extent *first, *l, *r, *m;
 
 	if (ehp->eh_ecount == 0)
 		return;
 
-	l = (struct ext4_extent *)(char *)(ehp + 1);
-	r = (struct ext4_extent *)(char *)(ehp + 1) + ehp->eh_ecount - 1;
+	first = (struct ext4_extent *)(char *)(ehp + 1);
+	l = first;
+	r = first + ehp->eh_ecount - 1;
 	while (l <= r) {
 		m = l + (r - l) / 2;
 		if (lbn < m->e_blk)
@@ -81,7 +82,25 @@ ext4_ext_binsearch(struct inode *ip, str
 			l = m + 1;
 	}
 
+	if (l == first) {
+		path->ep_sparse_ext.e_blk = lbn;
+		path->ep_sparse_ext.e_len = first->e_blk - lbn;
+		path->ep_sparse_ext.e_start_hi = 0;
+		path->ep_sparse_ext.e_start_lo = 0;
+		path->ep_is_sparse = 1;
+		return;
+	}
 	path->ep_ext = l - 1;
+	if (path->ep_ext->e_blk + path->ep_ext->e_len <= lbn) {
+		path->ep_sparse_ext.e_blk = lbn;
+		if (l <= (first + ehp->eh_ecount - 1))
+			path->ep_sparse_ext.e_len = l->e_blk - lbn;
+		else	// XXX: where does it end?
+			path->ep_sparse_ext.e_len = 1;
+		path->ep_sparse_ext.e_start_hi = 0;
+		path->ep_sparse_ext.e_start_lo = 0;
+		path->ep_is_sparse = 1;
+	}
 }
 
 /*
@@ -169,6 +188,7 @@ ext4_ext_find_extent(struct m_ext2fs *fs
 	path->ep_depth = i;
 	path->ep_ext = NULL;
 	path->ep_index = NULL;
+	path->ep_is_sparse = 0;
 
 	ext4_ext_binsearch(ip, path, lbn);
 	return (path);

Modified: stable/10/sys/fs/ext2fs/ext2_extents.h
==============================================================================
--- stable/10/sys/fs/ext2fs/ext2_extents.h	Mon Jan 18 15:37:41 2016	(r294270)
+++ stable/10/sys/fs/ext2fs/ext2_extents.h	Mon Jan 18 15:39:32 2016	(r294271)
@@ -84,7 +84,11 @@ struct ext4_extent_cache {
 struct ext4_extent_path {
 	uint16_t ep_depth;
 	struct buf *ep_bp;
-	struct ext4_extent *ep_ext;
+	int ep_is_sparse;
+	union {
+		struct ext4_extent ep_sparse_ext;
+		struct ext4_extent *ep_ext;
+	};
 	struct ext4_extent_index *ep_index;
 	struct ext4_extent_header *ep_header;
 };

Modified: stable/10/sys/fs/ext2fs/ext2_vnops.c
==============================================================================
--- stable/10/sys/fs/ext2fs/ext2_vnops.c	Mon Jan 18 15:37:41 2016	(r294270)
+++ stable/10/sys/fs/ext2fs/ext2_vnops.c	Mon Jan 18 15:39:32 2016	(r294271)
@@ -1787,6 +1787,7 @@ ext2_ioctl(struct vop_ioctl_args *ap)
 static int
 ext4_ext_read(struct vop_read_args *ap)
 {
+	static unsigned char zeroes[EXT2_MAX_BLOCK_SIZE];
 	struct vnode *vp;
 	struct inode *ip;
 	struct uio *uio;
@@ -1831,11 +1832,15 @@ ext4_ext_read(struct vop_read_args *ap)
 		switch (cache_type) {
 		case EXT4_EXT_CACHE_NO:
 			ext4_ext_find_extent(fs, ip, lbn, &path);
-			ep = path.ep_ext;
+			if (path.ep_is_sparse)
+				ep = &path.ep_sparse_ext;
+			else
+				ep = path.ep_ext;
 			if (ep == NULL)
 				return (EIO);
 
-			ext4_ext_put_cache(ip, ep, EXT4_EXT_CACHE_IN);
+			ext4_ext_put_cache(ip, ep,
+			    path.ep_is_sparse ? EXT4_EXT_CACHE_GAP : EXT4_EXT_CACHE_IN);
 
 			newblk = lbn - ep->e_blk + (ep->e_start_lo |
 			    (daddr_t)ep->e_start_hi << 32);
@@ -1848,7 +1853,7 @@ ext4_ext_read(struct vop_read_args *ap)
 
 		case EXT4_EXT_CACHE_GAP:
 			/* block has not been allocated yet */
-			return (0);
+			break;
 
 		case EXT4_EXT_CACHE_IN:
 			newblk = lbn - nex.e_blk + (nex.e_start_lo |
@@ -1859,24 +1864,34 @@ ext4_ext_read(struct vop_read_args *ap)
 			panic("%s: invalid cache type", __func__);
 		}
 
-		error = bread(ip->i_devvp, fsbtodb(fs, newblk), size, NOCRED, &bp);
-		if (error) {
-			brelse(bp);
-			return (error);
-		}
+		if (cache_type == EXT4_EXT_CACHE_GAP ||
+		    (cache_type == EXT4_EXT_CACHE_NO && path.ep_is_sparse)) {
+			if (xfersize > sizeof(zeroes))
+				xfersize = sizeof(zeroes);
+			error = uiomove(zeroes, xfersize, uio);
+			if (error)
+				return (error);
+		} else {
+			error = bread(ip->i_devvp, fsbtodb(fs, newblk), size,
+			    NOCRED, &bp);
+			if (error) {
+				brelse(bp);
+				return (error);
+			}
 
-		size -= bp->b_resid;
-		if (size < xfersize) {
-			if (size == 0) {
-				bqrelse(bp);
-				break;
+			size -= bp->b_resid;
+			if (size < xfersize) {
+				if (size == 0) {
+					bqrelse(bp);
+					break;
+				}
+				xfersize = size;
 			}
-			xfersize = size;
+			error = uiomove(bp->b_data + blkoffset, xfersize, uio);
+			bqrelse(bp);
+			if (error)
+				return (error);
 		}
-		error = uiomove(bp->b_data + blkoffset, (int)xfersize, uio);
-		bqrelse(bp);
-		if (error)
-			return (error);
 	}
 
 	return (0);

From owner-svn-src-all@freebsd.org  Mon Jan 18 15:43:02 2016
Return-Path: <owner-svn-src-all@freebsd.org>
Delivered-To: svn-src-all@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id 299B5A87B0F;
 Mon, 18 Jan 2016 15:43:02 +0000 (UTC)
 (envelope-from emaste@FreeBSD.org)
Received: from repo.freebsd.org (repo.freebsd.org
 [IPv6:2610:1c1:1:6068::e6a:0])
 (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
 (Client did not present a certificate)
 by mx1.freebsd.org (Postfix) with ESMTPS id EA88912FF;
 Mon, 18 Jan 2016 15:43:01 +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 u0IFh0XF006486;
 Mon, 18 Jan 2016 15:43:00 GMT (envelope-from emaste@FreeBSD.org)
Received: (from emaste@localhost)
 by repo.freebsd.org (8.15.2/8.15.2/Submit) id u0IFh0O7006485;
 Mon, 18 Jan 2016 15:43:00 GMT (envelope-from emaste@FreeBSD.org)
Message-Id: <201601181543.u0IFh0O7006485@repo.freebsd.org>
X-Authentication-Warning: repo.freebsd.org: emaste set sender to
 emaste@FreeBSD.org using -f
From: Ed Maste <emaste@FreeBSD.org>
Date: Mon, 18 Jan 2016 15:43:00 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org
Subject: svn commit: r294272 - stable/10/sys/amd64/include
X-SVN-Group: stable-10
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.20
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for &quot;
 user&quot; and &quot; projects&quot; \)" <svn-src-all.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-all/>
List-Post: <mailto:svn-src-all@freebsd.org>
List-Help: <mailto:svn-src-all-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Mon, 18 Jan 2016 15:43:02 -0000

Author: emaste
Date: Mon Jan 18 15:43:00 2016
New Revision: 294272
URL: https://svnweb.freebsd.org/changeset/base/294272

Log:
  MFC r281381: Use explicitly sized types in EFI module metadata
  
  This will allow the same metadata struct to be used on all platforms.

Modified:
  stable/10/sys/amd64/include/metadata.h
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/sys/amd64/include/metadata.h
==============================================================================
--- stable/10/sys/amd64/include/metadata.h	Mon Jan 18 15:39:32 2016	(r294271)
+++ stable/10/sys/amd64/include/metadata.h	Mon Jan 18 15:43:00 2016	(r294272)
@@ -36,17 +36,17 @@
 #define	MODINFOMD_EFI_FB	0x1005
 
 struct efi_map_header {
-	size_t		memory_size;
-	size_t		descriptor_size;
+	uint64_t	memory_size;
+	uint64_t	descriptor_size;
 	uint32_t	descriptor_version;
 };
 
 struct efi_fb {
 	uint64_t	fb_addr;
 	uint64_t	fb_size;
-	int		fb_height;
-	int		fb_width;
-	int		fb_stride;
+	uint32_t	fb_height;
+	uint32_t	fb_width;
+	uint32_t	fb_stride;
 	uint32_t	fb_mask_red;
 	uint32_t	fb_mask_green;
 	uint32_t	fb_mask_blue;

From owner-svn-src-all@freebsd.org  Mon Jan 18 15:43:38 2016
Return-Path: <owner-svn-src-all@freebsd.org>
Delivered-To: svn-src-all@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id C1A85A87B99;
 Mon, 18 Jan 2016 15:43:38 +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 9DBAA15A8;
 Mon, 18 Jan 2016 15:43:38 +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 u0IFhbx5006773;
 Mon, 18 Jan 2016 15:43:37 GMT (envelope-from pfg@FreeBSD.org)
Received: (from pfg@localhost)
 by repo.freebsd.org (8.15.2/8.15.2/Submit) id u0IFhbSC006757;
 Mon, 18 Jan 2016 15:43:37 GMT (envelope-from pfg@FreeBSD.org)
Message-Id: <201601181543.u0IFhbSC006757@repo.freebsd.org>
X-Authentication-Warning: repo.freebsd.org: pfg set sender to pfg@FreeBSD.org
 using -f
From: "Pedro F. Giffuni" <pfg@FreeBSD.org>
Date: Mon, 18 Jan 2016 15:43:37 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org
Subject: svn commit: r294273 - stable/9/sys/fs/ext2fs
X-SVN-Group: stable-9
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.20
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for &quot;
 user&quot; and &quot; projects&quot; \)" <svn-src-all.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-all/>
List-Post: <mailto:svn-src-all@freebsd.org>
List-Help: <mailto:svn-src-all-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Mon, 18 Jan 2016 15:43:39 -0000

Author: pfg
Date: Mon Jan 18 15:43:37 2016
New Revision: 294273
URL: https://svnweb.freebsd.org/changeset/base/294273

Log:
  MFC	r293680
  ext4: add support for reading sparse files
  
  Add support for sparse files in ext4. Also implement read-ahead, which
  greatly increases the performance when transferring files from ext4.
  The sparse file support has become very common in ext4.
  
  Both features implemented by Damjan Jovanovic.
  
  PR:		205816

Modified:
  stable/9/sys/fs/ext2fs/ext2_bmap.c
  stable/9/sys/fs/ext2fs/ext2_extents.c
  stable/9/sys/fs/ext2fs/ext2_extents.h
  stable/9/sys/fs/ext2fs/ext2_vnops.c
Directory Properties:
  stable/9/sys/   (props changed)
  stable/9/sys/fs/   (props changed)

Modified: stable/9/sys/fs/ext2fs/ext2_bmap.c
==============================================================================
--- stable/9/sys/fs/ext2fs/ext2_bmap.c	Mon Jan 18 15:43:00 2016	(r294272)
+++ stable/9/sys/fs/ext2fs/ext2_bmap.c	Mon Jan 18 15:43:37 2016	(r294273)
@@ -102,9 +102,6 @@ ext4_bmapext(struct vnode *vp, int32_t b
 	fs = ip->i_e2fs;
 	lbn = bn;
 
-	/*
-	 * TODO: need to implement read ahead to improve the performance.
-	 */
 	if (runp != NULL)
 		*runp = 0;
 
@@ -112,15 +109,25 @@ ext4_bmapext(struct vnode *vp, int32_t b
 		*runb = 0;
 
 	ext4_ext_find_extent(fs, ip, lbn, &path);
-	ep = path.ep_ext;
-	if (ep == NULL)
-		ret = EIO;
-	else {
-		*bnp = fsbtodb(fs, lbn - ep->e_blk +
-		    (ep->e_start_lo | (daddr_t)ep->e_start_hi << 32));
+	if (path.ep_is_sparse) {
+		*bnp = -1;
+		if (runp != NULL)
+			*runp = path.ep_sparse_ext.e_len -
+			    (lbn - path.ep_sparse_ext.e_blk) - 1;
+	} else {
+		ep = path.ep_ext;
+		if (ep == NULL)
+			ret = EIO;
+		else {
+			*bnp = fsbtodb(fs, lbn - ep->e_blk +
+			    (ep->e_start_lo | (daddr_t)ep->e_start_hi << 32));
 
-		if (*bnp == 0)
-			*bnp = -1;
+			if (*bnp == 0)
+				*bnp = -1;
+
+			if (runp != NULL)
+				*runp = ep->e_len - (lbn - ep->e_blk) - 1;
+		}
 	}
 
 	if (path.ep_bp != NULL) {

Modified: stable/9/sys/fs/ext2fs/ext2_extents.c
==============================================================================
--- stable/9/sys/fs/ext2fs/ext2_extents.c	Mon Jan 18 15:43:00 2016	(r294272)
+++ stable/9/sys/fs/ext2fs/ext2_extents.c	Mon Jan 18 15:43:37 2016	(r294273)
@@ -66,13 +66,14 @@ static void
 ext4_ext_binsearch(struct inode *ip, struct ext4_extent_path *path, daddr_t lbn)
 {
 	struct ext4_extent_header *ehp = path->ep_header;
-	struct ext4_extent *l, *r, *m;
+	struct ext4_extent *first, *l, *r, *m;
 
 	if (ehp->eh_ecount == 0)
 		return;
 
-	l = (struct ext4_extent *)(char *)(ehp + 1);
-	r = (struct ext4_extent *)(char *)(ehp + 1) + ehp->eh_ecount - 1;
+	first = (struct ext4_extent *)(char *)(ehp + 1);
+	l = first;
+	r = first + ehp->eh_ecount - 1;
 	while (l <= r) {
 		m = l + (r - l) / 2;
 		if (lbn < m->e_blk)
@@ -81,7 +82,25 @@ ext4_ext_binsearch(struct inode *ip, str
 			l = m + 1;
 	}
 
+	if (l == first) {
+		path->ep_sparse_ext.e_blk = lbn;
+		path->ep_sparse_ext.e_len = first->e_blk - lbn;
+		path->ep_sparse_ext.e_start_hi = 0;
+		path->ep_sparse_ext.e_start_lo = 0;
+		path->ep_is_sparse = 1;
+		return;
+	}
 	path->ep_ext = l - 1;
+	if (path->ep_ext->e_blk + path->ep_ext->e_len <= lbn) {
+		path->ep_sparse_ext.e_blk = lbn;
+		if (l <= (first + ehp->eh_ecount - 1))
+			path->ep_sparse_ext.e_len = l->e_blk - lbn;
+		else	// XXX: where does it end?
+			path->ep_sparse_ext.e_len = 1;
+		path->ep_sparse_ext.e_start_hi = 0;
+		path->ep_sparse_ext.e_start_lo = 0;
+		path->ep_is_sparse = 1;
+	}
 }
 
 /*
@@ -169,6 +188,7 @@ ext4_ext_find_extent(struct m_ext2fs *fs
 	path->ep_depth = i;
 	path->ep_ext = NULL;
 	path->ep_index = NULL;
+	path->ep_is_sparse = 0;
 
 	ext4_ext_binsearch(ip, path, lbn);
 	return (path);

Modified: stable/9/sys/fs/ext2fs/ext2_extents.h
==============================================================================
--- stable/9/sys/fs/ext2fs/ext2_extents.h	Mon Jan 18 15:43:00 2016	(r294272)
+++ stable/9/sys/fs/ext2fs/ext2_extents.h	Mon Jan 18 15:43:37 2016	(r294273)
@@ -84,7 +84,11 @@ struct ext4_extent_cache {
 struct ext4_extent_path {
 	uint16_t ep_depth;
 	struct buf *ep_bp;
-	struct ext4_extent *ep_ext;
+	int ep_is_sparse;
+	union {
+		struct ext4_extent ep_sparse_ext;
+		struct ext4_extent *ep_ext;
+	};
 	struct ext4_extent_index *ep_index;
 	struct ext4_extent_header *ep_header;
 };

Modified: stable/9/sys/fs/ext2fs/ext2_vnops.c
==============================================================================
--- stable/9/sys/fs/ext2fs/ext2_vnops.c	Mon Jan 18 15:43:00 2016	(r294272)
+++ stable/9/sys/fs/ext2fs/ext2_vnops.c	Mon Jan 18 15:43:37 2016	(r294273)
@@ -1789,6 +1789,7 @@ ext2_ioctl(struct vop_ioctl_args *ap)
 static int
 ext4_ext_read(struct vop_read_args *ap)
 {
+	static unsigned char zeroes[EXT2_MAX_BLOCK_SIZE];
 	struct vnode *vp;
 	struct inode *ip;
 	struct uio *uio;
@@ -1833,11 +1834,15 @@ ext4_ext_read(struct vop_read_args *ap)
 		switch (cache_type) {
 		case EXT4_EXT_CACHE_NO:
 			ext4_ext_find_extent(fs, ip, lbn, &path);
-			ep = path.ep_ext;
+			if (path.ep_is_sparse)
+				ep = &path.ep_sparse_ext;
+			else
+				ep = path.ep_ext;
 			if (ep == NULL)
 				return (EIO);
 
-			ext4_ext_put_cache(ip, ep, EXT4_EXT_CACHE_IN);
+			ext4_ext_put_cache(ip, ep,
+			    path.ep_is_sparse ? EXT4_EXT_CACHE_GAP : EXT4_EXT_CACHE_IN);
 
 			newblk = lbn - ep->e_blk + (ep->e_start_lo |
 			    (daddr_t)ep->e_start_hi << 32);
@@ -1850,7 +1855,7 @@ ext4_ext_read(struct vop_read_args *ap)
 
 		case EXT4_EXT_CACHE_GAP:
 			/* block has not been allocated yet */
-			return (0);
+			break;
 
 		case EXT4_EXT_CACHE_IN:
 			newblk = lbn - nex.e_blk + (nex.e_start_lo |
@@ -1861,24 +1866,34 @@ ext4_ext_read(struct vop_read_args *ap)
 			panic("%s: invalid cache type", __func__);
 		}
 
-		error = bread(ip->i_devvp, fsbtodb(fs, newblk), size, NOCRED, &bp);
-		if (error) {
-			brelse(bp);
-			return (error);
-		}
+		if (cache_type == EXT4_EXT_CACHE_GAP ||
+		    (cache_type == EXT4_EXT_CACHE_NO && path.ep_is_sparse)) {
+			if (xfersize > sizeof(zeroes))
+				xfersize = sizeof(zeroes);
+			error = uiomove(zeroes, xfersize, uio);
+			if (error)
+				return (error);
+		} else {
+			error = bread(ip->i_devvp, fsbtodb(fs, newblk), size,
+			    NOCRED, &bp);
+			if (error) {
+				brelse(bp);
+				return (error);
+			}
 
-		size -= bp->b_resid;
-		if (size < xfersize) {
-			if (size == 0) {
-				bqrelse(bp);
-				break;
+			size -= bp->b_resid;
+			if (size < xfersize) {
+				if (size == 0) {
+					bqrelse(bp);
+					break;
+				}
+				xfersize = size;
 			}
-			xfersize = size;
+			error = uiomove(bp->b_data + blkoffset, xfersize, uio);
+			bqrelse(bp);
+			if (error)
+				return (error);
 		}
-		error = uiomove(bp->b_data + blkoffset, (int)xfersize, uio);
-		bqrelse(bp);
-		if (error)
-			return (error);
 	}
 
 	return (0);

From owner-svn-src-all@freebsd.org  Mon Jan 18 15:52:09 2016
Return-Path: <owner-svn-src-all@freebsd.org>
Delivered-To: svn-src-all@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id 02711A86108;
 Mon, 18 Jan 2016 15:52:09 +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 CF7BB114A;
 Mon, 18 Jan 2016 15:52:08 +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 u0IFq7pn010055;
 Mon, 18 Jan 2016 15:52:07 GMT (envelope-from emaste@FreeBSD.org)
Received: (from emaste@localhost)
 by repo.freebsd.org (8.15.2/8.15.2/Submit) id u0IFq7ij010052;
 Mon, 18 Jan 2016 15:52:07 GMT (envelope-from emaste@FreeBSD.org)
Message-Id: <201601181552.u0IFq7ij010052@repo.freebsd.org>
X-Authentication-Warning: repo.freebsd.org: emaste set sender to
 emaste@FreeBSD.org using -f
From: Ed Maste <emaste@FreeBSD.org>
Date: Mon, 18 Jan 2016 15:52:07 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org
Subject: svn commit: r294274 - in stable/10/sys: amd64/include i386/include
 x86/include
X-SVN-Group: stable-10
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.20
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for &quot;
 user&quot; and &quot; projects&quot; \)" <svn-src-all.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-all/>
List-Post: <mailto:svn-src-all@freebsd.org>
List-Help: <mailto:svn-src-all-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Mon, 18 Jan 2016 15:52:09 -0000

Author: emaste
Date: Mon Jan 18 15:52:07 2016
New Revision: 294274
URL: https://svnweb.freebsd.org/changeset/base/294274

Log:
  MFC r293343: Move amd64 metadata.h to x86 and share with i386

Added:
  stable/10/sys/x86/include/metadata.h
     - copied unchanged from r293343, head/sys/x86/include/metadata.h
Modified:
  stable/10/sys/amd64/include/metadata.h
  stable/10/sys/i386/include/metadata.h
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/sys/amd64/include/metadata.h
==============================================================================
--- stable/10/sys/amd64/include/metadata.h	Mon Jan 18 15:43:37 2016	(r294273)
+++ stable/10/sys/amd64/include/metadata.h	Mon Jan 18 15:52:07 2016	(r294274)
@@ -1,56 +1,6 @@
 /*-
- * Copyright (c) 2003 Peter Wemm <peter@FreeBSD.org>
- * 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$
+ * This file is in the public domain.
  */
+/* $FreeBSD$ */
 
-#ifndef _MACHINE_METADATA_H_
-#define	_MACHINE_METADATA_H_
-
-#define	MODINFOMD_SMAP		0x1001
-#define	MODINFOMD_SMAP_XATTR	0x1002
-#define	MODINFOMD_DTBP		0x1003
-#define	MODINFOMD_EFI_MAP	0x1004
-#define	MODINFOMD_EFI_FB	0x1005
-
-struct efi_map_header {
-	uint64_t	memory_size;
-	uint64_t	descriptor_size;
-	uint32_t	descriptor_version;
-};
-
-struct efi_fb {
-	uint64_t	fb_addr;
-	uint64_t	fb_size;
-	uint32_t	fb_height;
-	uint32_t	fb_width;
-	uint32_t	fb_stride;
-	uint32_t	fb_mask_red;
-	uint32_t	fb_mask_green;
-	uint32_t	fb_mask_blue;
-	uint32_t	fb_mask_reserved;
-};
-
-#endif /* !_MACHINE_METADATA_H_ */
+#include <x86/metadata.h>

Modified: stable/10/sys/i386/include/metadata.h
==============================================================================
--- stable/10/sys/i386/include/metadata.h	Mon Jan 18 15:43:37 2016	(r294273)
+++ stable/10/sys/i386/include/metadata.h	Mon Jan 18 15:52:07 2016	(r294274)
@@ -1,36 +1,6 @@
 /*-
- * Copyright (c) 2003 Peter Wemm <peter@FreeBSD.org>
- * 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$
+ * This file is in the public domain.
  */
+/* $FreeBSD$ */
 
-#ifndef _MACHINE_METADATA_H_
-#define	_MACHINE_METADATA_H_
-
-#define	MODINFOMD_SMAP		0x1001
-#define	MODINFOMD_SMAP_XATTR	0x1002
-#define	MODINFOMD_DTBP		0x1003
-
-#endif /* !_MACHINE_METADATA_H_ */
+#include <x86/metadata.h>

Copied: stable/10/sys/x86/include/metadata.h (from r293343, head/sys/x86/include/metadata.h)
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ stable/10/sys/x86/include/metadata.h	Mon Jan 18 15:52:07 2016	(r294274, copy of r293343, head/sys/x86/include/metadata.h)
@@ -0,0 +1,57 @@
+/*-
+ * Copyright (c) 2003 Peter Wemm <peter@FreeBSD.org>
+ * 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$
+ */
+
+#ifndef _MACHINE_METADATA_H_
+#define	_MACHINE_METADATA_H_
+
+#define	MODINFOMD_SMAP		0x1001
+#define	MODINFOMD_SMAP_XATTR	0x1002
+#define	MODINFOMD_DTBP		0x1003
+#define	MODINFOMD_EFI_MAP	0x1004
+#define	MODINFOMD_EFI_FB	0x1005
+#define	MODINFOMD_MODULEP	0x1006
+
+struct efi_map_header {
+	uint64_t	memory_size;
+	uint64_t	descriptor_size;
+	uint32_t	descriptor_version;
+};
+
+struct efi_fb {
+	uint64_t	fb_addr;
+	uint64_t	fb_size;
+	uint32_t	fb_height;
+	uint32_t	fb_width;
+	uint32_t	fb_stride;
+	uint32_t	fb_mask_red;
+	uint32_t	fb_mask_green;
+	uint32_t	fb_mask_blue;
+	uint32_t	fb_mask_reserved;
+};
+
+#endif /* !_MACHINE_METADATA_H_ */

From owner-svn-src-all@freebsd.org  Mon Jan 18 15:55:26 2016
Return-Path: <owner-svn-src-all@freebsd.org>
Delivered-To: svn-src-all@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id C5195A861D9;
 Mon, 18 Jan 2016 15:55:26 +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 A1F3D1357;
 Mon, 18 Jan 2016 15:55:26 +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 u0IFtPdF010242;
 Mon, 18 Jan 2016 15:55:25 GMT (envelope-from emaste@FreeBSD.org)
Received: (from emaste@localhost)
 by repo.freebsd.org (8.15.2/8.15.2/Submit) id u0IFtPqg010238;
 Mon, 18 Jan 2016 15:55:25 GMT (envelope-from emaste@FreeBSD.org)
Message-Id: <201601181555.u0IFtPqg010238@repo.freebsd.org>
X-Authentication-Warning: repo.freebsd.org: emaste set sender to
 emaste@FreeBSD.org using -f
From: Ed Maste <emaste@FreeBSD.org>
Date: Mon, 18 Jan 2016 15:55:25 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org
Subject: svn commit: r294275 - in stable/10/sys/boot/efi: boot1 include loader
X-SVN-Group: stable-10
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.20
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for &quot;
 user&quot; and &quot; projects&quot; \)" <svn-src-all.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-all/>
List-Post: <mailto:svn-src-all@freebsd.org>
List-Help: <mailto:svn-src-all-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Mon, 18 Jan 2016 15:55:27 -0000

Author: emaste
Date: Mon Jan 18 15:55:25 2016
New Revision: 294275
URL: https://svnweb.freebsd.org/changeset/base/294275

Log:
  MFC r293244: Introduce and use new EFI_ERROR_CODE macro for EFI errors

Modified:
  stable/10/sys/boot/efi/boot1/boot1.c
  stable/10/sys/boot/efi/include/efierr.h
  stable/10/sys/boot/efi/loader/bootinfo.c
  stable/10/sys/boot/efi/loader/copy.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/sys/boot/efi/boot1/boot1.c
==============================================================================
--- stable/10/sys/boot/efi/boot1/boot1.c	Mon Jan 18 15:52:07 2016	(r294274)
+++ stable/10/sys/boot/efi/boot1/boot1.c	Mon Jan 18 15:55:25 2016	(r294275)
@@ -309,20 +309,20 @@ load(const char *fname)
 	    buffer, bufsize, &loaderhandle);
 	if (EFI_ERROR(status))
 		printf("LoadImage failed with error %lu\n",
-		    status & ~EFI_ERROR_MASK);
+		    EFI_ERROR_CODE(status));
 
 	status = systab->BootServices->HandleProtocol(loaderhandle,
 	    &LoadedImageGUID, (VOID**)&loaded_image);
 	if (EFI_ERROR(status))
 		printf("HandleProtocol failed with error %lu\n",
-		    status & ~EFI_ERROR_MASK);
+		    EFI_ERROR_CODE(status));
 
 	loaded_image->DeviceHandle = bootdevhandle;
 
 	status = systab->BootServices->StartImage(loaderhandle, NULL, NULL);
 	if (EFI_ERROR(status))
 		printf("StartImage failed with error %lu\n",
-		    status & ~EFI_ERROR_MASK);
+		    EFI_ERROR_CODE(status));
 }
 
 static void

Modified: stable/10/sys/boot/efi/include/efierr.h
==============================================================================
--- stable/10/sys/boot/efi/include/efierr.h	Mon Jan 18 15:52:07 2016	(r294274)
+++ stable/10/sys/boot/efi/include/efierr.h	Mon Jan 18 15:55:25 2016	(r294275)
@@ -30,7 +30,8 @@ Revision History
 
 
 #define EFIWARN(a)                            (a)
-#define EFI_ERROR(a)              (((INTN) a) < 0)
+#define EFI_ERROR(a)             (((INTN) a) < 0)
+#define EFI_ERROR_CODE(a)   (a & ~EFI_ERROR_MASK)
 
 
 #define EFI_SUCCESS                             0

Modified: stable/10/sys/boot/efi/loader/bootinfo.c
==============================================================================
--- stable/10/sys/boot/efi/loader/bootinfo.c	Mon Jan 18 15:52:07 2016	(r294274)
+++ stable/10/sys/boot/efi/loader/bootinfo.c	Mon Jan 18 15:55:25 2016	(r294275)
@@ -275,7 +275,7 @@ bi_load_efi_data(struct preloaded_file *
 		     pages, &addr);
 		if (EFI_ERROR(status)) {
 			printf("%s: AllocatePages error %lu\n", __func__,
-			    (unsigned long)(status & ~EFI_ERROR_MASK));
+			    EFI_ERROR_CODE(status));
 			return (ENOMEM);
 		}
 
@@ -291,7 +291,7 @@ bi_load_efi_data(struct preloaded_file *
 		status = BS->GetMemoryMap(&sz, mm, &efi_mapkey, &mmsz, &mmver);
 		if (EFI_ERROR(status)) {
 			printf("%s: GetMemoryMap error %lu\n", __func__,
-			    (unsigned long)(status & ~EFI_ERROR_MASK));
+			    EFI_ERROR_CODE(status));
 			return (EINVAL);
 		}
 		status = BS->ExitBootServices(IH, efi_mapkey);
@@ -305,8 +305,7 @@ bi_load_efi_data(struct preloaded_file *
 		}
 		BS->FreePages(addr, pages);
 	}
-	printf("ExitBootServices error %lu\n",
-	    (unsigned long)(status & ~EFI_ERROR_MASK));
+	printf("ExitBootServices error %lu\n", EFI_ERROR_CODE(status));
 	return (EINVAL);
 }
 

Modified: stable/10/sys/boot/efi/loader/copy.c
==============================================================================
--- stable/10/sys/boot/efi/loader/copy.c	Mon Jan 18 15:52:07 2016	(r294274)
+++ stable/10/sys/boot/efi/loader/copy.c	Mon Jan 18 15:55:25 2016	(r294275)
@@ -56,7 +56,7 @@ efi_copy_init(void)
 	    STAGE_PAGES, &staging);
 	if (EFI_ERROR(status)) {
 		printf("failed to allocate staging area: %lu\n",
-		    (unsigned long)(status & EFI_ERROR_MASK));
+		    EFI_ERROR_CODE(status));
 		return (status);
 	}
 	staging_end = staging + STAGE_PAGES * EFI_PAGE_SIZE;

From owner-svn-src-all@freebsd.org  Mon Jan 18 16:10:00 2016
Return-Path: <owner-svn-src-all@freebsd.org>
Delivered-To: svn-src-all@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id 214FCA867BD;
 Mon, 18 Jan 2016 16:10:00 +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 D30D01039;
 Mon, 18 Jan 2016 16:09:59 +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 u0IG9wW0014064;
 Mon, 18 Jan 2016 16:09:58 GMT (envelope-from emaste@FreeBSD.org)
Received: (from emaste@localhost)
 by repo.freebsd.org (8.15.2/8.15.2/Submit) id u0IG9wJ3014063;
 Mon, 18 Jan 2016 16:09:58 GMT (envelope-from emaste@FreeBSD.org)
Message-Id: <201601181609.u0IG9wJ3014063@repo.freebsd.org>
X-Authentication-Warning: repo.freebsd.org: emaste set sender to
 emaste@FreeBSD.org using -f
From: Ed Maste <emaste@FreeBSD.org>
Date: Mon, 18 Jan 2016 16:09:58 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org
Subject: svn commit: r294276 - stable/10/sys/boot/efi/boot1
X-SVN-Group: stable-10
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.20
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for &quot;
 user&quot; and &quot; projects&quot; \)" <svn-src-all.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-all/>
List-Post: <mailto:svn-src-all@freebsd.org>
List-Help: <mailto:svn-src-all-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Mon, 18 Jan 2016 16:10:00 -0000

Author: emaste
Date: Mon Jan 18 16:09:58 2016
New Revision: 294276
URL: https://svnweb.freebsd.org/changeset/base/294276

Log:
  MFC r281058: Remove whitespace.

Modified:
  stable/10/sys/boot/efi/boot1/boot1.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/sys/boot/efi/boot1/boot1.c
==============================================================================
--- stable/10/sys/boot/efi/boot1/boot1.c	Mon Jan 18 15:55:25 2016	(r294275)
+++ stable/10/sys/boot/efi/boot1/boot1.c	Mon Jan 18 16:09:58 2016	(r294276)
@@ -30,7 +30,7 @@ __FBSDID("$FreeBSD$");
 
 #define _PATH_LOADER	"/boot/loader.efi"
 #define _PATH_KERNEL	"/boot/kernel/kernel"
- 
+
 #define BSIZEMAX	16384
 
 typedef int putc_func_t(char c, void *arg);
@@ -40,7 +40,7 @@ struct sp_data {
 	u_int	sp_len;
 	u_int	sp_size;
 };
-        
+
 static const char digits[] = "0123456789abcdef";
 
 static void panic(const char *fmt, ...) __dead2;
@@ -62,7 +62,7 @@ static void load(const char *fname);
 EFI_SYSTEM_TABLE *systab;
 EFI_HANDLE *image;
 
-static void     
+static void
 bcopy(const void *src, void *dst, size_t len)
 {
 	const char *s = src;
@@ -71,12 +71,12 @@ bcopy(const void *src, void *dst, size_t
 	while (len-- != 0)
 		*d++ = *s++;
 }
-   
+
 static void
 memcpy(void *dst, const void *src, size_t len)
 {
 	bcopy(src, dst, len);
-}               
+}
 
 static void
 bzero(void *b, size_t len)
@@ -86,7 +86,7 @@ bzero(void *b, size_t len)
 	while (len-- != 0)
 		*p++ = 0;
 }
-        
+
 static int
 strcmp(const char *s1, const char *s2)
 {
@@ -134,7 +134,7 @@ EFI_STATUS efi_main(EFI_HANDLE Ximage, E
 
 	for (i = 0; i < nparts; i++) {
 		status = systab->BootServices->HandleProtocol(handles[i],
-		    &DevicePathGUID, (void **)&devpath); 
+		    &DevicePathGUID, (void **)&devpath);
 		if (EFI_ERROR(status))
 			continue;
 
@@ -142,7 +142,7 @@ EFI_STATUS efi_main(EFI_HANDLE Ximage, E
 			devpath = NextDevicePathNode(devpath);
 
 		status = systab->BootServices->HandleProtocol(handles[i],
-		    &BlockIoProtocolGUID, (void **)&blkio); 
+		    &BlockIoProtocolGUID, (void **)&blkio);
 		if (EFI_ERROR(status))
 			continue;
 
@@ -158,7 +158,7 @@ EFI_STATUS efi_main(EFI_HANDLE Ximage, E
 
 	bootdevhandle = handles[i];
 	load(path);
-		
+
 	panic("Load failed");
 
 	return EFI_SUCCESS;
@@ -266,7 +266,7 @@ fsstat(ufs_ino_t inode)
 }
 
 static struct dmadat __dmadat;
-                
+
 static int
 domount(EFI_DEVICE_PATH *device, EFI_BLOCK_IO *blkio, int quiet)
 {
@@ -278,7 +278,7 @@ domount(EFI_DEVICE_PATH *device, EFI_BLO
 		if (!quiet)
 			printf("domount: can't read superblock\n");
 		return (-1);
-	} 
+	}
 	if (!quiet)
 		printf("Succesfully mounted UFS filesystem\n");
 	return (0);
@@ -303,7 +303,7 @@ load(const char *fname)
 	status = systab->BootServices->AllocatePool(EfiLoaderData,
 	    bufsize, &buffer);
 	fsread(ino, buffer, bufsize);
-	
+
 	/* XXX: For secure boot, we need our own loader here */
 	status = systab->BootServices->LoadImage(TRUE, image, bootdevpath,
 	    buffer, bufsize, &loaderhandle);
@@ -552,4 +552,3 @@ __ultoa(char *buf, u_long ul, int base)
 	while ((ul /= base) != 0);
 	return (p);
 }
-

From owner-svn-src-all@freebsd.org  Mon Jan 18 16:41:27 2016
Return-Path: <owner-svn-src-all@freebsd.org>
Delivered-To: svn-src-all@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id CA87BA87471;
 Mon, 18 Jan 2016 16:41:27 +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 990D3147C;
 Mon, 18 Jan 2016 16:41:27 +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 u0IGfQLU025156;
 Mon, 18 Jan 2016 16:41:26 GMT (envelope-from asomers@FreeBSD.org)
Received: (from asomers@localhost)
 by repo.freebsd.org (8.15.2/8.15.2/Submit) id u0IGfQrc025155;
 Mon, 18 Jan 2016 16:41:26 GMT (envelope-from asomers@FreeBSD.org)
Message-Id: <201601181641.u0IGfQrc025155@repo.freebsd.org>
X-Authentication-Warning: repo.freebsd.org: asomers set sender to
 asomers@FreeBSD.org using -f
From: Alan Somers <asomers@FreeBSD.org>
Date: Mon, 18 Jan 2016 16:41:26 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org
Subject: svn commit: r294278 - stable/10/sbin/mount
X-SVN-Group: stable-10
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.20
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for &quot;
 user&quot; and &quot; projects&quot; \)" <svn-src-all.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-all/>
List-Post: <mailto:svn-src-all@freebsd.org>
List-Help: <mailto:svn-src-all-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Mon, 18 Jan 2016 16:41:27 -0000

Author: asomers
Date: Mon Jan 18 16:41:26 2016
New Revision: 294278
URL: https://svnweb.freebsd.org/changeset/base/294278

Log:
  MFC r292573
  
  Fix "mount -a" for NFS and ZFS filesystems with shared mountpoints
  
  sbin/mount.c
  	Check whether an fstab entry has the same fstype as a mounted
  	filesystem before declaring it to be mounted. This will allow NFS
  	filesystems that share a mountpoint with a local filesystem to be
  	automatically mounted at boot.
  
  	This is not such an unusual situation. For example, if somebody uses
  	the standard installer with a ZFS root, he'll get a /usr/home
  	filesystem, even though he may choose to mount /usr/home over NFS.

Modified:
  stable/10/sbin/mount/mount.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/sbin/mount/mount.c
==============================================================================
--- stable/10/sbin/mount/mount.c	Mon Jan 18 16:33:03 2016	(r294277)
+++ stable/10/sbin/mount/mount.c	Mon Jan 18 16:41:26 2016	(r294278)
@@ -485,10 +485,18 @@ ismounted(struct fstab *fs, struct statf
 		strlcpy(realfsfile, fs->fs_file, sizeof(realfsfile));
 	}
 
+	/* 
+	 * Consider the filesystem to be mounted if:
+	 * It has the same mountpoint as a mounted filesytem, and
+	 * It has the same type as that same mounted filesystem, and
+	 * It has the same device name as that same mounted filesystem, OR
+	 *     It is a nonremountable filesystem
+	 */
 	for (i = mntsize - 1; i >= 0; --i)
 		if (strcmp(realfsfile, mntbuf[i].f_mntonname) == 0 &&
+		    strcmp(fs->fs_vfstype, mntbuf[i].f_fstypename) == 0 && 
 		    (!isremountable(fs->fs_vfstype) ||
-		     strcmp(fs->fs_spec, mntbuf[i].f_mntfromname) == 0))
+		     (strcmp(fs->fs_spec, mntbuf[i].f_mntfromname) == 0)))
 			return (1);
 	return (0);
 }

From owner-svn-src-all@freebsd.org  Mon Jan 18 16:54:28 2016
Return-Path: <owner-svn-src-all@freebsd.org>
Delivered-To: svn-src-all@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5DA88A87829;
 Mon, 18 Jan 2016 16:54:28 +0000 (UTC) (envelope-from br@FreeBSD.org)
Received: from repo.freebsd.org (repo.freebsd.org
 [IPv6:2610:1c1:1:6068::e6a:0])
 (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
 (Client did not present a certificate)
 by mx1.freebsd.org (Postfix) with ESMTPS id 18B3E1BB5;
 Mon, 18 Jan 2016 16:54:28 +0000 (UTC) (envelope-from br@FreeBSD.org)
Received: from repo.freebsd.org ([127.0.1.37])
 by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u0IGsRxO028707;
 Mon, 18 Jan 2016 16:54:27 GMT (envelope-from br@FreeBSD.org)
Received: (from br@localhost)
 by repo.freebsd.org (8.15.2/8.15.2/Submit) id u0IGsRdl028706;
 Mon, 18 Jan 2016 16:54:27 GMT (envelope-from br@FreeBSD.org)
Message-Id: <201601181654.u0IGsRdl028706@repo.freebsd.org>
X-Authentication-Warning: repo.freebsd.org: br set sender to br@FreeBSD.org
 using -f
From: Ruslan Bukin <br@FreeBSD.org>
Date: Mon, 18 Jan 2016 16:54:27 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-head@freebsd.org
Subject: svn commit: r294279 - 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-all@freebsd.org
X-Mailman-Version: 2.1.20
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for &quot;
 user&quot; and &quot; projects&quot; \)" <svn-src-all.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-all/>
List-Post: <mailto:svn-src-all@freebsd.org>
List-Help: <mailto:svn-src-all-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Mon, 18 Jan 2016 16:54:28 -0000

Author: br
Date: Mon Jan 18 16:54:26 2016
New Revision: 294279
URL: https://svnweb.freebsd.org/changeset/base/294279

Log:
  Add RISC-V relocation types.
  
  Reviewed by:	emaste

Modified:
  head/sys/sys/elf_common.h

Modified: head/sys/sys/elf_common.h
==============================================================================
--- head/sys/sys/elf_common.h	Mon Jan 18 16:41:26 2016	(r294278)
+++ head/sys/sys/elf_common.h	Mon Jan 18 16:54:26 2016	(r294279)
@@ -1145,6 +1145,56 @@ typedef struct {
 #define	R_PPC_EMB_BIT_FLD	115
 #define	R_PPC_EMB_RELSDA	116
 
+/*
+ * RISC-V relocation types.
+ */
+
+/* Relocation types used by the dynamic linker. */
+#define	R_RISCV_NONE		0
+#define	R_RISCV_32		1
+#define	R_RISCV_64		2
+#define	R_RISCV_RELATIVE	3
+#define	R_RISCV_COPY		4
+#define	R_RISCV_JUMP_SLOT	5
+#define	R_RISCV_TLS_DTPMOD32	6
+#define	R_RISCV_TLS_DTPMOD64	7
+#define	R_RISCV_TLS_DTPREL32	8
+#define	R_RISCV_TLS_DTPREL64	9
+#define	R_RISCV_TLS_TPREL32	10
+#define	R_RISCV_TLS_TPREL64	11
+
+/* Relocation types not used by the dynamic linker. */
+#define	R_RISCV_BRANCH		16
+#define	R_RISCV_JAL		17
+#define	R_RISCV_CALL		18
+#define	R_RISCV_CALL_PLT	19
+#define	R_RISCV_GOT_HI20	20
+#define	R_RISCV_TLS_GOT_HI20	21
+#define	R_RISCV_TLS_GD_HI20	22
+#define	R_RISCV_PCREL_HI20	23
+#define	R_RISCV_PCREL_LO12_I	24
+#define	R_RISCV_PCREL_LO12_S	25
+#define	R_RISCV_HI20		26
+#define	R_RISCV_LO12_I		27
+#define	R_RISCV_LO12_S		28
+#define	R_RISCV_TPREL_HI20	29
+#define	R_RISCV_TPREL_LO12_I	30
+#define	R_RISCV_TPREL_LO12_S	31
+#define	R_RISCV_TPREL_ADD	32
+#define	R_RISCV_ADD8		33
+#define	R_RISCV_ADD16		34
+#define	R_RISCV_ADD32		35
+#define	R_RISCV_ADD64		36
+#define	R_RISCV_SUB8		37
+#define	R_RISCV_SUB16		38
+#define	R_RISCV_SUB32		39
+#define	R_RISCV_SUB64		40
+#define	R_RISCV_GNU_VTINHERIT	41
+#define	R_RISCV_GNU_VTENTRY	42
+#define	R_RISCV_ALIGN		43
+#define	R_RISCV_RVC_BRANCH	44
+#define	R_RISCV_RVC_JUMP	45
+
 #define	R_SPARC_NONE		0
 #define	R_SPARC_8		1
 #define	R_SPARC_16		2

From owner-svn-src-all@freebsd.org  Mon Jan 18 17:03:14 2016
Return-Path: <owner-svn-src-all@freebsd.org>
Delivered-To: svn-src-all@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id 11931A87BB0;
 Mon, 18 Jan 2016 17:03:14 +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 D675A1098;
 Mon, 18 Jan 2016 17:03:13 +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 u0IH3CWe031630;
 Mon, 18 Jan 2016 17:03:12 GMT (envelope-from ian@FreeBSD.org)
Received: (from ian@localhost)
 by repo.freebsd.org (8.15.2/8.15.2/Submit) id u0IH3Cxa031629;
 Mon, 18 Jan 2016 17:03:12 GMT (envelope-from ian@FreeBSD.org)
Message-Id: <201601181703.u0IH3Cxa031629@repo.freebsd.org>
X-Authentication-Warning: repo.freebsd.org: ian set sender to ian@FreeBSD.org
 using -f
From: Ian Lepore <ian@FreeBSD.org>
Date: Mon, 18 Jan 2016 17:03:12 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-head@freebsd.org
Subject: svn commit: r294280 - head/sys/dev/uart
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.20
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for &quot;
 user&quot; and &quot; projects&quot; \)" <svn-src-all.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-all/>
List-Post: <mailto:svn-src-all@freebsd.org>
List-Help: <mailto:svn-src-all-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Mon, 18 Jan 2016 17:03:14 -0000

Author: ian
Date: Mon Jan 18 17:03:12 2016
New Revision: 294280
URL: https://svnweb.freebsd.org/changeset/base/294280

Log:
  Use OF_decode_addr() to create a bus_space tag and handle for the console
  on FDT/OFW platforms.
  
  After the refactoring of the powerpc code so that OF_decode_addr() is usable
  on all FDT/OFW platforms, this switches uart(4) to using it.
  
  Differential Revision:	https://reviews.freebsd.org/D4675

Modified:
  head/sys/dev/uart/uart_cpu_fdt.c

Modified: head/sys/dev/uart/uart_cpu_fdt.c
==============================================================================
--- head/sys/dev/uart/uart_cpu_fdt.c	Mon Jan 18 16:54:26 2016	(r294279)
+++ head/sys/dev/uart/uart_cpu_fdt.c	Mon Jan 18 17:03:12 2016	(r294280)
@@ -133,7 +133,6 @@ uart_cpu_getdev(int devtype, struct uart
 	struct uart_class *class;
 	phandle_t node, chosen;
 	pcell_t shift, br, rclk;
-	u_long start, size, pbase, psize;
 	char *cp;
 	int err;
 
@@ -212,16 +211,6 @@ uart_cpu_getdev(int devtype, struct uart
 	di->databits = 8;
 	di->stopbits = 1;
 	di->parity = UART_PARITY_NONE;
-	di->bas.bst = uart_bus_space_mem;
 
-	err = fdt_regsize(node, &start, &size);
-	if (err)
-		return (ENXIO);
-	err = fdt_get_range(OF_parent(node), 0, &pbase, &psize);
-	if (err)
-		pbase = 0;
-
-	start += pbase;
-
-	return (bus_space_map(di->bas.bst, start, size, 0, &di->bas.bsh));
+	return (OF_decode_addr(node, 0, &di->bas.bst, &di->bas.bsh));
 }

From owner-svn-src-all@freebsd.org  Mon Jan 18 17:27:18 2016
Return-Path: <owner-svn-src-all@freebsd.org>
Delivered-To: svn-src-all@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id 420F3A8623E;
 Mon, 18 Jan 2016 17:27:18 +0000 (UTC)
 (envelope-from nwhitehorn@FreeBSD.org)
Received: from repo.freebsd.org (repo.freebsd.org
 [IPv6:2610:1c1:1:6068::e6a:0])
 (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
 (Client did not present a certificate)
 by mx1.freebsd.org (Postfix) with ESMTPS id 003421CAA;
 Mon, 18 Jan 2016 17:27:17 +0000 (UTC)
 (envelope-from nwhitehorn@FreeBSD.org)
Received: from repo.freebsd.org ([127.0.1.37])
 by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u0IHRGQY037820;
 Mon, 18 Jan 2016 17:27:16 GMT (envelope-from nwhitehorn@FreeBSD.org)
Received: (from nwhitehorn@localhost)
 by repo.freebsd.org (8.15.2/8.15.2/Submit) id u0IHRGTl037817;
 Mon, 18 Jan 2016 17:27:16 GMT (envelope-from nwhitehorn@FreeBSD.org)
Message-Id: <201601181727.u0IHRGTl037817@repo.freebsd.org>
X-Authentication-Warning: repo.freebsd.org: nwhitehorn set sender to
 nwhitehorn@FreeBSD.org using -f
From: Nathan Whitehorn <nwhitehorn@FreeBSD.org>
Date: Mon, 18 Jan 2016 17:27:16 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-head@freebsd.org
Subject: svn commit: r294281 - in head/sys/powerpc: ofw pseries
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.20
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for &quot;
 user&quot; and &quot; projects&quot; \)" <svn-src-all.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-all/>
List-Post: <mailto:svn-src-all@freebsd.org>
List-Help: <mailto:svn-src-all-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Mon, 18 Jan 2016 17:27:18 -0000

Author: nwhitehorn
Date: Mon Jan 18 17:27:16 2016
New Revision: 294281
URL: https://svnweb.freebsd.org/changeset/base/294281

Log:
  Move RTAS PCI-specific interpretation of the "reg" property of the PCI host
  device to the RTAS driver, where it belongs.

Modified:
  head/sys/powerpc/ofw/ofw_pci.c
  head/sys/powerpc/ofw/ofw_pci.h
  head/sys/powerpc/pseries/rtas_pci.c

Modified: head/sys/powerpc/ofw/ofw_pci.c
==============================================================================
--- head/sys/powerpc/ofw/ofw_pci.c	Mon Jan 18 17:03:12 2016	(r294280)
+++ head/sys/powerpc/ofw/ofw_pci.c	Mon Jan 18 17:27:16 2016	(r294281)
@@ -136,10 +136,6 @@ ofw_pci_init(device_t dev)
 	sc = device_get_softc(dev);
 	sc->sc_initialized = 1;
 
-	if (OF_getencprop(node, "reg", (pcell_t *)&sc->sc_pcir,
-	    sizeof(sc->sc_pcir)) == -1)
-		return (ENXIO);
-
 	if (OF_getencprop(node, "bus-range", busrange, sizeof(busrange)) != 8)
 		busrange[0] = 0;
 

Modified: head/sys/powerpc/ofw/ofw_pci.h
==============================================================================
--- head/sys/powerpc/ofw/ofw_pci.h	Mon Jan 18 17:03:12 2016	(r294280)
+++ head/sys/powerpc/ofw/ofw_pci.h	Mon Jan 18 17:27:16 2016	(r294281)
@@ -56,8 +56,6 @@ struct ofw_pci_softc {
 
 	int			sc_quirks;
 
-	struct ofw_pci_register	sc_pcir;
-
 	struct ofw_pci_range	*sc_range;
 	int			sc_nrange;
 

Modified: head/sys/powerpc/pseries/rtas_pci.c
==============================================================================
--- head/sys/powerpc/pseries/rtas_pci.c	Mon Jan 18 17:03:12 2016	(r294280)
+++ head/sys/powerpc/pseries/rtas_pci.c	Mon Jan 18 17:27:16 2016	(r294281)
@@ -91,6 +91,8 @@ static device_method_t	rtaspci_methods[]
 struct rtaspci_softc {
 	struct ofw_pci_softc	pci_sc;
 
+	struct ofw_pci_register	sc_pcir;
+
 	cell_t			read_pci_config, write_pci_config;
 	cell_t			ex_read_pci_config, ex_write_pci_config;
 	int			sc_extended_config;
@@ -127,6 +129,10 @@ rtaspci_attach(device_t dev)
 
 	sc = device_get_softc(dev);
 
+	if (OF_getencprop(ofw_bus_get_node(dev), "reg", (pcell_t *)&sc->sc_pcir,
+	    sizeof(sc->sc_pcir)) == -1)
+		return (ENXIO);
+
 	sc->read_pci_config = rtas_token_lookup("read-pci-config");
 	sc->write_pci_config = rtas_token_lookup("write-pci-config");
 	sc->ex_read_pci_config = rtas_token_lookup("ibm,read-pci-config");
@@ -157,8 +163,8 @@ rtaspci_read_config(device_t dev, u_int 
 		
 	if (sc->ex_read_pci_config != -1)
 		error = rtas_call_method(sc->ex_read_pci_config, 4, 2,
-		    config_addr, sc->pci_sc.sc_pcir.phys_hi,
-		    sc->pci_sc.sc_pcir.phys_mid, width, &pcierror, &retval);
+		    config_addr, sc->sc_pcir.phys_hi,
+		    sc->sc_pcir.phys_mid, width, &pcierror, &retval);
 	else
 		error = rtas_call_method(sc->read_pci_config, 2, 2,
 		    config_addr, width, &pcierror, &retval);
@@ -196,7 +202,7 @@ rtaspci_write_config(device_t dev, u_int
 		
 	if (sc->ex_write_pci_config != -1)
 		rtas_call_method(sc->ex_write_pci_config, 5, 1, config_addr,
-		    sc->pci_sc.sc_pcir.phys_hi, sc->pci_sc.sc_pcir.phys_mid,
+		    sc->sc_pcir.phys_hi, sc->sc_pcir.phys_mid,
 		    width, val, &pcierror);
 	else
 		rtas_call_method(sc->write_pci_config, 3, 1, config_addr,

From owner-svn-src-all@freebsd.org  Mon Jan 18 17:29:52 2016
Return-Path: <owner-svn-src-all@freebsd.org>
Delivered-To: svn-src-all@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id DEA42A86360;
 Mon, 18 Jan 2016 17:29:52 +0000 (UTC)
 (envelope-from nwhitehorn@freebsd.org)
Received: from c.mail.sonic.net (c.mail.sonic.net [64.142.111.80])
 (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits))
 (Client did not present a certificate)
 by mx1.freebsd.org (Postfix) with ESMTPS id CDD4C1F02;
 Mon, 18 Jan 2016 17:29:52 +0000 (UTC)
 (envelope-from nwhitehorn@freebsd.org)
Received: from zeppelin.tachypleus.net (75-101-50-44.static.sonic.net
 [75.101.50.44]) (authenticated bits=0)
 by c.mail.sonic.net (8.15.1/8.15.1) with ESMTPSA id u0IHThSh007484
 (version=TLSv1.2 cipher=DHE-RSA-AES128-SHA bits=128 verify=NOT);
 Mon, 18 Jan 2016 09:29:44 -0800
Subject: Re: svn commit: r294280 - head/sys/dev/uart
To: Ian Lepore <ian@freebsd.org>, src-committers@freebsd.org,
 svn-src-all@freebsd.org, svn-src-head@freebsd.org
References: <201601181703.u0IH3Cxa031629@repo.freebsd.org>
From: Nathan Whitehorn <nwhitehorn@freebsd.org>
Message-ID: <569D2107.8030302@freebsd.org>
Date: Mon, 18 Jan 2016 09:29:43 -0800
User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:38.0) Gecko/20100101
 Thunderbird/38.5.0
MIME-Version: 1.0
In-Reply-To: <201601181703.u0IH3Cxa031629@repo.freebsd.org>
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: 7bit
X-Sonic-CAuth: UmFuZG9tSVYqxvjL9Jp4z4XBQYO4awuWv2WmrpgcTFnOwDQ9SG3wDBnN2rKz8Yk7Z4+piG3h4LHBLjIggmHcIixTE0m1hV3UMs+e5iVubdg=
X-Sonic-ID: C;bAC8Dwm+5RGnH3tm14k5kQ== M;wjaEEAm+5RGnH3tm14k5kQ==
X-Spam-Flag: No
X-Sonic-Spam-Details: 0.0/5.0 by cerberusd
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.20
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for &quot;
 user&quot; and &quot; projects&quot; \)" <svn-src-all.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-all/>
List-Post: <mailto:svn-src-all@freebsd.org>
List-Help: <mailto:svn-src-all-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Mon, 18 Jan 2016 17:29:53 -0000

Nice work! You can remove the #include <fdt_common.h> in this file now, 
since it no longer depends on anything in dev/fdt.
-Nathan

On 01/18/16 09:03, Ian Lepore wrote:
> Author: ian
> Date: Mon Jan 18 17:03:12 2016
> New Revision: 294280
> URL: https://svnweb.freebsd.org/changeset/base/294280
>
> Log:
>    Use OF_decode_addr() to create a bus_space tag and handle for the console
>    on FDT/OFW platforms.
>    
>    After the refactoring of the powerpc code so that OF_decode_addr() is usable
>    on all FDT/OFW platforms, this switches uart(4) to using it.
>    
>    Differential Revision:	https://reviews.freebsd.org/D4675
>
> Modified:
>    head/sys/dev/uart/uart_cpu_fdt.c
>
> Modified: head/sys/dev/uart/uart_cpu_fdt.c
> ==============================================================================
> --- head/sys/dev/uart/uart_cpu_fdt.c	Mon Jan 18 16:54:26 2016	(r294279)
> +++ head/sys/dev/uart/uart_cpu_fdt.c	Mon Jan 18 17:03:12 2016	(r294280)
> @@ -133,7 +133,6 @@ uart_cpu_getdev(int devtype, struct uart
>   	struct uart_class *class;
>   	phandle_t node, chosen;
>   	pcell_t shift, br, rclk;
> -	u_long start, size, pbase, psize;
>   	char *cp;
>   	int err;
>   
> @@ -212,16 +211,6 @@ uart_cpu_getdev(int devtype, struct uart
>   	di->databits = 8;
>   	di->stopbits = 1;
>   	di->parity = UART_PARITY_NONE;
> -	di->bas.bst = uart_bus_space_mem;
>   
> -	err = fdt_regsize(node, &start, &size);
> -	if (err)
> -		return (ENXIO);
> -	err = fdt_get_range(OF_parent(node), 0, &pbase, &psize);
> -	if (err)
> -		pbase = 0;
> -
> -	start += pbase;
> -
> -	return (bus_space_map(di->bas.bst, start, size, 0, &di->bas.bsh));
> +	return (OF_decode_addr(node, 0, &di->bas.bst, &di->bas.bsh));
>   }
>


From owner-svn-src-all@freebsd.org  Mon Jan 18 17:41:40 2016
Return-Path: <owner-svn-src-all@freebsd.org>
Delivered-To: svn-src-all@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2F6B6A868DC;
 Mon, 18 Jan 2016 17:41:40 +0000 (UTC)
 (envelope-from andrew@fubar.geek.nz)
Received: from kif.fubar.geek.nz (kif.fubar.geek.nz [178.62.119.249])
 by mx1.freebsd.org (Postfix) with ESMTP id 0079119DB;
 Mon, 18 Jan 2016 17:41:39 +0000 (UTC)
 (envelope-from andrew@fubar.geek.nz)
Received: from zapp (global-5-143.nat-2.net.cam.ac.uk [131.111.5.143])
 by kif.fubar.geek.nz (Postfix) with ESMTPSA id A2EB6D7A17;
 Mon, 18 Jan 2016 17:41:07 +0000 (UTC)
Date: Mon, 18 Jan 2016 17:41:06 +0000
From: Andrew Turner <andrew@fubar.geek.nz>
To: Nathan Whitehorn <nwhitehorn@freebsd.org>
Cc: Ian Lepore <ian@freebsd.org>, src-committers@freebsd.org,
 svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject: Re: svn commit: r294280 - head/sys/dev/uart
Message-ID: <20160118174106.57ce36e6@zapp>
In-Reply-To: <569D2107.8030302@freebsd.org>
References: <201601181703.u0IH3Cxa031629@repo.freebsd.org>
 <569D2107.8030302@freebsd.org>
X-Mailer: Claws Mail 3.13.1 (GTK+ 2.24.29; amd64-portbld-freebsd11.0)
MIME-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.20
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for &quot;
 user&quot; and &quot; projects&quot; \)" <svn-src-all.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-all/>
List-Post: <mailto:svn-src-all@freebsd.org>
List-Help: <mailto:svn-src-all-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Mon, 18 Jan 2016 17:41:40 -0000

On Mon, 18 Jan 2016 09:29:43 -0800
Nathan Whitehorn <nwhitehorn@freebsd.org> wrote:

> Nice work! You can remove the #include <fdt_common.h> in this file
> now, since it no longer depends on anything in dev/fdt.
> -Nathan

I think we can also remove setting uart_bus_space_mem in uart_cpu_fdt.c.

Andrew

> 
> On 01/18/16 09:03, Ian Lepore wrote:
> > Author: ian
> > Date: Mon Jan 18 17:03:12 2016
> > New Revision: 294280
> > URL: https://svnweb.freebsd.org/changeset/base/294280
> >
> > Log:
> >    Use OF_decode_addr() to create a bus_space tag and handle for
> > the console on FDT/OFW platforms.
> >    
> >    After the refactoring of the powerpc code so that
> > OF_decode_addr() is usable on all FDT/OFW platforms, this switches
> > uart(4) to using it. 
> >    Differential Revision:	https://reviews.freebsd.org/D4675
> >
> > Modified:
> >    head/sys/dev/uart/uart_cpu_fdt.c
> >
> > Modified: head/sys/dev/uart/uart_cpu_fdt.c
> > ==============================================================================
> > --- head/sys/dev/uart/uart_cpu_fdt.c	Mon Jan 18 16:54:26
> > 2016	(r294279) +++ head/sys/dev/uart/uart_cpu_fdt.c
> > Mon Jan 18 17:03:12 2016	(r294280) @@ -133,7 +133,6 @@
> > uart_cpu_getdev(int devtype, struct uart struct uart_class *class;
> >   	phandle_t node, chosen;
> >   	pcell_t shift, br, rclk;
> > -	u_long start, size, pbase, psize;
> >   	char *cp;
> >   	int err;
> >   
> > @@ -212,16 +211,6 @@ uart_cpu_getdev(int devtype, struct uart
> >   	di->databits = 8;
> >   	di->stopbits = 1;
> >   	di->parity = UART_PARITY_NONE;
> > -	di->bas.bst = uart_bus_space_mem;
> >   
> > -	err = fdt_regsize(node, &start, &size);
> > -	if (err)
> > -		return (ENXIO);
> > -	err = fdt_get_range(OF_parent(node), 0, &pbase, &psize);
> > -	if (err)
> > -		pbase = 0;
> > -
> > -	start += pbase;
> > -
> > -	return (bus_space_map(di->bas.bst, start, size, 0,
> > &di->bas.bsh));
> > +	return (OF_decode_addr(node, 0, &di->bas.bst,
> > &di->bas.bsh)); }
> >  
> 
> 


From owner-svn-src-all@freebsd.org  Mon Jan 18 17:49:33 2016
Return-Path: <owner-svn-src-all@freebsd.org>
Delivered-To: svn-src-all@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id 66F4AA86BDF;
 Mon, 18 Jan 2016 17:49:33 +0000 (UTC) (envelope-from br@FreeBSD.org)
Received: from repo.freebsd.org (repo.freebsd.org
 [IPv6:2610:1c1:1:6068::e6a:0])
 (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
 (Client did not present a certificate)
 by mx1.freebsd.org (Postfix) with ESMTPS id 38CDA1DD6;
 Mon, 18 Jan 2016 17:49:33 +0000 (UTC) (envelope-from br@FreeBSD.org)
Received: from repo.freebsd.org ([127.0.1.37])
 by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u0IHnWxa044122;
 Mon, 18 Jan 2016 17:49:32 GMT (envelope-from br@FreeBSD.org)
Received: (from br@localhost)
 by repo.freebsd.org (8.15.2/8.15.2/Submit) id u0IHnW6e044121;
 Mon, 18 Jan 2016 17:49:32 GMT (envelope-from br@FreeBSD.org)
Message-Id: <201601181749.u0IHnW6e044121@repo.freebsd.org>
X-Authentication-Warning: repo.freebsd.org: br set sender to br@FreeBSD.org
 using -f
From: Ruslan Bukin <br@FreeBSD.org>
Date: Mon, 18 Jan 2016 17:49:32 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-head@freebsd.org
Subject: svn commit: r294282 - head/sys/riscv/include
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.20
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for &quot;
 user&quot; and &quot; projects&quot; \)" <svn-src-all.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-all/>
List-Post: <mailto:svn-src-all@freebsd.org>
List-Help: <mailto:svn-src-all-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Mon, 18 Jan 2016 17:49:33 -0000

Author: br
Date: Mon Jan 18 17:49:32 2016
New Revision: 294282
URL: https://svnweb.freebsd.org/changeset/base/294282

Log:
  Correct RISC-V exception types.

Modified:
  head/sys/riscv/include/riscvreg.h

Modified: head/sys/riscv/include/riscvreg.h
==============================================================================
--- head/sys/riscv/include/riscvreg.h	Mon Jan 18 17:27:16 2016	(r294281)
+++ head/sys/riscv/include/riscvreg.h	Mon Jan 18 17:49:32 2016	(r294282)
@@ -51,12 +51,14 @@
 #define	EXCP_INSTR_ACCESS_FAULT		1
 #define	EXCP_INSTR_ILLEGAL		2
 #define	EXCP_INSTR_BREAKPOINT		3
-#define	EXCP_RESERVED_0			4
+#define	EXCP_LOAD_ADDR_MISALIGNED	4
 #define	EXCP_LOAD_ACCESS_FAULT		5
-#define	EXCP_AMO_ADDR_MISALIGNED	6
+#define	EXCP_STORE_ADDR_MISALIGNED	6
 #define	EXCP_STORE_ACCESS_FAULT		7
-#define	EXCP_ENV_CALL			8
-#define	EXCP_RESERVED_1			9
+#define	EXCP_UMODE_ENV_CALL		8
+#define	EXCP_SMODE_ENV_CALL		9
+#define	EXCP_HMODE_ENV_CALL		10
+#define	EXCP_MMODE_ENV_CALL		11
 #define	EXCP_INTR			(1 << 31)
 #define	EXCP_INTR_SOFTWARE		0
 #define	EXCP_INTR_TIMER			1

From owner-svn-src-all@freebsd.org  Mon Jan 18 18:27:23 2016
Return-Path: <owner-svn-src-all@freebsd.org>
Delivered-To: svn-src-all@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id 45F3AA83C46;
 Mon, 18 Jan 2016 18:27:23 +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 1D30A1306;
 Mon, 18 Jan 2016 18:27:23 +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 u0IIRMuV055942;
 Mon, 18 Jan 2016 18:27:22 GMT (envelope-from jhb@FreeBSD.org)
Received: (from jhb@localhost)
 by repo.freebsd.org (8.15.2/8.15.2/Submit) id u0IIRLGQ055936;
 Mon, 18 Jan 2016 18:27:21 GMT (envelope-from jhb@FreeBSD.org)
Message-Id: <201601181827.u0IIRLGQ055936@repo.freebsd.org>
X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org
 using -f
From: John Baldwin <jhb@FreeBSD.org>
Date: Mon, 18 Jan 2016 18:27:21 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org
Subject: svn commit: r294283 - in stable/10/sys: amd64/include i386/include
 kern vm
X-SVN-Group: stable-10
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.20
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for &quot;
 user&quot; and &quot; projects&quot; \)" <svn-src-all.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-all/>
List-Post: <mailto:svn-src-all@freebsd.org>
List-Help: <mailto:svn-src-all-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Mon, 18 Jan 2016 18:27:23 -0000

Author: jhb
Date: Mon Jan 18 18:27:21 2016
New Revision: 294283
URL: https://svnweb.freebsd.org/changeset/base/294283

Log:
  MFC 290728:
  Export various helper variables describing the layout and size of
  certain kernel structures for use by debuggers. This mostly aids
  in examining cores from a kernel without debug symbols as a debugger
  can infer these values if debug symbols are available.
  
  One set of variables describes the layout of 'struct linker_file' to
  walk the list of loaded kernel modules.
  
  A second set of variables describes the layout of 'struct proc' and
  'struct thread' to walk the list of processes in the kernel and the
  threads in each process.
  
  The 'pcb_size' variable is used to index into the stoppcbs[] array.
  
  The 'vm_maxuser_address' is used to distinguish kernel virtual addresses
  from user addresses. This doesn't have to be perfect, and
  'vm_maxuser_address' is a cheap and simple way to differentiate kernel
  pointers from simple values like TIDs and PIDs.
  
  While here, annotate the fields in struct pcb used by kgdb on amd64
  and i386 to note that their ABI should be preserved.  Annotations for
  other platforms will be added in the future.

Modified:
  stable/10/sys/amd64/include/pcb.h
  stable/10/sys/i386/include/pcb.h
  stable/10/sys/kern/kern_linker.c
  stable/10/sys/kern/kern_mib.c
  stable/10/sys/kern/kern_proc.c
  stable/10/sys/vm/vm_kern.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/sys/amd64/include/pcb.h
==============================================================================
--- stable/10/sys/amd64/include/pcb.h	Mon Jan 18 17:49:32 2016	(r294282)
+++ stable/10/sys/amd64/include/pcb.h	Mon Jan 18 18:27:21 2016	(r294283)
@@ -44,15 +44,19 @@
 #include <machine/segments.h>
 
 #ifdef __amd64__
+/*
+ * NB: The fields marked with (*) are used by kernel debuggers.  Their
+ * ABI should be preserved.
+ */
 struct pcb {
-	register_t	pcb_r15;
-	register_t	pcb_r14;
-	register_t	pcb_r13;
-	register_t	pcb_r12;
-	register_t	pcb_rbp;
-	register_t	pcb_rsp;
-	register_t	pcb_rbx;
-	register_t	pcb_rip;
+	register_t	pcb_r15;	/* (*) */
+	register_t	pcb_r14;	/* (*) */
+	register_t	pcb_r13;	/* (*) */
+	register_t	pcb_r12;	/* (*) */
+	register_t	pcb_rbp;	/* (*) */
+	register_t	pcb_rsp;	/* (*) */
+	register_t	pcb_rbx;	/* (*) */
+	register_t	pcb_rip;	/* (*) */
 	register_t	pcb_fsbase;
 	register_t	pcb_gsbase;
 	register_t	pcb_kgsbase;

Modified: stable/10/sys/i386/include/pcb.h
==============================================================================
--- stable/10/sys/i386/include/pcb.h	Mon Jan 18 17:49:32 2016	(r294282)
+++ stable/10/sys/i386/include/pcb.h	Mon Jan 18 18:27:21 2016	(r294283)
@@ -44,13 +44,17 @@
 #endif
 #include <machine/npx.h>
 
+/*
+ * NB: The fields marked with (*) are used by kernel debuggers.  Their
+ * ABI should be preserved.
+ */
 struct pcb {
-	int	pcb_edi;
-	int	pcb_esi;
-	int	pcb_ebp;
-	int	pcb_esp;
-	int	pcb_ebx;
-	int	pcb_eip;
+	int	pcb_edi;	/* (*) */
+	int	pcb_esi;	/* (*) */
+	int	pcb_ebp;	/* (*) */
+	int	pcb_esp;	/* (*) */
+	int	pcb_ebx;	/* (*) */
+	int	pcb_eip;	/* (*) */
 	struct segment_descriptor pcb_fsd;
 	struct segment_descriptor pcb_gsd;
 	int	pcb_ds;

Modified: stable/10/sys/kern/kern_linker.c
==============================================================================
--- stable/10/sys/kern/kern_linker.c	Mon Jan 18 17:49:32 2016	(r294282)
+++ stable/10/sys/kern/kern_linker.c	Mon Jan 18 18:27:21 2016	(r294283)
@@ -71,6 +71,12 @@ SYSCTL_INT(_debug, OID_AUTO, kld_debug, 
 TUNABLE_INT("debug.kld_debug", &kld_debug);
 #endif
 
+/* These variables are used by kernel debuggers to enumerate loaded files. */
+const int kld_off_address = offsetof(struct linker_file, address);
+const int kld_off_filename = offsetof(struct linker_file, filename);
+const int kld_off_pathname = offsetof(struct linker_file, pathname);
+const int kld_off_next = offsetof(struct linker_file, link.tqe_next);
+
 /*
  * static char *linker_search_path(const char *name, struct mod_depend
  * *verinfo);

Modified: stable/10/sys/kern/kern_mib.c
==============================================================================
--- stable/10/sys/kern/kern_mib.c	Mon Jan 18 17:49:32 2016	(r294282)
+++ stable/10/sys/kern/kern_mib.c	Mon Jan 18 18:27:21 2016	(r294283)
@@ -574,6 +574,11 @@ SYSCTL_INT(_debug_sizeof, OID_AUTO, buf,
 SYSCTL_INT(_debug_sizeof, OID_AUTO, kinfo_proc, CTLFLAG_RD,
     SYSCTL_NULL_INT_PTR, sizeof(struct kinfo_proc), "sizeof(struct kinfo_proc)");
 
+/* Used by kernel debuggers. */
+const int pcb_size = sizeof(struct pcb);
+SYSCTL_INT(_debug_sizeof, OID_AUTO, pcb, CTLFLAG_RD,
+    SYSCTL_NULL_INT_PTR, sizeof(struct pcb), "sizeof(struct pcb)");
+
 /* XXX compatibility, remove for 6.0 */
 #include <sys/imgact.h>
 #include <sys/imgact_elf.h>

Modified: stable/10/sys/kern/kern_proc.c
==============================================================================
--- stable/10/sys/kern/kern_proc.c	Mon Jan 18 17:49:32 2016	(r294282)
+++ stable/10/sys/kern/kern_proc.c	Mon Jan 18 18:27:21 2016	(r294283)
@@ -139,6 +139,21 @@ struct sx proctree_lock;
 struct mtx ppeers_lock;
 uma_zone_t proc_zone;
 
+/*
+ * The offset of various fields in struct proc and struct thread.
+ * These are used by kernel debuggers to enumerate kernel threads and
+ * processes.
+ */
+const int proc_off_p_pid = offsetof(struct proc, p_pid);
+const int proc_off_p_comm = offsetof(struct proc, p_comm);
+const int proc_off_p_list = offsetof(struct proc, p_list);
+const int proc_off_p_threads = offsetof(struct proc, p_threads);
+const int thread_off_td_tid = offsetof(struct thread, td_tid);
+const int thread_off_td_name = offsetof(struct thread, td_name);
+const int thread_off_td_oncpu = offsetof(struct thread, td_oncpu);
+const int thread_off_td_pcb = offsetof(struct thread, td_pcb);
+const int thread_off_td_plist = offsetof(struct thread, td_plist);
+
 int kstack_pages = KSTACK_PAGES;
 SYSCTL_INT(_kern, OID_AUTO, kstack_pages, CTLFLAG_RD, &kstack_pages, 0,
     "Kernel stack size in pages");

Modified: stable/10/sys/vm/vm_kern.c
==============================================================================
--- stable/10/sys/vm/vm_kern.c	Mon Jan 18 17:49:32 2016	(r294282)
+++ stable/10/sys/vm/vm_kern.c	Mon Jan 18 18:27:21 2016	(r294283)
@@ -94,6 +94,9 @@ vm_map_t pipe_map;
 const void *zero_region;
 CTASSERT((ZERO_REGION_SIZE & PAGE_MASK) == 0);
 
+/* NB: Used by kernel debuggers. */
+const u_long vm_maxuser_address = VM_MAXUSER_ADDRESS;
+
 SYSCTL_ULONG(_vm, OID_AUTO, min_kernel_address, CTLFLAG_RD,
     SYSCTL_NULL_ULONG_PTR, VM_MIN_KERNEL_ADDRESS, "Min kernel address");
 

From owner-svn-src-all@freebsd.org  Mon Jan 18 18:41:11 2016
Return-Path: <owner-svn-src-all@freebsd.org>
Delivered-To: svn-src-all@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id 62D77A86181;
 Mon, 18 Jan 2016 18:41:11 +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 31D161CB9;
 Mon, 18 Jan 2016 18:41:11 +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 u0IIfA5d059007;
 Mon, 18 Jan 2016 18:41:10 GMT (envelope-from emaste@FreeBSD.org)
Received: (from emaste@localhost)
 by repo.freebsd.org (8.15.2/8.15.2/Submit) id u0IIfAYD059006;
 Mon, 18 Jan 2016 18:41:10 GMT (envelope-from emaste@FreeBSD.org)
Message-Id: <201601181841.u0IIfAYD059006@repo.freebsd.org>
X-Authentication-Warning: repo.freebsd.org: emaste set sender to
 emaste@FreeBSD.org using -f
From: Ed Maste <emaste@FreeBSD.org>
Date: Mon, 18 Jan 2016 18:41:10 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-head@freebsd.org
Subject: svn commit: r294284 - head/sys/boot/efi/boot1
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.20
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for &quot;
 user&quot; and &quot; projects&quot; \)" <svn-src-all.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-all/>
List-Post: <mailto:svn-src-all@freebsd.org>
List-Help: <mailto:svn-src-all-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Mon, 18 Jan 2016 18:41:11 -0000

Author: emaste
Date: Mon Jan 18 18:41:09 2016
New Revision: 294284
URL: https://svnweb.freebsd.org/changeset/base/294284

Log:
  boot1: correct typo in error message

Modified:
  head/sys/boot/efi/boot1/boot1.c

Modified: head/sys/boot/efi/boot1/boot1.c
==============================================================================
--- head/sys/boot/efi/boot1/boot1.c	Mon Jan 18 18:27:21 2016	(r294283)
+++ head/sys/boot/efi/boot1/boot1.c	Mon Jan 18 18:41:09 2016	(r294284)
@@ -127,8 +127,8 @@ try_load(const boot_module_t *mod)
 
 	if ((status = bs->StartImage(loaderhandle, NULL, NULL)) !=
 	    EFI_SUCCESS) {
-		printf("Failed start image provided by %s (%lu)\n", mod->name,
-		    EFI_ERROR_CODE(status));
+		printf("Failed to start image provided by %s (%lu)\n",
+		    mod->name, EFI_ERROR_CODE(status));
 		return;
 	}
 }

From owner-svn-src-all@freebsd.org  Mon Jan 18 18:50:28 2016
Return-Path: <owner-svn-src-all@freebsd.org>
Delivered-To: svn-src-all@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7CACAA864D7;
 Mon, 18 Jan 2016 18:50:28 +0000 (UTC)
 (envelope-from tuexen@FreeBSD.org)
Received: from repo.freebsd.org (repo.freebsd.org
 [IPv6:2610:1c1:1:6068::e6a:0])
 (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
 (Client did not present a certificate)
 by mx1.freebsd.org (Postfix) with ESMTPS id 4A5C610A1;
 Mon, 18 Jan 2016 18:50:28 +0000 (UTC)
 (envelope-from tuexen@FreeBSD.org)
Received: from repo.freebsd.org ([127.0.1.37])
 by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u0IIoRrs061986;
 Mon, 18 Jan 2016 18:50:27 GMT (envelope-from tuexen@FreeBSD.org)
Received: (from tuexen@localhost)
 by repo.freebsd.org (8.15.2/8.15.2/Submit) id u0IIoQoq061979;
 Mon, 18 Jan 2016 18:50:26 GMT (envelope-from tuexen@FreeBSD.org)
Message-Id: <201601181850.u0IIoQoq061979@repo.freebsd.org>
X-Authentication-Warning: repo.freebsd.org: tuexen set sender to
 tuexen@FreeBSD.org using -f
From: Michael Tuexen <tuexen@FreeBSD.org>
Date: Mon, 18 Jan 2016 18:50:26 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org
Subject: svn commit: r294285 - stable/10/usr.bin/systat
X-SVN-Group: stable-10
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.20
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for &quot;
 user&quot; and &quot; projects&quot; \)" <svn-src-all.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-all/>
List-Post: <mailto:svn-src-all@freebsd.org>
List-Help: <mailto:svn-src-all-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Mon, 18 Jan 2016 18:50:28 -0000

Author: tuexen
Date: Mon Jan 18 18:50:26 2016
New Revision: 294285
URL: https://svnweb.freebsd.org/changeset/base/294285

Log:
  MFC r289873:
  Add support to systat to display SCTP statistics.
  MFC r289874:
  Bump date in man page.

Added:
  stable/10/usr.bin/systat/sctp.c
     - copied unchanged from r289873, head/usr.bin/systat/sctp.c
Modified:
  stable/10/usr.bin/systat/Makefile
  stable/10/usr.bin/systat/cmdtab.c
  stable/10/usr.bin/systat/extern.h
  stable/10/usr.bin/systat/systat.1
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/usr.bin/systat/Makefile
==============================================================================
--- stable/10/usr.bin/systat/Makefile	Mon Jan 18 18:41:09 2016	(r294284)
+++ stable/10/usr.bin/systat/Makefile	Mon Jan 18 18:50:26 2016	(r294285)
@@ -6,7 +6,7 @@
 PROG=	systat
 SRCS=	cmds.c cmdtab.c devs.c fetch.c iostat.c keyboard.c main.c \
 	netcmds.c netstat.c pigs.c swap.c icmp.c \
-	mode.c ip.c tcp.c \
+	mode.c ip.c sctp.c tcp.c \
 	vmstat.c convtbl.c ifcmds.c ifstat.c
 
 .if ${MK_INET6_SUPPORT} != "no"

Modified: stable/10/usr.bin/systat/cmdtab.c
==============================================================================
--- stable/10/usr.bin/systat/cmdtab.c	Mon Jan 18 18:41:09 2016	(r294284)
+++ stable/10/usr.bin/systat/cmdtab.c	Mon Jan 18 18:50:26 2016	(r294285)
@@ -69,6 +69,9 @@ struct	cmdtab cmdtab[] = {
 	  initip6,	openip6,	closeip6,	cmdmode,
 	  resetip6,	CF_LOADAV },
 #endif
+	{ "sctp",	showsctp,	fetchsctp,	labelsctp,
+	  initsctp,	opensctp,	closesctp,	cmdmode,
+	  resetsctp,	CF_LOADAV },
 	{ "tcp",	showtcp,	fetchtcp,	labeltcp,
 	  inittcp,	opentcp,	closetcp,	cmdmode,
 	  resettcp,	CF_LOADAV },

Modified: stable/10/usr.bin/systat/extern.h
==============================================================================
--- stable/10/usr.bin/systat/extern.h	Mon Jan 18 18:41:09 2016	(r294284)
+++ stable/10/usr.bin/systat/extern.h	Mon Jan 18 18:50:26 2016	(r294285)
@@ -163,3 +163,14 @@ void	 showtcp(void);
 void	 status(void);
 void	 suspend(int);
 char	*sysctl_dynread(const char *, size_t *);
+
+#define SYSTAT_CMD(name)	\
+	void	 close ## name(WINDOW *); \
+	void	 fetch ## name(void); \
+	int	 init ## name(void); \
+	void	 label ## name(void); \
+	WINDOW	*open ## name(void); \
+	void	 reset ## name(void); \
+	void	 show ## name(void)
+
+SYSTAT_CMD ( sctp );

Copied: stable/10/usr.bin/systat/sctp.c (from r289873, head/usr.bin/systat/sctp.c)
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ stable/10/usr.bin/systat/sctp.c	Mon Jan 18 18:50:26 2016	(r294285, copy of r289873, head/usr.bin/systat/sctp.c)
@@ -0,0 +1,362 @@
+/*-
+ * Copyright (c) 2015
+ * The Regents of the University of California.  All rights reserved.
+ * Michael Tuexen.  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.
+ * 4. Neither the name of the University nor the names of its contributors
+ *    may be used to endorse or promote products derived from this software
+ *    without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+
+#include <sys/cdefs.h>
+__FBSDID("$FreeBSD$");
+
+#include <sys/param.h>
+#include <sys/types.h>
+#include <sys/socket.h>
+#include <sys/sysctl.h>
+
+#include <netinet/sctp.h>
+
+#include <stdlib.h>
+#include <string.h>
+
+#include "systat.h"
+#include "extern.h"
+#include "mode.h"
+
+static struct sctpstat curstat, initstat, oldstat;
+
+/*-
+--0         1         2         3         4         5         6         7
+--0123456789012345678901234567890123456789012345678901234567890123456789012345
+00             SCTP Associations                     SCTP Packets
+01999999999999 associations initiated   999999999999 packets sent
+02999999999999 associations accepted    999999999999 packets received
+03999999999999 associations established 999999999999 - out of the blue
+04999999999999 associations restarted   999999999999 - bad vtag
+05999999999999 associations terminated  999999999999 - bad crc32c
+06999999999999 associations aborted
+07
+08             SCTP Timers                           SCTP Chunks
+09999999999999 init timeouts            999999999999 control chunks sent
+10999999999999 cookie timeouts          999999999999 data chunks sent
+11999999999999 data timeouts            999999999999 - ordered
+12999999999999 delayed sack timeouts    999999999999 - unordered
+13999999999999 shutdown timeouts        999999999999 control chunks received
+14999999999999 shutdown-ack timeouts    999999999999 data chunks received
+15999999999999 shutdown guard timeouts  999999999999 - ordered
+16999999999999 heartbeat timeouts       999999999999 - unordered
+17999999999999 path MTU timeouts
+18999999999999 autoclose timeouts                    SCTP user messages
+19999999999999 asconf timeouts          999999999999 fragmented
+20999999999999 stream reset timeouts    999999999999 reassembled
+--0123456789012345678901234567890123456789012345678901234567890123456789012345
+--0         1         2         3         4         5         6         7
+*/
+
+WINDOW *
+opensctp(void)
+{
+	return (subwin(stdscr, LINES-3-1, 0, MAINWIN_ROW, 0));
+}
+
+void
+closesctp(WINDOW *w)
+{
+	if (w != NULL) {
+		wclear(w);
+		wrefresh(w);
+		delwin(w);
+	}
+}
+
+void
+labelsctp(void)
+{
+	wmove(wnd, 0, 0); wclrtoeol(wnd);
+#define L(row, str) mvwprintw(wnd, row, 13, str)
+#define R(row, str) mvwprintw(wnd, row, 51, str);
+	L(0, "SCTP Associations");		R(0, "SCTP Packets");
+	L(1, "associations initiated");		R(1, "packets sent");
+	L(2, "associations accepted");		R(2, "packets received");
+	L(3, "associations established");	R(3, "- out of the blue");
+	L(4, "associations restarted");		R(4, "- bad vtag");
+	L(5, "associations terminated");	R(5, "- bad crc32c");
+	L(6, "associations aborted");
+
+	L(8, "SCTP Timers");			R(8, "SCTP Chunks");
+	L(9, "init timeouts");			R(9, "control chunks sent");
+	L(10, "cookie timeouts");		R(10, "data chunks sent");
+	L(11, "data timeouts");			R(11, "- ordered");
+	L(12, "delayed sack timeouts");		R(12, "- unordered");
+	L(13, "shutdown timeouts");		R(13, "control chunks received");
+	L(14, "shutdown-ack timeouts");		R(14, "data chunks received");
+	L(15, "shutdown guard timeouts");	R(15, "- ordered");
+	L(16, "heartbeat timeouts");		R(16, "- unordered");
+	L(17, "path MTU timeouts");
+	L(18, "autoclose timeouts");		R(18, "SCTP User Messages");
+	L(19, "asconf timeouts");		R(19, "fragmented");
+	L(20, "stream reset timeouts");		R(20, "reassembled");
+#undef L
+#undef R
+}
+
+static void
+domode(struct sctpstat *ret)
+{
+	const struct sctpstat *sub;
+	int divisor = 1;
+
+	switch(currentmode) {
+	case display_RATE:
+		sub = &oldstat;
+		divisor = (delay > 1000000) ? delay / 1000000 : 1;
+		break;
+	case display_DELTA:
+		sub = &oldstat;
+		break;
+	case display_SINCE:
+		sub = &initstat;
+		break;
+	default:
+		*ret = curstat;
+		return;
+	}
+#define DO(stat) ret->stat = (curstat.stat - sub->stat) / divisor
+	DO(sctps_currestab);
+	DO(sctps_activeestab);
+	DO(sctps_restartestab);
+	DO(sctps_collisionestab);
+	DO(sctps_passiveestab);
+	DO(sctps_aborted);
+	DO(sctps_shutdown);
+	DO(sctps_outoftheblue);
+	DO(sctps_checksumerrors);
+	DO(sctps_outcontrolchunks);
+	DO(sctps_outorderchunks);
+	DO(sctps_outunorderchunks);
+	DO(sctps_incontrolchunks);
+	DO(sctps_inorderchunks);
+	DO(sctps_inunorderchunks);
+	DO(sctps_fragusrmsgs);
+	DO(sctps_reasmusrmsgs);
+	DO(sctps_outpackets);
+	DO(sctps_inpackets);
+
+	DO(sctps_recvpackets);
+	DO(sctps_recvdatagrams);
+	DO(sctps_recvpktwithdata);
+	DO(sctps_recvsacks);
+	DO(sctps_recvdata);
+	DO(sctps_recvdupdata);
+	DO(sctps_recvheartbeat);
+	DO(sctps_recvheartbeatack);
+	DO(sctps_recvecne);
+	DO(sctps_recvauth);
+	DO(sctps_recvauthmissing);
+	DO(sctps_recvivalhmacid);
+	DO(sctps_recvivalkeyid);
+	DO(sctps_recvauthfailed);
+	DO(sctps_recvexpress);
+	DO(sctps_recvexpressm);
+	DO(sctps_recvnocrc);
+	DO(sctps_recvswcrc);
+	DO(sctps_recvhwcrc);
+
+	DO(sctps_sendpackets);
+	DO(sctps_sendsacks);
+	DO(sctps_senddata);
+	DO(sctps_sendretransdata);
+	DO(sctps_sendfastretrans);
+	DO(sctps_sendmultfastretrans);
+	DO(sctps_sendheartbeat);
+	DO(sctps_sendecne);
+	DO(sctps_sendauth);
+	DO(sctps_senderrors);
+	DO(sctps_sendnocrc);
+	DO(sctps_sendswcrc);
+	DO(sctps_sendhwcrc);
+
+	DO(sctps_pdrpfmbox);
+	DO(sctps_pdrpfehos);
+	DO(sctps_pdrpmbda);
+	DO(sctps_pdrpmbct);
+	DO(sctps_pdrpbwrpt);
+	DO(sctps_pdrpcrupt);
+	DO(sctps_pdrpnedat);
+	DO(sctps_pdrppdbrk);
+	DO(sctps_pdrptsnnf);
+	DO(sctps_pdrpdnfnd);
+	DO(sctps_pdrpdiwnp);
+	DO(sctps_pdrpdizrw);
+	DO(sctps_pdrpbadd);
+	DO(sctps_pdrpmark);
+
+	DO(sctps_timoiterator);
+	DO(sctps_timodata);
+	DO(sctps_timowindowprobe);
+	DO(sctps_timoinit);
+	DO(sctps_timosack);
+	DO(sctps_timoshutdown);
+	DO(sctps_timoheartbeat);
+	DO(sctps_timocookie);
+	DO(sctps_timosecret);
+	DO(sctps_timopathmtu);
+	DO(sctps_timoshutdownack);
+	DO(sctps_timoshutdownguard);
+	DO(sctps_timostrmrst);
+	DO(sctps_timoearlyfr);
+	DO(sctps_timoasconf);
+	DO(sctps_timodelprim);
+	DO(sctps_timoautoclose);
+	DO(sctps_timoassockill);
+	DO(sctps_timoinpkill);
+
+	DO(sctps_hdrops);
+	DO(sctps_badsum);
+	DO(sctps_noport);
+	DO(sctps_badvtag);
+	DO(sctps_badsid);
+	DO(sctps_nomem);
+	DO(sctps_fastretransinrtt);
+	DO(sctps_markedretrans);
+	DO(sctps_naglesent);
+	DO(sctps_naglequeued);
+	DO(sctps_maxburstqueued);
+	DO(sctps_ifnomemqueued);
+	DO(sctps_windowprobed);
+	DO(sctps_lowlevelerr);
+	DO(sctps_lowlevelerrusr);
+	DO(sctps_datadropchklmt);
+	DO(sctps_datadroprwnd);
+	DO(sctps_ecnereducedcwnd);
+	DO(sctps_vtagexpress);
+	DO(sctps_vtagbogus);
+	DO(sctps_primary_randry);
+	DO(sctps_cmt_randry);
+	DO(sctps_slowpath_sack);
+	DO(sctps_wu_sacks_sent);
+	DO(sctps_sends_with_flags);
+	DO(sctps_sends_with_unord);
+	DO(sctps_sends_with_eof);
+	DO(sctps_sends_with_abort);
+	DO(sctps_protocol_drain_calls);
+	DO(sctps_protocol_drains_done);
+	DO(sctps_read_peeks);
+	DO(sctps_cached_chk);
+	DO(sctps_cached_strmoq);
+	DO(sctps_left_abandon);
+	DO(sctps_send_burst_avoid);
+	DO(sctps_send_cwnd_avoid);
+	DO(sctps_fwdtsn_map_over);
+	DO(sctps_queue_upd_ecne);
+#undef DO
+}
+
+void
+showsctp(void)
+{
+	struct sctpstat stats;
+
+	memset(&stats, 0, sizeof stats);
+	domode(&stats);
+
+#define DO(stat, row, col) \
+	mvwprintw(wnd, row, col, "%12lu", stats.stat)
+#define	L(row, stat) DO(stat, row, 0)
+#define	R(row, stat) DO(stat, row, 38)
+	L(1, sctps_activeestab);	R(1, sctps_outpackets);
+	L(2, sctps_passiveestab);	R(2, sctps_inpackets);
+	L(3, sctps_currestab);		R(3, sctps_outoftheblue);
+	L(4, sctps_restartestab);	R(4, sctps_badvtag);
+	L(5, sctps_shutdown);		R(5, sctps_checksumerrors);
+	L(6, sctps_aborted);
+
+
+	L(9, sctps_timoinit);		R(9, sctps_outcontrolchunks);
+	L(10, sctps_timocookie);	R(10, sctps_senddata);
+	L(11, sctps_timodata);		R(11, sctps_outorderchunks);
+	L(12, sctps_timosack);		R(12, sctps_outunorderchunks);
+	L(13, sctps_timoshutdown);	R(13, sctps_incontrolchunks);
+	L(14, sctps_timoshutdownack);	R(14, sctps_recvdata);
+	L(15, sctps_timoshutdownguard);	R(15, sctps_inorderchunks);
+	L(16, sctps_timoheartbeat);	R(16, sctps_inunorderchunks);
+	L(17, sctps_timopathmtu);
+	L(18, sctps_timoautoclose);
+	L(19, sctps_timoasconf);	R(19, sctps_fragusrmsgs);
+	L(20, sctps_timostrmrst);	R(20, sctps_reasmusrmsgs);
+#undef DO
+#undef L
+#undef R
+}
+
+int
+initsctp(void)
+{
+	size_t len;
+	const char *name = "net.inet.sctp.stats";
+
+	len = 0;
+	if (sysctlbyname(name, NULL, &len, NULL, 0) < 0) {
+		error("sysctl getting sctpstat size failed");
+		return 0;
+	}
+	if (len > sizeof curstat) {
+		error("sctpstat structure has grown--recompile systat!");
+		return 0;
+	}
+	if (sysctlbyname(name, &initstat, &len, NULL, 0) < 0) {
+		error("sysctl getting sctpstat failed");
+		return 0;
+	}
+	oldstat = initstat;
+	return 1;
+}
+
+void
+resetsctp(void)
+{
+	size_t len;
+	const char *name = "net.inet.sctp.stats";
+
+	len = sizeof initstat;
+	if (sysctlbyname(name, &initstat, &len, NULL, 0) < 0) {
+		error("sysctl getting sctpstat failed");
+	}
+	oldstat = initstat;
+}
+
+void
+fetchsctp(void)
+{
+	size_t len;
+	const char *name = "net.inet.sctp.stats";
+
+	oldstat = curstat;
+	len = sizeof curstat;
+	if (sysctlbyname(name, &curstat, &len, NULL, 0) < 0) {
+		error("sysctl getting sctpstat failed");
+	}
+	return;
+}

Modified: stable/10/usr.bin/systat/systat.1
==============================================================================
--- stable/10/usr.bin/systat/systat.1	Mon Jan 18 18:41:09 2016	(r294284)
+++ stable/10/usr.bin/systat/systat.1	Mon Jan 18 18:50:26 2016	(r294285)
@@ -28,7 +28,7 @@
 .\"	@(#)systat.1	8.2 (Berkeley) 12/30/93
 .\" $FreeBSD$
 .\"
-.Dd July 15, 2013
+.Dd October 24, 2015
 .Dt SYSTAT 1
 .Os
 .Sh NAME
@@ -95,6 +95,7 @@ to be one of:
 .Ic ip6 ,
 .Ic netstat ,
 .Ic pigs ,
+.Ic sctp ,
 .Ic swap ,
 .Ic tcp ,
 or
@@ -223,6 +224,12 @@ except that it displays
 statistics.
 It does not display
 .Tn UDP statistics.
+.It Ic sctp
+Like
+.Ic icmp ,
+but with
+.Tn SCTP
+statistics.
 .It Ic tcp
 Like
 .Ic icmp ,

From owner-svn-src-all@freebsd.org  Mon Jan 18 19:13:56 2016
Return-Path: <owner-svn-src-all@freebsd.org>
Delivered-To: svn-src-all@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id AB9B1A86E87;
 Mon, 18 Jan 2016 19:13:56 +0000 (UTC)
 (envelope-from delphij@FreeBSD.org)
Received: from repo.freebsd.org (repo.freebsd.org
 [IPv6:2610:1c1:1:6068::e6a:0])
 (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
 (Client did not present a certificate)
 by mx1.freebsd.org (Postfix) with ESMTPS id 44A621E87;
 Mon, 18 Jan 2016 19:13:56 +0000 (UTC)
 (envelope-from delphij@FreeBSD.org)
Received: from repo.freebsd.org ([127.0.1.37])
 by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u0IJDtgf071353;
 Mon, 18 Jan 2016 19:13:55 GMT (envelope-from delphij@FreeBSD.org)
Received: (from delphij@localhost)
 by repo.freebsd.org (8.15.2/8.15.2/Submit) id u0IJDsjf071343;
 Mon, 18 Jan 2016 19:13:54 GMT (envelope-from delphij@FreeBSD.org)
Message-Id: <201601181913.u0IJDsjf071343@repo.freebsd.org>
X-Authentication-Warning: repo.freebsd.org: delphij set sender to
 delphij@FreeBSD.org using -f
From: Xin LI <delphij@FreeBSD.org>
Date: Mon, 18 Jan 2016 19:13:54 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org
Subject: svn commit: r294286 - in stable/10: contrib/less usr.bin/less
X-SVN-Group: stable-10
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.20
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for &quot;
 user&quot; and &quot; projects&quot; \)" <svn-src-all.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-all/>
List-Post: <mailto:svn-src-all@freebsd.org>
List-Help: <mailto:svn-src-all-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Mon, 18 Jan 2016 19:13:56 -0000

Author: delphij
Date: Mon Jan 18 19:13:54 2016
New Revision: 294286
URL: https://svnweb.freebsd.org/changeset/base/294286

Log:
  MFC r293190: MFV r293125: less v481.
  
  Relnotes:	yes

Added:
  stable/10/contrib/less/compose.uni
     - copied unchanged from r293190, head/contrib/less/compose.uni
  stable/10/contrib/less/mkutable
     - copied unchanged from r293190, head/contrib/less/mkutable
  stable/10/contrib/less/ubin.uni
     - copied unchanged from r293190, head/contrib/less/ubin.uni
  stable/10/contrib/less/wide.uni
     - copied unchanged from r293190, head/contrib/less/wide.uni
Modified:
  stable/10/contrib/less/LICENSE
  stable/10/contrib/less/NEWS
  stable/10/contrib/less/README
  stable/10/contrib/less/brac.c
  stable/10/contrib/less/ch.c
  stable/10/contrib/less/charset.c
  stable/10/contrib/less/charset.h
  stable/10/contrib/less/cmd.h
  stable/10/contrib/less/cmdbuf.c
  stable/10/contrib/less/command.c
  stable/10/contrib/less/cvt.c
  stable/10/contrib/less/decode.c
  stable/10/contrib/less/edit.c
  stable/10/contrib/less/filename.c
  stable/10/contrib/less/forwback.c
  stable/10/contrib/less/funcs.h
  stable/10/contrib/less/help.c
  stable/10/contrib/less/ifile.c
  stable/10/contrib/less/input.c
  stable/10/contrib/less/jump.c
  stable/10/contrib/less/less.h
  stable/10/contrib/less/less.hlp
  stable/10/contrib/less/less.nro
  stable/10/contrib/less/lessecho.c
  stable/10/contrib/less/lessecho.nro
  stable/10/contrib/less/lesskey.c
  stable/10/contrib/less/lesskey.h
  stable/10/contrib/less/lesskey.nro
  stable/10/contrib/less/lglob.h
  stable/10/contrib/less/line.c
  stable/10/contrib/less/linenum.c
  stable/10/contrib/less/lsystem.c
  stable/10/contrib/less/main.c
  stable/10/contrib/less/mark.c
  stable/10/contrib/less/mkhelp.c
  stable/10/contrib/less/optfunc.c
  stable/10/contrib/less/option.c
  stable/10/contrib/less/option.h
  stable/10/contrib/less/opttbl.c
  stable/10/contrib/less/os.c
  stable/10/contrib/less/output.c
  stable/10/contrib/less/pattern.c
  stable/10/contrib/less/pattern.h
  stable/10/contrib/less/pckeys.h
  stable/10/contrib/less/position.c
  stable/10/contrib/less/position.h
  stable/10/contrib/less/prompt.c
  stable/10/contrib/less/regexp.c
  stable/10/contrib/less/screen.c
  stable/10/contrib/less/scrsize.c
  stable/10/contrib/less/search.c
  stable/10/contrib/less/signal.c
  stable/10/contrib/less/tags.c
  stable/10/contrib/less/ttyin.c
  stable/10/contrib/less/version.c
  stable/10/usr.bin/less/defines.h
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/contrib/less/LICENSE
==============================================================================
--- stable/10/contrib/less/LICENSE	Mon Jan 18 18:50:26 2016	(r294285)
+++ stable/10/contrib/less/LICENSE	Mon Jan 18 19:13:54 2016	(r294286)
@@ -2,7 +2,7 @@
                           ------------
 
 Less
-Copyright (C) 1984-2012  Mark Nudelman
+Copyright (C) 1984-2015  Mark Nudelman
 
 Redistribution and use in source and binary forms, with or without
 modification, are permitted provided that the following conditions

Modified: stable/10/contrib/less/NEWS
==============================================================================
--- stable/10/contrib/less/NEWS	Mon Jan 18 18:50:26 2016	(r294285)
+++ stable/10/contrib/less/NEWS	Mon Jan 18 19:13:54 2016	(r294286)
@@ -7,7 +7,44 @@
       http://www.greenwoodsoftware.com/less
   You can also download the latest version of less from there.
 
-  To report bugs, suggestions or comments, send email to bug-less@gnu.org.
+  To report bugs, suggestions or comments, send email to bug-less@gnu.org
+
+======================================================================
+
+	Major changes between "less" versions 458 and 481
+
+* Don't overwrite history file; just append to it.
+
+* New command ESC-G goes to end of currently buffered data in a pipe.
+
+* Disable history feature when compiled with LESSHISTFILE set to "-".
+
+* In more-compatible mode, make the -p option apply to every file opened,
+  not just the first one.
+
+* In more-compatible mode, change the -e option to work like -E, not -EF.
+
+* Treat multiple CRs before LF are like one CR (all the CRs are hidden).
+
+* Allow "extra" string in lesskey file to append to a multi-char command
+  (like a search pattern), without executing the command.
+
+* Ignore -u/-U setting while viewing help file, so that 
+  underline and bold chars are displayed correctly.
+
+* Improve detection of "binary" files in UTF-8 mode.
+
+* Fix bug with ++ commands.
+
+* Fix bug where prompt was sometimes not displayed with +G.
+
+* Fix possible memory corruption 
+
+* Fix bugs and improve performance in ampersand filtering.
+
+* Automate construction of Unicode tables from Unicode database.
+
+* Allow %% escape sequence in LESSOPEN variable.
 
 ======================================================================
 

Modified: stable/10/contrib/less/README
==============================================================================
--- stable/10/contrib/less/README	Mon Jan 18 18:50:26 2016	(r294285)
+++ stable/10/contrib/less/README	Mon Jan 18 19:13:54 2016	(r294286)
@@ -7,9 +7,9 @@
 **************************************************************************
 **************************************************************************
 
-                            Less, version 458
+                            Less, version 481
 
-    This is the distribution of less, version 458, released 04 Apr 2013.
+    This is the distribution of less, version 481, released 31 Aug 2015.
     This program is part of the GNU project (http://www.gnu.org).
 
     This program is free software.  You may redistribute it and/or
@@ -53,8 +53,9 @@ INSTALLATION (Unix systems only):
      Specifies the regular expression library used by less for pattern
      matching.  The default is "auto", which means the configure program 
      finds a regular expression library automatically.  Other values are:
-        posix          Use the POSIX-compatible regcomp.
+        gnu            Use the GNU regex library.
         pcre           Use the PCRE library.
+        posix          Use the POSIX-compatible regcomp.
         regcmp         Use the regcmp library.
         re_comp        Use the re_comp library.
         regcomp        Use the V8-compatible regcomp.

Modified: stable/10/contrib/less/brac.c
==============================================================================
--- stable/10/contrib/less/brac.c	Mon Jan 18 18:50:26 2016	(r294285)
+++ stable/10/contrib/less/brac.c	Mon Jan 18 19:13:54 2016	(r294286)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 1984-2012  Mark Nudelman
+ * Copyright (C) 1984-2015  Mark Nudelman
  *
  * You may distribute under the terms of either the GNU General Public
  * License or the Less License, as specified in the README file.

Modified: stable/10/contrib/less/ch.c
==============================================================================
--- stable/10/contrib/less/ch.c	Mon Jan 18 18:50:26 2016	(r294285)
+++ stable/10/contrib/less/ch.c	Mon Jan 18 19:13:54 2016	(r294286)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 1984-2012  Mark Nudelman
+ * Copyright (C) 1984-2015  Mark Nudelman
  *
  * You may distribute under the terms of either the GNU General Public
  * License or the Less License, as specified in the README file.
@@ -54,7 +54,7 @@ struct buf {
  * The file state is maintained in a filestate structure.
  * A pointer to the filestate is kept in the ifile structure.
  */
-#define	BUFHASH_SIZE	64
+#define	BUFHASH_SIZE	1024
 struct filestate {
 	struct bufnode buflist;
 	struct bufnode hashtbl[BUFHASH_SIZE];
@@ -323,13 +323,16 @@ ch_get()
 #if HAVE_STAT_INO
 			if (follow_mode == FOLLOW_NAME)
 			{
-				/* See whether the file's i-number has changed.
+				/* See whether the file's i-number has changed,
+				 * or the file has shrunk.
 				 * If so, force the file to be closed and
 				 * reopened. */
 				struct stat st;
+				POSITION curr_pos = ch_tell();
 				int r = stat(get_filename(curr_ifile), &st);
 				if (r == 0 && (st.st_ino != curr_ino ||
-					st.st_dev != curr_dev))
+					st.st_dev != curr_dev ||
+					(curr_pos != NULL_POSITION && st.st_size < curr_pos)))
 				{
 					/* screen_trashed=2 causes
 					 * make_display to reopen the file. */
@@ -536,6 +539,32 @@ ch_end_seek()
 }
 
 /*
+ * Seek to the last position in the file that is currently buffered.
+ */
+	public int
+ch_end_buffer_seek()
+{
+	register struct buf *bp;
+	register struct bufnode *bn;
+	POSITION buf_pos;
+	POSITION end_pos;
+
+	if (thisfile == NULL || (ch_flags & CH_CANSEEK))
+		return (ch_end_seek());
+
+	end_pos = 0;
+	FOR_BUFS(bn)
+	{
+		bp = bufnode_buf(bn);
+		buf_pos = (bp->block * LBUFSIZE) + bp->datasize;
+		if (buf_pos > end_pos)
+			end_pos = buf_pos;
+	}
+
+	return (ch_seek(end_pos));
+}
+
+/*
  * Seek to the beginning of the file, or as close to it as we can get.
  * We may not be able to seek there if input is a pipe and the
  * beginning of the pipe is no longer buffered.

Modified: stable/10/contrib/less/charset.c
==============================================================================
--- stable/10/contrib/less/charset.c	Mon Jan 18 18:50:26 2016	(r294285)
+++ stable/10/contrib/less/charset.c	Mon Jan 18 19:13:54 2016	(r294286)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 1984-2012  Mark Nudelman
+ * Copyright (C) 1984-2015  Mark Nudelman
  *
  * You may distribute under the terms of either the GNU General Public
  * License or the Less License, as specified in the README file.
@@ -466,36 +466,15 @@ prutfchar(ch)
 		else
 			SNPRINTF1(buf, sizeof(buf), binfmt, (char) ch);
 	} else if (is_ubin_char(ch))
+	{
 		SNPRINTF1(buf, sizeof(buf), utfbinfmt, ch);
-	else
+	} else
 	{
-		int len;
+		char *p = buf;
 		if (ch >= 0x80000000)
-		{
-			len = 3;
-			ch = 0xFFFD;
-		} else
-		{
-			len =   (ch < 0x80) ? 1
-			      : (ch < 0x800) ? 2
-			      : (ch < 0x10000) ? 3
-			      : (ch < 0x200000) ? 4
-			      : (ch < 0x4000000) ? 5
-			      : 6;
-		}
-		buf[len] = '\0';
-		if (len == 1)
-			*buf = (char) ch;
-		else
-		{
-			*buf = ((1 << len) - 1) << (8 - len);
-			while (--len > 0)
-			{
-				buf[len] = (char) (0x80 | (ch & 0x3F));
-				ch >>= 6;
-			}
-			*buf |= ch;
-		}
+			ch = 0xFFFD; /* REPLACEMENT CHARACTER */
+		put_wchar(&p, ch);
+		*p = '\0';
 	}
 	return (buf);
 }
@@ -524,11 +503,12 @@ utf_len(ch)
 }
 
 /*
- * Is a UTF-8 character well-formed?
+ * Does the parameter point to the lead byte of a well-formed UTF-8 character?
  */
 	public int
-is_utf8_well_formed(s)
+is_utf8_well_formed(s, slen)
 	unsigned char *s;
+	int slen;
 {
 	int i;
 	int len;
@@ -537,6 +517,8 @@ is_utf8_well_formed(s)
 		return (0);
 
 	len = utf_len((char) s[0]);
+	if (len > slen)
+		return (0);
 	if (len == 1)
 		return (1);
 	if (len == 2)
@@ -558,6 +540,35 @@ is_utf8_well_formed(s)
 }
 
 /*
+ * Return number of invalid UTF-8 sequences found in a buffer.
+ */
+	public int
+utf_bin_count(data, len)
+	unsigned char *data;
+	int len;
+{
+	int bin_count = 0;
+	while (len > 0)
+	{
+		if (is_utf8_well_formed(data, len))
+		{
+			int clen = utf_len(*data);
+			data += clen;
+			len -= clen;
+		} else
+		{
+			/* Skip to next lead byte. */
+			bin_count++;
+			do {
+				++data;
+				--len;
+			} while (len > 0 && !IS_UTF8_LEAD(*data));
+		}
+	}
+	return (bin_count);
+}
+
+/*
  * Get the value of a UTF-8 character.
  */
 	public LWCHAR
@@ -706,411 +717,51 @@ step_char(pp, dir, limit)
 
 /*
  * Unicode characters data
+ * Actual data is in the generated *.uni files.
  */
-struct wchar_range { LWCHAR first, last; };
 
-/*
- * Characters with general category values
- *	Mn: Mark, Nonspacing
- *	Me: Mark, Enclosing
- * Last synched with
- *	<http://www.unicode.org/Public/5.0.0/ucd/UnicodeData-5.0.0d7.txt>
- *	dated 2005-11-30T00:58:48Z
- */
-static struct wchar_range comp_table[] = {
-	{  0x0300,  0x036F} /* Mn */, {  0x0483,  0x0486} /* Mn */,
-	{  0x0488,  0x0489} /* Me */,
-	{  0x0591,  0x05BD} /* Mn */, {  0x05BF,  0x05BF} /* Mn */,
-	{  0x05C1,  0x05C2} /* Mn */, {  0x05C4,  0x05C5} /* Mn */,
-	{  0x05C7,  0x05C7} /* Mn */, {  0x0610,  0x0615} /* Mn */,
-	{  0x064B,  0x065E} /* Mn */, {  0x0670,  0x0670} /* Mn */,
-	{  0x06D6,  0x06DC} /* Mn */,
-	{  0x06DE,  0x06DE} /* Me */,
-	{  0x06DF,  0x06E4} /* Mn */, {  0x06E7,  0x06E8} /* Mn */,
-	{  0x06EA,  0x06ED} /* Mn */, {  0x0711,  0x0711} /* Mn */,
-	{  0x0730,  0x074A} /* Mn */, {  0x07A6,  0x07B0} /* Mn */,
-	{  0x07EB,  0x07F3} /* Mn */, {  0x0901,  0x0902} /* Mn */,
-	{  0x093C,  0x093C} /* Mn */, {  0x0941,  0x0948} /* Mn */,
-	{  0x094D,  0x094D} /* Mn */, {  0x0951,  0x0954} /* Mn */,
-	{  0x0962,  0x0963} /* Mn */, {  0x0981,  0x0981} /* Mn */,
-	{  0x09BC,  0x09BC} /* Mn */, {  0x09C1,  0x09C4} /* Mn */,
-	{  0x09CD,  0x09CD} /* Mn */, {  0x09E2,  0x09E3} /* Mn */,
-	{  0x0A01,  0x0A02} /* Mn */, {  0x0A3C,  0x0A3C} /* Mn */,
-	{  0x0A41,  0x0A42} /* Mn */, {  0x0A47,  0x0A48} /* Mn */,
-	{  0x0A4B,  0x0A4D} /* Mn */, {  0x0A70,  0x0A71} /* Mn */,
-	{  0x0A81,  0x0A82} /* Mn */, {  0x0ABC,  0x0ABC} /* Mn */,
-	{  0x0AC1,  0x0AC5} /* Mn */, {  0x0AC7,  0x0AC8} /* Mn */,
-	{  0x0ACD,  0x0ACD} /* Mn */, {  0x0AE2,  0x0AE3} /* Mn */,
-	{  0x0B01,  0x0B01} /* Mn */, {  0x0B3C,  0x0B3C} /* Mn */,
-	{  0x0B3F,  0x0B3F} /* Mn */, {  0x0B41,  0x0B43} /* Mn */,
-	{  0x0B4D,  0x0B4D} /* Mn */, {  0x0B56,  0x0B56} /* Mn */,
-	{  0x0B82,  0x0B82} /* Mn */, {  0x0BC0,  0x0BC0} /* Mn */,
-	{  0x0BCD,  0x0BCD} /* Mn */, {  0x0C3E,  0x0C40} /* Mn */,
-	{  0x0C46,  0x0C48} /* Mn */, {  0x0C4A,  0x0C4D} /* Mn */,
-	{  0x0C55,  0x0C56} /* Mn */, {  0x0CBC,  0x0CBC} /* Mn */,
-	{  0x0CBF,  0x0CBF} /* Mn */, {  0x0CC6,  0x0CC6} /* Mn */,
-	{  0x0CCC,  0x0CCD} /* Mn */, {  0x0CE2,  0x0CE3} /* Mn */,
-	{  0x0D41,  0x0D43} /* Mn */, {  0x0D4D,  0x0D4D} /* Mn */,
-	{  0x0DCA,  0x0DCA} /* Mn */, {  0x0DD2,  0x0DD4} /* Mn */,
-	{  0x0DD6,  0x0DD6} /* Mn */, {  0x0E31,  0x0E31} /* Mn */,
-	{  0x0E34,  0x0E3A} /* Mn */, {  0x0E47,  0x0E4E} /* Mn */,
-	{  0x0EB1,  0x0EB1} /* Mn */, {  0x0EB4,  0x0EB9} /* Mn */,
-	{  0x0EBB,  0x0EBC} /* Mn */, {  0x0EC8,  0x0ECD} /* Mn */,
-	{  0x0F18,  0x0F19} /* Mn */, {  0x0F35,  0x0F35} /* Mn */,
-	{  0x0F37,  0x0F37} /* Mn */, {  0x0F39,  0x0F39} /* Mn */,
-	{  0x0F71,  0x0F7E} /* Mn */, {  0x0F80,  0x0F84} /* Mn */,
-	{  0x0F86,  0x0F87} /* Mn */, {  0x0F90,  0x0F97} /* Mn */,
-	{  0x0F99,  0x0FBC} /* Mn */, {  0x0FC6,  0x0FC6} /* Mn */,
-	{  0x102D,  0x1030} /* Mn */, {  0x1032,  0x1032} /* Mn */,
-	{  0x1036,  0x1037} /* Mn */, {  0x1039,  0x1039} /* Mn */,
-	{  0x1058,  0x1059} /* Mn */, {  0x135F,  0x135F} /* Mn */,
-	{  0x1712,  0x1714} /* Mn */, {  0x1732,  0x1734} /* Mn */,
-	{  0x1752,  0x1753} /* Mn */, {  0x1772,  0x1773} /* Mn */,
-	{  0x17B7,  0x17BD} /* Mn */, {  0x17C6,  0x17C6} /* Mn */,
-	{  0x17C9,  0x17D3} /* Mn */, {  0x17DD,  0x17DD} /* Mn */,
-	{  0x180B,  0x180D} /* Mn */, {  0x18A9,  0x18A9} /* Mn */,
-	{  0x1920,  0x1922} /* Mn */, {  0x1927,  0x1928} /* Mn */,
-	{  0x1932,  0x1932} /* Mn */, {  0x1939,  0x193B} /* Mn */,
-	{  0x1A17,  0x1A18} /* Mn */, {  0x1B00,  0x1B03} /* Mn */,
-	{  0x1B34,  0x1B34} /* Mn */, {  0x1B36,  0x1B3A} /* Mn */,
-	{  0x1B3C,  0x1B3C} /* Mn */, {  0x1B42,  0x1B42} /* Mn */,
-	{  0x1B6B,  0x1B73} /* Mn */, {  0x1DC0,  0x1DCA} /* Mn */,
-	{  0x1DFE,  0x1DFF} /* Mn */, {  0x20D0,  0x20DC} /* Mn */,
-	{  0x20DD,  0x20E0} /* Me */,
-	{  0x20E1,  0x20E1} /* Mn */,
-	{  0x20E2,  0x20E4} /* Me */,
-	{  0x20E5,  0x20EF} /* Mn */, {  0x302A,  0x302F} /* Mn */,
-	{  0x3099,  0x309A} /* Mn */, {  0xA806,  0xA806} /* Mn */,
-	{  0xA80B,  0xA80B} /* Mn */, {  0xA825,  0xA826} /* Mn */,
-	{  0xFB1E,  0xFB1E} /* Mn */, {  0xFE00,  0xFE0F} /* Mn */,
-	{  0xFE20,  0xFE23} /* Mn */, { 0x10A01, 0x10A03} /* Mn */,
-	{ 0x10A05, 0x10A06} /* Mn */, { 0x10A0C, 0x10A0F} /* Mn */,
-	{ 0x10A38, 0x10A3A} /* Mn */, { 0x10A3F, 0x10A3F} /* Mn */,
-	{ 0x1D167, 0x1D169} /* Mn */, { 0x1D17B, 0x1D182} /* Mn */,
-	{ 0x1D185, 0x1D18B} /* Mn */, { 0x1D1AA, 0x1D1AD} /* Mn */,
-	{ 0x1D242, 0x1D244} /* Mn */, { 0xE0100, 0xE01EF} /* Mn */,
-};
+#define DECLARE_RANGE_TABLE_START(name) \
+    static struct wchar_range name##_array[] = {
+#define DECLARE_RANGE_TABLE_END(name) \
+    }; struct wchar_range_table name##_table = { name##_array, sizeof(name##_array)/sizeof(*name##_array) };
 
-/*
- * Special pairs, not ranges.
- */
+DECLARE_RANGE_TABLE_START(compose)
+#include "compose.uni"
+DECLARE_RANGE_TABLE_END(compose)
+
+DECLARE_RANGE_TABLE_START(ubin)
+#include "ubin.uni"
+DECLARE_RANGE_TABLE_END(ubin)
+
+DECLARE_RANGE_TABLE_START(wide)
+#include "wide.uni"
+DECLARE_RANGE_TABLE_END(wide)
+
+/* comb_table is special pairs, not ranges. */
 static struct wchar_range comb_table[] = {
 	{0x0644,0x0622}, {0x0644,0x0623}, {0x0644,0x0625}, {0x0644,0x0627},
 };
 
-/*
- * Characters with general category values
- *	Cc: Other, Control
- *	Cf: Other, Format
- *	Cs: Other, Surrogate
- *	Co: Other, Private Use
- *	Cn: Other, Not Assigned
- *	Zl: Separator, Line
- *	Zp: Separator, Paragraph
- * Last synched with
- *	<http://www.unicode.org/Public/5.0.0/ucd/UnicodeData-5.0.0d7.txt>
- *	dated 2005-11-30T00:58:48Z
- */
-static struct wchar_range ubin_table[] = {
-	{  0x0000,  0x0007} /* Cc */, 
-	{  0x000B,  0x000C} /* Cc */, 
-	{  0x000E,  0x001A} /* Cc */, 
-	{  0x001C,  0x001F} /* Cc */, 
-	{  0x007F,  0x009F} /* Cc */,
-#if 0
-	{  0x00AD,  0x00AD} /* Cf */,
-#endif
-	{  0x0370,  0x0373} /* Cn */, {  0x0376,  0x0379} /* Cn */,
-	{  0x037F,  0x0383} /* Cn */, {  0x038B,  0x038B} /* Cn */,
-	{  0x038D,  0x038D} /* Cn */, {  0x03A2,  0x03A2} /* Cn */,
-	{  0x03CF,  0x03CF} /* Cn */, {  0x0487,  0x0487} /* Cn */,
-	{  0x0514,  0x0530} /* Cn */, {  0x0557,  0x0558} /* Cn */,
-	{  0x0560,  0x0560} /* Cn */, {  0x0588,  0x0588} /* Cn */,
-	{  0x058B,  0x0590} /* Cn */, {  0x05C8,  0x05CF} /* Cn */,
-	{  0x05EB,  0x05EF} /* Cn */, {  0x05F5,  0x05FF} /* Cn */,
-#if 0
-	{  0x0600,  0x0603} /* Cf */,
-#endif
-	{  0x0604,  0x060A} /* Cn */, {  0x0616,  0x061A} /* Cn */,
-	{  0x061C,  0x061D} /* Cn */, {  0x0620,  0x0620} /* Cn */,
-	{  0x063B,  0x063F} /* Cn */, {  0x065F,  0x065F} /* Cn */,
-#if 0
-	{  0x06DD,  0x06DD} /* Cf */,
-#endif
-	{  0x070E,  0x070E} /* Cn */,
-#if 0
-	{  0x070F,  0x070F} /* Cf */,
-#endif
-	{  0x074B,  0x074C} /* Cn */, {  0x076E,  0x077F} /* Cn */,
-	{  0x07B2,  0x07BF} /* Cn */, {  0x07FB,  0x0900} /* Cn */,
-	{  0x093A,  0x093B} /* Cn */, {  0x094E,  0x094F} /* Cn */,
-	{  0x0955,  0x0957} /* Cn */, {  0x0971,  0x097A} /* Cn */,
-	{  0x0980,  0x0980} /* Cn */, {  0x0984,  0x0984} /* Cn */,
-	{  0x098D,  0x098E} /* Cn */, {  0x0991,  0x0992} /* Cn */,
-	{  0x09A9,  0x09A9} /* Cn */, {  0x09B1,  0x09B1} /* Cn */,
-	{  0x09B3,  0x09B5} /* Cn */, {  0x09BA,  0x09BB} /* Cn */,
-	{  0x09C5,  0x09C6} /* Cn */, {  0x09C9,  0x09CA} /* Cn */,
-	{  0x09CF,  0x09D6} /* Cn */, {  0x09D8,  0x09DB} /* Cn */,
-	{  0x09DE,  0x09DE} /* Cn */, {  0x09E4,  0x09E5} /* Cn */,
-	{  0x09FB,  0x0A00} /* Cn */, {  0x0A04,  0x0A04} /* Cn */,
-	{  0x0A0B,  0x0A0E} /* Cn */, {  0x0A11,  0x0A12} /* Cn */,
-	{  0x0A29,  0x0A29} /* Cn */, {  0x0A31,  0x0A31} /* Cn */,
-	{  0x0A34,  0x0A34} /* Cn */, {  0x0A37,  0x0A37} /* Cn */,
-	{  0x0A3A,  0x0A3B} /* Cn */, {  0x0A3D,  0x0A3D} /* Cn */,
-	{  0x0A43,  0x0A46} /* Cn */, {  0x0A49,  0x0A4A} /* Cn */,
-	{  0x0A4E,  0x0A58} /* Cn */, {  0x0A5D,  0x0A5D} /* Cn */,
-	{  0x0A5F,  0x0A65} /* Cn */, {  0x0A75,  0x0A80} /* Cn */,
-	{  0x0A84,  0x0A84} /* Cn */, {  0x0A8E,  0x0A8E} /* Cn */,
-	{  0x0A92,  0x0A92} /* Cn */, {  0x0AA9,  0x0AA9} /* Cn */,
-	{  0x0AB1,  0x0AB1} /* Cn */, {  0x0AB4,  0x0AB4} /* Cn */,
-	{  0x0ABA,  0x0ABB} /* Cn */, {  0x0AC6,  0x0AC6} /* Cn */,
-	{  0x0ACA,  0x0ACA} /* Cn */, {  0x0ACE,  0x0ACF} /* Cn */,
-	{  0x0AD1,  0x0ADF} /* Cn */, {  0x0AE4,  0x0AE5} /* Cn */,
-	{  0x0AF0,  0x0AF0} /* Cn */, {  0x0AF2,  0x0B00} /* Cn */,
-	{  0x0B04,  0x0B04} /* Cn */, {  0x0B0D,  0x0B0E} /* Cn */,
-	{  0x0B11,  0x0B12} /* Cn */, {  0x0B29,  0x0B29} /* Cn */,
-	{  0x0B31,  0x0B31} /* Cn */, {  0x0B34,  0x0B34} /* Cn */,
-	{  0x0B3A,  0x0B3B} /* Cn */, {  0x0B44,  0x0B46} /* Cn */,
-	{  0x0B49,  0x0B4A} /* Cn */, {  0x0B4E,  0x0B55} /* Cn */,
-	{  0x0B58,  0x0B5B} /* Cn */, {  0x0B5E,  0x0B5E} /* Cn */,
-	{  0x0B62,  0x0B65} /* Cn */, {  0x0B72,  0x0B81} /* Cn */,
-	{  0x0B84,  0x0B84} /* Cn */, {  0x0B8B,  0x0B8D} /* Cn */,
-	{  0x0B91,  0x0B91} /* Cn */, {  0x0B96,  0x0B98} /* Cn */,
-	{  0x0B9B,  0x0B9B} /* Cn */, {  0x0B9D,  0x0B9D} /* Cn */,
-	{  0x0BA0,  0x0BA2} /* Cn */, {  0x0BA5,  0x0BA7} /* Cn */,
-	{  0x0BAB,  0x0BAD} /* Cn */, {  0x0BBA,  0x0BBD} /* Cn */,
-	{  0x0BC3,  0x0BC5} /* Cn */, {  0x0BC9,  0x0BC9} /* Cn */,
-	{  0x0BCE,  0x0BD6} /* Cn */, {  0x0BD8,  0x0BE5} /* Cn */,
-	{  0x0BFB,  0x0C00} /* Cn */, {  0x0C04,  0x0C04} /* Cn */,
-	{  0x0C0D,  0x0C0D} /* Cn */, {  0x0C11,  0x0C11} /* Cn */,
-	{  0x0C29,  0x0C29} /* Cn */, {  0x0C34,  0x0C34} /* Cn */,
-	{  0x0C3A,  0x0C3D} /* Cn */, {  0x0C45,  0x0C45} /* Cn */,
-	{  0x0C49,  0x0C49} /* Cn */, {  0x0C4E,  0x0C54} /* Cn */,
-	{  0x0C57,  0x0C5F} /* Cn */, {  0x0C62,  0x0C65} /* Cn */,
-	{  0x0C70,  0x0C81} /* Cn */, {  0x0C84,  0x0C84} /* Cn */,
-	{  0x0C8D,  0x0C8D} /* Cn */, {  0x0C91,  0x0C91} /* Cn */,
-	{  0x0CA9,  0x0CA9} /* Cn */, {  0x0CB4,  0x0CB4} /* Cn */,
-	{  0x0CBA,  0x0CBB} /* Cn */, {  0x0CC5,  0x0CC5} /* Cn */,
-	{  0x0CC9,  0x0CC9} /* Cn */, {  0x0CCE,  0x0CD4} /* Cn */,
-	{  0x0CD7,  0x0CDD} /* Cn */, {  0x0CDF,  0x0CDF} /* Cn */,
-	{  0x0CE4,  0x0CE5} /* Cn */, {  0x0CF0,  0x0CF0} /* Cn */,
-	{  0x0CF3,  0x0D01} /* Cn */, {  0x0D04,  0x0D04} /* Cn */,
-	{  0x0D0D,  0x0D0D} /* Cn */, {  0x0D11,  0x0D11} /* Cn */,
-	{  0x0D29,  0x0D29} /* Cn */, {  0x0D3A,  0x0D3D} /* Cn */,
-	{  0x0D44,  0x0D45} /* Cn */, {  0x0D49,  0x0D49} /* Cn */,
-	{  0x0D4E,  0x0D56} /* Cn */, {  0x0D58,  0x0D5F} /* Cn */,
-	{  0x0D62,  0x0D65} /* Cn */, {  0x0D70,  0x0D81} /* Cn */,
-	{  0x0D84,  0x0D84} /* Cn */, {  0x0D97,  0x0D99} /* Cn */,
-	{  0x0DB2,  0x0DB2} /* Cn */, {  0x0DBC,  0x0DBC} /* Cn */,
-	{  0x0DBE,  0x0DBF} /* Cn */, {  0x0DC7,  0x0DC9} /* Cn */,
-	{  0x0DCB,  0x0DCE} /* Cn */, {  0x0DD5,  0x0DD5} /* Cn */,
-	{  0x0DD7,  0x0DD7} /* Cn */, {  0x0DE0,  0x0DF1} /* Cn */,
-	{  0x0DF5,  0x0E00} /* Cn */, {  0x0E3B,  0x0E3E} /* Cn */,
-	{  0x0E5C,  0x0E80} /* Cn */, {  0x0E83,  0x0E83} /* Cn */,
-	{  0x0E85,  0x0E86} /* Cn */, {  0x0E89,  0x0E89} /* Cn */,
-	{  0x0E8B,  0x0E8C} /* Cn */, {  0x0E8E,  0x0E93} /* Cn */,
-	{  0x0E98,  0x0E98} /* Cn */, {  0x0EA0,  0x0EA0} /* Cn */,
-	{  0x0EA4,  0x0EA4} /* Cn */, {  0x0EA6,  0x0EA6} /* Cn */,
-	{  0x0EA8,  0x0EA9} /* Cn */, {  0x0EAC,  0x0EAC} /* Cn */,
-	{  0x0EBA,  0x0EBA} /* Cn */, {  0x0EBE,  0x0EBF} /* Cn */,
-	{  0x0EC5,  0x0EC5} /* Cn */, {  0x0EC7,  0x0EC7} /* Cn */,
-	{  0x0ECE,  0x0ECF} /* Cn */, {  0x0EDA,  0x0EDB} /* Cn */,
-	{  0x0EDE,  0x0EFF} /* Cn */, {  0x0F48,  0x0F48} /* Cn */,
-	{  0x0F6B,  0x0F70} /* Cn */, {  0x0F8C,  0x0F8F} /* Cn */,
-	{  0x0F98,  0x0F98} /* Cn */, {  0x0FBD,  0x0FBD} /* Cn */,
-	{  0x0FCD,  0x0FCE} /* Cn */, {  0x0FD2,  0x0FFF} /* Cn */,
-	{  0x1022,  0x1022} /* Cn */, {  0x1028,  0x1028} /* Cn */,
-	{  0x102B,  0x102B} /* Cn */, {  0x1033,  0x1035} /* Cn */,
-	{  0x103A,  0x103F} /* Cn */, {  0x105A,  0x109F} /* Cn */,
-	{  0x10C6,  0x10CF} /* Cn */, {  0x10FD,  0x10FF} /* Cn */,
-	{  0x115A,  0x115E} /* Cn */, {  0x11A3,  0x11A7} /* Cn */,
-	{  0x11FA,  0x11FF} /* Cn */, {  0x1249,  0x1249} /* Cn */,
-	{  0x124E,  0x124F} /* Cn */, {  0x1257,  0x1257} /* Cn */,
-	{  0x1259,  0x1259} /* Cn */, {  0x125E,  0x125F} /* Cn */,
-	{  0x1289,  0x1289} /* Cn */, {  0x128E,  0x128F} /* Cn */,
-	{  0x12B1,  0x12B1} /* Cn */, {  0x12B6,  0x12B7} /* Cn */,
-	{  0x12BF,  0x12BF} /* Cn */, {  0x12C1,  0x12C1} /* Cn */,
-	{  0x12C6,  0x12C7} /* Cn */, {  0x12D7,  0x12D7} /* Cn */,
-	{  0x1311,  0x1311} /* Cn */, {  0x1316,  0x1317} /* Cn */,
-	{  0x135B,  0x135E} /* Cn */, {  0x137D,  0x137F} /* Cn */,
-	{  0x139A,  0x139F} /* Cn */, {  0x13F5,  0x1400} /* Cn */,
-	{  0x1677,  0x167F} /* Cn */, {  0x169D,  0x169F} /* Cn */,
-	{  0x16F1,  0x16FF} /* Cn */, {  0x170D,  0x170D} /* Cn */,
-	{  0x1715,  0x171F} /* Cn */, {  0x1737,  0x173F} /* Cn */,
-	{  0x1754,  0x175F} /* Cn */, {  0x176D,  0x176D} /* Cn */,
-	{  0x1771,  0x1771} /* Cn */, {  0x1774,  0x177F} /* Cn */,
-#if 0
-	{  0x17B4,  0x17B5} /* Cf */,
-#endif
-	{  0x17DE,  0x17DF} /* Cn */, {  0x17EA,  0x17EF} /* Cn */,
-	{  0x17FA,  0x17FF} /* Cn */, {  0x180F,  0x180F} /* Cn */,
-	{  0x181A,  0x181F} /* Cn */, {  0x1878,  0x187F} /* Cn */,
-	{  0x18AA,  0x18FF} /* Cn */, {  0x191D,  0x191F} /* Cn */,
-	{  0x192C,  0x192F} /* Cn */, {  0x193C,  0x193F} /* Cn */,
-	{  0x1941,  0x1943} /* Cn */, {  0x196E,  0x196F} /* Cn */,
-	{  0x1975,  0x197F} /* Cn */, {  0x19AA,  0x19AF} /* Cn */,
-	{  0x19CA,  0x19CF} /* Cn */, {  0x19DA,  0x19DD} /* Cn */,
-	{  0x1A1C,  0x1A1D} /* Cn */, {  0x1A20,  0x1AFF} /* Cn */,
-	{  0x1B4C,  0x1B4F} /* Cn */, {  0x1B7D,  0x1CFF} /* Cn */,
-	{  0x1DCB,  0x1DFD} /* Cn */, {  0x1E9C,  0x1E9F} /* Cn */,
-	{  0x1EFA,  0x1EFF} /* Cn */, {  0x1F16,  0x1F17} /* Cn */,
-	{  0x1F1E,  0x1F1F} /* Cn */, {  0x1F46,  0x1F47} /* Cn */,
-	{  0x1F4E,  0x1F4F} /* Cn */, {  0x1F58,  0x1F58} /* Cn */,
-	{  0x1F5A,  0x1F5A} /* Cn */, {  0x1F5C,  0x1F5C} /* Cn */,
-	{  0x1F5E,  0x1F5E} /* Cn */, {  0x1F7E,  0x1F7F} /* Cn */,
-	{  0x1FB5,  0x1FB5} /* Cn */, {  0x1FC5,  0x1FC5} /* Cn */,
-	{  0x1FD4,  0x1FD5} /* Cn */, {  0x1FDC,  0x1FDC} /* Cn */,
-	{  0x1FF0,  0x1FF1} /* Cn */, {  0x1FF5,  0x1FF5} /* Cn */,
-	{  0x1FFF,  0x1FFF} /* Cn */,
-	{  0x200B,  0x200F} /* Cf */,
-	{  0x2028,  0x2028} /* Zl */,
-	{  0x2029,  0x2029} /* Zp */,
-	{  0x202A,  0x202E} /* Cf */,
-	{  0x2060,  0x2063} /* Cf */,
-	{  0x2064,  0x2069} /* Cn */,
-	{  0x206A,  0x206F} /* Cf */,
-	{  0x2072,  0x2073} /* Cn */, {  0x208F,  0x208F} /* Cn */,
-	{  0x2095,  0x209F} /* Cn */, {  0x20B6,  0x20CF} /* Cn */,
-	{  0x20F0,  0x20FF} /* Cn */, {  0x214F,  0x2152} /* Cn */,
-	{  0x2185,  0x218F} /* Cn */, {  0x23E8,  0x23FF} /* Cn */,
-	{  0x2427,  0x243F} /* Cn */, {  0x244B,  0x245F} /* Cn */,
-	{  0x269D,  0x269F} /* Cn */, {  0x26B3,  0x2700} /* Cn */,
-	{  0x2705,  0x2705} /* Cn */, {  0x270A,  0x270B} /* Cn */,
-	{  0x2728,  0x2728} /* Cn */, {  0x274C,  0x274C} /* Cn */,
-	{  0x274E,  0x274E} /* Cn */, {  0x2753,  0x2755} /* Cn */,
-	{  0x2757,  0x2757} /* Cn */, {  0x275F,  0x2760} /* Cn */,
-	{  0x2795,  0x2797} /* Cn */, {  0x27B0,  0x27B0} /* Cn */,
-	{  0x27BF,  0x27BF} /* Cn */, {  0x27CB,  0x27CF} /* Cn */,
-	{  0x27EC,  0x27EF} /* Cn */, {  0x2B1B,  0x2B1F} /* Cn */,
-	{  0x2B24,  0x2BFF} /* Cn */, {  0x2C2F,  0x2C2F} /* Cn */,
-	{  0x2C5F,  0x2C5F} /* Cn */, {  0x2C6D,  0x2C73} /* Cn */,
-	{  0x2C78,  0x2C7F} /* Cn */, {  0x2CEB,  0x2CF8} /* Cn */,
-	{  0x2D26,  0x2D2F} /* Cn */, {  0x2D66,  0x2D6E} /* Cn */,
-	{  0x2D70,  0x2D7F} /* Cn */, {  0x2D97,  0x2D9F} /* Cn */,
-	{  0x2DA7,  0x2DA7} /* Cn */, {  0x2DAF,  0x2DAF} /* Cn */,
-	{  0x2DB7,  0x2DB7} /* Cn */, {  0x2DBF,  0x2DBF} /* Cn */,
-	{  0x2DC7,  0x2DC7} /* Cn */, {  0x2DCF,  0x2DCF} /* Cn */,
-	{  0x2DD7,  0x2DD7} /* Cn */, {  0x2DDF,  0x2DFF} /* Cn */,
-	{  0x2E18,  0x2E1B} /* Cn */, {  0x2E1E,  0x2E7F} /* Cn */,
-	{  0x2E9A,  0x2E9A} /* Cn */, {  0x2EF4,  0x2EFF} /* Cn */,
-	{  0x2FD6,  0x2FEF} /* Cn */, {  0x2FFC,  0x2FFF} /* Cn */,
-	{  0x3040,  0x3040} /* Cn */, {  0x3097,  0x3098} /* Cn */,
-	{  0x3100,  0x3104} /* Cn */, {  0x312D,  0x3130} /* Cn */,
-	{  0x318F,  0x318F} /* Cn */, {  0x31B8,  0x31BF} /* Cn */,
-	{  0x31D0,  0x31EF} /* Cn */, {  0x321F,  0x321F} /* Cn */,
-	{  0x3244,  0x324F} /* Cn */, {  0x32FF,  0x32FF} /* Cn */,
-	{  0x4DB6,  0x4DBF} /* Cn */, {  0x9FBC,  0x9FFF} /* Cn */,
-	{  0xA48D,  0xA48F} /* Cn */, {  0xA4C7,  0xA6FF} /* Cn */,
-	{  0xA71B,  0xA71F} /* Cn */, {  0xA722,  0xA7FF} /* Cn */,
-	{  0xA82C,  0xA83F} /* Cn */, {  0xA878,  0xABFF} /* Cn */,
-	{  0xD7A4,  0xD7FF} /* Cn */,
-	{  0xD800,  0xDFFF} /* Cs */,
-	{  0xE000,  0xF8FF} /* Co */,
-	{  0xFA2E,  0xFA2F} /* Cn */, {  0xFA6B,  0xFA6F} /* Cn */,
-	{  0xFADA,  0xFAFF} /* Cn */, {  0xFB07,  0xFB12} /* Cn */,
-	{  0xFB18,  0xFB1C} /* Cn */, {  0xFB37,  0xFB37} /* Cn */,
-	{  0xFB3D,  0xFB3D} /* Cn */, {  0xFB3F,  0xFB3F} /* Cn */,
-	{  0xFB42,  0xFB42} /* Cn */, {  0xFB45,  0xFB45} /* Cn */,
-	{  0xFBB2,  0xFBD2} /* Cn */, {  0xFD40,  0xFD4F} /* Cn */,
-	{  0xFD90,  0xFD91} /* Cn */, {  0xFDC8,  0xFDEF} /* Cn */,
-	{  0xFDFE,  0xFDFF} /* Cn */, {  0xFE1A,  0xFE1F} /* Cn */,
-	{  0xFE24,  0xFE2F} /* Cn */, {  0xFE53,  0xFE53} /* Cn */,
-	{  0xFE67,  0xFE67} /* Cn */, {  0xFE6C,  0xFE6F} /* Cn */,
-	{  0xFE75,  0xFE75} /* Cn */, {  0xFEFD,  0xFEFE} /* Cn */,
-	{  0xFEFF,  0xFEFF} /* Cf */,
-	{  0xFF00,  0xFF00} /* Cn */, {  0xFFBF,  0xFFC1} /* Cn */,
-	{  0xFFC8,  0xFFC9} /* Cn */, {  0xFFD0,  0xFFD1} /* Cn */,
-	{  0xFFD8,  0xFFD9} /* Cn */, {  0xFFDD,  0xFFDF} /* Cn */,
-	{  0xFFE7,  0xFFE7} /* Cn */, {  0xFFEF,  0xFFF8} /* Cn */,
-	{  0xFFF9,  0xFFFB} /* Cf */,
-	{  0xFFFE,  0xFFFF} /* Cn */, { 0x1000C, 0x1000C} /* Cn */,
-	{ 0x10027, 0x10027} /* Cn */, { 0x1003B, 0x1003B} /* Cn */,
-	{ 0x1003E, 0x1003E} /* Cn */, { 0x1004E, 0x1004F} /* Cn */,
-	{ 0x1005E, 0x1007F} /* Cn */, { 0x100FB, 0x100FF} /* Cn */,
-	{ 0x10103, 0x10106} /* Cn */, { 0x10134, 0x10136} /* Cn */,
-	{ 0x1018B, 0x102FF} /* Cn */, { 0x1031F, 0x1031F} /* Cn */,
-	{ 0x10324, 0x1032F} /* Cn */, { 0x1034B, 0x1037F} /* Cn */,
-	{ 0x1039E, 0x1039E} /* Cn */, { 0x103C4, 0x103C7} /* Cn */,
-	{ 0x103D6, 0x103FF} /* Cn */,
-	{ 0x1049E, 0x1049F} /* Cn */, { 0x104AA, 0x107FF} /* Cn */,
-	{ 0x10806, 0x10807} /* Cn */, { 0x10809, 0x10809} /* Cn */,
-	{ 0x10836, 0x10836} /* Cn */, { 0x10839, 0x1083B} /* Cn */,
-	{ 0x1083D, 0x1083E} /* Cn */, { 0x10840, 0x108FF} /* Cn */,
-	{ 0x1091A, 0x1091E} /* Cn */, { 0x10920, 0x109FF} /* Cn */,
-	{ 0x10A04, 0x10A04} /* Cn */, { 0x10A07, 0x10A0B} /* Cn */,
-	{ 0x10A14, 0x10A14} /* Cn */, { 0x10A18, 0x10A18} /* Cn */,
-	{ 0x10A34, 0x10A37} /* Cn */, { 0x10A3B, 0x10A3E} /* Cn */,
-	{ 0x10A48, 0x10A4F} /* Cn */, { 0x10A59, 0x11FFF} /* Cn */,
-	{ 0x1236F, 0x123FF} /* Cn */, { 0x12463, 0x1246F} /* Cn */,
-	{ 0x12474, 0x1CFFF} /* Cn */, { 0x1D0F6, 0x1D0FF} /* Cn */,
-	{ 0x1D127, 0x1D129} /* Cn */,
-	{ 0x1D173, 0x1D17A} /* Cf */,
-	{ 0x1D1DE, 0x1D1FF} /* Cn */, { 0x1D246, 0x1D2FF} /* Cn */,
-	{ 0x1D357, 0x1D35F} /* Cn */, { 0x1D372, 0x1D3FF} /* Cn */,
-	{ 0x1D455, 0x1D455} /* Cn */, { 0x1D49D, 0x1D49D} /* Cn */,
-	{ 0x1D4A0, 0x1D4A1} /* Cn */, { 0x1D4A3, 0x1D4A4} /* Cn */,
-	{ 0x1D4A7, 0x1D4A8} /* Cn */, { 0x1D4AD, 0x1D4AD} /* Cn */,
-	{ 0x1D4BA, 0x1D4BA} /* Cn */, { 0x1D4BC, 0x1D4BC} /* Cn */,
-	{ 0x1D4C4, 0x1D4C4} /* Cn */, { 0x1D506, 0x1D506} /* Cn */,
-	{ 0x1D50B, 0x1D50C} /* Cn */, { 0x1D515, 0x1D515} /* Cn */,
-	{ 0x1D51D, 0x1D51D} /* Cn */, { 0x1D53A, 0x1D53A} /* Cn */,
-	{ 0x1D53F, 0x1D53F} /* Cn */, { 0x1D545, 0x1D545} /* Cn */,
-	{ 0x1D547, 0x1D549} /* Cn */, { 0x1D551, 0x1D551} /* Cn */,
-	{ 0x1D6A6, 0x1D6A7} /* Cn */, { 0x1D7CC, 0x1D7CD} /* Cn */,
-	{ 0x1D800, 0x1FFFF} /* Cn */, { 0x2A6D7, 0x2F7FF} /* Cn */,
-	{ 0x2FA1E, 0xE0000} /* Cn */,
-	{ 0xE0001, 0xE0001} /* Cf */,
-	{ 0xE0002, 0xE001F} /* Cn */,
-	{ 0xE0020, 0xE007F} /* Cf */,
-	{ 0xE0080, 0xE00FF} /* Cn */, { 0xE01F0, 0xEFFFF} /* Cn */,
-	{ 0xF0000, 0xFFFFD} /* Co */,
-	{ 0xFFFFE, 0xFFFFF} /* Cn */,
-	{0x100000,0x10FFFD} /* Co */,
-	{0x10FFFE,0x10FFFF} /* Cn */,
-	{0x110000,0x7FFFFFFF} /* ISO 10646?? */
-};
-
-/*
- * Double width characters
- *	W: East Asian Wide
- *	F: East Asian Full-width
- * Unassigned code points may be included when they allow ranges to be merged.
- * Last synched with
- *	<http://www.unicode.org/Public/5.0.0/ucd/EastAsianWidth-5.0.0d2.txt>
- *	dated 2005-11-08T01:32:56Z
- */
-static struct wchar_range wide_table[] = {
-	{  0x1100,  0x115F} /* W */, {  0x2329,  0x232A} /* W */,
-	{  0x2E80,  0x2FFB} /* W */,
-	{  0x3000,  0x3000} /* F */,
-	{  0x3001,  0x303E} /* W */, {  0x3041,  0x4DB5} /* W */,
-	{  0x4E00,  0x9FBB} /* W */, {  0xA000,  0xA4C6} /* W */,
-	{  0xAC00,  0xD7A3} /* W */, {  0xF900,  0xFAD9} /* W */,
-	{  0xFE10,  0xFE19} /* W */, {  0xFE30,  0xFE6B} /* W */,
-	{  0xFF01,  0xFF60} /* F */, {  0xFFE0,  0xFFE6} /* F */,
-	{ 0x20000, 0x2FFFD} /* W */, { 0x30000, 0x3FFFD} /* W */,
-};
 
 	static int
-is_in_table(ch, table, tsize)
+is_in_table(ch, table)
 	LWCHAR ch;
-	struct wchar_range table[];
-	int tsize;
+	struct wchar_range_table *table;
 {
 	int hi;
 	int lo;
 
 	/* Binary search in the table. */
-	if (ch < table[0].first)
+	if (ch < table->table[0].first)
 		return 0;
 	lo = 0;
-	hi = tsize - 1;
+	hi = table->count - 1;
 	while (lo <= hi)
 	{
 		int mid = (lo + hi) / 2;
-		if (ch > table[mid].last)
+		if (ch > table->table[mid].last)
 			lo = mid + 1;
-		else if (ch < table[mid].first)
+		else if (ch < table->table[mid].first)
 			hi = mid - 1;
 		else
 			return 1;
@@ -1126,7 +777,7 @@ is_in_table(ch, table, tsize)
 is_composing_char(ch)
 	LWCHAR ch;
 {
-	return is_in_table(ch, comp_table, (sizeof(comp_table) / sizeof(*comp_table)));
+	return is_in_table(ch, &compose_table);
 }
 
 /*
@@ -1136,7 +787,7 @@ is_composing_char(ch)
 is_ubin_char(ch)
 	LWCHAR ch;
 {
-	return is_in_table(ch, ubin_table, (sizeof(ubin_table) / sizeof(*ubin_table)));
+	return is_in_table(ch, &ubin_table);
 }
 
 /*
@@ -1146,7 +797,7 @@ is_ubin_char(ch)
 is_wide_char(ch)
 	LWCHAR ch;
 {
-	return is_in_table(ch, wide_table, (sizeof(wide_table) / sizeof(*wide_table)));
+	return is_in_table(ch, &wide_table);
 }
 
 /*

Modified: stable/10/contrib/less/charset.h
==============================================================================
--- stable/10/contrib/less/charset.h	Mon Jan 18 18:50:26 2016	(r294285)
+++ stable/10/contrib/less/charset.h	Mon Jan 18 19:13:54 2016	(r294286)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 1984-2012  Mark Nudelman
+ * Copyright (C) 1984-2015  Mark Nudelman
  *
  * You may distribute under the terms of either the GNU General Public
  * License or the Less License, as specified in the README file.

Modified: stable/10/contrib/less/cmd.h
==============================================================================
--- stable/10/contrib/less/cmd.h	Mon Jan 18 18:50:26 2016	(r294285)
+++ stable/10/contrib/less/cmd.h	Mon Jan 18 19:13:54 2016	(r294286)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 1984-2012  Mark Nudelman
+ * Copyright (C) 1984-2015  Mark Nudelman
  *
  * You may distribute under the terms of either the GNU General Public
  * License or the Less License, as specified in the README file.
@@ -66,6 +66,7 @@
 #define	A_PREV_TAG		54
 #define	A_FILTER		55
 #define	A_F_UNTIL_HILITE	56
+#define	A_GOEND_BUF		57
 
 #define	A_INVALID		100
 #define	A_NOACTION		101

Modified: stable/10/contrib/less/cmdbuf.c
==============================================================================
--- stable/10/contrib/less/cmdbuf.c	Mon Jan 18 18:50:26 2016	(r294285)
+++ stable/10/contrib/less/cmdbuf.c	Mon Jan 18 19:13:54 2016	(r294286)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 1984-2012  Mark Nudelman
+ * Copyright (C) 1984-2015  Mark Nudelman
  *
  * You may distribute under the terms of either the GNU General Public
  * License or the Less License, as specified in the README file.
@@ -203,7 +203,7 @@ cmd_step_common(p, ch, len, pwidth, bswi
 		pr = prchar((int) ch);
 		if (pwidth != NULL || bswidth != NULL)
 		{
-			int len = strlen(pr);
+			int len = (int) strlen(pr);
 			if (pwidth != NULL)
 				*pwidth = len;
 			if (bswidth != NULL)
@@ -222,7 +222,7 @@ cmd_step_common(p, ch, len, pwidth, bswi
 					*bswidth = 0;
 			} else if (is_ubin_char(ch))
 			{
-				int len = strlen(pr);
+				int len = (int) strlen(pr);
 				if (pwidth != NULL)
 					*pwidth = len;
 				if (bswidth != NULL)
@@ -375,7 +375,7 @@ cmd_lshift()
 		s = ns;
 	}
 
-	cmd_offset = s - cmdbuf;
+	cmd_offset = (int) (s - cmdbuf);
 	save_cp = cp;
 	cmd_home();
 	cmd_repaint(save_cp);
@@ -405,7 +405,7 @@ cmd_rshift()
 		cols += width;
 	}
 
-	cmd_offset = s - cmdbuf;
+	cmd_offset = (int) (s - cmdbuf);
 	save_cp = cp;
 	cmd_home();
 	cmd_repaint(save_cp);
@@ -535,7 +535,7 @@ cmd_erase()
 	 */
 	s = cp;
 	cmd_left();
-	clen = s - cp;
+	clen = (int) (s - cp);
 
 	/*
 	 * Remove the char from the buffer (shift the buffer left).
@@ -701,7 +701,7 @@ cmd_updown(action)
 
 	if (updown_match < 0)
 	{
-		updown_match = cp - cmdbuf;
+		updown_match = (int) (cp - cmdbuf);
 	}
 
 	/*
@@ -744,12 +744,13 @@ cmd_updown(action)
 #endif
 
 /*
- * Add a string to a history list.
+ * Add a string to an mlist.
  */
 	public void
-cmd_addhist(mlist, cmd)
+cmd_addhist(mlist, cmd, modified)
 	struct mlist *mlist;
 	char *cmd;
+	int modified;
 {
 #if CMD_HISTORY
 	struct mlist *ml;
@@ -773,6 +774,7 @@ cmd_addhist(mlist, cmd)
 		 */
 		ml = (struct mlist *) ecalloc(1, sizeof(struct mlist));
 		ml->string = save(cmd);
+		ml->modified = modified;
 		ml->next = mlist;
 		ml->prev = mlist->prev;
 		mlist->prev->next = ml;
@@ -799,7 +801,7 @@ cmd_accept()
 	 */
 	if (curr_mlist == NULL)
 		return;
-	cmd_addhist(curr_mlist, cmdbuf);
+	cmd_addhist(curr_mlist, cmdbuf, 1);
 	curr_mlist->modified = 1;
 #endif
 }
@@ -965,7 +967,7 @@ delimit_word()
 	int delim_quoted = 0;
 	int meta_quoted = 0;
 	char *esc = get_meta_escape();
-	int esclen = strlen(esc);
+	int esclen = (int) strlen(esc);
 #endif
 	
 	/*
@@ -1262,7 +1264,7 @@ cmd_char(c)
 			cmd_mbc_buf[cmd_mbc_buf_index++] = c;
 			if (cmd_mbc_buf_index < cmd_mbc_buf_len)
 				return (CC_OK);
-			if (!is_utf8_well_formed(cmd_mbc_buf))
+			if (!is_utf8_well_formed(cmd_mbc_buf, cmd_mbc_buf_index))
 			{
 				/* complete, but not well formed (non-shortest form), sequence */
 				cmd_mbc_buf_len = 0;
@@ -1359,6 +1361,18 @@ cmd_lastpattern()
 
 #if CMD_HISTORY
 /*
+ */
+	static int
+mlist_size(ml)
+	struct mlist *ml;
+{
+	int size = 0;
+	for (ml = ml->next;  ml->string != NULL;  ml = ml->next)
+		++size;
+	return size;
+}
+
+/*
  * Get the name of the history file.
  */
 	static char *
@@ -1378,6 +1392,10 @@ histfile_name()
 		return (save(name));
 	}
 
+	/* See if history file is disabled in the build. */
+	if (strcmp(LESSHISTFILE, "") == 0 || strcmp(LESSHISTFILE, "-") == 0)
+		return (NULL);
+
 	/* Otherwise, file is in $HOME. */
 	home = lgetenv("HOME");
 	if (home == NULL || *home == '\0')
@@ -1388,25 +1406,28 @@ histfile_name()
 #endif
 			return (NULL);
 	}
-	len = strlen(home) + strlen(LESSHISTFILE) + 2;
+	len = (int) (strlen(home) + strlen(LESSHISTFILE) + 2);
 	name = (char *) ecalloc(len, sizeof(char));
 	SNPRINTF2(name, len, "%s/%s", home, LESSHISTFILE);
 	return (name);
 }
-#endif /* CMD_HISTORY */
 
 /*
- * Initialize history from a .lesshist file.
+ * Read a .lesshst file and call a callback for each line in the file.
  */
-	public void
-init_cmdhist()
+	static void
+read_cmdhist2(action, uparam, skip_search, skip_shell)
+	void (*action)(void*,struct mlist*,char*);
+	void *uparam;
+	int skip_search;
+	int skip_shell;
 {
-#if CMD_HISTORY
 	struct mlist *ml = NULL;
 	char line[CMDBUF_SIZE];
 	char *filename;
 	FILE *f;
 	char *p;
+	int *skip = NULL;
 
 	filename = histfile_name();
 	if (filename == NULL)
@@ -1432,84 +1453,170 @@ init_cmdhist()
 			}
 		}
 		if (strcmp(line, HISTFILE_SEARCH_SECTION) == 0)
+		{
 			ml = &mlist_search;
-		else if (strcmp(line, HISTFILE_SHELL_SECTION) == 0)
+			skip = &skip_search;
+		} else if (strcmp(line, HISTFILE_SHELL_SECTION) == 0)
 		{
 #if SHELL_ESCAPE || PIPEC
 			ml = &mlist_shell;
+			skip = &skip_shell;
 #else
 			ml = NULL;
+			skip = NULL;
 #endif
 		} else if (*line == '"')
 		{
 			if (ml != NULL)
-				cmd_addhist(ml, line+1);
+			{
+				if (skip != NULL && *skip > 0)
+					--(*skip);
+				else
+					(*action)(uparam, ml, line+1);
+			}
 		}
 	}
 	fclose(f);
+}
+
+	static void
+read_cmdhist(action, uparam, skip_search, skip_shell)
+	void (*action)(void*,struct mlist*,char*);
+	void *uparam;
+	int skip_search;
+	int skip_shell;
+{
+	read_cmdhist2(action, uparam, skip_search, skip_shell);
+	(*action)(uparam, NULL, NULL); /* signal end of file */
+}
+
+	static void
+addhist_init(void *uparam, struct mlist *ml, char *string)
+{
+	if (ml == NULL || string == NULL)
+		return;
+	cmd_addhist(ml, string, 0);
+}
+#endif /* CMD_HISTORY */
+
+/*
+ * Initialize history from a .lesshist file.
+ */
+	public void
+init_cmdhist()

*** DIFF OUTPUT TRUNCATED AT 1000 LINES ***

From owner-svn-src-all@freebsd.org  Mon Jan 18 19:27:27 2016
Return-Path: <owner-svn-src-all@freebsd.org>
Delivered-To: svn-src-all@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id 19F4AA87334;
 Mon, 18 Jan 2016 19:27:27 +0000 (UTC)
 (envelope-from delphij@FreeBSD.org)
Received: from repo.freebsd.org (repo.freebsd.org
 [IPv6:2610:1c1:1:6068::e6a:0])
 (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
 (Client did not present a certificate)
 by mx1.freebsd.org (Postfix) with ESMTPS id A7F1013C1;
 Mon, 18 Jan 2016 19:27:26 +0000 (UTC)
 (envelope-from delphij@FreeBSD.org)
Received: from repo.freebsd.org ([127.0.1.37])
 by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u0IJRP9a074318;
 Mon, 18 Jan 2016 19:27:25 GMT (envelope-from delphij@FreeBSD.org)
Received: (from delphij@localhost)
 by repo.freebsd.org (8.15.2/8.15.2/Submit) id u0IJROfx074307;
 Mon, 18 Jan 2016 19:27:24 GMT (envelope-from delphij@FreeBSD.org)
Message-Id: <201601181927.u0IJROfx074307@repo.freebsd.org>
X-Authentication-Warning: repo.freebsd.org: delphij set sender to
 delphij@FreeBSD.org using -f
From: Xin LI <delphij@FreeBSD.org>
Date: Mon, 18 Jan 2016 19:27:24 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org
Subject: svn commit: r294287 - in stable/9: contrib/less usr.bin/less
X-SVN-Group: stable-9
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.20
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for &quot;
 user&quot; and &quot; projects&quot; \)" <svn-src-all.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-all/>
List-Post: <mailto:svn-src-all@freebsd.org>
List-Help: <mailto:svn-src-all-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Mon, 18 Jan 2016 19:27:27 -0000

Author: delphij
Date: Mon Jan 18 19:27:24 2016
New Revision: 294287
URL: https://svnweb.freebsd.org/changeset/base/294287

Log:
  MFC r293190: MFV r293125: less v481.
  
  Relnotes:	yes

Added:
  stable/9/contrib/less/compose.uni
     - copied unchanged from r293190, head/contrib/less/compose.uni
  stable/9/contrib/less/mkutable
     - copied unchanged from r293190, head/contrib/less/mkutable
  stable/9/contrib/less/ubin.uni
     - copied unchanged from r293190, head/contrib/less/ubin.uni
  stable/9/contrib/less/wide.uni
     - copied unchanged from r293190, head/contrib/less/wide.uni
Modified:
  stable/9/contrib/less/LICENSE
  stable/9/contrib/less/NEWS
  stable/9/contrib/less/README
  stable/9/contrib/less/brac.c
  stable/9/contrib/less/ch.c
  stable/9/contrib/less/charset.c
  stable/9/contrib/less/charset.h
  stable/9/contrib/less/cmd.h
  stable/9/contrib/less/cmdbuf.c
  stable/9/contrib/less/command.c
  stable/9/contrib/less/cvt.c
  stable/9/contrib/less/decode.c
  stable/9/contrib/less/edit.c
  stable/9/contrib/less/filename.c
  stable/9/contrib/less/forwback.c
  stable/9/contrib/less/funcs.h
  stable/9/contrib/less/help.c
  stable/9/contrib/less/ifile.c
  stable/9/contrib/less/input.c
  stable/9/contrib/less/jump.c
  stable/9/contrib/less/less.h
  stable/9/contrib/less/less.hlp
  stable/9/contrib/less/less.nro
  stable/9/contrib/less/lessecho.c
  stable/9/contrib/less/lessecho.nro
  stable/9/contrib/less/lesskey.c
  stable/9/contrib/less/lesskey.h
  stable/9/contrib/less/lesskey.nro
  stable/9/contrib/less/lglob.h
  stable/9/contrib/less/line.c
  stable/9/contrib/less/linenum.c
  stable/9/contrib/less/lsystem.c
  stable/9/contrib/less/main.c
  stable/9/contrib/less/mark.c
  stable/9/contrib/less/mkhelp.c
  stable/9/contrib/less/optfunc.c
  stable/9/contrib/less/option.c
  stable/9/contrib/less/option.h
  stable/9/contrib/less/opttbl.c
  stable/9/contrib/less/os.c
  stable/9/contrib/less/output.c
  stable/9/contrib/less/pattern.c
  stable/9/contrib/less/pattern.h
  stable/9/contrib/less/pckeys.h
  stable/9/contrib/less/position.c
  stable/9/contrib/less/position.h
  stable/9/contrib/less/prompt.c
  stable/9/contrib/less/regexp.c
  stable/9/contrib/less/screen.c
  stable/9/contrib/less/scrsize.c
  stable/9/contrib/less/search.c
  stable/9/contrib/less/signal.c
  stable/9/contrib/less/tags.c
  stable/9/contrib/less/ttyin.c
  stable/9/contrib/less/version.c
  stable/9/usr.bin/less/defines.h
Directory Properties:
  stable/9/contrib/less/   (props changed)
  stable/9/usr.bin/less/   (props changed)

Modified: stable/9/contrib/less/LICENSE
==============================================================================
--- stable/9/contrib/less/LICENSE	Mon Jan 18 19:13:54 2016	(r294286)
+++ stable/9/contrib/less/LICENSE	Mon Jan 18 19:27:24 2016	(r294287)
@@ -2,7 +2,7 @@
                           ------------
 
 Less
-Copyright (C) 1984-2012  Mark Nudelman
+Copyright (C) 1984-2015  Mark Nudelman
 
 Redistribution and use in source and binary forms, with or without
 modification, are permitted provided that the following conditions

Modified: stable/9/contrib/less/NEWS
==============================================================================
--- stable/9/contrib/less/NEWS	Mon Jan 18 19:13:54 2016	(r294286)
+++ stable/9/contrib/less/NEWS	Mon Jan 18 19:27:24 2016	(r294287)
@@ -7,7 +7,44 @@
       http://www.greenwoodsoftware.com/less
   You can also download the latest version of less from there.
 
-  To report bugs, suggestions or comments, send email to bug-less@gnu.org.
+  To report bugs, suggestions or comments, send email to bug-less@gnu.org
+
+======================================================================
+
+	Major changes between "less" versions 458 and 481
+
+* Don't overwrite history file; just append to it.
+
+* New command ESC-G goes to end of currently buffered data in a pipe.
+
+* Disable history feature when compiled with LESSHISTFILE set to "-".
+
+* In more-compatible mode, make the -p option apply to every file opened,
+  not just the first one.
+
+* In more-compatible mode, change the -e option to work like -E, not -EF.
+
+* Treat multiple CRs before LF are like one CR (all the CRs are hidden).
+
+* Allow "extra" string in lesskey file to append to a multi-char command
+  (like a search pattern), without executing the command.
+
+* Ignore -u/-U setting while viewing help file, so that 
+  underline and bold chars are displayed correctly.
+
+* Improve detection of "binary" files in UTF-8 mode.
+
+* Fix bug with ++ commands.
+
+* Fix bug where prompt was sometimes not displayed with +G.
+
+* Fix possible memory corruption 
+
+* Fix bugs and improve performance in ampersand filtering.
+
+* Automate construction of Unicode tables from Unicode database.
+
+* Allow %% escape sequence in LESSOPEN variable.
 
 ======================================================================
 

Modified: stable/9/contrib/less/README
==============================================================================
--- stable/9/contrib/less/README	Mon Jan 18 19:13:54 2016	(r294286)
+++ stable/9/contrib/less/README	Mon Jan 18 19:27:24 2016	(r294287)
@@ -7,9 +7,9 @@
 **************************************************************************
 **************************************************************************
 
-                            Less, version 458
+                            Less, version 481
 
-    This is the distribution of less, version 458, released 04 Apr 2013.
+    This is the distribution of less, version 481, released 31 Aug 2015.
     This program is part of the GNU project (http://www.gnu.org).
 
     This program is free software.  You may redistribute it and/or
@@ -53,8 +53,9 @@ INSTALLATION (Unix systems only):
      Specifies the regular expression library used by less for pattern
      matching.  The default is "auto", which means the configure program 
      finds a regular expression library automatically.  Other values are:
-        posix          Use the POSIX-compatible regcomp.
+        gnu            Use the GNU regex library.
         pcre           Use the PCRE library.
+        posix          Use the POSIX-compatible regcomp.
         regcmp         Use the regcmp library.
         re_comp        Use the re_comp library.
         regcomp        Use the V8-compatible regcomp.

Modified: stable/9/contrib/less/brac.c
==============================================================================
--- stable/9/contrib/less/brac.c	Mon Jan 18 19:13:54 2016	(r294286)
+++ stable/9/contrib/less/brac.c	Mon Jan 18 19:27:24 2016	(r294287)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 1984-2012  Mark Nudelman
+ * Copyright (C) 1984-2015  Mark Nudelman
  *
  * You may distribute under the terms of either the GNU General Public
  * License or the Less License, as specified in the README file.

Modified: stable/9/contrib/less/ch.c
==============================================================================
--- stable/9/contrib/less/ch.c	Mon Jan 18 19:13:54 2016	(r294286)
+++ stable/9/contrib/less/ch.c	Mon Jan 18 19:27:24 2016	(r294287)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 1984-2012  Mark Nudelman
+ * Copyright (C) 1984-2015  Mark Nudelman
  *
  * You may distribute under the terms of either the GNU General Public
  * License or the Less License, as specified in the README file.
@@ -54,7 +54,7 @@ struct buf {
  * The file state is maintained in a filestate structure.
  * A pointer to the filestate is kept in the ifile structure.
  */
-#define	BUFHASH_SIZE	64
+#define	BUFHASH_SIZE	1024
 struct filestate {
 	struct bufnode buflist;
 	struct bufnode hashtbl[BUFHASH_SIZE];
@@ -323,13 +323,16 @@ ch_get()
 #if HAVE_STAT_INO
 			if (follow_mode == FOLLOW_NAME)
 			{
-				/* See whether the file's i-number has changed.
+				/* See whether the file's i-number has changed,
+				 * or the file has shrunk.
 				 * If so, force the file to be closed and
 				 * reopened. */
 				struct stat st;
+				POSITION curr_pos = ch_tell();
 				int r = stat(get_filename(curr_ifile), &st);
 				if (r == 0 && (st.st_ino != curr_ino ||
-					st.st_dev != curr_dev))
+					st.st_dev != curr_dev ||
+					(curr_pos != NULL_POSITION && st.st_size < curr_pos)))
 				{
 					/* screen_trashed=2 causes
 					 * make_display to reopen the file. */
@@ -536,6 +539,32 @@ ch_end_seek()
 }
 
 /*
+ * Seek to the last position in the file that is currently buffered.
+ */
+	public int
+ch_end_buffer_seek()
+{
+	register struct buf *bp;
+	register struct bufnode *bn;
+	POSITION buf_pos;
+	POSITION end_pos;
+
+	if (thisfile == NULL || (ch_flags & CH_CANSEEK))
+		return (ch_end_seek());
+
+	end_pos = 0;
+	FOR_BUFS(bn)
+	{
+		bp = bufnode_buf(bn);
+		buf_pos = (bp->block * LBUFSIZE) + bp->datasize;
+		if (buf_pos > end_pos)
+			end_pos = buf_pos;
+	}
+
+	return (ch_seek(end_pos));
+}
+
+/*
  * Seek to the beginning of the file, or as close to it as we can get.
  * We may not be able to seek there if input is a pipe and the
  * beginning of the pipe is no longer buffered.

Modified: stable/9/contrib/less/charset.c
==============================================================================
--- stable/9/contrib/less/charset.c	Mon Jan 18 19:13:54 2016	(r294286)
+++ stable/9/contrib/less/charset.c	Mon Jan 18 19:27:24 2016	(r294287)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 1984-2012  Mark Nudelman
+ * Copyright (C) 1984-2015  Mark Nudelman
  *
  * You may distribute under the terms of either the GNU General Public
  * License or the Less License, as specified in the README file.
@@ -466,36 +466,15 @@ prutfchar(ch)
 		else
 			SNPRINTF1(buf, sizeof(buf), binfmt, (char) ch);
 	} else if (is_ubin_char(ch))
+	{
 		SNPRINTF1(buf, sizeof(buf), utfbinfmt, ch);
-	else
+	} else
 	{
-		int len;
+		char *p = buf;
 		if (ch >= 0x80000000)
-		{
-			len = 3;
-			ch = 0xFFFD;
-		} else
-		{
-			len =   (ch < 0x80) ? 1
-			      : (ch < 0x800) ? 2
-			      : (ch < 0x10000) ? 3
-			      : (ch < 0x200000) ? 4
-			      : (ch < 0x4000000) ? 5
-			      : 6;
-		}
-		buf[len] = '\0';
-		if (len == 1)
-			*buf = (char) ch;
-		else
-		{
-			*buf = ((1 << len) - 1) << (8 - len);
-			while (--len > 0)
-			{
-				buf[len] = (char) (0x80 | (ch & 0x3F));
-				ch >>= 6;
-			}
-			*buf |= ch;
-		}
+			ch = 0xFFFD; /* REPLACEMENT CHARACTER */
+		put_wchar(&p, ch);
+		*p = '\0';
 	}
 	return (buf);
 }
@@ -524,11 +503,12 @@ utf_len(ch)
 }
 
 /*
- * Is a UTF-8 character well-formed?
+ * Does the parameter point to the lead byte of a well-formed UTF-8 character?
  */
 	public int
-is_utf8_well_formed(s)
+is_utf8_well_formed(s, slen)
 	unsigned char *s;
+	int slen;
 {
 	int i;
 	int len;
@@ -537,6 +517,8 @@ is_utf8_well_formed(s)
 		return (0);
 
 	len = utf_len((char) s[0]);
+	if (len > slen)
+		return (0);
 	if (len == 1)
 		return (1);
 	if (len == 2)
@@ -558,6 +540,35 @@ is_utf8_well_formed(s)
 }
 
 /*
+ * Return number of invalid UTF-8 sequences found in a buffer.
+ */
+	public int
+utf_bin_count(data, len)
+	unsigned char *data;
+	int len;
+{
+	int bin_count = 0;
+	while (len > 0)
+	{
+		if (is_utf8_well_formed(data, len))
+		{
+			int clen = utf_len(*data);
+			data += clen;
+			len -= clen;
+		} else
+		{
+			/* Skip to next lead byte. */
+			bin_count++;
+			do {
+				++data;
+				--len;
+			} while (len > 0 && !IS_UTF8_LEAD(*data));
+		}
+	}
+	return (bin_count);
+}
+
+/*
  * Get the value of a UTF-8 character.
  */
 	public LWCHAR
@@ -706,411 +717,51 @@ step_char(pp, dir, limit)
 
 /*
  * Unicode characters data
+ * Actual data is in the generated *.uni files.
  */
-struct wchar_range { LWCHAR first, last; };
 
-/*
- * Characters with general category values
- *	Mn: Mark, Nonspacing
- *	Me: Mark, Enclosing
- * Last synched with
- *	<http://www.unicode.org/Public/5.0.0/ucd/UnicodeData-5.0.0d7.txt>
- *	dated 2005-11-30T00:58:48Z
- */
-static struct wchar_range comp_table[] = {
-	{  0x0300,  0x036F} /* Mn */, {  0x0483,  0x0486} /* Mn */,
-	{  0x0488,  0x0489} /* Me */,
-	{  0x0591,  0x05BD} /* Mn */, {  0x05BF,  0x05BF} /* Mn */,
-	{  0x05C1,  0x05C2} /* Mn */, {  0x05C4,  0x05C5} /* Mn */,
-	{  0x05C7,  0x05C7} /* Mn */, {  0x0610,  0x0615} /* Mn */,
-	{  0x064B,  0x065E} /* Mn */, {  0x0670,  0x0670} /* Mn */,
-	{  0x06D6,  0x06DC} /* Mn */,
-	{  0x06DE,  0x06DE} /* Me */,
-	{  0x06DF,  0x06E4} /* Mn */, {  0x06E7,  0x06E8} /* Mn */,
-	{  0x06EA,  0x06ED} /* Mn */, {  0x0711,  0x0711} /* Mn */,
-	{  0x0730,  0x074A} /* Mn */, {  0x07A6,  0x07B0} /* Mn */,
-	{  0x07EB,  0x07F3} /* Mn */, {  0x0901,  0x0902} /* Mn */,
-	{  0x093C,  0x093C} /* Mn */, {  0x0941,  0x0948} /* Mn */,
-	{  0x094D,  0x094D} /* Mn */, {  0x0951,  0x0954} /* Mn */,
-	{  0x0962,  0x0963} /* Mn */, {  0x0981,  0x0981} /* Mn */,
-	{  0x09BC,  0x09BC} /* Mn */, {  0x09C1,  0x09C4} /* Mn */,
-	{  0x09CD,  0x09CD} /* Mn */, {  0x09E2,  0x09E3} /* Mn */,
-	{  0x0A01,  0x0A02} /* Mn */, {  0x0A3C,  0x0A3C} /* Mn */,
-	{  0x0A41,  0x0A42} /* Mn */, {  0x0A47,  0x0A48} /* Mn */,
-	{  0x0A4B,  0x0A4D} /* Mn */, {  0x0A70,  0x0A71} /* Mn */,
-	{  0x0A81,  0x0A82} /* Mn */, {  0x0ABC,  0x0ABC} /* Mn */,
-	{  0x0AC1,  0x0AC5} /* Mn */, {  0x0AC7,  0x0AC8} /* Mn */,
-	{  0x0ACD,  0x0ACD} /* Mn */, {  0x0AE2,  0x0AE3} /* Mn */,
-	{  0x0B01,  0x0B01} /* Mn */, {  0x0B3C,  0x0B3C} /* Mn */,
-	{  0x0B3F,  0x0B3F} /* Mn */, {  0x0B41,  0x0B43} /* Mn */,
-	{  0x0B4D,  0x0B4D} /* Mn */, {  0x0B56,  0x0B56} /* Mn */,
-	{  0x0B82,  0x0B82} /* Mn */, {  0x0BC0,  0x0BC0} /* Mn */,
-	{  0x0BCD,  0x0BCD} /* Mn */, {  0x0C3E,  0x0C40} /* Mn */,
-	{  0x0C46,  0x0C48} /* Mn */, {  0x0C4A,  0x0C4D} /* Mn */,
-	{  0x0C55,  0x0C56} /* Mn */, {  0x0CBC,  0x0CBC} /* Mn */,
-	{  0x0CBF,  0x0CBF} /* Mn */, {  0x0CC6,  0x0CC6} /* Mn */,
-	{  0x0CCC,  0x0CCD} /* Mn */, {  0x0CE2,  0x0CE3} /* Mn */,
-	{  0x0D41,  0x0D43} /* Mn */, {  0x0D4D,  0x0D4D} /* Mn */,
-	{  0x0DCA,  0x0DCA} /* Mn */, {  0x0DD2,  0x0DD4} /* Mn */,
-	{  0x0DD6,  0x0DD6} /* Mn */, {  0x0E31,  0x0E31} /* Mn */,
-	{  0x0E34,  0x0E3A} /* Mn */, {  0x0E47,  0x0E4E} /* Mn */,
-	{  0x0EB1,  0x0EB1} /* Mn */, {  0x0EB4,  0x0EB9} /* Mn */,
-	{  0x0EBB,  0x0EBC} /* Mn */, {  0x0EC8,  0x0ECD} /* Mn */,
-	{  0x0F18,  0x0F19} /* Mn */, {  0x0F35,  0x0F35} /* Mn */,
-	{  0x0F37,  0x0F37} /* Mn */, {  0x0F39,  0x0F39} /* Mn */,
-	{  0x0F71,  0x0F7E} /* Mn */, {  0x0F80,  0x0F84} /* Mn */,
-	{  0x0F86,  0x0F87} /* Mn */, {  0x0F90,  0x0F97} /* Mn */,
-	{  0x0F99,  0x0FBC} /* Mn */, {  0x0FC6,  0x0FC6} /* Mn */,
-	{  0x102D,  0x1030} /* Mn */, {  0x1032,  0x1032} /* Mn */,
-	{  0x1036,  0x1037} /* Mn */, {  0x1039,  0x1039} /* Mn */,
-	{  0x1058,  0x1059} /* Mn */, {  0x135F,  0x135F} /* Mn */,
-	{  0x1712,  0x1714} /* Mn */, {  0x1732,  0x1734} /* Mn */,
-	{  0x1752,  0x1753} /* Mn */, {  0x1772,  0x1773} /* Mn */,
-	{  0x17B7,  0x17BD} /* Mn */, {  0x17C6,  0x17C6} /* Mn */,
-	{  0x17C9,  0x17D3} /* Mn */, {  0x17DD,  0x17DD} /* Mn */,
-	{  0x180B,  0x180D} /* Mn */, {  0x18A9,  0x18A9} /* Mn */,
-	{  0x1920,  0x1922} /* Mn */, {  0x1927,  0x1928} /* Mn */,
-	{  0x1932,  0x1932} /* Mn */, {  0x1939,  0x193B} /* Mn */,
-	{  0x1A17,  0x1A18} /* Mn */, {  0x1B00,  0x1B03} /* Mn */,
-	{  0x1B34,  0x1B34} /* Mn */, {  0x1B36,  0x1B3A} /* Mn */,
-	{  0x1B3C,  0x1B3C} /* Mn */, {  0x1B42,  0x1B42} /* Mn */,
-	{  0x1B6B,  0x1B73} /* Mn */, {  0x1DC0,  0x1DCA} /* Mn */,
-	{  0x1DFE,  0x1DFF} /* Mn */, {  0x20D0,  0x20DC} /* Mn */,
-	{  0x20DD,  0x20E0} /* Me */,
-	{  0x20E1,  0x20E1} /* Mn */,
-	{  0x20E2,  0x20E4} /* Me */,
-	{  0x20E5,  0x20EF} /* Mn */, {  0x302A,  0x302F} /* Mn */,
-	{  0x3099,  0x309A} /* Mn */, {  0xA806,  0xA806} /* Mn */,
-	{  0xA80B,  0xA80B} /* Mn */, {  0xA825,  0xA826} /* Mn */,
-	{  0xFB1E,  0xFB1E} /* Mn */, {  0xFE00,  0xFE0F} /* Mn */,
-	{  0xFE20,  0xFE23} /* Mn */, { 0x10A01, 0x10A03} /* Mn */,
-	{ 0x10A05, 0x10A06} /* Mn */, { 0x10A0C, 0x10A0F} /* Mn */,
-	{ 0x10A38, 0x10A3A} /* Mn */, { 0x10A3F, 0x10A3F} /* Mn */,
-	{ 0x1D167, 0x1D169} /* Mn */, { 0x1D17B, 0x1D182} /* Mn */,
-	{ 0x1D185, 0x1D18B} /* Mn */, { 0x1D1AA, 0x1D1AD} /* Mn */,
-	{ 0x1D242, 0x1D244} /* Mn */, { 0xE0100, 0xE01EF} /* Mn */,
-};
+#define DECLARE_RANGE_TABLE_START(name) \
+    static struct wchar_range name##_array[] = {
+#define DECLARE_RANGE_TABLE_END(name) \
+    }; struct wchar_range_table name##_table = { name##_array, sizeof(name##_array)/sizeof(*name##_array) };
 
-/*
- * Special pairs, not ranges.
- */
+DECLARE_RANGE_TABLE_START(compose)
+#include "compose.uni"
+DECLARE_RANGE_TABLE_END(compose)
+
+DECLARE_RANGE_TABLE_START(ubin)
+#include "ubin.uni"
+DECLARE_RANGE_TABLE_END(ubin)
+
+DECLARE_RANGE_TABLE_START(wide)
+#include "wide.uni"
+DECLARE_RANGE_TABLE_END(wide)
+
+/* comb_table is special pairs, not ranges. */
 static struct wchar_range comb_table[] = {
 	{0x0644,0x0622}, {0x0644,0x0623}, {0x0644,0x0625}, {0x0644,0x0627},
 };
 
-/*
- * Characters with general category values
- *	Cc: Other, Control
- *	Cf: Other, Format
- *	Cs: Other, Surrogate
- *	Co: Other, Private Use
- *	Cn: Other, Not Assigned
- *	Zl: Separator, Line
- *	Zp: Separator, Paragraph
- * Last synched with
- *	<http://www.unicode.org/Public/5.0.0/ucd/UnicodeData-5.0.0d7.txt>
- *	dated 2005-11-30T00:58:48Z
- */
-static struct wchar_range ubin_table[] = {
-	{  0x0000,  0x0007} /* Cc */, 
-	{  0x000B,  0x000C} /* Cc */, 
-	{  0x000E,  0x001A} /* Cc */, 
-	{  0x001C,  0x001F} /* Cc */, 
-	{  0x007F,  0x009F} /* Cc */,
-#if 0
-	{  0x00AD,  0x00AD} /* Cf */,
-#endif
-	{  0x0370,  0x0373} /* Cn */, {  0x0376,  0x0379} /* Cn */,
-	{  0x037F,  0x0383} /* Cn */, {  0x038B,  0x038B} /* Cn */,
-	{  0x038D,  0x038D} /* Cn */, {  0x03A2,  0x03A2} /* Cn */,
-	{  0x03CF,  0x03CF} /* Cn */, {  0x0487,  0x0487} /* Cn */,
-	{  0x0514,  0x0530} /* Cn */, {  0x0557,  0x0558} /* Cn */,
-	{  0x0560,  0x0560} /* Cn */, {  0x0588,  0x0588} /* Cn */,
-	{  0x058B,  0x0590} /* Cn */, {  0x05C8,  0x05CF} /* Cn */,
-	{  0x05EB,  0x05EF} /* Cn */, {  0x05F5,  0x05FF} /* Cn */,
-#if 0
-	{  0x0600,  0x0603} /* Cf */,
-#endif
-	{  0x0604,  0x060A} /* Cn */, {  0x0616,  0x061A} /* Cn */,
-	{  0x061C,  0x061D} /* Cn */, {  0x0620,  0x0620} /* Cn */,
-	{  0x063B,  0x063F} /* Cn */, {  0x065F,  0x065F} /* Cn */,
-#if 0
-	{  0x06DD,  0x06DD} /* Cf */,
-#endif
-	{  0x070E,  0x070E} /* Cn */,
-#if 0
-	{  0x070F,  0x070F} /* Cf */,
-#endif
-	{  0x074B,  0x074C} /* Cn */, {  0x076E,  0x077F} /* Cn */,
-	{  0x07B2,  0x07BF} /* Cn */, {  0x07FB,  0x0900} /* Cn */,
-	{  0x093A,  0x093B} /* Cn */, {  0x094E,  0x094F} /* Cn */,
-	{  0x0955,  0x0957} /* Cn */, {  0x0971,  0x097A} /* Cn */,
-	{  0x0980,  0x0980} /* Cn */, {  0x0984,  0x0984} /* Cn */,
-	{  0x098D,  0x098E} /* Cn */, {  0x0991,  0x0992} /* Cn */,
-	{  0x09A9,  0x09A9} /* Cn */, {  0x09B1,  0x09B1} /* Cn */,
-	{  0x09B3,  0x09B5} /* Cn */, {  0x09BA,  0x09BB} /* Cn */,
-	{  0x09C5,  0x09C6} /* Cn */, {  0x09C9,  0x09CA} /* Cn */,
-	{  0x09CF,  0x09D6} /* Cn */, {  0x09D8,  0x09DB} /* Cn */,
-	{  0x09DE,  0x09DE} /* Cn */, {  0x09E4,  0x09E5} /* Cn */,
-	{  0x09FB,  0x0A00} /* Cn */, {  0x0A04,  0x0A04} /* Cn */,
-	{  0x0A0B,  0x0A0E} /* Cn */, {  0x0A11,  0x0A12} /* Cn */,
-	{  0x0A29,  0x0A29} /* Cn */, {  0x0A31,  0x0A31} /* Cn */,
-	{  0x0A34,  0x0A34} /* Cn */, {  0x0A37,  0x0A37} /* Cn */,
-	{  0x0A3A,  0x0A3B} /* Cn */, {  0x0A3D,  0x0A3D} /* Cn */,
-	{  0x0A43,  0x0A46} /* Cn */, {  0x0A49,  0x0A4A} /* Cn */,
-	{  0x0A4E,  0x0A58} /* Cn */, {  0x0A5D,  0x0A5D} /* Cn */,
-	{  0x0A5F,  0x0A65} /* Cn */, {  0x0A75,  0x0A80} /* Cn */,
-	{  0x0A84,  0x0A84} /* Cn */, {  0x0A8E,  0x0A8E} /* Cn */,
-	{  0x0A92,  0x0A92} /* Cn */, {  0x0AA9,  0x0AA9} /* Cn */,
-	{  0x0AB1,  0x0AB1} /* Cn */, {  0x0AB4,  0x0AB4} /* Cn */,
-	{  0x0ABA,  0x0ABB} /* Cn */, {  0x0AC6,  0x0AC6} /* Cn */,
-	{  0x0ACA,  0x0ACA} /* Cn */, {  0x0ACE,  0x0ACF} /* Cn */,
-	{  0x0AD1,  0x0ADF} /* Cn */, {  0x0AE4,  0x0AE5} /* Cn */,
-	{  0x0AF0,  0x0AF0} /* Cn */, {  0x0AF2,  0x0B00} /* Cn */,
-	{  0x0B04,  0x0B04} /* Cn */, {  0x0B0D,  0x0B0E} /* Cn */,
-	{  0x0B11,  0x0B12} /* Cn */, {  0x0B29,  0x0B29} /* Cn */,
-	{  0x0B31,  0x0B31} /* Cn */, {  0x0B34,  0x0B34} /* Cn */,
-	{  0x0B3A,  0x0B3B} /* Cn */, {  0x0B44,  0x0B46} /* Cn */,
-	{  0x0B49,  0x0B4A} /* Cn */, {  0x0B4E,  0x0B55} /* Cn */,
-	{  0x0B58,  0x0B5B} /* Cn */, {  0x0B5E,  0x0B5E} /* Cn */,
-	{  0x0B62,  0x0B65} /* Cn */, {  0x0B72,  0x0B81} /* Cn */,
-	{  0x0B84,  0x0B84} /* Cn */, {  0x0B8B,  0x0B8D} /* Cn */,
-	{  0x0B91,  0x0B91} /* Cn */, {  0x0B96,  0x0B98} /* Cn */,
-	{  0x0B9B,  0x0B9B} /* Cn */, {  0x0B9D,  0x0B9D} /* Cn */,
-	{  0x0BA0,  0x0BA2} /* Cn */, {  0x0BA5,  0x0BA7} /* Cn */,
-	{  0x0BAB,  0x0BAD} /* Cn */, {  0x0BBA,  0x0BBD} /* Cn */,
-	{  0x0BC3,  0x0BC5} /* Cn */, {  0x0BC9,  0x0BC9} /* Cn */,
-	{  0x0BCE,  0x0BD6} /* Cn */, {  0x0BD8,  0x0BE5} /* Cn */,
-	{  0x0BFB,  0x0C00} /* Cn */, {  0x0C04,  0x0C04} /* Cn */,
-	{  0x0C0D,  0x0C0D} /* Cn */, {  0x0C11,  0x0C11} /* Cn */,
-	{  0x0C29,  0x0C29} /* Cn */, {  0x0C34,  0x0C34} /* Cn */,
-	{  0x0C3A,  0x0C3D} /* Cn */, {  0x0C45,  0x0C45} /* Cn */,
-	{  0x0C49,  0x0C49} /* Cn */, {  0x0C4E,  0x0C54} /* Cn */,
-	{  0x0C57,  0x0C5F} /* Cn */, {  0x0C62,  0x0C65} /* Cn */,
-	{  0x0C70,  0x0C81} /* Cn */, {  0x0C84,  0x0C84} /* Cn */,
-	{  0x0C8D,  0x0C8D} /* Cn */, {  0x0C91,  0x0C91} /* Cn */,
-	{  0x0CA9,  0x0CA9} /* Cn */, {  0x0CB4,  0x0CB4} /* Cn */,
-	{  0x0CBA,  0x0CBB} /* Cn */, {  0x0CC5,  0x0CC5} /* Cn */,
-	{  0x0CC9,  0x0CC9} /* Cn */, {  0x0CCE,  0x0CD4} /* Cn */,
-	{  0x0CD7,  0x0CDD} /* Cn */, {  0x0CDF,  0x0CDF} /* Cn */,
-	{  0x0CE4,  0x0CE5} /* Cn */, {  0x0CF0,  0x0CF0} /* Cn */,
-	{  0x0CF3,  0x0D01} /* Cn */, {  0x0D04,  0x0D04} /* Cn */,
-	{  0x0D0D,  0x0D0D} /* Cn */, {  0x0D11,  0x0D11} /* Cn */,
-	{  0x0D29,  0x0D29} /* Cn */, {  0x0D3A,  0x0D3D} /* Cn */,
-	{  0x0D44,  0x0D45} /* Cn */, {  0x0D49,  0x0D49} /* Cn */,
-	{  0x0D4E,  0x0D56} /* Cn */, {  0x0D58,  0x0D5F} /* Cn */,
-	{  0x0D62,  0x0D65} /* Cn */, {  0x0D70,  0x0D81} /* Cn */,
-	{  0x0D84,  0x0D84} /* Cn */, {  0x0D97,  0x0D99} /* Cn */,
-	{  0x0DB2,  0x0DB2} /* Cn */, {  0x0DBC,  0x0DBC} /* Cn */,
-	{  0x0DBE,  0x0DBF} /* Cn */, {  0x0DC7,  0x0DC9} /* Cn */,
-	{  0x0DCB,  0x0DCE} /* Cn */, {  0x0DD5,  0x0DD5} /* Cn */,
-	{  0x0DD7,  0x0DD7} /* Cn */, {  0x0DE0,  0x0DF1} /* Cn */,
-	{  0x0DF5,  0x0E00} /* Cn */, {  0x0E3B,  0x0E3E} /* Cn */,
-	{  0x0E5C,  0x0E80} /* Cn */, {  0x0E83,  0x0E83} /* Cn */,
-	{  0x0E85,  0x0E86} /* Cn */, {  0x0E89,  0x0E89} /* Cn */,
-	{  0x0E8B,  0x0E8C} /* Cn */, {  0x0E8E,  0x0E93} /* Cn */,
-	{  0x0E98,  0x0E98} /* Cn */, {  0x0EA0,  0x0EA0} /* Cn */,
-	{  0x0EA4,  0x0EA4} /* Cn */, {  0x0EA6,  0x0EA6} /* Cn */,
-	{  0x0EA8,  0x0EA9} /* Cn */, {  0x0EAC,  0x0EAC} /* Cn */,
-	{  0x0EBA,  0x0EBA} /* Cn */, {  0x0EBE,  0x0EBF} /* Cn */,
-	{  0x0EC5,  0x0EC5} /* Cn */, {  0x0EC7,  0x0EC7} /* Cn */,
-	{  0x0ECE,  0x0ECF} /* Cn */, {  0x0EDA,  0x0EDB} /* Cn */,
-	{  0x0EDE,  0x0EFF} /* Cn */, {  0x0F48,  0x0F48} /* Cn */,
-	{  0x0F6B,  0x0F70} /* Cn */, {  0x0F8C,  0x0F8F} /* Cn */,
-	{  0x0F98,  0x0F98} /* Cn */, {  0x0FBD,  0x0FBD} /* Cn */,
-	{  0x0FCD,  0x0FCE} /* Cn */, {  0x0FD2,  0x0FFF} /* Cn */,
-	{  0x1022,  0x1022} /* Cn */, {  0x1028,  0x1028} /* Cn */,
-	{  0x102B,  0x102B} /* Cn */, {  0x1033,  0x1035} /* Cn */,
-	{  0x103A,  0x103F} /* Cn */, {  0x105A,  0x109F} /* Cn */,
-	{  0x10C6,  0x10CF} /* Cn */, {  0x10FD,  0x10FF} /* Cn */,
-	{  0x115A,  0x115E} /* Cn */, {  0x11A3,  0x11A7} /* Cn */,
-	{  0x11FA,  0x11FF} /* Cn */, {  0x1249,  0x1249} /* Cn */,
-	{  0x124E,  0x124F} /* Cn */, {  0x1257,  0x1257} /* Cn */,
-	{  0x1259,  0x1259} /* Cn */, {  0x125E,  0x125F} /* Cn */,
-	{  0x1289,  0x1289} /* Cn */, {  0x128E,  0x128F} /* Cn */,
-	{  0x12B1,  0x12B1} /* Cn */, {  0x12B6,  0x12B7} /* Cn */,
-	{  0x12BF,  0x12BF} /* Cn */, {  0x12C1,  0x12C1} /* Cn */,
-	{  0x12C6,  0x12C7} /* Cn */, {  0x12D7,  0x12D7} /* Cn */,
-	{  0x1311,  0x1311} /* Cn */, {  0x1316,  0x1317} /* Cn */,
-	{  0x135B,  0x135E} /* Cn */, {  0x137D,  0x137F} /* Cn */,
-	{  0x139A,  0x139F} /* Cn */, {  0x13F5,  0x1400} /* Cn */,
-	{  0x1677,  0x167F} /* Cn */, {  0x169D,  0x169F} /* Cn */,
-	{  0x16F1,  0x16FF} /* Cn */, {  0x170D,  0x170D} /* Cn */,
-	{  0x1715,  0x171F} /* Cn */, {  0x1737,  0x173F} /* Cn */,
-	{  0x1754,  0x175F} /* Cn */, {  0x176D,  0x176D} /* Cn */,
-	{  0x1771,  0x1771} /* Cn */, {  0x1774,  0x177F} /* Cn */,
-#if 0
-	{  0x17B4,  0x17B5} /* Cf */,
-#endif
-	{  0x17DE,  0x17DF} /* Cn */, {  0x17EA,  0x17EF} /* Cn */,
-	{  0x17FA,  0x17FF} /* Cn */, {  0x180F,  0x180F} /* Cn */,
-	{  0x181A,  0x181F} /* Cn */, {  0x1878,  0x187F} /* Cn */,
-	{  0x18AA,  0x18FF} /* Cn */, {  0x191D,  0x191F} /* Cn */,
-	{  0x192C,  0x192F} /* Cn */, {  0x193C,  0x193F} /* Cn */,
-	{  0x1941,  0x1943} /* Cn */, {  0x196E,  0x196F} /* Cn */,
-	{  0x1975,  0x197F} /* Cn */, {  0x19AA,  0x19AF} /* Cn */,
-	{  0x19CA,  0x19CF} /* Cn */, {  0x19DA,  0x19DD} /* Cn */,
-	{  0x1A1C,  0x1A1D} /* Cn */, {  0x1A20,  0x1AFF} /* Cn */,
-	{  0x1B4C,  0x1B4F} /* Cn */, {  0x1B7D,  0x1CFF} /* Cn */,
-	{  0x1DCB,  0x1DFD} /* Cn */, {  0x1E9C,  0x1E9F} /* Cn */,
-	{  0x1EFA,  0x1EFF} /* Cn */, {  0x1F16,  0x1F17} /* Cn */,
-	{  0x1F1E,  0x1F1F} /* Cn */, {  0x1F46,  0x1F47} /* Cn */,
-	{  0x1F4E,  0x1F4F} /* Cn */, {  0x1F58,  0x1F58} /* Cn */,
-	{  0x1F5A,  0x1F5A} /* Cn */, {  0x1F5C,  0x1F5C} /* Cn */,
-	{  0x1F5E,  0x1F5E} /* Cn */, {  0x1F7E,  0x1F7F} /* Cn */,
-	{  0x1FB5,  0x1FB5} /* Cn */, {  0x1FC5,  0x1FC5} /* Cn */,
-	{  0x1FD4,  0x1FD5} /* Cn */, {  0x1FDC,  0x1FDC} /* Cn */,
-	{  0x1FF0,  0x1FF1} /* Cn */, {  0x1FF5,  0x1FF5} /* Cn */,
-	{  0x1FFF,  0x1FFF} /* Cn */,
-	{  0x200B,  0x200F} /* Cf */,
-	{  0x2028,  0x2028} /* Zl */,
-	{  0x2029,  0x2029} /* Zp */,
-	{  0x202A,  0x202E} /* Cf */,
-	{  0x2060,  0x2063} /* Cf */,
-	{  0x2064,  0x2069} /* Cn */,
-	{  0x206A,  0x206F} /* Cf */,
-	{  0x2072,  0x2073} /* Cn */, {  0x208F,  0x208F} /* Cn */,
-	{  0x2095,  0x209F} /* Cn */, {  0x20B6,  0x20CF} /* Cn */,
-	{  0x20F0,  0x20FF} /* Cn */, {  0x214F,  0x2152} /* Cn */,
-	{  0x2185,  0x218F} /* Cn */, {  0x23E8,  0x23FF} /* Cn */,
-	{  0x2427,  0x243F} /* Cn */, {  0x244B,  0x245F} /* Cn */,
-	{  0x269D,  0x269F} /* Cn */, {  0x26B3,  0x2700} /* Cn */,
-	{  0x2705,  0x2705} /* Cn */, {  0x270A,  0x270B} /* Cn */,
-	{  0x2728,  0x2728} /* Cn */, {  0x274C,  0x274C} /* Cn */,
-	{  0x274E,  0x274E} /* Cn */, {  0x2753,  0x2755} /* Cn */,
-	{  0x2757,  0x2757} /* Cn */, {  0x275F,  0x2760} /* Cn */,
-	{  0x2795,  0x2797} /* Cn */, {  0x27B0,  0x27B0} /* Cn */,
-	{  0x27BF,  0x27BF} /* Cn */, {  0x27CB,  0x27CF} /* Cn */,
-	{  0x27EC,  0x27EF} /* Cn */, {  0x2B1B,  0x2B1F} /* Cn */,
-	{  0x2B24,  0x2BFF} /* Cn */, {  0x2C2F,  0x2C2F} /* Cn */,
-	{  0x2C5F,  0x2C5F} /* Cn */, {  0x2C6D,  0x2C73} /* Cn */,
-	{  0x2C78,  0x2C7F} /* Cn */, {  0x2CEB,  0x2CF8} /* Cn */,
-	{  0x2D26,  0x2D2F} /* Cn */, {  0x2D66,  0x2D6E} /* Cn */,
-	{  0x2D70,  0x2D7F} /* Cn */, {  0x2D97,  0x2D9F} /* Cn */,
-	{  0x2DA7,  0x2DA7} /* Cn */, {  0x2DAF,  0x2DAF} /* Cn */,
-	{  0x2DB7,  0x2DB7} /* Cn */, {  0x2DBF,  0x2DBF} /* Cn */,
-	{  0x2DC7,  0x2DC7} /* Cn */, {  0x2DCF,  0x2DCF} /* Cn */,
-	{  0x2DD7,  0x2DD7} /* Cn */, {  0x2DDF,  0x2DFF} /* Cn */,
-	{  0x2E18,  0x2E1B} /* Cn */, {  0x2E1E,  0x2E7F} /* Cn */,
-	{  0x2E9A,  0x2E9A} /* Cn */, {  0x2EF4,  0x2EFF} /* Cn */,
-	{  0x2FD6,  0x2FEF} /* Cn */, {  0x2FFC,  0x2FFF} /* Cn */,
-	{  0x3040,  0x3040} /* Cn */, {  0x3097,  0x3098} /* Cn */,
-	{  0x3100,  0x3104} /* Cn */, {  0x312D,  0x3130} /* Cn */,
-	{  0x318F,  0x318F} /* Cn */, {  0x31B8,  0x31BF} /* Cn */,
-	{  0x31D0,  0x31EF} /* Cn */, {  0x321F,  0x321F} /* Cn */,
-	{  0x3244,  0x324F} /* Cn */, {  0x32FF,  0x32FF} /* Cn */,
-	{  0x4DB6,  0x4DBF} /* Cn */, {  0x9FBC,  0x9FFF} /* Cn */,
-	{  0xA48D,  0xA48F} /* Cn */, {  0xA4C7,  0xA6FF} /* Cn */,
-	{  0xA71B,  0xA71F} /* Cn */, {  0xA722,  0xA7FF} /* Cn */,
-	{  0xA82C,  0xA83F} /* Cn */, {  0xA878,  0xABFF} /* Cn */,
-	{  0xD7A4,  0xD7FF} /* Cn */,
-	{  0xD800,  0xDFFF} /* Cs */,
-	{  0xE000,  0xF8FF} /* Co */,
-	{  0xFA2E,  0xFA2F} /* Cn */, {  0xFA6B,  0xFA6F} /* Cn */,
-	{  0xFADA,  0xFAFF} /* Cn */, {  0xFB07,  0xFB12} /* Cn */,
-	{  0xFB18,  0xFB1C} /* Cn */, {  0xFB37,  0xFB37} /* Cn */,
-	{  0xFB3D,  0xFB3D} /* Cn */, {  0xFB3F,  0xFB3F} /* Cn */,
-	{  0xFB42,  0xFB42} /* Cn */, {  0xFB45,  0xFB45} /* Cn */,
-	{  0xFBB2,  0xFBD2} /* Cn */, {  0xFD40,  0xFD4F} /* Cn */,
-	{  0xFD90,  0xFD91} /* Cn */, {  0xFDC8,  0xFDEF} /* Cn */,
-	{  0xFDFE,  0xFDFF} /* Cn */, {  0xFE1A,  0xFE1F} /* Cn */,
-	{  0xFE24,  0xFE2F} /* Cn */, {  0xFE53,  0xFE53} /* Cn */,
-	{  0xFE67,  0xFE67} /* Cn */, {  0xFE6C,  0xFE6F} /* Cn */,
-	{  0xFE75,  0xFE75} /* Cn */, {  0xFEFD,  0xFEFE} /* Cn */,
-	{  0xFEFF,  0xFEFF} /* Cf */,
-	{  0xFF00,  0xFF00} /* Cn */, {  0xFFBF,  0xFFC1} /* Cn */,
-	{  0xFFC8,  0xFFC9} /* Cn */, {  0xFFD0,  0xFFD1} /* Cn */,
-	{  0xFFD8,  0xFFD9} /* Cn */, {  0xFFDD,  0xFFDF} /* Cn */,
-	{  0xFFE7,  0xFFE7} /* Cn */, {  0xFFEF,  0xFFF8} /* Cn */,
-	{  0xFFF9,  0xFFFB} /* Cf */,
-	{  0xFFFE,  0xFFFF} /* Cn */, { 0x1000C, 0x1000C} /* Cn */,
-	{ 0x10027, 0x10027} /* Cn */, { 0x1003B, 0x1003B} /* Cn */,
-	{ 0x1003E, 0x1003E} /* Cn */, { 0x1004E, 0x1004F} /* Cn */,
-	{ 0x1005E, 0x1007F} /* Cn */, { 0x100FB, 0x100FF} /* Cn */,
-	{ 0x10103, 0x10106} /* Cn */, { 0x10134, 0x10136} /* Cn */,
-	{ 0x1018B, 0x102FF} /* Cn */, { 0x1031F, 0x1031F} /* Cn */,
-	{ 0x10324, 0x1032F} /* Cn */, { 0x1034B, 0x1037F} /* Cn */,
-	{ 0x1039E, 0x1039E} /* Cn */, { 0x103C4, 0x103C7} /* Cn */,
-	{ 0x103D6, 0x103FF} /* Cn */,
-	{ 0x1049E, 0x1049F} /* Cn */, { 0x104AA, 0x107FF} /* Cn */,
-	{ 0x10806, 0x10807} /* Cn */, { 0x10809, 0x10809} /* Cn */,
-	{ 0x10836, 0x10836} /* Cn */, { 0x10839, 0x1083B} /* Cn */,
-	{ 0x1083D, 0x1083E} /* Cn */, { 0x10840, 0x108FF} /* Cn */,
-	{ 0x1091A, 0x1091E} /* Cn */, { 0x10920, 0x109FF} /* Cn */,
-	{ 0x10A04, 0x10A04} /* Cn */, { 0x10A07, 0x10A0B} /* Cn */,
-	{ 0x10A14, 0x10A14} /* Cn */, { 0x10A18, 0x10A18} /* Cn */,
-	{ 0x10A34, 0x10A37} /* Cn */, { 0x10A3B, 0x10A3E} /* Cn */,
-	{ 0x10A48, 0x10A4F} /* Cn */, { 0x10A59, 0x11FFF} /* Cn */,
-	{ 0x1236F, 0x123FF} /* Cn */, { 0x12463, 0x1246F} /* Cn */,
-	{ 0x12474, 0x1CFFF} /* Cn */, { 0x1D0F6, 0x1D0FF} /* Cn */,
-	{ 0x1D127, 0x1D129} /* Cn */,
-	{ 0x1D173, 0x1D17A} /* Cf */,
-	{ 0x1D1DE, 0x1D1FF} /* Cn */, { 0x1D246, 0x1D2FF} /* Cn */,
-	{ 0x1D357, 0x1D35F} /* Cn */, { 0x1D372, 0x1D3FF} /* Cn */,
-	{ 0x1D455, 0x1D455} /* Cn */, { 0x1D49D, 0x1D49D} /* Cn */,
-	{ 0x1D4A0, 0x1D4A1} /* Cn */, { 0x1D4A3, 0x1D4A4} /* Cn */,
-	{ 0x1D4A7, 0x1D4A8} /* Cn */, { 0x1D4AD, 0x1D4AD} /* Cn */,
-	{ 0x1D4BA, 0x1D4BA} /* Cn */, { 0x1D4BC, 0x1D4BC} /* Cn */,
-	{ 0x1D4C4, 0x1D4C4} /* Cn */, { 0x1D506, 0x1D506} /* Cn */,
-	{ 0x1D50B, 0x1D50C} /* Cn */, { 0x1D515, 0x1D515} /* Cn */,
-	{ 0x1D51D, 0x1D51D} /* Cn */, { 0x1D53A, 0x1D53A} /* Cn */,
-	{ 0x1D53F, 0x1D53F} /* Cn */, { 0x1D545, 0x1D545} /* Cn */,
-	{ 0x1D547, 0x1D549} /* Cn */, { 0x1D551, 0x1D551} /* Cn */,
-	{ 0x1D6A6, 0x1D6A7} /* Cn */, { 0x1D7CC, 0x1D7CD} /* Cn */,
-	{ 0x1D800, 0x1FFFF} /* Cn */, { 0x2A6D7, 0x2F7FF} /* Cn */,
-	{ 0x2FA1E, 0xE0000} /* Cn */,
-	{ 0xE0001, 0xE0001} /* Cf */,
-	{ 0xE0002, 0xE001F} /* Cn */,
-	{ 0xE0020, 0xE007F} /* Cf */,
-	{ 0xE0080, 0xE00FF} /* Cn */, { 0xE01F0, 0xEFFFF} /* Cn */,
-	{ 0xF0000, 0xFFFFD} /* Co */,
-	{ 0xFFFFE, 0xFFFFF} /* Cn */,
-	{0x100000,0x10FFFD} /* Co */,
-	{0x10FFFE,0x10FFFF} /* Cn */,
-	{0x110000,0x7FFFFFFF} /* ISO 10646?? */
-};
-
-/*
- * Double width characters
- *	W: East Asian Wide
- *	F: East Asian Full-width
- * Unassigned code points may be included when they allow ranges to be merged.
- * Last synched with
- *	<http://www.unicode.org/Public/5.0.0/ucd/EastAsianWidth-5.0.0d2.txt>
- *	dated 2005-11-08T01:32:56Z
- */
-static struct wchar_range wide_table[] = {
-	{  0x1100,  0x115F} /* W */, {  0x2329,  0x232A} /* W */,
-	{  0x2E80,  0x2FFB} /* W */,
-	{  0x3000,  0x3000} /* F */,
-	{  0x3001,  0x303E} /* W */, {  0x3041,  0x4DB5} /* W */,
-	{  0x4E00,  0x9FBB} /* W */, {  0xA000,  0xA4C6} /* W */,
-	{  0xAC00,  0xD7A3} /* W */, {  0xF900,  0xFAD9} /* W */,
-	{  0xFE10,  0xFE19} /* W */, {  0xFE30,  0xFE6B} /* W */,
-	{  0xFF01,  0xFF60} /* F */, {  0xFFE0,  0xFFE6} /* F */,
-	{ 0x20000, 0x2FFFD} /* W */, { 0x30000, 0x3FFFD} /* W */,
-};
 
 	static int
-is_in_table(ch, table, tsize)
+is_in_table(ch, table)
 	LWCHAR ch;
-	struct wchar_range table[];
-	int tsize;
+	struct wchar_range_table *table;
 {
 	int hi;
 	int lo;
 
 	/* Binary search in the table. */
-	if (ch < table[0].first)
+	if (ch < table->table[0].first)
 		return 0;
 	lo = 0;
-	hi = tsize - 1;
+	hi = table->count - 1;
 	while (lo <= hi)
 	{
 		int mid = (lo + hi) / 2;
-		if (ch > table[mid].last)
+		if (ch > table->table[mid].last)
 			lo = mid + 1;
-		else if (ch < table[mid].first)
+		else if (ch < table->table[mid].first)
 			hi = mid - 1;
 		else
 			return 1;
@@ -1126,7 +777,7 @@ is_in_table(ch, table, tsize)
 is_composing_char(ch)
 	LWCHAR ch;
 {
-	return is_in_table(ch, comp_table, (sizeof(comp_table) / sizeof(*comp_table)));
+	return is_in_table(ch, &compose_table);
 }
 
 /*
@@ -1136,7 +787,7 @@ is_composing_char(ch)
 is_ubin_char(ch)
 	LWCHAR ch;
 {
-	return is_in_table(ch, ubin_table, (sizeof(ubin_table) / sizeof(*ubin_table)));
+	return is_in_table(ch, &ubin_table);
 }
 
 /*
@@ -1146,7 +797,7 @@ is_ubin_char(ch)
 is_wide_char(ch)
 	LWCHAR ch;
 {
-	return is_in_table(ch, wide_table, (sizeof(wide_table) / sizeof(*wide_table)));
+	return is_in_table(ch, &wide_table);
 }
 
 /*

Modified: stable/9/contrib/less/charset.h
==============================================================================
--- stable/9/contrib/less/charset.h	Mon Jan 18 19:13:54 2016	(r294286)
+++ stable/9/contrib/less/charset.h	Mon Jan 18 19:27:24 2016	(r294287)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 1984-2012  Mark Nudelman
+ * Copyright (C) 1984-2015  Mark Nudelman
  *
  * You may distribute under the terms of either the GNU General Public
  * License or the Less License, as specified in the README file.

Modified: stable/9/contrib/less/cmd.h
==============================================================================
--- stable/9/contrib/less/cmd.h	Mon Jan 18 19:13:54 2016	(r294286)
+++ stable/9/contrib/less/cmd.h	Mon Jan 18 19:27:24 2016	(r294287)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 1984-2012  Mark Nudelman
+ * Copyright (C) 1984-2015  Mark Nudelman
  *
  * You may distribute under the terms of either the GNU General Public
  * License or the Less License, as specified in the README file.
@@ -66,6 +66,7 @@
 #define	A_PREV_TAG		54
 #define	A_FILTER		55
 #define	A_F_UNTIL_HILITE	56
+#define	A_GOEND_BUF		57
 
 #define	A_INVALID		100
 #define	A_NOACTION		101

Modified: stable/9/contrib/less/cmdbuf.c
==============================================================================
--- stable/9/contrib/less/cmdbuf.c	Mon Jan 18 19:13:54 2016	(r294286)
+++ stable/9/contrib/less/cmdbuf.c	Mon Jan 18 19:27:24 2016	(r294287)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 1984-2012  Mark Nudelman
+ * Copyright (C) 1984-2015  Mark Nudelman
  *
  * You may distribute under the terms of either the GNU General Public
  * License or the Less License, as specified in the README file.
@@ -203,7 +203,7 @@ cmd_step_common(p, ch, len, pwidth, bswi
 		pr = prchar((int) ch);
 		if (pwidth != NULL || bswidth != NULL)
 		{
-			int len = strlen(pr);
+			int len = (int) strlen(pr);
 			if (pwidth != NULL)
 				*pwidth = len;
 			if (bswidth != NULL)
@@ -222,7 +222,7 @@ cmd_step_common(p, ch, len, pwidth, bswi
 					*bswidth = 0;
 			} else if (is_ubin_char(ch))
 			{
-				int len = strlen(pr);
+				int len = (int) strlen(pr);
 				if (pwidth != NULL)
 					*pwidth = len;
 				if (bswidth != NULL)
@@ -375,7 +375,7 @@ cmd_lshift()
 		s = ns;
 	}
 
-	cmd_offset = s - cmdbuf;
+	cmd_offset = (int) (s - cmdbuf);
 	save_cp = cp;
 	cmd_home();
 	cmd_repaint(save_cp);
@@ -405,7 +405,7 @@ cmd_rshift()
 		cols += width;
 	}
 
-	cmd_offset = s - cmdbuf;
+	cmd_offset = (int) (s - cmdbuf);
 	save_cp = cp;
 	cmd_home();
 	cmd_repaint(save_cp);
@@ -535,7 +535,7 @@ cmd_erase()
 	 */
 	s = cp;
 	cmd_left();
-	clen = s - cp;
+	clen = (int) (s - cp);
 
 	/*
 	 * Remove the char from the buffer (shift the buffer left).
@@ -701,7 +701,7 @@ cmd_updown(action)
 
 	if (updown_match < 0)
 	{
-		updown_match = cp - cmdbuf;
+		updown_match = (int) (cp - cmdbuf);
 	}
 
 	/*
@@ -744,12 +744,13 @@ cmd_updown(action)
 #endif
 
 /*
- * Add a string to a history list.
+ * Add a string to an mlist.
  */
 	public void
-cmd_addhist(mlist, cmd)
+cmd_addhist(mlist, cmd, modified)
 	struct mlist *mlist;
 	char *cmd;
+	int modified;
 {
 #if CMD_HISTORY
 	struct mlist *ml;
@@ -773,6 +774,7 @@ cmd_addhist(mlist, cmd)
 		 */
 		ml = (struct mlist *) ecalloc(1, sizeof(struct mlist));
 		ml->string = save(cmd);
+		ml->modified = modified;
 		ml->next = mlist;
 		ml->prev = mlist->prev;
 		mlist->prev->next = ml;
@@ -799,7 +801,7 @@ cmd_accept()
 	 */
 	if (curr_mlist == NULL)
 		return;
-	cmd_addhist(curr_mlist, cmdbuf);
+	cmd_addhist(curr_mlist, cmdbuf, 1);
 	curr_mlist->modified = 1;
 #endif
 }
@@ -965,7 +967,7 @@ delimit_word()
 	int delim_quoted = 0;
 	int meta_quoted = 0;
 	char *esc = get_meta_escape();
-	int esclen = strlen(esc);
+	int esclen = (int) strlen(esc);
 #endif
 	
 	/*
@@ -1262,7 +1264,7 @@ cmd_char(c)
 			cmd_mbc_buf[cmd_mbc_buf_index++] = c;
 			if (cmd_mbc_buf_index < cmd_mbc_buf_len)
 				return (CC_OK);
-			if (!is_utf8_well_formed(cmd_mbc_buf))
+			if (!is_utf8_well_formed(cmd_mbc_buf, cmd_mbc_buf_index))
 			{
 				/* complete, but not well formed (non-shortest form), sequence */
 				cmd_mbc_buf_len = 0;
@@ -1359,6 +1361,18 @@ cmd_lastpattern()
 
 #if CMD_HISTORY
 /*
+ */
+	static int
+mlist_size(ml)
+	struct mlist *ml;
+{
+	int size = 0;
+	for (ml = ml->next;  ml->string != NULL;  ml = ml->next)
+		++size;
+	return size;
+}
+
+/*
  * Get the name of the history file.
  */
 	static char *
@@ -1378,6 +1392,10 @@ histfile_name()
 		return (save(name));
 	}
 
+	/* See if history file is disabled in the build. */
+	if (strcmp(LESSHISTFILE, "") == 0 || strcmp(LESSHISTFILE, "-") == 0)
+		return (NULL);
+
 	/* Otherwise, file is in $HOME. */
 	home = lgetenv("HOME");
 	if (home == NULL || *home == '\0')
@@ -1388,25 +1406,28 @@ histfile_name()
 #endif
 			return (NULL);
 	}
-	len = strlen(home) + strlen(LESSHISTFILE) + 2;
+	len = (int) (strlen(home) + strlen(LESSHISTFILE) + 2);
 	name = (char *) ecalloc(len, sizeof(char));
 	SNPRINTF2(name, len, "%s/%s", home, LESSHISTFILE);
 	return (name);
 }
-#endif /* CMD_HISTORY */
 
 /*
- * Initialize history from a .lesshist file.
+ * Read a .lesshst file and call a callback for each line in the file.
  */
-	public void
-init_cmdhist()
+	static void
+read_cmdhist2(action, uparam, skip_search, skip_shell)
+	void (*action)(void*,struct mlist*,char*);
+	void *uparam;
+	int skip_search;
+	int skip_shell;
 {
-#if CMD_HISTORY
 	struct mlist *ml = NULL;
 	char line[CMDBUF_SIZE];
 	char *filename;
 	FILE *f;
 	char *p;
+	int *skip = NULL;
 
 	filename = histfile_name();
 	if (filename == NULL)
@@ -1432,84 +1453,170 @@ init_cmdhist()
 			}
 		}
 		if (strcmp(line, HISTFILE_SEARCH_SECTION) == 0)
+		{
 			ml = &mlist_search;
-		else if (strcmp(line, HISTFILE_SHELL_SECTION) == 0)
+			skip = &skip_search;
+		} else if (strcmp(line, HISTFILE_SHELL_SECTION) == 0)
 		{
 #if SHELL_ESCAPE || PIPEC
 			ml = &mlist_shell;
+			skip = &skip_shell;
 #else
 			ml = NULL;
+			skip = NULL;
 #endif
 		} else if (*line == '"')
 		{
 			if (ml != NULL)
-				cmd_addhist(ml, line+1);
+			{
+				if (skip != NULL && *skip > 0)
+					--(*skip);
+				else
+					(*action)(uparam, ml, line+1);
+			}
 		}
 	}
 	fclose(f);
+}
+
+	static void
+read_cmdhist(action, uparam, skip_search, skip_shell)
+	void (*action)(void*,struct mlist*,char*);
+	void *uparam;
+	int skip_search;
+	int skip_shell;
+{
+	read_cmdhist2(action, uparam, skip_search, skip_shell);
+	(*action)(uparam, NULL, NULL); /* signal end of file */
+}
+
+	static void
+addhist_init(void *uparam, struct mlist *ml, char *string)
+{
+	if (ml == NULL || string == NULL)
+		return;
+	cmd_addhist(ml, string, 0);
+}
+#endif /* CMD_HISTORY */
+
+/*
+ * Initialize history from a .lesshist file.
+ */
+	public void
+init_cmdhist()

*** DIFF OUTPUT TRUNCATED AT 1000 LINES ***

From owner-svn-src-all@freebsd.org  Mon Jan 18 19:33:05 2016
Return-Path: <owner-svn-src-all@freebsd.org>
Delivered-To: svn-src-all@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id 157EEA8756A
 for <svn-src-all@mailman.ysv.freebsd.org>;
 Mon, 18 Jan 2016 19:33:05 +0000 (UTC)
 (envelope-from oliver.pinter@hardenedbsd.org)
Received: from mail-wm0-x233.google.com (mail-wm0-x233.google.com
 [IPv6:2a00:1450:400c:c09::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 A52EF1A5B
 for <svn-src-all@freebsd.org>; Mon, 18 Jan 2016 19:33:04 +0000 (UTC)
 (envelope-from oliver.pinter@hardenedbsd.org)
Received: by mail-wm0-x233.google.com with SMTP id l65so112113626wmf.1
 for <svn-src-all@freebsd.org>; Mon, 18 Jan 2016 11:33:04 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=hardenedbsd-org.20150623.gappssmtp.com; s=20150623;
 h=mime-version:in-reply-to:references:date:message-id:subject:from:to
 :cc:content-type;
 bh=K0uXPvMfEz1XwB70jAf7Evg2PdOo4BJ35AfOc8W0/HU=;
 b=qT4OX1wF/0S9MUJMK2Ki/OSZTUC9NbswgqeonUam01bG9Tl/3QHe2+PsOvl7IVvGyJ
 zOBGOvmxxhYRw5eiag/hBU8Vh2EcGK/UBtgwHqp3k5k5jAPkCJCRmLBffsapMkXRl3o0
 Re2qVrQYujw2E0g/MgjgNKWuUxmouxQO9iJxxdr0SlKWeQqoFXi8EYofGoYqzCSf5Sav
 5dgtQuYGcK9Rz1+5yPdMYaos+pzfhDU74dcXZdC24w5RH7IFkufR5tu1f++aXHdduOAl
 RHcbUQbLczZTR2Ftbm3vmXpI8XL9ZoceRlVjNfWBn1lZ91j/BRdJ6IAPodenWb7ojCQ+
 BqBw==
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:date
 :message-id:subject:from:to:cc:content-type;
 bh=K0uXPvMfEz1XwB70jAf7Evg2PdOo4BJ35AfOc8W0/HU=;
 b=SLrIUTSlWO0mWGeCTbkdOBtyAhdjLg2EhHCDO2iLHNYjK9gx3t4qtJGNRohJbDEjfg
 D0XdRmKdP7+7ebwAmTls13x+opK8Zsw01NTZaUGAAp0deLf4giHeGBa+x7fyaWpoi9sN
 rDWQEEXVHjlCa+WVP82YbZKHhVCsagplbnax1J90dERfWMevYxpxntVzwHVHLyaFCEIS
 b1zLvhB3wRlmWKrhweDmnlNBl6pXe1/OggHF+70CV1ScrQ6qhDM9xILuaDDnp1HIzDae
 F8XyQeQLajIr4Fmeb8ITrvahoFzAGy2gnxvIdKlrYCdMQ4ceuuZMgH3N1wSr6pG/pl1U
 cwbw==
X-Gm-Message-State: AG10YOSFjthZ1jvHivgh7I8SNiPMiptlwn5ddHkAhoEvwvpPshfrH31uoaX2QQIEWS835I1LOT27XTKEIkhph5te
MIME-Version: 1.0
X-Received: by 10.194.133.10 with SMTP id oy10mr17654407wjb.93.1453145583135; 
 Mon, 18 Jan 2016 11:33:03 -0800 (PST)
Received: by 10.194.82.6 with HTTP; Mon, 18 Jan 2016 11:33:03 -0800 (PST)
In-Reply-To: <20160118142107.2523f103@zapp>
References: <201601181411.u0IEBYoQ078886@repo.freebsd.org>
 <20160118142107.2523f103@zapp>
Date: Mon, 18 Jan 2016 20:33:03 +0100
Message-ID: <CAPQ4ffvswCz9XJyoMX3kS6qL6zVcU26PkyJjZiUX36UjJ8A2Hg@mail.gmail.com>
Subject: Re: svn commit: r294267 - head/sys/arm64/conf
From: Oliver Pinter <oliver.pinter@hardenedbsd.org>
To: Andrew Turner <andrew@fubar.geek.nz>
Cc: Zbigniew Bodek <zbb@freebsd.org>, svn-src-head@freebsd.org,
 svn-src-all@freebsd.org, src-committers@freebsd.org
Content-Type: text/plain; charset=UTF-8
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.20
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for &quot;
 user&quot; and &quot; projects&quot; \)" <svn-src-all.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-all/>
List-Post: <mailto:svn-src-all@freebsd.org>
List-Help: <mailto:svn-src-all-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Mon, 18 Jan 2016 19:33:05 -0000

On 1/18/16, Andrew Turner <andrew@fubar.geek.nz> wrote:
> On Mon, 18 Jan 2016 14:11:34 +0000 (UTC)
> Zbigniew Bodek <zbb@FreeBSD.org> wrote:
>
>> Author: zbb
>> Date: Mon Jan 18 14:11:34 2016
>> New Revision: 294267
>> URL: https://svnweb.freebsd.org/changeset/base/294267
>>
>> Log:
>>   Enable AIO interface on ARM64 platforms
>>
>>   Add VFS_AIO to generic config to allow using of high-performance
>>   asynchronous disk AIO operation.
>
> Why have you only enabled this on arm64? Is it not applicable to other
> architectures?

Is is from sys/conf/NOTES:

# Use real implementations of the aio_* system calls.  There are numerous
# stability and security issues in the current aio code that make it
# unsuitable for inclusion on machines with untrusted local users.
options         VFS_AIO


>
> Andrew
> _______________________________________________
> 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-all@freebsd.org  Mon Jan 18 19:42:06 2016
Return-Path: <owner-svn-src-all@freebsd.org>
Delivered-To: svn-src-all@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9682EA87875;
 Mon, 18 Jan 2016 19:42:06 +0000 (UTC)
 (envelope-from delphij@FreeBSD.org)
Received: from repo.freebsd.org (repo.freebsd.org
 [IPv6:2610:1c1:1:6068::e6a:0])
 (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
 (Client did not present a certificate)
 by mx1.freebsd.org (Postfix) with ESMTPS id 722141FCC;
 Mon, 18 Jan 2016 19:42:06 +0000 (UTC)
 (envelope-from delphij@FreeBSD.org)
Received: from repo.freebsd.org ([127.0.1.37])
 by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u0IJg56C077781;
 Mon, 18 Jan 2016 19:42:05 GMT (envelope-from delphij@FreeBSD.org)
Received: (from delphij@localhost)
 by repo.freebsd.org (8.15.2/8.15.2/Submit) id u0IJg5gJ077778;
 Mon, 18 Jan 2016 19:42:05 GMT (envelope-from delphij@FreeBSD.org)
Message-Id: <201601181942.u0IJg5gJ077778@repo.freebsd.org>
X-Authentication-Warning: repo.freebsd.org: delphij set sender to
 delphij@FreeBSD.org using -f
From: Xin LI <delphij@FreeBSD.org>
Date: Mon, 18 Jan 2016 19:42:05 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org
Subject: svn commit: r294288 - stable/10/contrib/netcat
X-SVN-Group: stable-10
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.20
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for &quot;
 user&quot; and &quot; projects&quot; \)" <svn-src-all.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-all/>
List-Post: <mailto:svn-src-all@freebsd.org>
List-Help: <mailto:svn-src-all-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Mon, 18 Jan 2016 19:42:06 -0000

Author: delphij
Date: Mon Jan 18 19:42:05 2016
New Revision: 294288
URL: https://svnweb.freebsd.org/changeset/base/294288

Log:
  MFC r288303: MFV r288243: nc from OpenBSD 5.8.

Modified:
  stable/10/contrib/netcat/nc.1
  stable/10/contrib/netcat/netcat.c
  stable/10/contrib/netcat/socks.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/contrib/netcat/nc.1
==============================================================================
--- stable/10/contrib/netcat/nc.1	Mon Jan 18 19:27:24 2016	(r294287)
+++ stable/10/contrib/netcat/nc.1	Mon Jan 18 19:42:05 2016	(r294288)
@@ -1,4 +1,4 @@
-.\"     $OpenBSD: nc.1,v 1.67 2014/02/26 20:56:11 claudio Exp $
+.\"     $OpenBSD: nc.1,v 1.68 2015/03/26 10:35:04 tobias Exp $
 .\"
 .\" Copyright (c) 1996 David Sacerdote
 .\" All rights reserved.
@@ -27,7 +27,7 @@
 .\"
 .\" $FreeBSD$
 .\"
-.Dd April 11, 2014
+.Dd September 26, 2015
 .Dt NC 1
 .Os
 .Sh NAME
@@ -133,7 +133,7 @@ connection to another program (e.g.\&
 .Xr ssh 1
 using the
 .Xr ssh_config 5
-.Cm ProxyUseFdPass
+.Cm ProxyUseFdpass
 option).
 .It Fl h
 Prints out

Modified: stable/10/contrib/netcat/netcat.c
==============================================================================
--- stable/10/contrib/netcat/netcat.c	Mon Jan 18 19:27:24 2016	(r294287)
+++ stable/10/contrib/netcat/netcat.c	Mon Jan 18 19:42:05 2016	(r294288)
@@ -1,4 +1,4 @@
-/* $OpenBSD: netcat.c,v 1.127 2015/02/14 22:40:22 jca Exp $ */
+/* $OpenBSD: netcat.c,v 1.130 2015/07/26 19:12:28 chl Exp $ */
 /*
  * Copyright (c) 2001 Eric Jackson <ericj@monkey.org>
  *
@@ -52,15 +52,16 @@
 #include <err.h>
 #include <errno.h>
 #include <getopt.h>
+#include <fcntl.h>
+#include <limits.h>
 #include <netdb.h>
 #include <poll.h>
+#include <signal.h>
 #include <stdarg.h>
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
 #include <unistd.h>
-#include <fcntl.h>
-#include <limits.h>
 #include "atomicio.h"
 
 #ifndef SUN_LEN
@@ -163,6 +164,8 @@ main(int argc, char *argv[])
 	uport = NULL;
 	sv = NULL;
 
+	signal(SIGPIPE, SIG_IGN);
+
 	while ((ch = getopt_long(argc, argv,
 	    "46DdEe:FhI:i:klNnoO:P:p:rSs:tT:UuV:vw:X:x:z",
 	    longopts, NULL)) != -1) {
@@ -1042,7 +1045,6 @@ fdpass(int nfd)
 	bzero(&mh, sizeof(mh));
 	bzero(&cmsgbuf, sizeof(cmsgbuf));
 	bzero(&iov, sizeof(iov));
-	bzero(&pfd, sizeof(pfd));
 
 	mh.msg_control = (caddr_t)&cmsgbuf.buf;
 	mh.msg_controllen = sizeof(cmsgbuf.buf);
@@ -1059,17 +1061,17 @@ fdpass(int nfd)
 
 	bzero(&pfd, sizeof(pfd));
 	pfd.fd = STDOUT_FILENO;
+	pfd.events = POLLOUT;
 	for (;;) {
 		r = sendmsg(STDOUT_FILENO, &mh, 0);
 		if (r == -1) {
 			if (errno == EAGAIN || errno == EINTR) {
-				pfd.events = POLLOUT;
 				if (poll(&pfd, 1, -1) == -1)
 					err(1, "poll");
 				continue;
 			}
 			err(1, "sendmsg");
-		} else if (r == -1)
+		} else if (r != 1)
 			errx(1, "sendmsg: unexpected return value %zd", r);
 		else
 			break;

Modified: stable/10/contrib/netcat/socks.c
==============================================================================
--- stable/10/contrib/netcat/socks.c	Mon Jan 18 19:27:24 2016	(r294287)
+++ stable/10/contrib/netcat/socks.c	Mon Jan 18 19:42:05 2016	(r294288)
@@ -1,4 +1,4 @@
-/*	$OpenBSD: socks.c,v 1.20 2012/03/08 09:56:28 espie Exp $	*/
+/*	$OpenBSD: socks.c,v 1.21 2015/03/26 21:19:51 tobias Exp $	*/
 
 /*
  * Copyright (c) 1999 Niklas Hallqvist.  All rights reserved.
@@ -308,8 +308,8 @@ socks_connect(const char *host, const ch
 		}
 
 		/* Terminate headers */
-		if ((r = atomicio(vwrite, proxyfd, "\r\n", 2)) != 2)
-			err(1, "write failed (2/%d)", r);
+		if ((cnt = atomicio(vwrite, proxyfd, "\r\n", 2)) != 2)
+			err(1, "write failed (%zu/2)", cnt);
 
 		/* Read status reply */
 		proxy_read_line(proxyfd, buf, sizeof(buf));

From owner-svn-src-all@freebsd.org  Mon Jan 18 19:52:22 2016
Return-Path: <owner-svn-src-all@freebsd.org>
Delivered-To: svn-src-all@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id 24510A87C33;
 Mon, 18 Jan 2016 19:52:22 +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 E2E2B1892;
 Mon, 18 Jan 2016 19:52:21 +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 u0IJqKk9083588;
 Mon, 18 Jan 2016 19:52:20 GMT (envelope-from jhb@FreeBSD.org)
Received: (from jhb@localhost)
 by repo.freebsd.org (8.15.2/8.15.2/Submit) id u0IJqKGF083583;
 Mon, 18 Jan 2016 19:52:20 GMT (envelope-from jhb@FreeBSD.org)
Message-Id: <201601181952.u0IJqKGF083583@repo.freebsd.org>
X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org
 using -f
From: John Baldwin <jhb@FreeBSD.org>
Date: Mon, 18 Jan 2016 19:52:20 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org
Subject: svn commit: r294289 - in stable/10: sys/dev/pci usr.sbin/pciconf
X-SVN-Group: stable-10
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.20
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for &quot;
 user&quot; and &quot; projects&quot; \)" <svn-src-all.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-all/>
List-Post: <mailto:svn-src-all@freebsd.org>
List-Help: <mailto:svn-src-all-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Mon, 18 Jan 2016 19:52:22 -0000

Author: jhb
Date: Mon Jan 18 19:52:20 2016
New Revision: 294289
URL: https://svnweb.freebsd.org/changeset/base/294289

Log:
  MFC 291225:
  Add a new -B flag for use with list mode (-l) that lists details about
  bridges.  Currently this includes information about what resources a
  bridge decodes on the upstream side for use by downstream devices including
  bus numbers, I/O port resources, and memory resources.  Windows and bus
  ranges are enumerated for both PCI-PCI bridges and PCI-CardBus bridges.
  
  To simplify the implementation, all enumeration is done by reading the
  appropriate config space registers directly rather than querying the
  bridge driver in the kernel via new ioctls.  This does result in a few
  limitations.
  
  First, an unimplemented window in a PCI-PCI bridge cannot be accurately
  detected as accurate detection requires writing to the window base
  register.  That is not safe for pciconf(8).  Instead, this assumes that
  any window where both the base and limit read as all zeroes is
  unimplemented.
  
  Second, the PCI-PCI bridge driver in a tree has a few quirks for
  PCI-PCI bridges that use subtractive decoding but do not indicate that
  via the progif config register.  The list of quirks is duplicated in
  pciconf's source.

Modified:
  stable/10/sys/dev/pci/pcireg.h
  stable/10/sys/dev/pci/pcivar.h
  stable/10/usr.sbin/pciconf/pciconf.8
  stable/10/usr.sbin/pciconf/pciconf.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/sys/dev/pci/pcireg.h
==============================================================================
--- stable/10/sys/dev/pci/pcireg.h	Mon Jan 18 19:42:05 2016	(r294288)
+++ stable/10/sys/dev/pci/pcireg.h	Mon Jan 18 19:52:20 2016	(r294289)
@@ -260,6 +260,11 @@
 #define	PCIR_BIOS_1	0x38
 #define	PCIR_BRIDGECTL_1 0x3e
 
+#define	PCI_PPBMEMBASE(h,l)  ((((uint64_t)(h) << 32) + ((l)<<16)) & ~0xfffff)
+#define	PCI_PPBMEMLIMIT(h,l) ((((uint64_t)(h) << 32) + ((l)<<16)) | 0xfffff)
+#define	PCI_PPBIOBASE(h,l)   ((((h)<<16) + ((l)<<8)) & ~0xfff)
+#define	PCI_PPBIOLIMIT(h,l)  ((((h)<<16) + ((l)<<8)) | 0xfff)
+
 /* config registers for header type 2 (CardBus) devices */
 
 #define	PCIR_MAX_BAR_2	0
@@ -279,6 +284,9 @@
 #define	PCIR_IOLIMIT0_2	0x30
 #define	PCIR_IOBASE1_2	0x34
 #define	PCIR_IOLIMIT1_2	0x38
+#define	PCIM_CBBIO_16		0x0
+#define	PCIM_CBBIO_32		0x1
+#define	PCIM_CBBIO_MASK		0x3
 
 #define	PCIR_BRIDGECTL_2 0x3e
 
@@ -287,6 +295,11 @@
 
 #define	PCIR_PCCARDIF_2	0x44
 
+#define	PCI_CBBMEMBASE(l)  ((l) & ~0xfffff)
+#define	PCI_CBBMEMLIMIT(l) ((l) | 0xfffff)
+#define	PCI_CBBIOBASE(l)   ((l) & ~0x3)
+#define	PCI_CBBIOLIMIT(l)  ((l) | 0x3)
+
 /* PCI device class, subclass and programming interface definitions */
 
 #define	PCIC_OLD	0x00
@@ -474,6 +487,17 @@
 #define	PCIB_BCR_DISCARD_TIMER_STATUS	0x0400
 #define	PCIB_BCR_DISCARD_TIMER_SERREN	0x0800
 
+#define	CBB_BCR_PERR_ENABLE		0x0001
+#define	CBB_BCR_SERR_ENABLE		0x0002
+#define	CBB_BCR_ISA_ENABLE		0x0004
+#define	CBB_BCR_VGA_ENABLE		0x0008
+#define	CBB_BCR_MASTER_ABORT_MODE	0x0020
+#define	CBB_BCR_CARDBUS_RESET		0x0040
+#define	CBB_BCR_IREQ_INT_ENABLE		0x0080
+#define	CBB_BCR_PREFETCH_0_ENABLE	0x0100
+#define	CBB_BCR_PREFETCH_1_ENABLE	0x0200
+#define	CBB_BCR_WRITE_POSTING_ENABLE	0x0400
+
 /* PCI power manangement */
 #define	PCIR_POWER_CAP		0x2
 #define	PCIM_PCAP_SPEC			0x0007

Modified: stable/10/sys/dev/pci/pcivar.h
==============================================================================
--- stable/10/sys/dev/pci/pcivar.h	Mon Jan 18 19:42:05 2016	(r294288)
+++ stable/10/sys/dev/pci/pcivar.h	Mon Jan 18 19:52:20 2016	(r294289)
@@ -190,11 +190,6 @@ typedef struct pcicfg {
 
 /* additional type 1 device config header information (PCI to PCI bridge) */
 
-#define	PCI_PPBMEMBASE(h,l)  ((((pci_addr_t)(h) << 32) + ((l)<<16)) & ~0xfffff)
-#define	PCI_PPBMEMLIMIT(h,l) ((((pci_addr_t)(h) << 32) + ((l)<<16)) | 0xfffff)
-#define	PCI_PPBIOBASE(h,l)   ((((h)<<16) + ((l)<<8)) & ~0xfff)
-#define	PCI_PPBIOLIMIT(h,l)  ((((h)<<16) + ((l)<<8)) | 0xfff)
-
 typedef struct {
     pci_addr_t	pmembase;	/* base address of prefetchable memory */
     pci_addr_t	pmemlimit;	/* topmost address of prefetchable memory */

Modified: stable/10/usr.sbin/pciconf/pciconf.8
==============================================================================
--- stable/10/usr.sbin/pciconf/pciconf.8	Mon Jan 18 19:42:05 2016	(r294288)
+++ stable/10/usr.sbin/pciconf/pciconf.8	Mon Jan 18 19:52:20 2016	(r294289)
@@ -25,7 +25,7 @@
 .\"
 .\" $FreeBSD$
 .\"
-.Dd September 06, 2015
+.Dd November 23, 2015
 .Dt PCICONF 8
 .Os
 .Sh NAME
@@ -33,7 +33,7 @@
 .Nd diagnostic utility for the PCI bus
 .Sh SYNOPSIS
 .Nm
-.Fl l Oo Fl bcevV Oc Op Ar device
+.Fl l Oo Fl BbceVv Oc Op Ar device
 .Nm
 .Fl a Ar device
 .Nm
@@ -112,6 +112,42 @@ device, which contains several (similar 
 one chip.
 .Pp
 If the
+.Fl B
+option is supplied,
+.Nm
+will list additional information for
+.Tn PCI
+to
+.Tn PCI
+and
+.Tn PCI
+to
+.Tn CardBus
+bridges,
+specifically the resource ranges decoded by the bridge for use by devices
+behind the bridge.
+Each bridge lists a range of bus numbers handled by the bridge and its
+downstream devices.
+Memory and I/O port decoding windows are enumerated via a line in the
+following format:
+.Bd -literal
+    window[1c] = type I/O Port, range 16, addr 0x5000-0x8fff, enabled
+.Ed
+.Pp
+The first value after the
+.Dq Li window
+prefix in the square brackets is the offset of the decoding window in
+config space in hexadecimal.
+The type of a window is one of
+.Dq Memory ,
+.Dq Prefetchable Memory ,
+or
+.Dq I/O Port .
+The range indicates the binary log of the maximum address the window decodes.
+The address field indicates the start and end addresses of the decoded range.
+Finally, the last flag indicates if the window is enabled or disabled.
+.Pp
+If the
 .Fl b
 option is supplied,
 .Nm
@@ -132,7 +168,7 @@ The type of a BAR is one of
 .Dq Prefetchable Memory ,
 or
 .Dq I/O Port .
-The range indicates the maximum address the BAR decodes.
+The range indicates the binary log of the maximum address the BAR decodes.
 The base and size indicate the start and length of the BAR's address window,
 respectively.
 Finally, the last flag indicates if the BAR is enabled or disabled.

Modified: stable/10/usr.sbin/pciconf/pciconf.c
==============================================================================
--- stable/10/usr.sbin/pciconf/pciconf.c	Mon Jan 18 19:42:05 2016	(r294288)
+++ stable/10/usr.sbin/pciconf/pciconf.c	Mon Jan 18 19:52:20 2016	(r294289)
@@ -39,6 +39,7 @@ static const char rcsid[] =
 #include <ctype.h>
 #include <err.h>
 #include <inttypes.h>
+#include <stdbool.h>
 #include <stdlib.h>
 #include <stdio.h>
 #include <string.h>
@@ -69,9 +70,10 @@ struct pci_vendor_info
 TAILQ_HEAD(,pci_vendor_info)	pci_vendors;
 
 static struct pcisel getsel(const char *str);
+static void list_bridge(int fd, struct pci_conf *p);
 static void list_bars(int fd, struct pci_conf *p);
-static void list_devs(const char *name, int verbose, int bars, int caps,
-    int errors, int vpd);
+static void list_devs(const char *name, int verbose, int bars, int bridge,
+    int caps, int errors, int vpd);
 static void list_verbose(struct pci_conf *p);
 static void list_vpd(int fd, struct pci_conf *p);
 static const char *guess_class(struct pci_conf *p);
@@ -87,7 +89,7 @@ static void
 usage(void)
 {
 	fprintf(stderr, "%s\n%s\n%s\n%s\n",
-		"usage: pciconf -l [-bcevV] [device]",
+		"usage: pciconf -l [-BbcevV] [device]",
 		"       pciconf -a device",
 		"       pciconf -r [-b | -h] device addr[:addr2]",
 		"       pciconf -w [-b | -h] device addr value");
@@ -99,18 +101,22 @@ main(int argc, char **argv)
 {
 	int c;
 	int listmode, readmode, writemode, attachedmode;
-	int bars, caps, errors, verbose, vpd;
+	int bars, bridge, caps, errors, verbose, vpd;
 	int byte, isshort;
 
 	listmode = readmode = writemode = attachedmode = 0;
-	bars = caps = errors = verbose = vpd = byte = isshort = 0;
+	bars = bridge = caps = errors = verbose = vpd = byte = isshort = 0;
 
-	while ((c = getopt(argc, argv, "abcehlrwvV")) != -1) {
+	while ((c = getopt(argc, argv, "aBbcehlrwVv")) != -1) {
 		switch(c) {
 		case 'a':
 			attachedmode = 1;
 			break;
 
+		case 'B':
+			bridge = 1;
+			break;
+
 		case 'b':
 			bars = 1;
 			byte = 1;
@@ -161,7 +167,7 @@ main(int argc, char **argv)
 
 	if (listmode) {
 		list_devs(optind + 1 == argc ? argv[optind] : NULL, verbose,
-		    bars, caps, errors, vpd);
+		    bars, bridge, caps, errors, vpd);
 	} else if (attachedmode) {
 		chkattached(argv[optind]);
 	} else if (readmode) {
@@ -178,8 +184,8 @@ main(int argc, char **argv)
 }
 
 static void
-list_devs(const char *name, int verbose, int bars, int caps, int errors,
-    int vpd)
+list_devs(const char *name, int verbose, int bars, int bridge, int caps,
+    int errors, int vpd)
 {
 	int fd;
 	struct pci_conf_io pc;
@@ -190,7 +196,8 @@ list_devs(const char *name, int verbose,
 	if (verbose)
 		load_vendors();
 
-	fd = open(_PATH_DEVPCI, (caps || errors) ? O_RDWR : O_RDONLY, 0);
+	fd = open(_PATH_DEVPCI, (bridge || caps || errors) ? O_RDWR : O_RDONLY,
+	    0);
 	if (fd < 0)
 		err(1, "%s", _PATH_DEVPCI);
 
@@ -248,6 +255,8 @@ list_devs(const char *name, int verbose,
 				list_verbose(p);
 			if (bars)
 				list_bars(fd, p);
+			if (bridge)
+				list_bridge(fd, p);
 			if (caps)
 				list_caps(fd, p);
 			if (errors)
@@ -261,6 +270,189 @@ list_devs(const char *name, int verbose,
 }
 
 static void
+print_bus_range(int fd, struct pci_conf *p, int secreg, int subreg)
+{
+	uint8_t secbus, subbus;
+
+	secbus = read_config(fd, &p->pc_sel, secreg, 1);
+	subbus = read_config(fd, &p->pc_sel, subreg, 1);
+	printf("    bus range  = %u-%u\n", secbus, subbus);
+}
+
+static void
+print_window(int reg, const char *type, int range, uint64_t base,
+    uint64_t limit)
+{
+
+	printf("    window[%02x] = type %s, range %2d, addr %#jx-%#jx, %s\n",
+	    reg, type, range, (uintmax_t)base, (uintmax_t)limit,
+	    base < limit ? "enabled" : "disabled");
+}
+
+static void
+print_special_decode(bool isa, bool vga, bool subtractive)
+{
+	bool comma;
+
+	if (isa || vga || subtractive) {
+		comma = false;
+		printf("    decode     = ");
+		if (isa) {
+			printf("ISA");
+			comma = true;
+		}
+		if (vga) {
+			printf("%sVGA", comma ? ", " : "");
+			comma = true;
+		}
+		if (subtractive)
+			printf("%ssubtractive", comma ? ", " : "");
+		printf("\n");
+	}
+}
+
+static void
+print_bridge_windows(int fd, struct pci_conf *p)
+{
+	uint64_t base, limit;
+	uint32_t val;
+	uint16_t bctl;
+	bool subtractive;
+	int range;
+
+	/*
+	 * XXX: This assumes that a window with a base and limit of 0
+	 * is not implemented.  In theory a window might be programmed
+	 * at the smallest size with a base of 0, but those do not seem
+	 * common in practice.
+	 */
+	val = read_config(fd, &p->pc_sel, PCIR_IOBASEL_1, 1);
+	if (val != 0 || read_config(fd, &p->pc_sel, PCIR_IOLIMITL_1, 1) != 0) {
+		if ((val & PCIM_BRIO_MASK) == PCIM_BRIO_32) {
+			base = PCI_PPBIOBASE(
+			    read_config(fd, &p->pc_sel, PCIR_IOBASEH_1, 2),
+			    val);
+			limit = PCI_PPBIOLIMIT(
+			    read_config(fd, &p->pc_sel, PCIR_IOLIMITH_1, 2),
+			    read_config(fd, &p->pc_sel, PCIR_IOLIMITL_1, 1));
+			range = 32;
+		} else {
+			base = PCI_PPBIOBASE(0, val);
+			limit = PCI_PPBIOLIMIT(0,
+			    read_config(fd, &p->pc_sel, PCIR_IOLIMITL_1, 1));
+			range = 16;
+		}
+		print_window(PCIR_IOBASEL_1, "I/O Port", range, base, limit);
+	}
+
+	base = PCI_PPBMEMBASE(0,
+	    read_config(fd, &p->pc_sel, PCIR_MEMBASE_1, 2));
+	limit = PCI_PPBMEMLIMIT(0,
+	    read_config(fd, &p->pc_sel, PCIR_MEMLIMIT_1, 2));
+	print_window(PCIR_MEMBASE_1, "Memory", 32, base, limit);
+
+	val = read_config(fd, &p->pc_sel, PCIR_PMBASEL_1, 2);
+	if (val != 0 || read_config(fd, &p->pc_sel, PCIR_PMLIMITL_1, 2) != 0) {
+		if ((val & PCIM_BRPM_MASK) == PCIM_BRPM_64) {
+			base = PCI_PPBMEMBASE(
+			    read_config(fd, &p->pc_sel, PCIR_PMBASEH_1, 4),
+			    val);
+			limit = PCI_PPBMEMLIMIT(
+			    read_config(fd, &p->pc_sel, PCIR_PMLIMITH_1, 4),
+			    read_config(fd, &p->pc_sel, PCIR_PMLIMITL_1, 2));
+			range = 64;
+		} else {
+			base = PCI_PPBMEMBASE(0, val);
+			limit = PCI_PPBMEMLIMIT(0,
+			    read_config(fd, &p->pc_sel, PCIR_PMLIMITL_1, 2));
+			range = 32;
+		}
+		print_window(PCIR_PMBASEL_1, "Prefetchable Memory", range, base,
+		    limit);
+	}
+
+	/*
+	 * XXX: This list of bridges that are subtractive but do not set
+	 * progif to indicate it is copied from pci_pci.c.
+	 */
+	subtractive = p->pc_progif == PCIP_BRIDGE_PCI_SUBTRACTIVE;
+	switch (p->pc_device << 16 | p->pc_vendor) {
+	case 0xa002177d:		/* Cavium ThunderX */
+	case 0x124b8086:		/* Intel 82380FB Mobile */
+	case 0x060513d7:		/* Toshiba ???? */
+		subtractive = true;
+	}
+	if (p->pc_vendor == 0x8086 && (p->pc_device & 0xff00) == 0x2400)
+		subtractive = true;
+		
+	bctl = read_config(fd, &p->pc_sel, PCIR_BRIDGECTL_1, 2);
+	print_special_decode(bctl & PCIB_BCR_ISA_ENABLE,
+	    bctl & PCIB_BCR_VGA_ENABLE, subtractive);
+}
+
+static void
+print_cardbus_mem_window(int fd, struct pci_conf *p, int basereg, int limitreg,
+    bool prefetch)
+{
+
+	print_window(basereg, prefetch ? "Prefetchable Memory" : "Memory", 32,
+	    PCI_CBBMEMBASE(read_config(fd, &p->pc_sel, basereg, 4)),
+	    PCI_CBBMEMLIMIT(read_config(fd, &p->pc_sel, limitreg, 4)));
+}
+
+static void
+print_cardbus_io_window(int fd, struct pci_conf *p, int basereg, int limitreg)
+{
+	uint32_t base, limit;
+	uint32_t val;
+	int range;
+
+	val = read_config(fd, &p->pc_sel, basereg, 2);
+	if ((val & PCIM_CBBIO_MASK) == PCIM_CBBIO_32) {
+		base = PCI_CBBIOBASE(read_config(fd, &p->pc_sel, basereg, 4));
+		limit = PCI_CBBIOBASE(read_config(fd, &p->pc_sel, limitreg, 4));
+		range = 32;
+	} else {
+		base = PCI_CBBIOBASE(val);
+		limit = PCI_CBBIOBASE(read_config(fd, &p->pc_sel, limitreg, 2));
+		range = 16;
+	}
+	print_window(basereg, "I/O Port", range, base, limit);
+}
+
+static void
+print_cardbus_windows(int fd, struct pci_conf *p)
+{
+	uint16_t bctl;
+
+	bctl = read_config(fd, &p->pc_sel, PCIR_BRIDGECTL_2, 2);
+	print_cardbus_mem_window(fd, p, PCIR_MEMBASE0_2, PCIR_MEMLIMIT0_2,
+	    bctl & CBB_BCR_PREFETCH_0_ENABLE);
+	print_cardbus_mem_window(fd, p, PCIR_MEMBASE1_2, PCIR_MEMLIMIT1_2,
+	    bctl & CBB_BCR_PREFETCH_1_ENABLE);
+	print_cardbus_io_window(fd, p, PCIR_IOBASE0_2, PCIR_IOLIMIT0_2);
+	print_cardbus_io_window(fd, p, PCIR_IOBASE1_2, PCIR_IOLIMIT1_2);
+	print_special_decode(bctl & CBB_BCR_ISA_ENABLE,
+	    bctl & CBB_BCR_VGA_ENABLE, false);
+}
+
+static void
+list_bridge(int fd, struct pci_conf *p)
+{
+
+	switch (p->pc_hdr & PCIM_HDRTYPE) {
+	case PCIM_HDRTYPE_BRIDGE:
+		print_bus_range(fd, p, PCIR_SECBUS_1, PCIR_SUBBUS_1);
+		print_bridge_windows(fd, p);
+		break;
+	case PCIM_HDRTYPE_CARDBUS:
+		print_bus_range(fd, p, PCIR_SECBUS_2, PCIR_SUBBUS_2);
+		print_cardbus_windows(fd, p);
+		break;
+	}
+}
+
+static void
 list_bars(int fd, struct pci_conf *p)
 {
 	struct pci_bar_io bar;

From owner-svn-src-all@freebsd.org  Mon Jan 18 20:21:40 2016
Return-Path: <owner-svn-src-all@freebsd.org>
Delivered-To: svn-src-all@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4A0D0A8653B;
 Mon, 18 Jan 2016 20:21:40 +0000 (UTC)
 (envelope-from joel@FreeBSD.org)
Received: from repo.freebsd.org (repo.freebsd.org
 [IPv6:2610:1c1:1:6068::e6a:0])
 (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
 (Client did not present a certificate)
 by mx1.freebsd.org (Postfix) with ESMTPS id 040921501;
 Mon, 18 Jan 2016 20:21:39 +0000 (UTC)
 (envelope-from joel@FreeBSD.org)
Received: from repo.freebsd.org ([127.0.1.37])
 by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u0IKLdAU089776;
 Mon, 18 Jan 2016 20:21:39 GMT (envelope-from joel@FreeBSD.org)
Received: (from joel@localhost)
 by repo.freebsd.org (8.15.2/8.15.2/Submit) id u0IKLcQD089772;
 Mon, 18 Jan 2016 20:21:38 GMT (envelope-from joel@FreeBSD.org)
Message-Id: <201601182021.u0IKLcQD089772@repo.freebsd.org>
X-Authentication-Warning: repo.freebsd.org: joel set sender to
 joel@FreeBSD.org using -f
From: Joel Dahl <joel@FreeBSD.org>
Date: Mon, 18 Jan 2016 20:21:38 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-head@freebsd.org
Subject: svn commit: r294290 - in head: lib/libc/sys share/man/man7
 usr.bin/iscsictl usr.sbin/jls
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.20
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for &quot;
 user&quot; and &quot; projects&quot; \)" <svn-src-all.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-all/>
List-Post: <mailto:svn-src-all@freebsd.org>
List-Help: <mailto:svn-src-all-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Mon, 18 Jan 2016 20:21:40 -0000

Author: joel (doc committer)
Date: Mon Jan 18 20:21:38 2016
New Revision: 294290
URL: https://svnweb.freebsd.org/changeset/base/294290

Log:
  mdoc: sort Xr

Modified:
  head/lib/libc/sys/utrace.2
  head/share/man/man7/tuning.7
  head/usr.bin/iscsictl/iscsictl.8
  head/usr.sbin/jls/jls.8

Modified: head/lib/libc/sys/utrace.2
==============================================================================
--- head/lib/libc/sys/utrace.2	Mon Jan 18 19:52:20 2016	(r294289)
+++ head/lib/libc/sys/utrace.2	Mon Jan 18 20:21:38 2016	(r294290)
@@ -70,8 +70,8 @@ support
 .Sh SEE ALSO
 .Xr kdump 1 ,
 .Xr ktrace 1 ,
-.Xr ktrace 2 ,
 .Xr truss 1 ,
+.Xr ktrace 2 ,
 .Xr sysdecode_utrace 3
 .Sh HISTORY
 The

Modified: head/share/man/man7/tuning.7
==============================================================================
--- head/share/man/man7/tuning.7	Mon Jan 18 19:52:20 2016	(r294289)
+++ head/share/man/man7/tuning.7	Mon Jan 18 20:21:38 2016	(r294290)
@@ -756,8 +756,8 @@ over services you export from your box (
 .Xr ccdconfig 8 ,
 .Xr config 8 ,
 .Xr fsck 8 ,
-.Xr gpart 8 ,
 .Xr gjournal 8 ,
+.Xr gpart 8 ,
 .Xr gstripe 8 ,
 .Xr gvinum 8 ,
 .Xr ifconfig 8 ,

Modified: head/usr.bin/iscsictl/iscsictl.8
==============================================================================
--- head/usr.bin/iscsictl/iscsictl.8	Mon Jan 18 19:52:20 2016	(r294289)
+++ head/usr.bin/iscsictl/iscsictl.8	Mon Jan 18 20:21:38 2016	(r294290)
@@ -187,11 +187,11 @@ Attach to target iqn.2012-06.com.example
 Disconnect all iSCSI sessions:
 .Dl Nm Fl Ra
 .Sh SEE ALSO
+.Xr libxo 3 ,
+.Xr xo_parse_args 3 ,
 .Xr iscsi 4 ,
 .Xr iscsi.conf 5 ,
-.Xr iscsid 8 ,
-.Xr libxo 3 ,
-.Xr xo_parse_args 3
+.Xr iscsid 8
 .Sh HISTORY
 The
 .Nm

Modified: head/usr.sbin/jls/jls.8
==============================================================================
--- head/usr.sbin/jls/jls.8	Mon Jan 18 19:52:20 2016	(r294289)
+++ head/usr.sbin/jls/jls.8	Mon Jan 18 20:21:38 2016	(r294290)
@@ -113,10 +113,10 @@ Without this option, all active jails wi
 .El
 .Sh SEE ALSO
 .Xr jail_get 2 ,
-.Xr jail 8 ,
-.Xr jexec 8 ,
 .Xr libxo 3 ,
-.Xr xo_parse_args 3
+.Xr xo_parse_args 3 ,
+.Xr jail 8 ,
+.Xr jexec 8
 .Sh HISTORY
 The
 .Nm

From owner-svn-src-all@freebsd.org  Mon Jan 18 20:22:52 2016
Return-Path: <owner-svn-src-all@freebsd.org>
Delivered-To: svn-src-all@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7BAC9A865AD;
 Mon, 18 Jan 2016 20:22:52 +0000 (UTC)
 (envelope-from andrew@FreeBSD.org)
Received: from repo.freebsd.org (repo.freebsd.org
 [IPv6:2610:1c1:1:6068::e6a:0])
 (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
 (Client did not present a certificate)
 by mx1.freebsd.org (Postfix) with ESMTPS id 4DEC51806;
 Mon, 18 Jan 2016 20:22:52 +0000 (UTC)
 (envelope-from andrew@FreeBSD.org)
Received: from repo.freebsd.org ([127.0.1.37])
 by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u0IKMpYS092304;
 Mon, 18 Jan 2016 20:22:51 GMT (envelope-from andrew@FreeBSD.org)
Received: (from andrew@localhost)
 by repo.freebsd.org (8.15.2/8.15.2/Submit) id u0IKMpVx092303;
 Mon, 18 Jan 2016 20:22:51 GMT (envelope-from andrew@FreeBSD.org)
Message-Id: <201601182022.u0IKMpVx092303@repo.freebsd.org>
X-Authentication-Warning: repo.freebsd.org: andrew set sender to
 andrew@FreeBSD.org using -f
From: Andrew Turner <andrew@FreeBSD.org>
Date: Mon, 18 Jan 2016 20:22:51 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-head@freebsd.org
Subject: svn commit: r294291 - head/sys/boot/efi/boot1
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.20
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for &quot;
 user&quot; and &quot; projects&quot; \)" <svn-src-all.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-all/>
List-Post: <mailto:svn-src-all@freebsd.org>
List-Help: <mailto:svn-src-all-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Mon, 18 Jan 2016 20:22:52 -0000

Author: andrew
Date: Mon Jan 18 20:22:51 2016
New Revision: 294291
URL: https://svnweb.freebsd.org/changeset/base/294291

Log:
  Reset the filesystem cache before reading from a potentially new
  filesystem. Without this we only read from the first UFS filesystem we
  find, caching the result.
  
  X-MFC with:	The recent boot1.efi changes

Modified:
  head/sys/boot/efi/boot1/ufs_module.c

Modified: head/sys/boot/efi/boot1/ufs_module.c
==============================================================================
--- head/sys/boot/efi/boot1/ufs_module.c	Mon Jan 18 20:21:38 2016	(r294290)
+++ head/sys/boot/efi/boot1/ufs_module.c	Mon Jan 18 20:22:51 2016	(r294291)
@@ -171,6 +171,7 @@ try_load(dev_info_t *dev, const char *lo
 	ssize_t read;
 	void *buf;
 
+	dsk_meta = 0;
 	devinfo = dev;
 	if ((ino = lookup(loader_path)) == 0)
 		return (EFI_NOT_FOUND);

From owner-svn-src-all@freebsd.org  Mon Jan 18 20:44:30 2016
Return-Path: <owner-svn-src-all@freebsd.org>
Delivered-To: svn-src-all@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id ABEAAA86F38;
 Mon, 18 Jan 2016 20:44:30 +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 7DDF01504;
 Mon, 18 Jan 2016 20:44:30 +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 u0IKiTdc098387;
 Mon, 18 Jan 2016 20:44:29 GMT (envelope-from jhb@FreeBSD.org)
Received: (from jhb@localhost)
 by repo.freebsd.org (8.15.2/8.15.2/Submit) id u0IKiTTr098386;
 Mon, 18 Jan 2016 20:44:29 GMT (envelope-from jhb@FreeBSD.org)
Message-Id: <201601182044.u0IKiTTr098386@repo.freebsd.org>
X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org
 using -f
From: John Baldwin <jhb@FreeBSD.org>
Date: Mon, 18 Jan 2016 20:44:29 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org
Subject: svn commit: r294292 - stable/10/sys/dev/drm2/i915
X-SVN-Group: stable-10
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.20
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for &quot;
 user&quot; and &quot; projects&quot; \)" <svn-src-all.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-all/>
List-Post: <mailto:svn-src-all@freebsd.org>
List-Help: <mailto:svn-src-all-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Mon, 18 Jan 2016 20:44:30 -0000

Author: jhb
Date: Mon Jan 18 20:44:29 2016
New Revision: 294292
URL: https://svnweb.freebsd.org/changeset/base/294292

Log:
  MFC 292409:
  It seems certain Intel GPUs use GPIO bitbanging over a child device
  instead of GMBUS access for I2C transfers.  The GMBUS driver falls back
  to this mode when a transfer times out.  However, the first transfer to
  timeout was sending the request back to itself resulting in an panic due
  to recursing on a lock.  Fix it to forward the request on to the proper
  device.  This appears to have been accidentally changed in r277487.

Modified:
  stable/10/sys/dev/drm2/i915/intel_iic.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/sys/dev/drm2/i915/intel_iic.c
==============================================================================
--- stable/10/sys/dev/drm2/i915/intel_iic.c	Mon Jan 18 20:22:51 2016	(r294291)
+++ stable/10/sys/dev/drm2/i915/intel_iic.c	Mon Jan 18 20:44:29 2016	(r294292)
@@ -467,8 +467,7 @@ timeout:
 	 * Try GPIO bitbanging instead.
 	 */
 	sc->force_bit_dev = true;
-	error = -IICBUS_TRANSFER(idev, msgs, nmsgs);
-	goto out;
+	error = -IICBUS_TRANSFER(dev_priv->bbbus[unit], msgs, nmsgs);
 
 out:
 	sx_xunlock(&dev_priv->gmbus_sx);

From owner-svn-src-all@freebsd.org  Mon Jan 18 20:47:05 2016
Return-Path: <owner-svn-src-all@freebsd.org>
Delivered-To: svn-src-all@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id AD640A87025;
 Mon, 18 Jan 2016 20:47:05 +0000 (UTC)
 (envelope-from bapt@FreeBSD.org)
Received: from repo.freebsd.org (repo.freebsd.org
 [IPv6:2610:1c1:1:6068::e6a:0])
 (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
 (Client did not present a certificate)
 by mx1.freebsd.org (Postfix) with ESMTPS id 65F1517A2;
 Mon, 18 Jan 2016 20:47:05 +0000 (UTC)
 (envelope-from bapt@FreeBSD.org)
Received: from repo.freebsd.org ([127.0.1.37])
 by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u0IKl4UZ098516;
 Mon, 18 Jan 2016 20:47:04 GMT (envelope-from bapt@FreeBSD.org)
Received: (from bapt@localhost)
 by repo.freebsd.org (8.15.2/8.15.2/Submit) id u0IKl4Qi098515;
 Mon, 18 Jan 2016 20:47:04 GMT (envelope-from bapt@FreeBSD.org)
Message-Id: <201601182047.u0IKl4Qi098515@repo.freebsd.org>
X-Authentication-Warning: repo.freebsd.org: bapt set sender to
 bapt@FreeBSD.org using -f
From: Baptiste Daroussin <bapt@FreeBSD.org>
Date: Mon, 18 Jan 2016 20:47:04 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-head@freebsd.org
Subject: svn commit: r294293 - head/usr.bin/finger
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.20
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for &quot;
 user&quot; and &quot; projects&quot; \)" <svn-src-all.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-all/>
List-Post: <mailto:svn-src-all@freebsd.org>
List-Help: <mailto:svn-src-all-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Mon, 18 Jan 2016 20:47:05 -0000

Author: bapt
Date: Mon Jan 18 20:47:04 2016
New Revision: 294293
URL: https://svnweb.freebsd.org/changeset/base/294293

Log:
  Fix printing multibyte printing when performing a networked finger(1) request
  
  MFC after:	1 week

Modified:
  head/usr.bin/finger/net.c

Modified: head/usr.bin/finger/net.c
==============================================================================
--- head/usr.bin/finger/net.c	Mon Jan 18 20:44:29 2016	(r294292)
+++ head/usr.bin/finger/net.c	Mon Jan 18 20:47:04 2016	(r294293)
@@ -42,7 +42,7 @@ __FBSDID("$FreeBSD$");
 #include <sys/param.h>
 #include <sys/socket.h>
 #include <sys/uio.h>
-#include <ctype.h>
+#include <wctype.h>
 #include <db.h>
 #include <err.h>
 #include <netdb.h>
@@ -52,6 +52,7 @@ __FBSDID("$FreeBSD$");
 #include <string.h>
 #include <unistd.h>
 #include <utmpx.h>
+#include <wchar.h>
 #include "finger.h"
 
 static void cleanup(int sig);
@@ -108,7 +109,7 @@ do_protocol(const char *name, const stru
 {
 	int cnt, line_len, s;
 	FILE *fp;
-	int c, lastc;
+	wint_t c, lastc;
 	struct iovec iov[3];
 	struct msghdr msg;
 	static char slash_w[] = "/W ";
@@ -168,7 +169,7 @@ do_protocol(const char *name, const stru
 	if ((fp = fdopen(s, "r")) != NULL) {
 		cnt = 0;
 		line_len = 0;
-		while ((c = getc(fp)) != EOF) {
+		while ((c = getwc(fp)) != EOF) {
 			if (++cnt > OUTPUT_MAX) {
 				printf("\n\n Output truncated at %d bytes...\n",
 					cnt - 1);
@@ -180,7 +181,7 @@ do_protocol(const char *name, const stru
 				c = '\n';
 				lastc = '\r';
 			} else {
-				if (!isprint(c) && !isspace(c)) {
+				if (!iswprint(c) && !iswspace(c)) {
 					c &= 0x7f;
 					c |= 0x40;
 				}
@@ -191,7 +192,7 @@ do_protocol(const char *name, const stru
 					continue;
 				}
 			}
-			putchar(c);
+			putwchar(c);
 			if (c != '\n' && ++line_len > _POSIX2_LINE_MAX) {
 				putchar('\\');
 				putchar('\n');
@@ -206,7 +207,7 @@ do_protocol(const char *name, const stru
 			 */
 			warn("reading from network");
 		}
-		if (lastc != '\n')
+		if (lastc != L'\n')
 			putchar('\n');
 
 		fclose(fp);

From owner-svn-src-all@freebsd.org  Mon Jan 18 20:49:58 2016
Return-Path: <owner-svn-src-all@freebsd.org>
Delivered-To: svn-src-all@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id A08A1A8716D;
 Mon, 18 Jan 2016 20:49:58 +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 7C24019A9;
 Mon, 18 Jan 2016 20:49:58 +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 2D15CB946;
 Mon, 18 Jan 2016 15:49:56 -0500 (EST)
From: John Baldwin <jhb@freebsd.org>
To: Nathan Whitehorn <nwhitehorn@freebsd.org>
Cc: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-head@freebsd.org
Subject: Re: svn commit: r279189 - in head/sys/powerpc: aim fpu include powerpc
Date: Mon, 18 Jan 2016 12:49:48 -0800
Message-ID: <11668266.h2pHzfGYxF@ralph.baldwin.cx>
User-Agent: KMail/4.14.3 (FreeBSD/10.2-STABLE; KDE/4.14.3; amd64; ; )
In-Reply-To: <201502222140.t1MLeSFg075690@svn.freebsd.org>
References: <201502222140.t1MLeSFg075690@svn.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); Mon, 18 Jan 2016 15:49:56 -0500 (EST)
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.20
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for &quot;
 user&quot; and &quot; projects&quot; \)" <svn-src-all.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-all/>
List-Post: <mailto:svn-src-all@freebsd.org>
List-Help: <mailto:svn-src-all-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Mon, 18 Jan 2016 20:49:58 -0000

On Sunday, February 22, 2015 09:40:28 PM Nathan Whitehorn wrote:
> Author: nwhitehorn
> Date: Sun Feb 22 21:40:27 2015
> New Revision: 279189
> URL: https://svnweb.freebsd.org/changeset/base/279189
> 
> Log:
>   Kernel support for the Vector-Scalar eXtension (VSX) found on the POWER7
>   and POWER8. This instruction set unifies the 32 64-bit scalar floating
>   point registers with the 32 128-bit vector registers into a single bank
>   of 64 128-bit registers. Kernel support mostly amounts to saving and
>   restoring the wider version of the floating point registers and making
>   sure that both scalar FP and vector registers are enabled once a VSX
>   instruction is executed. get_mcontext() and friends currently cannot
>   see the high bits, which will require a little more work.
>   
>   As the system compiler (GCC 4.2) does not support VSX, making use of this
>   from userland requires either newer GCC or clang.
>   
>   Relnotes:	yes
>   Sponsored by:	FreeBSD Foundation
> 
> Modified:
>   head/sys/powerpc/aim/trap.c
>   head/sys/powerpc/aim/trap_subr64.S
>   head/sys/powerpc/fpu/fpu_emu.c
>   head/sys/powerpc/fpu/fpu_explode.c
>   head/sys/powerpc/include/cpu.h
>   head/sys/powerpc/include/pcb.h
>   head/sys/powerpc/include/psl.h
>   head/sys/powerpc/include/reg.h
>   head/sys/powerpc/include/trap.h
>   head/sys/powerpc/powerpc/cpu.c
>   head/sys/powerpc/powerpc/db_trace.c
>   head/sys/powerpc/powerpc/exec_machdep.c
>   head/sys/powerpc/powerpc/fpu.c
> 
> Modified: head/sys/powerpc/include/reg.h
> ==============================================================================
> --- head/sys/powerpc/include/reg.h	Sun Feb 22 21:32:57 2015	(r279188)
> +++ head/sys/powerpc/include/reg.h	Sun Feb 22 21:40:27 2015	(r279189)
> @@ -20,7 +20,10 @@ struct reg {
>  
>  /* Must match pcb.pcb_fpu */
>  struct fpreg {
> -	double fpreg[32];
> +	union {
> +		double fpr;
> +		uint64_t vsr[2];
> +	} fpreg[32];
>  	double fpscr;
>  };

This breaks the ABI of struct fpreg which changes the format of coredumps.
It also breaks the ABI of older versions of programs (such as debuggers) that
use ptrace(PT_GETFPREGS) (the kernel will now overflow the user-allocated
buffer if a debugger built on 10.x is run under an 11.0 kernel, and
PT_SETFPREGS is going to also buffer overflow and store random garbage in the
FP regs).  Did you mean to alter the structure's layout?

I can maybe fix upstream gdb to cope with either size, but it's a bit of a
PITA.  In particular, gdb assumes that all the floating point registers in
struct fpreg are in a packed array (so it can use starting_offset + 8 * n to
extract register 'n' and only the initial offset is something that different
platform targets have to configure), so fixing this means having to add a lot
of special cases and duplicate code that is otherwise shared across
platforms.

Hmm, I see that you preserved the ABI of mcontext by just copying the
doubles.  I think you should do the same for 'struct fpreg' restoring its
ABI and we can use MD ptrace requests to fetch the VSX state.  This is what
Linux effectively does.

-- 
John Baldwin

From owner-svn-src-all@freebsd.org  Mon Jan 18 21:24:30 2016
Return-Path: <owner-svn-src-all@freebsd.org>
Delivered-To: svn-src-all@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0A03CA87F38;
 Mon, 18 Jan 2016 21:24:30 +0000 (UTC) (envelope-from gnn@FreeBSD.org)
Received: from repo.freebsd.org (repo.freebsd.org
 [IPv6:2610:1c1:1:6068::e6a:0])
 (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
 (Client did not present a certificate)
 by mx1.freebsd.org (Postfix) with ESMTPS id D69F410E8;
 Mon, 18 Jan 2016 21:24:29 +0000 (UTC) (envelope-from gnn@FreeBSD.org)
Received: from repo.freebsd.org ([127.0.1.37])
 by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u0ILOSjL010326;
 Mon, 18 Jan 2016 21:24:28 GMT (envelope-from gnn@FreeBSD.org)
Received: (from gnn@localhost)
 by repo.freebsd.org (8.15.2/8.15.2/Submit) id u0ILOSIN010325;
 Mon, 18 Jan 2016 21:24:28 GMT (envelope-from gnn@FreeBSD.org)
Message-Id: <201601182124.u0ILOSIN010325@repo.freebsd.org>
X-Authentication-Warning: repo.freebsd.org: gnn set sender to gnn@FreeBSD.org
 using -f
From: "George V. Neville-Neil" <gnn@FreeBSD.org>
Date: Mon, 18 Jan 2016 21:24:28 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org
Subject: svn commit: r294294 - stable/10/usr.sbin/bhyve
X-SVN-Group: stable-10
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.20
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for &quot;
 user&quot; and &quot; projects&quot; \)" <svn-src-all.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-all/>
List-Post: <mailto:svn-src-all@freebsd.org>
List-Help: <mailto:svn-src-all-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Mon, 18 Jan 2016 21:24:30 -0000

Author: gnn
Date: Mon Jan 18 21:24:28 2016
New Revision: 294294
URL: https://svnweb.freebsd.org/changeset/base/294294

Log:
  MFC: 293459,293643
  
  Add netmap support for bhyve

Modified:
  stable/10/usr.sbin/bhyve/pci_virtio_net.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/usr.sbin/bhyve/pci_virtio_net.c
==============================================================================
--- stable/10/usr.sbin/bhyve/pci_virtio_net.c	Mon Jan 18 20:47:04 2016	(r294293)
+++ stable/10/usr.sbin/bhyve/pci_virtio_net.c	Mon Jan 18 21:24:28 2016	(r294294)
@@ -36,6 +36,10 @@ __FBSDID("$FreeBSD$");
 #include <sys/ioctl.h>
 #include <machine/atomic.h>
 #include <net/ethernet.h>
+#ifndef NETMAP_WITH_LIBS
+#define NETMAP_WITH_LIBS
+#endif
+#include <net/netmap_user.h>
 
 #include <errno.h>
 #include <fcntl.h>
@@ -133,6 +137,8 @@ struct pci_vtnet_softc {
 	struct mevent	*vsc_mevp;
 
 	int		vsc_tapfd;
+	struct nm_desc	*vsc_nmd;
+
 	int		vsc_rx_ready;
 	volatile int	resetting;	/* set and checked outside lock */
 
@@ -149,6 +155,10 @@ struct pci_vtnet_softc {
 	pthread_mutex_t	tx_mtx;
 	pthread_cond_t	tx_cond;
 	int		tx_in_progress;
+
+	void (*pci_vtnet_rx)(struct pci_vtnet_softc *sc);
+	void (*pci_vtnet_tx)(struct pci_vtnet_softc *sc, struct iovec *iov,
+			     int iovcnt, int len);
 };
 
 static void pci_vtnet_reset(void *);
@@ -371,14 +381,208 @@ pci_vtnet_tap_rx(struct pci_vtnet_softc 
 	vq_endchains(vq, 1);
 }
 
+static int
+pci_vtnet_netmap_writev(struct nm_desc *nmd, struct iovec *iov, int iovcnt)
+{
+	int r, i;
+	int len = 0;
+
+	for (r = nmd->cur_tx_ring; ; ) {
+		struct netmap_ring *ring = NETMAP_TXRING(nmd->nifp, r);
+		uint32_t cur, idx;
+		char *buf;
+
+		if (nm_ring_empty(ring)) {
+			r++;
+			if (r > nmd->last_tx_ring)
+				r = nmd->first_tx_ring;
+			if (r == nmd->cur_rx_ring)
+				break;
+			continue;
+		}
+		cur = ring->cur;
+		idx = ring->slot[cur].buf_idx;
+		buf = NETMAP_BUF(ring, idx);
+
+		for (i = 0; i < iovcnt; i++) {
+			memcpy(&buf[len], iov[i].iov_base, iov[i].iov_len);
+			len += iov[i].iov_len;
+		}
+		ring->slot[cur].len = len;
+		ring->head = ring->cur = nm_ring_next(ring, cur);
+		nmd->cur_tx_ring = r;
+		ioctl(nmd->fd, NIOCTXSYNC, NULL);
+		break;
+	}
+
+	return (len);
+}
+
+static inline int
+pci_vtnet_netmap_readv(struct nm_desc *nmd, struct iovec *iov, int iovcnt)
+{
+	int len = 0;
+	int i = 0;
+	int r;
+
+	for (r = nmd->cur_rx_ring; ; ) {
+		struct netmap_ring *ring = NETMAP_RXRING(nmd->nifp, r);
+		uint32_t cur, idx;
+		char *buf;
+		size_t left;
+
+		if (nm_ring_empty(ring)) {
+			r++;
+			if (r > nmd->last_rx_ring)
+				r = nmd->first_rx_ring;
+			if (r == nmd->cur_rx_ring)
+				break;
+			continue;
+		}
+		cur = ring->cur;
+		idx = ring->slot[cur].buf_idx;
+		buf = NETMAP_BUF(ring, idx);
+		left = ring->slot[cur].len;
+
+		for (i = 0; i < iovcnt && left > 0; i++) {
+			if (iov[i].iov_len > left)
+				iov[i].iov_len = left;
+			memcpy(iov[i].iov_base, &buf[len], iov[i].iov_len);
+			len += iov[i].iov_len;
+			left -= iov[i].iov_len;
+		}
+		ring->head = ring->cur = nm_ring_next(ring, cur);
+		nmd->cur_rx_ring = r;
+		ioctl(nmd->fd, NIOCRXSYNC, NULL);
+		break;
+	}
+	for (; i < iovcnt; i++)
+		iov[i].iov_len = 0;
+
+	return (len);
+}
+
+/*
+ * Called to send a buffer chain out to the vale port
+ */
+static void
+pci_vtnet_netmap_tx(struct pci_vtnet_softc *sc, struct iovec *iov, int iovcnt,
+		    int len)
+{
+	static char pad[60]; /* all zero bytes */
+
+	if (sc->vsc_nmd == NULL)
+		return;
+
+	/*
+	 * If the length is < 60, pad out to that and add the
+	 * extra zero'd segment to the iov. It is guaranteed that
+	 * there is always an extra iov available by the caller.
+	 */
+	if (len < 60) {
+		iov[iovcnt].iov_base = pad;
+		iov[iovcnt].iov_len = 60 - len;
+		iovcnt++;
+	}
+	(void) pci_vtnet_netmap_writev(sc->vsc_nmd, iov, iovcnt);
+}
+
+static void
+pci_vtnet_netmap_rx(struct pci_vtnet_softc *sc)
+{
+	struct iovec iov[VTNET_MAXSEGS], *riov;
+	struct vqueue_info *vq;
+	void *vrx;
+	int len, n;
+	uint16_t idx;
+
+	/*
+	 * Should never be called without a valid netmap descriptor
+	 */
+	assert(sc->vsc_nmd != NULL);
+
+	/*
+	 * But, will be called when the rx ring hasn't yet
+	 * been set up or the guest is resetting the device.
+	 */
+	if (!sc->vsc_rx_ready || sc->resetting) {
+		/*
+		 * Drop the packet and try later.
+		 */
+		(void) nm_nextpkt(sc->vsc_nmd, (void *)dummybuf);
+		return;
+	}
+
+	/*
+	 * Check for available rx buffers
+	 */
+	vq = &sc->vsc_queues[VTNET_RXQ];
+	if (!vq_has_descs(vq)) {
+		/*
+		 * Drop the packet and try later.  Interrupt on
+		 * empty, if that's negotiated.
+		 */
+		(void) nm_nextpkt(sc->vsc_nmd, (void *)dummybuf);
+		vq_endchains(vq, 1);
+		return;
+	}
+
+	do {
+		/*
+		 * Get descriptor chain.
+		 */
+		n = vq_getchain(vq, &idx, iov, VTNET_MAXSEGS, NULL);
+		assert(n >= 1 && n <= VTNET_MAXSEGS);
+
+		/*
+		 * Get a pointer to the rx header, and use the
+		 * data immediately following it for the packet buffer.
+		 */
+		vrx = iov[0].iov_base;
+		riov = rx_iov_trim(iov, &n, sc->rx_vhdrlen);
+
+		len = pci_vtnet_netmap_readv(sc->vsc_nmd, riov, n);
+
+		if (len == 0) {
+			/*
+			 * No more packets, but still some avail ring
+			 * entries.  Interrupt if needed/appropriate.
+			 */
+			vq_endchains(vq, 0);
+			return;
+		}
+
+		/*
+		 * The only valid field in the rx packet header is the
+		 * number of buffers if merged rx bufs were negotiated.
+		 */
+		memset(vrx, 0, sc->rx_vhdrlen);
+
+		if (sc->rx_merge) {
+			struct virtio_net_rxhdr *vrxh;
+
+			vrxh = vrx;
+			vrxh->vrh_bufs = 1;
+		}
+
+		/*
+		 * Release this chain and handle more chains.
+		 */
+		vq_relchain(vq, idx, len + sc->rx_vhdrlen);
+	} while (vq_has_descs(vq));
+
+	/* Interrupt if needed, including for NOTIFY_ON_EMPTY. */
+	vq_endchains(vq, 1);
+}
+
 static void
-pci_vtnet_tap_callback(int fd, enum ev_type type, void *param)
+pci_vtnet_rx_callback(int fd, enum ev_type type, void *param)
 {
 	struct pci_vtnet_softc *sc = param;
 
 	pthread_mutex_lock(&sc->rx_mtx);
 	sc->rx_in_progress = 1;
-	pci_vtnet_tap_rx(sc);
+	sc->pci_vtnet_rx(sc);
 	sc->rx_in_progress = 0;
 	pthread_mutex_unlock(&sc->rx_mtx);
 
@@ -421,7 +625,7 @@ pci_vtnet_proctx(struct pci_vtnet_softc 
 	}
 
 	DPRINTF(("virtio: packet send, %d bytes, %d segs\n\r", plen, n));
-	pci_vtnet_tap_tx(sc, &iov[1], n - 1, plen);
+	sc->pci_vtnet_tx(sc, &iov[1], n - 1, plen);
 
 	/* chain is processed, release it and set tlen */
 	vq_relchain(vq, idx, tlen);
@@ -532,6 +736,67 @@ pci_vtnet_parsemac(char *mac_str, uint8_
         return (0);
 }
 
+static void
+pci_vtnet_tap_setup(struct pci_vtnet_softc *sc, char *devname)
+{
+	char tbuf[80];
+
+	strcpy(tbuf, "/dev/");
+	strlcat(tbuf, devname, sizeof(tbuf));
+
+	sc->pci_vtnet_rx = pci_vtnet_tap_rx;
+	sc->pci_vtnet_tx = pci_vtnet_tap_tx;
+
+	sc->vsc_tapfd = open(tbuf, O_RDWR);
+	if (sc->vsc_tapfd == -1) {
+		WPRINTF(("open of tap device %s failed\n", tbuf));
+		return;
+	}
+
+	/*
+	 * Set non-blocking and register for read
+	 * notifications with the event loop
+	 */
+	int opt = 1;
+	if (ioctl(sc->vsc_tapfd, FIONBIO, &opt) < 0) {
+		WPRINTF(("tap device O_NONBLOCK failed\n"));
+		close(sc->vsc_tapfd);
+		sc->vsc_tapfd = -1;
+	}
+
+	sc->vsc_mevp = mevent_add(sc->vsc_tapfd,
+				  EVF_READ,
+				  pci_vtnet_rx_callback,
+				  sc);
+	if (sc->vsc_mevp == NULL) {
+		WPRINTF(("Could not register event\n"));
+		close(sc->vsc_tapfd);
+		sc->vsc_tapfd = -1;
+	}
+}
+
+static void
+pci_vtnet_netmap_setup(struct pci_vtnet_softc *sc, char *ifname)
+{
+	sc->pci_vtnet_rx = pci_vtnet_netmap_rx;
+	sc->pci_vtnet_tx = pci_vtnet_netmap_tx;
+
+	sc->vsc_nmd = nm_open(ifname, NULL, 0, 0);
+	if (sc->vsc_nmd == NULL) {
+		WPRINTF(("open of netmap device %s failed\n", ifname));
+		return;
+	}
+
+	sc->vsc_mevp = mevent_add(sc->vsc_nmd->fd,
+				  EVF_READ,
+				  pci_vtnet_rx_callback,
+				  sc);
+	if (sc->vsc_mevp == NULL) {
+		WPRINTF(("Could not register event\n"));
+		nm_close(sc->vsc_nmd);
+		sc->vsc_nmd = NULL;
+	}
+}
 
 static int
 pci_vtnet_init(struct vmctx *ctx, struct pci_devinst *pi, char *opts)
@@ -567,8 +832,8 @@ pci_vtnet_init(struct vmctx *ctx, struct
 	 */
 	mac_provided = 0;
 	sc->vsc_tapfd = -1;
+	sc->vsc_nmd = NULL;
 	if (opts != NULL) {
-		char tbuf[80];
 		int err;
 
 		devname = vtopts = strdup(opts);
@@ -583,36 +848,13 @@ pci_vtnet_init(struct vmctx *ctx, struct
 			mac_provided = 1;
 		}
 
-		strcpy(tbuf, "/dev/");
-		strlcat(tbuf, devname, sizeof(tbuf));
+		if (strncmp(devname, "vale", 4) == 0)
+			pci_vtnet_netmap_setup(sc, devname);
+		if ((strncmp(devname, "tap", 3) == 0) ||
+		    (strncmp(devname, "vmmnet", 5) == 0))
+			pci_vtnet_tap_setup(sc, devname);
 
 		free(devname);
-
-		sc->vsc_tapfd = open(tbuf, O_RDWR);
-		if (sc->vsc_tapfd == -1) {
-			WPRINTF(("open of tap device %s failed\n", tbuf));
-		} else {
-			/*
-			 * Set non-blocking and register for read
-			 * notifications with the event loop
-			 */
-			int opt = 1;
-			if (ioctl(sc->vsc_tapfd, FIONBIO, &opt) < 0) {
-				WPRINTF(("tap device O_NONBLOCK failed\n"));
-				close(sc->vsc_tapfd);
-				sc->vsc_tapfd = -1;
-			}
-
-			sc->vsc_mevp = mevent_add(sc->vsc_tapfd,
-						  EVF_READ,
-						  pci_vtnet_tap_callback,
-						  sc);
-			if (sc->vsc_mevp == NULL) {
-				WPRINTF(("Could not register event\n"));
-				close(sc->vsc_tapfd);
-				sc->vsc_tapfd = -1;
-			}
-		}		
 	}
 
 	/*

From owner-svn-src-all@freebsd.org  Mon Jan 18 21:40:20 2016
Return-Path: <owner-svn-src-all@freebsd.org>
Delivered-To: svn-src-all@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id E3E7BA87390;
 Mon, 18 Jan 2016 21:40:19 +0000 (UTC) (envelope-from imp@FreeBSD.org)
Received: from repo.freebsd.org (repo.freebsd.org
 [IPv6:2610:1c1:1:6068::e6a:0])
 (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
 (Client did not present a certificate)
 by mx1.freebsd.org (Postfix) with ESMTPS id BE35E185B;
 Mon, 18 Jan 2016 21:40:19 +0000 (UTC) (envelope-from imp@FreeBSD.org)
Received: from repo.freebsd.org ([127.0.1.37])
 by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u0ILeIdq013593;
 Mon, 18 Jan 2016 21:40:18 GMT (envelope-from imp@FreeBSD.org)
Received: (from imp@localhost)
 by repo.freebsd.org (8.15.2/8.15.2/Submit) id u0ILeIk7013590;
 Mon, 18 Jan 2016 21:40:18 GMT (envelope-from imp@FreeBSD.org)
Message-Id: <201601182140.u0ILeIk7013590@repo.freebsd.org>
X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org
 using -f
From: Warner Losh <imp@FreeBSD.org>
Date: Mon, 18 Jan 2016 21:40:18 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-head@freebsd.org
Subject: svn commit: r294295 - in head: etc/defaults etc/rc.d sbin/ldconfig
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.20
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for &quot;
 user&quot; and &quot; projects&quot; \)" <svn-src-all.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-all/>
List-Post: <mailto:svn-src-all@freebsd.org>
List-Help: <mailto:svn-src-all-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Mon, 18 Jan 2016 21:40:20 -0000

Author: imp
Date: Mon Jan 18 21:40:18 2016
New Revision: 294295
URL: https://svnweb.freebsd.org/changeset/base/294295

Log:
  Add ldconfig -soft to process the soft float abi libraries and put it
  into startup scripts for armv6. It acts much like ldconfig -32 does.

Modified:
  head/etc/defaults/rc.conf
  head/etc/rc.d/ldconfig   (contents, props changed)
  head/sbin/ldconfig/ldconfig.c

Modified: head/etc/defaults/rc.conf
==============================================================================
--- head/etc/defaults/rc.conf	Mon Jan 18 21:24:28 2016	(r294294)
+++ head/etc/defaults/rc.conf	Mon Jan 18 21:40:18 2016	(r294295)
@@ -619,6 +619,9 @@ ldconfig_paths="/usr/lib/compat /usr/loc
 			# shared library search paths
 ldconfig32_paths="/usr/lib32 /usr/lib32/compat"
 			# 32-bit compatibility shared library search paths
+ldconfigsoft_paths="/usr/libsoft /usr/libsoft/compat /usr/local/libsoft"
+			# soft float compatibility shared library search paths
+			# Note: temporarily with extra stuff for transition
 ldconfig_paths_aout="/usr/lib/compat/aout /usr/local/lib/aout"
 			# a.out shared library search paths
 ldconfig_local_dirs="/usr/local/libdata/ldconfig"
@@ -626,6 +629,9 @@ ldconfig_local_dirs="/usr/local/libdata/
 ldconfig_local32_dirs="/usr/local/libdata/ldconfig32"
 			# Local directories with 32-bit compatibility ldconfig
 			# configuration files.
+ldconfig_localsoft_dirs="/usr/local/libdata/ldconfigsoft"
+			# Local directories with soft float compatibility ldconfig
+			# configuration files.
 kern_securelevel_enable="NO"	# kernel security level (see security(7))
 kern_securelevel="-1"	# range: -1..3 ; `-1' is the most insecure
 			# Note that setting securelevel to 0 will result

Modified: head/etc/rc.d/ldconfig
==============================================================================
--- head/etc/rc.d/ldconfig	Mon Jan 18 21:24:28 2016	(r294294)
+++ head/etc/rc.d/ldconfig	Mon Jan 18 21:40:18 2016	(r294295)
@@ -61,6 +61,28 @@ ldconfig_start()
 			;;
 		esac
 
+		case `sysctl -n hw.machine_arch` in
+		armv6)
+			for i in ${ldconfig_localsoft_dirs}; do
+				if [ -d "${i}" ]; then
+					_files=`find ${i} -type f`
+					if [ -n "${_files}" ]; then
+						ldconfigsoft_paths="${ldconfigsoft_paths} `cat ${_files} | sort -u`"
+					fi
+				fi
+			done
+			_LDC=""
+			for i in ${ldconfigsoft_paths}; do
+				if [ -r "${i}" ]; then
+					_LDC="${_LDC} ${i}"
+				fi
+			done
+			check_startmsgs &&
+			    echo 'Soft Float compatibility ldconfig path:' ${_LDC}
+			${ldconfig} -soft -m ${_ins} ${_LDC}
+			;;
+		esac
+
 		# Legacy aout support for i386 only
 		case `sysctl -n hw.machine_arch` in
 		i386)

Modified: head/sbin/ldconfig/ldconfig.c
==============================================================================
--- head/sbin/ldconfig/ldconfig.c	Mon Jan 18 21:24:28 2016	(r294294)
+++ head/sbin/ldconfig/ldconfig.c	Mon Jan 18 21:40:18 2016	(r294295)
@@ -64,6 +64,7 @@ static const char rcsid[] =
 
 #define	_PATH_LD32_HINTS	"/var/run/ld32.so.hints"
 #define	_PATH_ELF32_HINTS	"/var/run/ld-elf32.so.hints"
+#define	_PATH_ELFSOFT_HINTS	"/var/run/ld-elf-soft.so.hints"
 
 #undef major
 #undef minor
@@ -111,6 +112,7 @@ main(int argc, char **argv)
 	int		rval = 0;
 	int		is_aout = 0;
 	int		is_32 = 0;
+	int		is_soft = 0;
 
 	while (argc > 1) {
 		if (strcmp(argv[1], "-aout") == 0) {
@@ -125,12 +127,18 @@ main(int argc, char **argv)
 			is_32 = 1;
 			argc--;
 			argv++;
+		} else if (strcmp(argv[1], "-soft") == 0) {
+			is_soft = 1;
+			argc--;
+			argv++;
 		} else {
 			break;
 		}
 	}
 
-	if (is_32)
+	if (is_soft)
+		hints_file = _PATH_ELFSOFT_HINTS;	/* Never will have a.out softfloat */
+	else if (is_32)
 		hints_file = is_aout ? _PATH_LD32_HINTS : _PATH_ELF32_HINTS;
 	else
 		hints_file = is_aout ? _PATH_LD_HINTS : _PATH_ELF_HINTS;

From owner-svn-src-all@freebsd.org  Mon Jan 18 21:40:21 2016
Return-Path: <owner-svn-src-all@freebsd.org>
Delivered-To: svn-src-all@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id C0F71A87394;
 Mon, 18 Jan 2016 21:40:21 +0000 (UTC) (envelope-from imp@FreeBSD.org)
Received: from repo.freebsd.org (repo.freebsd.org
 [IPv6:2610:1c1:1:6068::e6a:0])
 (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
 (Client did not present a certificate)
 by mx1.freebsd.org (Postfix) with ESMTPS id 81616185C;
 Mon, 18 Jan 2016 21:40:21 +0000 (UTC) (envelope-from imp@FreeBSD.org)
Received: from repo.freebsd.org ([127.0.1.37])
 by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u0ILeKQX013638;
 Mon, 18 Jan 2016 21:40:20 GMT (envelope-from imp@FreeBSD.org)
Received: (from imp@localhost)
 by repo.freebsd.org (8.15.2/8.15.2/Submit) id u0ILeKMw013635;
 Mon, 18 Jan 2016 21:40:20 GMT (envelope-from imp@FreeBSD.org)
Message-Id: <201601182140.u0ILeKMw013635@repo.freebsd.org>
X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org
 using -f
From: Warner Losh <imp@FreeBSD.org>
Date: Mon, 18 Jan 2016 21:40:20 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-head@freebsd.org
Subject: svn commit: r294296 - in head/libexec/rtld-elf: . arm
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.20
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for &quot;
 user&quot; and &quot; projects&quot; \)" <svn-src-all.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-all/>
List-Post: <mailto:svn-src-all@freebsd.org>
List-Help: <mailto:svn-src-all-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Mon, 18 Jan 2016 21:40:21 -0000

Author: imp
Date: Mon Jan 18 21:40:20 2016
New Revision: 294296
URL: https://svnweb.freebsd.org/changeset/base/294296

Log:
  Restore ABI variants now that ldconfig groks -soft. In addition, as a
  transition mechanism, if we don't have /usr/libsoft, assume that soft
  float ABI binaries are the default, so treat them as default binaries.
  When we've fully transitioned, it will make no sense to do this stat,
  and it will be removed.

Modified:
  head/libexec/rtld-elf/arm/reloc.c
  head/libexec/rtld-elf/paths.h
  head/libexec/rtld-elf/rtld.c

Modified: head/libexec/rtld-elf/arm/reloc.c
==============================================================================
--- head/libexec/rtld-elf/arm/reloc.c	Mon Jan 18 21:40:18 2016	(r294295)
+++ head/libexec/rtld-elf/arm/reloc.c	Mon Jan 18 21:40:20 2016	(r294296)
@@ -3,6 +3,7 @@
 #include <sys/cdefs.h>
 __FBSDID("$FreeBSD$");
 #include <sys/param.h>
+#include <sys/stat.h>
 #include <sys/mman.h>
 
 #include <errno.h>
@@ -21,6 +22,7 @@ void
 arm_abi_variant_hook(Elf_Auxinfo **aux_info)
 {
 	Elf_Word ehdr;
+	struct stat sb;
 
 	/*
 	 * If we're running an old kernel that doesn't provide any data fail
@@ -38,12 +40,19 @@ arm_abi_variant_hook(Elf_Auxinfo **aux_i
 		return;
 
 	/*
+	 * If there's no /usr/libsoft, then we don't have a system with both
+	 * hard and soft float. In that case, hope for the best and just
+	 * return. Such systems are required to have all soft or all hard
+	 * float ABI binaries and libraries. This is, at best, a transition
+	 * compatibility hack. Once we're fully hard-float, this should
+	 * be removed.
+	 */
+	if (stat("/usr/libsoft", &sb) != 0 || !S_ISDIR(sb.st_mode))
+		return;
+
+	/*
 	 * This is a soft float ABI binary. We need to use the soft float
-	 * settings. For the moment, the standard library path includes the hard
-	 * float paths as well. When upgrading, we need to execute the wrong
-	 * kind of binary until we've installed the new binaries. We could go
-	 * off whether or not /libsoft exists, but the simplicity of having it
-	 * in the path wins.
+	 * settings.
 	 */
 	ld_elf_hints_default = _PATH_SOFT_ELF_HINTS;
 	ld_path_libmap_conf = _PATH_SOFT_LIBMAP_CONF;

Modified: head/libexec/rtld-elf/paths.h
==============================================================================
--- head/libexec/rtld-elf/paths.h	Mon Jan 18 21:40:18 2016	(r294295)
+++ head/libexec/rtld-elf/paths.h	Mon Jan 18 21:40:20 2016	(r294296)
@@ -62,7 +62,7 @@
 #define	_PATH_SOFT_ELF_HINTS	"/var/run/ld-elf-soft.so.hints"
 #define	_PATH_SOFT_LIBMAP_CONF	"/etc/libmap-soft.conf"
 #define	_PATH_SOFT_RTLD		"/libexec/ld-elf.so.1"
-#define	SOFT_STANDARD_LIBRARY_PATH "/libsoft:/usr/libsoft:/lib:/usr/lib"
+#define	SOFT_STANDARD_LIBRARY_PATH "/usr/libsoft"
 #define	LD_SOFT_		"LD_SOFT_"
 
 extern char *ld_elf_hints_default;

Modified: head/libexec/rtld-elf/rtld.c
==============================================================================
--- head/libexec/rtld-elf/rtld.c	Mon Jan 18 21:40:18 2016	(r294295)
+++ head/libexec/rtld-elf/rtld.c	Mon Jan 18 21:40:20 2016	(r294296)
@@ -435,7 +435,7 @@ _rtld(Elf_Addr *sp, func_ptr_type *exit_
 
     trust = !issetugid();
 
-/*  md_abi_variant_hook(aux_info); */
+    md_abi_variant_hook(aux_info);
 
     ld_bind_now = getenv(_LD("BIND_NOW"));
     /* 

From owner-svn-src-all@freebsd.org  Mon Jan 18 21:41:12 2016
Return-Path: <owner-svn-src-all@freebsd.org>
Delivered-To: svn-src-all@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id 22EB2A87521;
 Mon, 18 Jan 2016 21:41:12 +0000 (UTC)
 (envelope-from nwhitehorn@freebsd.org)
Received: from d.mail.sonic.net (d.mail.sonic.net [64.142.111.50])
 (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits))
 (Client did not present a certificate)
 by mx1.freebsd.org (Postfix) with ESMTPS id 0DAD11C03;
 Mon, 18 Jan 2016 21:41:11 +0000 (UTC)
 (envelope-from nwhitehorn@freebsd.org)
Received: from comporellon.tachypleus.net (75-101-50-44.static.sonic.net
 [75.101.50.44]) (authenticated bits=0)
 by d.mail.sonic.net (8.15.1/8.15.1) with ESMTPSA id u0ILUVfM006523
 (version=TLSv1.2 cipher=DHE-RSA-AES128-SHA bits=128 verify=NOT);
 Mon, 18 Jan 2016 13:30:33 -0800
Subject: Re: svn commit: r279189 - in head/sys/powerpc: aim fpu include powerpc
To: John Baldwin <jhb@freebsd.org>
References: <201502222140.t1MLeSFg075690@svn.freebsd.org>
 <11668266.h2pHzfGYxF@ralph.baldwin.cx>
Cc: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-head@freebsd.org
From: Nathan Whitehorn <nwhitehorn@freebsd.org>
Message-ID: <569D5977.8050402@freebsd.org>
Date: Mon, 18 Jan 2016 13:30:31 -0800
User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:38.0) Gecko/20100101
 Thunderbird/38.4.0
MIME-Version: 1.0
In-Reply-To: <11668266.h2pHzfGYxF@ralph.baldwin.cx>
Content-Type: text/plain; charset=windows-1252; format=flowed
Content-Transfer-Encoding: 7bit
X-Sonic-CAuth: UmFuZG9tSVaVUmeQGsBeDro9MExB0U+HwZEEBT3EbmbKiCMUp/vo6vQJl2w/aiycxC5RPY2o5WWrwhhd9wfUkR9y/3oTCT0N3oMq3GoiM28=
X-Sonic-ID: C;LAidsyq+5RGPYtlnAoajKQ== M;ajdhtCq+5RGPYtlnAoajKQ==
X-Spam-Flag: No
X-Sonic-Spam-Details: 0.0/5.0 by cerberusd
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.20
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for &quot;
 user&quot; and &quot; projects&quot; \)" <svn-src-all.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-all/>
List-Post: <mailto:svn-src-all@freebsd.org>
List-Help: <mailto:svn-src-all-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Mon, 18 Jan 2016 21:41:12 -0000



On 01/18/16 12:49, John Baldwin wrote:
> On Sunday, February 22, 2015 09:40:28 PM Nathan Whitehorn wrote:
>> Author: nwhitehorn
>> Date: Sun Feb 22 21:40:27 2015
>> New Revision: 279189
>> URL: https://svnweb.freebsd.org/changeset/base/279189
>>
>> Log:
>>    Kernel support for the Vector-Scalar eXtension (VSX) found on the POWER7
>>    and POWER8. This instruction set unifies the 32 64-bit scalar floating
>>    point registers with the 32 128-bit vector registers into a single bank
>>    of 64 128-bit registers. Kernel support mostly amounts to saving and
>>    restoring the wider version of the floating point registers and making
>>    sure that both scalar FP and vector registers are enabled once a VSX
>>    instruction is executed. get_mcontext() and friends currently cannot
>>    see the high bits, which will require a little more work.
>>    
>>    As the system compiler (GCC 4.2) does not support VSX, making use of this
>>    from userland requires either newer GCC or clang.
>>    
>>    Relnotes:	yes
>>    Sponsored by:	FreeBSD Foundation
>>
>> Modified:
>>    head/sys/powerpc/aim/trap.c
>>    head/sys/powerpc/aim/trap_subr64.S
>>    head/sys/powerpc/fpu/fpu_emu.c
>>    head/sys/powerpc/fpu/fpu_explode.c
>>    head/sys/powerpc/include/cpu.h
>>    head/sys/powerpc/include/pcb.h
>>    head/sys/powerpc/include/psl.h
>>    head/sys/powerpc/include/reg.h
>>    head/sys/powerpc/include/trap.h
>>    head/sys/powerpc/powerpc/cpu.c
>>    head/sys/powerpc/powerpc/db_trace.c
>>    head/sys/powerpc/powerpc/exec_machdep.c
>>    head/sys/powerpc/powerpc/fpu.c
>>
>> Modified: head/sys/powerpc/include/reg.h
>> ==============================================================================
>> --- head/sys/powerpc/include/reg.h	Sun Feb 22 21:32:57 2015	(r279188)
>> +++ head/sys/powerpc/include/reg.h	Sun Feb 22 21:40:27 2015	(r279189)
>> @@ -20,7 +20,10 @@ struct reg {
>>   
>>   /* Must match pcb.pcb_fpu */
>>   struct fpreg {
>> -	double fpreg[32];
>> +	union {
>> +		double fpr;
>> +		uint64_t vsr[2];
>> +	} fpreg[32];
>>   	double fpscr;
>>   };
> This breaks the ABI of struct fpreg which changes the format of coredumps.
> It also breaks the ABI of older versions of programs (such as debuggers) that
> use ptrace(PT_GETFPREGS) (the kernel will now overflow the user-allocated
> buffer if a debugger built on 10.x is run under an 11.0 kernel, and
> PT_SETFPREGS is going to also buffer overflow and store random garbage in the
> FP regs).  Did you mean to alter the structure's layout?
>
> I can maybe fix upstream gdb to cope with either size, but it's a bit of a
> PITA.  In particular, gdb assumes that all the floating point registers in
> struct fpreg are in a packed array (so it can use starting_offset + 8 * n to
> extract register 'n' and only the initial offset is something that different
> platform targets have to configure), so fixing this means having to add a lot
> of special cases and duplicate code that is otherwise shared across
> platforms.
>
> Hmm, I see that you preserved the ABI of mcontext by just copying the
> doubles.  I think you should do the same for 'struct fpreg' restoring its
> ABI and we can use MD ptrace requests to fetch the VSX state.  This is what
> Linux effectively does.
>

Drat. I hadn't appreciated that fpreg was part of the public API when I 
wrote this code! It would be easy enough to follow what mcontext does, 
and that seems like the right solution, but I won't have time for a 
couple of weeks at least. If you do have time, I would be happy to 
review and/or polish patches before that.

Thanks for catching this!
-Nathan

From owner-svn-src-all@freebsd.org  Mon Jan 18 21:53:40 2016
Return-Path: <owner-svn-src-all@freebsd.org>
Delivered-To: svn-src-all@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id 62D70A878AE;
 Mon, 18 Jan 2016 21:53:40 +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 355A71352;
 Mon, 18 Jan 2016 21:53:40 +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 u0ILrdmw019311;
 Mon, 18 Jan 2016 21:53:39 GMT (envelope-from emaste@FreeBSD.org)
Received: (from emaste@localhost)
 by repo.freebsd.org (8.15.2/8.15.2/Submit) id u0ILrdxJ019310;
 Mon, 18 Jan 2016 21:53:39 GMT (envelope-from emaste@FreeBSD.org)
Message-Id: <201601182153.u0ILrdxJ019310@repo.freebsd.org>
X-Authentication-Warning: repo.freebsd.org: emaste set sender to
 emaste@FreeBSD.org using -f
From: Ed Maste <emaste@FreeBSD.org>
Date: Mon, 18 Jan 2016 21:53:39 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-head@freebsd.org
Subject: svn commit: r294297 - head/lib/libelftc
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.20
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for &quot;
 user&quot; and &quot; projects&quot; \)" <svn-src-all.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-all/>
List-Post: <mailto:svn-src-all@freebsd.org>
List-Help: <mailto:svn-src-all-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Mon, 18 Jan 2016 21:53:40 -0000

Author: emaste
Date: Mon Jan 18 21:53:39 2016
New Revision: 294297
URL: https://svnweb.freebsd.org/changeset/base/294297

Log:
  Update elftc version to 3272M, imported in r292120

Modified:
  head/lib/libelftc/elftc_version.c

Modified: head/lib/libelftc/elftc_version.c
==============================================================================
--- head/lib/libelftc/elftc_version.c	Mon Jan 18 21:40:20 2016	(r294296)
+++ head/lib/libelftc/elftc_version.c	Mon Jan 18 21:53:39 2016	(r294297)
@@ -6,5 +6,5 @@
 const char *
 elftc_version(void)
 {
-	return "elftoolchain r3223M";
+	return "elftoolchain r3272M";
 }

From owner-svn-src-all@freebsd.org  Mon Jan 18 22:12:09 2016
Return-Path: <owner-svn-src-all@freebsd.org>
Delivered-To: svn-src-all@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id 331AAA860DD;
 Mon, 18 Jan 2016 22:12:09 +0000 (UTC)
 (envelope-from bapt@FreeBSD.org)
Received: from repo.freebsd.org (repo.freebsd.org
 [IPv6:2610:1c1:1:6068::e6a:0])
 (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
 (Client did not present a certificate)
 by mx1.freebsd.org (Postfix) with ESMTPS id 033B310C3;
 Mon, 18 Jan 2016 22:12:08 +0000 (UTC)
 (envelope-from bapt@FreeBSD.org)
Received: from repo.freebsd.org ([127.0.1.37])
 by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u0IMC80b025131;
 Mon, 18 Jan 2016 22:12:08 GMT (envelope-from bapt@FreeBSD.org)
Received: (from bapt@localhost)
 by repo.freebsd.org (8.15.2/8.15.2/Submit) id u0IMC8xh025130;
 Mon, 18 Jan 2016 22:12:08 GMT (envelope-from bapt@FreeBSD.org)
Message-Id: <201601182212.u0IMC8xh025130@repo.freebsd.org>
X-Authentication-Warning: repo.freebsd.org: bapt set sender to
 bapt@FreeBSD.org using -f
From: Baptiste Daroussin <bapt@FreeBSD.org>
Date: Mon, 18 Jan 2016 22:12:08 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-head@freebsd.org
Subject: svn commit: r294298 - head/usr.bin/m4
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.20
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for &quot;
 user&quot; and &quot; projects&quot; \)" <svn-src-all.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-all/>
List-Post: <mailto:svn-src-all@freebsd.org>
List-Help: <mailto:svn-src-all-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Mon, 18 Jan 2016 22:12:09 -0000

Author: bapt
Date: Mon Jan 18 22:12:07 2016
New Revision: 294298
URL: https://svnweb.freebsd.org/changeset/base/294298

Log:
  Import misc.c,v 1.46 from OpenBSD (by espie@)
  
  Yet another missed ferror call

Modified:
  head/usr.bin/m4/misc.c

Modified: head/usr.bin/m4/misc.c
==============================================================================
--- head/usr.bin/m4/misc.c	Mon Jan 18 21:53:39 2016	(r294297)
+++ head/usr.bin/m4/misc.c	Mon Jan 18 22:12:07 2016	(r294298)
@@ -1,4 +1,4 @@
-/*	$OpenBSD: misc.c,v 1.45 2014/12/21 09:33:12 espie Exp $	*/
+/*	$OpenBSD: misc.c,v 1.46 2015/12/07 14:12:46 espie Exp $	*/
 /*	$NetBSD: misc.c,v 1.6 1995/09/28 05:37:41 tls Exp $	*/
 
 /*
@@ -424,6 +424,8 @@ do_emit_synchline(void)
 void
 release_input(struct input_file *f)
 {
+	if (ferror(f->file))
+		errx(1, "Fatal error reading from %s\n", f->name);
 	if (f->file != stdin)
 	    fclose(f->file);
 	f->c = EOF;

From owner-svn-src-all@freebsd.org  Mon Jan 18 22:15:06 2016
Return-Path: <owner-svn-src-all@freebsd.org>
Delivered-To: svn-src-all@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id AF901A861E0;
 Mon, 18 Jan 2016 22:15:06 +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 89C7D12FC;
 Mon, 18 Jan 2016 22:15:06 +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 2740BB9A6;
 Mon, 18 Jan 2016 17:15:05 -0500 (EST)
From: John Baldwin <jhb@freebsd.org>
To: Nathan Whitehorn <nwhitehorn@freebsd.org>
Cc: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-head@freebsd.org
Subject: Re: svn commit: r279189 - in head/sys/powerpc: aim fpu include powerpc
Date: Mon, 18 Jan 2016 14:01:35 -0800
Message-ID: <3368361.OPgXEjftIo@ralph.baldwin.cx>
User-Agent: KMail/4.14.3 (FreeBSD/10.2-STABLE; KDE/4.14.3; amd64; ; )
In-Reply-To: <569D5977.8050402@freebsd.org>
References: <201502222140.t1MLeSFg075690@svn.freebsd.org>
 <11668266.h2pHzfGYxF@ralph.baldwin.cx> <569D5977.8050402@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); Mon, 18 Jan 2016 17:15:05 -0500 (EST)
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.20
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for &quot;
 user&quot; and &quot; projects&quot; \)" <svn-src-all.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-all/>
List-Post: <mailto:svn-src-all@freebsd.org>
List-Help: <mailto:svn-src-all-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Mon, 18 Jan 2016 22:15:06 -0000

On Monday, January 18, 2016 01:30:31 PM Nathan Whitehorn wrote:
> 
> On 01/18/16 12:49, John Baldwin wrote:
> > On Sunday, February 22, 2015 09:40:28 PM Nathan Whitehorn wrote:
> >> Author: nwhitehorn
> >> Date: Sun Feb 22 21:40:27 2015
> >> New Revision: 279189
> >> URL: https://svnweb.freebsd.org/changeset/base/279189
> >>
> >> Log:
> >>    Kernel support for the Vector-Scalar eXtension (VSX) found on the POWER7
> >>    and POWER8. This instruction set unifies the 32 64-bit scalar floating
> >>    point registers with the 32 128-bit vector registers into a single bank
> >>    of 64 128-bit registers. Kernel support mostly amounts to saving and
> >>    restoring the wider version of the floating point registers and making
> >>    sure that both scalar FP and vector registers are enabled once a VSX
> >>    instruction is executed. get_mcontext() and friends currently cannot
> >>    see the high bits, which will require a little more work.
> >>    
> >>    As the system compiler (GCC 4.2) does not support VSX, making use of this
> >>    from userland requires either newer GCC or clang.
> >>    
> >>    Relnotes:	yes
> >>    Sponsored by:	FreeBSD Foundation
> >>
> >> Modified:
> >>    head/sys/powerpc/aim/trap.c
> >>    head/sys/powerpc/aim/trap_subr64.S
> >>    head/sys/powerpc/fpu/fpu_emu.c
> >>    head/sys/powerpc/fpu/fpu_explode.c
> >>    head/sys/powerpc/include/cpu.h
> >>    head/sys/powerpc/include/pcb.h
> >>    head/sys/powerpc/include/psl.h
> >>    head/sys/powerpc/include/reg.h
> >>    head/sys/powerpc/include/trap.h
> >>    head/sys/powerpc/powerpc/cpu.c
> >>    head/sys/powerpc/powerpc/db_trace.c
> >>    head/sys/powerpc/powerpc/exec_machdep.c
> >>    head/sys/powerpc/powerpc/fpu.c
> >>
> >> Modified: head/sys/powerpc/include/reg.h
> >> ==============================================================================
> >> --- head/sys/powerpc/include/reg.h	Sun Feb 22 21:32:57 2015	(r279188)
> >> +++ head/sys/powerpc/include/reg.h	Sun Feb 22 21:40:27 2015	(r279189)
> >> @@ -20,7 +20,10 @@ struct reg {
> >>   
> >>   /* Must match pcb.pcb_fpu */
> >>   struct fpreg {
> >> -	double fpreg[32];
> >> +	union {
> >> +		double fpr;
> >> +		uint64_t vsr[2];
> >> +	} fpreg[32];
> >>   	double fpscr;
> >>   };
> > This breaks the ABI of struct fpreg which changes the format of coredumps.
> > It also breaks the ABI of older versions of programs (such as debuggers) that
> > use ptrace(PT_GETFPREGS) (the kernel will now overflow the user-allocated
> > buffer if a debugger built on 10.x is run under an 11.0 kernel, and
> > PT_SETFPREGS is going to also buffer overflow and store random garbage in the
> > FP regs).  Did you mean to alter the structure's layout?
> >
> > I can maybe fix upstream gdb to cope with either size, but it's a bit of a
> > PITA.  In particular, gdb assumes that all the floating point registers in
> > struct fpreg are in a packed array (so it can use starting_offset + 8 * n to
> > extract register 'n' and only the initial offset is something that different
> > platform targets have to configure), so fixing this means having to add a lot
> > of special cases and duplicate code that is otherwise shared across
> > platforms.
> >
> > Hmm, I see that you preserved the ABI of mcontext by just copying the
> > doubles.  I think you should do the same for 'struct fpreg' restoring its
> > ABI and we can use MD ptrace requests to fetch the VSX state.  This is what
> > Linux effectively does.
> >
> 
> Drat. I hadn't appreciated that fpreg was part of the public API when I 
> wrote this code! It would be easy enough to follow what mcontext does, 
> and that seems like the right solution, but I won't have time for a 
> couple of weeks at least. If you do have time, I would be happy to 
> review and/or polish patches before that.
> 
> Thanks for catching this!

No worries, I was testing my GDB threading patches on ppc (which do work,
whee!) and started getting warnings about ".reg2" being missized.  Building
kernels is dreadfully slow in qemu so it will take a while to test, but I'll
see what I can come up with.

-- 
John Baldwin

From owner-svn-src-all@freebsd.org  Mon Jan 18 22:21:48 2016
Return-Path: <owner-svn-src-all@freebsd.org>
Delivered-To: svn-src-all@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id 58A5DA863D4;
 Mon, 18 Jan 2016 22:21:48 +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 35C4D19DE;
 Mon, 18 Jan 2016 22:21:48 +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 u0IMLlWo028298;
 Mon, 18 Jan 2016 22:21:47 GMT (envelope-from markj@FreeBSD.org)
Received: (from markj@localhost)
 by repo.freebsd.org (8.15.2/8.15.2/Submit) id u0IMLlWK028295;
 Mon, 18 Jan 2016 22:21:47 GMT (envelope-from markj@FreeBSD.org)
Message-Id: <201601182221.u0IMLlWK028295@repo.freebsd.org>
X-Authentication-Warning: repo.freebsd.org: markj set sender to
 markj@FreeBSD.org using -f
From: Mark Johnston <markj@FreeBSD.org>
Date: Mon, 18 Jan 2016 22:21:47 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-head@freebsd.org
Subject: svn commit: r294299 - in head: share/man/man9 sys/kern sys/sys
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.20
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for &quot;
 user&quot; and &quot; projects&quot; \)" <svn-src-all.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-all/>
List-Post: <mailto:svn-src-all@freebsd.org>
List-Help: <mailto:svn-src-all-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Mon, 18 Jan 2016 22:21:48 -0000

Author: markj
Date: Mon Jan 18 22:21:46 2016
New Revision: 294299
URL: https://svnweb.freebsd.org/changeset/base/294299

Log:
  Add vrefl(), a locked variant of vref(9).
  
  This API has no in-tree consumers at the moment but is useful to at least
  one out-of-tree consumer, and naturally complements existing vnode refcount
  functions (vholdl(9), vdropl(9)).
  
  Obtained from:	kib (sys/ portion)
  Sponsored by:	EMC / Isilon Storage Division
  Differential Revision:	https://reviews.freebsd.org/D4947
  Differential Revision:	https://reviews.freebsd.org/D4953

Modified:
  head/share/man/man9/vref.9
  head/sys/kern/vfs_subr.c
  head/sys/sys/vnode.h

Modified: head/share/man/man9/vref.9
==============================================================================
--- head/share/man/man9/vref.9	Mon Jan 18 22:12:07 2016	(r294298)
+++ head/share/man/man9/vref.9	Mon Jan 18 22:21:46 2016	(r294299)
@@ -28,17 +28,19 @@
 .\"
 .\" $FreeBSD$
 .\"
-.Dd July 24, 1996
+.Dd January 18, 2016
 .Dt VREF 9
 .Os
 .Sh NAME
-.Nm vref
+.Nm vref , vrefl
 .Nd increment the use count for a vnode
 .Sh SYNOPSIS
 .In sys/param.h
 .In sys/vnode.h
 .Ft void
 .Fn vref "struct vnode *vp"
+.Ft void
+.Fn vrefl "struct vnode *vp"
 .Sh DESCRIPTION
 Increment the
 .Va v_usecount
@@ -56,7 +58,14 @@ no longer being used and can be safely r
 Any code in the system which is using a vnode (e.g.\& during the
 operation of some algorithm or to store in a data structure) should
 call
-.Fn vref .
+.Fn vref
+or
+.Fn vrefl .
+.Pp
+.Fn vref
+locks the vnode interlock while
+.Fn vrefl
+expects the interlock to already be held.
 .Sh SEE ALSO
 .Xr vget 9 ,
 .Xr vnode 9 ,

Modified: head/sys/kern/vfs_subr.c
==============================================================================
--- head/sys/kern/vfs_subr.c	Mon Jan 18 22:12:07 2016	(r294298)
+++ head/sys/kern/vfs_subr.c	Mon Jan 18 22:21:46 2016	(r294299)
@@ -104,6 +104,7 @@ static void	syncer_shutdown(void *arg, i
 static int	vtryrecycle(struct vnode *vp);
 static void	v_init_counters(struct vnode *);
 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);
@@ -2371,6 +2372,20 @@ v_init_counters(struct vnode *vp)
 	refcount_init(&vp->v_usecount, 1);
 }
 
+static void
+v_incr_usecount_locked(struct vnode *vp)
+{
+
+	ASSERT_VI_LOCKED(vp, __func__);
+	if ((vp->v_iflag & VI_OWEINACT) != 0) {
+		VNASSERT(vp->v_usecount == 0, vp,
+		    ("vnode with usecount and VI_OWEINACT set"));
+		vp->v_iflag &= ~VI_OWEINACT;
+	}
+	refcount_acquire(&vp->v_usecount);
+	v_incr_devcount(vp);
+}
+
 /*
  * Increment the use and hold counts on the vnode, taking care to reference
  * the driver's usecount if this is a chardev.  The _vhold() will remove
@@ -2383,29 +2398,13 @@ v_incr_usecount(struct vnode *vp)
 	ASSERT_VI_UNLOCKED(vp, __func__);
 	CTR2(KTR_VFS, "%s: vp %p", __func__, vp);
 
-	if (vp->v_type == VCHR) {
-		VI_LOCK(vp);
-		_vhold(vp, true);
-		if (vp->v_iflag & VI_OWEINACT) {
-			VNASSERT(vp->v_usecount == 0, vp,
-			    ("vnode with usecount and VI_OWEINACT set"));
-			vp->v_iflag &= ~VI_OWEINACT;
-		}
-		refcount_acquire(&vp->v_usecount);
-		v_incr_devcount(vp);
-		VI_UNLOCK(vp);
-		return;
-	}
-
-	_vhold(vp, false);
-	if (vfs_refcount_acquire_if_not_zero(&vp->v_usecount)) {
+	if (vp->v_type != VCHR &&
+	    vfs_refcount_acquire_if_not_zero(&vp->v_usecount)) {
 		VNASSERT((vp->v_iflag & VI_OWEINACT) == 0, vp,
 		    ("vnode with usecount and VI_OWEINACT set"));
 	} else {
 		VI_LOCK(vp);
-		if (vp->v_iflag & VI_OWEINACT)
-			vp->v_iflag &= ~VI_OWEINACT;
-		refcount_acquire(&vp->v_usecount);
+		v_incr_usecount_locked(vp);
 		VI_UNLOCK(vp);
 	}
 }
@@ -2520,9 +2519,19 @@ vref(struct vnode *vp)
 {
 
 	CTR2(KTR_VFS, "%s: vp %p", __func__, vp);
+	_vhold(vp, false);
 	v_incr_usecount(vp);
 }
 
+void
+vrefl(struct vnode *vp)
+{
+
+	CTR2(KTR_VFS, "%s: vp %p", __func__, vp);
+	_vhold(vp, true);
+	v_incr_usecount_locked(vp);
+}
+
 /*
  * Return reference count of a vnode.
  *

Modified: head/sys/sys/vnode.h
==============================================================================
--- head/sys/sys/vnode.h	Mon Jan 18 22:12:07 2016	(r294298)
+++ head/sys/sys/vnode.h	Mon Jan 18 22:21:46 2016	(r294299)
@@ -823,6 +823,7 @@ void	vop_rename_fail(struct vop_rename_a
 void	vput(struct vnode *vp);
 void	vrele(struct vnode *vp);
 void	vref(struct vnode *vp);
+void	vrefl(struct vnode *vp);
 int	vrefcnt(struct vnode *vp);
 void 	v_addpollinfo(struct vnode *vp);
 

From owner-svn-src-all@freebsd.org  Mon Jan 18 23:41:52 2016
Return-Path: <owner-svn-src-all@freebsd.org>
Delivered-To: svn-src-all@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9CB4EA87247;
 Mon, 18 Jan 2016 23:41:52 +0000 (UTC)
 (envelope-from marius@alchemy.franken.de)
Received: from alchemy.franken.de (alchemy.franken.de [194.94.249.214])
 (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
 (Client CN "alchemy.franken.de", Issuer "alchemy.franken.de" (not verified))
 by mx1.freebsd.org (Postfix) with ESMTPS id 355141357;
 Mon, 18 Jan 2016 23:41:51 +0000 (UTC)
 (envelope-from marius@alchemy.franken.de)
Received: from alchemy.franken.de (localhost [127.0.0.1])
 by alchemy.franken.de (8.15.2/8.15.2/ALCHEMY.FRANKEN.DE) with ESMTPS id
 u0INfhTN024882
 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO);
 Tue, 19 Jan 2016 00:41:43 +0100 (CET)
 (envelope-from marius@alchemy.franken.de)
Received: (from marius@localhost)
 by alchemy.franken.de (8.15.2/8.15.2/Submit) id u0INfh5B024881;
 Tue, 19 Jan 2016 00:41:43 +0100 (CET) (envelope-from marius)
Date: Tue, 19 Jan 2016 00:41:43 +0100
From: Marius Strobl <marius@alchemy.franken.de>
To: Kubilay Kocak <koobs@FreeBSD.org>
Cc: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-head@freebsd.org
Subject: Re: svn commit: r293854 - head/sys/dev/e1000
Message-ID: <20160118234142.GM15359@alchemy.franken.de>
References: <201601132147.u0DLlR38017711@repo.freebsd.org>
 <5698473F.8030203@FreeBSD.org>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <5698473F.8030203@FreeBSD.org>
User-Agent: Mutt/1.5.24 (2015-08-30)
X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.4.3
 (alchemy.franken.de [0.0.0.0]); Tue, 19 Jan 2016 00:41:43 +0100 (CET)
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.20
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for &quot;
 user&quot; and &quot; projects&quot; \)" <svn-src-all.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-all/>
List-Post: <mailto:svn-src-all@freebsd.org>
List-Help: <mailto:svn-src-all-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Mon, 18 Jan 2016 23:41:52 -0000

On Fri, Jan 15, 2016 at 12:11:27PM +1100, Kubilay Kocak wrote:
> On 14/01/2016 8:47 AM, Marius Strobl wrote:
> > Author: marius
> > Date: Wed Jan 13 21:47:27 2016
> > New Revision: 293854
> > URL: https://svnweb.freebsd.org/changeset/base/293854
> > 
> > Log:
> >   Given that em(4), lem(4) and igb(4) hardware doesn't require the
> >   alignment guarantees provided by m_defrag(9), use m_collapse(9)
> >   instead for performance reasons.
> >   While at it, sanitize the statistics softc members, i. e. retire
> >   unused ones and add SYSCTL nodes missing for actually used ones.
> >   
> >   Differential Revision:	https://reviews.freebsd.org/D4717
> > 
> > Modified:
> >   head/sys/dev/e1000/if_em.c
> >   head/sys/dev/e1000/if_em.h
> >   head/sys/dev/e1000/if_igb.c
> >   head/sys/dev/e1000/if_igb.h
> >   head/sys/dev/e1000/if_lem.c
> >   head/sys/dev/e1000/if_lem.h
> 
> What kind of performance / overhead delta can be expected for this change?
> 

Compared to m_collapse(9), m_defrag(9) is a real CPU hog. However,
bus_dmamap_load_mbuf_sg(9) should fail seldom enough with EFBIG
that you'll most likely not experience much of a difference in
practice.

Still, unnecessary use of m_defrag(9) in place of m_collapse(9)
should be avoided and at some point in time we actually had
managed to get rid of most of these cases. Unfortunately, such
code came back in a couple of drivers, mainly in vendor-supplied
ones.

> Is this worth MFC and/or Relnotes ?

The change is worth an MFC but not Relnotes.

Marius


From owner-svn-src-all@freebsd.org  Tue Jan 19 01:30:23 2016
Return-Path: <owner-svn-src-all@freebsd.org>
Delivered-To: svn-src-all@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id CE631A87ABA;
 Tue, 19 Jan 2016 01:30:23 +0000 (UTC)
 (envelope-from ngie@FreeBSD.org)
Received: from repo.freebsd.org (repo.freebsd.org
 [IPv6:2610:1c1:1:6068::e6a:0])
 (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
 (Client did not present a certificate)
 by mx1.freebsd.org (Postfix) with ESMTPS id 9E1611094;
 Tue, 19 Jan 2016 01:30:23 +0000 (UTC)
 (envelope-from ngie@FreeBSD.org)
Received: from repo.freebsd.org ([127.0.1.37])
 by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u0J1UMY8081662;
 Tue, 19 Jan 2016 01:30:22 GMT (envelope-from ngie@FreeBSD.org)
Received: (from ngie@localhost)
 by repo.freebsd.org (8.15.2/8.15.2/Submit) id u0J1UMWg081661;
 Tue, 19 Jan 2016 01:30:22 GMT (envelope-from ngie@FreeBSD.org)
Message-Id: <201601190130.u0J1UMWg081661@repo.freebsd.org>
X-Authentication-Warning: repo.freebsd.org: ngie set sender to
 ngie@FreeBSD.org using -f
From: Garrett Cooper <ngie@FreeBSD.org>
Date: Tue, 19 Jan 2016 01:30:22 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org
Subject: svn commit: r294300 - stable/10/lib/libc/rpc
X-SVN-Group: stable-10
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.20
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for &quot;
 user&quot; and &quot; projects&quot; \)" <svn-src-all.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-all/>
List-Post: <mailto:svn-src-all@freebsd.org>
List-Help: <mailto:svn-src-all-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Tue, 19 Jan 2016 01:30:23 -0000

Author: ngie
Date: Tue Jan 19 01:30:22 2016
New Revision: 294300
URL: https://svnweb.freebsd.org/changeset/base/294300

Log:
  MFC r293715:
  
  Fix a mismerge from NetBSD in r162194 with `xdr_rpcb_entry_list_ptr(..)`
  
  This fixes the potential NULL pointer dereference properly, and also fixes
  memory leaks encountered in the process of iterating through `*rp`.
  
  Found by: Valgrind
  Submitted by: Miles Ohlrich <miles.ohlrich@isilon.com>

Modified:
  stable/10/lib/libc/rpc/rpcb_prot.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/lib/libc/rpc/rpcb_prot.c
==============================================================================
--- stable/10/lib/libc/rpc/rpcb_prot.c	Mon Jan 18 22:21:46 2016	(r294299)
+++ stable/10/lib/libc/rpc/rpcb_prot.c	Tue Jan 19 01:30:22 2016	(r294300)
@@ -217,14 +217,14 @@ xdr_rpcb_entry_list_ptr(xdrs, rp)
 		 * the case of freeing we must remember the next object
 		 * before we free the current object ...
 		 */
-		if (freeing)
+		if (freeing && *rp)
 			next = (*rp)->rpcb_entry_next;
 		if (! xdr_reference(xdrs, (caddr_t *)rp,
 		    (u_int)sizeof (rpcb_entry_list),
 				    (xdrproc_t)xdr_rpcb_entry)) {
 			return (FALSE);
 		}
-		if (freeing && *rp) {
+		if (freeing) {
 			next_copy = next;
 			rp = &next_copy;
 			/*

From owner-svn-src-all@freebsd.org  Tue Jan 19 01:33:29 2016
Return-Path: <owner-svn-src-all@freebsd.org>
Delivered-To: svn-src-all@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id 49CA3A87CBB;
 Tue, 19 Jan 2016 01:33:29 +0000 (UTC)
 (envelope-from ngie@FreeBSD.org)
Received: from repo.freebsd.org (repo.freebsd.org
 [IPv6:2610:1c1:1:6068::e6a:0])
 (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
 (Client did not present a certificate)
 by mx1.freebsd.org (Postfix) with ESMTPS id 17AA214EB;
 Tue, 19 Jan 2016 01:33:29 +0000 (UTC)
 (envelope-from ngie@FreeBSD.org)
Received: from repo.freebsd.org ([127.0.1.37])
 by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u0J1XSW5084386;
 Tue, 19 Jan 2016 01:33:28 GMT (envelope-from ngie@FreeBSD.org)
Received: (from ngie@localhost)
 by repo.freebsd.org (8.15.2/8.15.2/Submit) id u0J1XSlY084385;
 Tue, 19 Jan 2016 01:33:28 GMT (envelope-from ngie@FreeBSD.org)
Message-Id: <201601190133.u0J1XSlY084385@repo.freebsd.org>
X-Authentication-Warning: repo.freebsd.org: ngie set sender to
 ngie@FreeBSD.org using -f
From: Garrett Cooper <ngie@FreeBSD.org>
Date: Tue, 19 Jan 2016 01:33:28 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org
Subject: svn commit: r294301 - stable/9/lib/libc/rpc
X-SVN-Group: stable-9
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.20
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for &quot;
 user&quot; and &quot; projects&quot; \)" <svn-src-all.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-all/>
List-Post: <mailto:svn-src-all@freebsd.org>
List-Help: <mailto:svn-src-all-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Tue, 19 Jan 2016 01:33:29 -0000

Author: ngie
Date: Tue Jan 19 01:33:27 2016
New Revision: 294301
URL: https://svnweb.freebsd.org/changeset/base/294301

Log:
  MFstable/10 r294300:
  
  MFC r293715:
  
  Fix a mismerge from NetBSD in r162194 with `xdr_rpcb_entry_list_ptr(..)`
  
  This fixes the potential NULL pointer dereference properly, and also fixes
  memory leaks encountered in the process of iterating through `*rp`.
  
  Found by: Valgrind
  Submitted by: Miles Ohlrich <miles.ohlrich@isilon.com>

Modified:
  stable/9/lib/libc/rpc/rpcb_prot.c
Directory Properties:
  stable/9/   (props changed)
  stable/9/lib/   (props changed)
  stable/9/lib/libc/   (props changed)

Modified: stable/9/lib/libc/rpc/rpcb_prot.c
==============================================================================
--- stable/9/lib/libc/rpc/rpcb_prot.c	Tue Jan 19 01:30:22 2016	(r294300)
+++ stable/9/lib/libc/rpc/rpcb_prot.c	Tue Jan 19 01:33:27 2016	(r294301)
@@ -217,14 +217,14 @@ xdr_rpcb_entry_list_ptr(xdrs, rp)
 		 * the case of freeing we must remember the next object
 		 * before we free the current object ...
 		 */
-		if (freeing)
+		if (freeing && *rp)
 			next = (*rp)->rpcb_entry_next;
 		if (! xdr_reference(xdrs, (caddr_t *)rp,
 		    (u_int)sizeof (rpcb_entry_list),
 				    (xdrproc_t)xdr_rpcb_entry)) {
 			return (FALSE);
 		}
-		if (freeing && *rp) {
+		if (freeing) {
 			next_copy = next;
 			rp = &next_copy;
 			/*

From owner-svn-src-all@freebsd.org  Tue Jan 19 01:35:18 2016
Return-Path: <owner-svn-src-all@freebsd.org>
Delivered-To: svn-src-all@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id 17508A87E05;
 Tue, 19 Jan 2016 01:35:18 +0000 (UTC)
 (envelope-from ngie@FreeBSD.org)
Received: from repo.freebsd.org (repo.freebsd.org
 [IPv6:2610:1c1:1:6068::e6a:0])
 (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
 (Client did not present a certificate)
 by mx1.freebsd.org (Postfix) with ESMTPS id D7E911779;
 Tue, 19 Jan 2016 01:35:17 +0000 (UTC)
 (envelope-from ngie@FreeBSD.org)
Received: from repo.freebsd.org ([127.0.1.37])
 by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u0J1ZG2I084519;
 Tue, 19 Jan 2016 01:35:16 GMT (envelope-from ngie@FreeBSD.org)
Received: (from ngie@localhost)
 by repo.freebsd.org (8.15.2/8.15.2/Submit) id u0J1ZGiv084518;
 Tue, 19 Jan 2016 01:35:16 GMT (envelope-from ngie@FreeBSD.org)
Message-Id: <201601190135.u0J1ZGiv084518@repo.freebsd.org>
X-Authentication-Warning: repo.freebsd.org: ngie set sender to
 ngie@FreeBSD.org using -f
From: Garrett Cooper <ngie@FreeBSD.org>
Date: Tue, 19 Jan 2016 01:35:16 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org
Subject: svn commit: r294302 - stable/10/tools/regression/sockets/so_setfib
X-SVN-Group: stable-10
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.20
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for &quot;
 user&quot; and &quot; projects&quot; \)" <svn-src-all.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-all/>
List-Post: <mailto:svn-src-all@freebsd.org>
List-Help: <mailto:svn-src-all-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Tue, 19 Jan 2016 01:35:18 -0000

Author: ngie
Date: Tue Jan 19 01:35:16 2016
New Revision: 294302
URL: https://svnweb.freebsd.org/changeset/base/294302

Log:
  MFC r294123:
  
  Add missing newline to message about requiring root privileges
  
  This will help ensure that scripts/parsers don't get confused when the message
  is printed out

Modified:
  stable/10/tools/regression/sockets/so_setfib/so_setfib.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/tools/regression/sockets/so_setfib/so_setfib.c
==============================================================================
--- stable/10/tools/regression/sockets/so_setfib/so_setfib.c	Tue Jan 19 01:33:27 2016	(r294301)
+++ stable/10/tools/regression/sockets/so_setfib/so_setfib.c	Tue Jan 19 01:35:16 2016	(r294302)
@@ -171,7 +171,7 @@ main(int argc __unused, char *argv[] __u
 	size_t s;
 
 	if (geteuid() != 0) {
-		printf("1..0 # SKIP: must be root");
+		printf("1..0 # SKIP: must be root\n");
 		return (0);
 	}
 

From owner-svn-src-all@freebsd.org  Tue Jan 19 01:38:08 2016
Return-Path: <owner-svn-src-all@freebsd.org>
Delivered-To: svn-src-all@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id 284A8A87EF5;
 Tue, 19 Jan 2016 01:38:08 +0000 (UTC)
 (envelope-from ngie@FreeBSD.org)
Received: from repo.freebsd.org (repo.freebsd.org
 [IPv6:2610:1c1:1:6068::e6a:0])
 (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
 (Client did not present a certificate)
 by mx1.freebsd.org (Postfix) with ESMTPS id D29E119BE;
 Tue, 19 Jan 2016 01:38: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 u0J1c6uH084710;
 Tue, 19 Jan 2016 01:38:06 GMT (envelope-from ngie@FreeBSD.org)
Received: (from ngie@localhost)
 by repo.freebsd.org (8.15.2/8.15.2/Submit) id u0J1c6fm084709;
 Tue, 19 Jan 2016 01:38:06 GMT (envelope-from ngie@FreeBSD.org)
Message-Id: <201601190138.u0J1c6fm084709@repo.freebsd.org>
X-Authentication-Warning: repo.freebsd.org: ngie set sender to
 ngie@FreeBSD.org using -f
From: Garrett Cooper <ngie@FreeBSD.org>
Date: Tue, 19 Jan 2016 01:38:06 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org
Subject: svn commit: r294303 -
 stable/10/tools/regression/sockets/accf_data_attach
X-SVN-Group: stable-10
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.20
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for &quot;
 user&quot; and &quot; projects&quot; \)" <svn-src-all.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-all/>
List-Post: <mailto:svn-src-all@freebsd.org>
List-Help: <mailto:svn-src-all-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Tue, 19 Jan 2016 01:38:08 -0000

Author: ngie
Date: Tue Jan 19 01:38:06 2016
New Revision: 294303
URL: https://svnweb.freebsd.org/changeset/base/294303

Log:
  MFC r294103:
  
  - Check for accf_filter before running the tests, otherwise it will always
    fail at subtest 9/11
  - Use strncpy instead of strcpy with afa.af_name

Modified:
  stable/10/tools/regression/sockets/accf_data_attach/accf_data_attach.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/tools/regression/sockets/accf_data_attach/accf_data_attach.c
==============================================================================
--- stable/10/tools/regression/sockets/accf_data_attach/accf_data_attach.c	Tue Jan 19 01:35:16 2016	(r294302)
+++ stable/10/tools/regression/sockets/accf_data_attach/accf_data_attach.c	Tue Jan 19 01:38:06 2016	(r294303)
@@ -27,6 +27,7 @@
  */
 
 #include <sys/types.h>
+#include <sys/module.h>
 #include <sys/socket.h>
 
 #include <netinet/in.h>
@@ -65,6 +66,16 @@ main(void)
 	socklen_t len;
 	int lso, ret;
 
+	/* XXX: PLAIN_TEST_REQUIRE_MODULE "backport" for stable/9 */
+	const char *_mod_name = "accf_data";
+
+	if (modfind(_mod_name) == -1) {
+		printf("1..0 # SKIP - module %s could not be resolved: %s\n",
+		    _mod_name, strerror(errno));
+		_exit(0);
+	}
+	/* XXX: PLAIN_TEST_REQUIRE_MODULE for stable/9 */
+
 	printf("1..11\n");
 
 	/*
@@ -119,7 +130,7 @@ main(void)
 	 * yet a listen() socket.
 	 */
 	bzero(&afa, sizeof(afa));
-	strcpy(afa.af_name, ACCF_NAME);
+	strncpy(afa.af_name, ACCF_NAME, sizeof(afa.af_name));
 	ret = setsockopt(lso, SOL_SOCKET, SO_ACCEPTFILTER, &afa, sizeof(afa));
 	if (ret == 0)
 		errx(-1, "not ok 5 - setsockopt() before listen() succeeded");
@@ -164,7 +175,7 @@ main(void)
 	 * Step 8: After listen().  This call to setsockopt() should succeed.
 	 */
 	bzero(&afa, sizeof(afa));
-	strcpy(afa.af_name, ACCF_NAME);
+	strncpy(afa.af_name, ACCF_NAME, sizeof(afa.af_name));
 	ret = setsockopt(lso, SOL_SOCKET, SO_ACCEPTFILTER, &afa, sizeof(afa));
 	if (ret != 0)
 		errx(-1, "not ok 9 - setsockopt() after listen() failed with %d "

From owner-svn-src-all@freebsd.org  Tue Jan 19 01:39:30 2016
Return-Path: <owner-svn-src-all@freebsd.org>
Delivered-To: svn-src-all@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id 82AABA87FAC;
 Tue, 19 Jan 2016 01:39:30 +0000 (UTC)
 (envelope-from ngie@FreeBSD.org)
Received: from repo.freebsd.org (repo.freebsd.org
 [IPv6:2610:1c1:1:6068::e6a:0])
 (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
 (Client did not present a certificate)
 by mx1.freebsd.org (Postfix) with ESMTPS id 38CBA1B0F;
 Tue, 19 Jan 2016 01:39:30 +0000 (UTC)
 (envelope-from ngie@FreeBSD.org)
Received: from repo.freebsd.org ([127.0.1.37])
 by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u0J1dTLZ084813;
 Tue, 19 Jan 2016 01:39:29 GMT (envelope-from ngie@FreeBSD.org)
Received: (from ngie@localhost)
 by repo.freebsd.org (8.15.2/8.15.2/Submit) id u0J1dTup084812;
 Tue, 19 Jan 2016 01:39:29 GMT (envelope-from ngie@FreeBSD.org)
Message-Id: <201601190139.u0J1dTup084812@repo.freebsd.org>
X-Authentication-Warning: repo.freebsd.org: ngie set sender to
 ngie@FreeBSD.org using -f
From: Garrett Cooper <ngie@FreeBSD.org>
Date: Tue, 19 Jan 2016 01:39:29 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org
Subject: svn commit: r294304 -
 stable/9/tools/regression/sockets/accf_data_attach
X-SVN-Group: stable-9
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.20
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for &quot;
 user&quot; and &quot; projects&quot; \)" <svn-src-all.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-all/>
List-Post: <mailto:svn-src-all@freebsd.org>
List-Help: <mailto:svn-src-all-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Tue, 19 Jan 2016 01:39:30 -0000

Author: ngie
Date: Tue Jan 19 01:39:29 2016
New Revision: 294304
URL: https://svnweb.freebsd.org/changeset/base/294304

Log:
  MFstable/10 r294303:
  
  MFC r294103:
  
  - Check for accf_filter before running the tests, otherwise it will always
    fail at subtest 9/11
  - Use strncpy instead of strcpy with afa.af_name

Modified:
  stable/9/tools/regression/sockets/accf_data_attach/accf_data_attach.c
Directory Properties:
  stable/9/   (props changed)
  stable/9/tools/   (props changed)
  stable/9/tools/regression/   (props changed)
  stable/9/tools/regression/sockets/   (props changed)

Modified: stable/9/tools/regression/sockets/accf_data_attach/accf_data_attach.c
==============================================================================
--- stable/9/tools/regression/sockets/accf_data_attach/accf_data_attach.c	Tue Jan 19 01:38:06 2016	(r294303)
+++ stable/9/tools/regression/sockets/accf_data_attach/accf_data_attach.c	Tue Jan 19 01:39:29 2016	(r294304)
@@ -27,6 +27,7 @@
  */
 
 #include <sys/types.h>
+#include <sys/module.h>
 #include <sys/socket.h>
 
 #include <netinet/in.h>
@@ -65,6 +66,16 @@ main(int argc, char *argv[])
 	socklen_t len;
 	int lso, ret;
 
+	/* XXX: PLAIN_TEST_REQUIRE_MODULE "backport" for stable/9 */
+	const char *_mod_name = "accf_data";
+
+	if (modfind(_mod_name) == -1) {
+		printf("1..0 # SKIP - module %s could not be resolved: %s\n",
+		    _mod_name, strerror(errno));
+		_exit(0);
+	}
+	/* XXX: PLAIN_TEST_REQUIRE_MODULE for stable/9 */
+
 	printf("1..11\n");
 
 	/*
@@ -119,7 +130,7 @@ main(int argc, char *argv[])
 	 * yet a listen() socket.
 	 */
 	bzero(&afa, sizeof(afa));
-	strcpy(afa.af_name, ACCF_NAME);
+	strncpy(afa.af_name, ACCF_NAME, sizeof(afa.af_name));
 	ret = setsockopt(lso, SOL_SOCKET, SO_ACCEPTFILTER, &afa, sizeof(afa));
 	if (ret == 0)
 		errx(-1, "not ok 5 - setsockopt() before listen() succeeded");
@@ -164,7 +175,7 @@ main(int argc, char *argv[])
 	 * Step 8: After listen().  This call to setsockopt() should succeed.
 	 */
 	bzero(&afa, sizeof(afa));
-	strcpy(afa.af_name, ACCF_NAME);
+	strncpy(afa.af_name, ACCF_NAME, sizeof(afa.af_name));
 	ret = setsockopt(lso, SOL_SOCKET, SO_ACCEPTFILTER, &afa, sizeof(afa));
 	if (ret != 0)
 		errx(-1, "not ok 9 - setsockopt() after listen() failed with %d "

From owner-svn-src-all@freebsd.org  Tue Jan 19 01:41:20 2016
Return-Path: <owner-svn-src-all@freebsd.org>
Delivered-To: svn-src-all@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id E7246A8806C;
 Tue, 19 Jan 2016 01:41:20 +0000 (UTC)
 (envelope-from ngie@FreeBSD.org)
Received: from repo.freebsd.org (repo.freebsd.org
 [IPv6:2610:1c1:1:6068::e6a:0])
 (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
 (Client did not present a certificate)
 by mx1.freebsd.org (Postfix) with ESMTPS id B349F1D07;
 Tue, 19 Jan 2016 01:41:20 +0000 (UTC)
 (envelope-from ngie@FreeBSD.org)
Received: from repo.freebsd.org ([127.0.1.37])
 by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u0J1fJKL084951;
 Tue, 19 Jan 2016 01:41:19 GMT (envelope-from ngie@FreeBSD.org)
Received: (from ngie@localhost)
 by repo.freebsd.org (8.15.2/8.15.2/Submit) id u0J1fJOj084949;
 Tue, 19 Jan 2016 01:41:19 GMT (envelope-from ngie@FreeBSD.org)
Message-Id: <201601190141.u0J1fJOj084949@repo.freebsd.org>
X-Authentication-Warning: repo.freebsd.org: ngie set sender to
 ngie@FreeBSD.org using -f
From: Garrett Cooper <ngie@FreeBSD.org>
Date: Tue, 19 Jan 2016 01:41:19 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org
Subject: svn commit: r294305 - stable/10/tools/regression/sockets/unix_gc
X-SVN-Group: stable-10
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.20
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for &quot;
 user&quot; and &quot; projects&quot; \)" <svn-src-all.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-all/>
List-Post: <mailto:svn-src-all@freebsd.org>
List-Help: <mailto:svn-src-all-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Tue, 19 Jan 2016 01:41:21 -0000

Author: ngie
Date: Tue Jan 19 01:41:19 2016
New Revision: 294305
URL: https://svnweb.freebsd.org/changeset/base/294305

Log:
  MFC r294128:
  
  Fix -Wunused warning with clang/gcc
  
  - Get rid of unused argc/argv variables in main
  - Bump WARNS to 6

Modified:
  stable/10/tools/regression/sockets/unix_gc/Makefile
  stable/10/tools/regression/sockets/unix_gc/unix_gc.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/tools/regression/sockets/unix_gc/Makefile
==============================================================================
--- stable/10/tools/regression/sockets/unix_gc/Makefile	Tue Jan 19 01:39:29 2016	(r294304)
+++ stable/10/tools/regression/sockets/unix_gc/Makefile	Tue Jan 19 01:41:19 2016	(r294305)
@@ -2,6 +2,6 @@
 
 PROG=	unix_gc
 MAN=
-WARNS?=	3
+WARNS?=	6
 
 .include <bsd.prog.mk>

Modified: stable/10/tools/regression/sockets/unix_gc/unix_gc.c
==============================================================================
--- stable/10/tools/regression/sockets/unix_gc/unix_gc.c	Tue Jan 19 01:39:29 2016	(r294304)
+++ stable/10/tools/regression/sockets/unix_gc/unix_gc.c	Tue Jan 19 01:41:19 2016	(r294305)
@@ -752,7 +752,7 @@ recursion(void)
 
 #define	RMDIR	"rm -Rf "
 int
-main(int argc, char *argv[])
+main(void)
 {
 	char cmd[sizeof(RMDIR) + PATH_MAX];
 	int serrno;

From owner-svn-src-all@freebsd.org  Tue Jan 19 01:42:32 2016
Return-Path: <owner-svn-src-all@freebsd.org>
Delivered-To: svn-src-all@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9CA4DA88174;
 Tue, 19 Jan 2016 01:42:32 +0000 (UTC)
 (envelope-from ngie@FreeBSD.org)
Received: from repo.freebsd.org (repo.freebsd.org
 [IPv6:2610:1c1:1:6068::e6a:0])
 (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
 (Client did not present a certificate)
 by mx1.freebsd.org (Postfix) with ESMTPS id 6D6371FBA;
 Tue, 19 Jan 2016 01:42:32 +0000 (UTC)
 (envelope-from ngie@FreeBSD.org)
Received: from repo.freebsd.org ([127.0.1.37])
 by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u0J1gV9u087484;
 Tue, 19 Jan 2016 01:42:31 GMT (envelope-from ngie@FreeBSD.org)
Received: (from ngie@localhost)
 by repo.freebsd.org (8.15.2/8.15.2/Submit) id u0J1gVKB087482;
 Tue, 19 Jan 2016 01:42:31 GMT (envelope-from ngie@FreeBSD.org)
Message-Id: <201601190142.u0J1gVKB087482@repo.freebsd.org>
X-Authentication-Warning: repo.freebsd.org: ngie set sender to
 ngie@FreeBSD.org using -f
From: Garrett Cooper <ngie@FreeBSD.org>
Date: Tue, 19 Jan 2016 01:42:31 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org
Subject: svn commit: r294306 - stable/9/tools/regression/sockets/unix_gc
X-SVN-Group: stable-9
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.20
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for &quot;
 user&quot; and &quot; projects&quot; \)" <svn-src-all.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-all/>
List-Post: <mailto:svn-src-all@freebsd.org>
List-Help: <mailto:svn-src-all-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Tue, 19 Jan 2016 01:42:32 -0000

Author: ngie
Date: Tue Jan 19 01:42:31 2016
New Revision: 294306
URL: https://svnweb.freebsd.org/changeset/base/294306

Log:
  MFstable/10 r294305:
  
  MFC r294128:
  
  Fix -Wunused warning with clang/gcc
  
  - Get rid of unused argc/argv variables in main
  - Bump WARNS to 6

Modified:
  stable/9/tools/regression/sockets/unix_gc/Makefile
  stable/9/tools/regression/sockets/unix_gc/unix_gc.c
Directory Properties:
  stable/9/   (props changed)
  stable/9/tools/   (props changed)
  stable/9/tools/regression/   (props changed)
  stable/9/tools/regression/sockets/   (props changed)

Modified: stable/9/tools/regression/sockets/unix_gc/Makefile
==============================================================================
--- stable/9/tools/regression/sockets/unix_gc/Makefile	Tue Jan 19 01:41:19 2016	(r294305)
+++ stable/9/tools/regression/sockets/unix_gc/Makefile	Tue Jan 19 01:42:31 2016	(r294306)
@@ -2,6 +2,6 @@
 
 PROG=	unix_gc
 NO_MAN=
-WARNS?=	3
+WARNS?=	6
 
 .include <bsd.prog.mk>

Modified: stable/9/tools/regression/sockets/unix_gc/unix_gc.c
==============================================================================
--- stable/9/tools/regression/sockets/unix_gc/unix_gc.c	Tue Jan 19 01:41:19 2016	(r294305)
+++ stable/9/tools/regression/sockets/unix_gc/unix_gc.c	Tue Jan 19 01:42:31 2016	(r294306)
@@ -752,7 +752,7 @@ recursion(void)
 
 #define	RMDIR	"rm -Rf "
 int
-main(int argc, char *argv[])
+main(void)
 {
 	char cmd[sizeof(RMDIR) + PATH_MAX];
 	int serrno;

From owner-svn-src-all@freebsd.org  Tue Jan 19 03:07:27 2016
Return-Path: <owner-svn-src-all@freebsd.org>
Delivered-To: svn-src-all@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3FC4CA87C0B;
 Tue, 19 Jan 2016 03:07:27 +0000 (UTC)
 (envelope-from jhibbits@FreeBSD.org)
Received: from repo.freebsd.org (repo.freebsd.org
 [IPv6:2610:1c1:1:6068::e6a:0])
 (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
 (Client did not present a certificate)
 by mx1.freebsd.org (Postfix) with ESMTPS id 1AE7718EA;
 Tue, 19 Jan 2016 03:07:27 +0000 (UTC)
 (envelope-from jhibbits@FreeBSD.org)
Received: from repo.freebsd.org ([127.0.1.37])
 by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u0J37Q0D011694;
 Tue, 19 Jan 2016 03:07:26 GMT (envelope-from jhibbits@FreeBSD.org)
Received: (from jhibbits@localhost)
 by repo.freebsd.org (8.15.2/8.15.2/Submit) id u0J37QQ9011693;
 Tue, 19 Jan 2016 03:07:26 GMT (envelope-from jhibbits@FreeBSD.org)
Message-Id: <201601190307.u0J37QQ9011693@repo.freebsd.org>
X-Authentication-Warning: repo.freebsd.org: jhibbits set sender to
 jhibbits@FreeBSD.org using -f
From: Justin Hibbits <jhibbits@FreeBSD.org>
Date: Tue, 19 Jan 2016 03:07:26 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-head@freebsd.org
Subject: svn commit: r294307 - head/sys/powerpc/booke
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.20
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for &quot;
 user&quot; and &quot; projects&quot; \)" <svn-src-all.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-all/>
List-Post: <mailto:svn-src-all@freebsd.org>
List-Help: <mailto:svn-src-all-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Tue, 19 Jan 2016 03:07:27 -0000

Author: jhibbits
Date: Tue Jan 19 03:07:25 2016
New Revision: 294307
URL: https://svnweb.freebsd.org/changeset/base/294307

Log:
  Hide most of the PTE initialization and management.
  
  By confining the page table management to a handful of functions it'll be
  easier to modify the page table scheme without affecting other functions.
  This will be necessary when 64-bit support is added, and page tables become
  much larger.

Modified:
  head/sys/powerpc/booke/pmap.c

Modified: head/sys/powerpc/booke/pmap.c
==============================================================================
--- head/sys/powerpc/booke/pmap.c	Tue Jan 19 01:42:31 2016	(r294306)
+++ head/sys/powerpc/booke/pmap.c	Tue Jan 19 03:07:25 2016	(r294307)
@@ -242,6 +242,8 @@ static vm_paddr_t pte_vatopa(mmu_t, pmap
 static pte_t *pte_find(mmu_t, pmap_t, vm_offset_t);
 static int pte_enter(mmu_t, pmap_t, vm_page_t, vm_offset_t, uint32_t, boolean_t);
 static int pte_remove(mmu_t, pmap_t, vm_offset_t, uint8_t);
+static void kernel_pte_alloc(vm_offset_t data_end, vm_offset_t addr,
+			     vm_offset_t pdir);
 
 static pv_entry_t pv_alloc(void);
 static void pv_free(pv_entry_t);
@@ -507,6 +509,10 @@ tlb1_get_tlbconf(void)
 	tlb1_entries = tlb1_cfg & TLBCFG_NENTRY_MASK;
 }
 
+/**************************************************************************/
+/* Page table related */
+/**************************************************************************/
+
 /* Initialize pool of kva ptbl buffers. */
 static void
 ptbl_init(void)
@@ -1014,6 +1020,33 @@ pte_find(mmu_t mmu, pmap_t pmap, vm_offs
 	return (NULL);
 }
 
+/* Set up kernel page tables. */
+static void
+kernel_pte_alloc(vm_offset_t data_end, vm_offset_t addr, vm_offset_t pdir)
+{
+	int		i;
+	vm_offset_t	va;
+	pte_t		*pte;
+
+	/* Initialize kernel pdir */
+	for (i = 0; i < kernel_ptbls; i++)
+		kernel_pmap->pm_pdir[kptbl_min + i] =
+		    (pte_t *)(pdir + (i * PAGE_SIZE * PTBL_PAGES));
+
+	/*
+	 * Fill in PTEs covering kernel code and data. They are not required
+	 * for address translation, as this area is covered by static TLB1
+	 * entries, but for pte_vatopa() to work correctly with kernel area
+	 * addresses.
+	 */
+	for (va = addr; va < data_end; va += PAGE_SIZE) {
+		pte = &(kernel_pmap->pm_pdir[PDIR_IDX(va)][PTBL_IDX(va)]);
+		pte->rpn = kernload + (va - kernstart);
+		pte->flags = PTE_M | PTE_SR | PTE_SW | PTE_SX | PTE_WIRED |
+		    PTE_VALID;
+	}
+}
+
 /**************************************************************************/
 /* PMAP related */
 /**************************************************************************/
@@ -1031,10 +1064,9 @@ mmu_booke_bootstrap(mmu_t mmu, vm_offset
 	vm_paddr_t physsz, hwphyssz;
 	u_int phys_avail_count;
 	vm_size_t kstack0_sz;
-	vm_offset_t kernel_pdir, kstack0, va;
+	vm_offset_t kernel_pdir, kstack0;
 	vm_paddr_t kstack0_phys;
 	void *dpcpu;
-	pte_t *pte;
 
 	debugf("mmu_booke_bootstrap: entered\n");
 
@@ -1287,11 +1319,7 @@ mmu_booke_bootstrap(mmu_t mmu, vm_offset
 	debugf("kernel pdir range: 0x%08x - 0x%08x\n",
 	    kptbl_min * PDIR_SIZE, (kptbl_min + kernel_ptbls) * PDIR_SIZE - 1);
 
-	/* Initialize kernel pdir */
-	for (i = 0; i < kernel_ptbls; i++)
-		kernel_pmap->pm_pdir[kptbl_min + i] =
-		    (pte_t *)(kernel_pdir + (i * PAGE_SIZE * PTBL_PAGES));
-
+	kernel_pte_alloc(data_end, kernstart, kernel_pdir);
 	for (i = 0; i < MAXCPU; i++) {
 		kernel_pmap->pm_tid[i] = TID_KERNEL;
 		
@@ -1299,18 +1327,6 @@ mmu_booke_bootstrap(mmu_t mmu, vm_offset
 		tidbusy[i][TID_KERNEL] = kernel_pmap;
 	}
 
-	/*
-	 * Fill in PTEs covering kernel code and data. They are not required
-	 * for address translation, as this area is covered by static TLB1
-	 * entries, but for pte_vatopa() to work correctly with kernel area
-	 * addresses.
-	 */
-	for (va = kernstart; va < data_end; va += PAGE_SIZE) {
-		pte = &(kernel_pmap->pm_pdir[PDIR_IDX(va)][PTBL_IDX(va)]);
-		pte->rpn = kernload + (va - kernstart);
-		pte->flags = PTE_M | PTE_SR | PTE_SW | PTE_SX | PTE_WIRED |
-		    PTE_VALID;
-	}
 	/* Mark kernel_pmap active on all CPUs */
 	CPU_FILL(&kernel_pmap->pm_active);
 
@@ -1502,8 +1518,6 @@ mmu_booke_kenter(mmu_t mmu, vm_offset_t 
 static void
 mmu_booke_kenter_attr(mmu_t mmu, vm_offset_t va, vm_paddr_t pa, vm_memattr_t ma)
 {
-	unsigned int pdir_idx = PDIR_IDX(va);
-	unsigned int ptbl_idx = PTBL_IDX(va);
 	uint32_t flags;
 	pte_t *pte;
 
@@ -1513,7 +1527,7 @@ mmu_booke_kenter_attr(mmu_t mmu, vm_offs
 	flags = PTE_SR | PTE_SW | PTE_SX | PTE_WIRED | PTE_VALID;
 	flags |= tlb_calc_wimg(pa, ma);
 
-	pte = &(kernel_pmap->pm_pdir[pdir_idx][ptbl_idx]);
+	pte = pte_find(mmu, kernel_pmap, va);
 
 	mtx_lock_spin(&tlbivax_mutex);
 	tlb_miss_lock();
@@ -1548,17 +1562,15 @@ mmu_booke_kenter_attr(mmu_t mmu, vm_offs
 static void
 mmu_booke_kremove(mmu_t mmu, vm_offset_t va)
 {
-	unsigned int pdir_idx = PDIR_IDX(va);
-	unsigned int ptbl_idx = PTBL_IDX(va);
 	pte_t *pte;
 
-//	CTR2(KTR_PMAP,("%s: s (va = 0x%08x)\n", __func__, va));
+	CTR2(KTR_PMAP,"%s: s (va = 0x%08x)\n", __func__, va);
 
 	KASSERT(((va >= VM_MIN_KERNEL_ADDRESS) &&
 	    (va <= VM_MAX_KERNEL_ADDRESS)),
 	    ("mmu_booke_kremove: invalid va"));
 
-	pte = &(kernel_pmap->pm_pdir[pdir_idx][ptbl_idx]);
+	pte = pte_find(mmu, kernel_pmap, va);
 
 	if (!PTE_ISVALID(pte)) {
 	
@@ -2333,7 +2345,7 @@ mmu_booke_quick_enter_page(mmu_t mmu, vm
 	critical_enter();
 	qaddr = PCPU_GET(qmap_addr);
 
-	pte = &(kernel_pmap->pm_pdir[PDIR_IDX(qaddr)][PTBL_IDX(qaddr)]);
+	pte = pte_find(mmu, kernel_pmap, qaddr);
 
 	KASSERT(pte->flags == 0, ("mmu_booke_quick_enter_page: PTE busy"));
 
@@ -2360,7 +2372,7 @@ mmu_booke_quick_remove_page(mmu_t mmu, v
 {
 	pte_t *pte;
 
-	pte = &(kernel_pmap->pm_pdir[PDIR_IDX(addr)][PTBL_IDX(addr)]);
+	pte = pte_find(mmu, kernel_pmap, addr);
 
 	KASSERT(PCPU_GET(qmap_addr) == addr,
 	    ("mmu_booke_quick_remove_page: invalid address"));
@@ -2832,8 +2844,8 @@ mmu_booke_mapdev_attr(mmu_t mmu, vm_padd
 			} while (va % sz != 0);
 		}
 		if (bootverbose)
-			printf("Wiring VA=%x to PA=%llx (size=%x), "
-			    "using TLB1[%d]\n", va, pa, sz, tlb1_idx);
+			printf("Wiring VA=%lx to PA=%jx (size=%lx), "
+			    "using TLB1[%d]\n", va, (uintmax_t)pa, sz, tlb1_idx);
 		tlb1_set_entry(va, pa, sz, tlb_calc_wimg(pa, ma));
 		size -= sz;
 		pa += sz;
@@ -3237,7 +3249,11 @@ tlb1_mapin_region(vm_offset_t va, vm_pad
 	}
 
 	mapped = (va - base);
+#ifdef __powerpc64__
+	printf("mapped size 0x%016lx (wasted space 0x%16lx)\n",
+#else
 	printf("mapped size 0x%08x (wasted space 0x%08x)\n",
+#endif
 	    mapped, mapped - size);
 	return (mapped);
 }

From owner-svn-src-all@freebsd.org  Tue Jan 19 03:09:17 2016
Return-Path: <owner-svn-src-all@freebsd.org>
Delivered-To: svn-src-all@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1A7F1A87CCB;
 Tue, 19 Jan 2016 03:09:17 +0000 (UTC)
 (envelope-from chmeeedalf@gmail.com)
Received: from mail-ig0-x235.google.com (mail-ig0-x235.google.com
 [IPv6:2607:f8b0:4001: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 D7FE71AA7;
 Tue, 19 Jan 2016 03:09:16 +0000 (UTC)
 (envelope-from chmeeedalf@gmail.com)
Received: by mail-ig0-x235.google.com with SMTP id z14so68283983igp.0;
 Mon, 18 Jan 2016 19:09:16 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;
 h=cc:message-id:from:to:in-reply-to:content-type
 :content-transfer-encoding:mime-version:subject:date:references;
 bh=wHThOCZipN8Rjf9w5CxcExPAYdLgh0SK2oVYfUQ4YKs=;
 b=rnILlGaSHKvS4+Q5PN4fJtBuZuPKk9miO00uftML8uxS4tviyRlfG7R/uj3zzIbUa+
 CNBMfDv4lVXrJbDGHTd+uCuxDRqjGNHcgqJ6waf1t9p1T+9+hnV2+2V0N+0rnHc5H9qQ
 awfKGy9Dlo0irr6DoKvT6riR+YAe5uoppvrlh2ECr4wQifyMoDKqesNx3e65P7y49gxy
 zaJnbRbV9N8mZCRPAjIZvb06DyB5aX3I30eDL95Zg2iEKza48lWgK45h8biQLcN9fTPi
 ncUihtiGG5HbvIwIqI1SIfz8R/iE86szd1IVMOuUt1WxUuRrG7qGhl5j8F36mq31Eu6Y
 MOjQ==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20130820;
 h=x-gm-message-state:cc:message-id:from:to:in-reply-to:content-type
 :content-transfer-encoding:mime-version:subject:date:references;
 bh=wHThOCZipN8Rjf9w5CxcExPAYdLgh0SK2oVYfUQ4YKs=;
 b=FYrWP4+btsAQpZyCU6v+6vY8WFSbKUuUa+aUMo05QINSKpY4fw/7P6w3cJYvYP4Xll
 ku9UdtmBtWQEk2Lshc6reZRLfp22uB60SNIZXjgmm+tut+ufKPw2yCWKDqxyApo4ZS3M
 3tUErY+q8sR9Iw3BIAyq1K+6kXlYFxjvsi/QLD5EF/VxQTakXVPBcW/7O+EFADdqxcex
 rRfEro1GpVtWc6GEWQVQSxQjbtWcQdw0KCD+W4XwOUOoM9v+HKrU14ivnEq3pOVqWDtC
 XKnQAnHCrXCaWSglO4oM7E8Zh9Ygdj3QL+8qI+jEdXn+SS1rvJhEXnxQTd2TX0ptIwd7
 wqBQ==
X-Gm-Message-State: AG10YOSmy6ZG9O8NCMveemboHWdN8IpL0OUROgV4ZhDWOpC6vC7loXTZDF/PSCH1sqBLuQ==
X-Received: by 10.50.50.228 with SMTP id f4mr13695633igo.6.1453172956280;
 Mon, 18 Jan 2016 19:09:16 -0800 (PST)
Received: from blackstar.knownspace (c-98-240-160-157.hsd1.mn.comcast.net.
 [98.240.160.157])
 by smtp.gmail.com with ESMTPSA id j10sm6573728igx.15.2016.01.18.19.09.15
 (version=TLS1 cipher=AES128-SHA bits=128/128);
 Mon, 18 Jan 2016 19:09:15 -0800 (PST)
Cc: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-head@freebsd.org
Message-Id: <295CDA32-E579-4479-8754-84FFC6E1C5B2@gmail.com>
From: Justin Hibbits <chmeeedalf@gmail.com>
To: Justin Hibbits <jhibbits@FreeBSD.org>
In-Reply-To: <201601190307.u0J37QQ9011693@repo.freebsd.org>
Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes
Content-Transfer-Encoding: 7bit
Mime-Version: 1.0 (Apple Message framework v936)
Subject: Re: svn commit: r294307 - head/sys/powerpc/booke
Date: Mon, 18 Jan 2016 21:09:14 -0600
References: <201601190307.u0J37QQ9011693@repo.freebsd.org>
X-Mailer: Apple Mail (2.936)
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.20
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for &quot;
 user&quot; and &quot; projects&quot; \)" <svn-src-all.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-all/>
List-Post: <mailto:svn-src-all@freebsd.org>
List-Help: <mailto:svn-src-all-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Tue, 19 Jan 2016 03:09:17 -0000

On Jan 18, 2016, at 9:07 PM, Justin Hibbits wrote:

> @@ -3237,7 +3249,11 @@ tlb1_mapin_region(vm_offset_t va, vm_pad
> 	}
>
> 	mapped = (va - base);
> +#ifdef __powerpc64__
> +	printf("mapped size 0x%016lx (wasted space 0x%16lx)\n",
> +#else
> 	printf("mapped size 0x%08x (wasted space 0x%08x)\n",
> +#endif
> 	    mapped, mapped - size);
> 	return (mapped);
> }
>

This segment shouldn't have been committed.  I'll leave it in, though,  
since otherwise it'd be just churn, as it'll be added back anyway in  
the not too distant future.

- Justin

From owner-svn-src-all@freebsd.org  Tue Jan 19 03:54:39 2016
Return-Path: <owner-svn-src-all@freebsd.org>
Delivered-To: svn-src-all@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id 886FBA88A60;
 Tue, 19 Jan 2016 03:54:39 +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 5A10A1F7C;
 Tue, 19 Jan 2016 03:54:39 +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 u0J3scD4026122;
 Tue, 19 Jan 2016 03:54:38 GMT (envelope-from emaste@FreeBSD.org)
Received: (from emaste@localhost)
 by repo.freebsd.org (8.15.2/8.15.2/Submit) id u0J3scG4026121;
 Tue, 19 Jan 2016 03:54:38 GMT (envelope-from emaste@FreeBSD.org)
Message-Id: <201601190354.u0J3scG4026121@repo.freebsd.org>
X-Authentication-Warning: repo.freebsd.org: emaste set sender to
 emaste@FreeBSD.org using -f
From: Ed Maste <emaste@FreeBSD.org>
Date: Tue, 19 Jan 2016 03:54:38 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-head@freebsd.org
Subject: svn commit: r294308 - head/gnu/lib/libgcc
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.20
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for &quot;
 user&quot; and &quot; projects&quot; \)" <svn-src-all.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-all/>
List-Post: <mailto:svn-src-all@freebsd.org>
List-Help: <mailto:svn-src-all-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Tue, 19 Jan 2016 03:54:39 -0000

Author: emaste
Date: Tue Jan 19 03:54:38 2016
New Revision: 294308
URL: https://svnweb.freebsd.org/changeset/base/294308

Log:
  Remove local override for .cpp.So rule
  
  The standard bsd.lib.mk rule is suitable for libgcc_s's C++ source.
  
  The local rule had the following non-functional argument differences
  or additions:
  
  1. -DSHARED (rather than -DPIC from bsd.lib.mk)
  
     The C++ sources don't have an #ifdef for either one.
  
  2. -fexceptions
  
     This is enabled by default for C++ so does not need to be set
     explicitly.
  
  3. -D__GLIBC__=3
  
     Not used by LLVM libunwind.
  
  4. -DElfW=__ElfN
  
     LLVM libunwind provides its own definition.
  
  PR:		206381
  Differential Revision:	The FreeBSD Foundation

Modified:
  head/gnu/lib/libgcc/Makefile

Modified: head/gnu/lib/libgcc/Makefile
==============================================================================
--- head/gnu/lib/libgcc/Makefile	Tue Jan 19 03:07:25 2016	(r294307)
+++ head/gnu/lib/libgcc/Makefile	Tue Jan 19 03:54:38 2016	(r294308)
@@ -206,7 +206,6 @@ CC_P =	${CC} -c ${CFLAGS} ${HIDE} -p -fP
 CC_S =	${CC} -c ${CFLAGS} ${PICFLAG} -DSHARED
 CXX_T =	${CXX} -c ${CXXFLAGS} ${HIDE} -fPIC
 CXX_P =	${CXX} -c ${CXXFLAGS} ${HIDE} -p -fPIC
-CXX_S =	${CXX} -c ${CXXFLAGS} ${PICFLAG} -DSHARED
 
 #-----------------------------------------------------------------------
 #
@@ -337,10 +336,6 @@ ${_src:R:S/$/.po/}: ${_src} ${COMMONHDRS
 ${_src:R:S/$/.So/}: ${_src} ${COMMONHDRS}
 	${CC_S} ${EH_CFLAGS} -o ${.TARGET} ${.IMPSRC}
 .endfor
-.for _src in ${LIB2ADDEHSHARED:M*.cpp}
-${_src:R:S/$/.So/}: ${_src} ${COMMONHDRS}
-	${CXX_S} ${EH_CFLAGS} -o ${.TARGET} ${.IMPSRC}
-.endfor
 
 
 #-----------------------------------------------------------------------

From owner-svn-src-all@freebsd.org  Tue Jan 19 06:03:46 2016
Return-Path: <owner-svn-src-all@freebsd.org>
Delivered-To: svn-src-all@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id 724FDA8864F;
 Tue, 19 Jan 2016 06:03:46 +0000 (UTC)
 (envelope-from arybchik@FreeBSD.org)
Received: from repo.freebsd.org (repo.freebsd.org
 [IPv6:2610:1c1:1:6068::e6a:0])
 (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
 (Client did not present a certificate)
 by mx1.freebsd.org (Postfix) with ESMTPS id 4945E18BF;
 Tue, 19 Jan 2016 06:03:46 +0000 (UTC)
 (envelope-from arybchik@FreeBSD.org)
Received: from repo.freebsd.org ([127.0.1.37])
 by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u0J63jZV063855;
 Tue, 19 Jan 2016 06:03:45 GMT (envelope-from arybchik@FreeBSD.org)
Received: (from arybchik@localhost)
 by repo.freebsd.org (8.15.2/8.15.2/Submit) id u0J63ikt063850;
 Tue, 19 Jan 2016 06:03:44 GMT (envelope-from arybchik@FreeBSD.org)
Message-Id: <201601190603.u0J63ikt063850@repo.freebsd.org>
X-Authentication-Warning: repo.freebsd.org: arybchik set sender to
 arybchik@FreeBSD.org using -f
From: Andrew Rybchenko <arybchik@FreeBSD.org>
Date: Tue, 19 Jan 2016 06:03:44 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-head@freebsd.org
Subject: svn commit: r294309 - head/sys/dev/sfxge/common
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.20
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for &quot;
 user&quot; and &quot; projects&quot; \)" <svn-src-all.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-all/>
List-Post: <mailto:svn-src-all@freebsd.org>
List-Help: <mailto:svn-src-all-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Tue, 19 Jan 2016 06:03:46 -0000

Author: arybchik
Date: Tue Jan 19 06:03:44 2016
New Revision: 294309
URL: https://svnweb.freebsd.org/changeset/base/294309

Log:
  sfxge: select whether to read current or backup partition in Medford A/B scheme
  
  The dynamic config on Medford is stored using two partitions in flash, and at
  any time one is the 'current' partition, used to provide the active config,
  and the other 'backup' partition is used for writes.  This means that there
  are two potential partitions that can be used to service reads, and which is
  required can depend on, for example, whether the read is to get the current
  contents or to verify a write.
  
  When the partition write lock is held, the default behaviour is to read from
  the backup partition, which was wrong for most reads in the common code which
  require the current partition. This change allows the current partition to be
  read whilst the write lock is held.
  There is one read in Manftest which needs the backup partition.
  
  ef10_nvram_partn_read_mode() is created to avoid changing
  ef10_nvram_partn_read() which shares a prototype with the equivalent Falcon
  and Siena methods.
  
  MC_CMD_NVRAM_READ_IN_V2 adds an extra field, but firmware which doesn't support
  it just ignores it.
  
  Submitted by:   Mark Spender <mspender at solarflare.com>
  Sponsored by:   Solarflare Communications, Inc.
  MFC after:      2 days
  Differential Revision: https://reviews.freebsd.org/D4974

Modified:
  head/sys/dev/sfxge/common/efx_impl.h
  head/sys/dev/sfxge/common/efx_nvram.c
  head/sys/dev/sfxge/common/hunt_impl.h
  head/sys/dev/sfxge/common/hunt_nvram.c
  head/sys/dev/sfxge/common/siena_nvram.c

Modified: head/sys/dev/sfxge/common/efx_impl.h
==============================================================================
--- head/sys/dev/sfxge/common/efx_impl.h	Tue Jan 19 03:54:38 2016	(r294308)
+++ head/sys/dev/sfxge/common/efx_impl.h	Tue Jan 19 06:03:44 2016	(r294309)
@@ -559,7 +559,8 @@ efx_mcdi_nvram_read(
 	__in			uint32_t partn,
 	__in			uint32_t offset,
 	__out_bcount(size)	caddr_t data,
-	__in			size_t size);
+	__in			size_t size,
+	__in			uint32_t mode);
 
 	__checkReturn		efx_rc_t
 efx_mcdi_nvram_erase(

Modified: head/sys/dev/sfxge/common/efx_nvram.c
==============================================================================
--- head/sys/dev/sfxge/common/efx_nvram.c	Tue Jan 19 03:54:38 2016	(r294308)
+++ head/sys/dev/sfxge/common/efx_nvram.c	Tue Jan 19 06:03:44 2016	(r294309)
@@ -721,10 +721,11 @@ efx_mcdi_nvram_read(
 	__in			uint32_t partn,
 	__in			uint32_t offset,
 	__out_bcount(size)	caddr_t data,
-	__in			size_t size)
+	__in			size_t size,
+	__in			uint32_t mode)
 {
 	efx_mcdi_req_t req;
-	uint8_t payload[MAX(MC_CMD_NVRAM_READ_IN_LEN,
+	uint8_t payload[MAX(MC_CMD_NVRAM_READ_IN_V2_LEN,
 			    MC_CMD_NVRAM_READ_OUT_LENMAX)];
 	efx_rc_t rc;
 
@@ -736,13 +737,14 @@ efx_mcdi_nvram_read(
 	(void) memset(payload, 0, sizeof (payload));
 	req.emr_cmd = MC_CMD_NVRAM_READ;
 	req.emr_in_buf = payload;
-	req.emr_in_length = MC_CMD_NVRAM_READ_IN_LEN;
+	req.emr_in_length = MC_CMD_NVRAM_READ_IN_V2_LEN;
 	req.emr_out_buf = payload;
 	req.emr_out_length = MC_CMD_NVRAM_READ_OUT_LENMAX;
 
-	MCDI_IN_SET_DWORD(req, NVRAM_READ_IN_TYPE, partn);
-	MCDI_IN_SET_DWORD(req, NVRAM_READ_IN_OFFSET, offset);
-	MCDI_IN_SET_DWORD(req, NVRAM_READ_IN_LENGTH, size);
+	MCDI_IN_SET_DWORD(req, NVRAM_READ_IN_V2_TYPE, partn);
+	MCDI_IN_SET_DWORD(req, NVRAM_READ_IN_V2_OFFSET, offset);
+	MCDI_IN_SET_DWORD(req, NVRAM_READ_IN_V2_LENGTH, size);
+	MCDI_IN_SET_DWORD(req, NVRAM_READ_IN_V2_MODE, mode);
 
 	efx_mcdi_execute(enp, &req);
 

Modified: head/sys/dev/sfxge/common/hunt_impl.h
==============================================================================
--- head/sys/dev/sfxge/common/hunt_impl.h	Tue Jan 19 03:54:38 2016	(r294308)
+++ head/sys/dev/sfxge/common/hunt_impl.h	Tue Jan 19 06:03:44 2016	(r294309)
@@ -409,6 +409,15 @@ ef10_nvram_partn_rw_start(
 	__out			size_t *chunk_sizep);
 
 extern	__checkReturn		efx_rc_t
+ef10_nvram_partn_read_mode(
+	__in			efx_nic_t *enp,
+	__in			uint32_t partn,
+	__in			unsigned int offset,
+	__out_bcount(size)	caddr_t data,
+	__in			size_t size,
+	__in			uint32_t mode);
+
+extern	__checkReturn		efx_rc_t
 ef10_nvram_partn_read(
 	__in			efx_nic_t *enp,
 	__in			uint32_t partn,

Modified: head/sys/dev/sfxge/common/hunt_nvram.c
==============================================================================
--- head/sys/dev/sfxge/common/hunt_nvram.c	Tue Jan 19 03:54:38 2016	(r294308)
+++ head/sys/dev/sfxge/common/hunt_nvram.c	Tue Jan 19 06:03:44 2016	(r294309)
@@ -598,8 +598,9 @@ ef10_nvram_read_tlv_segment(
 	}
 
 	/* Read initial chunk of the segment, starting at offset */
-	if ((rc = ef10_nvram_partn_read(enp, partn, seg_offset, seg_data,
-		    EF10_NVRAM_CHUNK)) != 0) {
+	if ((rc = ef10_nvram_partn_read_mode(enp, partn, seg_offset, seg_data,
+		    EF10_NVRAM_CHUNK,
+		    MC_CMD_NVRAM_READ_IN_V2_TARGET_CURRENT)) != 0) {
 		goto fail2;
 	}
 
@@ -624,10 +625,11 @@ ef10_nvram_read_tlv_segment(
 
 	/* Read the remaining segment content */
 	if (total_length > EF10_NVRAM_CHUNK) {
-		if ((rc = ef10_nvram_partn_read(enp, partn,
+		if ((rc = ef10_nvram_partn_read_mode(enp, partn,
 			    seg_offset + EF10_NVRAM_CHUNK,
 			    seg_data + EF10_NVRAM_CHUNK,
-			    total_length - EF10_NVRAM_CHUNK)) != 0)
+			    total_length - EF10_NVRAM_CHUNK,
+			    MC_CMD_NVRAM_READ_IN_V2_TARGET_CURRENT)) != 0)
 			goto fail6;
 	}
 
@@ -1321,12 +1323,13 @@ fail1:
 }
 
 	__checkReturn		efx_rc_t
-ef10_nvram_partn_read(
+ef10_nvram_partn_read_mode(
 	__in			efx_nic_t *enp,
 	__in			uint32_t partn,
 	__in			unsigned int offset,
 	__out_bcount(size)	caddr_t data,
-	__in			size_t size)
+	__in			size_t size,
+	__in			uint32_t mode)
 {
 	size_t chunk;
 	efx_rc_t rc;
@@ -1335,7 +1338,7 @@ ef10_nvram_partn_read(
 		chunk = MIN(size, EF10_NVRAM_CHUNK);
 
 		if ((rc = efx_mcdi_nvram_read(enp, partn, offset,
-			    data, chunk)) != 0) {
+			    data, chunk, mode)) != 0) {
 			goto fail1;
 		}
 
@@ -1353,6 +1356,22 @@ fail1:
 }
 
 	__checkReturn		efx_rc_t
+ef10_nvram_partn_read(
+	__in			efx_nic_t *enp,
+	__in			uint32_t partn,
+	__in			unsigned int offset,
+	__out_bcount(size)	caddr_t data,
+	__in			size_t size)
+{
+	/*
+	 * Read requests which come in through the EFX API expect to
+	 * read the current, active partition.
+	 */
+	return ef10_nvram_partn_read_mode(enp, partn, offset, data, size,
+			    MC_CMD_NVRAM_READ_IN_V2_TARGET_CURRENT);
+}
+
+	__checkReturn		efx_rc_t
 ef10_nvram_partn_erase(
 	__in			efx_nic_t *enp,
 	__in			uint32_t partn,

Modified: head/sys/dev/sfxge/common/siena_nvram.c
==============================================================================
--- head/sys/dev/sfxge/common/siena_nvram.c	Tue Jan 19 03:54:38 2016	(r294308)
+++ head/sys/dev/sfxge/common/siena_nvram.c	Tue Jan 19 06:03:44 2016	(r294309)
@@ -99,8 +99,8 @@ siena_nvram_partn_read(
 	while (size > 0) {
 		chunk = MIN(size, SIENA_NVRAM_CHUNK);
 
-		if ((rc = efx_mcdi_nvram_read(enp, partn, offset,
-			    data, chunk)) != 0) {
+		if ((rc = efx_mcdi_nvram_read(enp, partn, offset, data, chunk,
+			    MC_CMD_NVRAM_READ_IN_V2_DEFAULT)) != 0) {
 			goto fail1;
 		}
 

From owner-svn-src-all@freebsd.org  Tue Jan 19 06:07:41 2016
Return-Path: <owner-svn-src-all@freebsd.org>
Delivered-To: svn-src-all@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id 64DD6A88770;
 Tue, 19 Jan 2016 06:07:41 +0000 (UTC)
 (envelope-from arybchik@FreeBSD.org)
Received: from repo.freebsd.org (repo.freebsd.org
 [IPv6:2610:1c1:1:6068::e6a:0])
 (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
 (Client did not present a certificate)
 by mx1.freebsd.org (Postfix) with ESMTPS id 228251BEB;
 Tue, 19 Jan 2016 06:07:41 +0000 (UTC)
 (envelope-from arybchik@FreeBSD.org)
Received: from repo.freebsd.org ([127.0.1.37])
 by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u0J67esk064147;
 Tue, 19 Jan 2016 06:07:40 GMT (envelope-from arybchik@FreeBSD.org)
Received: (from arybchik@localhost)
 by repo.freebsd.org (8.15.2/8.15.2/Submit) id u0J67eUv064146;
 Tue, 19 Jan 2016 06:07:40 GMT (envelope-from arybchik@FreeBSD.org)
Message-Id: <201601190607.u0J67eUv064146@repo.freebsd.org>
X-Authentication-Warning: repo.freebsd.org: arybchik set sender to
 arybchik@FreeBSD.org using -f
From: Andrew Rybchenko <arybchik@FreeBSD.org>
Date: Tue, 19 Jan 2016 06:07:40 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-head@freebsd.org
Subject: svn commit: r294310 - head/sys/dev/sfxge/common
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.20
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for &quot;
 user&quot; and &quot; projects&quot; \)" <svn-src-all.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-all/>
List-Post: <mailto:svn-src-all@freebsd.org>
List-Help: <mailto:svn-src-all-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Tue, 19 Jan 2016 06:07:41 -0000

Author: arybchik
Date: Tue Jan 19 06:07:39 2016
New Revision: 294310
URL: https://svnweb.freebsd.org/changeset/base/294310

Log:
  sfxge: improve error handling in ef10_ev_rx()
  
  Ensure that checksum flags and L3/L4 fields are ignored
  if lower level errors are reported in the event.
  
  Remove checks for CRC0_ERR (bad iSCSI header CRC) and
  CRC1_ERR (bad iSCSI payload or FCoE/FCoIP CRC) as they
  are not used by any existing code.
  
  Submitted by:   Andy Moreton <amoreton at solarflare.com>
  Sponsored by:   Solarflare Communications, Inc.
  MFC after:      2 days
  Differential Revision: https://reviews.freebsd.org/D4975

Modified:
  head/sys/dev/sfxge/common/hunt_ev.c

Modified: head/sys/dev/sfxge/common/hunt_ev.c
==============================================================================
--- head/sys/dev/sfxge/common/hunt_ev.c	Tue Jan 19 06:03:44 2016	(r294309)
+++ head/sys/dev/sfxge/common/hunt_ev.c	Tue Jan 19 06:07:39 2016	(r294310)
@@ -486,17 +486,14 @@ ef10_ev_rx(
 {
 	efx_nic_t *enp = eep->ee_enp;
 	uint32_t size;
-#if 0
-	boolean_t parse_err;
-#endif
 	uint32_t label;
-	uint32_t mcast;
-	uint32_t eth_base_class;
+	uint32_t mac_class;
 	uint32_t eth_tag_class;
 	uint32_t l3_class;
 	uint32_t l4_class;
 	uint32_t next_read_lbits;
 	uint16_t flags;
+	boolean_t cont;
 	boolean_t should_abort;
 	efx_evq_rxq_state_t *eersp;
 	unsigned int desc_count;
@@ -508,10 +505,15 @@ ef10_ev_rx(
 	if (enp->en_reset_flags & (EFX_RESET_RXQ_ERR | EFX_RESET_TXQ_ERR))
 		return (B_FALSE);
 
-	/*
-	 * FIXME: likely to be incomplete, incorrect and inefficient.
-	 * Improvements in all three areas are required.
-	 */
+	/* Basic packet information */
+	size = EFX_QWORD_FIELD(*eqp, ESF_DZ_RX_BYTES);
+	next_read_lbits = EFX_QWORD_FIELD(*eqp, ESF_DZ_RX_DSC_PTR_LBITS);
+	label = EFX_QWORD_FIELD(*eqp, ESF_DZ_RX_QLABEL);
+	eth_tag_class = EFX_QWORD_FIELD(*eqp, ESF_DZ_RX_ETH_TAG_CLASS);
+	mac_class = EFX_QWORD_FIELD(*eqp, ESF_DZ_RX_MAC_CLASS);
+	l3_class = EFX_QWORD_FIELD(*eqp, ESF_DZ_RX_L3_CLASS);
+	l4_class = EFX_QWORD_FIELD(*eqp, ESF_DZ_RX_L4_CLASS);
+	cont = EFX_QWORD_FIELD(*eqp, ESF_DZ_RX_CONT);
 
 	if (EFX_QWORD_FIELD(*eqp, ESF_DZ_RX_DROP_EVENT) != 0) {
 		/* Drop this event */
@@ -519,9 +521,7 @@ ef10_ev_rx(
 	}
 	flags = 0;
 
-	size = EFX_QWORD_FIELD(*eqp, ESF_DZ_RX_BYTES);
-
-	if (EFX_QWORD_FIELD(*eqp, ESF_DZ_RX_CONT) != 0) {
+	if (cont != 0) {
 		/*
 		 * This may be part of a scattered frame, or it may be a
 		 * truncated frame if scatter is disabled on this RXQ.
@@ -534,41 +534,9 @@ ef10_ev_rx(
 		flags |= EFX_PKT_CONT;
 	}
 
-#if 0
-	/* TODO What to do if the packet is flagged with parsing error */
-	parse_err = (EFX_QWORD_FIELD(*eqp, ESF_DZ_RX_PARSE_INCOMPLETE) != 0);
-#endif
-	label = EFX_QWORD_FIELD(*eqp, ESF_DZ_RX_QLABEL);
-
-	if (EFX_QWORD_FIELD(*eqp, ESF_DZ_RX_ECRC_ERR) != 0) {
-		/* Ethernet frame CRC bad */
-		flags |= EFX_DISCARD;
-	}
-	if (EFX_QWORD_FIELD(*eqp, ESF_DZ_RX_CRC0_ERR) != 0) {
-		/* IP+TCP, bad CRC in iSCSI header */
-		flags |= EFX_DISCARD;
-	}
-	if (EFX_QWORD_FIELD(*eqp, ESF_DZ_RX_CRC1_ERR) != 0) {
-		/* IP+TCP, bad CRC in iSCSI payload or FCoE or FCoIP */
-		flags |= EFX_DISCARD;
-	}
-	if (EFX_QWORD_FIELD(*eqp, ESF_DZ_RX_ECC_ERR) != 0) {
-		/* ECC memory error */
-		flags |= EFX_DISCARD;
-	}
-
-	mcast = EFX_QWORD_FIELD(*eqp, ESF_DZ_RX_MAC_CLASS);
-	if (mcast == ESE_DZ_MAC_CLASS_UCAST)
+	if (mac_class == ESE_DZ_MAC_CLASS_UCAST)
 		flags |= EFX_PKT_UNICAST;
 
-	eth_base_class = EFX_QWORD_FIELD(*eqp, ESF_DZ_RX_ETH_BASE_CLASS);
-	eth_tag_class = EFX_QWORD_FIELD(*eqp, ESF_DZ_RX_ETH_TAG_CLASS);
-	l3_class = EFX_QWORD_FIELD(*eqp, ESF_DZ_RX_L3_CLASS);
-	l4_class = EFX_QWORD_FIELD(*eqp, ESF_DZ_RX_L4_CLASS);
-
-	/* bottom 4 bits of incremented index (not last desc consumed) */
-	next_read_lbits = EFX_QWORD_FIELD(*eqp, ESF_DZ_RX_DSC_PTR_LBITS);
-
 	/* Increment the count of descriptors read */
 	eersp = &eep->ee_rxq_state[label];
 	desc_count = (next_read_lbits - eersp->eers_rx_read_ptr) &
@@ -587,88 +555,84 @@ ef10_ev_rx(
 	/* Calculate the index of the the last descriptor consumed */
 	last_used_id = (eersp->eers_rx_read_ptr - 1) & eersp->eers_rx_mask;
 
-	/* EFX_QWORD_FIELD(*eqp, ESF_DZ_RX_OVERRIDE_HOLDOFF); */
-
-	switch (eth_base_class) {
-	case ESE_DZ_ETH_BASE_CLASS_LLC_SNAP:
-	case ESE_DZ_ETH_BASE_CLASS_LLC:
-	case ESE_DZ_ETH_BASE_CLASS_ETH2:
-	default:
-		break;
+	/* Check for errors that invalidate checksum and L3/L4 fields */
+	if (EFX_QWORD_FIELD(*eqp, ESF_DZ_RX_ECC_ERR) != 0) {
+		/* RX frame truncated (error flag is misnamed) */
+		EFX_EV_QSTAT_INCR(eep, EV_RX_FRM_TRUNC);
+		flags |= EFX_DISCARD;
+		goto deliver;
+	}
+	if (EFX_QWORD_FIELD(*eqp, ESF_DZ_RX_ECRC_ERR) != 0) {
+		/* Bad Ethernet frame CRC */
+		EFX_EV_QSTAT_INCR(eep, EV_RX_ETH_CRC_ERR);
+		flags |= EFX_DISCARD;
+		goto deliver;
+	}
+	if (EFX_QWORD_FIELD(*eqp, ESF_DZ_RX_PARSE_INCOMPLETE)) {
+		/*
+		 * Hardware parse failed, due to malformed headers
+		 * or headers that are too long for the parser.
+		 * Headers and checksums must be validated by the host.
+		 */
+		// TODO: EFX_EV_QSTAT_INCR(eep, EV_RX_PARSE_INCOMPLETE);
+		goto deliver;
 	}
 
-	switch (eth_tag_class) {
-	case ESE_DZ_ETH_TAG_CLASS_RSVD7:
-	case ESE_DZ_ETH_TAG_CLASS_RSVD6:
-	case ESE_DZ_ETH_TAG_CLASS_RSVD5:
-	case ESE_DZ_ETH_TAG_CLASS_RSVD4:
-		break;
-
-	case ESE_DZ_ETH_TAG_CLASS_RSVD3: /* Triple tagged */
-	case ESE_DZ_ETH_TAG_CLASS_VLAN2: /* Double tagged */
-	case ESE_DZ_ETH_TAG_CLASS_VLAN1: /* VLAN tagged */
+	if ((eth_tag_class == ESE_DZ_ETH_TAG_CLASS_VLAN1) ||
+	    (eth_tag_class == ESE_DZ_ETH_TAG_CLASS_VLAN2)) {
 		flags |= EFX_PKT_VLAN_TAGGED;
-		break;
-
-	case ESE_DZ_ETH_TAG_CLASS_NONE:
-	default:
-		break;
 	}
 
 	switch (l3_class) {
-	case ESE_DZ_L3_CLASS_RSVD7: /* Used by firmware for packet overrun */
-#if 0
-		parse_err = B_TRUE;
-#endif
-		flags |= EFX_DISCARD;
-		break;
+	case ESE_DZ_L3_CLASS_IP4:
+	case ESE_DZ_L3_CLASS_IP4_FRAG:
+		flags |= EFX_PKT_IPV4;
+		if (EFX_QWORD_FIELD(*eqp, ESF_DZ_RX_IPCKSUM_ERR)) {
+			EFX_EV_QSTAT_INCR(eep, EV_RX_IPV4_HDR_CHKSUM_ERR);
+		} else {
+			flags |= EFX_CKSUM_IPV4;
+		}
 
-	case ESE_DZ_L3_CLASS_ARP:
-	case ESE_DZ_L3_CLASS_FCOE:
+		if (l4_class == ESE_DZ_L4_CLASS_TCP) {
+			EFX_EV_QSTAT_INCR(eep, EV_RX_TCP_IPV4);
+			flags |= EFX_PKT_TCP;
+		} else if (l4_class == ESE_DZ_L4_CLASS_UDP) {
+			EFX_EV_QSTAT_INCR(eep, EV_RX_UDP_IPV4);
+			flags |= EFX_PKT_UDP;
+		} else {
+			EFX_EV_QSTAT_INCR(eep, EV_RX_OTHER_IPV4);
+		}
 		break;
 
-	case ESE_DZ_L3_CLASS_IP6_FRAG:
 	case ESE_DZ_L3_CLASS_IP6:
+	case ESE_DZ_L3_CLASS_IP6_FRAG:
 		flags |= EFX_PKT_IPV6;
-		break;
 
-	case ESE_DZ_L3_CLASS_IP4_FRAG:
-	case ESE_DZ_L3_CLASS_IP4:
-		flags |= EFX_PKT_IPV4;
-		if (EFX_QWORD_FIELD(*eqp, ESF_DZ_RX_IPCKSUM_ERR) == 0)
-			flags |= EFX_CKSUM_IPV4;
+		if (l4_class == ESE_DZ_L4_CLASS_TCP) {
+			EFX_EV_QSTAT_INCR(eep, EV_RX_TCP_IPV6);
+			flags |= EFX_PKT_TCP;
+		} else if (l4_class == ESE_DZ_L4_CLASS_UDP) {
+			EFX_EV_QSTAT_INCR(eep, EV_RX_UDP_IPV6);
+			flags |= EFX_PKT_UDP;
+		} else {
+			EFX_EV_QSTAT_INCR(eep, EV_RX_OTHER_IPV6);
+		}
 		break;
 
-	case ESE_DZ_L3_CLASS_UNKNOWN:
 	default:
+		EFX_EV_QSTAT_INCR(eep, EV_RX_NON_IP);
 		break;
 	}
 
-	switch (l4_class) {
-	case ESE_DZ_L4_CLASS_RSVD7:
-	case ESE_DZ_L4_CLASS_RSVD6:
-	case ESE_DZ_L4_CLASS_RSVD5:
-	case ESE_DZ_L4_CLASS_RSVD4:
-	case ESE_DZ_L4_CLASS_RSVD3:
-		break;
-
-	case ESE_DZ_L4_CLASS_UDP:
-		flags |= EFX_PKT_UDP;
-		if (EFX_QWORD_FIELD(*eqp, ESF_DZ_RX_TCPUDP_CKSUM_ERR) == 0)
-			flags |= EFX_CKSUM_TCPUDP;
-		break;
-
-	case ESE_DZ_L4_CLASS_TCP:
-		flags |= EFX_PKT_TCP;
-		if (EFX_QWORD_FIELD(*eqp, ESF_DZ_RX_TCPUDP_CKSUM_ERR) == 0)
+	if (flags & (EFX_PKT_TCP | EFX_PKT_UDP)) {
+		if (EFX_QWORD_FIELD(*eqp, ESF_DZ_RX_TCPUDP_CKSUM_ERR)) {
+			EFX_EV_QSTAT_INCR(eep, EV_RX_TCP_UDP_CHKSUM_ERR);
+		} else {
 			flags |= EFX_CKSUM_TCPUDP;
-		break;
-
-	case ESE_DZ_L4_CLASS_UNKNOWN:
-	default:
-		break;
+		}
 	}
 
+deliver:
 	/* If we're not discarding the packet then it is ok */
 	if (~flags & EFX_DISCARD)
 		EFX_EV_QSTAT_INCR(eep, EV_RX_OK);

From owner-svn-src-all@freebsd.org  Tue Jan 19 08:04:03 2016
Return-Path: <owner-svn-src-all@freebsd.org>
Delivered-To: svn-src-all@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id E2857A88E79;
 Tue, 19 Jan 2016 08:04:03 +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 AF7641D13;
 Tue, 19 Jan 2016 08:04:03 +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 u0J842wn098055;
 Tue, 19 Jan 2016 08:04:02 GMT (envelope-from kib@FreeBSD.org)
Received: (from kib@localhost)
 by repo.freebsd.org (8.15.2/8.15.2/Submit) id u0J842uu098054;
 Tue, 19 Jan 2016 08:04:02 GMT (envelope-from kib@FreeBSD.org)
Message-Id: <201601190804.u0J842uu098054@repo.freebsd.org>
X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org
 using -f
From: Konstantin Belousov <kib@FreeBSD.org>
Date: Tue, 19 Jan 2016 08:04:02 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-head@freebsd.org
Subject: svn commit: r294311 - head/sys/amd64/amd64
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.20
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for &quot;
 user&quot; and &quot; projects&quot; \)" <svn-src-all.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-all/>
List-Post: <mailto:svn-src-all@freebsd.org>
List-Help: <mailto:svn-src-all-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Tue, 19 Jan 2016 08:04:04 -0000

Author: kib
Date: Tue Jan 19 08:04:02 2016
New Revision: 294311
URL: https://svnweb.freebsd.org/changeset/base/294311

Log:
  Clear whole XMM register file instead of only XMM0.  Also clear x87
  registers.  This brings amd64 on par with i386, providing consistent
  initial FPU state.
  
  Note that we do not clear any extended state, at least because kernel
  does not understand extended state structure and consequences of zero
  overwrite after fninit()/fpusave().
  
  Submitted by:	joss.upton@yahoo.com
  PR:	206370
  MFC after:	2 weeks

Modified:
  head/sys/amd64/amd64/fpu.c

Modified: head/sys/amd64/amd64/fpu.c
==============================================================================
--- head/sys/amd64/amd64/fpu.c	Tue Jan 19 06:07:39 2016	(r294310)
+++ head/sys/amd64/amd64/fpu.c	Tue Jan 19 08:04:02 2016	(r294311)
@@ -318,13 +318,15 @@ fpuinitstate(void *arg __unused)
 		cpu_mxcsr_mask = 0xFFBF;
 
 	/*
-	 * The fninit instruction does not modify XMM registers.  The
-	 * fpusave call dumped the garbage contained in the registers
-	 * after reset to the initial state saved.  Clear XMM
-	 * registers file image to make the startup program state and
-	 * signal handler XMM register content predictable.
+	 * The fninit instruction does not modify XMM registers or x87
+	 * registers (MM/ST).  The fpusave call dumped the garbage
+	 * contained in the registers after reset to the initial state
+	 * saved.  Clear XMM and x87 registers file image to make the
+	 * startup program state and signal handler XMM/x87 register
+	 * content predictable.
 	 */
-	bzero(&fpu_initialstate->sv_xmm[0], sizeof(struct xmmacc));
+	bzero(fpu_initialstate->sv_fp, sizeof(fpu_initialstate->sv_fp));
+	bzero(fpu_initialstate->sv_xmm, sizeof(fpu_initialstate->sv_xmm));
 
 	/*
 	 * Create a table describing the layout of the CPU Extended

From owner-svn-src-all@freebsd.org  Tue Jan 19 08:08:09 2016
Return-Path: <owner-svn-src-all@freebsd.org>
Delivered-To: svn-src-all@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id CCB53A88FBC;
 Tue, 19 Jan 2016 08:08:09 +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 9C0251F68;
 Tue, 19 Jan 2016 08:08: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 u0J888tM098250;
 Tue, 19 Jan 2016 08:08:08 GMT (envelope-from kib@FreeBSD.org)
Received: (from kib@localhost)
 by repo.freebsd.org (8.15.2/8.15.2/Submit) id u0J888dr098249;
 Tue, 19 Jan 2016 08:08:08 GMT (envelope-from kib@FreeBSD.org)
Message-Id: <201601190808.u0J888dr098249@repo.freebsd.org>
X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org
 using -f
From: Konstantin Belousov <kib@FreeBSD.org>
Date: Tue, 19 Jan 2016 08:08:08 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-head@freebsd.org
Subject: svn commit: r294312 - head/sys/amd64/amd64
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.20
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for &quot;
 user&quot; and &quot; projects&quot; \)" <svn-src-all.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-all/>
List-Post: <mailto:svn-src-all@freebsd.org>
List-Help: <mailto:svn-src-all-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Tue, 19 Jan 2016 08:08:09 -0000

Author: kib
Date: Tue Jan 19 08:08:08 2016
New Revision: 294312
URL: https://svnweb.freebsd.org/changeset/base/294312

Log:
  Use ANSI definitions.  Wrap long line.
  
  Sponsored by:	The FreeBSD Foundation
  MFC after:	2 weeks

Modified:
  head/sys/amd64/amd64/fpu.c

Modified: head/sys/amd64/amd64/fpu.c
==============================================================================
--- head/sys/amd64/amd64/fpu.c	Tue Jan 19 08:04:02 2016	(r294311)
+++ head/sys/amd64/amd64/fpu.c	Tue Jan 19 08:08:08 2016	(r294312)
@@ -377,7 +377,7 @@ fpuexit(struct thread *td)
 }
 
 int
-fpuformat()
+fpuformat(void)
 {
 
 	return (_MC_FPFMT_XMM);
@@ -663,7 +663,8 @@ fpudna(void)
 		 * fpu_initialstate, to ignite the XSAVEOPT
 		 * tracking engine.
 		 */
-		bcopy(fpu_initialstate, curpcb->pcb_save, cpu_max_ext_state_size);
+		bcopy(fpu_initialstate, curpcb->pcb_save,
+		    cpu_max_ext_state_size);
 		fpurestore(curpcb->pcb_save);
 		if (curpcb->pcb_initial_fpucw != __INITIAL_FPUCW__)
 			fldcw(curpcb->pcb_initial_fpucw);
@@ -678,7 +679,7 @@ fpudna(void)
 }
 
 void
-fpudrop()
+fpudrop(void)
 {
 	struct thread *td;
 

From owner-svn-src-all@freebsd.org  Tue Jan 19 08:09:11 2016
Return-Path: <owner-svn-src-all@freebsd.org>
Delivered-To: svn-src-all@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0D3B4A86034;
 Tue, 19 Jan 2016 08:09:11 +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 CFC4410FC;
 Tue, 19 Jan 2016 08:09:10 +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 u0J8993x098328;
 Tue, 19 Jan 2016 08:09:09 GMT (envelope-from kib@FreeBSD.org)
Received: (from kib@localhost)
 by repo.freebsd.org (8.15.2/8.15.2/Submit) id u0J8995r098327;
 Tue, 19 Jan 2016 08:09:09 GMT (envelope-from kib@FreeBSD.org)
Message-Id: <201601190809.u0J8995r098327@repo.freebsd.org>
X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org
 using -f
From: Konstantin Belousov <kib@FreeBSD.org>
Date: Tue, 19 Jan 2016 08:09:09 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-head@freebsd.org
Subject: svn commit: r294313 - head/sys/i386/isa
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.20
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for &quot;
 user&quot; and &quot; projects&quot; \)" <svn-src-all.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-all/>
List-Post: <mailto:svn-src-all@freebsd.org>
List-Help: <mailto:svn-src-all-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Tue, 19 Jan 2016 08:09:11 -0000

Author: kib
Date: Tue Jan 19 08:09:09 2016
New Revision: 294313
URL: https://svnweb.freebsd.org/changeset/base/294313

Log:
  Adjust i386 comment to match amd64 one after r294311.
  
  Sponsored by:	The FreeBSD Foundation
  MFC after:	2 weeks

Modified:
  head/sys/i386/isa/npx.c

Modified: head/sys/i386/isa/npx.c
==============================================================================
--- head/sys/i386/isa/npx.c	Tue Jan 19 08:08:08 2016	(r294312)
+++ head/sys/i386/isa/npx.c	Tue Jan 19 08:09:09 2016	(r294313)
@@ -494,11 +494,12 @@ npxinitstate(void *arg __unused)
 
 		/*
 		 * The fninit instruction does not modify XMM
-		 * registers.  The fpusave call dumped the garbage
-		 * contained in the registers after reset to the
-		 * initial state saved.  Clear XMM registers file
-		 * image to make the startup program state and signal
-		 * handler XMM register content predictable.
+		 * registers or x87 registers (MM/ST).  The fpusave
+		 * call dumped the garbage contained in the registers
+		 * after reset to the initial state saved.  Clear XMM
+		 * and x87 registers file image to make the startup
+		 * program state and signal handler XMM/x87 register
+		 * content predictable.
 		 */
 		bzero(npx_initialstate->sv_xmm.sv_fp,
 		    sizeof(npx_initialstate->sv_xmm.sv_fp));

From owner-svn-src-all@freebsd.org  Tue Jan 19 10:10:04 2016
Return-Path: <owner-svn-src-all@freebsd.org>
Delivered-To: svn-src-all@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id B3387A876C9;
 Tue, 19 Jan 2016 10:10:04 +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 6D1941D5A;
 Tue, 19 Jan 2016 10:10:04 +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 u0JAA3Fd039225;
 Tue, 19 Jan 2016 10:10:03 GMT (envelope-from hselasky@FreeBSD.org)
Received: (from hselasky@localhost)
 by repo.freebsd.org (8.15.2/8.15.2/Submit) id u0JAA3ZI039222;
 Tue, 19 Jan 2016 10:10:03 GMT (envelope-from hselasky@FreeBSD.org)
Message-Id: <201601191010.u0JAA3ZI039222@repo.freebsd.org>
X-Authentication-Warning: repo.freebsd.org: hselasky set sender to
 hselasky@FreeBSD.org using -f
From: Hans Petter Selasky <hselasky@FreeBSD.org>
Date: Tue, 19 Jan 2016 10:10:03 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-head@freebsd.org
Subject: svn commit: r294314 - head/sys/dev/mlx5/mlx5_en
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.20
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for &quot;
 user&quot; and &quot; projects&quot; \)" <svn-src-all.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-all/>
List-Post: <mailto:svn-src-all@freebsd.org>
List-Help: <mailto:svn-src-all-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Tue, 19 Jan 2016 10:10:04 -0000

Author: hselasky
Date: Tue Jan 19 10:10:02 2016
New Revision: 294314
URL: https://svnweb.freebsd.org/changeset/base/294314

Log:
  Allow RX and TX pause frames to be set through ifconfig.
  
  Reviewed by:	gnn
  Sponsored by:	Mellanox Technologies
  MFC after:	5 days
  Differential Revision:	https://reviews.freebsd.org/D4817

Modified:
  head/sys/dev/mlx5/mlx5_en/en.h
  head/sys/dev/mlx5/mlx5_en/mlx5_en_ethtool.c
  head/sys/dev/mlx5/mlx5_en/mlx5_en_main.c

Modified: head/sys/dev/mlx5/mlx5_en/en.h
==============================================================================
--- head/sys/dev/mlx5/mlx5_en/en.h	Tue Jan 19 08:09:09 2016	(r294313)
+++ head/sys/dev/mlx5/mlx5_en/en.h	Tue Jan 19 10:10:02 2016	(r294314)
@@ -373,11 +373,11 @@ struct mlx5e_params {
 	bool	cqe_zipping_en;
 	u32	lro_wqe_sz;
 	u16	rx_hash_log_tbl_sz;
+	u32	tx_pauseframe_control;
+	u32	rx_pauseframe_control;
 };
 
 #define	MLX5E_PARAMS(m)							\
-  m(+1, u64 tx_pauseframe_control, "tx_pauseframe_control", "Set to enable TX pause frames. Clear to disable.") \
-  m(+1, u64 rx_pauseframe_control, "rx_pauseframe_control", "Set to enable RX pause frames. Clear to disable.") \
   m(+1, u64 tx_queue_size_max, "tx_queue_size_max", "Max send queue size") \
   m(+1, u64 rx_queue_size_max, "rx_queue_size_max", "Max receive queue size") \
   m(+1, u64 tx_queue_size, "tx_queue_size", "Default send queue size")	\

Modified: head/sys/dev/mlx5/mlx5_en/mlx5_en_ethtool.c
==============================================================================
--- head/sys/dev/mlx5/mlx5_en/mlx5_en_ethtool.c	Tue Jan 19 08:09:09 2016	(r294313)
+++ head/sys/dev/mlx5/mlx5_en/mlx5_en_ethtool.c	Tue Jan 19 10:10:02 2016	(r294314)
@@ -113,21 +113,6 @@ mlx5e_ethtool_handler(SYSCTL_HANDLER_ARG
 	}
 	priv->params.tx_cq_moderation_pkts = priv->params_ethtool.tx_coalesce_pkts;
 
-	if (&priv->params_ethtool.arg[arg2] == &priv->params_ethtool.rx_pauseframe_control ||
-	    &priv->params_ethtool.arg[arg2] == &priv->params_ethtool.tx_pauseframe_control) {
-		/* range check parameters */
-		priv->params_ethtool.rx_pauseframe_control =
-		    priv->params_ethtool.rx_pauseframe_control ? 1 : 0;
-		priv->params_ethtool.tx_pauseframe_control =
-		    priv->params_ethtool.tx_pauseframe_control ? 1 : 0;
-
-		/* update firmware */
-		error = -mlx5_set_port_pause(priv->mdev, 1,
-		    priv->params_ethtool.rx_pauseframe_control,
-		    priv->params_ethtool.tx_pauseframe_control);
-		goto done;
-	}
-
 	was_opened = test_bit(MLX5E_STATE_OPENED, &priv->state);
 	if (was_opened) {
 		u64 *xarg = priv->params_ethtool.arg + arg2;

Modified: head/sys/dev/mlx5/mlx5_en/mlx5_en_main.c
==============================================================================
--- head/sys/dev/mlx5/mlx5_en/mlx5_en_main.c	Tue Jan 19 08:09:09 2016	(r294313)
+++ head/sys/dev/mlx5/mlx5_en/mlx5_en_main.c	Tue Jan 19 10:10:02 2016	(r294314)
@@ -222,8 +222,8 @@ mlx5e_media_status(struct ifnet *dev, st
 
 	ifmr->ifm_status = priv->media_status_last;
 	ifmr->ifm_active = priv->media_active_last |
-	    (priv->params_ethtool.rx_pauseframe_control ? IFM_ETH_RXPAUSE : 0) |
-	    (priv->params_ethtool.tx_pauseframe_control ? IFM_ETH_TXPAUSE : 0);
+	    (priv->params.rx_pauseframe_control ? IFM_ETH_RXPAUSE : 0) |
+	    (priv->params.tx_pauseframe_control ? IFM_ETH_TXPAUSE : 0);
 
 }
 
@@ -250,6 +250,7 @@ mlx5e_media_change(struct ifnet *dev)
 	struct mlx5_core_dev *mdev = priv->mdev;
 	u32 eth_proto_cap;
 	u32 link_mode;
+	int was_opened;
 	int locked;
 	int error;
 
@@ -263,24 +264,45 @@ mlx5e_media_change(struct ifnet *dev)
 	}
 	link_mode = mlx5e_find_link_mode(IFM_SUBTYPE(priv->media.ifm_media));
 
+	/* query supported capabilities */
 	error = mlx5_query_port_proto_cap(mdev, &eth_proto_cap, MLX5_PTYS_EN);
-	if (error) {
+	if (error != 0) {
 		if_printf(dev, "Query port media capability failed\n");
 		goto done;
 	}
-	if (IFM_SUBTYPE(priv->media.ifm_media) == IFM_AUTO)
+	/* check for autoselect */
+	if (IFM_SUBTYPE(priv->media.ifm_media) == IFM_AUTO) {
 		link_mode = eth_proto_cap;
-	else
+		if (link_mode == 0) {
+			if_printf(dev, "Port media capability is zero\n");
+			error = EINVAL;
+			goto done;
+		}
+	} else {
 		link_mode = link_mode & eth_proto_cap;
-
-	if (!link_mode) {
-		if_printf(dev, "Not supported link mode requested\n");
-		error = EINVAL;
-		goto done;
+		if (link_mode == 0) {
+			if_printf(dev, "Not supported link mode requested\n");
+			error = EINVAL;
+			goto done;
+		}
 	}
+	/* update pauseframe control bits */
+	priv->params.rx_pauseframe_control =
+	    (priv->media.ifm_media & IFM_ETH_RXPAUSE) ? 1 : 0;
+	priv->params.tx_pauseframe_control =
+	    (priv->media.ifm_media & IFM_ETH_TXPAUSE) ? 1 : 0;
+
+	/* check if device is opened */
+	was_opened = test_bit(MLX5E_STATE_OPENED, &priv->state);
+
+	/* reconfigure the hardware */
 	mlx5_set_port_status(mdev, MLX5_PORT_DOWN);
 	mlx5_set_port_proto(mdev, link_mode, MLX5_PTYS_EN);
-	mlx5_set_port_status(mdev, MLX5_PORT_UP);
+	mlx5_set_port_pause(mdev, 1,
+	    priv->params.rx_pauseframe_control,
+	    priv->params.tx_pauseframe_control);
+	if (was_opened)
+		mlx5_set_port_status(mdev, MLX5_PORT_UP);
 
 done:
 	if (!locked)
@@ -2749,6 +2771,56 @@ mlx5e_add_hw_stats(struct mlx5e_priv *pr
 	    "Board ID");
 }
 
+static void
+mlx5e_setup_pauseframes(struct mlx5e_priv *priv)
+{
+#if (__FreeBSD_version < 1100000)
+	char path[64];
+
+#endif
+	/* Only receiving pauseframes is enabled by default */
+	priv->params.tx_pauseframe_control = 0;
+	priv->params.rx_pauseframe_control = 1;
+
+#if (__FreeBSD_version < 1100000)
+	/* compute path for sysctl */
+	snprintf(path, sizeof(path), "dev.mce.%d.tx_pauseframe_control",
+	    device_get_unit(priv->mdev->pdev->dev.bsddev));
+
+	/* try to fetch tunable, if any */
+	TUNABLE_INT_FETCH(path, &priv->params.tx_pauseframe_control);
+
+	/* compute path for sysctl */
+	snprintf(path, sizeof(path), "dev.mce.%d.rx_pauseframe_control",
+	    device_get_unit(priv->mdev->pdev->dev.bsddev));
+
+	/* try to fetch tunable, if any */
+	TUNABLE_INT_FETCH(path, &priv->params.rx_pauseframe_control);
+#endif
+
+	/* register pausframe SYSCTLs */
+	SYSCTL_ADD_INT(&priv->sysctl_ctx, SYSCTL_CHILDREN(priv->sysctl_ifnet),
+	    OID_AUTO, "tx_pauseframe_control", CTLFLAG_RDTUN,
+	    &priv->params.tx_pauseframe_control, 0,
+	    "Set to enable TX pause frames. Clear to disable.");
+
+	SYSCTL_ADD_INT(&priv->sysctl_ctx, SYSCTL_CHILDREN(priv->sysctl_ifnet),
+	    OID_AUTO, "rx_pauseframe_control", CTLFLAG_RDTUN,
+	    &priv->params.rx_pauseframe_control, 0,
+	    "Set to enable RX pause frames. Clear to disable.");
+
+	/* range check */
+	priv->params.tx_pauseframe_control =
+	    priv->params.tx_pauseframe_control ? 1 : 0;
+	priv->params.rx_pauseframe_control =
+	    priv->params.rx_pauseframe_control ? 1 : 0;
+
+	/* update firmware */
+	mlx5_set_port_pause(priv->mdev, 1,
+	    priv->params.rx_pauseframe_control,
+	    priv->params.tx_pauseframe_control);
+}
+
 static void *
 mlx5e_create_ifp(struct mlx5_core_dev *mdev)
 {
@@ -2874,11 +2946,11 @@ mlx5e_create_ifp(struct mlx5_core_dev *m
 
 	/* Set default media status */
 	priv->media_status_last = IFM_AVALID;
-	priv->media_active_last = IFM_ETHER | IFM_AUTO;
+	priv->media_active_last = IFM_ETHER | IFM_AUTO |
+	    IFM_ETH_RXPAUSE | IFM_FDX;
 
-	/* Pauseframes are enabled by default */
-	priv->params_ethtool.tx_pauseframe_control = 1;
-	priv->params_ethtool.rx_pauseframe_control = 1;
+	/* setup default pauseframes configuration */
+	mlx5e_setup_pauseframes(priv);
 
 	err = mlx5_query_port_proto_cap(mdev, &eth_proto_cap, MLX5_PTYS_EN);
 	if (err) {
@@ -2894,14 +2966,24 @@ mlx5e_create_ifp(struct mlx5_core_dev *m
 	for (i = 0; i < MLX5E_LINK_MODES_NUMBER; ++i) {
 		if (mlx5e_mode_table[i].baudrate == 0)
 			continue;
-		if (MLX5E_PROT_MASK(i) & eth_proto_cap)
+		if (MLX5E_PROT_MASK(i) & eth_proto_cap) {
 			ifmedia_add(&priv->media,
-			    IFM_ETHER | mlx5e_mode_table[i].subtype |
-			    IFM_FDX, 0, NULL);
+			    mlx5e_mode_table[i].subtype |
+			    IFM_ETHER, 0, NULL);
+			ifmedia_add(&priv->media,
+			    mlx5e_mode_table[i].subtype |
+			    IFM_ETHER | IFM_FDX |
+			    IFM_ETH_RXPAUSE | IFM_ETH_TXPAUSE, 0, NULL);
+		}
 	}
 
 	ifmedia_add(&priv->media, IFM_ETHER | IFM_AUTO, 0, NULL);
-	ifmedia_set(&priv->media, IFM_ETHER | IFM_AUTO);
+	ifmedia_add(&priv->media, IFM_ETHER | IFM_AUTO | IFM_FDX |
+	    IFM_ETH_RXPAUSE | IFM_ETH_TXPAUSE, 0, NULL);
+
+	/* Set autoselect by default */
+	ifmedia_set(&priv->media, IFM_ETHER | IFM_AUTO | IFM_FDX |
+	    IFM_ETH_RXPAUSE | IFM_ETH_TXPAUSE);
 	ether_ifattach(ifp, dev_addr);
 
 	/* Register for VLAN events */

From owner-svn-src-all@freebsd.org  Tue Jan 19 10:11:00 2016
Return-Path: <owner-svn-src-all@freebsd.org>
Delivered-To: svn-src-all@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id 14FEFA8808D;
 Tue, 19 Jan 2016 10:11:00 +0000 (UTC) (envelope-from des@FreeBSD.org)
Received: from repo.freebsd.org (repo.freebsd.org
 [IPv6:2610:1c1:1:6068::e6a:0])
 (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
 (Client did not present a certificate)
 by mx1.freebsd.org (Postfix) with ESMTPS id CCD0A13CE;
 Tue, 19 Jan 2016 10:10:59 +0000 (UTC) (envelope-from des@FreeBSD.org)
Received: from repo.freebsd.org ([127.0.1.37])
 by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u0JAAwZ8039301;
 Tue, 19 Jan 2016 10:10:58 GMT (envelope-from des@FreeBSD.org)
Received: (from des@localhost)
 by repo.freebsd.org (8.15.2/8.15.2/Submit) id u0JAAw3O039299;
 Tue, 19 Jan 2016 10:10:58 GMT (envelope-from des@FreeBSD.org)
Message-Id: <201601191010.u0JAAw3O039299@repo.freebsd.org>
X-Authentication-Warning: repo.freebsd.org: des set sender to des@FreeBSD.org
 using -f
From: =?UTF-8?Q?Dag-Erling_Sm=c3=b8rgrav?= <des@FreeBSD.org>
Date: Tue, 19 Jan 2016 10:10:58 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-vendor@freebsd.org
Subject: svn commit: r294315 - in vendor-crypto/openssh/dist: . contrib/redhat
 contrib/suse
X-SVN-Group: vendor-crypto
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.20
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for &quot;
 user&quot; and &quot; projects&quot; \)" <svn-src-all.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-all/>
List-Post: <mailto:svn-src-all@freebsd.org>
List-Help: <mailto:svn-src-all-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Tue, 19 Jan 2016 10:11:00 -0000

Author: des
Date: Tue Jan 19 10:10:58 2016
New Revision: 294315
URL: https://svnweb.freebsd.org/changeset/base/294315

Log:
  Vendor import of OpenSSH 7.1p2.

Modified:
  vendor-crypto/openssh/dist/ChangeLog
  vendor-crypto/openssh/dist/README
  vendor-crypto/openssh/dist/bitmap.c
  vendor-crypto/openssh/dist/contrib/redhat/openssh.spec
  vendor-crypto/openssh/dist/contrib/suse/openssh.spec
  vendor-crypto/openssh/dist/kex.c
  vendor-crypto/openssh/dist/packet.c
  vendor-crypto/openssh/dist/readconf.c
  vendor-crypto/openssh/dist/ssh.c
  vendor-crypto/openssh/dist/sshbuf-getput-crypto.c
  vendor-crypto/openssh/dist/sshbuf-misc.c
  vendor-crypto/openssh/dist/sshbuf.c
  vendor-crypto/openssh/dist/sshd.c
  vendor-crypto/openssh/dist/version.h

Modified: vendor-crypto/openssh/dist/ChangeLog
==============================================================================
--- vendor-crypto/openssh/dist/ChangeLog	Tue Jan 19 10:10:02 2016	(r294314)
+++ vendor-crypto/openssh/dist/ChangeLog	Tue Jan 19 10:10:58 2016	(r294315)
@@ -1,3 +1,86 @@
+commit c88ac102f0eb89f2eaa314cb2e2e0ca3c890c443
+Author: Damien Miller <djm@mindrot.org>
+Date:   Thu Jan 14 11:08:19 2016 +1100
+
+    bump version numbers
+
+commit 302bc21e6fadacb04b665868cd69b625ef69df90
+Author: Damien Miller <djm@mindrot.org>
+Date:   Thu Jan 14 11:04:04 2016 +1100
+
+    openssh-7.1p2
+
+commit 6b33763242c063e4e0593877e835eeb1fd1b60aa
+Author: Damien Miller <djm@mindrot.org>
+Date:   Thu Jan 14 11:02:58 2016 +1100
+
+    forcibly disable roaming support in the client
+
+commit 34d364f0d2e1e30a444009f0e04299bb7c94ba13
+Author: djm@openbsd.org <djm@openbsd.org>
+Date:   Mon Oct 5 17:11:21 2015 +0000
+
+    upstream commit
+    
+    some more bzero->explicit_bzero, from Michael McConville
+    
+    Upstream-ID: 17f19545685c33327db2efdc357c1c9225ff00d0
+
+commit 8f5b93026797b9f7fba90d0c717570421ccebbd3
+Author: guenther@openbsd.org <guenther@openbsd.org>
+Date:   Fri Sep 11 08:50:04 2015 +0000
+
+    upstream commit
+    
+    Use explicit_bzero() when zeroing before free()
+    
+    from Michael McConville (mmcconv1 (at) sccs.swarthmore.edu)
+    ok millert@ djm@
+    
+    Upstream-ID: 2e3337db046c3fe70c7369ee31515ac73ec00f50
+
+commit d77148e3a3ef6c29b26ec74331455394581aa257
+Author: djm@openbsd.org <djm@openbsd.org>
+Date:   Sun Nov 8 21:59:11 2015 +0000
+
+    upstream commit
+    
+    fix OOB read in packet code caused by missing return
+     statement found by Ben Hawkes; ok markus@ deraadt@
+    
+    Upstream-ID: a3e3a85434ebfa0690d4879091959591f30efc62
+
+commit 076d849e17ab12603627f87b301e2dca71bae518
+Author: Damien Miller <djm@mindrot.org>
+Date:   Sat Nov 14 18:44:49 2015 +1100
+
+    read back from libcrypto RAND when privdropping
+    
+    makes certain libcrypto implementations cache a /dev/urandom fd
+    in preparation of sandboxing. Based on patch by Greg Hartman.
+
+commit f72adc0150011a28f177617a8456e1f83733099d
+Author: djm@openbsd.org <djm@openbsd.org>
+Date:   Sun Dec 13 22:42:23 2015 +0000
+
+    upstream commit
+    
+    unbreak connections with peers that set
+     first_kex_follows; fix from Matt Johnston va bz#2515
+    
+    Upstream-ID: decc88ec4fc7515594fdb42b04aa03189a44184b
+
+commit 04bd8d019ccd906cac1a2b362517b8505f3759e6
+Author: djm@openbsd.org <djm@openbsd.org>
+Date:   Tue Jan 12 23:42:54 2016 +0000
+
+    upstream commit
+    
+    use explicit_bzero() more liberally in the buffer code; ok
+     deraadt
+    
+    Upstream-ID: 0ece37069fd66bc6e4f55eb1321f93df372b65bf
+
 commit e91346dc2bbf460246df2ab591b7613908c1b0ad
 Author: Damien Miller <djm@mindrot.org>
 Date:   Fri Aug 21 14:49:03 2015 +1000
@@ -7530,1604 +7613,3 @@ Date:   Thu Jan 16 18:42:10 2014 +1100
          [sftp-client.c]
          needless and incorrect cast to size_t can break resumption of
          large download; patch from tobias@
-
-commit 91b580e4bec55118bf96ab3cdbe5a50839e75d0a
-Author: Damien Miller <djm@mindrot.org>
-Date:   Sun Jan 12 19:21:22 2014 +1100
-
-       - djm@cvs.openbsd.org 2014/01/12 08:13:13
-         [bufaux.c buffer.h kex.c kex.h kexc25519.c kexc25519c.c kexc25519s.c]
-         [kexdhc.c kexdhs.c kexecdhc.c kexecdhs.c kexgexc.c kexgexs.c]
-         avoid use of OpenSSL BIGNUM type and functions for KEX with
-         Curve25519 by adding a buffer_put_bignum2_from_string() that stores
-         a string using the bignum encoding rules. Will make it easier to
-         build a reduced-feature OpenSSH without OpenSSL in the future;
-         ok markus@
-
-commit af5d4481f4c7c8c3c746e68b961bb85ef907800e
-Author: Damien Miller <djm@mindrot.org>
-Date:   Sun Jan 12 19:20:47 2014 +1100
-
-       - djm@cvs.openbsd.org 2014/01/10 05:59:19
-         [sshd_config]
-         the /etc/ssh/ssh_host_ed25519_key is loaded by default too
-
-commit 58cd63bc63038acddfb4051ed14e11179d8f4941
-Author: Damien Miller <djm@mindrot.org>
-Date:   Fri Jan 10 10:59:24 2014 +1100
-
-       - djm@cvs.openbsd.org 2014/01/09 23:26:48
-         [sshconnect.c sshd.c]
-         ban clients/servers that suffer from SSH_BUG_DERIVEKEY, they are ancient,
-         deranged and might make some attacks on KEX easier; ok markus@
-
-commit b3051d01e505c9c2dc00faab472a0d06fa6b0e65
-Author: Damien Miller <djm@mindrot.org>
-Date:   Fri Jan 10 10:58:53 2014 +1100
-
-       - djm@cvs.openbsd.org 2014/01/09 23:20:00
-         [digest.c digest.h hostfile.c kex.c kex.h kexc25519.c kexc25519c.c]
-         [kexc25519s.c kexdh.c kexecdh.c kexecdhc.c kexecdhs.c kexgex.c kexgexc.c]
-         [kexgexs.c key.c key.h roaming_client.c roaming_common.c schnorr.c]
-         [schnorr.h ssh-dss.c ssh-ecdsa.c ssh-rsa.c sshconnect2.c]
-         Introduce digest API and use it to perform all hashing operations
-         rather than calling OpenSSL EVP_Digest* directly. Will make it easier
-         to build a reduced-feature OpenSSH without OpenSSL in future;
-         feedback, ok markus@
-
-commit e00e413dd16eb747fb2c15a099971d91c13cf70f
-Author: Damien Miller <djm@mindrot.org>
-Date:   Fri Jan 10 10:40:45 2014 +1100
-
-       - guenther@cvs.openbsd.org 2014/01/09 03:26:00
-         [sftp-common.c]
-         When formating the time for "ls -l"-style output, show dates in the future
-         with the year, and rearrange a comparison to avoid a potentional signed
-         arithmetic overflow that would give the wrong result.
-    
-         ok djm@
-
-commit 3e49853650448883685cfa32fa382d0ba6d51d48
-Author: Damien Miller <djm@mindrot.org>
-Date:   Fri Jan 10 10:37:05 2014 +1100
-
-       - tedu@cvs.openbsd.org 2014/01/04 17:50:55
-         [mac.c monitor_mm.c monitor_mm.h xmalloc.c]
-         use standard types and formats for size_t like variables. ok dtucker
-
-commit a9c1e500ef609795cbc662848edb1a1dca279c81
-Author: Damien Miller <djm@mindrot.org>
-Date:   Wed Jan 8 16:13:12 2014 +1100
-
-     - (djm) [regress/.cvsignore] Ignore regress test droppings; ok dtucker@
-
-commit 324541e5264e1489ca0babfaf2b39612eb80dfb3
-Author: Damien Miller <djm@mindrot.org>
-Date:   Tue Dec 31 12:25:40 2013 +1100
-
-       - djm@cvs.openbsd.org 2013/12/30 23:52:28
-         [auth2-hostbased.c auth2-pubkey.c compat.c compat.h ssh-rsa.c]
-         [sshconnect.c sshconnect2.c sshd.c]
-         refuse RSA keys from old proprietary clients/servers that use the
-         obsolete RSA+MD5 signature scheme. it will still be possible to connect
-         with these clients/servers but only DSA keys will be accepted, and we'll
-         deprecate them entirely in a future release. ok markus@
-
-commit 9f4c8e797ea002a883307ca906f1f1f815010e78
-Author: Damien Miller <djm@mindrot.org>
-Date:   Sun Dec 29 17:57:46 2013 +1100
-
-     - (djm) [regress/Makefile] Add some generated files for cleaning
-
-commit 106bf1ca3c7a5fdc34f9fd7a1fe651ca53085bc5
-Author: Damien Miller <djm@mindrot.org>
-Date:   Sun Dec 29 17:54:03 2013 +1100
-
-       - djm@cvs.openbsd.org 2013/12/29 05:57:02
-         [sshconnect.c]
-         when showing other hostkeys, don't forget Ed25519 keys
-
-commit 0fa47cfb32c239117632cab41e4db7d3e6de5e91
-Author: Damien Miller <djm@mindrot.org>
-Date:   Sun Dec 29 17:53:39 2013 +1100
-
-       - djm@cvs.openbsd.org 2013/12/29 05:42:16
-         [ssh.c]
-         don't forget to load Ed25519 certs too
-
-commit b9a95490daa04cc307589897f95bfaff324ad2c9
-Author: Damien Miller <djm@mindrot.org>
-Date:   Sun Dec 29 17:50:15 2013 +1100
-
-       - djm@cvs.openbsd.org 2013/12/29 04:35:50
-         [authfile.c]
-         don't refuse to load Ed25519 certificates
-
-commit f72cdde6e6fabc51d2a62f4e75b8b926d9d7ee89
-Author: Damien Miller <djm@mindrot.org>
-Date:   Sun Dec 29 17:49:55 2013 +1100
-
-       - djm@cvs.openbsd.org 2013/12/29 04:29:25
-         [authfd.c]
-         allow deletion of ed25519 keys from the agent
-
-commit 29ace1cb68cc378a464c72c0fd67aa5f9acd6b5b
-Author: Damien Miller <djm@mindrot.org>
-Date:   Sun Dec 29 17:49:31 2013 +1100
-
-       - djm@cvs.openbsd.org 2013/12/29 04:20:04
-         [key.c]
-         to make sure we don't omit any key types as valid CA keys again,
-         factor the valid key type check into a key_type_is_valid_ca()
-         function
-
-commit 9de4fcdc5a9cff48d49a3e2f6194d3fb2d7ae34d
-Author: Damien Miller <djm@mindrot.org>
-Date:   Sun Dec 29 17:49:13 2013 +1100
-
-       - djm@cvs.openbsd.org 2013/12/29 02:49:52
-         [key.c]
-         correct comment for key_drop_cert()
-
-commit 5baeacf8a80f054af40731c6f92435f9164b8e02
-Author: Damien Miller <djm@mindrot.org>
-Date:   Sun Dec 29 17:48:55 2013 +1100
-
-       - djm@cvs.openbsd.org 2013/12/29 02:37:04
-         [key.c]
-         correct comment for key_to_certified()
-
-commit 83f2fe26cb19330712c952eddbd3c0b621674adc
-Author: Damien Miller <djm@mindrot.org>
-Date:   Sun Dec 29 17:48:38 2013 +1100
-
-       - djm@cvs.openbsd.org 2013/12/29 02:28:10
-         [key.c]
-         allow ed25519 keys to appear as certificate authorities
-
-commit 06122e9a74bb488b0fe0a8f64e1135de870f9cc0
-Author: Damien Miller <djm@mindrot.org>
-Date:   Sun Dec 29 17:48:15 2013 +1100
-
-       - djm@cvs.openbsd.org 2013/12/27 22:37:18
-         [ssh-rsa.c]
-         correct comment
-
-commit 3e19295c3a253c8dc8660cf45baad7f45fccb969
-Author: Damien Miller <djm@mindrot.org>
-Date:   Sun Dec 29 17:47:50 2013 +1100
-
-       - djm@cvs.openbsd.org 2013/12/27 22:30:17
-         [ssh-dss.c ssh-ecdsa.c ssh-rsa.c]
-         make the original RSA and DSA signing/verification code look more like
-         the ECDSA/Ed25519 ones: use key_type_plain() when checking the key type
-         rather than tediously listing all variants, use __func__ for debug/
-         error messages
-
-commit 137977180be6254639e2c90245763e6965f8d815
-Author: Damien Miller <djm@mindrot.org>
-Date:   Sun Dec 29 17:47:14 2013 +1100
-
-       - tedu@cvs.openbsd.org 2013/12/21 07:10:47
-         [ssh-keygen.1]
-         small typo
-
-commit 339a48fe7ffb3186d22bbaa9efbbc3a053e602fd
-Author: Damien Miller <djm@mindrot.org>
-Date:   Sun Dec 29 17:46:49 2013 +1100
-
-       - djm@cvs.openbsd.org 2013/12/19 22:57:13
-         [poly1305.c poly1305.h]
-         use full name for author, with his permission
-
-commit 0b36c83148976c7c8268f4f41497359e2fb26251
-Author: Damien Miller <djm@mindrot.org>
-Date:   Sun Dec 29 17:45:51 2013 +1100
-
-       - djm@cvs.openbsd.org 2013/12/19 01:19:41
-         [ssh-agent.c]
-         bz#2186: don't crash (NULL deref) when deleting PKCS#11 keys from an agent
-         that has a mix of normal and PKCS#11 keys; fix from jay AT slushpupie.com;
-         ok dtucker
-
-commit 4def184e9b6c36be6d965a9705632fc4c0c2a8af
-Author: Damien Miller <djm@mindrot.org>
-Date:   Sun Dec 29 17:45:26 2013 +1100
-
-       - djm@cvs.openbsd.org 2013/12/19 01:04:36
-         [channels.c]
-         bz#2147: fix multiple remote forwardings with dynamically assigned
-         listen ports. In the s->c message to open the channel we were sending
-         zero (the magic number to request a dynamic port) instead of the actual
-         listen port. The client therefore had no way of discriminating between
-         them.
-    
-         Diagnosis and fix by ronf AT timeheart.net
-
-commit bf25d114e23a803f8feca8926281b1aaedb6191b
-Author: Damien Miller <djm@mindrot.org>
-Date:   Sun Dec 29 17:44:56 2013 +1100
-
-       - djm@cvs.openbsd.org 2013/12/19 00:27:57
-         [auth-options.c]
-         simplify freeing of source-address certificate restriction
-
-commit bb3dafe7024a5b4e851252e65ee35d45b965e4a8
-Author: Damien Miller <djm@mindrot.org>
-Date:   Sun Dec 29 17:44:29 2013 +1100
-
-       - dtucker@cvs.openbsd.org 2013/12/19 00:19:12
-         [serverloop.c]
-         Cast client_alive_interval to u_int64_t before assinging to
-         max_time_milliseconds to avoid potential integer overflow in the timeout.
-         bz#2170, patch from Loganaden Velvindron, ok djm@
-
-commit ef275ead3dcadde4db1efe7a0aa02b5e618ed40c
-Author: Damien Miller <djm@mindrot.org>
-Date:   Sun Dec 29 17:44:07 2013 +1100
-
-       - djm@cvs.openbsd.org 2013/12/19 00:10:30
-         [ssh-add.c]
-         skip requesting smartcard PIN when removing keys from agent; bz#2187
-         patch from jay AT slushpupie.com; ok dtucker
-
-commit 7d97fd9a1cae778c3eacf16e09f5da3689d616c6
-Author: Damien Miller <djm@mindrot.org>
-Date:   Sun Dec 29 17:40:18 2013 +1100
-
-     - (djm) [loginrec.c] Check for username truncation when looking up lastlog
-       entries
-
-commit 77244afe3b6d013b485e0952eaab89b9db83380f
-Author: Darren Tucker <dtucker@zip.com.au>
-Date:   Sat Dec 21 17:02:39 2013 +1100
-
-    20131221
-     - (dtucker) [regress/keytype.sh] Actually test ecdsa key types.
-
-commit 53f8e784dc431a82d31c9b0e95b144507f9330e9
-Author: Darren Tucker <dtucker@zip.com.au>
-Date:   Thu Dec 19 11:31:44 2013 +1100
-
-     - (dtucker) [auth-pam.c] bz#2163: check return value from pam_get_item().
-       Patch from Loganaden Velvindron.
-
-commit 1fcec9d4f265e38af248c4c845986ca8c174bd68
-Author: Darren Tucker <dtucker@zip.com.au>
-Date:   Thu Dec 19 11:00:12 2013 +1100
-
-     - (dtucker) [configure.ac] bz#2178: Don't try to use BSM on Solaris versions
-       greater than 11 either rather than just 11.  Patch from Tomas Kuthan.
-
-commit 6674eb9683afd1ea4eb35670b5e66815543a759e
-Author: Damien Miller <djm@mindrot.org>
-Date:   Wed Dec 18 17:50:39 2013 +1100
-
-       - markus@cvs.openbsd.org 2013/12/17 10:36:38
-         [crypto_api.h]
-         I've assempled the header file by cut&pasting from generated headers
-         and the source files.
-
-commit d58a5964426ee014384d67d775d16712e93057f3
-Author: Damien Miller <djm@mindrot.org>
-Date:   Wed Dec 18 17:50:13 2013 +1100
-
-       - djm@cvs.openbsd.org 2013/12/15 21:42:35
-         [cipher-chachapoly.c]
-         add some comments and constify a constant
-
-commit 059321d19af24d87420de3193f79dfab23556078
-Author: Damien Miller <djm@mindrot.org>
-Date:   Wed Dec 18 17:49:48 2013 +1100
-
-       - pascal@cvs.openbsd.org 2013/12/15 18:17:26
-         [ssh-add.c]
-         Make ssh-add also add .ssh/id_ed25519; fixes lie in manual page.
-         ok markus@
-
-commit 155b5a5bf158767f989215479ded2a57f331e1c6
-Author: Damien Miller <djm@mindrot.org>
-Date:   Wed Dec 18 17:48:32 2013 +1100
-
-       - markus@cvs.openbsd.org 2013/12/09 11:08:17
-         [crypto_api.h]
-         remove unused defines
-
-commit 8a56dc2b6b48b05590810e7f4c3567508410000c
-Author: Damien Miller <djm@mindrot.org>
-Date:   Wed Dec 18 17:48:11 2013 +1100
-
-       - markus@cvs.openbsd.org 2013/12/09 11:03:45
-         [blocks.c ed25519.c fe25519.c fe25519.h ge25519.c ge25519.h]
-         [ge25519_base.data hash.c sc25519.c sc25519.h verify.c]
-         Add Authors for the public domain ed25519/nacl code.
-         see also http://nacl.cr.yp.to/features.html
-            All of the NaCl software is in the public domain.
-         and http://ed25519.cr.yp.to/software.html
-            The Ed25519 software is in the public domain.
-
-commit 6575c3acf31fca117352f31f37b16ae46e664837
-Author: Damien Miller <djm@mindrot.org>
-Date:   Wed Dec 18 17:47:02 2013 +1100
-
-       - dtucker@cvs.openbsd.org 2013/12/08 09:53:27
-         [sshd_config.5]
-         Use a literal for the default value of KEXAlgorithms.  ok deraadt jmc
-
-commit 8ba0ead6985ea14999265136b14ffd5aeec516f9
-Author: Damien Miller <djm@mindrot.org>
-Date:   Wed Dec 18 17:46:27 2013 +1100
-
-       - naddy@cvs.openbsd.org 2013/12/07 11:58:46
-         [ssh-add.1 ssh-agent.1 ssh-keygen.1 ssh-keyscan.1 ssh-keysign.8 ssh.1]
-         [ssh_config.5 sshd.8 sshd_config.5]
-         add missing mentions of ed25519; ok djm@
-
-commit 4f752cf71cf44bf4bc777541156c2bf56daf9ce9
-Author: Damien Miller <djm@mindrot.org>
-Date:   Wed Dec 18 17:45:35 2013 +1100
-
-       - djm@cvs.openbsd.org 2013/12/07 08:08:26
-         [ssh-keygen.1]
-         document -a and -o wrt new key format
-
-commit 6d6fcd14e23a9053198342bb379815b15e504084
-Author: Damien Miller <djm@mindrot.org>
-Date:   Sun Dec 8 15:53:28 2013 +1100
-
-     - (djm) [Makefile.in regress/Makefile regress/agent-ptrace.sh]
-       [regress/setuid-allowed.c] Check that ssh-agent is not on a no-setuid
-       filesystem before running agent-ptrace.sh; ok dtucker
-
-commit 7e6e42fb532c7dafd7078ef5e9e2d3e47fcf6752
-Author: Damien Miller <djm@mindrot.org>
-Date:   Sun Dec 8 08:23:08 2013 +1100
-
-     - (djm) [openbsd-compat/bsd-setres_id.c] Missing header; from Corinna
-        Vinschen
-
-commit da3ca351b49d52ae85db2e3998265dc3c6617068
-Author: Damien Miller <djm@mindrot.org>
-Date:   Sat Dec 7 21:43:46 2013 +1100
-
-     - (djm) [Makefile.in] PATHSUBS and keygen bits for Ed25519; from
-        Loganaden Velvindron @ AfriNIC in bz#2179
-
-commit eb401585bb8336cbf81fe4fc58eb9f7cac3ab874
-Author: Damien Miller <djm@mindrot.org>
-Date:   Sat Dec 7 17:07:15 2013 +1100
-
-     - (djm) [regress/cert-hostkey.sh] Fix merge botch
-
-commit f54542af3ad07532188b10136ae302314ec69ed6
-Author: Damien Miller <djm@mindrot.org>
-Date:   Sat Dec 7 16:32:44 2013 +1100
-
-       - markus@cvs.openbsd.org 2013/12/06 13:52:46
-         [regress/Makefile regress/agent.sh regress/cert-hostkey.sh]
-         [regress/cert-userkey.sh regress/keytype.sh]
-         test ed25519 support; from djm@
-
-commit f104da263de995f66b6861b4f3368264ee483d7f
-Author: Damien Miller <djm@mindrot.org>
-Date:   Sat Dec 7 12:37:53 2013 +1100
-
-     - (djm) [ed25519.c ssh-ed25519.c openbsd-compat/Makefile.in]
-        [openbsd-compat/bcrypt_pbkdf.c] Make ed25519/new key format compile on
-           Linux
-
-commit 1ff130dac9b7aea0628f4ad30683431fe35e0020
-Author: Damien Miller <djm@mindrot.org>
-Date:   Sat Dec 7 11:51:51 2013 +1100
-
-     - [configure.ac openbsd-compat/Makefile.in openbsd-compat/bcrypt_pbkdf.c]
-       [openbsd-compat/blf.h openbsd-compat/blowfish.c]
-       [openbsd-compat/openbsd-compat.h] Start at supporting bcrypt_pbkdf in
-       portable.
-
-commit 4260828a2958ebe8c96f66d8301dac53f4cde556
-Author: Damien Miller <djm@mindrot.org>
-Date:   Sat Dec 7 11:38:03 2013 +1100
-
-     - [authfile.c] Conditionalise inclusion of util.h
-
-commit a913442bac8a26fd296a3add51293f8f6f9b3b4c
-Author: Damien Miller <djm@mindrot.org>
-Date:   Sat Dec 7 11:35:36 2013 +1100
-
-     - [Makefile.in] Add ed25519 sources
-
-commit ca570a519cb846da61d002c7f46fa92e39c83e45
-Author: Damien Miller <djm@mindrot.org>
-Date:   Sat Dec 7 11:29:09 2013 +1100
-
-       - djm@cvs.openbsd.org 2013/12/07 00:19:15
-         [key.c]
-         set k->cert = NULL after freeing it
-
-commit 3cccc0e155229a2f2d86b6df40bd4559b4f960ff
-Author: Damien Miller <djm@mindrot.org>
-Date:   Sat Dec 7 11:27:47 2013 +1100
-
-     - [blocks.c ed25519.c fe25519.c fe25519.h ge25519.c ge25519.h]
-       [ge25519_base.data hash.c sc25519.c sc25519.h verify.c] Fix RCS idents
-
-commit a7827c11b3f0380b7e593664bd62013ff9c131db
-Author: Damien Miller <djm@mindrot.org>
-Date:   Sat Dec 7 11:24:30 2013 +1100
-
-       - jmc@cvs.openbsd.org 2013/12/06 15:29:07
-         [sshd.8]
-         missing comma;
-
-commit 5be9d9e3cbd9c66f24745d25bf2e809c1d158ee0
-Author: Damien Miller <djm@mindrot.org>
-Date:   Sat Dec 7 11:24:01 2013 +1100
-
-       - markus@cvs.openbsd.org 2013/12/06 13:39:49
-         [authfd.c authfile.c key.c key.h myproposal.h pathnames.h readconf.c]
-         [servconf.c ssh-agent.c ssh-keygen.c ssh-keyscan.1 ssh-keyscan.c]
-         [ssh-keysign.c ssh.c ssh_config.5 sshd.8 sshd.c verify.c ssh-ed25519.c]
-         [sc25519.h sc25519.c hash.c ge25519_base.data ge25519.h ge25519.c]
-         [fe25519.h fe25519.c ed25519.c crypto_api.h blocks.c]
-         support ed25519 keys (hostkeys and user identities) using the public
-         domain ed25519 reference code from SUPERCOP, see
-         http://ed25519.cr.yp.to/software.html
-         feedback, help & ok djm@
-
-commit bcd00abd8451f36142ae2ee10cc657202149201e
-Author: Damien Miller <djm@mindrot.org>
-Date:   Sat Dec 7 10:41:55 2013 +1100
-
-       - markus@cvs.openbsd.org 2013/12/06 13:34:54
-         [authfile.c authfile.h cipher.c cipher.h key.c packet.c ssh-agent.c]
-         [ssh-keygen.c PROTOCOL.key] new private key format, bcrypt as KDF by
-         default; details in PROTOCOL.key; feedback and lots help from djm;
-         ok djm@
-
-commit f0e9060d236c0e38bec2fa1c6579fb0a2ea6458d
-Author: Damien Miller <djm@mindrot.org>
-Date:   Sat Dec 7 10:40:26 2013 +1100
-
-       - markus@cvs.openbsd.org 2013/12/06 13:30:08
-         [authfd.c key.c key.h ssh-agent.c]
-         move private key (de)serialization to key.c; ok djm
-
-commit 0f8536da23a6ef26e6495177c0d8a4242b710289
-Author: Damien Miller <djm@mindrot.org>
-Date:   Sat Dec 7 10:31:37 2013 +1100
-
-       - djm@cvs.openbsd.org 2013/12/06 03:40:51
-         [ssh-keygen.c]
-         remove duplicated character ('g') in getopt() string;
-         document the (few) remaining option characters so we don't have to
-         rummage next time.
-
-commit 393920745fd328d3fe07f739a3cf7e1e6db45b60
-Author: Damien Miller <djm@mindrot.org>
-Date:   Sat Dec 7 10:31:08 2013 +1100
-
-       - djm@cvs.openbsd.org 2013/12/05 22:59:45
-         [sftp-client.c]
-         fix memory leak in error path in do_readdir(); pointed out by
-         Loganaden Velvindron @ AfriNIC in bz#2163
-
-commit 534b2ccadea5e5e9a8b27226e6faac3ed5552e97
-Author: Damien Miller <djm@mindrot.org>
-Date:   Thu Dec 5 14:07:27 2013 +1100
-
-       - djm@cvs.openbsd.org 2013/12/05 01:16:41
-         [servconf.c servconf.h]
-         bz#2161 - fix AuthorizedKeysCommand inside a Match block and
-         rearrange things so the same error is harder to make next time;
-         with and ok dtucker@
-
-commit 8369c8e61a3408ec6bb75755fad4ffce29b5fdbe
-Author: Darren Tucker <dtucker@zip.com.au>
-Date:   Thu Dec 5 11:00:16 2013 +1100
-
-     - (dtucker) [configure.ac] bz#2173: use pkg-config --libs to include correct
-       -L location for libedit.  Patch from Serge van den Boom.
-
-commit 9275df3e0a2a3bc3897f7d664ea86a425c8a092d
-Author: Damien Miller <djm@mindrot.org>
-Date:   Thu Dec 5 10:26:32 2013 +1100
-
-       - djm@cvs.openbsd.org 2013/12/04 04:20:01
-         [sftp-client.c]
-         bz#2171: don't leak local_fd on error; from Loganaden Velvindron @
-         AfriNIC
-
-commit 960f6a2b5254e4da082d8aa3700302ed12dc769a
-Author: Damien Miller <djm@mindrot.org>
-Date:   Thu Dec 5 10:26:14 2013 +1100
-
-       - djm@cvs.openbsd.org 2013/12/02 03:13:14
-         [cipher.c]
-         correct bzero of chacha20+poly1305 key context. bz#2177 from
-         Loganaden Velvindron @ AfriNIC
-    
-         Also make it a memset for consistency with the rest of cipher.c
-
-commit f7e8a8796d661c9d6692ab837e1effd4f5ada1c2
-Author: Damien Miller <djm@mindrot.org>
-Date:   Thu Dec 5 10:25:51 2013 +1100
-
-       - djm@cvs.openbsd.org 2013/12/02 03:09:22
-         [key.c]
-         make key_to_blob() return a NULL blob on failure; part of
-         bz#2175 from Loganaden Velvindron @ AfriNIC
-
-commit f1e44ea9d9a6d4c1a95a0024132e603bd1778c9c
-Author: Damien Miller <djm@mindrot.org>
-Date:   Thu Dec 5 10:23:21 2013 +1100
-
-       - djm@cvs.openbsd.org 2013/12/02 02:56:17
-         [ssh-pkcs11-helper.c]
-         use-after-free; bz#2175 patch from Loganaden Velvindron @ AfriNIC
-
-commit 114e540b15d57618f9ebf624264298f80bbd8c77
-Author: Damien Miller <djm@mindrot.org>
-Date:   Thu Dec 5 10:22:57 2013 +1100
-
-       - djm@cvs.openbsd.org 2013/12/02 02:50:27
-         [PROTOCOL.chacha20poly1305]
-         typo; from Jon Cave
-
-commit e4870c090629e32f2cb649dc16d575eeb693f4a8
-Author: Damien Miller <djm@mindrot.org>
-Date:   Thu Dec 5 10:22:39 2013 +1100
-
-       - djm@cvs.openbsd.org 2013/12/01 23:19:05
-         [PROTOCOL]
-         mention curve25519-sha256@libssh.org key exchange algorithm
-
-commit 1d2f8804a6d33a4e908b876b2e1266b8260ec76b
-Author: Damien Miller <djm@mindrot.org>
-Date:   Thu Dec 5 10:22:03 2013 +1100
-
-       - deraadt@cvs.openbsd.org 2013/11/26 19:15:09
-         [pkcs11.h]
-         cleanup 1 << 31 idioms.  Resurrection of this issue pointed out by
-         Eitan Adler ok markus for ssh, implies same change in kerberosV
-
-commit bdb352a54f82df94a548e3874b22f2d6ae90328d
-Author: Damien Miller <djm@mindrot.org>
-Date:   Thu Dec 5 10:20:52 2013 +1100
-
-       - jmc@cvs.openbsd.org 2013/11/26 12:14:54
-         [ssh.1 ssh.c]
-         - put -Q in the right place
-         - Ar was a poor choice for the arguments to -Q. i've chosen an
-           admittedly equally poor Cm, at least consistent with the rest
-           of the docs. also no need for multiple instances
-         - zap a now redundant Nm
-         - usage() sync
-
-commit d937dc084a087090f1cf5395822c3ac958d33759
-Author: Damien Miller <djm@mindrot.org>
-Date:   Thu Dec 5 10:19:54 2013 +1100
-
-       - deraadt@cvs.openbsd.org 2013/11/25 18:04:21
-         [ssh.1 ssh.c]
-         improve -Q usage and such.  One usage change is that the option is now
-         case-sensitive
-         ok dtucker markus djm
-
-commit dec0393f7ee8aabc7d9d0fc2c5fddb4bc649112e
-Author: Damien Miller <djm@mindrot.org>
-Date:   Thu Dec 5 10:18:43 2013 +1100
-
-       - jmc@cvs.openbsd.org 2013/11/21 08:05:09
-         [ssh_config.5 sshd_config.5]
-         no need for .Pp before displays;
-
-commit 8a073cf57940aabf85e49799f89f5d5e9b072c1b
-Author: Damien Miller <djm@mindrot.org>
-Date:   Thu Nov 21 14:26:18 2013 +1100
-
-       - djm@cvs.openbsd.org 2013/11/21 03:18:51
-         [regress/cipher-speed.sh regress/integrity.sh regress/rekey.sh]
-         [regress/try-ciphers.sh]
-         use new "ssh -Q cipher-auth" query to obtain lists of authenticated
-         encryption ciphers instead of specifying them manually; ensures that
-         the new chacha20poly1305@openssh.com mode is tested;
-    
-         ok markus@ and naddy@ as part of the diff to add
-         chacha20poly1305@openssh.com
-
-commit ea61b2179f63d48968dd2c9617621002bb658bfe
-Author: Damien Miller <djm@mindrot.org>
-Date:   Thu Nov 21 14:25:15 2013 +1100
-
-       - djm@cvs.openbsd.org 2013/11/21 03:16:47
-         [regress/modpipe.c]
-         use unsigned long long instead of u_int64_t here to avoid warnings
-         on some systems portable OpenSSH is built on.
-
-commit 36aba25b0409d2db6afc84d54bc47a2532d38424
-Author: Damien Miller <djm@mindrot.org>
-Date:   Thu Nov 21 14:24:42 2013 +1100
-
-       - djm@cvs.openbsd.org 2013/11/21 03:15:46
-         [regress/krl.sh]
-         add some reminders for additional tests that I'd like to implement
-
-commit fa7a20bc289f09b334808d988746bc260a2f60c9
-Author: Damien Miller <djm@mindrot.org>
-Date:   Thu Nov 21 14:24:08 2013 +1100
-
-       - naddy@cvs.openbsd.org 2013/11/18 05:09:32
-         [regress/forward-control.sh]
-         bump timeout to 10 seconds to allow slow machines (e.g. Alpha PC164)
-         to successfully run this; ok djm@
-         (ID sync only; our timeouts are already longer)
-
-commit 0fde8acdad78a4d20cadae974376cc0165f645ee
-Author: Damien Miller <djm@mindrot.org>
-Date:   Thu Nov 21 14:12:23 2013 +1100
-
-       - djm@cvs.openbsd.org 2013/11/21 00:45:44
-         [Makefile.in PROTOCOL PROTOCOL.chacha20poly1305 authfile.c chacha.c]
-         [chacha.h cipher-chachapoly.c cipher-chachapoly.h cipher.c cipher.h]
-         [dh.c myproposal.h packet.c poly1305.c poly1305.h servconf.c ssh.1]
-         [ssh.c ssh_config.5 sshd_config.5] Add a new protocol 2 transport
-         cipher "chacha20-poly1305@openssh.com" that combines Daniel
-         Bernstein's ChaCha20 stream cipher and Poly1305 MAC to build an
-         authenticated encryption mode.
-    
-         Inspired by and similar to Adam Langley's proposal for TLS:
-         http://tools.ietf.org/html/draft-agl-tls-chacha20poly1305-03
-         but differs in layout used for the MAC calculation and the use of a
-         second ChaCha20 instance to separately encrypt packet lengths.
-         Details are in the PROTOCOL.chacha20poly1305 file.
-    
-         Feedback markus@, naddy@; manpage bits Loganden Velvindron @ AfriNIC
-         ok markus@ naddy@
-
-commit fdb2306acdc3eb2bc46b6dfdaaf6005c650af22a
-Author: Damien Miller <djm@mindrot.org>
-Date:   Thu Nov 21 13:57:15 2013 +1100
-
-       - deraadt@cvs.openbsd.org 2013/11/20 20:54:10
-         [canohost.c clientloop.c match.c readconf.c sftp.c]
-         unsigned casts for ctype macros where neccessary
-         ok guenther millert markus
-
-commit e00167307e4d3692695441e9bd712f25950cb894
-Author: Damien Miller <djm@mindrot.org>
-Date:   Thu Nov 21 13:56:49 2013 +1100
-
-       - deraadt@cvs.openbsd.org 2013/11/20 20:53:10
-         [scp.c]
-         unsigned casts for ctype macros where neccessary
-         ok guenther millert markus
-
-commit 23e00aa6ba9eee0e0c218f2026bf405ad4625832
-Author: Damien Miller <djm@mindrot.org>
-Date:   Thu Nov 21 13:56:28 2013 +1100
-
-       - djm@cvs.openbsd.org 2013/11/20 02:19:01
-         [sshd.c]
-         delay closure of in/out fds until after "Bad protocol version
-         identification..." message, as get_remote_ipaddr/get_remote_port
-         require them open.
-
-commit 867e6934be6521f87f04a5ab86702e2d1b314245
-Author: Damien Miller <djm@mindrot.org>
-Date:   Thu Nov 21 13:56:06 2013 +1100
-
-       - markus@cvs.openbsd.org 2013/11/13 13:48:20
-         [ssh-pkcs11.c]
-         add missing braces found by pedro
-
-commit 0600c7020f4fe68a780bd7cf21ff541a8d4b568a
-Author: Damien Miller <djm@mindrot.org>
-Date:   Thu Nov 21 13:55:43 2013 +1100
-
-       - dtucker@cvs.openbsd.org 2013/11/08 11:15:19
-         [bufaux.c bufbn.c buffer.c sftp-client.c sftp-common.c sftp-glob.c]
-         [uidswap.c] Include stdlib.h for free() as per the man page.
-
-commit b6a75b0b93b8faa6f79c3a395ab6c71f3f880b80
-Author: Darren Tucker <dtucker@zip.com.au>
-Date:   Sun Nov 10 20:25:22 2013 +1100
-
-     - (dtucker) [regress/keytype.sh] Populate ECDSA key types to be tested by
-       querying the ones that are compiled in.
-
-commit 2c89430119367eb1bc96ea5ee55de83357e4c926
-Author: Darren Tucker <dtucker@zip.com.au>
-Date:   Sun Nov 10 12:38:42 2013 +1100
-
-     - (dtucker) [key.c] Check for the correct defines for NID_secp521r1.
-
-commit dd5264db5f641dbd03186f9e5e83e4b14b3d0003
-Author: Darren Tucker <dtucker@zip.com.au>
-Date:   Sat Nov 9 22:32:51 2013 +1100
-
-     - (dtucker) [configure.ac] Add missing "test".
-
-commit 95cb2d4eb08117be061f3ff076adef3e9a5372c3
-Author: Darren Tucker <dtucker@zip.com.au>
-Date:   Sat Nov 9 22:02:31 2013 +1100
-
-     - (dtucker) [configure.ac] Fix brackets in NID_secp521r1 test.
-
-commit 37bcef51b3d9d496caecea6394814d2f49a1357f
-Author: Darren Tucker <dtucker@zip.com.au>
-Date:   Sat Nov 9 18:39:25 2013 +1100
-
-     - (dtucker) [configure.ac kex.c key.c myproposal.h] Test for the presence of
-       NID_X9_62_prime256v1, NID_secp384r1 and NID_secp521r1 and test that the
-       latter actually works before using it.  Fedora (at least) has NID_secp521r1
-       that doesn't work (see https://bugzilla.redhat.com/show_bug.cgi?id=1021897).
-
-commit 6e2fe81f926d995bae4be4a6b5b3c88c1c525187
-Author: Darren Tucker <dtucker@zip.com.au>
-Date:   Sat Nov 9 16:55:03 2013 +1100
-
-       - dtucker@cvs.openbsd.org 2013/11/09 05:41:34
-         [regress/test-exec.sh regress/rekey.sh]
-         Use smaller test data files to speed up tests.  Grow test datafiles
-         where necessary for a specific test.
-
-commit aff7ef1bb8b7c1eeb1f4812129091c5adbf51848
-Author: Darren Tucker <dtucker@zip.com.au>
-Date:   Sat Nov 9 00:19:22 2013 +1100
-
-     - (dtucker) [contrib/cygwin/ssh-host-config] Simplify host key generation:
-       rather than testing and generating each key, call ssh-keygen -A.
-       Patch from vinschen at redhat.com.
-
-commit 882abfd3fb3c98cfe70b4fc79224770468b570a5
-Author: Darren Tucker <dtucker@zip.com.au>
-Date:   Sat Nov 9 00:17:41 2013 +1100
-
-     - (dtucker) [Makefile.in configure.ac] Set MALLOC_OPTIONS per platform
-       and pass in TEST_ENV.  Unknown options cause stderr to get polluted
-       and the stderr-data test to fail.
-
-commit 8c333ec23bdf7da917aa20ac6803a2cdd79182c5
-Author: Darren Tucker <dtucker@zip.com.au>
-Date:   Fri Nov 8 21:12:58 2013 +1100
-
-     - (dtucker) [openbsd-compat/bsd-poll.c] Add headers to prevent compile
-       warnings.
-
-commit d94240b2f6b376b6e9de187e4a0cd4b89dfc48cb
-Author: Darren Tucker <dtucker@zip.com.au>
-Date:   Fri Nov 8 21:10:04 2013 +1100
-
-     - (dtucker) [myproposal.h] Conditionally enable CURVE25519_SHA256.
-
-commit 1c8ce34909886288a3932dce770deec5449f7bb5
-Author: Darren Tucker <dtucker@zip.com.au>
-Date:   Fri Nov 8 19:50:32 2013 +1100
-
-     - (dtucker) [kex.c] Only enable CURVE25519_SHA256 if we actually have
-       EVP_sha256.
-
-commit ccdb9bec46bcc88549b26a94aa0bae2b9f51031c
-Author: Darren Tucker <dtucker@zip.com.au>
-Date:   Fri Nov 8 18:54:38 2013 +1100
-
-     - (dtucker) [openbsd-compat/openbsd-compat.h] Add null implementation of
-       arc4random_stir for platforms that have arc4random but don't have
-       arc4random_stir (right now this is only OpenBSD -current).
-
-commit 3420a50169b52cc8d2775d51316f9f866c73398f
-Author: Damien Miller <djm@mindrot.org>
-Date:   Fri Nov 8 16:48:13 2013 +1100
-
-     - (djm) [README contrib/caldera/openssh.spec contrib/redhat/openssh.spec]
-       [contrib/suse/openssh.spec] Update version numbers following release.
-
-commit 3ac4a234df842fd8c94d9cb0ad198e1fe84b895b
-Author: Damien Miller <djm@mindrot.org>
-Date:   Fri Nov 8 12:39:49 2013 +1100
-
-       - djm@cvs.openbsd.org 2013/11/08 01:38:11
-         [version.h]
-         openssh-6.4
-
-commit 6c81fee693038de7d4a5559043350391db2a2761
-Author: Damien Miller <djm@mindrot.org>
-Date:   Fri Nov 8 12:19:55 2013 +1100
-
-       - djm@cvs.openbsd.org 2013/11/08 00:39:15
-         [auth-options.c auth2-chall.c authfd.c channels.c cipher-3des1.c]
-         [clientloop.c gss-genr.c monitor_mm.c packet.c schnorr.c umac.c]
-         [sftp-client.c sftp-glob.c]
-         use calloc for all structure allocations; from markus@
-
-commit 690d989008e18af3603a5e03f1276c9bad090370
-Author: Damien Miller <djm@mindrot.org>
-Date:   Fri Nov 8 12:16:49 2013 +1100
-
-       - dtucker@cvs.openbsd.org 2013/11/07 11:58:27
-         [cipher.c cipher.h kex.c kex.h mac.c mac.h servconf.c ssh.c]
-         Output the effective values of Ciphers, MACs and KexAlgorithms when
-         the default has not been overridden.  ok markus@
-
-commit 08998c5fb9c7c1d248caa73b76e02ca0482e6d85
-Author: Darren Tucker <dtucker@zip.com.au>
-Date:   Fri Nov 8 12:11:46 2013 +1100
-
-        - dtucker@cvs.openbsd.org 2013/11/08 01:06:14
-          [regress/rekey.sh]
-          Rekey less frequently during tests to speed them up
-
-commit 4bf7e50e533aa956366df7402c132f202e841a48
-Author: Darren Tucker <dtucker@zip.com.au>
-Date:   Thu Nov 7 22:33:48 2013 +1100
-
-     - (dtucker) [Makefile.in configure.ac] Remove TEST_SSH_SHA256 environment
-       variable.  It's no longer used now that we get the supported MACs from
-       ssh -Q.
-
-commit 6e9d6f411288374d1dee4b7debbfa90bc7e73035
-Author: Darren Tucker <dtucker@zip.com.au>
-Date:   Thu Nov 7 15:32:37 2013 +1100
-
-       - dtucker@cvs.openbsd.org 2013/11/07 04:26:56
-         [regress/kextype.sh]
-         trailing space
-
-commit 74cbc22529f3e5de756e1b7677b7624efb28f62c
-Author: Darren Tucker <dtucker@zip.com.au>
-Date:   Thu Nov 7 15:26:12 2013 +1100
-
-       - dtucker@cvs.openbsd.org 2013/11/07 03:55:41
-         [regress/kextype.sh]
-         Use ssh -Q to get kex types instead of a static list.
-
-commit a955041c930e63405159ff7d25ef14272f36eab3
-Author: Darren Tucker <dtucker@zip.com.au>
-Date:   Thu Nov 7 15:21:19 2013 +1100
-
-       - dtucker@cvs.openbsd.org 2013/11/07 02:48:38
-         [regress/integrity.sh regress/cipher-speed.sh regress/try-ciphers.sh]
-         Use ssh -Q instead of hardcoding lists of ciphers or MACs.
-
-commit 06595d639577577bc15d359e037a31eb83563269
-Author: Darren Tucker <dtucker@zip.com.au>
-Date:   Thu Nov 7 15:08:02 2013 +1100
-
-       - dtucker@cvs.openbsd.org 2013/11/07 01:12:51
-         [regress/rekey.sh]
-         Factor out the data transfer rekey tests
-
-commit 651dc8b2592202dac6b16ee3b82ce5b331be7da3
-Author: Darren Tucker <dtucker@zip.com.au>
-Date:   Thu Nov 7 15:04:44 2013 +1100
-
-       - dtucker@cvs.openbsd.org 2013/11/07 00:12:05
-         [regress/rekey.sh]
-         Test rekeying for every Cipher, MAC and KEX, plus test every KEX with
-         the GCM ciphers.
-
-commit 234557762ba1096a867ca6ebdec07efebddb5153
-Author: Darren Tucker <dtucker@zip.com.au>
-Date:   Thu Nov 7 15:00:51 2013 +1100
-
-       - dtucker@cvs.openbsd.org 2013/11/04 12:27:42
-         [regress/rekey.sh]
-         Test rekeying with all KexAlgorithms.
-
-commit bbfb9b0f386aab0c3e19d11f136199ef1b9ad0ef
-Author: Darren Tucker <dtucker@zip.com.au>
-Date:   Thu Nov 7 14:56:43 2013 +1100
-
-       - markus@cvs.openbsd.org 2013/11/02 22:39:53
-         [regress/kextype.sh]
-         add curve25519-sha256@libssh.org
-
-commit aa19548a98c0f89283ebd7354abd746ca6bc4fdf
-Author: Darren Tucker <dtucker@zip.com.au>
-Date:   Thu Nov 7 14:50:09 2013 +1100
-
-       - djm@cvs.openbsd.org 2013/10/09 23:44:14
-         [regress/Makefile] (ID sync only)
-         regression test for sftp request white/blacklisting and readonly mode.
-
-commit c8908aabff252f5da772d4e679479c2b7d18cac1
-Author: Damien Miller <djm@mindrot.org>
-Date:   Thu Nov 7 13:38:35 2013 +1100
-
-       - djm@cvs.openbsd.org 2013/11/06 23:05:59
-         [ssh-pkcs11.c]

*** DIFF OUTPUT TRUNCATED AT 1000 LINES ***

From owner-svn-src-all@freebsd.org  Tue Jan 19 10:11:53 2016
Return-Path: <owner-svn-src-all@freebsd.org>
Delivered-To: svn-src-all@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id 26B68A8839C;
 Tue, 19 Jan 2016 10:11:53 +0000 (UTC) (envelope-from des@FreeBSD.org)
Received: from repo.freebsd.org (repo.freebsd.org
 [IPv6:2610:1c1:1:6068::e6a:0])
 (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
 (Client did not present a certificate)
 by mx1.freebsd.org (Postfix) with ESMTPS id D3D881826;
 Tue, 19 Jan 2016 10:11:52 +0000 (UTC) (envelope-from des@FreeBSD.org)
Received: from repo.freebsd.org ([127.0.1.37])
 by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u0JABpFd041330;
 Tue, 19 Jan 2016 10:11:51 GMT (envelope-from des@FreeBSD.org)
Received: (from des@localhost)
 by repo.freebsd.org (8.15.2/8.15.2/Submit) id u0JABpK0041329;
 Tue, 19 Jan 2016 10:11:51 GMT (envelope-from des@FreeBSD.org)
Message-Id: <201601191011.u0JABpK0041329@repo.freebsd.org>
X-Authentication-Warning: repo.freebsd.org: des set sender to des@FreeBSD.org
 using -f
From: =?UTF-8?Q?Dag-Erling_Sm=c3=b8rgrav?= <des@FreeBSD.org>
Date: Tue, 19 Jan 2016 10:11:51 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-vendor@freebsd.org
Subject: svn commit: r294316 - vendor-crypto/openssh/7.1p2
X-SVN-Group: vendor-crypto
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.20
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for &quot;
 user&quot; and &quot; projects&quot; \)" <svn-src-all.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-all/>
List-Post: <mailto:svn-src-all@freebsd.org>
List-Help: <mailto:svn-src-all-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Tue, 19 Jan 2016 10:11:53 -0000

Author: des
Date: Tue Jan 19 10:11:51 2016
New Revision: 294316
URL: https://svnweb.freebsd.org/changeset/base/294316

Log:
  Tag OpenSSH 7.1p2.

Added:
  vendor-crypto/openssh/7.1p2/
     - copied from r294315, vendor-crypto/openssh/dist/

From owner-svn-src-all@freebsd.org  Tue Jan 19 10:17:25 2016
Return-Path: <owner-svn-src-all@freebsd.org>
Delivered-To: svn-src-all@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id E2402A8862C;
 Tue, 19 Jan 2016 10:17:25 +0000 (UTC)
 (envelope-from hselasky@FreeBSD.org)
Received: from repo.freebsd.org (repo.freebsd.org
 [IPv6:2610:1c1:1:6068::e6a:0])
 (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
 (Client did not present a certificate)
 by mx1.freebsd.org (Postfix) with ESMTPS id B58581BA5;
 Tue, 19 Jan 2016 10:17:25 +0000 (UTC)
 (envelope-from hselasky@FreeBSD.org)
Received: from repo.freebsd.org ([127.0.1.37])
 by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u0JAHObg042172;
 Tue, 19 Jan 2016 10:17:24 GMT (envelope-from hselasky@FreeBSD.org)
Received: (from hselasky@localhost)
 by repo.freebsd.org (8.15.2/8.15.2/Submit) id u0JAHOMJ042171;
 Tue, 19 Jan 2016 10:17:24 GMT (envelope-from hselasky@FreeBSD.org)
Message-Id: <201601191017.u0JAHOMJ042171@repo.freebsd.org>
X-Authentication-Warning: repo.freebsd.org: hselasky set sender to
 hselasky@FreeBSD.org using -f
From: Hans Petter Selasky <hselasky@FreeBSD.org>
Date: Tue, 19 Jan 2016 10:17:24 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-head@freebsd.org
Subject: svn commit: r294317 - head/sys/dev/mlx5/mlx5_en
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.20
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for &quot;
 user&quot; and &quot; projects&quot; \)" <svn-src-all.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-all/>
List-Post: <mailto:svn-src-all@freebsd.org>
List-Help: <mailto:svn-src-all-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Tue, 19 Jan 2016 10:17:26 -0000

Author: hselasky
Date: Tue Jan 19 10:17:24 2016
New Revision: 294317
URL: https://svnweb.freebsd.org/changeset/base/294317

Log:
  Declare local variables at top of function.
  
  Reviewed by:	gnn
  Sponsored by:	Mellanox Technologies
  MFC after:	5 days
  Differential Revision:	https://reviews.freebsd.org/D4939

Modified:
  head/sys/dev/mlx5/mlx5_en/mlx5_en_rx.c

Modified: head/sys/dev/mlx5/mlx5_en/mlx5_en_rx.c
==============================================================================
--- head/sys/dev/mlx5/mlx5_en/mlx5_en_rx.c	Tue Jan 19 10:11:51 2016	(r294316)
+++ head/sys/dev/mlx5/mlx5_en/mlx5_en_rx.c	Tue Jan 19 10:17:24 2016	(r294317)
@@ -100,20 +100,23 @@ mlx5e_lro_update_hdr(struct mbuf *mb, st
 	/* TODO: consider vlans, ip options, ... */
 	struct ether_header *eh;
 	uint16_t eh_type;
+	uint16_t tot_len;
 	struct ip6_hdr *ip6 = NULL;
 	struct ip *ip4 = NULL;
 	struct tcphdr *th;
 	uint32_t *ts_ptr;
+	uint8_t l4_hdr_type;
+	int tcp_ack;
 
 	eh = mtod(mb, struct ether_header *);
 	eh_type = ntohs(eh->ether_type);
 
-	u8 l4_hdr_type = get_cqe_l4_hdr_type(cqe);
-	int tcp_ack = ((CQE_L4_HDR_TYPE_TCP_ACK_NO_DATA == l4_hdr_type) ||
+	l4_hdr_type = get_cqe_l4_hdr_type(cqe);
+	tcp_ack = ((CQE_L4_HDR_TYPE_TCP_ACK_NO_DATA == l4_hdr_type) ||
 	    (CQE_L4_HDR_TYPE_TCP_ACK_AND_DATA == l4_hdr_type));
 
 	/* TODO: consider vlan */
-	u16 tot_len = be32_to_cpu(cqe->byte_cnt) - ETHER_HDR_LEN;
+	tot_len = be32_to_cpu(cqe->byte_cnt) - ETHER_HDR_LEN;
 
 	switch (eh_type) {
 	case ETHERTYPE_IP:

From owner-svn-src-all@freebsd.org  Tue Jan 19 10:19:34 2016
Return-Path: <owner-svn-src-all@freebsd.org>
Delivered-To: svn-src-all@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id 94B03A886F9;
 Tue, 19 Jan 2016 10:19:34 +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 639D01D54;
 Tue, 19 Jan 2016 10:19:34 +0000 (UTC)
 (envelope-from hselasky@FreeBSD.org)
Received: from repo.freebsd.org ([127.0.1.37])
 by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u0JAJXRc042295;
 Tue, 19 Jan 2016 10:19:33 GMT (envelope-from hselasky@FreeBSD.org)
Received: (from hselasky@localhost)
 by repo.freebsd.org (8.15.2/8.15.2/Submit) id u0JAJXUE042294;
 Tue, 19 Jan 2016 10:19:33 GMT (envelope-from hselasky@FreeBSD.org)
Message-Id: <201601191019.u0JAJXUE042294@repo.freebsd.org>
X-Authentication-Warning: repo.freebsd.org: hselasky set sender to
 hselasky@FreeBSD.org using -f
From: Hans Petter Selasky <hselasky@FreeBSD.org>
Date: Tue, 19 Jan 2016 10:19:33 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-head@freebsd.org
Subject: svn commit: r294318 - head/sys/dev/mlx5/mlx5_en
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.20
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for &quot;
 user&quot; and &quot; projects&quot; \)" <svn-src-all.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-all/>
List-Post: <mailto:svn-src-all@freebsd.org>
List-Help: <mailto:svn-src-all-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Tue, 19 Jan 2016 10:19:34 -0000

Author: hselasky
Date: Tue Jan 19 10:19:33 2016
New Revision: 294318
URL: https://svnweb.freebsd.org/changeset/base/294318

Log:
  Add clarifying comment about CQE zipping.
  
  Reviewed by:	gnn
  Sponsored by:	Mellanox Technologies
  MFC after:	5 days
  Differential Revision:	https://reviews.freebsd.org/D4940

Modified:
  head/sys/dev/mlx5/mlx5_en/mlx5_en_rx.c

Modified: head/sys/dev/mlx5/mlx5_en/mlx5_en_rx.c
==============================================================================
--- head/sys/dev/mlx5/mlx5_en/mlx5_en_rx.c	Tue Jan 19 10:17:24 2016	(r294317)
+++ head/sys/dev/mlx5/mlx5_en/mlx5_en_rx.c	Tue Jan 19 10:19:33 2016	(r294318)
@@ -270,6 +270,11 @@ mlx5e_decompress_cqe(struct mlx5e_cq *cq
     struct mlx5_mini_cqe8 *mini,
     u16 wqe_counter, int i)
 {
+	/*
+	 * NOTE: The fields which are not set here are copied from the
+	 * initial and common title. See memcpy() in
+	 * mlx5e_write_cqe_slot().
+	 */
 	title->byte_cnt = mini->byte_cnt;
 	title->wqe_counter = cpu_to_be16((wqe_counter + i) & cq->wq.sz_m1);
 	title->check_sum = mini->checksum;

From owner-svn-src-all@freebsd.org  Tue Jan 19 10:24:49 2016
Return-Path: <owner-svn-src-all@freebsd.org>
Delivered-To: svn-src-all@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3D9E2A88ACF;
 Tue, 19 Jan 2016 10:24:49 +0000 (UTC)
 (envelope-from hselasky@FreeBSD.org)
Received: from repo.freebsd.org (repo.freebsd.org
 [IPv6:2610:1c1:1:6068::e6a:0])
 (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
 (Client did not present a certificate)
 by mx1.freebsd.org (Postfix) with ESMTPS id E99381164;
 Tue, 19 Jan 2016 10:24:48 +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 u0JAOldh045068;
 Tue, 19 Jan 2016 10:24:47 GMT (envelope-from hselasky@FreeBSD.org)
Received: (from hselasky@localhost)
 by repo.freebsd.org (8.15.2/8.15.2/Submit) id u0JAOlje045067;
 Tue, 19 Jan 2016 10:24:47 GMT (envelope-from hselasky@FreeBSD.org)
Message-Id: <201601191024.u0JAOlje045067@repo.freebsd.org>
X-Authentication-Warning: repo.freebsd.org: hselasky set sender to
 hselasky@FreeBSD.org using -f
From: Hans Petter Selasky <hselasky@FreeBSD.org>
Date: Tue, 19 Jan 2016 10:24:47 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-head@freebsd.org
Subject: svn commit: r294319 - head/sys/dev/mlx5/mlx5_en
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.20
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for &quot;
 user&quot; and &quot; projects&quot; \)" <svn-src-all.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-all/>
List-Post: <mailto:svn-src-all@freebsd.org>
List-Help: <mailto:svn-src-all-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Tue, 19 Jan 2016 10:24:49 -0000

Author: hselasky
Date: Tue Jan 19 10:24:47 2016
New Revision: 294319
URL: https://svnweb.freebsd.org/changeset/base/294319

Log:
  Fix an issue where the network adapter could be left in down state
  after changing the HW LRO sysctl when previously in up state.
  
  Reviewed by:	gnn
  Sponsored by:	Mellanox Technologies
  MFC after:	5 days
  Differential Revision:	https://reviews.freebsd.org/D4941

Modified:
  head/sys/dev/mlx5/mlx5_en/mlx5_en_ethtool.c

Modified: head/sys/dev/mlx5/mlx5_en/mlx5_en_ethtool.c
==============================================================================
--- head/sys/dev/mlx5/mlx5_en/mlx5_en_ethtool.c	Tue Jan 19 10:19:33 2016	(r294318)
+++ head/sys/dev/mlx5/mlx5_en/mlx5_en_ethtool.c	Tue Jan 19 10:24:47 2016	(r294319)
@@ -178,23 +178,21 @@ mlx5e_ethtool_handler(SYSCTL_HANDLER_ARG
 	priv->params.tx_cq_moderation_mode = priv->params_ethtool.tx_coalesce_mode;
 
 	/* we always agree to turn off HW LRO - but not always to turn on */
-	if (priv->params_ethtool.hw_lro) {
-		if (priv->params_ethtool.hw_lro != 1) {
-			priv->params_ethtool.hw_lro = priv->params.hw_lro_en;
-			error = EINVAL;
-			goto done;
-		}
-		if (priv->ifp->if_capenable & IFCAP_LRO)
-			priv->params.hw_lro_en = !!MLX5_CAP_ETH(priv->mdev, lro_cap);
-		else {
-			/* set the correct (0) value to params_ethtool.hw_lro, issue a warning and return error */
+	if (priv->params_ethtool.hw_lro != 0) {
+		if ((priv->ifp->if_capenable & IFCAP_LRO) &&
+		    MLX5_CAP_ETH(priv->mdev, lro_cap)) {
+			priv->params.hw_lro_en = 1;
+			priv->params_ethtool.hw_lro = 1;
+		} else {
+			priv->params.hw_lro_en = 0;
 			priv->params_ethtool.hw_lro = 0;
 			error = EINVAL;
-			if_printf(priv->ifp, "Can't set HW_LRO to a device with LRO turned off");
-			goto done;
+
+			if_printf(priv->ifp, "Can't enable HW LRO: "
+			    "The HW or SW LRO feature is disabled");
 		}
 	} else {
-		priv->params.hw_lro_en = false;
+		priv->params.hw_lro_en = 0;
 	}
 
 	if (&priv->params_ethtool.arg[arg2] ==
@@ -208,7 +206,6 @@ mlx5e_ethtool_handler(SYSCTL_HANDLER_ARG
 			priv->params_ethtool.cqe_zipping = 0;
 		}
 	}
-
 	if (was_opened)
 		mlx5e_open_locked(priv->ifp);
 done:

From owner-svn-src-all@freebsd.org  Tue Jan 19 12:38:55 2016
Return-Path: <owner-svn-src-all@freebsd.org>
Delivered-To: svn-src-all@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3CC30A88B83;
 Tue, 19 Jan 2016 12:38:55 +0000 (UTC) (envelope-from des@FreeBSD.org)
Received: from repo.freebsd.org (repo.freebsd.org
 [IPv6:2610:1c1:1:6068::e6a:0])
 (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
 (Client did not present a certificate)
 by mx1.freebsd.org (Postfix) with ESMTPS id E61E11B07;
 Tue, 19 Jan 2016 12:38:54 +0000 (UTC) (envelope-from des@FreeBSD.org)
Received: from repo.freebsd.org ([127.0.1.37])
 by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u0JCcrYk082519;
 Tue, 19 Jan 2016 12:38:53 GMT (envelope-from des@FreeBSD.org)
Received: (from des@localhost)
 by repo.freebsd.org (8.15.2/8.15.2/Submit) id u0JCcrsv082516;
 Tue, 19 Jan 2016 12:38:53 GMT (envelope-from des@FreeBSD.org)
Message-Id: <201601191238.u0JCcrsv082516@repo.freebsd.org>
X-Authentication-Warning: repo.freebsd.org: des set sender to des@FreeBSD.org
 using -f
From: =?UTF-8?Q?Dag-Erling_Sm=c3=b8rgrav?= <des@FreeBSD.org>
Date: Tue, 19 Jan 2016 12:38:53 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-head@freebsd.org
Subject: svn commit: r294320 - head/crypto/openssh
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.20
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for &quot;
 user&quot; and &quot; projects&quot; \)" <svn-src-all.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-all/>
List-Post: <mailto:svn-src-all@freebsd.org>
List-Help: <mailto:svn-src-all-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Tue, 19 Jan 2016 12:38:55 -0000

Author: des
Date: Tue Jan 19 12:38:53 2016
New Revision: 294320
URL: https://svnweb.freebsd.org/changeset/base/294320

Log:
  Update the pre- and post-merge scripts to work correctly after the recent
  cleanup.  A round-trip (./freebsd-pre-merge.sh ; ./freebsd-post-merge.sh)
  now results in an unchanged working copy.

Modified:
  head/crypto/openssh/freebsd-post-merge.sh
  head/crypto/openssh/freebsd-pre-merge.sh

Modified: head/crypto/openssh/freebsd-post-merge.sh
==============================================================================
--- head/crypto/openssh/freebsd-post-merge.sh	Tue Jan 19 10:24:47 2016	(r294319)
+++ head/crypto/openssh/freebsd-post-merge.sh	Tue Jan 19 12:38:53 2016	(r294320)
@@ -6,9 +6,9 @@
 xargs perl -n -i -e '
 	print;
 	s/\$(Id|OpenBSD): [^\$]*/\$FreeBSD/ && print;
-	m/^\#include "includes.h"/ && print "__RCSID(\"\$FreeBSD\$\");\n";
 ' <keywords
 
-xargs perl -p -i -e '
-	s/^\.Dd \$Mdocdate: (\w+) (\d+) (\d+) \$$/.Dd $1 $2, $3/
-' <mdocdates
+xargs perl -n -i -e '
+	print;
+	m/^\#include "includes.h"/ && print "__RCSID(\"\$FreeBSD\$\");\n";
+' <rcsid

Modified: head/crypto/openssh/freebsd-pre-merge.sh
==============================================================================
--- head/crypto/openssh/freebsd-pre-merge.sh	Tue Jan 19 10:24:47 2016	(r294319)
+++ head/crypto/openssh/freebsd-pre-merge.sh	Tue Jan 19 12:38:53 2016	(r294320)
@@ -3,17 +3,15 @@
 # $FreeBSD$
 #
 
+:>keywords
+:>rcsid
 find . -type f -name '*.[1-9ch]' | cut -c 3- | \
 while read f ; do
-	svn propget svn:keywords $f | grep -q . && echo $f
-done >keywords
-xargs perl -n -i -e '
+	svn proplist -v $f | grep -q 'FreeBSD=%H' || continue
+	egrep -l '/\* \$FreeBSD[:\$]' $f >>keywords
+	egrep -l '__RCSID\("\$FreeBSD[:\$]' $f >>rcsid
+done
+sort -u keywords rcsid | xargs perl -n -i -e '
 	$strip = $ARGV if /\$(Id|OpenBSD):.*\$/;
-	print unless ($strip eq $ARGV && /\$FreeBSD.*\$/);
-' <keywords
-
-find . -type f -name '*.[1-9]' | cut -c 3- | \
-	xargs grep -l '^\.Dd ' . >mdocdates
-xargs perl -p -i -e '
-	s/^\.Dd (\w+) (\d+), (\d+)$/.Dd \$Mdocdate: $1 $2 $3 \$/;
-' <mdocdates
+	print unless (($strip eq $ARGV || /__RCSID/) && /\$FreeBSD[:\$]/);
+'

From owner-svn-src-all@freebsd.org  Tue Jan 19 13:09:22 2016
Return-Path: <owner-svn-src-all@freebsd.org>
Delivered-To: svn-src-all@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7F52FA875DD;
 Tue, 19 Jan 2016 13:09:22 +0000 (UTC)
 (envelope-from trasz@FreeBSD.org)
Received: from repo.freebsd.org (repo.freebsd.org
 [IPv6:2610:1c1:1:6068::e6a:0])
 (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
 (Client did not present a certificate)
 by mx1.freebsd.org (Postfix) with ESMTPS id 416CB19DB;
 Tue, 19 Jan 2016 13:09:22 +0000 (UTC)
 (envelope-from trasz@FreeBSD.org)
Received: from repo.freebsd.org ([127.0.1.37])
 by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u0JD9LB5091253;
 Tue, 19 Jan 2016 13:09:21 GMT (envelope-from trasz@FreeBSD.org)
Received: (from trasz@localhost)
 by repo.freebsd.org (8.15.2/8.15.2/Submit) id u0JD9LR9091251;
 Tue, 19 Jan 2016 13:09:21 GMT (envelope-from trasz@FreeBSD.org)
Message-Id: <201601191309.u0JD9LR9091251@repo.freebsd.org>
X-Authentication-Warning: repo.freebsd.org: trasz set sender to
 trasz@FreeBSD.org using -f
From: Edward Tomasz Napierala <trasz@FreeBSD.org>
Date: Tue, 19 Jan 2016 13:09:21 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-head@freebsd.org
Subject: svn commit: r294321 - head/usr.sbin/vidcontrol
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.20
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for &quot;
 user&quot; and &quot; projects&quot; \)" <svn-src-all.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-all/>
List-Post: <mailto:svn-src-all@freebsd.org>
List-Help: <mailto:svn-src-all-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Tue, 19 Jan 2016 13:09:22 -0000

Author: trasz
Date: Tue Jan 19 13:09:20 2016
New Revision: 294321
URL: https://svnweb.freebsd.org/changeset/base/294321

Log:
  Add "vidcontrol -i active", to print out active vty number,
  to be used with eg "vidcontrol -s".
  
  Reviewed by:	emaste@
  MFC after:	1 month
  Sponsored by:	The FreeBSD Foundation
  Differential Revision:	https://reviews.freebsd.org/D4968

Modified:
  head/usr.sbin/vidcontrol/vidcontrol.1
  head/usr.sbin/vidcontrol/vidcontrol.c

Modified: head/usr.sbin/vidcontrol/vidcontrol.1
==============================================================================
--- head/usr.sbin/vidcontrol/vidcontrol.1	Tue Jan 19 12:38:53 2016	(r294320)
+++ head/usr.sbin/vidcontrol/vidcontrol.1	Tue Jan 19 13:09:20 2016	(r294321)
@@ -13,7 +13,7 @@
 .\"     @(#)vidcontrol.1
 .\" $FreeBSD$
 .\"
-.Dd December 23, 2006
+.Dd January 19, 2016
 .Dt VIDCONTROL 1
 .Os
 .Sh NAME
@@ -33,7 +33,7 @@
 .Oc
 .Op Fl g Ar geometry
 .Op Fl h Ar size
-.Op Fl i Cm adapter | mode
+.Op Fl i Cm active | adapter | mode
 .Op Fl l Ar screen_map
 .Op Fl M Ar char
 .Op Fl m Cm on | off
@@ -198,6 +198,8 @@ below.
 Set the size of the history (scrollback) buffer to
 .Ar size
 lines.
+.It Fl i Cm active
+Shows the active vty number.
 .It Fl i Cm adapter
 Shows info about the current video adapter.
 .It Fl i Cm mode
@@ -266,7 +268,7 @@ option.
 However, you probably should not compile the kernel debugger on a box which
 is supposed to be physically secure.
 .It Fl s Ar number
-Set the current vty to
+Set the active vty to
 .Ar number .
 .It Fl T Cm xterm | cons25
 Switch between xterm and cons25 style terminal emulation.

Modified: head/usr.sbin/vidcontrol/vidcontrol.c
==============================================================================
--- head/usr.sbin/vidcontrol/vidcontrol.c	Tue Jan 19 12:38:53 2016	(r294320)
+++ head/usr.sbin/vidcontrol/vidcontrol.c	Tue Jan 19 13:09:20 2016	(r294321)
@@ -198,7 +198,7 @@ usage(void)
 	if (vt4_mode)
 		fprintf(stderr, "%s\n%s\n%s\n%s\n%s\n",
 "usage: vidcontrol [-CHPpx] [-b color] [-c appearance] [-f [[size] file]]",
-"                  [-g geometry] [-h size] [-i adapter | mode]",
+"                  [-g geometry] [-h size] [-i active | adapter | mode]",
 "                  [-M char] [-m on | off] [-r foreground background]",
 "                  [-S on | off] [-s number] [-T xterm | cons25] [-t N | off]",
 "                  [mode] [foreground [background]] [show]");
@@ -1035,6 +1035,18 @@ static const char
 
 
 /*
+ * Show active VTY, ie current console number.
+ */
+
+static void
+show_active_info(void)
+{
+
+	printf("%d\n", cur_info.active_vty);
+}
+
+
+/*
  * Show graphics adapter information.
  */
 
@@ -1153,13 +1165,16 @@ show_mode_info(void)
 static void
 show_info(char *arg)
 {
-	if (!strcmp(arg, "adapter")) {
+
+	if (!strcmp(arg, "active")) {
+		show_active_info();
+	} else if (!strcmp(arg, "adapter")) {
 		show_adapter_info();
 	} else if (!strcmp(arg, "mode")) {
 		show_mode_info();
 	} else {
 		revert();
-		errx(1, "argument to -i must be either adapter or mode");
+		errx(1, "argument to -i must be active, adapter, or mode");
 	}
 }
 

From owner-svn-src-all@freebsd.org  Tue Jan 19 13:15:58 2016
Return-Path: <owner-svn-src-all@freebsd.org>
Delivered-To: svn-src-all@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id D78E5A879A9;
 Tue, 19 Jan 2016 13:15:58 +0000 (UTC) (envelope-from des@FreeBSD.org)
Received: from repo.freebsd.org (repo.freebsd.org
 [IPv6:2610:1c1:1:6068::e6a:0])
 (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
 (Client did not present a certificate)
 by mx1.freebsd.org (Postfix) with ESMTPS id A94281FE7;
 Tue, 19 Jan 2016 13:15:58 +0000 (UTC) (envelope-from des@FreeBSD.org)
Received: from repo.freebsd.org ([127.0.1.37])
 by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u0JDFvh5094096;
 Tue, 19 Jan 2016 13:15:57 GMT (envelope-from des@FreeBSD.org)
Received: (from des@localhost)
 by repo.freebsd.org (8.15.2/8.15.2/Submit) id u0JDFvuJ094095;
 Tue, 19 Jan 2016 13:15:57 GMT (envelope-from des@FreeBSD.org)
Message-Id: <201601191315.u0JDFvuJ094095@repo.freebsd.org>
X-Authentication-Warning: repo.freebsd.org: des set sender to des@FreeBSD.org
 using -f
From: =?UTF-8?Q?Dag-Erling_Sm=c3=b8rgrav?= <des@FreeBSD.org>
Date: Tue, 19 Jan 2016 13:15:57 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-head@freebsd.org
Subject: svn commit: r294322 - head/crypto/openssh
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.20
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for &quot;
 user&quot; and &quot; projects&quot; \)" <svn-src-all.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-all/>
List-Post: <mailto:svn-src-all@freebsd.org>
List-Help: <mailto:svn-src-all-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Tue, 19 Jan 2016 13:15:58 -0000

Author: des
Date: Tue Jan 19 13:15:57 2016
New Revision: 294322
URL: https://svnweb.freebsd.org/changeset/base/294322

Log:
  Recognize *roff comments.

Modified:
  head/crypto/openssh/freebsd-pre-merge.sh

Modified: head/crypto/openssh/freebsd-pre-merge.sh
==============================================================================
--- head/crypto/openssh/freebsd-pre-merge.sh	Tue Jan 19 13:09:20 2016	(r294321)
+++ head/crypto/openssh/freebsd-pre-merge.sh	Tue Jan 19 13:15:57 2016	(r294322)
@@ -8,7 +8,7 @@
 find . -type f -name '*.[1-9ch]' | cut -c 3- | \
 while read f ; do
 	svn proplist -v $f | grep -q 'FreeBSD=%H' || continue
-	egrep -l '/\* \$FreeBSD[:\$]' $f >>keywords
+	egrep -l '(\.\\"|/\*) \$FreeBSD[:\$]' $f >>keywords
 	egrep -l '__RCSID\("\$FreeBSD[:\$]' $f >>rcsid
 done
 sort -u keywords rcsid | xargs perl -n -i -e '

From owner-svn-src-all@freebsd.org  Tue Jan 19 13:57:01 2016
Return-Path: <owner-svn-src-all@freebsd.org>
Delivered-To: svn-src-all@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id ED20AA88987;
 Tue, 19 Jan 2016 13:57:01 +0000 (UTC) (envelope-from des@des.no)
Received: from smtp.des.no (smtp.des.no [194.63.250.102])
 by mx1.freebsd.org (Postfix) with ESMTP id B7A5A1A2A;
 Tue, 19 Jan 2016 13:57:01 +0000 (UTC) (envelope-from des@des.no)
Received: from desk.des.no (smtp.des.no [194.63.250.102])
 by smtp.des.no (Postfix) with ESMTP id 1796F5F71;
 Tue, 19 Jan 2016 13:57:00 +0000 (UTC)
Received: by desk.des.no (Postfix, from userid 1001)
 id AEE4746FE0; Tue, 19 Jan 2016 14:56:55 +0100 (CET)
From: =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= <des@des.no>
To: Bryan Drewery <bdrewery@FreeBSD.org>
Cc: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-head@freebsd.org
Subject: Re: svn commit: r291941 - in head: lib/libpam/modules/pam_ssh
 secure/lib/libssh secure/libexec/sftp-server secure/libexec/ssh-keysign
 secure/libexec/ssh-pkcs11-helper secure/usr.bin/scp secure/usr.bin/...
References: <201512071608.tB7G89BZ095366@repo.freebsd.org>
Date: Tue, 19 Jan 2016 14:56:55 +0100
In-Reply-To: <201512071608.tB7G89BZ095366@repo.freebsd.org> (Bryan Drewery's
 message of "Mon, 7 Dec 2015 16:08:09 +0000 (UTC)")
Message-ID: <86vb6phdug.fsf@desk.des.no>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (berkeley-unix)
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.20
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for &quot;
 user&quot; and &quot; projects&quot; \)" <svn-src-all.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-all/>
List-Post: <mailto:svn-src-all@freebsd.org>
List-Help: <mailto:svn-src-all-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Tue, 19 Jan 2016 13:57:02 -0000

Bryan Drewery <bdrewery@FreeBSD.org> writes:
> Log:
>   Replace unneeded manual dependency on header by adding it to SRCS.
>=20=20=20
>   bsd.lib.mk and bsd.prog.mk already depend all objs on headers in SRCS if
>   there is not yet a depend file.  The headers in SRCS are never built or
>   installed.  After 'make depend' the header was already added as a proper
>   dependency on the objects where needed.

This doesn't work.  Try the following:

$ cd /usr/src/secure/lib/libssh
$ make depend && make
$ touch /usr/src/crypto/openssh/ssh_namespace.h
$ make

The second "make" should rebuild everything, but it doesn't.  Also,

$ grep -c ssh_namespace $(make -V.OBJDIR)/.depend
0

DES
--=20
Dag-Erling Sm=C3=B8rgrav - des@des.no

From owner-svn-src-all@freebsd.org  Tue Jan 19 14:15:11 2016
Return-Path: <owner-svn-src-all@freebsd.org>
Delivered-To: svn-src-all@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id 86782A883CA;
 Tue, 19 Jan 2016 14:15:11 +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 5B09514B8;
 Tue, 19 Jan 2016 14:15:11 +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 u0JEFAOE013370;
 Tue, 19 Jan 2016 14:15:10 GMT (envelope-from pfg@FreeBSD.org)
Received: (from pfg@localhost)
 by repo.freebsd.org (8.15.2/8.15.2/Submit) id u0JEF93P013366;
 Tue, 19 Jan 2016 14:15:09 GMT (envelope-from pfg@FreeBSD.org)
Message-Id: <201601191415.u0JEF93P013366@repo.freebsd.org>
X-Authentication-Warning: repo.freebsd.org: pfg set sender to pfg@FreeBSD.org
 using -f
From: "Pedro F. Giffuni" <pfg@FreeBSD.org>
Date: Tue, 19 Jan 2016 14:15:09 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org
Subject: svn commit: r294323 - stable/9/sys/fs/ext2fs
X-SVN-Group: stable-9
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.20
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for &quot;
 user&quot; and &quot; projects&quot; \)" <svn-src-all.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-all/>
List-Post: <mailto:svn-src-all@freebsd.org>
List-Help: <mailto:svn-src-all-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Tue, 19 Jan 2016 14:15:11 -0000

Author: pfg
Date: Tue Jan 19 14:15:09 2016
New Revision: 294323
URL: https://svnweb.freebsd.org/changeset/base/294323

Log:
  Revert r294273
  MFC	r293680
  ext4: add support for reading sparse files
  
  The change was meant for newer versions and doesn't work out of the box.
  While it seems easy to adapt I prfer not to have the implementations
  diverge at this time.
  
  Reported by:	Arrigo Marchiori
  PR:		205816

Modified:
  stable/9/sys/fs/ext2fs/ext2_bmap.c
  stable/9/sys/fs/ext2fs/ext2_extents.c
  stable/9/sys/fs/ext2fs/ext2_extents.h
  stable/9/sys/fs/ext2fs/ext2_vnops.c
Directory Properties:
  stable/9/sys/   (props changed)
  stable/9/sys/fs/   (props changed)

Modified: stable/9/sys/fs/ext2fs/ext2_bmap.c
==============================================================================
--- stable/9/sys/fs/ext2fs/ext2_bmap.c	Tue Jan 19 13:15:57 2016	(r294322)
+++ stable/9/sys/fs/ext2fs/ext2_bmap.c	Tue Jan 19 14:15:09 2016	(r294323)
@@ -102,6 +102,9 @@ ext4_bmapext(struct vnode *vp, int32_t b
 	fs = ip->i_e2fs;
 	lbn = bn;
 
+	/*
+	 * TODO: need to implement read ahead to improve the performance.
+	 */
 	if (runp != NULL)
 		*runp = 0;
 
@@ -109,25 +112,15 @@ ext4_bmapext(struct vnode *vp, int32_t b
 		*runb = 0;
 
 	ext4_ext_find_extent(fs, ip, lbn, &path);
-	if (path.ep_is_sparse) {
-		*bnp = -1;
-		if (runp != NULL)
-			*runp = path.ep_sparse_ext.e_len -
-			    (lbn - path.ep_sparse_ext.e_blk) - 1;
-	} else {
-		ep = path.ep_ext;
-		if (ep == NULL)
-			ret = EIO;
-		else {
-			*bnp = fsbtodb(fs, lbn - ep->e_blk +
-			    (ep->e_start_lo | (daddr_t)ep->e_start_hi << 32));
+	ep = path.ep_ext;
+	if (ep == NULL)
+		ret = EIO;
+	else {
+		*bnp = fsbtodb(fs, lbn - ep->e_blk +
+		    (ep->e_start_lo | (daddr_t)ep->e_start_hi << 32));
 
-			if (*bnp == 0)
-				*bnp = -1;
-
-			if (runp != NULL)
-				*runp = ep->e_len - (lbn - ep->e_blk) - 1;
-		}
+		if (*bnp == 0)
+			*bnp = -1;
 	}
 
 	if (path.ep_bp != NULL) {

Modified: stable/9/sys/fs/ext2fs/ext2_extents.c
==============================================================================
--- stable/9/sys/fs/ext2fs/ext2_extents.c	Tue Jan 19 13:15:57 2016	(r294322)
+++ stable/9/sys/fs/ext2fs/ext2_extents.c	Tue Jan 19 14:15:09 2016	(r294323)
@@ -66,14 +66,13 @@ static void
 ext4_ext_binsearch(struct inode *ip, struct ext4_extent_path *path, daddr_t lbn)
 {
 	struct ext4_extent_header *ehp = path->ep_header;
-	struct ext4_extent *first, *l, *r, *m;
+	struct ext4_extent *l, *r, *m;
 
 	if (ehp->eh_ecount == 0)
 		return;
 
-	first = (struct ext4_extent *)(char *)(ehp + 1);
-	l = first;
-	r = first + ehp->eh_ecount - 1;
+	l = (struct ext4_extent *)(char *)(ehp + 1);
+	r = (struct ext4_extent *)(char *)(ehp + 1) + ehp->eh_ecount - 1;
 	while (l <= r) {
 		m = l + (r - l) / 2;
 		if (lbn < m->e_blk)
@@ -82,25 +81,7 @@ ext4_ext_binsearch(struct inode *ip, str
 			l = m + 1;
 	}
 
-	if (l == first) {
-		path->ep_sparse_ext.e_blk = lbn;
-		path->ep_sparse_ext.e_len = first->e_blk - lbn;
-		path->ep_sparse_ext.e_start_hi = 0;
-		path->ep_sparse_ext.e_start_lo = 0;
-		path->ep_is_sparse = 1;
-		return;
-	}
 	path->ep_ext = l - 1;
-	if (path->ep_ext->e_blk + path->ep_ext->e_len <= lbn) {
-		path->ep_sparse_ext.e_blk = lbn;
-		if (l <= (first + ehp->eh_ecount - 1))
-			path->ep_sparse_ext.e_len = l->e_blk - lbn;
-		else	// XXX: where does it end?
-			path->ep_sparse_ext.e_len = 1;
-		path->ep_sparse_ext.e_start_hi = 0;
-		path->ep_sparse_ext.e_start_lo = 0;
-		path->ep_is_sparse = 1;
-	}
 }
 
 /*
@@ -188,7 +169,6 @@ ext4_ext_find_extent(struct m_ext2fs *fs
 	path->ep_depth = i;
 	path->ep_ext = NULL;
 	path->ep_index = NULL;
-	path->ep_is_sparse = 0;
 
 	ext4_ext_binsearch(ip, path, lbn);
 	return (path);

Modified: stable/9/sys/fs/ext2fs/ext2_extents.h
==============================================================================
--- stable/9/sys/fs/ext2fs/ext2_extents.h	Tue Jan 19 13:15:57 2016	(r294322)
+++ stable/9/sys/fs/ext2fs/ext2_extents.h	Tue Jan 19 14:15:09 2016	(r294323)
@@ -84,11 +84,7 @@ struct ext4_extent_cache {
 struct ext4_extent_path {
 	uint16_t ep_depth;
 	struct buf *ep_bp;
-	int ep_is_sparse;
-	union {
-		struct ext4_extent ep_sparse_ext;
-		struct ext4_extent *ep_ext;
-	};
+	struct ext4_extent *ep_ext;
 	struct ext4_extent_index *ep_index;
 	struct ext4_extent_header *ep_header;
 };

Modified: stable/9/sys/fs/ext2fs/ext2_vnops.c
==============================================================================
--- stable/9/sys/fs/ext2fs/ext2_vnops.c	Tue Jan 19 13:15:57 2016	(r294322)
+++ stable/9/sys/fs/ext2fs/ext2_vnops.c	Tue Jan 19 14:15:09 2016	(r294323)
@@ -1789,7 +1789,6 @@ ext2_ioctl(struct vop_ioctl_args *ap)
 static int
 ext4_ext_read(struct vop_read_args *ap)
 {
-	static unsigned char zeroes[EXT2_MAX_BLOCK_SIZE];
 	struct vnode *vp;
 	struct inode *ip;
 	struct uio *uio;
@@ -1834,15 +1833,11 @@ ext4_ext_read(struct vop_read_args *ap)
 		switch (cache_type) {
 		case EXT4_EXT_CACHE_NO:
 			ext4_ext_find_extent(fs, ip, lbn, &path);
-			if (path.ep_is_sparse)
-				ep = &path.ep_sparse_ext;
-			else
-				ep = path.ep_ext;
+			ep = path.ep_ext;
 			if (ep == NULL)
 				return (EIO);
 
-			ext4_ext_put_cache(ip, ep,
-			    path.ep_is_sparse ? EXT4_EXT_CACHE_GAP : EXT4_EXT_CACHE_IN);
+			ext4_ext_put_cache(ip, ep, EXT4_EXT_CACHE_IN);
 
 			newblk = lbn - ep->e_blk + (ep->e_start_lo |
 			    (daddr_t)ep->e_start_hi << 32);
@@ -1855,7 +1850,7 @@ ext4_ext_read(struct vop_read_args *ap)
 
 		case EXT4_EXT_CACHE_GAP:
 			/* block has not been allocated yet */
-			break;
+			return (0);
 
 		case EXT4_EXT_CACHE_IN:
 			newblk = lbn - nex.e_blk + (nex.e_start_lo |
@@ -1866,34 +1861,24 @@ ext4_ext_read(struct vop_read_args *ap)
 			panic("%s: invalid cache type", __func__);
 		}
 
-		if (cache_type == EXT4_EXT_CACHE_GAP ||
-		    (cache_type == EXT4_EXT_CACHE_NO && path.ep_is_sparse)) {
-			if (xfersize > sizeof(zeroes))
-				xfersize = sizeof(zeroes);
-			error = uiomove(zeroes, xfersize, uio);
-			if (error)
-				return (error);
-		} else {
-			error = bread(ip->i_devvp, fsbtodb(fs, newblk), size,
-			    NOCRED, &bp);
-			if (error) {
-				brelse(bp);
-				return (error);
-			}
+		error = bread(ip->i_devvp, fsbtodb(fs, newblk), size, NOCRED, &bp);
+		if (error) {
+			brelse(bp);
+			return (error);
+		}
 
-			size -= bp->b_resid;
-			if (size < xfersize) {
-				if (size == 0) {
-					bqrelse(bp);
-					break;
-				}
-				xfersize = size;
+		size -= bp->b_resid;
+		if (size < xfersize) {
+			if (size == 0) {
+				bqrelse(bp);
+				break;
 			}
-			error = uiomove(bp->b_data + blkoffset, xfersize, uio);
-			bqrelse(bp);
-			if (error)
-				return (error);
+			xfersize = size;
 		}
+		error = uiomove(bp->b_data + blkoffset, (int)xfersize, uio);
+		bqrelse(bp);
+		if (error)
+			return (error);
 	}
 
 	return (0);

From owner-svn-src-all@freebsd.org  Tue Jan 19 14:25:24 2016
Return-Path: <owner-svn-src-all@freebsd.org>
Delivered-To: svn-src-all@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0F5C4A88993;
 Tue, 19 Jan 2016 14:25:24 +0000 (UTC) (envelope-from des@FreeBSD.org)
Received: from repo.freebsd.org (repo.freebsd.org
 [IPv6:2610:1c1:1:6068::e6a:0])
 (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
 (Client did not present a certificate)
 by mx1.freebsd.org (Postfix) with ESMTPS id D260210A3;
 Tue, 19 Jan 2016 14:25:23 +0000 (UTC) (envelope-from des@FreeBSD.org)
Received: from repo.freebsd.org ([127.0.1.37])
 by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u0JEPMX4016705;
 Tue, 19 Jan 2016 14:25:22 GMT (envelope-from des@FreeBSD.org)
Received: (from des@localhost)
 by repo.freebsd.org (8.15.2/8.15.2/Submit) id u0JEPMLY016704;
 Tue, 19 Jan 2016 14:25:22 GMT (envelope-from des@FreeBSD.org)
Message-Id: <201601191425.u0JEPMLY016704@repo.freebsd.org>
X-Authentication-Warning: repo.freebsd.org: des set sender to des@FreeBSD.org
 using -f
From: =?UTF-8?Q?Dag-Erling_Sm=c3=b8rgrav?= <des@FreeBSD.org>
Date: Tue, 19 Jan 2016 14:25:22 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-head@freebsd.org
Subject: svn commit: r294324 - head/crypto/openssh
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.20
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for &quot;
 user&quot; and &quot; projects&quot; \)" <svn-src-all.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-all/>
List-Post: <mailto:svn-src-all@freebsd.org>
List-Help: <mailto:svn-src-all-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Tue, 19 Jan 2016 14:25:24 -0000

Author: des
Date: Tue Jan 19 14:25:22 2016
New Revision: 294324
URL: https://svnweb.freebsd.org/changeset/base/294324

Log:
  Use 'svn list -R' instead of find, and recognize comments in shell scripts
  and {ssh,sshd}_config.

Modified:
  head/crypto/openssh/freebsd-pre-merge.sh

Modified: head/crypto/openssh/freebsd-pre-merge.sh
==============================================================================
--- head/crypto/openssh/freebsd-pre-merge.sh	Tue Jan 19 14:15:09 2016	(r294323)
+++ head/crypto/openssh/freebsd-pre-merge.sh	Tue Jan 19 14:25:22 2016	(r294324)
@@ -5,10 +5,10 @@
 
 :>keywords
 :>rcsid
-find . -type f -name '*.[1-9ch]' | cut -c 3- | \
+svn list -R | grep -v '/$' | \
 while read f ; do
 	svn proplist -v $f | grep -q 'FreeBSD=%H' || continue
-	egrep -l '(\.\\"|/\*) \$FreeBSD[:\$]' $f >>keywords
+	egrep -l '^(#|\.\\"|/\*)[[:space:]]+\$FreeBSD[:\$]' $f >>keywords
 	egrep -l '__RCSID\("\$FreeBSD[:\$]' $f >>rcsid
 done
 sort -u keywords rcsid | xargs perl -n -i -e '

From owner-svn-src-all@freebsd.org  Tue Jan 19 14:38:23 2016
Return-Path: <owner-svn-src-all@freebsd.org>
Delivered-To: svn-src-all@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id D7764A88ECA;
 Tue, 19 Jan 2016 14:38:23 +0000 (UTC) (envelope-from des@FreeBSD.org)
Received: from repo.freebsd.org (repo.freebsd.org
 [IPv6:2610:1c1:1:6068::e6a:0])
 (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
 (Client did not present a certificate)
 by mx1.freebsd.org (Postfix) with ESMTPS id 9DF851A7D;
 Tue, 19 Jan 2016 14:38:23 +0000 (UTC) (envelope-from des@FreeBSD.org)
Received: from repo.freebsd.org ([127.0.1.37])
 by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u0JEcMKE020196;
 Tue, 19 Jan 2016 14:38:22 GMT (envelope-from des@FreeBSD.org)
Received: (from des@localhost)
 by repo.freebsd.org (8.15.2/8.15.2/Submit) id u0JEcKBZ020172;
 Tue, 19 Jan 2016 14:38:20 GMT (envelope-from des@FreeBSD.org)
Message-Id: <201601191438.u0JEcKBZ020172@repo.freebsd.org>
X-Authentication-Warning: repo.freebsd.org: des set sender to des@FreeBSD.org
 using -f
From: =?UTF-8?Q?Dag-Erling_Sm=c3=b8rgrav?= <des@FreeBSD.org>
Date: Tue, 19 Jan 2016 14:38:20 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-head@freebsd.org
Subject: svn commit: r294325 - in head: . crypto/openssh
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.20
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for &quot;
 user&quot; and &quot; projects&quot; \)" <svn-src-all.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-all/>
List-Post: <mailto:svn-src-all@freebsd.org>
List-Help: <mailto:svn-src-all-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Tue, 19 Jan 2016 14:38:23 -0000

Author: des
Date: Tue Jan 19 14:38:20 2016
New Revision: 294325
URL: https://svnweb.freebsd.org/changeset/base/294325

Log:
  As previously threatened, remove the HPN patch from OpenSSH.

Deleted:
  head/crypto/openssh/README.hpn
Modified:
  head/UPDATING
  head/crypto/openssh/buffer.c
  head/crypto/openssh/buffer.h
  head/crypto/openssh/channels.c
  head/crypto/openssh/channels.h
  head/crypto/openssh/clientloop.c
  head/crypto/openssh/compat.c
  head/crypto/openssh/compat.h
  head/crypto/openssh/misc.c
  head/crypto/openssh/misc.h
  head/crypto/openssh/readconf.c
  head/crypto/openssh/readconf.h
  head/crypto/openssh/servconf.c
  head/crypto/openssh/servconf.h
  head/crypto/openssh/serverloop.c
  head/crypto/openssh/session.c
  head/crypto/openssh/sftp.1
  head/crypto/openssh/sftp.c
  head/crypto/openssh/ssh-agent.1
  head/crypto/openssh/ssh.c
  head/crypto/openssh/ssh_config
  head/crypto/openssh/ssh_config.5
  head/crypto/openssh/ssh_namespace.h
  head/crypto/openssh/sshconnect.c
  head/crypto/openssh/sshd.c
  head/crypto/openssh/sshd_config
  head/crypto/openssh/sshd_config.5
  head/crypto/openssh/version.h

Modified: head/UPDATING
==============================================================================
--- head/UPDATING	Tue Jan 19 14:25:22 2016	(r294324)
+++ head/UPDATING	Tue Jan 19 14:38:20 2016	(r294325)
@@ -31,6 +31,10 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 11
 	disable the most expensive debugging functionality run
 	"ln -s 'abort:false,junk:false' /etc/malloc.conf".)
 
+20160119:
+	The NONE and HPN patches has been removed from OpenSSH.  They are
+	still available in the security/openssh-portable port.
+
 20160113:
 	With the addition of ypldap(8), a new _ypldap user is now required
 	during installworld. "mergemaster -p" can be used to add the user

Modified: head/crypto/openssh/buffer.c
==============================================================================
--- head/crypto/openssh/buffer.c	Tue Jan 19 14:25:22 2016	(r294324)
+++ head/crypto/openssh/buffer.c	Tue Jan 19 14:38:20 2016	(r294325)
@@ -27,7 +27,7 @@ __RCSID("$FreeBSD$");
 #include "log.h"
 
 #define	BUFFER_MAX_CHUNK	0x100000
-#define	BUFFER_MAX_LEN		0x4000000	/* 64MB */
+#define	BUFFER_MAX_LEN		0xa00000
 #define	BUFFER_ALLOCSZ		0x008000
 
 /* Initializes the buffer structure. */
@@ -167,13 +167,6 @@ buffer_len(const Buffer *buffer)
 	return buffer->end - buffer->offset;
 }
 
-/* Returns the maximum number of bytes of data that may be in the buffer. */
-u_int
-buffer_get_max_len(void)
-{
-	return (BUFFER_MAX_LEN);
-}
-
 /* Gets data from the beginning of the buffer. */
 
 int

Modified: head/crypto/openssh/buffer.h
==============================================================================
--- head/crypto/openssh/buffer.h	Tue Jan 19 14:25:22 2016	(r294324)
+++ head/crypto/openssh/buffer.h	Tue Jan 19 14:38:20 2016	(r294325)
@@ -47,8 +47,6 @@ int	 buffer_get_ret(Buffer *, void *, u_
 int	 buffer_consume_ret(Buffer *, u_int);
 int	 buffer_consume_end_ret(Buffer *, u_int);
 
-u_int	 buffer_get_max_len(void);
-
 #include <openssl/bn.h>
 
 void    buffer_put_bignum(Buffer *, const BIGNUM *);

Modified: head/crypto/openssh/channels.c
==============================================================================
--- head/crypto/openssh/channels.c	Tue Jan 19 14:25:22 2016	(r294324)
+++ head/crypto/openssh/channels.c	Tue Jan 19 14:38:20 2016	(r294325)
@@ -174,11 +174,6 @@ static void port_open_helper(Channel *c,
 static int connect_next(struct channel_connect *);
 static void channel_connect_ctx_free(struct channel_connect *);
 
-/* -- HPN */
-
-static int hpn_disabled = 0;
-static u_int buffer_size = CHAN_HPN_MIN_WINDOW_DEFAULT;
-
 /* -- channel core */
 
 Channel *
@@ -325,7 +320,6 @@ channel_new(char *ctype, int type, int r
 	c->self = found;
 	c->type = type;
 	c->ctype = ctype;
-	c->dynamic_window = 0;
 	c->local_window = window;
 	c->local_window_max = window;
 	c->local_consumed = 0;
@@ -826,45 +820,10 @@ channel_pre_open_13(Channel *c, fd_set *
 		FD_SET(c->sock, writeset);
 }
 
-static u_int
-channel_tcpwinsz(void)
-{
-	u_int32_t tcpwinsz;
-	socklen_t optsz;
-	int ret, sd;
-	u_int maxlen;
-
-	/* If we are not on a socket return 128KB. */
-	if (!packet_connection_is_on_socket())
-		return (128 * 1024);
-
-	tcpwinsz = 0;
-	optsz = sizeof(tcpwinsz);
-	sd = packet_get_connection_in();
-	ret = getsockopt(sd, SOL_SOCKET, SO_RCVBUF, &tcpwinsz, &optsz);
-
-	/* Return no more than the maximum buffer size. */
-	maxlen = buffer_get_max_len();
-	if ((ret == 0) && tcpwinsz > maxlen)
-		tcpwinsz = maxlen;
-	/* In case getsockopt() failed return a minimum. */
-	if (tcpwinsz == 0)
-		tcpwinsz = CHAN_TCP_WINDOW_DEFAULT;
-	debug2("tcpwinsz: %d for connection: %d", tcpwinsz, sd);
-	return (tcpwinsz);
-}
-
 static void
 channel_pre_open(Channel *c, fd_set *readset, fd_set *writeset)
 {
-	u_int limit;
-
-	/* Check buffer limits. */
-	if (!c->tcpwinsz || c->dynamic_window > 0)
-		c->tcpwinsz = channel_tcpwinsz();
-
-	limit = MIN(compat20 ? c->remote_window : packet_get_maxsize(),
-	    2 * c->tcpwinsz);
+	u_int limit = compat20 ? c->remote_window : packet_get_maxsize();
 
 	if (c->istate == CHAN_INPUT_OPEN &&
 	    limit > 0 &&
@@ -1857,25 +1816,14 @@ channel_check_window(Channel *c)
 	    c->local_maxpacket*3) ||
 	    c->local_window < c->local_window_max/2) &&
 	    c->local_consumed > 0) {
-		u_int addition = 0;
-
-		/* Adjust max window size if we are in a dynamic environment. */
-		if (c->dynamic_window && c->tcpwinsz > c->local_window_max) {
-			/*
-			 * Grow the window somewhat aggressively to maintain
-			 * pressure.
-			 */
-			addition = 1.5 * (c->tcpwinsz - c->local_window_max);
-			c->local_window_max += addition;
-		}
 		packet_start(SSH2_MSG_CHANNEL_WINDOW_ADJUST);
 		packet_put_int(c->remote_id);
-		packet_put_int(c->local_consumed + addition);
+		packet_put_int(c->local_consumed);
 		packet_send();
 		debug2("channel %d: window %d sent adjust %d",
 		    c->self, c->local_window,
 		    c->local_consumed);
-		c->local_window += c->local_consumed + addition;
+		c->local_window += c->local_consumed;
 		c->local_consumed = 0;
 	}
 	return 1;
@@ -2739,14 +2687,6 @@ channel_set_af(int af)
 	IPv4or6 = af;
 }
 
-void
-channel_set_hpn(int disabled, u_int buf_size)
-{
-	hpn_disabled = disabled;
-	buffer_size = buf_size;
-	debug("HPN Disabled: %d, HPN Buffer Size: %d",
-	    hpn_disabled, buffer_size);
-}
 
 /*
  * Determine whether or not a port forward listens to loopback, the
@@ -2924,18 +2864,10 @@ channel_setup_fwd_listener(int type, con
 			    *allocated_listen_port);
 		}
 
-		/*
-		 * Allocate a channel number for the socket.  Explicitly test
-		 * for hpn disabled option.  If true use smaller window size.
-		 */
-		if (hpn_disabled)
-			c = channel_new("port listener", type, sock, sock, -1,
-			    CHAN_TCP_WINDOW_DEFAULT, CHAN_TCP_PACKET_DEFAULT,
-			    0, "port listener", 1);
-		else
-			c = channel_new("port listener", type, sock, sock, -1,
-			    buffer_size, CHAN_TCP_PACKET_DEFAULT,
-			    0, "port listener", 1);
+		/* Allocate a channel number for the socket. */
+		c = channel_new("port listener", type, sock, sock, -1,
+		    CHAN_TCP_WINDOW_DEFAULT, CHAN_TCP_PACKET_DEFAULT,
+		    0, "port listener", 1);
 		c->path = xstrdup(host);
 		c->host_port = port_to_connect;
 		c->listening_addr = addr == NULL ? NULL : xstrdup(addr);
@@ -3583,16 +3515,10 @@ x11_create_display_inet(int x11_display_
 	*chanids = xcalloc(num_socks + 1, sizeof(**chanids));
 	for (n = 0; n < num_socks; n++) {
 		sock = socks[n];
-		if (hpn_disabled)
-			nc = channel_new("x11 listener",
-			    SSH_CHANNEL_X11_LISTENER, sock, sock, -1,
-			    CHAN_X11_WINDOW_DEFAULT, CHAN_X11_PACKET_DEFAULT,
-			    0, "X11 inet listener", 1);
-		else
-			nc = channel_new("x11 listener",
-			    SSH_CHANNEL_X11_LISTENER, sock, sock, -1,
-			    buffer_size, CHAN_X11_PACKET_DEFAULT,
-			    0, "X11 inet listener", 1);
+		nc = channel_new("x11 listener",
+		    SSH_CHANNEL_X11_LISTENER, sock, sock, -1,
+		    CHAN_X11_WINDOW_DEFAULT, CHAN_X11_PACKET_DEFAULT,
+		    0, "X11 inet listener", 1);
 		nc->single_connection = single_connection;
 		(*chanids)[n] = nc->self;
 	}

Modified: head/crypto/openssh/channels.h
==============================================================================
--- head/crypto/openssh/channels.h	Tue Jan 19 14:25:22 2016	(r294324)
+++ head/crypto/openssh/channels.h	Tue Jan 19 14:38:20 2016	(r294325)
@@ -133,8 +133,6 @@ struct Channel {
 	u_int	local_window_max;
 	u_int	local_consumed;
 	u_int	local_maxpacket;
-	u_int	tcpwinsz;
-	int	dynamic_window;
 	int     extended_usage;
 	int	single_connection;
 
@@ -176,7 +174,6 @@ struct Channel {
 #define CHAN_TCP_WINDOW_DEFAULT	(64*CHAN_TCP_PACKET_DEFAULT)
 #define CHAN_X11_PACKET_DEFAULT	(16*1024)
 #define CHAN_X11_WINDOW_DEFAULT	(4*CHAN_X11_PACKET_DEFAULT)
-#define CHAN_HPN_MIN_WINDOW_DEFAULT	(2*1024*1024)
 
 /* possible input states */
 #define CHAN_INPUT_OPEN			0
@@ -310,8 +307,4 @@ void	 chan_rcvd_ieof(Channel *);
 void	 chan_write_failed(Channel *);
 void	 chan_obuf_empty(Channel *);
 
-/* hpn handler */
-
-void	channel_set_hpn(int, u_int);
-
 #endif

Modified: head/crypto/openssh/clientloop.c
==============================================================================
--- head/crypto/openssh/clientloop.c	Tue Jan 19 14:25:22 2016	(r294324)
+++ head/crypto/openssh/clientloop.c	Tue Jan 19 14:38:20 2016	(r294325)
@@ -1892,14 +1892,9 @@ client_request_x11(const char *request_t
 	sock = x11_connect_display();
 	if (sock < 0)
 		return NULL;
-	if (options.hpn_disabled)
-		c = channel_new("x11", SSH_CHANNEL_X11_OPEN, sock, sock, -1,
-		    CHAN_TCP_WINDOW_DEFAULT, CHAN_X11_PACKET_DEFAULT,
-		    0, "x11", 1);
-	else
-		c = channel_new("x11", SSH_CHANNEL_X11_OPEN, sock, sock, -1,
-		    options.hpn_buffer_size, CHAN_X11_PACKET_DEFAULT,
-		    0, "x11", 1);
+	c = channel_new("x11",
+	    SSH_CHANNEL_X11_OPEN, sock, sock, -1,
+	    CHAN_TCP_WINDOW_DEFAULT, CHAN_X11_PACKET_DEFAULT, 0, "x11", 1);
 	c->force_drain = 1;
 	return c;
 }
@@ -1919,16 +1914,10 @@ client_request_agent(const char *request
 	sock = ssh_get_authentication_socket();
 	if (sock < 0)
 		return NULL;
-	if (options.hpn_disabled)
-		c = channel_new("authentication agent connection",
-		    SSH_CHANNEL_OPEN, sock, sock, -1,
-		    CHAN_X11_WINDOW_DEFAULT, CHAN_TCP_PACKET_DEFAULT, 0,
-		    "authentication agent connection", 1);
-	else
-		c = channel_new("authentication agent connection",
-		    SSH_CHANNEL_OPEN, sock, sock, -1,
-		    options.hpn_buffer_size, options.hpn_buffer_size, 0,
-		    "authentication agent connection", 1);
+	c = channel_new("authentication agent connection",
+	    SSH_CHANNEL_OPEN, sock, sock, -1,
+	    CHAN_X11_WINDOW_DEFAULT, CHAN_TCP_PACKET_DEFAULT, 0,
+	    "authentication agent connection", 1);
 	c->force_drain = 1;
 	return c;
 }
@@ -1955,14 +1944,8 @@ client_request_tun_fwd(int tun_mode, int
 		return -1;
 	}
 
-	if (options.hpn_disabled)
-		c = channel_new("tun", SSH_CHANNEL_OPENING, fd, fd, -1,
-		    CHAN_TCP_WINDOW_DEFAULT, CHAN_TCP_PACKET_DEFAULT,
-		    0, "tun", 1);
-	else
-		c = channel_new("tun", SSH_CHANNEL_OPENING, fd, fd, -1,
-		    options.hpn_buffer_size, CHAN_TCP_PACKET_DEFAULT,
-		    0, "tun", 1);
+	c = channel_new("tun", SSH_CHANNEL_OPENING, fd, fd, -1,
+	    CHAN_TCP_WINDOW_DEFAULT, CHAN_TCP_PACKET_DEFAULT, 0, "tun", 1);
 	c->datagram = 1;
 
 #if defined(SSH_TUN_FILTER)

Modified: head/crypto/openssh/compat.c
==============================================================================
--- head/crypto/openssh/compat.c	Tue Jan 19 14:25:22 2016	(r294324)
+++ head/crypto/openssh/compat.c	Tue Jan 19 14:38:20 2016	(r294325)
@@ -178,16 +178,6 @@ compat_datafellows(const char *version)
 			datafellows = check[i].bugs;
 			debug("match: %s pat %s compat 0x%08x",
 			    version, check[i].pat, datafellows);
-			/*
-			 * Check to see if the remote side is OpenSSH and not
-			 * HPN.  It is utterly strange to check it from the
-			 * version string and expose the option that way.
-			 */
-			if (strstr(version,"OpenSSH") != NULL &&
-			    strstr(version,"hpn") == NULL) {
-				datafellows |= SSH_BUG_LARGEWINDOW;
-				debug("Remote is not HPN-aware");
-			}
 			return;
 		}
 	}

Modified: head/crypto/openssh/compat.h
==============================================================================
--- head/crypto/openssh/compat.h	Tue Jan 19 14:25:22 2016	(r294324)
+++ head/crypto/openssh/compat.h	Tue Jan 19 14:38:20 2016	(r294325)
@@ -62,8 +62,6 @@
 #define SSH_BUG_DYNAMIC_RPORT	0x08000000
 #define SSH_BUG_CURVE25519PAD	0x10000000
 
-#define SSH_BUG_LARGEWINDOW	0x80000000
-
 void     enable_compat13(void);
 void     enable_compat20(void);
 void     compat_datafellows(const char *);

Modified: head/crypto/openssh/misc.c
==============================================================================
--- head/crypto/openssh/misc.c	Tue Jan 19 14:25:22 2016	(r294324)
+++ head/crypto/openssh/misc.c	Tue Jan 19 14:38:20 2016	(r294325)
@@ -1037,34 +1037,3 @@ sock_set_v6only(int s)
 		error("setsockopt IPV6_V6ONLY: %s", strerror(errno));
 #endif
 }
-
-void
-sock_get_rcvbuf(int *size, int rcvbuf)
-{
-	int sock, socksize;
-	socklen_t socksizelen = sizeof(socksize);
-
-	/*
-	 * Create a socket but do not connect it.  We use it
-	 * only to get the rcv socket size.
-	 */
-	sock = socket(AF_INET6, SOCK_STREAM, 0);
-	if (sock < 0)
-		sock = socket(AF_INET, SOCK_STREAM, 0);
-	if (sock < 0)
-		return;
-
-	/*
-	 * If the tcp_rcv_buf option is set and passed in, attempt to set the
-	 *  buffer size to its value.
-	 */
-	if (rcvbuf)
-		setsockopt(sock, SOL_SOCKET, SO_RCVBUF, (void *)&rcvbuf,
-		    sizeof(rcvbuf));
-
-	if (getsockopt(sock, SOL_SOCKET, SO_RCVBUF,
-	    &socksize, &socksizelen) == 0)
-		if (size != NULL)
-			*size = socksize;
-	close(sock);
-}

Modified: head/crypto/openssh/misc.h
==============================================================================
--- head/crypto/openssh/misc.h	Tue Jan 19 14:25:22 2016	(r294324)
+++ head/crypto/openssh/misc.h	Tue Jan 19 14:38:20 2016	(r294325)
@@ -40,7 +40,6 @@ time_t	 monotime(void);
 void	 lowercase(char *s);
 
 void	 sock_set_v6only(int);
-void	 sock_get_rcvbuf(int *, int);
 
 struct passwd *pwcopy(struct passwd *);
 const char *ssh_gai_strerror(int);

Modified: head/crypto/openssh/readconf.c
==============================================================================
--- head/crypto/openssh/readconf.c	Tue Jan 19 14:25:22 2016	(r294324)
+++ head/crypto/openssh/readconf.c	Tue Jan 19 14:38:20 2016	(r294325)
@@ -152,9 +152,8 @@ typedef enum {
 	oKexAlgorithms, oIPQoS, oRequestTTY, oIgnoreUnknown, oProxyUseFdpass,
 	oCanonicalDomains, oCanonicalizeHostname, oCanonicalizeMaxDots,
 	oCanonicalizeFallbackLocal, oCanonicalizePermittedCNAMEs,
-	oIgnoredUnknownOption,
-	oHPNDisabled, oHPNBufferSize, oTcpRcvBufPoll, oTcpRcvBuf,
-	oVersionAddendum, oDeprecated, oUnsupported
+	oVersionAddendum,
+	oIgnoredUnknownOption, oDeprecated, oUnsupported
 } OpCodes;
 
 /* Textual representations of the tokens. */
@@ -267,10 +266,6 @@ static struct {
 	{ "canonicalizemaxdots", oCanonicalizeMaxDots },
 	{ "canonicalizepermittedcnames", oCanonicalizePermittedCNAMEs },
 	{ "ignoreunknown", oIgnoreUnknown },
-	{ "hpndisabled", oHPNDisabled },
-	{ "hpnbuffersize", oHPNBufferSize },
-	{ "tcprcvbufpoll", oTcpRcvBufPoll },
-	{ "tcprcvbuf", oTcpRcvBuf },
 	{ "versionaddendum", oVersionAddendum },
 
 	{ NULL, oBadOption }
@@ -1352,22 +1347,6 @@ parse_int:
 		multistate_ptr = multistate_requesttty;
 		goto parse_multistate;
 
-	case oHPNDisabled:
-		intptr = &options->hpn_disabled;
-		goto parse_flag;
-
-	case oHPNBufferSize:
-		intptr = &options->hpn_buffer_size;
-		goto parse_int;
-
-	case oTcpRcvBufPoll:
-		intptr = &options->tcp_rcv_buf_poll;
-		goto parse_flag;
-
-	case oTcpRcvBuf:
-		intptr = &options->tcp_rcv_buf;
-		goto parse_int;
-
 	case oVersionAddendum:
 		if (s == NULL)
 			fatal("%.200s line %d: Missing argument.", filename,
@@ -1623,10 +1602,6 @@ initialize_options(Options * options)
 	options->canonicalize_fallback_local = -1;
 	options->canonicalize_hostname = -1;
 	options->version_addendum = NULL;
-	options->hpn_disabled = -1;
-	options->hpn_buffer_size = -1;
-	options->tcp_rcv_buf_poll = -1;
-	options->tcp_rcv_buf = -1;
 }
 
 /*
@@ -1821,31 +1796,6 @@ fill_default_options(Options * options)
 	/* options->preferred_authentications will be set in ssh */
 	if (options->version_addendum == NULL)
 		options->version_addendum = xstrdup(SSH_VERSION_FREEBSD);
-	if (options->hpn_disabled == -1)
-		options->hpn_disabled = 0;
-	if (options->hpn_buffer_size > -1)
-	{
-		u_int maxlen;
-
-		/* If a user tries to set the size to 0 set it to 1KB. */
-		if (options->hpn_buffer_size == 0)
-			options->hpn_buffer_size = 1024;
-		/* Limit the buffer to BUFFER_MAX_LEN. */
-		maxlen = buffer_get_max_len();
-		if (options->hpn_buffer_size > (maxlen / 1024)) {
-			debug("User requested buffer larger than %ub: %ub. "
-			    "Request reverted to %ub", maxlen,
-			    options->hpn_buffer_size * 1024, maxlen);
-			options->hpn_buffer_size = maxlen;
-		}
-		debug("hpn_buffer_size set to %d", options->hpn_buffer_size);
-	}
-	if (options->tcp_rcv_buf == 0)
-		options->tcp_rcv_buf = 1;
-	if (options->tcp_rcv_buf > -1)
-		options->tcp_rcv_buf *= 1024;
-	if (options->tcp_rcv_buf_poll == -1)
-		options->tcp_rcv_buf_poll = 1;
 }
 
 /*

Modified: head/crypto/openssh/readconf.h
==============================================================================
--- head/crypto/openssh/readconf.h	Tue Jan 19 14:25:22 2016	(r294324)
+++ head/crypto/openssh/readconf.h	Tue Jan 19 14:38:20 2016	(r294325)
@@ -153,17 +153,9 @@ typedef struct {
 	int	num_permitted_cnames;
 	struct allowed_cname permitted_cnames[MAX_CANON_DOMAINS];
 
-	char	*ignored_unknown; /* Pattern list of unknown tokens to ignore */
-
 	char   *version_addendum;	/* Appended to SSH banner */
 
-	int	hpn_disabled;	/* Switch to disable HPN buffer management. */
-	int	hpn_buffer_size;	/* User definable size for HPN buffer
-					 * window. */
-	int	tcp_rcv_buf_poll;	/* Option to poll recv buf every window
-					 * transfer. */
-	int	tcp_rcv_buf;	/* User switch to set tcp recv buffer. */
-
+	char	*ignored_unknown; /* Pattern list of unknown tokens to ignore */
 }       Options;
 
 #define SSH_CANONICALISE_NO	0

Modified: head/crypto/openssh/servconf.c
==============================================================================
--- head/crypto/openssh/servconf.c	Tue Jan 19 14:25:22 2016	(r294324)
+++ head/crypto/openssh/servconf.c	Tue Jan 19 14:38:20 2016	(r294325)
@@ -155,9 +155,6 @@ initialize_server_options(ServerOptions 
 	options->ip_qos_interactive = -1;
 	options->ip_qos_bulk = -1;
 	options->version_addendum = NULL;
-	options->hpn_disabled = -1;
-	options->hpn_buffer_size = -1;
-	options->tcp_rcv_buf_poll = -1;
 }
 
 void
@@ -318,38 +315,6 @@ fill_default_server_options(ServerOption
 	}
 #endif
 
-	if (options->hpn_disabled == -1)
-		options->hpn_disabled = 0;
-	if (options->hpn_buffer_size == -1) {
-		/*
-		 * HPN buffer size option not explicitly set.  Try to figure
-		 * out what value to use or resort to default.
-		 */
-		options->hpn_buffer_size = CHAN_SES_WINDOW_DEFAULT;
-		if (!options->hpn_disabled) {
-			sock_get_rcvbuf(&options->hpn_buffer_size, 0);
-			debug ("HPN Buffer Size: %d", options->hpn_buffer_size);
-		}
-	} else {
-		/*
-		 * In the case that the user sets both values in a
-		 * contradictory manner hpn_disabled overrrides hpn_buffer_size.
-		 */
-		if (options->hpn_disabled <= 0) {
-			u_int maxlen;
-
-			maxlen = buffer_get_max_len();
-			if (options->hpn_buffer_size == 0)
-				options->hpn_buffer_size = 1;
-			/* Limit the maximum buffer to BUFFER_MAX_LEN. */
-			if (options->hpn_buffer_size > maxlen / 1024)
-				options->hpn_buffer_size = maxlen;
-			else
-				options->hpn_buffer_size *= 1024;
-		} else {
-			options->hpn_buffer_size = CHAN_TCP_WINDOW_DEFAULT;
-		}
-	}
 }
 
 /* Keyword tokens. */
@@ -385,7 +350,6 @@ typedef enum {
 	sKexAlgorithms, sIPQoS, sVersionAddendum,
 	sAuthorizedKeysCommand, sAuthorizedKeysCommandUser,
 	sAuthenticationMethods, sHostKeyAgent,
-	sHPNDisabled, sHPNBufferSize, sTcpRcvBufPoll,
 	sDeprecated, sUnsupported
 } ServerOpCodes;
 
@@ -512,9 +476,6 @@ static struct {
 	{ "authorizedkeyscommanduser", sAuthorizedKeysCommandUser, SSHCFG_ALL },
 	{ "versionaddendum", sVersionAddendum, SSHCFG_GLOBAL },
 	{ "authenticationmethods", sAuthenticationMethods, SSHCFG_ALL },
-	{ "hpndisabled", sHPNDisabled, SSHCFG_ALL },
-	{ "hpnbuffersize", sHPNBufferSize, SSHCFG_ALL },
-	{ "tcprcvbufpoll", sTcpRcvBufPoll, SSHCFG_ALL },
 	{ NULL, sBadOption, 0 }
 };
 
@@ -1661,18 +1622,6 @@ process_server_config_line(ServerOptions
 		}
 		return 0;
 
-	case sHPNDisabled:
-		intptr = &options->hpn_disabled;
-		goto parse_flag;
-
-	case sHPNBufferSize:
-		intptr = &options->hpn_buffer_size;
-		goto parse_int;
-
-	case sTcpRcvBufPoll:
-		intptr = &options->tcp_rcv_buf_poll;
-		goto parse_flag;
-
 	case sDeprecated:
 		logit("%s line %d: Deprecated option %s",
 		    filename, linenum, arg);

Modified: head/crypto/openssh/servconf.h
==============================================================================
--- head/crypto/openssh/servconf.h	Tue Jan 19 14:25:22 2016	(r294324)
+++ head/crypto/openssh/servconf.h	Tue Jan 19 14:38:20 2016	(r294325)
@@ -181,10 +181,6 @@ typedef struct {
 
 	char   *version_addendum;	/* Appended to SSH banner */
 
-	int	hpn_disabled;		/* Disable HPN functionality. */
-	int	hpn_buffer_size;	/* Set HPN buffer size - default 2MB.*/
-	int	tcp_rcv_buf_poll;	/* Poll TCP rcv window in autotuning
-					 * kernels. */
 	u_int	num_auth_methods;
 	char   *auth_methods[MAX_AUTH_METHODS];
 }       ServerOptions;

Modified: head/crypto/openssh/serverloop.c
==============================================================================
--- head/crypto/openssh/serverloop.c	Tue Jan 19 14:25:22 2016	(r294324)
+++ head/crypto/openssh/serverloop.c	Tue Jan 19 14:38:20 2016	(r294325)
@@ -1016,14 +1016,8 @@ server_request_tun(void)
 	sock = tun_open(tun, mode);
 	if (sock < 0)
 		goto done;
-	if (options.hpn_disabled)
-		c = channel_new("tun", SSH_CHANNEL_OPEN, sock, sock, -1,
-		    CHAN_TCP_WINDOW_DEFAULT, CHAN_TCP_PACKET_DEFAULT, 0,
-		    "tun", 1);
-	else
-		c = channel_new("tun", SSH_CHANNEL_OPEN, sock, sock, -1,
-		    options.hpn_buffer_size, CHAN_TCP_PACKET_DEFAULT, 0,
-		    "tun", 1);
+	c = channel_new("tun", SSH_CHANNEL_OPEN, sock, sock, -1,
+	    CHAN_TCP_WINDOW_DEFAULT, CHAN_TCP_PACKET_DEFAULT, 0, "tun", 1);
 	c->datagram = 1;
 #if defined(SSH_TUN_FILTER)
 	if (mode == SSH_TUNMODE_POINTOPOINT)
@@ -1059,8 +1053,6 @@ server_request_session(void)
 	c = channel_new("session", SSH_CHANNEL_LARVAL,
 	    -1, -1, -1, /*window size*/0, CHAN_SES_PACKET_DEFAULT,
 	    0, "server-session", 1);
-	if (!options.hpn_disabled && options.tcp_rcv_buf_poll)
-		c->dynamic_window = 1;
 	if (session_open(the_authctxt, c->self) != 1) {
 		debug("session open failed, free channel %d", c->self);
 		channel_free(c);

Modified: head/crypto/openssh/session.c
==============================================================================
--- head/crypto/openssh/session.c	Tue Jan 19 14:25:22 2016	(r294324)
+++ head/crypto/openssh/session.c	Tue Jan 19 14:38:20 2016	(r294325)
@@ -237,10 +237,7 @@ auth_input_request_forwarding(struct pas
 		goto authsock_err;
 	}
 
-	/*
-	 * Allocate a channel for the authentication agent socket.
-	 * Ignore HPN on that one given no improvement expected.
-	 */
+	/* Allocate a channel for the authentication agent socket. */
 	nc = channel_new("auth socket",
 	    SSH_CHANNEL_AUTH_SOCKET, sock, sock, -1,
 	    CHAN_X11_WINDOW_DEFAULT, CHAN_X11_PACKET_DEFAULT,
@@ -2346,14 +2343,10 @@ session_set_fds(Session *s, int fdin, in
 	 */
 	if (s->chanid == -1)
 		fatal("no channel for session %d", s->self);
-	if (options.hpn_disabled)
-		channel_set_fds(s->chanid, fdout, fdin, fderr,
-		    ignore_fderr ? CHAN_EXTENDED_IGNORE : CHAN_EXTENDED_READ,
-		    1, is_tty, CHAN_SES_WINDOW_DEFAULT);
-	else
-		channel_set_fds(s->chanid, fdout, fdin, fderr,
-		    ignore_fderr ? CHAN_EXTENDED_IGNORE : CHAN_EXTENDED_READ,
-		    1, is_tty, options.hpn_buffer_size);
+	channel_set_fds(s->chanid,
+	    fdout, fdin, fderr,
+	    ignore_fderr ? CHAN_EXTENDED_IGNORE : CHAN_EXTENDED_READ,
+	    1, is_tty, CHAN_SES_WINDOW_DEFAULT);
 }
 
 /*

Modified: head/crypto/openssh/sftp.1
==============================================================================
--- head/crypto/openssh/sftp.1	Tue Jan 19 14:25:22 2016	(r294324)
+++ head/crypto/openssh/sftp.1	Tue Jan 19 14:38:20 2016	(r294325)
@@ -261,8 +261,7 @@ diagnostic messages from
 Specify how many requests may be outstanding at any one time.
 Increasing this may slightly improve file transfer speed
 but will increase memory usage.
-The default is 256 outstanding requests providing for 8MB
-of outstanding data with a 32KB buffer.
+The default is 64 outstanding requests.
 .It Fl r
 Recursively copy entire directories when uploading and downloading.
 Note that

Modified: head/crypto/openssh/sftp.c
==============================================================================
--- head/crypto/openssh/sftp.c	Tue Jan 19 14:25:22 2016	(r294324)
+++ head/crypto/openssh/sftp.c	Tue Jan 19 14:38:20 2016	(r294325)
@@ -69,7 +69,7 @@ typedef void EditLine;
 #include "sftp-client.h"
 
 #define DEFAULT_COPY_BUFLEN	32768	/* Size of buffer for up/download */
-#define DEFAULT_NUM_REQUESTS	256	/* # concurrent outstanding requests */
+#define DEFAULT_NUM_REQUESTS	64	/* # concurrent outstanding requests */
 
 /* File to read commands from */
 FILE* infile;

Modified: head/crypto/openssh/ssh-agent.1
==============================================================================
--- head/crypto/openssh/ssh-agent.1	Tue Jan 19 14:25:22 2016	(r294324)
+++ head/crypto/openssh/ssh-agent.1	Tue Jan 19 14:38:20 2016	(r294325)
@@ -35,7 +35,7 @@
 .\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
 .\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 .\"
-.Dd December 7, 2013
+.Dd $Mdocdate: December 7 2013 $
 .Dt SSH-AGENT 1
 .Os
 .Sh NAME

Modified: head/crypto/openssh/ssh.c
==============================================================================
--- head/crypto/openssh/ssh.c	Tue Jan 19 14:25:22 2016	(r294324)
+++ head/crypto/openssh/ssh.c	Tue Jan 19 14:38:20 2016	(r294325)
@@ -633,13 +633,11 @@ main(int ac, char **av)
 		case 'V':
 			if (options.version_addendum &&
 			    *options.version_addendum != '\0')
-				fprintf(stderr, "%s%s %s, %s\n", SSH_RELEASE,
-				    options.hpn_disabled ? "" : SSH_VERSION_HPN,
+				fprintf(stderr, "%s %s, %s\n", SSH_RELEASE,
 				    options.version_addendum,
 				    SSLeay_version(SSLEAY_VERSION));
 			else
-				fprintf(stderr, "%s%s, %s\n", SSH_RELEASE,
-				    options.hpn_disabled ? "" : SSH_VERSION_HPN,
+				fprintf(stderr, "%s, %s\n", SSH_RELEASE,
 				    SSLeay_version(SSLEAY_VERSION));
 			if (opt == 'V')
 				exit(0);
@@ -1657,46 +1655,9 @@ ssh_session2_open(void)
 	if (!isatty(err))
 		set_nonblock(err);
 
-	/*
-	 * We need to check to see what to do about buffer sizes here.
-	 * - In an HPN to non-HPN connection we want to limit the window size to
-	 *   something reasonable in case the far side has the large window bug.
-	 * - In an HPN to HPN connection we want to use the max window size but
-	 *   allow the user to override it.
-	 * - Lastly if HPN is disabled then use the ssh standard window size.
-	 *
-	 * We cannot just do a getsockopt() here and set the ssh window to that
-	 * as in case of autotuning of socket buffers the window would get stuck
-	 * at the initial buffer size, generally less than 96k.  Therefore we
-	 * need to set the maximum ssh window size to the maximum HPN buffer
-	 * size unless the user has set TcpRcvBufPoll to no.  In that case we
-	 * can just set the window to the minimum of HPN buffer size and TCP
-	 * receive buffer size.
-	 */
-	if (tty_flag)
-		options.hpn_buffer_size = CHAN_SES_WINDOW_DEFAULT;
-	else
-		options.hpn_buffer_size = CHAN_HPN_MIN_WINDOW_DEFAULT;
-
-	if (datafellows & SSH_BUG_LARGEWINDOW) {
-		debug("HPN to Non-HPN Connection");
-	} else if (options.tcp_rcv_buf_poll <= 0) {
-		sock_get_rcvbuf(&options.hpn_buffer_size, 0);
-		debug("HPNBufferSize set to TCP RWIN: %d",
-		    options.hpn_buffer_size);
-	} else if (options.tcp_rcv_buf > 0) {
-		sock_get_rcvbuf(&options.hpn_buffer_size,
-		    options.tcp_rcv_buf);
-		debug("HPNBufferSize set to user TCPRcvBuf: %d",
-		    options.hpn_buffer_size);
-	}
-	debug("Final hpn_buffer_size = %d", options.hpn_buffer_size);
-	channel_set_hpn(options.hpn_disabled, options.hpn_buffer_size);
-	window = options.hpn_buffer_size;
-
+	window = CHAN_SES_WINDOW_DEFAULT;
 	packetmax = CHAN_SES_PACKET_DEFAULT;
 	if (tty_flag) {
-		window = CHAN_SES_WINDOW_DEFAULT;
 		window >>= 1;
 		packetmax >>= 1;
 	}
@@ -1704,10 +1665,6 @@ ssh_session2_open(void)
 	    "session", SSH_CHANNEL_OPENING, in, out, err,
 	    window, packetmax, CHAN_EXTENDED_WRITE,
 	    "client-session", /*nonblock*/0);
-	if (!options.hpn_disabled && options.tcp_rcv_buf_poll > 0) {
-		c->dynamic_window = 1;
-		debug("Enabled Dynamic Window Scaling\n");
-	}
 
 	debug3("ssh_session2_open: channel_new: %d", c->self);
 

Modified: head/crypto/openssh/ssh_config
==============================================================================
--- head/crypto/openssh/ssh_config	Tue Jan 19 14:25:22 2016	(r294324)
+++ head/crypto/openssh/ssh_config	Tue Jan 19 14:38:20 2016	(r294325)
@@ -48,4 +48,4 @@
 #   ProxyCommand ssh -q -W %h:%p gateway.example.com
 #   RekeyLimit 1G 1h
 #   VerifyHostKeyDNS yes
-#   VersionAddendum FreeBSD-20140420
+#   VersionAddendum FreeBSD-20160119

Modified: head/crypto/openssh/ssh_config.5
==============================================================================
--- head/crypto/openssh/ssh_config.5	Tue Jan 19 14:25:22 2016	(r294324)
+++ head/crypto/openssh/ssh_config.5	Tue Jan 19 14:38:20 2016	(r294325)
@@ -1423,7 +1423,7 @@ See also VERIFYING HOST KEYS in
 Specifies a string to append to the regular version string to identify
 OS- or site-specific modifications.
 The default is
-.Dq FreeBSD-20140420 .
+.Dq FreeBSD-20160119 .
 The value
 .Dq none
 may be used to disable this.

Modified: head/crypto/openssh/ssh_namespace.h
==============================================================================
--- head/crypto/openssh/ssh_namespace.h	Tue Jan 19 14:25:22 2016	(r294324)
+++ head/crypto/openssh/ssh_namespace.h	Tue Jan 19 14:38:20 2016	(r294325)
@@ -7,7 +7,11 @@
  *
  * A list of symbols which need munging is obtained as follows:
  *
- * nm libssh.a | awk '/[0-9a-z] [A-Z] / && $3 !~ /^ssh_/ { printf("#define %-39s ssh_%s\n", $3, $3) }' | unexpand -a | sort -u
+ # nm libprivatessh.a | LC_ALL=C awk '
+     /^[0-9a-z]+ [Tt] [A-Za-z_][0-9A-Za-z_]*$/ && $3 !~ /^ssh_/ {
+         printf("#define %-39s ssh_%s\n", $3, $3)
+     }' | unexpand -a | LC_ALL=C sort -u
+ *
  * $FreeBSD$
  */
 
@@ -20,9 +24,13 @@
 #define a2port					ssh_a2port
 #define a2tun					ssh_a2tun
 #define add_host_to_hostfile			ssh_add_host_to_hostfile
+#define add_p1p1				ssh_add_p1p1
 #define addargs					ssh_addargs
 #define addr_match_cidr_list			ssh_addr_match_cidr_list
 #define addr_match_list				ssh_addr_match_list
+#define addr_netmatch				ssh_addr_netmatch
+#define addr_pton				ssh_addr_pton
+#define addr_pton_cidr				ssh_addr_pton_cidr
 #define ask_permission				ssh_ask_permission
 #define atomicio				ssh_atomicio
 #define atomicio6				ssh_atomicio6
@@ -31,7 +39,10 @@
 #define auth_request_forwarding			ssh_auth_request_forwarding
 #define bandwidth_limit				ssh_bandwidth_limit
 #define bandwidth_limit_init			ssh_bandwidth_limit_init
+#define barrett_reduce				ssh_barrett_reduce
+#define bcrypt_hash				ssh_bcrypt_hash
 #define bcrypt_pbkdf				ssh_bcrypt_pbkdf
+#define bf_ssh1_cipher				ssh_bf_ssh1_cipher
 #define blf_cbc_decrypt				ssh_blf_cbc_decrypt
 #define blf_cbc_encrypt				ssh_blf_cbc_encrypt
 #define blf_dec					ssh_blf_dec
@@ -70,7 +81,6 @@
 #define buffer_get_int64			ssh_buffer_get_int64
 #define buffer_get_int64_ret			ssh_buffer_get_int64_ret
 #define buffer_get_int_ret			ssh_buffer_get_int_ret
-#define buffer_get_max_len			ssh_buffer_get_max_len
 #define buffer_get_ret				ssh_buffer_get_ret
 #define buffer_get_short			ssh_buffer_get_short
 #define buffer_get_short_ret			ssh_buffer_get_short_ret
@@ -95,6 +105,7 @@
 #define buffer_put_short			ssh_buffer_put_short
 #define buffer_put_string			ssh_buffer_put_string
 #define buffer_uncompress			ssh_buffer_uncompress
+#define cert_free				ssh_cert_free
 #define chacha_encrypt_bytes			ssh_chacha_encrypt_bytes
 #define chacha_ivsetup				ssh_chacha_ivsetup
 #define chacha_keysetup				ssh_chacha_keysetup
@@ -109,6 +120,10 @@
 #define chan_rcvd_ieof				ssh_chan_rcvd_ieof
 #define chan_rcvd_oclose			ssh_chan_rcvd_oclose
 #define chan_read_failed			ssh_chan_read_failed
+#define chan_send_eof2				ssh_chan_send_eof2
+#define chan_send_oclose1			ssh_chan_send_oclose1
+#define chan_shutdown_read			ssh_chan_shutdown_read
+#define chan_shutdown_write			ssh_chan_shutdown_write
 #define chan_write_failed			ssh_chan_write_failed
 #define channel_add_adm_permitted_opens		ssh_channel_add_adm_permitted_opens
 #define channel_add_permitted_opens		ssh_channel_add_permitted_opens
@@ -121,6 +136,7 @@
 #define channel_clear_permitted_opens		ssh_channel_clear_permitted_opens
 #define channel_close_all			ssh_channel_close_all
 #define channel_close_fd			ssh_channel_close_fd
+#define channel_close_fds			ssh_channel_close_fds
 #define channel_connect_by_listen_address	ssh_channel_connect_by_listen_address
 #define channel_connect_stdio_fwd		ssh_channel_connect_stdio_fwd
 #define channel_connect_to			ssh_channel_connect_to
@@ -128,6 +144,8 @@
 #define channel_find_open			ssh_channel_find_open
 #define channel_free				ssh_channel_free
 #define channel_free_all			ssh_channel_free_all
+#define channel_fwd_bind_addr			ssh_channel_fwd_bind_addr
+#define channel_handler				ssh_channel_handler
 #define channel_input_close			ssh_channel_input_close
 #define channel_input_close_confirmation	ssh_channel_input_close_confirmation
 #define channel_input_data			ssh_channel_input_data
@@ -146,11 +164,28 @@
 #define channel_open_message			ssh_channel_open_message
 #define channel_output_poll			ssh_channel_output_poll
 #define channel_permit_all_opens		ssh_channel_permit_all_opens
-#define channel_post				ssh_channel_post
-#define channel_pre				ssh_channel_pre
+#define channel_post_auth_listener		ssh_channel_post_auth_listener
+#define channel_post_connecting			ssh_channel_post_connecting
+#define channel_post_mux_client			ssh_channel_post_mux_client
+#define channel_post_mux_listener		ssh_channel_post_mux_listener
+#define channel_post_open			ssh_channel_post_open
+#define channel_post_output_drain_13		ssh_channel_post_output_drain_13
+#define channel_post_port_listener		ssh_channel_post_port_listener
+#define channel_post_x11_listener		ssh_channel_post_x11_listener
+#define channel_pre_connecting			ssh_channel_pre_connecting
+#define channel_pre_dynamic			ssh_channel_pre_dynamic
+#define channel_pre_input_draining		ssh_channel_pre_input_draining
+#define channel_pre_listener			ssh_channel_pre_listener
+#define channel_pre_mux_client			ssh_channel_pre_mux_client
+#define channel_pre_open			ssh_channel_pre_open
+#define channel_pre_open_13			ssh_channel_pre_open_13
+#define channel_pre_output_draining		ssh_channel_pre_output_draining
+#define channel_pre_x11_open			ssh_channel_pre_x11_open
+#define channel_pre_x11_open_13			ssh_channel_pre_x11_open_13
 #define channel_prepare_select			ssh_channel_prepare_select
 #define channel_print_adm_permitted_opens	ssh_channel_print_adm_permitted_opens
 #define channel_register_cleanup		ssh_channel_register_cleanup
+#define channel_register_fds			ssh_channel_register_fds
 #define channel_register_filter			ssh_channel_register_filter
 #define channel_register_open_confirm		ssh_channel_register_open_confirm
 #define channel_register_status_confirm		ssh_channel_register_status_confirm
@@ -161,14 +196,17 @@
 #define channel_send_window_changes		ssh_channel_send_window_changes
 #define channel_set_af				ssh_channel_set_af
 #define channel_set_fds				ssh_channel_set_fds
-#define channel_set_hpn				ssh_channel_set_hpn
+#define channel_setup_fwd_listener		ssh_channel_setup_fwd_listener
 #define channel_setup_local_fwd_listener	ssh_channel_setup_local_fwd_listener
 #define channel_setup_remote_fwd_listener	ssh_channel_setup_remote_fwd_listener
 #define channel_still_open			ssh_channel_still_open
 #define channel_stop_listening			ssh_channel_stop_listening
 #define channel_update_permitted_opens		ssh_channel_update_permitted_opens
+#define check_crc				ssh_check_crc
+#define check_hostkeys_by_key_or_type		ssh_check_hostkeys_by_key_or_type
 #define check_key_in_hostkeys			ssh_check_key_in_hostkeys
 #define choose_dh				ssh_choose_dh
+#define choose_t				ssh_choose_t
 #define chop					ssh_chop
 #define cipher_alg_list				ssh_cipher_alg_list
 #define cipher_authlen				ssh_cipher_authlen
@@ -198,15 +236,17 @@
 #define cleanup_exit				ssh_cleanup_exit
 #define clear_cached_addr			ssh_clear_cached_addr
 #define colon					ssh_colon
-#define compat13				ssh_compat13
-#define compat20				ssh_compat20
+#define compare					ssh_compare
+#define compare_gps				ssh_compare_gps
 #define compat_cipher_proposal			ssh_compat_cipher_proposal
 #define compat_datafellows			ssh_compat_datafellows
+#define compat_kex_proposal			ssh_compat_kex_proposal
 #define compat_pkalg_proposal			ssh_compat_pkalg_proposal
+#define connect_next				ssh_connect_next
+#define connect_to				ssh_connect_to
 #define convtime				ssh_convtime
 #define crypto_hash_sha512			ssh_crypto_hash_sha512
 #define crypto_hashblocks_sha512		ssh_crypto_hashblocks_sha512
-#define crypto_scalarmult_curve25519		ssh_crypto_scalarmult_curve25519
 #define crypto_sign_ed25519			ssh_crypto_sign_ed25519
 #define crypto_sign_ed25519_keypair		ssh_crypto_sign_ed25519_keypair
 #define crypto_sign_ed25519_open		ssh_crypto_sign_ed25519_open
@@ -227,7 +267,6 @@
 #define crypto_sign_ed25519_ref_fe25519_square	ssh_crypto_sign_ed25519_ref_fe25519_square
 #define crypto_sign_ed25519_ref_fe25519_sub	ssh_crypto_sign_ed25519_ref_fe25519_sub
 #define crypto_sign_ed25519_ref_fe25519_unpack	ssh_crypto_sign_ed25519_ref_fe25519_unpack
-#define crypto_sign_ed25519_ref_ge25519_base	ssh_crypto_sign_ed25519_ref_ge25519_base
 #define crypto_sign_ed25519_ref_isneutral_vartime ssh_crypto_sign_ed25519_ref_isneutral_vartime
 #define crypto_sign_ed25519_ref_pack		ssh_crypto_sign_ed25519_ref_pack
 #define crypto_sign_ed25519_ref_sc25519_2interleave2 ssh_crypto_sign_ed25519_ref_sc25519_2interleave2
@@ -248,8 +287,7 @@
 #define crypto_sign_ed25519_ref_shortsc25519_from16bytes ssh_crypto_sign_ed25519_ref_shortsc25519_from16bytes
 #define crypto_sign_ed25519_ref_unpackneg_vartime ssh_crypto_sign_ed25519_ref_unpackneg_vartime
 #define crypto_verify_32			ssh_crypto_verify_32
-#define current_keys				ssh_current_keys
-#define datafellows				ssh_datafellows
+#define dbl_p1p1				ssh_dbl_p1p1
 #define debug					ssh_debug
 #define debug2					ssh_debug2
 #define debug3					ssh_debug3
@@ -264,8 +302,6 @@
 #define dh_new_group14				ssh_dh_new_group14
 #define dh_new_group_asc			ssh_dh_new_group_asc
 #define dh_pub_is_valid				ssh_dh_pub_is_valid
-#define digests					ssh_digests
-#define dispatch				ssh_dispatch
 #define dispatch_init				ssh_dispatch_init
 #define dispatch_protocol_error			ssh_dispatch_protocol_error
 #define dispatch_protocol_ignore		ssh_dispatch_protocol_ignore
@@ -283,6 +319,7 @@
 #define explicit_bzero				ssh_explicit_bzero
 #define export_dns_rr				ssh_export_dns_rr
 #define fatal					ssh_fatal
+#define filter_proposal				ssh_filter_proposal
 #define fmt_scaled				ssh_fmt_scaled
 #define free_hostkeys				ssh_free_hostkeys
 #define freeargs				ssh_freeargs
@@ -298,20 +335,27 @@
 #define get_remote_name_or_ip			ssh_get_remote_name_or_ip
 #define get_remote_port				ssh_get_remote_port
 #define get_sock_port				ssh_get_sock_port
+#define get_socket_address			ssh_get_socket_address
 #define get_u16					ssh_get_u16
 #define get_u32					ssh_get_u32
 #define get_u64					ssh_get_u64
 #define getrrsetbyname				ssh_getrrsetbyname
 #define glob					ssh_glob
+#define glob0					ssh_glob0
+#define glob2					ssh_glob2
+#define globexp1				ssh_globexp1
+#define globextend				ssh_globextend
 #define globfree				ssh_globfree
 #define host_hash				ssh_host_hash
 #define hostfile_read_key			ssh_hostfile_read_key
 #define hpdelim					ssh_hpdelim
-#define incoming_stream				ssh_incoming_stream
 #define init_hostkeys				ssh_init_hostkeys
 #define iptos2str				ssh_iptos2str
 #define ipv64_normalise_mapped			ssh_ipv64_normalise_mapped
+#define is_key_revoked				ssh_is_key_revoked
+#define kex_alg_by_name				ssh_kex_alg_by_name
 #define kex_alg_list				ssh_kex_alg_list
+#define kex_buf2prop				ssh_kex_buf2prop
 #define kex_c25519_hash				ssh_kex_c25519_hash
 #define kex_derive_keys				ssh_kex_derive_keys
 #define kex_derive_keys_bn			ssh_kex_derive_keys_bn
@@ -321,6 +365,8 @@
 #define kex_get_newkeys				ssh_kex_get_newkeys
 #define kex_input_kexinit			ssh_kex_input_kexinit
 #define kex_names_valid				ssh_kex_names_valid
+#define kex_prop_free				ssh_kex_prop_free
+#define kex_protocol_error			ssh_kex_protocol_error
 #define kex_send_kexinit			ssh_kex_send_kexinit
 #define kex_setup				ssh_kex_setup
 #define kexc25519_client			ssh_kexc25519_client

*** DIFF OUTPUT TRUNCATED AT 1000 LINES ***

From owner-svn-src-all@freebsd.org  Tue Jan 19 15:02:39 2016
Return-Path: <owner-svn-src-all@freebsd.org>
Delivered-To: svn-src-all@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6C0FAA880D7;
 Tue, 19 Jan 2016 15:02:39 +0000 (UTC)
 (envelope-from bapt@FreeBSD.org)
Received: from repo.freebsd.org (repo.freebsd.org
 [IPv6:2610:1c1:1:6068::e6a:0])
 (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
 (Client did not present a certificate)
 by mx1.freebsd.org (Postfix) with ESMTPS id 254F21E6F;
 Tue, 19 Jan 2016 15:02:39 +0000 (UTC)
 (envelope-from bapt@FreeBSD.org)
Received: from repo.freebsd.org ([127.0.1.37])
 by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u0JF2c1k028901;
 Tue, 19 Jan 2016 15:02:38 GMT (envelope-from bapt@FreeBSD.org)
Received: (from bapt@localhost)
 by repo.freebsd.org (8.15.2/8.15.2/Submit) id u0JF2cpV028900;
 Tue, 19 Jan 2016 15:02:38 GMT (envelope-from bapt@FreeBSD.org)
Message-Id: <201601191502.u0JF2cpV028900@repo.freebsd.org>
X-Authentication-Warning: repo.freebsd.org: bapt set sender to
 bapt@FreeBSD.org using -f
From: Baptiste Daroussin <bapt@FreeBSD.org>
Date: Tue, 19 Jan 2016 15:02:38 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-head@freebsd.org
Subject: svn commit: r294326 - head/lib/libfetch
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.20
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for &quot;
 user&quot; and &quot; projects&quot; \)" <svn-src-all.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-all/>
List-Post: <mailto:svn-src-all@freebsd.org>
List-Help: <mailto:svn-src-all-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Tue, 19 Jan 2016 15:02:39 -0000

Author: bapt
Date: Tue Jan 19 15:02:37 2016
New Revision: 294326
URL: https://svnweb.freebsd.org/changeset/base/294326

Log:
  Test for /etc/ssl/cert.pem existence to avoid masking SSL_CA_CERT_PATH
  
  Prior to this patch, unless SSL_CA_CERT_FILE is set in the environment,
  libfetch will set the CA file to "/usr/local/etc/cert.pem" if it exists,
  and to "/etc/ssl/cert.pem" otherwise. This has the consequence of
  masking SSL_CA_CERT_PATH, because OpenSSL will ignore the CA path if a CA
  file is set but fails to load (see X509_STORE_load_locations()).
  
  While here, fall back to OpenSSL defaults if neither SSL_CA_CERT_FILE nor
  SSL_CA_CERT_PATH are set in the environment, and if neither of the
  libfetch default CA files exists.
  
  PR:		193871
  Submitted by:	John W. O'Brien <john@saltant.com>
  Approved by:	des
  MFC after:	1 week

Modified:
  head/lib/libfetch/common.c

Modified: head/lib/libfetch/common.c
==============================================================================
--- head/lib/libfetch/common.c	Tue Jan 19 14:38:20 2016	(r294325)
+++ head/lib/libfetch/common.c	Tue Jan 19 15:02:37 2016	(r294326)
@@ -705,7 +705,8 @@ fetch_ssl_setup_peer_verification(SSL_CT
 		if (ca_cert_file == NULL &&
 		    access(LOCAL_CERT_FILE, R_OK) == 0)
 			ca_cert_file = LOCAL_CERT_FILE;
-		if (ca_cert_file == NULL)
+		if (ca_cert_file == NULL &&
+		    access(BASE_CERT_FILE, R_OK) == 0)
 			ca_cert_file = BASE_CERT_FILE;
 		ca_cert_path = getenv("SSL_CA_CERT_PATH");
 		if (verbose) {
@@ -716,11 +717,17 @@ fetch_ssl_setup_peer_verification(SSL_CT
 			if (ca_cert_path != NULL)
 				fetch_info("Using CA cert path: %s",
 				    ca_cert_path);
+			if (ca_cert_file == NULL && ca_cert_path == NULL)
+				fetch_info("Using OpenSSL default "
+				    "CA cert file and path");
 		}
 		SSL_CTX_set_verify(ctx, SSL_VERIFY_PEER,
 		    fetch_ssl_cb_verify_crt);
-		SSL_CTX_load_verify_locations(ctx, ca_cert_file,
-		    ca_cert_path);
+		if (ca_cert_file != NULL || ca_cert_path != NULL)
+			SSL_CTX_load_verify_locations(ctx, ca_cert_file,
+			    ca_cert_path);
+		else
+			SSL_CTX_set_default_verify_paths(ctx);
 		if ((crl_file = getenv("SSL_CRL_FILE")) != NULL) {
 			if (verbose)
 				fetch_info("Using CRL file: %s", crl_file);

From owner-svn-src-all@freebsd.org  Tue Jan 19 15:33:30 2016
Return-Path: <owner-svn-src-all@freebsd.org>
Delivered-To: svn-src-all@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9CC2DA88CCF;
 Tue, 19 Jan 2016 15:33: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 6BDF91301;
 Tue, 19 Jan 2016 15:33: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 u0JFXTEG037814;
 Tue, 19 Jan 2016 15:33:29 GMT (envelope-from hselasky@FreeBSD.org)
Received: (from hselasky@localhost)
 by repo.freebsd.org (8.15.2/8.15.2/Submit) id u0JFXSxf037804;
 Tue, 19 Jan 2016 15:33:28 GMT (envelope-from hselasky@FreeBSD.org)
Message-Id: <201601191533.u0JFXSxf037804@repo.freebsd.org>
X-Authentication-Warning: repo.freebsd.org: hselasky set sender to
 hselasky@FreeBSD.org using -f
From: Hans Petter Selasky <hselasky@FreeBSD.org>
Date: Tue, 19 Jan 2016 15:33:28 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-head@freebsd.org
Subject: svn commit: r294327 - in head/sys: dev/cxgb dev/cxgbe dev/e1000
 dev/hyperv/netvsc dev/ixgbe dev/mxge netinet sys
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.20
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for &quot;
 user&quot; and &quot; projects&quot; \)" <svn-src-all.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-all/>
List-Post: <mailto:svn-src-all@freebsd.org>
List-Help: <mailto:svn-src-all-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Tue, 19 Jan 2016 15:33:30 -0000

Author: hselasky
Date: Tue Jan 19 15:33:28 2016
New Revision: 294327
URL: https://svnweb.freebsd.org/changeset/base/294327

Log:
  Add optimizing LRO wrapper:
  
  - Add optimizing LRO wrapper which pre-sorts all incoming packets
    according to the hash type and flowid. This prevents exhaustion of
    the LRO entries due to too many connections at the same time.
    Testing using a larger number of higher bandwidth TCP connections
    showed that the incoming ACK packet aggregation rate increased from
    ~1.3:1 to almost 3:1. Another test showed that for a number of TCP
    connections greater than 16 per hardware receive ring, where 8 TCP
    connections was the LRO active entry limit, there was a significant
    improvement in throughput due to being able to fully aggregate more
    than 8 TCP stream. For very few very high bandwidth TCP streams, the
    optimizing LRO wrapper will add CPU usage instead of reducing CPU
    usage. This is expected. Network drivers which want to use the
    optimizing LRO wrapper needs to call "tcp_lro_queue_mbuf()" instead
    of "tcp_lro_rx()" and "tcp_lro_flush_all()" instead of
    "tcp_lro_flush()". Further the LRO control structure must be
    initialized using "tcp_lro_init_args()" passing a non-zero number
    into the "lro_mbufs" argument.
  
  - Make LRO statistics 64-bit. Previously 32-bit integers were used for
    statistics which can be prone to wrap-around. Fix this while at it
    and update all SYSCTL's which expose LRO statistics.
  
  - Ensure all data is freed when destroying a LRO control structures,
    especially leftover LRO entries.
  
  - Reduce number of memory allocations needed when setting up a LRO
    control structure by precomputing the total amount of memory needed.
  
  - Add own memory allocation counter for LRO.
  
  - Bump the FreeBSD version to force recompilation of all KLDs due to
    change of the LRO control structure size.
  
  Sponsored by:	Mellanox Technologies
  Reviewed by:	gallatin, sbruno, rrs, gnn, transport
  Tested by:	Netflix
  Differential Revision:	https://reviews.freebsd.org/D4914

Modified:
  head/sys/dev/cxgb/cxgb_sge.c
  head/sys/dev/cxgbe/t4_sge.c
  head/sys/dev/e1000/if_igb.c
  head/sys/dev/hyperv/netvsc/hv_netvsc_drv_freebsd.c
  head/sys/dev/ixgbe/if_ix.c
  head/sys/dev/ixgbe/if_ixv.c
  head/sys/dev/mxge/if_mxge.c
  head/sys/netinet/tcp_lro.c
  head/sys/netinet/tcp_lro.h
  head/sys/sys/param.h

Modified: head/sys/dev/cxgb/cxgb_sge.c
==============================================================================
--- head/sys/dev/cxgb/cxgb_sge.c	Tue Jan 19 15:02:37 2016	(r294326)
+++ head/sys/dev/cxgb/cxgb_sge.c	Tue Jan 19 15:33:28 2016	(r294327)
@@ -3579,11 +3579,11 @@ t3_add_configured_sysctls(adapter_t *sc)
 			    CTLTYPE_STRING | CTLFLAG_RD, &qs->txq[TXQ_CTRL],
 			    0, t3_dump_txq_ctrl, "A", "dump of the transmit queue");
 
-			SYSCTL_ADD_INT(ctx, lropoidlist, OID_AUTO, "lro_queued",
+			SYSCTL_ADD_U64(ctx, lropoidlist, OID_AUTO, "lro_queued",
 			    CTLFLAG_RD, &qs->lro.ctrl.lro_queued, 0, NULL);
-			SYSCTL_ADD_INT(ctx, lropoidlist, OID_AUTO, "lro_flushed",
+			SYSCTL_ADD_U64(ctx, lropoidlist, OID_AUTO, "lro_flushed",
 			    CTLFLAG_RD, &qs->lro.ctrl.lro_flushed, 0, NULL);
-			SYSCTL_ADD_INT(ctx, lropoidlist, OID_AUTO, "lro_bad_csum",
+			SYSCTL_ADD_U64(ctx, lropoidlist, OID_AUTO, "lro_bad_csum",
 			    CTLFLAG_RD, &qs->lro.ctrl.lro_bad_csum, 0, NULL);
 			SYSCTL_ADD_INT(ctx, lropoidlist, OID_AUTO, "lro_cnt",
 			    CTLFLAG_RD, &qs->lro.ctrl.lro_cnt, 0, NULL);

Modified: head/sys/dev/cxgbe/t4_sge.c
==============================================================================
--- head/sys/dev/cxgbe/t4_sge.c	Tue Jan 19 15:02:37 2016	(r294326)
+++ head/sys/dev/cxgbe/t4_sge.c	Tue Jan 19 15:33:28 2016	(r294327)
@@ -2939,9 +2939,9 @@ alloc_rxq(struct vi_info *vi, struct sge
 	    CTLTYPE_INT | CTLFLAG_RD, &rxq->iq.cidx, 0, sysctl_uint16, "I",
 	    "consumer index");
 #if defined(INET) || defined(INET6)
-	SYSCTL_ADD_INT(&vi->ctx, children, OID_AUTO, "lro_queued", CTLFLAG_RD,
+	SYSCTL_ADD_U64(&vi->ctx, children, OID_AUTO, "lro_queued", CTLFLAG_RD,
 	    &rxq->lro.lro_queued, 0, NULL);
-	SYSCTL_ADD_INT(&vi->ctx, children, OID_AUTO, "lro_flushed", CTLFLAG_RD,
+	SYSCTL_ADD_U64(&vi->ctx, children, OID_AUTO, "lro_flushed", CTLFLAG_RD,
 	    &rxq->lro.lro_flushed, 0, NULL);
 #endif
 	SYSCTL_ADD_UQUAD(&vi->ctx, children, OID_AUTO, "rxcsum", CTLFLAG_RD,

Modified: head/sys/dev/e1000/if_igb.c
==============================================================================
--- head/sys/dev/e1000/if_igb.c	Tue Jan 19 15:02:37 2016	(r294326)
+++ head/sys/dev/e1000/if_igb.c	Tue Jan 19 15:33:28 2016	(r294327)
@@ -5914,10 +5914,10 @@ igb_add_hw_stats(struct adapter *adapter
 		SYSCTL_ADD_QUAD(ctx, queue_list, OID_AUTO, "rx_bytes",
 				CTLFLAG_RD, &rxr->rx_bytes,
 				"Queue Bytes Received");
-		SYSCTL_ADD_UINT(ctx, queue_list, OID_AUTO, "lro_queued",
+		SYSCTL_ADD_U64(ctx, queue_list, OID_AUTO, "lro_queued",
 				CTLFLAG_RD, &lro->lro_queued, 0,
 				"LRO Queued");
-		SYSCTL_ADD_UINT(ctx, queue_list, OID_AUTO, "lro_flushed",
+		SYSCTL_ADD_U64(ctx, queue_list, OID_AUTO, "lro_flushed",
 				CTLFLAG_RD, &lro->lro_flushed, 0,
 				"LRO Flushed");
 	}

Modified: head/sys/dev/hyperv/netvsc/hv_netvsc_drv_freebsd.c
==============================================================================
--- head/sys/dev/hyperv/netvsc/hv_netvsc_drv_freebsd.c	Tue Jan 19 15:02:37 2016	(r294326)
+++ head/sys/dev/hyperv/netvsc/hv_netvsc_drv_freebsd.c	Tue Jan 19 15:33:28 2016	(r294327)
@@ -405,9 +405,9 @@ netvsc_attach(device_t dev)
 	ctx = device_get_sysctl_ctx(dev);
 	child = SYSCTL_CHILDREN(device_get_sysctl_tree(dev));
 
-	SYSCTL_ADD_INT(ctx, child, OID_AUTO, "lro_queued",
+	SYSCTL_ADD_U64(ctx, child, OID_AUTO, "lro_queued",
 	    CTLFLAG_RW, &sc->hn_lro.lro_queued, 0, "LRO queued");
-	SYSCTL_ADD_INT(ctx, child, OID_AUTO, "lro_flushed",
+	SYSCTL_ADD_U64(ctx, child, OID_AUTO, "lro_flushed",
 	    CTLFLAG_RW, &sc->hn_lro.lro_flushed, 0, "LRO flushed");
 	SYSCTL_ADD_ULONG(ctx, child, OID_AUTO, "lro_tried",
 	    CTLFLAG_RW, &sc->hn_lro_tried, "# of LRO tries");

Modified: head/sys/dev/ixgbe/if_ix.c
==============================================================================
--- head/sys/dev/ixgbe/if_ix.c	Tue Jan 19 15:02:37 2016	(r294326)
+++ head/sys/dev/ixgbe/if_ix.c	Tue Jan 19 15:33:28 2016	(r294327)
@@ -4476,10 +4476,10 @@ ixgbe_add_hw_stats(struct adapter *adapt
 		SYSCTL_ADD_UQUAD(ctx, queue_list, OID_AUTO, "rx_copies",
 				CTLFLAG_RD, &rxr->rx_copies,
 				"Copied RX Frames");
-		SYSCTL_ADD_INT(ctx, queue_list, OID_AUTO, "lro_queued",
+		SYSCTL_ADD_U64(ctx, queue_list, OID_AUTO, "lro_queued",
 				CTLFLAG_RD, &lro->lro_queued, 0,
 				"LRO Queued");
-		SYSCTL_ADD_INT(ctx, queue_list, OID_AUTO, "lro_flushed",
+		SYSCTL_ADD_U64(ctx, queue_list, OID_AUTO, "lro_flushed",
 				CTLFLAG_RD, &lro->lro_flushed, 0,
 				"LRO Flushed");
 	}

Modified: head/sys/dev/ixgbe/if_ixv.c
==============================================================================
--- head/sys/dev/ixgbe/if_ixv.c	Tue Jan 19 15:02:37 2016	(r294326)
+++ head/sys/dev/ixgbe/if_ixv.c	Tue Jan 19 15:33:28 2016	(r294327)
@@ -2167,10 +2167,10 @@ ixv_print_debug_info(struct adapter *ada
                     rxr->me, (long long)rxr->rx_packets);
                 device_printf(dev,"RX(%d) Bytes Received: %lu\n",
                     rxr->me, (long)rxr->rx_bytes);
-                device_printf(dev,"RX(%d) LRO Queued= %d\n",
-                    rxr->me, lro->lro_queued);
-                device_printf(dev,"RX(%d) LRO Flushed= %d\n",
-                    rxr->me, lro->lro_flushed);
+                device_printf(dev,"RX(%d) LRO Queued= %lld\n",
+                    rxr->me, (long long)lro->lro_queued);
+                device_printf(dev,"RX(%d) LRO Flushed= %lld\n",
+                    rxr->me, (long long)lro->lro_flushed);
                 device_printf(dev,"TX(%d) Packets Sent: %lu\n",
                     txr->me, (long)txr->total_packets);
                 device_printf(dev,"TX(%d) NO Desc Avail: %lu\n",

Modified: head/sys/dev/mxge/if_mxge.c
==============================================================================
--- head/sys/dev/mxge/if_mxge.c	Tue Jan 19 15:02:37 2016	(r294326)
+++ head/sys/dev/mxge/if_mxge.c	Tue Jan 19 15:33:28 2016	(r294327)
@@ -1637,15 +1637,15 @@ mxge_add_sysctls(mxge_softc_t *sc)
 			       "rx_big_cnt",
 			       CTLFLAG_RD, &ss->rx_big.cnt,
 			       0, "rx_small_cnt");
-		SYSCTL_ADD_INT(ctx, children, OID_AUTO,
+		SYSCTL_ADD_U64(ctx, children, OID_AUTO,
 			       "lro_flushed", CTLFLAG_RD, &ss->lc.lro_flushed,
 			       0, "number of lro merge queues flushed");
 
-		SYSCTL_ADD_INT(ctx, children, OID_AUTO,
+		SYSCTL_ADD_U64(ctx, children, OID_AUTO,
 			       "lro_bad_csum", CTLFLAG_RD, &ss->lc.lro_bad_csum,
 			       0, "number of bad csums preventing LRO");
 
-		SYSCTL_ADD_INT(ctx, children, OID_AUTO,
+		SYSCTL_ADD_U64(ctx, children, OID_AUTO,
 			       "lro_queued", CTLFLAG_RD, &ss->lc.lro_queued,
 			       0, "number of frames appended to lro merge"
 			       "queues");

Modified: head/sys/netinet/tcp_lro.c
==============================================================================
--- head/sys/netinet/tcp_lro.c	Tue Jan 19 15:02:37 2016	(r294326)
+++ head/sys/netinet/tcp_lro.c	Tue Jan 19 15:33:28 2016	(r294327)
@@ -2,6 +2,7 @@
  * Copyright (c) 2007, Myricom Inc.
  * Copyright (c) 2008, Intel Corporation.
  * Copyright (c) 2012 The FreeBSD Foundation
+ * Copyright (c) 2016 Mellanox Technologies.
  * All rights reserved.
  *
  * Portions of this software were developed by Bjoern Zeeb
@@ -58,9 +59,7 @@ __FBSDID("$FreeBSD$");
 
 #include <machine/in_cksum.h>
 
-#ifndef LRO_ENTRIES
-#define	LRO_ENTRIES	8	/* # of LRO entries per RX queue. */
-#endif
+static MALLOC_DEFINE(M_LRO, "LRO", "LRO control structures");
 
 #define	TCP_LRO_UPDATE_CSUM	1
 #ifndef	TCP_LRO_UPDATE_CSUM
@@ -70,42 +69,73 @@ __FBSDID("$FreeBSD$");
 int
 tcp_lro_init(struct lro_ctrl *lc)
 {
+	return (tcp_lro_init_args(lc, NULL, TCP_LRO_ENTRIES, 0));
+}
+
+int
+tcp_lro_init_args(struct lro_ctrl *lc, struct ifnet *ifp,
+    unsigned lro_entries, unsigned lro_mbufs)
+{
 	struct lro_entry *le;
-	int error, i;
+	size_t size;
+	unsigned i;
 
 	lc->lro_bad_csum = 0;
 	lc->lro_queued = 0;
 	lc->lro_flushed = 0;
 	lc->lro_cnt = 0;
+	lc->lro_mbuf_count = 0;
+	lc->lro_mbuf_max = lro_mbufs;
+	lc->lro_cnt = lro_entries;
+	lc->ifp = ifp;
 	SLIST_INIT(&lc->lro_free);
 	SLIST_INIT(&lc->lro_active);
 
-	error = 0;
-	for (i = 0; i < LRO_ENTRIES; i++) {
-		le = (struct lro_entry *)malloc(sizeof(*le), M_DEVBUF,
-		    M_NOWAIT | M_ZERO);
-                if (le == NULL) {
-			if (i == 0)
-				error = ENOMEM;
-                        break;
-                }
-		lc->lro_cnt = i + 1;
-		SLIST_INSERT_HEAD(&lc->lro_free, le, next);
-        }
+	/* compute size to allocate */
+	size = (lro_mbufs * sizeof(struct mbuf *)) +
+	    (lro_entries * sizeof(*le));
+	lc->lro_mbuf_data = (struct mbuf **)
+	    malloc(size, M_LRO, M_NOWAIT | M_ZERO);
+
+	/* check for out of memory */
+	if (lc->lro_mbuf_data == NULL) {
+		memset(lc, 0, sizeof(*lc));
+		return (ENOMEM);
+	}
+	/* compute offset for LRO entries */
+	le = (struct lro_entry *)
+	    (lc->lro_mbuf_data + lro_mbufs);
+
+	/* setup linked list */
+	for (i = 0; i != lro_entries; i++)
+		SLIST_INSERT_HEAD(&lc->lro_free, le + i, next);
 
-	return (error);
+	return (0);
 }
 
 void
 tcp_lro_free(struct lro_ctrl *lc)
 {
 	struct lro_entry *le;
+	unsigned x;
+
+	/* reset LRO free list */
+	SLIST_INIT(&lc->lro_free);
 
-	while (!SLIST_EMPTY(&lc->lro_free)) {
-		le = SLIST_FIRST(&lc->lro_free);
-		SLIST_REMOVE_HEAD(&lc->lro_free, next);
-		free(le, M_DEVBUF);
+	/* free active mbufs, if any */
+	while ((le = SLIST_FIRST(&lc->lro_active)) != NULL) {
+		SLIST_REMOVE_HEAD(&lc->lro_active, next);
+		m_freem(le->m_head);
 	}
+
+	/* free mbuf array, if any */
+	for (x = 0; x != lc->lro_mbuf_count; x++)
+		m_freem(lc->lro_mbuf_data[x]);
+	lc->lro_mbuf_count = 0;
+	
+	/* free allocated memory, if any */
+	free(lc->lro_mbuf_data, M_LRO);
+	lc->lro_mbuf_data = NULL;
 }
 
 #ifdef TCP_LRO_UPDATE_CSUM
@@ -305,6 +335,83 @@ tcp_lro_flush(struct lro_ctrl *lc, struc
 	SLIST_INSERT_HEAD(&lc->lro_free, le, next);
 }
 
+static int
+tcp_lro_mbuf_compare_header(const void *ppa, const void *ppb)
+{
+	const struct mbuf *ma = *((const struct mbuf * const *)ppa);
+	const struct mbuf *mb = *((const struct mbuf * const *)ppb);
+	int ret;
+
+	ret = M_HASHTYPE_GET(ma) - M_HASHTYPE_GET(mb);
+	if (ret != 0)
+		goto done;
+
+	ret = ma->m_pkthdr.flowid - mb->m_pkthdr.flowid;
+	if (ret != 0)
+		goto done;
+
+	ret = TCP_LRO_SEQUENCE(ma) - TCP_LRO_SEQUENCE(mb);
+done:
+	return (ret);
+}
+
+void
+tcp_lro_flush_all(struct lro_ctrl *lc)
+{
+	struct lro_entry *le;
+	uint32_t hashtype;
+	uint32_t flowid;
+	unsigned x;
+
+	/* check if no mbufs to flush */
+	if (__predict_false(lc->lro_mbuf_count == 0))
+		goto done;
+
+	/* sort all mbufs according to stream */
+	qsort(lc->lro_mbuf_data, lc->lro_mbuf_count, sizeof(struct mbuf *),
+	    &tcp_lro_mbuf_compare_header);
+
+	/* input data into LRO engine, stream by stream */
+	flowid = 0;
+	hashtype = M_HASHTYPE_NONE;
+	for (x = 0; x != lc->lro_mbuf_count; x++) {
+		struct mbuf *mb;
+
+		mb = lc->lro_mbuf_data[x];
+
+		/* check for new stream */
+		if (mb->m_pkthdr.flowid != flowid ||
+		    M_HASHTYPE_GET(mb) != hashtype) {
+			flowid = mb->m_pkthdr.flowid;
+			hashtype = M_HASHTYPE_GET(mb);
+
+			/* flush active streams */
+			while ((le = SLIST_FIRST(&lc->lro_active)) != NULL) {
+				SLIST_REMOVE_HEAD(&lc->lro_active, next);
+				tcp_lro_flush(lc, le);
+			}
+		}
+#ifdef TCP_LRO_RESET_SEQUENCE
+		/* reset sequence number */
+		TCP_LRO_SEQUENCE(mb) = 0;
+#endif
+		/* add packet to LRO engine */
+		if (tcp_lro_rx(lc, mb, 0) != 0) {
+			/* input packet to network layer */
+			(*lc->ifp->if_input)(lc->ifp, mb);
+			lc->lro_queued++;
+			lc->lro_flushed++;
+		}
+	}
+done:
+	/* flush active streams */
+	while ((le = SLIST_FIRST(&lc->lro_active)) != NULL) {
+		SLIST_REMOVE_HEAD(&lc->lro_active, next);
+		tcp_lro_flush(lc, le);
+	}
+	lc->lro_mbuf_count = 0;
+}
+
 #ifdef INET6
 static int
 tcp_lro_rx_ipv6(struct lro_ctrl *lc, struct mbuf *m, struct ip6_hdr *ip6,
@@ -633,4 +740,37 @@ tcp_lro_rx(struct lro_ctrl *lc, struct m
 	return (0);
 }
 
+void
+tcp_lro_queue_mbuf(struct lro_ctrl *lc, struct mbuf *mb)
+{
+	/* sanity checks */
+	if (__predict_false(lc->ifp == NULL || lc->lro_mbuf_data == NULL ||
+	    lc->lro_mbuf_max == 0)) {
+		/* packet drop */
+		m_freem(mb);
+		return;
+	}
+
+	/* check if packet is not LRO capable */
+	if (__predict_false(mb->m_pkthdr.csum_flags == 0 ||
+	    (lc->ifp->if_capenable & IFCAP_LRO) == 0)) {
+		lc->lro_flushed++;
+		lc->lro_queued++;
+
+		/* input packet to network layer */
+		(*lc->ifp->if_input) (lc->ifp, mb);
+		return;
+	}
+
+	/* check if array is full */
+	if (__predict_false(lc->lro_mbuf_count == lc->lro_mbuf_max))
+		tcp_lro_flush_all(lc);
+
+	/* store sequence number */
+	TCP_LRO_SEQUENCE(mb) = lc->lro_mbuf_count;
+
+	/* enter mbuf */
+	lc->lro_mbuf_data[lc->lro_mbuf_count++] = mb;
+}
+
 /* end */

Modified: head/sys/netinet/tcp_lro.h
==============================================================================
--- head/sys/netinet/tcp_lro.h	Tue Jan 19 15:02:37 2016	(r294326)
+++ head/sys/netinet/tcp_lro.h	Tue Jan 19 15:33:28 2016	(r294327)
@@ -1,6 +1,7 @@
 /*-
  * Copyright (c) 2006, Myricom Inc.
  * Copyright (c) 2008, Intel Corporation.
+ * Copyright (c) 2016 Mellanox Technologies.
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -32,6 +33,14 @@
 
 #include <sys/time.h>
 
+#ifndef TCP_LRO_ENTRIES
+/* Define default number of LRO entries per RX queue */
+#define	TCP_LRO_ENTRIES	8
+#endif
+
+#define	TCP_LRO_SEQUENCE(mb) \
+    (mb)->m_pkthdr.PH_loc.thirtytwo[0]
+
 struct lro_entry
 {
 	SLIST_ENTRY(lro_entry)	next;
@@ -75,20 +84,26 @@ SLIST_HEAD(lro_head, lro_entry);
 /* NB: This is part of driver structs. */
 struct lro_ctrl {
 	struct ifnet	*ifp;
-	int		lro_queued;
-	int		lro_flushed;
-	int		lro_bad_csum;
-	int		lro_cnt;
+	struct mbuf	**lro_mbuf_data;
+	uint64_t	lro_queued;
+	uint64_t	lro_flushed;
+	uint64_t	lro_bad_csum;
+	unsigned	lro_cnt;
+	unsigned	lro_mbuf_count;
+	unsigned	lro_mbuf_max;
 
 	struct lro_head	lro_active;
 	struct lro_head	lro_free;
 };
 
 int tcp_lro_init(struct lro_ctrl *);
+int tcp_lro_init_args(struct lro_ctrl *, struct ifnet *, unsigned, unsigned);
 void tcp_lro_free(struct lro_ctrl *);
 void tcp_lro_flush_inactive(struct lro_ctrl *, const struct timeval *);
 void tcp_lro_flush(struct lro_ctrl *, struct lro_entry *);
+void tcp_lro_flush_all(struct lro_ctrl *);
 int tcp_lro_rx(struct lro_ctrl *, struct mbuf *, uint32_t);
+void tcp_lro_queue_mbuf(struct lro_ctrl *, struct mbuf *);
 
 #define	TCP_LRO_CANNOT		-1
 #define	TCP_LRO_NOT_SUPPORTED	1

Modified: head/sys/sys/param.h
==============================================================================
--- head/sys/sys/param.h	Tue Jan 19 15:02:37 2016	(r294326)
+++ head/sys/sys/param.h	Tue Jan 19 15:33:28 2016	(r294327)
@@ -58,7 +58,7 @@
  *		in the range 5 to 9.
  */
 #undef __FreeBSD_version
-#define __FreeBSD_version 1100094	/* Master, propagated to newvers */
+#define __FreeBSD_version 1100095	/* Master, propagated to newvers */
 
 /*
  * __FreeBSD_kernel__ indicates that this system uses the kernel of FreeBSD,

From owner-svn-src-all@freebsd.org  Tue Jan 19 16:09:48 2016
Return-Path: <owner-svn-src-all@freebsd.org>
Delivered-To: svn-src-all@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id C916DA88965;
 Tue, 19 Jan 2016 16:09:48 +0000 (UTC)
 (envelope-from rysto32@gmail.com)
Received: from mail-io0-x232.google.com (mail-io0-x232.google.com
 [IPv6:2607:f8b0:4001:c06::232])
 (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits))
 (Client CN "smtp.gmail.com",
 Issuer "Google Internet Authority G2" (verified OK))
 by mx1.freebsd.org (Postfix) with ESMTPS id 8F86F1351;
 Tue, 19 Jan 2016 16:09:48 +0000 (UTC)
 (envelope-from rysto32@gmail.com)
Received: by mail-io0-x232.google.com with SMTP id 77so554139750ioc.2;
 Tue, 19 Jan 2016 08:09:48 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;
 h=mime-version:in-reply-to:references:date:message-id:subject:from:to
 :cc:content-type;
 bh=f3EwrPhaf3k0ngB63uCJurl1PqmMTKkb+3kPVPwst44=;
 b=oFyW+t1EcRWTKohxTb/qzHu5cROMNC0ueu7tI9zY6hyOpoovDbDd1yFpXIQCqKvbLk
 z5xC303O6stk6PjHvn1EdtdFzmZNNzkMMI2riKYKfnw1TOhyAAx5o0ETj34Jux5KW4S/
 vImEahNhGoy+COPYkZmJIQjrU+kYLhvSdKllq3CVo14Xe0I8+9RUYEmF6g8NJfQKykY1
 i3PVSbJSN/h8Sa13S/D6qqNoJ7iznavLh8KAzc23QzNLhOne2g1L4MuxokvVaAXMs+Q/
 EOMSxKpm2kbPzFPRj7ju0a6zf9y/fbv1NUn9/jN2NZmffamv8y9dCUdkRWyGOgVmLME9
 DtTQ==
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:date
 :message-id:subject:from:to:cc:content-type;
 bh=f3EwrPhaf3k0ngB63uCJurl1PqmMTKkb+3kPVPwst44=;
 b=mItBGeOfKWUHvpr3dB771luZNQK06ZuIdC/hCS7DU58iF9ljRThqtmqACfOLo2I1c4
 ZFS2vgoBINPxKtIGIR2fX0Q95ad2CzhtXXSQfBov+P7W8XOwJaKcIDVSPE3xXhuJkGUL
 VpddzAOI69NfBlFbalLiglJ7Xt0t5kms4j7fjG4dgkDiAj55MvY/XRPy+0QcW0JgnKOP
 fFYOgfxBKiuRbv4kjhve7SvxPDmlJAjIhivZBkGd4s3rwxHa2YBIvpfW/8l64NNhn4fp
 cogeHQqRyhoWtrvq6VUcc7ehSgI+Q+0ScFbPfdCK7+cF+vVLBEKKA773hOXQVN4FSw64
 MsPQ==
X-Gm-Message-State: ALoCoQk9yRmxbRyz8fpLC9rPeieIkWKv0VpLSmOJ/jpEeytFGyCyrh9D7xPZyjEEn2Zvajnluqp2Uwzaz4pHWAWclxuXiPfl5Q==
MIME-Version: 1.0
X-Received: by 10.107.159.7 with SMTP id i7mr25347594ioe.29.1453219787967;
 Tue, 19 Jan 2016 08:09:47 -0800 (PST)
Received: by 10.107.178.193 with HTTP; Tue, 19 Jan 2016 08:09:47 -0800 (PST)
In-Reply-To: <201601191533.u0JFXSxf037804@repo.freebsd.org>
References: <201601191533.u0JFXSxf037804@repo.freebsd.org>
Date: Tue, 19 Jan 2016 11:09:47 -0500
Message-ID: <CAFMmRNz3uXim3H3-sGuBUBs45Jy8p260ywothgp4iFkUcnvnEw@mail.gmail.com>
Subject: Re: svn commit: r294327 - in head/sys: dev/cxgb dev/cxgbe dev/e1000
 dev/hyperv/netvsc dev/ixgbe dev/mxge netinet sys
From: Ryan Stone <rysto32@gmail.com>
To: Hans Petter Selasky <hselasky@freebsd.org>
Cc: "src-committers@freebsd.org" <src-committers@freebsd.org>, 
 "svn-src-all@freebsd.org" <svn-src-all@freebsd.org>, 
 "svn-src-head@freebsd.org" <svn-src-head@freebsd.org>
Content-Type: text/plain; charset=UTF-8
X-Content-Filtered-By: Mailman/MimeDel 2.1.20
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.20
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for &quot;
 user&quot; and &quot; projects&quot; \)" <svn-src-all.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-all/>
List-Post: <mailto:svn-src-all@freebsd.org>
List-Help: <mailto:svn-src-all-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Tue, 19 Jan 2016 16:09:49 -0000

On Tue, Jan 19, 2016 at 10:33 AM, Hans Petter Selasky <hselasky@freebsd.org>
wrote:

>
> +       qsort(lc->lro_mbuf_data, lc->lro_mbuf_count, sizeof(struct mbuf *),
> +           &tcp_lro_mbuf_compare_header);
>

In the worst case, qsort() can take O(n**2) time and consume O(n) stack
space.  Is there a DOS concern here?

From owner-svn-src-all@freebsd.org  Tue Jan 19 16:14:01 2016
Return-Path: <owner-svn-src-all@freebsd.org>
Delivered-To: svn-src-all@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1EA4BA88C49;
 Tue, 19 Jan 2016 16:14:01 +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 0A31618B3;
 Tue, 19 Jan 2016 16:14:01 +0000 (UTC)
 (envelope-from bdrewery@FreeBSD.org)
Received: from mail.xzibition.com (localhost [IPv6:::1])
 by freefall.freebsd.org (Postfix) with ESMTP id F1F3D1597;
 Tue, 19 Jan 2016 16:14:00 +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 945CA15CA9;
 Tue, 19 Jan 2016 16:14:00 +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 96hP1_lQLUZ5; Tue, 19 Jan 2016 16:13:53 +0000 (UTC)
Subject: Re: svn commit: r291941 - in head: lib/libpam/modules/pam_ssh
 secure/lib/libssh secure/libexec/sftp-server secure/libexec/ssh-keysign
 secure/libexec/ssh-pkcs11-helper secure/usr.bin/scp secure/usr.bin/...
DKIM-Filter: OpenDKIM Filter v2.9.2 mail.xzibition.com D598615CA4
To: =?UTF-8?Q?Dag-Erling_Sm=c3=b8rgrav?= <des@des.no>
References: <201512071608.tB7G89BZ095366@repo.freebsd.org>
 <86vb6phdug.fsf@desk.des.no>
Cc: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-head@freebsd.org
From: Bryan Drewery <bdrewery@FreeBSD.org>
Openpgp: id=F9173CB2C3AAEA7A5C8A1F0935D771BB6E4697CF;
 url=http://www.shatow.net/bryan/bryan2.asc
X-Enigmail-Draft-Status: N1110
Organization: FreeBSD
Message-ID: <569E60BA.6050007@FreeBSD.org>
Date: Tue, 19 Jan 2016 08:13:46 -0800
User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:38.0) Gecko/20100101
 Thunderbird/38.5.1
MIME-Version: 1.0
In-Reply-To: <86vb6phdug.fsf@desk.des.no>
Content-Type: multipart/signed; micalg=pgp-sha1;
 protocol="application/pgp-signature";
 boundary="ImOUi8qoVMxdCLw0lxfNegh6WQNX2pVxe"
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.20
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for &quot;
 user&quot; and &quot; projects&quot; \)" <svn-src-all.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-all/>
List-Post: <mailto:svn-src-all@freebsd.org>
List-Help: <mailto:svn-src-all-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Tue, 19 Jan 2016 16:14:01 -0000

This is an OpenPGP/MIME signed message (RFC 4880 and 3156)
--ImOUi8qoVMxdCLw0lxfNegh6WQNX2pVxe
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable

On 1/19/2016 5:56 AM, Dag-Erling Sm=C3=B8rgrav wrote:
> Bryan Drewery <bdrewery@FreeBSD.org> writes:
>> Log:
>>   Replace unneeded manual dependency on header by adding it to SRCS.
>>  =20
>>   bsd.lib.mk and bsd.prog.mk already depend all objs on headers in SRC=
S if
>>   there is not yet a depend file.  The headers in SRCS are never built=
 or
>>   installed.  After 'make depend' the header was already added as a pr=
oper
>>   dependency on the objects where needed.
>=20
> This doesn't work.  Try the following:
>=20
> $ cd /usr/src/secure/lib/libssh
> $ make depend && make
> $ touch /usr/src/crypto/openssh/ssh_namespace.h
> $ make

Well, it sort of works with WITH_FAST_DEPEND which will be default very
shortly.


> ~/git/freebsd/secure/lib/libssh # make -j15
> ~/git/freebsd/secure/lib/libssh # touch ../../../crypto/openssh/ssh_nam=
espace.h
> ~/git/freebsd/secure/lib/libssh # make
> /usr/local/bin/ccache cc  -O2 -pipe   -DHAVE_LDNS=3D1 -I/root/git/freeb=
sd/secure/lib/libssh/../../../contrib/ldns -I/root/git/freebsd/secure/lib=
/libssh/../../../crypto/openssh -include ssh_namespace.h -include krb5_co=
nfig.h -MD -MP -MF.depend.authfd.o -MTauthfd.o -std=3Dgnu99 -fstack-prote=
ctor-strong -Wno-pointer-sign -
> -const-variable -Wno-tautological-compare -Wno-unused-value -Wno-parent=
heses-equality -Wno-unused-function -Wno-enum-conversion -Wno-unused-loca=
l-typedef -Wno-switch -Wno-switch-enum -Wno-knr-promoted-parameter -Wno-p=
arentheses  -Qunused-arguments -c /root/git/freebsd/secure/lib/libssh/../=
=2E./../crypto/openssh/authfd
> /usr/local/bin/ccache cc  -O2 -pipe   -DHAVE_LDNS=3D1 -I/root/git/freeb=
sd/secure/lib/libssh/../../../contrib/ldns -I/root/git/freebsd/secure/lib=
/libssh/../../../crypto/openssh -include ssh_namespace.h -include krb5_co=
nfig.h -MD -MP -MF.depend.authfile.o -MTauthfile.o -std=3Dgnu99 -fstack-p=
rotector-strong -Wno-pointer-si
> used-const-variable -Wno-tautological-compare -Wno-unused-value -Wno-pa=
rentheses-equality -Wno-unused-function -Wno-enum-conversion -Wno-unused-=
local-typedef -Wno-switch -Wno-switch-enum -Wno-knr-promoted-parameter -W=
no-parentheses  -Qunused-arguments -c /root/git/freebsd/secure/lib/libssh=
/../../../crypto/openssh/au
> /usr/local/bin/ccache cc  -O2 -pipe   -DHAVE_LDNS=3D1 -I/root/git/freeb=
sd/secure/lib/libssh/../../../contrib/ldns -I/root/git/freebsd/secure/lib=
/libssh/../../../crypto/openssh -include ssh_namespace.h -include krb5_co=
nfig.h -MD -MP -MF.depend.bufaux.o -MTbufaux.o -std=3Dgnu99 -fstack-prote=
ctor-strong -Wno-pointer-sign -
> -const-variable -Wno-tautological-compare -Wno-unused-value -Wno-parent=
heses-equality -Wno-unused-function -Wno-enum-conversion -Wno-unused-loca=
l-typedef -Wno-switch -Wno-switch-enum -Wno-knr-promoted-parameter -Wno-p=
arentheses  -Qunused-arguments -c /root/git/freebsd/secure/lib/libssh/../=
=2E./../crypto/openssh/bufaux
> /usr/local/bin/ccache cc  -O2 -pipe   -DHAVE_LDNS=3D1 -I/root/git/freeb=
sd/secure/lib/libssh/../../../contrib/ldns -I/root/git/freebsd/secure/lib=
/libssh/../../../crypto/openssh -include ssh_namespace.h -include krb5_co=
nfig.h -MD -MP -MF.depend.bufbn.o -MTbufbn.o -std=3Dgnu99 -fstack-protect=
or-strong -Wno-pointer-sign -Wn
> onst-variable -Wno-tautological-compare -Wno-unused-value -Wno-parenthe=
ses-equality -Wno-unused-function -Wno-enum-conversion -Wno-unused-local-=
typedef -Wno-switch -Wno-switch-enum -Wno-knr-promoted-parameter -Wno-par=
entheses  -Qunused-arguments -c /root/git/freebsd/secure/lib/libssh/../..=
/../crypto/openssh/bufbn.c
> /usr/local/bin/ccache cc  -O2 -pipe   -DHAVE_LDNS=3D1 -I/root/git/freeb=
sd/secure/lib/libssh/../../../contrib/ldns -I/root/git/freebsd/secure/lib=
/libssh/../../../crypto/openssh -include ssh_namespace.h -include krb5_co=
nfig.h -MD -MP -MF.depend.buffer.o -MTbuffer.o -std=3Dgnu99 -fstack-prote=
ctor-strong -Wno-pointer-sign -
> -const-variable -Wno-tautological-compare -Wno-unused-value -Wno-parent=
heses-equality -Wno-unused-function -Wno-enum-conversion -Wno-unused-loca=
l-typedef -Wno-switch -Wno-switch-enum -Wno-knr-promoted-parameter -Wno-p=
arentheses  -Qunused-arguments -c /root/git/freebsd/secure/lib/libssh/../=
=2E./../crypto/openssh/buffer
> /usr/local/bin/ccache cc  -O2 -pipe   -DHAVE_LDNS=3D1 -I/root/git/freeb=
sd/secure/lib/libssh/../../../contrib/ldns -I/root/git/freebsd/secure/lib=
/libssh/../../../crypto/openssh -include ssh_namespace.h -include krb5_co=
nfig.h -MD -MP -MF.depend.canohost.o -MTcanohost.o -std=3Dgnu99 -fstack-p=
rotector-strong -Wno-pointer-si
> used-const-variable -Wno-tautological-compare -Wno-unused-value -Wno-pa=
rentheses-equality -Wno-unused-function -Wno-enum-conversion -Wno-unused-=
local-typedef -Wno-switch -Wno-switch-enum -Wno-knr-promoted-parameter -W=
no-parentheses  -Qunused-arguments -c /root/git/freebsd/secure/lib/libssh=
/../../../crypto/openssh/ca
> /usr/local/bin/ccache cc  -O2 -pipe   -DHAVE_LDNS=3D1 -I/root/git/freeb=
sd/secure/lib/libssh/../../../contrib/ldns -I/root/git/freebsd/secure/lib=
/libssh/../../../crypto/openssh -include ssh_namespace.h -include krb5_co=
nfig.h -MD -MP -MF.depend.channels.o -MTchannels.o -std=3Dgnu99 -fstack-p=
rotector-strong -Wno-pointer-si
> used-const-variable -Wno-tautological-compare -Wno-unused-value -Wno-pa=
rentheses-equality -Wno-unused-function -Wno-enum-conversion -Wno-unused-=
local-typedef -Wno-switch -Wno-switch-enum -Wno-knr-promoted-parameter -W=
no-parentheses  -Qunused-arguments -c /root/git/freebsd/secure/lib/libssh=
/../../../crypto/openssh/ch
> ^Cmake: *** channels.o removed


>=20
> The second "make" should rebuild everything, but it doesn't.  Also,
>=20
> $ grep -c ssh_namespace $(make -V.OBJDIR)/.depend
> 0
>=20

That is expected. The dependency is defined in bsd.lib.mk. Granted it is
dependent on .depend existing, but I am going to remove that check so it
is always defined.

--=20
Regards,
Bryan Drewery


--ImOUi8qoVMxdCLw0lxfNegh6WQNX2pVxe
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

iQEcBAEBAgAGBQJWnmDAAAoJEDXXcbtuRpfPV/8IAMt5x/czMMjby3QdEyh4alir
QZzG1q80xHL3SgI6J+p6DKrye7BBqNt3boctFJUHxJ0/SLXjIphjYW6BwkH5R4N8
/p0KDfxLDsrsFPXff7UL5abB35P8v8t/0Dw+YDp5ukjWuVu1AvEbyiWEzOsJCpR/
7Il8NqufuyVSiAxnAh7YGbsvfM1hStZcIM5VdCk7GkWiYTkHYVazgf+L5ZApcVs4
ZNZdx9X7hrygSDvel8sivsfQlN6xubzQZ7Hwyj8X3HfGaF/mNyxRIxbxqhWi7zb/
vnJG67XM1vJ3yjQvSxtlqtGPTifd1qvhMlmnlq2S6eOrpVcEl+qXr+6Dol12dIU=
=3rnz
-----END PGP SIGNATURE-----

--ImOUi8qoVMxdCLw0lxfNegh6WQNX2pVxe--

From owner-svn-src-all@freebsd.org  Tue Jan 19 16:18:28 2016
Return-Path: <owner-svn-src-all@freebsd.org>
Delivered-To: svn-src-all@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2DD44A88E27;
 Tue, 19 Jan 2016 16:18:28 +0000 (UTC) (envelope-from des@FreeBSD.org)
Received: from repo.freebsd.org (repo.freebsd.org
 [IPv6:2610:1c1:1:6068::e6a:0])
 (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
 (Client did not present a certificate)
 by mx1.freebsd.org (Postfix) with ESMTPS id C2DF41BD9;
 Tue, 19 Jan 2016 16:18:27 +0000 (UTC) (envelope-from des@FreeBSD.org)
Received: from repo.freebsd.org ([127.0.1.37])
 by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u0JGIQNF049494;
 Tue, 19 Jan 2016 16:18:26 GMT (envelope-from des@FreeBSD.org)
Received: (from des@localhost)
 by repo.freebsd.org (8.15.2/8.15.2/Submit) id u0JGIQae049491;
 Tue, 19 Jan 2016 16:18:26 GMT (envelope-from des@FreeBSD.org)
Message-Id: <201601191618.u0JGIQae049491@repo.freebsd.org>
X-Authentication-Warning: repo.freebsd.org: des set sender to des@FreeBSD.org
 using -f
From: =?UTF-8?Q?Dag-Erling_Sm=c3=b8rgrav?= <des@FreeBSD.org>
Date: Tue, 19 Jan 2016 16:18:26 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-head@freebsd.org
Subject: svn commit: r294328 - in head: crypto/openssh
 crypto/openssh/contrib/caldera crypto/openssh/contrib/cygwin
 crypto/openssh/contrib/redhat crypto/openssh/contrib/suse
 crypto/openssh/openbsd-compat cr...
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.20
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for &quot;
 user&quot; and &quot; projects&quot; \)" <svn-src-all.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-all/>
List-Post: <mailto:svn-src-all@freebsd.org>
List-Help: <mailto:svn-src-all-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Tue, 19 Jan 2016 16:18:28 -0000

Author: des
Date: Tue Jan 19 16:18:26 2016
New Revision: 294328
URL: https://svnweb.freebsd.org/changeset/base/294328

Log:
  Upgrade to OpenSSH 6.7p1, retaining libwrap support (which has been removed
  upstream) and a number of security fixes which we had already backported.
  
  MFC after:	1 week

Added:
  head/crypto/openssh/cipher-aesctr.c
     - copied unchanged from r276707, vendor-crypto/openssh/dist/cipher-aesctr.c
  head/crypto/openssh/cipher-aesctr.h
     - copied unchanged from r276707, vendor-crypto/openssh/dist/cipher-aesctr.h
  head/crypto/openssh/openbsd-compat/kludge-fd_set.c
     - copied unchanged from r276707, vendor-crypto/openssh/dist/openbsd-compat/kludge-fd_set.c
  head/crypto/openssh/openbsd-compat/regress/opensslvertest.c
     - copied unchanged from r276707, vendor-crypto/openssh/dist/openbsd-compat/regress/opensslvertest.c
  head/crypto/openssh/regress/unittests/
     - copied from r276707, vendor-crypto/openssh/dist/regress/unittests/
  head/crypto/openssh/sshbuf-getput-basic.c
     - copied unchanged from r276707, vendor-crypto/openssh/dist/sshbuf-getput-basic.c
  head/crypto/openssh/sshbuf-getput-crypto.c
     - copied unchanged from r276707, vendor-crypto/openssh/dist/sshbuf-getput-crypto.c
  head/crypto/openssh/sshbuf-misc.c
     - copied unchanged from r276707, vendor-crypto/openssh/dist/sshbuf-misc.c
  head/crypto/openssh/sshbuf.c
     - copied unchanged from r276707, vendor-crypto/openssh/dist/sshbuf.c
  head/crypto/openssh/sshbuf.h
     - copied unchanged from r276707, vendor-crypto/openssh/dist/sshbuf.h
  head/crypto/openssh/ssherr.c
     - copied unchanged from r276707, vendor-crypto/openssh/dist/ssherr.c
  head/crypto/openssh/ssherr.h
     - copied unchanged from r276707, vendor-crypto/openssh/dist/ssherr.h
  head/crypto/openssh/sshkey.c
     - copied unchanged from r276707, vendor-crypto/openssh/dist/sshkey.c
  head/crypto/openssh/sshkey.h
     - copied unchanged from r276707, vendor-crypto/openssh/dist/sshkey.h
Modified:
  head/crypto/openssh/ChangeLog
  head/crypto/openssh/INSTALL
  head/crypto/openssh/Makefile.in
  head/crypto/openssh/PROTOCOL
  head/crypto/openssh/README
  head/crypto/openssh/auth-bsdauth.c
  head/crypto/openssh/auth-chall.c
  head/crypto/openssh/auth-krb5.c
  head/crypto/openssh/auth-options.c
  head/crypto/openssh/auth-passwd.c
  head/crypto/openssh/auth-rh-rsa.c
  head/crypto/openssh/auth-rhosts.c
  head/crypto/openssh/auth-rsa.c
  head/crypto/openssh/auth.c
  head/crypto/openssh/auth.h
  head/crypto/openssh/auth1.c
  head/crypto/openssh/auth2-chall.c
  head/crypto/openssh/auth2-gss.c
  head/crypto/openssh/auth2-hostbased.c
  head/crypto/openssh/auth2-kbdint.c
  head/crypto/openssh/auth2-none.c
  head/crypto/openssh/auth2-passwd.c
  head/crypto/openssh/auth2-pubkey.c
  head/crypto/openssh/auth2.c
  head/crypto/openssh/authfd.c
  head/crypto/openssh/authfile.c
  head/crypto/openssh/authfile.h
  head/crypto/openssh/bufaux.c
  head/crypto/openssh/bufbn.c
  head/crypto/openssh/bufec.c
  head/crypto/openssh/buffer.c
  head/crypto/openssh/buffer.h
  head/crypto/openssh/canohost.c
  head/crypto/openssh/chacha.h
  head/crypto/openssh/channels.c
  head/crypto/openssh/channels.h
  head/crypto/openssh/cipher-3des1.c
  head/crypto/openssh/cipher-chachapoly.c
  head/crypto/openssh/cipher-chachapoly.h
  head/crypto/openssh/cipher.c
  head/crypto/openssh/cipher.h
  head/crypto/openssh/clientloop.c
  head/crypto/openssh/compat.c
  head/crypto/openssh/compat.h
  head/crypto/openssh/config.h
  head/crypto/openssh/config.h.in
  head/crypto/openssh/configure
  head/crypto/openssh/configure.ac
  head/crypto/openssh/contrib/caldera/openssh.spec
  head/crypto/openssh/contrib/cygwin/README
  head/crypto/openssh/contrib/cygwin/ssh-host-config
  head/crypto/openssh/contrib/redhat/openssh.spec
  head/crypto/openssh/contrib/suse/openssh.spec
  head/crypto/openssh/defines.h
  head/crypto/openssh/digest-libc.c
  head/crypto/openssh/digest-openssl.c
  head/crypto/openssh/digest.h
  head/crypto/openssh/dns.c
  head/crypto/openssh/dns.h
  head/crypto/openssh/entropy.c
  head/crypto/openssh/freebsd-configure.sh
  head/crypto/openssh/gss-serv-krb5.c
  head/crypto/openssh/gss-serv.c
  head/crypto/openssh/hmac.h
  head/crypto/openssh/hostfile.c
  head/crypto/openssh/kex.c
  head/crypto/openssh/kex.h
  head/crypto/openssh/kexc25519.c
  head/crypto/openssh/key.c
  head/crypto/openssh/key.h
  head/crypto/openssh/krl.c
  head/crypto/openssh/mac.c
  head/crypto/openssh/misc.c
  head/crypto/openssh/misc.h
  head/crypto/openssh/moduli.0
  head/crypto/openssh/monitor.c
  head/crypto/openssh/monitor_fdpass.c
  head/crypto/openssh/monitor_wrap.c
  head/crypto/openssh/mux.c
  head/crypto/openssh/myproposal.h
  head/crypto/openssh/openbsd-compat/Makefile.in
  head/crypto/openssh/openbsd-compat/arc4random.c
  head/crypto/openssh/openbsd-compat/bsd-cygwin_util.c
  head/crypto/openssh/openbsd-compat/bsd-cygwin_util.h
  head/crypto/openssh/openbsd-compat/bsd-snprintf.c
  head/crypto/openssh/openbsd-compat/explicit_bzero.c
  head/crypto/openssh/openbsd-compat/openbsd-compat.h
  head/crypto/openssh/openbsd-compat/openssl-compat.c
  head/crypto/openssh/openbsd-compat/openssl-compat.h
  head/crypto/openssh/openbsd-compat/port-uw.c
  head/crypto/openssh/openbsd-compat/regress/Makefile.in
  head/crypto/openssh/opensshd.init.in
  head/crypto/openssh/packet.c
  head/crypto/openssh/packet.h
  head/crypto/openssh/platform.c
  head/crypto/openssh/poly1305.h
  head/crypto/openssh/readconf.c
  head/crypto/openssh/readconf.h
  head/crypto/openssh/regress/Makefile
  head/crypto/openssh/regress/connect-privsep.sh
  head/crypto/openssh/regress/dhgex.sh
  head/crypto/openssh/regress/forwarding.sh
  head/crypto/openssh/regress/integrity.sh
  head/crypto/openssh/regress/kextype.sh
  head/crypto/openssh/regress/krl.sh
  head/crypto/openssh/regress/login-timeout.sh
  head/crypto/openssh/regress/multiplex.sh
  head/crypto/openssh/regress/proxy-connect.sh
  head/crypto/openssh/regress/rekey.sh
  head/crypto/openssh/regress/test-exec.sh
  head/crypto/openssh/regress/try-ciphers.sh
  head/crypto/openssh/rijndael.c
  head/crypto/openssh/rijndael.h
  head/crypto/openssh/roaming_client.c
  head/crypto/openssh/rsa.c
  head/crypto/openssh/rsa.h
  head/crypto/openssh/sandbox-seccomp-filter.c
  head/crypto/openssh/sandbox-systrace.c
  head/crypto/openssh/scp.0
  head/crypto/openssh/scp.1
  head/crypto/openssh/scp.c
  head/crypto/openssh/servconf.c
  head/crypto/openssh/servconf.h
  head/crypto/openssh/serverloop.c
  head/crypto/openssh/session.c
  head/crypto/openssh/sftp-client.c
  head/crypto/openssh/sftp-client.h
  head/crypto/openssh/sftp-server.0
  head/crypto/openssh/sftp-server.8
  head/crypto/openssh/sftp-server.c
  head/crypto/openssh/sftp.0
  head/crypto/openssh/sftp.1
  head/crypto/openssh/sftp.c
  head/crypto/openssh/ssh-add.0
  head/crypto/openssh/ssh-add.c
  head/crypto/openssh/ssh-agent.0
  head/crypto/openssh/ssh-agent.1
  head/crypto/openssh/ssh-agent.c
  head/crypto/openssh/ssh-dss.c
  head/crypto/openssh/ssh-ecdsa.c
  head/crypto/openssh/ssh-ed25519.c
  head/crypto/openssh/ssh-keygen.0
  head/crypto/openssh/ssh-keygen.1
  head/crypto/openssh/ssh-keygen.c
  head/crypto/openssh/ssh-keyscan.0
  head/crypto/openssh/ssh-keyscan.1
  head/crypto/openssh/ssh-keyscan.c
  head/crypto/openssh/ssh-keysign.0
  head/crypto/openssh/ssh-keysign.c
  head/crypto/openssh/ssh-pkcs11-client.c
  head/crypto/openssh/ssh-pkcs11-helper.0
  head/crypto/openssh/ssh-pkcs11-helper.c
  head/crypto/openssh/ssh-pkcs11.c
  head/crypto/openssh/ssh-pkcs11.h
  head/crypto/openssh/ssh-rsa.c
  head/crypto/openssh/ssh.0
  head/crypto/openssh/ssh.1
  head/crypto/openssh/ssh.c
  head/crypto/openssh/ssh_config.0
  head/crypto/openssh/ssh_config.5
  head/crypto/openssh/ssh_namespace.h
  head/crypto/openssh/sshconnect.c
  head/crypto/openssh/sshconnect1.c
  head/crypto/openssh/sshconnect2.c
  head/crypto/openssh/sshd.0
  head/crypto/openssh/sshd.8
  head/crypto/openssh/sshd.c
  head/crypto/openssh/sshd_config.0
  head/crypto/openssh/sshd_config.5
  head/crypto/openssh/sshlogin.c
  head/crypto/openssh/sshpty.c
  head/crypto/openssh/umac.c
  head/crypto/openssh/version.h
  head/secure/lib/libssh/Makefile
Directory Properties:
  head/crypto/openssh/   (props changed)

Modified: head/crypto/openssh/ChangeLog
==============================================================================
--- head/crypto/openssh/ChangeLog	Tue Jan 19 15:33:28 2016	(r294327)
+++ head/crypto/openssh/ChangeLog	Tue Jan 19 16:18:26 2016	(r294328)
@@ -1,3 +1,934 @@
+20131006
+ - (djm) Release OpenSSH-6.7
+
+20141003
+ - (djm) [sshd_config.5] typo; from Iain Morgan
+
+20141001
+ - (djm) [openbsd-compat/Makefile.in openbsd-compat/kludge-fd_set.c]
+   [openbsd-compat/openbsd-compat.h] Kludge around bad glibc
+   _FORTIFY_SOURCE check that doesn't grok heap-allocated fd_sets;
+   ok dtucker@
+
+20140910
+ - (djm) [sandbox-seccomp-filter.c] Allow mremap and exit for DietLibc;
+   patch from Felix von Leitner; ok dtucker
+
+20140908
+ - (dtucker) [INSTALL] Update info about egd.  ok djm@
+
+20140904
+ - (djm) [openbsd-compat/arc4random.c] Zero seed after keying PRNG
+
+20140903
+ - (djm) [defines.h sshbuf.c] Move __predict_true|false to defines.h and
+   conditionalise to avoid duplicate definition.
+ - (djm) [contrib/cygwin/ssh-host-config] Fix old code leading to
+   permissions/ACLs; from Corinna Vinschen
+
+20140830
+ - (djm) [openbsd-compat/openssl-compat.h] add
+   OPENSSL_[RD]SA_MAX_MODULUS_BITS defines for OpenSSL that lacks them
+ - (djm) [misc.c] Missing newline between functions
+ - (djm) [openbsd-compat/openssl-compat.h] add include guard
+ - (djm) [Makefile.in] Make TEST_SHELL a variable; "good idea" tim@
+
+20140827
+ - (djm) [regress/unittests/sshbuf/test_sshbuf_getput_crypto.c]
+   [regress/unittests/sshbuf/test_sshbuf_getput_fuzz.c]
+   [regress/unittests/sshkey/common.c]
+   [regress/unittests/sshkey/test_file.c]
+   [regress/unittests/sshkey/test_fuzz.c]
+   [regress/unittests/sshkey/test_sshkey.c] Don't include openssl/ec.h
+   on !ECC OpenSSL systems
+ - (djm) [monitor.c sshd.c] SIGXFSZ needs to be ignored in postauth
+   monitor, not preauth; bz#2263
+ - (djm) [openbsd-compat/explicit_bzero.c] implement explicit_bzero()
+   using memset_s() where possible; improve fallback to indirect bzero
+   via a volatile pointer to give it more of a chance to avoid being
+   optimised away.
+
+20140825
+ - (djm) [bufec.c] Skip this file on !ECC OpenSSL
+ - (djm) [INSTALL] Recommend libcrypto be built -fPIC, mention LibreSSL,
+   update OpenSSL version requirement.
+
+20140824
+ - (djm) [sftp-server.c] Some systems (e.g. Irix) have prctl() but not
+   PR_SET_DUMPABLE, so adjust ifdef; reported by Tom Christensen
+
+20140823
+ - (djm) [sshd.c] Ignore SIGXFSZ in preauth monitor child; can explode on
+   lastlog writing on platforms with high UIDs; bz#2263
+ - (djm) [configure.ac] We now require a working vsnprintf everywhere (not
+   just for systems that lack asprintf); check for it always and extend
+   test to catch more brokenness. Fixes builds on Solaris <= 9
+
+20140822
+ - (djm) [configure.ac] include leading zero characters in OpenSSL version
+   number; fixes test for unsupported versions
+ - (djm) [sshbuf-getput-crypto.c] Fix compilation when OpenSSL lacks ECC
+ - (djm) [openbsd-compat/bsd-snprintf.c] Fix compilation failure (prototype/
+   definition mismatch) and warning for broken/missing snprintf case.
+ - (djm) [configure.ac] double braces to appease autoconf
+
+20140821
+ - (djm) [Makefile.in] fix reference to libtest_helper.a in sshkey test too.
+ - (djm) [key.h] Fix ifdefs for no-ECC OpenSSL
+ - (djm) [regress/unittests/test_helper/test_helper.c] Fix for systems that
+   don't set __progname. Diagnosed by Tom Christensen.
+
+20140820
+ - (djm) [configure.ac] Check OpenSSL version is supported at configure time;
+   suggested by Kevin Brott
+ - (djm) [Makefile.in] refer to libtest_helper.a by explicit path rather than
+   -L/-l; fixes linking problems on some platforms
+ - (djm) [sshkey.h] Fix compilation when OpenSSL lacks ECC
+ - (djm) [contrib/cygwin/README] Correct build instructions; from Corinna
+
+20140819
+ - (djm) [serverloop.c] Fix syntax error on Cygwin; from Corinna Vinschen
+ - (djm) [sshbuf.h] Fix compilation on systems without OPENSSL_HAS_ECC.
+ - (djm) [ssh-dss.c] Include openssl/dsa.h for DSA_SIG
+ - (djm) [INSTALL contrib/caldera/openssh.spec contrib/cygwin/README]
+   [contrib/redhat/openssh.spec contrib/suse/openssh.spec] Remove mentions
+   of TCP wrappers.
+
+20140811
+ - (djm) [myproposal.h] Make curve25519 KEX dependent on
+   HAVE_EVP_SHA256 instead of OPENSSL_HAS_ECC.
+
+20140810
+ - (djm) [README contrib/caldera/openssh.spec]
+   [contrib/redhat/openssh.spec contrib/suse/openssh.spec] Update versions
+
+20140801
+ - (djm) [regress/multiplex.sh] Skip test for non-OpenBSD netcat. We need
+   a better solution, but this will have to do for now.
+ - (djm) [regress/multiplex.sh] Instruct nc not to quit as soon as stdin
+   is closed; avoid regress failures when stdin is /dev/null
+ - (djm) [regress/multiplex.sh] Use -d (detach stdin) flag to disassociate
+   nc from stdin, it's more portable
+
+20140730
+ - OpenBSD CVS Sync
+   - millert@cvs.openbsd.org 2014/07/24 22:57:10
+     [ssh.1]
+     Mention UNIX-domain socket forwarding too.  OK jmc@ deraadt@
+   - dtucker@cvs.openbsd.org 2014/07/25 21:22:03
+     [ssh-agent.c]
+     Clear buffer used for handling messages.  This prevents keys being
+     left in memory after they have been expired or deleted in some cases
+     (but note that ssh-agent is setgid so you would still need root to
+     access them).  Pointed out by Kevin Burns, ok deraadt
+   - schwarze@cvs.openbsd.org 2014/07/28 15:40:08
+     [sftp-server.8 sshd_config.5]
+     some systems no longer need /dev/log;
+     issue noticed by jirib;
+     ok deraadt
+
+20140725
+ - (djm) [regress/multiplex.sh] restore incorrectly deleted line;
+   pointed out by Christian Hesse
+
+20140722
+ - (djm) [regress/multiplex.sh] ssh mux master lost -N somehow;
+   put it back
+ - (djm) [regress/multiplex.sh] change the test for still-open Unix
+   domain sockets to be robust against nc implementations that produce
+   error messages.
+ - (dtucker) [regress/unittests/sshkey/test_{file,fuzz,sshkey}.c] Wrap ecdsa-
+   specific tests inside OPENSSL_HAS_ECC.
+ - (dtucker) OpenBSD CVS Sync
+   - dtucker@cvs.openbsd.org 2014/07/22 01:18:50
+     [key.c]
+     Prevent spam from key_load_private_pem during hostbased auth.  ok djm@
+   - guenther@cvs.openbsd.org 2014/07/22 07:13:42
+     [umac.c]
+     Convert from <sys/endian.h> to the shiney new <endian.h>
+     ok dtucker@, who also confirmed that -portable handles this already
+     (ID sync only, includes.h pulls in endian.h if available.)
+   - djm@cvs.openbsd.org 2014/07/22 01:32:12
+     [regress/multiplex.sh]
+     change the test for still-open Unix domain sockets to be robust against
+     nc implementations that produce error messages. from -portable
+     (Id sync only)
+   - dtucker@cvs.openbsd.org 2014/07/22 23:23:22
+     [regress/unittests/sshkey/mktestdata.sh]
+     Sign test certs with ed25519 instead of ecdsa so that they'll work in
+     -portable on platforms that don't have ECDSA in their OpenSSL.  ok djm
+   - dtucker@cvs.openbsd.org 2014/07/22 23:57:40
+     [regress/unittests/sshkey/mktestdata.sh]
+     Add $OpenBSD tag to make syncs easier
+   - dtucker@cvs.openbsd.org 2014/07/22 23:35:38
+     [regress/unittests/sshkey/testdata/*]
+     Regenerate test keys with certs signed with ed25519 instead of ecdsa.
+     These can be used in -portable on platforms that don't support ECDSA.
+
+20140721
+ - OpenBSD CVS Sync
+   - millert@cvs.openbsd.org 2014/07/15 15:54:15
+     [forwarding.sh multiplex.sh]
+     Add support for Unix domain socket forwarding.  A remote TCP port
+     may be forwarded to a local Unix domain socket and vice versa or
+     both ends may be a Unix domain socket.  This is a reimplementation
+     of the streamlocal patches by William Ahern from:
+         http://www.25thandclement.com/~william/projects/streamlocal.html
+     OK djm@ markus@
+ - (djm) [regress/multiplex.sh] Not all netcat accept the -N option.
+ - (dtucker) [sshkey.c] ifdef out unused variable when compiling without
+   OPENSSL_HAS_ECC.
+
+20140721
+ - (dtucker) [cipher.c openbsd-compat/openssl-compat.h] Restore the bits
+   needed to build AES CTR mode against OpenSSL 0.9.8f and above.  ok djm
+ - (dtucker) [regress/unittests/sshkey/
+   {common,test_file,test_fuzz,test_sshkey}.c] Wrap stdint.h includes in
+   ifdefs.
+
+20140719
+ - (tim) [openbsd-compat/port-uw.c] Include misc.h for fwd_opts, used
+   in servconf.h.
+
+20140718
+ - OpenBSD CVS Sync
+   - millert@cvs.openbsd.org 2014/07/15 15:54:14
+     [PROTOCOL auth-options.c auth-passwd.c auth-rh-rsa.c auth-rhosts.c]
+     [auth-rsa.c auth.c auth1.c auth2-hostbased.c auth2-kbdint.c auth2-none.c]
+     [auth2-passwd.c auth2-pubkey.c auth2.c canohost.c channels.c channels.h]
+     [clientloop.c misc.c misc.h monitor.c mux.c packet.c readconf.c]
+     [readconf.h servconf.c servconf.h serverloop.c session.c ssh-agent.c]
+     [ssh.c ssh_config.5 sshconnect.c sshconnect1.c sshconnect2.c sshd.c]
+     [sshd_config.5 sshlogin.c]
+     Add support for Unix domain socket forwarding.  A remote TCP port
+     may be forwarded to a local Unix domain socket and vice versa or
+     both ends may be a Unix domain socket.  This is a reimplementation
+     of the streamlocal patches by William Ahern from:
+         http://www.25thandclement.com/~william/projects/streamlocal.html
+     OK djm@ markus@
+   - jmc@cvs.openbsd.org 2014/07/16 14:48:57
+     [ssh.1]
+     add the streamlocal* options to ssh's -o list; millert says they're
+     irrelevant for scp/sftp;
+     ok markus millert
+   - djm@cvs.openbsd.org 2014/07/17 00:10:56
+     [sandbox-systrace.c]
+     ifdef SYS_sendsyslog so this will compile without patching on -stable
+   - djm@cvs.openbsd.org 2014/07/17 00:10:18
+     [mux.c]
+     preserve errno across syscall
+   - djm@cvs.openbsd.org 2014/07/17 00:12:03
+     [key.c]
+     silence "incorrect passphrase" error spam; reported and ok dtucker@
+   - djm@cvs.openbsd.org 2014/07/17 07:22:19
+     [mux.c ssh.c]
+     reflect stdio-forward ("ssh -W host:port ...") failures in exit status.
+     previously we were always returning 0. bz#2255 reported by Brendan
+     Germain; ok dtucker
+   - djm@cvs.openbsd.org 2014/07/18 02:46:01
+     [ssh-agent.c]
+     restore umask around listener socket creation (dropped in streamlocal patch
+     merge)
+ - (dtucker) [auth2-gss.c gss-serv-krb5.c] Include misc.h for fwd_opts, used
+   in servconf.h.
+ - (dtucker) [Makefile.in] Add a t-exec target to run just the executable
+   tests.
+ - (dtucker) [key.c sshkey.c] Put new ecdsa bits inside ifdef OPENSSL_HAS_ECC.
+
+20140717
+ - (djm) [digest-openssl.c] Preserve array order when disabling digests.
+   Reported by Petr Lautrbach.
+ - OpenBSD CVS Sync
+   - deraadt@cvs.openbsd.org 2014/07/11 08:09:54
+     [sandbox-systrace.c]
+     Permit use of SYS_sendsyslog from inside the sandbox.  Clock is ticking,
+     update your kernels and sshd soon.. libc will start using sendsyslog()
+     in about 4 days.
+   - tedu@cvs.openbsd.org 2014/07/11 13:54:34
+     [myproposal.h]
+     by popular demand, add back hamc-sha1 to server proposal for better compat
+     with many clients still in use. ok deraadt
+
+20140715
+ - (djm) [configure.ac] Delay checks for arc4random* until after libcrypto
+   has been located; fixes builds agains libressl-portable
+
+20140711
+ - OpenBSD CVS Sync
+   - benno@cvs.openbsd.org 2014/07/09 14:15:56
+     [ssh-add.c]
+     fix ssh-add crash while loading more than one key
+     ok markus@
+
+20140709
+ - OpenBSD CVS Sync
+   - djm@cvs.openbsd.org 2014/07/07 08:19:12
+     [ssh_config.5]
+     mention that ProxyCommand is executed using shell "exec" to avoid
+     a lingering process; bz#1977
+   - djm@cvs.openbsd.org 2014/07/09 01:45:10
+     [sftp.c]
+     more useful error message when GLOB_NOSPACE occurs;
+     bz#2254, patch from Orion Poplawski
+   - djm@cvs.openbsd.org 2014/07/09 03:02:15
+     [key.c]
+     downgrade more error() to debug() to better match what old authfile.c
+     did; suppresses spurious errors with hostbased authentication enabled
+   - djm@cvs.openbsd.org 2014/07/06 07:42:03
+     [multiplex.sh test-exec.sh]
+     add a hook to the cleanup() function to kill $SSH_PID if it is set
+     
+     use it to kill the mux master started in multiplex.sh (it was being left
+     around on fatal failures)
+   - djm@cvs.openbsd.org 2014/07/07 08:15:26
+     [multiplex.sh]
+     remove forced-fatal that I stuck in there to test the new cleanup
+     logic and forgot to remove...
+
+20140706
+ - OpenBSD CVS Sync
+   - djm@cvs.openbsd.org 2014/07/03 23:18:35
+     [authfile.h]
+     remove leakmalloc droppings
+   - djm@cvs.openbsd.org 2014/07/05 23:11:48
+     [channels.c]
+     fix remote-forward cancel regression; ok markus@
+
+20140704
+ - OpenBSD CVS Sync
+   - jsing@cvs.openbsd.org 2014/07/03 12:42:16
+     [cipher-chachapoly.c]
+     Call chacha_ivsetup() immediately before chacha_encrypt_bytes() - this
+     makes it easier to verify that chacha_encrypt_bytes() is only called once
+     per chacha_ivsetup() call.
+     ok djm@
+   - djm@cvs.openbsd.org 2014/07/03 22:23:46
+     [sshconnect.c]
+     when rekeying, skip file/DNS lookup if it is the same as the key sent
+     during initial key exchange. bz#2154 patch from Iain Morgan; ok markus@
+   - djm@cvs.openbsd.org 2014/07/03 22:33:41
+     [channels.c]
+     allow explicit ::1 and 127.0.0.1 forwarding bind addresses when
+     GatewayPorts=no; allows client to choose address family;
+     bz#2222 ok markus@
+   - djm@cvs.openbsd.org 2014/07/03 22:40:43
+     [servconf.c servconf.h session.c sshd.8 sshd_config.5]
+     Add a sshd_config PermitUserRC option to control whether ~/.ssh/rc is
+     executed, mirroring the no-user-rc authorized_keys option;
+     bz#2160; ok markus@
+
+20140703
+ - (djm) [digest-openssl.c configure.ac] Disable RIPEMD160 if libcrypto
+   doesn't support it.
+ - (djm) [monitor_fdpass.c] Use sys/poll.h if poll.h doesn't exist;
+   bz#2237
+ - OpenBSD CVS Sync
+   - djm@cvs.openbsd.org 2014/07/03 01:45:38
+     [sshkey.c]
+     make Ed25519 keys' title fit properly in the randomart border; bz#2247
+     based on patch from Christian Hesse
+   - djm@cvs.openbsd.org 2014/07/03 03:11:03
+     [ssh-agent.c]
+     Only cleanup agent socket in the main agent process and not in any
+     subprocesses it may have started (e.g. forked askpass). Fixes
+     agent sockets being zapped when askpass processes fatal();
+     bz#2236 patch from Dmitry V. Levin
+   - djm@cvs.openbsd.org 2014/07/03 03:15:01
+     [ssh-add.c]
+     make stdout line-buffered; saves partial output getting lost when
+     ssh-add fatal()s part-way through (e.g. when listing keys from an
+     agent that supports key types that ssh-add doesn't);
+     bz#2234, reported by Phil Pennock
+   - djm@cvs.openbsd.org 2014/07/03 03:26:43
+     [digest-openssl.c]
+     use EVP_Digest() for one-shot hash instead of creating, updating,
+     finalising and destroying a context.
+     bz#2231, based on patch from Timo Teras
+   - djm@cvs.openbsd.org 2014/07/03 03:34:09
+     [gss-serv.c session.c ssh-keygen.c]
+     standardise on NI_MAXHOST for gethostname() string lengths; about
+     1/2 the cases were using it already. Fixes bz#2239 en passant
+   - djm@cvs.openbsd.org 2014/07/03 03:47:27
+     [ssh-keygen.c]
+     When hashing or removing hosts using ssh-keygen, don't choke on
+     @revoked markers and don't remove @cert-authority markers;
+     bz#2241, reported by mlindgren AT runelind.net
+   - djm@cvs.openbsd.org 2014/07/03 04:36:45
+     [digest.h]
+     forward-declare struct sshbuf so consumers don't need to include sshbuf.h
+   - djm@cvs.openbsd.org 2014/07/03 05:32:36
+     [ssh_config.5]
+     mention '%%' escape sequence in HostName directives and how it may
+     be used to specify IPv6 link-local addresses
+   - djm@cvs.openbsd.org 2014/07/03 05:38:17
+     [ssh.1]
+     document that -g will only work in the multiplexed case if applied to
+     the mux master
+   - djm@cvs.openbsd.org 2014/07/03 06:39:19
+     [ssh.c ssh_config.5]
+     Add a %C escape sequence for LocalCommand and ControlPath that expands
+     to a unique identifer based on a has of the tuple of (local host,
+     remote user, hostname, port).
+     
+     Helps avoid exceeding sockaddr_un's miserly pathname limits for mux
+     control paths.
+     
+     bz#2220, based on patch from mancha1 AT zoho.com; ok markus@
+   - jmc@cvs.openbsd.org 2014/07/03 07:45:27
+     [ssh_config.5]
+     escape %C since groff thinks it part of an Rs/Re block;
+   - djm@cvs.openbsd.org 2014/07/03 11:16:55
+     [auth.c auth.h auth1.c auth2.c]
+     make the "Too many authentication failures" message include the
+     user, source address, port and protocol in a format similar to the
+     authentication success / failure messages; bz#2199, ok dtucker
+
+20140702
+ - OpenBSD CVS Sync
+   - deraadt@cvs.openbsd.org 2014/06/13 08:26:29
+     [sandbox-systrace.c]
+     permit SYS_getentropy
+     from matthew
+   - matthew@cvs.openbsd.org 2014/06/18 02:59:13
+     [sandbox-systrace.c]
+     Now that we have a dedicated getentropy(2) system call for
+     arc4random(3), we can disallow __sysctl(2) in OpenSSH's systrace
+     sandbox.
+     
+     ok djm
+   - naddy@cvs.openbsd.org 2014/06/18 15:42:09
+     [sshbuf-getput-crypto.c]
+     The ssh_get_bignum functions must accept the same range of bignums
+     the corresponding ssh_put_bignum functions create.  This fixes the
+     use of 16384-bit RSA keys (bug reported by Eivind Evensen).
+     ok djm@
+   - djm@cvs.openbsd.org 2014/06/24 00:52:02
+     [krl.c]
+     fix bug in KRL generation: multiple consecutive revoked certificate
+     serial number ranges could be serialised to an invalid format.
+     
+     Readers of a broken KRL caused by this bug will fail closed, so no
+     should-have-been-revoked key will be accepted.
+   - djm@cvs.openbsd.org 2014/06/24 01:13:21
+     [Makefile.in auth-bsdauth.c auth-chall.c auth-options.c auth-rsa.c
+     [auth2-none.c auth2-pubkey.c authfile.c authfile.h cipher-3des1.c
+     [cipher-chachapoly.c cipher-chachapoly.h cipher.c cipher.h
+     [digest-libc.c digest-openssl.c digest.h dns.c entropy.c hmac.h
+     [hostfile.c key.c key.h krl.c monitor.c packet.c rsa.c rsa.h
+     [ssh-add.c ssh-agent.c ssh-dss.c ssh-ecdsa.c ssh-ed25519.c
+     [ssh-keygen.c ssh-pkcs11-client.c ssh-pkcs11-helper.c ssh-pkcs11.c
+     [ssh-rsa.c sshbuf-misc.c sshbuf.h sshconnect.c sshconnect1.c
+     [sshconnect2.c sshd.c sshkey.c sshkey.h
+     [openbsd-compat/openssl-compat.c openbsd-compat/openssl-compat.h]
+     New key API: refactor key-related functions to be more library-like,
+     existing API is offered as a set of wrappers.
+     
+     with and ok markus@
+     
+     Thanks also to Ben Hawkes, David Tomaschik, Ivan Fratric, Matthew
+     Dempsky and Ron Bowes for a detailed review a few months ago.
+     NB. This commit also removes portable OpenSSH support for OpenSSL
+     <0.9.8e.
+   - djm@cvs.openbsd.org 2014/06/24 02:19:48
+     [ssh.c]
+     don't fatal() when hostname canonicalisation fails with a
+     ProxyCommand in use; continue and allow the ProxyCommand to
+     connect anyway (e.g. to a host with a name outside the DNS
+     behind a bastion)
+   - djm@cvs.openbsd.org 2014/06/24 02:21:01
+     [scp.c]
+     when copying local->remote fails during read, don't send uninitialised
+     heap to the remote end. Reported by Jann Horn
+   - deraadt@cvs.openbsd.org 2014/06/25 14:16:09
+     [sshbuf.c]
+     unblock SIGSEGV before raising it
+     ok djm
+   - markus@cvs.openbsd.org 2014/06/27 16:41:56
+     [channels.c channels.h clientloop.c ssh.c]
+     fix remote fwding with same listen port but different listen address
+     with gerhard@, ok djm@
+   - markus@cvs.openbsd.org 2014/06/27 18:50:39
+     [ssh-add.c]
+     fix loading of private keys
+   - djm@cvs.openbsd.org 2014/06/30 12:54:39
+     [key.c]
+     suppress spurious error message when loading key with a passphrase;
+     reported by kettenis@ ok markus@
+   - djm@cvs.openbsd.org 2014/07/02 04:59:06
+     [cipher-3des1.c]
+     fix ssh protocol 1 on the server that regressed with the sshkey change
+     (sometimes fatal() after auth completed), make file return useful status
+     codes.
+     NB. Id sync only for these two. They were bundled into the sshkey merge
+     above, since it was easier to sync the entire file and then apply
+     portable-specific changed atop it.
+   - djm@cvs.openbsd.org 2014/04/30 05:32:00
+     [regress/Makefile]
+     unit tests for new buffer API; including basic fuzz testing
+     NB. Id sync only.
+   - djm@cvs.openbsd.org 2014/05/21 07:04:21
+     [regress/integrity.sh]
+     when failing because of unexpected output, show the offending output
+   - djm@cvs.openbsd.org 2014/06/24 01:04:43
+     [regress/krl.sh]
+     regress test for broken consecutive revoked serial number ranges
+   - djm@cvs.openbsd.org 2014/06/24 01:14:17
+     [Makefile.in regress/Makefile regress/unittests/Makefile]
+     [regress/unittests/sshkey/Makefile]
+     [regress/unittests/sshkey/common.c]
+     [regress/unittests/sshkey/common.h]
+     [regress/unittests/sshkey/mktestdata.sh]
+     [regress/unittests/sshkey/test_file.c]
+     [regress/unittests/sshkey/test_fuzz.c]
+     [regress/unittests/sshkey/test_sshkey.c]
+     [regress/unittests/sshkey/tests.c]
+     [regress/unittests/sshkey/testdata/dsa_1]
+     [regress/unittests/sshkey/testdata/dsa_1-cert.fp]
+     [regress/unittests/sshkey/testdata/dsa_1-cert.pub]
+     [regress/unittests/sshkey/testdata/dsa_1.fp]
+     [regress/unittests/sshkey/testdata/dsa_1.fp.bb]
+     [regress/unittests/sshkey/testdata/dsa_1.param.g]
+     [regress/unittests/sshkey/testdata/dsa_1.param.priv]
+     [regress/unittests/sshkey/testdata/dsa_1.param.pub]
+     [regress/unittests/sshkey/testdata/dsa_1.pub]
+     [regress/unittests/sshkey/testdata/dsa_1_pw]
+     [regress/unittests/sshkey/testdata/dsa_2]
+     [regress/unittests/sshkey/testdata/dsa_2.fp]
+     [regress/unittests/sshkey/testdata/dsa_2.fp.bb]
+     [regress/unittests/sshkey/testdata/dsa_2.pub]
+     [regress/unittests/sshkey/testdata/dsa_n]
+     [regress/unittests/sshkey/testdata/dsa_n_pw]
+     [regress/unittests/sshkey/testdata/ecdsa_1]
+     [regress/unittests/sshkey/testdata/ecdsa_1-cert.fp]
+     [regress/unittests/sshkey/testdata/ecdsa_1-cert.pub]
+     [regress/unittests/sshkey/testdata/ecdsa_1.fp]
+     [regress/unittests/sshkey/testdata/ecdsa_1.fp.bb]
+     [regress/unittests/sshkey/testdata/ecdsa_1.param.curve]
+     [regress/unittests/sshkey/testdata/ecdsa_1.param.priv]
+     [regress/unittests/sshkey/testdata/ecdsa_1.param.pub]
+     [regress/unittests/sshkey/testdata/ecdsa_1.pub]
+     [regress/unittests/sshkey/testdata/ecdsa_1_pw]
+     [regress/unittests/sshkey/testdata/ecdsa_2]
+     [regress/unittests/sshkey/testdata/ecdsa_2.fp]
+     [regress/unittests/sshkey/testdata/ecdsa_2.fp.bb]
+     [regress/unittests/sshkey/testdata/ecdsa_2.param.curve]
+     [regress/unittests/sshkey/testdata/ecdsa_2.param.priv]
+     [regress/unittests/sshkey/testdata/ecdsa_2.param.pub]
+     [regress/unittests/sshkey/testdata/ecdsa_2.pub]
+     [regress/unittests/sshkey/testdata/ecdsa_n]
+     [regress/unittests/sshkey/testdata/ecdsa_n_pw]
+     [regress/unittests/sshkey/testdata/ed25519_1]
+     [regress/unittests/sshkey/testdata/ed25519_1-cert.fp]
+     [regress/unittests/sshkey/testdata/ed25519_1-cert.pub]
+     [regress/unittests/sshkey/testdata/ed25519_1.fp]
+     [regress/unittests/sshkey/testdata/ed25519_1.fp.bb]
+     [regress/unittests/sshkey/testdata/ed25519_1.pub]
+     [regress/unittests/sshkey/testdata/ed25519_1_pw]
+     [regress/unittests/sshkey/testdata/ed25519_2]
+     [regress/unittests/sshkey/testdata/ed25519_2.fp]
+     [regress/unittests/sshkey/testdata/ed25519_2.fp.bb]
+     [regress/unittests/sshkey/testdata/ed25519_2.pub]
+     [regress/unittests/sshkey/testdata/pw]
+     [regress/unittests/sshkey/testdata/rsa1_1]
+     [regress/unittests/sshkey/testdata/rsa1_1.fp]
+     [regress/unittests/sshkey/testdata/rsa1_1.fp.bb]
+     [regress/unittests/sshkey/testdata/rsa1_1.param.n]
+     [regress/unittests/sshkey/testdata/rsa1_1.pub]
+     [regress/unittests/sshkey/testdata/rsa1_1_pw]
+     [regress/unittests/sshkey/testdata/rsa1_2]
+     [regress/unittests/sshkey/testdata/rsa1_2.fp]
+     [regress/unittests/sshkey/testdata/rsa1_2.fp.bb]
+     [regress/unittests/sshkey/testdata/rsa1_2.param.n]
+     [regress/unittests/sshkey/testdata/rsa1_2.pub]
+     [regress/unittests/sshkey/testdata/rsa_1]
+     [regress/unittests/sshkey/testdata/rsa_1-cert.fp]
+     [regress/unittests/sshkey/testdata/rsa_1-cert.pub]
+     [regress/unittests/sshkey/testdata/rsa_1.fp]
+     [regress/unittests/sshkey/testdata/rsa_1.fp.bb]
+     [regress/unittests/sshkey/testdata/rsa_1.param.n]
+     [regress/unittests/sshkey/testdata/rsa_1.param.p]
+     [regress/unittests/sshkey/testdata/rsa_1.param.q]
+     [regress/unittests/sshkey/testdata/rsa_1.pub]
+     [regress/unittests/sshkey/testdata/rsa_1_pw]
+     [regress/unittests/sshkey/testdata/rsa_2]
+     [regress/unittests/sshkey/testdata/rsa_2.fp]
+     [regress/unittests/sshkey/testdata/rsa_2.fp.bb]
+     [regress/unittests/sshkey/testdata/rsa_2.param.n]
+     [regress/unittests/sshkey/testdata/rsa_2.param.p]
+     [regress/unittests/sshkey/testdata/rsa_2.param.q]
+     [regress/unittests/sshkey/testdata/rsa_2.pub]
+     [regress/unittests/sshkey/testdata/rsa_n]
+     [regress/unittests/sshkey/testdata/rsa_n_pw]
+     unit and fuzz tests for new key API
+ - (djm) [sshkey.c] Conditionalise inclusion of util.h
+ - (djm) [regress/Makefile] fix execution of sshkey unit/fuzz test
+
+20140618
+ - (tim) [openssh/session.c] Work around to get chroot sftp working on UnixWare
+
+20140617
+ - (dtucker) [entropy.c openbsd-compat/openssl-compat.{c,h}
+   openbsd-compat/regress/{.cvsignore,Makefile.in,opensslvertest.c}]
+   Move the OpenSSL header/library version test into its own function and add
+   tests for it. Fix it to allow fix version upgrades (but not downgrades).
+   Prompted by chl@ via OpenSMTPD (issue #462) and Debian (bug #748150).
+   ok djm@ chl@
+
+20140616
+ - (dtucker) [defines.h] Fix undef of _PATH_MAILDIR.  From rak at debian via
+   OpenSMTPD and chl@
+
+20140612
+ - (dtucker) [configure.ac] Remove tcpwrappers support, support has already
+   been removed from sshd.c.
+
+20140611
+ - (dtucker) [defines.h] Add va_copy if we don't already have it, taken from
+   openbsd-compat/bsd-asprintf.c.
+ - (dtucker) [regress/unittests/sshbuf/*.c regress/unittests/test_helper/*]
+   Wrap stdlib.h include an ifdef for platforms that don't have it.
+ - (tim) [regress/unittests/test_helper/test_helper.h] Add includes.h for
+   u_intXX_t types.
+
+20140610
+ - (dtucker) [regress/unittests/sshbuf/test_sshbuf_getput_crypto.c
+   regress/unittests/sshbuf/test_sshbuf_getput_fuzz.c] Only do NISTP256
+   curve tests if OpenSSL has them.
+ - (dtucker) [myprosal.h] Don't include curve25519-sha256@libssh.org in
+   the proposal if the version of OpenSSL we're using doesn't support ECC.
+ - (dtucker) [regress/unittests/sshbuf/test_sshbuf_getput_fuzz.c] ifdef
+   ECC variable too.
+ - (dtucker) OpenBSD CVS Sync
+   - djm@cvs.openbsd.org 2014/06/05 22:17:50
+     [sshconnect2.c]
+     fix inverted test that caused PKCS#11 keys that were explicitly listed
+     not to be preferred. Reported by Dirk-Willem van Gulik
+   - dtucker@cvs.openbsd.org 2014/06/10 21:46:11
+     [sshbuf.h]
+     Group ECC functions together to make things a little easier in -portable.
+     "doesn't bother me" deraadt@
+ - (dtucker) [sshbuf.h] Only declare ECC functions if building without
+   OpenSSL or if OpenSSL has ECC.
+ - (dtucker) [openbsd-compat/arc4random.c] Use explicit_bzero instead of an
+   assigment that might get optimized out.  ok djm@
+ - (dtucker) [bufaux.c bufbn.c bufec.c buffer.c] Pull in includes.h for
+   compat stuff, specifically whether or not OpenSSL has ECC.
+
+20140527
+ - (djm) [cipher.c] Fix merge botch.
+ - (djm) [contrib/cygwin/ssh-host-config] Updated Cygwin ssh-host-config
+   from Corinna Vinschen, fixing a number of bugs and preparing for
+   Cygwin 1.7.30.
+ - (djm) [configure.ac openbsd-compat/bsd-cygwin_util.c]
+   [openbsd-compat/bsd-cygwin_util.h] On Cygwin, determine privilege
+   separation user at runtime, since it may need to be a domain account.
+   Patch from Corinna Vinschen.
+
+20140522
+ - (djm) [Makefile.in] typo in path
+
+20140521
+ - (djm) [commit configure.ac defines.h sshpty.c] don't attempt to use
+   vhangup on Linux. It doens't work for non-root users, and for them
+   it just messes up the tty settings.
+ - (djm) [misc.c] Use CLOCK_BOOTTIME in preference to CLOCK_MONOTONIC
+   when it is available. It takes into account time spent suspended,
+   thereby ensuring timeouts (e.g. for expiring agent keys) fire
+   correctly. bz#2228 reported by John Haxby
+
+20140519
+ - (djm) [rijndael.c rijndael.h] Sync with newly-ressurected versions ine
+   OpenBSD
+ - OpenBSD CVS Sync
+   - logan@cvs.openbsd.org 2014/04/20 09:24:26
+     [dns.c dns.h ssh-keygen.c]
+     Add support for SSHFP DNS records for ED25519 key types.
+     OK from djm@
+   - logan@cvs.openbsd.org 2014/04/21 14:36:16
+     [sftp-client.c sftp-client.h sftp.c]
+     Implement sftp upload resume support.
+     OK from djm@, with input from guenther@, mlarkin@ and
+     okan@
+   - logan@cvs.openbsd.org 2014/04/22 10:07:12
+     [sftp.c]
+     Sort the sftp command list.
+     OK from djm@
+   - logan@cvs.openbsd.org 2014/04/22 12:42:04
+     [sftp.1]
+     Document sftp upload resume.
+     OK from djm@, with feedback from okan@.
+   - jmc@cvs.openbsd.org 2014/04/22 14:16:30
+     [sftp.1]
+     zap eol whitespace;
+   - djm@cvs.openbsd.org 2014/04/23 12:42:34
+     [readconf.c]
+     don't record duplicate IdentityFiles
+   - djm@cvs.openbsd.org 2014/04/28 03:09:18
+     [authfile.c bufaux.c buffer.h channels.c krl.c mux.c packet.c packet.h]
+     [ssh-keygen.c]
+     buffer_get_string_ptr's return should be const to remind
+     callers that futzing with it will futz with the actual buffer
+     contents
+   - djm@cvs.openbsd.org 2014/04/29 13:10:30
+     [clientloop.c serverloop.c]
+     bz#1818 - don't send channel success/failre replies on channels that
+     have sent a close already; analysis and patch from Simon Tatham;
+     ok markus@
+   - markus@cvs.openbsd.org 2014/04/29 18:01:49
+     [auth.c authfd.c authfile.c bufaux.c cipher.c cipher.h hostfile.c]
+     [kex.c key.c mac.c monitor.c monitor_wrap.c myproposal.h packet.c]
+     [roaming_client.c ssh-agent.c ssh-keygen.c ssh-keyscan.c ssh-keysign.c]
+     [ssh-pkcs11.h ssh.c sshconnect.c sshconnect2.c sshd.c]
+     make compiling against OpenSSL optional (make OPENSSL=no);
+     reduces algorithms to curve25519, aes-ctr, chacha, ed25519;
+     allows us to explore further options; with and ok djm
+   - dtucker@cvs.openbsd.org 2014/04/29 19:58:50
+     [sftp.c]
+     Move nulling of variable next to where it's freed.  ok markus@
+   - dtucker@cvs.openbsd.org 2014/04/29 20:36:51
+     [sftp.c]
+     Don't attempt to append a nul quote char to the filename.  Should prevent
+     fatal'ing with "el_insertstr failed" when there's a single quote char
+     somewhere in the string.  bz#2238, ok markus@
+   - djm@cvs.openbsd.org 2014/04/30 05:29:56
+     [bufaux.c bufbn.c bufec.c buffer.c buffer.h sshbuf-getput-basic.c]
+     [sshbuf-getput-crypto.c sshbuf-misc.c sshbuf.c sshbuf.h ssherr.c]
+     [ssherr.h]
+     New buffer API; the first installment of the conversion/replacement
+     of OpenSSH's internals to make them usable as a standalone library.
+     
+     This includes a set of wrappers to make it compatible with the
+     existing buffer API so replacement can occur incrementally.
+     
+     With and ok markus@
+     
+     Thanks also to Ben Hawkes, David Tomaschik, Ivan Fratric, Matthew
+     Dempsky and Ron Bowes for a detailed review.
+   - naddy@cvs.openbsd.org 2014/04/30 19:07:48
+     [mac.c myproposal.h umac.c]
+     UMAC can use our local fallback implementation of AES when OpenSSL isn't
+     available.  Glue code straight from Ted Krovetz's original umac.c.
+     ok markus@
+   - djm@cvs.openbsd.org 2014/05/02 03:27:54
+     [chacha.h cipher-chachapoly.h digest.h hmac.h kex.h kexc25519.c]
+     [misc.h poly1305.h ssh-pkcs11.c defines.h]
+     revert __bounded change; it causes way more problems for portable than
+     it solves; pointed out by dtucker@
+   - markus@cvs.openbsd.org 2014/05/03 17:20:34
+     [monitor.c packet.c packet.h]
+     unbreak compression, by re-init-ing the compression code in the
+     post-auth child. the new buffer code is more strict, and requires
+     buffer_init() while the old code was happy after a bzero();
+     originally from djm@
+   - logan@cvs.openbsd.org 2014/05/05 07:02:30
+     [sftp.c]
+     Zap extra whitespace.
+     
+     OK from djm@ and dtucker@
+ - (djm) [configure.ac] Unconditionally define WITH_OPENSSL until we write
+   portability glue to support building without libcrypto
+ - (djm) [Makefile.in configure.ac sshbuf-getput-basic.c]
+   [sshbuf-getput-crypto.c sshbuf.c] compilation and portability fixes
+ - OpenBSD CVS Sync
+   - djm@cvs.openbsd.org 2014/03/13 20:44:49
+     [login-timeout.sh]
+     this test is a sorry mess of race conditions; add another sleep
+     to avoid a failure on slow machines (at least until I find a
+     better way)
+   - djm@cvs.openbsd.org 2014/04/21 22:15:37
+     [dhgex.sh integrity.sh kextype.sh rekey.sh try-ciphers.sh]
+     repair regress tests broken by server-side default cipher/kex/mac changes
+     by ensuring that the option under test is included in the server's
+     algorithm list
+   - dtucker@cvs.openbsd.org 2014/05/03 18:46:14
+     [proxy-connect.sh]
+     Add tests for with and without compression, with and without privsep.
+   - logan@cvs.openbsd.org 2014/05/04 10:40:59
+     [connect-privsep.sh]
+     Remove the Z flag from the list of malloc options as it
+     was removed from malloc.c 10 days ago.
+     
+     OK from miod@
+ - (djm) [regress/unittests/Makefile]
+   [regress/unittests/Makefile.inc]
+   [regress/unittests/sshbuf/Makefile]
+   [regress/unittests/sshbuf/test_sshbuf.c]
+   [regress/unittests/sshbuf/test_sshbuf_fixed.c]
+   [regress/unittests/sshbuf/test_sshbuf_fuzz.c]
+   [regress/unittests/sshbuf/test_sshbuf_getput_basic.c]
+   [regress/unittests/sshbuf/test_sshbuf_getput_crypto.c]
+   [regress/unittests/sshbuf/test_sshbuf_getput_fuzz.c]
+   [regress/unittests/sshbuf/test_sshbuf_misc.c]
+   [regress/unittests/sshbuf/tests.c]
+   [regress/unittests/test_helper/Makefile]
+   [regress/unittests/test_helper/fuzz.c]
+   [regress/unittests/test_helper/test_helper.c]
+   [regress/unittests/test_helper/test_helper.h]
+   Import new unit tests from OpenBSD; not yet hooked up to build.
+ - (djm) [regress/Makefile Makefile.in]
+   [regress/unittests/sshbuf/test_sshbuf.c
+   [regress/unittests/sshbuf/test_sshbuf_fixed.c]
+   [regress/unittests/sshbuf/test_sshbuf_fuzz.c]
+   [regress/unittests/sshbuf/test_sshbuf_getput_basic.c]
+   [regress/unittests/sshbuf/test_sshbuf_getput_crypto.c]
+   [regress/unittests/sshbuf/test_sshbuf_getput_fuzz.c]
+   [regress/unittests/sshbuf/test_sshbuf_misc.c]
+   [regress/unittests/sshbuf/tests.c]
+   [regress/unittests/test_helper/fuzz.c]
+   [regress/unittests/test_helper/test_helper.c]
+   Hook new unit tests into the build and "make tests"
+ - (djm) [sshbuf.c] need __predict_false
+
+20140430
+ - (dtucker) [defines.h] Define __GNUC_PREREQ__ macro if we don't already
+   have it.  Only attempt to use __attribute__(__bounded__) for gcc.
+
+20140420
+ - OpenBSD CVS Sync
+   - djm@cvs.openbsd.org 2014/03/03 22:22:30
+     [session.c]
+     ignore enviornment variables with embedded '=' or '\0' characters;
+     spotted by Jann Horn; ok deraadt@
+     Id sync only - portable already has this.
+   - djm@cvs.openbsd.org 2014/03/12 04:44:58
+     [ssh-keyscan.c]
+     scan for Ed25519 keys by default too
+   - djm@cvs.openbsd.org 2014/03/12 04:50:32
+     [auth-bsdauth.c ssh-keygen.c]
+     don't count on things that accept arguments by reference to clear
+     things for us on error; most things do, but it's unsafe form.
+   - djm@cvs.openbsd.org 2014/03/12 04:51:12
+     [authfile.c]
+     correct test that kdf name is not "none" or "bcrypt"
+   - naddy@cvs.openbsd.org 2014/03/12 13:06:59
+     [ssh-keyscan.1]
+     scan for Ed25519 keys by default too
+   - deraadt@cvs.openbsd.org 2014/03/15 17:28:26
+     [ssh-agent.c ssh-keygen.1 ssh-keygen.c]
+     Improve usage() and documentation towards the standard form. 
+     In particular, this line saves a lot of man page reading time.
+       usage: ssh-keygen [-q] [-b bits] [-t dsa | ecdsa | ed25519 | rsa | rsa1]
+                         [-N new_passphrase] [-C comment] [-f output_keyfile]
+     ok schwarze jmc
+   - tedu@cvs.openbsd.org 2014/03/17 19:44:10
+     [ssh.1]
+     old descriptions of des and blowfish are old. maybe ok deraadt
+   - tedu@cvs.openbsd.org 2014/03/19 14:42:44
+     [scp.1]
+     there is no need for rcp anymore
+     ok deraadt millert
+   - markus@cvs.openbsd.org 2014/03/25 09:40:03
+     [myproposal.h]
+     trimm default proposals.
+     
+     This commit removes the weaker pre-SHA2 hashes, the broken ciphers
+     (arcfour), and the broken modes (CBC) from the default configuration
+     (the patch only changes the default, all the modes are still available
+     for the config files).
+     
+     ok djm@, reminded by tedu@ & naddy@ and discussed with many
+   - deraadt@cvs.openbsd.org 2014/03/26 17:16:26
+     [myproposal.h]
+     The current sharing of myproposal[] between both client and server code
+     makes the previous diff highly unpallatable.  We want to go in that
+     direction for the server, but not for the client.  Sigh.
+     Brought up by naddy.
+   - markus@cvs.openbsd.org 2014/03/27 23:01:27
+     [myproposal.h ssh-keyscan.c sshconnect2.c sshd.c]
+     disable weak proposals in sshd, but keep them in ssh; ok djm@
+   - djm@cvs.openbsd.org 2014/03/26 04:55:35
+     [chacha.h cipher-chachapoly.h digest.h hmac.h kex.h kexc25519.c
+     [misc.h poly1305.h ssh-pkcs11.c]
+     use __bounded(...) attribute recently added to sys/cdefs.h instead of
+     longform __attribute__(__bounded(...));
+     
+     for brevity and a warning free compilation with llvm/clang
+   - tedu@cvs.openbsd.org 2014/03/26 19:58:37
+     [sshd.8 sshd.c]
+     remove libwrap support. ok deraadt djm mfriedl
+   - naddy@cvs.openbsd.org 2014/03/28 05:17:11
+     [ssh_config.5 sshd_config.5]
+     sync available and default algorithms, improve algorithm list formatting
+     help from jmc@ and schwarze@, ok deraadt@
+   - jmc@cvs.openbsd.org 2014/03/31 13:39:34
+     [ssh-keygen.1]
+     the text for the -K option was inserted in the wrong place in -r1.108;
+     fix From: Matthew Clarke
+   - djm@cvs.openbsd.org 2014/04/01 02:05:27
+     [ssh-keysign.c]
+     include fingerprint of key not found
+     use arc4random_buf() instead of loop+arc4random()
+   - djm@cvs.openbsd.org 2014/04/01 03:34:10
+     [sshconnect.c]
+     When using VerifyHostKeyDNS with a DNSSEC resolver, down-convert any
+     certificate keys to plain keys and attempt SSHFP resolution.
+     
+     Prevents a server from skipping SSHFP lookup and forcing a new-hostkey
+     dialog by offering only certificate keys.
+     
+     Reported by mcv21 AT cam.ac.uk
+   - djm@cvs.openbsd.org 2014/04/01 05:32:57
+     [packet.c]
+     demote a debug3 to PACKET_DEBUG; ok markus@
+   - djm@cvs.openbsd.org 2014/04/12 04:55:53
+     [sshd.c]
+     avoid crash at exit: check that pmonitor!=NULL before dereferencing;
+     bz#2225, patch from kavi AT juniper.net
+   - djm@cvs.openbsd.org 2014/04/16 23:22:45
+     [bufaux.c]
+     skip leading zero bytes in buffer_put_bignum2_from_string();
+     reported by jan AT mojzis.com; ok markus@
+   - djm@cvs.openbsd.org 2014/04/16 23:28:12
+     [ssh-agent.1]
+     remove the identity files from this manpage - ssh-agent doesn't deal
+     with them at all and the same information is duplicated in ssh-add.1
+     (which does deal with them); prodded by deraadt@
+   - djm@cvs.openbsd.org 2014/04/18 23:52:25
+     [compat.c compat.h sshconnect2.c sshd.c version.h]
+     OpenSSH 6.5 and 6.6 have a bug that causes ~0.2% of connections
+     using the curve25519-sha256@libssh.org KEX exchange method to fail
+     when connecting with something that implements the spec properly.
+     
+     Disable this KEX method when speaking to one of the affected
+     versions.
+     
+     reported by Aris Adamantiadis; ok markus@
+   - djm@cvs.openbsd.org 2014/04/19 05:54:59
+     [compat.c]
+     missing wildcard; pointed out by naddy@
+   - tedu@cvs.openbsd.org 2014/04/19 14:53:48
+     [ssh-keysign.c sshd.c]
+     Delete futile calls to RAND_seed. ok djm
+     NB. Id sync only. This only applies to OpenBSD's libcrypto slashathon
+   - tedu@cvs.openbsd.org 2014/04/19 18:15:16
+     [sshd.8]
+     remove some really old rsh references
+   - tedu@cvs.openbsd.org 2014/04/19 18:42:19
+     [ssh.1]
+     delete .xr to hosts.equiv. there's still an unfortunate amount of
+     documentation referring to rhosts equivalency in here.
+   - djm@cvs.openbsd.org 2014/04/20 02:30:25
+     [misc.c misc.h umac.c]
+     use get/put_u32 to load values rather than *((UINT32 *)p) that breaks on
+     strict-alignment architectures; reported by and ok stsp@
+   - djm@cvs.openbsd.org 2014/04/20 02:49:32
+     [compat.c]
+     add a canonical 6.6 + curve25519 bignum fix fake version that I can
+     recommend people use ahead of the openssh-6.7 release
+
+20140401
+ - (djm) On platforms that support it, use prctl() to prevent sftp-server
+   from accessing /proc/self/{mem,maps}; patch from jann AT thejh.net
+ - (djm) Use full release (e.g. 6.5p1) in debug output rather than just
+   version. From des@des.no
+
+20140317
+ - (djm) [sandbox-seccomp-filter.c] Soft-fail stat() syscalls. Add XXX to
+   remind myself to add sandbox violation logging via the log socket.
+
+20140314
+ - (tim) [opensshd.init.in] Add support for ed25519
+
 20140313
  - (djm) Release OpenSSH 6.6
 
@@ -2884,4 +3815,3 @@
    [contrib/suse/openssh.spec] Update for release 6.0
  - (djm) [README] Update URL to release notes.
  - (djm) Release openssh-6.0
-

Modified: head/crypto/openssh/INSTALL
==============================================================================
--- head/crypto/openssh/INSTALL	Tue Jan 19 15:33:28 2016	(r294327)
+++ head/crypto/openssh/INSTALL	Tue Jan 19 16:18:26 2016	(r294328)
@@ -1,22 +1,26 @@
 1. Prerequisites
 ----------------
 
-You will need working installations of Zlib and OpenSSL.
+You will need working installations of Zlib and libcrypto (LibreSSL /
+OpenSSL)
 
 Zlib 1.1.4 or 1.2.1.2 or greater (ealier 1.2.x versions have problems):
 http://www.gzip.org/zlib/
 
-OpenSSL 0.9.6 or greater:
-http://www.openssl.org/
-
-(OpenSSL 0.9.5a is partially supported, but some ciphers (SSH protocol 1
-Blowfish) do not work correctly.)
+libcrypto (LibreSSL or OpenSSL >= 0.9.8f)
+LibreSSL http://www.libressl.org/ ; or
+OpenSSL http://www.openssl.org/
+
+LibreSSL/OpenSSL should be compiled as a position-independent library
+(i.e. with -fPIC) otherwise OpenSSH will not be able to link with it.
+If you must use a non-position-independent libcrypto, then you may need
+to configure OpenSSH --without-pie.
 
 The remaining items are optional.
 
 NB. If you operating system supports /dev/random, you should configure
-OpenSSL to use it. OpenSSH relies on OpenSSL's direct support of
-/dev/random, or failing that, either prngd or egd
+libcrypto (LibreSSL/OpenSSL) to use it. OpenSSH relies on libcrypto's
+direct support of /dev/random, or failing that, either prngd or egd
 
 PRNGD:
 
@@ -27,10 +31,10 @@ http://prngd.sourceforge.net/
 
 EGD:
 
-The Entropy Gathering Daemon (EGD) is supported if you have a system which
-lacks /dev/random and don't want to use OpenSSH's internal entropy collection.
+If the kernel lacks /dev/random the Entropy Gathering Daemon (EGD) is
+supported only if libcrypto supports it.
 
-http://www.lothar.com/tech/crypto/
+http://egd.sourceforge.net/
 
 PAM:
 
@@ -204,10 +208,11 @@ created.
 
 --with-xauth=PATH specifies the location of the xauth binary
 
---with-ssl-dir=DIR allows you to specify where your OpenSSL libraries
+--with-ssl-dir=DIR allows you to specify where your Libre/OpenSSL
+libraries

*** DIFF OUTPUT TRUNCATED AT 1000 LINES ***

From owner-svn-src-all@freebsd.org  Tue Jan 19 16:52:02 2016
Return-Path: <owner-svn-src-all@freebsd.org>
Delivered-To: svn-src-all@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id 97D30A89852;
 Tue, 19 Jan 2016 16:52:02 +0000 (UTC) (envelope-from hps@selasky.org)
Received: from mail.turbocat.net (mail.turbocat.net
 [IPv6:2a01:4f8:d16:4514::2])
 (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
 (Client did not present a certificate)
 by mx1.freebsd.org (Postfix) with ESMTPS id 60B3010BD;
 Tue, 19 Jan 2016 16:52:02 +0000 (UTC) (envelope-from hps@selasky.org)
Received: from laptop015.home.selasky.org (unknown [62.141.129.119])
 (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits))
 (No client certificate requested)
 by mail.turbocat.net (Postfix) with ESMTPSA id 6BCAC1FE024;
 Tue, 19 Jan 2016 17:51:59 +0100 (CET)
Subject: Re: svn commit: r294327 - in head/sys: dev/cxgb dev/cxgbe dev/e1000
 dev/hyperv/netvsc dev/ixgbe dev/mxge netinet sys
To: Ryan Stone <rysto32@gmail.com>
References: <201601191533.u0JFXSxf037804@repo.freebsd.org>
 <CAFMmRNz3uXim3H3-sGuBUBs45Jy8p260ywothgp4iFkUcnvnEw@mail.gmail.com>
Cc: "src-committers@freebsd.org" <src-committers@freebsd.org>,
 "svn-src-all@freebsd.org" <svn-src-all@freebsd.org>,
 "svn-src-head@freebsd.org" <svn-src-head@freebsd.org>
From: Hans Petter Selasky <hps@selasky.org>
Message-ID: <569E6A38.8080108@selasky.org>
Date: Tue, 19 Jan 2016 17:54:16 +0100
User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:38.0) Gecko/20100101
 Thunderbird/38.4.0
MIME-Version: 1.0
In-Reply-To: <CAFMmRNz3uXim3H3-sGuBUBs45Jy8p260ywothgp4iFkUcnvnEw@mail.gmail.com>
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: 7bit
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.20
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for &quot;
 user&quot; and &quot; projects&quot; \)" <svn-src-all.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-all/>
List-Post: <mailto:svn-src-all@freebsd.org>
List-Help: <mailto:svn-src-all-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Tue, 19 Jan 2016 16:52:02 -0000

On 01/19/16 17:09, Ryan Stone wrote:
> On Tue, Jan 19, 2016 at 10:33 AM, Hans Petter Selasky <hselasky@freebsd.org>
> wrote:
>
>>
>> +       qsort(lc->lro_mbuf_data, lc->lro_mbuf_count, sizeof(struct mbuf *),
>> +           &tcp_lro_mbuf_compare_header);
>>
>
> In the worst case, qsort() can take O(n**2) time and consume O(n) stack
> space.  Is there a DOS concern here?
>

Hi Ryan,

Is this the case for the qsort() we have in the FreeBSD kernel?

There are other sorting algorithms which can be used instead of qsort() 
which consume O(n * log(n)) time and O(1) stack, but requires a power of 
two set of elements to sort.

--HPS

From owner-svn-src-all@freebsd.org  Tue Jan 19 17:00:27 2016
Return-Path: <owner-svn-src-all@freebsd.org>
Delivered-To: svn-src-all@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id 12045A89AD4;
 Tue, 19 Jan 2016 17:00:27 +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 C8769148A;
 Tue, 19 Jan 2016 17:00:26 +0000 (UTC)
 (envelope-from asomers@FreeBSD.org)
Received: from repo.freebsd.org ([127.0.1.37])
 by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u0JH0Psi061614;
 Tue, 19 Jan 2016 17:00:25 GMT (envelope-from asomers@FreeBSD.org)
Received: (from asomers@localhost)
 by repo.freebsd.org (8.15.2/8.15.2/Submit) id u0JH0P6k061610;
 Tue, 19 Jan 2016 17:00:25 GMT (envelope-from asomers@FreeBSD.org)
Message-Id: <201601191700.u0JH0P6k061610@repo.freebsd.org>
X-Authentication-Warning: repo.freebsd.org: asomers set sender to
 asomers@FreeBSD.org using -f
From: Alan Somers <asomers@FreeBSD.org>
Date: Tue, 19 Jan 2016 17:00:25 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-head@freebsd.org
Subject: svn commit: r294329 - in
 head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs: . sys
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.20
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for &quot;
 user&quot; and &quot; projects&quot; \)" <svn-src-all.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-all/>
List-Post: <mailto:svn-src-all@freebsd.org>
List-Help: <mailto:svn-src-all-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Tue, 19 Jan 2016 17:00:27 -0000

Author: asomers
Date: Tue Jan 19 17:00:25 2016
New Revision: 294329
URL: https://svnweb.freebsd.org/changeset/base/294329

Log:
  Disallow zvol-backed ZFS pools
  
  Using zvols as backing devices for ZFS pools is fraught with panics and
  deadlocks. For example, attempting to online a missing device in the
  presence of a zvol can cause a panic when vdev_geom tastes the zvol.  Better
  to completely disable vdev_geom from ever opening a zvol. The solution
  relies on setting a thread-local variable during vdev_geom_open, and
  returning EOPNOTSUPP during zvol_open if that thread-local variable is set.
  
  Remove the check for MUTEX_HELD(&zfsdev_state_lock) in zvol_open. Its intent
  was to prevent a recursive mutex acquisition panic. However, the new check
  for the thread-local variable also fixes that problem.
  
  Also, fix a panic in vdev_geom_taste_orphan. For an unknown reason, this
  function was set to panic. But it can occur that a device disappears during
  tasting, and it causes no problems to ignore this departure.
  
  Reviewed by:	delphij
  MFC after:	1 week
  Relnotes:	yes
  Sponsored by:	Spectra Logic Corp
  Differential Revision:	https://reviews.freebsd.org/D4986

Modified:
  head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/vdev_impl.h
  head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_geom.c
  head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c
  head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zvol.c

Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/vdev_impl.h
==============================================================================
--- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/vdev_impl.h	Tue Jan 19 16:18:26 2016	(r294328)
+++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/vdev_impl.h	Tue Jan 19 17:00:25 2016	(r294329)
@@ -367,6 +367,7 @@ extern void vdev_set_min_asize(vdev_t *v
  */
 /* zdb uses this tunable, so it must be declared here to make lint happy. */
 extern int zfs_vdev_cache_size;
+extern uint_t zfs_geom_probe_vdev_key;
 
 #ifdef illumos
 /*

Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_geom.c
==============================================================================
--- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_geom.c	Tue Jan 19 16:18:26 2016	(r294328)
+++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_geom.c	Tue Jan 19 17:00:25 2016	(r294329)
@@ -61,6 +61,13 @@ static int vdev_geom_bio_delete_disable;
 SYSCTL_INT(_vfs_zfs_vdev, OID_AUTO, bio_delete_disable, CTLFLAG_RWTUN,
     &vdev_geom_bio_delete_disable, 0, "Disable BIO_DELETE");
 
+/*
+ * Thread local storage used to indicate when a thread is probing geoms
+ * for their guids.  If NULL, this thread is not tasting geoms.  If non NULL,
+ * it is looking for a replacement for the vdev_t* that is its value.
+ */
+uint_t zfs_geom_probe_vdev_key;
+
 static void
 vdev_geom_set_rotation_rate(vdev_t *vd, struct g_consumer *cp)
 { 
@@ -326,9 +333,8 @@ vdev_geom_io(struct g_consumer *cp, int 
 static void
 vdev_geom_taste_orphan(struct g_consumer *cp)
 {
-
-	KASSERT(1 == 0, ("%s called while tasting %s.", __func__,
-	    cp->provider->name));
+	ZFS_LOG(0, "WARNING: Orphan %s while tasting its VDev GUID.",
+	    cp->provider->name);
 }
 
 static int
@@ -575,7 +581,6 @@ vdev_geom_attach_by_guids(vdev_t *vd)
 	g_topology_assert();
 
 	zgp = g_new_geomf(&zfs_vdev_class, "zfs::vdev::taste");
-	/* This orphan function should be never called. */
 	zgp->orphan = vdev_geom_taste_orphan;
 	zcp = g_new_consumer(zgp);
 
@@ -702,6 +707,9 @@ vdev_geom_open(vdev_t *vd, uint64_t *psi
 	size_t bufsize;
 	int error;
 
+	/* Set the TLS to indicate downstack that we should not access zvols*/
+	VERIFY(tsd_set(zfs_geom_probe_vdev_key, vd) == 0);
+
 	/*
 	 * We must have a pathname, and it must be absolute.
 	 */
@@ -751,6 +759,9 @@ vdev_geom_open(vdev_t *vd, uint64_t *psi
 		}
 	}
 
+	/* Clear the TLS now that tasting is done */
+	VERIFY(tsd_set(zfs_geom_probe_vdev_key, NULL) == 0);
+
 	if (cp == NULL) {
 		ZFS_LOG(1, "Provider %s not found.", vd->vdev_path);
 		error = ENOENT;

Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c
==============================================================================
--- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c	Tue Jan 19 16:18:26 2016	(r294328)
+++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c	Tue Jan 19 17:00:25 2016	(r294329)
@@ -206,6 +206,7 @@ extern void zfs_fini(void);
 uint_t zfs_fsyncer_key;
 extern uint_t rrw_tsd_key;
 static uint_t zfs_allow_log_key;
+extern uint_t zfs_geom_probe_vdev_key;
 
 typedef int zfs_ioc_legacy_func_t(zfs_cmd_t *);
 typedef int zfs_ioc_func_t(const char *, nvlist_t *, nvlist_t *);
@@ -6602,6 +6603,7 @@ zfs__init(void)
 	tsd_create(&zfs_fsyncer_key, NULL);
 	tsd_create(&rrw_tsd_key, rrw_tsd_destroy);
 	tsd_create(&zfs_allow_log_key, zfs_allow_log_destroy);
+	tsd_create(&zfs_geom_probe_vdev_key, NULL);
 
 	printf("ZFS storage pool version: features support (" SPA_VERSION_STRING ")\n");
 	root_mount_rel(zfs_root_token);

Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zvol.c
==============================================================================
--- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zvol.c	Tue Jan 19 16:18:26 2016	(r294328)
+++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zvol.c	Tue Jan 19 17:00:25 2016	(r294329)
@@ -1114,36 +1114,30 @@ zvol_open(struct g_provider *pp, int fla
 		return (err);
 	}
 #else	/* !illumos */
-	boolean_t locked = B_FALSE;
-
-	/*
-	 * Protect against recursively entering spa_namespace_lock
-	 * when spa_open() is used for a pool on a (local) ZVOL(s).
-	 * This is needed since we replaced upstream zfsdev_state_lock
-	 * with spa_namespace_lock in the ZVOL code.
-	 * We are using the same trick as spa_open().
-	 * Note that calls in zvol_first_open which need to resolve
-	 * pool name to a spa object will enter spa_open()
-	 * recursively, but that function already has all the
-	 * necessary protection.
-	 */
-	if (!MUTEX_HELD(&zfsdev_state_lock)) {
-		mutex_enter(&zfsdev_state_lock);
-		locked = B_TRUE;
+	if (tsd_get(zfs_geom_probe_vdev_key) != NULL) {
+		/*
+		 * if zfs_geom_probe_vdev_key is set, that means that zfs is
+		 * attempting to probe geom providers while looking for a
+		 * replacement for a missing VDEV.  In this case, the
+		 * spa_namespace_lock will not be held, but it is still illegal
+		 * to use a zvol as a vdev.  Deadlocks can result if another
+		 * thread has spa_namespace_lock
+		 */
+		return (EOPNOTSUPP);
 	}
 
+	mutex_enter(&zfsdev_state_lock);
+
 	zv = pp->private;
 	if (zv == NULL) {
-		if (locked)
-			mutex_exit(&zfsdev_state_lock);
+		mutex_exit(&zfsdev_state_lock);
 		return (SET_ERROR(ENXIO));
 	}
 
 	if (zv->zv_total_opens == 0) {
 		err = zvol_first_open(zv);
 		if (err) {
-			if (locked)
-				mutex_exit(&zfsdev_state_lock);
+			mutex_exit(&zfsdev_state_lock);
 			return (err);
 		}
 		pp->mediasize = zv->zv_volsize;
@@ -1177,8 +1171,7 @@ zvol_open(struct g_provider *pp, int fla
 	mutex_exit(&zfsdev_state_lock);
 #else
 	zv->zv_total_opens += count;
-	if (locked)
-		mutex_exit(&zfsdev_state_lock);
+	mutex_exit(&zfsdev_state_lock);
 #endif
 
 	return (err);
@@ -1188,8 +1181,7 @@ out:
 #ifdef illumos
 	mutex_exit(&zfsdev_state_lock);
 #else
-	if (locked)
-		mutex_exit(&zfsdev_state_lock);
+	mutex_exit(&zfsdev_state_lock);
 #endif
 	return (err);
 }

From owner-svn-src-all@freebsd.org  Tue Jan 19 17:01:41 2016
Return-Path: <owner-svn-src-all@freebsd.org>
Delivered-To: svn-src-all@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id 45B83A89C1A;
 Tue, 19 Jan 2016 17:01:41 +0000 (UTC)
 (envelope-from rysto32@gmail.com)
Received: from mail-io0-x22d.google.com (mail-io0-x22d.google.com
 [IPv6:2607:f8b0:4001:c06::22d])
 (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits))
 (Client CN "smtp.gmail.com",
 Issuer "Google Internet Authority G2" (verified OK))
 by mx1.freebsd.org (Postfix) with ESMTPS id 0B11918BD;
 Tue, 19 Jan 2016 17:01:41 +0000 (UTC)
 (envelope-from rysto32@gmail.com)
Received: by mail-io0-x22d.google.com with SMTP id g73so396048965ioe.3;
 Tue, 19 Jan 2016 09:01:41 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;
 h=mime-version:in-reply-to:references:date:message-id:subject:from:to
 :cc:content-type;
 bh=02t3+7PiYzRbGLsJv1e3NT0G56pvw8/SHA+kRsFe+lY=;
 b=uCrHAEW/WOnWYAwaHTYKT4EaRzI8hIr/oi/2AJdJJ+9NdjPuhSgfAeW04ga/i+wOoz
 8sRixhAWZXOq4096KPDwcZ/+IvCaTgM0kg/hpzvebDQz7c8vh+Emwq32El+kt1a8RFUS
 PTrgmEYipnuousUha/pSInjiyjilNKGWKev6Ut1J1wXOYt3PGAemO+X8nqHkRu0fqkoO
 rEHzLTGCxtTMzIB6Zu7RcyNnu4L2bfLVdLaf8uSDn//qu0j9pyoIFfZ94hK32pFJpWrD
 9346fytX2zfFKbwd1kwjebClj1ylLuh9N3OqdrPP44Abm5Pc6cA7kwd54jdislXu/wRk
 L7PA==
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:date
 :message-id:subject:from:to:cc:content-type;
 bh=02t3+7PiYzRbGLsJv1e3NT0G56pvw8/SHA+kRsFe+lY=;
 b=OanVttUvL3hqp2CEccKywvXcXPrJa42IBmkXvxdvIpEEzSNAQ77vhuG9Tgrevnr5is
 WLRTuhF8IYYPunGU0LkwsyM2f3MLTVcISnZKRAs6kk3VTELhS+kvRmIx35vh4Luq8r92
 3PN5HkLBdXrTRF03OSBaPaUd+54vDqWKKToYlf+VH57qAefMR039mdYi+0mSZZC5N3K4
 NbPSykyC0jqrY1RHYuPcMBXmS8CFXpTvF7jmkNxUbTsAS/ptSmv0LisyLbHRT7MfOcEU
 yJS4f1x36l/GGw5KdX4k2YgzlKOMcIdTpkPmd+Q+72coCRGstoNV2t3/6ywJPPhq6+o1
 09rg==
X-Gm-Message-State: ALoCoQkBFMth3uwswgJ+R/WcCB86IEBg5JH3OFwJMf9dZgp5UiDg+o2xNxNgoH8LJX5+tY6PAX6qaMXvhNlLROGmA5qqhQVtmQ==
MIME-Version: 1.0
X-Received: by 10.107.153.140 with SMTP id b134mr28753113ioe.113.1453222900426; 
 Tue, 19 Jan 2016 09:01:40 -0800 (PST)
Received: by 10.107.178.193 with HTTP; Tue, 19 Jan 2016 09:01:40 -0800 (PST)
In-Reply-To: <569E6A38.8080108@selasky.org>
References: <201601191533.u0JFXSxf037804@repo.freebsd.org>
 <CAFMmRNz3uXim3H3-sGuBUBs45Jy8p260ywothgp4iFkUcnvnEw@mail.gmail.com>
 <569E6A38.8080108@selasky.org>
Date: Tue, 19 Jan 2016 12:01:40 -0500
Message-ID: <CAFMmRNx3zC=mz=TC2Aq5==a5vh0Fqzv1domrCL2uUHnjybZSkQ@mail.gmail.com>
Subject: Re: svn commit: r294327 - in head/sys: dev/cxgb dev/cxgbe dev/e1000
 dev/hyperv/netvsc dev/ixgbe dev/mxge netinet sys
From: Ryan Stone <rysto32@gmail.com>
To: Hans Petter Selasky <hps@selasky.org>
Cc: "src-committers@freebsd.org" <src-committers@freebsd.org>, 
 "svn-src-all@freebsd.org" <svn-src-all@freebsd.org>, 
 "svn-src-head@freebsd.org" <svn-src-head@freebsd.org>
Content-Type: text/plain; charset=UTF-8
X-Content-Filtered-By: Mailman/MimeDel 2.1.20
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.20
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for &quot;
 user&quot; and &quot; projects&quot; \)" <svn-src-all.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-all/>
List-Post: <mailto:svn-src-all@freebsd.org>
List-Help: <mailto:svn-src-all-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Tue, 19 Jan 2016 17:01:41 -0000

libkern's qsort() is a quicksort implementation. AFAICT it has the worst
case behaviour that I describe.

On Tue, Jan 19, 2016 at 11:54 AM, Hans Petter Selasky <hps@selasky.org>
wrote:

> On 01/19/16 17:09, Ryan Stone wrote:
>
>> On Tue, Jan 19, 2016 at 10:33 AM, Hans Petter Selasky <
>> hselasky@freebsd.org>
>> wrote:
>>
>>
>>> +       qsort(lc->lro_mbuf_data, lc->lro_mbuf_count, sizeof(struct mbuf
>>> *),
>>> +           &tcp_lro_mbuf_compare_header);
>>>
>>>
>> In the worst case, qsort() can take O(n**2) time and consume O(n) stack
>> space.  Is there a DOS concern here?
>>
>>
> Hi Ryan,
>
> Is this the case for the qsort() we have in the FreeBSD kernel?
>
> There are other sorting algorithms which can be used instead of qsort()
> which consume O(n * log(n)) time and O(1) stack, but requires a power of
> two set of elements to sort.
>
> --HPS
>

From owner-svn-src-all@freebsd.org  Tue Jan 19 17:08:57 2016
Return-Path: <owner-svn-src-all@freebsd.org>
Delivered-To: svn-src-all@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id B3903A89EA6;
 Tue, 19 Jan 2016 17:08:57 +0000 (UTC) (envelope-from lidl@pix.net)
Received: from hydra.pix.net (hydra.pix.net [IPv6:2001:470:e254:10::4])
 (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
 (Client CN "mail.pix.net", Issuer "Pix.Com Technologies,
 LLC CA" (not verified))
 by mx1.freebsd.org (Postfix) with ESMTPS id 6817C1F51;
 Tue, 19 Jan 2016 17:08:57 +0000 (UTC) (envelope-from lidl@pix.net)
Received: from torb.pix.net ([IPv6:2001:470:e254:11:52:fed0:33f2:51b0])
 (authenticated bits=0)
 by hydra.pix.net (8.15.2/8.15.2) with ESMTPA id u0JH8mW3062529;
 Tue, 19 Jan 2016 12:08:55 -0500 (EST) (envelope-from lidl@pix.net)
X-Authentication-Warning: hydra.pix.net: Host
 [IPv6:2001:470:e254:11:52:fed0:33f2:51b0] claimed to be torb.pix.net
Subject: Re: svn commit: r294329 - in
 head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs: . sys
To: Alan Somers <asomers@FreeBSD.org>, src-committers@freebsd.org,
 svn-src-all@freebsd.org, svn-src-head@freebsd.org
References: <201601191700.u0JH0P6k061610@repo.freebsd.org>
From: Kurt Lidl <lidl@pix.net>
Message-ID: <569E6DA0.9010300@pix.net>
Date: Tue, 19 Jan 2016 12:08:48 -0500
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.11; rv:38.0)
 Gecko/20100101 Thunderbird/38.5.1
MIME-Version: 1.0
In-Reply-To: <201601191700.u0JH0P6k061610@repo.freebsd.org>
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: 7bit
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.20
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for &quot;
 user&quot; and &quot; projects&quot; \)" <svn-src-all.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-all/>
List-Post: <mailto:svn-src-all@freebsd.org>
List-Help: <mailto:svn-src-all-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Tue, 19 Jan 2016 17:08:57 -0000

Removing the ability to run different zpools on top of a zvol is
a significant reduction in functionality of the entire system, and a 
huge violation of the POLA.

At the very least, can you not add a sysctl that allows the
dangerous behavior (even if it defaults to off)?  Myself
and certainly others rely on having being able to use a zpool
installed into a zvol for hosting bhyve virtual machines.

I've managed to deadlock the system when experimenting with this,
but for the normal course of operations, it works just fine.

-Kurt

On 1/19/16 12:00 PM, Alan Somers wrote:
> Author: asomers
> Date: Tue Jan 19 17:00:25 2016
> New Revision: 294329
> URL: https://svnweb.freebsd.org/changeset/base/294329
>
> Log:
>    Disallow zvol-backed ZFS pools
>
>    Using zvols as backing devices for ZFS pools is fraught with panics and
>    deadlocks. For example, attempting to online a missing device in the
>    presence of a zvol can cause a panic when vdev_geom tastes the zvol.  Better
>    to completely disable vdev_geom from ever opening a zvol. The solution
>    relies on setting a thread-local variable during vdev_geom_open, and
>    returning EOPNOTSUPP during zvol_open if that thread-local variable is set.
>
>    Remove the check for MUTEX_HELD(&zfsdev_state_lock) in zvol_open. Its intent
>    was to prevent a recursive mutex acquisition panic. However, the new check
>    for the thread-local variable also fixes that problem.
>
>    Also, fix a panic in vdev_geom_taste_orphan. For an unknown reason, this
>    function was set to panic. But it can occur that a device disappears during
>    tasting, and it causes no problems to ignore this departure.
>
>    Reviewed by:	delphij
>    MFC after:	1 week
>    Relnotes:	yes
>    Sponsored by:	Spectra Logic Corp
>    Differential Revision:	https://reviews.freebsd.org/D4986
>
> Modified:
>    head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/vdev_impl.h
>    head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_geom.c
>    head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c
>    head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zvol.c

[diff truncated]



From owner-svn-src-all@freebsd.org  Tue Jan 19 17:20:09 2016
Return-Path: <owner-svn-src-all@freebsd.org>
Delivered-To: svn-src-all@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id C77BBA865C4;
 Tue, 19 Jan 2016 17:20:09 +0000 (UTC) (envelope-from des@FreeBSD.org)
Received: from repo.freebsd.org (repo.freebsd.org
 [IPv6:2610:1c1:1:6068::e6a:0])
 (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
 (Client did not present a certificate)
 by mx1.freebsd.org (Postfix) with ESMTPS id 5EC54184A;
 Tue, 19 Jan 2016 17:20:09 +0000 (UTC) (envelope-from des@FreeBSD.org)
Received: from repo.freebsd.org ([127.0.1.37])
 by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u0JHK86G067362;
 Tue, 19 Jan 2016 17:20:08 GMT (envelope-from des@FreeBSD.org)
Received: (from des@localhost)
 by repo.freebsd.org (8.15.2/8.15.2/Submit) id u0JHK8gG067358;
 Tue, 19 Jan 2016 17:20:08 GMT (envelope-from des@FreeBSD.org)
Message-Id: <201601191720.u0JHK8gG067358@repo.freebsd.org>
X-Authentication-Warning: repo.freebsd.org: des set sender to des@FreeBSD.org
 using -f
From: =?UTF-8?Q?Dag-Erling_Sm=c3=b8rgrav?= <des@FreeBSD.org>
Date: Tue, 19 Jan 2016 17:20:08 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-head@freebsd.org
Subject: svn commit: r294330 - head/crypto/openssh
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.20
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for &quot;
 user&quot; and &quot; projects&quot; \)" <svn-src-all.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-all/>
List-Post: <mailto:svn-src-all@freebsd.org>
List-Help: <mailto:svn-src-all-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Tue, 19 Jan 2016 17:20:10 -0000

Author: des
Date: Tue Jan 19 17:20:07 2016
New Revision: 294330
URL: https://svnweb.freebsd.org/changeset/base/294330

Log:
  Now that we have local modifications in configure.ac and configure, run
  autoheader and autoconf to avoid having to patch configure manually.

Modified:
  head/crypto/openssh/config.h
  head/crypto/openssh/config.h.in
  head/crypto/openssh/configure
  head/crypto/openssh/freebsd-configure.sh

Modified: head/crypto/openssh/config.h
==============================================================================
--- head/crypto/openssh/config.h	Tue Jan 19 17:00:25 2016	(r294329)
+++ head/crypto/openssh/config.h	Tue Jan 19 17:20:07 2016	(r294330)
@@ -1145,8 +1145,8 @@
 /* Define to 1 if you have the <sys/bsdtty.h> header file. */
 /* #undef HAVE_SYS_BSDTTY_H */
 
-/* Define to 1 if you have the <sys/capability.h> header file. */
-/* #undef HAVE_SYS_CAPABILITY_H */
+/* Define to 1 if you have the <sys/capsicum.h> header file. */
+#define HAVE_SYS_CAPSICUM_H 1
 
 /* Define to 1 if you have the <sys/cdefs.h> header file. */
 #define HAVE_SYS_CDEFS_H 1
@@ -1690,6 +1690,11 @@
 /* Define if xauth is found in your path */
 /* #undef XAUTH_PATH */
 
+/* Enable large inode numbers on Mac OS X 10.5.  */
+#ifndef _DARWIN_USE_64_BIT_INODE
+# define _DARWIN_USE_64_BIT_INODE 1
+#endif
+
 /* Number of bits in a file offset, on hosts where this is settable. */
 /* #undef _FILE_OFFSET_BITS */
 

Modified: head/crypto/openssh/config.h.in
==============================================================================
--- head/crypto/openssh/config.h.in	Tue Jan 19 17:00:25 2016	(r294329)
+++ head/crypto/openssh/config.h.in	Tue Jan 19 17:20:07 2016	(r294330)
@@ -1144,8 +1144,8 @@
 /* Define to 1 if you have the <sys/bsdtty.h> header file. */
 #undef HAVE_SYS_BSDTTY_H
 
-/* Define to 1 if you have the <sys/capability.h> header file. */
-#undef HAVE_SYS_CAPABILITY_H
+/* Define to 1 if you have the <sys/capsicum.h> header file. */
+#undef HAVE_SYS_CAPSICUM_H
 
 /* Define to 1 if you have the <sys/cdefs.h> header file. */
 #undef HAVE_SYS_CDEFS_H
@@ -1689,6 +1689,11 @@
 /* Define if xauth is found in your path */
 #undef XAUTH_PATH
 
+/* Enable large inode numbers on Mac OS X 10.5.  */
+#ifndef _DARWIN_USE_64_BIT_INODE
+# define _DARWIN_USE_64_BIT_INODE 1
+#endif
+
 /* Number of bits in a file offset, on hosts where this is settable. */
 #undef _FILE_OFFSET_BITS
 

Modified: head/crypto/openssh/configure
==============================================================================
--- head/crypto/openssh/configure	Tue Jan 19 17:00:25 2016	(r294329)
+++ head/crypto/openssh/configure	Tue Jan 19 17:20:07 2016	(r294330)
@@ -1,14 +1,12 @@
 #! /bin/sh
 # From configure.ac Revision: 1.583 .
 # Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.68 for OpenSSH Portable.
+# Generated by GNU Autoconf 2.69 for OpenSSH Portable.
 #
 # Report bugs to <openssh-unix-dev@mindrot.org>.
 #
 #
-# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
-# 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software
-# Foundation, Inc.
+# Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
 #
 #
 # This configure script is free software; the Free Software Foundation
@@ -137,6 +135,31 @@ export LANGUAGE
 # CDPATH.
 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
 
+# Use a proper internal environment variable to ensure we don't fall
+  # into an infinite loop, continuously re-executing ourselves.
+  if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then
+    _as_can_reexec=no; export _as_can_reexec;
+    # We cannot yet assume a decent shell, so we have to provide a
+# neutralization value for shells without unset; and this also
+# works around shells that cannot unset nonexistent variables.
+# Preserve -v and -x to the replacement shell.
+BASH_ENV=/dev/null
+ENV=/dev/null
+(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
+case $- in # ((((
+  *v*x* | *x*v* ) as_opts=-vx ;;
+  *v* ) as_opts=-v ;;
+  *x* ) as_opts=-x ;;
+  * ) as_opts= ;;
+esac
+exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
+# Admittedly, this is quite paranoid, since all the known shells bail
+# out after a failed `exec'.
+$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
+as_fn_exit 255
+  fi
+  # We don't want this to propagate to other subprocesses.
+          { _as_can_reexec=; unset _as_can_reexec;}
 if test "x$CONFIG_SHELL" = x; then
   as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
   emulate sh
@@ -170,7 +193,8 @@ if ( set x; as_fn_ret_success y && test 
 else
   exitcode=1; echo positional parameters were not saved.
 fi
-test x\$exitcode = x0 || exit 1"
+test x\$exitcode = x0 || exit 1
+test -x / || exit 1"
   as_suggested="  as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
   as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
   eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
@@ -215,21 +239,25 @@ IFS=$as_save_IFS
 
 
       if test "x$CONFIG_SHELL" != x; then :
-  # We cannot yet assume a decent shell, so we have to provide a
-	# neutralization value for shells without unset; and this also
-	# works around shells that cannot unset nonexistent variables.
-	# Preserve -v and -x to the replacement shell.
-	BASH_ENV=/dev/null
-	ENV=/dev/null
-	(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
-	export CONFIG_SHELL
-	case $- in # ((((
-	  *v*x* | *x*v* ) as_opts=-vx ;;
-	  *v* ) as_opts=-v ;;
-	  *x* ) as_opts=-x ;;
-	  * ) as_opts= ;;
-	esac
-	exec "$CONFIG_SHELL" $as_opts "$as_myself" ${1+"$@"}
+  export CONFIG_SHELL
+             # We cannot yet assume a decent shell, so we have to provide a
+# neutralization value for shells without unset; and this also
+# works around shells that cannot unset nonexistent variables.
+# Preserve -v and -x to the replacement shell.
+BASH_ENV=/dev/null
+ENV=/dev/null
+(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
+case $- in # ((((
+  *v*x* | *x*v* ) as_opts=-vx ;;
+  *v* ) as_opts=-v ;;
+  *x* ) as_opts=-x ;;
+  * ) as_opts= ;;
+esac
+exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
+# Admittedly, this is quite paranoid, since all the known shells bail
+# out after a failed `exec'.
+$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
+exit 255
 fi
 
     if test x$as_have_required = xno; then :
@@ -332,6 +360,14 @@ $as_echo X"$as_dir" |
 
 
 } # as_fn_mkdir_p
+
+# as_fn_executable_p FILE
+# -----------------------
+# Test if FILE is an executable regular file.
+as_fn_executable_p ()
+{
+  test -f "$1" && test -x "$1"
+} # as_fn_executable_p
 # as_fn_append VAR VALUE
 # ----------------------
 # Append the text in VALUE to the end of the definition contained in VAR. Take
@@ -453,6 +489,10 @@ as_cr_alnum=$as_cr_Letters$as_cr_digits
   chmod +x "$as_me.lineno" ||
     { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
 
+  # If we had to re-execute with $CONFIG_SHELL, we're ensured to have
+  # already done that, so ensure we don't try to do so again and fall
+  # in an infinite loop.  This has already happened in practice.
+  _as_can_reexec=no; export _as_can_reexec
   # Don't try to exec as it changes $[0], causing all sort of problems
   # (the dirname of $[0] is not the place where we might find the
   # original and so on.  Autoconf is especially sensitive to this).
@@ -487,16 +527,16 @@ if (echo >conf$$.file) 2>/dev/null; then
     # ... but there are two gotchas:
     # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
     # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
-    # In both cases, we have to default to `cp -p'.
+    # In both cases, we have to default to `cp -pR'.
     ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
-      as_ln_s='cp -p'
+      as_ln_s='cp -pR'
   elif ln conf$$.file conf$$ 2>/dev/null; then
     as_ln_s=ln
   else
-    as_ln_s='cp -p'
+    as_ln_s='cp -pR'
   fi
 else
-  as_ln_s='cp -p'
+  as_ln_s='cp -pR'
 fi
 rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
 rmdir conf$$.dir 2>/dev/null
@@ -508,28 +548,8 @@ else
   as_mkdir_p=false
 fi
 
-if test -x / >/dev/null 2>&1; then
-  as_test_x='test -x'
-else
-  if ls -dL / >/dev/null 2>&1; then
-    as_ls_L_option=L
-  else
-    as_ls_L_option=
-  fi
-  as_test_x='
-    eval sh -c '\''
-      if test -d "$1"; then
-	test -d "$1/.";
-      else
-	case $1 in #(
-	-*)set "./$1";;
-	esac;
-	case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
-	???[sx]*):;;*)false;;esac;fi
-    '\'' sh
-  '
-fi
-as_executable_p=$as_test_x
+as_test_x='test -x'
+as_executable_p=as_fn_executable_p
 
 # Sed expression to map a string onto a valid CPP name.
 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
@@ -1228,8 +1248,6 @@ target=$target_alias
 if test "x$host_alias" != x; then
   if test "x$build_alias" = x; then
     cross_compiling=maybe
-    $as_echo "$as_me: WARNING: if you wanted to set the --build type, don't use --host.
-    If a cross compiler is detected then cross compile mode will be used" >&2
   elif test "x$build_alias" != "x$host_alias"; then
     cross_compiling=yes
   fi
@@ -1523,9 +1541,9 @@ test -n "$ac_init_help" && exit $ac_stat
 if $ac_init_version; then
   cat <<\_ACEOF
 OpenSSH configure Portable
-generated by GNU Autoconf 2.68
+generated by GNU Autoconf 2.69
 
-Copyright (C) 2010 Free Software Foundation, Inc.
+Copyright (C) 2012 Free Software Foundation, Inc.
 This configure script is free software; the Free Software Foundation
 gives unlimited permission to copy, distribute and modify it.
 _ACEOF
@@ -1757,7 +1775,7 @@ $as_echo "$ac_try_echo"; } >&5
 	 test ! -s conftest.err
        } && test -s conftest$ac_exeext && {
 	 test "$cross_compiling" = yes ||
-	 $as_test_x conftest$ac_exeext
+	 test -x conftest$ac_exeext
        }; then :
   ac_retval=0
 else
@@ -2005,7 +2023,8 @@ int
 main ()
 {
 static int test_array [1 - 2 * !(($2) >= 0)];
-test_array [0] = 0
+test_array [0] = 0;
+return test_array [0];
 
   ;
   return 0;
@@ -2021,7 +2040,8 @@ int
 main ()
 {
 static int test_array [1 - 2 * !(($2) <= $ac_mid)];
-test_array [0] = 0
+test_array [0] = 0;
+return test_array [0];
 
   ;
   return 0;
@@ -2047,7 +2067,8 @@ int
 main ()
 {
 static int test_array [1 - 2 * !(($2) < 0)];
-test_array [0] = 0
+test_array [0] = 0;
+return test_array [0];
 
   ;
   return 0;
@@ -2063,7 +2084,8 @@ int
 main ()
 {
 static int test_array [1 - 2 * !(($2) >= $ac_mid)];
-test_array [0] = 0
+test_array [0] = 0;
+return test_array [0];
 
   ;
   return 0;
@@ -2097,7 +2119,8 @@ int
 main ()
 {
 static int test_array [1 - 2 * !(($2) <= $ac_mid)];
-test_array [0] = 0
+test_array [0] = 0;
+return test_array [0];
 
   ;
   return 0;
@@ -2227,7 +2250,7 @@ This file contains any messages produced
 running configure, to aid debugging if configure makes a mistake.
 
 It was created by OpenSSH $as_me Portable, which was
-generated by GNU Autoconf 2.68.  Invocation command line was
+generated by GNU Autoconf 2.69.  Invocation command line was
 
   $ $0 $@
 
@@ -2607,7 +2630,7 @@ do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
     for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
     ac_cv_prog_CC="${ac_tool_prefix}gcc"
     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
@@ -2647,7 +2670,7 @@ do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
     for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
     ac_cv_prog_ac_ct_CC="gcc"
     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
@@ -2700,7 +2723,7 @@ do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
     for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
     ac_cv_prog_CC="${ac_tool_prefix}cc"
     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
@@ -2741,7 +2764,7 @@ do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
     for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
     if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
        ac_prog_rejected=yes
        continue
@@ -2799,7 +2822,7 @@ do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
     for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
     ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
@@ -2843,7 +2866,7 @@ do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
     for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
     ac_cv_prog_ac_ct_CC="$ac_prog"
     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
@@ -3289,8 +3312,7 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_
 /* end confdefs.h.  */
 #include <stdarg.h>
 #include <stdio.h>
-#include <sys/types.h>
-#include <sys/stat.h>
+struct stat;
 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
 struct buf { int x; };
 FILE * (*rcsopen) (struct buf *, struct stat *, int);
@@ -3630,7 +3652,7 @@ do
     for ac_prog in grep ggrep; do
     for ac_exec_ext in '' $ac_executable_extensions; do
       ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
-      { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
+      as_fn_executable_p "$ac_path_GREP" || continue
 # Check for GNU ac_path_GREP and select it if it is found.
   # Check for GNU $ac_path_GREP
 case `"$ac_path_GREP" --version 2>&1` in
@@ -3696,7 +3718,7 @@ do
     for ac_prog in egrep; do
     for ac_exec_ext in '' $ac_executable_extensions; do
       ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
-      { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
+      as_fn_executable_p "$ac_path_EGREP" || continue
 # Check for GNU ac_path_EGREP and select it if it is found.
   # Check for GNU $ac_path_EGREP
 case `"$ac_path_EGREP" --version 2>&1` in
@@ -4117,7 +4139,7 @@ do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
     for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
     ac_cv_prog_AWK="$ac_prog"
     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
@@ -4295,7 +4317,7 @@ do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
     for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
     ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
@@ -4335,7 +4357,7 @@ do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
     for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
     ac_cv_prog_ac_ct_RANLIB="ranlib"
     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
@@ -4407,7 +4429,7 @@ case $as_dir/ in #((
     # by default.
     for ac_prog in ginstall scoinst install; do
       for ac_exec_ext in '' $ac_executable_extensions; do
-	if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then
+	if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
 	  if test $ac_prog = install &&
 	    grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
 	    # AIX install.  It has an incompatible calling convention.
@@ -4482,7 +4504,7 @@ do
     for ac_prog in egrep; do
     for ac_exec_ext in '' $ac_executable_extensions; do
       ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
-      { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
+      as_fn_executable_p "$ac_path_EGREP" || continue
 # Check for GNU ac_path_EGREP and select it if it is found.
   # Check for GNU $ac_path_EGREP
 case `"$ac_path_EGREP" --version 2>&1` in
@@ -4548,7 +4570,7 @@ do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
     for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
     ac_cv_path_AR="$as_dir/$ac_word$ac_exec_ext"
     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
@@ -4588,7 +4610,7 @@ do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
     for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
     ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
@@ -4628,7 +4650,7 @@ do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
     for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
     ac_cv_path_KILL="$as_dir/$ac_word$ac_exec_ext"
     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
@@ -4670,7 +4692,7 @@ do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
     for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
     ac_cv_path_PERL="$as_dir/$ac_word$ac_exec_ext"
     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
@@ -4713,7 +4735,7 @@ do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
     for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
     ac_cv_path_SED="$as_dir/$ac_word$ac_exec_ext"
     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
@@ -4754,7 +4776,7 @@ do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
     for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
     ac_cv_path_ENT="$as_dir/$ac_word$ac_exec_ext"
     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
@@ -4795,7 +4817,7 @@ do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
     for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
     ac_cv_path_TEST_MINUS_S_SH="$as_dir/$ac_word$ac_exec_ext"
     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
@@ -4835,7 +4857,7 @@ do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
     for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
     ac_cv_path_TEST_MINUS_S_SH="$as_dir/$ac_word$ac_exec_ext"
     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
@@ -4875,7 +4897,7 @@ do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
     for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
     ac_cv_path_TEST_MINUS_S_SH="$as_dir/$ac_word$ac_exec_ext"
     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
@@ -4915,7 +4937,7 @@ do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
     for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
     ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
@@ -4955,7 +4977,7 @@ do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
     for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
     ac_cv_path_GROFF="$as_dir/$ac_word$ac_exec_ext"
     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
@@ -4995,7 +5017,7 @@ do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
     for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
     ac_cv_path_NROFF="$as_dir/$ac_word$ac_exec_ext"
     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
@@ -5035,7 +5057,7 @@ do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
     for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
     ac_cv_path_MANDOC="$as_dir/$ac_word$ac_exec_ext"
     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
@@ -5091,7 +5113,7 @@ do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
     for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
     ac_cv_path_PATH_GROUPADD_PROG="$as_dir/$ac_word$ac_exec_ext"
     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
@@ -5132,7 +5154,7 @@ do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
     for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
     ac_cv_path_PATH_USERADD_PROG="$as_dir/$ac_word$ac_exec_ext"
     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
@@ -5171,7 +5193,7 @@ do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
     for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
     ac_cv_prog_MAKE_PACKAGE_SUPPORTED="yes"
     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
@@ -5398,6 +5420,8 @@ _ACEOF
 esac
 rm -rf conftest*
   fi
+
+
 fi
 
 
@@ -5432,7 +5456,7 @@ do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
     for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
     ac_cv_path_LOGIN_PROGRAM_FALLBACK="$as_dir/$ac_word$ac_exec_ext"
     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
@@ -5480,7 +5504,7 @@ do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
     for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
     ac_cv_path_PATH_PASSWD_PROG="$as_dir/$ac_word$ac_exec_ext"
     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
@@ -9878,7 +9902,7 @@ do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
     for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
     ac_cv_path_PKGCONFIG="$as_dir/$ac_word$ac_exec_ext"
     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
@@ -9921,7 +9945,7 @@ do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
     for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
     ac_cv_path_ac_pt_PKGCONFIG="$as_dir/$ac_word$ac_exec_ext"
     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
@@ -16685,7 +16709,7 @@ do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
     for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
     ac_cv_path_KRB5CONF="$as_dir/$ac_word$ac_exec_ext"
     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
@@ -17303,7 +17327,7 @@ do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
     for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
     ac_cv_path_xauth_path="$as_dir/$ac_word$ac_exec_ext"
     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
@@ -17586,7 +17610,7 @@ do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
     for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
     ac_cv_path_NROFF="$as_dir/$ac_word$ac_exec_ext"
     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
@@ -18842,16 +18866,16 @@ if (echo >conf$$.file) 2>/dev/null; then
     # ... but there are two gotchas:
     # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
     # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
-    # In both cases, we have to default to `cp -p'.
+    # In both cases, we have to default to `cp -pR'.
     ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
-      as_ln_s='cp -p'
+      as_ln_s='cp -pR'
   elif ln conf$$.file conf$$ 2>/dev/null; then
     as_ln_s=ln
   else
-    as_ln_s='cp -p'
+    as_ln_s='cp -pR'
   fi
 else
-  as_ln_s='cp -p'
+  as_ln_s='cp -pR'
 fi
 rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
 rmdir conf$$.dir 2>/dev/null
@@ -18911,28 +18935,16 @@ else
   as_mkdir_p=false
 fi
 
-if test -x / >/dev/null 2>&1; then
-  as_test_x='test -x'
-else
-  if ls -dL / >/dev/null 2>&1; then
-    as_ls_L_option=L
-  else
-    as_ls_L_option=
-  fi
-  as_test_x='
-    eval sh -c '\''
-      if test -d "$1"; then
-	test -d "$1/.";
-      else
-	case $1 in #(
-	-*)set "./$1";;
-	esac;
-	case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
-	???[sx]*):;;*)false;;esac;fi
-    '\'' sh
-  '
-fi
-as_executable_p=$as_test_x
+
+# as_fn_executable_p FILE
+# -----------------------
+# Test if FILE is an executable regular file.
+as_fn_executable_p ()
+{
+  test -f "$1" && test -x "$1"
+} # as_fn_executable_p
+as_test_x='test -x'
+as_executable_p=as_fn_executable_p
 
 # Sed expression to map a string onto a valid CPP name.
 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
@@ -18954,7 +18966,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_wri
 # values after options handling.
 ac_log="
 This file was extended by OpenSSH $as_me Portable, which was
-generated by GNU Autoconf 2.68.  Invocation command line was
+generated by GNU Autoconf 2.69.  Invocation command line was
 
   CONFIG_FILES    = $CONFIG_FILES
   CONFIG_HEADERS  = $CONFIG_HEADERS
@@ -19016,10 +19028,10 @@ cat >>$CONFIG_STATUS <<_ACEOF || ac_writ
 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
 ac_cs_version="\\
 OpenSSH config.status Portable
-configured by $0, generated by GNU Autoconf 2.68,
+configured by $0, generated by GNU Autoconf 2.69,
   with options \\"\$ac_cs_config\\"
 
-Copyright (C) 2010 Free Software Foundation, Inc.
+Copyright (C) 2012 Free Software Foundation, Inc.
 This config.status script is free software; the Free Software Foundation
 gives unlimited permission to copy, distribute and modify it."
 
@@ -19109,7 +19121,7 @@ fi
 _ACEOF
 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
 if \$ac_cs_recheck; then
-  set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
+  set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
   shift
   \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
   CONFIG_SHELL='$SHELL'

Modified: head/crypto/openssh/freebsd-configure.sh
==============================================================================
--- head/crypto/openssh/freebsd-configure.sh	Tue Jan 19 17:00:25 2016	(r294329)
+++ head/crypto/openssh/freebsd-configure.sh	Tue Jan 19 17:20:07 2016	(r294330)
@@ -19,6 +19,10 @@ set -e
 export CC=$(echo ".include <bsd.lib.mk>" | make -f /dev/stdin -VCC)
 export CPP=$(echo ".include <bsd.lib.mk>" | make -f /dev/stdin -VCPP)
 
+# regenerate configure and config.h.in
+autoheader
+autoconf
+
 # generate config.h with krb5 and stash it
 sh configure $configure_args --with-kerberos5
 mv config.log config.log.orig

From owner-svn-src-all@freebsd.org  Tue Jan 19 17:20:39 2016
Return-Path: <owner-svn-src-all@freebsd.org>
Delivered-To: svn-src-all@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id 175E3A8662F;
 Tue, 19 Jan 2016 17:20:39 +0000 (UTC)
 (envelope-from asomers@gmail.com)
Received: from mail-ob0-x232.google.com (mail-ob0-x232.google.com
 [IPv6:2607:f8b0:4003:c01::232])
 (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits))
 (Client CN "smtp.gmail.com",
 Issuer "Google Internet Authority G2" (verified OK))
 by mx1.freebsd.org (Postfix) with ESMTPS id D26A31A0D;
 Tue, 19 Jan 2016 17:20:38 +0000 (UTC)
 (envelope-from asomers@gmail.com)
Received: by mail-ob0-x232.google.com with SMTP id is5so192556492obc.0;
 Tue, 19 Jan 2016 09:20:38 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;
 h=mime-version:sender:in-reply-to:references:date:message-id:subject
 :from:to:cc:content-type;
 bh=9mQl9TcUYIl0+x2VAXpY2YjizeYuoUd0A49Xlmfe+Mk=;
 b=c4DvgQ+7lDnLL96QaDcSnZxGluKvZD2qKzjWcdqhSQOosHyOJjvkB8gP+GH9oQiat/
 qf0KLFk6J8fv1fyWMlJeRuvefHwDRPC+No7npcuFM/Ik9Mh1UafaImpPuuuREfiqGm9e
 zHkp42LeUI/s+aMqmn2Srmd3bSuevl1t15haqnuS+TBkYefWGgBWrFyYjux6xPqyjr7f
 b5mPuyKArbR0s65ReNZ+ZsNhlamCisVSoMF7+ITjWoFvvm7BJp19jG4+jsMNwOawBBqy
 75ORW5HPfcqFuywxF+9gP1oAQ0dhlu5VYK1fiDvB9YeP7FiOcYO9sciL86nvNrlkJDdB
 gpfg==
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:date
 :message-id:subject:from:to:cc:content-type;
 bh=9mQl9TcUYIl0+x2VAXpY2YjizeYuoUd0A49Xlmfe+Mk=;
 b=KLbl36ar4qN5T8xIc/dmFxFm+N4oTXxkocMXO77DBu0s1vLjPMRHOpWILFD9jMoMtD
 y/Rhc+wcAortEQ8whKndpgxBPHCtKbxxL67Xti12rHk69wDKkg3/ICpUPu096XzjTmoF
 JGfjC/ZqVW0CCVCZ6k3kTYBcHwj15SATV71O7+XLMaIFDsk8HtzmJhwQgCmW/IxgaHsv
 o3gWr4NqI8MDQmPgGpeuHlRO4d2tfMU9ivumh/F5evk3SRwpCvDgo0YXTZox49cuI88M
 JcM9ZNpOUjs/j21CPSdBa116C0SlQoGOxrM3Q69f3G5uZRp4AR0OfRtdYlJ5HO7Xvffe
 mIJg==
X-Gm-Message-State: AG10YOTMi7IpeSJfotY7iZd+v7339jPaCXjVYWFG3lzCQfGkvLf/hnqgI3gmdasoATl8oAoXEC3pRgUaSeP9rw==
MIME-Version: 1.0
X-Received: by 10.182.213.71 with SMTP id nq7mr13532917obc.65.1453224038183;
 Tue, 19 Jan 2016 09:20:38 -0800 (PST)
Sender: asomers@gmail.com
Received: by 10.202.69.84 with HTTP; Tue, 19 Jan 2016 09:20:38 -0800 (PST)
In-Reply-To: <569E6DA0.9010300@pix.net>
References: <201601191700.u0JH0P6k061610@repo.freebsd.org>
 <569E6DA0.9010300@pix.net>
Date: Tue, 19 Jan 2016 10:20:38 -0700
X-Google-Sender-Auth: 0B0yngL4KJwMePaRAFXH9Y84ULc
Message-ID: <CAOtMX2idrWOpWbkYxPFn3yur8w-vgfBryhT4_0yiBvg10sWWRA@mail.gmail.com>
Subject: Re: svn commit: r294329 - in
 head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs: . sys
From: Alan Somers <asomers@freebsd.org>
To: Kurt Lidl <lidl@pix.net>
Cc: "src-committers@freebsd.org" <src-committers@freebsd.org>, 
 "svn-src-all@freebsd.org" <svn-src-all@freebsd.org>, 
 "svn-src-head@freebsd.org" <svn-src-head@freebsd.org>
Content-Type: text/plain; charset=UTF-8
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.20
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for &quot;
 user&quot; and &quot; projects&quot; \)" <svn-src-all.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-all/>
List-Post: <mailto:svn-src-all@freebsd.org>
List-Help: <mailto:svn-src-all-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Tue, 19 Jan 2016 17:20:39 -0000

On Tue, Jan 19, 2016 at 10:08 AM, Kurt Lidl <lidl@pix.net> wrote:
> Removing the ability to run different zpools on top of a zvol is
> a significant reduction in functionality of the entire system, and a huge
> violation of the POLA.

The thing is, it never really worked in the first place.  Panics and
deadlocks are so frequent that I don't think the feature was usable
for anybody.

>
> At the very least, can you not add a sysctl that allows the
> dangerous behavior (even if it defaults to off)?  Myself
> and certainly others rely on having being able to use a zpool
> installed into a zvol for hosting bhyve virtual machines.

Your use case should be unaffected.  The guest has a different ZFS
instance than the host, so it should work just fine.  Please let me
know if you have problems.

-Alan

>
> I've managed to deadlock the system when experimenting with this,
> but for the normal course of operations, it works just fine.
>
> -Kurt
>
>
> On 1/19/16 12:00 PM, Alan Somers wrote:
>>
>> Author: asomers
>> Date: Tue Jan 19 17:00:25 2016
>> New Revision: 294329
>> URL: https://svnweb.freebsd.org/changeset/base/294329
>>
>> Log:
>>    Disallow zvol-backed ZFS pools
>>
>>    Using zvols as backing devices for ZFS pools is fraught with panics and
>>    deadlocks. For example, attempting to online a missing device in the
>>    presence of a zvol can cause a panic when vdev_geom tastes the zvol.
>> Better
>>    to completely disable vdev_geom from ever opening a zvol. The solution
>>    relies on setting a thread-local variable during vdev_geom_open, and
>>    returning EOPNOTSUPP during zvol_open if that thread-local variable is
>> set.
>>
>>    Remove the check for MUTEX_HELD(&zfsdev_state_lock) in zvol_open. Its
>> intent
>>    was to prevent a recursive mutex acquisition panic. However, the new
>> check
>>    for the thread-local variable also fixes that problem.
>>
>>    Also, fix a panic in vdev_geom_taste_orphan. For an unknown reason,
>> this
>>    function was set to panic. But it can occur that a device disappears
>> during
>>    tasting, and it causes no problems to ignore this departure.
>>
>>    Reviewed by: delphij
>>    MFC after:   1 week
>>    Relnotes:    yes
>>    Sponsored by:        Spectra Logic Corp
>>    Differential Revision:       https://reviews.freebsd.org/D4986
>>
>> Modified:
>>    head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/vdev_impl.h
>>    head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_geom.c
>>    head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c
>>    head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zvol.c
>
>
> [diff truncated]
>
>

From owner-svn-src-all@freebsd.org  Tue Jan 19 17:35:32 2016
Return-Path: <owner-svn-src-all@freebsd.org>
Delivered-To: svn-src-all@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7379FA86FA3
 for <svn-src-all@mailman.ysv.freebsd.org>;
 Tue, 19 Jan 2016 17:35:32 +0000 (UTC) (envelope-from se@freebsd.org)
Received: from mailout01.t-online.de (mailout01.t-online.de [194.25.134.80])
 (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
 (Client CN "mailout00.t-online.de",
 Issuer "TeleSec ServerPass DE-1" (verified OK))
 by mx1.freebsd.org (Postfix) with ESMTPS id 12CEA13DF;
 Tue, 19 Jan 2016 17:35:32 +0000 (UTC) (envelope-from se@freebsd.org)
Received: from fwd12.aul.t-online.de (fwd12.aul.t-online.de [172.20.26.241])
 by mailout01.t-online.de (Postfix) with SMTP id 22BCB5AEC40;
 Tue, 19 Jan 2016 18:35:24 +0100 (CET)
Received: from [192.168.119.22]
 (T5yD-oZ1rh9lO6sSOSmuEOjrhQM7Xal2dFFKgQCL0RyqpwMSuhxCXwfYT6cFUOQZtJ@[87.151.208.3])
 by fwd12.t-online.de with (TLSv1.2:ECDHE-RSA-AES256-SHA encrypted)
 esmtp id 1aLaBd-2a4wDI0; Tue, 19 Jan 2016 18:35:21 +0100
Subject: Re: svn commit: r294329 - in
 head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs: . sys
To: svn-src-all@freebsd.org
References: <201601191700.u0JH0P6k061610@repo.freebsd.org>
 <569E6DA0.9010300@pix.net>
From: Stefan Esser <se@freebsd.org>
X-Enigmail-Draft-Status: N1110
Message-ID: <569E73D3.7080306@freebsd.org>
Date: Tue, 19 Jan 2016 18:35:15 +0100
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:38.0) Gecko/20100101
 Thunderbird/38.5.1
MIME-Version: 1.0
In-Reply-To: <569E6DA0.9010300@pix.net>
Content-Type: text/plain; charset=windows-1252
Content-Transfer-Encoding: 7bit
X-ID: T5yD-oZ1rh9lO6sSOSmuEOjrhQM7Xal2dFFKgQCL0RyqpwMSuhxCXwfYT6cFUOQZtJ
X-TOI-MSGID: 5479238f-6795-41b8-b556-bd6e0d838603
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.20
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for &quot;
 user&quot; and &quot; projects&quot; \)" <svn-src-all.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-all/>
List-Post: <mailto:svn-src-all@freebsd.org>
List-Help: <mailto:svn-src-all-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Tue, 19 Jan 2016 17:35:32 -0000

Am 19.01.2016 um 18:08 schrieb Kurt Lidl:
> Removing the ability to run different zpools on top of a zvol is
> a significant reduction in functionality of the entire system, and a
> huge violation of the POLA.
> 
> At the very least, can you not add a sysctl that allows the
> dangerous behavior (even if it defaults to off)?  Myself
> and certainly others rely on having being able to use a zpool
> installed into a zvol for hosting bhyve virtual machines.
> 
> I've managed to deadlock the system when experimenting with this,
> but for the normal course of operations, it works just fine.
> 
> -Kurt

I already sent a private message to Alan because I also have
a system that has been running for years with such a setup.

A tunable might be even better than a sysctl (or the sysctl
might be initialized from the tunable) to allow booting with
the old behavior.

Regards, STefan

From owner-svn-src-all@freebsd.org  Tue Jan 19 17:40:30 2016
Return-Path: <owner-svn-src-all@freebsd.org>
Delivered-To: svn-src-all@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id 62EB9A8708B;
 Tue, 19 Jan 2016 17:40: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 2E9EA153A;
 Tue, 19 Jan 2016 17:40:30 +0000 (UTC)
 (envelope-from emaste@FreeBSD.org)
Received: from repo.freebsd.org ([127.0.1.37])
 by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u0JHeTCN073200;
 Tue, 19 Jan 2016 17:40:29 GMT (envelope-from emaste@FreeBSD.org)
Received: (from emaste@localhost)
 by repo.freebsd.org (8.15.2/8.15.2/Submit) id u0JHeTkx073199;
 Tue, 19 Jan 2016 17:40:29 GMT (envelope-from emaste@FreeBSD.org)
Message-Id: <201601191740.u0JHeTkx073199@repo.freebsd.org>
X-Authentication-Warning: repo.freebsd.org: emaste set sender to
 emaste@FreeBSD.org using -f
From: Ed Maste <emaste@FreeBSD.org>
Date: Tue, 19 Jan 2016 17:40:29 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-head@freebsd.org
Subject: svn commit: r294331 - head/gnu/lib/libgcc
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.20
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for &quot;
 user&quot; and &quot; projects&quot; \)" <svn-src-all.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-all/>
List-Post: <mailto:svn-src-all@freebsd.org>
List-Help: <mailto:svn-src-all-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Tue, 19 Jan 2016 17:40:30 -0000

Author: emaste
Date: Tue Jan 19 17:40:29 2016
New Revision: 294331
URL: https://svnweb.freebsd.org/changeset/base/294331

Log:
  Remove local override for .cpp.o and .cpp.po rules
  
  The local build rule used to set -fvisibility=hidden and -fPIC, in
  addition to -fexceptions and -D defines that had no effect.
  
  With -fvisibility=hidden and -fPIC in STATIC_CXXFLAGS the standard
  bsd.lib.mk rules are suitable for libgcc_s's C++ source.
  
  PR:		206381
  Sponsored by:	The FreeBSD Foundation

Modified:
  head/gnu/lib/libgcc/Makefile

Modified: head/gnu/lib/libgcc/Makefile
==============================================================================
--- head/gnu/lib/libgcc/Makefile	Tue Jan 19 17:20:07 2016	(r294330)
+++ head/gnu/lib/libgcc/Makefile	Tue Jan 19 17:40:29 2016	(r294331)
@@ -89,6 +89,7 @@ CFLAGS+=	-I${UNWINDINCDIR} -I${.CURDIR}
 CXXFLAGS+=	-std=c++11
 .endif
 CXXFLAGS+=	-fno-rtti
+STATIC_CXXFLAGS+= -fvisibility=hidden -fPIC
 
 .else # MK_LLVM_LIBUNWIND
 
@@ -204,8 +205,6 @@ HIDE =  -fvisibility=hidden -DHIDE_EXPOR
 CC_T =	${CC} -c ${CFLAGS} ${HIDE} -fPIC
 CC_P =	${CC} -c ${CFLAGS} ${HIDE} -p -fPIC
 CC_S =	${CC} -c ${CFLAGS} ${PICFLAG} -DSHARED
-CXX_T =	${CXX} -c ${CXXFLAGS} ${HIDE} -fPIC
-CXX_P =	${CXX} -c ${CXXFLAGS} ${HIDE} -p -fPIC
 
 #-----------------------------------------------------------------------
 #
@@ -326,12 +325,6 @@ ${_src:R:S/$/.o/}: ${_src} ${COMMONHDRS}
 ${_src:R:S/$/.po/}: ${_src} ${COMMONHDRS}
 	${CC_P} ${EH_CFLAGS} -o ${.TARGET} ${.IMPSRC}
 .endfor
-.for _src in ${LIB2ADDEHSTATIC:M*.cpp}
-${_src:R:S/$/.o/}: ${_src} ${COMMONHDRS}
-	${CXX_T} ${EH_CFLAGS} -o ${.TARGET} ${.IMPSRC}
-${_src:R:S/$/.po/}: ${_src} ${COMMONHDRS}
-	${CXX_P} ${EH_CFLAGS} -o ${.TARGET} ${.IMPSRC}
-.endfor
 .for _src in ${LIB2ADDEHSHARED:M*.c}
 ${_src:R:S/$/.So/}: ${_src} ${COMMONHDRS}
 	${CC_S} ${EH_CFLAGS} -o ${.TARGET} ${.IMPSRC}

From owner-svn-src-all@freebsd.org  Tue Jan 19 17:40:57 2016
Return-Path: <owner-svn-src-all@freebsd.org>
Delivered-To: svn-src-all@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2275BA87235;
 Tue, 19 Jan 2016 17:40:57 +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 0EF3517B7;
 Tue, 19 Jan 2016 17:40:57 +0000 (UTC)
 (envelope-from bdrewery@FreeBSD.org)
Received: from mail.xzibition.com (localhost [IPv6:::1])
 by freefall.freebsd.org (Postfix) with ESMTP id 08C741452;
 Tue, 19 Jan 2016 17:40:57 +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 B148815DE8;
 Tue, 19 Jan 2016 17:40:56 +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 QJgNSD8e2pxP; Tue, 19 Jan 2016 17:40:54 +0000 (UTC)
Subject: Re: svn commit: r291941 - in head: lib/libpam/modules/pam_ssh
 secure/lib/libssh secure/libexec/sftp-server secure/libexec/ssh-keysign
 secure/libexec/ssh-pkcs11-helper secure/usr.bin/scp secure/usr.bin/...
DKIM-Filter: OpenDKIM Filter v2.9.2 mail.xzibition.com 3BB2515DE2
References: <201512071608.tB7G89BZ095366@repo.freebsd.org>
 <86vb6phdug.fsf@desk.des.no> <569E60BA.6050007@FreeBSD.org>
Cc: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-head@freebsd.org
From: Bryan Drewery <bdrewery@FreeBSD.org>
Openpgp: id=F9173CB2C3AAEA7A5C8A1F0935D771BB6E4697CF;
 url=http://www.shatow.net/bryan/bryan2.asc
Organization: FreeBSD
Message-ID: <569E7524.5040806@FreeBSD.org>
Date: Tue, 19 Jan 2016 09:40:52 -0800
User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:38.0) Gecko/20100101
 Thunderbird/38.5.1
MIME-Version: 1.0
In-Reply-To: <569E60BA.6050007@FreeBSD.org>
Content-Type: multipart/signed; micalg=pgp-sha1;
 protocol="application/pgp-signature";
 boundary="n7OthJOQ3hMnnKTccDD1Q7dDMOM999R1w"
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.20
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for &quot;
 user&quot; and &quot; projects&quot; \)" <svn-src-all.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-all/>
List-Post: <mailto:svn-src-all@freebsd.org>
List-Help: <mailto:svn-src-all-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Tue, 19 Jan 2016 17:40:57 -0000

This is an OpenPGP/MIME signed message (RFC 4880 and 3156)
--n7OthJOQ3hMnnKTccDD1Q7dDMOM999R1w
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable

On 1/19/2016 8:13 AM, Bryan Drewery wrote:
> On 1/19/2016 5:56 AM, Dag-Erling Sm=C3=B8rgrav wrote:
>> Bryan Drewery <bdrewery@FreeBSD.org> writes:
>>> Log:
>>>   Replace unneeded manual dependency on header by adding it to SRCS.
>>>  =20
>>>   bsd.lib.mk and bsd.prog.mk already depend all objs on headers in SR=
CS if
>>>   there is not yet a depend file.  The headers in SRCS are never buil=
t or
>>>   installed.  After 'make depend' the header was already added as a p=
roper
>>>   dependency on the objects where needed.
>>
>> This doesn't work.  Try the following:
>>
>> $ cd /usr/src/secure/lib/libssh
>> $ make depend && make
>> $ touch /usr/src/crypto/openssh/ssh_namespace.h
>> $ make
>=20
> Well, it sort of works with WITH_FAST_DEPEND which will be default very=

> shortly.
>=20
=2E..
>> $ grep -c ssh_namespace $(make -V.OBJDIR)/.depend
>> 0
>>
>=20
> That is expected. The dependency is defined in bsd.lib.mk. Granted it i=
s
> dependent on .depend existing, but I am going to remove that check so i=
t
> is always defined.
>=20

The problem with the old method (mkdep which is still default) is that
the -include is not passed to mkdep. FAST_DEPEND does not have that
issue since it generates the .depend files during compilation, where the
-include is present.


--=20
Regards,
Bryan Drewery


--n7OthJOQ3hMnnKTccDD1Q7dDMOM999R1w
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

iQEcBAEBAgAGBQJWnnUkAAoJEDXXcbtuRpfPY/4H/RjLtky4QWRHAZRcjKHZeosg
f5LvL1aouT5Tsz3TqHg8hcWFdJ+hy3WmbmNZ4RtWqw+fAYNDKEuIW0H8EZMBvQGJ
xDztxvvcqArHXV0F55dJnmY3sTjUSVVT/qxISAp+3Jje3Wj9X5pKK6JgVlOGk/tH
vrJ6HF+nNG4hWebbVtytbKoYyWDfMWM6VBUMiope65sr8bj4XQ8zHRSKT90eOd1E
InLRAEwKTT6E/Tb1a9MtF/9zJHs7BQ7svi8cH7tXdfChecTcXaSfhqWN70uw9jJy
nRFGT0G4WkvwRez/4/YZX491gVqqhjtSs0TnelBja4zR6wKzddax0kYgp8xFRRw=
=Nvrk
-----END PGP SIGNATURE-----

--n7OthJOQ3hMnnKTccDD1Q7dDMOM999R1w--

From owner-svn-src-all@freebsd.org  Tue Jan 19 18:01:48 2016
Return-Path: <owner-svn-src-all@freebsd.org>
Delivered-To: svn-src-all@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id EF661A87C87;
 Tue, 19 Jan 2016 18:01:48 +0000 (UTC) (envelope-from slw@zxy.spb.ru)
Received: from zxy.spb.ru (zxy.spb.ru [195.70.199.98])
 (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
 (Client did not present a certificate)
 by mx1.freebsd.org (Postfix) with ESMTPS id AE91E1835;
 Tue, 19 Jan 2016 18:01:48 +0000 (UTC) (envelope-from slw@zxy.spb.ru)
Received: from slw by zxy.spb.ru with local (Exim 4.86 (FreeBSD))
 (envelope-from <slw@zxy.spb.ru>)
 id 1aLabC-000Ff8-Bu; Tue, 19 Jan 2016 21:01:46 +0300
Date: Tue, 19 Jan 2016 21:01:46 +0300
From: Slawa Olhovchenkov <slw@zxy.spb.ru>
To: Andrew Turner <andrew@fubar.geek.nz>
Cc: Zbigniew Bodek <zbb@FreeBSD.org>, svn-src-head@freebsd.org,
 svn-src-all@freebsd.org, src-committers@freebsd.org
Subject: Re: svn commit: r294267 - head/sys/arm64/conf
Message-ID: <20160119180146.GF37895@zxy.spb.ru>
References: <201601181411.u0IEBYoQ078886@repo.freebsd.org>
 <20160118142107.2523f103@zapp>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <20160118142107.2523f103@zapp>
User-Agent: Mutt/1.5.24 (2015-08-30)
X-SA-Exim-Connect-IP: <locally generated>
X-SA-Exim-Mail-From: slw@zxy.spb.ru
X-SA-Exim-Scanned: No (on zxy.spb.ru); SAEximRunCond expanded to false
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.20
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for &quot;
 user&quot; and &quot; projects&quot; \)" <svn-src-all.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-all/>
List-Post: <mailto:svn-src-all@freebsd.org>
List-Help: <mailto:svn-src-all-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Tue, 19 Jan 2016 18:01:49 -0000

On Mon, Jan 18, 2016 at 02:21:07PM +0000, Andrew Turner wrote:

> On Mon, 18 Jan 2016 14:11:34 +0000 (UTC)
> Zbigniew Bodek <zbb@FreeBSD.org> wrote:
> 
> > Author: zbb
> > Date: Mon Jan 18 14:11:34 2016
> > New Revision: 294267
> > URL: https://svnweb.freebsd.org/changeset/base/294267
> > 
> > Log:
> >   Enable AIO interface on ARM64 platforms
> >   
> >   Add VFS_AIO to generic config to allow using of high-performance
> >   asynchronous disk AIO operation.
> 
> Why have you only enabled this on arm64? Is it not applicable to other
> architectures?

This is just compile-in aio.ko.
I am don't know why don't use `kldload aio`

From owner-svn-src-all@freebsd.org  Tue Jan 19 18:07:20 2016
Return-Path: <owner-svn-src-all@freebsd.org>
Delivered-To: svn-src-all@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id A46C0A87F4E
 for <svn-src-all@mailman.ysv.freebsd.org>;
 Tue, 19 Jan 2016 18:07:20 +0000 (UTC)
 (envelope-from shawn.webb@hardenedbsd.org)
Received: from mail-yk0-x234.google.com (mail-yk0-x234.google.com
 [IPv6:2607:f8b0:4002:c07::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 5ECE01C5F
 for <svn-src-all@freebsd.org>; Tue, 19 Jan 2016 18:07:20 +0000 (UTC)
 (envelope-from shawn.webb@hardenedbsd.org)
Received: by mail-yk0-x234.google.com with SMTP id v14so563838722ykd.3
 for <svn-src-all@freebsd.org>; Tue, 19 Jan 2016 10:07:20 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=hardenedbsd-org.20150623.gappssmtp.com; s=20150623;
 h=date:from:to:cc:subject:message-id:references:mime-version
 :content-type:content-disposition:in-reply-to:user-agent;
 bh=wkL+551+nF8YOBIx8OjiA1OZx6Urmn6GEDFC7GSnlqs=;
 b=fbkbAggS18Ok0Icm4YquBsA0wu3Ecg3nfwxH99I7KG9w2Bmw+jOo9nHwYayrKlVwkd
 mG+/hP5VFRYVqotRJ/vcxH/o6AI+klJRJgIm5615WroA5wBpiRr6f1gtabB2Iiaaic/k
 PsK4S1LJASCk0zLuGzj4Say9gtKktXoBzIpoVNlOFam2kKMqjyhI588CV1iEe1YpqXKM
 LsLQLpqqLoMheWB69dHdDirypaRchWvQ1TyUHP/vE2hhSTdRYZEBCUmjw5yzChQmTFk6
 yfXAteoNLaQ0Y2+GI2+jgYwnlYD8UseHd7BnxwKMIwFqX+fn5b8o4G6FowCeIzHmlayh
 Ss3g==
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:references
 :mime-version:content-type:content-disposition:in-reply-to
 :user-agent;
 bh=wkL+551+nF8YOBIx8OjiA1OZx6Urmn6GEDFC7GSnlqs=;
 b=bMqCF77SM/I3dZF29ZVZbfkKi7LY+WLARsrC4jt0iMI3vome3BCCmbY89OfgIna/mD
 EFKxZ0VtJQSRPTuXK+2zLazBLIUfpU/MYhUeLSonhnc9L3pp8PR4c3V9ECJwH2wuN5SE
 4n65UP66EEoKGPPYWrt6ZvOEg6PZp6ZMUhD8DGUkqx7rseYSNYGdpVscNJPHtliDbyFr
 TeChNzS3SEuhLonLKzKl+ZS9wALhq5xRHXV3WnUze/UHLzA38IO5OJ+roWLEjnRsRoi6
 DSc2TGH6bIzrdWXRJCwLGaR0VXh/Se5j/D32lnl+FepBeqPP4PII1XFOiCoW4us/0+iT
 tp4A==
X-Gm-Message-State: ALoCoQkO4YMGq825e2j3rA/KIme0a/lbi/H+gOrBUlL8Koo4mAUz/JP4ZKpPuAFOsdZCWvtsr/iY753bKccuhIxCwS9u9wA//w==
X-Received: by 10.129.153.129 with SMTP id q123mr20296426ywg.281.1453226839473; 
 Tue, 19 Jan 2016 10:07:19 -0800 (PST)
Received: from mutt-hardenedbsd ([63.88.83.105])
 by smtp.gmail.com with ESMTPSA id h187sm22617240ywc.0.2016.01.19.10.07.17
 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);
 Tue, 19 Jan 2016 10:07:18 -0800 (PST)
Date: Tue, 19 Jan 2016 13:07:15 -0500
From: Shawn Webb <shawn.webb@hardenedbsd.org>
To: Alan Somers <asomers@freebsd.org>
Cc: Kurt Lidl <lidl@pix.net>,
 "svn-src-head@freebsd.org" <svn-src-head@freebsd.org>,
 "svn-src-all@freebsd.org" <svn-src-all@freebsd.org>,
 "src-committers@freebsd.org" <src-committers@freebsd.org>
Subject: Re: svn commit: r294329 - in
 head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs: . sys
Message-ID: <20160119180715.GA98067@mutt-hardenedbsd>
References: <201601191700.u0JH0P6k061610@repo.freebsd.org>
 <569E6DA0.9010300@pix.net>
 <CAOtMX2idrWOpWbkYxPFn3yur8w-vgfBryhT4_0yiBvg10sWWRA@mail.gmail.com>
MIME-Version: 1.0
Content-Type: multipart/signed; micalg=pgp-sha256;
 protocol="application/pgp-signature"; boundary="dDRMvlgZJXvWKvBx"
Content-Disposition: inline
In-Reply-To: <CAOtMX2idrWOpWbkYxPFn3yur8w-vgfBryhT4_0yiBvg10sWWRA@mail.gmail.com>
X-Operating-System: FreeBSD mutt-hardenedbsd 11.0-CURRENT-HBSD FreeBSD
 11.0-CURRENT-HBSD 
X-PGP-Key: http://pgp.mit.edu/pks/lookup?op=vindex&search=0x6A84658F52456EEE
User-Agent: Mutt/1.5.24 (2015-08-30)
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.20
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for &quot;
 user&quot; and &quot; projects&quot; \)" <svn-src-all.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-all/>
List-Post: <mailto:svn-src-all@freebsd.org>
List-Help: <mailto:svn-src-all-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Tue, 19 Jan 2016 18:07:20 -0000


--dDRMvlgZJXvWKvBx
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Tue, Jan 19, 2016 at 10:20:38AM -0700, Alan Somers wrote:
> On Tue, Jan 19, 2016 at 10:08 AM, Kurt Lidl <lidl@pix.net> wrote:
> > Removing the ability to run different zpools on top of a zvol is
> > a significant reduction in functionality of the entire system, and a hu=
ge
> > violation of the POLA.
>=20
> The thing is, it never really worked in the first place.  Panics and
> deadlocks are so frequent that I don't think the feature was usable
> for anybody.

I actively use this every day and will be making even more use of it in
the very near future. I haven't had a single kernel panic. I have had
deadlocks at shutdown, but since it's a laptop and I'm sitting right in
front of it, it's not a big deal.

I'd say fix the underlying problem, don't prevent people from getting
work done.

>=20
> >
> > At the very least, can you not add a sysctl that allows the
> > dangerous behavior (even if it defaults to off)?  Myself
> > and certainly others rely on having being able to use a zpool
> > installed into a zvol for hosting bhyve virtual machines.
>=20
> Your use case should be unaffected.  The guest has a different ZFS
> instance than the host, so it should work just fine.  Please let me
> know if you have problems.

--=20
Shawn Webb
HardenedBSD

GPG Key ID:          0x6A84658F52456EEE
GPG Key Fingerprint: 2ABA B6BD EF6A F486 BE89  3D9E 6A84 658F 5245 6EEE

--dDRMvlgZJXvWKvBx
Content-Type: application/pgp-signature; name="signature.asc"

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2

iQIcBAEBCAAGBQJWnntQAAoJEGqEZY9SRW7u0LcQAJyUonXZt0/aborbAkk6Jv6S
+rkb9qTd8AHZpAeoB3A7TM9e0MNmCgvTXhKuxIJIaJkTv5zjQAtmoIUq4Y10bh+E
DgHnTP8gH9eIPtR5QaqnXmIRMy+6ZeeUhS1pXebOERngcJ/n4Pb8zJgvoOYVlr3H
EId8vLqgkrVpDx3UxT5RHdFZ9UKYO+RbC8LqzSUF5jHRQsSo9PLtvKzCDY78flOC
DY0C1dm6ie8hCYOENFKNoZ8iFK+ZzzP+voPUO3epdfylWjWukET9yvwEK33jPrOa
waVzMPfroTVE5k7Dhz99P+GtkkBtjK6fWhXQgqnuMIooQy5NJGvIfrFkgwNl4c+a
3zhbR3VlBTOGd5t+4BkV7wQO7fm05h2CQekpNRHbhmAt1fql3DlkqFILdekx17Y5
cI03hnn6QD1bRPY4y7AIVtw0/hHTAZL9iA0XO6TzGTOWeNEe8pLbltaYi/G6eLEy
fAIKQ+/YhpEHwKwkAuplQpBxeX3ihEv4u9giOI4Sp5mbkymZPagjhUj71kCbfA82
TJosm8Zkyru5MuchatOKiVsNUjHQ5esoHY5HAEas7H4GryqSIGUAAZmurgGjHPoB
wnJD+GQeSfXDa8Fofvhd+KWY2xeCLdU6OWHKoKeiVQH1ehep5kUiqRu8sNUMDGcQ
UDTvxkvVNbAQa4KSt4NX
=YXCt
-----END PGP SIGNATURE-----

--dDRMvlgZJXvWKvBx--

From owner-svn-src-all@freebsd.org  Tue Jan 19 18:27:30 2016
Return-Path: <owner-svn-src-all@freebsd.org>
Delivered-To: svn-src-all@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id 03D22A88624;
 Tue, 19 Jan 2016 18:27:30 +0000 (UTC)
 (envelope-from cschuber@gmail.com)
Received: from mail-pf0-x22f.google.com (mail-pf0-x22f.google.com
 [IPv6:2607:f8b0:400e:c00::22f])
 (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits))
 (Client CN "smtp.gmail.com",
 Issuer "Google Internet Authority G2" (verified OK))
 by mx1.freebsd.org (Postfix) with ESMTPS id C91B8158F;
 Tue, 19 Jan 2016 18:27:29 +0000 (UTC)
 (envelope-from cschuber@gmail.com)
Received: by mail-pf0-x22f.google.com with SMTP id 65so179408613pff.2;
 Tue, 19 Jan 2016 10:27:29 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;
 h=message-id:mime-version:from:subject:date:to:cc:content-type;
 bh=tPcV2EeWuttO+O+A0TiBH1GqU3lGRrvGxZ1jefk0YzQ=;
 b=mHyWDljoKMq3B9cvA/ftoWJBZk71JpG2vnOyFLzpjvsO1DnbEgPYmqXkZI+zTx4g2W
 h2U1c1skFZjrMh2BJASbExokuN9kK+vmBB+fnb7B0QbCEHbAyI3cvIwHKzUVtfOG7HML
 ocij8uvz6Y7+2yT6Gbo6hTrioL5ze5APy1+Nf8KpsEiwdO97TLYRNra7ME0hVcWn7+iU
 +MiKoAkYZkVHmctAbamsymuJmp/vo0xqsES24Bjgi8phSaJoshgCUrBOmNXpck53Figl
 rBmf1MOCrttMXJkVsOwyrjReK6S1mXfbYzxfLaczq/65lOon4CZmU7C894aw2bWWNRZG
 THKQ==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20130820;
 h=x-gm-message-state:message-id:mime-version:from:subject:date:to:cc
 :content-type;
 bh=tPcV2EeWuttO+O+A0TiBH1GqU3lGRrvGxZ1jefk0YzQ=;
 b=BhEneSkG8R3UD0GDgLOcwDNSQYjSFAlQwNzZn3/SFVH9NY0hTgP9reWmcfZ5ewfVYE
 6NuRIXElaiiYC6hwz65Davd9GAX6cCsPkcmsSRkQlGeIa9ejzvy0IbjuLQlALY4KYayv
 Ymxnlu7zS0QUwOszRJ0JjhjTHiDKV6NXxc2E9tHXe2Ksfpb35noTx5dTohsdoOfrwSPP
 jmTaN5LdcabdVwzgYVbCKb+o7K+i9aQMs16WU/qls6oRa6m81Qjz1zG/ZrboeIv4xyTY
 TeVJS5XJP0GY3X+7Vk6xBjj30jJPxiYvbrGBhH3Sivv+5xWmwHZPkv3DpLzcbA0Naqmh
 hACQ==
X-Gm-Message-State: ALoCoQlW5t4a1i2wzsVdLI6I7sAbZ0QrPXqbtuBV/axXA284a1PaWyEIzBQ9rybMN1tvGsw7UonFW220f1iZgJbRGS2u0CQQUw==
X-Received: by 10.98.42.74 with SMTP id q71mr45738927pfq.18.1453228049381;
 Tue, 19 Jan 2016 10:27:29 -0800 (PST)
Received: from [10.168.3.75] (S0106d4ca6d8943b0.gv.shawcable.net.
 [24.68.134.59])
 by smtp.gmail.com with ESMTPSA id 16sm43063109pfh.48.2016.01.19.10.27.28
 (version=TLSv1/SSLv3 cipher=OTHER);
 Tue, 19 Jan 2016 10:27:28 -0800 (PST)
Message-ID: <569e8010.9007620a.6c9d2.ffffdc68@mx.google.com>
MIME-Version: 1.0
From: Cy Schubert <cschuber@gmail.com>
Subject: RE: svn commit: r294329 -
 inhead/sys/cddl/contrib/opensolaris/uts/common/fs/zfs: . sys
Date: Tue, 19 Jan 2016 10:27:30 -0800
To: Shawn Webb <shawn.webb@hardenedbsd.org>, Alan Somers <asomers@freebsd.org>
CC: Kurt Lidl <lidl@pix.net>, 
 "svn-src-head@freebsd.org" <svn-src-head@freebsd.org>, 
 "svn-src-all@freebsd.org" <svn-src-all@freebsd.org>, 
 "src-committers@freebsd.org" <src-committers@freebsd.org>, 
 "cy@freebsd.org" <cy@freebsd.org>
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: quoted-printable
X-Content-Filtered-By: Mailman/MimeDel 2.1.20
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.20
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for &quot;
 user&quot; and &quot; projects&quot; \)" <svn-src-all.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-all/>
List-Post: <mailto:svn-src-all@freebsd.org>
List-Help: <mailto:svn-src-all-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Tue, 19 Jan 2016 18:27:30 -0000

Agreed, I do a fair bit of testing (nothing permanent) by putting zpools on=
 zvols. I have never experienced a hang or panic due to zpools on zvols. Th=
is is a POLA violation.

Regarding zfs hangs, I only experience them with zpool vdevs on USB devices=
 on my laptop when I forget to zpool export tpool prior to laptop shutdown/=
reboot. This is acceptable as I'm in front of it.

Sent from my cellphone,
~Cy

-----Original Message-----
From: Shawn Webb
Sent: 19/01/2016 10:07
To: Alan Somers
Cc: Kurt Lidl; svn-src-head@freebsd.org; svn-src-all@freebsd.org; src-commi=
tters@freebsd.org
Subject: Re: svn commit: r294329 - inhead/sys/cddl/contrib/opensolaris/uts/=
common/fs/zfs: . sys

On Tue, Jan 19, 2016 at 10:20:38AM -0700, Alan Somers wrote:
> On Tue, Jan 19, 2016 at 10:08 AM, Kurt Lidl <lidl@pix.net> wrote:
> > Removing the ability to run different zpools on top of a zvol is
> > a significant reduction in functionality of the entire system, and a hu=
ge
> > violation of the POLA.
>=20
> The thing is, it never really worked in the first place.  Panics and
> deadlocks are so frequent that I don't think the feature was usable
> for anybody.

I actively use this every day and will be making even more use of it in
the very near future. I haven't had a single kernel panic. I have had
deadlocks at shutdown, but since it's a laptop and I'm sitting right in
front of it, it's not a big deal.

I'd say fix the underlying problem, don't prevent people from getting
work done.

>=20
> >
> > At the very least, can you not add a sysctl that allows the
> > dangerous behavior (even if it defaults to off)?  Myself
> > and certainly others rely on having being able to use a zpool
> > installed into a zvol for hosting bhyve virtual machines.
>=20
> Your use case should be unaffected.  The guest has a different ZFS
> instance than the host, so it should work just fine.  Please let me
> know if you have problems.

--=20
Shawn Webb
HardenedBSD

GPG Key ID:          0x6A84658F52456EEE
GPG Key Fingerprint: 2ABA B6BD EF6A F486 BE89  3D9E 6A84 658F 5245 6EEE

From owner-svn-src-all@freebsd.org  Tue Jan 19 18:28:24 2016
Return-Path: <owner-svn-src-all@freebsd.org>
Delivered-To: svn-src-all@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id CB123A88788;
 Tue, 19 Jan 2016 18:28:24 +0000 (UTC) (envelope-from des@FreeBSD.org)
Received: from repo.freebsd.org (repo.freebsd.org
 [IPv6:2610:1c1:1:6068::e6a:0])
 (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
 (Client did not present a certificate)
 by mx1.freebsd.org (Postfix) with ESMTPS id 76C5E1983;
 Tue, 19 Jan 2016 18:28:24 +0000 (UTC) (envelope-from des@FreeBSD.org)
Received: from repo.freebsd.org ([127.0.1.37])
 by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u0JISNwv087684;
 Tue, 19 Jan 2016 18:28:23 GMT (envelope-from des@FreeBSD.org)
Received: (from des@localhost)
 by repo.freebsd.org (8.15.2/8.15.2/Submit) id u0JISNSG087681;
 Tue, 19 Jan 2016 18:28:23 GMT (envelope-from des@FreeBSD.org)
Message-Id: <201601191828.u0JISNSG087681@repo.freebsd.org>
X-Authentication-Warning: repo.freebsd.org: des set sender to des@FreeBSD.org
 using -f
From: =?UTF-8?Q?Dag-Erling_Sm=c3=b8rgrav?= <des@FreeBSD.org>
Date: Tue, 19 Jan 2016 18:28:23 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-head@freebsd.org
Subject: svn commit: r294332 - in head: crypto/openssh crypto/openssh/contrib
 crypto/openssh/contrib/caldera crypto/openssh/contrib/cygwin
 crypto/openssh/contrib/redhat crypto/openssh/contrib/suse crypto/op...
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.20
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for &quot;
 user&quot; and &quot; projects&quot; \)" <svn-src-all.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-all/>
List-Post: <mailto:svn-src-all@freebsd.org>
List-Help: <mailto:svn-src-all-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Tue, 19 Jan 2016 18:28:25 -0000

Author: des
Date: Tue Jan 19 18:28:23 2016
New Revision: 294332
URL: https://svnweb.freebsd.org/changeset/base/294332

Log:
  Upgrade to OpenSSH 6.8p1.

Added:
  head/crypto/openssh/.cvsignore
     - copied unchanged from r285031, vendor-crypto/openssh/dist/.cvsignore
  head/crypto/openssh/bitmap.c
     - copied unchanged from r285031, vendor-crypto/openssh/dist/bitmap.c
  head/crypto/openssh/bitmap.h
     - copied unchanged from r285031, vendor-crypto/openssh/dist/bitmap.h
  head/crypto/openssh/opacket.c
     - copied unchanged from r285031, vendor-crypto/openssh/dist/opacket.c
  head/crypto/openssh/opacket.h
     - copied unchanged from r285031, vendor-crypto/openssh/dist/opacket.h
  head/crypto/openssh/openbsd-compat/.cvsignore
     - copied unchanged from r285031, vendor-crypto/openssh/dist/openbsd-compat/.cvsignore
  head/crypto/openssh/openbsd-compat/md5.c
     - copied unchanged from r285031, vendor-crypto/openssh/dist/openbsd-compat/md5.c
  head/crypto/openssh/openbsd-compat/md5.h
     - copied unchanged from r285031, vendor-crypto/openssh/dist/openbsd-compat/md5.h
  head/crypto/openssh/openbsd-compat/reallocarray.c
     - copied unchanged from r285031, vendor-crypto/openssh/dist/openbsd-compat/reallocarray.c
  head/crypto/openssh/openbsd-compat/regress/.cvsignore
     - copied unchanged from r285031, vendor-crypto/openssh/dist/openbsd-compat/regress/.cvsignore
  head/crypto/openssh/openbsd-compat/rmd160.c
     - copied unchanged from r285031, vendor-crypto/openssh/dist/openbsd-compat/rmd160.c
  head/crypto/openssh/openbsd-compat/rmd160.h
     - copied unchanged from r285031, vendor-crypto/openssh/dist/openbsd-compat/rmd160.h
  head/crypto/openssh/openbsd-compat/sha1.c
     - copied unchanged from r285031, vendor-crypto/openssh/dist/openbsd-compat/sha1.c
  head/crypto/openssh/openbsd-compat/sha1.h
     - copied unchanged from r285031, vendor-crypto/openssh/dist/openbsd-compat/sha1.h
  head/crypto/openssh/regress/.cvsignore
     - copied unchanged from r285031, vendor-crypto/openssh/dist/regress/.cvsignore
  head/crypto/openssh/regress/hostkey-agent.sh
     - copied unchanged from r285031, vendor-crypto/openssh/dist/regress/hostkey-agent.sh
  head/crypto/openssh/regress/hostkey-rotate.sh
     - copied unchanged from r285031, vendor-crypto/openssh/dist/regress/hostkey-rotate.sh
  head/crypto/openssh/regress/keygen-knownhosts.sh
     - copied unchanged from r285031, vendor-crypto/openssh/dist/regress/keygen-knownhosts.sh
  head/crypto/openssh/regress/limit-keytype.sh
     - copied unchanged from r285031, vendor-crypto/openssh/dist/regress/limit-keytype.sh
  head/crypto/openssh/regress/multipubkey.sh
     - copied unchanged from r285031, vendor-crypto/openssh/dist/regress/multipubkey.sh
  head/crypto/openssh/regress/netcat.c
     - copied unchanged from r285031, vendor-crypto/openssh/dist/regress/netcat.c
  head/crypto/openssh/regress/t11.ok
     - copied unchanged from r285031, vendor-crypto/openssh/dist/regress/t11.ok
  head/crypto/openssh/regress/unittests/bitmap/
     - copied from r285031, vendor-crypto/openssh/dist/regress/unittests/bitmap/
  head/crypto/openssh/regress/unittests/hostkeys/
     - copied from r285031, vendor-crypto/openssh/dist/regress/unittests/hostkeys/
  head/crypto/openssh/regress/unittests/kex/
     - copied from r285031, vendor-crypto/openssh/dist/regress/unittests/kex/
  head/crypto/openssh/regress/valgrind-unit.sh
     - copied unchanged from r285031, vendor-crypto/openssh/dist/regress/valgrind-unit.sh
  head/crypto/openssh/scard/.cvsignore
     - copied unchanged from r285031, vendor-crypto/openssh/dist/scard/.cvsignore
  head/crypto/openssh/ssh_api.c
     - copied unchanged from r285031, vendor-crypto/openssh/dist/ssh_api.c
  head/crypto/openssh/ssh_api.h
     - copied unchanged from r285031, vendor-crypto/openssh/dist/ssh_api.h
Deleted:
  head/crypto/openssh/compress.c
  head/crypto/openssh/compress.h
  head/crypto/openssh/contrib/caldera/
Modified:
  head/crypto/openssh/ChangeLog
  head/crypto/openssh/Makefile.in
  head/crypto/openssh/PROTOCOL
  head/crypto/openssh/PROTOCOL.krl
  head/crypto/openssh/README
  head/crypto/openssh/atomicio.c
  head/crypto/openssh/auth-options.c
  head/crypto/openssh/auth-options.h
  head/crypto/openssh/auth-rh-rsa.c
  head/crypto/openssh/auth-rhosts.c
  head/crypto/openssh/auth-rsa.c
  head/crypto/openssh/auth.c
  head/crypto/openssh/auth.h
  head/crypto/openssh/auth1.c
  head/crypto/openssh/auth2-chall.c
  head/crypto/openssh/auth2-gss.c
  head/crypto/openssh/auth2-hostbased.c
  head/crypto/openssh/auth2-pubkey.c
  head/crypto/openssh/auth2.c
  head/crypto/openssh/authfd.c
  head/crypto/openssh/authfd.h
  head/crypto/openssh/authfile.c
  head/crypto/openssh/authfile.h
  head/crypto/openssh/bufbn.c
  head/crypto/openssh/buffer.h
  head/crypto/openssh/canohost.c
  head/crypto/openssh/channels.c
  head/crypto/openssh/channels.h
  head/crypto/openssh/cipher-3des1.c
  head/crypto/openssh/cipher-aesctr.c
  head/crypto/openssh/cipher-bf1.c
  head/crypto/openssh/cipher-chachapoly.c
  head/crypto/openssh/cipher-ctr.c
  head/crypto/openssh/cipher.c
  head/crypto/openssh/cipher.h
  head/crypto/openssh/clientloop.c
  head/crypto/openssh/compat.c
  head/crypto/openssh/compat.h
  head/crypto/openssh/config.h
  head/crypto/openssh/config.h.in
  head/crypto/openssh/configure
  head/crypto/openssh/configure.ac
  head/crypto/openssh/contrib/Makefile
  head/crypto/openssh/contrib/cygwin/ssh-host-config
  head/crypto/openssh/contrib/cygwin/ssh-user-config
  head/crypto/openssh/contrib/redhat/openssh.spec
  head/crypto/openssh/contrib/suse/openssh.spec
  head/crypto/openssh/deattack.c
  head/crypto/openssh/deattack.h
  head/crypto/openssh/defines.h
  head/crypto/openssh/dh.c
  head/crypto/openssh/dh.h
  head/crypto/openssh/digest-libc.c
  head/crypto/openssh/digest-openssl.c
  head/crypto/openssh/digest.h
  head/crypto/openssh/dispatch.c
  head/crypto/openssh/dispatch.h
  head/crypto/openssh/dns.c
  head/crypto/openssh/dns.h
  head/crypto/openssh/entropy.c
  head/crypto/openssh/ge25519.h
  head/crypto/openssh/groupaccess.c
  head/crypto/openssh/gss-genr.c
  head/crypto/openssh/gss-serv.c
  head/crypto/openssh/hmac.c
  head/crypto/openssh/hostfile.c
  head/crypto/openssh/hostfile.h
  head/crypto/openssh/includes.h
  head/crypto/openssh/kex.c
  head/crypto/openssh/kex.h
  head/crypto/openssh/kexc25519.c
  head/crypto/openssh/kexc25519c.c
  head/crypto/openssh/kexc25519s.c
  head/crypto/openssh/kexdh.c
  head/crypto/openssh/kexdhc.c
  head/crypto/openssh/kexdhs.c
  head/crypto/openssh/kexecdh.c
  head/crypto/openssh/kexecdhc.c
  head/crypto/openssh/kexecdhs.c
  head/crypto/openssh/kexgex.c
  head/crypto/openssh/kexgexc.c
  head/crypto/openssh/kexgexs.c
  head/crypto/openssh/key.c
  head/crypto/openssh/key.h
  head/crypto/openssh/krl.c
  head/crypto/openssh/krl.h
  head/crypto/openssh/loginrec.c
  head/crypto/openssh/mac.c
  head/crypto/openssh/mac.h
  head/crypto/openssh/misc.c
  head/crypto/openssh/moduli.0
  head/crypto/openssh/moduli.c
  head/crypto/openssh/monitor.c
  head/crypto/openssh/monitor.h
  head/crypto/openssh/monitor_fdpass.c
  head/crypto/openssh/monitor_mm.c
  head/crypto/openssh/monitor_wrap.c
  head/crypto/openssh/monitor_wrap.h
  head/crypto/openssh/msg.c
  head/crypto/openssh/msg.h
  head/crypto/openssh/mux.c
  head/crypto/openssh/openbsd-compat/Makefile.in
  head/crypto/openssh/openbsd-compat/arc4random.c
  head/crypto/openssh/openbsd-compat/bcrypt_pbkdf.c
  head/crypto/openssh/openbsd-compat/bsd-misc.c
  head/crypto/openssh/openbsd-compat/fake-rfc2553.h
  head/crypto/openssh/openbsd-compat/getrrsetbyname-ldns.c
  head/crypto/openssh/openbsd-compat/openbsd-compat.h
  head/crypto/openssh/openbsd-compat/openssl-compat.c
  head/crypto/openssh/openbsd-compat/openssl-compat.h
  head/crypto/openssh/openbsd-compat/port-tun.c
  head/crypto/openssh/openbsd-compat/readpassphrase.c
  head/crypto/openssh/openbsd-compat/sha2.c
  head/crypto/openssh/openbsd-compat/sha2.h
  head/crypto/openssh/openbsd-compat/xcrypt.c
  head/crypto/openssh/packet.c
  head/crypto/openssh/packet.h
  head/crypto/openssh/progressmeter.c
  head/crypto/openssh/progressmeter.h
  head/crypto/openssh/readconf.c
  head/crypto/openssh/readconf.h
  head/crypto/openssh/regress/Makefile
  head/crypto/openssh/regress/agent-pkcs11.sh
  head/crypto/openssh/regress/agent-timeout.sh
  head/crypto/openssh/regress/agent.sh
  head/crypto/openssh/regress/broken-pipe.sh
  head/crypto/openssh/regress/cert-hostkey.sh
  head/crypto/openssh/regress/cfgmatch.sh
  head/crypto/openssh/regress/cipher-speed.sh
  head/crypto/openssh/regress/connect-privsep.sh
  head/crypto/openssh/regress/connect.sh
  head/crypto/openssh/regress/dynamic-forward.sh
  head/crypto/openssh/regress/exit-status.sh
  head/crypto/openssh/regress/forcecommand.sh
  head/crypto/openssh/regress/forward-control.sh
  head/crypto/openssh/regress/forwarding.sh
  head/crypto/openssh/regress/host-expand.sh
  head/crypto/openssh/regress/integrity.sh
  head/crypto/openssh/regress/key-options.sh
  head/crypto/openssh/regress/keygen-change.sh
  head/crypto/openssh/regress/keyscan.sh
  head/crypto/openssh/regress/krl.sh
  head/crypto/openssh/regress/localcommand.sh
  head/crypto/openssh/regress/multiplex.sh
  head/crypto/openssh/regress/proto-mismatch.sh
  head/crypto/openssh/regress/proto-version.sh
  head/crypto/openssh/regress/proxy-connect.sh
  head/crypto/openssh/regress/reconfigure.sh
  head/crypto/openssh/regress/reexec.sh
  head/crypto/openssh/regress/rekey.sh
  head/crypto/openssh/regress/sshd-log-wrapper.sh
  head/crypto/openssh/regress/stderr-data.sh
  head/crypto/openssh/regress/t4.ok
  head/crypto/openssh/regress/test-exec.sh
  head/crypto/openssh/regress/transfer.sh
  head/crypto/openssh/regress/try-ciphers.sh
  head/crypto/openssh/regress/unittests/Makefile
  head/crypto/openssh/regress/unittests/Makefile.inc
  head/crypto/openssh/regress/unittests/sshbuf/test_sshbuf_getput_crypto.c
  head/crypto/openssh/regress/unittests/sshbuf/test_sshbuf_getput_fuzz.c
  head/crypto/openssh/regress/unittests/sshkey/common.c
  head/crypto/openssh/regress/unittests/sshkey/mktestdata.sh
  head/crypto/openssh/regress/unittests/sshkey/test_file.c
  head/crypto/openssh/regress/unittests/sshkey/test_fuzz.c
  head/crypto/openssh/regress/unittests/sshkey/test_sshkey.c
  head/crypto/openssh/regress/unittests/sshkey/testdata/dsa_1-cert.fp
  head/crypto/openssh/regress/unittests/sshkey/testdata/dsa_1.fp
  head/crypto/openssh/regress/unittests/sshkey/testdata/dsa_2.fp
  head/crypto/openssh/regress/unittests/sshkey/testdata/ecdsa_1-cert.fp
  head/crypto/openssh/regress/unittests/sshkey/testdata/ecdsa_1.fp
  head/crypto/openssh/regress/unittests/sshkey/testdata/ecdsa_2.fp
  head/crypto/openssh/regress/unittests/sshkey/testdata/ed25519_1-cert.fp
  head/crypto/openssh/regress/unittests/sshkey/testdata/ed25519_1.fp
  head/crypto/openssh/regress/unittests/sshkey/testdata/ed25519_2.fp
  head/crypto/openssh/regress/unittests/sshkey/testdata/rsa1_1.fp
  head/crypto/openssh/regress/unittests/sshkey/testdata/rsa1_2.fp
  head/crypto/openssh/regress/unittests/sshkey/testdata/rsa_1-cert.fp
  head/crypto/openssh/regress/unittests/sshkey/testdata/rsa_1.fp
  head/crypto/openssh/regress/unittests/sshkey/testdata/rsa_2.fp
  head/crypto/openssh/regress/unittests/test_helper/Makefile
  head/crypto/openssh/regress/unittests/test_helper/fuzz.c
  head/crypto/openssh/regress/unittests/test_helper/test_helper.c
  head/crypto/openssh/regress/unittests/test_helper/test_helper.h
  head/crypto/openssh/regress/yes-head.sh
  head/crypto/openssh/rijndael.c
  head/crypto/openssh/roaming_client.c
  head/crypto/openssh/roaming_common.c
  head/crypto/openssh/roaming_dummy.c
  head/crypto/openssh/sandbox-systrace.c
  head/crypto/openssh/scp.0
  head/crypto/openssh/scp.1
  head/crypto/openssh/scp.c
  head/crypto/openssh/servconf.c
  head/crypto/openssh/servconf.h
  head/crypto/openssh/serverloop.c
  head/crypto/openssh/session.c
  head/crypto/openssh/sftp-client.c
  head/crypto/openssh/sftp-client.h
  head/crypto/openssh/sftp-common.c
  head/crypto/openssh/sftp-common.h
  head/crypto/openssh/sftp-glob.c
  head/crypto/openssh/sftp-server.0
  head/crypto/openssh/sftp-server.8
  head/crypto/openssh/sftp-server.c
  head/crypto/openssh/sftp.0
  head/crypto/openssh/sftp.1
  head/crypto/openssh/sftp.c
  head/crypto/openssh/ssh-add.0
  head/crypto/openssh/ssh-add.1
  head/crypto/openssh/ssh-add.c
  head/crypto/openssh/ssh-agent.0
  head/crypto/openssh/ssh-agent.1
  head/crypto/openssh/ssh-agent.c
  head/crypto/openssh/ssh-dss.c
  head/crypto/openssh/ssh-ecdsa.c
  head/crypto/openssh/ssh-ed25519.c
  head/crypto/openssh/ssh-keygen.0
  head/crypto/openssh/ssh-keygen.1
  head/crypto/openssh/ssh-keygen.c
  head/crypto/openssh/ssh-keyscan.0
  head/crypto/openssh/ssh-keyscan.1
  head/crypto/openssh/ssh-keyscan.c
  head/crypto/openssh/ssh-keysign.0
  head/crypto/openssh/ssh-keysign.c
  head/crypto/openssh/ssh-pkcs11-helper.0
  head/crypto/openssh/ssh-pkcs11-helper.c
  head/crypto/openssh/ssh-pkcs11.c
  head/crypto/openssh/ssh-pkcs11.h
  head/crypto/openssh/ssh-rsa.c
  head/crypto/openssh/ssh.0
  head/crypto/openssh/ssh.1
  head/crypto/openssh/ssh.c
  head/crypto/openssh/ssh_config.0
  head/crypto/openssh/ssh_config.5
  head/crypto/openssh/ssh_namespace.h
  head/crypto/openssh/sshbuf-getput-basic.c
  head/crypto/openssh/sshbuf-getput-crypto.c
  head/crypto/openssh/sshbuf-misc.c
  head/crypto/openssh/sshbuf.c
  head/crypto/openssh/sshbuf.h
  head/crypto/openssh/sshconnect.c
  head/crypto/openssh/sshconnect1.c
  head/crypto/openssh/sshconnect2.c
  head/crypto/openssh/sshd.0
  head/crypto/openssh/sshd.8
  head/crypto/openssh/sshd.c
  head/crypto/openssh/sshd_config
  head/crypto/openssh/sshd_config.0
  head/crypto/openssh/sshd_config.5
  head/crypto/openssh/ssherr.c
  head/crypto/openssh/ssherr.h
  head/crypto/openssh/sshkey.c
  head/crypto/openssh/sshkey.h
  head/crypto/openssh/sshlogin.c
  head/crypto/openssh/sshpty.c
  head/crypto/openssh/uidswap.c
  head/crypto/openssh/version.h
  head/crypto/openssh/xmalloc.c
  head/secure/lib/libssh/Makefile
  head/secure/usr.sbin/sshd/Makefile
Directory Properties:
  head/crypto/openssh/   (props changed)

Copied: head/crypto/openssh/.cvsignore (from r285031, vendor-crypto/openssh/dist/.cvsignore)
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/crypto/openssh/.cvsignore	Tue Jan 19 18:28:23 2016	(r294332, copy of r285031, vendor-crypto/openssh/dist/.cvsignore)
@@ -0,0 +1,28 @@
+*.0
+*.out
+Makefile
+autom4te.cache
+buildit.sh
+buildpkg.sh
+config.cache
+config.h
+config.h.in
+config.log
+config.status
+configure
+openssh.xml
+opensshd.init
+scp
+sftp
+sftp-server
+ssh
+ssh-add
+ssh-agent
+ssh-keygen
+ssh-keyscan
+ssh-keysign
+ssh-pkcs11-helper
+sshd
+stamp-h.in
+survey
+survey.sh

Modified: head/crypto/openssh/ChangeLog
==============================================================================
--- head/crypto/openssh/ChangeLog	Tue Jan 19 17:40:29 2016	(r294331)
+++ head/crypto/openssh/ChangeLog	Tue Jan 19 18:28:23 2016	(r294332)
@@ -1,3817 +1,8584 @@
-20131006
- - (djm) Release OpenSSH-6.7
+commit 9f82e5a9042f2d872e98f48a876fcab3e25dd9bb
+Author: Tim Rice <tim@multitalents.net>
+Date:   Mon Mar 16 22:49:20 2015 -0700
 
-20141003
- - (djm) [sshd_config.5] typo; from Iain Morgan
+    portability fix: Solaris systems may not have a grep that understands -q
 
-20141001
- - (djm) [openbsd-compat/Makefile.in openbsd-compat/kludge-fd_set.c]
-   [openbsd-compat/openbsd-compat.h] Kludge around bad glibc
-   _FORTIFY_SOURCE check that doesn't grok heap-allocated fd_sets;
-   ok dtucker@
-
-20140910
- - (djm) [sandbox-seccomp-filter.c] Allow mremap and exit for DietLibc;
-   patch from Felix von Leitner; ok dtucker
-
-20140908
- - (dtucker) [INSTALL] Update info about egd.  ok djm@
-
-20140904
- - (djm) [openbsd-compat/arc4random.c] Zero seed after keying PRNG
-
-20140903
- - (djm) [defines.h sshbuf.c] Move __predict_true|false to defines.h and
-   conditionalise to avoid duplicate definition.
- - (djm) [contrib/cygwin/ssh-host-config] Fix old code leading to
-   permissions/ACLs; from Corinna Vinschen
-
-20140830
- - (djm) [openbsd-compat/openssl-compat.h] add
-   OPENSSL_[RD]SA_MAX_MODULUS_BITS defines for OpenSSL that lacks them
- - (djm) [misc.c] Missing newline between functions
- - (djm) [openbsd-compat/openssl-compat.h] add include guard
- - (djm) [Makefile.in] Make TEST_SHELL a variable; "good idea" tim@
-
-20140827
- - (djm) [regress/unittests/sshbuf/test_sshbuf_getput_crypto.c]
-   [regress/unittests/sshbuf/test_sshbuf_getput_fuzz.c]
-   [regress/unittests/sshkey/common.c]
-   [regress/unittests/sshkey/test_file.c]
-   [regress/unittests/sshkey/test_fuzz.c]
-   [regress/unittests/sshkey/test_sshkey.c] Don't include openssl/ec.h
-   on !ECC OpenSSL systems
- - (djm) [monitor.c sshd.c] SIGXFSZ needs to be ignored in postauth
-   monitor, not preauth; bz#2263
- - (djm) [openbsd-compat/explicit_bzero.c] implement explicit_bzero()
-   using memset_s() where possible; improve fallback to indirect bzero
-   via a volatile pointer to give it more of a chance to avoid being
-   optimised away.
-
-20140825
- - (djm) [bufec.c] Skip this file on !ECC OpenSSL
- - (djm) [INSTALL] Recommend libcrypto be built -fPIC, mention LibreSSL,
-   update OpenSSL version requirement.
-
-20140824
- - (djm) [sftp-server.c] Some systems (e.g. Irix) have prctl() but not
-   PR_SET_DUMPABLE, so adjust ifdef; reported by Tom Christensen
-
-20140823
- - (djm) [sshd.c] Ignore SIGXFSZ in preauth monitor child; can explode on
-   lastlog writing on platforms with high UIDs; bz#2263
- - (djm) [configure.ac] We now require a working vsnprintf everywhere (not
-   just for systems that lack asprintf); check for it always and extend
-   test to catch more brokenness. Fixes builds on Solaris <= 9
-
-20140822
- - (djm) [configure.ac] include leading zero characters in OpenSSL version
-   number; fixes test for unsupported versions
- - (djm) [sshbuf-getput-crypto.c] Fix compilation when OpenSSL lacks ECC
- - (djm) [openbsd-compat/bsd-snprintf.c] Fix compilation failure (prototype/
-   definition mismatch) and warning for broken/missing snprintf case.
- - (djm) [configure.ac] double braces to appease autoconf
-
-20140821
- - (djm) [Makefile.in] fix reference to libtest_helper.a in sshkey test too.
- - (djm) [key.h] Fix ifdefs for no-ECC OpenSSL
- - (djm) [regress/unittests/test_helper/test_helper.c] Fix for systems that
-   don't set __progname. Diagnosed by Tom Christensen.
-
-20140820
- - (djm) [configure.ac] Check OpenSSL version is supported at configure time;
-   suggested by Kevin Brott
- - (djm) [Makefile.in] refer to libtest_helper.a by explicit path rather than
-   -L/-l; fixes linking problems on some platforms
- - (djm) [sshkey.h] Fix compilation when OpenSSL lacks ECC
- - (djm) [contrib/cygwin/README] Correct build instructions; from Corinna
-
-20140819
- - (djm) [serverloop.c] Fix syntax error on Cygwin; from Corinna Vinschen
- - (djm) [sshbuf.h] Fix compilation on systems without OPENSSL_HAS_ECC.
- - (djm) [ssh-dss.c] Include openssl/dsa.h for DSA_SIG
- - (djm) [INSTALL contrib/caldera/openssh.spec contrib/cygwin/README]
-   [contrib/redhat/openssh.spec contrib/suse/openssh.spec] Remove mentions
-   of TCP wrappers.
-
-20140811
- - (djm) [myproposal.h] Make curve25519 KEX dependent on
-   HAVE_EVP_SHA256 instead of OPENSSL_HAS_ECC.
-
-20140810
- - (djm) [README contrib/caldera/openssh.spec]
-   [contrib/redhat/openssh.spec contrib/suse/openssh.spec] Update versions
-
-20140801
- - (djm) [regress/multiplex.sh] Skip test for non-OpenBSD netcat. We need
-   a better solution, but this will have to do for now.
- - (djm) [regress/multiplex.sh] Instruct nc not to quit as soon as stdin
-   is closed; avoid regress failures when stdin is /dev/null
- - (djm) [regress/multiplex.sh] Use -d (detach stdin) flag to disassociate
-   nc from stdin, it's more portable
-
-20140730
- - OpenBSD CVS Sync
-   - millert@cvs.openbsd.org 2014/07/24 22:57:10
-     [ssh.1]
-     Mention UNIX-domain socket forwarding too.  OK jmc@ deraadt@
-   - dtucker@cvs.openbsd.org 2014/07/25 21:22:03
-     [ssh-agent.c]
-     Clear buffer used for handling messages.  This prevents keys being
-     left in memory after they have been expired or deleted in some cases
-     (but note that ssh-agent is setgid so you would still need root to
-     access them).  Pointed out by Kevin Burns, ok deraadt
-   - schwarze@cvs.openbsd.org 2014/07/28 15:40:08
-     [sftp-server.8 sshd_config.5]
-     some systems no longer need /dev/log;
-     issue noticed by jirib;
-     ok deraadt
-
-20140725
- - (djm) [regress/multiplex.sh] restore incorrectly deleted line;
-   pointed out by Christian Hesse
-
-20140722
- - (djm) [regress/multiplex.sh] ssh mux master lost -N somehow;
-   put it back
- - (djm) [regress/multiplex.sh] change the test for still-open Unix
-   domain sockets to be robust against nc implementations that produce
-   error messages.
- - (dtucker) [regress/unittests/sshkey/test_{file,fuzz,sshkey}.c] Wrap ecdsa-
-   specific tests inside OPENSSL_HAS_ECC.
- - (dtucker) OpenBSD CVS Sync
-   - dtucker@cvs.openbsd.org 2014/07/22 01:18:50
-     [key.c]
-     Prevent spam from key_load_private_pem during hostbased auth.  ok djm@
-   - guenther@cvs.openbsd.org 2014/07/22 07:13:42
-     [umac.c]
-     Convert from <sys/endian.h> to the shiney new <endian.h>
-     ok dtucker@, who also confirmed that -portable handles this already
-     (ID sync only, includes.h pulls in endian.h if available.)
-   - djm@cvs.openbsd.org 2014/07/22 01:32:12
-     [regress/multiplex.sh]
-     change the test for still-open Unix domain sockets to be robust against
-     nc implementations that produce error messages. from -portable
-     (Id sync only)
-   - dtucker@cvs.openbsd.org 2014/07/22 23:23:22
-     [regress/unittests/sshkey/mktestdata.sh]
-     Sign test certs with ed25519 instead of ecdsa so that they'll work in
-     -portable on platforms that don't have ECDSA in their OpenSSL.  ok djm
-   - dtucker@cvs.openbsd.org 2014/07/22 23:57:40
-     [regress/unittests/sshkey/mktestdata.sh]
-     Add $OpenBSD tag to make syncs easier
-   - dtucker@cvs.openbsd.org 2014/07/22 23:35:38
-     [regress/unittests/sshkey/testdata/*]
-     Regenerate test keys with certs signed with ed25519 instead of ecdsa.
-     These can be used in -portable on platforms that don't support ECDSA.
-
-20140721
- - OpenBSD CVS Sync
-   - millert@cvs.openbsd.org 2014/07/15 15:54:15
-     [forwarding.sh multiplex.sh]
-     Add support for Unix domain socket forwarding.  A remote TCP port
-     may be forwarded to a local Unix domain socket and vice versa or
-     both ends may be a Unix domain socket.  This is a reimplementation
-     of the streamlocal patches by William Ahern from:
-         http://www.25thandclement.com/~william/projects/streamlocal.html
-     OK djm@ markus@
- - (djm) [regress/multiplex.sh] Not all netcat accept the -N option.
- - (dtucker) [sshkey.c] ifdef out unused variable when compiling without
-   OPENSSL_HAS_ECC.
-
-20140721
- - (dtucker) [cipher.c openbsd-compat/openssl-compat.h] Restore the bits
-   needed to build AES CTR mode against OpenSSL 0.9.8f and above.  ok djm
- - (dtucker) [regress/unittests/sshkey/
-   {common,test_file,test_fuzz,test_sshkey}.c] Wrap stdint.h includes in
-   ifdefs.
-
-20140719
- - (tim) [openbsd-compat/port-uw.c] Include misc.h for fwd_opts, used
-   in servconf.h.
-
-20140718
- - OpenBSD CVS Sync
-   - millert@cvs.openbsd.org 2014/07/15 15:54:14
-     [PROTOCOL auth-options.c auth-passwd.c auth-rh-rsa.c auth-rhosts.c]
-     [auth-rsa.c auth.c auth1.c auth2-hostbased.c auth2-kbdint.c auth2-none.c]
-     [auth2-passwd.c auth2-pubkey.c auth2.c canohost.c channels.c channels.h]
-     [clientloop.c misc.c misc.h monitor.c mux.c packet.c readconf.c]
-     [readconf.h servconf.c servconf.h serverloop.c session.c ssh-agent.c]
-     [ssh.c ssh_config.5 sshconnect.c sshconnect1.c sshconnect2.c sshd.c]
-     [sshd_config.5 sshlogin.c]
-     Add support for Unix domain socket forwarding.  A remote TCP port
-     may be forwarded to a local Unix domain socket and vice versa or
-     both ends may be a Unix domain socket.  This is a reimplementation
-     of the streamlocal patches by William Ahern from:
-         http://www.25thandclement.com/~william/projects/streamlocal.html
-     OK djm@ markus@
-   - jmc@cvs.openbsd.org 2014/07/16 14:48:57
-     [ssh.1]
-     add the streamlocal* options to ssh's -o list; millert says they're
-     irrelevant for scp/sftp;
-     ok markus millert
-   - djm@cvs.openbsd.org 2014/07/17 00:10:56
-     [sandbox-systrace.c]
-     ifdef SYS_sendsyslog so this will compile without patching on -stable
-   - djm@cvs.openbsd.org 2014/07/17 00:10:18
-     [mux.c]
-     preserve errno across syscall
-   - djm@cvs.openbsd.org 2014/07/17 00:12:03
-     [key.c]
-     silence "incorrect passphrase" error spam; reported and ok dtucker@
-   - djm@cvs.openbsd.org 2014/07/17 07:22:19
-     [mux.c ssh.c]
-     reflect stdio-forward ("ssh -W host:port ...") failures in exit status.
-     previously we were always returning 0. bz#2255 reported by Brendan
-     Germain; ok dtucker
-   - djm@cvs.openbsd.org 2014/07/18 02:46:01
-     [ssh-agent.c]
-     restore umask around listener socket creation (dropped in streamlocal patch
-     merge)
- - (dtucker) [auth2-gss.c gss-serv-krb5.c] Include misc.h for fwd_opts, used
-   in servconf.h.
- - (dtucker) [Makefile.in] Add a t-exec target to run just the executable
-   tests.
- - (dtucker) [key.c sshkey.c] Put new ecdsa bits inside ifdef OPENSSL_HAS_ECC.
-
-20140717
- - (djm) [digest-openssl.c] Preserve array order when disabling digests.
-   Reported by Petr Lautrbach.
- - OpenBSD CVS Sync
-   - deraadt@cvs.openbsd.org 2014/07/11 08:09:54
-     [sandbox-systrace.c]
-     Permit use of SYS_sendsyslog from inside the sandbox.  Clock is ticking,
-     update your kernels and sshd soon.. libc will start using sendsyslog()
-     in about 4 days.
-   - tedu@cvs.openbsd.org 2014/07/11 13:54:34
-     [myproposal.h]
-     by popular demand, add back hamc-sha1 to server proposal for better compat
-     with many clients still in use. ok deraadt
-
-20140715
- - (djm) [configure.ac] Delay checks for arc4random* until after libcrypto
-   has been located; fixes builds agains libressl-portable
-
-20140711
- - OpenBSD CVS Sync
-   - benno@cvs.openbsd.org 2014/07/09 14:15:56
-     [ssh-add.c]
-     fix ssh-add crash while loading more than one key
-     ok markus@
+commit 8ef691f7d9ef500257a549d0906d78187490668f
+Author: Damien Miller <djm@google.com>
+Date:   Wed Mar 11 10:35:26 2015 +1100
 
-20140709
- - OpenBSD CVS Sync
-   - djm@cvs.openbsd.org 2014/07/07 08:19:12
-     [ssh_config.5]
-     mention that ProxyCommand is executed using shell "exec" to avoid
-     a lingering process; bz#1977
-   - djm@cvs.openbsd.org 2014/07/09 01:45:10
-     [sftp.c]
-     more useful error message when GLOB_NOSPACE occurs;
-     bz#2254, patch from Orion Poplawski
-   - djm@cvs.openbsd.org 2014/07/09 03:02:15
-     [key.c]
-     downgrade more error() to debug() to better match what old authfile.c
-     did; suppresses spurious errors with hostbased authentication enabled
-   - djm@cvs.openbsd.org 2014/07/06 07:42:03
-     [multiplex.sh test-exec.sh]
-     add a hook to the cleanup() function to kill $SSH_PID if it is set
-     
-     use it to kill the mux master started in multiplex.sh (it was being left
-     around on fatal failures)
-   - djm@cvs.openbsd.org 2014/07/07 08:15:26
-     [multiplex.sh]
-     remove forced-fatal that I stuck in there to test the new cleanup
-     logic and forgot to remove...
-
-20140706
- - OpenBSD CVS Sync
-   - djm@cvs.openbsd.org 2014/07/03 23:18:35
-     [authfile.h]
-     remove leakmalloc droppings
-   - djm@cvs.openbsd.org 2014/07/05 23:11:48
-     [channels.c]
-     fix remote-forward cancel regression; ok markus@
-
-20140704
- - OpenBSD CVS Sync
-   - jsing@cvs.openbsd.org 2014/07/03 12:42:16
-     [cipher-chachapoly.c]
-     Call chacha_ivsetup() immediately before chacha_encrypt_bytes() - this
-     makes it easier to verify that chacha_encrypt_bytes() is only called once
-     per chacha_ivsetup() call.
-     ok djm@
-   - djm@cvs.openbsd.org 2014/07/03 22:23:46
-     [sshconnect.c]
-     when rekeying, skip file/DNS lookup if it is the same as the key sent
-     during initial key exchange. bz#2154 patch from Iain Morgan; ok markus@
-   - djm@cvs.openbsd.org 2014/07/03 22:33:41
-     [channels.c]
-     allow explicit ::1 and 127.0.0.1 forwarding bind addresses when
-     GatewayPorts=no; allows client to choose address family;
-     bz#2222 ok markus@
-   - djm@cvs.openbsd.org 2014/07/03 22:40:43
-     [servconf.c servconf.h session.c sshd.8 sshd_config.5]
-     Add a sshd_config PermitUserRC option to control whether ~/.ssh/rc is
-     executed, mirroring the no-user-rc authorized_keys option;
-     bz#2160; ok markus@
-
-20140703
- - (djm) [digest-openssl.c configure.ac] Disable RIPEMD160 if libcrypto
-   doesn't support it.
- - (djm) [monitor_fdpass.c] Use sys/poll.h if poll.h doesn't exist;
-   bz#2237
- - OpenBSD CVS Sync
-   - djm@cvs.openbsd.org 2014/07/03 01:45:38
-     [sshkey.c]
-     make Ed25519 keys' title fit properly in the randomart border; bz#2247
-     based on patch from Christian Hesse
-   - djm@cvs.openbsd.org 2014/07/03 03:11:03
-     [ssh-agent.c]
-     Only cleanup agent socket in the main agent process and not in any
-     subprocesses it may have started (e.g. forked askpass). Fixes
-     agent sockets being zapped when askpass processes fatal();
-     bz#2236 patch from Dmitry V. Levin
-   - djm@cvs.openbsd.org 2014/07/03 03:15:01
-     [ssh-add.c]
-     make stdout line-buffered; saves partial output getting lost when
-     ssh-add fatal()s part-way through (e.g. when listing keys from an
-     agent that supports key types that ssh-add doesn't);
-     bz#2234, reported by Phil Pennock
-   - djm@cvs.openbsd.org 2014/07/03 03:26:43
-     [digest-openssl.c]
-     use EVP_Digest() for one-shot hash instead of creating, updating,
-     finalising and destroying a context.
-     bz#2231, based on patch from Timo Teras
-   - djm@cvs.openbsd.org 2014/07/03 03:34:09
-     [gss-serv.c session.c ssh-keygen.c]
-     standardise on NI_MAXHOST for gethostname() string lengths; about
-     1/2 the cases were using it already. Fixes bz#2239 en passant
-   - djm@cvs.openbsd.org 2014/07/03 03:47:27
-     [ssh-keygen.c]
-     When hashing or removing hosts using ssh-keygen, don't choke on
-     @revoked markers and don't remove @cert-authority markers;
-     bz#2241, reported by mlindgren AT runelind.net
-   - djm@cvs.openbsd.org 2014/07/03 04:36:45
-     [digest.h]
-     forward-declare struct sshbuf so consumers don't need to include sshbuf.h
-   - djm@cvs.openbsd.org 2014/07/03 05:32:36
-     [ssh_config.5]
-     mention '%%' escape sequence in HostName directives and how it may
-     be used to specify IPv6 link-local addresses
-   - djm@cvs.openbsd.org 2014/07/03 05:38:17
-     [ssh.1]
-     document that -g will only work in the multiplexed case if applied to
-     the mux master
-   - djm@cvs.openbsd.org 2014/07/03 06:39:19
-     [ssh.c ssh_config.5]
-     Add a %C escape sequence for LocalCommand and ControlPath that expands
-     to a unique identifer based on a has of the tuple of (local host,
-     remote user, hostname, port).
-     
-     Helps avoid exceeding sockaddr_un's miserly pathname limits for mux
-     control paths.
-     
-     bz#2220, based on patch from mancha1 AT zoho.com; ok markus@
-   - jmc@cvs.openbsd.org 2014/07/03 07:45:27
-     [ssh_config.5]
-     escape %C since groff thinks it part of an Rs/Re block;
-   - djm@cvs.openbsd.org 2014/07/03 11:16:55
-     [auth.c auth.h auth1.c auth2.c]
-     make the "Too many authentication failures" message include the
-     user, source address, port and protocol in a format similar to the
-     authentication success / failure messages; bz#2199, ok dtucker
-
-20140702
- - OpenBSD CVS Sync
-   - deraadt@cvs.openbsd.org 2014/06/13 08:26:29
-     [sandbox-systrace.c]
-     permit SYS_getentropy
-     from matthew
-   - matthew@cvs.openbsd.org 2014/06/18 02:59:13
-     [sandbox-systrace.c]
-     Now that we have a dedicated getentropy(2) system call for
-     arc4random(3), we can disallow __sysctl(2) in OpenSSH's systrace
-     sandbox.
-     
-     ok djm
-   - naddy@cvs.openbsd.org 2014/06/18 15:42:09
-     [sshbuf-getput-crypto.c]
-     The ssh_get_bignum functions must accept the same range of bignums
-     the corresponding ssh_put_bignum functions create.  This fixes the
-     use of 16384-bit RSA keys (bug reported by Eivind Evensen).
-     ok djm@
-   - djm@cvs.openbsd.org 2014/06/24 00:52:02
-     [krl.c]
-     fix bug in KRL generation: multiple consecutive revoked certificate
-     serial number ranges could be serialised to an invalid format.
-     
-     Readers of a broken KRL caused by this bug will fail closed, so no
-     should-have-been-revoked key will be accepted.
-   - djm@cvs.openbsd.org 2014/06/24 01:13:21
-     [Makefile.in auth-bsdauth.c auth-chall.c auth-options.c auth-rsa.c
-     [auth2-none.c auth2-pubkey.c authfile.c authfile.h cipher-3des1.c
-     [cipher-chachapoly.c cipher-chachapoly.h cipher.c cipher.h
-     [digest-libc.c digest-openssl.c digest.h dns.c entropy.c hmac.h
-     [hostfile.c key.c key.h krl.c monitor.c packet.c rsa.c rsa.h
-     [ssh-add.c ssh-agent.c ssh-dss.c ssh-ecdsa.c ssh-ed25519.c
-     [ssh-keygen.c ssh-pkcs11-client.c ssh-pkcs11-helper.c ssh-pkcs11.c
-     [ssh-rsa.c sshbuf-misc.c sshbuf.h sshconnect.c sshconnect1.c
-     [sshconnect2.c sshd.c sshkey.c sshkey.h
-     [openbsd-compat/openssl-compat.c openbsd-compat/openssl-compat.h]
-     New key API: refactor key-related functions to be more library-like,
-     existing API is offered as a set of wrappers.
-     
-     with and ok markus@
-     
-     Thanks also to Ben Hawkes, David Tomaschik, Ivan Fratric, Matthew
-     Dempsky and Ron Bowes for a detailed review a few months ago.
-     NB. This commit also removes portable OpenSSH support for OpenSSL
-     <0.9.8e.
-   - djm@cvs.openbsd.org 2014/06/24 02:19:48
-     [ssh.c]
-     don't fatal() when hostname canonicalisation fails with a
-     ProxyCommand in use; continue and allow the ProxyCommand to
-     connect anyway (e.g. to a host with a name outside the DNS
-     behind a bastion)
-   - djm@cvs.openbsd.org 2014/06/24 02:21:01
-     [scp.c]
-     when copying local->remote fails during read, don't send uninitialised
-     heap to the remote end. Reported by Jann Horn
-   - deraadt@cvs.openbsd.org 2014/06/25 14:16:09
-     [sshbuf.c]
-     unblock SIGSEGV before raising it
-     ok djm
-   - markus@cvs.openbsd.org 2014/06/27 16:41:56
-     [channels.c channels.h clientloop.c ssh.c]
-     fix remote fwding with same listen port but different listen address
-     with gerhard@, ok djm@
-   - markus@cvs.openbsd.org 2014/06/27 18:50:39
-     [ssh-add.c]
-     fix loading of private keys
-   - djm@cvs.openbsd.org 2014/06/30 12:54:39
-     [key.c]
-     suppress spurious error message when loading key with a passphrase;
-     reported by kettenis@ ok markus@
-   - djm@cvs.openbsd.org 2014/07/02 04:59:06
-     [cipher-3des1.c]
-     fix ssh protocol 1 on the server that regressed with the sshkey change
-     (sometimes fatal() after auth completed), make file return useful status
-     codes.
-     NB. Id sync only for these two. They were bundled into the sshkey merge
-     above, since it was easier to sync the entire file and then apply
-     portable-specific changed atop it.
-   - djm@cvs.openbsd.org 2014/04/30 05:32:00
-     [regress/Makefile]
-     unit tests for new buffer API; including basic fuzz testing
-     NB. Id sync only.
-   - djm@cvs.openbsd.org 2014/05/21 07:04:21
-     [regress/integrity.sh]
-     when failing because of unexpected output, show the offending output
-   - djm@cvs.openbsd.org 2014/06/24 01:04:43
-     [regress/krl.sh]
-     regress test for broken consecutive revoked serial number ranges
-   - djm@cvs.openbsd.org 2014/06/24 01:14:17
-     [Makefile.in regress/Makefile regress/unittests/Makefile]
-     [regress/unittests/sshkey/Makefile]
-     [regress/unittests/sshkey/common.c]
-     [regress/unittests/sshkey/common.h]
-     [regress/unittests/sshkey/mktestdata.sh]
-     [regress/unittests/sshkey/test_file.c]
-     [regress/unittests/sshkey/test_fuzz.c]
-     [regress/unittests/sshkey/test_sshkey.c]
-     [regress/unittests/sshkey/tests.c]
-     [regress/unittests/sshkey/testdata/dsa_1]
-     [regress/unittests/sshkey/testdata/dsa_1-cert.fp]
-     [regress/unittests/sshkey/testdata/dsa_1-cert.pub]
-     [regress/unittests/sshkey/testdata/dsa_1.fp]
-     [regress/unittests/sshkey/testdata/dsa_1.fp.bb]
-     [regress/unittests/sshkey/testdata/dsa_1.param.g]
-     [regress/unittests/sshkey/testdata/dsa_1.param.priv]
-     [regress/unittests/sshkey/testdata/dsa_1.param.pub]
-     [regress/unittests/sshkey/testdata/dsa_1.pub]
-     [regress/unittests/sshkey/testdata/dsa_1_pw]
-     [regress/unittests/sshkey/testdata/dsa_2]
-     [regress/unittests/sshkey/testdata/dsa_2.fp]
-     [regress/unittests/sshkey/testdata/dsa_2.fp.bb]
-     [regress/unittests/sshkey/testdata/dsa_2.pub]
-     [regress/unittests/sshkey/testdata/dsa_n]
-     [regress/unittests/sshkey/testdata/dsa_n_pw]
-     [regress/unittests/sshkey/testdata/ecdsa_1]
-     [regress/unittests/sshkey/testdata/ecdsa_1-cert.fp]
-     [regress/unittests/sshkey/testdata/ecdsa_1-cert.pub]
-     [regress/unittests/sshkey/testdata/ecdsa_1.fp]
-     [regress/unittests/sshkey/testdata/ecdsa_1.fp.bb]
-     [regress/unittests/sshkey/testdata/ecdsa_1.param.curve]
-     [regress/unittests/sshkey/testdata/ecdsa_1.param.priv]
-     [regress/unittests/sshkey/testdata/ecdsa_1.param.pub]
-     [regress/unittests/sshkey/testdata/ecdsa_1.pub]
-     [regress/unittests/sshkey/testdata/ecdsa_1_pw]
-     [regress/unittests/sshkey/testdata/ecdsa_2]
-     [regress/unittests/sshkey/testdata/ecdsa_2.fp]
-     [regress/unittests/sshkey/testdata/ecdsa_2.fp.bb]
-     [regress/unittests/sshkey/testdata/ecdsa_2.param.curve]
-     [regress/unittests/sshkey/testdata/ecdsa_2.param.priv]
-     [regress/unittests/sshkey/testdata/ecdsa_2.param.pub]
-     [regress/unittests/sshkey/testdata/ecdsa_2.pub]
-     [regress/unittests/sshkey/testdata/ecdsa_n]
-     [regress/unittests/sshkey/testdata/ecdsa_n_pw]
-     [regress/unittests/sshkey/testdata/ed25519_1]
-     [regress/unittests/sshkey/testdata/ed25519_1-cert.fp]
-     [regress/unittests/sshkey/testdata/ed25519_1-cert.pub]
-     [regress/unittests/sshkey/testdata/ed25519_1.fp]
-     [regress/unittests/sshkey/testdata/ed25519_1.fp.bb]
-     [regress/unittests/sshkey/testdata/ed25519_1.pub]
-     [regress/unittests/sshkey/testdata/ed25519_1_pw]
-     [regress/unittests/sshkey/testdata/ed25519_2]
-     [regress/unittests/sshkey/testdata/ed25519_2.fp]
-     [regress/unittests/sshkey/testdata/ed25519_2.fp.bb]
-     [regress/unittests/sshkey/testdata/ed25519_2.pub]
-     [regress/unittests/sshkey/testdata/pw]
-     [regress/unittests/sshkey/testdata/rsa1_1]
-     [regress/unittests/sshkey/testdata/rsa1_1.fp]
-     [regress/unittests/sshkey/testdata/rsa1_1.fp.bb]
-     [regress/unittests/sshkey/testdata/rsa1_1.param.n]
-     [regress/unittests/sshkey/testdata/rsa1_1.pub]
-     [regress/unittests/sshkey/testdata/rsa1_1_pw]
-     [regress/unittests/sshkey/testdata/rsa1_2]
-     [regress/unittests/sshkey/testdata/rsa1_2.fp]
-     [regress/unittests/sshkey/testdata/rsa1_2.fp.bb]
-     [regress/unittests/sshkey/testdata/rsa1_2.param.n]
-     [regress/unittests/sshkey/testdata/rsa1_2.pub]
-     [regress/unittests/sshkey/testdata/rsa_1]
-     [regress/unittests/sshkey/testdata/rsa_1-cert.fp]
-     [regress/unittests/sshkey/testdata/rsa_1-cert.pub]
-     [regress/unittests/sshkey/testdata/rsa_1.fp]
-     [regress/unittests/sshkey/testdata/rsa_1.fp.bb]
-     [regress/unittests/sshkey/testdata/rsa_1.param.n]
-     [regress/unittests/sshkey/testdata/rsa_1.param.p]
-     [regress/unittests/sshkey/testdata/rsa_1.param.q]
-     [regress/unittests/sshkey/testdata/rsa_1.pub]
-     [regress/unittests/sshkey/testdata/rsa_1_pw]
-     [regress/unittests/sshkey/testdata/rsa_2]
-     [regress/unittests/sshkey/testdata/rsa_2.fp]
-     [regress/unittests/sshkey/testdata/rsa_2.fp.bb]
-     [regress/unittests/sshkey/testdata/rsa_2.param.n]
-     [regress/unittests/sshkey/testdata/rsa_2.param.p]
-     [regress/unittests/sshkey/testdata/rsa_2.param.q]
-     [regress/unittests/sshkey/testdata/rsa_2.pub]
-     [regress/unittests/sshkey/testdata/rsa_n]
-     [regress/unittests/sshkey/testdata/rsa_n_pw]
-     unit and fuzz tests for new key API
- - (djm) [sshkey.c] Conditionalise inclusion of util.h
- - (djm) [regress/Makefile] fix execution of sshkey unit/fuzz test
-
-20140618
- - (tim) [openssh/session.c] Work around to get chroot sftp working on UnixWare
-
-20140617
- - (dtucker) [entropy.c openbsd-compat/openssl-compat.{c,h}
-   openbsd-compat/regress/{.cvsignore,Makefile.in,opensslvertest.c}]
-   Move the OpenSSL header/library version test into its own function and add
-   tests for it. Fix it to allow fix version upgrades (but not downgrades).
-   Prompted by chl@ via OpenSMTPD (issue #462) and Debian (bug #748150).
-   ok djm@ chl@
-
-20140616
- - (dtucker) [defines.h] Fix undef of _PATH_MAILDIR.  From rak at debian via
-   OpenSMTPD and chl@
-
-20140612
- - (dtucker) [configure.ac] Remove tcpwrappers support, support has already
-   been removed from sshd.c.
-
-20140611
- - (dtucker) [defines.h] Add va_copy if we don't already have it, taken from
-   openbsd-compat/bsd-asprintf.c.
- - (dtucker) [regress/unittests/sshbuf/*.c regress/unittests/test_helper/*]
-   Wrap stdlib.h include an ifdef for platforms that don't have it.
- - (tim) [regress/unittests/test_helper/test_helper.h] Add includes.h for
-   u_intXX_t types.
-
-20140610
- - (dtucker) [regress/unittests/sshbuf/test_sshbuf_getput_crypto.c
-   regress/unittests/sshbuf/test_sshbuf_getput_fuzz.c] Only do NISTP256
-   curve tests if OpenSSL has them.
- - (dtucker) [myprosal.h] Don't include curve25519-sha256@libssh.org in
-   the proposal if the version of OpenSSL we're using doesn't support ECC.
- - (dtucker) [regress/unittests/sshbuf/test_sshbuf_getput_fuzz.c] ifdef
-   ECC variable too.
- - (dtucker) OpenBSD CVS Sync
-   - djm@cvs.openbsd.org 2014/06/05 22:17:50
-     [sshconnect2.c]
-     fix inverted test that caused PKCS#11 keys that were explicitly listed
-     not to be preferred. Reported by Dirk-Willem van Gulik
-   - dtucker@cvs.openbsd.org 2014/06/10 21:46:11
-     [sshbuf.h]
-     Group ECC functions together to make things a little easier in -portable.
-     "doesn't bother me" deraadt@
- - (dtucker) [sshbuf.h] Only declare ECC functions if building without
-   OpenSSL or if OpenSSL has ECC.
- - (dtucker) [openbsd-compat/arc4random.c] Use explicit_bzero instead of an
-   assigment that might get optimized out.  ok djm@
- - (dtucker) [bufaux.c bufbn.c bufec.c buffer.c] Pull in includes.h for
-   compat stuff, specifically whether or not OpenSSL has ECC.
-
-20140527
- - (djm) [cipher.c] Fix merge botch.
- - (djm) [contrib/cygwin/ssh-host-config] Updated Cygwin ssh-host-config
-   from Corinna Vinschen, fixing a number of bugs and preparing for
-   Cygwin 1.7.30.
- - (djm) [configure.ac openbsd-compat/bsd-cygwin_util.c]
-   [openbsd-compat/bsd-cygwin_util.h] On Cygwin, determine privilege
-   separation user at runtime, since it may need to be a domain account.
-   Patch from Corinna Vinschen.
-
-20140522
- - (djm) [Makefile.in] typo in path
-
-20140521
- - (djm) [commit configure.ac defines.h sshpty.c] don't attempt to use
-   vhangup on Linux. It doens't work for non-root users, and for them
-   it just messes up the tty settings.
- - (djm) [misc.c] Use CLOCK_BOOTTIME in preference to CLOCK_MONOTONIC
-   when it is available. It takes into account time spent suspended,
-   thereby ensuring timeouts (e.g. for expiring agent keys) fire
-   correctly. bz#2228 reported by John Haxby
-
-20140519
- - (djm) [rijndael.c rijndael.h] Sync with newly-ressurected versions ine
-   OpenBSD
- - OpenBSD CVS Sync
-   - logan@cvs.openbsd.org 2014/04/20 09:24:26
-     [dns.c dns.h ssh-keygen.c]
-     Add support for SSHFP DNS records for ED25519 key types.
-     OK from djm@
-   - logan@cvs.openbsd.org 2014/04/21 14:36:16
-     [sftp-client.c sftp-client.h sftp.c]
-     Implement sftp upload resume support.
-     OK from djm@, with input from guenther@, mlarkin@ and
-     okan@
-   - logan@cvs.openbsd.org 2014/04/22 10:07:12
-     [sftp.c]
-     Sort the sftp command list.
-     OK from djm@
-   - logan@cvs.openbsd.org 2014/04/22 12:42:04
-     [sftp.1]
-     Document sftp upload resume.
-     OK from djm@, with feedback from okan@.
-   - jmc@cvs.openbsd.org 2014/04/22 14:16:30
-     [sftp.1]
-     zap eol whitespace;
-   - djm@cvs.openbsd.org 2014/04/23 12:42:34
-     [readconf.c]
-     don't record duplicate IdentityFiles
-   - djm@cvs.openbsd.org 2014/04/28 03:09:18
-     [authfile.c bufaux.c buffer.h channels.c krl.c mux.c packet.c packet.h]
-     [ssh-keygen.c]
-     buffer_get_string_ptr's return should be const to remind
-     callers that futzing with it will futz with the actual buffer
-     contents
-   - djm@cvs.openbsd.org 2014/04/29 13:10:30
-     [clientloop.c serverloop.c]
-     bz#1818 - don't send channel success/failre replies on channels that
-     have sent a close already; analysis and patch from Simon Tatham;
-     ok markus@
-   - markus@cvs.openbsd.org 2014/04/29 18:01:49
-     [auth.c authfd.c authfile.c bufaux.c cipher.c cipher.h hostfile.c]
-     [kex.c key.c mac.c monitor.c monitor_wrap.c myproposal.h packet.c]
-     [roaming_client.c ssh-agent.c ssh-keygen.c ssh-keyscan.c ssh-keysign.c]
-     [ssh-pkcs11.h ssh.c sshconnect.c sshconnect2.c sshd.c]
-     make compiling against OpenSSL optional (make OPENSSL=no);
-     reduces algorithms to curve25519, aes-ctr, chacha, ed25519;
-     allows us to explore further options; with and ok djm
-   - dtucker@cvs.openbsd.org 2014/04/29 19:58:50
-     [sftp.c]
-     Move nulling of variable next to where it's freed.  ok markus@
-   - dtucker@cvs.openbsd.org 2014/04/29 20:36:51
-     [sftp.c]
-     Don't attempt to append a nul quote char to the filename.  Should prevent
-     fatal'ing with "el_insertstr failed" when there's a single quote char
-     somewhere in the string.  bz#2238, ok markus@
-   - djm@cvs.openbsd.org 2014/04/30 05:29:56
-     [bufaux.c bufbn.c bufec.c buffer.c buffer.h sshbuf-getput-basic.c]
-     [sshbuf-getput-crypto.c sshbuf-misc.c sshbuf.c sshbuf.h ssherr.c]
-     [ssherr.h]
-     New buffer API; the first installment of the conversion/replacement
-     of OpenSSH's internals to make them usable as a standalone library.
-     
-     This includes a set of wrappers to make it compatible with the
-     existing buffer API so replacement can occur incrementally.
-     
-     With and ok markus@
-     
-     Thanks also to Ben Hawkes, David Tomaschik, Ivan Fratric, Matthew
-     Dempsky and Ron Bowes for a detailed review.
-   - naddy@cvs.openbsd.org 2014/04/30 19:07:48
-     [mac.c myproposal.h umac.c]
-     UMAC can use our local fallback implementation of AES when OpenSSL isn't
-     available.  Glue code straight from Ted Krovetz's original umac.c.
-     ok markus@
-   - djm@cvs.openbsd.org 2014/05/02 03:27:54
-     [chacha.h cipher-chachapoly.h digest.h hmac.h kex.h kexc25519.c]
-     [misc.h poly1305.h ssh-pkcs11.c defines.h]
-     revert __bounded change; it causes way more problems for portable than
-     it solves; pointed out by dtucker@
-   - markus@cvs.openbsd.org 2014/05/03 17:20:34
-     [monitor.c packet.c packet.h]
-     unbreak compression, by re-init-ing the compression code in the
-     post-auth child. the new buffer code is more strict, and requires
-     buffer_init() while the old code was happy after a bzero();
-     originally from djm@
-   - logan@cvs.openbsd.org 2014/05/05 07:02:30
-     [sftp.c]
-     Zap extra whitespace.
-     
-     OK from djm@ and dtucker@
- - (djm) [configure.ac] Unconditionally define WITH_OPENSSL until we write
-   portability glue to support building without libcrypto
- - (djm) [Makefile.in configure.ac sshbuf-getput-basic.c]
-   [sshbuf-getput-crypto.c sshbuf.c] compilation and portability fixes
- - OpenBSD CVS Sync
-   - djm@cvs.openbsd.org 2014/03/13 20:44:49
-     [login-timeout.sh]
-     this test is a sorry mess of race conditions; add another sleep
-     to avoid a failure on slow machines (at least until I find a
-     better way)
-   - djm@cvs.openbsd.org 2014/04/21 22:15:37
-     [dhgex.sh integrity.sh kextype.sh rekey.sh try-ciphers.sh]
-     repair regress tests broken by server-side default cipher/kex/mac changes
-     by ensuring that the option under test is included in the server's
-     algorithm list
-   - dtucker@cvs.openbsd.org 2014/05/03 18:46:14
-     [proxy-connect.sh]
-     Add tests for with and without compression, with and without privsep.
-   - logan@cvs.openbsd.org 2014/05/04 10:40:59
-     [connect-privsep.sh]
-     Remove the Z flag from the list of malloc options as it
-     was removed from malloc.c 10 days ago.
-     
-     OK from miod@
- - (djm) [regress/unittests/Makefile]
-   [regress/unittests/Makefile.inc]
-   [regress/unittests/sshbuf/Makefile]
-   [regress/unittests/sshbuf/test_sshbuf.c]
-   [regress/unittests/sshbuf/test_sshbuf_fixed.c]
-   [regress/unittests/sshbuf/test_sshbuf_fuzz.c]
-   [regress/unittests/sshbuf/test_sshbuf_getput_basic.c]
-   [regress/unittests/sshbuf/test_sshbuf_getput_crypto.c]
-   [regress/unittests/sshbuf/test_sshbuf_getput_fuzz.c]
-   [regress/unittests/sshbuf/test_sshbuf_misc.c]
-   [regress/unittests/sshbuf/tests.c]
-   [regress/unittests/test_helper/Makefile]
-   [regress/unittests/test_helper/fuzz.c]
-   [regress/unittests/test_helper/test_helper.c]
-   [regress/unittests/test_helper/test_helper.h]
-   Import new unit tests from OpenBSD; not yet hooked up to build.
- - (djm) [regress/Makefile Makefile.in]
-   [regress/unittests/sshbuf/test_sshbuf.c
-   [regress/unittests/sshbuf/test_sshbuf_fixed.c]
-   [regress/unittests/sshbuf/test_sshbuf_fuzz.c]
-   [regress/unittests/sshbuf/test_sshbuf_getput_basic.c]
-   [regress/unittests/sshbuf/test_sshbuf_getput_crypto.c]
-   [regress/unittests/sshbuf/test_sshbuf_getput_fuzz.c]
-   [regress/unittests/sshbuf/test_sshbuf_misc.c]
-   [regress/unittests/sshbuf/tests.c]
-   [regress/unittests/test_helper/fuzz.c]
-   [regress/unittests/test_helper/test_helper.c]
-   Hook new unit tests into the build and "make tests"
- - (djm) [sshbuf.c] need __predict_false
-
-20140430
- - (dtucker) [defines.h] Define __GNUC_PREREQ__ macro if we don't already
-   have it.  Only attempt to use __attribute__(__bounded__) for gcc.
-
-20140420
- - OpenBSD CVS Sync
-   - djm@cvs.openbsd.org 2014/03/03 22:22:30
-     [session.c]
-     ignore enviornment variables with embedded '=' or '\0' characters;
-     spotted by Jann Horn; ok deraadt@
-     Id sync only - portable already has this.
-   - djm@cvs.openbsd.org 2014/03/12 04:44:58
-     [ssh-keyscan.c]
-     scan for Ed25519 keys by default too
-   - djm@cvs.openbsd.org 2014/03/12 04:50:32
-     [auth-bsdauth.c ssh-keygen.c]
-     don't count on things that accept arguments by reference to clear
-     things for us on error; most things do, but it's unsafe form.
-   - djm@cvs.openbsd.org 2014/03/12 04:51:12
-     [authfile.c]
-     correct test that kdf name is not "none" or "bcrypt"
-   - naddy@cvs.openbsd.org 2014/03/12 13:06:59
-     [ssh-keyscan.1]
-     scan for Ed25519 keys by default too
-   - deraadt@cvs.openbsd.org 2014/03/15 17:28:26
-     [ssh-agent.c ssh-keygen.1 ssh-keygen.c]
-     Improve usage() and documentation towards the standard form. 
-     In particular, this line saves a lot of man page reading time.
-       usage: ssh-keygen [-q] [-b bits] [-t dsa | ecdsa | ed25519 | rsa | rsa1]
-                         [-N new_passphrase] [-C comment] [-f output_keyfile]
-     ok schwarze jmc
-   - tedu@cvs.openbsd.org 2014/03/17 19:44:10
-     [ssh.1]
-     old descriptions of des and blowfish are old. maybe ok deraadt
-   - tedu@cvs.openbsd.org 2014/03/19 14:42:44
-     [scp.1]
-     there is no need for rcp anymore
-     ok deraadt millert
-   - markus@cvs.openbsd.org 2014/03/25 09:40:03
-     [myproposal.h]
-     trimm default proposals.
-     
-     This commit removes the weaker pre-SHA2 hashes, the broken ciphers
-     (arcfour), and the broken modes (CBC) from the default configuration
-     (the patch only changes the default, all the modes are still available
-     for the config files).
-     
-     ok djm@, reminded by tedu@ & naddy@ and discussed with many
-   - deraadt@cvs.openbsd.org 2014/03/26 17:16:26
-     [myproposal.h]
-     The current sharing of myproposal[] between both client and server code
-     makes the previous diff highly unpallatable.  We want to go in that
-     direction for the server, but not for the client.  Sigh.
-     Brought up by naddy.
-   - markus@cvs.openbsd.org 2014/03/27 23:01:27
-     [myproposal.h ssh-keyscan.c sshconnect2.c sshd.c]
-     disable weak proposals in sshd, but keep them in ssh; ok djm@
-   - djm@cvs.openbsd.org 2014/03/26 04:55:35
-     [chacha.h cipher-chachapoly.h digest.h hmac.h kex.h kexc25519.c
-     [misc.h poly1305.h ssh-pkcs11.c]
-     use __bounded(...) attribute recently added to sys/cdefs.h instead of
-     longform __attribute__(__bounded(...));
-     
-     for brevity and a warning free compilation with llvm/clang
-   - tedu@cvs.openbsd.org 2014/03/26 19:58:37
-     [sshd.8 sshd.c]
-     remove libwrap support. ok deraadt djm mfriedl
-   - naddy@cvs.openbsd.org 2014/03/28 05:17:11
-     [ssh_config.5 sshd_config.5]
-     sync available and default algorithms, improve algorithm list formatting
-     help from jmc@ and schwarze@, ok deraadt@
-   - jmc@cvs.openbsd.org 2014/03/31 13:39:34
-     [ssh-keygen.1]
-     the text for the -K option was inserted in the wrong place in -r1.108;
-     fix From: Matthew Clarke
-   - djm@cvs.openbsd.org 2014/04/01 02:05:27
-     [ssh-keysign.c]
-     include fingerprint of key not found
-     use arc4random_buf() instead of loop+arc4random()
-   - djm@cvs.openbsd.org 2014/04/01 03:34:10
-     [sshconnect.c]
-     When using VerifyHostKeyDNS with a DNSSEC resolver, down-convert any
-     certificate keys to plain keys and attempt SSHFP resolution.
-     
-     Prevents a server from skipping SSHFP lookup and forcing a new-hostkey
-     dialog by offering only certificate keys.
-     
-     Reported by mcv21 AT cam.ac.uk
-   - djm@cvs.openbsd.org 2014/04/01 05:32:57
-     [packet.c]
-     demote a debug3 to PACKET_DEBUG; ok markus@
-   - djm@cvs.openbsd.org 2014/04/12 04:55:53
-     [sshd.c]
-     avoid crash at exit: check that pmonitor!=NULL before dereferencing;
-     bz#2225, patch from kavi AT juniper.net
-   - djm@cvs.openbsd.org 2014/04/16 23:22:45
-     [bufaux.c]
-     skip leading zero bytes in buffer_put_bignum2_from_string();
-     reported by jan AT mojzis.com; ok markus@
-   - djm@cvs.openbsd.org 2014/04/16 23:28:12
-     [ssh-agent.1]
-     remove the identity files from this manpage - ssh-agent doesn't deal
-     with them at all and the same information is duplicated in ssh-add.1
-     (which does deal with them); prodded by deraadt@
-   - djm@cvs.openbsd.org 2014/04/18 23:52:25
-     [compat.c compat.h sshconnect2.c sshd.c version.h]
-     OpenSSH 6.5 and 6.6 have a bug that causes ~0.2% of connections
-     using the curve25519-sha256@libssh.org KEX exchange method to fail
-     when connecting with something that implements the spec properly.
-     
-     Disable this KEX method when speaking to one of the affected
-     versions.
-     
-     reported by Aris Adamantiadis; ok markus@
-   - djm@cvs.openbsd.org 2014/04/19 05:54:59
-     [compat.c]
-     missing wildcard; pointed out by naddy@
-   - tedu@cvs.openbsd.org 2014/04/19 14:53:48
-     [ssh-keysign.c sshd.c]
-     Delete futile calls to RAND_seed. ok djm
-     NB. Id sync only. This only applies to OpenBSD's libcrypto slashathon
-   - tedu@cvs.openbsd.org 2014/04/19 18:15:16
-     [sshd.8]
-     remove some really old rsh references
-   - tedu@cvs.openbsd.org 2014/04/19 18:42:19
-     [ssh.1]
-     delete .xr to hosts.equiv. there's still an unfortunate amount of
-     documentation referring to rhosts equivalency in here.
-   - djm@cvs.openbsd.org 2014/04/20 02:30:25
-     [misc.c misc.h umac.c]
-     use get/put_u32 to load values rather than *((UINT32 *)p) that breaks on
-     strict-alignment architectures; reported by and ok stsp@
-   - djm@cvs.openbsd.org 2014/04/20 02:49:32
-     [compat.c]
-     add a canonical 6.6 + curve25519 bignum fix fake version that I can
-     recommend people use ahead of the openssh-6.7 release
-
-20140401
- - (djm) On platforms that support it, use prctl() to prevent sftp-server
-   from accessing /proc/self/{mem,maps}; patch from jann AT thejh.net
- - (djm) Use full release (e.g. 6.5p1) in debug output rather than just
-   version. From des@des.no
-
-20140317
- - (djm) [sandbox-seccomp-filter.c] Soft-fail stat() syscalls. Add XXX to
-   remind myself to add sandbox violation logging via the log socket.
-
-20140314
- - (tim) [opensshd.init.in] Add support for ed25519
-
-20140313
- - (djm) Release OpenSSH 6.6
-
-20140304
- - OpenBSD CVS Sync
-   - djm@cvs.openbsd.org 2014/03/03 22:22:30
-     [session.c]
-     ignore enviornment variables with embedded '=' or '\0' characters;
-     spotted by Jann Horn; ok deraadt@
-
-20140301
- - (djm) [regress/Makefile] Disable dhgex regress test; it breaks when
-   no moduli file exists at the expected location.
-
-20140228
- - OpenBSD CVS Sync
-   - djm@cvs.openbsd.org 2014/02/27 00:41:49
-     [bufbn.c]
-     fix unsigned overflow that could lead to reading a short ssh protocol
-     1 bignum value; found by Ben Hawkes; ok deraadt@
-   - djm@cvs.openbsd.org 2014/02/27 08:25:09
-     [bufbn.c]
-     off by one in range check
-   - djm@cvs.openbsd.org 2014/02/27 22:47:07
-     [sshd_config.5]
-     bz#2184 clarify behaviour of a keyword that appears in multiple
-     matching Match blocks; ok dtucker@
-   - djm@cvs.openbsd.org 2014/02/27 22:57:40

*** DIFF OUTPUT TRUNCATED AT 1000 LINES ***

From owner-svn-src-all@freebsd.org  Tue Jan 19 18:32:52 2016
Return-Path: <owner-svn-src-all@freebsd.org>
Delivered-To: svn-src-all@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id C04D0A889CE;
 Tue, 19 Jan 2016 18:32:52 +0000 (UTC) (envelope-from des@FreeBSD.org)
Received: from repo.freebsd.org (repo.freebsd.org
 [IPv6:2610:1c1:1:6068::e6a:0])
 (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
 (Client did not present a certificate)
 by mx1.freebsd.org (Postfix) with ESMTPS id 7F1941D4C;
 Tue, 19 Jan 2016 18:32:52 +0000 (UTC) (envelope-from des@FreeBSD.org)
Received: from repo.freebsd.org ([127.0.1.37])
 by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u0JIWpHt090444;
 Tue, 19 Jan 2016 18:32:51 GMT (envelope-from des@FreeBSD.org)
Received: (from des@localhost)
 by repo.freebsd.org (8.15.2/8.15.2/Submit) id u0JIWpQ0090443;
 Tue, 19 Jan 2016 18:32:51 GMT (envelope-from des@FreeBSD.org)
Message-Id: <201601191832.u0JIWpQ0090443@repo.freebsd.org>
X-Authentication-Warning: repo.freebsd.org: des set sender to des@FreeBSD.org
 using -f
From: =?UTF-8?Q?Dag-Erling_Sm=c3=b8rgrav?= <des@FreeBSD.org>
Date: Tue, 19 Jan 2016 18:32:51 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-head@freebsd.org
Subject: svn commit: r294333 - in head/crypto/openssh: . contrib
 openbsd-compat regress regress/unittests/bitmap regress/unittests/hostkeys
 regress/unittests/kex
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.20
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for &quot;
 user&quot; and &quot; projects&quot; \)" <svn-src-all.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-all/>
List-Post: <mailto:svn-src-all@freebsd.org>
List-Help: <mailto:svn-src-all-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Tue, 19 Jan 2016 18:32:53 -0000

Author: des
Date: Tue Jan 19 18:32:51 2016
New Revision: 294333
URL: https://svnweb.freebsd.org/changeset/base/294333

Log:
  begone, foul autoprops!

Modified:
Directory Properties:
  head/crypto/openssh/bitmap.c   (props changed)
  head/crypto/openssh/bitmap.h   (props changed)
  head/crypto/openssh/cipher.c   (props changed)
  head/crypto/openssh/contrib/ssh-copy-id.1   (props changed)
  head/crypto/openssh/kex.c   (props changed)
  head/crypto/openssh/kex.h   (props changed)
  head/crypto/openssh/moduli.5   (props changed)
  head/crypto/openssh/myproposal.h   (props changed)
  head/crypto/openssh/opacket.c   (props changed)
  head/crypto/openssh/opacket.h   (props changed)
  head/crypto/openssh/openbsd-compat/bsd-misc.h   (props changed)
  head/crypto/openssh/openbsd-compat/md5.c   (props changed)
  head/crypto/openssh/openbsd-compat/md5.h   (props changed)
  head/crypto/openssh/openbsd-compat/reallocarray.c   (props changed)
  head/crypto/openssh/openbsd-compat/rmd160.c   (props changed)
  head/crypto/openssh/openbsd-compat/rmd160.h   (props changed)
  head/crypto/openssh/openbsd-compat/sha1.c   (props changed)
  head/crypto/openssh/openbsd-compat/sha1.h   (props changed)
  head/crypto/openssh/packet.h   (props changed)
  head/crypto/openssh/readconf.h   (props changed)
  head/crypto/openssh/regress/hostkey-agent.sh   (props changed)
  head/crypto/openssh/regress/hostkey-rotate.sh   (props changed)
  head/crypto/openssh/regress/keygen-knownhosts.sh   (props changed)
  head/crypto/openssh/regress/limit-keytype.sh   (props changed)
  head/crypto/openssh/regress/multipubkey.sh   (props changed)
  head/crypto/openssh/regress/netcat.c   (props changed)
  head/crypto/openssh/regress/unittests/bitmap/Makefile   (props changed)
  head/crypto/openssh/regress/unittests/bitmap/tests.c   (props changed)
  head/crypto/openssh/regress/unittests/hostkeys/Makefile   (props changed)
  head/crypto/openssh/regress/unittests/hostkeys/mktestdata.sh   (props changed)
  head/crypto/openssh/regress/unittests/hostkeys/test_iterate.c   (props changed)
  head/crypto/openssh/regress/unittests/hostkeys/tests.c   (props changed)
  head/crypto/openssh/regress/unittests/kex/Makefile   (props changed)
  head/crypto/openssh/regress/unittests/kex/test_kex.c   (props changed)
  head/crypto/openssh/regress/unittests/kex/tests.c   (props changed)
  head/crypto/openssh/regress/valgrind-unit.sh   (props changed)
  head/crypto/openssh/scp.1   (props changed)
  head/crypto/openssh/servconf.h   (props changed)
  head/crypto/openssh/sftp-server.8   (props changed)
  head/crypto/openssh/sftp.1   (props changed)
  head/crypto/openssh/ssh-add.1   (props changed)
  head/crypto/openssh/ssh-keygen.1   (props changed)
  head/crypto/openssh/ssh-keyscan.1   (props changed)
  head/crypto/openssh/ssh-keysign.8   (props changed)
  head/crypto/openssh/ssh-pkcs11-helper.8   (props changed)
  head/crypto/openssh/ssh_api.c   (props changed)
  head/crypto/openssh/ssh_api.h   (props changed)
  head/crypto/openssh/sshconnect2.c   (props changed)

From owner-svn-src-all@freebsd.org  Tue Jan 19 18:35:23 2016
Return-Path: <owner-svn-src-all@freebsd.org>
Delivered-To: svn-src-all@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id DB04BA88AB2;
 Tue, 19 Jan 2016 18:35:23 +0000 (UTC) (envelope-from dim@FreeBSD.org)
Received: from repo.freebsd.org (repo.freebsd.org
 [IPv6:2610:1c1:1:6068::e6a:0])
 (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
 (Client did not present a certificate)
 by mx1.freebsd.org (Postfix) with ESMTPS id 930341FEB;
 Tue, 19 Jan 2016 18:35:23 +0000 (UTC) (envelope-from dim@FreeBSD.org)
Received: from repo.freebsd.org ([127.0.1.37])
 by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u0JIZM1K090711;
 Tue, 19 Jan 2016 18:35:22 GMT (envelope-from dim@FreeBSD.org)
Received: (from dim@localhost)
 by repo.freebsd.org (8.15.2/8.15.2/Submit) id u0JIZM31090709;
 Tue, 19 Jan 2016 18:35:22 GMT (envelope-from dim@FreeBSD.org)
Message-Id: <201601191835.u0JIZM31090709@repo.freebsd.org>
X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org
 using -f
From: Dimitry Andric <dim@FreeBSD.org>
Date: Tue, 19 Jan 2016 18:35:22 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org
Subject: svn commit: r294334 - in stable:
 10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs
 8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs
 9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs
X-SVN-Group: stable-9
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.20
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for &quot;
 user&quot; and &quot; projects&quot; \)" <svn-src-all.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-all/>
List-Post: <mailto:svn-src-all@freebsd.org>
List-Help: <mailto:svn-src-all-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Tue, 19 Jan 2016 18:35:24 -0000

Author: dim
Date: Tue Jan 19 18:35:22 2016
New Revision: 294334
URL: https://svnweb.freebsd.org/changeset/base/294334

Log:
  MFC r294102:
  
  MFV r294101: 6527 Possible access beyond end of string in zpool comment
  
  Reviewed by: George Wilson <george.wilson@delphix.com>
  Reviewed by: Matthew Ahrens <mahrens@delphix.com>
  Reviewed by: Dan McDonald <danmcd@omniti.com>
  Approved by: Gordon Ross <gwr@nexenta.com>
  
  illumos/illumos-gate@2bd7a8d078223b122d65fea49bb8641f858b1409
  
  This fixes erroneous double increments of the 'check' variable in a loop
  in spa_prop_validate().  I ran into this in the clang380-import branch,
  where clang 3.8.0 warns about it.  (It is already fixed there.)

Modified:
  stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c
Directory Properties:
  stable/9/   (props changed)
  stable/9/sys/   (props changed)
  stable/9/sys/cddl/contrib/opensolaris/   (props changed)

Changes in other areas also in this revision:
Modified:
  stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c
  stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c
Directory Properties:
  stable/10/   (props changed)
  stable/8/   (props changed)
  stable/8/sys/   (props changed)
  stable/8/sys/cddl/   (props changed)
  stable/8/sys/cddl/contrib/opensolaris/   (props changed)

Modified: stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c
==============================================================================
--- stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c	Tue Jan 19 18:32:51 2016	(r294333)
+++ stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c	Tue Jan 19 18:35:22 2016	(r294334)
@@ -585,7 +585,6 @@ spa_prop_validate(spa_t *spa, nvlist_t *
 					error = SET_ERROR(EINVAL);
 					break;
 				}
-				check++;
 			}
 			if (strlen(strval) > ZPROP_MAX_COMMENT)
 				error = E2BIG;

From owner-svn-src-all@freebsd.org  Tue Jan 19 18:35:24 2016
Return-Path: <owner-svn-src-all@freebsd.org>
Delivered-To: svn-src-all@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6D770A88ABE;
 Tue, 19 Jan 2016 18:35:24 +0000 (UTC) (envelope-from dim@FreeBSD.org)
Received: from repo.freebsd.org (repo.freebsd.org
 [IPv6:2610:1c1:1:6068::e6a:0])
 (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
 (Client did not present a certificate)
 by mx1.freebsd.org (Postfix) with ESMTPS id 213F71FEF;
 Tue, 19 Jan 2016 18:35:24 +0000 (UTC) (envelope-from dim@FreeBSD.org)
Received: from repo.freebsd.org ([127.0.1.37])
 by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u0JIZNAd090723;
 Tue, 19 Jan 2016 18:35:23 GMT (envelope-from dim@FreeBSD.org)
Received: (from dim@localhost)
 by repo.freebsd.org (8.15.2/8.15.2/Submit) id u0JIZNHi090722;
 Tue, 19 Jan 2016 18:35:23 GMT (envelope-from dim@FreeBSD.org)
Message-Id: <201601191835.u0JIZNHi090722@repo.freebsd.org>
X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org
 using -f
From: Dimitry Andric <dim@FreeBSD.org>
Date: Tue, 19 Jan 2016 18:35:23 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org
Subject: svn commit: r294334 - in stable:
 10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs
 8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs
 9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs
X-SVN-Group: stable-10
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.20
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for &quot;
 user&quot; and &quot; projects&quot; \)" <svn-src-all.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-all/>
List-Post: <mailto:svn-src-all@freebsd.org>
List-Help: <mailto:svn-src-all-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Tue, 19 Jan 2016 18:35:24 -0000

Author: dim
Date: Tue Jan 19 18:35:22 2016
New Revision: 294334
URL: https://svnweb.freebsd.org/changeset/base/294334

Log:
  MFC r294102:
  
  MFV r294101: 6527 Possible access beyond end of string in zpool comment
  
  Reviewed by: George Wilson <george.wilson@delphix.com>
  Reviewed by: Matthew Ahrens <mahrens@delphix.com>
  Reviewed by: Dan McDonald <danmcd@omniti.com>
  Approved by: Gordon Ross <gwr@nexenta.com>
  
  illumos/illumos-gate@2bd7a8d078223b122d65fea49bb8641f858b1409
  
  This fixes erroneous double increments of the 'check' variable in a loop
  in spa_prop_validate().  I ran into this in the clang380-import branch,
  where clang 3.8.0 warns about it.  (It is already fixed there.)

Modified:
  stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c
Directory Properties:
  stable/10/   (props changed)

Changes in other areas also in this revision:
Modified:
  stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c
  stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c
Directory Properties:
  stable/8/   (props changed)
  stable/8/sys/   (props changed)
  stable/8/sys/cddl/   (props changed)
  stable/8/sys/cddl/contrib/opensolaris/   (props changed)
  stable/9/   (props changed)
  stable/9/sys/   (props changed)
  stable/9/sys/cddl/contrib/opensolaris/   (props changed)

Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c
==============================================================================
--- stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c	Tue Jan 19 18:32:51 2016	(r294333)
+++ stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c	Tue Jan 19 18:35:22 2016	(r294334)
@@ -607,7 +607,6 @@ spa_prop_validate(spa_t *spa, nvlist_t *
 					error = SET_ERROR(EINVAL);
 					break;
 				}
-				check++;
 			}
 			if (strlen(strval) > ZPROP_MAX_COMMENT)
 				error = E2BIG;

From owner-svn-src-all@freebsd.org  Tue Jan 19 18:35:24 2016
Return-Path: <owner-svn-src-all@freebsd.org>
Delivered-To: svn-src-all@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id 23047A88AB6;
 Tue, 19 Jan 2016 18:35:24 +0000 (UTC) (envelope-from dim@FreeBSD.org)
Received: from repo.freebsd.org (repo.freebsd.org
 [IPv6:2610:1c1:1:6068::e6a:0])
 (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
 (Client did not present a certificate)
 by mx1.freebsd.org (Postfix) with ESMTPS id CE44F1FED;
 Tue, 19 Jan 2016 18:35:23 +0000 (UTC) (envelope-from dim@FreeBSD.org)
Received: from repo.freebsd.org ([127.0.1.37])
 by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u0JIZM3K090717;
 Tue, 19 Jan 2016 18:35:22 GMT (envelope-from dim@FreeBSD.org)
Received: (from dim@localhost)
 by repo.freebsd.org (8.15.2/8.15.2/Submit) id u0JIZM1u090716;
 Tue, 19 Jan 2016 18:35:22 GMT (envelope-from dim@FreeBSD.org)
Message-Id: <201601191835.u0JIZM1u090716@repo.freebsd.org>
X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org
 using -f
From: Dimitry Andric <dim@FreeBSD.org>
Date: Tue, 19 Jan 2016 18:35:22 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org
Subject: svn commit: r294334 - in stable:
 10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs
 8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs
 9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs
X-SVN-Group: stable-8
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.20
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for &quot;
 user&quot; and &quot; projects&quot; \)" <svn-src-all.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-all/>
List-Post: <mailto:svn-src-all@freebsd.org>
List-Help: <mailto:svn-src-all-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Tue, 19 Jan 2016 18:35:24 -0000

Author: dim
Date: Tue Jan 19 18:35:22 2016
New Revision: 294334
URL: https://svnweb.freebsd.org/changeset/base/294334

Log:
  MFC r294102:
  
  MFV r294101: 6527 Possible access beyond end of string in zpool comment
  
  Reviewed by: George Wilson <george.wilson@delphix.com>
  Reviewed by: Matthew Ahrens <mahrens@delphix.com>
  Reviewed by: Dan McDonald <danmcd@omniti.com>
  Approved by: Gordon Ross <gwr@nexenta.com>
  
  illumos/illumos-gate@2bd7a8d078223b122d65fea49bb8641f858b1409
  
  This fixes erroneous double increments of the 'check' variable in a loop
  in spa_prop_validate().  I ran into this in the clang380-import branch,
  where clang 3.8.0 warns about it.  (It is already fixed there.)

Modified:
  stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c
Directory Properties:
  stable/8/   (props changed)
  stable/8/sys/   (props changed)
  stable/8/sys/cddl/   (props changed)
  stable/8/sys/cddl/contrib/opensolaris/   (props changed)

Changes in other areas also in this revision:
Modified:
  stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c
  stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c
Directory Properties:
  stable/10/   (props changed)
  stable/9/   (props changed)
  stable/9/sys/   (props changed)
  stable/9/sys/cddl/contrib/opensolaris/   (props changed)

Modified: stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c
==============================================================================
--- stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c	Tue Jan 19 18:32:51 2016	(r294333)
+++ stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c	Tue Jan 19 18:35:22 2016	(r294334)
@@ -585,7 +585,6 @@ spa_prop_validate(spa_t *spa, nvlist_t *
 					error = SET_ERROR(EINVAL);
 					break;
 				}
-				check++;
 			}
 			if (strlen(strval) > ZPROP_MAX_COMMENT)
 				error = E2BIG;

From owner-svn-src-all@freebsd.org  Tue Jan 19 18:36:45 2016
Return-Path: <owner-svn-src-all@freebsd.org>
Delivered-To: svn-src-all@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id 14B61A88C23;
 Tue, 19 Jan 2016 18:36:45 +0000 (UTC)
 (envelope-from cschuber@gmail.com)
Received: from mail-pf0-x231.google.com (mail-pf0-x231.google.com
 [IPv6:2607:f8b0:400e:c00::231])
 (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 D9CDA148A;
 Tue, 19 Jan 2016 18:36:44 +0000 (UTC)
 (envelope-from cschuber@gmail.com)
Received: by mail-pf0-x231.google.com with SMTP id e65so180072968pfe.0;
 Tue, 19 Jan 2016 10:36:44 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;
 h=message-id:mime-version:from:subject:date:to:cc:content-type;
 bh=z5FvMqRdxhZxNs1NmG3rw7Z5JUSwlyCBSlXOiCLQF9Q=;
 b=dyIVGfyV1QOJIUdqw+yR+ZUZGdU9WGeVUqR0zDELl8MOVH8dODWuWdUP5Sx9+rSchj
 RLAGB5kVWPb84lU3U6YOI4NRkc+v0hMYfDTuiF+F423upLYWRtS7F3XjV12JZLR5RVR/
 Q7vBOgQ7tyZexp7USmC5vYEPWyPIKdQs8c0t72w3kCRemV0/affGfX/07sgTIdtCTa1N
 +gbLogkLJrT3D3mwIUKy5Q4hieRrVRYGQi9sq7ghXKsAYlwM8vDZU4y6Y4jvp6psuLgN
 1Si4O97L6j60fzE2yb285AO8XbCFVKYkZkCslvltGs2oT5CLCLHWbqvdKc/VnkTRv7tA
 82JQ==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20130820;
 h=x-gm-message-state:message-id:mime-version:from:subject:date:to:cc
 :content-type;
 bh=z5FvMqRdxhZxNs1NmG3rw7Z5JUSwlyCBSlXOiCLQF9Q=;
 b=HYcq6H7D5xJCisKC/WI9hUNA9ppij/8CehP0QFH4vMEv5oHUnBZ+amz37kaObOAAxT
 jyZeZvcs6pLmAWei/GjAZo7qAfIcJDdG5dmFsJFz8+7npYE1crntlBwgpNuLjEevrj1j
 NzQlnshu2zelM4fbiBLbYkMrZC0sZpudS2Zgv2EwDGjtz9QVUxkLo8xWivdpioLcZgbS
 scBjmuwdvyqL9k07DCj2oDuSn5Ew6xlIu/wKlKk47ZtijF6flpd05JDkZHjRvIBcrztg
 5D2tZ36RUEHghjX5yj4I0YonAFAIeLIvUEgAIM/FW9AeC16ifDUZ9w2q79VppUCcuF6c
 t2UQ==
X-Gm-Message-State: ALoCoQnhQl/lRP9FgMIxRu/2kQ+M+yYka2i3B8S/6ehzBY4vn51s7rsjw/wanwUuvZvKs/TDJpCFjx7oZFGwQmqxWiMU45Y5ZA==
X-Received: by 10.98.86.67 with SMTP id k64mr47107549pfb.50.1453228604396;
 Tue, 19 Jan 2016 10:36:44 -0800 (PST)
Received: from [10.168.3.75] (S0106d4ca6d8943b0.gv.shawcable.net.
 [24.68.134.59])
 by smtp.gmail.com with ESMTPSA id 73sm43189370pfm.10.2016.01.19.10.36.42
 (version=TLSv1/SSLv3 cipher=OTHER);
 Tue, 19 Jan 2016 10:36:43 -0800 (PST)
Message-ID: <569e823b.cc0c620a.88044.ffffd719@mx.google.com>
MIME-Version: 1.0
From: Cy Schubert <cschuber@gmail.com>
Subject: RE: svn commit: r294329 -
 inhead/sys/cddl/contrib/opensolaris/uts/common/fs/zfs: . sys
Date: Tue, 19 Jan 2016 10:36:45 -0800
To: Shawn Webb <shawn.webb@hardenedbsd.org>, Alan Somers <asomers@freebsd.org>
CC: Kurt Lidl <lidl@pix.net>, 
 "svn-src-head@freebsd.org" <svn-src-head@freebsd.org>, 
 "svn-src-all@freebsd.org" <svn-src-all@freebsd.org>, 
 "src-committers@freebsd.org" <src-committers@freebsd.org>, 
 "cy@freebsd.org" <cy@freebsd.org>
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: quoted-printable
X-Content-Filtered-By: Mailman/MimeDel 2.1.20
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.20
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for &quot;
 user&quot; and &quot; projects&quot; \)" <svn-src-all.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-all/>
List-Post: <mailto:svn-src-all@freebsd.org>
List-Help: <mailto:svn-src-all-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Tue, 19 Jan 2016 18:36:45 -0000

Just another thought. If we must do this, why not a sysctl to restore funct=
ionality to those of us who need it. If indeed there are panics and hangs d=
ue to zpools on vdevs, a sysctl to bypass the restriction, in effect saying=
 "I understand the risk," would be a reasonable compromise. I'm willing to =
put together a patch to do this.

Sent from my cellphone,
~Cy

-----Original Message-----
From: Cy Schubert
Sent: 19/01/2016 10:27
To: Shawn Webb; Alan Somers
Cc: Kurt Lidl; svn-src-head@freebsd.org; svn-src-all@freebsd.org; src-commi=
tters@freebsd.org; cy@freebsd.org
Subject: RE: svn commit: r294329 - inhead/sys/cddl/contrib/opensolaris/uts/=
common/fs/zfs: . sys

Agreed, I do a fair bit of testing (nothing permanent) by putting zpools on=
 zvols. I have never experienced a hang or panic due to zpools on zvols. Th=
is is a POLA violation.

Regarding zfs hangs, I only experience them with zpool vdevs on USB devices=
 on my laptop when I forget to zpool export tpool prior to laptop shutdown/=
reboot. This is acceptable as I'm in front of it.

Sent from my cellphone,
~Cy

-----Original Message-----
From: Shawn Webb
Sent: 19/01/2016 10:07
To: Alan Somers
Cc: Kurt Lidl; svn-src-head@freebsd.org; svn-src-all@freebsd.org; src-commi=
tters@freebsd.org
Subject: Re: svn commit: r294329 - inhead/sys/cddl/contrib/opensolaris/uts/=
common/fs/zfs: . sys

On Tue, Jan 19, 2016 at 10:20:38AM -0700, Alan Somers wrote:
> On Tue, Jan 19, 2016 at 10:08 AM, Kurt Lidl <lidl@pix.net> wrote:
> > Removing the ability to run different zpools on top of a zvol is
> > a significant reduction in functionality of the entire system, and a hu=
ge
> > violation of the POLA.
>=20
> The thing is, it never really worked in the first place.  Panics and
> deadlocks are so frequent that I don't think the feature was usable
> for anybody.

I actively use this every day and will be making even more use of it in
the very near future. I haven't had a single kernel panic. I have had
deadlocks at shutdown, but since it's a laptop and I'm sitting right in
front of it, it's not a big deal.

I'd say fix the underlying problem, don't prevent people from getting
work done.

>=20
> >
> > At the very least, can you not add a sysctl that allows the
> > dangerous behavior (even if it defaults to off)?  Myself
> > and certainly others rely on having being able to use a zpool
> > installed into a zvol for hosting bhyve virtual machines.
>=20
> Your use case should be unaffected.  The guest has a different ZFS
> instance than the host, so it should work just fine.  Please let me
> know if you have problems.

--=20
Shawn Webb
HardenedBSD

GPG Key ID:          0x6A84658F52456EEE
GPG Key Fingerprint: 2ABA B6BD EF6A F486 BE89  3D9E 6A84 658F 5245 6EEE

From owner-svn-src-all@freebsd.org  Tue Jan 19 18:38:19 2016
Return-Path: <owner-svn-src-all@freebsd.org>
Delivered-To: svn-src-all@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3E53AA88CD0;
 Tue, 19 Jan 2016 18:38:19 +0000 (UTC) (envelope-from des@FreeBSD.org)
Received: from repo.freebsd.org (repo.freebsd.org
 [IPv6:2610:1c1:1:6068::e6a:0])
 (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
 (Client did not present a certificate)
 by mx1.freebsd.org (Postfix) with ESMTPS id 0FD16173C;
 Tue, 19 Jan 2016 18:38:18 +0000 (UTC) (envelope-from des@FreeBSD.org)
Received: from repo.freebsd.org ([127.0.1.37])
 by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u0JIcI1S090877;
 Tue, 19 Jan 2016 18:38:18 GMT (envelope-from des@FreeBSD.org)
Received: (from des@localhost)
 by repo.freebsd.org (8.15.2/8.15.2/Submit) id u0JIcHv8090875;
 Tue, 19 Jan 2016 18:38:17 GMT (envelope-from des@FreeBSD.org)
Message-Id: <201601191838.u0JIcHv8090875@repo.freebsd.org>
X-Authentication-Warning: repo.freebsd.org: des set sender to des@FreeBSD.org
 using -f
From: =?UTF-8?Q?Dag-Erling_Sm=c3=b8rgrav?= <des@FreeBSD.org>
Date: Tue, 19 Jan 2016 18:38:17 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-head@freebsd.org
Subject: svn commit: r294335 - head/crypto/openssh
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.20
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for &quot;
 user&quot; and &quot; projects&quot; \)" <svn-src-all.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-all/>
List-Post: <mailto:svn-src-all@freebsd.org>
List-Help: <mailto:svn-src-all-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Tue, 19 Jan 2016 18:38:19 -0000

Author: des
Date: Tue Jan 19 18:38:17 2016
New Revision: 294335
URL: https://svnweb.freebsd.org/changeset/base/294335

Log:
  Re-add HPN configuration options as deprecated options to avoid breaking
  existing configurations that use them.  Note that there is no functional
  difference between OpenSSH with HPN and OpenSSH without HPN.

Modified:
  head/crypto/openssh/readconf.c
  head/crypto/openssh/servconf.c

Modified: head/crypto/openssh/readconf.c
==============================================================================
--- head/crypto/openssh/readconf.c	Tue Jan 19 18:35:22 2016	(r294334)
+++ head/crypto/openssh/readconf.c	Tue Jan 19 18:38:17 2016	(r294335)
@@ -280,6 +280,10 @@ static struct {
 	{ "updatehostkeys", oUpdateHostkeys },
 	{ "hostbasedkeytypes", oHostbasedKeyTypes },
 	{ "ignoreunknown", oIgnoreUnknown },
+	{ "hpndisabled", oDeprecated },
+	{ "hpnbuffersize", oDeprecated },
+	{ "tcprcvbufpoll", oDeprecated },
+	{ "tcprcvbuf", oDeprecated },
 	{ "versionaddendum", oVersionAddendum },
 
 	{ NULL, oBadOption }

Modified: head/crypto/openssh/servconf.c
==============================================================================
--- head/crypto/openssh/servconf.c	Tue Jan 19 18:35:22 2016	(r294334)
+++ head/crypto/openssh/servconf.c	Tue Jan 19 18:38:17 2016	(r294335)
@@ -536,6 +536,9 @@ static struct {
 	{ "streamlocalbindunlink", sStreamLocalBindUnlink, SSHCFG_ALL },
 	{ "allowstreamlocalforwarding", sAllowStreamLocalForwarding, SSHCFG_ALL },
 	{ "fingerprinthash", sFingerprintHash, SSHCFG_GLOBAL },
+	{ "hpndisabled", sDeprecated, SSHCFG_ALL },
+	{ "hpnbuffersize", sDeprecated, SSHCFG_ALL },
+	{ "tcprcvbufpoll", sDeprecated, SSHCFG_ALL },
 	{ NULL, sBadOption, 0 }
 };
 

From owner-svn-src-all@freebsd.org  Tue Jan 19 18:55:07 2016
Return-Path: <owner-svn-src-all@freebsd.org>
Delivered-To: svn-src-all@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6C894A891F0
 for <svn-src-all@mailman.ysv.freebsd.org>;
 Tue, 19 Jan 2016 18:55:07 +0000 (UTC)
 (envelope-from asomers@gmail.com)
Received: from mail-ob0-x22f.google.com (mail-ob0-x22f.google.com
 [IPv6:2607:f8b0:4003:c01::22f])
 (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits))
 (Client CN "smtp.gmail.com",
 Issuer "Google Internet Authority G2" (verified OK))
 by mx1.freebsd.org (Postfix) with ESMTPS id 331231E6F
 for <svn-src-all@freebsd.org>; Tue, 19 Jan 2016 18:55:07 +0000 (UTC)
 (envelope-from asomers@gmail.com)
Received: by mail-ob0-x22f.google.com with SMTP id vt7so195015311obb.1
 for <svn-src-all@freebsd.org>; Tue, 19 Jan 2016 10:55:07 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;
 h=mime-version:sender:in-reply-to:references:date:message-id:subject
 :from:cc:content-type;
 bh=oxzSOOM9B6k8Pd0wN+zYHieJ0wlzoaeNfjtS7i1kz14=;
 b=T4DxyKKx0yzg0pRlrrgmQX7JMPoRxiibOBgnoew55pyAluA9ZnXO6Rq/VUZf7kT68H
 zWqSRKpnemQnlg8lP8nZREmQog9+hYilTaOVgD/3vcTGvJlomqw7IQQAZNV2Dv9TTs6B
 JM8UnJ4SuiA7upHmhwx3K6MdvS6CjXDKxbW717NX0EHVErH9Wj/HWp+/kepxoaERALE7
 gXNZWmwLnP14kCYC28pJGDMXwvQEtmL1+hzixJtskE+DGV5b5BF5D46YirWmTmOpHdgf
 vA2YiSLRvI8sP84PoJRfw49JKpkV5wD1mGX1ZlBQuUWqQGaGqtJISxgdGYqNXqwQKCyF
 MH8w==
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:date
 :message-id:subject:from:cc:content-type;
 bh=oxzSOOM9B6k8Pd0wN+zYHieJ0wlzoaeNfjtS7i1kz14=;
 b=UbXOyaEm6f+YV4YdEY22xd7LK3s5yMC4Rw8myQIkc/HYzTsTBRIdw2kJSjc2QiO9Kd
 utK4xMT6myskEA6L8RW7SG7QSDdFvXN/RjX+KLxO9PM6fG4etABXuiPZzqtbHQBF7N2h
 6rCd7CVhaqbB/JYWJXMdcj6FEckfuRXYv23+QoC3K1aiWYkVY3oFEUfqXC5uxXq8Tk3h
 W6fni1yNJvFDsYx2m663uFlV1KXOKYqrhb/7TCkwmifzIeYFnGaC31ZUKp5gFCF8djOc
 TU2+q2+M43ahEbBHgXo+02/WZ0DfejbJ1TZ3gElo0t8K6xaSrh7041kJwuhyVG+dLPbn
 7Bfg==
X-Gm-Message-State: ALoCoQlBJQ+rX1MkfcmBwb0S4bgfgF7wV1mszoR5EahfhiuQyLzVdDob/UMNjIAt9Nu4ZgKqIL37Rt5x8KiCfysXLw2aJvA+1A==
MIME-Version: 1.0
X-Received: by 10.60.226.136 with SMTP id rs8mt26974126oec.31.1453229706503;
 Tue, 19 Jan 2016 10:55:06 -0800 (PST)
Sender: asomers@gmail.com
Received: by 10.202.69.84 with HTTP; Tue, 19 Jan 2016 10:55:06 -0800 (PST)
In-Reply-To: <201601191700.u0JH0P6k061610@repo.freebsd.org>
References: <201601191700.u0JH0P6k061610@repo.freebsd.org>
Date: Tue, 19 Jan 2016 11:55:06 -0700
X-Google-Sender-Auth: eB9CBEdOX_j55vYCz09qBmOirQ8
Message-ID: <CAOtMX2jU3Rm0as2-oTgBt=Xe5_kgneAY7aB_NrjCy+aXNHD3KA@mail.gmail.com>
Subject: Re: svn commit: r294329 - in
 head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs: . sys
From: Alan Somers <asomers@freebsd.org>
Cc: "src-committers@freebsd.org" <src-committers@freebsd.org>, 
 "svn-src-all@freebsd.org" <svn-src-all@freebsd.org>, 
 "svn-src-head@freebsd.org" <svn-src-head@freebsd.org>
Content-Type: text/plain; charset=UTF-8
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.20
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for &quot;
 user&quot; and &quot; projects&quot; \)" <svn-src-all.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-all/>
List-Post: <mailto:svn-src-all@freebsd.org>
List-Help: <mailto:svn-src-all-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Tue, 19 Jan 2016 18:55:07 -0000

On Tue, Jan 19, 2016 at 10:00 AM, Alan Somers <asomers@freebsd.org> wrote:
> Author: asomers
> Date: Tue Jan 19 17:00:25 2016
> New Revision: 294329
> URL: https://svnweb.freebsd.org/changeset/base/294329
>
> Log:
>   Disallow zvol-backed ZFS pools
>
>   Using zvols as backing devices for ZFS pools is fraught with panics and
>   deadlocks. For example, attempting to online a missing device in the
>   presence of a zvol can cause a panic when vdev_geom tastes the zvol.  Better
>   to completely disable vdev_geom from ever opening a zvol. The solution
>   relies on setting a thread-local variable during vdev_geom_open, and
>   returning EOPNOTSUPP during zvol_open if that thread-local variable is set.
>
>   Remove the check for MUTEX_HELD(&zfsdev_state_lock) in zvol_open. Its intent
>   was to prevent a recursive mutex acquisition panic. However, the new check
>   for the thread-local variable also fixes that problem.
>
>   Also, fix a panic in vdev_geom_taste_orphan. For an unknown reason, this
>   function was set to panic. But it can occur that a device disappears during
>   tasting, and it causes no problems to ignore this departure.
>
>   Reviewed by:  delphij
>   MFC after:    1 week
>   Relnotes:     yes
>   Sponsored by: Spectra Logic Corp
>   Differential Revision:        https://reviews.freebsd.org/D4986
>
> Modified:
>   head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/vdev_impl.h
>   head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_geom.c
>   head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c
>   head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zvol.c
>
> Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/vdev_impl.h

Due to popular demand, I will conditionalize this behavior on a
sysctl, and I won't MFC it.  The sysctl must default to off (ZFS on
zvols not allowed) because having the ability to put pools on zvols
can cause panics even for users who aren't using it.  And let me clear
up some confusion:

1) Having the ability to put a zpool on a zvol can cause panics and
deadlocks, even if that ability is unused.
2) Putting a zpool atop a zvol causes unnecessary performance problems
because there are two layers of COW involved, with all their software
complexities.  This also applies to putting a zpool atop files on a
ZFS filesystem.
3) A VM guest putting a zpool on its virtual disk, where the VM host
backs that virtual disk with a zvol, will work fine.  That's the ideal
use case for zvols.
3b) Using ZFS on both host and guest isn't ideal for performance, as
described in item 2.  That's why I prefer to use UFS for VM guests.
4) Using UFS on a zvol as Stefen Esser described works fine.  I'm not
aware of any performance problems associated with mixing UFS and ZFS.
Perhaps Stefan was referring to duplication between the ARC and UFS's
vnode cache.  The same duplication would be present in a ZFS on top of
zvol scenario.

-Alan

From owner-svn-src-all@freebsd.org  Tue Jan 19 18:55:46 2016
Return-Path: <owner-svn-src-all@freebsd.org>
Delivered-To: svn-src-all@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id 419D8A89241;
 Tue, 19 Jan 2016 18:55:46 +0000 (UTC) (envelope-from des@FreeBSD.org)
Received: from repo.freebsd.org (repo.freebsd.org
 [IPv6:2610:1c1:1:6068::e6a:0])
 (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
 (Client did not present a certificate)
 by mx1.freebsd.org (Postfix) with ESMTPS id D40BA1FE0;
 Tue, 19 Jan 2016 18:55:45 +0000 (UTC) (envelope-from des@FreeBSD.org)
Received: from repo.freebsd.org ([127.0.1.37])
 by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u0JItiEk096499;
 Tue, 19 Jan 2016 18:55:44 GMT (envelope-from des@FreeBSD.org)
Received: (from des@localhost)
 by repo.freebsd.org (8.15.2/8.15.2/Submit) id u0JItiHY096497;
 Tue, 19 Jan 2016 18:55:44 GMT (envelope-from des@FreeBSD.org)
Message-Id: <201601191855.u0JItiHY096497@repo.freebsd.org>
X-Authentication-Warning: repo.freebsd.org: des set sender to des@FreeBSD.org
 using -f
From: =?UTF-8?Q?Dag-Erling_Sm=c3=b8rgrav?= <des@FreeBSD.org>
Date: Tue, 19 Jan 2016 18:55:44 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-head@freebsd.org
Subject: svn commit: r294336 - in head/crypto/openssh: . contrib/redhat
 contrib/suse openbsd-compat regress regress/unittests/hostkeys
 regress/unittests/sshkey
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.20
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for &quot;
 user&quot; and &quot; projects&quot; \)" <svn-src-all.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-all/>
List-Post: <mailto:svn-src-all@freebsd.org>
List-Help: <mailto:svn-src-all-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Tue, 19 Jan 2016 18:55:46 -0000

Author: des
Date: Tue Jan 19 18:55:44 2016
New Revision: 294336
URL: https://svnweb.freebsd.org/changeset/base/294336

Log:
  Upgrade to OpenSSH 6.9p1.

Added:
  head/crypto/openssh/regress/cfgparse.sh
     - copied unchanged from r285033, vendor-crypto/openssh/dist/regress/cfgparse.sh
  head/crypto/openssh/regress/principals-command.sh
     - copied unchanged from r285033, vendor-crypto/openssh/dist/regress/principals-command.sh
Modified:
  head/crypto/openssh/ChangeLog
  head/crypto/openssh/PROTOCOL
  head/crypto/openssh/PROTOCOL.agent
  head/crypto/openssh/README
  head/crypto/openssh/auth-chall.c
  head/crypto/openssh/auth-options.c
  head/crypto/openssh/auth-pam.c
  head/crypto/openssh/auth.c
  head/crypto/openssh/auth.h
  head/crypto/openssh/auth2-hostbased.c
  head/crypto/openssh/auth2-pubkey.c
  head/crypto/openssh/authfd.c
  head/crypto/openssh/authfile.c
  head/crypto/openssh/channels.c
  head/crypto/openssh/channels.h
  head/crypto/openssh/clientloop.c
  head/crypto/openssh/compat.c
  head/crypto/openssh/compat.h
  head/crypto/openssh/config.guess
  head/crypto/openssh/configure
  head/crypto/openssh/configure.ac
  head/crypto/openssh/contrib/redhat/openssh.spec
  head/crypto/openssh/contrib/suse/openssh.spec
  head/crypto/openssh/dh.c
  head/crypto/openssh/dh.h
  head/crypto/openssh/digest-libc.c
  head/crypto/openssh/dispatch.c
  head/crypto/openssh/dns.h
  head/crypto/openssh/groupaccess.c
  head/crypto/openssh/gss-genr.c
  head/crypto/openssh/gss-serv.c
  head/crypto/openssh/hmac.c
  head/crypto/openssh/hostfile.c
  head/crypto/openssh/kex.c
  head/crypto/openssh/kexc25519.c
  head/crypto/openssh/kexc25519s.c
  head/crypto/openssh/kexgexc.c
  head/crypto/openssh/kexgexs.c
  head/crypto/openssh/krl.c
  head/crypto/openssh/match.c
  head/crypto/openssh/match.h
  head/crypto/openssh/misc.c
  head/crypto/openssh/moduli
  head/crypto/openssh/monitor.c
  head/crypto/openssh/monitor_wrap.c
  head/crypto/openssh/monitor_wrap.h
  head/crypto/openssh/mux.c
  head/crypto/openssh/myproposal.h
  head/crypto/openssh/openbsd-compat/bcrypt_pbkdf.c
  head/crypto/openssh/openbsd-compat/bsd-cygwin_util.c
  head/crypto/openssh/openbsd-compat/bsd-misc.h
  head/crypto/openssh/openbsd-compat/openbsd-compat.h
  head/crypto/openssh/openbsd-compat/rmd160.c
  head/crypto/openssh/packet.c
  head/crypto/openssh/readconf.c
  head/crypto/openssh/regress/Makefile
  head/crypto/openssh/regress/README.regress
  head/crypto/openssh/regress/cipher-speed.sh
  head/crypto/openssh/regress/hostkey-rotate.sh
  head/crypto/openssh/regress/integrity.sh
  head/crypto/openssh/regress/kextype.sh
  head/crypto/openssh/regress/keys-command.sh
  head/crypto/openssh/regress/netcat.c
  head/crypto/openssh/regress/ssh-com.sh
  head/crypto/openssh/regress/ssh2putty.sh
  head/crypto/openssh/regress/test-exec.sh
  head/crypto/openssh/regress/try-ciphers.sh
  head/crypto/openssh/regress/unittests/hostkeys/test_iterate.c
  head/crypto/openssh/regress/unittests/sshkey/test_sshkey.c
  head/crypto/openssh/rijndael.c
  head/crypto/openssh/sandbox-seccomp-filter.c
  head/crypto/openssh/sandbox-systrace.c
  head/crypto/openssh/scp.c
  head/crypto/openssh/servconf.c
  head/crypto/openssh/servconf.h
  head/crypto/openssh/session.c
  head/crypto/openssh/sftp-client.c
  head/crypto/openssh/sftp-client.h
  head/crypto/openssh/sftp-server.c
  head/crypto/openssh/ssh-add.0
  head/crypto/openssh/ssh-add.1
  head/crypto/openssh/ssh-add.c
  head/crypto/openssh/ssh-agent.0
  head/crypto/openssh/ssh-agent.1
  head/crypto/openssh/ssh-agent.c
  head/crypto/openssh/ssh-keygen.c
  head/crypto/openssh/ssh-keyscan.c
  head/crypto/openssh/ssh-keysign.c
  head/crypto/openssh/ssh-pkcs11.c
  head/crypto/openssh/ssh-rsa.c
  head/crypto/openssh/ssh.0
  head/crypto/openssh/ssh.1
  head/crypto/openssh/ssh.c
  head/crypto/openssh/ssh_config.0
  head/crypto/openssh/ssh_config.5
  head/crypto/openssh/ssh_namespace.h
  head/crypto/openssh/sshbuf-misc.c
  head/crypto/openssh/sshconnect.c
  head/crypto/openssh/sshconnect2.c
  head/crypto/openssh/sshd.0
  head/crypto/openssh/sshd.8
  head/crypto/openssh/sshd.c
  head/crypto/openssh/sshd_config
  head/crypto/openssh/sshd_config.0
  head/crypto/openssh/sshd_config.5
  head/crypto/openssh/sshkey.c
  head/crypto/openssh/sshkey.h
  head/crypto/openssh/sshpty.c
  head/crypto/openssh/uidswap.c
  head/crypto/openssh/uuencode.c
  head/crypto/openssh/version.h
  head/crypto/openssh/xmalloc.c
  head/crypto/openssh/xmalloc.h
Directory Properties:
  head/crypto/openssh/   (props changed)

Modified: head/crypto/openssh/ChangeLog
==============================================================================
--- head/crypto/openssh/ChangeLog	Tue Jan 19 18:38:17 2016	(r294335)
+++ head/crypto/openssh/ChangeLog	Tue Jan 19 18:55:44 2016	(r294336)
@@ -1,8584 +1,8935 @@
-commit 9f82e5a9042f2d872e98f48a876fcab3e25dd9bb
-Author: Tim Rice <tim@multitalents.net>
-Date:   Mon Mar 16 22:49:20 2015 -0700
-
-    portability fix: Solaris systems may not have a grep that understands -q
-
-commit 8ef691f7d9ef500257a549d0906d78187490668f
-Author: Damien Miller <djm@google.com>
-Date:   Wed Mar 11 10:35:26 2015 +1100
+commit 7de4b03a6e4071d454b72927ffaf52949fa34545
+Author: djm@openbsd.org <djm@openbsd.org>
+Date:   Wed Jul 1 02:32:17 2015 +0000
 
-    fix compile with clang
+    upstream commit
+    
+    twiddle; (this commit marks the openssh-6.9 release)
+    
+    Upstream-ID: 78500582819f61dd8adee36ec5cc9b9ac9351234
 
-commit 4df590cf8dc799e8986268d62019b487a8ed63ad
-Author: Damien Miller <djm@google.com>
-Date:   Wed Mar 11 10:02:39 2015 +1100
+commit 1bf477d3cdf1a864646d59820878783d42357a1d
+Author: djm@openbsd.org <djm@openbsd.org>
+Date:   Wed Jul 1 02:26:31 2015 +0000
 
-    make unit tests work for !OPENSSH_HAS_ECC
+    upstream commit
+    
+    better refuse ForwardX11Trusted=no connections attempted
+     after ForwardX11Timeout expires; reported by Jann Horn
+    
+    Upstream-ID: bf0fddadc1b46a0334e26c080038313b4b6dea21
 
-commit 307bb40277ca2c32e97e61d70d1ed74b571fd6ba
+commit 47aa7a0f8551b471fcae0447c1d78464f6dba869
 Author: djm@openbsd.org <djm@openbsd.org>
-Date:   Sat Mar 7 04:41:48 2015 +0000
+Date:   Wed Jul 1 01:56:13 2015 +0000
 
     upstream commit
     
-    unbreak for w/SSH1 (default) case; ok markus@ deraadt@
+    put back default PermitRootLogin=no
+    
+    Upstream-ID: 7bdedd5cead99c57ed5571f3b6b7840922d5f728
 
-commit b44ee0c998fb4c5f3c3281f2398af5ce42840b6f
-Author: Damien Miller <djm@mindrot.org>
-Date:   Thu Mar 5 18:39:20 2015 -0800
+commit 984b064fe2a23733733262f88d2e1b2a1a501662
+Author: djm@openbsd.org <djm@openbsd.org>
+Date:   Wed Jul 1 01:55:13 2015 +0000
 
-    unbreak hostkeys test for w/ SSH1 case
+    upstream commit
+    
+    openssh-6.9
+    
+    Upstream-ID: 6cfe8e1904812531080e6ab6e752d7001b5b2d45
 
-commit 55e5bdeb519cb60cc18b7ba0545be581fb8598b4
+commit d921082ed670f516652eeba50705e1e9f6325346
 Author: djm@openbsd.org <djm@openbsd.org>
-Date:   Fri Mar 6 01:40:56 2015 +0000
+Date:   Wed Jul 1 01:55:00 2015 +0000
 
     upstream commit
     
-    fix sshkey_certify() return value for unsupported key types;
-     ok markus@ deraadt@
+    reset default PermitRootLogin to 'yes' (momentarily, for
+     release)
+    
+    Upstream-ID: cad8513527066e65dd7a1c16363d6903e8cefa24
 
-commit be8f658e550a434eac04256bfbc4289457a24e99
+commit 66295e0e1ba860e527f191b6325d2d77dec4dbce
 Author: Damien Miller <djm@mindrot.org>
-Date:   Wed Mar 4 15:38:03 2015 -0800
+Date:   Wed Jul 1 11:49:12 2015 +1000
 
-    update version numbers to match version.h
+    crank version numbers for release
 
-commit ac5e8acefa253eb5e5ba186e34236c0e8007afdc
+commit 37035c07d4f26bb1fbe000d2acf78efdb008681d
+Author: Damien Miller <djm@mindrot.org>
+Date:   Wed Jul 1 10:49:37 2015 +1000
+
+    s/--with-ssh1/--without-ssh1/
+
+commit 629df770dbadc2accfbe1c81b3f31f876d0acd84
 Author: djm@openbsd.org <djm@openbsd.org>
-Date:   Wed Mar 4 23:22:35 2015 +0000
+Date:   Tue Jun 30 05:25:07 2015 +0000
 
     upstream commit
     
-    make these work with !SSH1; ok markus@ deraadt@
+    fatal() when a remote window update causes the window
+     value to overflow. Reported by Georg Wicherski, ok markus@
+    
+    Upstream-ID: ead397a9aceb3bf74ebfa5fcaf259d72e569f351
 
-commit 2f04af92f036b0c87a23efb259c37da98cd81fe6
+commit f715afebe735d61df3fd30ad72d9ac1c8bd3b5f2
 Author: djm@openbsd.org <djm@openbsd.org>
-Date:   Wed Mar 4 21:12:59 2015 +0000
+Date:   Tue Jun 30 05:23:25 2015 +0000
 
     upstream commit
     
-    make ssh-add -D work with !SSH1 agent
+    Fix math error in remote window calculations that causes
+     eventual stalls for datagram channels. Reported by Georg Wicherski, ok
+     markus@
+    
+    Upstream-ID: be54059d11bf64e0d85061f7257f53067842e2ab
 
-commit a05adf95d2af6abb2b7826ddaa7a0ec0cdc1726b
+commit 52fb6b9b034fcfd24bf88cc7be313e9c31de9889
 Author: Damien Miller <djm@mindrot.org>
-Date:   Wed Mar 4 00:55:48 2015 -0800
+Date:   Tue Jun 30 16:05:40 2015 +1000
 
-    netcat needs poll.h portability goop
+    skip IPv6-related portions on hosts without IPv6
+    
+    with Tim Rice
 
-commit dad2b1892b4c1b7e58df483a8c5b983c4454e099
-Author: markus@openbsd.org <markus@openbsd.org>
-Date:   Tue Mar 3 22:35:19 2015 +0000
+commit 512caddf590857af6aa12218461b5c0441028cf5
+Author: djm@openbsd.org <djm@openbsd.org>
+Date:   Mon Jun 29 22:35:12 2015 +0000
 
     upstream commit
     
-    make it possible to run tests w/o ssh1 support; ok djm@
+    add getpid to sandbox, reachable by grace_alarm_handler
+    
+    reported by Jakub Jelen; bz#2419
+    
+    Upstream-ID: d0da1117c16d4c223954995d35b0f47c8f684cd8
 
-commit d48a22601bdd3eec054794c535f4ae8d8ae4c6e2
+commit 78c2a4f883ea9aba866358e2acd9793a7f42ca93
 Author: djm@openbsd.org <djm@openbsd.org>
-Date:   Wed Mar 4 18:53:53 2015 +0000
+Date:   Fri Jun 26 05:13:20 2015 +0000
 
     upstream commit
     
-    crank; ok markus, deraadt
+    Fix \-escaping bug that caused forward path parsing to skip
+     two characters and skip past the end of the string.
+    
+    Based on patch by Salvador Fandino; ok dtucker@
+    
+    Upstream-ID: 7b879dc446335677cbe4cb549495636a0535f3bd
 
-commit bbffb23daa0b002dd9f296e396a9ab8a5866b339
+commit bc20205c91c9920361d12b15d253d4997dba494a
 Author: Damien Miller <djm@mindrot.org>
-Date:   Tue Mar 3 13:50:27 2015 -0800
+Date:   Thu Jun 25 09:51:39 2015 +1000
 
-    more --without-ssh1 fixes
+    add missing pselect6
+    
+    patch from Jakub Jelen
 
-commit 6c2039286f503e2012a58a1d109e389016e7a99b
-Author: Damien Miller <djm@mindrot.org>
-Date:   Tue Mar 3 13:48:48 2015 -0800
+commit 9d27fb73b4a4e5e99cb880af790d5b1ce44f720a
+Author: djm@openbsd.org <djm@openbsd.org>
+Date:   Wed Jun 24 23:47:23 2015 +0000
 
-    fix merge both that broke --without-ssh1 compile
+    upstream commit
+    
+    correct test to sshkey_sign(); spotted by Albert S.
+    
+    Upstream-ID: 5f7347f40f0ca6abdaca2edb3bd62f4776518933
 
-commit 111dfb225478a76f89ecbcd31e96eaf1311b59d3
-Author: djm@openbsd.org <djm@openbsd.org>
-Date:   Tue Mar 3 21:21:13 2015 +0000
+commit 7ed01a96a1911d8b4a9ef4f3d064e1923bfad7e3
+Author: dtucker@openbsd.org <dtucker@openbsd.org>
+Date:   Wed Jun 24 01:49:19 2015 +0000
 
     upstream commit
     
-    add SSH1 Makefile knob to make it easier to build without
-     SSH1 support; ok markus@
+    Revert previous commit.  We still want to call setgroups
+     in the case where there are zero groups to remove any that we might otherwise
+     inherit (as pointed out by grawity at gmail.com) and since the 2nd argument
+     to setgroups is always a static global it's always valid to dereference in
+     this case.  ok deraadt@ djm@
+    
+    Upstream-ID: 895b5ac560a10befc6b82afa778641315725fd01
 
-commit 3f7f5e6c5d2aa3f6710289c1a30119e534e56c5c
+commit 882f8bf94f79528caa65b0ba71c185d705bb7195
+Author: dtucker@openbsd.org <dtucker@openbsd.org>
+Date:   Wed Jun 24 01:49:19 2015 +0000
+
+    upstream commit
+    
+    Revert previous commit.  We still want to call setgroups in
+     the case where there are zero groups to remove any that we might otherwise
+     inherit (as pointed out by grawity at gmail.com) and since the 2nd argument
+     to setgroups is always a static global it's always valid to dereference in
+     this case.  ok deraadt@ djm@
+    
+    Upstream-ID: 895b5ac560a10befc6b82afa778641315725fd01
+
+commit 9488538a726951e82b3a4374f3c558d72c80a89b
 Author: djm@openbsd.org <djm@openbsd.org>
-Date:   Tue Mar 3 20:42:49 2015 +0000
+Date:   Mon Jun 22 23:42:16 2015 +0000
 
     upstream commit
     
-    expand __unused to full __attribute__ for better portability
+    Don't count successful partial authentication as failures
+     in monitor; this may have caused the monitor to refuse multiple
+     authentications that would otherwise have successfully completed; ok markus@
+    
+    Upstream-ID: eb74b8e506714d0f649bd5c300f762a527af04a3
 
-commit 2fab9b0f8720baf990c931e3f68babb0bf9949c6
-Author: Damien Miller <djm@mindrot.org>
-Date:   Wed Mar 4 07:41:27 2015 +1100
+commit 63b78d003bd8ca111a736e6cea6333da50f5f09b
+Author: dtucker@openbsd.org <dtucker@openbsd.org>
+Date:   Mon Jun 22 12:29:57 2015 +0000
 
-    avoid warning
+    upstream commit
+    
+    Don't call setgroups if we have zero groups; there's no
+     guarantee that it won't try to deref the pointer.  Based on a patch from mail
+     at quitesimple.org, ok djm deraadt
+    
+    Upstream-ID: 2fff85e11d7a9a387ef7fddf41fbfaf566708ab1
 
-commit d1bc844322461f882b4fd2277ba9a8d4966573d2
+commit 5c15e22c691c79a47747bcf5490126656f97cecd
 Author: Damien Miller <djm@mindrot.org>
-Date:   Wed Mar 4 06:31:45 2015 +1100
+Date:   Thu Jun 18 15:07:56 2015 +1000
 
-    Revert "define __unused to nothing if not already defined"
+    fix syntax error
+
+commit 596dbca82f3f567fb3d2d69af4b4e1d3ba1e6403
+Author: jsing@openbsd.org <jsing@openbsd.org>
+Date:   Mon Jun 15 18:44:22 2015 +0000
+
+    upstream commit
     
-    This reverts commit 1598419e38afbaa8aa5df8dd6b0af98301e2c908.
+    If AuthorizedPrincipalsCommand is specified, however
+     AuthorizedPrincipalsFile is not (or is set to "none"), authentication will
+     potentially fail due to key_cert_check_authority() failing to locate a
+     principal that matches the username, even though an authorized principal has
+     already been matched in the output of the subprocess. Fix this by using the
+     same logic to determine if pw->pw_name should be passed, as is used to
+     determine if a authorized principal must be matched earlier on.
     
-    Some system headers have objects named __unused
+    ok djm@
+    
+    Upstream-ID: 43b42302ec846b0ea68aceb40677245391b9409d
 
-commit 00797e86b2d98334d1bb808f65fa1fd47f328ff1
+commit aff3e94c0d75d0d0fa84ea392b50ab04f8c57905
+Author: jsing@openbsd.org <jsing@openbsd.org>
+Date:   Mon Jun 15 18:42:19 2015 +0000
+
+    upstream commit
+    
+    Make the arguments to match_principals_command() similar
+     to match_principals_file(), by changing the last argument a struct
+     sshkey_cert * and dereferencing key->cert in the caller.
+    
+    No functional change.
+    
+    ok djm@
+    
+    Upstream-ID: 533f99b844b21b47342b32b62e198dfffcf8651c
+
+commit 97e2e1596c202a4693468378b16b2353fd2d6c5e
 Author: Damien Miller <djm@mindrot.org>
-Date:   Wed Mar 4 05:02:45 2015 +1100
+Date:   Wed Jun 17 14:36:54 2015 +1000
 
-    check for crypt and DES_crypt in openssl block
+    trivial optimisation for seccomp-bpf
     
-    fixes builds on systems that use DES_crypt; based on patch
-    from Roumen Petrov
+    When doing arg inspection and the syscall doesn't match, skip
+    past the instruction that reloads the syscall into the accumulator,
+    since the accumulator hasn't been modified at this point.
 
-commit 1598419e38afbaa8aa5df8dd6b0af98301e2c908
+commit 99f33d7304893bd9fa04d227cb6e870171cded19
 Author: Damien Miller <djm@mindrot.org>
-Date:   Wed Mar 4 04:59:13 2015 +1100
+Date:   Wed Jun 17 10:50:51 2015 +1000
 
-    define __unused to nothing if not already defined
+    aarch64 support for seccomp-bpf sandbox
     
-    fixes builds on BSD/OS
+    Also resort and tidy syscall list. Based on patches by Jakub Jelen
+    bz#2361; ok dtucker@
 
-commit d608a51daad4f14ad6ab43d7cf74ef4801cc3fe9
+commit 4ef702e1244633c1025ec7cfe044b9ab267097bf
 Author: djm@openbsd.org <djm@openbsd.org>
-Date:   Tue Mar 3 17:53:40 2015 +0000
+Date:   Mon Jun 15 01:32:50 2015 +0000
 
     upstream commit
     
-    reorder logic for better portability; patch from Roumen
-     Petrov
+    return failure on RSA signature error; reported by Albert S
+    
+    Upstream-ID: e61bb93dbe0349625807b0810bc213a6822121fa
 
-commit 68d2dfc464fbcdf8d6387884260f9801f4352393
-Author: djm@openbsd.org <djm@openbsd.org>
-Date:   Tue Mar 3 06:48:58 2015 +0000
+commit a170f22baf18af0b1acf2788b8b715605f41a1f9
+Author: Tim Rice <tim@multitalents.net>
+Date:   Tue Jun 9 22:41:13 2015 -0700
+
+    Fix t12 rules for out of tree builds.
+
+commit ec04dc4a5515c913121bc04ed261857e68fa5c18
+Author: millert@openbsd.org <millert@openbsd.org>
+Date:   Fri Jun 5 15:13:13 2015 +0000
 
     upstream commit
     
-    Allow "ssh -Q protocol-version" to list supported SSH
-     protocol versions. Useful for detecting builds without SSH v.1 support; idea
-     and ok markus@
+    For "ssh -L 12345:/tmp/sock" don't fail with "No forward host
+     name." (we have a path, not a host name).  Based on a diff from Jared
+     Yanovich. OK djm@
+    
+    Upstream-ID: 2846b0a8c7de037e33657f95afbd282837fc213f
 
-commit 39e2f1229562e1195169905607bc12290d21f021
-Author: millert@openbsd.org <millert@openbsd.org>
-Date:   Sun Mar 1 15:44:40 2015 +0000
+commit 732d61f417a6aea0aa5308b59cb0f563bcd6edd6
+Author: djm@openbsd.org <djm@openbsd.org>
+Date:   Fri Jun 5 03:44:14 2015 +0000
 
     upstream commit
     
-    Make sure we only call getnameinfo() for AF_INET or AF_INET6
-     sockets. getpeername() of a Unix domain socket may return without error on
-     some systems without actually setting ss_family so getnameinfo() was getting
-     called with ss_family set to AF_UNSPEC.  OK djm@
+    typo: accidental repetition; bz#2386
+    
+    Upstream-ID: 45e620d99f6bc301e5949d34a54027374991c88b
 
-commit e47536ba9692d271b8ad89078abdecf0a1c11707
-Author: Damien Miller <djm@mindrot.org>
-Date:   Sat Feb 28 08:20:11 2015 -0800
+commit adfb24c69d1b6f5e758db200866c711e25a2ba73
+Author: Darren Tucker <dtucker@zip.com.au>
+Date:   Fri Jun 5 14:51:40 2015 +1000
 
-    portability fixes for regress/netcat.c
+    Add Linux powerpc64le and powerpcle entries.
     
-    Mostly avoiding "err(1, NULL)"
+    Stopgap to resolve bz#2409 because we are so close to release and will
+    update config.guess and friends shortly after the release.  ok djm@
 
-commit 02973ad5f6f49d8420e50a392331432b0396c100
-Author: Damien Miller <djm@mindrot.org>
-Date:   Sat Feb 28 08:05:27 2015 -0800
+commit a1195a0fdc9eddddb04d3e9e44c4775431cb77da
+Merge: 6397eed d2480bc
+Author: Tim Rice <tim@multitalents.net>
+Date:   Wed Jun 3 21:43:13 2015 -0700
 
-    twiddle another test for portability
+    Merge branch 'master' of git.mindrot.org:/var/git/openssh
+
+commit 6397eedf953b2b973d2d7cbb504ab501a07f8ddc
+Author: Tim Rice <tim@multitalents.net>
+Date:   Wed Jun 3 21:41:11 2015 -0700
+
+    Remove unneeded backslashes. Patch from Ángel González
+
+commit d2480bcac1caf31b03068de877a47d6e1027bf6d
+Author: Darren Tucker <dtucker@zip.com.au>
+Date:   Thu Jun 4 14:10:55 2015 +1000
+
+    Remove redundant include of stdarg.h.  bz#2410
+
+commit 5e67859a623826ccdf2df284cbb37e2d8e2787eb
+Author: djm@openbsd.org <djm@openbsd.org>
+Date:   Tue Jun 2 09:10:40 2015 +0000
+
+    upstream commit
     
-    from Tom G. Christensen
+    mention CheckHostIP adding addresses to known_hosts;
+     bz#1993; ok dtucker@
+    
+    Upstream-ID: fd44b68440fd0dc29abf9f2d3f703d74a2396cb7
 
-commit f7f3116abf2a6e2f309ab096b08c58d19613e5d0
-Author: Damien Miller <djm@mindrot.org>
-Date:   Fri Feb 27 15:52:49 2015 -0800
+commit d7a58bbac6583e33fd5eca8e2c2cc70c57617818
+Author: Darren Tucker <dtucker@zip.com.au>
+Date:   Tue Jun 2 20:15:26 2015 +1000
 
-    twiddle test for portability
+    Replace strcpy with strlcpy.
+    
+    ok djm, sanity check by Corinna Vinschen.
 
-commit 1ad3a77cc9d5568f5437ff99d377aa7a41859b83
+commit 51a1c2115265c6e80ede8a5c9dccada9aeed7143
 Author: Damien Miller <djm@mindrot.org>
-Date:   Thu Feb 26 20:33:22 2015 -0800
+Date:   Fri May 29 18:27:21 2015 +1000
 
-    make regress/netcat.c fd passing (more) portable
+    skip, rather than fatal when run without SUDO set
 
-commit 9e1cfca7e1fe9cf8edb634fc894e43993e4da1ea
+commit 599f01142a376645b15cbc9349d7e8975e1cf245
 Author: Damien Miller <djm@mindrot.org>
-Date:   Thu Feb 26 20:32:58 2015 -0800
+Date:   Fri May 29 18:03:15 2015 +1000
 
-    create OBJ/valgrind-out before running unittests
+    fix merge botch that left ",," in KEX algs
 
-commit bd58853102cee739f0e115e6d4b5334332ab1442
+commit 0c2a81dfc21822f2423edd30751e5ec53467b347
 Author: Damien Miller <djm@mindrot.org>
-Date:   Wed Feb 25 16:58:22 2015 -0800
+Date:   Fri May 29 17:08:28 2015 +1000
 
-    valgrind support
+    re-enable SSH protocol 1 at compile time
 
-commit f43d17269194761eded9e89f17456332f4c83824
+commit db438f9285d64282d3ac9e8c0944f59f037c0151
 Author: djm@openbsd.org <djm@openbsd.org>
-Date:   Thu Feb 26 20:45:47 2015 +0000
+Date:   Fri May 29 03:05:13 2015 +0000
 
     upstream commit
     
-    don't printf NULL key comments; reported by Tom Christensen
+    make this work without SUDO set; ok dtucker@
+    
+    Upstream-Regress-ID: bca88217b70bce2fe52b23b8e06bdeb82d98c715
 
-commit 6e6458b476ec854db33e3e68ebf4f489d0ab3df8
+commit 1d9a2e2849c9864fe75daabf433436341c968e14
 Author: djm@openbsd.org <djm@openbsd.org>
-Date:   Wed Feb 25 23:05:47 2015 +0000
+Date:   Thu May 28 07:37:31 2015 +0000
 
     upstream commit
     
-    zero cmsgbuf before use; we initialise the bits we use
-     but valgrind still spams warning on it
+    wrap all moduli-related code in #ifdef WITH_OPENSSL.
+     based on patch from Reuben Hawkins; bz#2388 feedback and ok dtucker@
+    
+    Upstream-ID: d80cfc8be3e6ec65b3fac9e87c4466533b31b7cf
 
-commit a63cfa26864b93ab6afefad0b630e5358ed8edfa
-Author: djm@openbsd.org <djm@openbsd.org>
-Date:   Wed Feb 25 19:54:02 2015 +0000
+commit 496aeb25bc2d6c434171292e4714771b594bd00e
+Author: dtucker@openbsd.org <dtucker@openbsd.org>
+Date:   Thu May 28 05:41:29 2015 +0000
 
     upstream commit
     
-    fix small memory leak when UpdateHostkeys=no
+    Increase the allowed length of the known host file name
+     in the log message to be consistent with other cases.  Part of bz#1993, ok
+     deraadt.
+    
+    Upstream-ID: a9e97567be49f25daf286721450968251ff78397
 
-commit e6b950341dd75baa8526f1862bca39e52f5b879b
-Author: Tim Rice <tim@multitalents.net>
-Date:   Wed Feb 25 09:56:48 2015 -0800
+commit dd2cfeb586c646ff8d70eb93567b2e559ace5b14
+Author: dtucker@openbsd.org <dtucker@openbsd.org>
+Date:   Thu May 28 05:09:45 2015 +0000
 
-    Revert "Work around finicky USL linker so netcat will build."
+    upstream commit
     
-    This reverts commit d1db656021d0cd8c001a6692f772f1de29b67c8b.
+    Fix typo (keywork->keyword)
     
-    No longer needed with commit 678e473e2af2e4802f24dd913985864d9ead7fb3
+    Upstream-ID: 8aacd0f4089c0a244cf43417f4f9045dfaeab534
 
-commit 6f621603f9cff2a5d6016a404c96cb2f8ac2dec0
+commit 9cc6842493fbf23025ccc1edab064869640d3bec
 Author: djm@openbsd.org <djm@openbsd.org>
-Date:   Wed Feb 25 17:29:38 2015 +0000
+Date:   Thu May 28 04:50:53 2015 +0000
 
     upstream commit
     
-    don't leak validity of user in "too many authentication
-     failures" disconnect message; reported by Sebastian Reitenbach
+    add error message on ftruncate failure; bz#2176
+    
+    Upstream-ID: cbcc606e0b748520c74a210d8f3cc9718d3148cf
 
-commit 6288e3a935494df12519164f52ca5c8c65fc3ca5
-Author: naddy@openbsd.org <naddy@openbsd.org>
-Date:   Tue Feb 24 15:24:05 2015 +0000
+commit d1958793a0072c22be26d136dbda5ae263e717a0
+Author: djm@openbsd.org <djm@openbsd.org>
+Date:   Thu May 28 04:40:13 2015 +0000
 
     upstream commit
     
-    add -v (show ASCII art) to -l's synopsis; ok djm@
+    make ssh-keygen default to ed25519 keys when compiled
+     without OpenSSL; bz#2388, ok dtucker@
+    
+    Upstream-ID: 85a471fa6d3fa57a7b8e882d22cfbfc1d84cdc71
 
-commit 678e473e2af2e4802f24dd913985864d9ead7fb3
-Author: Darren Tucker <dtucker@zip.com.au>
-Date:   Thu Feb 26 04:12:58 2015 +1100
+commit 3ecde664c9fc5fb3667aedf9e6671462600f6496
+Author: dtucker@openbsd.org <dtucker@openbsd.org>
+Date:   Wed May 27 23:51:10 2015 +0000
 
-    Remove dependency on xmalloc.
+    upstream commit
     
-    Remove ssh_get_progname's dependency on xmalloc, which should reduce
-    link order problems.  ok djm@
+    Reorder client proposal to prefer
+     diffie-hellman-group-exchange-sha1 over diffie-hellman-group14-sha1.  ok djm@
+    
+    Upstream-ID: 552c08d47347c3ee1a9a57d88441ab50abe17058
 
-commit 5d5ec165c5b614b03678afdad881f10e25832e46
-Author: Darren Tucker <dtucker@zip.com.au>
-Date:   Wed Feb 25 15:32:49 2015 +1100
+commit 40f64292b907afd0a674fdbf3e4c2356d17a7d68
+Author: dtucker@openbsd.org <dtucker@openbsd.org>
+Date:   Wed May 27 23:39:18 2015 +0000
 
-    Restrict ECDSA and ECDH tests.
+    upstream commit
     
-    ifdef out some more ECDSA and ECDH tests when built against an OpenSSL
-    that does not have eliptic curve functionality.
+    Add a stronger (4k bit) fallback group that sshd can use
+     when the moduli file is missing or broken, sourced from RFC3526.  bz#2302, ok
+     markus@ (earlier version), djm@
+    
+    Upstream-ID: b635215746a25a829d117673d5e5a76d4baee7f4
 
-commit 1734e276d99b17e92d4233fac7aef3a3180aaca7
+commit 5ab7d5fa03ad55bc438fab45dfb3aeb30a3c237a
 Author: Darren Tucker <dtucker@zip.com.au>
-Date:   Wed Feb 25 13:40:45 2015 +1100
+Date:   Thu May 28 10:03:40 2015 +1000
 
-    Move definition of _NSIG.
+    New moduli file from OpenBSD, removing 1k groups.
     
-    _NSIG is only unsed in one file, so move it there prevent redefinition
-    warnings reported by Kevin Brott.
+    Remove 1k bit groups.  ok deraadt@, markus@
 
-commit a47ead7c95cfbeb72721066c4da2312e5b1b9f3d
-Author: Darren Tucker <dtucker@zip.com.au>
-Date:   Wed Feb 25 13:17:40 2015 +1100
-
-    Add includes.h for compatibility stuff.
-
-commit 38806bda6d2e48ad32812b461eebe17672ada771
-Author: Damien Miller <djm@mindrot.org>
-Date:   Tue Feb 24 16:50:06 2015 -0800
-
-    include netdb.h to look for MAXHOSTNAMELEN; ok tim
-
-commit d1db656021d0cd8c001a6692f772f1de29b67c8b
-Author: Tim Rice <tim@multitalents.net>
-Date:   Tue Feb 24 10:42:08 2015 -0800
-
-    Work around finicky USL linker so netcat will build.
-
-commit cb030ce25f555737e8ba97bdd7883ac43f3ff2a3
-Author: Damien Miller <djm@mindrot.org>
-Date:   Tue Feb 24 09:23:04 2015 -0800
+commit a71ba58adf34e599f30cdda6e9b93ae6e3937eea
+Author: djm@openbsd.org <djm@openbsd.org>
+Date:   Wed May 27 05:15:02 2015 +0000
 
-    include includes.h to avoid build failure on AIX
+    upstream commit
+    
+    support PKCS#11 devices with external PIN entry devices
+     bz#2240, based on patch from Dirk-Willem van Gulik; feedback and ok dtucker@
+    
+    Upstream-ID: 504568992b55a8fc984375242b1bd505ced61b0d
 
-commit 13af342458f5064144abbb07e5ac9bbd4eb42567
-Author: Tim Rice <tim@multitalents.net>
-Date:   Tue Feb 24 07:56:47 2015 -0800
+commit b282fec1aa05246ed3482270eb70fc3ec5f39a00
+Author: dtucker@openbsd.org <dtucker@openbsd.org>
+Date:   Tue May 26 23:23:40 2015 +0000
 
-    Original portability patch from djm@ for platforms missing err.h.
-    Fix name space clash on Solaris 10. Still more to do for Solaris 10
-    to deal with msghdr structure differences. ok djm@
+    upstream commit
+    
+    Cap DH-GEX group size at 4kbits for Cisco implementations.
+     Some of them will choke when asked for preferred sizes >4k instead of
+     returning the 4k group that they do have.  bz#2209, ok djm@
+    
+    Upstream-ID: 54b863a19713446b7431f9d06ad0532b4fcfef8d
 
-commit 910209203d0cd60c5083901cbcc0b7b44d9f48d2
-Author: Tim Rice <tim@multitalents.net>
-Date:   Mon Feb 23 22:06:56 2015 -0800
+commit 3e91b4e8b0dc2b4b7e7d42cf6e8994a32e4cb55e
+Author: djm@openbsd.org <djm@openbsd.org>
+Date:   Sun May 24 23:39:16 2015 +0000
 
-    cleaner way fix dispatch.h portion of commit
-    a88dd1da119052870bb2654c1a32c51971eade16
-    (some systems have sig_atomic_t in signal.h, some in sys/signal.h)
-    Sounds good to me djm@
+    upstream commit
+    
+    add missing 'c' option to getopt(), case statement was
+     already there; from Felix Bolte
+    
+    Upstream-ID: 9b19b4e2e0b54d6fefa0dfac707c51cf4bae3081
 
-commit 676c38d7cbe65b76bbfff796861bb6615cc6a596
-Author: Tim Rice <tim@multitalents.net>
-Date:   Mon Feb 23 21:51:33 2015 -0800
+commit 64a89ec07660abba4d0da7c0095b7371c98bab62
+Author: jsg@openbsd.org <jsg@openbsd.org>
+Date:   Sat May 23 14:28:37 2015 +0000
 
-    portability fix: if we can't dind a better define for HOST_NAME_MAX, use 255
+    upstream commit
+    
+    fix a memory leak in an error path ok markus@ dtucker@
+    
+    Upstream-ID: bc1da0f205494944918533d8780fde65dff6c598
 
-commit 1221b22023dce38cbc90ba77eae4c5d78c77a5e6
-Author: Tim Rice <tim@multitalents.net>
-Date:   Mon Feb 23 21:50:34 2015 -0800
+commit f948737449257d2cb83ffcfe7275eb79b677fd4a
+Author: djm@openbsd.org <djm@openbsd.org>
+Date:   Fri May 22 05:28:45 2015 +0000
 
-    portablity fix: s/__inline__/inline/
+    upstream commit
+    
+    mention ssh-keygen -E for comparing legacy MD5
+     fingerprints; bz#2332
+    
+    Upstream-ID: 079a3669549041dbf10dbc072d9563f0dc3b2859
 
-commit 4c356308a88d309c796325bb75dce90ca16591d5
-Author: Darren Tucker <dtucker@zip.com.au>
-Date:   Tue Feb 24 13:49:31 2015 +1100
+commit 0882332616e4f0272c31cc47bf2018f9cb258a4e
+Author: djm@openbsd.org <djm@openbsd.org>
+Date:   Fri May 22 04:45:52 2015 +0000
 
-    Wrap stdint.h includes in HAVE_STDINT_H.
+    upstream commit
+    
+    Reorder EscapeChar option parsing to avoid a single-byte
+     out- of-bounds read. bz#2396 from Jaak Ristioja; ok dtucker@
+    
+    Upstream-ID: 1dc6b5b63d1c8d9a88619da0b27ade461d79b060
 
-commit c9c88355c6a27a908e7d1e5003a2b35ea99c1614
-Author: Darren Tucker <dtucker@zip.com.au>
-Date:   Tue Feb 24 13:43:57 2015 +1100
+commit d7c31da4d42c115843edee2074d7d501f8804420
+Author: djm@openbsd.org <djm@openbsd.org>
+Date:   Fri May 22 03:50:02 2015 +0000
 
-    Add AI_NUMERICSERV to fake-rfc2553.
+    upstream commit
     
-    Our getaddrinfo implementation always returns numeric values already.
+    add knob to relax GSSAPI host credential check for
+     multihomed hosts bz#928, patch by Simon Wilkinson; ok dtucker
+     (kerberos/GSSAPI is not compiled by default on OpenBSD)
+    
+    Upstream-ID: 15ddf1c6f7fd9d98eea9962f480079ae3637285d
 
-commit ef342ab1ce6fb9a4b30186c89c309d0ae9d0eeb4
+commit aa72196a00be6e0b666215edcffbc10af234cb0e
 Author: Darren Tucker <dtucker@zip.com.au>
-Date:   Tue Feb 24 13:39:57 2015 +1100
+Date:   Fri May 22 17:49:46 2015 +1000
 
-    Include OpenSSL's objects.h before bn.h.
+    Include signal.h for sig_atomic_t, used by kex.h.
     
-    Prevents compile errors on some platforms (at least old GCCs and AIX's
-    XLC compilers).
+    bz#2402, from tomas.kuthan at oracle com.
 
-commit dcc8997d116f615195aa7c9ec019fb36c28c6228
+commit 8b02481143d75e91c49d1bfae0876ac1fbf9511a
 Author: Darren Tucker <dtucker@zip.com.au>
-Date:   Tue Feb 24 12:30:59 2015 +1100
+Date:   Fri May 22 12:47:24 2015 +1000
 
-    Convert two macros into functions.
-    
-    Convert packet_send_debug and packet_disconnect from macros to
-    functions.  Some older GCCs (2.7.x, 2.95.x) see to have problems with
-    variadic macros with only one argument so we convert these two into
-    functions.  ok djm@
+    Import updated moduli file from OpenBSD.
 
-commit 2285c30d51b7e2052c6526445abe7e7cc7e170a1
+commit 4739e8d5e1c0be49624082bd9f6b077e9e758db9
 Author: djm@openbsd.org <djm@openbsd.org>
-Date:   Mon Feb 23 22:21:21 2015 +0000
+Date:   Thu May 21 12:01:19 2015 +0000
 
     upstream commit
     
-    further silence spurious error message even when -v is
-     specified (e.g. to get visual host keys); reported by naddy@
+    Support "ssh-keygen -lF hostname" to find search known_hosts
+     and print key hashes. Already advertised by ssh-keygen(1), but not delivered
+     by code; ok dtucker@
+    
+    Upstream-ID: 459e0e2bf39825e41b0811c336db2d56a1c23387
 
-commit 9af21979c00652029e160295e988dea40758ece2
+commit e97201feca10b5196da35819ae516d0b87cf3a50
 Author: Damien Miller <djm@mindrot.org>
-Date:   Tue Feb 24 09:04:32 2015 +1100
+Date:   Thu May 21 17:55:15 2015 +1000
 
-    don't include stdint.h unless HAVE_STDINT_H set
+    conditionalise util.h inclusion
 
-commit 62f678dd51660d6f8aee1da33d3222c5de10a89e
-Author: Damien Miller <djm@mindrot.org>
-Date:   Tue Feb 24 09:02:54 2015 +1100
+commit 13640798c7dd011ece0a7d02841fe48e94cfa0e0
+Author: djm@openbsd.org <djm@openbsd.org>
+Date:   Thu May 21 06:44:25 2015 +0000
 
-    nother sys/queue.h -> sys-queue.h fix
+    upstream commit
     
-    spotted by Tom Christensen
+    regress test for AuthorizedPrincipalsCommand
+    
+    Upstream-Regress-ID: c658fbf1ab6b6011dc83b73402322e396f1e1219
 
-commit b3c19151cba2c0ed01b27f55de0d723ad07ca98f
+commit 84452c5d03c21f9bfb28c234e0dc1dc67dd817b1
 Author: djm@openbsd.org <djm@openbsd.org>
-Date:   Mon Feb 23 20:32:15 2015 +0000
+Date:   Thu May 21 06:40:02 2015 +0000
 
     upstream commit
     
-    fix a race condition by using a mux socket rather than an
-     ineffectual wait statement
+    regress test for AuthorizedKeysCommand arguments
+    
+    Upstream-Regress-ID: bbd65c13c6b3be9a442ec115800bff9625898f12
 
-commit a88dd1da119052870bb2654c1a32c51971eade16
-Author: Damien Miller <djm@mindrot.org>
-Date:   Tue Feb 24 06:30:29 2015 +1100
+commit bcc50d816187fa9a03907ac1f3a52f04a52e10d1
+Author: djm@openbsd.org <djm@openbsd.org>
+Date:   Thu May 21 06:43:30 2015 +0000
 
-    various include fixes for portable
+    upstream commit
+    
+    add AuthorizedPrincipalsCommand that allows getting
+     authorized_principals from a subprocess rather than a file, which is quite
+     useful in deployments with large userbases
+    
+    feedback and ok markus@
+    
+    Upstream-ID: aa1bdac7b16fc6d2fa3524ef08f04c7258d247f6
 
-commit 5248429b5ec524d0a65507cff0cdd6e0cb99effd
+commit 24232a3e5ab467678a86aa67968bbb915caffed4
 Author: djm@openbsd.org <djm@openbsd.org>
-Date:   Mon Feb 23 16:55:51 2015 +0000
+Date:   Thu May 21 06:38:35 2015 +0000
 
     upstream commit
     
-    add an XXX to remind me to improve sshkey_load_public
+    support arguments to AuthorizedKeysCommand
+    
+    bz#2081 loosely based on patch by Sami Hartikainen
+    feedback and ok markus@
+    
+    Upstream-ID: b080387a14aa67dddd8ece67c00f268d626541f7
 
-commit e94e4b07ef2eaead38b085a60535df9981cdbcdb
+commit d80fbe41a57c72420c87a628444da16d09d66ca7
 Author: djm@openbsd.org <djm@openbsd.org>
-Date:   Mon Feb 23 16:55:31 2015 +0000
+Date:   Thu May 21 04:55:51 2015 +0000
 
     upstream commit
     
-    silence a spurious error message when listing
-     fingerprints for known_hosts; bz#2342
+    refactor: split base64 encoding of pubkey into its own
+     sshkey_to_base64() function and out of sshkey_write(); ok markus@
+    
+    Upstream-ID: 54fc38f5832e9b91028900819bda46c3959a0c1a
 
-commit f2293a65392b54ac721f66bc0b44462e8d1d81f8
-Author: djm@openbsd.org <djm@openbsd.org>
-Date:   Mon Feb 23 16:33:25 2015 +0000
+commit 7cc44ef74133a473734bbcbd3484f24d6a7328c5
+Author: deraadt@openbsd.org <deraadt@openbsd.org>
+Date:   Mon May 18 15:06:05 2015 +0000
 
     upstream commit
     
-    fix setting/clearing of TTY raw mode around
-     UpdateHostKeys=ask confirmation question; reported by Herb Goldman
+    getentropy() and sendsyslog() have been around long
+     enough. openssh-portable may want the #ifdef's but not base. discussed with
+     djm few weeks back
+    
+    Upstream-ID: 0506a4334de108e3fb6c66f8d6e0f9c112866926
 
-commit f2004cd1adf34492eae0a44b1ef84e0e31b06088
-Author: Darren Tucker <dtucker@zip.com.au>
-Date:   Mon Feb 23 05:04:21 2015 +1100
+commit 9173d0fbe44de7ebcad8a15618e13a8b8d78902e
+Author: dtucker@openbsd.org <dtucker@openbsd.org>
+Date:   Fri May 15 05:44:21 2015 +0000
 
-    Repair for non-ECC OpenSSL.
+    upstream commit
     
-    Ifdef out the ECC parts when building with an OpenSSL that doesn't have
-    it.
+    Use a salted hash of the lock passphrase instead of plain
+     text and do constant-time comparisons of it. Should prevent leaking any
+     information about it via timing, pointed out by Ryan Castellucci.  Add a 0.1s
+     incrementing delay for each failed unlock attempt up to 10s.  ok markus@
+     (earlier version), djm@
+    
+    Upstream-ID: c599fcc325aa1cc65496b25220b622d22208c85f
 
-commit 37f9220db8d1a52c75894c3de1e5f2ae5bd71b6f
-Author: Darren Tucker <dtucker@zip.com.au>
-Date:   Mon Feb 23 03:07:24 2015 +1100
+commit d028d5d3a697c71b21e4066d8672cacab3caa0a8
+Author: Damien Miller <djm@mindrot.org>
+Date:   Tue May 5 19:10:58 2015 +1000
 
-    Wrap stdint.h includes in ifdefs.
+    upstream commit
+    
+       - tedu@cvs.openbsd.org 2015/01/12 03:20:04
+         [bcrypt_pbkdf.c]
+         rename blocks to words. bcrypt "blocks" are unrelated to blowfish blocks,
+         nor are they the same size.
 
-commit f81f1bbc5b892c8614ea740b1f92735652eb43f0
-Author: Tim Rice <tim@multitalents.net>
-Date:   Sat Feb 21 18:12:10 2015 -0800
+commit f6391d4e59b058984163ab28f4e317e7a72478f1
+Author: Damien Miller <djm@mindrot.org>
+Date:   Tue May 5 19:10:23 2015 +1000
 
-    out of tree build fix
+    upstream commit
+    
+       - deraadt@cvs.openbsd.org 2015/01/08 00:30:07
+         [bcrypt_pbkdf.c]
+         declare a local version of MIN(), call it MINIMUM()
 
-commit 2e13a1e4d22f3b503c3bfc878562cc7386a1d1ae
-Author: Tim Rice <tim@multitalents.net>
-Date:   Sat Feb 21 18:08:51 2015 -0800
+commit 8ac6b13cc9113eb47cd9e86c97d7b26b4b71b77f
+Author: Damien Miller <djm@mindrot.org>
+Date:   Tue May 5 19:09:46 2015 +1000
 
-    mkdir kex unit test directory so testing out of tree builds works
+    upstream commit
+    
+       - djm@cvs.openbsd.org 2014/12/30 01:41:43
+         [bcrypt_pbkdf.c]
+         typo in comment: ouput => output
 
-commit 1797f49b1ba31e8700231cd6b1d512d80bb50d2c
-Author: halex@openbsd.org <halex@openbsd.org>
-Date:   Sat Feb 21 21:46:57 2015 +0000
+commit 1f792489d5cf86a4f4e3003e6e9177654033f0f2
+Author: djm@openbsd.org <djm@openbsd.org>
+Date:   Mon May 4 06:10:48 2015 +0000
 
     upstream commit
     
-    make "ssh-add -d" properly remove a corresponding
-     certificate, and also not whine and fail if there is none
+    Remove pattern length argument from match_pattern_list(), we
+     only ever use it for strlen(pattern).
     
-    ok djm@
+    Prompted by hanno AT hboeck.de pointing an out-of-bound read
+    error caused by an incorrect pattern length found using AFL
+    and his own tools.
+    
+    ok markus@
 
-commit 7faaa32da83a609059d95dbfcb0649fdb04caaf6
-Author: Damien Miller <djm@mindrot.org>
-Date:   Sun Feb 22 07:57:27 2015 +1100
+commit 639d6bc57b1942393ed12fb48f00bc05d4e093e4
+Author: djm@openbsd.org <djm@openbsd.org>
+Date:   Fri May 1 07:10:01 2015 +0000
 
-    mkdir hostkey and bitmap unit test directories
+    upstream commit
+    
+    refactor ssh_dispatch_run_fatal() to use sshpkt_fatal()
+     to better report error conditions. Teach sshpkt_fatal() about ECONNRESET.
+    
+    Improves error messages on TCP connection resets. bz#2257
+    
+    ok dtucker@
 
-commit bd49da2ef197efac5e38f5399263a8b47990c538
+commit 9559d7de34c572d4d3fd990ca211f8ec99f62c4d
 Author: djm@openbsd.org <djm@openbsd.org>
-Date:   Fri Feb 20 23:46:01 2015 +0000
+Date:   Fri May 1 07:08:08 2015 +0000
 
     upstream commit
     
-    sort options useable under Match case-insensitively; prodded
-     jmc@
+    a couple of parse targets were missing activep checks,
+     causing them to be misapplied in match context; bz#2272 diagnosis and
+     original patch from Sami Hartikainen ok dtucker@

*** DIFF OUTPUT TRUNCATED AT 1000 LINES ***

From owner-svn-src-all@freebsd.org  Tue Jan 19 19:04:58 2016
Return-Path: <owner-svn-src-all@freebsd.org>
Delivered-To: svn-src-all@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id 42327A895A6;
 Tue, 19 Jan 2016 19:04:58 +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 0F2F61746;
 Tue, 19 Jan 2016 19:04:57 +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 u0JJ4vAB099394;
 Tue, 19 Jan 2016 19:04:57 GMT (envelope-from jhb@FreeBSD.org)
Received: (from jhb@localhost)
 by repo.freebsd.org (8.15.2/8.15.2/Submit) id u0JJ4uB1099393;
 Tue, 19 Jan 2016 19:04:56 GMT (envelope-from jhb@FreeBSD.org)
Message-Id: <201601191904.u0JJ4uB1099393@repo.freebsd.org>
X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org
 using -f
From: John Baldwin <jhb@FreeBSD.org>
Date: Tue, 19 Jan 2016 19:04:56 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org
Subject: svn commit: r294338 - in stable: 10/usr.sbin/boot0cfg
 9/usr.sbin/boot0cfg
X-SVN-Group: stable-10
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.20
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for &quot;
 user&quot; and &quot; projects&quot; \)" <svn-src-all.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-all/>
List-Post: <mailto:svn-src-all@freebsd.org>
List-Help: <mailto:svn-src-all-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Tue, 19 Jan 2016 19:04:58 -0000

Author: jhb
Date: Tue Jan 19 19:04:56 2016
New Revision: 294338
URL: https://svnweb.freebsd.org/changeset/base/294338

Log:
  MFC 292410,292443,293977:
  Exit cleanly if malloc() fails to allocate a buffer for a copy of the
  current MBR.
  
  PR:		205322
  Submitted by:	Alexander Kuleshov <kuleshovmail@gmail.com>

Modified:
  stable/10/usr.sbin/boot0cfg/boot0cfg.c
Directory Properties:
  stable/10/   (props changed)

Changes in other areas also in this revision:
Modified:
  stable/9/usr.sbin/boot0cfg/boot0cfg.c
Directory Properties:
  stable/9/usr.sbin/boot0cfg/   (props changed)

Modified: stable/10/usr.sbin/boot0cfg/boot0cfg.c
==============================================================================
--- stable/10/usr.sbin/boot0cfg/boot0cfg.c	Tue Jan 19 18:57:37 2016	(r294337)
+++ stable/10/usr.sbin/boot0cfg/boot0cfg.c	Tue Jan 19 19:04:56 2016	(r294338)
@@ -336,7 +336,8 @@ read_mbr(const char *disk, u_int8_t **mb
 	close(fd);
 	return (mbr_size);
     }
-    *mbr = malloc(sizeof(buf));
+    if ((*mbr = malloc(sizeof(buf))) == NULL)
+	errx(1, "%s: unable to allocate MBR buffer", disk);
     memcpy(*mbr, buf, sizeof(buf));
     close(fd);
 

From owner-svn-src-all@freebsd.org  Tue Jan 19 19:04:58 2016
Return-Path: <owner-svn-src-all@freebsd.org>
Delivered-To: svn-src-all@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id 564F8A895A7;
 Tue, 19 Jan 2016 19:04:58 +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 28FBC1747;
 Tue, 19 Jan 2016 19:04:58 +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 u0JJ4vcL099400;
 Tue, 19 Jan 2016 19:04:57 GMT (envelope-from jhb@FreeBSD.org)
Received: (from jhb@localhost)
 by repo.freebsd.org (8.15.2/8.15.2/Submit) id u0JJ4vDt099399;
 Tue, 19 Jan 2016 19:04:57 GMT (envelope-from jhb@FreeBSD.org)
Message-Id: <201601191904.u0JJ4vDt099399@repo.freebsd.org>
X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org
 using -f
From: John Baldwin <jhb@FreeBSD.org>
Date: Tue, 19 Jan 2016 19:04:57 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org
Subject: svn commit: r294338 - in stable: 10/usr.sbin/boot0cfg
 9/usr.sbin/boot0cfg
X-SVN-Group: stable-9
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.20
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for &quot;
 user&quot; and &quot; projects&quot; \)" <svn-src-all.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-all/>
List-Post: <mailto:svn-src-all@freebsd.org>
List-Help: <mailto:svn-src-all-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Tue, 19 Jan 2016 19:04:58 -0000

Author: jhb
Date: Tue Jan 19 19:04:56 2016
New Revision: 294338
URL: https://svnweb.freebsd.org/changeset/base/294338

Log:
  MFC 292410,292443,293977:
  Exit cleanly if malloc() fails to allocate a buffer for a copy of the
  current MBR.
  
  PR:		205322
  Submitted by:	Alexander Kuleshov <kuleshovmail@gmail.com>

Modified:
  stable/9/usr.sbin/boot0cfg/boot0cfg.c
Directory Properties:
  stable/9/usr.sbin/boot0cfg/   (props changed)

Changes in other areas also in this revision:
Modified:
  stable/10/usr.sbin/boot0cfg/boot0cfg.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/9/usr.sbin/boot0cfg/boot0cfg.c
==============================================================================
--- stable/9/usr.sbin/boot0cfg/boot0cfg.c	Tue Jan 19 18:57:37 2016	(r294337)
+++ stable/9/usr.sbin/boot0cfg/boot0cfg.c	Tue Jan 19 19:04:56 2016	(r294338)
@@ -334,7 +334,8 @@ read_mbr(const char *disk, u_int8_t **mb
 	    errx(1, "%s: short read", disk);
 	return (mbr_size);
     }
-    *mbr = malloc(sizeof(buf));
+    if ((*mbr = malloc(sizeof(buf))) == NULL)
+	errx(1, "%s: unable to allocate MBR buffer", disk);
     memcpy(*mbr, buf, sizeof(buf));
 
     return sizeof(buf);

From owner-svn-src-all@freebsd.org  Tue Jan 19 19:13:28 2016
Return-Path: <owner-svn-src-all@freebsd.org>
Delivered-To: svn-src-all@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id C476BA898DF;
 Tue, 19 Jan 2016 19:13:28 +0000 (UTC)
 (envelope-from cschuber@gmail.com)
Received: from mail-pa0-x232.google.com (mail-pa0-x232.google.com
 [IPv6:2607:f8b0:400e:c03::232])
 (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits))
 (Client CN "smtp.gmail.com",
 Issuer "Google Internet Authority G2" (verified OK))
 by mx1.freebsd.org (Postfix) with ESMTPS id 958D71E1D;
 Tue, 19 Jan 2016 19:13:28 +0000 (UTC)
 (envelope-from cschuber@gmail.com)
Received: by mail-pa0-x232.google.com with SMTP id cy9so456183189pac.0;
 Tue, 19 Jan 2016 11:13:28 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;
 h=message-id:mime-version:from:subject:date:to:cc:content-type;
 bh=srAuWYcc6GDQtCD0A983fQSkneO9jm7Ys+Zc1WEamsU=;
 b=soPnSX6s2jYj++fziIoDmDx5MrBPB3HgpAlVTiPSuNdSgreBurm1oYQJ1aEjajU3wA
 6f2TYZzRFtPX2XACsFksjwxOG8OmFgYTNHYfMvbE6PS7ZOvCrdq7zrXZvfZtSIT0Je76
 F4NzUNe//pYPzVVOt87JTJIK3RzXmwoPVIptrk+t8XfS+RCtzHxtxx2K+rFJONZmcZ2H
 Mgja5e6J2HF2wLDl1NjbGcIU0LwU09ncqO+AFXNMNJE44qZ/F4ohb9nqoDiKsnRtdGQ4
 wK3eAWRAH6qT9G1AN+j1ULrs48rVN+EH3vSi0lteLhYqgcXjj/GTc5NZSFtOQSvxqJp7
 WcSA==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20130820;
 h=x-gm-message-state:message-id:mime-version:from:subject:date:to:cc
 :content-type;
 bh=srAuWYcc6GDQtCD0A983fQSkneO9jm7Ys+Zc1WEamsU=;
 b=IXQIHxFEU5e1H4Z1ZSkEuOjeQd6LaiNuN+fOS5ah4QJcF1bpW5/pyE5GywEhCRsbJV
 4ioKtiY+3Q3o9EetIMJmKqkBNn0XRzYjJKZZPoRi8JfIi6HB3Dkd6baJoZn700bmirI9
 so/A2NBm136mddiVAxvEKqnepEBnvDlohmKIal7CimgzL783Fv6vboms4UfwYTH8vjYo
 lycri/4DEbppDY72wrxPEQeUmxiJ/d3Y9jtAFSuPKYLWTfW5iDakAevr8F4H1lddBWLo
 2o169bQfoBWe83Lj/o+plRHe/6qFPrW82wTHJPNMqa0cXv23W659HNUH3HjveahDMIbT
 3OTw==
X-Gm-Message-State: ALoCoQloEealDRMRVKibSBH7ZWwjBf8ee60o992BwJHQraLBjNZGKYQeVQjBrEDcYr9/Zpl0OlcGTeTFi2fVNIANNJEt2GRqgg==
X-Received: by 10.66.118.198 with SMTP id ko6mr46853721pab.122.1453230808134; 
 Tue, 19 Jan 2016 11:13:28 -0800 (PST)
Received: from [10.168.3.75] (S0106d4ca6d8943b0.gv.shawcable.net.
 [24.68.134.59])
 by smtp.gmail.com with ESMTPSA id m75sm43267767pfj.38.2016.01.19.11.13.26
 (version=TLSv1/SSLv3 cipher=OTHER);
 Tue, 19 Jan 2016 11:13:27 -0800 (PST)
Message-ID: <569e8ad7.ce20620a.a05fc.ffffd4a5@mx.google.com>
MIME-Version: 1.0
From: Cy Schubert <cschuber@gmail.com>
Subject: RE: svn commit: r294329 -
 inhead/sys/cddl/contrib/opensolaris/uts/common/fs/zfs: . sys
Date: Tue, 19 Jan 2016 11:13:29 -0800
To: Alan Somers <asomers@freebsd.org>
CC: "src-committers@freebsd.org" <src-committers@freebsd.org>, 
 "svn-src-all@freebsd.org" <svn-src-all@freebsd.org>, 
 "svn-src-head@freebsd.org" <svn-src-head@freebsd.org>, 
 Cy Schubert <Cy.Schubert@komquats.com>
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: quoted-printable
X-Content-Filtered-By: Mailman/MimeDel 2.1.20
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.20
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for &quot;
 user&quot; and &quot; projects&quot; \)" <svn-src-all.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-all/>
List-Post: <mailto:svn-src-all@freebsd.org>
List-Help: <mailto:svn-src-all-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Tue, 19 Jan 2016 19:13:28 -0000

Thanks :)

I do a lot of ufs on zvols too, and yes, there are performance impacts due =
to double caching -- I use ufs and zfs mounted zvols for installworld/insta=
llkernel which are later unmounted on the host and booted as VMs for testin=
g.

Sent from my cellphone,
~Cy

-----Original Message-----
From: Alan Somers
Sent: 19/01/2016 10:55
Cc: src-committers@freebsd.org; svn-src-all@freebsd.org; svn-src-head@freeb=
sd.org
Subject: Re: svn commit: r294329 - inhead/sys/cddl/contrib/opensolaris/uts/=
common/fs/zfs: . sys

On Tue, Jan 19, 2016 at 10:00 AM, Alan Somers <asomers@freebsd.org> wrote:
> Author: asomers
> Date: Tue Jan 19 17:00:25 2016
> New Revision: 294329
> URL: https://svnweb.freebsd.org/changeset/base/294329
>
> Log:
>   Disallow zvol-backed ZFS pools
>
>   Using zvols as backing devices for ZFS pools is fraught with panics and
>   deadlocks. For example, attempting to online a missing device in the
>   presence of a zvol can cause a panic when vdev_geom tastes the zvol.  B=
etter
>   to completely disable vdev_geom from ever opening a zvol. The solution
>   relies on setting a thread-local variable during vdev_geom_open, and
>   returning EOPNOTSUPP during zvol_open if that thread-local variable is =
set.
>
>   Remove the check for MUTEX_HELD(&zfsdev_state_lock) in zvol_open. Its i=
ntent
>   was to prevent a recursive mutex acquisition panic. However, the new ch=
eck
>   for the thread-local variable also fixes that problem.
>
>   Also, fix a panic in vdev_geom_taste_orphan. For an unknown reason, thi=
s
>   function was set to panic. But it can occur that a device disappears du=
ring
>   tasting, and it causes no problems to ignore this departure.
>
>   Reviewed by:  delphij
>   MFC after:    1 week
>   Relnotes:     yes
>   Sponsored by: Spectra Logic Corp
>   Differential Revision:        https://reviews.freebsd.org/D4986
>
> Modified:
>   head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/vdev_impl.h
>   head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_geom.c
>   head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c
>   head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zvol.c
>
> Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/vdev_im=
pl.h

Due to popular demand, I will conditionalize this behavior on a
sysctl, and I won't MFC it.  The sysctl must default to off (ZFS on
zvols not allowed) because having the ability to put pools on zvols
can cause panics even for users who aren't using it.  And let me clear
up some confusion:

1) Having the ability to put a zpool on a zvol can cause panics and
deadlocks, even if that ability is unused.
2) Putting a zpool atop a zvol causes unnecessary performance problems
because there are two layers of COW involved, with all their software
complexities.  This also applies to putting a zpool atop files on a
ZFS filesystem.
3) A VM guest putting a zpool on its virtual disk, where the VM host
backs that virtual disk with a zvol, will work fine.  That's the ideal
use case for zvols.
3b) Using ZFS on both host and guest isn't ideal for performance, as
described in item 2.  That's why I prefer to use UFS for VM guests.
4) Using UFS on a zvol as Stefen Esser described works fine.  I'm not
aware of any performance problems associated with mixing UFS and ZFS.
Perhaps Stefan was referring to duplication between the ARC and UFS's
vnode cache.  The same duplication would be present in a ZFS on top of
zvol scenario.

-Alan


From owner-svn-src-all@freebsd.org  Tue Jan 19 19:26:08 2016
Return-Path: <owner-svn-src-all@freebsd.org>
Delivered-To: svn-src-all@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id 43CCAA89C0C;
 Tue, 19 Jan 2016 19:26:08 +0000 (UTC)
 (envelope-from adrian.chadd@gmail.com)
Received: from mail-io0-x22e.google.com (mail-io0-x22e.google.com
 [IPv6:2607:f8b0:4001:c06::22e])
 (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits))
 (Client CN "smtp.gmail.com",
 Issuer "Google Internet Authority G2" (verified OK))
 by mx1.freebsd.org (Postfix) with ESMTPS id 0CBB014BD;
 Tue, 19 Jan 2016 19:26:08 +0000 (UTC)
 (envelope-from adrian.chadd@gmail.com)
Received: by mail-io0-x22e.google.com with SMTP id 77so560430349ioc.2;
 Tue, 19 Jan 2016 11:26:08 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;
 h=mime-version:in-reply-to:references:date:message-id:subject:from:to
 :cc:content-type;
 bh=g9rGDwE/Ir3R8O5RTYybqFyCLkfLJ3ZHrE9AaMomDrw=;
 b=K3fLWmYogFvpUmgOYbxrcQAaGMM6mhlUiLEwl2O0sBUr6R44AOIJmzb3CKGgnY4Uef
 n1W+8HbgLPDAuR6LyncO6QvuJMpUV+U7n9HFBV4sTRCZNdst8+T2T18mcHIFmdS9Ffuv
 e4LeCL475jrhyIeLP7gpjhtIjFWSmv0EdGSzOWN/5x5TftaPFOSosmYwjJuQBRc9sjSi
 1oLjhVIbqOrr3TgaeUsDZrN2LWwz7kDMF8hKhqEofXotIruWODmOilVA67EwmT+QHJIo
 yjSJZfW+zmJqrgsVEdB0tOd1LERtcOHB4PT0KTaIeNogkH0oZtUCczsaaCQE3Efh/Mc4
 WemQ==
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:date
 :message-id:subject:from:to:cc:content-type;
 bh=g9rGDwE/Ir3R8O5RTYybqFyCLkfLJ3ZHrE9AaMomDrw=;
 b=mWi5vaoVtdi5mm0mPSMBM9sYV8YUa2NjD3oJ/p228tUNmf9SCLLhwG2Vy0V/FoLkPO
 RQnTbYtTMBFKXjXur+Dmcc6ngztv1/PeOg7nV2fLLUI/lyO34BfwQ/pw0RYetKSt6HEV
 JNE32/cpwsRvNYHZIh7BIBSPuEGibbU4/qgFxCi+sp+nZbTbLLxsszYt5NxdBabLIlWQ
 Qt+CF97SjZYcU4o3hMmVYmFiWnehVr/QfH3qPL0g6JJ1J2GSUSKmzGz2yPV3T5cGaZWU
 gdYKZRidh/eEPAZ8gf10UQRYk4cKlTQtRPJ/YFc5oXd1T8tfhJMj7TwIczZMamzC5yDC
 puNA==
X-Gm-Message-State: ALoCoQnBgU9qBfw2z3PMl0w/yyO/qwrDX5tPxCvv3AUEubuhlZJjhxy4E0U1evZd6yH1/c2dp3oV/g3idUtJl3iP64Z4eF9xmA==
MIME-Version: 1.0
X-Received: by 10.107.10.217 with SMTP id 86mr27375289iok.75.1453231567521;
 Tue, 19 Jan 2016 11:26:07 -0800 (PST)
Received: by 10.36.121.16 with HTTP; Tue, 19 Jan 2016 11:26:07 -0800 (PST)
In-Reply-To: <CAFMmRNx3zC=mz=TC2Aq5==a5vh0Fqzv1domrCL2uUHnjybZSkQ@mail.gmail.com>
References: <201601191533.u0JFXSxf037804@repo.freebsd.org>
 <CAFMmRNz3uXim3H3-sGuBUBs45Jy8p260ywothgp4iFkUcnvnEw@mail.gmail.com>
 <569E6A38.8080108@selasky.org>
 <CAFMmRNx3zC=mz=TC2Aq5==a5vh0Fqzv1domrCL2uUHnjybZSkQ@mail.gmail.com>
Date: Tue, 19 Jan 2016 11:26:07 -0800
Message-ID: <CAJ-Vmoki0yCU-mmPGfrGyJ_ar_=KKkto_ioomo_Ri_HCWR70cg@mail.gmail.com>
Subject: Re: svn commit: r294327 - in head/sys: dev/cxgb dev/cxgbe dev/e1000
 dev/hyperv/netvsc dev/ixgbe dev/mxge netinet sys
From: Adrian Chadd <adrian.chadd@gmail.com>
To: Ryan Stone <rysto32@gmail.com>
Cc: Hans Petter Selasky <hps@selasky.org>, 
 "src-committers@freebsd.org" <src-committers@freebsd.org>, 
 "svn-src-all@freebsd.org" <svn-src-all@freebsd.org>, 
 "svn-src-head@freebsd.org" <svn-src-head@freebsd.org>
Content-Type: text/plain; charset=UTF-8
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.20
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for &quot;
 user&quot; and &quot; projects&quot; \)" <svn-src-all.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-all/>
List-Post: <mailto:svn-src-all@freebsd.org>
List-Help: <mailto:svn-src-all-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Tue, 19 Jan 2016 19:26:08 -0000

Well, why are you using qsort to do it, rather than walking the list
of streams and inputting all the mbufs per stream?

That's an O(1) operation.



-a

From owner-svn-src-all@freebsd.org  Tue Jan 19 19:27:51 2016
Return-Path: <owner-svn-src-all@freebsd.org>
Delivered-To: svn-src-all@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id F0C91A89CDF;
 Tue, 19 Jan 2016 19:27:51 +0000 (UTC) (envelope-from hps@selasky.org)
Received: from mail.turbocat.net (mail.turbocat.net
 [IPv6:2a01:4f8:d16:4514::2])
 (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
 (Client did not present a certificate)
 by mx1.freebsd.org (Postfix) with ESMTPS id B9E8C187A;
 Tue, 19 Jan 2016 19:27:51 +0000 (UTC) (envelope-from hps@selasky.org)
Received: from laptop015.home.selasky.org (unknown [62.141.129.119])
 (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits))
 (No client certificate requested)
 by mail.turbocat.net (Postfix) with ESMTPSA id DE09D1FE024;
 Tue, 19 Jan 2016 20:27:48 +0100 (CET)
Subject: Re: svn commit: r294327 - in head/sys: dev/cxgb dev/cxgbe dev/e1000
 dev/hyperv/netvsc dev/ixgbe dev/mxge netinet sys
To: Ryan Stone <rysto32@gmail.com>
References: <201601191533.u0JFXSxf037804@repo.freebsd.org>
 <CAFMmRNz3uXim3H3-sGuBUBs45Jy8p260ywothgp4iFkUcnvnEw@mail.gmail.com>
 <569E6A38.8080108@selasky.org>
 <CAFMmRNx3zC=mz=TC2Aq5==a5vh0Fqzv1domrCL2uUHnjybZSkQ@mail.gmail.com>
Cc: "src-committers@freebsd.org" <src-committers@freebsd.org>,
 "svn-src-all@freebsd.org" <svn-src-all@freebsd.org>,
 "svn-src-head@freebsd.org" <svn-src-head@freebsd.org>
From: Hans Petter Selasky <hps@selasky.org>
Message-ID: <569E8EBD.2070609@selasky.org>
Date: Tue, 19 Jan 2016 20:30:05 +0100
User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:38.0) Gecko/20100101
 Thunderbird/38.4.0
MIME-Version: 1.0
In-Reply-To: <CAFMmRNx3zC=mz=TC2Aq5==a5vh0Fqzv1domrCL2uUHnjybZSkQ@mail.gmail.com>
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: 7bit
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.20
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for &quot;
 user&quot; and &quot; projects&quot; \)" <svn-src-all.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-all/>
List-Post: <mailto:svn-src-all@freebsd.org>
List-Help: <mailto:svn-src-all-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Tue, 19 Jan 2016 19:27:52 -0000

On 01/19/16 18:01, Ryan Stone wrote:
> libkern's qsort() is a quicksort implementation. AFAICT it has the worst
> case behaviour that I describe.

FYI:

https://reviews.freebsd.org/D4994

--HPS

From owner-svn-src-all@freebsd.org  Tue Jan 19 19:35:56 2016
Return-Path: <owner-svn-src-all@freebsd.org>
Delivered-To: svn-src-all@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8C166A89FEB;
 Tue, 19 Jan 2016 19:35:56 +0000 (UTC) (envelope-from hps@selasky.org)
Received: from mail.turbocat.net (heidi.turbocat.net [88.198.202.214])
 (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
 (Client did not present a certificate)
 by mx1.freebsd.org (Postfix) with ESMTPS id 525151E09;
 Tue, 19 Jan 2016 19:35:55 +0000 (UTC) (envelope-from hps@selasky.org)
Received: from laptop015.home.selasky.org (unknown [62.141.129.119])
 (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits))
 (No client certificate requested)
 by mail.turbocat.net (Postfix) with ESMTPSA id C29631FE024;
 Tue, 19 Jan 2016 20:35:46 +0100 (CET)
Subject: Re: svn commit: r294327 - in head/sys: dev/cxgb dev/cxgbe dev/e1000
 dev/hyperv/netvsc dev/ixgbe dev/mxge netinet sys
To: Adrian Chadd <adrian.chadd@gmail.com>, Ryan Stone <rysto32@gmail.com>
References: <201601191533.u0JFXSxf037804@repo.freebsd.org>
 <CAFMmRNz3uXim3H3-sGuBUBs45Jy8p260ywothgp4iFkUcnvnEw@mail.gmail.com>
 <569E6A38.8080108@selasky.org>
 <CAFMmRNx3zC=mz=TC2Aq5==a5vh0Fqzv1domrCL2uUHnjybZSkQ@mail.gmail.com>
 <CAJ-Vmoki0yCU-mmPGfrGyJ_ar_=KKkto_ioomo_Ri_HCWR70cg@mail.gmail.com>
Cc: "src-committers@freebsd.org" <src-committers@freebsd.org>,
 "svn-src-all@freebsd.org" <svn-src-all@freebsd.org>,
 "svn-src-head@freebsd.org" <svn-src-head@freebsd.org>
From: Hans Petter Selasky <hps@selasky.org>
Message-ID: <569E909B.60506@selasky.org>
Date: Tue, 19 Jan 2016 20:38:03 +0100
User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:38.0) Gecko/20100101
 Thunderbird/38.4.0
MIME-Version: 1.0
In-Reply-To: <CAJ-Vmoki0yCU-mmPGfrGyJ_ar_=KKkto_ioomo_Ri_HCWR70cg@mail.gmail.com>
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: 7bit
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.20
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for &quot;
 user&quot; and &quot; projects&quot; \)" <svn-src-all.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-all/>
List-Post: <mailto:svn-src-all@freebsd.org>
List-Help: <mailto:svn-src-all-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Tue, 19 Jan 2016 19:35:56 -0000

On 01/19/16 20:26, Adrian Chadd wrote:
> Well, why are you using qsort to do it, rather than walking the list
> of streams and inputting all the mbufs per stream?
>
> That's an O(1) operation.
>

Because you don't know when the stream ends and then you'll need to pass 
the list one time for every stream which is O(N*N) :-)

--HPS


From owner-svn-src-all@freebsd.org  Tue Jan 19 20:05:25 2016
Return-Path: <owner-svn-src-all@freebsd.org>
Delivered-To: svn-src-all@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0FC22A88834;
 Tue, 19 Jan 2016 20:05:25 +0000 (UTC)
 (envelope-from adrian.chadd@gmail.com)
Received: from mail-io0-x233.google.com (mail-io0-x233.google.com
 [IPv6:2607:f8b0:4001:c06::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 CE0531A37;
 Tue, 19 Jan 2016 20:05:24 +0000 (UTC)
 (envelope-from adrian.chadd@gmail.com)
Received: by mail-io0-x233.google.com with SMTP id 1so546078574ion.1;
 Tue, 19 Jan 2016 12:05:24 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;
 h=mime-version:in-reply-to:references:date:message-id:subject:from:to
 :cc:content-type;
 bh=aDa5q0CRjkoyVUeQY5celKGz7F/rhJfTFNFaSVoVNWM=;
 b=pG9/CrdRa2topMA7Dr+9B7n6sR1dLoS3pQGQmAsGchwyIiL2tw/DkfW0YNIKYhZnzD
 pTV1tJuVJwT5D0jl8CLOy3SYRzDYUMiZlsFT1wNsDqMSs8xa6ESnp+cYlcGTGpTEVHLH
 G3gXNDKCodwS8tcH+oatSJakYnlX68XOJRQEp6p0AtacV32ZXwqb5lyNZF33Doz2tidq
 4rEMdrv9N4XUCh+Gl0ZMhZnikOXNgGaOFzpcwZUAhdYGRtzTZ+d0V7jB/5UEiB2hsaLi
 6mTGDhfqVD0Wx3tTEA5UNaF+dDQUwvRKDw3vtpxI9nyNf9Sel7soFhs05sb8bJ6egASK
 uOSA==
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:date
 :message-id:subject:from:to:cc:content-type;
 bh=aDa5q0CRjkoyVUeQY5celKGz7F/rhJfTFNFaSVoVNWM=;
 b=mNlgYFGedUfMOPv5uEKTeBnpsF9JJ3CCMsZFxRtzXjiEpTuhvhD61EyrltSAm6wjvS
 HSl8k+x38rd/h2a0v0/yI7xAhUbTl4ZQdlrGyiH33/azn9s632wnOzLFJZ4KW9FG6jSP
 DkmiJjnA9RyHqr121hiFl2EH807wMPgAIsCM58F5eBQ+O/wQ8KYuCA7KGLCIYJEK5J96
 DuZR8TBVw1KKrOHXj7WfPKLPDzOnGOd7SQ+sV5fhLuEbsibbrocL5YQbET5vdWz8bPz3
 TYRCww7TiM+iNkdWgRhaRTDM6YPYhqNaRMOUnJzeVJ9jNiR2KMfvYqGZ81DQbkiA5VrX
 XB0w==
X-Gm-Message-State: ALoCoQmzonFLD3v1MRwiNSxQ+Z52GXZuB0BP3COBXaF7ghG3eQ5G2ZYIq2bM81YeVAbdb6aBpKQMvmTbqacYFtgTRBlthhtp5g==
MIME-Version: 1.0
X-Received: by 10.107.10.217 with SMTP id 86mr27523594iok.75.1453233924329;
 Tue, 19 Jan 2016 12:05:24 -0800 (PST)
Received: by 10.36.121.16 with HTTP; Tue, 19 Jan 2016 12:05:24 -0800 (PST)
In-Reply-To: <569E909B.60506@selasky.org>
References: <201601191533.u0JFXSxf037804@repo.freebsd.org>
 <CAFMmRNz3uXim3H3-sGuBUBs45Jy8p260ywothgp4iFkUcnvnEw@mail.gmail.com>
 <569E6A38.8080108@selasky.org>
 <CAFMmRNx3zC=mz=TC2Aq5==a5vh0Fqzv1domrCL2uUHnjybZSkQ@mail.gmail.com>
 <CAJ-Vmoki0yCU-mmPGfrGyJ_ar_=KKkto_ioomo_Ri_HCWR70cg@mail.gmail.com>
 <569E909B.60506@selasky.org>
Date: Tue, 19 Jan 2016 12:05:24 -0800
Message-ID: <CAJ-Vmo=1vTmKnoM=wVX=vv99mnkW-Q2CKkxZUNTUBkw_CU6ahQ@mail.gmail.com>
Subject: Re: svn commit: r294327 - in head/sys: dev/cxgb dev/cxgbe dev/e1000
 dev/hyperv/netvsc dev/ixgbe dev/mxge netinet sys
From: Adrian Chadd <adrian.chadd@gmail.com>
To: Hans Petter Selasky <hps@selasky.org>
Cc: Ryan Stone <rysto32@gmail.com>, 
 "src-committers@freebsd.org" <src-committers@freebsd.org>, 
 "svn-src-all@freebsd.org" <svn-src-all@freebsd.org>, 
 "svn-src-head@freebsd.org" <svn-src-head@freebsd.org>
Content-Type: text/plain; charset=UTF-8
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.20
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for &quot;
 user&quot; and &quot; projects&quot; \)" <svn-src-all.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-all/>
List-Post: <mailto:svn-src-all@freebsd.org>
List-Help: <mailto:svn-src-all-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Tue, 19 Jan 2016 20:05:25 -0000

Erm, ok. So I'm confused about the state of how the streams are
tracked. So not all mbufs are in a stream, but they're in some single
LRO mbuf list?


-adrian

On 19 January 2016 at 11:38, Hans Petter Selasky <hps@selasky.org> wrote:
> On 01/19/16 20:26, Adrian Chadd wrote:
>>
>> Well, why are you using qsort to do it, rather than walking the list
>> of streams and inputting all the mbufs per stream?
>>
>> That's an O(1) operation.
>>
>
> Because you don't know when the stream ends and then you'll need to pass the
> list one time for every stream which is O(N*N) :-)
>
> --HPS
>

From owner-svn-src-all@freebsd.org  Tue Jan 19 20:21:52 2016
Return-Path: <owner-svn-src-all@freebsd.org>
Delivered-To: svn-src-all@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id 197E9A88DEC;
 Tue, 19 Jan 2016 20:21:52 +0000 (UTC) (envelope-from hps@selasky.org)
Received: from mail.turbocat.net (heidi.turbocat.net [88.198.202.214])
 (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
 (Client did not present a certificate)
 by mx1.freebsd.org (Postfix) with ESMTPS id D2B2515AC;
 Tue, 19 Jan 2016 20:21:51 +0000 (UTC) (envelope-from hps@selasky.org)
Received: from laptop015.home.selasky.org (unknown [62.141.129.119])
 (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits))
 (No client certificate requested)
 by mail.turbocat.net (Postfix) with ESMTPSA id C1EA81FE024;
 Tue, 19 Jan 2016 21:21:49 +0100 (CET)
Subject: Re: svn commit: r294327 - in head/sys: dev/cxgb dev/cxgbe dev/e1000
 dev/hyperv/netvsc dev/ixgbe dev/mxge netinet sys
To: Adrian Chadd <adrian.chadd@gmail.com>
References: <201601191533.u0JFXSxf037804@repo.freebsd.org>
 <CAFMmRNz3uXim3H3-sGuBUBs45Jy8p260ywothgp4iFkUcnvnEw@mail.gmail.com>
 <569E6A38.8080108@selasky.org>
 <CAFMmRNx3zC=mz=TC2Aq5==a5vh0Fqzv1domrCL2uUHnjybZSkQ@mail.gmail.com>
 <CAJ-Vmoki0yCU-mmPGfrGyJ_ar_=KKkto_ioomo_Ri_HCWR70cg@mail.gmail.com>
 <569E909B.60506@selasky.org>
 <CAJ-Vmo=1vTmKnoM=wVX=vv99mnkW-Q2CKkxZUNTUBkw_CU6ahQ@mail.gmail.com>
Cc: Ryan Stone <rysto32@gmail.com>,
 "src-committers@freebsd.org" <src-committers@freebsd.org>,
 "svn-src-all@freebsd.org" <svn-src-all@freebsd.org>,
 "svn-src-head@freebsd.org" <svn-src-head@freebsd.org>
From: Hans Petter Selasky <hps@selasky.org>
Message-ID: <569E9B66.1070200@selasky.org>
Date: Tue, 19 Jan 2016 21:24:06 +0100
User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:38.0) Gecko/20100101
 Thunderbird/38.4.0
MIME-Version: 1.0
In-Reply-To: <CAJ-Vmo=1vTmKnoM=wVX=vv99mnkW-Q2CKkxZUNTUBkw_CU6ahQ@mail.gmail.com>
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: 7bit
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.20
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for &quot;
 user&quot; and &quot; projects&quot; \)" <svn-src-all.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-all/>
List-Post: <mailto:svn-src-all@freebsd.org>
List-Help: <mailto:svn-src-all-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Tue, 19 Jan 2016 20:21:52 -0000

On 01/19/16 21:05, Adrian Chadd wrote:
> Erm, ok. So I'm confused about the state of how the streams are
> tracked. So not all mbufs are in a stream, but they're in some single
> LRO mbuf list?
>

Hi,

The streams are typically tracked using the hardware generated Toeplitz 
hash value. The mbufs are sorted according to the hash value and the 
hash type. The list of mbufs is scanned, flushing the LRO entries every 
time we see a change in the hash value or hash type. OK?

--HPS


From owner-svn-src-all@freebsd.org  Tue Jan 19 20:23:05 2016
Return-Path: <owner-svn-src-all@freebsd.org>
Delivered-To: svn-src-all@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4B097A88F61;
 Tue, 19 Jan 2016 20:23:05 +0000 (UTC)
 (envelope-from adrian.chadd@gmail.com)
Received: from mail-io0-x232.google.com (mail-io0-x232.google.com
 [IPv6:2607:f8b0:4001:c06::232])
 (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits))
 (Client CN "smtp.gmail.com",
 Issuer "Google Internet Authority G2" (verified OK))
 by mx1.freebsd.org (Postfix) with ESMTPS id 11E92189F;
 Tue, 19 Jan 2016 20:23:05 +0000 (UTC)
 (envelope-from adrian.chadd@gmail.com)
Received: by mail-io0-x232.google.com with SMTP id g73so402394904ioe.3;
 Tue, 19 Jan 2016 12:23:05 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;
 h=mime-version:in-reply-to:references:date:message-id:subject:from:to
 :cc:content-type;
 bh=jDH881ppVqXL2ZIJLv23HnKUy37Cx9jn7xfuOUOl//E=;
 b=mG6gLLtrkyyC+6Q+TL1eEEDbx4RXFdVNM6KqmxUZvcmztnhsoRx9Q8BmaCMEKG3EJt
 sI5dYM4mYqT944cWk/jr5ZO/0h/N7duEy6cNgUu+LyXW8M2Srhn+CCaNRIVsfLiCMDRZ
 ipnyOhlZI2mRAGPLUx5KjkC478vFBTG3XagOVnuFA/gMTy2oE1V7fdWBVZe4YE3mcXp9
 5GYSMGJEDaQfkqcwmrRdhI8Cv+Kb1ap3DvHraqp8nM0F0Fy/ma99nWMe8+KQTqU4KRsE
 z4DwC1Qy9tmJpcyuYFpqjVoSPYHd2lr9bRKaB1QdLv4QUKD5mlwD9YArNYR6yiHL9V1S
 aP3w==
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:date
 :message-id:subject:from:to:cc:content-type;
 bh=jDH881ppVqXL2ZIJLv23HnKUy37Cx9jn7xfuOUOl//E=;
 b=BVO2mSK8Lm5O/HB1lM9Q9ju+P1xGejruVTopgGj5Fas4tpNq756WpQYHWia8qOCgcX
 iTKSxvCT3gs2if6pAfA24W6PdbtBUch5LYM4rFrXTxCbIDbq9nyWRQqfXOB6/7ikeUJv
 6vUygzYuKqmSVN9e6LqidHAikEcBnUOVv7wAcF4/08ygb+6kyOdZyf0Fw6MTM9kQjQOZ
 VDN8CCpooaS3sgZ22TPjh5cfj7nEU/hwxBvTa5oLy/ROFxcuMoAmEEfoGNuRJblayIse
 Mu8ZNqii2Mb6uZ8hEJepBsRX5Xy41mWNUepk4otzux8GgJLSVL2h+kUuQYyNrrOT1KC8
 IgPQ==
X-Gm-Message-State: ALoCoQlhMawojPZG4FF+s4PmbUHMs2gKKSLrDd6Nh4QoHGhIZaRfYCkg5bkTGLzAmM6foe3pmJ29jDuxRiAugLRvYJ7sf4M5hg==
MIME-Version: 1.0
X-Received: by 10.107.11.162 with SMTP id 34mr26995164iol.165.1453234984535;
 Tue, 19 Jan 2016 12:23:04 -0800 (PST)
Received: by 10.36.121.16 with HTTP; Tue, 19 Jan 2016 12:23:04 -0800 (PST)
In-Reply-To: <569E9B66.1070200@selasky.org>
References: <201601191533.u0JFXSxf037804@repo.freebsd.org>
 <CAFMmRNz3uXim3H3-sGuBUBs45Jy8p260ywothgp4iFkUcnvnEw@mail.gmail.com>
 <569E6A38.8080108@selasky.org>
 <CAFMmRNx3zC=mz=TC2Aq5==a5vh0Fqzv1domrCL2uUHnjybZSkQ@mail.gmail.com>
 <CAJ-Vmoki0yCU-mmPGfrGyJ_ar_=KKkto_ioomo_Ri_HCWR70cg@mail.gmail.com>
 <569E909B.60506@selasky.org>
 <CAJ-Vmo=1vTmKnoM=wVX=vv99mnkW-Q2CKkxZUNTUBkw_CU6ahQ@mail.gmail.com>
 <569E9B66.1070200@selasky.org>
Date: Tue, 19 Jan 2016 12:23:04 -0800
Message-ID: <CAJ-Vmo=vi5fdGzx6Z6+D5szrpf0jcaOe7a_9u-o0V7+9YkE6qw@mail.gmail.com>
Subject: Re: svn commit: r294327 - in head/sys: dev/cxgb dev/cxgbe dev/e1000
 dev/hyperv/netvsc dev/ixgbe dev/mxge netinet sys
From: Adrian Chadd <adrian.chadd@gmail.com>
To: Hans Petter Selasky <hps@selasky.org>
Cc: Ryan Stone <rysto32@gmail.com>, 
 "src-committers@freebsd.org" <src-committers@freebsd.org>, 
 "svn-src-all@freebsd.org" <svn-src-all@freebsd.org>, 
 "svn-src-head@freebsd.org" <svn-src-head@freebsd.org>
Content-Type: text/plain; charset=UTF-8
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.20
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for &quot;
 user&quot; and &quot; projects&quot; \)" <svn-src-all.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-all/>
List-Post: <mailto:svn-src-all@freebsd.org>
List-Help: <mailto:svn-src-all-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Tue, 19 Jan 2016 20:23:05 -0000

On 19 January 2016 at 12:24, Hans Petter Selasky <hps@selasky.org> wrote:
> On 01/19/16 21:05, Adrian Chadd wrote:
>>
>> Erm, ok. So I'm confused about the state of how the streams are
>> tracked. So not all mbufs are in a stream, but they're in some single
>> LRO mbuf list?
>>
>
> Hi,
>
> The streams are typically tracked using the hardware generated Toeplitz hash
> value. The mbufs are sorted according to the hash value and the hash type.
> The list of mbufs is scanned, flushing the LRO entries every time we see a
> change in the hash value or hash type. OK?

Sure, but TCP fragments and non-fragments can hash to different
values, so suddenly you get interleaved packets.

You can't rely on the toeplitz hash 100% hashing /all packets in a
stream/ reliably, because it's highly dependent upon the NIC config.

This is why I did all that effort in the RSS code to handle things.

-a

From owner-svn-src-all@freebsd.org  Tue Jan 19 20:23:46 2016
Return-Path: <owner-svn-src-all@freebsd.org>
Delivered-To: svn-src-all@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id 326FEA89022;
 Tue, 19 Jan 2016 20:23:46 +0000 (UTC)
 (envelope-from adrian.chadd@gmail.com)
Received: from mail-ig0-x229.google.com (mail-ig0-x229.google.com
 [IPv6:2607:f8b0:4001:c05::229])
 (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits))
 (Client CN "smtp.gmail.com",
 Issuer "Google Internet Authority G2" (verified OK))
 by mx1.freebsd.org (Postfix) with ESMTPS id EF4891A32;
 Tue, 19 Jan 2016 20:23:45 +0000 (UTC)
 (envelope-from adrian.chadd@gmail.com)
Received: by mail-ig0-x229.google.com with SMTP id mw1so75665966igb.1;
 Tue, 19 Jan 2016 12:23:45 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;
 h=mime-version:in-reply-to:references:date:message-id:subject:from:to
 :cc:content-type;
 bh=MQ7KSBGIRsEJLdqgjOAfyeIu+CfX7B70LsmnJhpNm04=;
 b=EmLc8S7CD0cQrA8Ec+CtU/pjPhshg2TkGHO93XebfW4Xi0Il1QxMKFOnONz6ffOfR3
 gY5OAg3Q84lQywabEzXCV+Co9+GYQnaX0h0TOKjF5I7lOATqGRdjckBlP00wkbuRYiOM
 DsoCP9N7h5oxdkkWCY2d1vSuMmGMtGIrAwn9cBSYPh+K3kBGnnk7xfg9DFoumof6A8Uq
 SXZYLqLiZsSv/EveSyodSTf5zCDOcWirsc/zaICSy1oiV8m6aj29Ibqy9mMt5hcK+Br2
 S7LZFyk//t8PLBoHYKn02nKAIRovlkBB6cLCo+XpJjK4LUlDPb25m5jW32LfGD11AY/t
 4L8A==
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:date
 :message-id:subject:from:to:cc:content-type;
 bh=MQ7KSBGIRsEJLdqgjOAfyeIu+CfX7B70LsmnJhpNm04=;
 b=bZQPr3mN/8QrTCr6XHMW1+jMFENW1f267kLO0btRzHMwmx2Q7S99TIr5hg21R5OYx4
 e88/ojLXyQTwzLO9LpGM/UtWepKBB8mE9WDEw5ruygsobDrzMM5WMBxmgUXo/IrD23Rn
 NV4NidnsyvuU4JIfiEb2BPEBE1ZNxNuAwIXCEjJpnYB7mBWfseqizpssbb4kTOrV+XRN
 84ZdESbA2V7/c8byjP+hOZoNU7CN8EC9Grl0KhF4WJKpYw/clTcYNq/du0pnyXOO2XiD
 DYByFPjH0IgrWeTFV9p91Brm+BOQC3eA+bTM44HnX1hZ3C/Q2S2nawc7Of9ngXoe4CN5
 fQXQ==
X-Gm-Message-State: AG10YORI9k+IxfXyBqoWDJjLbIG5VAYc4Kcn1C4oFQii5d3++fc/+h3DfV0XTeuNsgExprtA8fxNM1INOtM/og==
MIME-Version: 1.0
X-Received: by 10.50.137.41 with SMTP id qf9mr16651751igb.22.1453235025465;
 Tue, 19 Jan 2016 12:23:45 -0800 (PST)
Received: by 10.36.121.16 with HTTP; Tue, 19 Jan 2016 12:23:45 -0800 (PST)
In-Reply-To: <CAJ-Vmo=vi5fdGzx6Z6+D5szrpf0jcaOe7a_9u-o0V7+9YkE6qw@mail.gmail.com>
References: <201601191533.u0JFXSxf037804@repo.freebsd.org>
 <CAFMmRNz3uXim3H3-sGuBUBs45Jy8p260ywothgp4iFkUcnvnEw@mail.gmail.com>
 <569E6A38.8080108@selasky.org>
 <CAFMmRNx3zC=mz=TC2Aq5==a5vh0Fqzv1domrCL2uUHnjybZSkQ@mail.gmail.com>
 <CAJ-Vmoki0yCU-mmPGfrGyJ_ar_=KKkto_ioomo_Ri_HCWR70cg@mail.gmail.com>
 <569E909B.60506@selasky.org>
 <CAJ-Vmo=1vTmKnoM=wVX=vv99mnkW-Q2CKkxZUNTUBkw_CU6ahQ@mail.gmail.com>
 <569E9B66.1070200@selasky.org>
 <CAJ-Vmo=vi5fdGzx6Z6+D5szrpf0jcaOe7a_9u-o0V7+9YkE6qw@mail.gmail.com>
Date: Tue, 19 Jan 2016 12:23:45 -0800
Message-ID: <CAJ-Vmok_nK9Gtu_qFx6eryLpPLEj8ncRUtyUcthfvBozRf5C5A@mail.gmail.com>
Subject: Re: svn commit: r294327 - in head/sys: dev/cxgb dev/cxgbe dev/e1000
 dev/hyperv/netvsc dev/ixgbe dev/mxge netinet sys
From: Adrian Chadd <adrian.chadd@gmail.com>
To: Hans Petter Selasky <hps@selasky.org>
Cc: Ryan Stone <rysto32@gmail.com>, 
 "src-committers@freebsd.org" <src-committers@freebsd.org>, 
 "svn-src-all@freebsd.org" <svn-src-all@freebsd.org>, 
 "svn-src-head@freebsd.org" <svn-src-head@freebsd.org>
Content-Type: text/plain; charset=UTF-8
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.20
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for &quot;
 user&quot; and &quot; projects&quot; \)" <svn-src-all.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-all/>
List-Post: <mailto:svn-src-all@freebsd.org>
List-Help: <mailto:svn-src-all-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Tue, 19 Jan 2016 20:23:46 -0000

.. and just for reference, qsort ends up being very inefficient when
you start having lots of entries with the same value, because the
partitioning stops being log n...


-a

From owner-svn-src-all@freebsd.org  Tue Jan 19 20:33:03 2016
Return-Path: <owner-svn-src-all@freebsd.org>
Delivered-To: svn-src-all@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id 649D3A8938C;
 Tue, 19 Jan 2016 20:33:03 +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 508F3102F;
 Tue, 19 Jan 2016 20:33:03 +0000 (UTC)
 (envelope-from bdrewery@FreeBSD.org)
Received: from mail.xzibition.com (localhost [IPv6:::1])
 by freefall.freebsd.org (Postfix) with ESMTP id 487831EF5;
 Tue, 19 Jan 2016 20:33:03 +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 E77061C2A9;
 Tue, 19 Jan 2016 20:33:02 +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 sIt1mM-zDJIZ; Tue, 19 Jan 2016 20:32:59 +0000 (UTC)
Subject: Re: svn commit: r294329 - in
 head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs: . sys
DKIM-Filter: OpenDKIM Filter v2.9.2 mail.xzibition.com 50D4C1C2A4
To: Shawn Webb <shawn.webb@hardenedbsd.org>, Alan Somers <asomers@freebsd.org>
References: <201601191700.u0JH0P6k061610@repo.freebsd.org>
 <569E6DA0.9010300@pix.net>
 <CAOtMX2idrWOpWbkYxPFn3yur8w-vgfBryhT4_0yiBvg10sWWRA@mail.gmail.com>
 <20160119180715.GA98067@mutt-hardenedbsd>
Cc: Kurt Lidl <lidl@pix.net>,
 "svn-src-head@freebsd.org" <svn-src-head@freebsd.org>,
 "svn-src-all@freebsd.org" <svn-src-all@freebsd.org>,
 "src-committers@freebsd.org" <src-committers@freebsd.org>
From: Bryan Drewery <bdrewery@FreeBSD.org>
Openpgp: id=F9173CB2C3AAEA7A5C8A1F0935D771BB6E4697CF;
 url=http://www.shatow.net/bryan/bryan2.asc
Organization: FreeBSD
Message-ID: <569E9D7A.7000209@FreeBSD.org>
Date: Tue, 19 Jan 2016 12:32:58 -0800
User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:38.0) Gecko/20100101
 Thunderbird/38.5.1
MIME-Version: 1.0
In-Reply-To: <20160119180715.GA98067@mutt-hardenedbsd>
Content-Type: multipart/signed; micalg=pgp-sha1;
 protocol="application/pgp-signature";
 boundary="HRi3JGMM4LxpBNMQrMLtqS1E03n5ElhSD"
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.20
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for &quot;
 user&quot; and &quot; projects&quot; \)" <svn-src-all.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-all/>
List-Post: <mailto:svn-src-all@freebsd.org>
List-Help: <mailto:svn-src-all-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Tue, 19 Jan 2016 20:33:03 -0000

This is an OpenPGP/MIME signed message (RFC 4880 and 3156)
--HRi3JGMM4LxpBNMQrMLtqS1E03n5ElhSD
Content-Type: text/plain; charset=windows-1252
Content-Transfer-Encoding: quoted-printable

On 1/19/2016 10:07 AM, Shawn Webb wrote:
> On Tue, Jan 19, 2016 at 10:20:38AM -0700, Alan Somers wrote:
>> On Tue, Jan 19, 2016 at 10:08 AM, Kurt Lidl <lidl@pix.net> wrote:
>>> Removing the ability to run different zpools on top of a zvol is
>>> a significant reduction in functionality of the entire system, and a =
huge
>>> violation of the POLA.
>> The thing is, it never really worked in the first place.  Panics and
>> deadlocks are so frequent that I don't think the feature was usable
>> for anybody.
> I actively use this every day and will be making even more use of it in=

> the very near future.

Why?

--=20
Regards,
Bryan Drewery


--HRi3JGMM4LxpBNMQrMLtqS1E03n5ElhSD
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

iQEcBAEBAgAGBQJWnp16AAoJEDXXcbtuRpfPGoQH/jKYCOb3WPvwh/K4sQLyZud8
qwg07eg+rpAKKeKlVLaCQ3+9Ey4LrXWb3JVifFFRyLl/WBKIcE60j+3iPOsnDLDo
FhVExwKcXC6RgR9gWm0PAWr7lHXnGJEZPwCzvrfVvaKJ+yyItI0/0kWgO3i+/DNx
lB97lav9BjpEoihZ3wEBMjZB60VdanF0CjQeFL7JWX4pQ0FUp0xY9GXuMAVYn6vc
V/V8OTECsAF0iKHDTpheURyYk8qO/kk7kRU5Q/Gwai3viUhK7cck4ie+bbZA1EBf
pw5SIWsWHldb2OKRiVkhq4GN//CAs1sHgFQiB5jEa2BHN+cemAmA+Wtkig+nQlA=
=Rdvg
-----END PGP SIGNATURE-----

--HRi3JGMM4LxpBNMQrMLtqS1E03n5ElhSD--

From owner-svn-src-all@freebsd.org  Tue Jan 19 20:42:07 2016
Return-Path: <owner-svn-src-all@freebsd.org>
Delivered-To: svn-src-all@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id D655DA89851;
 Tue, 19 Jan 2016 20:42:07 +0000 (UTC) (envelope-from hps@selasky.org)
Received: from mail.turbocat.net (mail.turbocat.net
 [IPv6:2a01:4f8:d16:4514::2])
 (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
 (Client did not present a certificate)
 by mx1.freebsd.org (Postfix) with ESMTPS id 9C5F5184A;
 Tue, 19 Jan 2016 20:42:07 +0000 (UTC) (envelope-from hps@selasky.org)
Received: from laptop015.home.selasky.org (unknown [62.141.129.119])
 (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits))
 (No client certificate requested)
 by mail.turbocat.net (Postfix) with ESMTPSA id C06931FE024;
 Tue, 19 Jan 2016 21:42:05 +0100 (CET)
Subject: Re: svn commit: r294327 - in head/sys: dev/cxgb dev/cxgbe dev/e1000
 dev/hyperv/netvsc dev/ixgbe dev/mxge netinet sys
To: Adrian Chadd <adrian.chadd@gmail.com>
References: <201601191533.u0JFXSxf037804@repo.freebsd.org>
 <CAFMmRNz3uXim3H3-sGuBUBs45Jy8p260ywothgp4iFkUcnvnEw@mail.gmail.com>
 <569E6A38.8080108@selasky.org>
 <CAFMmRNx3zC=mz=TC2Aq5==a5vh0Fqzv1domrCL2uUHnjybZSkQ@mail.gmail.com>
 <CAJ-Vmoki0yCU-mmPGfrGyJ_ar_=KKkto_ioomo_Ri_HCWR70cg@mail.gmail.com>
 <569E909B.60506@selasky.org>
 <CAJ-Vmo=1vTmKnoM=wVX=vv99mnkW-Q2CKkxZUNTUBkw_CU6ahQ@mail.gmail.com>
 <569E9B66.1070200@selasky.org>
 <CAJ-Vmo=vi5fdGzx6Z6+D5szrpf0jcaOe7a_9u-o0V7+9YkE6qw@mail.gmail.com>
Cc: Ryan Stone <rysto32@gmail.com>,
 "src-committers@freebsd.org" <src-committers@freebsd.org>,
 "svn-src-all@freebsd.org" <svn-src-all@freebsd.org>,
 "svn-src-head@freebsd.org" <svn-src-head@freebsd.org>
From: Hans Petter Selasky <hps@selasky.org>
Message-ID: <569EA026.5020906@selasky.org>
Date: Tue, 19 Jan 2016 21:44:22 +0100
User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:38.0) Gecko/20100101
 Thunderbird/38.4.0
MIME-Version: 1.0
In-Reply-To: <CAJ-Vmo=vi5fdGzx6Z6+D5szrpf0jcaOe7a_9u-o0V7+9YkE6qw@mail.gmail.com>
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: 7bit
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.20
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for &quot;
 user&quot; and &quot; projects&quot; \)" <svn-src-all.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-all/>
List-Post: <mailto:svn-src-all@freebsd.org>
List-Help: <mailto:svn-src-all-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Tue, 19 Jan 2016 20:42:07 -0000

On 01/19/16 21:23, Adrian Chadd wrote:
> On 19 January 2016 at 12:24, Hans Petter Selasky <hps@selasky.org> wrote:
>> On 01/19/16 21:05, Adrian Chadd wrote:
>>>
>>> Erm, ok. So I'm confused about the state of how the streams are
>>> tracked. So not all mbufs are in a stream, but they're in some single
>>> LRO mbuf list?
>>>
>>
>> Hi,
>>
>> The streams are typically tracked using the hardware generated Toeplitz hash
>> value. The mbufs are sorted according to the hash value and the hash type.
>> The list of mbufs is scanned, flushing the LRO entries every time we see a
>> change in the hash value or hash type. OK?
>

Hi,

> Sure, but TCP fragments and non-fragments can hash to different
> values, so suddenly you get interleaved packets.

Fragmented TCP packets should not be subject to LRO. Depending on the 
NIC we will get the same hash value or not. I think that's fine. If you 
want to use this feature the NIC should not hash the TCP port numbers 
when it sees a fragmented packet including the starting fragment. That 
will give the best result.

What does the RSS code expect currently?

>
> You can't rely on the toeplitz hash 100% hashing /all packets in a
> stream/ reliably, because it's highly dependent upon the NIC config.

 > This is why I did all that effort in the RSS code to handle things.

--HPS



From owner-svn-src-all@freebsd.org  Tue Jan 19 20:46:32 2016
Return-Path: <owner-svn-src-all@freebsd.org>
Delivered-To: svn-src-all@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3ED46A899C1;
 Tue, 19 Jan 2016 20:46:32 +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 0DB431BCA;
 Tue, 19 Jan 2016 20:46:31 +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 u0JKkUhH028766;
 Tue, 19 Jan 2016 20:46:30 GMT (envelope-from jhb@FreeBSD.org)
Received: (from jhb@localhost)
 by repo.freebsd.org (8.15.2/8.15.2/Submit) id u0JKkUNv028765;
 Tue, 19 Jan 2016 20:46:30 GMT (envelope-from jhb@FreeBSD.org)
Message-Id: <201601192046.u0JKkUNv028765@repo.freebsd.org>
X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org
 using -f
From: John Baldwin <jhb@FreeBSD.org>
Date: Tue, 19 Jan 2016 20:46:30 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-head@freebsd.org
Subject: svn commit: r294339 - head/sys/kern
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.20
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for &quot;
 user&quot; and &quot; projects&quot; \)" <svn-src-all.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-all/>
List-Post: <mailto:svn-src-all@freebsd.org>
List-Help: <mailto:svn-src-all-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Tue, 19 Jan 2016 20:46:32 -0000

Author: jhb
Date: Tue Jan 19 20:46:30 2016
New Revision: 294339
URL: https://svnweb.freebsd.org/changeset/base/294339

Log:
  Don't create a dedicated session for each AIO kernel process.
  
  This code dates back to the initial AIO support and the commit log does
  not explain why it is needed.  However, I cannot find anything in the
  AIO code or the various file methods (fo_read/fo_write) that would change
  behavior due to using a private session instead of proc0's session.
  
  Reviewed by:	kib
  Sponsored by:	Chelsio Communications
  Differential Revision:	https://reviews.freebsd.org/D4988

Modified:
  head/sys/kern/vfs_aio.c

Modified: head/sys/kern/vfs_aio.c
==============================================================================
--- head/sys/kern/vfs_aio.c	Tue Jan 19 19:04:56 2016	(r294338)
+++ head/sys/kern/vfs_aio.c	Tue Jan 19 20:46:30 2016	(r294339)
@@ -1079,9 +1079,6 @@ aio_daemon(void *_id)
 	aiop->aiothread = td;
 	aiop->aiothreadflags = 0;
 
-	/* The daemon resides in its own pgrp. */
-	sys_setsid(td, NULL);
-
 	/*
 	 * Wakeup parent process.  (Parent sleeps to keep from blasting away
 	 * and creating too many daemons.)

From owner-svn-src-all@freebsd.org  Tue Jan 19 20:47:19 2016
Return-Path: <owner-svn-src-all@freebsd.org>
Delivered-To: svn-src-all@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5B440A89A1D;
 Tue, 19 Jan 2016 20:47:19 +0000 (UTC)
 (envelope-from adrian.chadd@gmail.com)
Received: from mail-io0-x234.google.com (mail-io0-x234.google.com
 [IPv6:2607:f8b0:4001:c06::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 242D71D35;
 Tue, 19 Jan 2016 20:47:19 +0000 (UTC)
 (envelope-from adrian.chadd@gmail.com)
Received: by mail-io0-x234.google.com with SMTP id 1so547274314ion.1;
 Tue, 19 Jan 2016 12:47:19 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;
 h=mime-version:in-reply-to:references:date:message-id:subject:from:to
 :cc:content-type;
 bh=EJZ9pUBiXrXBOt2U5zOnxK8Ig5fnsmd+e2TETYSjjDk=;
 b=ykstaB9sbSfVfxQKC6m1WjM8GXy2Z82k2Mb8caCj+DdDFNVvPVarMOSmfUDAhAFh/n
 2eHidv6ACoXheYuK4RMzi1jbfi/8MBlUpwYkMjZb+aFaV1dVNbN9GM4RmFaRdZ694dxH
 DfNYReMKKcjRremIxbP9T86WD0/YpgZeNVtIEeDighs5yedO9qZ1ou2GOLNGOkkHGuDO
 Q+FUZDsCdoHNVqNWbHregc1bTSZp001Q6T2rpuBmxHKqXTTHsaAHhCmKZSxU+z+979k5
 h/XqPKYwAJPI1j7mGzC75GJ+RQB0HBSarwzp3+W/wVKN2tKVWz5UytTrcsKN012q6Wwj
 z15g==
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:date
 :message-id:subject:from:to:cc:content-type;
 bh=EJZ9pUBiXrXBOt2U5zOnxK8Ig5fnsmd+e2TETYSjjDk=;
 b=di0UGucGx7WMOx3n55LUWNYuCNHlYgtJlzUBuSqMQu0MylG97p1pWKLH60L5vBgOaK
 m26nzouZcBlXvvsb3ql/uMS8XuPb/n2kqs/JzIT6dfMW5cVRpmxZjWYJWVoW9kszIN2y
 9w/NmxGK44BlAcgZMxJfOH9Sd/etCzG4dMlgQ1KKYQFps6/R4s11L9rW9t0522/wSG9u
 hk84kn2E11nhpSuhuFr8pSjahpOGYq9twTf8RbJvTMiKbQeXQFBQtnCbdkFfSEimfTWX
 tybdXKoScowN9M/Rj3xgZkVDEc9bL0++cC3sVwJj4hVGbhBZu8tfDdjrhGEjM9bjJO1q
 l+tA==
X-Gm-Message-State: ALoCoQl4f5hqqkXzXRYE7LdgmLQAkKuRM/i/xasKCU5ol1b/d5iUjDKcdfjq/CQMy7rCRkozsBnXxAmKYOov480guzefCm2KLQ==
MIME-Version: 1.0
X-Received: by 10.107.11.162 with SMTP id 34mr27078906iol.165.1453236438603;
 Tue, 19 Jan 2016 12:47:18 -0800 (PST)
Received: by 10.36.121.16 with HTTP; Tue, 19 Jan 2016 12:47:18 -0800 (PST)
In-Reply-To: <569EA026.5020906@selasky.org>
References: <201601191533.u0JFXSxf037804@repo.freebsd.org>
 <CAFMmRNz3uXim3H3-sGuBUBs45Jy8p260ywothgp4iFkUcnvnEw@mail.gmail.com>
 <569E6A38.8080108@selasky.org>
 <CAFMmRNx3zC=mz=TC2Aq5==a5vh0Fqzv1domrCL2uUHnjybZSkQ@mail.gmail.com>
 <CAJ-Vmoki0yCU-mmPGfrGyJ_ar_=KKkto_ioomo_Ri_HCWR70cg@mail.gmail.com>
 <569E909B.60506@selasky.org>
 <CAJ-Vmo=1vTmKnoM=wVX=vv99mnkW-Q2CKkxZUNTUBkw_CU6ahQ@mail.gmail.com>
 <569E9B66.1070200@selasky.org>
 <CAJ-Vmo=vi5fdGzx6Z6+D5szrpf0jcaOe7a_9u-o0V7+9YkE6qw@mail.gmail.com>
 <569EA026.5020906@selasky.org>
Date: Tue, 19 Jan 2016 12:47:18 -0800
Message-ID: <CAJ-VmokCLr7jESQqDYPRUgbo2vQD-1_kC6YhCjqAm3tMz29RUg@mail.gmail.com>
Subject: Re: svn commit: r294327 - in head/sys: dev/cxgb dev/cxgbe dev/e1000
 dev/hyperv/netvsc dev/ixgbe dev/mxge netinet sys
From: Adrian Chadd <adrian.chadd@gmail.com>
To: Hans Petter Selasky <hps@selasky.org>
Cc: Ryan Stone <rysto32@gmail.com>, 
 "src-committers@freebsd.org" <src-committers@freebsd.org>, 
 "svn-src-all@freebsd.org" <svn-src-all@freebsd.org>, 
 "svn-src-head@freebsd.org" <svn-src-head@freebsd.org>
Content-Type: text/plain; charset=UTF-8
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.20
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for &quot;
 user&quot; and &quot; projects&quot; \)" <svn-src-all.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-all/>
List-Post: <mailto:svn-src-all@freebsd.org>
List-Help: <mailto:svn-src-all-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Tue, 19 Jan 2016 20:47:19 -0000

On 19 January 2016 at 12:44, Hans Petter Selasky <hps@selasky.org> wrote:
> On 01/19/16 21:23, Adrian Chadd wrote:
>>
>> On 19 January 2016 at 12:24, Hans Petter Selasky <hps@selasky.org> wrote:
>>>
>>> On 01/19/16 21:05, Adrian Chadd wrote:
>>>>
>>>>
>>>> Erm, ok. So I'm confused about the state of how the streams are
>>>> tracked. So not all mbufs are in a stream, but they're in some single
>>>> LRO mbuf list?
>>>>
>>>
>>> Hi,
>>>
>>> The streams are typically tracked using the hardware generated Toeplitz
>>> hash
>>> value. The mbufs are sorted according to the hash value and the hash
>>> type.
>>> The list of mbufs is scanned, flushing the LRO entries every time we see
>>> a
>>> change in the hash value or hash type. OK?
>>
>>
>
> Hi,
>
>> Sure, but TCP fragments and non-fragments can hash to different
>> values, so suddenly you get interleaved packets.
>
>
> Fragmented TCP packets should not be subject to LRO. Depending on the NIC we
> will get the same hash value or not. I think that's fine. If you want to use
> this feature the NIC should not hash the TCP port numbers when it sees a
> fragmented packet including the starting fragment. That will give the best
> result.
>
> What does the RSS code expect currently?

The NIC doesn't mis-tag something, so it knows to rehash things in the
netisr input path.

And yes, I've seen streams with both fragments and non-fragments at
the same time. Then you end up with some packets with different hash
types. The IP input path will reassemble fragments, and then you'll
rehash the packet with the correct L3 or L4 calculation as
appropriate.

In this setup you may have the fragments show up at a different hash
value to the non-fragments, so you'll handle all the non-fragments
first, then the fragments show up later. So hopefully the LRO code
handles seeing that hole in the TCP stream and will eject the whole
stream up.


>> You can't rely on the toeplitz hash 100% hashing /all packets in a
>> stream/ reliably, because it's highly dependent upon the NIC config.
>
>
>> This is why I did all that effort in the RSS code to handle things.
>
> --HPS
>
>

From owner-svn-src-all@freebsd.org  Tue Jan 19 20:52:05 2016
Return-Path: <owner-svn-src-all@freebsd.org>
Delivered-To: svn-src-all@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5D356A89C33;
 Tue, 19 Jan 2016 20:52:05 +0000 (UTC) (envelope-from hps@selasky.org)
Received: from mail.turbocat.net (heidi.turbocat.net [88.198.202.214])
 (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
 (Client did not present a certificate)
 by mx1.freebsd.org (Postfix) with ESMTPS id 228F21FC5;
 Tue, 19 Jan 2016 20:52:04 +0000 (UTC) (envelope-from hps@selasky.org)
Received: from laptop015.home.selasky.org (unknown [62.141.129.119])
 (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits))
 (No client certificate requested)
 by mail.turbocat.net (Postfix) with ESMTPSA id E18DC1FE024;
 Tue, 19 Jan 2016 21:52:02 +0100 (CET)
Subject: Re: svn commit: r294327 - in head/sys: dev/cxgb dev/cxgbe dev/e1000
 dev/hyperv/netvsc dev/ixgbe dev/mxge netinet sys
To: Adrian Chadd <adrian.chadd@gmail.com>
References: <201601191533.u0JFXSxf037804@repo.freebsd.org>
 <CAFMmRNz3uXim3H3-sGuBUBs45Jy8p260ywothgp4iFkUcnvnEw@mail.gmail.com>
 <569E6A38.8080108@selasky.org>
 <CAFMmRNx3zC=mz=TC2Aq5==a5vh0Fqzv1domrCL2uUHnjybZSkQ@mail.gmail.com>
 <CAJ-Vmoki0yCU-mmPGfrGyJ_ar_=KKkto_ioomo_Ri_HCWR70cg@mail.gmail.com>
 <569E909B.60506@selasky.org>
 <CAJ-Vmo=1vTmKnoM=wVX=vv99mnkW-Q2CKkxZUNTUBkw_CU6ahQ@mail.gmail.com>
 <569E9B66.1070200@selasky.org>
 <CAJ-Vmo=vi5fdGzx6Z6+D5szrpf0jcaOe7a_9u-o0V7+9YkE6qw@mail.gmail.com>
 <569EA026.5020906@selasky.org>
 <CAJ-VmokCLr7jESQqDYPRUgbo2vQD-1_kC6YhCjqAm3tMz29RUg@mail.gmail.com>
Cc: Ryan Stone <rysto32@gmail.com>,
 "src-committers@freebsd.org" <src-committers@freebsd.org>,
 "svn-src-all@freebsd.org" <svn-src-all@freebsd.org>,
 "svn-src-head@freebsd.org" <svn-src-head@freebsd.org>
From: Hans Petter Selasky <hps@selasky.org>
Message-ID: <569EA27B.4050001@selasky.org>
Date: Tue, 19 Jan 2016 21:54:19 +0100
User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:38.0) Gecko/20100101
 Thunderbird/38.4.0
MIME-Version: 1.0
In-Reply-To: <CAJ-VmokCLr7jESQqDYPRUgbo2vQD-1_kC6YhCjqAm3tMz29RUg@mail.gmail.com>
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: 7bit
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.20
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for &quot;
 user&quot; and &quot; projects&quot; \)" <svn-src-all.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-all/>
List-Post: <mailto:svn-src-all@freebsd.org>
List-Help: <mailto:svn-src-all-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Tue, 19 Jan 2016 20:52:05 -0000

On 01/19/16 21:47, Adrian Chadd wrote:
> In this setup you may have the fragments show up at a different hash
> value to the non-fragments, so you'll handle all the non-fragments
> first, then the fragments show up later. So hopefully the LRO code
> handles seeing that hole in the TCP stream and will eject the whole
> stream up.

Yes, the LRO code ejects all fragmented packets. They might be received 
out of order though after the sorting, assuming that's fine.

BTW: I don't see how you can get very high througput with fragmented TCP 
packets w/o LRO.

--HPS

From owner-svn-src-all@freebsd.org  Tue Jan 19 20:52:33 2016
Return-Path: <owner-svn-src-all@freebsd.org>
Delivered-To: svn-src-all@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2507EA89C7B;
 Tue, 19 Jan 2016 20:52:33 +0000 (UTC) (envelope-from lidl@pix.net)
Received: from hydra.pix.net (hydra.pix.net [IPv6:2001:470:e254:10::4])
 (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
 (Client CN "mail.pix.net", Issuer "Pix.Com Technologies,
 LLC CA" (not verified))
 by mx1.freebsd.org (Postfix) with ESMTPS id D9F3C129C;
 Tue, 19 Jan 2016 20:52:32 +0000 (UTC) (envelope-from lidl@pix.net)
Received: from torb.pix.net ([IPv6:2001:470:e254:11:52:fed0:33f2:51b0])
 (authenticated bits=0)
 by hydra.pix.net (8.15.2/8.15.2) with ESMTPA id u0JKqNaQ046732;
 Tue, 19 Jan 2016 15:52:30 -0500 (EST) (envelope-from lidl@pix.net)
X-Authentication-Warning: hydra.pix.net: Host
 [IPv6:2001:470:e254:11:52:fed0:33f2:51b0] claimed to be torb.pix.net
Subject: Re: svn commit: r294329 - in
 head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs: . sys
To: Alan Somers <asomers@freebsd.org>
References: <201601191700.u0JH0P6k061610@repo.freebsd.org>
 <CAOtMX2jU3Rm0as2-oTgBt=Xe5_kgneAY7aB_NrjCy+aXNHD3KA@mail.gmail.com>
Cc: "src-committers@freebsd.org" <src-committers@freebsd.org>,
 "svn-src-all@freebsd.org" <svn-src-all@freebsd.org>,
 "svn-src-head@freebsd.org" <svn-src-head@freebsd.org>
From: Kurt Lidl <lidl@pix.net>
Message-ID: <569EA207.5010304@pix.net>
Date: Tue, 19 Jan 2016 15:52:23 -0500
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.11; rv:38.0)
 Gecko/20100101 Thunderbird/38.5.1
MIME-Version: 1.0
In-Reply-To: <CAOtMX2jU3Rm0as2-oTgBt=Xe5_kgneAY7aB_NrjCy+aXNHD3KA@mail.gmail.com>
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: 7bit
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.20
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for &quot;
 user&quot; and &quot; projects&quot; \)" <svn-src-all.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-all/>
List-Post: <mailto:svn-src-all@freebsd.org>
List-Help: <mailto:svn-src-all-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Tue, 19 Jan 2016 20:52:33 -0000

On 1/19/16 1:55 PM, Alan Somers wrote:
> On Tue, Jan 19, 2016 at 10:00 AM, Alan Somers <asomers@freebsd.org> wrote:
>> Author: asomers
>> Date: Tue Jan 19 17:00:25 2016
>> New Revision: 294329
>> URL: https://svnweb.freebsd.org/changeset/base/294329
>>
>> Log:
>>    Disallow zvol-backed ZFS pools
>>
>>    Using zvols as backing devices for ZFS pools is fraught with panics and
>>    deadlocks. For example, attempting to online a missing device in the
>>    presence of a zvol can cause a panic when vdev_geom tastes the zvol.  Better
>>    to completely disable vdev_geom from ever opening a zvol. The solution
>>    relies on setting a thread-local variable during vdev_geom_open, and
>>    returning EOPNOTSUPP during zvol_open if that thread-local variable is set.
>>
>>    Remove the check for MUTEX_HELD(&zfsdev_state_lock) in zvol_open. Its intent
>>    was to prevent a recursive mutex acquisition panic. However, the new check
>>    for the thread-local variable also fixes that problem.
>>
>>    Also, fix a panic in vdev_geom_taste_orphan. For an unknown reason, this
>>    function was set to panic. But it can occur that a device disappears during
>>    tasting, and it causes no problems to ignore this departure.
>>
>>    Reviewed by:  delphij
>>    MFC after:    1 week
>>    Relnotes:     yes
>>    Sponsored by: Spectra Logic Corp
>>    Differential Revision:        https://reviews.freebsd.org/D4986
>>
>> Modified:
>>    head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/vdev_impl.h
>>    head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_geom.c
>>    head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c
>>    head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zvol.c
>>
>> Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/vdev_impl.h
>
> Due to popular demand, I will conditionalize this behavior on a
> sysctl, and I won't MFC it.  The sysctl must default to off (ZFS on
> zvols not allowed) because having the ability to put pools on zvols
> can cause panics even for users who aren't using it.

Thank you!

> And let me clear up some confusion:
>
> 1) Having the ability to put a zpool on a zvol can cause panics and
> deadlocks, even if that ability is unused.
> 2) Putting a zpool atop a zvol causes unnecessary performance problems
> because there are two layers of COW involved, with all their software
> complexities.  This also applies to putting a zpool atop files on a
> ZFS filesystem.
> 3) A VM guest putting a zpool on its virtual disk, where the VM host
> backs that virtual disk with a zvol, will work fine.  That's the ideal
> use case for zvols.
> 3b) Using ZFS on both host and guest isn't ideal for performance, as
> described in item 2.  That's why I prefer to use UFS for VM guests.

The patch as is does very much break the way some people do operations
on zvols.  My script that does virtual machine cloning via snapshots
of zvols containing zpools is currently broken due to this. (I upgraded
one of my dev hosts right after your commit, to verify the broken
behavior.)

In my script, I boot an auto-install .iso into bhyve:

         bhyve -c 2 -m ${vmmem} -H -A -I -g 0 \
                 -s 0:0,hostbridge \
                 -s 1,lpc -l com1,stdio \
                 -s 2:0,virtio-net,${template_tap} \
                 -s 3:0,ahci-hd,"${zvol}" \
                 -s 4:0,ahci-cd,"${isofile}" \
                 ${vmname} || \
                 echo "trapped error exit from bhyve: $?"

So, yes, the zpool gets created by the client VM.  Then on
the hypervisor host, the script imports that zpool and renames it,
so that I can have different pool names for all the client VMs.
This step now fails:

+ zpool import -R /virt/base -d /dev/zvol/zdata sys base
cannot import 'sys' as 'base': no such pool or dataset
	Destroy and re-create the pool from
	a backup source.

I import the clients' zpools after the zpools on them has
been renamed, so the hypervisor host can manipulate the
files directly.  It only disturbs a small amount of the
disk blocks on each of the snapshots of the zvol to rename
the zpools.

In this way, I can instantiate ~30 virtual machines from
a custom install.iso image in less than 3 minutes.  And
the bulk of that time is doing the installation from the
custom install.iso into the first virtual machine.  The
cloning of the zvols, and manipulation of the resulting
filesystems is very fast.

-Kurt




From owner-svn-src-all@freebsd.org  Tue Jan 19 20:55:54 2016
Return-Path: <owner-svn-src-all@freebsd.org>
Delivered-To: svn-src-all@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2ABB5A89D7E;
 Tue, 19 Jan 2016 20:55:54 +0000 (UTC)
 (envelope-from rysto32@gmail.com)
Received: from mail-io0-x22b.google.com (mail-io0-x22b.google.com
 [IPv6:2607:f8b0:4001:c06::22b])
 (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits))
 (Client CN "smtp.gmail.com",
 Issuer "Google Internet Authority G2" (verified OK))
 by mx1.freebsd.org (Postfix) with ESMTPS id E66851484;
 Tue, 19 Jan 2016 20:55:53 +0000 (UTC)
 (envelope-from rysto32@gmail.com)
Received: by mail-io0-x22b.google.com with SMTP id q21so594838259iod.0;
 Tue, 19 Jan 2016 12:55:53 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;
 h=mime-version:in-reply-to:references:date:message-id:subject:from:to
 :cc:content-type;
 bh=xGeTrJ46LRTJUosA2bee7uvAWBT85uEmi0mm5UIkTfM=;
 b=QDHpm3O1X8MjeHDA27R/Jq06faviz91qa4YIgr0OXi8NQjVvqr2G56FiM/Tc1PrZMn
 V9ORmoW9WimZIzGxslbM2ijpWndFryOl182wEBcUqOacglHo1+2J1AAqVh5mWeQ68zIo
 MZSnSHUn6QkuijRAbl/LSVBw4Tv9h0LS28/z0C7VAypu4hS+0q4mFYob3ay2+yXbpnwj
 GvMxMFEyNkKsmB12twmpQ5uJ7Ucz2KRKDlxM+qbh0QereQ6tQt9iL2y9Gu28yVcmxcO3
 YuG6+ARQHRnst3FwxaUKCc9LW32/Tdx1Xuarcfhuvun04djb7NyJzhxtbDNUZlhbe2Bq
 V04Q==
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:date
 :message-id:subject:from:to:cc:content-type;
 bh=xGeTrJ46LRTJUosA2bee7uvAWBT85uEmi0mm5UIkTfM=;
 b=aS7C7RM/GkmsUX7GlBbrCbsHfPumcD2ZZ+kb7925RmjIzo395ixvEXDyhVTYETZhkq
 2rYfbZ2KtogDGGoOZWo1euXCdH7yHfoRGQRKfzA8TC4Uh+pgOuuD1d5CvDdSkNiH701Q
 ufCp+07HnSDoiXVNbY3QIAF8GS4sc9bd8XxcA3pUEn1lTCnhBLWVEpW1xMQR96HpUwq6
 KzXejUreGB4vsrTQzS4a5p8In8tJpNv0gJufSAYmxVlcaR+X6rpmgAhpfG2ywhwqybr1
 TFgmlNwtZcZjcStejBYmHrHRBWwYaIJpst/FpTkGRQ0SmzzBemnVJIiVcutcmJ8TVcao
 pDVw==
X-Gm-Message-State: ALoCoQlb8UfZaJqOctf5X0ANAw2t4e4MTG2e10Fv2YDjoOEhxwmjzY45U1MLPUhOY1yrzUjB5MzikJGg6tGuj/xqMf48A9b5eA==
MIME-Version: 1.0
X-Received: by 10.107.159.7 with SMTP id i7mr26491400ioe.29.1453236953440;
 Tue, 19 Jan 2016 12:55:53 -0800 (PST)
Received: by 10.107.178.193 with HTTP; Tue, 19 Jan 2016 12:55:53 -0800 (PST)
In-Reply-To: <CAJ-Vmo=vi5fdGzx6Z6+D5szrpf0jcaOe7a_9u-o0V7+9YkE6qw@mail.gmail.com>
References: <201601191533.u0JFXSxf037804@repo.freebsd.org>
 <CAFMmRNz3uXim3H3-sGuBUBs45Jy8p260ywothgp4iFkUcnvnEw@mail.gmail.com>
 <569E6A38.8080108@selasky.org>
 <CAFMmRNx3zC=mz=TC2Aq5==a5vh0Fqzv1domrCL2uUHnjybZSkQ@mail.gmail.com>
 <CAJ-Vmoki0yCU-mmPGfrGyJ_ar_=KKkto_ioomo_Ri_HCWR70cg@mail.gmail.com>
 <569E909B.60506@selasky.org>
 <CAJ-Vmo=1vTmKnoM=wVX=vv99mnkW-Q2CKkxZUNTUBkw_CU6ahQ@mail.gmail.com>
 <569E9B66.1070200@selasky.org>
 <CAJ-Vmo=vi5fdGzx6Z6+D5szrpf0jcaOe7a_9u-o0V7+9YkE6qw@mail.gmail.com>
Date: Tue, 19 Jan 2016 15:55:53 -0500
Message-ID: <CAFMmRNxDUzJLHyWna8H_BH1RHziHAPVfQzV65Sb-mHuWXXiZnA@mail.gmail.com>
Subject: Re: svn commit: r294327 - in head/sys: dev/cxgb dev/cxgbe dev/e1000
 dev/hyperv/netvsc dev/ixgbe dev/mxge netinet sys
From: Ryan Stone <rysto32@gmail.com>
To: Adrian Chadd <adrian.chadd@gmail.com>
Cc: Hans Petter Selasky <hps@selasky.org>, 
 "src-committers@freebsd.org" <src-committers@freebsd.org>, 
 "svn-src-all@freebsd.org" <svn-src-all@freebsd.org>, 
 "svn-src-head@freebsd.org" <svn-src-head@freebsd.org>
Content-Type: text/plain; charset=UTF-8
X-Content-Filtered-By: Mailman/MimeDel 2.1.20
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.20
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for &quot;
 user&quot; and &quot; projects&quot; \)" <svn-src-all.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-all/>
List-Post: <mailto:svn-src-all@freebsd.org>
List-Help: <mailto:svn-src-all-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Tue, 19 Jan 2016 20:55:54 -0000

On Tue, Jan 19, 2016 at 3:23 PM, Adrian Chadd <adrian.chadd@gmail.com>
wrote:

> Sure, but TCP fragments and non-fragments can hash to different
> values, so suddenly you get interleaved packets.
>

If the NIC is hashing fragments and non-fragments to different values,
aren't we already potentially getting out-of-order packets?  If the same
stream is spread across multiple queues all bets are already off.  I'm not
sure that this change has made things significantly worse in this regard.

> So hopefully the LRO code
> handles seeing that hole in the TCP stream and will eject the whole
> stream up.

The LRO code is aware of sequence numbers and will not merge frames if
there is a hole in the sequence numbers.

From owner-svn-src-all@freebsd.org  Tue Jan 19 21:08:33 2016
Return-Path: <owner-svn-src-all@freebsd.org>
Delivered-To: svn-src-all@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3F99FA880A3;
 Tue, 19 Jan 2016 21:08:33 +0000 (UTC) (envelope-from jhb@FreeBSD.org)
Received: from repo.freebsd.org (repo.freebsd.org
 [IPv6:2610:1c1:1:6068::e6a:0])
 (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
 (Client did not present a certificate)
 by mx1.freebsd.org (Postfix) with ESMTPS id 0222C1A89;
 Tue, 19 Jan 2016 21:08:32 +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 u0JL8WEa034650;
 Tue, 19 Jan 2016 21:08:32 GMT (envelope-from jhb@FreeBSD.org)
Received: (from jhb@localhost)
 by repo.freebsd.org (8.15.2/8.15.2/Submit) id u0JL8VnT034644;
 Tue, 19 Jan 2016 21:08:31 GMT (envelope-from jhb@FreeBSD.org)
Message-Id: <201601192108.u0JL8VnT034644@repo.freebsd.org>
X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org
 using -f
From: John Baldwin <jhb@FreeBSD.org>
Date: Tue, 19 Jan 2016 21:08:31 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org
Subject: svn commit: r294340 - in stable/10: share/man/man9 sys/dev/pci
X-SVN-Group: stable-10
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.20
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for &quot;
 user&quot; and &quot; projects&quot; \)" <svn-src-all.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-all/>
List-Post: <mailto:svn-src-all@freebsd.org>
List-Help: <mailto:svn-src-all-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Tue, 19 Jan 2016 21:08:33 -0000

Author: jhb
Date: Tue Jan 19 21:08:31 2016
New Revision: 294340
URL: https://svnweb.freebsd.org/changeset/base/294340

Log:
  MFC 292669:
  Add accessor methods to fetch the BAR holding the MSI-X table and PBA.
  
  While here, explicitly note the requirement that the BAR(s) must be
  allocated prior to calling pci_alloc_msix().

Modified:
  stable/10/share/man/man9/Makefile
  stable/10/share/man/man9/pci.9
  stable/10/sys/dev/pci/pci.c
  stable/10/sys/dev/pci/pci_if.m
  stable/10/sys/dev/pci/pci_private.h
  stable/10/sys/dev/pci/pcivar.h
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/share/man/man9/Makefile
==============================================================================
--- stable/10/share/man/man9/Makefile	Tue Jan 19 20:46:30 2016	(r294339)
+++ stable/10/share/man/man9/Makefile	Tue Jan 19 21:08:31 2016	(r294340)
@@ -1022,6 +1022,8 @@ MLINKS+=pci.9 pci_alloc_msi.9 \
 	pci.9 pci_get_vpd_readonly.9 \
 	pci.9 pci_msi_count.9 \
 	pci.9 pci_msix_count.9 \
+	pci.9 pci_msix_pba_bar.9 \
+	pci.9 pci_msix_table_bar.9 \
 	pci.9 pci_pending_msix.9 \
 	pci.9 pci_read_config.9 \
 	pci.9 pci_release_msi.9 \

Modified: stable/10/share/man/man9/pci.9
==============================================================================
--- stable/10/share/man/man9/pci.9	Tue Jan 19 20:46:30 2016	(r294339)
+++ stable/10/share/man/man9/pci.9	Tue Jan 19 21:08:31 2016	(r294340)
@@ -25,7 +25,7 @@
 .\"
 .\" $FreeBSD$
 .\"
-.Dd November 5, 2015
+.Dd December 23, 2015
 .Dt PCI 9
 .Os
 .Sh NAME
@@ -49,6 +49,8 @@
 .Nm pci_get_vpd_readonly ,
 .Nm pci_msi_count ,
 .Nm pci_msix_count ,
+.Nm pci_msix_pba_bar ,
+.Nm pci_msix_table_bar ,
 .Nm pci_pending_msix ,
 .Nm pci_read_config ,
 .Nm pci_release_msi ,
@@ -105,6 +107,10 @@
 .Ft int
 .Fn pci_msix_count "device_t dev"
 .Ft int
+.Fn pci_msix_pba_bar "device_t dev"
+.Ft int
+.Fn pci_msix_table_bar "device_t dev"
+.Ft int
 .Fn pci_pending_msix "device_t dev" "u_int index"
 .Ft uint32_t
 .Fn pci_read_config "device_t dev" "int reg" "int width"
@@ -618,6 +624,37 @@ then
 returns zero.
 .Pp
 The
+.Fn pci_msix_pba_bar
+function returns the offset in configuration space of the Base Address Register
+.Pq BAR
+containing the MSI-X Pending Bit Array (PBA) for device
+.Fa dev .
+The returned value can be used as the resource ID with
+.Xr bus_alloc_resource 9
+and
+.Xr bus_release_resource 9
+to allocate the BAR.
+If the device does not support MSI-X,
+then
+.Fn pci_msix_pba_bar
+returns -1.
+.Pp
+The
+.Fn pci_msix_table_bar
+function returns the offset in configuration space of the BAR
+containing the MSI-X vector table for device
+.Fa dev .
+The returned value can be used as the resource ID with
+.Xr bus_alloc_resource 9
+and
+.Xr bus_release_resource 9
+to allocate the BAR.
+If the device does not support MSI-X,
+then
+.Fn pci_msix_table_bar
+returns -1.
+.Pp
+The
 .Fn pci_alloc_msix
 function attempts to allocate
 .Fa *count
@@ -656,12 +693,21 @@ it returns an error.
 Unlike MSI,
 MSI-X does not require message counts that are powers of two.
 .Pp
+The BARs containing the MSI-X vector table and PBA must be
+allocated via
+.Xr bus_alloc_resource 9
+before calling
+.Fn pci_alloc_msix
+and must not be released until after calling
+.Fn pci_release_msi .
+Note that the vector table and PBA may be stored in the same BAR or in
+different BARs.
+.Pp
 The
 .Fn pci_pending_msix
 function examines the
 .Fa dev
-device's Pending Bit Array
-.Pq PBA
+device's PBA
 to determine the pending status of the MSI-X message at table index
 .Fa index .
 If the indicated message is pending,
@@ -776,3 +822,6 @@ These do not refer to the geographic loc
 but to the device number assigned by the combination of the PCI IDSEL
 mechanism and the platform firmware.
 This should be taken note of when working with the kernel PCI code.
+.Pp
+The PCI bus driver should allocate the MSI-X vector table and PBA internally
+as necessary rather than requiring the caller to do so.

Modified: stable/10/sys/dev/pci/pci.c
==============================================================================
--- stable/10/sys/dev/pci/pci.c	Tue Jan 19 20:46:30 2016	(r294339)
+++ stable/10/sys/dev/pci/pci.c	Tue Jan 19 21:08:31 2016	(r294340)
@@ -182,6 +182,8 @@ static device_method_t pci_methods[] = {
 	DEVMETHOD(pci_release_msi,	pci_release_msi_method),
 	DEVMETHOD(pci_msi_count,	pci_msi_count_method),
 	DEVMETHOD(pci_msix_count,	pci_msix_count_method),
+	DEVMETHOD(pci_msix_pba_bar,	pci_msix_pba_bar_method),
+	DEVMETHOD(pci_msix_table_bar,	pci_msix_table_bar_method),
 	DEVMETHOD(pci_get_rid,		pci_get_rid_method),
 	DEVMETHOD(pci_child_added,	pci_child_added_method),
 
@@ -1827,6 +1829,28 @@ pci_msix_count_method(device_t dev, devi
 	return (0);
 }
 
+int
+pci_msix_pba_bar_method(device_t dev, device_t child)
+{
+	struct pci_devinfo *dinfo = device_get_ivars(child);
+	struct pcicfg_msix *msix = &dinfo->cfg.msix;
+
+	if (pci_do_msix && msix->msix_location != 0)
+		return (msix->msix_pba_bar);
+	return (-1);
+}
+
+int
+pci_msix_table_bar_method(device_t dev, device_t child)
+{
+	struct pci_devinfo *dinfo = device_get_ivars(child);
+	struct pcicfg_msix *msix = &dinfo->cfg.msix;
+
+	if (pci_do_msix && msix->msix_location != 0)
+		return (msix->msix_table_bar);
+	return (-1);
+}
+
 /*
  * HyperTransport MSI mapping control
  */

Modified: stable/10/sys/dev/pci/pci_if.m
==============================================================================
--- stable/10/sys/dev/pci/pci_if.m	Tue Jan 19 20:46:30 2016	(r294339)
+++ stable/10/sys/dev/pci/pci_if.m	Tue Jan 19 21:08:31 2016	(r294340)
@@ -36,6 +36,12 @@ CODE {
 	{
 		return (0);
 	}
+
+	static int
+	null_msix_bar(device_t dev, device_t child)
+	{
+		return (-1);
+	}
 };
 
 
@@ -180,6 +186,16 @@ METHOD int msix_count {
 	device_t	child;
 } DEFAULT null_msi_count;
 
+METHOD int msix_pba_bar {
+	device_t	dev;
+	device_t	child;
+} DEFAULT null_msix_bar;
+
+METHOD int msix_table_bar {
+	device_t	dev;
+	device_t	child;
+} DEFAULT null_msix_bar;
+
 METHOD uint16_t get_rid {
 	device_t	dev;
 	device_t	child;

Modified: stable/10/sys/dev/pci/pci_private.h
==============================================================================
--- stable/10/sys/dev/pci/pci_private.h	Tue Jan 19 20:46:30 2016	(r294339)
+++ stable/10/sys/dev/pci/pci_private.h	Tue Jan 19 21:08:31 2016	(r294340)
@@ -100,6 +100,8 @@ int		pci_remap_msix_method(device_t dev,
 int		pci_release_msi_method(device_t dev, device_t child);
 int		pci_msi_count_method(device_t dev, device_t child);
 int		pci_msix_count_method(device_t dev, device_t child);
+int		pci_msix_pba_bar_method(device_t dev, device_t child);
+int		pci_msix_table_bar_method(device_t dev, device_t child);
 struct resource	*pci_alloc_resource(device_t dev, device_t child, 
 		    int type, int *rid, u_long start, u_long end, u_long count,
 		    u_int flags);

Modified: stable/10/sys/dev/pci/pcivar.h
==============================================================================
--- stable/10/sys/dev/pci/pcivar.h	Tue Jan 19 20:46:30 2016	(r294339)
+++ stable/10/sys/dev/pci/pcivar.h	Tue Jan 19 21:08:31 2016	(r294340)
@@ -495,6 +495,18 @@ pci_msix_count(device_t dev)
     return (PCI_MSIX_COUNT(device_get_parent(dev), dev));
 }
 
+static __inline int
+pci_msix_pba_bar(device_t dev)
+{
+    return (PCI_MSIX_PBA_BAR(device_get_parent(dev), dev));
+}
+
+static __inline int
+pci_msix_table_bar(device_t dev)
+{
+    return (PCI_MSIX_TABLE_BAR(device_get_parent(dev), dev));
+}
+
 static __inline uint16_t
 pci_get_rid(device_t dev)
 {

From owner-svn-src-all@freebsd.org  Tue Jan 19 21:10:37 2016
Return-Path: <owner-svn-src-all@freebsd.org>
Delivered-To: svn-src-all@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id EF6A1A8815E;
 Tue, 19 Jan 2016 21:10:37 +0000 (UTC)
 (envelope-from lifanov@mail.lifanov.com)
Received: from mail.lifanov.com (mail.lifanov.com [206.125.175.12])
 (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
 (Client did not present a certificate)
 by mx1.freebsd.org (Postfix) with ESMTPS id D90C11C63;
 Tue, 19 Jan 2016 21:10:37 +0000 (UTC)
 (envelope-from lifanov@mail.lifanov.com)
Received: by mail.lifanov.com (Postfix, from userid 58)
 id 6680C108F; Tue, 19 Jan 2016 16:02:12 -0500 (EST)
X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on mail.lifanov.com
X-Spam-Level: 
X-Spam-Status: No, score=-1.0 required=5.0 tests=ALL_TRUSTED,SHORTCIRCUIT
 shortcircuit=ham autolearn=disabled version=3.4.1
Received: from [127.0.0.1] (vnat600.ejoco.com [166.108.32.32])
 (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits))
 (No client certificate requested)
 by mail.lifanov.com (Postfix) with ESMTPSA id 3F0D51C6405;
 Tue, 19 Jan 2016 16:02:08 -0500 (EST)
Subject: Re: svn commit: r294329 - in
 head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs: . sys
To: Kurt Lidl <lidl@pix.net>
References: <201601191700.u0JH0P6k061610@repo.freebsd.org>
 <CAOtMX2jU3Rm0as2-oTgBt=Xe5_kgneAY7aB_NrjCy+aXNHD3KA@mail.gmail.com>
 <569EA207.5010304@pix.net>
Cc: Alan Somers <asomers@freebsd.org>,
 "svn-src-head@freebsd.org" <svn-src-head@freebsd.org>,
 "svn-src-all@freebsd.org" <svn-src-all@freebsd.org>,
 "src-committers@freebsd.org" <src-committers@freebsd.org>
From: Nikolai Lifanov <lifanov@mail.lifanov.com>
Message-ID: <569EA44D.3070500@mail.lifanov.com>
Date: Tue, 19 Jan 2016 16:02:05 -0500
User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:38.0) Gecko/20100101
 Thunderbird/38.5.0
MIME-Version: 1.0
In-Reply-To: <569EA207.5010304@pix.net>
Content-Type: text/plain; charset=windows-1252
Content-Transfer-Encoding: 7bit
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.20
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for &quot;
 user&quot; and &quot; projects&quot; \)" <svn-src-all.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-all/>
List-Post: <mailto:svn-src-all@freebsd.org>
List-Help: <mailto:svn-src-all-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Tue, 19 Jan 2016 21:10:38 -0000

On 01/19/16 15:52, Kurt Lidl wrote:
> On 1/19/16 1:55 PM, Alan Somers wrote:
>> On Tue, Jan 19, 2016 at 10:00 AM, Alan Somers <asomers@freebsd.org>
>> wrote:
>>> Author: asomers
>>> Date: Tue Jan 19 17:00:25 2016
>>> New Revision: 294329
>>> URL: https://svnweb.freebsd.org/changeset/base/294329
>>>
>>> Log:
>>>    Disallow zvol-backed ZFS pools
>>>
>>>    Using zvols as backing devices for ZFS pools is fraught with
>>> panics and
>>>    deadlocks. For example, attempting to online a missing device in the
>>>    presence of a zvol can cause a panic when vdev_geom tastes the
>>> zvol.  Better
>>>    to completely disable vdev_geom from ever opening a zvol. The
>>> solution
>>>    relies on setting a thread-local variable during vdev_geom_open, and
>>>    returning EOPNOTSUPP during zvol_open if that thread-local
>>> variable is set.
>>>
>>>    Remove the check for MUTEX_HELD(&zfsdev_state_lock) in zvol_open.
>>> Its intent
>>>    was to prevent a recursive mutex acquisition panic. However, the
>>> new check
>>>    for the thread-local variable also fixes that problem.
>>>
>>>    Also, fix a panic in vdev_geom_taste_orphan. For an unknown
>>> reason, this
>>>    function was set to panic. But it can occur that a device
>>> disappears during
>>>    tasting, and it causes no problems to ignore this departure.
>>>
>>>    Reviewed by:  delphij
>>>    MFC after:    1 week
>>>    Relnotes:     yes
>>>    Sponsored by: Spectra Logic Corp
>>>    Differential Revision:        https://reviews.freebsd.org/D4986
>>>
>>> Modified:
>>>    head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/vdev_impl.h
>>>    head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_geom.c
>>>    head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c
>>>    head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zvol.c
>>>
>>> Modified:
>>> head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/vdev_impl.h
>>
>> Due to popular demand, I will conditionalize this behavior on a
>> sysctl, and I won't MFC it.  The sysctl must default to off (ZFS on
>> zvols not allowed) because having the ability to put pools on zvols
>> can cause panics even for users who aren't using it.
> 
> Thank you!
> 
>> And let me clear up some confusion:
>>
>> 1) Having the ability to put a zpool on a zvol can cause panics and
>> deadlocks, even if that ability is unused.
>> 2) Putting a zpool atop a zvol causes unnecessary performance problems
>> because there are two layers of COW involved, with all their software
>> complexities.  This also applies to putting a zpool atop files on a
>> ZFS filesystem.
>> 3) A VM guest putting a zpool on its virtual disk, where the VM host
>> backs that virtual disk with a zvol, will work fine.  That's the ideal
>> use case for zvols.
>> 3b) Using ZFS on both host and guest isn't ideal for performance, as
>> described in item 2.  That's why I prefer to use UFS for VM guests.
> 
> The patch as is does very much break the way some people do operations
> on zvols.  My script that does virtual machine cloning via snapshots
> of zvols containing zpools is currently broken due to this. (I upgraded
> one of my dev hosts right after your commit, to verify the broken
> behavior.)
> 
> In my script, I boot an auto-install .iso into bhyve:
> 
>         bhyve -c 2 -m ${vmmem} -H -A -I -g 0 \
>                 -s 0:0,hostbridge \
>                 -s 1,lpc -l com1,stdio \
>                 -s 2:0,virtio-net,${template_tap} \
>                 -s 3:0,ahci-hd,"${zvol}" \
>                 -s 4:0,ahci-cd,"${isofile}" \
>                 ${vmname} || \
>                 echo "trapped error exit from bhyve: $?"
> 
> So, yes, the zpool gets created by the client VM.  Then on
> the hypervisor host, the script imports that zpool and renames it,
> so that I can have different pool names for all the client VMs.
> This step now fails:
> 
> + zpool import -R /virt/base -d /dev/zvol/zdata sys base
> cannot import 'sys' as 'base': no such pool or dataset
>     Destroy and re-create the pool from
>     a backup source.
> 
> I import the clients' zpools after the zpools on them has
> been renamed, so the hypervisor host can manipulate the
> files directly.  It only disturbs a small amount of the
> disk blocks on each of the snapshots of the zvol to rename
> the zpools.
> 
> In this way, I can instantiate ~30 virtual machines from
> a custom install.iso image in less than 3 minutes.  And
> the bulk of that time is doing the installation from the
> custom install.iso into the first virtual machine.  The
> cloning of the zvols, and manipulation of the resulting
> filesystems is very fast.
> 

Can't you just set volmode=dev and use zfs clone?

> -Kurt
> 
> 
> 
> _______________________________________________
> 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-all@freebsd.org  Tue Jan 19 21:22:00 2016
Return-Path: <owner-svn-src-all@freebsd.org>
Delivered-To: svn-src-all@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id 528CCA885DB;
 Tue, 19 Jan 2016 21:22:00 +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 2DC1415D1;
 Tue, 19 Jan 2016 21:22:00 +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 u0JLLxgu040803;
 Tue, 19 Jan 2016 21:21:59 GMT (envelope-from ian@FreeBSD.org)
Received: (from ian@localhost)
 by repo.freebsd.org (8.15.2/8.15.2/Submit) id u0JLLx7e040802;
 Tue, 19 Jan 2016 21:21:59 GMT (envelope-from ian@FreeBSD.org)
Message-Id: <201601192121.u0JLLx7e040802@repo.freebsd.org>
X-Authentication-Warning: repo.freebsd.org: ian set sender to ian@FreeBSD.org
 using -f
From: Ian Lepore <ian@FreeBSD.org>
Date: Tue, 19 Jan 2016 21:21:59 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org
Subject: svn commit: r294341 - stable/10/sys/boot/uboot/common
X-SVN-Group: stable-10
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.20
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for &quot;
 user&quot; and &quot; projects&quot; \)" <svn-src-all.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-all/>
List-Post: <mailto:svn-src-all@freebsd.org>
List-Help: <mailto:svn-src-all-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Tue, 19 Jan 2016 21:22:00 -0000

Author: ian
Date: Tue Jan 19 21:21:59 2016
New Revision: 294341
URL: https://svnweb.freebsd.org/changeset/base/294341

Log:
  MFC r291164, r291876, r292227:
  
    Print more detailed info about the disk and partition chosen for booting.
    No behavioral changes, just cosmetics.
  
    Remove stray unescaped `%` in `Booting from ...` informational message.
  
    Enhance the "ubenv import" command to allow importing a u-boot env var
    directly into a loader (and thus kernel) env var.

Modified:
  stable/10/sys/boot/uboot/common/main.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/sys/boot/uboot/common/main.c
==============================================================================
--- stable/10/sys/boot/uboot/common/main.c	Tue Jan 19 21:08:31 2016	(r294340)
+++ stable/10/sys/boot/uboot/common/main.c	Tue Jan 19 21:21:59 2016	(r294341)
@@ -315,7 +315,7 @@ print_disk_probe_info()
 	else
 		strcpy(slice, "<auto>");
 
-	if (currdev.d_disk.partition > 0)
+	if (currdev.d_disk.partition >= 0)
 		sprintf(partition, "%d", currdev.d_disk.partition);
 	else
 		strcpy(partition, "<auto>");
@@ -382,7 +382,7 @@ probe_disks(int devidx, int load_type, i
 		printf("\n");
 	}
 
-	printf("  Requested disk type/unit not found\n");
+	printf("  Requested disk type/unit/slice/partition not found\n");
 	return (-1);
 }
 
@@ -392,7 +392,7 @@ main(void)
 	struct api_signature *sig = NULL;
 	int load_type, load_unit, load_slice, load_partition;
 	int i;
-	const char * loaderdev;
+	const char *ldev;
 
 	/*
 	 * If we can't find the magic signature and related info, exit with a
@@ -485,10 +485,10 @@ main(void)
 		return (0xbadef1ce);
 	}
 
-	env_setenv("currdev", EV_VOLATILE, uboot_fmtdev(&currdev),
-	    uboot_setcurrdev, env_nounset);
-	env_setenv("loaddev", EV_VOLATILE, uboot_fmtdev(&currdev),
-	    env_noset, env_nounset);
+	ldev = uboot_fmtdev(&currdev);
+	env_setenv("currdev", EV_VOLATILE, ldev, uboot_setcurrdev, env_nounset);
+	env_setenv("loaddev", EV_VOLATILE, ldev, env_noset, env_nounset);
+	printf("Booting from %s\n", ldev);
 
 	setenv("LINES", "24", 1);		/* optional */
 	setenv("prompt", "loader>", 1);
@@ -573,17 +573,41 @@ enum ubenv_action {
 static void
 handle_uboot_env_var(enum ubenv_action action, const char * var)
 {
-	const char * val;
-	char ubv[128];
+	char ldvar[128];
+	const char *val;
+	char *wrk;
+	int len;
+
+	/*
+	 * On an import with the variable name formatted as ldname=ubname,
+	 * import the uboot variable ubname into the loader variable ldname,
+	 * otherwise the historical behavior is to import to uboot.ubname.
+	 */
+	if (action == UBENV_IMPORT) { 
+		len = strcspn(var, "=");
+		if (var[len] == 0) {
+			strcpy(ldvar, "uboot.");
+			strncat(ldvar, var, sizeof(ldvar) - 7);
+		} else {
+			len = MIN(len, sizeof(ldvar) - 1);
+			strncpy(ldvar, var, len);
+			ldvar[len] = 0;
+			var = &var[len + 1];
+		}
+	}
 
 	/*
 	 * If the user prepended "uboot." (which is how they usually see these
 	 * names) strip it off as a convenience.
 	 */
 	if (strncmp(var, "uboot.", 6) == 0) {
-		snprintf(ubv, sizeof(ubv), "%s", &var[6]);
-		var = ubv;
+		var = &var[6];
 	}
+
+	/* If ldvar is malformed or there's no variable name left, punt. */
+	if (ldvar[0] == 0 || var[0] == 0)
+		return;
+
 	val = ub_env_get(var);
 	if (action == UBENV_SHOW) {
 		if (val == NULL)
@@ -592,8 +616,7 @@ handle_uboot_env_var(enum ubenv_action a
 			printf("uboot.%s=%s\n", var, val);
 	} else if (action == UBENV_IMPORT) {
 		if (val != NULL) {
-			snprintf(ubv, sizeof(ubv), "uboot.%s", var);
-			setenv(ubv, val, 1);
+			setenv(ldvar, val, 1);
 		}
 	}
 }

From owner-svn-src-all@freebsd.org  Tue Jan 19 21:25:26 2016
Return-Path: <owner-svn-src-all@freebsd.org>
Delivered-To: svn-src-all@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id 881C9A886F1;
 Tue, 19 Jan 2016 21:25:26 +0000 (UTC)
 (envelope-from lifanov@mail.lifanov.com)
Received: from mail.lifanov.com (mail.lifanov.com [206.125.175.12])
 (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
 (Client did not present a certificate)
 by mx1.freebsd.org (Postfix) with ESMTPS id 747AF18B2;
 Tue, 19 Jan 2016 21:25:26 +0000 (UTC)
 (envelope-from lifanov@mail.lifanov.com)
Received: by mail.lifanov.com (Postfix, from userid 58)
 id C71BC1093; Tue, 19 Jan 2016 16:25:25 -0500 (EST)
X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on mail.lifanov.com
X-Spam-Level: 
X-Spam-Status: No, score=-1.0 required=5.0 tests=ALL_TRUSTED,SHORTCIRCUIT
 shortcircuit=ham autolearn=disabled version=3.4.1
Received: from [127.0.0.1] (vnat600.ejoco.com [166.108.32.32])
 (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits))
 (No client certificate requested)
 by mail.lifanov.com (Postfix) with ESMTPSA id B2514108F;
 Tue, 19 Jan 2016 16:25:24 -0500 (EST)
Subject: Re: svn commit: r294329 - in
 head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs: . sys
To: Kurt Lidl <lidl@pix.net>
References: <201601191700.u0JH0P6k061610@repo.freebsd.org>
 <CAOtMX2jU3Rm0as2-oTgBt=Xe5_kgneAY7aB_NrjCy+aXNHD3KA@mail.gmail.com>
 <569EA207.5010304@pix.net> <569EA44D.3070500@mail.lifanov.com>
Cc: "svn-src-head@freebsd.org" <svn-src-head@freebsd.org>,
 "svn-src-all@freebsd.org" <svn-src-all@freebsd.org>,
 "src-committers@freebsd.org" <src-committers@freebsd.org>,
 Alan Somers <asomers@freebsd.org>
From: Nikolai Lifanov <lifanov@mail.lifanov.com>
Message-ID: <569EA9C3.5040003@mail.lifanov.com>
Date: Tue, 19 Jan 2016 16:25:23 -0500
User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:38.0) Gecko/20100101
 Thunderbird/38.5.0
MIME-Version: 1.0
In-Reply-To: <569EA44D.3070500@mail.lifanov.com>
Content-Type: text/plain; charset=windows-1252
Content-Transfer-Encoding: 7bit
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.20
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for &quot;
 user&quot; and &quot; projects&quot; \)" <svn-src-all.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-all/>
List-Post: <mailto:svn-src-all@freebsd.org>
List-Help: <mailto:svn-src-all-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Tue, 19 Jan 2016 21:25:26 -0000

On 01/19/16 16:02, Nikolai Lifanov wrote:
> On 01/19/16 15:52, Kurt Lidl wrote:
>> On 1/19/16 1:55 PM, Alan Somers wrote:
>>> On Tue, Jan 19, 2016 at 10:00 AM, Alan Somers <asomers@freebsd.org>
>>> wrote:
>>>> Author: asomers
>>>> Date: Tue Jan 19 17:00:25 2016
>>>> New Revision: 294329
>>>> URL: https://svnweb.freebsd.org/changeset/base/294329
>>>>
>>>> Log:
>>>>    Disallow zvol-backed ZFS pools
>>>>
>>>>    Using zvols as backing devices for ZFS pools is fraught with
>>>> panics and
>>>>    deadlocks. For example, attempting to online a missing device in the
>>>>    presence of a zvol can cause a panic when vdev_geom tastes the
>>>> zvol.  Better
>>>>    to completely disable vdev_geom from ever opening a zvol. The
>>>> solution
>>>>    relies on setting a thread-local variable during vdev_geom_open, and
>>>>    returning EOPNOTSUPP during zvol_open if that thread-local
>>>> variable is set.
>>>>
>>>>    Remove the check for MUTEX_HELD(&zfsdev_state_lock) in zvol_open.
>>>> Its intent
>>>>    was to prevent a recursive mutex acquisition panic. However, the
>>>> new check
>>>>    for the thread-local variable also fixes that problem.
>>>>
>>>>    Also, fix a panic in vdev_geom_taste_orphan. For an unknown
>>>> reason, this
>>>>    function was set to panic. But it can occur that a device
>>>> disappears during
>>>>    tasting, and it causes no problems to ignore this departure.
>>>>
>>>>    Reviewed by:  delphij
>>>>    MFC after:    1 week
>>>>    Relnotes:     yes
>>>>    Sponsored by: Spectra Logic Corp
>>>>    Differential Revision:        https://reviews.freebsd.org/D4986
>>>>
>>>> Modified:
>>>>    head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/vdev_impl.h
>>>>    head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_geom.c
>>>>    head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c
>>>>    head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zvol.c
>>>>
>>>> Modified:
>>>> head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/vdev_impl.h
>>>
>>> Due to popular demand, I will conditionalize this behavior on a
>>> sysctl, and I won't MFC it.  The sysctl must default to off (ZFS on
>>> zvols not allowed) because having the ability to put pools on zvols
>>> can cause panics even for users who aren't using it.
>>
>> Thank you!
>>
>>> And let me clear up some confusion:
>>>
>>> 1) Having the ability to put a zpool on a zvol can cause panics and
>>> deadlocks, even if that ability is unused.
>>> 2) Putting a zpool atop a zvol causes unnecessary performance problems
>>> because there are two layers of COW involved, with all their software
>>> complexities.  This also applies to putting a zpool atop files on a
>>> ZFS filesystem.
>>> 3) A VM guest putting a zpool on its virtual disk, where the VM host
>>> backs that virtual disk with a zvol, will work fine.  That's the ideal
>>> use case for zvols.
>>> 3b) Using ZFS on both host and guest isn't ideal for performance, as
>>> described in item 2.  That's why I prefer to use UFS for VM guests.
>>
>> The patch as is does very much break the way some people do operations
>> on zvols.  My script that does virtual machine cloning via snapshots
>> of zvols containing zpools is currently broken due to this. (I upgraded
>> one of my dev hosts right after your commit, to verify the broken
>> behavior.)
>>
>> In my script, I boot an auto-install .iso into bhyve:
>>
>>         bhyve -c 2 -m ${vmmem} -H -A -I -g 0 \
>>                 -s 0:0,hostbridge \
>>                 -s 1,lpc -l com1,stdio \
>>                 -s 2:0,virtio-net,${template_tap} \
>>                 -s 3:0,ahci-hd,"${zvol}" \
>>                 -s 4:0,ahci-cd,"${isofile}" \
>>                 ${vmname} || \
>>                 echo "trapped error exit from bhyve: $?"
>>
>> So, yes, the zpool gets created by the client VM.  Then on
>> the hypervisor host, the script imports that zpool and renames it,
>> so that I can have different pool names for all the client VMs.
>> This step now fails:
>>
>> + zpool import -R /virt/base -d /dev/zvol/zdata sys base
>> cannot import 'sys' as 'base': no such pool or dataset
>>     Destroy and re-create the pool from
>>     a backup source.
>>
>> I import the clients' zpools after the zpools on them has
>> been renamed, so the hypervisor host can manipulate the
>> files directly.  It only disturbs a small amount of the
>> disk blocks on each of the snapshots of the zvol to rename
>> the zpools.
>>
>> In this way, I can instantiate ~30 virtual machines from
>> a custom install.iso image in less than 3 minutes.  And
>> the bulk of that time is doing the installation from the
>> custom install.iso into the first virtual machine.  The
>> cloning of the zvols, and manipulation of the resulting
>> filesystems is very fast.
>>
> 
> Can't you just set volmode=dev and use zfs clone?
> 

Never mind, you want different pool names to manipulate files directly.

>> -Kurt
>>
>>
>>
>> _______________________________________________
>> 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"
> 
> _______________________________________________
> 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-all@freebsd.org  Tue Jan 19 21:27:27 2016
Return-Path: <owner-svn-src-all@freebsd.org>
Delivered-To: svn-src-all@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4894DA887A8;
 Tue, 19 Jan 2016 21:27:27 +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 0176C1A8D;
 Tue, 19 Jan 2016 21:27:26 +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 u0JLRQKR041094;
 Tue, 19 Jan 2016 21:27:26 GMT (envelope-from ian@FreeBSD.org)
Received: (from ian@localhost)
 by repo.freebsd.org (8.15.2/8.15.2/Submit) id u0JLRPHB041091;
 Tue, 19 Jan 2016 21:27:25 GMT (envelope-from ian@FreeBSD.org)
Message-Id: <201601192127.u0JLRPHB041091@repo.freebsd.org>
X-Authentication-Warning: repo.freebsd.org: ian set sender to ian@FreeBSD.org
 using -f
From: Ian Lepore <ian@FreeBSD.org>
Date: Tue, 19 Jan 2016 21:27:25 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org
Subject: svn commit: r294342 - in stable/10: lib/libstand sys/boot/libstand32
X-SVN-Group: stable-10
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.20
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for &quot;
 user&quot; and &quot; projects&quot; \)" <svn-src-all.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-all/>
List-Post: <mailto:svn-src-all@freebsd.org>
List-Help: <mailto:svn-src-all-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Tue, 19 Jan 2016 21:27:27 -0000

Author: ian
Date: Tue Jan 19 21:27:25 2016
New Revision: 294342
URL: https://svnweb.freebsd.org/changeset/base/294342

Log:
  MFC r292234, r292527:
  
    Add strlcat() and strlcpy() to libstand and libstand32.

Modified:
  stable/10/lib/libstand/Makefile
  stable/10/sys/boot/libstand32/Makefile
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/lib/libstand/Makefile
==============================================================================
--- stable/10/lib/libstand/Makefile	Tue Jan 19 21:21:59 2016	(r294341)
+++ stable/10/lib/libstand/Makefile	Tue Jan 19 21:27:25 2016	(r294342)
@@ -59,8 +59,8 @@ SRCS+= ntoh.c
 .if ${MACHINE_CPUARCH} != "ia64"
 SRCS+=	bcmp.c bcopy.c bzero.c ffs.c memccpy.c memchr.c memcmp.c memcpy.c \
 	memmove.c memset.c qdivrem.c strcat.c strchr.c strcmp.c strcpy.c \
-	strcspn.c strlen.c strncat.c strncmp.c strncpy.c strpbrk.c \
-	strrchr.c strsep.c strspn.c strstr.c strtok.c swab.c
+	strcspn.c strlcat.c strlcpy.c strlen.c strncat.c strncmp.c strncpy.c \
+	strpbrk.c strrchr.c strsep.c strspn.c strstr.c strtok.c swab.c
 .endif
 .if ${MACHINE_CPUARCH} == "arm"
 .PATH: ${.CURDIR}/../libc/arm/gen

Modified: stable/10/sys/boot/libstand32/Makefile
==============================================================================
--- stable/10/sys/boot/libstand32/Makefile	Tue Jan 19 21:21:59 2016	(r294341)
+++ stable/10/sys/boot/libstand32/Makefile	Tue Jan 19 21:27:25 2016	(r294342)
@@ -63,8 +63,8 @@ SRCS+= ntoh.c
 .if ${MACHINE_CPUARCH} != "ia64"
 SRCS+=	bcmp.c bcopy.c bzero.c ffs.c memccpy.c memchr.c memcmp.c memcpy.c \
 	memmove.c memset.c qdivrem.c strcat.c strchr.c strcmp.c strcpy.c \
-	strcspn.c strlen.c strncat.c strncmp.c strncpy.c strpbrk.c \
-	strrchr.c strsep.c strspn.c strstr.c strtok.c swab.c
+	strcspn.c strlcat.c strlcpy.c strlen.c strncat.c strncmp.c strncpy.c \
+	strpbrk.c strrchr.c strsep.c strspn.c strstr.c strtok.c swab.c
 .endif
 .if ${MACHINE_CPUARCH} == "arm"
 .PATH: ${LIBC}/arm/gen

From owner-svn-src-all@freebsd.org  Tue Jan 19 21:35:11 2016
Return-Path: <owner-svn-src-all@freebsd.org>
Delivered-To: svn-src-all@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id 27B91A88B50;
 Tue, 19 Jan 2016 21:35:11 +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 03FCB1F0C;
 Tue, 19 Jan 2016 21:35:10 +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 u0JLZALH044043;
 Tue, 19 Jan 2016 21:35:10 GMT (envelope-from ian@FreeBSD.org)
Received: (from ian@localhost)
 by repo.freebsd.org (8.15.2/8.15.2/Submit) id u0JLZAuf044042;
 Tue, 19 Jan 2016 21:35:10 GMT (envelope-from ian@FreeBSD.org)
Message-Id: <201601192135.u0JLZAuf044042@repo.freebsd.org>
X-Authentication-Warning: repo.freebsd.org: ian set sender to ian@FreeBSD.org
 using -f
From: Ian Lepore <ian@FreeBSD.org>
Date: Tue, 19 Jan 2016 21:35:10 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org
Subject: svn commit: r294343 - stable/10/lib/libstand
X-SVN-Group: stable-10
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.20
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for &quot;
 user&quot; and &quot; projects&quot; \)" <svn-src-all.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-all/>
List-Post: <mailto:svn-src-all@freebsd.org>
List-Help: <mailto:svn-src-all-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Tue, 19 Jan 2016 21:35:11 -0000

Author: ian
Date: Tue Jan 19 21:35:09 2016
New Revision: 294343
URL: https://svnweb.freebsd.org/changeset/base/294343

Log:
  MFC r292583:
  
    Allow dhcp/bootp server-provided values to be overriden from environment
    variables in loader(8) and other libstand applications.
  
    Sometimes a dhcp server provides incorrect information along with the IP
    address. It would be useful to have a way to override this with
    locally-supplied information, such as command line parameters passed from a
    prior-stage bootloader. This change allows pre-existing env vars to take
    precedence over values delivered by the dhcp or bootp server.
  
    The bootp/dhcp code in libstand automatically creates environment variables
    from the data provided by the server (dhcp.root-path, dhcp.domain-name,
    etc). It also transcribes the values to some global variables such as
    'rootpath' and 'hostname'.
  
    This change does two things:
  
        When adding dhcp.* vars to the environment, don't replace existing
        vars/values.
  
        When setting the global vars rootpath and hostname, use the
        dhcp.root-path and dhcp.host-name env var values if they exist.
  
    This allows the platform-specific part of loader(8) to obtain override
    values in some platform-specific way and store them in the environment
    before opening the network device. The set of values that can be overriden
    is currently limited to just string options. The values that are delivered
    as binary data are things that probably shouldn't be overridden (IP,
    netmask, gateway, etc).
  
    The original patch this evolved from was submitted by martymac@
  
  PR:           202098
  Relnotes:	Yes

Modified:
  stable/10/lib/libstand/bootp.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/lib/libstand/bootp.c
==============================================================================
--- stable/10/lib/libstand/bootp.c	Tue Jan 19 21:27:25 2016	(r294342)
+++ stable/10/lib/libstand/bootp.c	Tue Jan 19 21:35:09 2016	(r294343)
@@ -354,6 +354,7 @@ vend_rfc1048(cp, len)
 	u_char *ep;
 	int size;
 	u_char tag;
+	const char *val;
 
 #ifdef BOOTP_DEBUG
 	if (debug)
@@ -380,15 +381,17 @@ vend_rfc1048(cp, len)
 		}
 		if (tag == TAG_SWAPSERVER) {
 			/* let it override bp_siaddr */
-			bcopy(cp, &rootip.s_addr, sizeof(swapip.s_addr));
+			bcopy(cp, &rootip.s_addr, sizeof(rootip.s_addr));
 		}
 		if (tag == TAG_ROOTPATH) {
-			strncpy(rootpath, (char *)cp, sizeof(rootpath));
-			rootpath[size] = '\0';
+			if ((val = getenv("dhcp.root-path")) == NULL)
+				val = (const char *)cp;
+			strlcpy(rootpath, val, sizeof(rootpath));
 		}
 		if (tag == TAG_HOSTNAME) {
-			strncpy(hostname, (char *)cp, sizeof(hostname));
-			hostname[size] = '\0';
+			if ((val = getenv("dhcp.host-name")) == NULL)
+				val = (const char *)cp;
+			strlcpy(hostname, val, sizeof(hostname));
 		}
 #ifdef SUPPORT_DHCP
 		if (tag == TAG_DHCP_MSGTYPE) {
@@ -730,7 +733,11 @@ setenv_(u_char *cp,  u_char *ep, struct 
 		sprintf(env, op->desc, opts[0].desc, tag);
 	    else
 		sprintf(env, "%s%s", opts[0].desc, op->desc);
-	    setenv(env, buf, 1);
+	    /*
+	     * Do not replace existing values in the environment, so that
+	     * locally-obtained values can override server-provided values.
+	     */
+	    setenv(env, buf, 0);
 	}
     }
     if (tp != tags) {

From owner-svn-src-all@freebsd.org  Tue Jan 19 21:37:53 2016
Return-Path: <owner-svn-src-all@freebsd.org>
Delivered-To: svn-src-all@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id 044C8A88C53;
 Tue, 19 Jan 2016 21:37:53 +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 BD86710DA;
 Tue, 19 Jan 2016 21:37: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 u0JLbp2s044214;
 Tue, 19 Jan 2016 21:37:51 GMT (envelope-from jhb@FreeBSD.org)
Received: (from jhb@localhost)
 by repo.freebsd.org (8.15.2/8.15.2/Submit) id u0JLbpRx044211;
 Tue, 19 Jan 2016 21:37:51 GMT (envelope-from jhb@FreeBSD.org)
Message-Id: <201601192137.u0JLbpRx044211@repo.freebsd.org>
X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org
 using -f
From: John Baldwin <jhb@FreeBSD.org>
Date: Tue, 19 Jan 2016 21:37:51 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-head@freebsd.org
Subject: svn commit: r294344 - in head/sys: kern vm
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.20
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for &quot;
 user&quot; and &quot; projects&quot; \)" <svn-src-all.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-all/>
List-Post: <mailto:svn-src-all@freebsd.org>
List-Help: <mailto:svn-src-all-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Tue, 19 Jan 2016 21:37:53 -0000

Author: jhb
Date: Tue Jan 19 21:37:51 2016
New Revision: 294344
URL: https://svnweb.freebsd.org/changeset/base/294344

Log:
  Various cleanups to the main function for AIO kernel processes:
  
  - Pull the vmspace logic out into helper functions and reduce duplication.
    Operations on the vmspace are all isolated to vm_map.c, but it now exports
    a new 'vmspace_switch_aio' for use by AIO kernel processes.
  - When an AIO kernel process wants to exit, break out of the main loop and
    perform cleanup after the loop end.  This reduces a lot of indentation and
    allows cleanup to more closely mirror setup actions before the loop starts.
  - Convert a DIAGNOSTIC to KASSERT().
  - Replace mycp with more typical 'p'.
  
  Reviewed by:	kib
  Sponsored by:	Chelsio Communications
  Differential Revision:	https://reviews.freebsd.org/D4990

Modified:
  head/sys/kern/vfs_aio.c
  head/sys/vm/vm_extern.h
  head/sys/vm/vm_map.c

Modified: head/sys/kern/vfs_aio.c
==============================================================================
--- head/sys/kern/vfs_aio.c	Tue Jan 19 21:35:09 2016	(r294343)
+++ head/sys/kern/vfs_aio.c	Tue Jan 19 21:37:51 2016	(r294344)
@@ -1048,6 +1048,13 @@ notification_done:
 	}
 }
 
+static void
+aio_switch_vmspace(struct aiocblist *aiocbe)
+{
+
+	vmspace_switch_aio(aiocbe->userproc->p_vmspace);
+}
+
 /*
  * The AIO daemon, most of the actual work is done in aio_process_*,
  * but the setup (and address space mgmt) is done in this routine.
@@ -1058,18 +1065,20 @@ aio_daemon(void *_id)
 	struct aiocblist *aiocbe;
 	struct aiothreadlist *aiop;
 	struct kaioinfo *ki;
-	struct proc *curcp, *mycp, *userp;
-	struct vmspace *myvm, *tmpvm;
+	struct proc *p, *userp;
+	struct vmspace *myvm;
 	struct thread *td = curthread;
 	int id = (intptr_t)_id;
 
 	/*
-	 * Local copies of curproc (cp) and vmspace (myvm)
+	 * Grab an extra reference on the daemon's vmspace so that it
+	 * doesn't get freed by jobs that switch to a different
+	 * vmspace.
 	 */
-	mycp = td->td_proc;
-	myvm = mycp->p_vmspace;
+	p = td->td_proc;
+	myvm = vmspace_acquire_ref(p);
 
-	KASSERT(mycp->p_textvp == NULL, ("kthread has a textvp"));
+	KASSERT(p->p_textvp == NULL, ("kthread has a textvp"));
 
 	/*
 	 * Allocate and ready the aio control info.  There is one aiop structure
@@ -1088,12 +1097,6 @@ aio_daemon(void *_id)
 	mtx_lock(&aio_job_mtx);
 	for (;;) {
 		/*
-		 * curcp is the current daemon process context.
-		 * userp is the current user process context.
-		 */
-		curcp = mycp;
-
-		/*
 		 * Take daemon off of free queue
 		 */
 		if (aiop->aiothreadflags & AIOP_FREE) {
@@ -1111,34 +1114,7 @@ aio_daemon(void *_id)
 			/*
 			 * Connect to process address space for user program.
 			 */
-			if (userp != curcp) {
-				/*
-				 * Save the current address space that we are
-				 * connected to.
-				 */
-				tmpvm = mycp->p_vmspace;
-
-				/*
-				 * Point to the new user address space, and
-				 * refer to it.
-				 */
-				mycp->p_vmspace = userp->p_vmspace;
-				atomic_add_int(&mycp->p_vmspace->vm_refcnt, 1);
-
-				/* Activate the new mapping. */
-				pmap_activate(FIRST_THREAD_IN_PROC(mycp));
-
-				/*
-				 * If the old address space wasn't the daemons
-				 * own address space, then we need to remove the
-				 * daemon's reference from the other process
-				 * that it was acting on behalf of.
-				 */
-				if (tmpvm != myvm) {
-					vmspace_free(tmpvm);
-				}
-				curcp = userp;
-			}
+			aio_switch_vmspace(aiocbe);
 
 			ki = userp->p_aioinfo;
 
@@ -1172,34 +1148,13 @@ aio_daemon(void *_id)
 		/*
 		 * Disconnect from user address space.
 		 */
-		if (curcp != mycp) {
-
+		if (p->p_vmspace != myvm) {
 			mtx_unlock(&aio_job_mtx);
-
-			/* Get the user address space to disconnect from. */
-			tmpvm = mycp->p_vmspace;
-
-			/* Get original address space for daemon. */
-			mycp->p_vmspace = myvm;
-
-			/* Activate the daemon's address space. */
-			pmap_activate(FIRST_THREAD_IN_PROC(mycp));
-#ifdef DIAGNOSTIC
-			if (tmpvm == myvm) {
-				printf("AIOD: vmspace problem -- %d\n",
-				    mycp->p_pid);
-			}
-#endif
-			/* Remove our vmspace reference. */
-			vmspace_free(tmpvm);
-
-			curcp = mycp;
-
+			vmspace_switch_aio(myvm);
 			mtx_lock(&aio_job_mtx);
 			/*
 			 * We have to restart to avoid race, we only sleep if
-			 * no job can be selected, that should be
-			 * curcp == mycp.
+			 * no job can be selected.
 			 */
 			continue;
 		}
@@ -1214,29 +1169,23 @@ aio_daemon(void *_id)
 		 * thereby freeing resources.
 		 */
 		if (msleep(aiop->aiothread, &aio_job_mtx, PRIBIO, "aiordy",
-		    aiod_lifetime)) {
-			if (TAILQ_EMPTY(&aio_jobs)) {
-				if ((aiop->aiothreadflags & AIOP_FREE) &&
-				    (num_aio_procs > target_aio_procs)) {
-					TAILQ_REMOVE(&aio_freeproc, aiop, list);
-					num_aio_procs--;
-					mtx_unlock(&aio_job_mtx);
-					uma_zfree(aiop_zone, aiop);
-					free_unr(aiod_unr, id);
-#ifdef DIAGNOSTIC
-					if (mycp->p_vmspace->vm_refcnt <= 1) {
-						printf("AIOD: bad vm refcnt for"
-						    " exiting daemon: %d\n",
-						    mycp->p_vmspace->vm_refcnt);
-					}
-#endif
-					kproc_exit(0);
-				}
-			}
-		}
+		    aiod_lifetime) == EWOULDBLOCK && TAILQ_EMPTY(&aio_jobs) &&
+		    (aiop->aiothreadflags & AIOP_FREE) &&
+		    num_aio_procs > target_aio_procs)
+			break;
 	}
+	TAILQ_REMOVE(&aio_freeproc, aiop, list);
+	num_aio_procs--;
 	mtx_unlock(&aio_job_mtx);
-	panic("shouldn't be here\n");
+	uma_zfree(aiop_zone, aiop);
+	free_unr(aiod_unr, id);
+	vmspace_free(myvm);
+
+	KASSERT(p->p_vmspace == myvm,
+	    ("AIOD: bad vmspace for exiting daemon"));
+	KASSERT(myvm->vm_refcnt > 1,
+	    ("AIOD: bad vm refcnt for exiting daemon: %d", myvm->vm_refcnt));
+	kproc_exit(0);
 }
 
 /*

Modified: head/sys/vm/vm_extern.h
==============================================================================
--- head/sys/vm/vm_extern.h	Tue Jan 19 21:35:09 2016	(r294343)
+++ head/sys/vm/vm_extern.h	Tue Jan 19 21:37:51 2016	(r294344)
@@ -106,6 +106,7 @@ void vmspace_exit(struct thread *);
 struct vmspace *vmspace_acquire_ref(struct proc *);
 void vmspace_free(struct vmspace *);
 void vmspace_exitfree(struct proc *);
+void vmspace_switch_aio(struct vmspace *);
 void vnode_pager_setsize(struct vnode *, vm_ooffset_t);
 int vslock(void *, size_t);
 void vsunlock(void *, size_t);

Modified: head/sys/vm/vm_map.c
==============================================================================
--- head/sys/vm/vm_map.c	Tue Jan 19 21:35:09 2016	(r294343)
+++ head/sys/vm/vm_map.c	Tue Jan 19 21:37:51 2016	(r294344)
@@ -451,6 +451,51 @@ vmspace_acquire_ref(struct proc *p)
 	return (vm);
 }
 
+/*
+ * Switch between vmspaces in an AIO kernel process.
+ *
+ * The AIO kernel processes switch to and from a user process's
+ * vmspace while performing an I/O operation on behalf of a user
+ * process.  The new vmspace is either the vmspace of a user process
+ * obtained from an active AIO request or the initial vmspace of the
+ * AIO kernel process (when it is idling).  Because user processes
+ * will block to drain any active AIO requests before proceeding in
+ * exit() or execve(), the vmspace reference count for these vmspaces
+ * can never be 0.  This allows for a much simpler implementation than
+ * the loop in vmspace_acquire_ref() above.  Similarly, AIO kernel
+ * processes hold an extra reference on their initial vmspace for the
+ * life of the process so that this guarantee is true for any vmspace
+ * passed as 'newvm'.
+ */
+void
+vmspace_switch_aio(struct vmspace *newvm)
+{
+	struct vmspace *oldvm;
+
+	/* XXX: Need some way to assert that this is an aio daemon. */
+
+	KASSERT(newvm->vm_refcnt > 0,
+	    ("vmspace_switch_aio: newvm unreferenced"));
+
+	oldvm = curproc->p_vmspace;
+	if (oldvm == newvm)
+		return;
+
+	/*
+	 * Point to the new address space and refer to it.
+	 */
+	curproc->p_vmspace = newvm;
+	atomic_add_int(&newvm->vm_refcnt, 1);
+
+	/* Activate the new mapping. */
+	pmap_activate(curthread);
+
+	/* Remove the daemon's reference to the old address space. */
+	KASSERT(oldvm->vm_refcnt > 1,
+	    ("vmspace_switch_aio: oldvm dropping last reference"));
+	vmspace_free(oldvm);
+}
+
 void
 _vm_map_lock(vm_map_t map, const char *file, int line)
 {

From owner-svn-src-all@freebsd.org  Tue Jan 19 21:39:23 2016
Return-Path: <owner-svn-src-all@freebsd.org>
Delivered-To: svn-src-all@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id 424BCA88D48;
 Tue, 19 Jan 2016 21:39:23 +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 EF26F12B3;
 Tue, 19 Jan 2016 21:39:22 +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 u0JLdLig044323;
 Tue, 19 Jan 2016 21:39:21 GMT (envelope-from ian@FreeBSD.org)
Received: (from ian@localhost)
 by repo.freebsd.org (8.15.2/8.15.2/Submit) id u0JLdLip044322;
 Tue, 19 Jan 2016 21:39:21 GMT (envelope-from ian@FreeBSD.org)
Message-Id: <201601192139.u0JLdLip044322@repo.freebsd.org>
X-Authentication-Warning: repo.freebsd.org: ian set sender to ian@FreeBSD.org
 using -f
From: Ian Lepore <ian@FreeBSD.org>
Date: Tue, 19 Jan 2016 21:39:21 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org
Subject: svn commit: r294345 - stable/10/sys/boot/efi/loader
X-SVN-Group: stable-10
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.20
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for &quot;
 user&quot; and &quot; projects&quot; \)" <svn-src-all.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-all/>
List-Post: <mailto:svn-src-all@freebsd.org>
List-Help: <mailto:svn-src-all-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Tue, 19 Jan 2016 21:39:23 -0000

Author: ian
Date: Tue Jan 19 21:39:21 2016
New Revision: 294345
URL: https://svnweb.freebsd.org/changeset/base/294345

Log:
  MFC r292584:
  
    Set env vars from values on the efi loader command line.
  
    Examine each cmdline arg and if it contains an '=' convert it to ascii and
    pass it to putenv(). This allows var=value settings to come in on the
    command line.
  
    This will allow overriding dhcp server-provided data in loader(8), as
    discussed in PR 202098
  
  PR:           202098
  Relnotes:	Yes (this goes together with r294343)

Modified:
  stable/10/sys/boot/efi/loader/main.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/sys/boot/efi/loader/main.c
==============================================================================
--- stable/10/sys/boot/efi/loader/main.c	Tue Jan 19 21:37:51 2016	(r294344)
+++ stable/10/sys/boot/efi/loader/main.c	Tue Jan 19 21:39:21 2016	(r294345)
@@ -63,10 +63,10 @@ EFI_GUID debugimg = DEBUG_IMAGE_INFO_TAB
 EFI_STATUS
 main(int argc, CHAR16 *argv[])
 {
-	char vendor[128];
+	char var[128];
 	EFI_LOADED_IMAGE *img;
 	EFI_GUID *guid;
-	int i;
+	int i, j, vargood;
 
 	/*
 	 * XXX Chicken-and-egg problem; we want to have console output
@@ -76,6 +76,29 @@ main(int argc, CHAR16 *argv[])
 	 */
 	cons_probe();
 
+	/*
+	 * Loop through the args, and for each one that contains an '=' that is
+	 * not the first character, add it to the environment.  This allows
+	 * loader and kernel env vars to be passed on the command line.  Convert
+	 * args from UCS-2 to ASCII (16 to 8 bit) as they are copied.
+	 */
+	for (i = 1; i < argc; i++) {
+		vargood = 0;
+		for (j = 0; argv[i][j] != 0; j++) {
+			if (j == sizeof(var)) {
+				vargood = 0;
+				break;
+			}
+			if (j > 0 && argv[i][j] == '=')
+				vargood = 1;
+			var[j] = (char)argv[i][j];
+		}
+		if (vargood) {
+			var[j] = 0;
+			putenv(var);
+		}
+	}
+
 	if (efi_copy_init()) {
 		printf("failed to allocate staging area\n");
 		return (EFI_BUFFER_TOO_SMALL);

From owner-svn-src-all@freebsd.org  Tue Jan 19 21:42:20 2016
Return-Path: <owner-svn-src-all@freebsd.org>
Delivered-To: svn-src-all@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6FDAAA88E59;
 Tue, 19 Jan 2016 21:42:20 +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 3E59C185B;
 Tue, 19 Jan 2016 21:42:20 +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 u0JLgJFO046963;
 Tue, 19 Jan 2016 21:42:19 GMT (envelope-from ian@FreeBSD.org)
Received: (from ian@localhost)
 by repo.freebsd.org (8.15.2/8.15.2/Submit) id u0JLgJ0Z046962;
 Tue, 19 Jan 2016 21:42:19 GMT (envelope-from ian@FreeBSD.org)
Message-Id: <201601192142.u0JLgJ0Z046962@repo.freebsd.org>
X-Authentication-Warning: repo.freebsd.org: ian set sender to ian@FreeBSD.org
 using -f
From: Ian Lepore <ian@FreeBSD.org>
Date: Tue, 19 Jan 2016 21:42:19 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org
Subject: svn commit: r294346 - stable/10/sys/boot/uboot/common
X-SVN-Group: stable-10
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.20
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for &quot;
 user&quot; and &quot; projects&quot; \)" <svn-src-all.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-all/>
List-Post: <mailto:svn-src-all@freebsd.org>
List-Help: <mailto:svn-src-all-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Tue, 19 Jan 2016 21:42:20 -0000

Author: ian
Date: Tue Jan 19 21:42:19 2016
New Revision: 294346
URL: https://svnweb.freebsd.org/changeset/base/294346

Log:
  MFC r292888:
  
    Fix the error checking for the ubenv command.  This moves the check for an
    empty ldvar (which amounts to the varname string starting with '=') into
    the if block that manipulates ldvar, which avoids later referencing ldvar
    when it was never initialized.

Modified:
  stable/10/sys/boot/uboot/common/main.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/sys/boot/uboot/common/main.c
==============================================================================
--- stable/10/sys/boot/uboot/common/main.c	Tue Jan 19 21:39:21 2016	(r294345)
+++ stable/10/sys/boot/uboot/common/main.c	Tue Jan 19 21:42:19 2016	(r294346)
@@ -585,6 +585,10 @@ handle_uboot_env_var(enum ubenv_action a
 	 */
 	if (action == UBENV_IMPORT) { 
 		len = strcspn(var, "=");
+		if (len == 0) {
+			printf("name cannot start with '=': '%s'\n", var);
+			return;
+		}
 		if (var[len] == 0) {
 			strcpy(ldvar, "uboot.");
 			strncat(ldvar, var, sizeof(ldvar) - 7);
@@ -604,9 +608,11 @@ handle_uboot_env_var(enum ubenv_action a
 		var = &var[6];
 	}
 
-	/* If ldvar is malformed or there's no variable name left, punt. */
-	if (ldvar[0] == 0 || var[0] == 0)
+	/* If there is no variable name left, punt. */
+	if (var[0] == 0) {
+		printf("empty variable name\n");
 		return;
+	}
 
 	val = ub_env_get(var);
 	if (action == UBENV_SHOW) {

From owner-svn-src-all@freebsd.org  Tue Jan 19 22:07:26 2016
Return-Path: <owner-svn-src-all@freebsd.org>
Delivered-To: svn-src-all@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id DE524A897E2;
 Tue, 19 Jan 2016 22:07:26 +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 BF4141286;
 Tue, 19 Jan 2016 22:07:26 +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 54853B93C;
 Tue, 19 Jan 2016 17:07:25 -0500 (EST)
From: John Baldwin <jhb@freebsd.org>
To: Dag-Erling =?ISO-8859-1?Q?Sm=F8rgrav?= <des@freebsd.org>
Cc: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-head@freebsd.org
Subject: Re: svn commit: r294332 - in head: crypto/openssh
 crypto/openssh/contrib crypto/openssh/contrib/caldera
 crypto/openssh/contrib/cygwin crypto/openssh/contrib/redhat
 crypto/openssh/contrib/suse crypto/op...
Date: Tue, 19 Jan 2016 14:07:20 -0800
Message-ID: <1547455.kXYNJo7ADU@ralph.baldwin.cx>
User-Agent: KMail/4.14.3 (FreeBSD/10.2-STABLE; KDE/4.14.3; amd64; ; )
In-Reply-To: <201601191828.u0JISNSG087681@repo.freebsd.org>
References: <201601191828.u0JISNSG087681@repo.freebsd.org>
MIME-Version: 1.0
Content-Transfer-Encoding: quoted-printable
Content-Type: text/plain; charset="iso-8859-1"
X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7
 (bigwig.baldwin.cx); Tue, 19 Jan 2016 17:07:25 -0500 (EST)
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.20
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for &quot;
 user&quot; and &quot; projects&quot; \)" <svn-src-all.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-all/>
List-Post: <mailto:svn-src-all@freebsd.org>
List-Help: <mailto:svn-src-all-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Tue, 19 Jan 2016 22:07:27 -0000

On Tuesday, January 19, 2016 06:28:23 PM Dag-Erling Sm=F8rgrav wrote:
> Author: des
> Date: Tue Jan 19 18:28:23 2016
> New Revision: 294332
> URL: https://svnweb.freebsd.org/changeset/base/294332
>=20
> Log:
>   Upgrade to OpenSSH 6.8p1.

This broke the build of pam_ssh.  I am currently build testing an attem=
pt
at fixing:

diff --git lib/libpam/modules/pam_ssh/pam_ssh.c lib/libpam/modules/pam_=
ssh/pam_ssh.c
index 405dd6b..f2ad6cf 100644
--- lib/libpam/modules/pam_ssh/pam_ssh.c
+++ lib/libpam/modules/pam_ssh/pam_ssh.c
@@ -321,12 +321,11 @@ pam_ssh_start_agent(pam_handle_t *pamh)
 static int
 pam_ssh_add_keys_to_agent(pam_handle_t *pamh)
 {
-=09AuthenticationConnection *ac;
 =09const struct pam_ssh_key *psk;
 =09const char **kfn;
 =09const void *item;
 =09char **envlist, **env;
-=09int pam_err;
+=09int fd, pam_err;
=20
 =09/* switch to PAM environment */
 =09envlist =3D environ;
@@ -336,7 +335,7 @@ pam_ssh_add_keys_to_agent(pam_handle_t *pamh)
 =09}
=20
 =09/* get a connection to the agent */
-=09if ((ac =3D ssh_get_authentication_connection()) =3D=3D NULL) {
+=09if (ssh_get_authentication_socket(&fd) !=3D 0) {
 =09=09openpam_log(PAM_LOG_DEBUG, "failed to connect to the agent");
 =09=09pam_err =3D PAM_SYSTEM_ERR;
 =09=09goto end;
@@ -347,7 +346,7 @@ pam_ssh_add_keys_to_agent(pam_handle_t *pamh)
 =09=09pam_err =3D pam_get_data(pamh, *kfn, &item);
 =09=09if (pam_err =3D=3D PAM_SUCCESS && item !=3D NULL) {
 =09=09=09psk =3D item;
-=09=09=09if (ssh_add_identity(ac, psk->key, psk->comment))
+=09=09=09if (ssh_add_identity(fd, psk->key, psk->comment) =3D=3D 0)
 =09=09=09=09openpam_log(PAM_LOG_DEBUG,
 =09=09=09=09    "added %s to ssh agent", psk->comment);
 =09=09=09else
@@ -360,8 +359,8 @@ pam_ssh_add_keys_to_agent(pam_handle_t *pamh)
 =09pam_err =3D PAM_SUCCESS;
  end:
 =09/* disconnect from agent */
-=09if (ac !=3D NULL)
-=09=09ssh_close_authentication_connection(ac);
+=09if (fd !=3D -1)
+=09=09ssh_close_authentication_connection(fd);
=20
 =09/* switch back to original environment */
 =09for (env =3D environ; *env !=3D NULL; ++env)

--=20
John Baldwin

From owner-svn-src-all@freebsd.org  Tue Jan 19 22:07:41 2016
Return-Path: <owner-svn-src-all@freebsd.org>
Delivered-To: svn-src-all@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id 30CA9A89818;
 Tue, 19 Jan 2016 22:07:41 +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 00D6213CD;
 Tue, 19 Jan 2016 22:07:40 +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 u0JM7dW5053204;
 Tue, 19 Jan 2016 22:07:39 GMT (envelope-from asomers@FreeBSD.org)
Received: (from asomers@localhost)
 by repo.freebsd.org (8.15.2/8.15.2/Submit) id u0JM7deA053203;
 Tue, 19 Jan 2016 22:07:39 GMT (envelope-from asomers@FreeBSD.org)
Message-Id: <201601192207.u0JM7deA053203@repo.freebsd.org>
X-Authentication-Warning: repo.freebsd.org: asomers set sender to
 asomers@FreeBSD.org using -f
From: Alan Somers <asomers@FreeBSD.org>
Date: Tue, 19 Jan 2016 22:07:39 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-head@freebsd.org
Subject: svn commit: r294347 - head/usr.bin/truncate/tests
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.20
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for &quot;
 user&quot; and &quot; projects&quot; \)" <svn-src-all.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-all/>
List-Post: <mailto:svn-src-all@freebsd.org>
List-Help: <mailto:svn-src-all-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Tue, 19 Jan 2016 22:07:41 -0000

Author: asomers
Date: Tue Jan 19 22:07:39 2016
New Revision: 294347
URL: https://svnweb.freebsd.org/changeset/base/294347

Log:
  Fix usr.bin.truncate.truncate_test.bad_truncate with ZFS /tmp.
  
  The bad_truncate test sets the uimmutable flag to produce an error in
  truncate, but that flag isn't supported by ZFS.  If /tmp is on a ZFS
  filesystem, the test will fail.  Change it to use readonly permissions and
  an unpriveleged user instead.
  
  Reviewed by:	jilles
  MFC after:	1 week
  Sponsored by:	Spectra Logic Corp
  Differential Revision:	https://reviews.freebsd.org/D4862

Modified:
  head/usr.bin/truncate/tests/truncate_test.sh

Modified: head/usr.bin/truncate/tests/truncate_test.sh
==============================================================================
--- head/usr.bin/truncate/tests/truncate_test.sh	Tue Jan 19 21:42:19 2016	(r294346)
+++ head/usr.bin/truncate/tests/truncate_test.sh	Tue Jan 19 22:07:39 2016	(r294347)
@@ -173,26 +173,23 @@ bad_refer_body()
 	[ ! -e afile ] || atf_fail "afile should not exist"
 }
 
-atf_test_case bad_truncate cleanup
+atf_test_case bad_truncate
 bad_truncate_head()
 {
 	atf_set "descr" "Verifies that truncate reports an error during" \
 	    "truncation"
+	atf_set "require.user" "unprivileged"
 }
 bad_truncate_body()
 {
-	create_stderr_file "truncate: exists.txt: Operation not permitted"
+	create_stderr_file "truncate: exists.txt: Permission denied"
 
 	# Trying to get the ftruncate() call to return -1.
 	> exists.txt
-	atf_check chflags uimmutable exists.txt
+	atf_check chmod 444 exists.txt
 
 	atf_check -s not-exit:0 -e file:stderr.txt truncate -s1 exists.txt
 }
-bad_truncate_cleanup()
-{
-	chflags 0 exists.txt
-}
 
 atf_test_case new_absolute_grow
 new_absolute_grow_head()

From owner-svn-src-all@freebsd.org  Tue Jan 19 22:41:28 2016
Return-Path: <owner-svn-src-all@freebsd.org>
Delivered-To: svn-src-all@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id F3E1AA871BA;
 Tue, 19 Jan 2016 22:41:27 +0000 (UTC)
 (envelope-from jilles@FreeBSD.org)
Received: from repo.freebsd.org (repo.freebsd.org
 [IPv6:2610:1c1:1:6068::e6a:0])
 (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
 (Client did not present a certificate)
 by mx1.freebsd.org (Postfix) with ESMTPS id B36171299;
 Tue, 19 Jan 2016 22:41:27 +0000 (UTC)
 (envelope-from jilles@FreeBSD.org)
Received: from repo.freebsd.org ([127.0.1.37])
 by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u0JMfQvw064337;
 Tue, 19 Jan 2016 22:41:26 GMT (envelope-from jilles@FreeBSD.org)
Received: (from jilles@localhost)
 by repo.freebsd.org (8.15.2/8.15.2/Submit) id u0JMfQK4064335;
 Tue, 19 Jan 2016 22:41:26 GMT (envelope-from jilles@FreeBSD.org)
Message-Id: <201601192241.u0JMfQK4064335@repo.freebsd.org>
X-Authentication-Warning: repo.freebsd.org: jilles set sender to
 jilles@FreeBSD.org using -f
From: Jilles Tjoelker <jilles@FreeBSD.org>
Date: Tue, 19 Jan 2016 22:41:26 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-head@freebsd.org
Subject: svn commit: r294348 - head/bin/sh
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.20
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for &quot;
 user&quot; and &quot; projects&quot; \)" <svn-src-all.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-all/>
List-Post: <mailto:svn-src-all@freebsd.org>
List-Help: <mailto:svn-src-all-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Tue, 19 Jan 2016 22:41:28 -0000

Author: jilles
Date: Tue Jan 19 22:41:26 2016
New Revision: 294348
URL: https://svnweb.freebsd.org/changeset/base/294348

Log:
  sh: Simplify some code related to positional parameters.

Modified:
  head/bin/sh/options.c
  head/bin/sh/options.h

Modified: head/bin/sh/options.c
==============================================================================
--- head/bin/sh/options.c	Tue Jan 19 22:07:39 2016	(r294347)
+++ head/bin/sh/options.c	Tue Jan 19 22:41:26 2016	(r294348)
@@ -74,6 +74,7 @@ static void options(int);
 static void minus_o(char *, int);
 static void setoption(int, int);
 static void setoptionbyindex(int, int);
+static void setparam(int, char **);
 static int getopts(char *, char *, char **, char ***, char **);
 
 
@@ -224,7 +225,7 @@ end_options1:
 end_options2:
 	if (!cmdline) {
 		if (*argptr == NULL)
-			setparam(argptr);
+			setparam(0, argptr);
 		return;
 	}
 
@@ -318,22 +319,20 @@ setoption(int flag, int val)
  * Set the shell parameters.
  */
 
-void
-setparam(char **argv)
+static void
+setparam(int argc, char **argv)
 {
 	char **newparam;
 	char **ap;
-	int nparam;
 
-	for (nparam = 0 ; argv[nparam] ; nparam++);
-	ap = newparam = ckmalloc((nparam + 1) * sizeof *ap);
+	ap = newparam = ckmalloc((argc + 1) * sizeof *ap);
 	while (*argv) {
 		*ap++ = savestr(*argv++);
 	}
 	*ap = NULL;
 	freeparam(&shellparam);
 	shellparam.malloc = 1;
-	shellparam.nparam = nparam;
+	shellparam.nparam = argc;
 	shellparam.p = newparam;
 	shellparam.optp = NULL;
 	shellparam.reset = 1;
@@ -371,8 +370,7 @@ freeparam(struct shparam *param)
 int
 shiftcmd(int argc, char **argv)
 {
-	int n;
-	char **ap1, **ap2;
+	int i, n;
 
 	n = 1;
 	if (argc > 1)
@@ -381,12 +379,11 @@ shiftcmd(int argc, char **argv)
 		return 1;
 	INTOFF;
 	shellparam.nparam -= n;
-	for (ap1 = shellparam.p ; --n >= 0 ; ap1++) {
-		if (shellparam.malloc)
-			ckfree(*ap1);
-	}
-	ap2 = shellparam.p;
-	while ((*ap2++ = *ap1++) != NULL);
+	if (shellparam.malloc)
+		for (i = 0; i < n; i++)
+			ckfree(shellparam.p[i]);
+	memmove(shellparam.p, shellparam.p + n,
+	    (shellparam.nparam + 1) * sizeof(shellparam.p[0]));
 	shellparam.reset = 1;
 	INTON;
 	return 0;
@@ -407,7 +404,7 @@ setcmd(int argc, char **argv)
 	options(0);
 	optschanged();
 	if (*argptr != NULL) {
-		setparam(argptr);
+		setparam(argc - (argptr - argv), argptr);
 	}
 	INTON;
 	return 0;

Modified: head/bin/sh/options.h
==============================================================================
--- head/bin/sh/options.h	Tue Jan 19 22:07:39 2016	(r294347)
+++ head/bin/sh/options.h	Tue Jan 19 22:41:26 2016	(r294348)
@@ -108,7 +108,6 @@ extern char *nextopt_optptr;	/* used by 
 
 void procargs(int, char **);
 void optschanged(void);
-void setparam(char **);
 void freeparam(struct shparam *);
 int nextopt(const char *);
 void getoptsreset(const char *);

From owner-svn-src-all@freebsd.org  Tue Jan 19 22:41:46 2016
Return-Path: <owner-svn-src-all@freebsd.org>
Delivered-To: svn-src-all@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id B7C60A87209;
 Tue, 19 Jan 2016 22:41:46 +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 6E6ED152D;
 Tue, 19 Jan 2016 22:41:46 +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 u0JMfjPp064405;
 Tue, 19 Jan 2016 22:41:45 GMT (envelope-from bdrewery@FreeBSD.org)
Received: (from bdrewery@localhost)
 by repo.freebsd.org (8.15.2/8.15.2/Submit) id u0JMfj03064401;
 Tue, 19 Jan 2016 22:41:45 GMT (envelope-from bdrewery@FreeBSD.org)
Message-Id: <201601192241.u0JMfj03064401@repo.freebsd.org>
X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to
 bdrewery@FreeBSD.org using -f
From: Bryan Drewery <bdrewery@FreeBSD.org>
Date: Tue, 19 Jan 2016 22:41:45 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-head@freebsd.org
Subject: svn commit: r294349 - head/share/mk
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.20
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for &quot;
 user&quot; and &quot; projects&quot; \)" <svn-src-all.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-all/>
List-Post: <mailto:svn-src-all@freebsd.org>
List-Help: <mailto:svn-src-all-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Tue, 19 Jan 2016 22:41:46 -0000

Author: bdrewery
Date: Tue Jan 19 22:41:44 2016
New Revision: 294349
URL: https://svnweb.freebsd.org/changeset/base/294349

Log:
  Define .MAKE.MODE to normal to avoid the need for :U later.
  
  Sponsored by:	EMC / Isilon Storage Division

Modified:
  head/share/mk/bsd.dep.mk
  head/share/mk/local.init.mk
  head/share/mk/local.sys.mk
  head/share/mk/sys.mk

Modified: head/share/mk/bsd.dep.mk
==============================================================================
--- head/share/mk/bsd.dep.mk	Tue Jan 19 22:41:26 2016	(r294348)
+++ head/share/mk/bsd.dep.mk	Tue Jan 19 22:41:44 2016	(r294349)
@@ -150,7 +150,7 @@ beforedepend: ${DHDRS}
 beforebuild: ${DHDRS}
 
 
-.if ${MK_FAST_DEPEND} == "yes" && ${.MAKE.MODE:Unormal:Mmeta*} == ""
+.if ${MK_FAST_DEPEND} == "yes" && ${.MAKE.MODE:Mmeta*} == ""
 DEPENDFILES+=	${DEPENDFILE}.*
 DEPEND_MP?=	-MP
 # Handle OBJS=../somefile.o hacks.  Just replace '/' rather than use :T to

Modified: head/share/mk/local.init.mk
==============================================================================
--- head/share/mk/local.init.mk	Tue Jan 19 22:41:26 2016	(r294348)
+++ head/share/mk/local.init.mk	Tue Jan 19 22:41:44 2016	(r294349)
@@ -1,6 +1,6 @@
 # $FreeBSD$
 
-.if ${.MAKE.MODE:Unormal:Mmeta*} != ""
+.if ${.MAKE.MODE:Mmeta*} != ""
 .if !empty(SUBDIR) && !defined(LIB) && !defined(PROG) && ${.MAKE.MAKEFILES:M*bsd.prog.mk} == ""
 .if ${.MAKE.MODE:Mleaf*} != ""
 # we only want leaf dirs to build in meta mode... and we are not one

Modified: head/share/mk/local.sys.mk
==============================================================================
--- head/share/mk/local.sys.mk	Tue Jan 19 22:41:26 2016	(r294348)
+++ head/share/mk/local.sys.mk	Tue Jan 19 22:41:44 2016	(r294349)
@@ -25,7 +25,7 @@ MAKE_PRINT_VAR_ON_ERROR += .MAKE.MAKEFIL
 
 .include "src.sys.mk"
 
-.if ${.MAKE.MODE:Unormal:Mmeta*} != ""
+.if ${.MAKE.MODE:Mmeta*} != ""
 # we can afford to use cookies to prevent some targets
 # re-running needlessly
 META_COOKIE_TOUCH= touch ${COOKIE.${.TARGET}:U${.OBJDIR}/${.TARGET}}

Modified: head/share/mk/sys.mk
==============================================================================
--- head/share/mk/sys.mk	Tue Jan 19 22:41:26 2016	(r294348)
+++ head/share/mk/sys.mk	Tue Jan 19 22:41:44 2016	(r294349)
@@ -44,11 +44,11 @@ __ENV_ONLY_OPTIONS:= \
 
 .if ${MK_DIRDEPS_BUILD} == "yes"
 .sinclude <meta.sys.mk>
-.elif ${MK_META_MODE} == "yes" && defined(.MAKEFLAGS)
-.if ${.MAKEFLAGS:M-B} == ""
+.elif ${MK_META_MODE} == "yes" && defined(.MAKEFLAGS) && ${.MAKEFLAGS:M-B} == ""
 .MAKE.MODE= meta verbose
 .endif
-.endif
+.MAKE.MODE?= normal
+
 .if ${MK_AUTO_OBJ} == "yes"
 # This needs to be done early - before .PATH is computed
 # Don't do this for 'make showconfig' as it enables all options where meta mode

From owner-svn-src-all@freebsd.org  Tue Jan 19 22:41:56 2016
Return-Path: <owner-svn-src-all@freebsd.org>
Delivered-To: svn-src-all@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id 93F2DA87259;
 Tue, 19 Jan 2016 22:41:56 +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 63C4C177A;
 Tue, 19 Jan 2016 22:41:56 +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 u0JMftXg064463;
 Tue, 19 Jan 2016 22:41:55 GMT (envelope-from bdrewery@FreeBSD.org)
Received: (from bdrewery@localhost)
 by repo.freebsd.org (8.15.2/8.15.2/Submit) id u0JMft0F064462;
 Tue, 19 Jan 2016 22:41:55 GMT (envelope-from bdrewery@FreeBSD.org)
Message-Id: <201601192241.u0JMft0F064462@repo.freebsd.org>
X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to
 bdrewery@FreeBSD.org using -f
From: Bryan Drewery <bdrewery@FreeBSD.org>
Date: Tue, 19 Jan 2016 22:41:55 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-head@freebsd.org
Subject: svn commit: r294350 - head/share/mk
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.20
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for &quot;
 user&quot; and &quot; projects&quot; \)" <svn-src-all.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-all/>
List-Post: <mailto:svn-src-all@freebsd.org>
List-Help: <mailto:svn-src-all-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Tue, 19 Jan 2016 22:41:56 -0000

Author: bdrewery
Date: Tue Jan 19 22:41:55 2016
New Revision: 294350
URL: https://svnweb.freebsd.org/changeset/base/294350

Log:
  META_MODE: Ensure bmake does not use filemon if it is not loaded.
  
  Sponsored by:	EMC / Isilon Storage Division

Modified:
  head/share/mk/sys.mk

Modified: head/share/mk/sys.mk
==============================================================================
--- head/share/mk/sys.mk	Tue Jan 19 22:41:44 2016	(r294349)
+++ head/share/mk/sys.mk	Tue Jan 19 22:41:55 2016	(r294350)
@@ -46,6 +46,9 @@ __ENV_ONLY_OPTIONS:= \
 .sinclude <meta.sys.mk>
 .elif ${MK_META_MODE} == "yes" && defined(.MAKEFLAGS) && ${.MAKEFLAGS:M-B} == ""
 .MAKE.MODE= meta verbose
+.if !exists(/dev/filemon)
+.MAKE.MODE+= nofilemon
+.endif
 .endif
 .MAKE.MODE?= normal
 

From owner-svn-src-all@freebsd.org  Tue Jan 19 22:41:59 2016
Return-Path: <owner-svn-src-all@freebsd.org>
Delivered-To: svn-src-all@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7C41AA87276;
 Tue, 19 Jan 2016 22:41:59 +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 4EE8A1787;
 Tue, 19 Jan 2016 22:41:59 +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 u0JMfwuE064512;
 Tue, 19 Jan 2016 22:41:58 GMT (envelope-from bdrewery@FreeBSD.org)
Received: (from bdrewery@localhost)
 by repo.freebsd.org (8.15.2/8.15.2/Submit) id u0JMfwNk064511;
 Tue, 19 Jan 2016 22:41:58 GMT (envelope-from bdrewery@FreeBSD.org)
Message-Id: <201601192241.u0JMfwNk064511@repo.freebsd.org>
X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to
 bdrewery@FreeBSD.org using -f
From: Bryan Drewery <bdrewery@FreeBSD.org>
Date: Tue, 19 Jan 2016 22:41:58 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-head@freebsd.org
Subject: svn commit: r294351 - head/share/mk
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.20
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for &quot;
 user&quot; and &quot; projects&quot; \)" <svn-src-all.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-all/>
List-Post: <mailto:svn-src-all@freebsd.org>
List-Help: <mailto:svn-src-all-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Tue, 19 Jan 2016 22:41:59 -0000

Author: bdrewery
Date: Tue Jan 19 22:41:58 2016
New Revision: 294351
URL: https://svnweb.freebsd.org/changeset/base/294351

Log:
  FAST_DEPEND: Still use if filemon is not used.
  
  If filemon is used then there is no need to generate dependency files during
  compilation as the .meta files will achieve the same result.
  
  This is a temporary solution until FAST_DEPEND is default.  Once that is
  default there will be an option to disable dependency generation entirely
  as it is only useful if an incremental build is planned, thus META_MODE+filemon
  can enable that option to short-circuit all FAST_DEPEND-related logic.
  
  Sponsored by:	EMC / Isilon Storage Division

Modified:
  head/share/mk/bsd.dep.mk

Modified: head/share/mk/bsd.dep.mk
==============================================================================
--- head/share/mk/bsd.dep.mk	Tue Jan 19 22:41:55 2016	(r294350)
+++ head/share/mk/bsd.dep.mk	Tue Jan 19 22:41:58 2016	(r294351)
@@ -150,7 +150,8 @@ beforedepend: ${DHDRS}
 beforebuild: ${DHDRS}
 
 
-.if ${MK_FAST_DEPEND} == "yes" && ${.MAKE.MODE:Mmeta*} == ""
+.if ${MK_FAST_DEPEND} == "yes" && \
+    (${.MAKE.MODE:Mmeta} == "" || ${.MAKE.MODE:Mnofilemon} != "")
 DEPENDFILES+=	${DEPENDFILE}.*
 DEPEND_MP?=	-MP
 # Handle OBJS=../somefile.o hacks.  Just replace '/' rather than use :T to

From owner-svn-src-all@freebsd.org  Tue Jan 19 22:42:02 2016
Return-Path: <owner-svn-src-all@freebsd.org>
Delivered-To: svn-src-all@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id A6305A8729E;
 Tue, 19 Jan 2016 22:42:02 +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 68ECC187A;
 Tue, 19 Jan 2016 22:42:02 +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 u0JMg1oS064565;
 Tue, 19 Jan 2016 22:42:01 GMT (envelope-from bdrewery@FreeBSD.org)
Received: (from bdrewery@localhost)
 by repo.freebsd.org (8.15.2/8.15.2/Submit) id u0JMg13h064564;
 Tue, 19 Jan 2016 22:42:01 GMT (envelope-from bdrewery@FreeBSD.org)
Message-Id: <201601192242.u0JMg13h064564@repo.freebsd.org>
X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to
 bdrewery@FreeBSD.org using -f
From: Bryan Drewery <bdrewery@FreeBSD.org>
Date: Tue, 19 Jan 2016 22:42:01 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-head@freebsd.org
Subject: svn commit: r294352 - head/sys/conf
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.20
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for &quot;
 user&quot; and &quot; projects&quot; \)" <svn-src-all.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-all/>
List-Post: <mailto:svn-src-all@freebsd.org>
List-Help: <mailto:svn-src-all-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Tue, 19 Jan 2016 22:42:02 -0000

Author: bdrewery
Date: Tue Jan 19 22:42:01 2016
New Revision: 294352
URL: https://svnweb.freebsd.org/changeset/base/294352

Log:
  FAST_DEPEND: Add header dependency missed in r290629.
  
  Sponsored by:	EMC / Isilon Storage Division

Modified:
  head/sys/conf/kmod.mk

Modified: head/sys/conf/kmod.mk
==============================================================================
--- head/sys/conf/kmod.mk	Tue Jan 19 22:41:58 2016	(r294351)
+++ head/sys/conf/kmod.mk	Tue Jan 19 22:42:01 2016	(r294352)
@@ -456,7 +456,7 @@ cleandepend: cleanilinks
 cleanilinks:
 	rm -f ${_ILINKS}
 
-.if !exists(${.OBJDIR}/${DEPENDFILE})
+.if ${MK_FAST_DEPEND} == "yes" || !exists(${.OBJDIR}/${DEPENDFILE})
 ${OBJS}: ${SRCS:M*.h}
 .endif
 

From owner-svn-src-all@freebsd.org  Tue Jan 19 22:42:05 2016
Return-Path: <owner-svn-src-all@freebsd.org>
Delivered-To: svn-src-all@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9D84EA872C7;
 Tue, 19 Jan 2016 22:42: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 665991A36;
 Tue, 19 Jan 2016 22:42:05 +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 u0JMg42p064613;
 Tue, 19 Jan 2016 22:42:04 GMT (envelope-from bdrewery@FreeBSD.org)
Received: (from bdrewery@localhost)
 by repo.freebsd.org (8.15.2/8.15.2/Submit) id u0JMg4HX064612;
 Tue, 19 Jan 2016 22:42:04 GMT (envelope-from bdrewery@FreeBSD.org)
Message-Id: <201601192242.u0JMg4HX064612@repo.freebsd.org>
X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to
 bdrewery@FreeBSD.org using -f
From: Bryan Drewery <bdrewery@FreeBSD.org>
Date: Tue, 19 Jan 2016 22:42:04 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-head@freebsd.org
Subject: svn commit: r294353 - head/share/mk
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.20
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for &quot;
 user&quot; and &quot; projects&quot; \)" <svn-src-all.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-all/>
List-Post: <mailto:svn-src-all@freebsd.org>
List-Help: <mailto:svn-src-all-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Tue, 19 Jan 2016 22:42:05 -0000

Author: bdrewery
Date: Tue Jan 19 22:42:04 2016
New Revision: 294353
URL: https://svnweb.freebsd.org/changeset/base/294353

Log:
  installconfig is PARALLEL_SUBDIR safe.
  
  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	Tue Jan 19 22:42:01 2016	(r294352)
+++ head/share/mk/bsd.subdir.mk	Tue Jan 19 22:42:04 2016	(r294353)
@@ -45,7 +45,7 @@ ALL_SUBDIR_TARGETS= all all-man buildcon
 
 # Described above.
 STANDALONE_SUBDIR_TARGETS?= obj checkdpadd clean cleandepend cleandir \
-			    cleanilinks cleanobj
+			    cleanilinks cleanobj installconfig
 
 .include <bsd.init.mk>
 

From owner-svn-src-all@freebsd.org  Tue Jan 19 22:42:11 2016
Return-Path: <owner-svn-src-all@freebsd.org>
Delivered-To: svn-src-all@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id CE341A8731B;
 Tue, 19 Jan 2016 22:42: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 4F1E41C6E;
 Tue, 19 Jan 2016 22:42:11 +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 u0JMgAX0064710;
 Tue, 19 Jan 2016 22:42:10 GMT (envelope-from bdrewery@FreeBSD.org)
Received: (from bdrewery@localhost)
 by repo.freebsd.org (8.15.2/8.15.2/Submit) id u0JMgACq064709;
 Tue, 19 Jan 2016 22:42:10 GMT (envelope-from bdrewery@FreeBSD.org)
Message-Id: <201601192242.u0JMgACq064709@repo.freebsd.org>
X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to
 bdrewery@FreeBSD.org using -f
From: Bryan Drewery <bdrewery@FreeBSD.org>
Date: Tue, 19 Jan 2016 22:42:10 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-head@freebsd.org
Subject: svn commit: r294355 - head/tools/build
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.20
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for &quot;
 user&quot; and &quot; projects&quot; \)" <svn-src-all.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-all/>
List-Post: <mailto:svn-src-all@freebsd.org>
List-Help: <mailto:svn-src-all-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Tue, 19 Jan 2016 22:42:11 -0000

Author: bdrewery
Date: Tue Jan 19 22:42:10 2016
New Revision: 294355
URL: https://svnweb.freebsd.org/changeset/base/294355

Log:
  Validate that the file exists rather than obscure 'Not an elf file' error.
  
  Sponsored by:	EMC / Isilon Storage Division

Modified:
  head/tools/build/check-links.sh

Modified: head/tools/build/check-links.sh
==============================================================================
--- head/tools/build/check-links.sh	Tue Jan 19 22:42:07 2016	(r294354)
+++ head/tools/build/check-links.sh	Tue Jan 19 22:42:10 2016	(r294355)
@@ -29,6 +29,11 @@ while getopts "Uv" flag; do
 done
 shift $((OPTIND-1))
 
+if ! [ -f "$1" ]; then
+	echo "No such file or directory: $1" >&2
+	exit 1
+fi
+
 mime=$(file -L --mime-type $1)
 isbin=0
 case $mime in

From owner-svn-src-all@freebsd.org  Tue Jan 19 22:42:17 2016
Return-Path: <owner-svn-src-all@freebsd.org>
Delivered-To: svn-src-all@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9FF0DA8744B;
 Tue, 19 Jan 2016 22:42:17 +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 4E32C1E80;
 Tue, 19 Jan 2016 22:42:17 +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 u0JMgGjY065420;
 Tue, 19 Jan 2016 22:42:16 GMT (envelope-from bdrewery@FreeBSD.org)
Received: (from bdrewery@localhost)
 by repo.freebsd.org (8.15.2/8.15.2/Submit) id u0JMgGGX065419;
 Tue, 19 Jan 2016 22:42:16 GMT (envelope-from bdrewery@FreeBSD.org)
Message-Id: <201601192242.u0JMgGGX065419@repo.freebsd.org>
X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to
 bdrewery@FreeBSD.org using -f
From: Bryan Drewery <bdrewery@FreeBSD.org>
Date: Tue, 19 Jan 2016 22:42:16 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-head@freebsd.org
Subject: svn commit: r294357 - head/tools/build
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.20
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for &quot;
 user&quot; and &quot; projects&quot; \)" <svn-src-all.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-all/>
List-Post: <mailto:svn-src-all@freebsd.org>
List-Help: <mailto:svn-src-all-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Tue, 19 Jan 2016 22:42:17 -0000

Author: bdrewery
Date: Tue Jan 19 22:42:16 2016
New Revision: 294357
URL: https://svnweb.freebsd.org/changeset/base/294357

Log:
  Allow specifying an alternative LD_LIBRARY_PATH for the ldd(1) lookup.
  
  This is needed to be able to run check-links.sh against a "sysrooted"
  binary while ensuring that the ldd(1) call done on the host uses the
  host libc.  It is not possible to set LD_LIBRARY_PATH before calling
  check-links.sh as then the "sysrooted" libc would be incorrectly used.
  
  A LD_PRELOAD=libc.so is used to ldd(1) as it needs to use the host libc
  to run.  ldd(1) is a simple wrapper around execve(2) and dlopen(2) with
  env LD_TRACE_LOADED_OBJECTS set.  Due to the dlopen(2) restriction on
  shared library tracing ldd(1) is still required for this lookup.
  
  Sponsored by:	EMC / Isilon Storage Division

Modified:
  head/tools/build/check-links.sh

Modified: head/tools/build/check-links.sh
==============================================================================
--- head/tools/build/check-links.sh	Tue Jan 19 22:42:13 2016	(r294356)
+++ head/tools/build/check-links.sh	Tue Jan 19 22:42:16 2016	(r294357)
@@ -20,7 +20,8 @@ libkey() {
 
 usage() {
 	cat <<-EOF
-	usage: $0 [-Uv] file
+	usage: $0 [-Uv] [-L LD_LIBRARY_PATH] file
+	       -L:       Specify an alternative LD_LIBRARY_PATH for the library resolution.
 	       -U:       Skip looking for unresolved symbols.
 	       -v:       Show which library each symbol is resolved to.
 	EOF
@@ -30,8 +31,9 @@ usage() {
 ret=0
 CHECK_UNRESOLVED=1
 VERBOSE_RESOLVED=0
-while getopts "Uv" flag; do
+while getopts "L:Uv" flag; do
 	case "${flag}" in
+		L) LIB_PATH="${OPTARG}" ;;
 		U) CHECK_UNRESOLVED=0 ;;
 		v) VERBOSE_RESOLVED=1 ;;
 		*) usage ;;
@@ -55,7 +57,14 @@ esac
 # Gather all symbols from the target
 unresolved_symbols=$(nm -u -D --format=posix "$1" | awk '$2 == "U" {print $1}' | tr '\n' ' ')
 [ ${isbin} -eq 1 ] && bss_symbols=$(nm -D --format=posix "$1" | awk '$2 == "B" && $4 != "" {print $1}' | tr '\n' ' ')
-ldd_libs=$(ldd $(realpath $1) | awk '{print $1 ":" $3}')
+if [ -n "${LIB_PATH}" ]; then
+	for libc in /lib/libc.so.*; do
+		LDD_ENV="LD_PRELOAD=${libc}"
+	done
+	LDD_ENV="${LDD_ENV} LD_LIBRARY_PATH=${LIB_PATH}"
+fi
+
+ldd_libs=$(env ${LDD_ENV} ldd $(realpath $1) | awk '{print $1 ":" $3}')
 
 # Check for useful libs
 list_libs=

From owner-svn-src-all@freebsd.org  Tue Jan 19 22:42:08 2016
Return-Path: <owner-svn-src-all@freebsd.org>
Delivered-To: svn-src-all@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id 852AAA872E2;
 Tue, 19 Jan 2016 22:42: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 600701B2B;
 Tue, 19 Jan 2016 22:42:08 +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 u0JMg7RI064663;
 Tue, 19 Jan 2016 22:42:07 GMT (envelope-from bdrewery@FreeBSD.org)
Received: (from bdrewery@localhost)
 by repo.freebsd.org (8.15.2/8.15.2/Submit) id u0JMg78k064662;
 Tue, 19 Jan 2016 22:42:07 GMT (envelope-from bdrewery@FreeBSD.org)
Message-Id: <201601192242.u0JMg78k064662@repo.freebsd.org>
X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to
 bdrewery@FreeBSD.org using -f
From: Bryan Drewery <bdrewery@FreeBSD.org>
Date: Tue, 19 Jan 2016 22:42:07 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-head@freebsd.org
Subject: svn commit: r294354 - head/share/mk
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.20
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for &quot;
 user&quot; and &quot; projects&quot; \)" <svn-src-all.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-all/>
List-Post: <mailto:svn-src-all@freebsd.org>
List-Help: <mailto:svn-src-all-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Tue, 19 Jan 2016 22:42:08 -0000

Author: bdrewery
Date: Tue Jan 19 22:42:07 2016
New Revision: 294354
URL: https://svnweb.freebsd.org/changeset/base/294354

Log:
  bsd.subdir.mk: Allow easier modification of [STANDALONE_]SUBDIR_TARGETS.
  
  This reworks r289254 and removes ALL_SUBDIR_TARGETS.
  
  Because there is an include guard in this file there is no need for
  LOCAL_ or ?= on SUBDIR_TARGETS or STANDALONE_SUBDIR_TARGETS.  These can
  just be set via src.conf.  By the time bsd.subdir.mk is included it will
  just append the values to the existing value and work fine.  This allows
  a consistent way to append to these variables without introducing a
  LOCAL_ var for STANDALONE_SUBDIR_TARGETS or renaming the historical
  SUBDIR_TARGETS.
  
  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	Tue Jan 19 22:42:04 2016	(r294353)
+++ head/share/mk/bsd.subdir.mk	Tue Jan 19 22:42:07 2016	(r294354)
@@ -25,27 +25,30 @@
 # 		This is a variant of install, which will
 # 		put the stuff into the right "distribution".
 #
-# 	See ALL_SUBDIR_TARGETS for list of targets that will recurse.
-# 	Custom targets can be added to SUBDIR_TARGETS in src.conf.
+# 	See SUBDIR_TARGETS for list of targets that will recurse.
 #
 # 	Targets defined in STANDALONE_SUBDIR_TARGETS will always be ran
 # 	with SUBDIR_PARALLEL and will not respect .WAIT or SUBDIR_DEPEND_
 # 	values.
 #
+# 	SUBDIR_TARGETS and STANDALONE_SUBDIR_TARGETS can be appended to
+# 	via make.conf or src.conf.
+#
 
 .if !target(__<bsd.subdir.mk>__)
 __<bsd.subdir.mk>__:
 
-ALL_SUBDIR_TARGETS= all all-man buildconfig buildfiles buildincludes \
-		    checkdpadd clean cleandepend cleandir cleanilinks \
-		    cleanobj depend distribute files includes installconfig \
-		    installfiles installincludes realinstall lint maninstall \
-		    manlint obj objlink regress tags \
-		    ${SUBDIR_TARGETS}
+SUBDIR_TARGETS+= \
+		all all-man buildconfig buildfiles buildincludes \
+		checkdpadd clean cleandepend cleandir cleanilinks \
+		cleanobj depend distribute files includes installconfig \
+		installfiles installincludes realinstall lint maninstall \
+		manlint obj objlink regress tags \
 
 # Described above.
-STANDALONE_SUBDIR_TARGETS?= obj checkdpadd clean cleandepend cleandir \
-			    cleanilinks cleanobj installconfig
+STANDALONE_SUBDIR_TARGETS+= \
+		obj checkdpadd clean cleandepend cleandir \
+		cleanilinks cleanobj installconfig \
 
 .include <bsd.init.mk>
 
@@ -115,7 +118,7 @@ ${SUBDIR:N.WAIT}: .PHONY .MAKE
 	    dir=${.TARGET}; \
 	    ${_SUBDIR_SH};
 
-.for __target in ${ALL_SUBDIR_TARGETS}
+.for __target in ${SUBDIR_TARGETS}
 # Only recurse on directly-called targets.  I.e., don't recurse on dependencies
 # such as 'install' becoming {before,real,after}install, just recurse
 # 'install'.  Despite that, 'realinstall' is special due to ordering issues
@@ -154,12 +157,12 @@ ${__target}: ${__subdir_targets}
 ${__target}: _SUBDIR
 .endif	# SUBDIR_PARALLEL || _is_standalone_target
 .endif	# make(${__target})
-.endfor	# __target in ${ALL_SUBDIR_TARGETS}
+.endfor	# __target in ${SUBDIR_TARGETS}
 
 .endif	# !target(_SUBDIR)
 
 # Ensure all targets exist
-.for __target in ${ALL_SUBDIR_TARGETS}
+.for __target in ${SUBDIR_TARGETS}
 .if !target(${__target})
 ${__target}:
 .endif

From owner-svn-src-all@freebsd.org  Tue Jan 19 22:42:14 2016
Return-Path: <owner-svn-src-all@freebsd.org>
Delivered-To: svn-src-all@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id BB83BA8734F;
 Tue, 19 Jan 2016 22:42:14 +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 543571D74;
 Tue, 19 Jan 2016 22:42:14 +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 u0JMgDHR064759;
 Tue, 19 Jan 2016 22:42:13 GMT (envelope-from bdrewery@FreeBSD.org)
Received: (from bdrewery@localhost)
 by repo.freebsd.org (8.15.2/8.15.2/Submit) id u0JMgDEi064757;
 Tue, 19 Jan 2016 22:42:13 GMT (envelope-from bdrewery@FreeBSD.org)
Message-Id: <201601192242.u0JMgDEi064757@repo.freebsd.org>
X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to
 bdrewery@FreeBSD.org using -f
From: Bryan Drewery <bdrewery@FreeBSD.org>
Date: Tue, 19 Jan 2016 22:42:13 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-head@freebsd.org
Subject: svn commit: r294356 - head/tools/build
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.20
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for &quot;
 user&quot; and &quot; projects&quot; \)" <svn-src-all.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-all/>
List-Post: <mailto:svn-src-all@freebsd.org>
List-Help: <mailto:svn-src-all-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Tue, 19 Jan 2016 22:42:14 -0000

Author: bdrewery
Date: Tue Jan 19 22:42:13 2016
New Revision: 294356
URL: https://svnweb.freebsd.org/changeset/base/294356

Log:
  Add some documentation.
  
  Sponsored by:	EMC / Isilon Storage Division

Modified:
  head/tools/build/check-links.sh

Modified: head/tools/build/check-links.sh
==============================================================================
--- head/tools/build/check-links.sh	Tue Jan 19 22:42:10 2016	(r294355)
+++ head/tools/build/check-links.sh	Tue Jan 19 22:42:13 2016	(r294356)
@@ -18,6 +18,15 @@ libkey() {
 	return 0
 }
 
+usage() {
+	cat <<-EOF
+	usage: $0 [-Uv] file
+	       -U:       Skip looking for unresolved symbols.
+	       -v:       Show which library each symbol is resolved to.
+	EOF
+	exit 0
+}
+
 ret=0
 CHECK_UNRESOLVED=1
 VERBOSE_RESOLVED=0
@@ -25,6 +34,7 @@ while getopts "Uv" flag; do
 	case "${flag}" in
 		U) CHECK_UNRESOLVED=0 ;;
 		v) VERBOSE_RESOLVED=1 ;;
+		*) usage ;;
 	esac
 done
 shift $((OPTIND-1))

From owner-svn-src-all@freebsd.org  Tue Jan 19 23:06:46 2016
Return-Path: <owner-svn-src-all@freebsd.org>
Delivered-To: svn-src-all@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3838EA87ED6;
 Tue, 19 Jan 2016 23:06:46 +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 17E121E5F;
 Tue, 19 Jan 2016 23:06:46 +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 DBBAAB93C;
 Tue, 19 Jan 2016 18:06:44 -0500 (EST)
From: John Baldwin <jhb@freebsd.org>
To: Dag-Erling =?ISO-8859-1?Q?Sm=F8rgrav?= <des@freebsd.org>
Cc: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-head@freebsd.org
Subject: Re: svn commit: r294332 - in head: crypto/openssh
 crypto/openssh/contrib crypto/openssh/contrib/caldera
 crypto/openssh/contrib/cygwin crypto/openssh/contrib/redhat
 crypto/openssh/contrib/suse crypto/op...
Date: Tue, 19 Jan 2016 14:26:47 -0800
Message-ID: <3353412.ycooFE6q6z@ralph.baldwin.cx>
User-Agent: KMail/4.14.3 (FreeBSD/10.2-STABLE; KDE/4.14.3; amd64; ; )
In-Reply-To: <1547455.kXYNJo7ADU@ralph.baldwin.cx>
References: <201601191828.u0JISNSG087681@repo.freebsd.org>
 <1547455.kXYNJo7ADU@ralph.baldwin.cx>
MIME-Version: 1.0
Content-Transfer-Encoding: quoted-printable
Content-Type: text/plain; charset="iso-8859-1"
X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7
 (bigwig.baldwin.cx); Tue, 19 Jan 2016 18:06:45 -0500 (EST)
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.20
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for &quot;
 user&quot; and &quot; projects&quot; \)" <svn-src-all.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-all/>
List-Post: <mailto:svn-src-all@freebsd.org>
List-Help: <mailto:svn-src-all-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Tue, 19 Jan 2016 23:06:46 -0000

On Tuesday, January 19, 2016 02:07:20 PM John Baldwin wrote:
> On Tuesday, January 19, 2016 06:28:23 PM Dag-Erling Sm=F8rgrav wrote:=

> > Author: des
> > Date: Tue Jan 19 18:28:23 2016
> > New Revision: 294332
> > URL: https://svnweb.freebsd.org/changeset/base/294332
> >=20
> > Log:
> >   Upgrade to OpenSSH 6.8p1.
>=20
> This broke the build of pam_ssh.  I am currently build testing an att=
empt
> at fixing:

That patch was no good.  Better to fetch from github directly:

https://github.com/freebsd/freebsd/compare/master...bsdjhb:pam_ssh.diff=


--=20
John Baldwin

From owner-svn-src-all@freebsd.org  Tue Jan 19 23:16:25 2016
Return-Path: <owner-svn-src-all@freebsd.org>
Delivered-To: svn-src-all@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id B48F3A88250;
 Tue, 19 Jan 2016 23:16:25 +0000 (UTC)
 (envelope-from asomers@FreeBSD.org)
Received: from repo.freebsd.org (repo.freebsd.org
 [IPv6:2610:1c1:1:6068::e6a:0])
 (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
 (Client did not present a certificate)
 by mx1.freebsd.org (Postfix) with ESMTPS id 82EDA12CB;
 Tue, 19 Jan 2016 23:16:25 +0000 (UTC)
 (envelope-from asomers@FreeBSD.org)
Received: from repo.freebsd.org ([127.0.1.37])
 by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u0JNGOth075076;
 Tue, 19 Jan 2016 23:16:24 GMT (envelope-from asomers@FreeBSD.org)
Received: (from asomers@localhost)
 by repo.freebsd.org (8.15.2/8.15.2/Submit) id u0JNGOs4075075;
 Tue, 19 Jan 2016 23:16:24 GMT (envelope-from asomers@FreeBSD.org)
Message-Id: <201601192316.u0JNGOs4075075@repo.freebsd.org>
X-Authentication-Warning: repo.freebsd.org: asomers set sender to
 asomers@FreeBSD.org using -f
From: Alan Somers <asomers@FreeBSD.org>
Date: Tue, 19 Jan 2016 23:16:24 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-head@freebsd.org
Subject: svn commit: r294358 -
 head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.20
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for &quot;
 user&quot; and &quot; projects&quot; \)" <svn-src-all.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-all/>
List-Post: <mailto:svn-src-all@freebsd.org>
List-Help: <mailto:svn-src-all-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Tue, 19 Jan 2016 23:16:25 -0000

Author: asomers
Date: Tue Jan 19 23:16:24 2016
New Revision: 294358
URL: https://svnweb.freebsd.org/changeset/base/294358

Log:
  Quell harmless CID about unchecked return value in nvlist_get_guids.
  
  The return value doesn't need to be checked, because nvlist_get_guid's
  callers check the returned values of the guids.
  
  Coverity CID:	1341869
  MFC after:	1 week
  X-MFC-With:	292066
  Sponsored by:	Spectra Logic Corp

Modified:
  head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_geom.c

Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_geom.c
==============================================================================
--- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_geom.c	Tue Jan 19 22:42:16 2016	(r294357)
+++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_geom.c	Tue Jan 19 23:16:24 2016	(r294358)
@@ -291,8 +291,8 @@ static void
 nvlist_get_guids(nvlist_t *list, uint64_t *pguid, uint64_t *vguid)
 {
 
-	nvlist_lookup_uint64(list, ZPOOL_CONFIG_GUID, vguid);
-	nvlist_lookup_uint64(list, ZPOOL_CONFIG_POOL_GUID, pguid);
+	(void) nvlist_lookup_uint64(list, ZPOOL_CONFIG_GUID, vguid);
+	(void) nvlist_lookup_uint64(list, ZPOOL_CONFIG_POOL_GUID, pguid);
 }
 
 static int

From owner-svn-src-all@freebsd.org  Tue Jan 19 23:18:50 2016
Return-Path: <owner-svn-src-all@freebsd.org>
Delivered-To: svn-src-all@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id E3D04A882FB;
 Tue, 19 Jan 2016 23:18:50 +0000 (UTC)
 (envelope-from ngie@FreeBSD.org)
Received: from repo.freebsd.org (repo.freebsd.org
 [IPv6:2610:1c1:1:6068::e6a:0])
 (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
 (Client did not present a certificate)
 by mx1.freebsd.org (Postfix) with ESMTPS id B0C2614A3;
 Tue, 19 Jan 2016 23:18:50 +0000 (UTC)
 (envelope-from ngie@FreeBSD.org)
Received: from repo.freebsd.org ([127.0.1.37])
 by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u0JNInBW075191;
 Tue, 19 Jan 2016 23:18:49 GMT (envelope-from ngie@FreeBSD.org)
Received: (from ngie@localhost)
 by repo.freebsd.org (8.15.2/8.15.2/Submit) id u0JNInrR075190;
 Tue, 19 Jan 2016 23:18:49 GMT (envelope-from ngie@FreeBSD.org)
Message-Id: <201601192318.u0JNInrR075190@repo.freebsd.org>
X-Authentication-Warning: repo.freebsd.org: ngie set sender to
 ngie@FreeBSD.org using -f
From: Garrett Cooper <ngie@FreeBSD.org>
Date: Tue, 19 Jan 2016 23:18:49 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org
Subject: svn commit: r294359 - stable/10/lib/libc/tests/net
X-SVN-Group: stable-10
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.20
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for &quot;
 user&quot; and &quot; projects&quot; \)" <svn-src-all.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-all/>
List-Post: <mailto:svn-src-all@freebsd.org>
List-Help: <mailto:svn-src-all-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Tue, 19 Jan 2016 23:18:51 -0000

Author: ngie
Date: Tue Jan 19 23:18:49 2016
New Revision: 294359
URL: https://svnweb.freebsd.org/changeset/base/294359

Log:
  Default __MAKE_SHELL to /bin/sh when generating aton_ether_subr.c via
  `gen_ether_subr`.
  
  __MAKE_SHELL is only defined when installworld is run on stable/10,
  which breaks workflows dealing with source trees mounted with noexec [*]
  
  This is a direct commit to stable/10
  
  Reported by: Mark Martinec <Mark.Martinec+freebsd@ijs.si>
  Sponsored by: EMC / Isilon Storage Division

Modified:
  stable/10/lib/libc/tests/net/Makefile

Modified: stable/10/lib/libc/tests/net/Makefile
==============================================================================
--- stable/10/lib/libc/tests/net/Makefile	Tue Jan 19 23:16:24 2016	(r294358)
+++ stable/10/lib/libc/tests/net/Makefile	Tue Jan 19 23:18:49 2016	(r294359)
@@ -28,6 +28,8 @@ PROGS+=		h_dns_server
 DPADD.h_nsd_recurse+=	${LIBPTHREAD}
 LDADD.h_nsd_recurse+=	-lpthread
 
+__MAKE_SHELL?=	/bin/sh
+
 CLEANFILES+=	aton_ether_subr.c
 aton_ether_subr.c: gen_ether_subr ${.CURDIR:H:H:H:H}/sys/net/if_ethersubr.c
 	${__MAKE_SHELL} ${.ALLSRC} ${.TARGET}

From owner-svn-src-all@freebsd.org  Tue Jan 19 23:25:26 2016
Return-Path: <owner-svn-src-all@freebsd.org>
Delivered-To: svn-src-all@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id BC983A885EF;
 Tue, 19 Jan 2016 23:25:26 +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 8B42C1B84;
 Tue, 19 Jan 2016 23:25: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 u0JNPPce078006;
 Tue, 19 Jan 2016 23:25:25 GMT (envelope-from bdrewery@FreeBSD.org)
Received: (from bdrewery@localhost)
 by repo.freebsd.org (8.15.2/8.15.2/Submit) id u0JNPPkp078005;
 Tue, 19 Jan 2016 23:25:25 GMT (envelope-from bdrewery@FreeBSD.org)
Message-Id: <201601192325.u0JNPPkp078005@repo.freebsd.org>
X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to
 bdrewery@FreeBSD.org using -f
From: Bryan Drewery <bdrewery@FreeBSD.org>
Date: Tue, 19 Jan 2016 23:25:25 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-head@freebsd.org
Subject: svn commit: r294360 - head/sys/conf
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.20
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for &quot;
 user&quot; and &quot; projects&quot; \)" <svn-src-all.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-all/>
List-Post: <mailto:svn-src-all@freebsd.org>
List-Help: <mailto:svn-src-all-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Tue, 19 Jan 2016 23:25:26 -0000

Author: bdrewery
Date: Tue Jan 19 23:25:25 2016
New Revision: 294360
URL: https://svnweb.freebsd.org/changeset/base/294360

Log:
  Revert r294352.
  
  Further research showed it was the wrong fix and revealed a bigger
  problem with the goal of skipping 'make depend'.

Modified:
  head/sys/conf/kmod.mk

Modified: head/sys/conf/kmod.mk
==============================================================================
--- head/sys/conf/kmod.mk	Tue Jan 19 23:18:49 2016	(r294359)
+++ head/sys/conf/kmod.mk	Tue Jan 19 23:25:25 2016	(r294360)
@@ -456,7 +456,7 @@ cleandepend: cleanilinks
 cleanilinks:
 	rm -f ${_ILINKS}
 
-.if ${MK_FAST_DEPEND} == "yes" || !exists(${.OBJDIR}/${DEPENDFILE})
+.if !exists(${.OBJDIR}/${DEPENDFILE})
 ${OBJS}: ${SRCS:M*.h}
 .endif
 

From owner-svn-src-all@freebsd.org  Tue Jan 19 23:28:20 2016
Return-Path: <owner-svn-src-all@freebsd.org>
Delivered-To: svn-src-all@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id 32929A886A3;
 Tue, 19 Jan 2016 23:28: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 033411D2D;
 Tue, 19 Jan 2016 23:28: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 u0JNSJHq078142;
 Tue, 19 Jan 2016 23:28:19 GMT (envelope-from bdrewery@FreeBSD.org)
Received: (from bdrewery@localhost)
 by repo.freebsd.org (8.15.2/8.15.2/Submit) id u0JNSJcH078141;
 Tue, 19 Jan 2016 23:28:19 GMT (envelope-from bdrewery@FreeBSD.org)
Message-Id: <201601192328.u0JNSJcH078141@repo.freebsd.org>
X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to
 bdrewery@FreeBSD.org using -f
From: Bryan Drewery <bdrewery@FreeBSD.org>
Date: Tue, 19 Jan 2016 23:28:19 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-head@freebsd.org
Subject: svn commit: r294361 - head/share/mk
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.20
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for &quot;
 user&quot; and &quot; projects&quot; \)" <svn-src-all.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-all/>
List-Post: <mailto:svn-src-all@freebsd.org>
List-Help: <mailto:svn-src-all-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Tue, 19 Jan 2016 23:28:20 -0000

Author: bdrewery
Date: Tue Jan 19 23:28:18 2016
New Revision: 294361
URL: https://svnweb.freebsd.org/changeset/base/294361

Log:
  FAST_DEPEND: Fix improperly depending all .So objects on all headers.
  
  This was a regression in r290629, which was revealed partly in r294360.
  Once 'make depend' has ran it will generate all headers already.  Thus
  even with FAST_DEPEND lacking proper dependencies before building, it
  will not have any missing headers.  Once objects are compiled the depend
  files will be generated with proper dependencies.
  
  Sponsored by:	EMC / Isilon Storage Division

Modified:
  head/share/mk/bsd.lib.mk

Modified: head/share/mk/bsd.lib.mk
==============================================================================
--- head/share/mk/bsd.lib.mk	Tue Jan 19 23:25:25 2016	(r294360)
+++ head/share/mk/bsd.lib.mk	Tue Jan 19 23:28:18 2016	(r294361)
@@ -433,7 +433,9 @@ ${_S:R}.po: ${_S}
 .endif
 .if defined(SHLIB_NAME) || \
     defined(INSTALL_PIC_ARCHIVE) && defined(LIB) && !empty(LIB)
+.if !exists(${.OBJDIR}/${DEPENDFILE})
 ${SOBJS}: ${SRCS:M*.h}
+.endif
 .for _S in ${SRCS:N*.[hly]}
 ${_S:R}.So: ${_S}
 .endfor

From owner-svn-src-all@freebsd.org  Tue Jan 19 23:34:29 2016
Return-Path: <owner-svn-src-all@freebsd.org>
Delivered-To: svn-src-all@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id 52CC9A88A87;
 Tue, 19 Jan 2016 23:34:29 +0000 (UTC)
 (envelope-from marius@FreeBSD.org)
Received: from repo.freebsd.org (repo.freebsd.org
 [IPv6:2610:1c1:1:6068::e6a:0])
 (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
 (Client did not present a certificate)
 by mx1.freebsd.org (Postfix) with ESMTPS id 2FBEC1337;
 Tue, 19 Jan 2016 23:34:29 +0000 (UTC)
 (envelope-from marius@FreeBSD.org)
Received: from repo.freebsd.org ([127.0.1.37])
 by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u0JNYSjn080957;
 Tue, 19 Jan 2016 23:34:28 GMT (envelope-from marius@FreeBSD.org)
Received: (from marius@localhost)
 by repo.freebsd.org (8.15.2/8.15.2/Submit) id u0JNYST5080954;
 Tue, 19 Jan 2016 23:34:28 GMT (envelope-from marius@FreeBSD.org)
Message-Id: <201601192334.u0JNYST5080954@repo.freebsd.org>
X-Authentication-Warning: repo.freebsd.org: marius set sender to
 marius@FreeBSD.org using -f
From: Marius Strobl <marius@FreeBSD.org>
Date: Tue, 19 Jan 2016 23:34:28 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-head@freebsd.org
Subject: svn commit: r294362 - in head/sys: dev/uart kern sys
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.20
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for &quot;
 user&quot; and &quot; projects&quot; \)" <svn-src-all.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-all/>
List-Post: <mailto:svn-src-all@freebsd.org>
List-Help: <mailto:svn-src-all-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Tue, 19 Jan 2016 23:34:29 -0000

Author: marius
Date: Tue Jan 19 23:34:27 2016
New Revision: 294362
URL: https://svnweb.freebsd.org/changeset/base/294362

Log:
  Fix tty_drain() and, thus, TIOCDRAIN of the current tty(4) incarnation
  to actually wait until the TX FIFOs of UARTs have be drained before
  returning. This is done by bringing the equivalent of the TS_BUSY flag
  found in the previous implementation back in an ABI-preserving way.
  Reported and tested by: Patrick Powell
  
  Most likely, drivers for USB-serial-adapters likewise incorporating
  TX FIFOs as well as other terminal devices that buffer output in some
  form should also provide implementations of tsw_busy.
  
  MFC after:	3 days

Modified:
  head/sys/dev/uart/uart_tty.c
  head/sys/kern/tty.c
  head/sys/sys/ttydevsw.h

Modified: head/sys/dev/uart/uart_tty.c
==============================================================================
--- head/sys/dev/uart/uart_tty.c	Tue Jan 19 23:28:18 2016	(r294361)
+++ head/sys/dev/uart/uart_tty.c	Tue Jan 19 23:34:27 2016	(r294362)
@@ -355,6 +355,18 @@ uart_tty_free(void *arg)
 	 */
 }
 
+static bool
+uart_tty_busy(struct tty *tp)
+{
+	struct uart_softc *sc;
+ 
+	sc = tty_softc(tp);
+	if (sc == NULL || sc->sc_leaving)
+                return (FALSE);
+
+	return (sc->sc_txbusy);
+}
+
 static struct ttydevsw uart_tty_class = {
 	.tsw_flags	= TF_INITLOCK|TF_CALLOUT,
 	.tsw_open	= uart_tty_open,
@@ -365,6 +377,7 @@ static struct ttydevsw uart_tty_class = 
 	.tsw_param	= uart_tty_param,
 	.tsw_modem	= uart_tty_modem,
 	.tsw_free	= uart_tty_free,
+	.tsw_busy	= uart_tty_busy,
 };
 
 int

Modified: head/sys/kern/tty.c
==============================================================================
--- head/sys/kern/tty.c	Tue Jan 19 23:28:18 2016	(r294361)
+++ head/sys/kern/tty.c	Tue Jan 19 23:34:27 2016	(r294362)
@@ -132,11 +132,11 @@ tty_drain(struct tty *tp, int leaving)
 		/* buffer is inaccessible */
 		return (0);
 
-	while (ttyoutq_bytesused(&tp->t_outq) > 0) {
+	while (ttyoutq_bytesused(&tp->t_outq) > 0 || ttydevsw_busy(tp)) {
 		ttydevsw_outwakeup(tp);
 		/* Could be handled synchronously. */
 		bytesused = ttyoutq_bytesused(&tp->t_outq);
-		if (bytesused == 0)
+		if (bytesused == 0 && !ttydevsw_busy(tp))
 			return (0);
 
 		/* Wait for data to be drained. */
@@ -955,6 +955,13 @@ ttydevsw_deffree(void *softc)
 	panic("Terminal device freed without a free-handler");
 }
 
+static bool
+ttydevsw_defbusy(struct tty *tp __unused)
+{
+
+	return (FALSE);
+}
+
 /*
  * TTY allocation and deallocation. TTY devices can be deallocated when
  * the driver doesn't use it anymore, when the TTY isn't a session's
@@ -989,6 +996,7 @@ tty_alloc_mutex(struct ttydevsw *tsw, vo
 	PATCH_FUNC(mmap);
 	PATCH_FUNC(pktnotify);
 	PATCH_FUNC(free);
+	PATCH_FUNC(busy);
 #undef PATCH_FUNC
 
 	tp = malloc(sizeof(struct tty), M_TTY, M_WAITOK|M_ZERO);

Modified: head/sys/sys/ttydevsw.h
==============================================================================
--- head/sys/sys/ttydevsw.h	Tue Jan 19 23:28:18 2016	(r294361)
+++ head/sys/sys/ttydevsw.h	Tue Jan 19 23:34:27 2016	(r294362)
@@ -54,6 +54,7 @@ typedef int tsw_mmap_t(struct tty *tp, v
     vm_paddr_t * paddr, int nprot, vm_memattr_t *memattr);
 typedef void tsw_pktnotify_t(struct tty *tp, char event);
 typedef void tsw_free_t(void *softc);
+typedef bool tsw_busy_t(struct tty *tp);
 
 struct ttydevsw {
 	unsigned int	tsw_flags;	/* Default TTY flags. */
@@ -74,7 +75,9 @@ struct ttydevsw {
 
 	tsw_free_t	*tsw_free;	/* Destructor. */
 
-	void		*tsw_spare[4];	/* For future use. */
+	tsw_busy_t	*tsw_busy;	/* Draining output. */
+
+	void		*tsw_spare[3];	/* For future use. */
 };
 
 static __inline int
@@ -181,4 +184,13 @@ ttydevsw_free(struct tty *tp)
 	tp->t_devsw->tsw_free(tty_softc(tp));
 }
 
+static __inline bool
+ttydevsw_busy(struct tty *tp)
+{
+
+	MPASS(tty_gone(tp));
+
+	return (tp->t_devsw->tsw_busy(tp));
+}
+
 #endif /* !_SYS_TTYDEVSW_H_ */

From owner-svn-src-all@freebsd.org  Tue Jan 19 23:35:14 2016
Return-Path: <owner-svn-src-all@freebsd.org>
Delivered-To: svn-src-all@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1DC91A88B6B;
 Tue, 19 Jan 2016 23:35:14 +0000 (UTC)
 (envelope-from jhibbits@FreeBSD.org)
Received: from repo.freebsd.org (repo.freebsd.org
 [IPv6:2610:1c1:1:6068::e6a:0])
 (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
 (Client did not present a certificate)
 by mx1.freebsd.org (Postfix) with ESMTPS id E3118152E;
 Tue, 19 Jan 2016 23:35:13 +0000 (UTC)
 (envelope-from jhibbits@FreeBSD.org)
Received: from repo.freebsd.org ([127.0.1.37])
 by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u0JNZC9D081032;
 Tue, 19 Jan 2016 23:35:12 GMT (envelope-from jhibbits@FreeBSD.org)
Received: (from jhibbits@localhost)
 by repo.freebsd.org (8.15.2/8.15.2/Submit) id u0JNZC2R081031;
 Tue, 19 Jan 2016 23:35:12 GMT (envelope-from jhibbits@FreeBSD.org)
Message-Id: <201601192335.u0JNZC2R081031@repo.freebsd.org>
X-Authentication-Warning: repo.freebsd.org: jhibbits set sender to
 jhibbits@FreeBSD.org using -f
From: Justin Hibbits <jhibbits@FreeBSD.org>
Date: Tue, 19 Jan 2016 23:35:12 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-head@freebsd.org
Subject: svn commit: r294363 - head/sys/powerpc/booke
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.20
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for &quot;
 user&quot; and &quot; projects&quot; \)" <svn-src-all.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-all/>
List-Post: <mailto:svn-src-all@freebsd.org>
List-Help: <mailto:svn-src-all-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Tue, 19 Jan 2016 23:35:14 -0000

Author: jhibbits
Date: Tue Jan 19 23:35:12 2016
New Revision: 294363
URL: https://svnweb.freebsd.org/changeset/base/294363

Log:
  Revert a printf change from r294307.
  
  Caused build failures with MPC85XX.
  
  Pointy-hat to:	jhibbits

Modified:
  head/sys/powerpc/booke/pmap.c

Modified: head/sys/powerpc/booke/pmap.c
==============================================================================
--- head/sys/powerpc/booke/pmap.c	Tue Jan 19 23:34:27 2016	(r294362)
+++ head/sys/powerpc/booke/pmap.c	Tue Jan 19 23:35:12 2016	(r294363)
@@ -2844,7 +2844,7 @@ mmu_booke_mapdev_attr(mmu_t mmu, vm_padd
 			} while (va % sz != 0);
 		}
 		if (bootverbose)
-			printf("Wiring VA=%lx to PA=%jx (size=%lx), "
+			printf("Wiring VA=%x to PA=%jx (size=%x), "
 			    "using TLB1[%d]\n", va, (uintmax_t)pa, sz, tlb1_idx);
 		tlb1_set_entry(va, pa, sz, tlb_calc_wimg(pa, ma));
 		size -= sz;

From owner-svn-src-all@freebsd.org  Tue Jan 19 23:36:51 2016
Return-Path: <owner-svn-src-all@freebsd.org>
Delivered-To: svn-src-all@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5E3CBA88C84;
 Tue, 19 Jan 2016 23:36:51 +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 3520A17A3;
 Tue, 19 Jan 2016 23:36:51 +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 u0JNaoUq081137;
 Tue, 19 Jan 2016 23:36:50 GMT (envelope-from ian@FreeBSD.org)
Received: (from ian@localhost)
 by repo.freebsd.org (8.15.2/8.15.2/Submit) id u0JNanUg081127;
 Tue, 19 Jan 2016 23:36:49 GMT (envelope-from ian@FreeBSD.org)
Message-Id: <201601192336.u0JNanUg081127@repo.freebsd.org>
X-Authentication-Warning: repo.freebsd.org: ian set sender to ian@FreeBSD.org
 using -f
From: Ian Lepore <ian@FreeBSD.org>
Date: Tue, 19 Jan 2016 23:36:49 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org
Subject: svn commit: r294364 - in stable/10: contrib/smbfs/lib/smb lib usr.sbin
X-SVN-Group: stable-10
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.20
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for &quot;
 user&quot; and &quot; projects&quot; \)" <svn-src-all.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-all/>
List-Post: <mailto:svn-src-all@freebsd.org>
List-Help: <mailto:svn-src-all-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Tue, 19 Jan 2016 23:36:51 -0000

Author: ian
Date: Tue Jan 19 23:36:49 2016
New Revision: 294364
URL: https://svnweb.freebsd.org/changeset/base/294364

Log:
  MFC r292337, r292552, r292553:
  
    Build mount_smbfs for arm.  Also sort the subdirs.
  
    Avoid unaligned memory accesses when encoding netbios names in libsmb.
  
    The current code for encoding a netbios name converts each byte to a 16-bit
    value and stores the result by casting a char* to u_short*, resulting in
    alignment faults on strict-alignment platforms.
  
    This change reimplements the encoding routine using only byte accesses to
    memory. There is no particular reason to work with 16-bit values just
    because the encoding process creates two bytes of output for every byte of
    input. Working a byte at at time also avoids endian problems for big-endian
    platforms.
  
    Make the building of libsmb and mount_smbfs unconditional, now that r292552
    has eliminated alignment and endian problems that were making it fail on
    some platforms.
  
  PR:           180438
  PR:           189415
  Relnotes:	Yes

Modified:
  stable/10/contrib/smbfs/lib/smb/nb_name.c
  stable/10/lib/Makefile
  stable/10/usr.sbin/Makefile
  stable/10/usr.sbin/Makefile.amd64
  stable/10/usr.sbin/Makefile.arm
  stable/10/usr.sbin/Makefile.i386
  stable/10/usr.sbin/Makefile.ia64
  stable/10/usr.sbin/Makefile.powerpc
  stable/10/usr.sbin/Makefile.sparc64
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/contrib/smbfs/lib/smb/nb_name.c
==============================================================================
--- stable/10/contrib/smbfs/lib/smb/nb_name.c	Tue Jan 19 23:35:12 2016	(r294363)
+++ stable/10/contrib/smbfs/lib/smb/nb_name.c	Tue Jan 19 23:36:49 2016	(r294364)
@@ -143,15 +143,13 @@ nb_encname_len(const char *str)
 	return len;
 }
 
-#define	NBENCODE(c)	(htole16((u_short)(((u_char)(c) >> 4) | \
-			 (((u_char)(c) & 0xf) << 8)) + 0x4141))
-
-static void
-memsetw(char *dst, int n, u_short word)
+static inline void
+nb_char_encode(u_char **ptr, u_char c, int n)
 {
+
 	while (n--) {
-		*(u_short*)dst = word;
-		dst += 2;
+		*(*ptr)++ = 0x41 + (c >> 4);
+		*(*ptr)++ = 0x41 + (c & 0x0f);
 	}
 }
 
@@ -165,19 +163,15 @@ nb_name_encode(struct nb_name *np, u_cha
 	*cp++ = NB_ENCNAMELEN;
 	name = np->nn_name;
 	if (name[0] == '*' && name[1] == 0) {
-		*(u_short*)cp = NBENCODE('*');
-		memsetw(cp + 2, NB_NAMELEN - 1, NBENCODE(' '));
-		cp += NB_ENCNAMELEN;
+		nb_char_encode(&cp, '*', 1);
+		nb_char_encode(&cp, ' ', NB_NAMELEN - 1);
 	} else {
-		for (i = 0; *name && i < NB_NAMELEN - 1; i++, cp += 2, name++)
-			*(u_short*)cp = NBENCODE(toupper(*name));
-		i = NB_NAMELEN - i - 1;
-		if (i > 0) {
-			memsetw(cp, i, NBENCODE(' '));
-			cp += i * 2;
-		}
-		*(u_short*)cp = NBENCODE(np->nn_type);
-		cp += 2;
+		for (i = 0; i < NB_NAMELEN - 1; i++)
+			if (*name != 0)
+				nb_char_encode(&cp, toupper(*name++), 1);
+			else
+				nb_char_encode(&cp, ' ', 1);
+		nb_char_encode(&cp, np->nn_type, 1);
 	}
 	*cp = 0;
 	if (np->nn_scope == NULL)

Modified: stable/10/lib/Makefile
==============================================================================
--- stable/10/lib/Makefile	Tue Jan 19 23:35:12 2016	(r294363)
+++ stable/10/lib/Makefile	Tue Jan 19 23:36:49 2016	(r294364)
@@ -84,7 +84,7 @@ SUBDIR=	${SUBDIR_ORDERED} \
 	libsbuf \
 	${_libsdp} \
 	${_libsm} \
-	${_libsmb} \
+	libsmb \
 	${_libsmdb} \
 	${_libsmutil} \
 	libstand \
@@ -214,7 +214,6 @@ _libypclnt=	libypclnt
 .endif
 
 .if ${MACHINE_CPUARCH} == "i386" || ${MACHINE_CPUARCH} == "amd64"
-_libsmb=	libsmb
 _libvgl=	libvgl
 _libproc=	libproc
 _librtld_db=	librtld_db
@@ -228,7 +227,6 @@ _libvmmapi=	libvmmapi
 
 .if ${MACHINE_CPUARCH} == "ia64"
 _libefi=	libefi
-_libsmb=	libsmb
 .endif
 
 .if ${MACHINE_CPUARCH} == "mips"
@@ -239,11 +237,6 @@ _librtld_db=	librtld_db
 .if ${MACHINE_CPUARCH} == "powerpc"
 _libproc=	libproc
 _librtld_db=	librtld_db
-_libsmb=	libsmb
-.endif
-
-.if ${MACHINE_CPUARCH} == "sparc64"
-_libsmb=	libsmb
 .endif
 
 .if ${MK_OPENSSL} != "no"

Modified: stable/10/usr.sbin/Makefile
==============================================================================
--- stable/10/usr.sbin/Makefile	Tue Jan 19 23:35:12 2016	(r294363)
+++ stable/10/usr.sbin/Makefile	Tue Jan 19 23:36:49 2016	(r294364)
@@ -44,6 +44,7 @@ SUBDIR=	adduser \
 	mixer \
 	mlxcontrol \
 	mountd \
+	mount_smbfs \
 	mptutil \
 	mtest \
 	${_mtree} \

Modified: stable/10/usr.sbin/Makefile.amd64
==============================================================================
--- stable/10/usr.sbin/Makefile.amd64	Tue Jan 19 23:35:12 2016	(r294363)
+++ stable/10/usr.sbin/Makefile.amd64	Tue Jan 19 23:36:49 2016	(r294364)
@@ -25,7 +25,6 @@ SUBDIR+=	hyperv
 .endif
 SUBDIR+=	kgmon
 SUBDIR+=	lptcontrol
-SUBDIR+=	mount_smbfs
 SUBDIR+=	mptable
 .if ${MK_NDIS} != "no"
 SUBDIR+=	ndiscvt

Modified: stable/10/usr.sbin/Makefile.arm
==============================================================================
--- stable/10/usr.sbin/Makefile.arm	Tue Jan 19 23:35:12 2016	(r294363)
+++ stable/10/usr.sbin/Makefile.arm	Tue Jan 19 23:36:49 2016	(r294364)
@@ -1,4 +1,4 @@
 # $FreeBSD$
 
-SUBDIR+=	ofwdump
 SUBDIR+=	kgmon
+SUBDIR+=	ofwdump

Modified: stable/10/usr.sbin/Makefile.i386
==============================================================================
--- stable/10/usr.sbin/Makefile.i386	Tue Jan 19 23:35:12 2016	(r294363)
+++ stable/10/usr.sbin/Makefile.i386	Tue Jan 19 23:36:49 2016	(r294364)
@@ -15,7 +15,6 @@ SUBDIR+=	hyperv
 SUBDIR+=	kgmon
 SUBDIR+=	kgzip
 SUBDIR+=	lptcontrol
-SUBDIR+=	mount_smbfs
 SUBDIR+=	mptable
 .if ${MK_NDIS} != "no"
 SUBDIR+=	ndiscvt

Modified: stable/10/usr.sbin/Makefile.ia64
==============================================================================
--- stable/10/usr.sbin/Makefile.ia64	Tue Jan 19 23:35:12 2016	(r294363)
+++ stable/10/usr.sbin/Makefile.ia64	Tue Jan 19 23:36:49 2016	(r294364)
@@ -4,6 +4,5 @@
 SUBDIR+=	acpi
 .endif
 SUBDIR+=	kgmon
-SUBDIR+=	mount_smbfs
 SUBDIR:=	${SUBDIR:Nuathload}
 SUBDIR+=	zzz

Modified: stable/10/usr.sbin/Makefile.powerpc
==============================================================================
--- stable/10/usr.sbin/Makefile.powerpc	Tue Jan 19 23:35:12 2016	(r294363)
+++ stable/10/usr.sbin/Makefile.powerpc	Tue Jan 19 23:36:49 2016	(r294364)
@@ -1,5 +1,4 @@
 # $FreeBSD$
 
-SUBDIR+=	mount_smbfs
 SUBDIR+=	nvram
 SUBDIR+=	ofwdump

Modified: stable/10/usr.sbin/Makefile.sparc64
==============================================================================
--- stable/10/usr.sbin/Makefile.sparc64	Tue Jan 19 23:35:12 2016	(r294363)
+++ stable/10/usr.sbin/Makefile.sparc64	Tue Jan 19 23:36:49 2016	(r294364)
@@ -1,5 +1,4 @@
 # $FreeBSD$
 
 SUBDIR+=	eeprom
-SUBDIR+=	mount_smbfs
 SUBDIR+=	ofwdump

From owner-svn-src-all@freebsd.org  Wed Jan 20 00:03:29 2016
Return-Path: <owner-svn-src-all@freebsd.org>
Delivered-To: svn-src-all@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id 829D5A8987D;
 Wed, 20 Jan 2016 00:03:29 +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 518BF1863;
 Wed, 20 Jan 2016 00:03:29 +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 u0K03SdR089893;
 Wed, 20 Jan 2016 00:03:28 GMT (envelope-from jhb@FreeBSD.org)
Received: (from jhb@localhost)
 by repo.freebsd.org (8.15.2/8.15.2/Submit) id u0K03SiM089892;
 Wed, 20 Jan 2016 00:03:28 GMT (envelope-from jhb@FreeBSD.org)
Message-Id: <201601200003.u0K03SiM089892@repo.freebsd.org>
X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org
 using -f
From: John Baldwin <jhb@FreeBSD.org>
Date: Wed, 20 Jan 2016 00:03:28 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-head@freebsd.org
Subject: svn commit: r294365 - head/secure/lib/libssh
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.20
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for &quot;
 user&quot; and &quot; projects&quot; \)" <svn-src-all.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-all/>
List-Post: <mailto:svn-src-all@freebsd.org>
List-Help: <mailto:svn-src-all-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Wed, 20 Jan 2016 00:03:29 -0000

Author: jhb
Date: Wed Jan 20 00:03:28 2016
New Revision: 294365
URL: https://svnweb.freebsd.org/changeset/base/294365

Log:
  List source files (foo.c) instead of object files in SRCS.
  
  Reviewed by:	bdrewery

Modified:
  head/secure/lib/libssh/Makefile

Modified: head/secure/lib/libssh/Makefile
==============================================================================
--- head/secure/lib/libssh/Makefile	Tue Jan 19 23:36:49 2016	(r294364)
+++ head/secure/lib/libssh/Makefile	Wed Jan 20 00:03:28 2016	(r294365)
@@ -6,7 +6,7 @@ LIB=	ssh
 PRIVATELIB=	true
 SHLIB_MAJOR=	5
 SRCS=	ssh_api.c ssherr.c sshbuf.c sshkey.c sshbuf-getput-basic.c \
-	sshbuf-misc.c sshbuf-getput-crypto.c krl.o bitmap.o
+	sshbuf-misc.c sshbuf-getput-crypto.c krl.c bitmap.c
 SRCS+=	authfd.c authfile.c bufaux.c bufbn.c bufec.c buffer.c \
 	canohost.c channels.c cipher.c cipher-aes.c cipher-aesctr.c \
 	cipher-bf1.c cipher-ctr.c cipher-3des1.c cleanup.c \

From owner-svn-src-all@freebsd.org  Wed Jan 20 00:14:36 2016
Return-Path: <owner-svn-src-all@freebsd.org>
Delivered-To: svn-src-all@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0F07AA89F5D;
 Wed, 20 Jan 2016 00:14:36 +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 D28981219;
 Wed, 20 Jan 2016 00:14:35 +0000 (UTC) (envelope-from jhb@FreeBSD.org)
Received: from repo.freebsd.org ([127.0.1.37])
 by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u0K0EYx1092966;
 Wed, 20 Jan 2016 00:14:34 GMT (envelope-from jhb@FreeBSD.org)
Received: (from jhb@localhost)
 by repo.freebsd.org (8.15.2/8.15.2/Submit) id u0K0EY6c092965;
 Wed, 20 Jan 2016 00:14:34 GMT (envelope-from jhb@FreeBSD.org)
Message-Id: <201601200014.u0K0EY6c092965@repo.freebsd.org>
X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org
 using -f
From: John Baldwin <jhb@FreeBSD.org>
Date: Wed, 20 Jan 2016 00:14:34 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-head@freebsd.org
Subject: svn commit: r294366 - head/sys/compat/linuxkpi/common/src
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.20
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for &quot;
 user&quot; and &quot; projects&quot; \)" <svn-src-all.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-all/>
List-Post: <mailto:svn-src-all@freebsd.org>
List-Help: <mailto:svn-src-all-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Wed, 20 Jan 2016 00:14:36 -0000

Author: jhb
Date: Wed Jan 20 00:14:34 2016
New Revision: 294366
URL: https://svnweb.freebsd.org/changeset/base/294366

Log:
  Initialize vm_page_prot to VM_MEMATTR_DEFAULT instead of 0.
  
  If a driver's Linux mmap callback passed vm_page_prot through unchanged,
  then linux_dev_mmap_single() would try to apply whatever VM_MEMATTR_xxx
  value 0 is to the mapping.  On x86, VM_MEMATTR_DEFAULT is the PAT value
  for write-back (WB) which is 6, while 0 maps to the PAT value for
  uncacheable (UC).  Thus, any mmap request that did not explicitly set
  page_prot was tried to map memory as UC triggering the warning in
  sg_pager_getpages().
  
  Tested by:	np
  Reported by:	Krishnamraju Eraparaju @ Chelsio
  MFC after:	3 days
  Sponsored by:	Chelsio Communications

Modified:
  head/sys/compat/linuxkpi/common/src/linux_compat.c

Modified: head/sys/compat/linuxkpi/common/src/linux_compat.c
==============================================================================
--- head/sys/compat/linuxkpi/common/src/linux_compat.c	Wed Jan 20 00:03:28 2016	(r294365)
+++ head/sys/compat/linuxkpi/common/src/linux_compat.c	Wed Jan 20 00:14:34 2016	(r294366)
@@ -587,7 +587,7 @@ linux_dev_mmap_single(struct cdev *dev, 
 	vma.vm_end = size;
 	vma.vm_pgoff = *offset / PAGE_SIZE;
 	vma.vm_pfn = 0;
-	vma.vm_page_prot = 0;
+	vma.vm_page_prot = VM_MEMATTR_DEFAULT;
 	if (filp->f_op->mmap) {
 		error = -filp->f_op->mmap(filp, &vma);
 		if (error == 0) {

From owner-svn-src-all@freebsd.org  Wed Jan 20 00:26:52 2016
Return-Path: <owner-svn-src-all@freebsd.org>
Delivered-To: svn-src-all@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4BAE8A8846C;
 Wed, 20 Jan 2016 00:26: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 009A01893;
 Wed, 20 Jan 2016 00:26:51 +0000 (UTC) (envelope-from jhb@FreeBSD.org)
Received: from repo.freebsd.org ([127.0.1.37])
 by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u0K0QpbJ095909;
 Wed, 20 Jan 2016 00:26:51 GMT (envelope-from jhb@FreeBSD.org)
Received: (from jhb@localhost)
 by repo.freebsd.org (8.15.2/8.15.2/Submit) id u0K0Qpsg095908;
 Wed, 20 Jan 2016 00:26:51 GMT (envelope-from jhb@FreeBSD.org)
Message-Id: <201601200026.u0K0Qpsg095908@repo.freebsd.org>
X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org
 using -f
From: John Baldwin <jhb@FreeBSD.org>
Date: Wed, 20 Jan 2016 00:26:51 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-head@freebsd.org
Subject: svn commit: r294367 - head/lib/libpam/modules/pam_ssh
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.20
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for &quot;
 user&quot; and &quot; projects&quot; \)" <svn-src-all.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-all/>
List-Post: <mailto:svn-src-all@freebsd.org>
List-Help: <mailto:svn-src-all-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Wed, 20 Jan 2016 00:26:52 -0000

Author: jhb
Date: Wed Jan 20 00:26:50 2016
New Revision: 294367
URL: https://svnweb.freebsd.org/changeset/base/294367

Log:
  Update for API changes in OpenSSH 6.8p1.
  
  First, the authfd API now uses a direct file descriptor for the control
  socket instead of a more abstract AuthenticationConnection structure.
  Second, the functions now consistently return an error value.
  
  Reviewed by:	bdrewery

Modified:
  head/lib/libpam/modules/pam_ssh/pam_ssh.c

Modified: head/lib/libpam/modules/pam_ssh/pam_ssh.c
==============================================================================
--- head/lib/libpam/modules/pam_ssh/pam_ssh.c	Wed Jan 20 00:14:34 2016	(r294366)
+++ head/lib/libpam/modules/pam_ssh/pam_ssh.c	Wed Jan 20 00:26:50 2016	(r294367)
@@ -321,12 +321,11 @@ pam_ssh_start_agent(pam_handle_t *pamh)
 static int
 pam_ssh_add_keys_to_agent(pam_handle_t *pamh)
 {
-	AuthenticationConnection *ac;
 	const struct pam_ssh_key *psk;
 	const char **kfn;
 	const void *item;
 	char **envlist, **env;
-	int pam_err;
+	int fd, pam_err;
 
 	/* switch to PAM environment */
 	envlist = environ;
@@ -336,7 +335,7 @@ pam_ssh_add_keys_to_agent(pam_handle_t *
 	}
 
 	/* get a connection to the agent */
-	if ((ac = ssh_get_authentication_connection()) == NULL) {
+	if (ssh_get_authentication_socket(&fd) != 0) {
 		openpam_log(PAM_LOG_DEBUG, "failed to connect to the agent");
 		pam_err = PAM_SYSTEM_ERR;
 		goto end;
@@ -347,7 +346,7 @@ pam_ssh_add_keys_to_agent(pam_handle_t *
 		pam_err = pam_get_data(pamh, *kfn, &item);
 		if (pam_err == PAM_SUCCESS && item != NULL) {
 			psk = item;
-			if (ssh_add_identity(ac, psk->key, psk->comment))
+			if (ssh_add_identity(fd, psk->key, psk->comment) == 0)
 				openpam_log(PAM_LOG_DEBUG,
 				    "added %s to ssh agent", psk->comment);
 			else
@@ -358,11 +357,11 @@ pam_ssh_add_keys_to_agent(pam_handle_t *
 		}
 	}
 	pam_err = PAM_SUCCESS;
- end:
+
 	/* disconnect from agent */
-	if (ac != NULL)
-		ssh_close_authentication_connection(ac);
+	ssh_close_authentication_socket(fd);
 
+ end:
 	/* switch back to original environment */
 	for (env = environ; *env != NULL; ++env)
 		free(*env);

From owner-svn-src-all@freebsd.org  Wed Jan 20 00:41:02 2016
Return-Path: <owner-svn-src-all@freebsd.org>
Delivered-To: svn-src-all@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id E647FA88928;
 Wed, 20 Jan 2016 00:41:01 +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 CB5611DE3;
 Wed, 20 Jan 2016 00:41:01 +0000 (UTC)
 (envelope-from bdrewery@FreeBSD.org)
Received: from mail.xzibition.com (localhost [IPv6:::1])
 by freefall.freebsd.org (Postfix) with ESMTP id C508F1824;
 Wed, 20 Jan 2016 00:41:01 +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 669821C748;
 Wed, 20 Jan 2016 00:41:01 +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 EMFQHjm364oI; Wed, 20 Jan 2016 00:40:54 +0000 (UTC)
Subject: Re: svn commit: r291941 - in head: lib/libpam/modules/pam_ssh
 secure/lib/libssh secure/libexec/sftp-server secure/libexec/ssh-keysign
 secure/libexec/ssh-pkcs11-helper secure/usr.bin/scp secure/usr.bin/...
DKIM-Filter: OpenDKIM Filter v2.9.2 mail.xzibition.com 20EB51C743
Cc: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-head@freebsd.org
References: <201512071608.tB7G89BZ095366@repo.freebsd.org>
 <86vb6phdug.fsf@desk.des.no> <569E60BA.6050007@FreeBSD.org>
 <569E7524.5040806@FreeBSD.org>
From: Bryan Drewery <bdrewery@FreeBSD.org>
Openpgp: id=F9173CB2C3AAEA7A5C8A1F0935D771BB6E4697CF;
 url=http://www.shatow.net/bryan/bryan2.asc
Organization: FreeBSD
Message-ID: <569ED796.6030300@FreeBSD.org>
Date: Tue, 19 Jan 2016 16:40:54 -0800
User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:38.0) Gecko/20100101
 Thunderbird/38.5.1
MIME-Version: 1.0
In-Reply-To: <569E7524.5040806@FreeBSD.org>
Content-Type: multipart/signed; micalg=pgp-sha1;
 protocol="application/pgp-signature";
 boundary="TvTqboptPtXcfQXTHQCRttLBeSjRuiGE0"
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.20
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for &quot;
 user&quot; and &quot; projects&quot; \)" <svn-src-all.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-all/>
List-Post: <mailto:svn-src-all@freebsd.org>
List-Help: <mailto:svn-src-all-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Wed, 20 Jan 2016 00:41:02 -0000

This is an OpenPGP/MIME signed message (RFC 4880 and 3156)
--TvTqboptPtXcfQXTHQCRttLBeSjRuiGE0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable

On 1/19/2016 9:40 AM, Bryan Drewery wrote:
> On 1/19/2016 8:13 AM, Bryan Drewery wrote:
>> On 1/19/2016 5:56 AM, Dag-Erling Sm=C3=B8rgrav wrote:
>>> Bryan Drewery <bdrewery@FreeBSD.org> writes:
>>>> Log:
>>>>   Replace unneeded manual dependency on header by adding it to SRCS.=

>>>>  =20
>>>>   bsd.lib.mk and bsd.prog.mk already depend all objs on headers in S=
RCS if
>>>>   there is not yet a depend file.  The headers in SRCS are never bui=
lt or
>>>>   installed.  After 'make depend' the header was already added as a =
proper
>>>>   dependency on the objects where needed.
>>>
>>> This doesn't work.  Try the following:
>>>
>>> $ cd /usr/src/secure/lib/libssh
>>> $ make depend && make
>>> $ touch /usr/src/crypto/openssh/ssh_namespace.h
>>> $ make
>>
>> Well, it sort of works with WITH_FAST_DEPEND which will be default ver=
y
>> shortly.
>>
> ...
>>> $ grep -c ssh_namespace $(make -V.OBJDIR)/.depend
>>> 0
>>>
>>
>> That is expected. The dependency is defined in bsd.lib.mk. Granted it =
is
>> dependent on .depend existing, but I am going to remove that check so =
it
>> is always defined.
>>
>=20
> The problem with the old method (mkdep which is still default) is that
> the -include is not passed to mkdep. FAST_DEPEND does not have that
> issue since it generates the .depend files during compilation, where th=
e
> -include is present.
>=20
>=20

It's manifesting for people now with -DNO_CLEAN using mkdep. I'm working
on a solution rather than reverting.

/usr/obj/usr/src/tmp/usr/lib/libprivatessh.so: undefined reference to
`Fssh_crypto_scalarmult_curve25519'

--=20
Regards,
Bryan Drewery


--TvTqboptPtXcfQXTHQCRttLBeSjRuiGE0
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

iQEcBAEBAgAGBQJWnteWAAoJEDXXcbtuRpfPsjQH/RWW0mbcgtML62Xbaaf/5BKU
WPwd9uIv1zRsAyqC3Wh/KyCI5pEHqwAbIbzZ4ogX9ZjGsQSZMM8XTSUC/1n4RiIT
hVnjd9F8TGDxS2uHBZK/GbQ+gF3KFKhRd8+iDipB1ZNgE/6SJKbqrg+Yo7CWlRet
gjqJ42R5H2FHpk/Ez7QXWKmsodNWEkjRrTQCLKyzpdK6YFe/qIVD+2s1EvDoYmeR
Ci/iuHDVDH9povezucjFiad1wXlRuC1QNt5gxANiREk6gJymGlqHV3t/wHshV8+0
63q6nzPSAsKT2plSz68bBbNue+TkjKlgUSCyPWExfVZDsWP8psyaGodohrBaOXw=
=UEaS
-----END PGP SIGNATURE-----

--TvTqboptPtXcfQXTHQCRttLBeSjRuiGE0--

From owner-svn-src-all@freebsd.org  Wed Jan 20 01:09:55 2016
Return-Path: <owner-svn-src-all@freebsd.org>
Delivered-To: svn-src-all@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id DA28FA82785;
 Wed, 20 Jan 2016 01:09:55 +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 A96CD1B5A;
 Wed, 20 Jan 2016 01:09:55 +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 u0K19sVf007802;
 Wed, 20 Jan 2016 01:09:54 GMT (envelope-from jhb@FreeBSD.org)
Received: (from jhb@localhost)
 by repo.freebsd.org (8.15.2/8.15.2/Submit) id u0K19rv4007791;
 Wed, 20 Jan 2016 01:09:53 GMT (envelope-from jhb@FreeBSD.org)
Message-Id: <201601200109.u0K19rv4007791@repo.freebsd.org>
X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org
 using -f
From: John Baldwin <jhb@FreeBSD.org>
Date: Wed, 20 Jan 2016 01:09:53 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org
Subject: svn commit: r294368 - in stable/10/sys: amd64/linux amd64/linux32
 cddl/dev/systrace compat/linux kern modules/dtrace
 modules/dtrace/systrace_linux modules/dtrace/systrace_linux32
X-SVN-Group: stable-10
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.20
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for &quot;
 user&quot; and &quot; projects&quot; \)" <svn-src-all.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-all/>
List-Post: <mailto:svn-src-all@freebsd.org>
List-Help: <mailto:svn-src-all-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Wed, 20 Jan 2016 01:09:56 -0000

Author: jhb
Date: Wed Jan 20 01:09:53 2016
New Revision: 294368
URL: https://svnweb.freebsd.org/changeset/base/294368

Log:
  MFC 289769,289822,290143,290144:
  Rename remaining linux32 symbols from linux_* to linux32_*.
  
  289769:
  Rename remaining linux32 symbols such as linux_sysent[] and
  linux_syscallnames[] from linux_* to linux32_* to avoid conflicts with
  linux64.ko.  While here, add support for linux64 binaries to systrace.
  - Update NOPROTO entries in amd64/linux/syscalls.master to match the
    main table to fix systrace build.
  - Add a special case for union l_semun arguments to the systrace
    generation.
  - The systrace_linux32 module now only builds the systrace_linux32.ko.
    module on amd64.
  - Add a new systrace_linux module that builds on both i386 and amd64.
    For i386 it builds the existing systrace_linux.ko.  For amd64 it
    builds a systrace_linux.ko for 64-bit binaries.
  
  289822:
  Fix build for the KTR-enabled kernels.
  
  290143:
  Fix build with DEBUG defined.
  
  290144:
  Update for LINUX32 rename.  The assembler didn't complain about undefined
  symbols but just used 0 after the rename.

Added:
  stable/10/sys/modules/dtrace/systrace_linux/
     - copied from r289769, head/sys/modules/dtrace/systrace_linux/
Modified:
  stable/10/sys/amd64/linux/syscalls.master
  stable/10/sys/amd64/linux32/linux.h
  stable/10/sys/amd64/linux32/linux32_locore.s
  stable/10/sys/amd64/linux32/linux32_sysvec.c
  stable/10/sys/amd64/linux32/syscalls.conf
  stable/10/sys/amd64/linux32/syscalls.master
  stable/10/sys/cddl/dev/systrace/systrace.c
  stable/10/sys/compat/linux/linux_misc.c
  stable/10/sys/kern/makesyscalls.sh
  stable/10/sys/modules/dtrace/Makefile
  stable/10/sys/modules/dtrace/systrace_linux32/Makefile
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/sys/amd64/linux/syscalls.master
==============================================================================
--- stable/10/sys/amd64/linux/syscalls.master	Wed Jan 20 00:26:50 2016	(r294367)
+++ stable/10/sys/amd64/linux/syscalls.master	Wed Jan 20 01:09:53 2016	(r294368)
@@ -49,8 +49,8 @@
 				    struct l_newstat *buf); }
 6	AUE_LSTAT	STD	{ int linux_newlstat(char *path, \
 				    struct l_newstat *buf); }
-7	AUE_POLL	NOPROTO	{ int poll(struct pollfd*, \
-				    unsigned int nfds, int timeout); }
+7	AUE_POLL	NOPROTO	{ int poll(struct pollfd *fds, u_int nfds, \
+				    int timeout); }
 8	AUE_LSEEK	STD	{ int linux_lseek(l_uint fdes, l_off_t off, \
 				    l_int whence); }
 9	AUE_MMAP	STD	{ int linux_mmap2(l_ulong addr, l_ulong len, \
@@ -316,7 +316,7 @@
 161	AUE_CHROOT	NOPROTO	{ int chroot(char *path); }
 162	AUE_SYNC	NOPROTO	{ int sync(void); }
 163	AUE_ACCT	NOPROTO	{ int acct(char *path); }
-164	AUE_SETTIMEOFDAY	NOPROTO	{ int settimeofday(struct l_timeval *tp, struct timezone *tzp); }
+164	AUE_SETTIMEOFDAY	NOPROTO	{ int settimeofday(struct l_timeval *tv, struct timezone *tzp); }
 165	AUE_MOUNT	STD	{ int linux_mount(char *specialfile, \
 				    char *dir, char *filesystemtype, \
 				    l_ulong rwflag, void *data); }

Modified: stable/10/sys/amd64/linux32/linux.h
==============================================================================
--- stable/10/sys/amd64/linux32/linux.h	Wed Jan 20 00:26:50 2016	(r294367)
+++ stable/10/sys/amd64/linux32/linux.h	Wed Jan 20 01:09:53 2016	(r294368)
@@ -40,7 +40,7 @@
  * debugging support
  */
 extern u_char linux_debug_map[];
-#define	ldebug(name)	isclr(linux_debug_map, LINUX_SYS_linux_ ## name)
+#define	ldebug(name)	isclr(linux_debug_map, LINUX32_SYS_linux_ ## name)
 #define	ARGS(nm, fmt)	"linux(%ld/%ld): "#nm"("fmt")\n",			\
 			(long)td->td_proc->p_pid, (long)td->td_tid
 #define	LMSG(fmt)	"linux(%ld/%ld): "fmt"\n",				\

Modified: stable/10/sys/amd64/linux32/linux32_locore.s
==============================================================================
--- stable/10/sys/amd64/linux32/linux32_locore.s	Wed Jan 20 00:26:50 2016	(r294367)
+++ stable/10/sys/amd64/linux32/linux32_locore.s	Wed Jan 20 01:09:53 2016	(r294368)
@@ -28,7 +28,7 @@ NON_GPROF_ENTRY(linux32_sigcode)
 	jmp	*LINUX_SIGF_HANDLER(%ebx)
 .startsigcode:
 	popl	%eax
-	movl	$LINUX_SYS_linux_sigreturn,%eax	/* linux_sigreturn() */
+	movl	$LINUX32_SYS_linux_sigreturn,%eax	/* linux_sigreturn() */
 	int	$0x80				/* enter kernel with args */
 .endsigcode:
 0:	jmp	0b
@@ -44,7 +44,7 @@ NON_GPROF_ENTRY(linux32_rt_sigcode)
 	push	%eax
 	jmp	*LINUX_RT_SIGF_HANDLER(%edi)
 .startrtsigcode:
-	movl	$LINUX_SYS_linux_rt_sigreturn,%eax   /* linux_rt_sigreturn() */
+	movl	$LINUX32_SYS_linux_rt_sigreturn,%eax   /* linux_rt_sigreturn() */
 	int	$0x80				/* enter kernel with args */
 .endrtsigcode:
 0:	jmp	0b

Modified: stable/10/sys/amd64/linux32/linux32_sysvec.c
==============================================================================
--- stable/10/sys/amd64/linux32/linux32_sysvec.c	Wed Jan 20 00:26:50 2016	(r294367)
+++ stable/10/sys/amd64/linux32/linux32_sysvec.c	Wed Jan 20 01:09:53 2016	(r294368)
@@ -105,8 +105,8 @@ MODULE_VERSION(linux, 1);
  * to syscall 0. This is slightly less bogus than using
  * ldebug(sigreturn).
  */
-#define	LINUX_SYS_linux_rt_sendsig	0
-#define	LINUX_SYS_linux_sendsig		0
+#define	LINUX32_SYS_linux_rt_sendsig	0
+#define	LINUX32_SYS_linux_sendsig	0
 
 const char *linux_kplatform;
 static int linux_szsigcode;
@@ -115,7 +115,7 @@ static char *linux_shared_page_mapping;
 extern char _binary_linux32_locore_o_start;
 extern char _binary_linux32_locore_o_end;
 
-extern struct sysent linux_sysent[LINUX_SYS_MAXSYSCALL];
+extern struct sysent linux32_sysent[LINUX32_SYS_MAXSYSCALL];
 
 SET_DECLARE(linux_ioctl_handler_set, struct linux_ioctl_handler);
 
@@ -1008,8 +1008,8 @@ linux32_fixlimit(struct rlimit *rl, int 
 }
 
 struct sysentvec elf_linux_sysvec = {
-	.sv_size	= LINUX_SYS_MAXSYSCALL,
-	.sv_table	= linux_sysent,
+	.sv_size	= LINUX32_SYS_MAXSYSCALL,
+	.sv_table	= linux32_sysent,
 	.sv_mask	= 0,
 	.sv_sigsize	= 0,
 	.sv_sigtbl	= NULL,

Modified: stable/10/sys/amd64/linux32/syscalls.conf
==============================================================================
--- stable/10/sys/amd64/linux32/syscalls.conf	Wed Jan 20 00:26:50 2016	(r294367)
+++ stable/10/sys/amd64/linux32/syscalls.conf	Wed Jan 20 01:09:53 2016	(r294368)
@@ -1,11 +1,11 @@
 # $FreeBSD$
 sysnames="linux32_syscalls.c"
 sysproto="linux32_proto.h"
-sysproto_h=_LINUX_SYSPROTO_H_
+sysproto_h=_LINUX32_SYSPROTO_H_
 syshdr="linux32_syscall.h"
 syssw="linux32_sysent.c"
 sysmk="/dev/null"
-syscallprefix="LINUX_SYS_"
-switchname="linux_sysent"
-namesname="linux_syscallnames"
+syscallprefix="LINUX32_SYS_"
+switchname="linux32_sysent"
+namesname="linux32_syscallnames"
 systrace="linux32_systrace_args.c"

Modified: stable/10/sys/amd64/linux32/syscalls.master
==============================================================================
--- stable/10/sys/amd64/linux32/syscalls.master	Wed Jan 20 00:26:50 2016	(r294367)
+++ stable/10/sys/amd64/linux32/syscalls.master	Wed Jan 20 01:09:53 2016	(r294368)
@@ -2,7 +2,7 @@
 
 ;	@(#)syscalls.master	8.1 (Berkeley) 7/19/93
 ; System call name/number master file (or rather, slave, from LINUX).
-; Processed to create linux_sysent.c, linux_proto.h and linux_syscall.h.
+; Processed to create linux32_sysent.c, linux32_proto.h and linux32_syscall.h.
 
 ; Columns: number audit type nargs name alt{name,tag,rtyp}/comments
 ;	number	system call number, must be in order

Modified: stable/10/sys/cddl/dev/systrace/systrace.c
==============================================================================
--- stable/10/sys/cddl/dev/systrace/systrace.c	Wed Jan 20 00:26:50 2016	(r294367)
+++ stable/10/sys/cddl/dev/systrace/systrace.c	Wed Jan 20 01:09:53 2016	(r294368)
@@ -60,24 +60,37 @@
 
 #ifdef LINUX_SYSTRACE
 #if defined(__amd64__)
-#include <amd64/linux32/linux.h>
-#include <amd64/linux32/linux32_proto.h>
-#include <amd64/linux32/linux32_syscalls.c>
-#include <amd64/linux32/linux32_systrace_args.c>
-#define	MODNAME		"linux32"
+#include <amd64/linux/linux.h>
+#include <amd64/linux/linux_proto.h>
+#include <amd64/linux/linux_syscalls.c>
+#include <amd64/linux/linux_systrace_args.c>
 #elif defined(__i386__)
 #include <i386/linux/linux.h>
 #include <i386/linux/linux_proto.h>
 #include <i386/linux/linux_syscalls.c>
 #include <i386/linux/linux_systrace_args.c>
-#define	MODNAME		"linux"
 #else
 #error Only i386 and amd64 are supported.
 #endif
+#define	MODNAME		"linux"
 extern struct sysent linux_sysent[];
 #define	MAXSYSCALL	LINUX_SYS_MAXSYSCALL
 #define	SYSCALLNAMES	linux_syscallnames
 #define	SYSENT		linux_sysent
+#elif defined(LINUX32_SYSTRACE)
+#if defined(__amd64__)
+#include <amd64/linux32/linux.h>
+#include <amd64/linux32/linux32_proto.h>
+#include <amd64/linux32/linux32_syscalls.c>
+#include <amd64/linux32/linux32_systrace_args.c>
+#else
+#error Only amd64 is supported.
+#endif
+#define	MODNAME		"linux32"
+extern struct sysent linux32_sysent[];
+#define	MAXSYSCALL	LINUX32_SYS_MAXSYSCALL
+#define	SYSCALLNAMES	linux32_syscallnames
+#define	SYSENT		linux32_sysent
 #elif defined(FREEBSD32_SYSTRACE)
 /*
  * The syscall arguments are processed into a DTrace argument array
@@ -103,6 +116,7 @@ extern const char *freebsd32_syscallname
 #define	MAXSYSCALL	SYS_MAXSYSCALL
 #define	SYSCALLNAMES	syscallnames
 #define	SYSENT		sysent
+#define	NATIVE_ABI
 #endif
 
 #define	PROVNAME	"syscall"
@@ -132,7 +146,7 @@ static void	systrace_load(void *);
 static struct cdevsw systrace_cdevsw = {
 	.d_version	= D_VERSION,
 	.d_open		= systrace_open,
-#ifdef LINUX_SYSTRACE
+#ifndef NATIVE_ABI
 	.d_name		= "systrace_" MODNAME,
 #else
 	.d_name		= "systrace",
@@ -171,7 +185,7 @@ static dtrace_provider_id_t	systrace_id;
 typedef void (*systrace_dtrace_probe_t)(dtrace_id_t, uintptr_t, uintptr_t,
     uintptr_t, uintptr_t, uintptr_t, uintptr_t, uintptr_t, uintptr_t);
 
-#if !defined(LINUX_SYSTRACE)
+#ifdef NATIVE_ABI
 /*
  * Probe callback function.
  *
@@ -314,7 +328,7 @@ systrace_load(void *dummy)
 	    NULL, &systrace_pops, NULL, &systrace_id) != 0)
 		return;
 
-#if !defined(LINUX_SYSTRACE)
+#ifdef NATIVE_ABI
 	systrace_probe_func = systrace_probe;
 #endif
 }
@@ -328,7 +342,7 @@ systrace_unload()
 	if ((error = dtrace_unregister(systrace_id)) != 0)
 		return (error);
 
-#if !defined(LINUX_SYSTRACE)
+#ifdef NATIVE_ABI
 	systrace_probe_func = NULL;
 #endif
 
@@ -370,6 +384,16 @@ SYSINIT(systrace_load, SI_SUB_DTRACE_PRO
 SYSUNINIT(systrace_unload, SI_SUB_DTRACE_PROVIDER, SI_ORDER_ANY, systrace_unload, NULL);
 
 #ifdef LINUX_SYSTRACE
+DEV_MODULE(systrace_linux, systrace_modevent, NULL);
+MODULE_VERSION(systrace_linux, 1);
+#ifdef __amd64__
+MODULE_DEPEND(systrace_linux, linux64, 1, 1, 1);
+#else
+MODULE_DEPEND(systrace_linux, linux, 1, 1, 1);
+#endif
+MODULE_DEPEND(systrace_linux, dtrace, 1, 1, 1);
+MODULE_DEPEND(systrace_linux, opensolaris, 1, 1, 1);
+#elif defined(LINUX32_SYSTRACE)
 DEV_MODULE(systrace_linux32, systrace_modevent, NULL);
 MODULE_VERSION(systrace_linux32, 1);
 MODULE_DEPEND(systrace_linux32, linux, 1, 1, 1);

Modified: stable/10/sys/compat/linux/linux_misc.c
==============================================================================
--- stable/10/sys/compat/linux/linux_misc.c	Wed Jan 20 00:26:50 2016	(r294367)
+++ stable/10/sys/compat/linux/linux_misc.c	Wed Jan 20 01:09:53 2016	(r294368)
@@ -2362,7 +2362,13 @@ linux_ppoll(struct thread *td, struct li
 #if defined(DEBUG) || defined(KTR)
 /* XXX: can be removed when every ldebug(...) and KTR stuff are removed. */
 
-u_char linux_debug_map[howmany(LINUX_SYS_MAXSYSCALL, sizeof(u_char))];
+#ifdef COMPAT_LINUX32
+#define	L_MAXSYSCALL	LINUX32_SYS_MAXSYSCALL
+#else
+#define	L_MAXSYSCALL	LINUX_SYS_MAXSYSCALL
+#endif
+
+u_char linux_debug_map[howmany(L_MAXSYSCALL, sizeof(u_char))];
 
 static int
 linux_debug(int syscall, int toggle, int global)
@@ -2374,7 +2380,7 @@ linux_debug(int syscall, int toggle, int
 		memset(linux_debug_map, c, sizeof(linux_debug_map));
 		return (0);
 	}
-	if (syscall < 0 || syscall >= LINUX_SYS_MAXSYSCALL)
+	if (syscall < 0 || syscall >= L_MAXSYSCALL)
 		return (EINVAL);
 	if (toggle)
 		clrbit(linux_debug_map, syscall);
@@ -2382,6 +2388,7 @@ linux_debug(int syscall, int toggle, int
 		setbit(linux_debug_map, syscall);
 	return (0);
 }
+#undef L_MAXSYSCALL
 
 /*
  * Usage: sysctl linux.debug=<syscall_nr>.<0/1>

Modified: stable/10/sys/kern/makesyscalls.sh
==============================================================================
--- stable/10/sys/kern/makesyscalls.sh	Wed Jan 20 00:26:50 2016	(r294367)
+++ stable/10/sys/kern/makesyscalls.sh	Wed Jan 20 01:09:53 2016	(r294368)
@@ -410,6 +410,10 @@ s/\$//g
 					printf("\t\tuarg[%d] = (intptr_t) p->%s; /* %s */\n", \
 					     i - 1, \
 					     argname[i], arg) > systrace
+				else if (arg == "union l_semun")
+					printf("\t\tuarg[%d] = p->%s.buf; /* %s */\n", \
+					     i - 1, \
+					     argname[i], arg) > systrace
 				else if (substr(arg, 1, 1) == "u" || arg == "size_t")
 					printf("\t\tuarg[%d] = p->%s; /* %s */\n", \
 					     i - 1, \

Modified: stable/10/sys/modules/dtrace/Makefile
==============================================================================
--- stable/10/sys/modules/dtrace/Makefile	Wed Jan 20 00:26:50 2016	(r294367)
+++ stable/10/sys/modules/dtrace/Makefile	Wed Jan 20 01:09:53 2016	(r294368)
@@ -16,7 +16,10 @@ SUBDIR=		dtmalloc	\
 		systrace
 
 .if ${MACHINE_CPUARCH} == "amd64" || ${MACHINE_CPUARCH} == "i386"
-SUBDIR+=	fasttrap fbt systrace_linux32
+SUBDIR+=	fasttrap fbt systrace_linux
+.endif
+.if ${MACHINE_CPUARCH} == "amd64"
+SUBDIR+=	systrace_linux32
 .endif
 .if ${MACHINE_CPUARCH} == "powerpc"
 SUBDIR+=	fbt fasttrap

Modified: stable/10/sys/modules/dtrace/systrace_linux32/Makefile
==============================================================================
--- stable/10/sys/modules/dtrace/systrace_linux32/Makefile	Wed Jan 20 00:26:50 2016	(r294367)
+++ stable/10/sys/modules/dtrace/systrace_linux32/Makefile	Wed Jan 20 01:09:53 2016	(r294368)
@@ -2,18 +2,14 @@
 
 .PATH: ${.CURDIR}/../../../cddl/dev/systrace
 
-.if ${MACHINE} == "amd64"
 KMOD=		systrace_linux32
-.else
-KMOD=		systrace_linux
-.endif
 
 SRCS=		systrace.c
 SRCS+=		vnode_if.h
 
 CFLAGS+=	-I${.CURDIR}/../../../cddl/compat/opensolaris \
 		-I${.CURDIR}/../../../cddl/contrib/opensolaris/uts/common \
-		-I${.CURDIR}/../../.. -DLINUX_SYSTRACE
+		-I${.CURDIR}/../../.. -DLINUX32_SYSTRACE
 
 .include <bsd.kmod.mk>
 

From owner-svn-src-all@freebsd.org  Wed Jan 20 01:11:03 2016
Return-Path: <owner-svn-src-all@freebsd.org>
Delivered-To: svn-src-all@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id EEC4DA82847;
 Wed, 20 Jan 2016 01:11:03 +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 A5CB91D1D;
 Wed, 20 Jan 2016 01:11:03 +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 u0K1B2Jc007927;
 Wed, 20 Jan 2016 01:11:02 GMT (envelope-from jhb@FreeBSD.org)
Received: (from jhb@localhost)
 by repo.freebsd.org (8.15.2/8.15.2/Submit) id u0K1B2gF007919;
 Wed, 20 Jan 2016 01:11:02 GMT (envelope-from jhb@FreeBSD.org)
Message-Id: <201601200111.u0K1B2gF007919@repo.freebsd.org>
X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org
 using -f
From: John Baldwin <jhb@FreeBSD.org>
Date: Wed, 20 Jan 2016 01:11:02 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org
Subject: svn commit: r294369 - in stable/10/sys/amd64: linux linux32
X-SVN-Group: stable-10
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.20
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for &quot;
 user&quot; and &quot; projects&quot; \)" <svn-src-all.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-all/>
List-Post: <mailto:svn-src-all@freebsd.org>
List-Help: <mailto:svn-src-all-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Wed, 20 Jan 2016 01:11:04 -0000

Author: jhb
Date: Wed Jan 20 01:11:01 2016
New Revision: 294369
URL: https://svnweb.freebsd.org/changeset/base/294369

Log:
  Regen for r294368.

Modified:
  stable/10/sys/amd64/linux/linux_proto.h
  stable/10/sys/amd64/linux/linux_syscall.h
  stable/10/sys/amd64/linux/linux_syscalls.c
  stable/10/sys/amd64/linux/linux_sysent.c
  stable/10/sys/amd64/linux/linux_systrace_args.c
  stable/10/sys/amd64/linux32/linux32_proto.h
  stable/10/sys/amd64/linux32/linux32_syscall.h
  stable/10/sys/amd64/linux32/linux32_syscalls.c
  stable/10/sys/amd64/linux32/linux32_sysent.c

Modified: stable/10/sys/amd64/linux/linux_proto.h
==============================================================================
--- stable/10/sys/amd64/linux/linux_proto.h	Wed Jan 20 01:09:53 2016	(r294368)
+++ stable/10/sys/amd64/linux/linux_proto.h	Wed Jan 20 01:11:01 2016	(r294369)
@@ -3,7 +3,7 @@
  *
  * DO NOT EDIT-- this file is automatically generated.
  * $FreeBSD$
- * created from FreeBSD: stable/10/sys/amd64/linux/syscalls.master 293592 2016-01-09 17:54:37Z dchagin 
+ * created from FreeBSD: stable/10/sys/amd64/linux/syscalls.master 294368 2016-01-20 01:09:53Z jhb 
  */
 
 #ifndef _LINUX_SYSPROTO_H_

Modified: stable/10/sys/amd64/linux/linux_syscall.h
==============================================================================
--- stable/10/sys/amd64/linux/linux_syscall.h	Wed Jan 20 01:09:53 2016	(r294368)
+++ stable/10/sys/amd64/linux/linux_syscall.h	Wed Jan 20 01:11:01 2016	(r294369)
@@ -3,7 +3,7 @@
  *
  * DO NOT EDIT-- this file is automatically generated.
  * $FreeBSD$
- * created from FreeBSD: stable/10/sys/amd64/linux/syscalls.master 293592 2016-01-09 17:54:37Z dchagin 
+ * created from FreeBSD: stable/10/sys/amd64/linux/syscalls.master 294368 2016-01-20 01:09:53Z jhb 
  */
 
 #define	LINUX_SYS_read	0

Modified: stable/10/sys/amd64/linux/linux_syscalls.c
==============================================================================
--- stable/10/sys/amd64/linux/linux_syscalls.c	Wed Jan 20 01:09:53 2016	(r294368)
+++ stable/10/sys/amd64/linux/linux_syscalls.c	Wed Jan 20 01:11:01 2016	(r294369)
@@ -3,7 +3,7 @@
  *
  * DO NOT EDIT-- this file is automatically generated.
  * $FreeBSD$
- * created from FreeBSD: stable/10/sys/amd64/linux/syscalls.master 293592 2016-01-09 17:54:37Z dchagin 
+ * created from FreeBSD: stable/10/sys/amd64/linux/syscalls.master 294368 2016-01-20 01:09:53Z jhb 
  */
 
 const char *linux_syscallnames[] = {

Modified: stable/10/sys/amd64/linux/linux_sysent.c
==============================================================================
--- stable/10/sys/amd64/linux/linux_sysent.c	Wed Jan 20 01:09:53 2016	(r294368)
+++ stable/10/sys/amd64/linux/linux_sysent.c	Wed Jan 20 01:11:01 2016	(r294369)
@@ -3,7 +3,7 @@
  *
  * DO NOT EDIT-- this file is automatically generated.
  * $FreeBSD$
- * created from FreeBSD: stable/10/sys/amd64/linux/syscalls.master 293592 2016-01-09 17:54:37Z dchagin 
+ * created from FreeBSD: stable/10/sys/amd64/linux/syscalls.master 294368 2016-01-20 01:09:53Z jhb 
  */
 
 #include <sys/param.h>

Modified: stable/10/sys/amd64/linux/linux_systrace_args.c
==============================================================================
--- stable/10/sys/amd64/linux/linux_systrace_args.c	Wed Jan 20 01:09:53 2016	(r294368)
+++ stable/10/sys/amd64/linux/linux_systrace_args.c	Wed Jan 20 01:11:01 2016	(r294369)
@@ -73,8 +73,8 @@ systrace_args(int sysnum, void *params, 
 	/* poll */
 	case 7: {
 		struct poll_args *p = params;
-		iarg[0] = p->*; /* struct pollfd */
-		uarg[1] = p->nfds; /* unsigned int */
+		uarg[0] = (intptr_t) p->fds; /* struct pollfd * */
+		uarg[1] = p->nfds; /* u_int */
 		iarg[2] = p->timeout; /* int */
 		*n_args = 3;
 		break;
@@ -591,7 +591,7 @@ systrace_args(int sysnum, void *params, 
 		iarg[0] = p->semid; /* l_int */
 		iarg[1] = p->semnum; /* l_int */
 		iarg[2] = p->cmd; /* l_int */
-		uarg[3] = p->arg; /* union l_semun */
+		uarg[3] = p->arg.buf; /* union l_semun */
 		*n_args = 4;
 		break;
 	}
@@ -1327,7 +1327,7 @@ systrace_args(int sysnum, void *params, 
 	/* settimeofday */
 	case 164: {
 		struct settimeofday_args *p = params;
-		uarg[0] = (intptr_t) p->tp; /* struct l_timeval * */
+		uarg[0] = (intptr_t) p->tv; /* struct l_timeval * */
 		uarg[1] = (intptr_t) p->tzp; /* struct timezone * */
 		*n_args = 2;
 		break;
@@ -2380,10 +2380,10 @@ systrace_entry_setargdesc(int sysnum, in
 	case 7:
 		switch(ndx) {
 		case 0:
-			p = "struct pollfd";
+			p = "struct pollfd *";
 			break;
 		case 1:
-			p = "unsigned int";
+			p = "u_int";
 			break;
 		case 2:
 			p = "int";

Modified: stable/10/sys/amd64/linux32/linux32_proto.h
==============================================================================
--- stable/10/sys/amd64/linux32/linux32_proto.h	Wed Jan 20 01:09:53 2016	(r294368)
+++ stable/10/sys/amd64/linux32/linux32_proto.h	Wed Jan 20 01:11:01 2016	(r294369)
@@ -3,11 +3,11 @@
  *
  * DO NOT EDIT-- this file is automatically generated.
  * $FreeBSD$
- * created from FreeBSD: stable/10/sys/amd64/linux32/syscalls.master 293592 2016-01-09 17:54:37Z dchagin 
+ * created from FreeBSD: stable/10/sys/amd64/linux32/syscalls.master 294368 2016-01-20 01:09:53Z jhb 
  */
 
-#ifndef _LINUX_SYSPROTO_H_
-#define	_LINUX_SYSPROTO_H_
+#ifndef _LINUX32_SYSPROTO_H_
+#define	_LINUX32_SYSPROTO_H_
 
 #include <sys/signal.h>
 #include <sys/acl.h>
@@ -1464,286 +1464,286 @@ int	linux_process_vm_writev(struct threa
 
 #endif /* COMPAT_FREEBSD7 */
 
-#define	LINUX_SYS_AUE_linux_exit	AUE_EXIT
-#define	LINUX_SYS_AUE_linux_fork	AUE_FORK
-#define	LINUX_SYS_AUE_linux_open	AUE_OPEN_RWTC
-#define	LINUX_SYS_AUE_linux_waitpid	AUE_WAIT4
-#define	LINUX_SYS_AUE_linux_creat	AUE_CREAT
-#define	LINUX_SYS_AUE_linux_link	AUE_LINK
-#define	LINUX_SYS_AUE_linux_unlink	AUE_UNLINK
-#define	LINUX_SYS_AUE_linux_execve	AUE_EXECVE
-#define	LINUX_SYS_AUE_linux_chdir	AUE_CHDIR
-#define	LINUX_SYS_AUE_linux_time	AUE_NULL
-#define	LINUX_SYS_AUE_linux_mknod	AUE_MKNOD
-#define	LINUX_SYS_AUE_linux_chmod	AUE_CHMOD
-#define	LINUX_SYS_AUE_linux_lchown16	AUE_LCHOWN
-#define	LINUX_SYS_AUE_linux_stat	AUE_STAT
-#define	LINUX_SYS_AUE_linux_lseek	AUE_LSEEK
-#define	LINUX_SYS_AUE_linux_getpid	AUE_GETPID
-#define	LINUX_SYS_AUE_linux_mount	AUE_MOUNT
-#define	LINUX_SYS_AUE_linux_oldumount	AUE_UMOUNT
-#define	LINUX_SYS_AUE_linux_setuid16	AUE_SETUID
-#define	LINUX_SYS_AUE_linux_getuid16	AUE_GETUID
-#define	LINUX_SYS_AUE_linux_stime	AUE_SETTIMEOFDAY
-#define	LINUX_SYS_AUE_linux_ptrace	AUE_PTRACE
-#define	LINUX_SYS_AUE_linux_alarm	AUE_NULL
-#define	LINUX_SYS_AUE_linux_pause	AUE_NULL
-#define	LINUX_SYS_AUE_linux_utime	AUE_UTIME
-#define	LINUX_SYS_AUE_linux_access	AUE_ACCESS
-#define	LINUX_SYS_AUE_linux_nice	AUE_NICE
-#define	LINUX_SYS_AUE_linux_kill	AUE_KILL
-#define	LINUX_SYS_AUE_linux_rename	AUE_RENAME
-#define	LINUX_SYS_AUE_linux_mkdir	AUE_MKDIR
-#define	LINUX_SYS_AUE_linux_rmdir	AUE_RMDIR
-#define	LINUX_SYS_AUE_linux_pipe	AUE_PIPE
-#define	LINUX_SYS_AUE_linux_times	AUE_NULL
-#define	LINUX_SYS_AUE_linux_brk	AUE_NULL
-#define	LINUX_SYS_AUE_linux_setgid16	AUE_SETGID
-#define	LINUX_SYS_AUE_linux_getgid16	AUE_GETGID
-#define	LINUX_SYS_AUE_linux_signal	AUE_NULL
-#define	LINUX_SYS_AUE_linux_geteuid16	AUE_GETEUID
-#define	LINUX_SYS_AUE_linux_getegid16	AUE_GETEGID
-#define	LINUX_SYS_AUE_linux_umount	AUE_UMOUNT
-#define	LINUX_SYS_AUE_linux_ioctl	AUE_IOCTL
-#define	LINUX_SYS_AUE_linux_fcntl	AUE_FCNTL
-#define	LINUX_SYS_AUE_linux_olduname	AUE_NULL
-#define	LINUX_SYS_AUE_linux_ustat	AUE_NULL
-#define	LINUX_SYS_AUE_linux_getppid	AUE_GETPPID
-#define	LINUX_SYS_AUE_linux_sigaction	AUE_NULL
-#define	LINUX_SYS_AUE_linux_sgetmask	AUE_NULL
-#define	LINUX_SYS_AUE_linux_ssetmask	AUE_NULL
-#define	LINUX_SYS_AUE_linux_setreuid16	AUE_SETREUID
-#define	LINUX_SYS_AUE_linux_setregid16	AUE_SETREGID
-#define	LINUX_SYS_AUE_linux_sigsuspend	AUE_NULL
-#define	LINUX_SYS_AUE_linux_sigpending	AUE_NULL
-#define	LINUX_SYS_AUE_linux_sethostname	AUE_SYSCTL
-#define	LINUX_SYS_AUE_linux_setrlimit	AUE_SETRLIMIT
-#define	LINUX_SYS_AUE_linux_old_getrlimit	AUE_GETRLIMIT
-#define	LINUX_SYS_AUE_linux_getrusage	AUE_GETRUSAGE
-#define	LINUX_SYS_AUE_linux_gettimeofday	AUE_NULL
-#define	LINUX_SYS_AUE_linux_settimeofday	AUE_SETTIMEOFDAY
-#define	LINUX_SYS_AUE_linux_getgroups16	AUE_GETGROUPS
-#define	LINUX_SYS_AUE_linux_setgroups16	AUE_SETGROUPS
-#define	LINUX_SYS_AUE_linux_old_select	AUE_SELECT
-#define	LINUX_SYS_AUE_linux_symlink	AUE_SYMLINK
-#define	LINUX_SYS_AUE_linux_lstat	AUE_LSTAT
-#define	LINUX_SYS_AUE_linux_readlink	AUE_READLINK
-#define	LINUX_SYS_AUE_linux_reboot	AUE_REBOOT
-#define	LINUX_SYS_AUE_linux_readdir	AUE_GETDIRENTRIES
-#define	LINUX_SYS_AUE_linux_mmap	AUE_MMAP
-#define	LINUX_SYS_AUE_linux_truncate	AUE_TRUNCATE
-#define	LINUX_SYS_AUE_linux_ftruncate	AUE_FTRUNCATE
-#define	LINUX_SYS_AUE_linux_getpriority	AUE_GETPRIORITY
-#define	LINUX_SYS_AUE_linux_statfs	AUE_STATFS
-#define	LINUX_SYS_AUE_linux_fstatfs	AUE_FSTATFS
-#define	LINUX_SYS_AUE_linux_socketcall	AUE_NULL
-#define	LINUX_SYS_AUE_linux_syslog	AUE_NULL
-#define	LINUX_SYS_AUE_linux_setitimer	AUE_SETITIMER
-#define	LINUX_SYS_AUE_linux_getitimer	AUE_GETITIMER
-#define	LINUX_SYS_AUE_linux_newstat	AUE_STAT
-#define	LINUX_SYS_AUE_linux_newlstat	AUE_LSTAT
-#define	LINUX_SYS_AUE_linux_newfstat	AUE_FSTAT
-#define	LINUX_SYS_AUE_linux_uname	AUE_NULL
-#define	LINUX_SYS_AUE_linux_iopl	AUE_NULL
-#define	LINUX_SYS_AUE_linux_vhangup	AUE_NULL
-#define	LINUX_SYS_AUE_linux_wait4	AUE_WAIT4
-#define	LINUX_SYS_AUE_linux_swapoff	AUE_SWAPOFF
-#define	LINUX_SYS_AUE_linux_sysinfo	AUE_NULL
-#define	LINUX_SYS_AUE_linux_ipc	AUE_NULL
-#define	LINUX_SYS_AUE_linux_sigreturn	AUE_SIGRETURN
-#define	LINUX_SYS_AUE_linux_clone	AUE_RFORK
-#define	LINUX_SYS_AUE_linux_setdomainname	AUE_SYSCTL
-#define	LINUX_SYS_AUE_linux_newuname	AUE_NULL
-#define	LINUX_SYS_AUE_linux_adjtimex	AUE_ADJTIME
-#define	LINUX_SYS_AUE_linux_mprotect	AUE_MPROTECT
-#define	LINUX_SYS_AUE_linux_sigprocmask	AUE_SIGPROCMASK
-#define	LINUX_SYS_AUE_linux_create_module	AUE_NULL
-#define	LINUX_SYS_AUE_linux_init_module	AUE_NULL
-#define	LINUX_SYS_AUE_linux_delete_module	AUE_NULL
-#define	LINUX_SYS_AUE_linux_get_kernel_syms	AUE_NULL
-#define	LINUX_SYS_AUE_linux_quotactl	AUE_QUOTACTL
-#define	LINUX_SYS_AUE_linux_bdflush	AUE_BDFLUSH
-#define	LINUX_SYS_AUE_linux_sysfs	AUE_NULL
-#define	LINUX_SYS_AUE_linux_personality	AUE_PERSONALITY
-#define	LINUX_SYS_AUE_linux_setfsuid16	AUE_SETFSUID
-#define	LINUX_SYS_AUE_linux_setfsgid16	AUE_SETFSGID
-#define	LINUX_SYS_AUE_linux_llseek	AUE_LSEEK
-#define	LINUX_SYS_AUE_linux_getdents	AUE_GETDIRENTRIES
-#define	LINUX_SYS_AUE_linux_select	AUE_SELECT
-#define	LINUX_SYS_AUE_linux_msync	AUE_MSYNC
-#define	LINUX_SYS_AUE_linux_readv	AUE_READV
-#define	LINUX_SYS_AUE_linux_writev	AUE_WRITEV
-#define	LINUX_SYS_AUE_linux_getsid	AUE_GETSID
-#define	LINUX_SYS_AUE_linux_fdatasync	AUE_NULL
-#define	LINUX_SYS_AUE_linux_sysctl	AUE_SYSCTL
-#define	LINUX_SYS_AUE_linux_sched_setparam	AUE_SCHED_SETPARAM
-#define	LINUX_SYS_AUE_linux_sched_getparam	AUE_SCHED_GETPARAM
-#define	LINUX_SYS_AUE_linux_sched_setscheduler	AUE_SCHED_SETSCHEDULER
-#define	LINUX_SYS_AUE_linux_sched_getscheduler	AUE_SCHED_GETSCHEDULER
-#define	LINUX_SYS_AUE_linux_sched_get_priority_max	AUE_SCHED_GET_PRIORITY_MAX
-#define	LINUX_SYS_AUE_linux_sched_get_priority_min	AUE_SCHED_GET_PRIORITY_MIN
-#define	LINUX_SYS_AUE_linux_sched_rr_get_interval	AUE_SCHED_RR_GET_INTERVAL
-#define	LINUX_SYS_AUE_linux_nanosleep	AUE_NULL
-#define	LINUX_SYS_AUE_linux_mremap	AUE_NULL
-#define	LINUX_SYS_AUE_linux_setresuid16	AUE_SETRESUID
-#define	LINUX_SYS_AUE_linux_getresuid16	AUE_GETRESUID
-#define	LINUX_SYS_AUE_linux_query_module	AUE_NULL
-#define	LINUX_SYS_AUE_linux_nfsservctl	AUE_NULL
-#define	LINUX_SYS_AUE_linux_setresgid16	AUE_SETRESGID
-#define	LINUX_SYS_AUE_linux_getresgid16	AUE_GETRESGID
-#define	LINUX_SYS_AUE_linux_prctl	AUE_PRCTL
-#define	LINUX_SYS_AUE_linux_rt_sigreturn	AUE_NULL
-#define	LINUX_SYS_AUE_linux_rt_sigaction	AUE_NULL
-#define	LINUX_SYS_AUE_linux_rt_sigprocmask	AUE_NULL
-#define	LINUX_SYS_AUE_linux_rt_sigpending	AUE_NULL
-#define	LINUX_SYS_AUE_linux_rt_sigtimedwait	AUE_NULL
-#define	LINUX_SYS_AUE_linux_rt_sigqueueinfo	AUE_NULL
-#define	LINUX_SYS_AUE_linux_rt_sigsuspend	AUE_NULL
-#define	LINUX_SYS_AUE_linux_pread	AUE_PREAD
-#define	LINUX_SYS_AUE_linux_pwrite	AUE_PWRITE
-#define	LINUX_SYS_AUE_linux_chown16	AUE_CHOWN
-#define	LINUX_SYS_AUE_linux_getcwd	AUE_GETCWD
-#define	LINUX_SYS_AUE_linux_capget	AUE_CAPGET
-#define	LINUX_SYS_AUE_linux_capset	AUE_CAPSET
-#define	LINUX_SYS_AUE_linux_sigaltstack	AUE_NULL
-#define	LINUX_SYS_AUE_linux_sendfile	AUE_SENDFILE
-#define	LINUX_SYS_AUE_linux_vfork	AUE_VFORK
-#define	LINUX_SYS_AUE_linux_getrlimit	AUE_GETRLIMIT
-#define	LINUX_SYS_AUE_linux_mmap2	AUE_MMAP
-#define	LINUX_SYS_AUE_linux_truncate64	AUE_TRUNCATE
-#define	LINUX_SYS_AUE_linux_ftruncate64	AUE_FTRUNCATE
-#define	LINUX_SYS_AUE_linux_stat64	AUE_STAT
-#define	LINUX_SYS_AUE_linux_lstat64	AUE_LSTAT
-#define	LINUX_SYS_AUE_linux_fstat64	AUE_FSTAT
-#define	LINUX_SYS_AUE_linux_lchown	AUE_LCHOWN
-#define	LINUX_SYS_AUE_linux_getuid	AUE_GETUID
-#define	LINUX_SYS_AUE_linux_getgid	AUE_GETGID
-#define	LINUX_SYS_AUE_linux_getgroups	AUE_GETGROUPS
-#define	LINUX_SYS_AUE_linux_setgroups	AUE_SETGROUPS
-#define	LINUX_SYS_AUE_linux_chown	AUE_CHOWN
-#define	LINUX_SYS_AUE_linux_setfsuid	AUE_SETFSUID
-#define	LINUX_SYS_AUE_linux_setfsgid	AUE_SETFSGID
-#define	LINUX_SYS_AUE_linux_pivot_root	AUE_PIVOT_ROOT
-#define	LINUX_SYS_AUE_linux_mincore	AUE_MINCORE
-#define	LINUX_SYS_AUE_linux_getdents64	AUE_GETDIRENTRIES
-#define	LINUX_SYS_AUE_linux_fcntl64	AUE_FCNTL
-#define	LINUX_SYS_AUE_linux_gettid	AUE_NULL
-#define	LINUX_SYS_AUE_linux_setxattr	AUE_NULL
-#define	LINUX_SYS_AUE_linux_lsetxattr	AUE_NULL
-#define	LINUX_SYS_AUE_linux_fsetxattr	AUE_NULL
-#define	LINUX_SYS_AUE_linux_getxattr	AUE_NULL
-#define	LINUX_SYS_AUE_linux_lgetxattr	AUE_NULL
-#define	LINUX_SYS_AUE_linux_fgetxattr	AUE_NULL
-#define	LINUX_SYS_AUE_linux_listxattr	AUE_NULL
-#define	LINUX_SYS_AUE_linux_llistxattr	AUE_NULL
-#define	LINUX_SYS_AUE_linux_flistxattr	AUE_NULL
-#define	LINUX_SYS_AUE_linux_removexattr	AUE_NULL
-#define	LINUX_SYS_AUE_linux_lremovexattr	AUE_NULL
-#define	LINUX_SYS_AUE_linux_fremovexattr	AUE_NULL
-#define	LINUX_SYS_AUE_linux_tkill	AUE_NULL
-#define	LINUX_SYS_AUE_linux_sys_futex	AUE_NULL
-#define	LINUX_SYS_AUE_linux_sched_setaffinity	AUE_NULL
-#define	LINUX_SYS_AUE_linux_sched_getaffinity	AUE_NULL
-#define	LINUX_SYS_AUE_linux_set_thread_area	AUE_NULL
-#define	LINUX_SYS_AUE_linux_fadvise64	AUE_NULL
-#define	LINUX_SYS_AUE_linux_exit_group	AUE_EXIT
-#define	LINUX_SYS_AUE_linux_lookup_dcookie	AUE_NULL
-#define	LINUX_SYS_AUE_linux_epoll_create	AUE_NULL
-#define	LINUX_SYS_AUE_linux_epoll_ctl	AUE_NULL
-#define	LINUX_SYS_AUE_linux_epoll_wait	AUE_NULL
-#define	LINUX_SYS_AUE_linux_remap_file_pages	AUE_NULL
-#define	LINUX_SYS_AUE_linux_set_tid_address	AUE_NULL
-#define	LINUX_SYS_AUE_linux_timer_create	AUE_NULL
-#define	LINUX_SYS_AUE_linux_timer_settime	AUE_NULL
-#define	LINUX_SYS_AUE_linux_timer_gettime	AUE_NULL
-#define	LINUX_SYS_AUE_linux_timer_getoverrun	AUE_NULL
-#define	LINUX_SYS_AUE_linux_timer_delete	AUE_NULL
-#define	LINUX_SYS_AUE_linux_clock_settime	AUE_CLOCK_SETTIME
-#define	LINUX_SYS_AUE_linux_clock_gettime	AUE_NULL
-#define	LINUX_SYS_AUE_linux_clock_getres	AUE_NULL
-#define	LINUX_SYS_AUE_linux_clock_nanosleep	AUE_NULL
-#define	LINUX_SYS_AUE_linux_statfs64	AUE_STATFS
-#define	LINUX_SYS_AUE_linux_fstatfs64	AUE_FSTATFS
-#define	LINUX_SYS_AUE_linux_tgkill	AUE_NULL
-#define	LINUX_SYS_AUE_linux_utimes	AUE_UTIMES
-#define	LINUX_SYS_AUE_linux_fadvise64_64	AUE_NULL
-#define	LINUX_SYS_AUE_linux_mbind	AUE_NULL
-#define	LINUX_SYS_AUE_linux_get_mempolicy	AUE_NULL
-#define	LINUX_SYS_AUE_linux_set_mempolicy	AUE_NULL
-#define	LINUX_SYS_AUE_linux_mq_open	AUE_NULL
-#define	LINUX_SYS_AUE_linux_mq_unlink	AUE_NULL
-#define	LINUX_SYS_AUE_linux_mq_timedsend	AUE_NULL
-#define	LINUX_SYS_AUE_linux_mq_timedreceive	AUE_NULL
-#define	LINUX_SYS_AUE_linux_mq_notify	AUE_NULL
-#define	LINUX_SYS_AUE_linux_mq_getsetattr	AUE_NULL
-#define	LINUX_SYS_AUE_linux_kexec_load	AUE_NULL
-#define	LINUX_SYS_AUE_linux_waitid	AUE_WAIT6
-#define	LINUX_SYS_AUE_linux_add_key	AUE_NULL
-#define	LINUX_SYS_AUE_linux_request_key	AUE_NULL
-#define	LINUX_SYS_AUE_linux_keyctl	AUE_NULL
-#define	LINUX_SYS_AUE_linux_ioprio_set	AUE_NULL
-#define	LINUX_SYS_AUE_linux_ioprio_get	AUE_NULL
-#define	LINUX_SYS_AUE_linux_inotify_init	AUE_NULL
-#define	LINUX_SYS_AUE_linux_inotify_add_watch	AUE_NULL
-#define	LINUX_SYS_AUE_linux_inotify_rm_watch	AUE_NULL
-#define	LINUX_SYS_AUE_linux_migrate_pages	AUE_NULL
-#define	LINUX_SYS_AUE_linux_openat	AUE_OPEN_RWTC
-#define	LINUX_SYS_AUE_linux_mkdirat	AUE_MKDIRAT
-#define	LINUX_SYS_AUE_linux_mknodat	AUE_MKNODAT
-#define	LINUX_SYS_AUE_linux_fchownat	AUE_FCHOWNAT
-#define	LINUX_SYS_AUE_linux_futimesat	AUE_FUTIMESAT
-#define	LINUX_SYS_AUE_linux_fstatat64	AUE_FSTATAT
-#define	LINUX_SYS_AUE_linux_unlinkat	AUE_UNLINKAT
-#define	LINUX_SYS_AUE_linux_renameat	AUE_RENAMEAT
-#define	LINUX_SYS_AUE_linux_linkat	AUE_LINKAT
-#define	LINUX_SYS_AUE_linux_symlinkat	AUE_SYMLINKAT
-#define	LINUX_SYS_AUE_linux_readlinkat	AUE_READLINKAT
-#define	LINUX_SYS_AUE_linux_fchmodat	AUE_FCHMODAT
-#define	LINUX_SYS_AUE_linux_faccessat	AUE_FACCESSAT
-#define	LINUX_SYS_AUE_linux_pselect6	AUE_SELECT
-#define	LINUX_SYS_AUE_linux_ppoll	AUE_POLL
-#define	LINUX_SYS_AUE_linux_unshare	AUE_NULL
-#define	LINUX_SYS_AUE_linux_set_robust_list	AUE_NULL
-#define	LINUX_SYS_AUE_linux_get_robust_list	AUE_NULL
-#define	LINUX_SYS_AUE_linux_splice	AUE_NULL
-#define	LINUX_SYS_AUE_linux_sync_file_range	AUE_NULL
-#define	LINUX_SYS_AUE_linux_tee	AUE_NULL
-#define	LINUX_SYS_AUE_linux_vmsplice	AUE_NULL
-#define	LINUX_SYS_AUE_linux_move_pages	AUE_NULL
-#define	LINUX_SYS_AUE_linux_getcpu	AUE_NULL
-#define	LINUX_SYS_AUE_linux_epoll_pwait	AUE_NULL
-#define	LINUX_SYS_AUE_linux_utimensat	AUE_FUTIMESAT
-#define	LINUX_SYS_AUE_linux_signalfd	AUE_NULL
-#define	LINUX_SYS_AUE_linux_timerfd_create	AUE_NULL
-#define	LINUX_SYS_AUE_linux_eventfd	AUE_NULL
-#define	LINUX_SYS_AUE_linux_fallocate	AUE_NULL
-#define	LINUX_SYS_AUE_linux_timerfd_settime	AUE_NULL
-#define	LINUX_SYS_AUE_linux_timerfd_gettime	AUE_NULL
-#define	LINUX_SYS_AUE_linux_signalfd4	AUE_NULL
-#define	LINUX_SYS_AUE_linux_eventfd2	AUE_NULL
-#define	LINUX_SYS_AUE_linux_epoll_create1	AUE_NULL
-#define	LINUX_SYS_AUE_linux_dup3	AUE_NULL
-#define	LINUX_SYS_AUE_linux_pipe2	AUE_NULL
-#define	LINUX_SYS_AUE_linux_inotify_init1	AUE_NULL
-#define	LINUX_SYS_AUE_linux_preadv	AUE_NULL
-#define	LINUX_SYS_AUE_linux_pwritev	AUE_NULL
-#define	LINUX_SYS_AUE_linux_rt_tsigqueueinfo	AUE_NULL
-#define	LINUX_SYS_AUE_linux_perf_event_open	AUE_NULL
-#define	LINUX_SYS_AUE_linux_recvmmsg	AUE_NULL
-#define	LINUX_SYS_AUE_linux_fanotify_init	AUE_NULL
-#define	LINUX_SYS_AUE_linux_fanotify_mark	AUE_NULL
-#define	LINUX_SYS_AUE_linux_prlimit64	AUE_NULL
-#define	LINUX_SYS_AUE_linux_name_to_handle_at	AUE_NULL
-#define	LINUX_SYS_AUE_linux_open_by_handle_at	AUE_NULL
-#define	LINUX_SYS_AUE_linux_clock_adjtime	AUE_NULL
-#define	LINUX_SYS_AUE_linux_syncfs	AUE_SYNC
-#define	LINUX_SYS_AUE_linux_sendmmsg	AUE_NULL
-#define	LINUX_SYS_AUE_linux_setns	AUE_NULL
-#define	LINUX_SYS_AUE_linux_process_vm_readv	AUE_NULL
-#define	LINUX_SYS_AUE_linux_process_vm_writev	AUE_NULL
+#define	LINUX32_SYS_AUE_linux_exit	AUE_EXIT
+#define	LINUX32_SYS_AUE_linux_fork	AUE_FORK
+#define	LINUX32_SYS_AUE_linux_open	AUE_OPEN_RWTC
+#define	LINUX32_SYS_AUE_linux_waitpid	AUE_WAIT4
+#define	LINUX32_SYS_AUE_linux_creat	AUE_CREAT
+#define	LINUX32_SYS_AUE_linux_link	AUE_LINK
+#define	LINUX32_SYS_AUE_linux_unlink	AUE_UNLINK
+#define	LINUX32_SYS_AUE_linux_execve	AUE_EXECVE
+#define	LINUX32_SYS_AUE_linux_chdir	AUE_CHDIR
+#define	LINUX32_SYS_AUE_linux_time	AUE_NULL
+#define	LINUX32_SYS_AUE_linux_mknod	AUE_MKNOD
+#define	LINUX32_SYS_AUE_linux_chmod	AUE_CHMOD
+#define	LINUX32_SYS_AUE_linux_lchown16	AUE_LCHOWN
+#define	LINUX32_SYS_AUE_linux_stat	AUE_STAT
+#define	LINUX32_SYS_AUE_linux_lseek	AUE_LSEEK
+#define	LINUX32_SYS_AUE_linux_getpid	AUE_GETPID
+#define	LINUX32_SYS_AUE_linux_mount	AUE_MOUNT
+#define	LINUX32_SYS_AUE_linux_oldumount	AUE_UMOUNT
+#define	LINUX32_SYS_AUE_linux_setuid16	AUE_SETUID
+#define	LINUX32_SYS_AUE_linux_getuid16	AUE_GETUID
+#define	LINUX32_SYS_AUE_linux_stime	AUE_SETTIMEOFDAY
+#define	LINUX32_SYS_AUE_linux_ptrace	AUE_PTRACE
+#define	LINUX32_SYS_AUE_linux_alarm	AUE_NULL
+#define	LINUX32_SYS_AUE_linux_pause	AUE_NULL
+#define	LINUX32_SYS_AUE_linux_utime	AUE_UTIME
+#define	LINUX32_SYS_AUE_linux_access	AUE_ACCESS
+#define	LINUX32_SYS_AUE_linux_nice	AUE_NICE
+#define	LINUX32_SYS_AUE_linux_kill	AUE_KILL
+#define	LINUX32_SYS_AUE_linux_rename	AUE_RENAME
+#define	LINUX32_SYS_AUE_linux_mkdir	AUE_MKDIR
+#define	LINUX32_SYS_AUE_linux_rmdir	AUE_RMDIR
+#define	LINUX32_SYS_AUE_linux_pipe	AUE_PIPE
+#define	LINUX32_SYS_AUE_linux_times	AUE_NULL
+#define	LINUX32_SYS_AUE_linux_brk	AUE_NULL
+#define	LINUX32_SYS_AUE_linux_setgid16	AUE_SETGID
+#define	LINUX32_SYS_AUE_linux_getgid16	AUE_GETGID
+#define	LINUX32_SYS_AUE_linux_signal	AUE_NULL
+#define	LINUX32_SYS_AUE_linux_geteuid16	AUE_GETEUID
+#define	LINUX32_SYS_AUE_linux_getegid16	AUE_GETEGID
+#define	LINUX32_SYS_AUE_linux_umount	AUE_UMOUNT
+#define	LINUX32_SYS_AUE_linux_ioctl	AUE_IOCTL
+#define	LINUX32_SYS_AUE_linux_fcntl	AUE_FCNTL
+#define	LINUX32_SYS_AUE_linux_olduname	AUE_NULL
+#define	LINUX32_SYS_AUE_linux_ustat	AUE_NULL
+#define	LINUX32_SYS_AUE_linux_getppid	AUE_GETPPID
+#define	LINUX32_SYS_AUE_linux_sigaction	AUE_NULL
+#define	LINUX32_SYS_AUE_linux_sgetmask	AUE_NULL
+#define	LINUX32_SYS_AUE_linux_ssetmask	AUE_NULL
+#define	LINUX32_SYS_AUE_linux_setreuid16	AUE_SETREUID
+#define	LINUX32_SYS_AUE_linux_setregid16	AUE_SETREGID
+#define	LINUX32_SYS_AUE_linux_sigsuspend	AUE_NULL
+#define	LINUX32_SYS_AUE_linux_sigpending	AUE_NULL
+#define	LINUX32_SYS_AUE_linux_sethostname	AUE_SYSCTL
+#define	LINUX32_SYS_AUE_linux_setrlimit	AUE_SETRLIMIT
+#define	LINUX32_SYS_AUE_linux_old_getrlimit	AUE_GETRLIMIT
+#define	LINUX32_SYS_AUE_linux_getrusage	AUE_GETRUSAGE
+#define	LINUX32_SYS_AUE_linux_gettimeofday	AUE_NULL
+#define	LINUX32_SYS_AUE_linux_settimeofday	AUE_SETTIMEOFDAY
+#define	LINUX32_SYS_AUE_linux_getgroups16	AUE_GETGROUPS
+#define	LINUX32_SYS_AUE_linux_setgroups16	AUE_SETGROUPS
+#define	LINUX32_SYS_AUE_linux_old_select	AUE_SELECT
+#define	LINUX32_SYS_AUE_linux_symlink	AUE_SYMLINK
+#define	LINUX32_SYS_AUE_linux_lstat	AUE_LSTAT
+#define	LINUX32_SYS_AUE_linux_readlink	AUE_READLINK
+#define	LINUX32_SYS_AUE_linux_reboot	AUE_REBOOT
+#define	LINUX32_SYS_AUE_linux_readdir	AUE_GETDIRENTRIES
+#define	LINUX32_SYS_AUE_linux_mmap	AUE_MMAP
+#define	LINUX32_SYS_AUE_linux_truncate	AUE_TRUNCATE
+#define	LINUX32_SYS_AUE_linux_ftruncate	AUE_FTRUNCATE
+#define	LINUX32_SYS_AUE_linux_getpriority	AUE_GETPRIORITY
+#define	LINUX32_SYS_AUE_linux_statfs	AUE_STATFS
+#define	LINUX32_SYS_AUE_linux_fstatfs	AUE_FSTATFS
+#define	LINUX32_SYS_AUE_linux_socketcall	AUE_NULL
+#define	LINUX32_SYS_AUE_linux_syslog	AUE_NULL
+#define	LINUX32_SYS_AUE_linux_setitimer	AUE_SETITIMER
+#define	LINUX32_SYS_AUE_linux_getitimer	AUE_GETITIMER
+#define	LINUX32_SYS_AUE_linux_newstat	AUE_STAT
+#define	LINUX32_SYS_AUE_linux_newlstat	AUE_LSTAT
+#define	LINUX32_SYS_AUE_linux_newfstat	AUE_FSTAT
+#define	LINUX32_SYS_AUE_linux_uname	AUE_NULL
+#define	LINUX32_SYS_AUE_linux_iopl	AUE_NULL
+#define	LINUX32_SYS_AUE_linux_vhangup	AUE_NULL
+#define	LINUX32_SYS_AUE_linux_wait4	AUE_WAIT4
+#define	LINUX32_SYS_AUE_linux_swapoff	AUE_SWAPOFF
+#define	LINUX32_SYS_AUE_linux_sysinfo	AUE_NULL
+#define	LINUX32_SYS_AUE_linux_ipc	AUE_NULL
+#define	LINUX32_SYS_AUE_linux_sigreturn	AUE_SIGRETURN
+#define	LINUX32_SYS_AUE_linux_clone	AUE_RFORK
+#define	LINUX32_SYS_AUE_linux_setdomainname	AUE_SYSCTL
+#define	LINUX32_SYS_AUE_linux_newuname	AUE_NULL
+#define	LINUX32_SYS_AUE_linux_adjtimex	AUE_ADJTIME
+#define	LINUX32_SYS_AUE_linux_mprotect	AUE_MPROTECT
+#define	LINUX32_SYS_AUE_linux_sigprocmask	AUE_SIGPROCMASK
+#define	LINUX32_SYS_AUE_linux_create_module	AUE_NULL
+#define	LINUX32_SYS_AUE_linux_init_module	AUE_NULL
+#define	LINUX32_SYS_AUE_linux_delete_module	AUE_NULL
+#define	LINUX32_SYS_AUE_linux_get_kernel_syms	AUE_NULL
+#define	LINUX32_SYS_AUE_linux_quotactl	AUE_QUOTACTL
+#define	LINUX32_SYS_AUE_linux_bdflush	AUE_BDFLUSH
+#define	LINUX32_SYS_AUE_linux_sysfs	AUE_NULL
+#define	LINUX32_SYS_AUE_linux_personality	AUE_PERSONALITY
+#define	LINUX32_SYS_AUE_linux_setfsuid16	AUE_SETFSUID
+#define	LINUX32_SYS_AUE_linux_setfsgid16	AUE_SETFSGID
+#define	LINUX32_SYS_AUE_linux_llseek	AUE_LSEEK
+#define	LINUX32_SYS_AUE_linux_getdents	AUE_GETDIRENTRIES
+#define	LINUX32_SYS_AUE_linux_select	AUE_SELECT
+#define	LINUX32_SYS_AUE_linux_msync	AUE_MSYNC
+#define	LINUX32_SYS_AUE_linux_readv	AUE_READV
+#define	LINUX32_SYS_AUE_linux_writev	AUE_WRITEV
+#define	LINUX32_SYS_AUE_linux_getsid	AUE_GETSID
+#define	LINUX32_SYS_AUE_linux_fdatasync	AUE_NULL
+#define	LINUX32_SYS_AUE_linux_sysctl	AUE_SYSCTL
+#define	LINUX32_SYS_AUE_linux_sched_setparam	AUE_SCHED_SETPARAM
+#define	LINUX32_SYS_AUE_linux_sched_getparam	AUE_SCHED_GETPARAM
+#define	LINUX32_SYS_AUE_linux_sched_setscheduler	AUE_SCHED_SETSCHEDULER
+#define	LINUX32_SYS_AUE_linux_sched_getscheduler	AUE_SCHED_GETSCHEDULER
+#define	LINUX32_SYS_AUE_linux_sched_get_priority_max	AUE_SCHED_GET_PRIORITY_MAX
+#define	LINUX32_SYS_AUE_linux_sched_get_priority_min	AUE_SCHED_GET_PRIORITY_MIN
+#define	LINUX32_SYS_AUE_linux_sched_rr_get_interval	AUE_SCHED_RR_GET_INTERVAL
+#define	LINUX32_SYS_AUE_linux_nanosleep	AUE_NULL
+#define	LINUX32_SYS_AUE_linux_mremap	AUE_NULL
+#define	LINUX32_SYS_AUE_linux_setresuid16	AUE_SETRESUID
+#define	LINUX32_SYS_AUE_linux_getresuid16	AUE_GETRESUID
+#define	LINUX32_SYS_AUE_linux_query_module	AUE_NULL
+#define	LINUX32_SYS_AUE_linux_nfsservctl	AUE_NULL
+#define	LINUX32_SYS_AUE_linux_setresgid16	AUE_SETRESGID
+#define	LINUX32_SYS_AUE_linux_getresgid16	AUE_GETRESGID
+#define	LINUX32_SYS_AUE_linux_prctl	AUE_PRCTL
+#define	LINUX32_SYS_AUE_linux_rt_sigreturn	AUE_NULL
+#define	LINUX32_SYS_AUE_linux_rt_sigaction	AUE_NULL
+#define	LINUX32_SYS_AUE_linux_rt_sigprocmask	AUE_NULL
+#define	LINUX32_SYS_AUE_linux_rt_sigpending	AUE_NULL
+#define	LINUX32_SYS_AUE_linux_rt_sigtimedwait	AUE_NULL
+#define	LINUX32_SYS_AUE_linux_rt_sigqueueinfo	AUE_NULL
+#define	LINUX32_SYS_AUE_linux_rt_sigsuspend	AUE_NULL
+#define	LINUX32_SYS_AUE_linux_pread	AUE_PREAD
+#define	LINUX32_SYS_AUE_linux_pwrite	AUE_PWRITE
+#define	LINUX32_SYS_AUE_linux_chown16	AUE_CHOWN
+#define	LINUX32_SYS_AUE_linux_getcwd	AUE_GETCWD
+#define	LINUX32_SYS_AUE_linux_capget	AUE_CAPGET
+#define	LINUX32_SYS_AUE_linux_capset	AUE_CAPSET
+#define	LINUX32_SYS_AUE_linux_sigaltstack	AUE_NULL
+#define	LINUX32_SYS_AUE_linux_sendfile	AUE_SENDFILE
+#define	LINUX32_SYS_AUE_linux_vfork	AUE_VFORK
+#define	LINUX32_SYS_AUE_linux_getrlimit	AUE_GETRLIMIT
+#define	LINUX32_SYS_AUE_linux_mmap2	AUE_MMAP
+#define	LINUX32_SYS_AUE_linux_truncate64	AUE_TRUNCATE
+#define	LINUX32_SYS_AUE_linux_ftruncate64	AUE_FTRUNCATE
+#define	LINUX32_SYS_AUE_linux_stat64	AUE_STAT
+#define	LINUX32_SYS_AUE_linux_lstat64	AUE_LSTAT
+#define	LINUX32_SYS_AUE_linux_fstat64	AUE_FSTAT
+#define	LINUX32_SYS_AUE_linux_lchown	AUE_LCHOWN
+#define	LINUX32_SYS_AUE_linux_getuid	AUE_GETUID
+#define	LINUX32_SYS_AUE_linux_getgid	AUE_GETGID
+#define	LINUX32_SYS_AUE_linux_getgroups	AUE_GETGROUPS
+#define	LINUX32_SYS_AUE_linux_setgroups	AUE_SETGROUPS
+#define	LINUX32_SYS_AUE_linux_chown	AUE_CHOWN
+#define	LINUX32_SYS_AUE_linux_setfsuid	AUE_SETFSUID
+#define	LINUX32_SYS_AUE_linux_setfsgid	AUE_SETFSGID
+#define	LINUX32_SYS_AUE_linux_pivot_root	AUE_PIVOT_ROOT
+#define	LINUX32_SYS_AUE_linux_mincore	AUE_MINCORE
+#define	LINUX32_SYS_AUE_linux_getdents64	AUE_GETDIRENTRIES
+#define	LINUX32_SYS_AUE_linux_fcntl64	AUE_FCNTL
+#define	LINUX32_SYS_AUE_linux_gettid	AUE_NULL
+#define	LINUX32_SYS_AUE_linux_setxattr	AUE_NULL
+#define	LINUX32_SYS_AUE_linux_lsetxattr	AUE_NULL
+#define	LINUX32_SYS_AUE_linux_fsetxattr	AUE_NULL
+#define	LINUX32_SYS_AUE_linux_getxattr	AUE_NULL
+#define	LINUX32_SYS_AUE_linux_lgetxattr	AUE_NULL
+#define	LINUX32_SYS_AUE_linux_fgetxattr	AUE_NULL
+#define	LINUX32_SYS_AUE_linux_listxattr	AUE_NULL
+#define	LINUX32_SYS_AUE_linux_llistxattr	AUE_NULL
+#define	LINUX32_SYS_AUE_linux_flistxattr	AUE_NULL
+#define	LINUX32_SYS_AUE_linux_removexattr	AUE_NULL
+#define	LINUX32_SYS_AUE_linux_lremovexattr	AUE_NULL
+#define	LINUX32_SYS_AUE_linux_fremovexattr	AUE_NULL
+#define	LINUX32_SYS_AUE_linux_tkill	AUE_NULL
+#define	LINUX32_SYS_AUE_linux_sys_futex	AUE_NULL
+#define	LINUX32_SYS_AUE_linux_sched_setaffinity	AUE_NULL
+#define	LINUX32_SYS_AUE_linux_sched_getaffinity	AUE_NULL
+#define	LINUX32_SYS_AUE_linux_set_thread_area	AUE_NULL
+#define	LINUX32_SYS_AUE_linux_fadvise64	AUE_NULL
+#define	LINUX32_SYS_AUE_linux_exit_group	AUE_EXIT
+#define	LINUX32_SYS_AUE_linux_lookup_dcookie	AUE_NULL
+#define	LINUX32_SYS_AUE_linux_epoll_create	AUE_NULL
+#define	LINUX32_SYS_AUE_linux_epoll_ctl	AUE_NULL
+#define	LINUX32_SYS_AUE_linux_epoll_wait	AUE_NULL
+#define	LINUX32_SYS_AUE_linux_remap_file_pages	AUE_NULL
+#define	LINUX32_SYS_AUE_linux_set_tid_address	AUE_NULL
+#define	LINUX32_SYS_AUE_linux_timer_create	AUE_NULL
+#define	LINUX32_SYS_AUE_linux_timer_settime	AUE_NULL
+#define	LINUX32_SYS_AUE_linux_timer_gettime	AUE_NULL
+#define	LINUX32_SYS_AUE_linux_timer_getoverrun	AUE_NULL
+#define	LINUX32_SYS_AUE_linux_timer_delete	AUE_NULL
+#define	LINUX32_SYS_AUE_linux_clock_settime	AUE_CLOCK_SETTIME
+#define	LINUX32_SYS_AUE_linux_clock_gettime	AUE_NULL
+#define	LINUX32_SYS_AUE_linux_clock_getres	AUE_NULL
+#define	LINUX32_SYS_AUE_linux_clock_nanosleep	AUE_NULL
+#define	LINUX32_SYS_AUE_linux_statfs64	AUE_STATFS
+#define	LINUX32_SYS_AUE_linux_fstatfs64	AUE_FSTATFS
+#define	LINUX32_SYS_AUE_linux_tgkill	AUE_NULL
+#define	LINUX32_SYS_AUE_linux_utimes	AUE_UTIMES
+#define	LINUX32_SYS_AUE_linux_fadvise64_64	AUE_NULL
+#define	LINUX32_SYS_AUE_linux_mbind	AUE_NULL
+#define	LINUX32_SYS_AUE_linux_get_mempolicy	AUE_NULL
+#define	LINUX32_SYS_AUE_linux_set_mempolicy	AUE_NULL
+#define	LINUX32_SYS_AUE_linux_mq_open	AUE_NULL
+#define	LINUX32_SYS_AUE_linux_mq_unlink	AUE_NULL
+#define	LINUX32_SYS_AUE_linux_mq_timedsend	AUE_NULL
+#define	LINUX32_SYS_AUE_linux_mq_timedreceive	AUE_NULL
+#define	LINUX32_SYS_AUE_linux_mq_notify	AUE_NULL
+#define	LINUX32_SYS_AUE_linux_mq_getsetattr	AUE_NULL
+#define	LINUX32_SYS_AUE_linux_kexec_load	AUE_NULL
+#define	LINUX32_SYS_AUE_linux_waitid	AUE_WAIT6
+#define	LINUX32_SYS_AUE_linux_add_key	AUE_NULL
+#define	LINUX32_SYS_AUE_linux_request_key	AUE_NULL
+#define	LINUX32_SYS_AUE_linux_keyctl	AUE_NULL
+#define	LINUX32_SYS_AUE_linux_ioprio_set	AUE_NULL
+#define	LINUX32_SYS_AUE_linux_ioprio_get	AUE_NULL
+#define	LINUX32_SYS_AUE_linux_inotify_init	AUE_NULL
+#define	LINUX32_SYS_AUE_linux_inotify_add_watch	AUE_NULL
+#define	LINUX32_SYS_AUE_linux_inotify_rm_watch	AUE_NULL
+#define	LINUX32_SYS_AUE_linux_migrate_pages	AUE_NULL
+#define	LINUX32_SYS_AUE_linux_openat	AUE_OPEN_RWTC
+#define	LINUX32_SYS_AUE_linux_mkdirat	AUE_MKDIRAT
+#define	LINUX32_SYS_AUE_linux_mknodat	AUE_MKNODAT
+#define	LINUX32_SYS_AUE_linux_fchownat	AUE_FCHOWNAT
+#define	LINUX32_SYS_AUE_linux_futimesat	AUE_FUTIMESAT
+#define	LINUX32_SYS_AUE_linux_fstatat64	AUE_FSTATAT
+#define	LINUX32_SYS_AUE_linux_unlinkat	AUE_UNLINKAT
+#define	LINUX32_SYS_AUE_linux_renameat	AUE_RENAMEAT
+#define	LINUX32_SYS_AUE_linux_linkat	AUE_LINKAT
+#define	LINUX32_SYS_AUE_linux_symlinkat	AUE_SYMLINKAT
+#define	LINUX32_SYS_AUE_linux_readlinkat	AUE_READLINKAT
+#define	LINUX32_SYS_AUE_linux_fchmodat	AUE_FCHMODAT
+#define	LINUX32_SYS_AUE_linux_faccessat	AUE_FACCESSAT
+#define	LINUX32_SYS_AUE_linux_pselect6	AUE_SELECT
+#define	LINUX32_SYS_AUE_linux_ppoll	AUE_POLL
+#define	LINUX32_SYS_AUE_linux_unshare	AUE_NULL
+#define	LINUX32_SYS_AUE_linux_set_robust_list	AUE_NULL
+#define	LINUX32_SYS_AUE_linux_get_robust_list	AUE_NULL
+#define	LINUX32_SYS_AUE_linux_splice	AUE_NULL
+#define	LINUX32_SYS_AUE_linux_sync_file_range	AUE_NULL
+#define	LINUX32_SYS_AUE_linux_tee	AUE_NULL
+#define	LINUX32_SYS_AUE_linux_vmsplice	AUE_NULL
+#define	LINUX32_SYS_AUE_linux_move_pages	AUE_NULL
+#define	LINUX32_SYS_AUE_linux_getcpu	AUE_NULL
+#define	LINUX32_SYS_AUE_linux_epoll_pwait	AUE_NULL
+#define	LINUX32_SYS_AUE_linux_utimensat	AUE_FUTIMESAT
+#define	LINUX32_SYS_AUE_linux_signalfd	AUE_NULL
+#define	LINUX32_SYS_AUE_linux_timerfd_create	AUE_NULL
+#define	LINUX32_SYS_AUE_linux_eventfd	AUE_NULL
+#define	LINUX32_SYS_AUE_linux_fallocate	AUE_NULL
+#define	LINUX32_SYS_AUE_linux_timerfd_settime	AUE_NULL
+#define	LINUX32_SYS_AUE_linux_timerfd_gettime	AUE_NULL
+#define	LINUX32_SYS_AUE_linux_signalfd4	AUE_NULL
+#define	LINUX32_SYS_AUE_linux_eventfd2	AUE_NULL
+#define	LINUX32_SYS_AUE_linux_epoll_create1	AUE_NULL
+#define	LINUX32_SYS_AUE_linux_dup3	AUE_NULL
+#define	LINUX32_SYS_AUE_linux_pipe2	AUE_NULL
+#define	LINUX32_SYS_AUE_linux_inotify_init1	AUE_NULL
+#define	LINUX32_SYS_AUE_linux_preadv	AUE_NULL
+#define	LINUX32_SYS_AUE_linux_pwritev	AUE_NULL
+#define	LINUX32_SYS_AUE_linux_rt_tsigqueueinfo	AUE_NULL
+#define	LINUX32_SYS_AUE_linux_perf_event_open	AUE_NULL
+#define	LINUX32_SYS_AUE_linux_recvmmsg	AUE_NULL
+#define	LINUX32_SYS_AUE_linux_fanotify_init	AUE_NULL
+#define	LINUX32_SYS_AUE_linux_fanotify_mark	AUE_NULL
+#define	LINUX32_SYS_AUE_linux_prlimit64	AUE_NULL
+#define	LINUX32_SYS_AUE_linux_name_to_handle_at	AUE_NULL
+#define	LINUX32_SYS_AUE_linux_open_by_handle_at	AUE_NULL
+#define	LINUX32_SYS_AUE_linux_clock_adjtime	AUE_NULL
+#define	LINUX32_SYS_AUE_linux_syncfs	AUE_SYNC
+#define	LINUX32_SYS_AUE_linux_sendmmsg	AUE_NULL
+#define	LINUX32_SYS_AUE_linux_setns	AUE_NULL
+#define	LINUX32_SYS_AUE_linux_process_vm_readv	AUE_NULL
+#define	LINUX32_SYS_AUE_linux_process_vm_writev	AUE_NULL
 
 #undef PAD_
 #undef PADL_
 #undef PADR_
 
-#endif /* !_LINUX_SYSPROTO_H_ */
+#endif /* !_LINUX32_SYSPROTO_H_ */

Modified: stable/10/sys/amd64/linux32/linux32_syscall.h
==============================================================================
--- stable/10/sys/amd64/linux32/linux32_syscall.h	Wed Jan 20 01:09:53 2016	(r294368)
+++ stable/10/sys/amd64/linux32/linux32_syscall.h	Wed Jan 20 01:11:01 2016	(r294369)
@@ -3,322 +3,322 @@
  *
  * DO NOT EDIT-- this file is automatically generated.
  * $FreeBSD$
- * created from FreeBSD: stable/10/sys/amd64/linux32/syscalls.master 293592 2016-01-09 17:54:37Z dchagin 
+ * created from FreeBSD: stable/10/sys/amd64/linux32/syscalls.master 294368 2016-01-20 01:09:53Z jhb 
  */
 
-#define	LINUX_SYS_linux_exit	1
-#define	LINUX_SYS_linux_fork	2
-#define	LINUX_SYS_read	3
-#define	LINUX_SYS_write	4
-#define	LINUX_SYS_linux_open	5
-#define	LINUX_SYS_close	6
-#define	LINUX_SYS_linux_waitpid	7
-#define	LINUX_SYS_linux_creat	8
-#define	LINUX_SYS_linux_link	9
-#define	LINUX_SYS_linux_unlink	10
-#define	LINUX_SYS_linux_execve	11
-#define	LINUX_SYS_linux_chdir	12
-#define	LINUX_SYS_linux_time	13
-#define	LINUX_SYS_linux_mknod	14
-#define	LINUX_SYS_linux_chmod	15
-#define	LINUX_SYS_linux_lchown16	16
-#define	LINUX_SYS_linux_stat	18
-#define	LINUX_SYS_linux_lseek	19
-#define	LINUX_SYS_linux_getpid	20
-#define	LINUX_SYS_linux_mount	21
-#define	LINUX_SYS_linux_oldumount	22
-#define	LINUX_SYS_linux_setuid16	23
-#define	LINUX_SYS_linux_getuid16	24
-#define	LINUX_SYS_linux_stime	25
-#define	LINUX_SYS_linux_ptrace	26
-#define	LINUX_SYS_linux_alarm	27
-#define	LINUX_SYS_linux_pause	29
-#define	LINUX_SYS_linux_utime	30
-#define	LINUX_SYS_linux_access	33
-#define	LINUX_SYS_linux_nice	34
-#define	LINUX_SYS_sync	36
-#define	LINUX_SYS_linux_kill	37
-#define	LINUX_SYS_linux_rename	38
-#define	LINUX_SYS_linux_mkdir	39
-#define	LINUX_SYS_linux_rmdir	40
-#define	LINUX_SYS_dup	41
-#define	LINUX_SYS_linux_pipe	42
-#define	LINUX_SYS_linux_times	43
-#define	LINUX_SYS_linux_brk	45
-#define	LINUX_SYS_linux_setgid16	46
-#define	LINUX_SYS_linux_getgid16	47
-#define	LINUX_SYS_linux_signal	48
-#define	LINUX_SYS_linux_geteuid16	49
-#define	LINUX_SYS_linux_getegid16	50
-#define	LINUX_SYS_acct	51
-#define	LINUX_SYS_linux_umount	52
-#define	LINUX_SYS_linux_ioctl	54
-#define	LINUX_SYS_linux_fcntl	55
-#define	LINUX_SYS_setpgid	57
-#define	LINUX_SYS_linux_olduname	59
-#define	LINUX_SYS_umask	60
-#define	LINUX_SYS_chroot	61
-#define	LINUX_SYS_linux_ustat	62
-#define	LINUX_SYS_dup2	63
-#define	LINUX_SYS_linux_getppid	64
-#define	LINUX_SYS_getpgrp	65
-#define	LINUX_SYS_setsid	66
-#define	LINUX_SYS_linux_sigaction	67
-#define	LINUX_SYS_linux_sgetmask	68
-#define	LINUX_SYS_linux_ssetmask	69
-#define	LINUX_SYS_linux_setreuid16	70
-#define	LINUX_SYS_linux_setregid16	71
-#define	LINUX_SYS_linux_sigsuspend	72
-#define	LINUX_SYS_linux_sigpending	73
-#define	LINUX_SYS_linux_sethostname	74
-#define	LINUX_SYS_linux_setrlimit	75
-#define	LINUX_SYS_linux_old_getrlimit	76
-#define	LINUX_SYS_linux_getrusage	77
-#define	LINUX_SYS_linux_gettimeofday	78
-#define	LINUX_SYS_linux_settimeofday	79
-#define	LINUX_SYS_linux_getgroups16	80
-#define	LINUX_SYS_linux_setgroups16	81
-#define	LINUX_SYS_linux_old_select	82
-#define	LINUX_SYS_linux_symlink	83
-#define	LINUX_SYS_linux_lstat	84
-#define	LINUX_SYS_linux_readlink	85
-#define	LINUX_SYS_swapon	87
-#define	LINUX_SYS_linux_reboot	88
-#define	LINUX_SYS_linux_readdir	89
-#define	LINUX_SYS_linux_mmap	90
-#define	LINUX_SYS_munmap	91
-#define	LINUX_SYS_linux_truncate	92
-#define	LINUX_SYS_linux_ftruncate	93
-#define	LINUX_SYS_fchmod	94
-#define	LINUX_SYS_fchown	95
-#define	LINUX_SYS_linux_getpriority	96
-#define	LINUX_SYS_setpriority	97
-#define	LINUX_SYS_linux_statfs	99
-#define	LINUX_SYS_linux_fstatfs	100
-#define	LINUX_SYS_linux_socketcall	102
-#define	LINUX_SYS_linux_syslog	103
-#define	LINUX_SYS_linux_setitimer	104
-#define	LINUX_SYS_linux_getitimer	105
-#define	LINUX_SYS_linux_newstat	106
-#define	LINUX_SYS_linux_newlstat	107
-#define	LINUX_SYS_linux_newfstat	108
-#define	LINUX_SYS_linux_uname	109
-#define	LINUX_SYS_linux_iopl	110
-#define	LINUX_SYS_linux_vhangup	111
-#define	LINUX_SYS_linux_wait4	114
-#define	LINUX_SYS_linux_swapoff	115
-#define	LINUX_SYS_linux_sysinfo	116
-#define	LINUX_SYS_linux_ipc	117
-#define	LINUX_SYS_fsync	118
-#define	LINUX_SYS_linux_sigreturn	119
-#define	LINUX_SYS_linux_clone	120
-#define	LINUX_SYS_linux_setdomainname	121
-#define	LINUX_SYS_linux_newuname	122
-#define	LINUX_SYS_linux_adjtimex	124
-#define	LINUX_SYS_linux_mprotect	125
-#define	LINUX_SYS_linux_sigprocmask	126
-#define	LINUX_SYS_linux_create_module	127
-#define	LINUX_SYS_linux_init_module	128
-#define	LINUX_SYS_linux_delete_module	129
-#define	LINUX_SYS_linux_get_kernel_syms	130
-#define	LINUX_SYS_linux_quotactl	131
-#define	LINUX_SYS_getpgid	132
-#define	LINUX_SYS_fchdir	133
-#define	LINUX_SYS_linux_bdflush	134
-#define	LINUX_SYS_linux_sysfs	135
-#define	LINUX_SYS_linux_personality	136
-#define	LINUX_SYS_linux_setfsuid16	138
-#define	LINUX_SYS_linux_setfsgid16	139
-#define	LINUX_SYS_linux_llseek	140
-#define	LINUX_SYS_linux_getdents	141
-#define	LINUX_SYS_linux_select	142
-#define	LINUX_SYS_flock	143
-#define	LINUX_SYS_linux_msync	144
-#define	LINUX_SYS_linux_readv	145
-#define	LINUX_SYS_linux_writev	146
-#define	LINUX_SYS_linux_getsid	147
-#define	LINUX_SYS_linux_fdatasync	148
-#define	LINUX_SYS_linux_sysctl	149
-#define	LINUX_SYS_mlock	150
-#define	LINUX_SYS_munlock	151
-#define	LINUX_SYS_mlockall	152
-#define	LINUX_SYS_munlockall	153
-#define	LINUX_SYS_linux_sched_setparam	154
-#define	LINUX_SYS_linux_sched_getparam	155
-#define	LINUX_SYS_linux_sched_setscheduler	156
-#define	LINUX_SYS_linux_sched_getscheduler	157
-#define	LINUX_SYS_sched_yield	158
-#define	LINUX_SYS_linux_sched_get_priority_max	159
-#define	LINUX_SYS_linux_sched_get_priority_min	160
-#define	LINUX_SYS_linux_sched_rr_get_interval	161
-#define	LINUX_SYS_linux_nanosleep	162
-#define	LINUX_SYS_linux_mremap	163
-#define	LINUX_SYS_linux_setresuid16	164
-#define	LINUX_SYS_linux_getresuid16	165
-#define	LINUX_SYS_linux_query_module	167
-#define	LINUX_SYS_poll	168
-#define	LINUX_SYS_linux_nfsservctl	169
-#define	LINUX_SYS_linux_setresgid16	170
-#define	LINUX_SYS_linux_getresgid16	171
-#define	LINUX_SYS_linux_prctl	172
-#define	LINUX_SYS_linux_rt_sigreturn	173
-#define	LINUX_SYS_linux_rt_sigaction	174
-#define	LINUX_SYS_linux_rt_sigprocmask	175
-#define	LINUX_SYS_linux_rt_sigpending	176
-#define	LINUX_SYS_linux_rt_sigtimedwait	177
-#define	LINUX_SYS_linux_rt_sigqueueinfo	178
-#define	LINUX_SYS_linux_rt_sigsuspend	179
-#define	LINUX_SYS_linux_pread	180
-#define	LINUX_SYS_linux_pwrite	181
-#define	LINUX_SYS_linux_chown16	182
-#define	LINUX_SYS_linux_getcwd	183
-#define	LINUX_SYS_linux_capget	184
-#define	LINUX_SYS_linux_capset	185
-#define	LINUX_SYS_linux_sigaltstack	186
-#define	LINUX_SYS_linux_sendfile	187
-#define	LINUX_SYS_linux_vfork	190
-#define	LINUX_SYS_linux_getrlimit	191
-#define	LINUX_SYS_linux_mmap2	192
-#define	LINUX_SYS_linux_truncate64	193
-#define	LINUX_SYS_linux_ftruncate64	194
-#define	LINUX_SYS_linux_stat64	195
-#define	LINUX_SYS_linux_lstat64	196
-#define	LINUX_SYS_linux_fstat64	197
-#define	LINUX_SYS_linux_lchown	198
-#define	LINUX_SYS_linux_getuid	199
-#define	LINUX_SYS_linux_getgid	200
-#define	LINUX_SYS_geteuid	201
-#define	LINUX_SYS_getegid	202
-#define	LINUX_SYS_setreuid	203
-#define	LINUX_SYS_setregid	204
-#define	LINUX_SYS_linux_getgroups	205
-#define	LINUX_SYS_linux_setgroups	206
-#define	LINUX_SYS_setresuid	208
-#define	LINUX_SYS_getresuid	209
-#define	LINUX_SYS_setresgid	210
-#define	LINUX_SYS_getresgid	211
-#define	LINUX_SYS_linux_chown	212
-#define	LINUX_SYS_setuid	213
-#define	LINUX_SYS_setgid	214
-#define	LINUX_SYS_linux_setfsuid	215
-#define	LINUX_SYS_linux_setfsgid	216
-#define	LINUX_SYS_linux_pivot_root	217
-#define	LINUX_SYS_linux_mincore	218
-#define	LINUX_SYS_madvise	219
-#define	LINUX_SYS_linux_getdents64	220
-#define	LINUX_SYS_linux_fcntl64	221
-#define	LINUX_SYS_linux_gettid	224
-#define	LINUX_SYS_linux_setxattr	226
-#define	LINUX_SYS_linux_lsetxattr	227
-#define	LINUX_SYS_linux_fsetxattr	228
-#define	LINUX_SYS_linux_getxattr	229
-#define	LINUX_SYS_linux_lgetxattr	230
-#define	LINUX_SYS_linux_fgetxattr	231
-#define	LINUX_SYS_linux_listxattr	232
-#define	LINUX_SYS_linux_llistxattr	233
-#define	LINUX_SYS_linux_flistxattr	234
-#define	LINUX_SYS_linux_removexattr	235
-#define	LINUX_SYS_linux_lremovexattr	236
-#define	LINUX_SYS_linux_fremovexattr	237
-#define	LINUX_SYS_linux_tkill	238
-#define	LINUX_SYS_linux_sys_futex	240
-#define	LINUX_SYS_linux_sched_setaffinity	241
-#define	LINUX_SYS_linux_sched_getaffinity	242
-#define	LINUX_SYS_linux_set_thread_area	243
-#define	LINUX_SYS_linux_fadvise64	250
-#define	LINUX_SYS_linux_exit_group	252
-#define	LINUX_SYS_linux_lookup_dcookie	253
-#define	LINUX_SYS_linux_epoll_create	254
-#define	LINUX_SYS_linux_epoll_ctl	255
-#define	LINUX_SYS_linux_epoll_wait	256
-#define	LINUX_SYS_linux_remap_file_pages	257
-#define	LINUX_SYS_linux_set_tid_address	258
-#define	LINUX_SYS_linux_timer_create	259
-#define	LINUX_SYS_linux_timer_settime	260
-#define	LINUX_SYS_linux_timer_gettime	261
-#define	LINUX_SYS_linux_timer_getoverrun	262
-#define	LINUX_SYS_linux_timer_delete	263
-#define	LINUX_SYS_linux_clock_settime	264
-#define	LINUX_SYS_linux_clock_gettime	265
-#define	LINUX_SYS_linux_clock_getres	266
-#define	LINUX_SYS_linux_clock_nanosleep	267
-#define	LINUX_SYS_linux_statfs64	268
-#define	LINUX_SYS_linux_fstatfs64	269
-#define	LINUX_SYS_linux_tgkill	270
-#define	LINUX_SYS_linux_utimes	271
-#define	LINUX_SYS_linux_fadvise64_64	272
-#define	LINUX_SYS_linux_mbind	274
-#define	LINUX_SYS_linux_get_mempolicy	275
-#define	LINUX_SYS_linux_set_mempolicy	276
-#define	LINUX_SYS_linux_mq_open	277
-#define	LINUX_SYS_linux_mq_unlink	278
-#define	LINUX_SYS_linux_mq_timedsend	279
-#define	LINUX_SYS_linux_mq_timedreceive	280
-#define	LINUX_SYS_linux_mq_notify	281
-#define	LINUX_SYS_linux_mq_getsetattr	282
-#define	LINUX_SYS_linux_kexec_load	283
-#define	LINUX_SYS_linux_waitid	284
-#define	LINUX_SYS_linux_add_key	286
-#define	LINUX_SYS_linux_request_key	287
-#define	LINUX_SYS_linux_keyctl	288
-#define	LINUX_SYS_linux_ioprio_set	289
-#define	LINUX_SYS_linux_ioprio_get	290
-#define	LINUX_SYS_linux_inotify_init	291
-#define	LINUX_SYS_linux_inotify_add_watch	292
-#define	LINUX_SYS_linux_inotify_rm_watch	293
-#define	LINUX_SYS_linux_migrate_pages	294
-#define	LINUX_SYS_linux_openat	295
-#define	LINUX_SYS_linux_mkdirat	296
-#define	LINUX_SYS_linux_mknodat	297
-#define	LINUX_SYS_linux_fchownat	298
-#define	LINUX_SYS_linux_futimesat	299
-#define	LINUX_SYS_linux_fstatat64	300
-#define	LINUX_SYS_linux_unlinkat	301
-#define	LINUX_SYS_linux_renameat	302
-#define	LINUX_SYS_linux_linkat	303
-#define	LINUX_SYS_linux_symlinkat	304
-#define	LINUX_SYS_linux_readlinkat	305
-#define	LINUX_SYS_linux_fchmodat	306
-#define	LINUX_SYS_linux_faccessat	307
-#define	LINUX_SYS_linux_pselect6	308
-#define	LINUX_SYS_linux_ppoll	309
-#define	LINUX_SYS_linux_unshare	310
-#define	LINUX_SYS_linux_set_robust_list	311
-#define	LINUX_SYS_linux_get_robust_list	312
-#define	LINUX_SYS_linux_splice	313
-#define	LINUX_SYS_linux_sync_file_range	314
-#define	LINUX_SYS_linux_tee	315
-#define	LINUX_SYS_linux_vmsplice	316
-#define	LINUX_SYS_linux_move_pages	317
-#define	LINUX_SYS_linux_getcpu	318
-#define	LINUX_SYS_linux_epoll_pwait	319
-#define	LINUX_SYS_linux_utimensat	320
-#define	LINUX_SYS_linux_signalfd	321
-#define	LINUX_SYS_linux_timerfd_create	322
-#define	LINUX_SYS_linux_eventfd	323
-#define	LINUX_SYS_linux_fallocate	324
-#define	LINUX_SYS_linux_timerfd_settime	325
-#define	LINUX_SYS_linux_timerfd_gettime	326
-#define	LINUX_SYS_linux_signalfd4	327
-#define	LINUX_SYS_linux_eventfd2	328
-#define	LINUX_SYS_linux_epoll_create1	329
-#define	LINUX_SYS_linux_dup3	330
-#define	LINUX_SYS_linux_pipe2	331
-#define	LINUX_SYS_linux_inotify_init1	332
-#define	LINUX_SYS_linux_preadv	333
-#define	LINUX_SYS_linux_pwritev	334
-#define	LINUX_SYS_linux_rt_tsigqueueinfo	335
-#define	LINUX_SYS_linux_perf_event_open	336
-#define	LINUX_SYS_linux_recvmmsg	337
-#define	LINUX_SYS_linux_fanotify_init	338
-#define	LINUX_SYS_linux_fanotify_mark	339
-#define	LINUX_SYS_linux_prlimit64	340
-#define	LINUX_SYS_linux_name_to_handle_at	341
-#define	LINUX_SYS_linux_open_by_handle_at	342
-#define	LINUX_SYS_linux_clock_adjtime	343
-#define	LINUX_SYS_linux_syncfs	344
-#define	LINUX_SYS_linux_sendmmsg	345
-#define	LINUX_SYS_linux_setns	346
-#define	LINUX_SYS_linux_process_vm_readv	347
-#define	LINUX_SYS_linux_process_vm_writev	348
-#define	LINUX_SYS_MAXSYSCALL	350
+#define	LINUX32_SYS_linux_exit	1
+#define	LINUX32_SYS_linux_fork	2
+#define	LINUX32_SYS_read	3
+#define	LINUX32_SYS_write	4

*** DIFF OUTPUT TRUNCATED AT 1000 LINES ***

From owner-svn-src-all@freebsd.org  Wed Jan 20 01:11:30 2016
Return-Path: <owner-svn-src-all@freebsd.org>
Delivered-To: svn-src-all@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id 66979A828E7;
 Wed, 20 Jan 2016 01:11:30 +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 43CC31EAD;
 Wed, 20 Jan 2016 01:11:30 +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 C36A5B917;
 Tue, 19 Jan 2016 20:11:28 -0500 (EST)
From: John Baldwin <jhb@freebsd.org>
To: Chagin Dmitry <dchagin@freebsd.org>
Cc: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-head@freebsd.org
Subject: Re: svn commit: r289769 - in head/sys: amd64/linux amd64/linux32
 cddl/dev/systrace kern modules/dtrace modules/dtrace/systrace_linux
 modules/dtrace/systrace_linux32
Date: Tue, 19 Jan 2016 17:11:23 -0800
Message-ID: <2131071.yAhOJvfGDs@ralph.baldwin.cx>
User-Agent: KMail/4.14.3 (FreeBSD/10.2-STABLE; KDE/4.14.3; amd64; ; )
In-Reply-To: <20160116130842.GA37748@chd.heemeyer.club>
References: <201510222128.t9MLSLpI056145@repo.freebsd.org>
 <20160116130842.GA37748@chd.heemeyer.club>
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); Tue, 19 Jan 2016 20:11:28 -0500 (EST)
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.20
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for &quot;
 user&quot; and &quot; projects&quot; \)" <svn-src-all.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-all/>
List-Post: <mailto:svn-src-all@freebsd.org>
List-Help: <mailto:svn-src-all-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Wed, 20 Jan 2016 01:11:30 -0000

On Saturday, January 16, 2016 04:08:42 PM Chagin Dmitry wrote:
> On Thu, Oct 22, 2015 at 09:28:21PM +0000, John Baldwin wrote:
> > Author: jhb
> > Date: Thu Oct 22 21:28:20 2015
> > New Revision: 289769
> > URL: https://svnweb.freebsd.org/changeset/base/289769
> > 
> > Log:
> >   Rename remaining linux32 symbols such as linux_sysent[] and
> >   linux_syscallnames[] from linux_* to linux32_* to avoid conflicts with
> >   linux64.ko.  While here, add support for linux64 binaries to systrace.
> >   - Update NOPROTO entries in amd64/linux/syscalls.master to match the
> >     main table to fix systrace build.
> >   - Add a special case for union l_semun arguments to the systrace
> >     generation.
> >   - The systrace_linux32 module now only builds the systrace_linux32.ko.
> >     module on amd64.
> >   - Add a new systrace_linux module that builds on both i386 and amd64.
> >     For i386 it builds the existing systrace_linux.ko.  For amd64 it
> >     builds a systrace_linux.ko for 64-bit binaries.
> 
> Hi, John.
> is it possible to merge to the stable/10 a set of r289769, regen,
> r289822, r290143 and r290144?
> thanks

Done.

-- 
John Baldwin

From owner-svn-src-all@freebsd.org  Wed Jan 20 01:40:20 2016
Return-Path: <owner-svn-src-all@freebsd.org>
Delivered-To: svn-src-all@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6353DA8859B;
 Wed, 20 Jan 2016 01:40: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 1C5651CDD;
 Wed, 20 Jan 2016 01:40:20 +0000 (UTC)
 (envelope-from bdrewery@FreeBSD.org)
Received: from repo.freebsd.org ([127.0.1.37])
 by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u0K1eJOd016579;
 Wed, 20 Jan 2016 01:40:19 GMT (envelope-from bdrewery@FreeBSD.org)
Received: (from bdrewery@localhost)
 by repo.freebsd.org (8.15.2/8.15.2/Submit) id u0K1eJhh016578;
 Wed, 20 Jan 2016 01:40:19 GMT (envelope-from bdrewery@FreeBSD.org)
Message-Id: <201601200140.u0K1eJhh016578@repo.freebsd.org>
X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to
 bdrewery@FreeBSD.org using -f
From: Bryan Drewery <bdrewery@FreeBSD.org>
Date: Wed, 20 Jan 2016 01:40:19 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-head@freebsd.org
Subject: svn commit: r294370 - head/share/mk
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.20
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for &quot;
 user&quot; and &quot; projects&quot; \)" <svn-src-all.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-all/>
List-Post: <mailto:svn-src-all@freebsd.org>
List-Help: <mailto:svn-src-all-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Wed, 20 Jan 2016 01:40:20 -0000

Author: bdrewery
Date: Wed Jan 20 01:40:18 2016
New Revision: 294370
URL: https://svnweb.freebsd.org/changeset/base/294370

Log:
  mkdep: Fix -include not being added for .depend tracking.
  
  This fixes incremental build of OpenSSH after the recent upgrade.
  
  For example, in secure/lib/libssh, -include ssh_namespace.h is used on
  all files.  This is not tracked in the .depend file though due to
  MKDEP_CFLAGS not including it.  The ssh example was broken in r291941
  when not using FAST_DEPEND due to the .depend bug.  FAST_DEPEND was not
  affected by this because it generates dependencies at compile time and
  thus sees the -include.
  
  This ugly make syntax could be simpler for bmake by using :tW but
  fmake-compatible syntax is used since this needs to be MFC'd all the way
  to stable/9.
  
  Also add a temporary hack to workaround existing checkouts building
  incrementally with a .depend file not having these headers.
  
  MFC after:	1 week
  Sponsored by:	EMC / Isilon Storage Division

Modified:
  head/share/mk/bsd.dep.mk

Modified: head/share/mk/bsd.dep.mk
==============================================================================
--- head/share/mk/bsd.dep.mk	Wed Jan 20 01:11:01 2016	(r294369)
+++ head/share/mk/bsd.dep.mk	Wed Jan 20 01:40:18 2016	(r294370)
@@ -196,12 +196,27 @@ depend: beforedepend ${DEPENDFILE} after
 # Tell bmake not to look for generated files via .PATH
 .NOPATH: ${DEPENDFILE} ${DEPENDFILES_OBJS}
 
+.if ${MK_FAST_DEPEND} == "no"
+# Capture -include from CFLAGS.
+# This could be simpler with bmake :tW but needs to support fmake for MFC.
+_CFLAGS_INCLUDES= ${CFLAGS:Q:S/\\ /,/g:C/-include,/-include%/g:C/,/ /g:M-include*:C/%/ /g}
+_CXXFLAGS_INCLUDES= ${CXXFLAGS:Q:S/\\ /,/g:C/-include,/-include%/g:C/,/ /g:M-include*:C/%/ /g}
+# XXX: Temporary hack to workaround .depend files not tracking -include
+.if !empty(_CFLAGS_INCLUDES)
+${OBJS} ${POBJS} ${SOBJS}: ${_CFLAGS_INCLUDES:M*.h}
+.endif
+.if !empty(_CXXFLAGS_INCLUDES)
+${OBJS} ${POBJS} ${SOBJS}: ${_CXXFLAGS_INCLUDES:M*.h}
+.endif
+
 # Different types of sources are compiled with slightly different flags.
 # Split up the sources, and filter out headers and non-applicable flags.
 MKDEP_CFLAGS=	${CFLAGS:M-nostdinc*} ${CFLAGS:M-[BIDU]*} ${CFLAGS:M-std=*} \
-		${CFLAGS:M-ansi}
+		${CFLAGS:M-ansi} ${_CFLAGS_INCLUDES}
 MKDEP_CXXFLAGS=	${CXXFLAGS:M-nostdinc*} ${CXXFLAGS:M-[BIDU]*} \
-		${CXXFLAGS:M-std=*} ${CXXFLAGS:M-ansi} ${CXXFLAGS:M-stdlib=*}
+		${CXXFLAGS:M-std=*} ${CXXFLAGS:M-ansi} ${CXXFLAGS:M-stdlib=*} \
+		${_CXXFLAGS_INCLUDES}
+.endif	# ${MK_FAST_DEPEND} == "no"
 
 DPSRCS+= ${SRCS}
 ${DEPENDFILE}: ${DPSRCS}

From owner-svn-src-all@freebsd.org  Wed Jan 20 01:40:40 2016
Return-Path: <owner-svn-src-all@freebsd.org>
Delivered-To: svn-src-all@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0293CA885ED;
 Wed, 20 Jan 2016 01:40:40 +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 D9FED1E3A;
 Wed, 20 Jan 2016 01:40:39 +0000 (UTC)
 (envelope-from bdrewery@FreeBSD.org)
Received: from mail.xzibition.com (localhost [IPv6:::1])
 by freefall.freebsd.org (Postfix) with ESMTP id D3BA215B5;
 Wed, 20 Jan 2016 01:40: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 79DDA1C7BB;
 Wed, 20 Jan 2016 01:40:39 +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 SjmSEMvh0njF; Wed, 20 Jan 2016 01:40:37 +0000 (UTC)
Subject: Re: svn commit: r291941 - in head: lib/libpam/modules/pam_ssh
 secure/lib/libssh secure/libexec/sftp-server secure/libexec/ssh-keysign
 secure/libexec/ssh-pkcs11-helper secure/usr.bin/scp secure/usr.bin/...
DKIM-Filter: OpenDKIM Filter v2.9.2 mail.xzibition.com D7FBB1C7B6
Cc: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-head@freebsd.org
References: <201512071608.tB7G89BZ095366@repo.freebsd.org>
 <86vb6phdug.fsf@desk.des.no> <569E60BA.6050007@FreeBSD.org>
 <569E7524.5040806@FreeBSD.org> <569ED796.6030300@FreeBSD.org>
From: Bryan Drewery <bdrewery@FreeBSD.org>
Openpgp: id=F9173CB2C3AAEA7A5C8A1F0935D771BB6E4697CF;
 url=http://www.shatow.net/bryan/bryan2.asc
Organization: FreeBSD
Message-ID: <569EE596.9060503@FreeBSD.org>
Date: Tue, 19 Jan 2016 17:40:38 -0800
User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:38.0) Gecko/20100101
 Thunderbird/38.5.1
MIME-Version: 1.0
In-Reply-To: <569ED796.6030300@FreeBSD.org>
Content-Type: multipart/signed; micalg=pgp-sha1;
 protocol="application/pgp-signature";
 boundary="Sewi5EtjANkLnC8UD6lVcahR6aQbJ6t7Q"
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.20
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for &quot;
 user&quot; and &quot; projects&quot; \)" <svn-src-all.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-all/>
List-Post: <mailto:svn-src-all@freebsd.org>
List-Help: <mailto:svn-src-all-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Wed, 20 Jan 2016 01:40:40 -0000

This is an OpenPGP/MIME signed message (RFC 4880 and 3156)
--Sewi5EtjANkLnC8UD6lVcahR6aQbJ6t7Q
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable

On 1/19/2016 4:40 PM, Bryan Drewery wrote:
> On 1/19/2016 9:40 AM, Bryan Drewery wrote:
>> On 1/19/2016 8:13 AM, Bryan Drewery wrote:
>>> On 1/19/2016 5:56 AM, Dag-Erling Sm=C3=B8rgrav wrote:
>>>> Bryan Drewery <bdrewery@FreeBSD.org> writes:
>>>>> Log:
>>>>>   Replace unneeded manual dependency on header by adding it to SRCS=
=2E
>>>>>  =20
>>>>>   bsd.lib.mk and bsd.prog.mk already depend all objs on headers in =
SRCS if
>>>>>   there is not yet a depend file.  The headers in SRCS are never bu=
ilt or
>>>>>   installed.  After 'make depend' the header was already added as a=
 proper
>>>>>   dependency on the objects where needed.
>>>>
>>>> This doesn't work.  Try the following:
>>>>
>>>> $ cd /usr/src/secure/lib/libssh
>>>> $ make depend && make
>>>> $ touch /usr/src/crypto/openssh/ssh_namespace.h
>>>> $ make
>>>
>>> Well, it sort of works with WITH_FAST_DEPEND which will be default ve=
ry
>>> shortly.
>>>
>> ...
>>>> $ grep -c ssh_namespace $(make -V.OBJDIR)/.depend
>>>> 0
>>>>
>>>
>>> That is expected. The dependency is defined in bsd.lib.mk. Granted it=
 is
>>> dependent on .depend existing, but I am going to remove that check so=
 it
>>> is always defined.
>>>
>>
>> The problem with the old method (mkdep which is still default) is that=

>> the -include is not passed to mkdep. FAST_DEPEND does not have that
>> issue since it generates the .depend files during compilation, where t=
he
>> -include is present.
>>
>>
>=20
> It's manifesting for people now with -DNO_CLEAN using mkdep. I'm workin=
g
> on a solution rather than reverting.
>=20
> /usr/obj/usr/src/tmp/usr/lib/libprivatessh.so: undefined reference to
> `Fssh_crypto_scalarmult_curve25519'
>=20

r294370 should fix it all.

--=20
Regards,
Bryan Drewery


--Sewi5EtjANkLnC8UD6lVcahR6aQbJ6t7Q
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

iQEcBAEBAgAGBQJWnuWWAAoJEDXXcbtuRpfP5uAH/0akaYphFjbqzmC6ZYW4/+iZ
mwjvSodSpPWrmLMI+GyrHvDD7eSgb1M9jz//4S4LWoiRnSqVHVMAHT6beoC2vGbt
daP0pRwQTnIQfa2TyPYnRO0TSdRFBu9GJc3aUuzuY9S+o+uubMlfo2G5lbfvPB5Q
Cl8mJLIuu3pXBQO04AEOCv/vXsCGNLCE471vSamvvMEP1glsxnx7/wi5EZjid914
H/4K55JLdUGPQTuA3SjwCOddOJXnDWa4LmYPZOQqpvdFrmcIANP+l7qUNWczpVNH
lenFYbKutKdVePpF9nQS3YIprsQ2i9tmErDy2iwlaOmIKC/IkKFsTUAC3YCNw+U=
=94xr
-----END PGP SIGNATURE-----

--Sewi5EtjANkLnC8UD6lVcahR6aQbJ6t7Q--

From owner-svn-src-all@freebsd.org  Wed Jan 20 02:14:18 2016
Return-Path: <owner-svn-src-all@freebsd.org>
Delivered-To: svn-src-all@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id 381B5A890A1;
 Wed, 20 Jan 2016 02:14:18 +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 18A831BF7;
 Wed, 20 Jan 2016 02:14:18 +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 97A91B97D;
 Tue, 19 Jan 2016 21:14:16 -0500 (EST)
From: John Baldwin <jhb@freebsd.org>
To: Marius Strobl <marius@freebsd.org>
Cc: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-head@freebsd.org
Subject: Re: svn commit: r294362 - in head/sys: dev/uart kern sys
Date: Tue, 19 Jan 2016 18:14:14 -0800
Message-ID: <2881455.20ba4MY9ds@ralph.baldwin.cx>
User-Agent: KMail/4.14.3 (FreeBSD/10.2-STABLE; KDE/4.14.3; amd64; ; )
In-Reply-To: <201601192334.u0JNYST5080954@repo.freebsd.org>
References: <201601192334.u0JNYST5080954@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); Tue, 19 Jan 2016 21:14:16 -0500 (EST)
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.20
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for &quot;
 user&quot; and &quot; projects&quot; \)" <svn-src-all.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-all/>
List-Post: <mailto:svn-src-all@freebsd.org>
List-Help: <mailto:svn-src-all-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Wed, 20 Jan 2016 02:14:18 -0000

On Tuesday, January 19, 2016 11:34:28 PM Marius Strobl wrote:
> Author: marius
> Date: Tue Jan 19 23:34:27 2016
> New Revision: 294362
> URL: https://svnweb.freebsd.org/changeset/base/294362
> 
> Log:
>   Fix tty_drain() and, thus, TIOCDRAIN of the current tty(4) incarnation
>   to actually wait until the TX FIFOs of UARTs have be drained before
>   returning. This is done by bringing the equivalent of the TS_BUSY flag
>   found in the previous implementation back in an ABI-preserving way.
>   Reported and tested by: Patrick Powell
>   
>   Most likely, drivers for USB-serial-adapters likewise incorporating
>   TX FIFOs as well as other terminal devices that buffer output in some
>   form should also provide implementations of tsw_busy.
>   
>   MFC after:	3 days

Hmm, I got a panic on boot that I think is from this:

panic: Assertion tty_gone(tp) failed at /ufs/src-head-clean/sys/sys/ttydevsw.h:19
cpuid = 8
KDB: stack backtrace:
db_trace_self_wrapper() at db_trace_self_wrapper+0x2b/frame 0xfffffe085c93a430
vpanic() at vpanic+0x182/frame 0xfffffe085c93a4b0
kassert_panic() at kassert_panic+0x126/frame 0xfffffe085c93a520
tty_drain() at tty_drain+0x80/frame 0xfffffe085c93a560
ttydev_leave() at ttydev_leave+0x8d/frame 0xfffffe085c93a580
ttydev_close() at ttydev_close+0xaf/frame 0xfffffe085c93a5a0
devfs_close() at devfs_close+0x223/frame 0xfffffe085c93a610
VOP_CLOSE_APV() at VOP_CLOSE_APV+0xf1/frame 0xfffffe085c93a640
vn_close() at vn_close+0xcd/frame 0xfffffe085c93a6b0
vn_closefile() at vn_closefile+0x4a/frame 0xfffffe085c93a730
devfs_close_f() at devfs_close_f+0x2c/frame 0xfffffe085c93a760
_fdrop() at _fdrop+0x1a/frame 0xfffffe085c93a780
closef() at closef+0x1e1/frame 0xfffffe085c93a810
fdescfree_fds() at fdescfree_fds+0x9d/frame 0xfffffe085c93a850
fdescfree() at fdescfree+0x46c/frame 0xfffffe085c93a910
exit1() at exit1+0x4e6/frame 0xfffffe085c93a990
sys_sys_exit() at sys_sys_exit+0xd/frame 0xfffffe085c93a9a0
amd64_syscall() at amd64_syscall+0x2db/frame 0xfffffe085c93aab0

-- 
John Baldwin

From owner-svn-src-all@freebsd.org  Wed Jan 20 02:24:39 2016
Return-Path: <owner-svn-src-all@freebsd.org>
Delivered-To: svn-src-all@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id DD49EA89509
 for <svn-src-all@mailman.ysv.freebsd.org>;
 Wed, 20 Jan 2016 02:24:39 +0000 (UTC) (envelope-from ian@freebsd.org)
Received: from erouter6.ore.mailhop.org (erouter6.ore.mailhop.org
 [54.187.213.119])
 (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
 (Client did not present a certificate)
 by mx1.freebsd.org (Postfix) with ESMTPS id BD2861513
 for <svn-src-all@freebsd.org>; Wed, 20 Jan 2016 02:24:39 +0000 (UTC)
 (envelope-from ian@freebsd.org)
Received: from ilsoft.org (unknown [73.34.117.227])
 by outbound3.ore.mailhop.org (Halon Mail Gateway) with ESMTPSA;
 Wed, 20 Jan 2016 02:22:55 +0000 (UTC)
Received: from rev (rev [172.22.42.240])
 by ilsoft.org (8.15.2/8.14.9) with ESMTP id u0K2OVUf010508;
 Tue, 19 Jan 2016 19:24:31 -0700 (MST) (envelope-from ian@freebsd.org)
Message-ID: <1453256671.46848.98.camel@freebsd.org>
Subject: Re: svn commit: r294362 - in head/sys: dev/uart kern sys
From: Ian Lepore <ian@freebsd.org>
To: Marius Strobl <marius@FreeBSD.org>, src-committers@freebsd.org,
 svn-src-all@freebsd.org, svn-src-head@freebsd.org
Date: Tue, 19 Jan 2016 19:24:31 -0700
In-Reply-To: <201601192334.u0JNYST5080954@repo.freebsd.org>
References: <201601192334.u0JNYST5080954@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-all@freebsd.org
X-Mailman-Version: 2.1.20
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for &quot;
 user&quot; and &quot; projects&quot; \)" <svn-src-all.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-all/>
List-Post: <mailto:svn-src-all@freebsd.org>
List-Help: <mailto:svn-src-all-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Wed, 20 Jan 2016 02:24:40 -0000

On Tue, 2016-01-19 at 23:34 +0000, Marius Strobl wrote:
> Author: marius
> Date: Tue Jan 19 23:34:27 2016
> New Revision: 294362
> URL: https://svnweb.freebsd.org/changeset/base/294362
> 
> Log:
>   Fix tty_drain() and, thus, TIOCDRAIN of the current tty(4) incarnation
>   to actually wait until the TX FIFOs of UARTs have be drained before
>   returning. This is done by bringing the equivalent of the TS_BUSY flag
>   found in the previous implementation back in an ABI-preserving way.
>   Reported and tested by: Patrick Powell
>   
>   Most likely, drivers for USB-serial-adapters likewise incorporating
>   TX FIFOs as well as other terminal devices that buffer output in some
>   form should also provide implementations of tsw_busy.
>   
>   MFC after:> 	> 3 days
> 
> Modified:
>   head/sys/dev/uart/uart_tty.c
>   head/sys/kern/tty.c
>   head/sys/sys/ttydevsw.h

This rocks.

It would rock even more if uart's sc_txbusy actually meant what its
name implies, but for some hardware what it really indicates is "the
hardware can/cannot accept more data" which is not the same as "all
data has been transmitted."  Even for hardware that doesn't signal
txidle until the fifo is completely empty (not just at a lowater mark),
there may still be a last byte on the way out from a tx holding
register.

-- Ian


From owner-svn-src-all@freebsd.org  Wed Jan 20 02:36:43 2016
Return-Path: <owner-svn-src-all@freebsd.org>
Delivered-To: svn-src-all@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9C32AA89AA2;
 Wed, 20 Jan 2016 02:36:43 +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 5B2F41DE3;
 Wed, 20 Jan 2016 02:36:43 +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 65605B95B;
 Tue, 19 Jan 2016 21:36:42 -0500 (EST)
From: John Baldwin <jhb@freebsd.org>
To: Marius Strobl <marius@freebsd.org>
Cc: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-head@freebsd.org
Subject: Re: svn commit: r294362 - in head/sys: dev/uart kern sys
Date: Tue, 19 Jan 2016 18:36:04 -0800
Message-ID: <1839427.BLR7n8zvy2@ralph.baldwin.cx>
User-Agent: KMail/4.14.3 (FreeBSD/10.2-STABLE; KDE/4.14.3; amd64; ; )
In-Reply-To: <2881455.20ba4MY9ds@ralph.baldwin.cx>
References: <201601192334.u0JNYST5080954@repo.freebsd.org>
 <2881455.20ba4MY9ds@ralph.baldwin.cx>
MIME-Version: 1.0
Content-Transfer-Encoding: quoted-printable
Content-Type: text/plain; charset="utf-8"
X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7
 (bigwig.baldwin.cx); Tue, 19 Jan 2016 21:36:42 -0500 (EST)
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.20
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for &quot;
 user&quot; and &quot; projects&quot; \)" <svn-src-all.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-all/>
List-Post: <mailto:svn-src-all@freebsd.org>
List-Help: <mailto:svn-src-all-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Wed, 20 Jan 2016 02:36:43 -0000

On Tuesday, January 19, 2016 06:14:14 PM John Baldwin wrote:
> On Tuesday, January 19, 2016 11:34:28 PM Marius Strobl wrote:
> > Author: marius
> > Date: Tue Jan 19 23:34:27 2016
> > New Revision: 294362
> > URL: https://svnweb.freebsd.org/changeset/base/294362
> >=20
> > Log:
> >   Fix tty_drain() and, thus, TIOCDRAIN of the current tty(4) incarn=
ation
> >   to actually wait until the TX FIFOs of UARTs have be drained befo=
re
> >   returning. This is done by bringing the equivalent of the TS_BUSY=
 flag
> >   found in the previous implementation back in an ABI-preserving wa=
y.
> >   Reported and tested by: Patrick Powell
> >  =20
> >   Most likely, drivers for USB-serial-adapters likewise incorporati=
ng
> >   TX FIFOs as well as other terminal devices that buffer output in =
some
> >   form should also provide implementations of tsw_busy.
> >  =20
> >   MFC after:=093 days
>=20
> Hmm, I got a panic on boot that I think is from this:
>=20
> panic: Assertion tty_gone(tp) failed at /ufs/src-head-clean/sys/sys/t=
tydevsw.h:19
> cpuid =3D 8
> KDB: stack backtrace:
> db_trace_self_wrapper() at db_trace_self_wrapper+0x2b/frame 0xfffffe0=
85c93a430
> vpanic() at vpanic+0x182/frame 0xfffffe085c93a4b0
> kassert_panic() at kassert_panic+0x126/frame 0xfffffe085c93a520
> tty_drain() at tty_drain+0x80/frame 0xfffffe085c93a560
> ttydev_leave() at ttydev_leave+0x8d/frame 0xfffffe085c93a580
> ttydev_close() at ttydev_close+0xaf/frame 0xfffffe085c93a5a0
> devfs_close() at devfs_close+0x223/frame 0xfffffe085c93a610
> VOP_CLOSE_APV() at VOP_CLOSE_APV+0xf1/frame 0xfffffe085c93a640
> vn_close() at vn_close+0xcd/frame 0xfffffe085c93a6b0
> vn_closefile() at vn_closefile+0x4a/frame 0xfffffe085c93a730
> devfs_close_f() at devfs_close_f+0x2c/frame 0xfffffe085c93a760
> _fdrop() at _fdrop+0x1a/frame 0xfffffe085c93a780
> closef() at closef+0x1e1/frame 0xfffffe085c93a810
> fdescfree_fds() at fdescfree_fds+0x9d/frame 0xfffffe085c93a850
> fdescfree() at fdescfree+0x46c/frame 0xfffffe085c93a910
> exit1() at exit1+0x4e6/frame 0xfffffe085c93a990
> sys_sys_exit() at sys_sys_exit+0xd/frame 0xfffffe085c93a9a0
> amd64_syscall() at amd64_syscall+0x2db/frame 0xfffffe085c93aab0

(kgdb) frame 4
#4  0xffffffff80a93360 in tty_drain (tp=3D0xfffff8000b9c9800, leaving=3D=
1)
    at ttydevsw.h:191
191             MPASS(tty_gone(tp));
Current language:  auto; currently minimal
(kgdb) p tp
$1 =3D (struct tty *) 0xfffff8000b9c9800
(kgdb) p *tp
$2 =3D {t_mtx =3D 0xfffff8000b9c9808, t_mtxobj =3D {lock_object =3D {
      lo_name =3D 0xffffffff81389f66 "ttymtx", lo_flags =3D 16973824, l=
o_data =3D 0,=20
      lo_witness =3D 0xfffffe0000bafd80}, mtx_lock =3D 1844673527793480=
9088},=20
  t_list =3D {tqe_next =3D 0xfffff8000b9c9400, tqe_prev =3D 0xfffff8000=
b9c9c28},=20
  t_flags =3D 128, t_revokecnt =3D 1, t_inq =3D {ti_firstblock =3D 0xff=
fff8001f5c86e0,=20
    ti_startblock =3D 0x0, ti_reprintblock =3D 0x0, ti_lastblock =3D 0x=
0,=20
    ti_begin =3D 0, ti_linestart =3D 0, ti_reprint =3D 0, ti_end =3D 0,=
=20
    ti_nblocks =3D 15, ti_quota =3D 15}, t_inlow =3D 1728, t_outq =3D {=

    to_firstblock =3D 0xfffff8001f4b0900, to_lastblock =3D 0x0, to_begi=
n =3D 0,=20
    to_end =3D 0, to_nblocks =3D 8, to_quota =3D 8}, t_outlow =3D 1785,=
 t_inwait =3D {
    cv_description =3D 0xffffffff81389f45 "ttyin", cv_waiters =3D 0}, t=
_outwait =3D {
    cv_description =3D 0xffffffff81389f4b "ttyout", cv_waiters =3D 0},=20=

  t_outserwait =3D {cv_description =3D 0xffffffff81389f52 "ttyosr",=20
    cv_waiters =3D 0}, t_bgwait =3D {cv_description =3D 0xffffffff81389=
f59 "ttybg",=20
    cv_waiters =3D 0}, t_dcdwait =3D {
    cv_description =3D 0xffffffff81389f5f "ttydcd", cv_waiters =3D 0}, =
t_inpoll =3D {
    si_tdlist =3D {tqh_first =3D 0x0, tqh_last =3D 0x0}, si_note =3D {k=
l_list =3D {
        slh_first =3D 0x0}, kl_lock =3D 0xffffffff809dd1e0 <knlist_mtx_=
lock>,=20
      kl_unlock =3D 0xffffffff809dd200 <knlist_mtx_unlock>,=20
      kl_assert_locked =3D 0xffffffff809dd220 <knlist_mtx_assert_locked=
>,=20
      kl_assert_unlocked =3D 0xffffffff809dd240 <knlist_mtx_assert_unlo=
cked>,=20
      kl_lockarg =3D 0xfffff8000b9c9808}, si_mtx =3D 0x0}, t_outpoll =3D=
 {
    si_tdlist =3D {tqh_first =3D 0x0, tqh_last =3D 0x0}, si_note =3D {k=
l_list =3D {
        slh_first =3D 0x0}, kl_lock =3D 0xffffffff809dd1e0 <knlist_mtx_=
lock>,=20
      kl_unlock =3D 0xffffffff809dd200 <knlist_mtx_unlock>,=20
---Type <return> to continue, or q <return> to quit---
      kl_assert_locked =3D 0xffffffff809dd220 <knlist_mtx_assert_locked=
>,=20
      kl_assert_unlocked =3D 0xffffffff809dd240 <knlist_mtx_assert_unlo=
cked>,=20
      kl_lockarg =3D 0xfffff8000b9c9808}, si_mtx =3D 0x0}, t_sigio =3D =
0x0,=20
  t_termios =3D {c_iflag =3D 11010, c_oflag =3D 3, c_cflag =3D 19200, c=
_lflag =3D 1483,=20
    c_cc =3D 0xfffff8000b9c99a0 "\004=EF=BF=BD=EF=BF=BD\177\027\025\022=
\b\003\034\032\031\021\023\026\017\001", c_ispeed =3D 9600, c_ospeed =3D=
 9600}, t_winsize =3D {ws_row =3D 30,=20
    ws_col =3D 80, ws_xpixel =3D 640, ws_ypixel =3D 480}, t_column =3D =
0,=20
  t_writepos =3D 0, t_compatflags =3D 0, t_termios_init_in =3D {c_iflag=
 =3D 11010,=20
    c_oflag =3D 3, c_cflag =3D 19200, c_lflag =3D 1483,=20
    c_cc =3D 0xfffff8000b9c99e0 "\004=EF=BF=BD=EF=BF=BD\177\027\025\022=
\b\003\034\032\031\021\023\026\017\001", c_ispeed =3D 9600, c_ospeed =3D=
 9600}, t_termios_lock_in =3D {
    c_iflag =3D 0, c_oflag =3D 0, c_cflag =3D 0, c_lflag =3D 0,=20
    c_cc =3D 0xfffff8000b9c9a0c "", c_ispeed =3D 0, c_ospeed =3D 0},=20=

  t_termios_init_out =3D {c_iflag =3D 11010, c_oflag =3D 3, c_cflag =3D=
 19200,=20
    c_lflag =3D 1483,=20
    c_cc =3D 0xfffff8000b9c9a38 "\004=EF=BF=BD=EF=BF=BD\177\027\025\022=
\b\003\034\032\031\021\023\026\017\001", c_ispeed =3D 9600, c_ospeed =3D=
 9600}, t_termios_lock_out =3D {
    c_iflag =3D 0, c_oflag =3D 0, c_cflag =3D 0, c_lflag =3D 0,=20
    c_cc =3D 0xfffff8000b9c9a64 "", c_ispeed =3D 0, c_ospeed =3D 0},=20=

  t_devsw =3D 0xffffffff81885300, t_hook =3D 0x0, t_pgrp =3D 0x0, t_ses=
sion =3D 0x0,=20
  t_sessioncnt =3D 0, t_devswsoftc =3D 0xffffffff8185bd88, t_hooksoftc =
=3D 0x0,=20
  t_dev =3D 0xfffff8000b9d4400}
(kgdb) p tp->t_dev
$3 =3D (struct cdev *) 0xfffff8000b9d4400
(kgdb) p tp->t_dev->si_name
$4 =3D 0xfffff8000b9d44e0 "ttyv0"

The code in ttydev_leave() is:

=09/* Drain any output. */
=09MPASS((tp->t_flags & TF_STOPPED) =3D=3D 0);
=09if (!tty_gone(tp))
=09=09tty_drain(tp, 1);

Nothing in tty_drain() sets TF_GONE yet, so this seems to be a guarante=
ed
panic.

Various other places also call tty_drain() when then tty is not "gone"
including the ioctl's backing tcsetattr().

--=20
John Baldwin

From owner-svn-src-all@freebsd.org  Wed Jan 20 02:38:55 2016
Return-Path: <owner-svn-src-all@freebsd.org>
Delivered-To: svn-src-all@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6E11FA89B4D;
 Wed, 20 Jan 2016 02:38:55 +0000 (UTC)
 (envelope-from adrian.chadd@gmail.com)
Received: from mail-ig0-x235.google.com (mail-ig0-x235.google.com
 [IPv6:2607:f8b0:4001: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 427081F5F;
 Wed, 20 Jan 2016 02:38:55 +0000 (UTC)
 (envelope-from adrian.chadd@gmail.com)
Received: by mail-ig0-x235.google.com with SMTP id mw1so3749536igb.1;
 Tue, 19 Jan 2016 18:38:55 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;
 h=mime-version:in-reply-to:references:date:message-id:subject:from:to
 :cc:content-type;
 bh=vYgeaoXvnCg8wxb/zMoPzv5350+gS1VAk6RU4gQzXLs=;
 b=B3wPXXLCsBpMK2AbMXXNzC9AO8a9OsWRRN70u56jaCSZQU9chhrZWGfcC5WBJmiF4Q
 2PfaqHkylBBm4Ik95AKyPsdEZgcne8KW+ehzy34Vyfgb46OfNYX6/YM5fsEOMMfpcXjj
 ScHsy/htwf3i/X5eIuVPEnjM2sWuLUDFxBKQMmGE54FCH2hDKDAFqM29SL2VdZRN/bnj
 firZCTK0yi/LqyMzng5K45eEstaSWwCfZF88u4hISo7dPBM7ZUvyy0J1HCngvipKfJ/t
 IBXuio6AhlP2NFqmPOc6U3OnCgoENejr9hZKOc/ZJVMHcAe6LzqBuq8dpxX6oJWp2KDa
 KI2w==
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:date
 :message-id:subject:from:to:cc:content-type;
 bh=vYgeaoXvnCg8wxb/zMoPzv5350+gS1VAk6RU4gQzXLs=;
 b=Xc1rI8+5onjgl8bYf+rqzpkYB9OppVqjQpr81E/lBZtqtsufvhg/k46LSCn1DMWHZZ
 y6Tg9ltFLeZgqTmV949TNSTJWhZgsOmDkd2udfYtztAwUF85vQBztp2meDLD26JlBkLz
 ss5Pmtb3jisgiTzKyHT8HcQV1y40KDR0CdSJSMS29/fxnnyMblNC5jViT6F/xKFlfpkW
 gfsS0Q3mCm2lK2fuznwXcVBG/jMTHScPE+xzZJMp0z2q1P+2JYaeFKMsdtgFOZOFBs47
 i9U/TOXbrQMezP7vsPVRP6QzYtFzUzHgtf5Sf8azPAqCARKyi9aA+nvYwKixP8KthfPr
 X0dg==
X-Gm-Message-State: AG10YOQ+KMy8A/M7iEOUw9Vh2gNyKv1zl60Nl4dGacEk/Uw4vAPbiDJ/04bvjIUaVgLCDRKsZCgtQa/APHM81A==
MIME-Version: 1.0
X-Received: by 10.50.178.178 with SMTP id cz18mr1308928igc.37.1453257534588;
 Tue, 19 Jan 2016 18:38:54 -0800 (PST)
Received: by 10.36.121.16 with HTTP; Tue, 19 Jan 2016 18:38:54 -0800 (PST)
In-Reply-To: <1839427.BLR7n8zvy2@ralph.baldwin.cx>
References: <201601192334.u0JNYST5080954@repo.freebsd.org>
 <2881455.20ba4MY9ds@ralph.baldwin.cx>
 <1839427.BLR7n8zvy2@ralph.baldwin.cx>
Date: Tue, 19 Jan 2016 18:38:54 -0800
Message-ID: <CAJ-Vmo=ShcZX3NsVghOk0XHSpRgfiL8tXD-2d2zYeyN7W-E_bQ@mail.gmail.com>
Subject: Re: svn commit: r294362 - in head/sys: dev/uart kern sys
From: Adrian Chadd <adrian.chadd@gmail.com>
To: John Baldwin <jhb@freebsd.org>
Cc: Marius Strobl <marius@freebsd.org>, 
 "src-committers@freebsd.org" <src-committers@freebsd.org>, 
 "svn-src-all@freebsd.org" <svn-src-all@freebsd.org>, 
 "svn-src-head@freebsd.org" <svn-src-head@freebsd.org>
Content-Type: text/plain; charset=UTF-8
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.20
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for &quot;
 user&quot; and &quot; projects&quot; \)" <svn-src-all.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-all/>
List-Post: <mailto:svn-src-all@freebsd.org>
List-Help: <mailto:svn-src-all-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Wed, 20 Jan 2016 02:38:55 -0000

On 19 January 2016 at 18:36, John Baldwin <jhb@freebsd.org> wrote:

[snip]

>
> The code in ttydev_leave() is:
>
>         /* Drain any output. */
>         MPASS((tp->t_flags & TF_STOPPED) == 0);
>         if (!tty_gone(tp))
>                 tty_drain(tp, 1);
>
> Nothing in tty_drain() sets TF_GONE yet, so this seems to be a guaranteed
> panic.
>
> Various other places also call tty_drain() when then tty is not "gone"
> including the ioctl's backing tcsetattr().

ok, so should we back the patch out until it's addressed?


-a

From owner-svn-src-all@freebsd.org  Wed Jan 20 02:45:32 2016
Return-Path: <owner-svn-src-all@freebsd.org>
Delivered-To: svn-src-all@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9E71CA89D87;
 Wed, 20 Jan 2016 02:45:32 +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 5DAA81389;
 Wed, 20 Jan 2016 02:45:32 +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 F014BB95B;
 Tue, 19 Jan 2016 21:45:30 -0500 (EST)
From: John Baldwin <jhb@freebsd.org>
To: Marius Strobl <marius@freebsd.org>
Cc: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-head@freebsd.org
Subject: Re: svn commit: r294362 - in head/sys: dev/uart kern sys
Date: Tue, 19 Jan 2016 18:45:27 -0800
Message-ID: <29108223.BFrmB7fo1m@ralph.baldwin.cx>
User-Agent: KMail/4.14.3 (FreeBSD/10.2-STABLE; KDE/4.14.3; amd64; ; )
In-Reply-To: <1839427.BLR7n8zvy2@ralph.baldwin.cx>
References: <201601192334.u0JNYST5080954@repo.freebsd.org>
 <2881455.20ba4MY9ds@ralph.baldwin.cx> <1839427.BLR7n8zvy2@ralph.baldwin.cx>
MIME-Version: 1.0
Content-Transfer-Encoding: quoted-printable
Content-Type: text/plain; charset="utf-8"
X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7
 (bigwig.baldwin.cx); Tue, 19 Jan 2016 21:45:31 -0500 (EST)
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.20
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for &quot;
 user&quot; and &quot; projects&quot; \)" <svn-src-all.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-all/>
List-Post: <mailto:svn-src-all@freebsd.org>
List-Help: <mailto:svn-src-all-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Wed, 20 Jan 2016 02:45:32 -0000

On Tuesday, January 19, 2016 06:36:04 PM John Baldwin wrote:
> On Tuesday, January 19, 2016 06:14:14 PM John Baldwin wrote:
> > On Tuesday, January 19, 2016 11:34:28 PM Marius Strobl wrote:
> > > Author: marius
> > > Date: Tue Jan 19 23:34:27 2016
> > > New Revision: 294362
> > > URL: https://svnweb.freebsd.org/changeset/base/294362
> > >=20
> > > Log:
> > >   Fix tty_drain() and, thus, TIOCDRAIN of the current tty(4) inca=
rnation
> > >   to actually wait until the TX FIFOs of UARTs have be drained be=
fore
> > >   returning. This is done by bringing the equivalent of the TS_BU=
SY flag
> > >   found in the previous implementation back in an ABI-preserving =
way.
> > >   Reported and tested by: Patrick Powell
> > >  =20
> > >   Most likely, drivers for USB-serial-adapters likewise incorpora=
ting
> > >   TX FIFOs as well as other terminal devices that buffer output i=
n some
> > >   form should also provide implementations of tsw_busy.
> > >  =20
> > >   MFC after:=093 days
> >=20
> > Hmm, I got a panic on boot that I think is from this:
> >=20
> > panic: Assertion tty_gone(tp) failed at /ufs/src-head-clean/sys/sys=
/ttydevsw.h:19
> > cpuid =3D 8
> > KDB: stack backtrace:
> > db_trace_self_wrapper() at db_trace_self_wrapper+0x2b/frame 0xfffff=
e085c93a430
> > vpanic() at vpanic+0x182/frame 0xfffffe085c93a4b0
> > kassert_panic() at kassert_panic+0x126/frame 0xfffffe085c93a520
> > tty_drain() at tty_drain+0x80/frame 0xfffffe085c93a560
> > ttydev_leave() at ttydev_leave+0x8d/frame 0xfffffe085c93a580
> > ttydev_close() at ttydev_close+0xaf/frame 0xfffffe085c93a5a0
> > devfs_close() at devfs_close+0x223/frame 0xfffffe085c93a610
> > VOP_CLOSE_APV() at VOP_CLOSE_APV+0xf1/frame 0xfffffe085c93a640
> > vn_close() at vn_close+0xcd/frame 0xfffffe085c93a6b0
> > vn_closefile() at vn_closefile+0x4a/frame 0xfffffe085c93a730
> > devfs_close_f() at devfs_close_f+0x2c/frame 0xfffffe085c93a760
> > _fdrop() at _fdrop+0x1a/frame 0xfffffe085c93a780
> > closef() at closef+0x1e1/frame 0xfffffe085c93a810
> > fdescfree_fds() at fdescfree_fds+0x9d/frame 0xfffffe085c93a850
> > fdescfree() at fdescfree+0x46c/frame 0xfffffe085c93a910
> > exit1() at exit1+0x4e6/frame 0xfffffe085c93a990
> > sys_sys_exit() at sys_sys_exit+0xd/frame 0xfffffe085c93a9a0
> > amd64_syscall() at amd64_syscall+0x2db/frame 0xfffffe085c93aab0
>=20
> (kgdb) frame 4
> #4  0xffffffff80a93360 in tty_drain (tp=3D0xfffff8000b9c9800, leaving=
=3D1)
>     at ttydevsw.h:191
> 191             MPASS(tty_gone(tp));
> Current language:  auto; currently minimal
> (kgdb) p tp
> $1 =3D (struct tty *) 0xfffff8000b9c9800
> (kgdb) p *tp
> $2 =3D {t_mtx =3D 0xfffff8000b9c9808, t_mtxobj =3D {lock_object =3D {=

>       lo_name =3D 0xffffffff81389f66 "ttymtx", lo_flags =3D 16973824,=
 lo_data =3D 0,=20
>       lo_witness =3D 0xfffffe0000bafd80}, mtx_lock =3D 18446735277934=
809088},=20
>   t_list =3D {tqe_next =3D 0xfffff8000b9c9400, tqe_prev =3D 0xfffff80=
00b9c9c28},=20
>   t_flags =3D 128, t_revokecnt =3D 1, t_inq =3D {ti_firstblock =3D 0x=
fffff8001f5c86e0,=20
>     ti_startblock =3D 0x0, ti_reprintblock =3D 0x0, ti_lastblock =3D =
0x0,=20
>     ti_begin =3D 0, ti_linestart =3D 0, ti_reprint =3D 0, ti_end =3D =
0,=20
>     ti_nblocks =3D 15, ti_quota =3D 15}, t_inlow =3D 1728, t_outq =3D=
 {
>     to_firstblock =3D 0xfffff8001f4b0900, to_lastblock =3D 0x0, to_be=
gin =3D 0,=20
>     to_end =3D 0, to_nblocks =3D 8, to_quota =3D 8}, t_outlow =3D 178=
5, t_inwait =3D {
>     cv_description =3D 0xffffffff81389f45 "ttyin", cv_waiters =3D 0},=
 t_outwait =3D {
>     cv_description =3D 0xffffffff81389f4b "ttyout", cv_waiters =3D 0}=
,=20
>   t_outserwait =3D {cv_description =3D 0xffffffff81389f52 "ttyosr",=20=

>     cv_waiters =3D 0}, t_bgwait =3D {cv_description =3D 0xffffffff813=
89f59 "ttybg",=20
>     cv_waiters =3D 0}, t_dcdwait =3D {
>     cv_description =3D 0xffffffff81389f5f "ttydcd", cv_waiters =3D 0}=
, t_inpoll =3D {
>     si_tdlist =3D {tqh_first =3D 0x0, tqh_last =3D 0x0}, si_note =3D =
{kl_list =3D {
>         slh_first =3D 0x0}, kl_lock =3D 0xffffffff809dd1e0 <knlist_mt=
x_lock>,=20
>       kl_unlock =3D 0xffffffff809dd200 <knlist_mtx_unlock>,=20
>       kl_assert_locked =3D 0xffffffff809dd220 <knlist_mtx_assert_lock=
ed>,=20
>       kl_assert_unlocked =3D 0xffffffff809dd240 <knlist_mtx_assert_un=
locked>,=20
>       kl_lockarg =3D 0xfffff8000b9c9808}, si_mtx =3D 0x0}, t_outpoll =
=3D {
>     si_tdlist =3D {tqh_first =3D 0x0, tqh_last =3D 0x0}, si_note =3D =
{kl_list =3D {
>         slh_first =3D 0x0}, kl_lock =3D 0xffffffff809dd1e0 <knlist_mt=
x_lock>,=20
>       kl_unlock =3D 0xffffffff809dd200 <knlist_mtx_unlock>,=20
> ---Type <return> to continue, or q <return> to quit---
>       kl_assert_locked =3D 0xffffffff809dd220 <knlist_mtx_assert_lock=
ed>,=20
>       kl_assert_unlocked =3D 0xffffffff809dd240 <knlist_mtx_assert_un=
locked>,=20
>       kl_lockarg =3D 0xfffff8000b9c9808}, si_mtx =3D 0x0}, t_sigio =3D=
 0x0,=20
>   t_termios =3D {c_iflag =3D 11010, c_oflag =3D 3, c_cflag =3D 19200,=
 c_lflag =3D 1483,=20
>     c_cc =3D 0xfffff8000b9c99a0 "\004=EF=BF=BD=EF=BF=BD\177\027\025\0=
22\b\003\034\032\031\021\023\026\017\001", c_ispeed =3D 9600, c_ospeed =
=3D 9600}, t_winsize =3D {ws_row =3D 30,=20
>     ws_col =3D 80, ws_xpixel =3D 640, ws_ypixel =3D 480}, t_column =3D=
 0,=20
>   t_writepos =3D 0, t_compatflags =3D 0, t_termios_init_in =3D {c_ifl=
ag =3D 11010,=20
>     c_oflag =3D 3, c_cflag =3D 19200, c_lflag =3D 1483,=20
>     c_cc =3D 0xfffff8000b9c99e0 "\004=EF=BF=BD=EF=BF=BD\177\027\025\0=
22\b\003\034\032\031\021\023\026\017\001", c_ispeed =3D 9600, c_ospeed =
=3D 9600}, t_termios_lock_in =3D {
>     c_iflag =3D 0, c_oflag =3D 0, c_cflag =3D 0, c_lflag =3D 0,=20
>     c_cc =3D 0xfffff8000b9c9a0c "", c_ispeed =3D 0, c_ospeed =3D 0},=20=

>   t_termios_init_out =3D {c_iflag =3D 11010, c_oflag =3D 3, c_cflag =3D=
 19200,=20
>     c_lflag =3D 1483,=20
>     c_cc =3D 0xfffff8000b9c9a38 "\004=EF=BF=BD=EF=BF=BD\177\027\025\0=
22\b\003\034\032\031\021\023\026\017\001", c_ispeed =3D 9600, c_ospeed =
=3D 9600}, t_termios_lock_out =3D {
>     c_iflag =3D 0, c_oflag =3D 0, c_cflag =3D 0, c_lflag =3D 0,=20
>     c_cc =3D 0xfffff8000b9c9a64 "", c_ispeed =3D 0, c_ospeed =3D 0},=20=

>   t_devsw =3D 0xffffffff81885300, t_hook =3D 0x0, t_pgrp =3D 0x0, t_s=
ession =3D 0x0,=20
>   t_sessioncnt =3D 0, t_devswsoftc =3D 0xffffffff8185bd88, t_hooksoft=
c =3D 0x0,=20
>   t_dev =3D 0xfffff8000b9d4400}
> (kgdb) p tp->t_dev
> $3 =3D (struct cdev *) 0xfffff8000b9d4400
> (kgdb) p tp->t_dev->si_name
> $4 =3D 0xfffff8000b9d44e0 "ttyv0"
>=20
> The code in ttydev_leave() is:
>=20
> =09/* Drain any output. */
> =09MPASS((tp->t_flags & TF_STOPPED) =3D=3D 0);
> =09if (!tty_gone(tp))
> =09=09tty_drain(tp, 1);
>=20
> Nothing in tty_drain() sets TF_GONE yet, so this seems to be a guaran=
teed
> panic.
>=20
> Various other places also call tty_drain() when then tty is not "gone=
"
> including the ioctl's backing tcsetattr().

On a whim, I inverted the assertion and this booted ok for me:

Index: sys/sys/ttydevsw.h
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- sys/sys/ttydevsw.h  (revision 294367)
+++ sys/sys/ttydevsw.h  (working copy)
@@ -188,7 +188,7 @@
 ttydevsw_busy(struct tty *tp)
 {
=20
-       MPASS(tty_gone(tp));
+       MPASS(!tty_gone(tp));
=20
        return (tp->t_devsw->tsw_busy(tp));
 }

--=20
John Baldwin

From owner-svn-src-all@freebsd.org  Wed Jan 20 06:50:32 2016
Return-Path: <owner-svn-src-all@freebsd.org>
Delivered-To: svn-src-all@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id 18EBDA884F3;
 Wed, 20 Jan 2016 06:50:32 +0000 (UTC)
 (envelope-from arybchik@FreeBSD.org)
Received: from repo.freebsd.org (repo.freebsd.org
 [IPv6:2610:1c1:1:6068::e6a:0])
 (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
 (Client did not present a certificate)
 by mx1.freebsd.org (Postfix) with ESMTPS id DF1BA1D50;
 Wed, 20 Jan 2016 06:50:31 +0000 (UTC)
 (envelope-from arybchik@FreeBSD.org)
Received: from repo.freebsd.org ([127.0.1.37])
 by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u0K6oUFw006613;
 Wed, 20 Jan 2016 06:50:30 GMT (envelope-from arybchik@FreeBSD.org)
Received: (from arybchik@localhost)
 by repo.freebsd.org (8.15.2/8.15.2/Submit) id u0K6oUvG006612;
 Wed, 20 Jan 2016 06:50:30 GMT (envelope-from arybchik@FreeBSD.org)
Message-Id: <201601200650.u0K6oUvG006612@repo.freebsd.org>
X-Authentication-Warning: repo.freebsd.org: arybchik set sender to
 arybchik@FreeBSD.org using -f
From: Andrew Rybchenko <arybchik@FreeBSD.org>
Date: Wed, 20 Jan 2016 06:50:30 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-head@freebsd.org
Subject: svn commit: r294371 - head/sys/dev/sfxge/common
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.20
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for &quot;
 user&quot; and &quot; projects&quot; \)" <svn-src-all.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-all/>
List-Post: <mailto:svn-src-all@freebsd.org>
List-Help: <mailto:svn-src-all-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Wed, 20 Jan 2016 06:50:32 -0000

Author: arybchik
Date: Wed Jan 20 06:50:30 2016
New Revision: 294371
URL: https://svnweb.freebsd.org/changeset/base/294371

Log:
  sfxge: cleanup: support __out_bcount_part[_opt] PREfast annotations
  
  New annotation coming into use in the common code. Support its use by
  adding null macro definitions for non-Windows platforms.
  
  Submitted by:   Richard Houldsworth <rhouldsworth at solarflare.com>
  Sponsored by:   Solarflare Communications, Inc.
  X-MFC with:     r293901

Modified:
  head/sys/dev/sfxge/common/efsys.h

Modified: head/sys/dev/sfxge/common/efsys.h
==============================================================================
--- head/sys/dev/sfxge/common/efsys.h	Wed Jan 20 01:40:18 2016	(r294370)
+++ head/sys/dev/sfxge/common/efsys.h	Wed Jan 20 06:50:30 2016	(r294371)
@@ -211,6 +211,8 @@ sfxge_map_mbuf_fast(bus_dma_tag_t tag, b
 #define	__out_ecount_opt(_n)
 #define	__out_bcount(_n)
 #define	__out_bcount_opt(_n)
+#define	__out_bcount_part(_n, _l)
+#define	__out_bcount_part_opt(_n, _l)
 
 #define	__deref_out
 

From owner-svn-src-all@freebsd.org  Wed Jan 20 06:56:19 2016
Return-Path: <owner-svn-src-all@freebsd.org>
Delivered-To: svn-src-all@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id 85F93A887ED;
 Wed, 20 Jan 2016 06:56:19 +0000 (UTC)
 (envelope-from arybchik@FreeBSD.org)
Received: from repo.freebsd.org (repo.freebsd.org
 [IPv6:2610:1c1:1:6068::e6a:0])
 (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
 (Client did not present a certificate)
 by mx1.freebsd.org (Postfix) with ESMTPS id 532BB1295;
 Wed, 20 Jan 2016 06:56:19 +0000 (UTC)
 (envelope-from arybchik@FreeBSD.org)
Received: from repo.freebsd.org ([127.0.1.37])
 by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u0K6uIXs009535;
 Wed, 20 Jan 2016 06:56:18 GMT (envelope-from arybchik@FreeBSD.org)
Received: (from arybchik@localhost)
 by repo.freebsd.org (8.15.2/8.15.2/Submit) id u0K6uI1Y009534;
 Wed, 20 Jan 2016 06:56:18 GMT (envelope-from arybchik@FreeBSD.org)
Message-Id: <201601200656.u0K6uI1Y009534@repo.freebsd.org>
X-Authentication-Warning: repo.freebsd.org: arybchik set sender to
 arybchik@FreeBSD.org using -f
From: Andrew Rybchenko <arybchik@FreeBSD.org>
Date: Wed, 20 Jan 2016 06:56:18 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-head@freebsd.org
Subject: svn commit: r294372 - head/sys/dev/sfxge
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.20
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for &quot;
 user&quot; and &quot; projects&quot; \)" <svn-src-all.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-all/>
List-Post: <mailto:svn-src-all@freebsd.org>
List-Help: <mailto:svn-src-all-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Wed, 20 Jan 2016 06:56:19 -0000

Author: arybchik
Date: Wed Jan 20 06:56:18 2016
New Revision: 294372
URL: https://svnweb.freebsd.org/changeset/base/294372

Log:
  sfxge: refresh version to note matching version of out-of-tree driver
  
  Sponsored by:   Solarflare Communications, Inc.
  MFC after:      2 days

Modified:
  head/sys/dev/sfxge/sfxge_version.h

Modified: head/sys/dev/sfxge/sfxge_version.h
==============================================================================
--- head/sys/dev/sfxge/sfxge_version.h	Wed Jan 20 06:50:30 2016	(r294371)
+++ head/sys/dev/sfxge/sfxge_version.h	Wed Jan 20 06:56:18 2016	(r294372)
@@ -36,6 +36,6 @@
 #ifndef _SFXGE_VERSION_H
 #define	_SFXGE_VERSION_H
 
-#define	SFXGE_VERSION_STRING	"v4.5.2.1000"
+#define	SFXGE_VERSION_STRING	"v4.8.0.1019"
 
 #endif	/* _SFXGE_DRIVER_VERSION_H */

From owner-svn-src-all@freebsd.org  Wed Jan 20 07:21:36 2016
Return-Path: <owner-svn-src-all@freebsd.org>
Delivered-To: svn-src-all@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4A8D6A89116;
 Wed, 20 Jan 2016 07:21:36 +0000 (UTC) (envelope-from kib@FreeBSD.org)
Received: from repo.freebsd.org (repo.freebsd.org
 [IPv6:2610:1c1:1:6068::e6a:0])
 (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
 (Client did not present a certificate)
 by mx1.freebsd.org (Postfix) with ESMTPS id 1B0671E12;
 Wed, 20 Jan 2016 07:21:36 +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 u0K7LZ8v015962;
 Wed, 20 Jan 2016 07:21:35 GMT (envelope-from kib@FreeBSD.org)
Received: (from kib@localhost)
 by repo.freebsd.org (8.15.2/8.15.2/Submit) id u0K7LYjE015951;
 Wed, 20 Jan 2016 07:21:34 GMT (envelope-from kib@FreeBSD.org)
Message-Id: <201601200721.u0K7LYjE015951@repo.freebsd.org>
X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org
 using -f
From: Konstantin Belousov <kib@FreeBSD.org>
Date: Wed, 20 Jan 2016 07:21:34 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-head@freebsd.org
Subject: svn commit: r294373 - in head/libexec/rtld-elf: . aarch64 amd64 arm
 i386 powerpc powerpc64 riscv sparc64
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.20
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for &quot;
 user&quot; and &quot; projects&quot; \)" <svn-src-all.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-all/>
List-Post: <mailto:svn-src-all@freebsd.org>
List-Help: <mailto:svn-src-all-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Wed, 20 Jan 2016 07:21:36 -0000

Author: kib
Date: Wed Jan 20 07:21:33 2016
New Revision: 294373
URL: https://svnweb.freebsd.org/changeset/base/294373

Log:
  Do not call callbacks for dl_iterate_phdr(3) with the rtld bind and
  phdr locks locked.  This allows to call rtld services from the
  callback, which is only reasonable for dlopen(path, RTLD_NOLOAD) to
  test existence of the library in the image, and for dlsym().  The
  later might still be not quite safe, due to the lazy resolution of
  filters.
  
  To allow dropping the locks around iteration in dl_iterate_phdr(3), we
  insert markers to track current position between relocks.  The global
  objects list is converted to tailq and all iterators skip markers,
  globallist_next() and globallist_curr() helpers are added.
  
  Reported and tested by:	davide
  Reviewed by:	kan
  Sponsored by:	The FreeBSD Foundation
  MFC after:	3 weeks

Modified:
  head/libexec/rtld-elf/aarch64/reloc.c
  head/libexec/rtld-elf/amd64/reloc.c
  head/libexec/rtld-elf/arm/reloc.c
  head/libexec/rtld-elf/debug.c
  head/libexec/rtld-elf/i386/reloc.c
  head/libexec/rtld-elf/powerpc/reloc.c
  head/libexec/rtld-elf/powerpc64/reloc.c
  head/libexec/rtld-elf/riscv/reloc.c
  head/libexec/rtld-elf/rtld.c
  head/libexec/rtld-elf/rtld.h
  head/libexec/rtld-elf/sparc64/reloc.c

Modified: head/libexec/rtld-elf/aarch64/reloc.c
==============================================================================
--- head/libexec/rtld-elf/aarch64/reloc.c	Wed Jan 20 06:56:18 2016	(r294372)
+++ head/libexec/rtld-elf/aarch64/reloc.c	Wed Jan 20 07:21:33 2016	(r294373)
@@ -99,8 +99,8 @@ do_copy_relocations(Obj_Entry *dstobj)
 		req.ventry = fetch_ventry(dstobj, ELF_R_SYM(rela->r_info));
 		req.flags = SYMLOOK_EARLY;
 
-		for (srcobj = dstobj->next; srcobj != NULL;
-		     srcobj = srcobj->next) {
+		for (srcobj = globallist_next(dstobj); srcobj != NULL;
+		     srcobj = globallist_next(srcobj)) {
 			res = symlook_obj(&req, srcobj);
 			if (res == 0) {
 				srcsym = req.sym_out;

Modified: head/libexec/rtld-elf/amd64/reloc.c
==============================================================================
--- head/libexec/rtld-elf/amd64/reloc.c	Wed Jan 20 06:56:18 2016	(r294372)
+++ head/libexec/rtld-elf/amd64/reloc.c	Wed Jan 20 07:21:33 2016	(r294373)
@@ -85,7 +85,8 @@ do_copy_relocations(Obj_Entry *dstobj)
 	    req.ventry = fetch_ventry(dstobj, ELF_R_SYM(rela->r_info));
 	    req.flags = SYMLOOK_EARLY;
 
-	    for (srcobj = dstobj->next;  srcobj != NULL;  srcobj = srcobj->next) {
+	    for (srcobj = globallist_next(dstobj); srcobj != NULL;
+	      srcobj = globallist_next(srcobj)) {
 		res = symlook_obj(&req, srcobj);
 		if (res == 0) {
 		    srcsym = req.sym_out;

Modified: head/libexec/rtld-elf/arm/reloc.c
==============================================================================
--- head/libexec/rtld-elf/arm/reloc.c	Wed Jan 20 06:56:18 2016	(r294372)
+++ head/libexec/rtld-elf/arm/reloc.c	Wed Jan 20 07:21:33 2016	(r294373)
@@ -101,8 +101,8 @@ do_copy_relocations(Obj_Entry *dstobj)
 			    ELF_R_SYM(rel->r_info));
 			req.flags = SYMLOOK_EARLY;
 
-			for (srcobj = dstobj->next;  srcobj != NULL; 
-			     srcobj = srcobj->next) {
+			for (srcobj = globallist_next(dstobj); srcobj != NULL;
+			    srcobj = globallist_next(srcobj)) {
 				res = symlook_obj(&req, srcobj);
 				if (res == 0) {
 					srcsym = req.sym_out;

Modified: head/libexec/rtld-elf/debug.c
==============================================================================
--- head/libexec/rtld-elf/debug.c	Wed Jan 20 06:56:18 2016	(r294372)
+++ head/libexec/rtld-elf/debug.c	Wed Jan 20 07:21:33 2016	(r294373)
@@ -62,7 +62,8 @@ dump_relocations (Obj_Entry *obj0)
 {
     Obj_Entry *obj;
 
-    for (obj = obj0; obj != NULL; obj = obj->next) {
+    for (obj = globallist_curr(obj0); obj != NULL;
+      obj = globallist_next(obj)) {
         dump_obj_relocations(obj);
     }
 }

Modified: head/libexec/rtld-elf/i386/reloc.c
==============================================================================
--- head/libexec/rtld-elf/i386/reloc.c	Wed Jan 20 06:56:18 2016	(r294372)
+++ head/libexec/rtld-elf/i386/reloc.c	Wed Jan 20 07:21:33 2016	(r294373)
@@ -86,7 +86,8 @@ do_copy_relocations(Obj_Entry *dstobj)
 	    req.ventry = fetch_ventry(dstobj, ELF_R_SYM(rel->r_info));
 	    req.flags = SYMLOOK_EARLY;
 
-	    for (srcobj = dstobj->next;  srcobj != NULL;  srcobj = srcobj->next) {
+	    for (srcobj = globallist_next(dstobj);  srcobj != NULL;
+	      srcobj = globallist_next(srcobj)) {
 		res = symlook_obj(&req, srcobj);
 		if (res == 0) {
 		    srcsym = req.sym_out;

Modified: head/libexec/rtld-elf/powerpc/reloc.c
==============================================================================
--- head/libexec/rtld-elf/powerpc/reloc.c	Wed Jan 20 06:56:18 2016	(r294372)
+++ head/libexec/rtld-elf/powerpc/reloc.c	Wed Jan 20 07:21:33 2016	(r294373)
@@ -94,8 +94,8 @@ do_copy_relocations(Obj_Entry *dstobj)
 		req.ventry = fetch_ventry(dstobj, ELF_R_SYM(rela->r_info));
 		req.flags = SYMLOOK_EARLY;
 
-		for (srcobj = dstobj->next;  srcobj != NULL;
-		     srcobj = srcobj->next) {
+		for (srcobj = globallist_next(dstobj); srcobj != NULL;
+		     srcobj = globallist_next(srcobj)) {
 			res = symlook_obj(&req, srcobj);
 			if (res == 0) {
 				srcsym = req.sym_out;

Modified: head/libexec/rtld-elf/powerpc64/reloc.c
==============================================================================
--- head/libexec/rtld-elf/powerpc64/reloc.c	Wed Jan 20 06:56:18 2016	(r294372)
+++ head/libexec/rtld-elf/powerpc64/reloc.c	Wed Jan 20 07:21:33 2016	(r294373)
@@ -90,8 +90,8 @@ do_copy_relocations(Obj_Entry *dstobj)
 		req.ventry = fetch_ventry(dstobj, ELF_R_SYM(rela->r_info));
 		req.flags = SYMLOOK_EARLY;
 
-		for (srcobj = dstobj->next;  srcobj != NULL;
-		     srcobj = srcobj->next) {
+		for (srcobj = globallist_next(dstobj); srcobj != NULL;
+		     srcobj = globallist_next(srcobj)) {
 			res = symlook_obj(&req, srcobj);
 			if (res == 0) {
 				srcsym = req.sym_out;

Modified: head/libexec/rtld-elf/riscv/reloc.c
==============================================================================
--- head/libexec/rtld-elf/riscv/reloc.c	Wed Jan 20 06:56:18 2016	(r294372)
+++ head/libexec/rtld-elf/riscv/reloc.c	Wed Jan 20 07:21:33 2016	(r294373)
@@ -120,8 +120,8 @@ do_copy_relocations(Obj_Entry *dstobj)
 		req.ventry = fetch_ventry(dstobj, ELF_R_SYM(rela->r_info));
 		req.flags = SYMLOOK_EARLY;
 
-		for (srcobj = dstobj->next; srcobj != NULL;
-		     srcobj = srcobj->next) {
+		for (srcobj = globallist_next(dstobj); srcobj != NULL;
+		     srcobj = globallist_next(srcobj)) {
 			res = symlook_obj(&req, srcobj);
 			if (res == 0) {
 				srcsym = req.sym_out;

Modified: head/libexec/rtld-elf/rtld.c
==============================================================================
--- head/libexec/rtld-elf/rtld.c	Wed Jan 20 06:56:18 2016	(r294372)
+++ head/libexec/rtld-elf/rtld.c	Wed Jan 20 07:21:33 2016	(r294373)
@@ -90,7 +90,7 @@ static void init_dag(Obj_Entry *);
 static void init_pagesizes(Elf_Auxinfo **aux_info);
 static void init_rtld(caddr_t, Elf_Auxinfo **);
 static void initlist_add_neededs(Needed_Entry *, Objlist *);
-static void initlist_add_objects(Obj_Entry *, Obj_Entry **, Objlist *);
+static void initlist_add_objects(Obj_Entry *, Obj_Entry *, Objlist *);
 static void linkmap_add(Obj_Entry *);
 static void linkmap_delete(Obj_Entry *);
 static void load_filtees(Obj_Entry *, int flags, RtldLockState *);
@@ -180,12 +180,11 @@ static char *ld_preload;	/* Environment 
 static char *ld_elf_hints_path;	/* Environment variable for alternative hints path */
 static char *ld_tracing;	/* Called from ldd to print libs */
 static char *ld_utrace;		/* Use utrace() to log events. */
-static Obj_Entry *obj_list;	/* Head of linked list of shared objects */
-static Obj_Entry **obj_tail;	/* Link field of last object in list */
+static struct obj_entry_q obj_list;	/* Queue of all loaded objects */
 static Obj_Entry *obj_main;	/* The main program shared object */
 static Obj_Entry obj_rtld;	/* The dynamic linker shared object */
 static unsigned int obj_count;	/* Number of objects in obj_list */
-static unsigned int obj_loads;	/* Number of objects in obj_list */
+static unsigned int obj_loads;	/* Number of loads of objects (gen count) */
 
 static Objlist list_global =	/* Objects dlopened with RTLD_GLOBAL */
   STAILQ_HEAD_INITIALIZER(list_global);
@@ -370,7 +369,7 @@ _rtld(Elf_Addr *sp, func_ptr_type *exit_
     const char *argv0;
     Objlist_Entry *entry;
     Obj_Entry *obj;
-    Obj_Entry **preload_tail;
+    Obj_Entry *preload_tail;
     Obj_Entry *last_interposer;
     Objlist initlist;
     RtldLockState lockstate;
@@ -569,8 +568,7 @@ _rtld(Elf_Addr *sp, func_ptr_type *exit_
     linkmap_add(&obj_rtld);
 
     /* Link the main program into the list of objects. */
-    *obj_tail = obj_main;
-    obj_tail = &obj_main->next;
+    TAILQ_INSERT_HEAD(&obj_list, obj_main, next);
     obj_count++;
     obj_loads++;
 
@@ -585,7 +583,7 @@ _rtld(Elf_Addr *sp, func_ptr_type *exit_
     dbg("loading LD_PRELOAD libraries");
     if (load_preload_objects() == -1)
 	rtld_die();
-    preload_tail = obj_tail;
+    preload_tail = globallist_curr(TAILQ_LAST(&obj_list, obj_entry_q));
 
     dbg("loading needed objects");
     if (load_needed_objects(obj_main, 0) == -1)
@@ -593,7 +591,9 @@ _rtld(Elf_Addr *sp, func_ptr_type *exit_
 
     /* Make a list of all objects loaded at startup. */
     last_interposer = obj_main;
-    for (obj = obj_list;  obj != NULL;  obj = obj->next) {
+    TAILQ_FOREACH(obj, &obj_list, next) {
+	if (obj->marker)
+	    continue;
 	if (obj->z_interpose && obj != obj_main) {
 	    objlist_put_after(&list_main, last_interposer, obj);
 	    last_interposer = obj;
@@ -651,7 +651,7 @@ _rtld(Elf_Addr *sp, func_ptr_type *exit_
      * might be the subject for relocations.
      */
     dbg("initializing initial thread local storage");
-    allocate_initial_tls(obj_list);
+    allocate_initial_tls(globallist_curr(TAILQ_FIRST(&obj_list)));
 
     dbg("initializing key program variables");
     set_program_var("__progname", argv[0] != NULL ? basename(argv[0]) : "");
@@ -660,7 +660,8 @@ _rtld(Elf_Addr *sp, func_ptr_type *exit_
 
     /* Make a list of init functions to call. */
     objlist_init(&initlist);
-    initlist_add_objects(obj_list, preload_tail, &initlist);
+    initlist_add_objects(globallist_curr(TAILQ_FIRST(&obj_list)),
+      preload_tail, &initlist);
 
     r_debug_state(NULL, &obj_main->linkmap); /* say hello to gdb! */
 
@@ -690,7 +691,9 @@ _rtld(Elf_Addr *sp, func_ptr_type *exit_
     _r_debug_postinit(&obj_main->linkmap);
     objlist_clear(&initlist);
     dbg("loading filtees");
-    for (obj = obj_list->next; obj != NULL; obj = obj->next) {
+    TAILQ_FOREACH(obj, &obj_list, next) {
+	if (obj->marker)
+	    continue;
 	if (ld_loadfltr || obj->z_loadfltr)
 	    load_filtees(obj, 0, &lockstate);
     }
@@ -1410,9 +1413,10 @@ dlcheck(void *handle)
 {
     Obj_Entry *obj;
 
-    for (obj = obj_list;  obj != NULL;  obj = obj->next)
+    TAILQ_FOREACH(obj, &obj_list, next) {
 	if (obj == (Obj_Entry *) handle)
 	    break;
+    }
 
     if (obj == NULL || obj->refcount == 0 || obj->dl_refcount == 0) {
 	_rtld_error("Invalid shared object handle %p", handle);
@@ -1823,6 +1827,32 @@ init_dag(Obj_Entry *root)
     root->dag_inited = true;
 }
 
+Obj_Entry *
+globallist_curr(const Obj_Entry *obj)
+{
+
+	for (;;) {
+		if (obj == NULL)
+			return (NULL);
+		if (!obj->marker)
+			return (__DECONST(Obj_Entry *, obj));
+		obj = TAILQ_PREV(obj, obj_entry_q, next);
+	}
+}
+
+Obj_Entry *
+globallist_next(const Obj_Entry *obj)
+{
+
+	for (;;) {
+		obj = TAILQ_NEXT(obj, next);
+		if (obj == NULL)
+			return (NULL);
+		if (!obj->marker)
+			return (__DECONST(Obj_Entry *, obj));
+	}
+}
+
 static void
 process_z(Obj_Entry *root)
 {
@@ -1905,7 +1935,7 @@ init_rtld(caddr_t mapbase, Elf_Auxinfo *
     }
 
     /* Initialize the object list. */
-    obj_tail = &obj_list;
+    TAILQ_INIT(&obj_list);
 
     /* Now that non-local variables can be accesses, copy out obj_rtld. */
     memcpy(&obj_rtld, &objtmp, sizeof(obj_rtld));
@@ -1986,7 +2016,7 @@ initlist_add_neededs(Needed_Entry *neede
 
     /* Process the current needed object. */
     if (needed->obj != NULL)
-	initlist_add_objects(needed->obj, &needed->obj->next, list);
+	initlist_add_objects(needed->obj, globallist_next(needed->obj), list);
 }
 
 /*
@@ -1999,16 +2029,18 @@ initlist_add_neededs(Needed_Entry *neede
  * held when this function is called.
  */
 static void
-initlist_add_objects(Obj_Entry *obj, Obj_Entry **tail, Objlist *list)
+initlist_add_objects(Obj_Entry *obj, Obj_Entry *tail, Objlist *list)
 {
+    Obj_Entry *nobj;
 
     if (obj->init_scanned || obj->init_done)
 	return;
     obj->init_scanned = true;
 
     /* Recursively process the successor objects. */
-    if (&obj->next != tail)
-	initlist_add_objects(obj->next, tail, list);
+    nobj = globallist_next(obj);
+    if (nobj != NULL && nobj != tail)
+	initlist_add_objects(nobj, tail, list);
 
     /* Recursively process the needed objects. */
     if (obj->needed != NULL)
@@ -2111,7 +2143,10 @@ load_needed_objects(Obj_Entry *first, in
 {
     Obj_Entry *obj;
 
-    for (obj = first;  obj != NULL;  obj = obj->next) {
+    obj = first;
+    TAILQ_FOREACH_FROM(obj, &obj_list, next) {
+	if (obj->marker)
+	    continue;
 	if (process_needed(obj, obj->needed, flags) == -1)
 	    return (-1);
     }
@@ -2173,7 +2208,9 @@ load_object(const char *name, int fd_u, 
 
     fd = -1;
     if (name != NULL) {
-	for (obj = obj_list->next;  obj != NULL;  obj = obj->next) {
+	TAILQ_FOREACH(obj, &obj_list, next) {
+	    if (obj->marker)
+		continue;
 	    if (object_match_name(obj, name))
 		return (obj);
 	}
@@ -2218,9 +2255,12 @@ load_object(const char *name, int fd_u, 
 	free(path);
 	return NULL;
     }
-    for (obj = obj_list->next;  obj != NULL;  obj = obj->next)
+    TAILQ_FOREACH(obj, &obj_list, next) {
+	if (obj->marker)
+	    continue;
 	if (obj->ino == sb.st_ino && obj->dev == sb.st_dev)
 	    break;
+    }
     if (obj != NULL && name != NULL) {
 	object_add_name(obj, name);
 	free(path);
@@ -2288,8 +2328,7 @@ do_load_object(int fd, const char *name,
     }
 
     obj->dlopened = (flags & RTLD_LO_DLOPEN) != 0;
-    *obj_tail = obj;
-    obj_tail = &obj->next;
+    TAILQ_INSERT_TAIL(&obj_list, obj, next);
     obj_count++;
     obj_loads++;
     linkmap_add(obj);	/* for GDB & dlinfo() */
@@ -2310,7 +2349,9 @@ obj_from_addr(const void *addr)
 {
     Obj_Entry *obj;
 
-    for (obj = obj_list;  obj != NULL;  obj = obj->next) {
+    TAILQ_FOREACH(obj, &obj_list, next) {
+	if (obj->marker)
+	    continue;
 	if (addr < (void *) obj->mapbase)
 	    continue;
 	if (addr < (void *) (obj->mapbase + obj->mapsize))
@@ -2436,8 +2477,11 @@ objlist_call_init(Objlist *list, RtldLoc
      * possibly initialized earlier if any of vectors called below
      * cause the change by using dlopen.
      */
-    for (obj = obj_list;  obj != NULL;  obj = obj->next)
+    TAILQ_FOREACH(obj, &obj_list, next) {
+	if (obj->marker)
+	    continue;
 	obj->init_scanned = false;
+    }
 
     /*
      * Preserve the current error message since an init function might
@@ -2681,7 +2725,11 @@ relocate_objects(Obj_Entry *first, bool 
 	Obj_Entry *obj;
 	int error;
 
-	for (error = 0, obj = first;  obj != NULL;  obj = obj->next) {
+	error = 0;
+	obj = first;
+	TAILQ_FOREACH_FROM(obj, &obj_list, next) {
+		if (obj->marker)
+			continue;
 		error = relocate_object(obj, bind_now, rtldobj, flags,
 		    lockstate);
 		if (error == -1)
@@ -2719,7 +2767,10 @@ resolve_objects_ifunc(Obj_Entry *first, 
 {
 	Obj_Entry *obj;
 
-	for (obj = first;  obj != NULL;  obj = obj->next) {
+	obj = first;
+	TAILQ_FOREACH_FROM(obj, &obj_list, next) {
+		if (obj->marker)
+			continue;
 		if (resolve_object_ifunc(obj, bind_now, flags, lockstate) == -1)
 			return (-1);
 	}
@@ -3033,7 +3084,7 @@ static Obj_Entry *
 dlopen_object(const char *name, int fd, Obj_Entry *refobj, int lo_flags,
     int mode, RtldLockState *lockstate)
 {
-    Obj_Entry **old_obj_tail;
+    Obj_Entry *old_obj_tail;
     Obj_Entry *obj;
     Objlist initlist;
     RtldLockState mlockstate;
@@ -3047,7 +3098,7 @@ dlopen_object(const char *name, int fd, 
     }
     GDB_STATE(RT_ADD,NULL);
 
-    old_obj_tail = obj_tail;
+    old_obj_tail = globallist_curr(TAILQ_LAST(&obj_list, obj_entry_q));
     obj = NULL;
     if (name == NULL && fd == -1) {
 	obj = obj_main;
@@ -3060,8 +3111,9 @@ dlopen_object(const char *name, int fd, 
 	obj->dl_refcount++;
 	if (mode & RTLD_GLOBAL && objlist_find(&list_global, obj) == NULL)
 	    objlist_push_tail(&list_global, obj);
-	if (*old_obj_tail != NULL) {		/* We loaded something new. */
-	    assert(*old_obj_tail == obj);
+	if (globallist_next(old_obj_tail) != NULL) {
+	    /* We loaded something new. */
+	    assert(globallist_next(old_obj_tail) == obj);
 	    result = load_needed_objects(obj,
 		lo_flags & (RTLD_LO_DLOPEN | RTLD_LO_EARLY));
 	    init_dag(obj);
@@ -3088,7 +3140,7 @@ dlopen_object(const char *name, int fd, 
 		 */
 	    } else {
 		/* Make list of init functions to call. */
-		initlist_add_objects(obj, &obj->next, &initlist);
+		initlist_add_objects(obj, globallist_next(obj), &initlist);
 	    }
 	    /*
 	     * Process all no_delete or global objects here, given
@@ -3194,8 +3246,10 @@ do_dlsym(void *handle, const char *name,
 	} else if (handle == RTLD_NEXT || /* Objects after caller's */
 		   handle == RTLD_SELF) { /* ... caller included */
 	    if (handle == RTLD_NEXT)
-		obj = obj->next;
-	    for (; obj != NULL; obj = obj->next) {
+		obj = globallist_next(obj);
+	    TAILQ_FOREACH_FROM(obj, &obj_list, next) {
+		if (obj->marker)
+		    continue;
 		res = symlook_obj(&req, obj);
 		if (res == 0) {
 		    if (def == NULL ||
@@ -3464,31 +3518,43 @@ rtld_fill_dl_phdr_info(const Obj_Entry *
 int
 dl_iterate_phdr(__dl_iterate_hdr_callback callback, void *param)
 {
-    struct dl_phdr_info phdr_info;
-    const Obj_Entry *obj;
-    RtldLockState bind_lockstate, phdr_lockstate;
-    int error;
-
-    wlock_acquire(rtld_phdr_lock, &phdr_lockstate);
-    rlock_acquire(rtld_bind_lock, &bind_lockstate);
-
-    error = 0;
-
-    for (obj = obj_list;  obj != NULL;  obj = obj->next) {
-	rtld_fill_dl_phdr_info(obj, &phdr_info);
-	if ((error = callback(&phdr_info, sizeof phdr_info, param)) != 0)
-		break;
+	struct dl_phdr_info phdr_info;
+	Obj_Entry *obj, marker;
+	RtldLockState bind_lockstate, phdr_lockstate;
+	int error;
 
-    }
-    if (error == 0) {
-	rtld_fill_dl_phdr_info(&obj_rtld, &phdr_info);
-	error = callback(&phdr_info, sizeof(phdr_info), param);
-    }
+	bzero(&marker, sizeof(marker));
+	marker.marker = true;
+	error = 0;
 
-    lock_release(rtld_bind_lock, &bind_lockstate);
-    lock_release(rtld_phdr_lock, &phdr_lockstate);
+	wlock_acquire(rtld_phdr_lock, &phdr_lockstate);
+	rlock_acquire(rtld_bind_lock, &bind_lockstate);
+	for (obj = globallist_curr(TAILQ_FIRST(&obj_list)); obj != NULL;) {
+		TAILQ_INSERT_AFTER(&obj_list, obj, &marker, next);
+		rtld_fill_dl_phdr_info(obj, &phdr_info);
+		lock_release(rtld_bind_lock, &bind_lockstate);
+		lock_release(rtld_phdr_lock, &phdr_lockstate);
+
+		error = callback(&phdr_info, sizeof phdr_info, param);
+
+		wlock_acquire(rtld_phdr_lock, &phdr_lockstate);
+		rlock_acquire(rtld_bind_lock, &bind_lockstate);
+		obj = globallist_next(&marker);
+		TAILQ_REMOVE(&obj_list, &marker, next);
+		if (error != 0) {
+			lock_release(rtld_bind_lock, &bind_lockstate);
+			lock_release(rtld_phdr_lock, &phdr_lockstate);
+			return (error);
+		}
+	}
 
-    return (error);
+	if (error == 0) {
+		rtld_fill_dl_phdr_info(&obj_rtld, &phdr_info);
+		lock_release(rtld_bind_lock, &bind_lockstate);
+		lock_release(rtld_phdr_lock, &phdr_lockstate);
+		error = callback(&phdr_info, sizeof(phdr_info), param);
+	}
+	return (error);
 }
 
 static void *
@@ -4208,11 +4274,13 @@ trace_loaded_objects(Obj_Entry *obj)
 
     list_containers = getenv(_LD("TRACE_LOADED_OBJECTS_ALL"));
 
-    for (; obj; obj = obj->next) {
+    TAILQ_FOREACH_FROM(obj, &obj_list, next) {
 	Needed_Entry		*needed;
 	char			*name, *path;
 	bool			is_lib;
 
+	if (obj->marker)
+	    continue;
 	if (list_containers && obj->needed != NULL)
 	    rtld_printf("%s:\n", obj->path);
 	for (needed = obj->needed; needed; needed = needed->next) {
@@ -4295,34 +4363,30 @@ trace_loaded_objects(Obj_Entry *obj)
 static void
 unload_object(Obj_Entry *root)
 {
-    Obj_Entry *obj;
-    Obj_Entry **linkp;
+	Obj_Entry *obj, *obj1;
 
-    assert(root->refcount == 0);
+	assert(root->refcount == 0);
 
-    /*
-     * Pass over the DAG removing unreferenced objects from
-     * appropriate lists.
-     */
-    unlink_object(root);
+	/*
+	 * Pass over the DAG removing unreferenced objects from
+	 * appropriate lists.
+	 */
+	unlink_object(root);
 
-    /* Unmap all objects that are no longer referenced. */
-    linkp = &obj_list->next;
-    while ((obj = *linkp) != NULL) {
-	if (obj->refcount == 0) {
-	    LD_UTRACE(UTRACE_UNLOAD_OBJECT, obj, obj->mapbase, obj->mapsize, 0,
-		obj->path);
-	    dbg("unloading \"%s\"", obj->path);
-	    unload_filtees(root);
-	    munmap(obj->mapbase, obj->mapsize);
-	    linkmap_delete(obj);
-	    *linkp = obj->next;
-	    obj_count--;
-	    obj_free(obj);
-	} else
-	    linkp = &obj->next;
-    }
-    obj_tail = linkp;
+	/* Unmap all objects that are no longer referenced. */
+	TAILQ_FOREACH_SAFE(obj, &obj_list, next, obj1) {
+		if (obj->marker || obj->refcount != 0)
+			continue;
+		LD_UTRACE(UTRACE_UNLOAD_OBJECT, obj, obj->mapbase,
+		    obj->mapsize, 0, obj->path);
+		dbg("unloading \"%s\"", obj->path);
+		unload_filtees(root);
+		munmap(obj->mapbase, obj->mapsize);
+		linkmap_delete(obj);
+		TAILQ_REMOVE(&obj_list, obj, next);
+		obj_count--;
+		obj_free(obj);
+	}
 }
 
 static void
@@ -4455,7 +4519,8 @@ allocate_tls(Obj_Entry *objs, void *oldt
 	dtv[0] = tls_dtv_generation;
 	dtv[1] = tls_max_index;
 
-	for (obj = objs; obj; obj = obj->next) {
+	for (obj = globallist_curr(objs); obj != NULL;
+	  obj = globallist_next(obj)) {
 	    if (obj->tlsoffset > 0) {
 		addr = (Elf_Addr)tls + obj->tlsoffset;
 		if (obj->tlsinitsize > 0)
@@ -4554,15 +4619,16 @@ allocate_tls(Obj_Entry *objs, void *oldt
 	 */
 	free_tls(oldtls, 2*sizeof(Elf_Addr), sizeof(Elf_Addr));
     } else {
-	for (obj = objs; obj; obj = obj->next) {
-	    if (obj->tlsoffset) {
+	obj = objs;
+	TAILQ_FOREACH_FROM(obj, &obj_list, next) {
+		if (obj->marker || obj->tlsoffset == 0)
+			continue;
 		addr = segbase - obj->tlsoffset;
 		memset((void*) (addr + obj->tlsinitsize),
 		       0, obj->tlssize - obj->tlsinitsize);
 		if (obj->tlsinit)
 		    memcpy((void*) addr, obj->tlsinit, obj->tlsinitsize);
 		dtv[obj->tlsindex + 1] = addr;
-	    }
 	}
     }
 
@@ -4611,7 +4677,9 @@ allocate_module_tls(int index)
     Obj_Entry* obj;
     char* p;
 
-    for (obj = obj_list; obj; obj = obj->next) {
+    TAILQ_FOREACH(obj, &obj_list, next) {
+	if (obj->marker)
+	    continue;
 	if (obj->tlsindex == index)
 	    break;
     }
@@ -4690,7 +4758,8 @@ _rtld_allocate_tls(void *oldtls, size_t 
     RtldLockState lockstate;
 
     wlock_acquire(rtld_bind_lock, &lockstate);
-    ret = allocate_tls(obj_list, oldtls, tcbsize, tcbalign);
+    ret = allocate_tls(globallist_curr(TAILQ_FIRST(&obj_list)), oldtls,
+      tcbsize, tcbalign);
     lock_release(rtld_bind_lock, &lockstate);
     return (ret);
 }

Modified: head/libexec/rtld-elf/rtld.h
==============================================================================
--- head/libexec/rtld-elf/rtld.h	Wed Jan 20 06:56:18 2016	(r294372)
+++ head/libexec/rtld-elf/rtld.h	Wed Jan 20 07:21:33 2016	(r294373)
@@ -139,7 +139,7 @@ typedef struct Struct_Obj_Entry {
     Elf_Size magic;		/* Magic number (sanity check) */
     Elf_Size version;		/* Version number of struct format */
 
-    struct Struct_Obj_Entry *next;
+    TAILQ_ENTRY(Struct_Obj_Entry) next;
     char *path;			/* Pathname of underlying file (%) */
     char *origin_path;		/* Directory path of origin file */
     int refcount;
@@ -264,6 +264,7 @@ typedef struct Struct_Obj_Entry {
     bool valid_hash_sysv : 1;	/* A valid System V hash hash tag is available */
     bool valid_hash_gnu : 1;	/* A valid GNU hash tag is available */
     bool dlopened : 1;		/* dlopen()-ed (vs. load statically) */
+    bool marker : 1;		/* marker on the global obj list */
 
     struct link_map linkmap;	/* For GDB and dlinfo() */
     Objlist dldags;		/* Object belongs to these dlopened DAGs (%) */
@@ -276,6 +277,8 @@ typedef struct Struct_Obj_Entry {
 #define RTLD_MAGIC	0xd550b87a
 #define RTLD_VERSION	1
 
+TAILQ_HEAD(obj_entry_q, Struct_Obj_Entry);
+
 #define RTLD_STATIC_TLS_EXTRA	128
 
 /* Flags to be passed into symlook_ family of functions. */
@@ -367,6 +370,8 @@ const Elf_Sym *find_symdef(unsigned long
 void init_pltgot(Obj_Entry *);
 void lockdflt_init(void);
 void digest_notes(Obj_Entry *, Elf_Addr, Elf_Addr);
+Obj_Entry *globallist_curr(const Obj_Entry *obj);
+Obj_Entry *globallist_next(const Obj_Entry *obj);
 void obj_free(Obj_Entry *);
 Obj_Entry *obj_new(void);
 void _rtld_bind_start(void);

Modified: head/libexec/rtld-elf/sparc64/reloc.c
==============================================================================
--- head/libexec/rtld-elf/sparc64/reloc.c	Wed Jan 20 06:56:18 2016	(r294372)
+++ head/libexec/rtld-elf/sparc64/reloc.c	Wed Jan 20 07:21:33 2016	(r294373)
@@ -266,8 +266,8 @@ do_copy_relocations(Obj_Entry *dstobj)
 			    ELF_R_SYM(rela->r_info));
 			req.flags = SYMLOOK_EARLY;
 
-			for (srcobj = dstobj->next; srcobj != NULL;
-			    srcobj = srcobj->next) {
+			for (srcobj = globallist_next(dstobj); srcobj != NULL;
+			    srcobj = globallist_next(srcobj)) {
 				res = symlook_obj(&req, srcobj);
 				if (res == 0) {
 					srcsym = req.sym_out;

From owner-svn-src-all@freebsd.org  Wed Jan 20 07:27:12 2016
Return-Path: <owner-svn-src-all@freebsd.org>
Delivered-To: svn-src-all@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id 54AD6A891F9;
 Wed, 20 Jan 2016 07:27:12 +0000 (UTC)
 (envelope-from delphij@FreeBSD.org)
Received: from repo.freebsd.org (repo.freebsd.org
 [IPv6:2610:1c1:1:6068::e6a:0])
 (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
 (Client did not present a certificate)
 by mx1.freebsd.org (Postfix) with ESMTPS id F1169112A;
 Wed, 20 Jan 2016 07:27:11 +0000 (UTC)
 (envelope-from delphij@FreeBSD.org)
Received: from repo.freebsd.org ([127.0.1.37])
 by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u0K7RA50018166;
 Wed, 20 Jan 2016 07:27:10 GMT (envelope-from delphij@FreeBSD.org)
Received: (from delphij@localhost)
 by repo.freebsd.org (8.15.2/8.15.2/Submit) id u0K7R8TZ018137;
 Wed, 20 Jan 2016 07:27:08 GMT (envelope-from delphij@FreeBSD.org)
Message-Id: <201601200727.u0K7R8TZ018137@repo.freebsd.org>
X-Authentication-Warning: repo.freebsd.org: delphij set sender to
 delphij@FreeBSD.org using -f
From: Xin LI <delphij@FreeBSD.org>
Date: Wed, 20 Jan 2016 07:27:08 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-vendor@freebsd.org
Subject: svn commit: r294374 - in vendor/bind9/dist: . doc/arm lib/dns
 lib/dns/rdata/in_1
X-SVN-Group: vendor
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.20
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for &quot;
 user&quot; and &quot; projects&quot; \)" <svn-src-all.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-all/>
List-Post: <mailto:svn-src-all@freebsd.org>
List-Help: <mailto:svn-src-all-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Wed, 20 Jan 2016 07:27:12 -0000

Author: delphij
Date: Wed Jan 20 07:27:07 2016
New Revision: 294374
URL: https://svnweb.freebsd.org/changeset/base/294374

Log:
  Vendor import of BIND 9.9.8-P3.

Modified:
  vendor/bind9/dist/CHANGES
  vendor/bind9/dist/README
  vendor/bind9/dist/doc/arm/Bv9ARM.ch01.html
  vendor/bind9/dist/doc/arm/Bv9ARM.ch02.html
  vendor/bind9/dist/doc/arm/Bv9ARM.ch03.html
  vendor/bind9/dist/doc/arm/Bv9ARM.ch04.html
  vendor/bind9/dist/doc/arm/Bv9ARM.ch05.html
  vendor/bind9/dist/doc/arm/Bv9ARM.ch06.html
  vendor/bind9/dist/doc/arm/Bv9ARM.ch07.html
  vendor/bind9/dist/doc/arm/Bv9ARM.ch08.html
  vendor/bind9/dist/doc/arm/Bv9ARM.ch09.html
  vendor/bind9/dist/doc/arm/Bv9ARM.ch10.html
  vendor/bind9/dist/doc/arm/Bv9ARM.ch11.html
  vendor/bind9/dist/doc/arm/Bv9ARM.ch12.html
  vendor/bind9/dist/doc/arm/Bv9ARM.ch13.html
  vendor/bind9/dist/doc/arm/Bv9ARM.html
  vendor/bind9/dist/doc/arm/Bv9ARM.pdf
  vendor/bind9/dist/doc/arm/man.arpaname.html
  vendor/bind9/dist/doc/arm/man.ddns-confgen.html
  vendor/bind9/dist/doc/arm/man.dig.html
  vendor/bind9/dist/doc/arm/man.dnssec-checkds.html
  vendor/bind9/dist/doc/arm/man.dnssec-coverage.html
  vendor/bind9/dist/doc/arm/man.dnssec-dsfromkey.html
  vendor/bind9/dist/doc/arm/man.dnssec-keyfromlabel.html
  vendor/bind9/dist/doc/arm/man.dnssec-keygen.html
  vendor/bind9/dist/doc/arm/man.dnssec-revoke.html
  vendor/bind9/dist/doc/arm/man.dnssec-settime.html
  vendor/bind9/dist/doc/arm/man.dnssec-signzone.html
  vendor/bind9/dist/doc/arm/man.dnssec-verify.html
  vendor/bind9/dist/doc/arm/man.genrandom.html
  vendor/bind9/dist/doc/arm/man.host.html
  vendor/bind9/dist/doc/arm/man.isc-hmac-fixup.html
  vendor/bind9/dist/doc/arm/man.named-checkconf.html
  vendor/bind9/dist/doc/arm/man.named-checkzone.html
  vendor/bind9/dist/doc/arm/man.named-journalprint.html
  vendor/bind9/dist/doc/arm/man.named.html
  vendor/bind9/dist/doc/arm/man.nsec3hash.html
  vendor/bind9/dist/doc/arm/man.nsupdate.html
  vendor/bind9/dist/doc/arm/man.rndc-confgen.html
  vendor/bind9/dist/doc/arm/man.rndc.conf.html
  vendor/bind9/dist/doc/arm/man.rndc.html
  vendor/bind9/dist/doc/arm/notes.html
  vendor/bind9/dist/doc/arm/notes.pdf
  vendor/bind9/dist/doc/arm/notes.xml
  vendor/bind9/dist/lib/dns/api
  vendor/bind9/dist/lib/dns/rdata/in_1/apl_42.c
  vendor/bind9/dist/lib/dns/resolver.c
  vendor/bind9/dist/version

Modified: vendor/bind9/dist/CHANGES
==============================================================================
--- vendor/bind9/dist/CHANGES	Wed Jan 20 07:21:33 2016	(r294373)
+++ vendor/bind9/dist/CHANGES	Wed Jan 20 07:27:07 2016	(r294374)
@@ -1,3 +1,12 @@
+	--- 9.9.8-P3 released ---
+
+4288.	[bug]		Fixed a regression in resolver.c:possibly_mark()
+			which caused known-bogus servers to be queried
+			anyway. [RT #41321]
+
+4285.	[security]	Specific APL data could trigger a INSIST.
+			(CVE-2015-8704) [RT #41396]
+
 	--- 9.9.8-P2 released ---
 
 4270.	[security]	Update allowed OpenSSL versions as named is

Modified: vendor/bind9/dist/README
==============================================================================
--- vendor/bind9/dist/README	Wed Jan 20 07:21:33 2016	(r294373)
+++ vendor/bind9/dist/README	Wed Jan 20 07:27:07 2016	(r294374)
@@ -51,6 +51,12 @@ BIND 9
 	For up-to-date release notes and errata, see
 	http://www.isc.org/software/bind9/releasenotes
 
+BIND 9.9.8-P3
+
+      BIND 9.9.8-P3 is a security release addressing the flaw described in
+      CVE-2015-8704. It also fixes a serious regression in authoritative
+      server selection that was introduced in 9.9.8.
+
 BIND 9.9.8-P2
 
 	BIND 9.9.8-P2 is a security release addressing the flaws

Modified: vendor/bind9/dist/doc/arm/Bv9ARM.ch01.html
==============================================================================
--- vendor/bind9/dist/doc/arm/Bv9ARM.ch01.html	Wed Jan 20 07:21:33 2016	(r294373)
+++ vendor/bind9/dist/doc/arm/Bv9ARM.ch01.html	Wed Jan 20 07:27:07 2016	(r294374)
@@ -556,6 +556,6 @@
 </tr>
 </table>
 </div>
-<p style="text-align: center;">BIND 9.9.8-P2 (Extended Support Version)</p>
+<p style="text-align: center;">BIND 9.9.8-P3 (Extended Support Version)</p>
 </body>
 </html>

Modified: vendor/bind9/dist/doc/arm/Bv9ARM.ch02.html
==============================================================================
--- vendor/bind9/dist/doc/arm/Bv9ARM.ch02.html	Wed Jan 20 07:21:33 2016	(r294373)
+++ vendor/bind9/dist/doc/arm/Bv9ARM.ch02.html	Wed Jan 20 07:27:07 2016	(r294374)
@@ -154,6 +154,6 @@
 </tr>
 </table>
 </div>
-<p style="text-align: center;">BIND 9.9.8-P2 (Extended Support Version)</p>
+<p style="text-align: center;">BIND 9.9.8-P3 (Extended Support Version)</p>
 </body>
 </html>

Modified: vendor/bind9/dist/doc/arm/Bv9ARM.ch03.html
==============================================================================
--- vendor/bind9/dist/doc/arm/Bv9ARM.ch03.html	Wed Jan 20 07:21:33 2016	(r294373)
+++ vendor/bind9/dist/doc/arm/Bv9ARM.ch03.html	Wed Jan 20 07:27:07 2016	(r294374)
@@ -665,6 +665,6 @@ controls {
 </tr>
 </table>
 </div>
-<p style="text-align: center;">BIND 9.9.8-P2 (Extended Support Version)</p>
+<p style="text-align: center;">BIND 9.9.8-P3 (Extended Support Version)</p>
 </body>
 </html>

Modified: vendor/bind9/dist/doc/arm/Bv9ARM.ch04.html
==============================================================================
--- vendor/bind9/dist/doc/arm/Bv9ARM.ch04.html	Wed Jan 20 07:21:33 2016	(r294373)
+++ vendor/bind9/dist/doc/arm/Bv9ARM.ch04.html	Wed Jan 20 07:27:07 2016	(r294374)
@@ -1935,6 +1935,6 @@ $ORIGIN 0.0.0.0.0.0.0.0.8.b.d.0.1.0.0.2.
 </tr>
 </table>
 </div>
-<p style="text-align: center;">BIND 9.9.8-P2 (Extended Support Version)</p>
+<p style="text-align: center;">BIND 9.9.8-P3 (Extended Support Version)</p>
 </body>
 </html>

Modified: vendor/bind9/dist/doc/arm/Bv9ARM.ch05.html
==============================================================================
--- vendor/bind9/dist/doc/arm/Bv9ARM.ch05.html	Wed Jan 20 07:21:33 2016	(r294373)
+++ vendor/bind9/dist/doc/arm/Bv9ARM.ch05.html	Wed Jan 20 07:27:07 2016	(r294374)
@@ -139,6 +139,6 @@
 </tr>
 </table>
 </div>
-<p style="text-align: center;">BIND 9.9.8-P2 (Extended Support Version)</p>
+<p style="text-align: center;">BIND 9.9.8-P3 (Extended Support Version)</p>
 </body>
 </html>

Modified: vendor/bind9/dist/doc/arm/Bv9ARM.ch06.html
==============================================================================
--- vendor/bind9/dist/doc/arm/Bv9ARM.ch06.html	Wed Jan 20 07:21:33 2016	(r294373)
+++ vendor/bind9/dist/doc/arm/Bv9ARM.ch06.html	Wed Jan 20 07:27:07 2016	(r294374)
@@ -12177,6 +12177,6 @@ HOST-127.EXAMPLE. MX 0 .
 </tr>
 </table>
 </div>
-<p style="text-align: center;">BIND 9.9.8-P2 (Extended Support Version)</p>
+<p style="text-align: center;">BIND 9.9.8-P3 (Extended Support Version)</p>
 </body>
 </html>

Modified: vendor/bind9/dist/doc/arm/Bv9ARM.ch07.html
==============================================================================
--- vendor/bind9/dist/doc/arm/Bv9ARM.ch07.html	Wed Jan 20 07:21:33 2016	(r294373)
+++ vendor/bind9/dist/doc/arm/Bv9ARM.ch07.html	Wed Jan 20 07:27:07 2016	(r294374)
@@ -247,6 +247,6 @@ zone "example.com" {
 </tr>
 </table>
 </div>
-<p style="text-align: center;">BIND 9.9.8-P2 (Extended Support Version)</p>
+<p style="text-align: center;">BIND 9.9.8-P3 (Extended Support Version)</p>
 </body>
 </html>

Modified: vendor/bind9/dist/doc/arm/Bv9ARM.ch08.html
==============================================================================
--- vendor/bind9/dist/doc/arm/Bv9ARM.ch08.html	Wed Jan 20 07:21:33 2016	(r294373)
+++ vendor/bind9/dist/doc/arm/Bv9ARM.ch08.html	Wed Jan 20 07:27:07 2016	(r294374)
@@ -135,6 +135,6 @@
 </tr>
 </table>
 </div>
-<p style="text-align: center;">BIND 9.9.8-P2 (Extended Support Version)</p>
+<p style="text-align: center;">BIND 9.9.8-P3 (Extended Support Version)</p>
 </body>
 </html>

Modified: vendor/bind9/dist/doc/arm/Bv9ARM.ch09.html
==============================================================================
--- vendor/bind9/dist/doc/arm/Bv9ARM.ch09.html	Wed Jan 20 07:21:33 2016	(r294373)
+++ vendor/bind9/dist/doc/arm/Bv9ARM.ch09.html	Wed Jan 20 07:27:07 2016	(r294374)
@@ -45,7 +45,7 @@
 <div class="toc">
 <p><b>Table of Contents</b></p>
 <dl>
-<dt><span class="sect1"><a href="Bv9ARM.ch09.html#id2563593">Release Notes for BIND Version 9.9.8-P2</a></span></dt>
+<dt><span class="sect1"><a href="Bv9ARM.ch09.html#id2563593">Release Notes for BIND Version 9.9.8-P3</a></span></dt>
 <dd><dl>
 <dt><span class="sect2"><a href="Bv9ARM.ch09.html#relnotes_intro">Introduction</a></span></dt>
 <dt><span class="sect2"><a href="Bv9ARM.ch09.html#relnotes_download">Download</a></span></dt>
@@ -60,7 +60,7 @@
 </div>
 <div class="sect1" lang="en">
 <div class="titlepage"><div><div><h2 class="title" style="clear: both">
-<a name="id2563593"></a>Release Notes for BIND Version 9.9.8-P2</h2></div></div></div>
+<a name="id2563593"></a>Release Notes for BIND Version 9.9.8-P3</h2></div></div></div>
 <div class="sect2" lang="en">
 <div class="titlepage"><div><div><h3 class="title">
 <a name="relnotes_intro"></a>Introduction</h3></div></div></div>
@@ -68,6 +68,11 @@
       This document summarizes changes since BIND 9.9.8:
     </p>
 <p>
+      BIND 9.9.8-P3 addresses the security issue described in CVE-2015-8704.
+      It also fixes a serious regression in authoritative server selection
+      that was introduced in 9.9.8.
+    </p>
+<p>
       BIND 9.9.8-P2 addresses security issues described in CVE-2015-3193
       (OpenSSL), CVE-2015-8000 and CVE-2015-8461.
     </p>
@@ -91,13 +96,13 @@
 <a name="relnotes_security"></a>Security Fixes</h3></div></div></div>
 <div class="itemizedlist"><ul type="disc">
 <li><p>
-	  Named is potentially vulnerable to the OpenSSL vulnerabilty
-	  described in CVE-2015-3193.
+	  Specific APL data could trigger an INSIST.  This flaw
+	  was discovered by Brian Mitchell and is disclosed in
+	  CVE-2015-8704. [RT #41396]
 	</p></li>
 <li><p>
-	  Incorrect reference counting could result in an INSIST
-	  failure if a socket error occurred while performing a
-	  lookup.  This flaw is disclosed in CVE-2015-8461. [RT#40945]
+	  Named is potentially vulnerable to the OpenSSL vulnerabilty
+	  described in CVE-2015-3193.
 	</p></li>
 <li><p>
 	  Insufficient testing when parsing a message allowed
@@ -106,6 +111,11 @@
 	  were subsequently cached.  This flaw is disclosed
 	  in CVE-2015-8000. [RT #40987]
 	</p></li>
+<li><p>
+	  Incorrect reference counting could result in an INSIST
+	  failure if a socket error occurred while performing a
+	  lookup.  This flaw is disclosed in CVE-2015-8461. [RT#40945]
+	</p></li>
 </ul></div>
 </div>
 <div class="sect2" lang="en">
@@ -123,7 +133,11 @@
 <div class="sect2" lang="en">
 <div class="titlepage"><div><div><h3 class="title">
 <a name="relnotes_bugs"></a>Bug Fixes</h3></div></div></div>
-<div class="itemizedlist"><ul type="disc"><li><p>None</p></li></ul></div>
+<div class="itemizedlist"><ul type="disc"><li><p>
+	  Authoritative servers that were marked as bogus (e.g. blackholed
+	  in configuration or with invalid addresses) were being queried
+	  anyway. [RT #41321]
+	</p></li></ul></div>
 </div>
 <div class="sect2" lang="en">
 <div class="titlepage"><div><div><h3 class="title">
@@ -163,6 +177,6 @@
 </tr>
 </table>
 </div>
-<p style="text-align: center;">BIND 9.9.8-P2 (Extended Support Version)</p>
+<p style="text-align: center;">BIND 9.9.8-P3 (Extended Support Version)</p>
 </body>
 </html>

Modified: vendor/bind9/dist/doc/arm/Bv9ARM.ch10.html
==============================================================================
--- vendor/bind9/dist/doc/arm/Bv9ARM.ch10.html	Wed Jan 20 07:21:33 2016	(r294373)
+++ vendor/bind9/dist/doc/arm/Bv9ARM.ch10.html	Wed Jan 20 07:27:07 2016	(r294374)
@@ -163,6 +163,6 @@
 </tr>
 </table>
 </div>
-<p style="text-align: center;">BIND 9.9.8-P2 (Extended Support Version)</p>
+<p style="text-align: center;">BIND 9.9.8-P3 (Extended Support Version)</p>
 </body>
 </html>

Modified: vendor/bind9/dist/doc/arm/Bv9ARM.ch11.html
==============================================================================
--- vendor/bind9/dist/doc/arm/Bv9ARM.ch11.html	Wed Jan 20 07:21:33 2016	(r294373)
+++ vendor/bind9/dist/doc/arm/Bv9ARM.ch11.html	Wed Jan 20 07:27:07 2016	(r294374)
@@ -514,6 +514,6 @@
 </tr>
 </table>
 </div>
-<p style="text-align: center;">BIND 9.9.8-P2 (Extended Support Version)</p>
+<p style="text-align: center;">BIND 9.9.8-P3 (Extended Support Version)</p>
 </body>
 </html>

Modified: vendor/bind9/dist/doc/arm/Bv9ARM.ch12.html
==============================================================================
--- vendor/bind9/dist/doc/arm/Bv9ARM.ch12.html	Wed Jan 20 07:21:33 2016	(r294373)
+++ vendor/bind9/dist/doc/arm/Bv9ARM.ch12.html	Wed Jan 20 07:27:07 2016	(r294374)
@@ -47,13 +47,13 @@
 <dl>
 <dt><span class="sect1"><a href="Bv9ARM.ch12.html#bind9.library">BIND 9 DNS Library Support</a></span></dt>
 <dd><dl>
-<dt><span class="sect2"><a href="Bv9ARM.ch12.html#id2612350">Prerequisite</a></span></dt>
-<dt><span class="sect2"><a href="Bv9ARM.ch12.html#id2611541">Compilation</a></span></dt>
-<dt><span class="sect2"><a href="Bv9ARM.ch12.html#id2611565">Installation</a></span></dt>
-<dt><span class="sect2"><a href="Bv9ARM.ch12.html#id2611596">Known Defects/Restrictions</a></span></dt>
-<dt><span class="sect2"><a href="Bv9ARM.ch12.html#id2611673">The dns.conf File</a></span></dt>
-<dt><span class="sect2"><a href="Bv9ARM.ch12.html#id2611700">Sample Applications</a></span></dt>
-<dt><span class="sect2"><a href="Bv9ARM.ch12.html#id2612673">Library References</a></span></dt>
+<dt><span class="sect2"><a href="Bv9ARM.ch12.html#id2611473">Prerequisite</a></span></dt>
+<dt><span class="sect2"><a href="Bv9ARM.ch12.html#id2611482">Compilation</a></span></dt>
+<dt><span class="sect2"><a href="Bv9ARM.ch12.html#id2611507">Installation</a></span></dt>
+<dt><span class="sect2"><a href="Bv9ARM.ch12.html#id2611538">Known Defects/Restrictions</a></span></dt>
+<dt><span class="sect2"><a href="Bv9ARM.ch12.html#id2611614">The dns.conf File</a></span></dt>
+<dt><span class="sect2"><a href="Bv9ARM.ch12.html#id2611641">Sample Applications</a></span></dt>
+<dt><span class="sect2"><a href="Bv9ARM.ch12.html#id2612682">Library References</a></span></dt>
 </dl></dd>
 </dl>
 </div>
@@ -89,7 +89,7 @@
 </ul></div>
 <div class="sect2" lang="en">
 <div class="titlepage"><div><div><h3 class="title">
-<a name="id2612350"></a>Prerequisite</h3></div></div></div>
+<a name="id2611473"></a>Prerequisite</h3></div></div></div>
 <p>GNU make is required to build the export libraries (other
   part of BIND 9 can still be built with other types of make). In
   the reminder of this document, "make" means GNU make. Note that
@@ -98,7 +98,7 @@
 </div>
 <div class="sect2" lang="en">
 <div class="titlepage"><div><div><h3 class="title">
-<a name="id2611541"></a>Compilation</h3></div></div></div>
+<a name="id2611482"></a>Compilation</h3></div></div></div>
 <pre class="screen">
 $ <strong class="userinput"><code>./configure --enable-exportlib <em class="replaceable"><code>[other flags]</code></em></code></strong>
 $ <strong class="userinput"><code>make</code></strong>
@@ -113,7 +113,7 @@ $ <strong class="userinput"><code>make</
 </div>
 <div class="sect2" lang="en">
 <div class="titlepage"><div><div><h3 class="title">
-<a name="id2611565"></a>Installation</h3></div></div></div>
+<a name="id2611507"></a>Installation</h3></div></div></div>
 <pre class="screen">
 $ <strong class="userinput"><code>cd lib/export</code></strong>
 $ <strong class="userinput"><code>make install</code></strong>
@@ -135,7 +135,7 @@ $ <strong class="userinput"><code>make i
 </div>
 <div class="sect2" lang="en">
 <div class="titlepage"><div><div><h3 class="title">
-<a name="id2611596"></a>Known Defects/Restrictions</h3></div></div></div>
+<a name="id2611538"></a>Known Defects/Restrictions</h3></div></div></div>
 <div class="itemizedlist"><ul type="disc">
 <li><p>Currently, win32 is not supported for the export
       library. (Normal BIND 9 application can be built as
@@ -175,7 +175,7 @@ $ <strong class="userinput"><code>make</
 </div>
 <div class="sect2" lang="en">
 <div class="titlepage"><div><div><h3 class="title">
-<a name="id2611673"></a>The dns.conf File</h3></div></div></div>
+<a name="id2611614"></a>The dns.conf File</h3></div></div></div>
 <p>The IRS library supports an "advanced" configuration file
   related to the DNS library for configuration parameters that
   would be beyond the capability of the
@@ -193,14 +193,14 @@ $ <strong class="userinput"><code>make</
 </div>
 <div class="sect2" lang="en">
 <div class="titlepage"><div><div><h3 class="title">
-<a name="id2611700"></a>Sample Applications</h3></div></div></div>
+<a name="id2611641"></a>Sample Applications</h3></div></div></div>
 <p>Some sample application programs using this API are
   provided for reference. The following is a brief description of
   these applications.
   </p>
 <div class="sect3" lang="en">
 <div class="titlepage"><div><div><h4 class="title">
-<a name="id2611708"></a>sample: a simple stub resolver utility</h4></div></div></div>
+<a name="id2611650"></a>sample: a simple stub resolver utility</h4></div></div></div>
 <p>
   It sends a query of a given name (of a given optional RR type) to a
   specified recursive server, and prints the result as a list of
@@ -264,7 +264,7 @@ $ <strong class="userinput"><code>make</
 </div>
 <div class="sect3" lang="en">
 <div class="titlepage"><div><div><h4 class="title">
-<a name="id2611867"></a>sample-async: a simple stub resolver, working asynchronously</h4></div></div></div>
+<a name="id2611877"></a>sample-async: a simple stub resolver, working asynchronously</h4></div></div></div>
 <p>
   Similar to "sample", but accepts a list
   of (query) domain names as a separate file and resolves the names
@@ -305,7 +305,7 @@ $ <strong class="userinput"><code>make</
 </div>
 <div class="sect3" lang="en">
 <div class="titlepage"><div><div><h4 class="title">
-<a name="id2611921"></a>sample-request: a simple DNS transaction client</h4></div></div></div>
+<a name="id2611930"></a>sample-request: a simple DNS transaction client</h4></div></div></div>
 <p>
   It sends a query to a specified server, and
   prints the response with minimal processing. It doesn't act as a
@@ -346,7 +346,7 @@ $ <strong class="userinput"><code>make</
 </div>
 <div class="sect3" lang="en">
 <div class="titlepage"><div><div><h4 class="title">
-<a name="id2611985"></a>sample-gai: getaddrinfo() and getnameinfo() test code</h4></div></div></div>
+<a name="id2611994"></a>sample-gai: getaddrinfo() and getnameinfo() test code</h4></div></div></div>
 <p>
   This is a test program
   to check getaddrinfo() and getnameinfo() behavior. It takes a
@@ -363,7 +363,7 @@ $ <strong class="userinput"><code>make</
 </div>
 <div class="sect3" lang="en">
 <div class="titlepage"><div><div><h4 class="title">
-<a name="id2612000"></a>sample-update: a simple dynamic update client program</h4></div></div></div>
+<a name="id2612009"></a>sample-update: a simple dynamic update client program</h4></div></div></div>
 <p>
   It accepts a single update command as a
   command-line argument, sends an update request message to the
@@ -458,7 +458,7 @@ $ <strong class="userinput"><code>sample
 </div>
 <div class="sect3" lang="en">
 <div class="titlepage"><div><div><h4 class="title">
-<a name="id2612131"></a>nsprobe: domain/name server checker in terms of RFC 4074</h4></div></div></div>
+<a name="id2612140"></a>nsprobe: domain/name server checker in terms of RFC 4074</h4></div></div></div>
 <p>
   It checks a set
   of domains to see the name servers of the domains behave
@@ -515,7 +515,7 @@ $ <strong class="userinput"><code>sample
 </div>
 <div class="sect2" lang="en">
 <div class="titlepage"><div><div><h3 class="title">
-<a name="id2612673"></a>Library References</h3></div></div></div>
+<a name="id2612682"></a>Library References</h3></div></div></div>
 <p>As of this writing, there is no formal "manual" of the
   libraries, except this document, header files (some of them
   provide pretty detailed explanations), and sample application
@@ -540,6 +540,6 @@ $ <strong class="userinput"><code>sample
 </tr>
 </table>
 </div>
-<p style="text-align: center;">BIND 9.9.8-P2 (Extended Support Version)</p>
+<p style="text-align: center;">BIND 9.9.8-P3 (Extended Support Version)</p>
 </body>
 </html>

Modified: vendor/bind9/dist/doc/arm/Bv9ARM.ch13.html
==============================================================================
--- vendor/bind9/dist/doc/arm/Bv9ARM.ch13.html	Wed Jan 20 07:21:33 2016	(r294373)
+++ vendor/bind9/dist/doc/arm/Bv9ARM.ch13.html	Wed Jan 20 07:27:07 2016	(r294374)
@@ -140,6 +140,6 @@
 </tr>
 </table>
 </div>
-<p style="text-align: center;">BIND 9.9.8-P2 (Extended Support Version)</p>
+<p style="text-align: center;">BIND 9.9.8-P3 (Extended Support Version)</p>
 </body>
 </html>

Modified: vendor/bind9/dist/doc/arm/Bv9ARM.html
==============================================================================
--- vendor/bind9/dist/doc/arm/Bv9ARM.html	Wed Jan 20 07:21:33 2016	(r294373)
+++ vendor/bind9/dist/doc/arm/Bv9ARM.html	Wed Jan 20 07:27:07 2016	(r294374)
@@ -41,7 +41,7 @@
 <div>
 <div><h1 class="title">
 <a name="id2563180"></a>BIND 9 Administrator Reference Manual</h1></div>
-<div><p class="releaseinfo">BIND Version 9.9.8-P2</p></div>
+<div><p class="releaseinfo">BIND Version 9.9.8-P3</p></div>
 <div><p class="copyright">Copyright © 2004-2015 Internet Systems Consortium, Inc. ("ISC")</p></div>
 <div><p class="copyright">Copyright © 2000-2003 Internet Software Consortium.</p></div>
 </div>
@@ -234,7 +234,7 @@
 </dl></dd>
 <dt><span class="appendix"><a href="Bv9ARM.ch09.html">A. Release Notes</a></span></dt>
 <dd><dl>
-<dt><span class="sect1"><a href="Bv9ARM.ch09.html#id2563593">Release Notes for BIND Version 9.9.8-P2</a></span></dt>
+<dt><span class="sect1"><a href="Bv9ARM.ch09.html#id2563593">Release Notes for BIND Version 9.9.8-P3</a></span></dt>
 <dd><dl>
 <dt><span class="sect2"><a href="Bv9ARM.ch09.html#relnotes_intro">Introduction</a></span></dt>
 <dt><span class="sect2"><a href="Bv9ARM.ch09.html#relnotes_download">Download</a></span></dt>
@@ -262,13 +262,13 @@
 <dd><dl>
 <dt><span class="sect1"><a href="Bv9ARM.ch12.html#bind9.library">BIND 9 DNS Library Support</a></span></dt>
 <dd><dl>
-<dt><span class="sect2"><a href="Bv9ARM.ch12.html#id2612350">Prerequisite</a></span></dt>
-<dt><span class="sect2"><a href="Bv9ARM.ch12.html#id2611541">Compilation</a></span></dt>
-<dt><span class="sect2"><a href="Bv9ARM.ch12.html#id2611565">Installation</a></span></dt>
-<dt><span class="sect2"><a href="Bv9ARM.ch12.html#id2611596">Known Defects/Restrictions</a></span></dt>
-<dt><span class="sect2"><a href="Bv9ARM.ch12.html#id2611673">The dns.conf File</a></span></dt>
-<dt><span class="sect2"><a href="Bv9ARM.ch12.html#id2611700">Sample Applications</a></span></dt>
-<dt><span class="sect2"><a href="Bv9ARM.ch12.html#id2612673">Library References</a></span></dt>
+<dt><span class="sect2"><a href="Bv9ARM.ch12.html#id2611473">Prerequisite</a></span></dt>
+<dt><span class="sect2"><a href="Bv9ARM.ch12.html#id2611482">Compilation</a></span></dt>
+<dt><span class="sect2"><a href="Bv9ARM.ch12.html#id2611507">Installation</a></span></dt>
+<dt><span class="sect2"><a href="Bv9ARM.ch12.html#id2611538">Known Defects/Restrictions</a></span></dt>
+<dt><span class="sect2"><a href="Bv9ARM.ch12.html#id2611614">The dns.conf File</a></span></dt>
+<dt><span class="sect2"><a href="Bv9ARM.ch12.html#id2611641">Sample Applications</a></span></dt>
+<dt><span class="sect2"><a href="Bv9ARM.ch12.html#id2612682">Library References</a></span></dt>
 </dl></dd>
 </dl></dd>
 <dt><span class="reference"><a href="Bv9ARM.ch13.html">I. Manual pages</a></span></dt>
@@ -365,6 +365,6 @@
 </tr>
 </table>
 </div>
-<p style="text-align: center;">BIND 9.9.8-P2 (Extended Support Version)</p>
+<p style="text-align: center;">BIND 9.9.8-P3 (Extended Support Version)</p>
 </body>
 </html>

Modified: vendor/bind9/dist/doc/arm/Bv9ARM.pdf
==============================================================================
Binary file (source and/or target). No diff available.

Modified: vendor/bind9/dist/doc/arm/man.arpaname.html
==============================================================================
--- vendor/bind9/dist/doc/arm/man.arpaname.html	Wed Jan 20 07:21:33 2016	(r294373)
+++ vendor/bind9/dist/doc/arm/man.arpaname.html	Wed Jan 20 07:27:07 2016	(r294374)
@@ -50,20 +50,20 @@
 <div class="cmdsynopsis"><p><code class="command">arpaname</code>  {<em class="replaceable"><code>ipaddress </code></em>...}</p></div>
 </div>
 <div class="refsect1" lang="en">
-<a name="id2621516"></a><h2>DESCRIPTION</h2>
+<a name="id2621321"></a><h2>DESCRIPTION</h2>
 <p>
       <span><strong class="command">arpaname</strong></span> translates IP addresses (IPv4 and
       IPv6) to the corresponding IN-ADDR.ARPA or IP6.ARPA names.
     </p>
 </div>
 <div class="refsect1" lang="en">
-<a name="id2621531"></a><h2>SEE ALSO</h2>
+<a name="id2621336"></a><h2>SEE ALSO</h2>
 <p>
       <em class="citetitle">BIND 9 Administrator Reference Manual</em>.
     </p>
 </div>
 <div class="refsect1" lang="en">
-<a name="id2621545"></a><h2>AUTHOR</h2>
+<a name="id2621350"></a><h2>AUTHOR</h2>
 <p><span class="corpauthor">Internet Systems Consortium</span>
     </p>
 </div>
@@ -87,6 +87,6 @@
 </tr>
 </table>
 </div>
-<p style="text-align: center;">BIND 9.9.8-P2 (Extended Support Version)</p>
+<p style="text-align: center;">BIND 9.9.8-P3 (Extended Support Version)</p>
 </body>
 </html>

Modified: vendor/bind9/dist/doc/arm/man.ddns-confgen.html
==============================================================================
--- vendor/bind9/dist/doc/arm/man.ddns-confgen.html	Wed Jan 20 07:21:33 2016	(r294373)
+++ vendor/bind9/dist/doc/arm/man.ddns-confgen.html	Wed Jan 20 07:27:07 2016	(r294374)
@@ -50,7 +50,7 @@
 <div class="cmdsynopsis"><p><code class="command">ddns-confgen</code>  [<code class="option">-a <em class="replaceable"><code>algorithm</code></em></code>] [<code class="option">-h</code>] [<code class="option">-k <em class="replaceable"><code>keyname</code></em></code>] [<code class="option">-r <em class="replaceable"><code>randomfile</code></em></code>] [ -s <em class="replaceable"><code>name</code></em>  |   -z <em class="replaceable"><code>zone</code></em> ] [<code class="option">-q</code>] [name]</p></div>
 </div>
 <div class="refsect1" lang="en">
-<a name="id2656558"></a><h2>DESCRIPTION</h2>
+<a name="id2656978"></a><h2>DESCRIPTION</h2>
 <p><span><strong class="command">ddns-confgen</strong></span>
       generates a key for use by <span><strong class="command">nsupdate</strong></span>
       and <span><strong class="command">named</strong></span>.  It simplifies configuration
@@ -77,7 +77,7 @@
     </p>
 </div>
 <div class="refsect1" lang="en">
-<a name="id2656646"></a><h2>OPTIONS</h2>
+<a name="id2657065"></a><h2>OPTIONS</h2>
 <div class="variablelist"><dl>
 <dt><span class="term">-a <em class="replaceable"><code>algorithm</code></em></span></dt>
 <dd><p>
@@ -144,7 +144,7 @@
 </dl></div>
 </div>
 <div class="refsect1" lang="en">
-<a name="id2656915"></a><h2>SEE ALSO</h2>
+<a name="id2658699"></a><h2>SEE ALSO</h2>
 <p><span class="citerefentry"><span class="refentrytitle">nsupdate</span>(1)</span>,
       <span class="citerefentry"><span class="refentrytitle">named.conf</span>(5)</span>,
       <span class="citerefentry"><span class="refentrytitle">named</span>(8)</span>,
@@ -152,7 +152,7 @@
     </p>
 </div>
 <div class="refsect1" lang="en">
-<a name="id2656953"></a><h2>AUTHOR</h2>
+<a name="id2658738"></a><h2>AUTHOR</h2>
 <p><span class="corpauthor">Internet Systems Consortium</span>
     </p>
 </div>
@@ -176,6 +176,6 @@
 </tr>
 </table>
 </div>
-<p style="text-align: center;">BIND 9.9.8-P2 (Extended Support Version)</p>
+<p style="text-align: center;">BIND 9.9.8-P3 (Extended Support Version)</p>
 </body>
 </html>

Modified: vendor/bind9/dist/doc/arm/man.dig.html
==============================================================================
--- vendor/bind9/dist/doc/arm/man.dig.html	Wed Jan 20 07:21:33 2016	(r294373)
+++ vendor/bind9/dist/doc/arm/man.dig.html	Wed Jan 20 07:27:07 2016	(r294374)
@@ -52,7 +52,7 @@
 <div class="cmdsynopsis"><p><code class="command">dig</code>  [global-queryopt...] [query...]</p></div>
 </div>
 <div class="refsect1" lang="en">
-<a name="id2612595"></a><h2>DESCRIPTION</h2>
+<a name="id2612604"></a><h2>DESCRIPTION</h2>
 <p><span><strong class="command">dig</strong></span>
       (domain information groper) is a flexible tool
       for interrogating DNS name servers.  It performs DNS lookups and
@@ -99,7 +99,7 @@
     </p>
 </div>
 <div class="refsect1" lang="en">
-<a name="id2612834"></a><h2>SIMPLE USAGE</h2>
+<a name="id2612843"></a><h2>SIMPLE USAGE</h2>
 <p>
       A typical invocation of <span><strong class="command">dig</strong></span> looks like:
       </p>
@@ -152,7 +152,7 @@
     </p>
 </div>
 <div class="refsect1" lang="en">
-<a name="id2613164"></a><h2>OPTIONS</h2>
+<a name="id2613174"></a><h2>OPTIONS</h2>
 <div class="variablelist"><dl>
 <dt><span class="term">-4</span></dt>
 <dd><p>
@@ -280,7 +280,7 @@
 </dl></div>
 </div>
 <div class="refsect1" lang="en">
-<a name="id2665699"></a><h2>QUERY OPTIONS</h2>
+<a name="id2665777"></a><h2>QUERY OPTIONS</h2>
 <p><span><strong class="command">dig</strong></span>
       provides a number of query options which affect
       the way in which lookups are made and the results displayed.  Some of
@@ -649,7 +649,7 @@
     </p>
 </div>
 <div class="refsect1" lang="en">
-<a name="id2666846"></a><h2>MULTIPLE QUERIES</h2>
+<a name="id2666856"></a><h2>MULTIPLE QUERIES</h2>
 <p>
       The BIND 9 implementation of <span><strong class="command">dig </strong></span>
       supports
@@ -695,7 +695,7 @@ dig +qr www.isc.org any -x 127.0.0.1 isc
     </p>
 </div>
 <div class="refsect1" lang="en">
-<a name="id2667000"></a><h2>IDN SUPPORT</h2>
+<a name="id2667010"></a><h2>IDN SUPPORT</h2>
 <p>
       If <span><strong class="command">dig</strong></span> has been built with IDN (internationalized
       domain name) support, it can accept and display non-ASCII domain names.
@@ -709,14 +709,14 @@ dig +qr www.isc.org any -x 127.0.0.1 isc
     </p>
 </div>
 <div class="refsect1" lang="en">
-<a name="id2667029"></a><h2>FILES</h2>
+<a name="id2667038"></a><h2>FILES</h2>
 <p><code class="filename">/etc/resolv.conf</code>
     </p>
 <p><code class="filename">${HOME}/.digrc</code>
     </p>
 </div>
 <div class="refsect1" lang="en">
-<a name="id2667118"></a><h2>SEE ALSO</h2>
+<a name="id2667128"></a><h2>SEE ALSO</h2>
 <p><span class="citerefentry"><span class="refentrytitle">host</span>(1)</span>,
       <span class="citerefentry"><span class="refentrytitle">named</span>(8)</span>,
       <span class="citerefentry"><span class="refentrytitle">dnssec-keygen</span>(8)</span>,
@@ -724,7 +724,7 @@ dig +qr www.isc.org any -x 127.0.0.1 isc
     </p>
 </div>
 <div class="refsect1" lang="en">
-<a name="id2667156"></a><h2>BUGS</h2>
+<a name="id2667165"></a><h2>BUGS</h2>
 <p>
       There are probably too many query options.
     </p>
@@ -747,6 +747,6 @@ dig +qr www.isc.org any -x 127.0.0.1 isc
 </tr>
 </table>
 </div>
-<p style="text-align: center;">BIND 9.9.8-P2 (Extended Support Version)</p>
+<p style="text-align: center;">BIND 9.9.8-P3 (Extended Support Version)</p>
 </body>
 </html>

Modified: vendor/bind9/dist/doc/arm/man.dnssec-checkds.html
==============================================================================
--- vendor/bind9/dist/doc/arm/man.dnssec-checkds.html	Wed Jan 20 07:21:33 2016	(r294373)
+++ vendor/bind9/dist/doc/arm/man.dnssec-checkds.html	Wed Jan 20 07:27:07 2016	(r294374)
@@ -51,7 +51,7 @@
 <div class="cmdsynopsis"><p><code class="command">dnssec-dsfromkey</code>  [<code class="option">-l <em class="replaceable"><code>domain</code></em></code>] [<code class="option">-f <em class="replaceable"><code>file</code></em></code>] [<code class="option">-d <em class="replaceable"><code>dig path</code></em></code>] [<code class="option">-D <em class="replaceable"><code>dsfromkey path</code></em></code>] {zone}</p></div>
 </div>
 <div class="refsect1" lang="en">
-<a name="id2614266"></a><h2>DESCRIPTION</h2>
+<a name="id2614344"></a><h2>DESCRIPTION</h2>
 <p><span><strong class="command">dnssec-checkds</strong></span>
       verifies the correctness of Delegation Signer (DS) or DNSSEC
       Lookaside Validation (DLV) resource records for keys in a specified
@@ -59,7 +59,7 @@
     </p>
 </div>
 <div class="refsect1" lang="en">
-<a name="id2614280"></a><h2>OPTIONS</h2>
+<a name="id2614358"></a><h2>OPTIONS</h2>
 <div class="variablelist"><dl>
 <dt><span class="term">-f <em class="replaceable"><code>file</code></em></span></dt>
 <dd><p>
@@ -88,14 +88,14 @@
 </dl></div>
 </div>
 <div class="refsect1" lang="en">
-<a name="id2614382"></a><h2>SEE ALSO</h2>
+<a name="id2614460"></a><h2>SEE ALSO</h2>
 <p><span class="citerefentry"><span class="refentrytitle">dnssec-dsfromkey</span>(8)</span>,
       <span class="citerefentry"><span class="refentrytitle">dnssec-keygen</span>(8)</span>,
       <span class="citerefentry"><span class="refentrytitle">dnssec-signzone</span>(8)</span>,
     </p>
 </div>
 <div class="refsect1" lang="en">
-<a name="id2614417"></a><h2>AUTHOR</h2>
+<a name="id2614494"></a><h2>AUTHOR</h2>
 <p><span class="corpauthor">Internet Systems Consortium</span>
     </p>
 </div>
@@ -118,6 +118,6 @@
 </tr>
 </table>
 </div>
-<p style="text-align: center;">BIND 9.9.8-P2 (Extended Support Version)</p>
+<p style="text-align: center;">BIND 9.9.8-P3 (Extended Support Version)</p>
 </body>
 </html>

Modified: vendor/bind9/dist/doc/arm/man.dnssec-coverage.html
==============================================================================
--- vendor/bind9/dist/doc/arm/man.dnssec-coverage.html	Wed Jan 20 07:21:33 2016	(r294373)
+++ vendor/bind9/dist/doc/arm/man.dnssec-coverage.html	Wed Jan 20 07:27:07 2016	(r294374)
@@ -50,7 +50,7 @@
 <div class="cmdsynopsis"><p><code class="command">dnssec-coverage</code>  [<code class="option">-K <em class="replaceable"><code>directory</code></em></code>] [<code class="option">-f <em class="replaceable"><code>file</code></em></code>] [<code class="option">-d <em class="replaceable"><code>DNSKEY TTL</code></em></code>] [<code class="option">-m <em class="replaceable"><code>max TTL</code></em></code>] [<code class="option">-r <em class="replaceable"><code>interval</code></em></code>] [<code class="option">-c <em class="replaceable"><code>compilezone path</code></em></code>] [zone]</p></div>
 </div>
 <div class="refsect1" lang="en">
-<a name="id2614782"></a><h2>DESCRIPTION</h2>
+<a name="id2614656"></a><h2>DESCRIPTION</h2>
 <p><span><strong class="command">dnssec-coverage</strong></span>
       verifies that the DNSSEC keys for a given zone or a set of zones
       have timing metadata set properly to ensure no future lapses in DNSSEC
@@ -78,7 +78,7 @@
     </p>
 </div>
 <div class="refsect1" lang="en">
-<a name="id2614809"></a><h2>OPTIONS</h2>
+<a name="id2614750"></a><h2>OPTIONS</h2>
 <div class="variablelist"><dl>
 <dt><span class="term">-f <em class="replaceable"><code>file</code></em></span></dt>
 <dd><p>
@@ -168,7 +168,7 @@
 </dl></div>
 </div>
 <div class="refsect1" lang="en">
-<a name="id2615879"></a><h2>SEE ALSO</h2>
+<a name="id2615479"></a><h2>SEE ALSO</h2>
 <p>
       <span class="citerefentry"><span class="refentrytitle">dnssec-checkds</span>(8)</span>,
       <span class="citerefentry"><span class="refentrytitle">dnssec-dsfromkey</span>(8)</span>,
@@ -177,7 +177,7 @@
     </p>
 </div>
 <div class="refsect1" lang="en">
-<a name="id2616264"></a><h2>AUTHOR</h2>
+<a name="id2615523"></a><h2>AUTHOR</h2>
 <p><span class="corpauthor">Internet Systems Consortium</span>
     </p>
 </div>
@@ -201,6 +201,6 @@
 </tr>
 </table>
 </div>
-<p style="text-align: center;">BIND 9.9.8-P2 (Extended Support Version)</p>
+<p style="text-align: center;">BIND 9.9.8-P3 (Extended Support Version)</p>
 </body>
 </html>

Modified: vendor/bind9/dist/doc/arm/man.dnssec-dsfromkey.html
==============================================================================
--- vendor/bind9/dist/doc/arm/man.dnssec-dsfromkey.html	Wed Jan 20 07:21:33 2016	(r294373)
+++ vendor/bind9/dist/doc/arm/man.dnssec-dsfromkey.html	Wed Jan 20 07:27:07 2016	(r294374)
@@ -52,14 +52,14 @@
 <div class="cmdsynopsis"><p><code class="command">dnssec-dsfromkey</code>  [<code class="option">-h</code>] [<code class="option">-V</code>]</p></div>
 </div>
 <div class="refsect1" lang="en">
-<a name="id2616576"></a><h2>DESCRIPTION</h2>
+<a name="id2616176"></a><h2>DESCRIPTION</h2>
 <p><span><strong class="command">dnssec-dsfromkey</strong></span>
       outputs the Delegation Signer (DS) resource record (RR), as defined in
       RFC 3658 and RFC 4509, for the given key(s).
     </p>
 </div>
 <div class="refsect1" lang="en">
-<a name="id2616589"></a><h2>OPTIONS</h2>
+<a name="id2616189"></a><h2>OPTIONS</h2>
 <div class="variablelist"><dl>
 <dt><span class="term">-1</span></dt>
 <dd><p>
@@ -150,7 +150,7 @@
 </dl></div>
 </div>
 <div class="refsect1" lang="en">
-<a name="id2617274"></a><h2>EXAMPLE</h2>
+<a name="id2616874"></a><h2>EXAMPLE</h2>
 <p>
       To build the SHA-256 DS RR from the
       <strong class="userinput"><code>Kexample.com.+003+26160</code></strong>
@@ -165,7 +165,7 @@
     </p>
 </div>
 <div class="refsect1" lang="en">
-<a name="id2617310"></a><h2>FILES</h2>
+<a name="id2616910"></a><h2>FILES</h2>
 <p>
       The keyfile can be designed by the key identification
       <code class="filename">Knnnn.+aaa+iiiii</code> or the full file name
@@ -179,13 +179,13 @@
     </p>
 </div>
 <div class="refsect1" lang="en">
-<a name="id2618649"></a><h2>CAVEAT</h2>
+<a name="id2618590"></a><h2>CAVEAT</h2>
 <p>
       A keyfile error can give a "file not found" even if the file exists.
     </p>
 </div>
 <div class="refsect1" lang="en">
-<a name="id2618659"></a><h2>SEE ALSO</h2>
+<a name="id2618600"></a><h2>SEE ALSO</h2>
 <p><span class="citerefentry"><span class="refentrytitle">dnssec-keygen</span>(8)</span>,
       <span class="citerefentry"><span class="refentrytitle">dnssec-signzone</span>(8)</span>,
       <em class="citetitle">BIND 9 Administrator Reference Manual</em>,
@@ -195,7 +195,7 @@
     </p>
 </div>
 <div class="refsect1" lang="en">
-<a name="id2618698"></a><h2>AUTHOR</h2>
+<a name="id2618640"></a><h2>AUTHOR</h2>
 <p><span class="corpauthor">Internet Systems Consortium</span>
     </p>
 </div>
@@ -219,6 +219,6 @@
 </tr>
 </table>
 </div>
-<p style="text-align: center;">BIND 9.9.8-P2 (Extended Support Version)</p>
+<p style="text-align: center;">BIND 9.9.8-P3 (Extended Support Version)</p>
 </body>
 </html>

Modified: vendor/bind9/dist/doc/arm/man.dnssec-keyfromlabel.html
==============================================================================
--- vendor/bind9/dist/doc/arm/man.dnssec-keyfromlabel.html	Wed Jan 20 07:21:33 2016	(r294373)
+++ vendor/bind9/dist/doc/arm/man.dnssec-keyfromlabel.html	Wed Jan 20 07:27:07 2016	(r294374)
@@ -50,7 +50,7 @@
 <div class="cmdsynopsis"><p><code class="command">dnssec-keyfromlabel</code>  {-l <em class="replaceable"><code>label</code></em>} [<code class="option">-3</code>] [<code class="option">-a <em class="replaceable"><code>algorithm</code></em></code>] [<code class="option">-A <em class="replaceable"><code>date/offset</code></em></code>] [<code class="option">-c <em class="replaceable"><code>class</code></em></code>] [<code class="option">-D <em class="replaceable"><code>date/offset</code></em></code>] [<code class="option">-E <em class="replaceable"><code>engine</code></em></code>] [<code class="option">-f <em class="replaceable"><code>flag</code></em></code>] [<code class="option">-G</code>] [<code class="option">-I <em class="replaceable"><code>date/offset</code></em></code>] [<code class="option">-i <em class="replaceable"><code>interval</code></em></code>] [<code class="option">-k</code>] [<code class="option">-K <em class="replaceable"><code>directory</code></em></code>] [<code cl
 ass="option">-L <em class="replaceable"><code>ttl</code></em></code>] [<code class="option">-n <em class="replaceable"><code>nametype</code></em></code>] [<code class="option">-P <em class="replaceable"><code>date/offset</code></em></code>] [<code class="option">-p <em class="replaceable"><code>protocol</code></em></code>] [<code class="option">-R <em class="replaceable"><code>date/offset</code></em></code>] [<code class="option">-S <em class="replaceable"><code>key</code></em></code>] [<code class="option">-t <em class="replaceable"><code>type</code></em></code>] [<code class="option">-v <em class="replaceable"><code>level</code></em></code>] [<code class="option">-V</code>] [<code class="option">-y</code>] {name}</p></div>
 </div>
 <div class="refsect1" lang="en">
-<a name="id2617877"></a><h2>DESCRIPTION</h2>
+<a name="id2617545"></a><h2>DESCRIPTION</h2>
 <p><span><strong class="command">dnssec-keyfromlabel</strong></span>
       generates a key pair of files that referencing a key object stored
       in a cryptographic hardware service module (HSM).  The private key
@@ -66,7 +66,7 @@
     </p>
 </div>
 <div class="refsect1" lang="en">
-<a name="id2617902"></a><h2>OPTIONS</h2>
+<a name="id2617571"></a><h2>OPTIONS</h2>
 <div class="variablelist"><dl>
 <dt><span class="term">-a <em class="replaceable"><code>algorithm</code></em></span></dt>
 <dd>
@@ -209,7 +209,7 @@
 </dl></div>
 </div>
 <div class="refsect1" lang="en">
-<a name="id2620377"></a><h2>TIMING OPTIONS</h2>
+<a name="id2620182"></a><h2>TIMING OPTIONS</h2>
 <p>
       Dates can be expressed in the format YYYYMMDD or YYYYMMDDHHMMSS.
       If the argument begins with a '+' or '-', it is interpreted as
@@ -281,7 +281,7 @@
 </dl></div>
 </div>
 <div class="refsect1" lang="en">
-<a name="id2670948"></a><h2>GENERATED KEY FILES</h2>
+<a name="id2670957"></a><h2>GENERATED KEY FILES</h2>
 <p>
       When <span><strong class="command">dnssec-keyfromlabel</strong></span> completes
       successfully,
@@ -320,7 +320,7 @@
     </p>
 </div>
 <div class="refsect1" lang="en">
-<a name="id2671110"></a><h2>SEE ALSO</h2>
+<a name="id2671120"></a><h2>SEE ALSO</h2>
 <p><span class="citerefentry"><span class="refentrytitle">dnssec-keygen</span>(8)</span>,
       <span class="citerefentry"><span class="refentrytitle">dnssec-signzone</span>(8)</span>,
       <em class="citetitle">BIND 9 Administrator Reference Manual</em>,
@@ -328,7 +328,7 @@
     </p>
 </div>
 <div class="refsect1" lang="en">
-<a name="id2671143"></a><h2>AUTHOR</h2>
+<a name="id2671153"></a><h2>AUTHOR</h2>
 <p><span class="corpauthor">Internet Systems Consortium</span>
     </p>
 </div>
@@ -352,6 +352,6 @@
 </tr>
 </table>
 </div>
-<p style="text-align: center;">BIND 9.9.8-P2 (Extended Support Version)</p>
+<p style="text-align: center;">BIND 9.9.8-P3 (Extended Support Version)</p>
 </body>
 </html>

Modified: vendor/bind9/dist/doc/arm/man.dnssec-keygen.html
==============================================================================
--- vendor/bind9/dist/doc/arm/man.dnssec-keygen.html	Wed Jan 20 07:21:33 2016	(r294373)
+++ vendor/bind9/dist/doc/arm/man.dnssec-keygen.html	Wed Jan 20 07:27:07 2016	(r294374)
@@ -50,7 +50,7 @@
 <div class="cmdsynopsis"><p><code class="command">dnssec-keygen</code>  [<code class="option">-a <em class="replaceable"><code>algorithm</code></em></code>] [<code class="option">-b <em class="replaceable"><code>keysize</code></em></code>] [<code class="option">-n <em class="replaceable"><code>nametype</code></em></code>] [<code class="option">-3</code>] [<code class="option">-A <em class="replaceable"><code>date/offset</code></em></code>] [<code class="option">-C</code>] [<code class="option">-c <em class="replaceable"><code>class</code></em></code>] [<code class="option">-D <em class="replaceable"><code>date/offset</code></em></code>] [<code class="option">-E <em class="replaceable"><code>engine</code></em></code>] [<code class="option">-f <em class="replaceable"><code>flag</code></em></code>] [<code class="option">-G</code>] [<code class="option">-g <em class="replaceable"><code>generator</code></em></code>] [<code class="option">-h</code>] [<code class="option">-I <em class="rep
 laceable"><code>date/offset</code></em></code>] [<code class="option">-i <em class="replaceable"><code>interval</code></em></code>] [<code class="option">-K <em class="replaceable"><code>directory</code></em></code>] [<code class="option">-L <em class="replaceable"><code>ttl</code></em></code>] [<code class="option">-k</code>] [<code class="option">-P <em class="replaceable"><code>date/offset</code></em></code>] [<code class="option">-p <em class="replaceable"><code>protocol</code></em></code>] [<code class="option">-q</code>] [<code class="option">-R <em class="replaceable"><code>date/offset</code></em></code>] [<code class="option">-r <em class="replaceable"><code>randomdev</code></em></code>] [<code class="option">-S <em class="replaceable"><code>key</code></em></code>] [<code class="option">-s <em class="replaceable"><code>strength</code></em></code>] [<code class="option">-t <em class="replaceable"><code>type</code></em></code>] [<code class="option">-v <em class="replaceable">
 <code>level</code></em></code>] [<code class!
 ="option">-V</code>] [<code class="option">-z</code>] {name}</p></div>
 </div>
 <div class="refsect1" lang="en">
-<a name="id2618924"></a><h2>DESCRIPTION</h2>
+<a name="id2618866"></a><h2>DESCRIPTION</h2>
 <p><span><strong class="command">dnssec-keygen</strong></span>
       generates keys for DNSSEC (Secure DNS), as defined in RFC 2535
       and RFC 4034.  It can also generate keys for use with
@@ -64,7 +64,7 @@
     </p>
 </div>
 <div class="refsect1" lang="en">
-<a name="id2618945"></a><h2>OPTIONS</h2>
+<a name="id2618886"></a><h2>OPTIONS</h2>
 <div class="variablelist"><dl>
 <dt><span class="term">-a <em class="replaceable"><code>algorithm</code></em></span></dt>
 <dd>
@@ -280,7 +280,7 @@
 </dl></div>
 </div>
 <div class="refsect1" lang="en">
-<a name="id2671645"></a><h2>TIMING OPTIONS</h2>
+<a name="id2671655"></a><h2>TIMING OPTIONS</h2>
 <p>
       Dates can be expressed in the format YYYYMMDD or YYYYMMDDHHMMSS.
       If the argument begins with a '+' or '-', it is interpreted as
@@ -354,7 +354,7 @@
 </dl></div>
 </div>
 <div class="refsect1" lang="en">
-<a name="id2671835"></a><h2>GENERATED KEYS</h2>
+<a name="id2671845"></a><h2>GENERATED KEYS</h2>
 <p>
       When <span><strong class="command">dnssec-keygen</strong></span> completes
       successfully,
@@ -400,7 +400,7 @@
     </p>
 </div>
 <div class="refsect1" lang="en">
-<a name="id2672080"></a><h2>EXAMPLE</h2>
+<a name="id2672089"></a><h2>EXAMPLE</h2>
 <p>
       To generate a 768-bit DSA key for the domain
       <strong class="userinput"><code>example.com</code></strong>, the following command would be
@@ -421,7 +421,7 @@
     </p>
 </div>
 <div class="refsect1" lang="en">
-<a name="id2672136"></a><h2>SEE ALSO</h2>
+<a name="id2672146"></a><h2>SEE ALSO</h2>
 <p><span class="citerefentry"><span class="refentrytitle">dnssec-signzone</span>(8)</span>,
       <em class="citetitle">BIND 9 Administrator Reference Manual</em>,
       <em class="citetitle">RFC 2539</em>,
@@ -430,7 +430,7 @@
     </p>
 </div>
 <div class="refsect1" lang="en">
-<a name="id2672167"></a><h2>AUTHOR</h2>
+<a name="id2672177"></a><h2>AUTHOR</h2>
 <p><span class="corpauthor">Internet Systems Consortium</span>
     </p>
 </div>
@@ -454,6 +454,6 @@
 </tr>
 </table>
 </div>
-<p style="text-align: center;">BIND 9.9.8-P2 (Extended Support Version)</p>
+<p style="text-align: center;">BIND 9.9.8-P3 (Extended Support Version)</p>
 </body>
 </html>

Modified: vendor/bind9/dist/doc/arm/man.dnssec-revoke.html
==============================================================================
--- vendor/bind9/dist/doc/arm/man.dnssec-revoke.html	Wed Jan 20 07:21:33 2016	(r294373)
+++ vendor/bind9/dist/doc/arm/man.dnssec-revoke.html	Wed Jan 20 07:27:07 2016	(r294374)
@@ -50,7 +50,7 @@
 <div class="cmdsynopsis"><p><code class="command">dnssec-revoke</code>  [<code class="option">-hr</code>] [<code class="option">-v <em class="replaceable"><code>level</code></em></code>] [<code class="option">-V</code>] [<code class="option">-K <em class="replaceable"><code>directory</code></em></code>] [<code class="option">-E <em class="replaceable"><code>engine</code></em></code>] [<code class="option">-f</code>] [<code class="option">-R</code>] {keyfile}</p></div>
 </div>
 <div class="refsect1" lang="en">
-<a name="id2619238"></a><h2>DESCRIPTION</h2>
+<a name="id2619384"></a><h2>DESCRIPTION</h2>
 <p><span><strong class="command">dnssec-revoke</strong></span>
       reads a DNSSEC key file, sets the REVOKED bit on the key as defined
       in RFC 5011, and creates a new pair of key files containing the
@@ -58,7 +58,7 @@
     </p>
 </div>
 <div class="refsect1" lang="en">
-<a name="id2619252"></a><h2>OPTIONS</h2>
+<a name="id2619398"></a><h2>OPTIONS</h2>
 <div class="variablelist"><dl>
 <dt><span class="term">-h</span></dt>
 <dd><p>
@@ -100,14 +100,14 @@
 </dl></div>
 </div>
 <div class="refsect1" lang="en">
-<a name="id2619386"></a><h2>SEE ALSO</h2>
+<a name="id2619737"></a><h2>SEE ALSO</h2>
 <p><span class="citerefentry"><span class="refentrytitle">dnssec-keygen</span>(8)</span>,
       <em class="citetitle">BIND 9 Administrator Reference Manual</em>,
       <em class="citetitle">RFC 5011</em>.
     </p>
 </div>
 <div class="refsect1" lang="en">
-<a name="id2619411"></a><h2>AUTHOR</h2>
+<a name="id2619762"></a><h2>AUTHOR</h2>
 <p><span class="corpauthor">Internet Systems Consortium</span>
     </p>
 </div>
@@ -131,6 +131,6 @@
 </tr>
 </table>
 </div>
-<p style="text-align: center;">BIND 9.9.8-P2 (Extended Support Version)</p>
+<p style="text-align: center;">BIND 9.9.8-P3 (Extended Support Version)</p>
 </body>
 </html>

Modified: vendor/bind9/dist/doc/arm/man.dnssec-settime.html
==============================================================================
--- vendor/bind9/dist/doc/arm/man.dnssec-settime.html	Wed Jan 20 07:21:33 2016	(r294373)
+++ vendor/bind9/dist/doc/arm/man.dnssec-settime.html	Wed Jan 20 07:27:07 2016	(r294374)
@@ -50,7 +50,7 @@
 <div class="cmdsynopsis"><p><code class="command">dnssec-settime</code>  [<code class="option">-f</code>] [<code class="option">-K <em class="replaceable"><code>directory</code></em></code>] [<code class="option">-L <em class="replaceable"><code>ttl</code></em></code>] [<code class="option">-P <em class="replaceable"><code>date/offset</code></em></code>] [<code class="option">-A <em class="replaceable"><code>date/offset</code></em></code>] [<code class="option">-R <em class="replaceable"><code>date/offset</code></em></code>] [<code class="option">-I <em class="replaceable"><code>date/offset</code></em></code>] [<code class="option">-D <em class="replaceable"><code>date/offset</code></em></code>] [<code class="option">-h</code>] [<code class="option">-V</code>] [<code class="option">-v <em class="replaceable"><code>level</code></em></code>] [<code class="option">-E <em class="replaceable"><code>engine</code></em></code>] {keyfile}</p></div>
 </div>
 <div class="refsect1" lang="en">
-<a name="id2619597"></a><h2>DESCRIPTION</h2>
+<a name="id2620358"></a><h2>DESCRIPTION</h2>
 <p><span><strong class="command">dnssec-settime</strong></span>
       reads a DNSSEC private key file and sets the key timing metadata
       as specified by the <code class="option">-P</code>, <code class="option">-A</code>,
@@ -76,7 +76,7 @@
     </p>
 </div>
 <div class="refsect1" lang="en">
-<a name="id2619656"></a><h2>OPTIONS</h2>
+<a name="id2620485"></a><h2>OPTIONS</h2>
 <div class="variablelist"><dl>
 <dt><span class="term">-f</span></dt>
 <dd><p>
@@ -124,7 +124,7 @@
 </dl></div>
 </div>
 <div class="refsect1" lang="en">
-<a name="id2619929"></a><h2>TIMING OPTIONS</h2>
+<a name="id2620621"></a><h2>TIMING OPTIONS</h2>
 <p>
       Dates can be expressed in the format YYYYMMDD or YYYYMMDDHHMMSS.
       If the argument begins with a '+' or '-', it is interpreted as
@@ -203,7 +203,7 @@
 </dl></div>
 </div>
 <div class="refsect1" lang="en">
-<a name="id2620546"></a><h2>PRINTING OPTIONS</h2>
+<a name="id2622125"></a><h2>PRINTING OPTIONS</h2>
 <p>
       <span><strong class="command">dnssec-settime</strong></span> can also be used to print the
       timing metadata associated with a key.
@@ -229,7 +229,7 @@
 </dl></div>
 </div>
 <div class="refsect1" lang="en">
-<a name="id2635303"></a><h2>SEE ALSO</h2>
+<a name="id2635586"></a><h2>SEE ALSO</h2>
 <p><span class="citerefentry"><span class="refentrytitle">dnssec-keygen</span>(8)</span>,
       <span class="citerefentry"><span class="refentrytitle">dnssec-signzone</span>(8)</span>,
       <em class="citetitle">BIND 9 Administrator Reference Manual</em>,
@@ -237,7 +237,7 @@
     </p>
 </div>
 <div class="refsect1" lang="en">
-<a name="id2635336"></a><h2>AUTHOR</h2>
+<a name="id2635619"></a><h2>AUTHOR</h2>
 <p><span class="corpauthor">Internet Systems Consortium</span>
     </p>
 </div>
@@ -261,6 +261,6 @@
 </tr>
 </table>
 </div>
-<p style="text-align: center;">BIND 9.9.8-P2 (Extended Support Version)</p>
+<p style="text-align: center;">BIND 9.9.8-P3 (Extended Support Version)</p>
 </body>
 </html>

Modified: vendor/bind9/dist/doc/arm/man.dnssec-signzone.html
==============================================================================
--- vendor/bind9/dist/doc/arm/man.dnssec-signzone.html	Wed Jan 20 07:21:33 2016	(r294373)
+++ vendor/bind9/dist/doc/arm/man.dnssec-signzone.html	Wed Jan 20 07:27:07 2016	(r294374)
@@ -50,7 +50,7 @@

*** DIFF OUTPUT TRUNCATED AT 1000 LINES ***

From owner-svn-src-all@freebsd.org  Wed Jan 20 07:28:12 2016
Return-Path: <owner-svn-src-all@freebsd.org>
Delivered-To: svn-src-all@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id 437C2A892B2;
 Wed, 20 Jan 2016 07:28:12 +0000 (UTC)
 (envelope-from delphij@FreeBSD.org)
Received: from repo.freebsd.org (repo.freebsd.org
 [IPv6:2610:1c1:1:6068::e6a:0])
 (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
 (Client did not present a certificate)
 by mx1.freebsd.org (Postfix) with ESMTPS id F06D512D6;
 Wed, 20 Jan 2016 07:28:11 +0000 (UTC)
 (envelope-from delphij@FreeBSD.org)
Received: from repo.freebsd.org ([127.0.1.37])
 by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u0K7SBaU018239;
 Wed, 20 Jan 2016 07:28:11 GMT (envelope-from delphij@FreeBSD.org)
Received: (from delphij@localhost)
 by repo.freebsd.org (8.15.2/8.15.2/Submit) id u0K7SAnL018238;
 Wed, 20 Jan 2016 07:28:11 GMT (envelope-from delphij@FreeBSD.org)
Message-Id: <201601200728.u0K7SAnL018238@repo.freebsd.org>
X-Authentication-Warning: repo.freebsd.org: delphij set sender to
 delphij@FreeBSD.org using -f
From: Xin LI <delphij@FreeBSD.org>
Date: Wed, 20 Jan 2016 07:28:10 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-vendor@freebsd.org
Subject: svn commit: r294375 - vendor/bind9/9.9.8-P3
X-SVN-Group: vendor
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.20
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for &quot;
 user&quot; and &quot; projects&quot; \)" <svn-src-all.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-all/>
List-Post: <mailto:svn-src-all@freebsd.org>
List-Help: <mailto:svn-src-all-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Wed, 20 Jan 2016 07:28:12 -0000

Author: delphij
Date: Wed Jan 20 07:28:10 2016
New Revision: 294375
URL: https://svnweb.freebsd.org/changeset/base/294375

Log:
  Tag the BIND 9.9.8-P3 release.

Added:
  vendor/bind9/9.9.8-P3/
     - copied from r294374, vendor/bind9/dist/

From owner-svn-src-all@freebsd.org  Wed Jan 20 07:33:47 2016
Return-Path: <owner-svn-src-all@freebsd.org>
Delivered-To: svn-src-all@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4EC6BA89610;
 Wed, 20 Jan 2016 07:33:47 +0000 (UTC)
 (envelope-from delphij@FreeBSD.org)
Received: from repo.freebsd.org (repo.freebsd.org
 [IPv6:2610:1c1:1:6068::e6a:0])
 (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
 (Client did not present a certificate)
 by mx1.freebsd.org (Postfix) with ESMTPS id 01C301893;
 Wed, 20 Jan 2016 07:33:46 +0000 (UTC)
 (envelope-from delphij@FreeBSD.org)
Received: from repo.freebsd.org ([127.0.1.37])
 by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u0K7XjUB021031;
 Wed, 20 Jan 2016 07:33:45 GMT (envelope-from delphij@FreeBSD.org)
Received: (from delphij@localhost)
 by repo.freebsd.org (8.15.2/8.15.2/Submit) id u0K7XjDT021030;
 Wed, 20 Jan 2016 07:33:45 GMT (envelope-from delphij@FreeBSD.org)
Message-Id: <201601200733.u0K7XjDT021030@repo.freebsd.org>
X-Authentication-Warning: repo.freebsd.org: delphij set sender to
 delphij@FreeBSD.org using -f
From: Xin LI <delphij@FreeBSD.org>
Date: Wed, 20 Jan 2016 07:33:45 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org
Subject: svn commit: r294376 - stable/9/contrib/bind9
X-SVN-Group: stable-9
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.20
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for &quot;
 user&quot; and &quot; projects&quot; \)" <svn-src-all.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-all/>
List-Post: <mailto:svn-src-all@freebsd.org>
List-Help: <mailto:svn-src-all-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Wed, 20 Jan 2016 07:33:47 -0000

Author: delphij
Date: Wed Jan 20 07:33:45 2016
New Revision: 294376
URL: https://svnweb.freebsd.org/changeset/base/294376

Log:
  Mergeinfo fixup.

Modified:
Directory Properties:
  stable/9/contrib/bind9/   (props changed)

From owner-svn-src-all@freebsd.org  Wed Jan 20 07:42:33 2016
Return-Path: <owner-svn-src-all@freebsd.org>
Delivered-To: svn-src-all@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id E9543A899FB;
 Wed, 20 Jan 2016 07:42:32 +0000 (UTC)
 (envelope-from arybchik@FreeBSD.org)
Received: from repo.freebsd.org (repo.freebsd.org
 [IPv6:2610:1c1:1:6068::e6a:0])
 (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
 (Client did not present a certificate)
 by mx1.freebsd.org (Postfix) with ESMTPS id B3A3C1D54;
 Wed, 20 Jan 2016 07:42:32 +0000 (UTC)
 (envelope-from arybchik@FreeBSD.org)
Received: from repo.freebsd.org ([127.0.1.37])
 by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u0K7gVS2023955;
 Wed, 20 Jan 2016 07:42:31 GMT (envelope-from arybchik@FreeBSD.org)
Received: (from arybchik@localhost)
 by repo.freebsd.org (8.15.2/8.15.2/Submit) id u0K7gVJQ023948;
 Wed, 20 Jan 2016 07:42:31 GMT (envelope-from arybchik@FreeBSD.org)
Message-Id: <201601200742.u0K7gVJQ023948@repo.freebsd.org>
X-Authentication-Warning: repo.freebsd.org: arybchik set sender to
 arybchik@FreeBSD.org using -f
From: Andrew Rybchenko <arybchik@FreeBSD.org>
Date: Wed, 20 Jan 2016 07:42:31 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org
Subject: svn commit: r294377 - stable/10/sys/dev/sfxge/common
X-SVN-Group: stable-10
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.20
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for &quot;
 user&quot; and &quot; projects&quot; \)" <svn-src-all.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-all/>
List-Post: <mailto:svn-src-all@freebsd.org>
List-Help: <mailto:svn-src-all-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Wed, 20 Jan 2016 07:42:33 -0000

Author: arybchik
Date: Wed Jan 20 07:42:31 2016
New Revision: 294377
URL: https://svnweb.freebsd.org/changeset/base/294377

Log:
  MFC r293887
  
  sfxge: add Medford NIC methods
  
  Submitted by:   Mark Spender <mspender at solarflare.com>
  Reviewed by:    gnn
  Sponsored by:   Solarflare Communications, Inc.

Modified:
  stable/10/sys/dev/sfxge/common/ef10_impl.h
  stable/10/sys/dev/sfxge/common/efx_impl.h
  stable/10/sys/dev/sfxge/common/efx_nic.c
  stable/10/sys/dev/sfxge/common/hunt_impl.h
  stable/10/sys/dev/sfxge/common/hunt_nic.c
  stable/10/sys/dev/sfxge/common/medford_impl.h
  stable/10/sys/dev/sfxge/common/medford_nic.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/sys/dev/sfxge/common/ef10_impl.h
==============================================================================
--- stable/10/sys/dev/sfxge/common/ef10_impl.h	Wed Jan 20 07:33:45 2016	(r294376)
+++ stable/10/sys/dev/sfxge/common/ef10_impl.h	Wed Jan 20 07:42:31 2016	(r294377)
@@ -45,6 +45,47 @@ extern "C" {
 #define	EF10_MAX_PIOBUF_NBUFS	MEDFORD_PIOBUF_NBUFS
 #endif
 
+extern	__checkReturn	efx_rc_t
+efx_mcdi_get_port_assignment(
+	__in		efx_nic_t *enp,
+	__out		uint32_t *portp);
+
+extern	__checkReturn	efx_rc_t
+efx_mcdi_get_port_modes(
+	__in		efx_nic_t *enp,
+	__out		uint32_t *modesp);
+
+extern	__checkReturn	efx_rc_t
+efx_mcdi_get_mac_address_pf(
+	__in			efx_nic_t *enp,
+	__out_ecount_opt(6)	uint8_t mac_addrp[6]);
+
+extern	__checkReturn	efx_rc_t
+efx_mcdi_get_mac_address_vf(
+	__in			efx_nic_t *enp,
+	__out_ecount_opt(6)	uint8_t mac_addrp[6]);
+
+extern	__checkReturn	efx_rc_t
+efx_mcdi_get_clock(
+	__in		efx_nic_t *enp,
+	__out		uint32_t *sys_freqp);
+
+extern	__checkReturn	efx_rc_t
+efx_mcdi_get_vector_cfg(
+	__in		efx_nic_t *enp,
+	__out_opt	uint32_t *vec_basep,
+	__out_opt	uint32_t *pf_nvecp,
+	__out_opt	uint32_t *vf_nvecp);
+
+extern	__checkReturn	efx_rc_t
+ef10_get_datapath_caps(
+	__in		efx_nic_t *enp);
+
+extern	__checkReturn	efx_rc_t
+ef10_external_port_mapping(
+	__in		efx_nic_t *enp,
+	__in		uint32_t port,
+	__out		uint8_t *external_portp);
 
 
 #ifdef	__cplusplus

Modified: stable/10/sys/dev/sfxge/common/efx_impl.h
==============================================================================
--- stable/10/sys/dev/sfxge/common/efx_impl.h	Wed Jan 20 07:33:45 2016	(r294376)
+++ stable/10/sys/dev/sfxge/common/efx_impl.h	Wed Jan 20 07:42:31 2016	(r294377)
@@ -358,6 +358,7 @@ typedef struct efx_intr_s {
 
 typedef struct efx_nic_ops_s {
 	efx_rc_t	(*eno_probe)(efx_nic_t *);
+	efx_rc_t	(*eno_board_cfg)(efx_nic_t *);
 	efx_rc_t	(*eno_set_drv_limits)(efx_nic_t *, efx_drv_limits_t*);
 	efx_rc_t	(*eno_reset)(efx_nic_t *);
 	efx_rc_t	(*eno_init)(efx_nic_t *);

Modified: stable/10/sys/dev/sfxge/common/efx_nic.c
==============================================================================
--- stable/10/sys/dev/sfxge/common/efx_nic.c	Wed Jan 20 07:33:45 2016	(r294376)
+++ stable/10/sys/dev/sfxge/common/efx_nic.c	Wed Jan 20 07:42:31 2016	(r294377)
@@ -244,6 +244,7 @@ fail1:
 
 static efx_nic_ops_t	__efx_nic_falcon_ops = {
 	falcon_nic_probe,		/* eno_probe */
+	NULL,				/* eno_board_cfg */
 	NULL,				/* eno_set_drv_limits */
 	falcon_nic_reset,		/* eno_reset */
 	falcon_nic_init,		/* eno_init */
@@ -263,6 +264,7 @@ static efx_nic_ops_t	__efx_nic_falcon_op
 
 static efx_nic_ops_t	__efx_nic_siena_ops = {
 	siena_nic_probe,		/* eno_probe */
+	NULL,				/* eno_board_cfg */
 	NULL,				/* eno_set_drv_limits */
 	siena_nic_reset,		/* eno_reset */
 	siena_nic_init,			/* eno_init */
@@ -282,6 +284,7 @@ static efx_nic_ops_t	__efx_nic_siena_ops
 
 static efx_nic_ops_t	__efx_nic_hunt_ops = {
 	ef10_nic_probe,			/* eno_probe */
+	hunt_board_cfg,			/* eno_board_cfg */
 	ef10_nic_set_drv_limits,	/* eno_set_drv_limits */
 	ef10_nic_reset,			/* eno_reset */
 	ef10_nic_init,			/* eno_init */
@@ -297,6 +300,27 @@ static efx_nic_ops_t	__efx_nic_hunt_ops 
 
 #endif	/* EFSYS_OPT_HUNTINGTON */
 
+#if EFSYS_OPT_MEDFORD
+
+static efx_nic_ops_t	__efx_nic_medford_ops = {
+	ef10_nic_probe,			/* eno_probe */
+	medford_board_cfg,		/* eno_board_cfg */
+	ef10_nic_set_drv_limits,	/* eno_set_drv_limits */
+	ef10_nic_reset,			/* eno_reset */
+	ef10_nic_init,			/* eno_init */
+	ef10_nic_get_vi_pool,		/* eno_get_vi_pool */
+	ef10_nic_get_bar_region,	/* eno_get_bar_region */
+#if EFSYS_OPT_DIAG
+	ef10_sram_test,			/* eno_sram_test */
+	ef10_nic_register_test,		/* eno_register_test */
+#endif	/* EFSYS_OPT_DIAG */
+	ef10_nic_fini,			/* eno_fini */
+	ef10_nic_unprobe,		/* eno_unprobe */
+};
+
+#endif	/* EFSYS_OPT_MEDFORD */
+
+
 	__checkReturn	efx_rc_t
 efx_nic_create(
 	__in		efx_family_t family,
@@ -361,6 +385,24 @@ efx_nic_create(
 		break;
 #endif	/* EFSYS_OPT_HUNTINGTON */
 
+#if EFSYS_OPT_MEDFORD
+	case EFX_FAMILY_MEDFORD:
+		enp->en_enop = (efx_nic_ops_t *)&__efx_nic_medford_ops;
+		/*
+		 * FW_ASSISTED_TSO ommitted as Medford only supports firmware
+		 * assisted TSO version 2, not the v1 scheme used on Huntington.
+		 */
+		enp->en_features =
+		    EFX_FEATURE_IPV6 |
+		    EFX_FEATURE_LINK_EVENTS |
+		    EFX_FEATURE_PERIODIC_MAC_STATS |
+		    EFX_FEATURE_MCDI |
+		    EFX_FEATURE_MAC_HEADER_FILTERS |
+		    EFX_FEATURE_MCDI_DMA |
+		    EFX_FEATURE_PIO_BUFFERS;
+		break;
+#endif	/* EFSYS_OPT_MEDFORD */
+
 	default:
 		rc = ENOTSUP;
 		goto fail2;

Modified: stable/10/sys/dev/sfxge/common/hunt_impl.h
==============================================================================
--- stable/10/sys/dev/sfxge/common/hunt_impl.h	Wed Jan 20 07:33:45 2016	(r294376)
+++ stable/10/sys/dev/sfxge/common/hunt_impl.h	Wed Jan 20 07:42:31 2016	(r294377)
@@ -54,6 +54,13 @@ extern "C" {
  */
 #define	EF10_RX_WPTR_ALIGN 8
 
+/*
+ * Max byte offset into the packet the TCP header must start for the hardware
+ * to be able to parse the packet correctly.
+ * FIXME: Move to ef10_impl.h when it is included in all driver builds.
+ */
+#define	EF10_TCP_HEADER_OFFSET_LIMIT	208
+
 /* Invalid RSS context handle */
 #define	EF10_RSS_CONTEXT_INVALID	(0xffffffff)
 
@@ -165,6 +172,10 @@ ef10_nic_probe(
 	__in		efx_nic_t *enp);
 
 extern	__checkReturn	efx_rc_t
+hunt_board_cfg(
+	__in		efx_nic_t *enp);
+
+extern	__checkReturn	efx_rc_t
 ef10_nic_set_drv_limits(
 	__inout		efx_nic_t *enp,
 	__in		efx_drv_limits_t *edlp);

Modified: stable/10/sys/dev/sfxge/common/hunt_nic.c
==============================================================================
--- stable/10/sys/dev/sfxge/common/hunt_nic.c	Wed Jan 20 07:33:45 2016	(r294376)
+++ stable/10/sys/dev/sfxge/common/hunt_nic.c	Wed Jan 20 07:42:31 2016	(r294377)
@@ -41,7 +41,7 @@ __FBSDID("$FreeBSD$");
 
 #include "ef10_tlv_layout.h"
 
-static	__checkReturn	efx_rc_t
+	__checkReturn	efx_rc_t
 efx_mcdi_get_port_assignment(
 	__in		efx_nic_t *enp,
 	__out		uint32_t *portp)
@@ -85,7 +85,7 @@ fail1:
 	return (rc);
 }
 
-static	__checkReturn	efx_rc_t
+	__checkReturn	efx_rc_t
 efx_mcdi_get_port_modes(
 	__in		efx_nic_t *enp,
 	__out		uint32_t *modesp)
@@ -205,7 +205,7 @@ fail1:
 	return (rc);
 }
 
-static	__checkReturn	efx_rc_t
+	__checkReturn	efx_rc_t
 efx_mcdi_get_mac_address_pf(
 	__in			efx_nic_t *enp,
 	__out_ecount_opt(6)	uint8_t mac_addrp[6])
@@ -263,7 +263,7 @@ fail1:
 	return (rc);
 }
 
-static	__checkReturn	efx_rc_t
+	__checkReturn	efx_rc_t
 efx_mcdi_get_mac_address_vf(
 	__in			efx_nic_t *enp,
 	__out_ecount_opt(6)	uint8_t mac_addrp[6])
@@ -326,7 +326,7 @@ fail1:
 	return (rc);
 }
 
-static	__checkReturn	efx_rc_t
+	__checkReturn	efx_rc_t
 efx_mcdi_get_clock(
 	__in		efx_nic_t *enp,
 	__out		uint32_t *sys_freqp)
@@ -376,7 +376,7 @@ fail1:
 	return (rc);
 }
 
-static 	__checkReturn	efx_rc_t
+	__checkReturn	efx_rc_t
 efx_mcdi_get_vector_cfg(
 	__in		efx_nic_t *enp,
 	__out_opt	uint32_t *vec_basep,
@@ -889,7 +889,7 @@ ef10_nic_pio_unlink(
 	return (efx_mcdi_unlink_piobuf(enp, vi_index));
 }
 
-static	__checkReturn	efx_rc_t
+	__checkReturn	efx_rc_t
 ef10_get_datapath_caps(
 	__in		efx_nic_t *enp)
 {
@@ -992,6 +992,13 @@ static struct {
 		(1 << TLV_PORT_MODE_10G_10G_10G_10G),
 		1
 	},
+	{
+		EFX_FAMILY_MEDFORD,
+		(1 << TLV_PORT_MODE_10G) |
+		(1 << TLV_PORT_MODE_10G_10G) |
+		(1 << TLV_PORT_MODE_10G_10G_10G_10G),
+		1
+	},
 	/* Supported modes requiring 2 outputs per port */
 	{
 		EFX_FAMILY_HUNTINGTON,
@@ -1000,18 +1007,25 @@ static struct {
 		(1 << TLV_PORT_MODE_40G_10G_10G) |
 		(1 << TLV_PORT_MODE_10G_10G_40G),
 		2
-	}
-	/*
-	 * NOTE: Medford modes will require 4 outputs per port:
-	 *	TLV_PORT_MODE_10G_10G_10G_10G_Q
-	 *	TLV_PORT_MODE_10G_10G_10G_10G_Q2
-	 * The Q2 mode routes outputs to external port 2. Support for this
-	 * will require a new field specifying the number to add after
-	 * scaling by stride. This is fixed at 1 currently.
-	 */
+	},
+	{
+		EFX_FAMILY_MEDFORD,
+		(1 << TLV_PORT_MODE_40G) |
+		(1 << TLV_PORT_MODE_40G_40G) |
+		(1 << TLV_PORT_MODE_40G_10G_10G) |
+		(1 << TLV_PORT_MODE_10G_10G_40G),
+		2
+	},
+	/* Supported modes requiring 4 outputs per port */
+	{
+		EFX_FAMILY_MEDFORD,
+		(1 << TLV_PORT_MODE_10G_10G_10G_10G_Q) |
+		(1 << TLV_PORT_MODE_10G_10G_10G_10G_Q2),
+		4
+	},
 };
 
-static	__checkReturn	efx_rc_t
+	__checkReturn	efx_rc_t
 ef10_external_port_mapping(
 	__in		efx_nic_t *enp,
 	__in		uint32_t port,
@@ -1064,7 +1078,7 @@ fail1:
 	return (rc);
 }
 
-static	__checkReturn	efx_rc_t
+	__checkReturn	efx_rc_t
 hunt_board_cfg(
 	__in		efx_nic_t *enp)
 {
@@ -1320,7 +1334,7 @@ hunt_board_cfg(
 	 * Maximum number of bytes into the frame the TCP header can start for
 	 * firmware assisted TSO to work.
 	 */
-	encp->enc_tx_tso_tcp_header_offset_limit = 208;
+	encp->enc_tx_tso_tcp_header_offset_limit = EF10_TCP_HEADER_OFFSET_LIMIT;
 
 	return (0);
 
@@ -1361,6 +1375,7 @@ fail1:
 ef10_nic_probe(
 	__in		efx_nic_t *enp)
 {
+	efx_nic_ops_t *enop = enp->en_enop;
 	efx_nic_cfg_t *encp = &(enp->en_nic_cfg);
 	efx_drv_cfg_t *edcp = &(enp->en_drv_cfg);
 	efx_rc_t rc;
@@ -1380,7 +1395,7 @@ ef10_nic_probe(
 	if ((rc = efx_mcdi_drv_attach(enp, B_TRUE)) != 0)
 		goto fail3;
 
-	if ((rc = hunt_board_cfg(enp)) != 0)
+	if ((rc = enop->eno_board_cfg(enp)) != 0)
 		if (rc != EACCES)
 			goto fail4;
 

Modified: stable/10/sys/dev/sfxge/common/medford_impl.h
==============================================================================
--- stable/10/sys/dev/sfxge/common/medford_impl.h	Wed Jan 20 07:33:45 2016	(r294376)
+++ stable/10/sys/dev/sfxge/common/medford_impl.h	Wed Jan 20 07:42:31 2016	(r294377)
@@ -37,7 +37,29 @@
 extern "C" {
 #endif
 
+/* Alignment requirement for value written to RX WPTR:
+ *  the WPTR must be aligned to an 8 descriptor boundary
+ *
+ * FIXME: Is this the same on Medford as Huntington?
+ */
+#define	MEDFORD_RX_WPTR_ALIGN	8
+
+
+
+#ifndef	ER_EZ_TX_PIOBUF_SIZE
+#define	ER_EZ_TX_PIOBUF_SIZE	4096
+#endif
+
+
 #define	MEDFORD_PIOBUF_NBUFS	(16)
+#define	MEDFORD_PIOBUF_SIZE	(ER_EZ_TX_PIOBUF_SIZE)
+
+#define	MEDFORD_MIN_PIO_ALLOC_SIZE	(MEDFORD_PIOBUF_SIZE / 32)
+
+
+extern	__checkReturn	efx_rc_t
+medford_board_cfg(
+	__in		efx_nic_t *enp);
 
 
 #ifdef	__cplusplus

Modified: stable/10/sys/dev/sfxge/common/medford_nic.c
==============================================================================
--- stable/10/sys/dev/sfxge/common/medford_nic.c	Wed Jan 20 07:33:45 2016	(r294376)
+++ stable/10/sys/dev/sfxge/common/medford_nic.c	Wed Jan 20 07:42:31 2016	(r294377)
@@ -39,7 +39,205 @@ __FBSDID("$FreeBSD$");
 
 #include "ef10_tlv_layout.h"
 
+	__checkReturn	efx_rc_t
+medford_board_cfg(
+	__in		efx_nic_t *enp)
+{
+	efx_mcdi_iface_t *emip = &(enp->en_mcdi.em_emip);
+	efx_nic_cfg_t *encp = &(enp->en_nic_cfg);
+	uint8_t mac_addr[6] = { 0 };
+	uint32_t board_type = 0;
+	hunt_link_state_t hls;
+	efx_port_t *epp = &(enp->en_port);
+	uint32_t port;
+	uint32_t pf;
+	uint32_t vf;
+	uint32_t mask;
+	uint32_t flags;
+	uint32_t sysclk;
+	uint32_t base, nvec;
+	efx_rc_t rc;
 
+	/*
+	 * FIXME: Likely to be incomplete and incorrect.
+	 * Parts of this should be shared with Huntington.
+	 */
 
+	if ((rc = efx_mcdi_get_port_assignment(enp, &port)) != 0)
+		goto fail1;
+
+	/*
+	 * NOTE: The MCDI protocol numbers ports from zero.
+	 * The common code MCDI interface numbers ports from one.
+	 */
+	emip->emi_port = port + 1;
+
+	if ((rc = ef10_external_port_mapping(enp, port,
+		    &encp->enc_external_port)) != 0)
+		goto fail2;
+
+	/*
+	 * Get PCIe function number from firmware (used for
+	 * per-function privilege and dynamic config info).
+	 *  - PCIe PF: pf = PF number, vf = 0xffff.
+	 *  - PCIe VF: pf = parent PF, vf = VF number.
+	 */
+	if ((rc = efx_mcdi_get_function_info(enp, &pf, &vf)) != 0)
+		goto fail3;
+
+	encp->enc_pf = pf;
+	encp->enc_vf = vf;
+
+	/* MAC address for this function */
+	if (EFX_PCI_FUNCTION_IS_PF(encp)) {
+		rc = efx_mcdi_get_mac_address_pf(enp, mac_addr);
+		if ((rc == 0) && (mac_addr[0] & 0x02)) {
+			/*
+			 * If the static config does not include a global MAC
+			 * address pool then the board may return a locally
+			 * administered MAC address (this should only happen on
+			 * incorrectly programmed boards).
+			 */
+			rc = EINVAL;
+		}
+	} else {
+		rc = efx_mcdi_get_mac_address_vf(enp, mac_addr);
+	}
+	if (rc != 0)
+		goto fail4;
+
+	EFX_MAC_ADDR_COPY(encp->enc_mac_addr, mac_addr);
+
+	/* Board configuration */
+	rc = efx_mcdi_get_board_cfg(enp, &board_type, NULL, NULL);
+	if (rc != 0) {
+		/* Unprivileged functions may not be able to read board cfg */
+		if (rc == EACCES)
+			board_type = 0;
+		else
+			goto fail5;
+	}
+
+	encp->enc_board_type = board_type;
+	encp->enc_clk_mult = 1; /* not used for Medford */
+
+	/* Fill out fields in enp->en_port and enp->en_nic_cfg from MCDI */
+	if ((rc = efx_mcdi_get_phy_cfg(enp)) != 0)
+		goto fail6;
+
+	/* Obtain the default PHY advertised capabilities */
+	if ((rc = hunt_phy_get_link(enp, &hls)) != 0)
+		goto fail7;
+	epp->ep_default_adv_cap_mask = hls.hls_adv_cap_mask;
+	epp->ep_adv_cap_mask = hls.hls_adv_cap_mask;
+
+	if (EFX_PCI_FUNCTION_IS_VF(encp)) {
+		/*
+		 * Interrupt testing does not work for VFs. See bug50084.
+		 * FIXME: Does this still  apply to Medford?
+		 */
+		encp->enc_bug41750_workaround = B_TRUE;
+	}
+
+	/* Chained multicast is always enabled on Medford */
+	encp->enc_bug26807_workaround = B_TRUE;
+
+	/* Get sysclk frequency (in MHz). */
+	if ((rc = efx_mcdi_get_clock(enp, &sysclk)) != 0)
+		goto fail8;
+
+	/*
+	 * The timer quantum is 1536 sysclk cycles, documented for the
+	 * EV_TMR_VAL field of EV_TIMER_TBL. Scale for MHz and ns units.
+	 */
+	encp->enc_evq_timer_quantum_ns = 1536000UL / sysclk; /* 1536 cycles */
+	encp->enc_evq_timer_max_us = (encp->enc_evq_timer_quantum_ns <<
+		    FRF_CZ_TC_TIMER_VAL_WIDTH) / 1000;
+
+	/* Check capabilities of running datapath firmware */
+	if ((rc = ef10_get_datapath_caps(enp)) != 0)
+	    goto fail9;
+
+	/* Alignment for receive packet DMA buffers */
+	encp->enc_rx_buf_align_start = 1;
+
+	/* FIXME: RX DMA end padding is configurable on Medford */
+	encp->enc_rx_buf_align_end = 64;
+
+	/* Alignment for WPTR updates */
+	encp->enc_rx_push_align = EF10_RX_WPTR_ALIGN;
+
+	/*
+	 * Set resource limits for MC_CMD_ALLOC_VIS. Note that we cannot use
+	 * MC_CMD_GET_RESOURCE_LIMITS here as that reports the available
+	 * resources (allocated to this PCIe function), which is zero until
+	 * after we have allocated VIs.
+	 */
+	encp->enc_evq_limit = 1024;
+	encp->enc_rxq_limit = EFX_RXQ_LIMIT_TARGET;
+	encp->enc_txq_limit = EFX_TXQ_LIMIT_TARGET;
+
+	encp->enc_buftbl_limit = 0xFFFFFFFF;
+
+	encp->enc_piobuf_limit = MEDFORD_PIOBUF_NBUFS;
+	encp->enc_piobuf_size = MEDFORD_PIOBUF_SIZE;
+	encp->enc_piobuf_min_alloc_size = MEDFORD_MIN_PIO_ALLOC_SIZE;
+
+	/*
+	 * Get the current privilege mask. Note that this may be modified
+	 * dynamically, so this value is informational only. DO NOT use
+	 * the privilege mask to check for sufficient privileges, as that
+	 * can result in time-of-check/time-of-use bugs.
+	 */
+	if ((rc = efx_mcdi_privilege_mask(enp, pf, vf, &mask)) != 0)
+		goto fail10;
+
+	encp->enc_privilege_mask = mask;
+
+	/* Get interrupt vector limits */
+	if ((rc = efx_mcdi_get_vector_cfg(enp, &base, &nvec, NULL)) != 0) {
+		if (EFX_PCI_FUNCTION_IS_PF(encp))
+			goto fail11;
+
+		/* Ignore error (cannot query vector limits from a VF). */
+		base = 0;
+		nvec = 1024;
+	}
+	encp->enc_intr_vec_base = base;
+	encp->enc_intr_limit = nvec;
+
+	/*
+	 * Maximum number of bytes into the frame the TCP header can start for
+	 * firmware assisted TSO to work.
+	 */
+	encp->enc_tx_tso_tcp_header_offset_limit = EF10_TCP_HEADER_OFFSET_LIMIT;
+
+	return (0);
+
+fail11:
+	EFSYS_PROBE(fail11);
+fail10:
+	EFSYS_PROBE(fail10);
+fail9:
+	EFSYS_PROBE(fail9);
+fail8:
+	EFSYS_PROBE(fail8);
+fail7:
+	EFSYS_PROBE(fail7);
+fail6:
+	EFSYS_PROBE(fail6);
+fail5:
+	EFSYS_PROBE(fail5);
+fail4:
+	EFSYS_PROBE(fail4);
+fail3:
+	EFSYS_PROBE(fail3);
+fail2:
+	EFSYS_PROBE(fail2);
+fail1:
+	EFSYS_PROBE1(fail1, efx_rc_t, rc);
+
+	return (rc);
+}
 
 #endif	/* EFSYS_OPT_MEDFORD */

From owner-svn-src-all@freebsd.org  Wed Jan 20 07:44:07 2016
Return-Path: <owner-svn-src-all@freebsd.org>
Delivered-To: svn-src-all@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0E5C1A89ABA;
 Wed, 20 Jan 2016 07:44:07 +0000 (UTC)
 (envelope-from arybchik@FreeBSD.org)
Received: from repo.freebsd.org (repo.freebsd.org
 [IPv6:2610:1c1:1:6068::e6a:0])
 (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
 (Client did not present a certificate)
 by mx1.freebsd.org (Postfix) with ESMTPS id D200D1EB5;
 Wed, 20 Jan 2016 07:44:06 +0000 (UTC)
 (envelope-from arybchik@FreeBSD.org)
Received: from repo.freebsd.org ([127.0.1.37])
 by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u0K7i5jp024094;
 Wed, 20 Jan 2016 07:44:05 GMT (envelope-from arybchik@FreeBSD.org)
Received: (from arybchik@localhost)
 by repo.freebsd.org (8.15.2/8.15.2/Submit) id u0K7i5NH024088;
 Wed, 20 Jan 2016 07:44:05 GMT (envelope-from arybchik@FreeBSD.org)
Message-Id: <201601200744.u0K7i5NH024088@repo.freebsd.org>
X-Authentication-Warning: repo.freebsd.org: arybchik set sender to
 arybchik@FreeBSD.org using -f
From: Andrew Rybchenko <arybchik@FreeBSD.org>
Date: Wed, 20 Jan 2016 07:44:05 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org
Subject: svn commit: r294378 - stable/10/sys/dev/sfxge/common
X-SVN-Group: stable-10
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.20
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for &quot;
 user&quot; and &quot; projects&quot; \)" <svn-src-all.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-all/>
List-Post: <mailto:svn-src-all@freebsd.org>
List-Help: <mailto:svn-src-all-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Wed, 20 Jan 2016 07:44:07 -0000

Author: arybchik
Date: Wed Jan 20 07:44:05 2016
New Revision: 294378
URL: https://svnweb.freebsd.org/changeset/base/294378

Log:
  MFC r293888
  
  sfxge: rework MCDI start request
  
  Submitted by:   Andy Moreton <amoreton at solarflare.com>
  Reviewed by:    gnn
  Sponsored by:   Solarflare Communications, Inc.

Modified:
  stable/10/sys/dev/sfxge/common/efx_impl.h
  stable/10/sys/dev/sfxge/common/efx_mcdi.c
  stable/10/sys/dev/sfxge/common/hunt_impl.h
  stable/10/sys/dev/sfxge/common/hunt_mcdi.c
  stable/10/sys/dev/sfxge/common/siena_impl.h
  stable/10/sys/dev/sfxge/common/siena_mcdi.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/sys/dev/sfxge/common/efx_impl.h
==============================================================================
--- stable/10/sys/dev/sfxge/common/efx_impl.h	Wed Jan 20 07:42:31 2016	(r294377)
+++ stable/10/sys/dev/sfxge/common/efx_impl.h	Wed Jan 20 07:44:05 2016	(r294378)
@@ -457,8 +457,8 @@ falconsiena_filter_tbl_clear(
 
 typedef struct efx_mcdi_ops_s {
 	efx_rc_t	(*emco_init)(efx_nic_t *, const efx_mcdi_transport_t *);
-	void		(*emco_request_copyin)(efx_nic_t *, efx_mcdi_req_t *,
-					unsigned int, boolean_t, boolean_t);
+	void		(*emco_send_request)(efx_nic_t *, void *, size_t,
+					void *, size_t);
 	void		(*emco_request_copyout)(efx_nic_t *, efx_mcdi_req_t *);
 	efx_rc_t	(*emco_poll_reboot)(efx_nic_t *);
 	boolean_t	(*emco_poll_response)(efx_nic_t *);

Modified: stable/10/sys/dev/sfxge/common/efx_mcdi.c
==============================================================================
--- stable/10/sys/dev/sfxge/common/efx_mcdi.c	Wed Jan 20 07:42:31 2016	(r294377)
+++ stable/10/sys/dev/sfxge/common/efx_mcdi.c	Wed Jan 20 07:44:05 2016	(r294378)
@@ -36,12 +36,32 @@ __FBSDID("$FreeBSD$");
 
 #if EFSYS_OPT_MCDI
 
+/*
+ * There are three versions of the MCDI interface:
+ *  - MCDIv0: Siena BootROM. Transport uses MCDIv1 headers.
+ *  - MCDIv1: Siena firmware and Huntington BootROM.
+ *  - MCDIv2: EF10 firmware (Huntington/Medford) and Medford BootROM.
+ *            Transport uses MCDIv2 headers.
+ *
+ * MCDIv2 Header NOT_EPOCH flag
+ * ----------------------------
+ * A new epoch begins at initial startup or after an MC reboot, and defines when
+ * the MC should reject stale MCDI requests.
+ *
+ * The first MCDI request sent by the host should contain NOT_EPOCH=0, and all
+ * subsequent requests (until the next MC reboot) should contain NOT_EPOCH=1.
+ *
+ * After rebooting the MC will fail all requests with NOT_EPOCH=1 by writing a
+ * response with ERROR=1 and DATALEN=0 until a request is seen with NOT_EPOCH=0.
+ */
+
+
 
 #if EFSYS_OPT_SIENA
 
 static efx_mcdi_ops_t	__efx_mcdi_siena_ops = {
 	siena_mcdi_init,		/* emco_init */
-	siena_mcdi_request_copyin,	/* emco_request_copyin */
+	siena_mcdi_send_request,	/* emco_send_request */
 	siena_mcdi_request_copyout,	/* emco_request_copyout */
 	siena_mcdi_poll_reboot,		/* emco_poll_reboot */
 	siena_mcdi_poll_response,	/* emco_poll_response */
@@ -56,7 +76,7 @@ static efx_mcdi_ops_t	__efx_mcdi_siena_o
 
 static efx_mcdi_ops_t	__efx_mcdi_ef10_ops = {
 	ef10_mcdi_init,			/* emco_init */
-	ef10_mcdi_request_copyin,	/* emco_request_copyin */
+	ef10_mcdi_send_request,		/* emco_send_request */
 	ef10_mcdi_request_copyout,	/* emco_request_copyout */
 	ef10_mcdi_poll_reboot,		/* emco_poll_reboot */
 	ef10_mcdi_poll_response,	/* emco_poll_response */
@@ -179,16 +199,16 @@ efx_mcdi_new_epoch(
 }
 
 static			void
-efx_mcdi_request_copyin(
+efx_mcdi_send_request(
 	__in		efx_nic_t *enp,
-	__in		efx_mcdi_req_t *emrp,
-	__in		unsigned int seq,
-	__in		boolean_t ev_cpl,
-	__in		boolean_t new_epoch)
+	__in		void *hdrp,
+	__in		size_t hdr_len,
+	__in		void *sdup,
+	__in		size_t sdu_len)
 {
 	efx_mcdi_ops_t *emcop = enp->en_mcdi.em_emcop;
 
-	emcop->emco_request_copyin(enp, emrp, seq, ev_cpl, new_epoch);
+	emcop->emco_send_request(enp, hdrp, hdr_len, sdup, sdu_len);
 }
 
 static			void
@@ -241,8 +261,15 @@ efx_mcdi_request_start(
 	__in		efx_mcdi_req_t *emrp,
 	__in		boolean_t ev_cpl)
 {
+#if EFSYS_OPT_MCDI_LOGGING
+	const efx_mcdi_transport_t *emtp = enp->en_mcdi.em_emtp;
+#endif
 	efx_mcdi_iface_t *emip = &(enp->en_mcdi.em_emip);
+	efx_dword_t hdr[2];
+	size_t hdr_len;
+	unsigned int max_version;
 	unsigned int seq;
+	unsigned int xflags;
 	boolean_t new_epoch;
 	int state;
 
@@ -269,9 +296,60 @@ efx_mcdi_request_start(
 	emip->emi_poll_cnt = 0;
 	seq = emip->emi_seq++ & EFX_MASK32(MCDI_HEADER_SEQ);
 	new_epoch = emip->emi_new_epoch;
+	max_version = emip->emi_max_version;
 	EFSYS_UNLOCK(enp->en_eslp, state);
 
-	efx_mcdi_request_copyin(enp, emrp, seq, ev_cpl, new_epoch);
+	xflags = 0;
+	if (ev_cpl)
+		xflags |= MCDI_HEADER_XFLAGS_EVREQ;
+
+	/*
+	 * Huntington firmware supports MCDIv2, but the Huntington BootROM only
+	 * supports MCDIv1. Use MCDIv1 headers for MCDIv1 commands where
+	 * possible to support this.
+	 */
+	if ((max_version >= 2) &&
+	    ((emrp->emr_cmd > MC_CMD_CMD_SPACE_ESCAPE_7) ||
+	    (emrp->emr_in_length > MCDI_CTL_SDU_LEN_MAX_V1))) {
+		/* Construct MCDI v2 header */
+		hdr_len = sizeof (hdr);
+		EFX_POPULATE_DWORD_8(hdr[0],
+		    MCDI_HEADER_CODE, MC_CMD_V2_EXTN,
+		    MCDI_HEADER_RESYNC, 1,
+		    MCDI_HEADER_DATALEN, 0,
+		    MCDI_HEADER_SEQ, seq,
+		    MCDI_HEADER_NOT_EPOCH, new_epoch ? 0 : 1,
+		    MCDI_HEADER_ERROR, 0,
+		    MCDI_HEADER_RESPONSE, 0,
+		    MCDI_HEADER_XFLAGS, xflags);
+
+		EFX_POPULATE_DWORD_2(hdr[1],
+		    MC_CMD_V2_EXTN_IN_EXTENDED_CMD, emrp->emr_cmd,
+		    MC_CMD_V2_EXTN_IN_ACTUAL_LEN, emrp->emr_in_length);
+	} else {
+		/* Construct MCDI v1 header */
+		hdr_len = sizeof (hdr[0]);
+		EFX_POPULATE_DWORD_8(hdr[0],
+		    MCDI_HEADER_CODE, emrp->emr_cmd,
+		    MCDI_HEADER_RESYNC, 1,
+		    MCDI_HEADER_DATALEN, emrp->emr_in_length,
+		    MCDI_HEADER_SEQ, seq,
+		    MCDI_HEADER_NOT_EPOCH, new_epoch ? 0 : 1,
+		    MCDI_HEADER_ERROR, 0,
+		    MCDI_HEADER_RESPONSE, 0,
+		    MCDI_HEADER_XFLAGS, xflags);
+	}
+
+#if EFSYS_OPT_MCDI_LOGGING
+	if (emtp->emt_logger != NULL) {
+		emtp->emt_logger(emtp->emt_context, EFX_LOG_MCDI_REQUEST,
+		    &hdr, hdr_len,
+		    emrp->emr_in_buf, emrp->emr_in_length);
+	}
+#endif /* EFSYS_OPT_MCDI_LOGGING */
+
+	efx_mcdi_send_request(enp, &hdr[0], hdr_len,
+	    emrp->emr_in_buf, emrp->emr_in_length);
 }
 
 

Modified: stable/10/sys/dev/sfxge/common/hunt_impl.h
==============================================================================
--- stable/10/sys/dev/sfxge/common/hunt_impl.h	Wed Jan 20 07:42:31 2016	(r294377)
+++ stable/10/sys/dev/sfxge/common/hunt_impl.h	Wed Jan 20 07:44:05 2016	(r294378)
@@ -287,12 +287,12 @@ ef10_mcdi_fini(
 	__in		efx_nic_t *enp);
 
 extern			void
-ef10_mcdi_request_copyin(
+ef10_mcdi_send_request(
 	__in		efx_nic_t *enp,
-	__in		efx_mcdi_req_t *emrp,
-	__in		unsigned int seq,
-	__in		boolean_t ev_cpl,
-	__in		boolean_t new_epoch);
+	__in		void *hdrp,
+	__in		size_t hdr_len,
+	__in		void *sdup,
+	__in		size_t sdu_len);
 
 extern	__checkReturn	boolean_t
 ef10_mcdi_poll_response(

Modified: stable/10/sys/dev/sfxge/common/hunt_mcdi.c
==============================================================================
--- stable/10/sys/dev/sfxge/common/hunt_mcdi.c	Wed Jan 20 07:42:31 2016	(r294377)
+++ stable/10/sys/dev/sfxge/common/hunt_mcdi.c	Wed Jan 20 07:44:05 2016	(r294378)
@@ -43,37 +43,6 @@ __FBSDID("$FreeBSD$");
 #error "WITH_MCDI_V2 required for EF10 MCDIv2 commands."
 #endif
 
-typedef enum efx_mcdi_header_type_e {
-	EFX_MCDI_HEADER_TYPE_V1, /* MCDIv0 (BootROM), MCDIv1 commands */
-	EFX_MCDI_HEADER_TYPE_V2, /* MCDIv2 commands */
-} efx_mcdi_header_type_t;
-
-/*
- * Return the header format to use for sending an MCDI request.
- *
- * An MCDIv1 (Siena compatible) command should use MCDIv2 encapsulation if the
- * request input buffer or response output buffer are too large for the MCDIv1
- * format. An MCDIv2 command must always be sent using MCDIv2 encapsulation.
- */
-#define	EFX_MCDI_HEADER_TYPE(_cmd, _length)				\
-	((((_cmd) & ~EFX_MASK32(MCDI_HEADER_CODE)) ||			\
-	((_length) & ~EFX_MASK32(MCDI_HEADER_DATALEN)))	?		\
-	EFX_MCDI_HEADER_TYPE_V2	: EFX_MCDI_HEADER_TYPE_V1)
-
-
-/*
- * MCDI Header NOT_EPOCH flag
- * ==========================
- * A new epoch begins at initial startup or after an MC reboot, and defines when
- * the MC should reject stale MCDI requests.
- *
- * The first MCDI request sent by the host should contain NOT_EPOCH=0, and all
- * subsequent requests (until the next MC reboot) should contain NOT_EPOCH=1.
- *
- * After rebooting the MC will fail all requests with NOT_EPOCH=1 by writing a
- * response with ERROR=1 and DATALEN=0 until a request is seen with NOT_EPOCH=0.
- */
-
 
 	__checkReturn	efx_rc_t
 ef10_mcdi_init(
@@ -139,7 +108,7 @@ ef10_mcdi_fini(
 	emip->emi_new_epoch = B_FALSE;
 }
 
-static			void
+			void
 ef10_mcdi_send_request(
 	__in		efx_nic_t *enp,
 	__in		void *hdrp,
@@ -182,74 +151,6 @@ ef10_mcdi_send_request(
 }
 
 			void
-ef10_mcdi_request_copyin(
-	__in		efx_nic_t *enp,
-	__in		efx_mcdi_req_t *emrp,
-	__in		unsigned int seq,
-	__in		boolean_t ev_cpl,
-	__in		boolean_t new_epoch)
-{
-#if EFSYS_OPT_MCDI_LOGGING
-	const efx_mcdi_transport_t *emtp = enp->en_mcdi.em_emtp;
-#endif /* EFSYS_OPT_MCDI_LOGGING */
-	efx_mcdi_header_type_t hdr_type;
-	efx_dword_t hdr[2];
-	size_t hdr_len;
-	unsigned int xflags;
-
-	EFSYS_ASSERT(enp->en_family == EFX_FAMILY_HUNTINGTON ||
-		    enp->en_family == EFX_FAMILY_MEDFORD);
-
-	xflags = 0;
-	if (ev_cpl)
-		xflags |= MCDI_HEADER_XFLAGS_EVREQ;
-
-	hdr_type = EFX_MCDI_HEADER_TYPE(emrp->emr_cmd,
-	    MAX(emrp->emr_in_length, emrp->emr_out_length));
-
-	if (hdr_type == EFX_MCDI_HEADER_TYPE_V2) {
-		/* Construct MCDI v2 header */
-		hdr_len = sizeof (hdr);
-		EFX_POPULATE_DWORD_8(hdr[0],
-		    MCDI_HEADER_CODE, MC_CMD_V2_EXTN,
-		    MCDI_HEADER_RESYNC, 1,
-		    MCDI_HEADER_DATALEN, 0,
-		    MCDI_HEADER_SEQ, seq,
-		    MCDI_HEADER_NOT_EPOCH, new_epoch ? 0 : 1,
-		    MCDI_HEADER_ERROR, 0,
-		    MCDI_HEADER_RESPONSE, 0,
-		    MCDI_HEADER_XFLAGS, xflags);
-
-		EFX_POPULATE_DWORD_2(hdr[1],
-		    MC_CMD_V2_EXTN_IN_EXTENDED_CMD, emrp->emr_cmd,
-		    MC_CMD_V2_EXTN_IN_ACTUAL_LEN, emrp->emr_in_length);
-	} else {
-		/* Construct MCDI v1 header */
-		hdr_len = sizeof (hdr[0]);
-		EFX_POPULATE_DWORD_8(hdr[0],
-		    MCDI_HEADER_CODE, emrp->emr_cmd,
-		    MCDI_HEADER_RESYNC, 1,
-		    MCDI_HEADER_DATALEN, emrp->emr_in_length,
-		    MCDI_HEADER_SEQ, seq,
-		    MCDI_HEADER_NOT_EPOCH, new_epoch ? 0 : 1,
-		    MCDI_HEADER_ERROR, 0,
-		    MCDI_HEADER_RESPONSE, 0,
-		    MCDI_HEADER_XFLAGS, xflags);
-	}
-
-#if EFSYS_OPT_MCDI_LOGGING
-	if (emtp->emt_logger != NULL) {
-		emtp->emt_logger(emtp->emt_context, EFX_LOG_MCDI_REQUEST,
-		    &hdr, hdr_len,
-		    emrp->emr_in_buf, emrp->emr_in_length);
-	}
-#endif /* EFSYS_OPT_MCDI_LOGGING */
-
-	ef10_mcdi_send_request(enp, &hdr[0], hdr_len,
-	    emrp->emr_in_buf, emrp->emr_in_length);
-}
-
-			void
 ef10_mcdi_request_copyout(
 	__in		efx_nic_t *enp,
 	__in		efx_mcdi_req_t *emrp)

Modified: stable/10/sys/dev/sfxge/common/siena_impl.h
==============================================================================
--- stable/10/sys/dev/sfxge/common/siena_impl.h	Wed Jan 20 07:42:31 2016	(r294377)
+++ stable/10/sys/dev/sfxge/common/siena_impl.h	Wed Jan 20 07:44:05 2016	(r294378)
@@ -114,12 +114,12 @@ siena_mcdi_init(
 	__in		const efx_mcdi_transport_t *mtp);
 
 extern			void
-siena_mcdi_request_copyin(
+siena_mcdi_send_request(
 	__in		efx_nic_t *enp,
-	__in		efx_mcdi_req_t *emrp,
-	__in		unsigned int seq,
-	__in		boolean_t ev_cpl,
-	__in		boolean_t new_epoch);
+	__in		void *hdrp,
+	__in		size_t hdr_len,
+	__in		void *sdup,
+	__in		size_t sdu_len);
 
 extern	__checkReturn	boolean_t
 siena_mcdi_poll_response(

Modified: stable/10/sys/dev/sfxge/common/siena_mcdi.c
==============================================================================
--- stable/10/sys/dev/sfxge/common/siena_mcdi.c	Wed Jan 20 07:42:31 2016	(r294377)
+++ stable/10/sys/dev/sfxge/common/siena_mcdi.c	Wed Jan 20 07:44:05 2016	(r294378)
@@ -52,7 +52,7 @@ __FBSDID("$FreeBSD$");
 	: MC_SMEM_P1_STATUS_OFST >> 2)
 
 
-static			void
+			void
 siena_mcdi_send_request(
 	__in		efx_nic_t *enp,
 	__in		void *hdrp,
@@ -90,50 +90,6 @@ siena_mcdi_send_request(
 }
 
 			void
-siena_mcdi_request_copyin(
-	__in		efx_nic_t *enp,
-	__in		efx_mcdi_req_t *emrp,
-	__in		unsigned int seq,
-	__in		boolean_t ev_cpl,
-	__in		boolean_t new_epoch)
-{
-#if EFSYS_OPT_MCDI_LOGGING
-	const efx_mcdi_transport_t *emtp = enp->en_mcdi.em_emtp;
-#endif
-	efx_dword_t hdr;
-	size_t hdr_len;
-	unsigned int xflags;
-
-	EFSYS_ASSERT(enp->en_family == EFX_FAMILY_SIENA);
-	_NOTE(ARGUNUSED(new_epoch))
-
-	xflags = 0;
-	if (ev_cpl)
-		xflags |= MCDI_HEADER_XFLAGS_EVREQ;
-
-	/* Construct the header */
-	hdr_len = sizeof (hdr);
-	EFX_POPULATE_DWORD_6(hdr,
-			    MCDI_HEADER_CODE, emrp->emr_cmd,
-			    MCDI_HEADER_RESYNC, 1,
-			    MCDI_HEADER_DATALEN, emrp->emr_in_length,
-			    MCDI_HEADER_SEQ, seq,
-			    MCDI_HEADER_RESPONSE, 0,
-			    MCDI_HEADER_XFLAGS, xflags);
-
-#if EFSYS_OPT_MCDI_LOGGING
-	if (emtp->emt_logger != NULL) {
-		emtp->emt_logger(emtp->emt_context, EFX_LOG_MCDI_REQUEST,
-		    &hdr, sizeof (hdr),
-		    emrp->emr_in_buf, emrp->emr_in_length);
-	}
-#endif /* EFSYS_OPT_MCDI_LOGGING */
-
-	siena_mcdi_send_request(enp, &hdr, hdr_len,
-	    emrp->emr_in_buf, emrp->emr_in_length);
-}
-
-			void
 siena_mcdi_request_copyout(
 	__in		efx_nic_t *enp,
 	__in		efx_mcdi_req_t *emrp)

From owner-svn-src-all@freebsd.org  Wed Jan 20 07:48:51 2016
Return-Path: <owner-svn-src-all@freebsd.org>
Delivered-To: svn-src-all@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id 34CAEA89C66;
 Wed, 20 Jan 2016 07:48:51 +0000 (UTC)
 (envelope-from arybchik@FreeBSD.org)
Received: from repo.freebsd.org (repo.freebsd.org
 [IPv6:2610:1c1:1:6068::e6a:0])
 (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
 (Client did not present a certificate)
 by mx1.freebsd.org (Postfix) with ESMTPS id 040EE109D;
 Wed, 20 Jan 2016 07:48:50 +0000 (UTC)
 (envelope-from arybchik@FreeBSD.org)
Received: from repo.freebsd.org ([127.0.1.37])
 by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u0K7mo43024377;
 Wed, 20 Jan 2016 07:48:50 GMT (envelope-from arybchik@FreeBSD.org)
Received: (from arybchik@localhost)
 by repo.freebsd.org (8.15.2/8.15.2/Submit) id u0K7mnEr024371;
 Wed, 20 Jan 2016 07:48:49 GMT (envelope-from arybchik@FreeBSD.org)
Message-Id: <201601200748.u0K7mnEr024371@repo.freebsd.org>
X-Authentication-Warning: repo.freebsd.org: arybchik set sender to
 arybchik@FreeBSD.org using -f
From: Andrew Rybchenko <arybchik@FreeBSD.org>
Date: Wed, 20 Jan 2016 07:48:49 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org
Subject: svn commit: r294379 - stable/10/sys/dev/sfxge/common
X-SVN-Group: stable-10
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.20
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for &quot;
 user&quot; and &quot; projects&quot; \)" <svn-src-all.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-all/>
List-Post: <mailto:svn-src-all@freebsd.org>
List-Help: <mailto:svn-src-all-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Wed, 20 Jan 2016 07:48:51 -0000

Author: arybchik
Date: Wed Jan 20 07:48:49 2016
New Revision: 294379
URL: https://svnweb.freebsd.org/changeset/base/294379

Log:
  MFC r293889,r294080,r294093,r294201,r294249-r294252
  
  sfxge: convert nvram methods to use partition id
  
  Submitted by:   Andy Moreton <amoreton at solarflare.com>
  Sponsored by:   Solarflare Communications, Inc.

Modified:
  stable/10/sys/dev/sfxge/common/efx_impl.h
  stable/10/sys/dev/sfxge/common/efx_nvram.c
  stable/10/sys/dev/sfxge/common/hunt_impl.h
  stable/10/sys/dev/sfxge/common/hunt_nvram.c
  stable/10/sys/dev/sfxge/common/siena_impl.h
  stable/10/sys/dev/sfxge/common/siena_nvram.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/sys/dev/sfxge/common/efx_impl.h
==============================================================================
--- stable/10/sys/dev/sfxge/common/efx_impl.h	Wed Jan 20 07:44:05 2016	(r294378)
+++ stable/10/sys/dev/sfxge/common/efx_impl.h	Wed Jan 20 07:48:49 2016	(r294379)
@@ -480,21 +480,21 @@ typedef struct efx_nvram_ops_s {
 #if EFSYS_OPT_DIAG
 	efx_rc_t	(*envo_test)(efx_nic_t *);
 #endif	/* EFSYS_OPT_DIAG */
-	efx_rc_t	(*envo_size)(efx_nic_t *, efx_nvram_type_t, size_t *);
-	efx_rc_t	(*envo_get_version)(efx_nic_t *, efx_nvram_type_t,
-					    uint32_t *, uint16_t *);
-	efx_rc_t	(*envo_rw_start)(efx_nic_t *, efx_nvram_type_t, size_t *);
-	efx_rc_t	(*envo_read_chunk)(efx_nic_t *, efx_nvram_type_t,
+	efx_rc_t	(*envo_type_to_partn)(efx_nic_t *, efx_nvram_type_t,
+					    uint32_t *);
+	efx_rc_t	(*envo_partn_size)(efx_nic_t *, uint32_t, size_t *);
+	efx_rc_t	(*envo_partn_rw_start)(efx_nic_t *, uint32_t, size_t *);
+	efx_rc_t	(*envo_partn_read)(efx_nic_t *, uint32_t,
 					    unsigned int, caddr_t, size_t);
-	efx_rc_t	(*envo_erase)(efx_nic_t *, efx_nvram_type_t);
-	efx_rc_t	(*envo_write_chunk)(efx_nic_t *, efx_nvram_type_t,
+	efx_rc_t	(*envo_partn_erase)(efx_nic_t *, uint32_t,
+					    unsigned int, size_t);
+	efx_rc_t	(*envo_partn_write)(efx_nic_t *, uint32_t,
 					    unsigned int, caddr_t, size_t);
-	void		(*envo_rw_finish)(efx_nic_t *, efx_nvram_type_t);
-	efx_rc_t	(*envo_set_version)(efx_nic_t *, efx_nvram_type_t,
+	void		(*envo_partn_rw_finish)(efx_nic_t *, uint32_t);
+	efx_rc_t	(*envo_partn_get_version)(efx_nic_t *, uint32_t,
+					    uint32_t *, uint16_t *);
+	efx_rc_t	(*envo_partn_set_version)(efx_nic_t *, uint32_t,
 					    uint16_t *);
-
-	efx_rc_t	(*envo_type_to_partn)(efx_nic_t *, efx_nvram_type_t,
-					    uint32_t *);
 } efx_nvram_ops_t;
 #endif /* EFSYS_OPT_NVRAM */
 

Modified: stable/10/sys/dev/sfxge/common/efx_nvram.c
==============================================================================
--- stable/10/sys/dev/sfxge/common/efx_nvram.c	Wed Jan 20 07:44:05 2016	(r294378)
+++ stable/10/sys/dev/sfxge/common/efx_nvram.c	Wed Jan 20 07:48:49 2016	(r294379)
@@ -42,15 +42,15 @@ static efx_nvram_ops_t	__efx_nvram_falco
 #if EFSYS_OPT_DIAG
 	falcon_nvram_test,		/* envo_test */
 #endif	/* EFSYS_OPT_DIAG */
-	falcon_nvram_size,		/* envo_size */
-	falcon_nvram_get_version,	/* envo_get_version */
-	falcon_nvram_rw_start,		/* envo_rw_start */
-	falcon_nvram_read_chunk,	/* envo_read_chunk */
-	falcon_nvram_erase,		/* envo_erase */
-	falcon_nvram_write_chunk,	/* envo_write_chunk */
-	falcon_nvram_rw_finish,		/* envo_rw_finish */
-	falcon_nvram_set_version,	/* envo_set_version */
 	falcon_nvram_type_to_partn,	/* envo_type_to_partn */
+	falcon_nvram_partn_size,	/* envo_partn_size */
+	falcon_nvram_partn_rw_start,	/* envo_partn_rw_start */
+	falcon_nvram_partn_read,	/* envo_partn_read */
+	falcon_nvram_partn_erase,	/* envo_partn_erase */
+	falcon_nvram_partn_write,	/* envo_partn_write */
+	falcon_nvram_partn_rw_finish,	/* envo_partn_rw_finish */
+	falcon_nvram_partn_get_version,	/* envo_partn_get_version */
+	falcon_nvram_partn_set_version,	/* envo_partn_set_version */
 };
 
 #endif	/* EFSYS_OPT_FALCON */
@@ -61,15 +61,15 @@ static efx_nvram_ops_t	__efx_nvram_siena
 #if EFSYS_OPT_DIAG
 	siena_nvram_test,		/* envo_test */
 #endif	/* EFSYS_OPT_DIAG */
-	siena_nvram_size,		/* envo_size */
-	siena_nvram_get_version,	/* envo_get_version */
-	siena_nvram_rw_start,		/* envo_rw_start */
-	siena_nvram_read_chunk,		/* envo_read_chunk */
-	siena_nvram_erase,		/* envo_erase */
-	siena_nvram_write_chunk,	/* envo_write_chunk */
-	siena_nvram_rw_finish,		/* envo_rw_finish */
-	siena_nvram_set_version,	/* envo_set_version */
 	siena_nvram_type_to_partn,	/* envo_type_to_partn */
+	siena_nvram_partn_size,		/* envo_partn_size */
+	siena_nvram_partn_rw_start,	/* envo_partn_rw_start */
+	siena_nvram_partn_read,		/* envo_partn_read */
+	siena_nvram_partn_erase,	/* envo_partn_erase */
+	siena_nvram_partn_write,	/* envo_partn_write */
+	siena_nvram_partn_rw_finish,	/* envo_partn_rw_finish */
+	siena_nvram_partn_get_version,	/* envo_partn_get_version */
+	siena_nvram_partn_set_version,	/* envo_partn_set_version */
 };
 
 #endif	/* EFSYS_OPT_SIENA */
@@ -80,15 +80,15 @@ static efx_nvram_ops_t	__efx_nvram_ef10_
 #if EFSYS_OPT_DIAG
 	ef10_nvram_test,		/* envo_test */
 #endif	/* EFSYS_OPT_DIAG */
-	ef10_nvram_size,		/* envo_size */
-	ef10_nvram_get_version,		/* envo_get_version */
-	ef10_nvram_rw_start,		/* envo_rw_start */
-	ef10_nvram_read_chunk,		/* envo_read_chunk */
-	ef10_nvram_erase,		/* envo_erase */
-	ef10_nvram_write_chunk,		/* envo_write_chunk */
-	ef10_nvram_rw_finish,		/* envo_rw_finish */
-	ef10_nvram_set_version,		/* envo_set_version */
 	ef10_nvram_type_to_partn,	/* envo_type_to_partn */
+	ef10_nvram_partn_size,		/* envo_partn_size */
+	ef10_nvram_partn_rw_start,	/* envo_partn_rw_start */
+	ef10_nvram_partn_read,		/* envo_partn_read */
+	ef10_nvram_partn_erase,		/* envo_partn_erase */
+	ef10_nvram_partn_write,		/* envo_partn_write */
+	ef10_nvram_partn_rw_finish,	/* envo_partn_rw_finish */
+	ef10_nvram_partn_get_version,	/* envo_partn_get_version */
+	ef10_nvram_partn_set_version,	/* envo_partn_set_version */
 };
 
 #endif	/* EFSYS_OPT_HUNTINGTON || EFSYS_OPT_MEDFORD */
@@ -178,6 +178,7 @@ efx_nvram_size(
 	__out			size_t *sizep)
 {
 	efx_nvram_ops_t *envop = enp->en_envop;
+	uint32_t partn;
 	efx_rc_t rc;
 
 	EFSYS_ASSERT3U(enp->en_magic, ==, EFX_NIC_MAGIC);
@@ -185,13 +186,19 @@ efx_nvram_size(
 
 	EFSYS_ASSERT3U(type, <, EFX_NVRAM_NTYPES);
 
-	if ((rc = envop->envo_size(enp, type, sizep)) != 0)
+	if ((rc = envop->envo_type_to_partn(enp, type, &partn)) != 0)
 		goto fail1;
 
+	if ((rc = envop->envo_partn_size(enp, partn, sizep)) != 0)
+		goto fail2;
+
 	return (0);
 
+fail2:
+	EFSYS_PROBE(fail2);
 fail1:
 	EFSYS_PROBE1(fail1, efx_rc_t, rc);
+	*sizep = 0;
 
 	return (rc);
 }
@@ -204,6 +211,7 @@ efx_nvram_get_version(
 	__out_ecount(4)		uint16_t version[4])
 {
 	efx_nvram_ops_t *envop = enp->en_envop;
+	uint32_t partn;
 	efx_rc_t rc;
 
 	EFSYS_ASSERT3U(enp->en_magic, ==, EFX_NIC_MAGIC);
@@ -212,11 +220,17 @@ efx_nvram_get_version(
 
 	EFSYS_ASSERT3U(type, <, EFX_NVRAM_NTYPES);
 
-	if ((rc = envop->envo_get_version(enp, type, subtypep, version)) != 0)
+	if ((rc = envop->envo_type_to_partn(enp, type, &partn)) != 0)
 		goto fail1;
 
+	if ((rc = envop->envo_partn_get_version(enp, partn,
+		    subtypep, version)) != 0)
+		goto fail2;
+
 	return (0);
 
+fail2:
+	EFSYS_PROBE(fail2);
 fail1:
 	EFSYS_PROBE1(fail1, efx_rc_t, rc);
 
@@ -230,6 +244,7 @@ efx_nvram_rw_start(
 	__out_opt		size_t *chunk_sizep)
 {
 	efx_nvram_ops_t *envop = enp->en_envop;
+	uint32_t partn;
 	efx_rc_t rc;
 
 	EFSYS_ASSERT3U(enp->en_magic, ==, EFX_NIC_MAGIC);
@@ -240,13 +255,18 @@ efx_nvram_rw_start(
 
 	EFSYS_ASSERT3U(enp->en_nvram_locked, ==, EFX_NVRAM_INVALID);
 
-	if ((rc = envop->envo_rw_start(enp, type, chunk_sizep)) != 0)
+	if ((rc = envop->envo_type_to_partn(enp, type, &partn)) != 0)
 		goto fail1;
 
+	if ((rc = envop->envo_partn_rw_start(enp, partn, chunk_sizep)) != 0)
+		goto fail2;
+
 	enp->en_nvram_locked = type;
 
 	return (0);
 
+fail2:
+	EFSYS_PROBE(fail2);
 fail1:
 	EFSYS_PROBE1(fail1, efx_rc_t, rc);
 
@@ -262,6 +282,7 @@ efx_nvram_read_chunk(
 	__in			size_t size)
 {
 	efx_nvram_ops_t *envop = enp->en_envop;
+	uint32_t partn;
 	efx_rc_t rc;
 
 	EFSYS_ASSERT3U(enp->en_magic, ==, EFX_NIC_MAGIC);
@@ -272,11 +293,16 @@ efx_nvram_read_chunk(
 
 	EFSYS_ASSERT3U(enp->en_nvram_locked, ==, type);
 
-	if ((rc = envop->envo_read_chunk(enp, type, offset, data, size)) != 0)
+	if ((rc = envop->envo_type_to_partn(enp, type, &partn)) != 0)
 		goto fail1;
 
+	if ((rc = envop->envo_partn_read(enp, partn, offset, data, size)) != 0)
+		goto fail2;
+
 	return (0);
 
+fail2:
+	EFSYS_PROBE(fail2);
 fail1:
 	EFSYS_PROBE1(fail1, efx_rc_t, rc);
 
@@ -289,6 +315,9 @@ efx_nvram_erase(
 	__in			efx_nvram_type_t type)
 {
 	efx_nvram_ops_t *envop = enp->en_envop;
+	unsigned int offset = 0;
+	size_t size = 0;
+	uint32_t partn;
 	efx_rc_t rc;
 
 	EFSYS_ASSERT3U(enp->en_magic, ==, EFX_NIC_MAGIC);
@@ -299,11 +328,21 @@ efx_nvram_erase(
 
 	EFSYS_ASSERT3U(enp->en_nvram_locked, ==, type);
 
-	if ((rc = envop->envo_erase(enp, type)) != 0)
+	if ((rc = envop->envo_type_to_partn(enp, type, &partn)) != 0)
 		goto fail1;
 
+	if ((rc = envop->envo_partn_size(enp, partn, &size)) != 0)
+		goto fail2;
+
+	if ((rc = envop->envo_partn_erase(enp, partn, offset, size)) != 0)
+		goto fail3;
+
 	return (0);
 
+fail3:
+	EFSYS_PROBE(fail3);
+fail2:
+	EFSYS_PROBE(fail2);
 fail1:
 	EFSYS_PROBE1(fail1, efx_rc_t, rc);
 
@@ -319,6 +358,7 @@ efx_nvram_write_chunk(
 	__in			size_t size)
 {
 	efx_nvram_ops_t *envop = enp->en_envop;
+	uint32_t partn;
 	efx_rc_t rc;
 
 	EFSYS_ASSERT3U(enp->en_magic, ==, EFX_NIC_MAGIC);
@@ -329,11 +369,16 @@ efx_nvram_write_chunk(
 
 	EFSYS_ASSERT3U(enp->en_nvram_locked, ==, type);
 
-	if ((rc = envop->envo_write_chunk(enp, type, offset, data, size)) != 0)
+	if ((rc = envop->envo_type_to_partn(enp, type, &partn)) != 0)
 		goto fail1;
 
+	if ((rc = envop->envo_partn_write(enp, partn, offset, data, size)) != 0)
+		goto fail2;
+
 	return (0);
 
+fail2:
+	EFSYS_PROBE(fail2);
 fail1:
 	EFSYS_PROBE1(fail1, efx_rc_t, rc);
 
@@ -346,6 +391,7 @@ efx_nvram_rw_finish(
 	__in			efx_nvram_type_t type)
 {
 	efx_nvram_ops_t *envop = enp->en_envop;
+	uint32_t partn;
 
 	EFSYS_ASSERT3U(enp->en_magic, ==, EFX_NIC_MAGIC);
 	EFSYS_ASSERT3U(enp->en_mod_flags, &, EFX_MOD_NVRAM);
@@ -355,7 +401,8 @@ efx_nvram_rw_finish(
 
 	EFSYS_ASSERT3U(enp->en_nvram_locked, ==, type);
 
-	envop->envo_rw_finish(enp, type);
+	if (envop->envo_type_to_partn(enp, type, &partn) == 0)
+		envop->envo_partn_rw_finish(enp, partn);
 
 	enp->en_nvram_locked = EFX_NVRAM_INVALID;
 }
@@ -367,6 +414,7 @@ efx_nvram_set_version(
 	__in_ecount(4)		uint16_t version[4])
 {
 	efx_nvram_ops_t *envop = enp->en_envop;
+	uint32_t partn;
 	efx_rc_t rc;
 
 	EFSYS_ASSERT3U(enp->en_magic, ==, EFX_NIC_MAGIC);
@@ -382,11 +430,16 @@ efx_nvram_set_version(
 	 */
 	EFSYS_ASSERT3U(enp->en_nvram_locked, ==, EFX_NVRAM_INVALID);
 
-	if ((rc = envop->envo_set_version(enp, type, version)) != 0)
+	if ((rc = envop->envo_type_to_partn(enp, type, &partn)) != 0)
 		goto fail1;
 
+	if ((rc = envop->envo_partn_set_version(enp, partn, version)) != 0)
+		goto fail2;
+
 	return (0);
 
+fail2:
+	EFSYS_PROBE(fail2);
 fail1:
 	EFSYS_PROBE1(fail1, efx_rc_t, rc);
 

Modified: stable/10/sys/dev/sfxge/common/hunt_impl.h
==============================================================================
--- stable/10/sys/dev/sfxge/common/hunt_impl.h	Wed Jan 20 07:44:05 2016	(r294378)
+++ stable/10/sys/dev/sfxge/common/hunt_impl.h	Wed Jan 20 07:48:49 2016	(r294379)
@@ -370,39 +370,10 @@ ef10_nvram_partn_write_segment_tlv(
 	__in			boolean_t all_segments);
 
 extern	__checkReturn		efx_rc_t
-ef10_nvram_partn_size(
-	__in			efx_nic_t *enp,
-	__in			uint32_t partn,
-	__out			size_t *sizep);
-
-extern	__checkReturn		efx_rc_t
 ef10_nvram_partn_lock(
 	__in			efx_nic_t *enp,
 	__in			uint32_t partn);
 
-extern	__checkReturn		efx_rc_t
-ef10_nvram_partn_read(
-	__in			efx_nic_t *enp,
-	__in			uint32_t partn,
-	__in			unsigned int offset,
-	__out_bcount(size)	caddr_t data,
-	__in			size_t size);
-
-extern	__checkReturn		efx_rc_t
-ef10_nvram_partn_erase(
-	__in			efx_nic_t *enp,
-	__in			uint32_t partn,
-	__in			unsigned int offset,
-	__in			size_t size);
-
-extern	__checkReturn		efx_rc_t
-ef10_nvram_partn_write(
-	__in			efx_nic_t *enp,
-	__in			uint32_t partn,
-	__in			unsigned int offset,
-	__out_bcount(size)	caddr_t data,
-	__in			size_t size);
-
 extern				void
 ef10_nvram_partn_unlock(
 	__in			efx_nic_t *enp,
@@ -421,68 +392,64 @@ ef10_nvram_test(
 #endif	/* EFSYS_OPT_DIAG */
 
 extern	__checkReturn		efx_rc_t
-ef10_nvram_size(
+ef10_nvram_type_to_partn(
 	__in			efx_nic_t *enp,
 	__in			efx_nvram_type_t type,
-	__out			size_t *sizep);
+	__out			uint32_t *partnp);
 
 extern	__checkReturn		efx_rc_t
-ef10_nvram_get_version(
+ef10_nvram_partn_size(
 	__in			efx_nic_t *enp,
-	__in			efx_nvram_type_t type,
-	__out			uint32_t *subtypep,
-	__out_ecount(4)		uint16_t version[4]);
+	__in			uint32_t partn,
+	__out			size_t *sizep);
 
 extern	__checkReturn		efx_rc_t
-ef10_nvram_rw_start(
+ef10_nvram_partn_rw_start(
 	__in			efx_nic_t *enp,
-	__in			efx_nvram_type_t type,
-	__out			size_t *pref_chunkp);
+	__in			uint32_t partn,
+	__out			size_t *chunk_sizep);
 
 extern	__checkReturn		efx_rc_t
-ef10_nvram_read_chunk(
+ef10_nvram_partn_read(
 	__in			efx_nic_t *enp,
-	__in			efx_nvram_type_t type,
+	__in			uint32_t partn,
 	__in			unsigned int offset,
 	__out_bcount(size)	caddr_t data,
 	__in			size_t size);
 
-extern	 __checkReturn		efx_rc_t
-ef10_nvram_erase(
+extern	__checkReturn		efx_rc_t
+ef10_nvram_partn_erase(
 	__in			efx_nic_t *enp,
-	__in			efx_nvram_type_t type);
+	__in			uint32_t partn,
+	__in			unsigned int offset,
+	__in			size_t size);
 
 extern	__checkReturn		efx_rc_t
-ef10_nvram_write_chunk(
+ef10_nvram_partn_write(
 	__in			efx_nic_t *enp,
-	__in			efx_nvram_type_t type,
+	__in			uint32_t partn,
 	__in			unsigned int offset,
-	__in_bcount(size)	caddr_t data,
+	__out_bcount(size)	caddr_t data,
 	__in			size_t size);
 
 extern				void
-ef10_nvram_rw_finish(
+ef10_nvram_partn_rw_finish(
 	__in			efx_nic_t *enp,
-	__in			efx_nvram_type_t type);
+	__in			uint32_t partn);
 
 extern	__checkReturn		efx_rc_t
-ef10_nvram_partn_set_version(
+ef10_nvram_partn_get_version(
 	__in			efx_nic_t *enp,
 	__in			uint32_t partn,
-	__in_ecount(4)		uint16_t version[4]);
+	__out			uint32_t *subtypep,
+	__out_ecount(4)		uint16_t version[4]);
 
 extern	__checkReturn		efx_rc_t
-ef10_nvram_set_version(
+ef10_nvram_partn_set_version(
 	__in			efx_nic_t *enp,
-	__in			efx_nvram_type_t type,
+	__in			uint32_t partn,
 	__in_ecount(4)		uint16_t version[4]);
 
-extern	__checkReturn		efx_rc_t
-ef10_nvram_type_to_partn(
-	__in			efx_nic_t *enp,
-	__in			efx_nvram_type_t type,
-	__out			uint32_t *partnp);
-
 #endif	/* EFSYS_OPT_NVRAM */
 
 

Modified: stable/10/sys/dev/sfxge/common/hunt_nvram.c
==============================================================================
--- stable/10/sys/dev/sfxge/common/hunt_nvram.c	Wed Jan 20 07:44:05 2016	(r294378)
+++ stable/10/sys/dev/sfxge/common/hunt_nvram.c	Wed Jan 20 07:48:49 2016	(r294379)
@@ -1707,56 +1707,23 @@ fail1:
 #endif	/* EFSYS_OPT_DIAG */
 
 	__checkReturn		efx_rc_t
-ef10_nvram_size(
+ef10_nvram_partn_get_version(
 	__in			efx_nic_t *enp,
-	__in			efx_nvram_type_t type,
-	__out			size_t *sizep)
-{
-	uint32_t partn;
-	efx_rc_t rc;
-
-	if ((rc = ef10_nvram_type_to_partn(enp, type, &partn)) != 0)
-		goto fail1;
-
-	if ((rc = ef10_nvram_partn_size(enp, partn, sizep)) != 0)
-		goto fail2;
-
-	return (0);
-
-fail2:
-	EFSYS_PROBE(fail2);
-fail1:
-	EFSYS_PROBE1(fail1, efx_rc_t, rc);
-
-	*sizep = 0;
-
-	return (rc);
-}
-
-	__checkReturn		efx_rc_t
-ef10_nvram_get_version(
-	__in			efx_nic_t *enp,
-	__in			efx_nvram_type_t type,
+	__in			uint32_t partn,
 	__out			uint32_t *subtypep,
 	__out_ecount(4)		uint16_t version[4])
 {
-	uint32_t partn;
 	efx_rc_t rc;
 
-	if ((rc = ef10_nvram_type_to_partn(enp, type, &partn)) != 0)
-		goto fail1;
-
 	/* FIXME: get highest partn version from all ports */
 	/* FIXME: return partn description if available */
 
 	if ((rc = efx_mcdi_nvram_metadata(enp, partn, subtypep,
 		    version, NULL, 0)) != 0)
-		goto fail2;
+		goto fail1;
 
 	return (0);
 
-fail2:
-	EFSYS_PROBE(fail2);
 fail1:
 	EFSYS_PROBE1(fail1, efx_rc_t, rc);
 
@@ -1764,111 +1731,21 @@ fail1:
 }
 
 	__checkReturn		efx_rc_t
-ef10_nvram_rw_start(
+ef10_nvram_partn_rw_start(
 	__in			efx_nic_t *enp,
-	__in			efx_nvram_type_t type,
+	__in			uint32_t partn,
 	__out			size_t *chunk_sizep)
 {
-	uint32_t partn;
 	efx_rc_t rc;
 
-	if ((rc = ef10_nvram_type_to_partn(enp, type, &partn)) != 0)
-		goto fail1;
-
 	if ((rc = ef10_nvram_partn_lock(enp, partn)) != 0)
-		goto fail2;
+		goto fail1;
 
 	if (chunk_sizep != NULL)
 		*chunk_sizep = EF10_NVRAM_CHUNK;
 
 	return (0);
 
-fail2:
-	EFSYS_PROBE(fail2);
-fail1:
-	EFSYS_PROBE1(fail1, efx_rc_t, rc);
-
-	return (rc);
-}
-
-	__checkReturn		efx_rc_t
-ef10_nvram_read_chunk(
-	__in			efx_nic_t *enp,
-	__in			efx_nvram_type_t type,
-	__in			unsigned int offset,
-	__out_bcount(size)	caddr_t data,
-	__in			size_t size)
-{
-	uint32_t partn;
-	efx_rc_t rc;
-
-	if ((rc = ef10_nvram_type_to_partn(enp, type, &partn)) != 0)
-		goto fail1;
-
-	if ((rc = ef10_nvram_partn_read(enp, partn, offset, data, size)) != 0)
-		goto fail2;
-
-	return (0);
-
-fail2:
-	EFSYS_PROBE(fail2);
-fail1:
-	EFSYS_PROBE1(fail1, efx_rc_t, rc);
-
-	return (rc);
-}
-
-	__checkReturn		efx_rc_t
-ef10_nvram_erase(
-	__in			efx_nic_t *enp,
-	__in			efx_nvram_type_t type)
-{
-	uint32_t partn;
-	size_t size;
-	efx_rc_t rc;
-
-	if ((rc = ef10_nvram_type_to_partn(enp, type, &partn)) != 0)
-		goto fail1;
-
-	if ((rc = ef10_nvram_partn_size(enp, partn, &size)) != 0)
-		goto fail2;
-
-	if ((rc = ef10_nvram_partn_erase(enp, partn, 0, size)) != 0)
-		goto fail3;
-
-	return (0);
-
-fail3:
-	EFSYS_PROBE(fail3);
-fail2:
-	EFSYS_PROBE(fail2);
-fail1:
-	EFSYS_PROBE1(fail1, efx_rc_t, rc);
-
-	return (rc);
-}
-
-	__checkReturn		efx_rc_t
-ef10_nvram_write_chunk(
-	__in			efx_nic_t *enp,
-	__in			efx_nvram_type_t type,
-	__in			unsigned int offset,
-	__in_bcount(size)	caddr_t data,
-	__in			size_t size)
-{
-	uint32_t partn;
-	efx_rc_t rc;
-
-	if ((rc = ef10_nvram_type_to_partn(enp, type, &partn)) != 0)
-		goto fail1;
-
-	if ((rc = ef10_nvram_partn_write(enp, partn, offset, data, size)) != 0)
-		goto fail2;
-
-	return (0);
-
-fail2:
-	EFSYS_PROBE(fail2);
 fail1:
 	EFSYS_PROBE1(fail1, efx_rc_t, rc);
 
@@ -1876,40 +1753,11 @@ fail1:
 }
 
 				void
-ef10_nvram_rw_finish(
-	__in			efx_nic_t *enp,
-	__in			efx_nvram_type_t type)
-{
-	uint32_t partn;
-	efx_rc_t rc;
-
-	if ((rc = ef10_nvram_type_to_partn(enp, type, &partn)) == 0)
-		ef10_nvram_partn_unlock(enp, partn);
-}
-
-	__checkReturn		efx_rc_t
-ef10_nvram_set_version(
+ef10_nvram_partn_rw_finish(
 	__in			efx_nic_t *enp,
-	__in			efx_nvram_type_t type,
-	__in_ecount(4)		uint16_t version[4])
+	__in			uint32_t partn)
 {
-	uint32_t partn;
-	efx_rc_t rc;
-
-	if ((rc = ef10_nvram_type_to_partn(enp, type, &partn)) != 0)
-		goto fail1;
-
-	if ((rc = ef10_nvram_partn_set_version(enp, partn, version)) != 0)
-		goto fail2;
-
-	return (0);
-
-fail2:
-	EFSYS_PROBE(fail2);
-fail1:
-	EFSYS_PROBE1(fail1, efx_rc_t, rc);
-
-	return (rc);
+	ef10_nvram_partn_unlock(enp, partn);
 }
 
 #endif	/* EFSYS_OPT_NVRAM */

Modified: stable/10/sys/dev/sfxge/common/siena_impl.h
==============================================================================
--- stable/10/sys/dev/sfxge/common/siena_impl.h	Wed Jan 20 07:44:05 2016	(r294378)
+++ stable/10/sys/dev/sfxge/common/siena_impl.h	Wed Jan 20 07:48:49 2016	(r294379)
@@ -156,39 +156,10 @@ siena_mcdi_feature_supported(
 #if EFSYS_OPT_NVRAM || EFSYS_OPT_VPD
 
 extern	__checkReturn		efx_rc_t
-siena_nvram_partn_size(
-	__in			efx_nic_t *enp,
-	__in			uint32_t partn,
-	__out			size_t *sizep);
-
-extern	__checkReturn		efx_rc_t
 siena_nvram_partn_lock(
 	__in			efx_nic_t *enp,
 	__in			uint32_t partn);
 
-extern	__checkReturn		efx_rc_t
-siena_nvram_partn_read(
-	__in			efx_nic_t *enp,
-	__in			uint32_t partn,
-	__in			unsigned int offset,
-	__out_bcount(size)	caddr_t data,
-	__in			size_t size);
-
-extern	__checkReturn		efx_rc_t
-siena_nvram_partn_erase(
-	__in			efx_nic_t *enp,
-	__in			uint32_t partn,
-	__in			unsigned int offset,
-	__in			size_t size);
-
-extern	__checkReturn		efx_rc_t
-siena_nvram_partn_write(
-	__in			efx_nic_t *enp,
-	__in			uint32_t partn,
-	__in			unsigned int offset,
-	__out_bcount(size)	caddr_t data,
-	__in			size_t size);
-
 extern				void
 siena_nvram_partn_unlock(
 	__in			efx_nic_t *enp,
@@ -215,67 +186,69 @@ siena_nvram_test(
 #endif	/* EFSYS_OPT_DIAG */
 
 extern	__checkReturn		efx_rc_t
-siena_nvram_size(
-	__in			efx_nic_t *enp,
-	__in			efx_nvram_type_t type,
-	__out			size_t *sizep);
-
-extern	__checkReturn		efx_rc_t
 siena_nvram_get_subtype(
 	__in			efx_nic_t *enp,
 	__in			uint32_t partn,
 	__out			uint32_t *subtypep);
 
 extern	__checkReturn		efx_rc_t
-siena_nvram_get_version(
+siena_nvram_type_to_partn(
 	__in			efx_nic_t *enp,
 	__in			efx_nvram_type_t type,
-	__out			uint32_t *subtypep,
-	__out_ecount(4)		uint16_t version[4]);
+	__out			uint32_t *partnp);
 
 extern	__checkReturn		efx_rc_t
-siena_nvram_rw_start(
+siena_nvram_partn_size(
 	__in			efx_nic_t *enp,
-	__in			efx_nvram_type_t type,
-	__out			size_t *pref_chunkp);
+	__in			uint32_t partn,
+	__out			size_t *sizep);
 
 extern	__checkReturn		efx_rc_t
-siena_nvram_read_chunk(
+siena_nvram_partn_rw_start(
 	__in			efx_nic_t *enp,
-	__in			efx_nvram_type_t type,
+	__in			uint32_t partn,
+	__out			size_t *chunk_sizep);
+
+extern	__checkReturn		efx_rc_t
+siena_nvram_partn_read(
+	__in			efx_nic_t *enp,
+	__in			uint32_t partn,
 	__in			unsigned int offset,
 	__out_bcount(size)	caddr_t data,
 	__in			size_t size);
 
-extern	 __checkReturn		efx_rc_t
-siena_nvram_erase(
+extern	__checkReturn		efx_rc_t
+siena_nvram_partn_erase(
 	__in			efx_nic_t *enp,
-	__in			efx_nvram_type_t type);
+	__in			uint32_t partn,
+	__in			unsigned int offset,
+	__in			size_t size);
 
 extern	__checkReturn		efx_rc_t
-siena_nvram_write_chunk(
+siena_nvram_partn_write(
 	__in			efx_nic_t *enp,
-	__in			efx_nvram_type_t type,
+	__in			uint32_t partn,
 	__in			unsigned int offset,
-	__in_bcount(size)	caddr_t data,
+	__out_bcount(size)	caddr_t data,
 	__in			size_t size);
 
 extern				void
-siena_nvram_rw_finish(
+siena_nvram_partn_rw_finish(
 	__in			efx_nic_t *enp,
-	__in			efx_nvram_type_t type);
+	__in			uint32_t partn);
 
 extern	__checkReturn		efx_rc_t
-siena_nvram_set_version(
+siena_nvram_partn_get_version(
 	__in			efx_nic_t *enp,
-	__in			efx_nvram_type_t type,
-	__in_ecount(4)		uint16_t version[4]);
+	__in			uint32_t partn,
+	__out			uint32_t *subtypep,
+	__out_ecount(4)		uint16_t version[4]);
 
 extern	__checkReturn		efx_rc_t
-siena_nvram_type_to_partn(
+siena_nvram_partn_set_version(
 	__in			efx_nic_t *enp,
-	__in			efx_nvram_type_t type,
-	__out			uint32_t *partnp);
+	__in			uint32_t partn,
+	__in_ecount(4)		uint16_t version[4]);
 
 #endif	/* EFSYS_OPT_NVRAM */
 

Modified: stable/10/sys/dev/sfxge/common/siena_nvram.c
==============================================================================
--- stable/10/sys/dev/sfxge/common/siena_nvram.c	Wed Jan 20 07:44:05 2016	(r294378)
+++ stable/10/sys/dev/sfxge/common/siena_nvram.c	Wed Jan 20 07:48:49 2016	(r294379)
@@ -291,32 +291,6 @@ fail1:
 
 #endif	/* EFSYS_OPT_DIAG */
 
-	__checkReturn		efx_rc_t
-siena_nvram_size(
-	__in			efx_nic_t *enp,
-	__in			efx_nvram_type_t type,
-	__out			size_t *sizep)
-{
-	uint32_t partn;
-	efx_rc_t rc;
-
-	if ((rc = siena_nvram_type_to_partn(enp, type, &partn)) != 0)
-		goto fail1;
-
-	if ((rc = siena_nvram_partn_size(enp, partn, sizep)) != 0)
-		goto fail2;
-
-	return (0);
-
-fail2:
-	EFSYS_PROBE(fail2);
-fail1:
-	EFSYS_PROBE1(fail1, efx_rc_t, rc);
-
-	*sizep = 0;
-
-	return (rc);
-}
 
 #define	SIENA_DYNAMIC_CFG_SIZE(_nitems)					\
 	(sizeof (siena_mc_dynamic_config_hdr_t) + ((_nitems) *		\
@@ -506,29 +480,25 @@ fail1:
 }
 
 	__checkReturn		efx_rc_t
-siena_nvram_get_version(
+siena_nvram_partn_get_version(
 	__in			efx_nic_t *enp,
-	__in			efx_nvram_type_t type,
+	__in			uint32_t partn,
 	__out			uint32_t *subtypep,
 	__out_ecount(4)		uint16_t version[4])
 {
 	siena_mc_dynamic_config_hdr_t *dcfg;
 	siena_parttbl_entry_t *entry;
 	uint32_t dcfg_partn;
-	uint32_t partn;
 	unsigned int i;
 	efx_rc_t rc;
 
-	if ((rc = siena_nvram_type_to_partn(enp, type, &partn)) != 0)
-		goto fail1;
-
 	if ((1 << partn) & ~enp->en_u.siena.enu_partn_mask) {
 		rc = ENOTSUP;
-		goto fail2;
+		goto fail1;
 	}
 
 	if ((rc = siena_nvram_get_subtype(enp, partn, subtypep)) != 0)
-		goto fail3;
+		goto fail2;
 
 	/*
 	 * Some partitions are accessible from both ports (for instance BOOTROM)
@@ -537,6 +507,7 @@ siena_nvram_get_version(
 	 */
 	version[0] = version[1] = version[2] = version[3] = 0;
 	for (i = 0; i < EFX_ARRAY_SIZE(siena_parttbl); i++) {
+		siena_mc_fw_version_t *verp;
 		unsigned int nitems;
 		uint16_t temp[4];
 		size_t length;
@@ -559,32 +530,27 @@ siena_nvram_get_version(
 
 		if ((rc = siena_nvram_get_dynamic_cfg(enp, dcfg_partn,
 		    B_FALSE, &dcfg, &length)) != 0)
-			goto fail4;
+			goto fail3;
 
 		nitems = EFX_DWORD_FIELD(dcfg->num_fw_version_items,
 			    EFX_DWORD_0);
 		if (nitems < entry->partn)
 			goto done;
 
-		temp[0] = EFX_WORD_FIELD(dcfg->fw_version[partn].version_w,
-			    EFX_WORD_0);
-		temp[1] = EFX_WORD_FIELD(dcfg->fw_version[partn].version_x,
-			    EFX_WORD_0);
-		temp[2] = EFX_WORD_FIELD(dcfg->fw_version[partn].version_y,
-			    EFX_WORD_0);
-		temp[3] = EFX_WORD_FIELD(dcfg->fw_version[partn].version_z,
-			    EFX_WORD_0);
+		verp = &dcfg->fw_version[partn];
+		temp[0] = EFX_WORD_FIELD(verp->version_w, EFX_WORD_0);
+		temp[1] = EFX_WORD_FIELD(verp->version_x, EFX_WORD_0);
+		temp[2] = EFX_WORD_FIELD(verp->version_y, EFX_WORD_0);
+		temp[3] = EFX_WORD_FIELD(verp->version_z, EFX_WORD_0);
 		if (memcmp(version, temp, sizeof (temp)) < 0)
 			memcpy(version, temp, sizeof (temp));
 
-	done:
+done:
 		EFSYS_KMEM_FREE(enp->en_esip, length, dcfg);
 	}
 
 	return (0);
 
-fail4:
-	EFSYS_PROBE(fail4);
 fail3:
 	EFSYS_PROBE(fail3);
 fail2:
@@ -596,111 +562,21 @@ fail1:
 }
 
 	__checkReturn		efx_rc_t
-siena_nvram_rw_start(
+siena_nvram_partn_rw_start(
 	__in			efx_nic_t *enp,
-	__in			efx_nvram_type_t type,
+	__in			uint32_t partn,
 	__out			size_t *chunk_sizep)
 {
-	uint32_t partn;
 	efx_rc_t rc;
 
-	if ((rc = siena_nvram_type_to_partn(enp, type, &partn)) != 0)
-		goto fail1;
-
 	if ((rc = siena_nvram_partn_lock(enp, partn)) != 0)
-		goto fail2;
+		goto fail1;
 
 	if (chunk_sizep != NULL)
 		*chunk_sizep = SIENA_NVRAM_CHUNK;
 
 	return (0);
 
-fail2:
-	EFSYS_PROBE(fail2);
-fail1:
-	EFSYS_PROBE1(fail1, efx_rc_t, rc);
-
-	return (rc);
-}
-
-	__checkReturn		efx_rc_t
-siena_nvram_read_chunk(
-	__in			efx_nic_t *enp,
-	__in			efx_nvram_type_t type,
-	__in			unsigned int offset,
-	__out_bcount(size)	caddr_t data,
-	__in			size_t size)
-{
-	uint32_t partn;
-	efx_rc_t rc;
-
-	if ((rc = siena_nvram_type_to_partn(enp, type, &partn)) != 0)
-		goto fail1;
-
-	if ((rc = siena_nvram_partn_read(enp, partn, offset, data, size)) != 0)
-		goto fail2;
-
-	return (0);
-
-fail2:
-	EFSYS_PROBE(fail2);
-fail1:
-	EFSYS_PROBE1(fail1, efx_rc_t, rc);
-
-	return (rc);
-}
-
-	__checkReturn		efx_rc_t
-siena_nvram_erase(

*** DIFF OUTPUT TRUNCATED AT 1000 LINES ***

From owner-svn-src-all@freebsd.org  Wed Jan 20 07:50:02 2016
Return-Path: <owner-svn-src-all@freebsd.org>
Delivered-To: svn-src-all@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id 262E0A89CD2;
 Wed, 20 Jan 2016 07:50:02 +0000 (UTC)
 (envelope-from arybchik@FreeBSD.org)
Received: from repo.freebsd.org (repo.freebsd.org
 [IPv6:2610:1c1:1:6068::e6a:0])
 (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
 (Client did not present a certificate)
 by mx1.freebsd.org (Postfix) with ESMTPS id E6FE41240;
 Wed, 20 Jan 2016 07:50:01 +0000 (UTC)
 (envelope-from arybchik@FreeBSD.org)
Received: from repo.freebsd.org ([127.0.1.37])
 by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u0K7o02l024495;
 Wed, 20 Jan 2016 07:50:00 GMT (envelope-from arybchik@FreeBSD.org)
Received: (from arybchik@localhost)
 by repo.freebsd.org (8.15.2/8.15.2/Submit) id u0K7o0CF024492;
 Wed, 20 Jan 2016 07:50:00 GMT (envelope-from arybchik@FreeBSD.org)
Message-Id: <201601200750.u0K7o0CF024492@repo.freebsd.org>
X-Authentication-Warning: repo.freebsd.org: arybchik set sender to
 arybchik@FreeBSD.org using -f
From: Andrew Rybchenko <arybchik@FreeBSD.org>
Date: Wed, 20 Jan 2016 07:50:00 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org
Subject: svn commit: r294380 - stable/10/sys/dev/sfxge/common
X-SVN-Group: stable-10
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.20
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for &quot;
 user&quot; and &quot; projects&quot; \)" <svn-src-all.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-all/>
List-Post: <mailto:svn-src-all@freebsd.org>
List-Help: <mailto:svn-src-all-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Wed, 20 Jan 2016 07:50:02 -0000

Author: arybchik
Date: Wed Jan 20 07:50:00 2016
New Revision: 294380
URL: https://svnweb.freebsd.org/changeset/base/294380

Log:
  MFC r293890
  
  sfxge: rx_prefix_pktlen methods do not require EFSYS_OPT_RX_SCALE
  
  Submitted by:   Mark Spender <mspender at solarflare.com>
  Reviewed by:    gnn
  Sponsored by:   Solarflare Communications, Inc.

Modified:
  stable/10/sys/dev/sfxge/common/efx_rx.c
  stable/10/sys/dev/sfxge/common/hunt_impl.h
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/sys/dev/sfxge/common/efx_rx.c
==============================================================================
--- stable/10/sys/dev/sfxge/common/efx_rx.c	Wed Jan 20 07:48:49 2016	(r294379)
+++ stable/10/sys/dev/sfxge/common/efx_rx.c	Wed Jan 20 07:50:00 2016	(r294380)
@@ -78,14 +78,14 @@ falconsiena_rx_prefix_hash(
 	__in		efx_rx_hash_alg_t func,
 	__in		uint8_t *buffer);
 
+#endif /* EFSYS_OPT_RX_SCALE */
+
 static	__checkReturn	efx_rc_t
 falconsiena_rx_prefix_pktlen(
 	__in		efx_nic_t *enp,
 	__in		uint8_t *buffer,
 	__out		uint16_t *lengthp);
 
-#endif /* EFSYS_OPT_RX_SCALE */
-
 static			void
 falconsiena_rx_qpost(
 	__in		efx_rxq_t *erp,

Modified: stable/10/sys/dev/sfxge/common/hunt_impl.h
==============================================================================
--- stable/10/sys/dev/sfxge/common/hunt_impl.h	Wed Jan 20 07:48:49 2016	(r294379)
+++ stable/10/sys/dev/sfxge/common/hunt_impl.h	Wed Jan 20 07:50:00 2016	(r294380)
@@ -864,14 +864,14 @@ ef10_rx_prefix_hash(
 	__in		efx_rx_hash_alg_t func,
 	__in		uint8_t *buffer);
 
+#endif /* EFSYS_OPT_RX_SCALE */
+
 extern	__checkReturn	efx_rc_t
 ef10_rx_prefix_pktlen(
 	__in		efx_nic_t *enp,
 	__in		uint8_t *buffer,
 	__out		uint16_t *lengthp);
 
-#endif /* EFSYS_OPT_RX_SCALE */
-
 extern			void
 ef10_rx_qpost(
 	__in		efx_rxq_t *erp,

From owner-svn-src-all@freebsd.org  Wed Jan 20 07:51:25 2016
Return-Path: <owner-svn-src-all@freebsd.org>
Delivered-To: svn-src-all@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id ADFB6A89EA1;
 Wed, 20 Jan 2016 07:51:25 +0000 (UTC)
 (envelope-from arybchik@FreeBSD.org)
Received: from repo.freebsd.org (repo.freebsd.org
 [IPv6:2610:1c1:1:6068::e6a:0])
 (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
 (Client did not present a certificate)
 by mx1.freebsd.org (Postfix) with ESMTPS id 8ABB41739;
 Wed, 20 Jan 2016 07:51:25 +0000 (UTC)
 (envelope-from arybchik@FreeBSD.org)
Received: from repo.freebsd.org ([127.0.1.37])
 by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u0K7pOfm024699;
 Wed, 20 Jan 2016 07:51:24 GMT (envelope-from arybchik@FreeBSD.org)
Received: (from arybchik@localhost)
 by repo.freebsd.org (8.15.2/8.15.2/Submit) id u0K7pNKq024691;
 Wed, 20 Jan 2016 07:51:23 GMT (envelope-from arybchik@FreeBSD.org)
Message-Id: <201601200751.u0K7pNKq024691@repo.freebsd.org>
X-Authentication-Warning: repo.freebsd.org: arybchik set sender to
 arybchik@FreeBSD.org using -f
From: Andrew Rybchenko <arybchik@FreeBSD.org>
Date: Wed, 20 Jan 2016 07:51:23 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org
Subject: svn commit: r294381 - stable/10/sys/dev/sfxge/common
X-SVN-Group: stable-10
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.20
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for &quot;
 user&quot; and &quot; projects&quot; \)" <svn-src-all.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-all/>
List-Post: <mailto:svn-src-all@freebsd.org>
List-Help: <mailto:svn-src-all-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Wed, 20 Jan 2016 07:51:25 -0000

Author: arybchik
Date: Wed Jan 20 07:51:23 2016
New Revision: 294381
URL: https://svnweb.freebsd.org/changeset/base/294381

Log:
  MFC r293891
  
  sfxge: support FATSOv2 in common code
  
  Reviewed by:    gnn
  Sponsored by:   Solarflare Communications, Inc.

Modified:
  stable/10/sys/dev/sfxge/common/efx.h
  stable/10/sys/dev/sfxge/common/efx_impl.h
  stable/10/sys/dev/sfxge/common/efx_nic.c
  stable/10/sys/dev/sfxge/common/efx_tx.c
  stable/10/sys/dev/sfxge/common/hunt_impl.h
  stable/10/sys/dev/sfxge/common/hunt_nic.c
  stable/10/sys/dev/sfxge/common/hunt_tx.c
  stable/10/sys/dev/sfxge/common/siena_nic.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/sys/dev/sfxge/common/efx.h
==============================================================================
--- stable/10/sys/dev/sfxge/common/efx.h	Wed Jan 20 07:50:00 2016	(r294380)
+++ stable/10/sys/dev/sfxge/common/efx.h	Wed Jan 20 07:51:23 2016	(r294381)
@@ -1071,6 +1071,7 @@ efx_bist_stop(
 #define	EFX_FEATURE_TX_SRC_FILTERS	0x00000400
 #define	EFX_FEATURE_PIO_BUFFERS		0x00000800
 #define	EFX_FEATURE_FW_ASSISTED_TSO	0x00001000
+#define	EFX_FEATURE_FW_ASSISTED_TSO_V2	0x00002000
 
 typedef struct efx_nic_cfg_s {
 	uint32_t		enc_board_type;
@@ -1152,6 +1153,7 @@ typedef struct efx_nic_cfg_s {
 	 */
 	uint32_t                enc_tx_tso_tcp_header_offset_limit;
 	boolean_t               enc_fw_assisted_tso_enabled;
+	boolean_t               enc_fw_assisted_tso_v2_enabled;
 	boolean_t               enc_hw_tx_insert_vlan_enabled;
 	/* Datapath firmware vadapter/vport/vswitch support */
 	boolean_t		enc_datapath_cap_evb;
@@ -2002,6 +2004,7 @@ efx_tx_fini(
 
 #define	EFX_TXQ_CKSUM_IPV4	0x0001
 #define	EFX_TXQ_CKSUM_TCPUDP	0x0002
+#define	EFX_TXQ_FATSOV2		0x0004
 
 extern	__checkReturn	efx_rc_t
 efx_tx_qcreate(
@@ -2089,6 +2092,21 @@ efx_tx_qdesc_tso_create(
 	__in	uint8_t  tcp_flags,
 	__out	efx_desc_t *edp);
 
+/* Number of FATSOv2 option descriptors */
+#define	EFX_TX_FATSOV2_OPT_NDESCS		2
+
+/* Maximum number of DMA segments per TSO packet (not superframe) */
+#define	EFX_TX_FATSOV2_DMA_SEGS_PER_PKT_MAX	24
+
+extern	void
+efx_tx_qdesc_tso2_create(
+	__in			efx_txq_t *etp,
+	__in			uint16_t ipv4_id,
+	__in			uint32_t tcp_seq,
+	__in			uint16_t tcp_mss,
+	__out_ecount(count)	efx_desc_t *edp,
+	__in			int count);
+
 extern	void
 efx_tx_qdesc_vlantci_create(
 	__in	efx_txq_t *etp,

Modified: stable/10/sys/dev/sfxge/common/efx_impl.h
==============================================================================
--- stable/10/sys/dev/sfxge/common/efx_impl.h	Wed Jan 20 07:50:00 2016	(r294380)
+++ stable/10/sys/dev/sfxge/common/efx_impl.h	Wed Jan 20 07:51:23 2016	(r294381)
@@ -146,6 +146,9 @@ typedef struct efx_tx_ops_s {
 	void		(*etxo_qdesc_tso_create)(efx_txq_t *, uint16_t,
 						uint32_t, uint8_t,
 						efx_desc_t *);
+	void		(*etxo_qdesc_tso2_create)(efx_txq_t *, uint16_t,
+						uint32_t, uint16_t,
+						efx_desc_t *, int);
 	void		(*etxo_qdesc_vlantci_create)(efx_txq_t *, uint16_t,
 						efx_desc_t *);
 #if EFSYS_OPT_QSTATS

Modified: stable/10/sys/dev/sfxge/common/efx_nic.c
==============================================================================
--- stable/10/sys/dev/sfxge/common/efx_nic.c	Wed Jan 20 07:50:00 2016	(r294380)
+++ stable/10/sys/dev/sfxge/common/efx_nic.c	Wed Jan 20 07:51:23 2016	(r294381)
@@ -381,7 +381,8 @@ efx_nic_create(
 		    EFX_FEATURE_MAC_HEADER_FILTERS |
 		    EFX_FEATURE_MCDI_DMA |
 		    EFX_FEATURE_PIO_BUFFERS |
-		    EFX_FEATURE_FW_ASSISTED_TSO;
+		    EFX_FEATURE_FW_ASSISTED_TSO |
+		    EFX_FEATURE_FW_ASSISTED_TSO_V2;
 		break;
 #endif	/* EFSYS_OPT_HUNTINGTON */
 

Modified: stable/10/sys/dev/sfxge/common/efx_tx.c
==============================================================================
--- stable/10/sys/dev/sfxge/common/efx_tx.c	Wed Jan 20 07:50:00 2016	(r294380)
+++ stable/10/sys/dev/sfxge/common/efx_tx.c	Wed Jan 20 07:51:23 2016	(r294381)
@@ -142,6 +142,7 @@ static efx_tx_ops_t	__efx_tx_falcon_ops 
 	falconsiena_tx_qdesc_post,		/* etxo_qdesc_post */
 	falconsiena_tx_qdesc_dma_create,	/* etxo_qdesc_dma_create */
 	NULL,					/* etxo_qdesc_tso_create */
+	NULL,					/* etxo_qdesc_tso2_create */
 	NULL,					/* etxo_qdesc_vlantci_create */
 #if EFSYS_OPT_QSTATS
 	falconsiena_tx_qstats_update,		/* etxo_qstats_update */
@@ -167,6 +168,7 @@ static efx_tx_ops_t	__efx_tx_siena_ops =
 	falconsiena_tx_qdesc_post,		/* etxo_qdesc_post */
 	falconsiena_tx_qdesc_dma_create,	/* etxo_qdesc_dma_create */
 	NULL,					/* etxo_qdesc_tso_create */
+	NULL,					/* etxo_qdesc_tso2_create */
 	NULL,					/* etxo_qdesc_vlantci_create */
 #if EFSYS_OPT_QSTATS
 	falconsiena_tx_qstats_update,		/* etxo_qstats_update */
@@ -192,6 +194,7 @@ static efx_tx_ops_t	__efx_tx_hunt_ops = 
 	ef10_tx_qdesc_post,			/* etxo_qdesc_post */
 	ef10_tx_qdesc_dma_create,		/* etxo_qdesc_dma_create */
 	hunt_tx_qdesc_tso_create,		/* etxo_qdesc_tso_create */
+	ef10_tx_qdesc_tso2_create,		/* etxo_qdesc_tso2_create */
 	ef10_tx_qdesc_vlantci_create,		/* etxo_qdesc_vlantci_create */
 #if EFSYS_OPT_QSTATS
 	ef10_tx_qstats_update,			/* etxo_qstats_update */
@@ -217,6 +220,7 @@ static efx_tx_ops_t	__efx_tx_medford_ops
 	ef10_tx_qdesc_post,			/* etxo_qdesc_post */
 	ef10_tx_qdesc_dma_create,		/* etxo_qdesc_dma_create */
 	NULL,					/* etxo_qdesc_tso_create */
+	ef10_tx_qdesc_tso2_create,		/* etxo_qdesc_tso2_create */
 	ef10_tx_qdesc_vlantci_create,		/* etxo_qdesc_vlantci_create */
 #if EFSYS_OPT_QSTATS
 	ef10_tx_qstats_update,			/* etxo_qstats_update */
@@ -641,6 +645,24 @@ efx_tx_qdesc_tso_create(
 }
 
 	void
+efx_tx_qdesc_tso2_create(
+	__in			efx_txq_t *etp,
+	__in			uint16_t ipv4_id,
+	__in			uint32_t tcp_seq,
+	__in			uint16_t mss,
+	__out_ecount(count)	efx_desc_t *edp,
+	__in			int count)
+{
+	efx_nic_t *enp = etp->et_enp;
+	efx_tx_ops_t *etxop = enp->en_etxop;
+
+	EFSYS_ASSERT3U(etp->et_magic, ==, EFX_TXQ_MAGIC);
+	EFSYS_ASSERT(etxop->etxo_qdesc_tso2_create != NULL);
+
+	etxop->etxo_qdesc_tso2_create(etp, ipv4_id, tcp_seq, mss, edp, count);
+}
+
+	void
 efx_tx_qdesc_vlantci_create(
 	__in	efx_txq_t *etp,
 	__in	uint16_t tci,

Modified: stable/10/sys/dev/sfxge/common/hunt_impl.h
==============================================================================
--- stable/10/sys/dev/sfxge/common/hunt_impl.h	Wed Jan 20 07:50:00 2016	(r294380)
+++ stable/10/sys/dev/sfxge/common/hunt_impl.h	Wed Jan 20 07:51:23 2016	(r294381)
@@ -674,6 +674,15 @@ hunt_tx_qdesc_tso_create(
 	__out	efx_desc_t *edp);
 
 extern	void
+ef10_tx_qdesc_tso2_create(
+	__in			efx_txq_t *etp,
+	__in			uint16_t ipv4_id,
+	__in			uint32_t tcp_seq,
+	__in			uint16_t tcp_mss,
+	__out_ecount(count)	efx_desc_t *edp,
+	__in			int count);
+
+extern	void
 ef10_tx_qdesc_vlantci_create(
 	__in	efx_txq_t *etp,
 	__in	uint16_t vlan_tci,

Modified: stable/10/sys/dev/sfxge/common/hunt_nic.c
==============================================================================
--- stable/10/sys/dev/sfxge/common/hunt_nic.c	Wed Jan 20 07:50:00 2016	(r294380)
+++ stable/10/sys/dev/sfxge/common/hunt_nic.c	Wed Jan 20 07:51:23 2016	(r294381)
@@ -920,6 +920,13 @@ ef10_get_datapath_caps(
 	else
 		encp->enc_fw_assisted_tso_enabled = B_FALSE;
 
+	/* Check if the firmware supports FATSOv2 */
+	if (MCDI_CMD_DWORD_FIELD(&datapath_capabilities_v2,
+				GET_CAPABILITIES_V2_OUT_TX_TSO_V2) == 1)
+		encp->enc_fw_assisted_tso_v2_enabled = B_TRUE;
+	else
+		encp->enc_fw_assisted_tso_v2_enabled = B_FALSE;
+
 	/* Check if the firmware has vadapter/vport/vswitch support */
 	if (MCDI_CMD_DWORD_FIELD(&datapath_capabilities,
 				GET_CAPABILITIES_OUT_EVB) == 1)

Modified: stable/10/sys/dev/sfxge/common/hunt_tx.c
==============================================================================
--- stable/10/sys/dev/sfxge/common/hunt_tx.c	Wed Jan 20 07:50:00 2016	(r294380)
+++ stable/10/sys/dev/sfxge/common/hunt_tx.c	Wed Jan 20 07:51:23 2016	(r294381)
@@ -87,12 +87,13 @@ efx_mcdi_init_txq(
 	MCDI_IN_SET_DWORD(req, INIT_TXQ_IN_LABEL, label);
 	MCDI_IN_SET_DWORD(req, INIT_TXQ_IN_INSTANCE, instance);
 
-	MCDI_IN_POPULATE_DWORD_6(req, INIT_TXQ_IN_FLAGS,
+	MCDI_IN_POPULATE_DWORD_7(req, INIT_TXQ_IN_FLAGS,
 	    INIT_TXQ_IN_FLAG_BUFF_MODE, 0,
 	    INIT_TXQ_IN_FLAG_IP_CSUM_DIS,
 	    (flags & EFX_TXQ_CKSUM_IPV4) ? 0 : 1,
 	    INIT_TXQ_IN_FLAG_TCP_CSUM_DIS,
 	    (flags & EFX_TXQ_CKSUM_TCPUDP) ? 0 : 1,
+	    INIT_TXQ_EXT_IN_FLAG_TSOV2_EN, (flags & EFX_TXQ_FATSOV2) ? 1 : 0,
 	    INIT_TXQ_IN_FLAG_TCP_UDP_ONLY, 0,
 	    INIT_TXQ_IN_CRC_MODE, 0,
 	    INIT_TXQ_IN_FLAG_TIMESTAMP, 0);
@@ -589,6 +590,38 @@ hunt_tx_qdesc_tso_create(
 }
 
 	void
+ef10_tx_qdesc_tso2_create(
+	__in			efx_txq_t *etp,
+	__in			uint16_t ipv4_id,
+	__in			uint32_t tcp_seq,
+	__in			uint16_t tcp_mss,
+	__out_ecount(count)	efx_desc_t *edp,
+	__in			int count)
+{
+	EFSYS_PROBE4(tx_desc_tso2_create, unsigned int, etp->et_index,
+		    uint16_t, ipv4_id, uint32_t, tcp_seq,
+		    uint16_t, tcp_mss);
+
+	EFSYS_ASSERT(count >= EFX_TX_FATSOV2_OPT_NDESCS);
+
+	EFX_POPULATE_QWORD_5(edp[0].ed_eq,
+			    ESF_DZ_TX_DESC_IS_OPT, 1,
+			    ESF_DZ_TX_OPTION_TYPE,
+			    ESE_DZ_TX_OPTION_DESC_TSO,
+			    ESF_DZ_TX_TSO_OPTION_TYPE,
+			    ESE_DZ_TX_TSO_OPTION_DESC_FATSO2A,
+			    ESF_DZ_TX_TSO_IP_ID, ipv4_id,
+			    ESF_DZ_TX_TSO_TCP_SEQNO, tcp_seq);
+	EFX_POPULATE_QWORD_4(edp[1].ed_eq,
+			    ESF_DZ_TX_DESC_IS_OPT, 1,
+			    ESF_DZ_TX_OPTION_TYPE,
+			    ESE_DZ_TX_OPTION_DESC_TSO,
+			    ESF_DZ_TX_TSO_OPTION_TYPE,
+			    ESE_DZ_TX_TSO_OPTION_DESC_FATSO2B,
+			    ESF_DZ_TX_TSO_TCP_MSS, tcp_mss);
+}
+
+	void
 ef10_tx_qdesc_vlantci_create(
 	__in	efx_txq_t *etp,
 	__in	uint16_t  tci,

Modified: stable/10/sys/dev/sfxge/common/siena_nic.c
==============================================================================
--- stable/10/sys/dev/sfxge/common/siena_nic.c	Wed Jan 20 07:50:00 2016	(r294380)
+++ stable/10/sys/dev/sfxge/common/siena_nic.c	Wed Jan 20 07:51:23 2016	(r294381)
@@ -169,6 +169,7 @@ siena_board_cfg(
 
 	encp->enc_hw_tx_insert_vlan_enabled = B_FALSE;
 	encp->enc_fw_assisted_tso_enabled = B_FALSE;
+	encp->enc_fw_assisted_tso_v2_enabled = B_FALSE;
 	encp->enc_allow_set_mac_with_installed_filters = B_TRUE;
 
 	return (0);

From owner-svn-src-all@freebsd.org  Wed Jan 20 07:52:25 2016
Return-Path: <owner-svn-src-all@freebsd.org>
Delivered-To: svn-src-all@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id 86A62A89F13;
 Wed, 20 Jan 2016 07:52:25 +0000 (UTC)
 (envelope-from arybchik@FreeBSD.org)
Received: from repo.freebsd.org (repo.freebsd.org
 [IPv6:2610:1c1:1:6068::e6a:0])
 (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
 (Client did not present a certificate)
 by mx1.freebsd.org (Postfix) with ESMTPS id 535421A1F;
 Wed, 20 Jan 2016 07:52:25 +0000 (UTC)
 (envelope-from arybchik@FreeBSD.org)
Received: from repo.freebsd.org ([127.0.1.37])
 by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u0K7qOgR027226;
 Wed, 20 Jan 2016 07:52:24 GMT (envelope-from arybchik@FreeBSD.org)
Received: (from arybchik@localhost)
 by repo.freebsd.org (8.15.2/8.15.2/Submit) id u0K7qOoe027225;
 Wed, 20 Jan 2016 07:52:24 GMT (envelope-from arybchik@FreeBSD.org)
Message-Id: <201601200752.u0K7qOoe027225@repo.freebsd.org>
X-Authentication-Warning: repo.freebsd.org: arybchik set sender to
 arybchik@FreeBSD.org using -f
From: Andrew Rybchenko <arybchik@FreeBSD.org>
Date: Wed, 20 Jan 2016 07:52:24 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org
Subject: svn commit: r294382 - stable/10/sys/dev/sfxge/common
X-SVN-Group: stable-10
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.20
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for &quot;
 user&quot; and &quot; projects&quot; \)" <svn-src-all.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-all/>
List-Post: <mailto:svn-src-all@freebsd.org>
List-Help: <mailto:svn-src-all-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Wed, 20 Jan 2016 07:52:25 -0000

Author: arybchik
Date: Wed Jan 20 07:52:24 2016
New Revision: 294382
URL: https://svnweb.freebsd.org/changeset/base/294382

Log:
  MFC r293892
  
  sfxge: use correct register definitions for setting interrupt moderation on Medford
  
  The only value which has changed is the number of rows
  (ER_DZ_EVQ_TMR_REG_ROWS is 2048 vs 1024 for FR_BZ_TIMER_COMMAND_REGP0_ROWS)
  but that isn't used, so this shouldn't change behaviour.
  
  Submitted by:   Mark Spender <mspender at solarflare.com>
  Reviewed by:    gnn
  Sponsored by:   Solarflare Communications, Inc.

Modified:
  stable/10/sys/dev/sfxge/common/hunt_ev.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/sys/dev/sfxge/common/hunt_ev.c
==============================================================================
--- stable/10/sys/dev/sfxge/common/hunt_ev.c	Wed Jan 20 07:51:23 2016	(r294381)
+++ stable/10/sys/dev/sfxge/common/hunt_ev.c	Wed Jan 20 07:52:24 2016	(r294382)
@@ -444,9 +444,9 @@ ef10_ev_qmoderate(
 		    eep->ee_index, &dword, 0);
 	} else {
 		EFX_POPULATE_DWORD_2(dword,
-		    FRF_CZ_TC_TIMER_MODE, mode,
-		    FRF_CZ_TC_TIMER_VAL, timer_val);
-		EFX_BAR_TBL_WRITED(enp, FR_BZ_TIMER_COMMAND_REGP0,
+		    ERF_DZ_TC_TIMER_MODE, mode,
+		    ERF_DZ_TC_TIMER_VAL, timer_val);
+		EFX_BAR_TBL_WRITED(enp, ER_DZ_EVQ_TMR_REG,
 		    eep->ee_index, &dword, 0);
 	}
 

From owner-svn-src-all@freebsd.org  Wed Jan 20 07:53:27 2016
Return-Path: <owner-svn-src-all@freebsd.org>
Delivered-To: svn-src-all@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id CBC75A89002;
 Wed, 20 Jan 2016 07:53:27 +0000 (UTC)
 (envelope-from arybchik@FreeBSD.org)
Received: from repo.freebsd.org (repo.freebsd.org
 [IPv6:2610:1c1:1:6068::e6a:0])
 (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
 (Client did not present a certificate)
 by mx1.freebsd.org (Postfix) with ESMTPS id A33031BC1;
 Wed, 20 Jan 2016 07:53:27 +0000 (UTC)
 (envelope-from arybchik@FreeBSD.org)
Received: from repo.freebsd.org ([127.0.1.37])
 by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u0K7rQWn027317;
 Wed, 20 Jan 2016 07:53:26 GMT (envelope-from arybchik@FreeBSD.org)
Received: (from arybchik@localhost)
 by repo.freebsd.org (8.15.2/8.15.2/Submit) id u0K7rQJH027314;
 Wed, 20 Jan 2016 07:53:26 GMT (envelope-from arybchik@FreeBSD.org)
Message-Id: <201601200753.u0K7rQJH027314@repo.freebsd.org>
X-Authentication-Warning: repo.freebsd.org: arybchik set sender to
 arybchik@FreeBSD.org using -f
From: Andrew Rybchenko <arybchik@FreeBSD.org>
Date: Wed, 20 Jan 2016 07:53:26 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org
Subject: svn commit: r294383 - stable/10/sys/dev/sfxge/common
X-SVN-Group: stable-10
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.20
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for &quot;
 user&quot; and &quot; projects&quot; \)" <svn-src-all.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-all/>
List-Post: <mailto:svn-src-all@freebsd.org>
List-Help: <mailto:svn-src-all-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Wed, 20 Jan 2016 07:53:27 -0000

Author: arybchik
Date: Wed Jan 20 07:53:26 2016
New Revision: 294383
URL: https://svnweb.freebsd.org/changeset/base/294383

Log:
  MFC r293895
  
  sfxge: fix common code VPD iterator and duplicate tag verification
  
  Fix efx_vpd_hunk_next() which has -- since its inception -- failed to
  correctly iterate over the tags and keywords contained in the VPD data.
  Only the first tag or keyword would be returned and the next call with
  *contp == 1 would walk to the end of the data and finish.
  
  This was spotted when fixing up errors spotted by Prefast code analysis
  (which neglected to set all of the out parameters in all successful cases)
  
  Also fix efx_vpd_verify() on Siena and EF10 which (as a side effect of
  correctly iterating over all the tags and keywords) was failing as it
  detected that both the static VPD and dynamic VPD storage contained an
  RV keyword in the VPD-R tag.  This is intentional as the static VPD and
  dynamic VPD are stored separately (firmware merges their contents and
  computes a new RV keyword checksum for the data readable from the VPD
  capability in PCIe configuration space).
  
  Submitted by:   Andrew Lee <alee at solarflare.com>
  Reviewed by:    gnn
  Sponsored by:   Solarflare Communications, Inc.

Modified:
  stable/10/sys/dev/sfxge/common/efx_vpd.c
  stable/10/sys/dev/sfxge/common/hunt_vpd.c
  stable/10/sys/dev/sfxge/common/siena_vpd.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/sys/dev/sfxge/common/efx_vpd.c
==============================================================================
--- stable/10/sys/dev/sfxge/common/efx_vpd.c	Wed Jan 20 07:52:24 2016	(r294382)
+++ stable/10/sys/dev/sfxge/common/efx_vpd.c	Wed Jan 20 07:53:26 2016	(r294383)
@@ -669,7 +669,7 @@ efx_vpd_hunk_next(
 	__in				size_t size,
 	__out				efx_vpd_tag_t *tagp,
 	__out				efx_vpd_keyword_t *keywordp,
-	__out_bcount_opt(*paylenp)	unsigned int *payloadp,
+	__out_opt			unsigned int *payloadp,
 	__out_opt			uint8_t *paylenp,
 	__inout				unsigned int *contp)
 {
@@ -689,12 +689,18 @@ efx_vpd_hunk_next(
 		if ((rc = efx_vpd_next_tag(data, size, &offset,
 		    &tag, &taglen)) != 0)
 			goto fail1;
-		if (tag == EFX_VPD_END)
+
+		if (tag == EFX_VPD_END) {
+			keyword = 0;
+			paylen = 0;
+			index = 0;
 			break;
+		}
 
 		if (tag == EFX_VPD_ID) {
-			if (index == *contp) {
+			if (index++ == *contp) {
 				EFSYS_ASSERT3U(taglen, <, 0x100);
+				keyword = 0;
 				paylen = (uint8_t)MIN(taglen, 0xff);
 
 				goto done;
@@ -705,7 +711,7 @@ efx_vpd_hunk_next(
 				    taglen, pos, &keyword, &keylen)) != 0)
 					goto fail2;
 
-				if (index == *contp) {
+				if (index++ == *contp) {
 					offset += pos + 3;
 					paylen = keylen;
 
@@ -717,9 +723,6 @@ efx_vpd_hunk_next(
 		offset += taglen;
 	}
 
-	*contp = 0;
-	return (0);
-
 done:
 	*tagp = tag;
 	*keywordp = keyword;
@@ -728,7 +731,7 @@ done:
 	if (paylenp != NULL)
 		*paylenp = paylen;
 
-	++(*contp);
+	*contp = index;
 	return (0);
 
 fail2:

Modified: stable/10/sys/dev/sfxge/common/hunt_vpd.c
==============================================================================
--- stable/10/sys/dev/sfxge/common/hunt_vpd.c	Wed Jan 20 07:52:24 2016	(r294382)
+++ stable/10/sys/dev/sfxge/common/hunt_vpd.c	Wed Jan 20 07:53:26 2016	(r294383)
@@ -210,6 +210,13 @@ ef10_vpd_verify(
 		if (dcont == 0)
 			break;
 
+		/*
+		 * Skip the RV keyword. It should be present in both the static
+		 * and dynamic cfg sectors.
+		 */
+		if (dtag == EFX_VPD_RO && dkey == EFX_VPD_KEYWORD('R', 'V'))
+			continue;
+
 		scont = 0;
 		_NOTE(CONSTANTCONDITION)
 		while (1) {

Modified: stable/10/sys/dev/sfxge/common/siena_vpd.c
==============================================================================
--- stable/10/sys/dev/sfxge/common/siena_vpd.c	Wed Jan 20 07:52:24 2016	(r294382)
+++ stable/10/sys/dev/sfxge/common/siena_vpd.c	Wed Jan 20 07:53:26 2016	(r294383)
@@ -326,6 +326,13 @@ siena_vpd_verify(
 		if (dcont == 0)
 			break;
 
+		/*
+		 * Skip the RV keyword. It should be present in both the static
+		 * and dynamic cfg sectors.
+		 */
+		if (dtag == EFX_VPD_RO && dkey == EFX_VPD_KEYWORD('R', 'V'))
+			continue;
+
 		scont = 0;
 		_NOTE(CONSTANTCONDITION)
 		while (1) {

From owner-svn-src-all@freebsd.org  Wed Jan 20 07:57:20 2016
Return-Path: <owner-svn-src-all@freebsd.org>
Delivered-To: svn-src-all@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id 065D0A89165;
 Wed, 20 Jan 2016 07:57:20 +0000 (UTC)
 (envelope-from arybchik@FreeBSD.org)
Received: from repo.freebsd.org (repo.freebsd.org
 [IPv6:2610:1c1:1:6068::e6a:0])
 (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
 (Client did not present a certificate)
 by mx1.freebsd.org (Postfix) with ESMTPS id CD57A1D6A;
 Wed, 20 Jan 2016 07:57:19 +0000 (UTC)
 (envelope-from arybchik@FreeBSD.org)
Received: from repo.freebsd.org ([127.0.1.37])
 by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u0K7vIQA027511;
 Wed, 20 Jan 2016 07:57:18 GMT (envelope-from arybchik@FreeBSD.org)
Received: (from arybchik@localhost)
 by repo.freebsd.org (8.15.2/8.15.2/Submit) id u0K7vI9P027510;
 Wed, 20 Jan 2016 07:57:18 GMT (envelope-from arybchik@FreeBSD.org)
Message-Id: <201601200757.u0K7vI9P027510@repo.freebsd.org>
X-Authentication-Warning: repo.freebsd.org: arybchik set sender to
 arybchik@FreeBSD.org using -f
From: Andrew Rybchenko <arybchik@FreeBSD.org>
Date: Wed, 20 Jan 2016 07:57:18 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org
Subject: svn commit: r294384 - stable/10/sys/dev/sfxge/common
X-SVN-Group: stable-10
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.20
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for &quot;
 user&quot; and &quot; projects&quot; \)" <svn-src-all.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-all/>
List-Post: <mailto:svn-src-all@freebsd.org>
List-Help: <mailto:svn-src-all-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Wed, 20 Jan 2016 07:57:20 -0000

Author: arybchik
Date: Wed Jan 20 07:57:18 2016
New Revision: 294384
URL: https://svnweb.freebsd.org/changeset/base/294384

Log:
  MFC r293899
  
  sfxge: cleanup: adjust efx_mcdi_get_port_modes() comment for clarity
  
  Fix an explanatory comment which did not explain very well.
  
  Submitted by:   Richard Houldsworth <rhouldsworth at solarflare.com>
  Reviewed by:    gnn
  Sponsored by:   Solarflare Communications, Inc.

Modified:
  stable/10/sys/dev/sfxge/common/hunt_nic.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/sys/dev/sfxge/common/hunt_nic.c
==============================================================================
--- stable/10/sys/dev/sfxge/common/hunt_nic.c	Wed Jan 20 07:53:26 2016	(r294383)
+++ stable/10/sys/dev/sfxge/common/hunt_nic.c	Wed Jan 20 07:57:18 2016	(r294384)
@@ -112,7 +112,10 @@ efx_mcdi_get_port_modes(
 		goto fail1;
 	}
 
-	/* Accept pre-Medford size (8 bytes - no CurrentMode field) */
+	/*
+	 * Require only Modes and DefaultMode fields.
+	 * (CurrentMode field was added for Medford)
+	 */
 	if (req.emr_out_length_used <
 	    MC_CMD_GET_PORT_MODES_OUT_CURRENT_MODE_OFST) {
 		rc = EMSGSIZE;

From owner-svn-src-all@freebsd.org  Wed Jan 20 07:59:06 2016
Return-Path: <owner-svn-src-all@freebsd.org>
Delivered-To: svn-src-all@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id 40F80A891FE;
 Wed, 20 Jan 2016 07:59:06 +0000 (UTC)
 (envelope-from arybchik@FreeBSD.org)
Received: from repo.freebsd.org (repo.freebsd.org
 [IPv6:2610:1c1:1:6068::e6a:0])
 (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
 (Client did not present a certificate)
 by mx1.freebsd.org (Postfix) with ESMTPS id 194371EC1;
 Wed, 20 Jan 2016 07:59:06 +0000 (UTC)
 (envelope-from arybchik@FreeBSD.org)
Received: from repo.freebsd.org ([127.0.1.37])
 by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u0K7x5vn027624;
 Wed, 20 Jan 2016 07:59:05 GMT (envelope-from arybchik@FreeBSD.org)
Received: (from arybchik@localhost)
 by repo.freebsd.org (8.15.2/8.15.2/Submit) id u0K7x4gl027621;
 Wed, 20 Jan 2016 07:59:04 GMT (envelope-from arybchik@FreeBSD.org)
Message-Id: <201601200759.u0K7x4gl027621@repo.freebsd.org>
X-Authentication-Warning: repo.freebsd.org: arybchik set sender to
 arybchik@FreeBSD.org using -f
From: Andrew Rybchenko <arybchik@FreeBSD.org>
Date: Wed, 20 Jan 2016 07:59:04 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org
Subject: svn commit: r294385 - stable/10/sys/dev/sfxge/common
X-SVN-Group: stable-10
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.20
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for &quot;
 user&quot; and &quot; projects&quot; \)" <svn-src-all.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-all/>
List-Post: <mailto:svn-src-all@freebsd.org>
List-Help: <mailto:svn-src-all-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Wed, 20 Jan 2016 07:59:06 -0000

Author: arybchik
Date: Wed Jan 20 07:59:04 2016
New Revision: 294385
URL: https://svnweb.freebsd.org/changeset/base/294385

Log:
  MFC r293900
  
  sfxge: add table entries for License NVRAM partition
  
  Submitted by:   Richard Houldsworth <rhouldsworth at solarflare.com>
  Reviewed by:    gnn
  Sponsored by:   Solarflare Communications, Inc.

Modified:
  stable/10/sys/dev/sfxge/common/efx.h
  stable/10/sys/dev/sfxge/common/hunt_nvram.c
  stable/10/sys/dev/sfxge/common/siena_nvram.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/sys/dev/sfxge/common/efx.h
==============================================================================
--- stable/10/sys/dev/sfxge/common/efx.h	Wed Jan 20 07:57:18 2016	(r294384)
+++ stable/10/sys/dev/sfxge/common/efx.h	Wed Jan 20 07:59:04 2016	(r294385)
@@ -1317,6 +1317,7 @@ typedef enum efx_nvram_type_e {
 	EFX_NVRAM_CPLD,
 	EFX_NVRAM_FPGA_BACKUP,
 	EFX_NVRAM_DYNAMIC_CFG,
+	EFX_NVRAM_LICENSE,
 	EFX_NVRAM_NTYPES,
 } efx_nvram_type_t;
 

Modified: stable/10/sys/dev/sfxge/common/hunt_nvram.c
==============================================================================
--- stable/10/sys/dev/sfxge/common/hunt_nvram.c	Wed Jan 20 07:57:18 2016	(r294384)
+++ stable/10/sys/dev/sfxge/common/hunt_nvram.c	Wed Jan 20 07:59:04 2016	(r294385)
@@ -1541,7 +1541,11 @@ static ef10_parttbl_entry_t hunt_parttbl
 	{NVRAM_PARTITION_TYPE_FPGA_BACKUP,	   1, EFX_NVRAM_FPGA_BACKUP},
 	{NVRAM_PARTITION_TYPE_FPGA_BACKUP,	   2, EFX_NVRAM_FPGA_BACKUP},
 	{NVRAM_PARTITION_TYPE_FPGA_BACKUP,	   3, EFX_NVRAM_FPGA_BACKUP},
-	{NVRAM_PARTITION_TYPE_FPGA_BACKUP,	   4, EFX_NVRAM_FPGA_BACKUP}
+	{NVRAM_PARTITION_TYPE_FPGA_BACKUP,	   4, EFX_NVRAM_FPGA_BACKUP},
+	{NVRAM_PARTITION_TYPE_LICENSE,		   1, EFX_NVRAM_LICENSE},
+	{NVRAM_PARTITION_TYPE_LICENSE,		   2, EFX_NVRAM_LICENSE},
+	{NVRAM_PARTITION_TYPE_LICENSE,		   3, EFX_NVRAM_LICENSE},
+	{NVRAM_PARTITION_TYPE_LICENSE,		   4, EFX_NVRAM_LICENSE}
 };
 
 static ef10_parttbl_entry_t medford_parttbl[] = {
@@ -1572,7 +1576,11 @@ static ef10_parttbl_entry_t medford_part
 	{NVRAM_PARTITION_TYPE_FPGA_BACKUP,	   1, EFX_NVRAM_FPGA_BACKUP},
 	{NVRAM_PARTITION_TYPE_FPGA_BACKUP,	   2, EFX_NVRAM_FPGA_BACKUP},
 	{NVRAM_PARTITION_TYPE_FPGA_BACKUP,	   3, EFX_NVRAM_FPGA_BACKUP},
-	{NVRAM_PARTITION_TYPE_FPGA_BACKUP,	   4, EFX_NVRAM_FPGA_BACKUP}
+	{NVRAM_PARTITION_TYPE_FPGA_BACKUP,	   4, EFX_NVRAM_FPGA_BACKUP},
+	{NVRAM_PARTITION_TYPE_LICENSE,		   1, EFX_NVRAM_LICENSE},
+	{NVRAM_PARTITION_TYPE_LICENSE,		   2, EFX_NVRAM_LICENSE},
+	{NVRAM_PARTITION_TYPE_LICENSE,		   3, EFX_NVRAM_LICENSE},
+	{NVRAM_PARTITION_TYPE_LICENSE,		   4, EFX_NVRAM_LICENSE}
 };
 
 static	__checkReturn		efx_rc_t

Modified: stable/10/sys/dev/sfxge/common/siena_nvram.c
==============================================================================
--- stable/10/sys/dev/sfxge/common/siena_nvram.c	Wed Jan 20 07:57:18 2016	(r294384)
+++ stable/10/sys/dev/sfxge/common/siena_nvram.c	Wed Jan 20 07:59:04 2016	(r294385)
@@ -227,6 +227,8 @@ static siena_parttbl_entry_t siena_partt
 	{MC_CMD_NVRAM_TYPE_FC_FW,		2, EFX_NVRAM_FCFW},
 	{MC_CMD_NVRAM_TYPE_CPLD,		1, EFX_NVRAM_CPLD},
 	{MC_CMD_NVRAM_TYPE_CPLD,		2, EFX_NVRAM_CPLD},
+	{MC_CMD_NVRAM_TYPE_LICENSE,		1, EFX_NVRAM_LICENSE},
+	{MC_CMD_NVRAM_TYPE_LICENSE,		2, EFX_NVRAM_LICENSE}
 };
 
 	__checkReturn		efx_rc_t

From owner-svn-src-all@freebsd.org  Wed Jan 20 08:01:24 2016
Return-Path: <owner-svn-src-all@freebsd.org>
Delivered-To: svn-src-all@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2C5A3A89579;
 Wed, 20 Jan 2016 08:01:24 +0000 (UTC)
 (envelope-from arybchik@FreeBSD.org)
Received: from repo.freebsd.org (repo.freebsd.org
 [IPv6:2610:1c1:1:6068::e6a:0])
 (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
 (Client did not present a certificate)
 by mx1.freebsd.org (Postfix) with ESMTPS id B52D2114C;
 Wed, 20 Jan 2016 08:01:23 +0000 (UTC)
 (envelope-from arybchik@FreeBSD.org)
Received: from repo.freebsd.org ([127.0.1.37])
 by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u0K81M1e027805;
 Wed, 20 Jan 2016 08:01:22 GMT (envelope-from arybchik@FreeBSD.org)
Received: (from arybchik@localhost)
 by repo.freebsd.org (8.15.2/8.15.2/Submit) id u0K81MYl027797;
 Wed, 20 Jan 2016 08:01:22 GMT (envelope-from arybchik@FreeBSD.org)
Message-Id: <201601200801.u0K81MYl027797@repo.freebsd.org>
X-Authentication-Warning: repo.freebsd.org: arybchik set sender to
 arybchik@FreeBSD.org using -f
From: Andrew Rybchenko <arybchik@FreeBSD.org>
Date: Wed, 20 Jan 2016 08:01:22 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org
Subject: svn commit: r294386 - in stable/10/sys: conf dev/sfxge/common
 modules/sfxge
X-SVN-Group: stable-10
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.20
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for &quot;
 user&quot; and &quot; projects&quot; \)" <svn-src-all.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-all/>
List-Post: <mailto:svn-src-all@freebsd.org>
List-Help: <mailto:svn-src-all-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Wed, 20 Jan 2016 08:01:24 -0000

Author: arybchik
Date: Wed Jan 20 08:01:21 2016
New Revision: 294386
URL: https://svnweb.freebsd.org/changeset/base/294386

Log:
  MFC r293901,r294371
  
  sfxge: add accessors for license-related MCDI calls to common code
  
  Add support for Huntington MCDI licensing interface to common code.
  Ported from Linux net driver IOCTL functions with restructuring for
  initial support for V3 licensing API.
  
  Submitted by:   Richard Houldsworth <rhouldsworth at solarflare.com>
  Reviewed by:    gnn
  Sponsored by:   Solarflare Communications, Inc.

Added:
  stable/10/sys/dev/sfxge/common/efx_lic.c
     - copied unchanged from r293901, head/sys/dev/sfxge/common/efx_lic.c
Modified:
  stable/10/sys/conf/files.amd64
  stable/10/sys/dev/sfxge/common/efsys.h
  stable/10/sys/dev/sfxge/common/efx.h
  stable/10/sys/dev/sfxge/common/efx_check.h
  stable/10/sys/dev/sfxge/common/efx_impl.h
  stable/10/sys/dev/sfxge/common/efx_nic.c
  stable/10/sys/modules/sfxge/Makefile
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/sys/conf/files.amd64
==============================================================================
--- stable/10/sys/conf/files.amd64	Wed Jan 20 07:59:04 2016	(r294385)
+++ stable/10/sys/conf/files.amd64	Wed Jan 20 08:01:21 2016	(r294386)
@@ -317,6 +317,7 @@ dev/sfxge/common/efx_ev.c	optional	sfxge
 dev/sfxge/common/efx_filter.c	optional	sfxge pci
 dev/sfxge/common/efx_hash.c	optional	sfxge pci
 dev/sfxge/common/efx_intr.c	optional	sfxge pci
+dev/sfxge/common/efx_lic.c	optional	sfxge pci
 dev/sfxge/common/efx_mac.c	optional	sfxge pci
 dev/sfxge/common/efx_mcdi.c	optional	sfxge pci
 dev/sfxge/common/efx_mon.c	optional	sfxge pci

Modified: stable/10/sys/dev/sfxge/common/efsys.h
==============================================================================
--- stable/10/sys/dev/sfxge/common/efsys.h	Wed Jan 20 07:59:04 2016	(r294385)
+++ stable/10/sys/dev/sfxge/common/efsys.h	Wed Jan 20 08:01:21 2016	(r294386)
@@ -211,6 +211,8 @@ sfxge_map_mbuf_fast(bus_dma_tag_t tag, b
 #define	__out_ecount_opt(_n)
 #define	__out_bcount(_n)
 #define	__out_bcount_opt(_n)
+#define	__out_bcount_part(_n, _l)
+#define	__out_bcount_part_opt(_n, _l)
 
 #define	__deref_out
 
@@ -293,6 +295,8 @@ sfxge_map_mbuf_fast(bus_dma_tag_t tag, b
 
 #define	EFSYS_OPT_DECODE_INTR_FATAL 1
 
+#define	EFSYS_OPT_LICENSING 0
+
 /* ID */
 
 typedef struct __efsys_identifier_s	efsys_identifier_t;

Modified: stable/10/sys/dev/sfxge/common/efx.h
==============================================================================
--- stable/10/sys/dev/sfxge/common/efx.h	Wed Jan 20 07:59:04 2016	(r294385)
+++ stable/10/sys/dev/sfxge/common/efx.h	Wed Jan 20 08:01:21 2016	(r294386)
@@ -2310,6 +2310,57 @@ efx_hash_bytes(
 	__in			size_t length,
 	__in			uint32_t init);
 
+#if EFSYS_OPT_LICENSING
+
+/* LICENSING */
+
+typedef struct efx_key_stats_s {
+	uint32_t	eks_valid;
+	uint32_t	eks_invalid;
+	uint32_t	eks_blacklisted;
+	uint32_t	eks_unverifiable;
+	uint32_t	eks_wrong_node;
+	uint32_t	eks_licensed_apps_lo;
+	uint32_t	eks_licensed_apps_hi;
+	uint32_t	eks_licensed_features_lo;
+	uint32_t	eks_licensed_features_hi;
+} efx_key_stats_t;
+
+extern	__checkReturn		efx_rc_t
+efx_lic_init(
+	__in			efx_nic_t *enp);
+
+extern				void
+efx_lic_fini(
+	__in			efx_nic_t *enp);
+
+extern	__checkReturn	efx_rc_t
+efx_lic_update_licenses(
+	__in		efx_nic_t *enp);
+
+extern	__checkReturn	efx_rc_t
+efx_lic_get_key_stats(
+	__in		efx_nic_t *enp,
+	__out		efx_key_stats_t *ksp);
+
+extern	__checkReturn	efx_rc_t
+efx_lic_app_state(
+	__in		efx_nic_t *enp,
+	__in		uint64_t app_id,
+	__out		boolean_t *licensedp);
+
+extern	__checkReturn	efx_rc_t
+efx_lic_get_id(
+	__in		efx_nic_t *enp,
+	__in		size_t buffer_size,
+	__out		uint32_t *typep,
+	__out		size_t *lengthp,
+	__out_opt	uint8_t *bufferp);
+
+
+#endif	/* EFSYS_OPT_LICENSING */
+
+
 
 #ifdef	__cplusplus
 }

Modified: stable/10/sys/dev/sfxge/common/efx_check.h
==============================================================================
--- stable/10/sys/dev/sfxge/common/efx_check.h	Wed Jan 20 07:59:04 2016	(r294385)
+++ stable/10/sys/dev/sfxge/common/efx_check.h	Wed Jan 20 08:01:21 2016	(r294386)
@@ -401,4 +401,15 @@
 # endif
 #endif /* EFSYS_OPT_BIST */
 
+/* Support MCDI licensing API */
+#if EFSYS_OPT_LICENSING
+# if !EFSYS_OPT_MCDI
+#  error "LICENSING requires MCDI"
+# endif
+# if !EFSYS_HAS_UINT64
+#  error "LICENSING requires UINT64"
+# endif
+#endif /* EFSYS_OPT_LICENSING */
+
+
 #endif /* _SYS_EFX_CHECK_H */

Modified: stable/10/sys/dev/sfxge/common/efx_impl.h
==============================================================================
--- stable/10/sys/dev/sfxge/common/efx_impl.h	Wed Jan 20 07:59:04 2016	(r294385)
+++ stable/10/sys/dev/sfxge/common/efx_impl.h	Wed Jan 20 08:01:21 2016	(r294386)
@@ -84,6 +84,7 @@ extern "C" {
 #define	EFX_MOD_WOL		0x00000800
 #define	EFX_MOD_FILTER		0x00001000
 #define	EFX_MOD_PKTFILTER	0x00002000
+#define	EFX_MOD_LIC		0x00004000
 
 #define	EFX_RESET_MAC		0x00000001
 #define	EFX_RESET_PHY		0x00000002
@@ -591,6 +592,18 @@ efx_mcdi_nvram_test(
 
 #endif /* EFSYS_OPT_VPD || EFSYS_OPT_NVRAM */
 
+#if EFSYS_OPT_LICENSING
+
+typedef struct efx_lic_ops_s {
+	efx_rc_t	(*elo_update_licenses)(efx_nic_t *);
+	efx_rc_t	(*elo_get_key_stats)(efx_nic_t *, efx_key_stats_t *);
+	efx_rc_t	(*elo_app_state)(efx_nic_t *, uint64_t, boolean_t *);
+	efx_rc_t	(*elo_get_id)(efx_nic_t *, size_t, uint32_t *,
+				      size_t *, uint8_t *);
+} efx_lic_ops_t;
+
+#endif
+
 typedef struct efx_drv_cfg_s {
 	uint32_t		edc_min_vi_count;
 	uint32_t		edc_max_vi_count;
@@ -640,6 +653,9 @@ struct efx_nic_s {
 	uint32_t		en_rss_context;
 #endif	/* EFSYS_OPT_RX_SCALE */
 	uint32_t		en_vport_id;
+#if EFSYS_OPT_LICENSING
+	efx_lic_ops_t		*en_elop;
+#endif
 	union {
 #if EFSYS_OPT_FALCON
 		struct {

Copied: stable/10/sys/dev/sfxge/common/efx_lic.c (from r293901, head/sys/dev/sfxge/common/efx_lic.c)
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ stable/10/sys/dev/sfxge/common/efx_lic.c	Wed Jan 20 08:01:21 2016	(r294386, copy of r293901, head/sys/dev/sfxge/common/efx_lic.c)
@@ -0,0 +1,792 @@
+/*-
+ * Copyright (c) 2009-2015 Solarflare Communications Inc.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ *    this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ *    this list of conditions and the following disclaimer in the documentation
+ *    and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+ * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+ * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+ * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+ * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * The views and conclusions contained in the software and documentation are
+ * those of the authors and should not be interpreted as representing official
+ * policies, either expressed or implied, of the FreeBSD Project.
+ */
+
+#include <sys/cdefs.h>
+__FBSDID("$FreeBSD$");
+
+#include "efx.h"
+#include "efx_impl.h"
+
+#if EFSYS_OPT_LICENSING
+
+#if EFSYS_OPT_SIENA
+
+static	__checkReturn	efx_rc_t
+efx_mcdi_fc_license_update_license(
+	__in		efx_nic_t *enp);
+
+static	__checkReturn	efx_rc_t
+efx_mcdi_fc_license_get_key_stats(
+	__in		efx_nic_t *enp,
+	__out		efx_key_stats_t *eksp);
+
+static efx_lic_ops_t	__efx_lic_v1_ops = {
+	efx_mcdi_fc_license_update_license,	/* elo_update_licenses */
+	efx_mcdi_fc_license_get_key_stats,	/* elo_get_key_stats */
+	NULL,					/* elo_app_state */
+	NULL,					/* elo_get_id */
+};
+
+#endif	/* EFSYS_OPT_SIENA */
+
+#if EFSYS_OPT_HUNTINGTON
+
+static	__checkReturn	efx_rc_t
+efx_mcdi_licensing_update_licenses(
+	__in		efx_nic_t *enp);
+
+static	__checkReturn	efx_rc_t
+efx_mcdi_licensing_get_key_stats(
+	__in		efx_nic_t *enp,
+	__out		efx_key_stats_t *eksp);
+
+static	__checkReturn	efx_rc_t
+efx_mcdi_licensed_app_state(
+	__in		efx_nic_t *enp,
+	__in		uint64_t app_id,
+	__out		boolean_t *licensedp);
+
+static efx_lic_ops_t	__efx_lic_v2_ops = {
+	efx_mcdi_licensing_update_licenses,	/* elo_update_licenses */
+	efx_mcdi_licensing_get_key_stats,	/* elo_get_key_stats */
+	efx_mcdi_licensed_app_state,		/* elo_app_state */
+	NULL,					/* elo_get_id */
+};
+
+#endif	/* EFSYS_OPT_HUNTINGTON */
+
+#if EFSYS_OPT_MEDFORD
+
+static	__checkReturn	efx_rc_t
+efx_mcdi_licensing_v3_update_licenses(
+	__in		efx_nic_t *enp);
+
+static	__checkReturn	efx_rc_t
+efx_mcdi_licensing_v3_report_license(
+	__in		efx_nic_t *enp,
+	__out		efx_key_stats_t *eksp);
+
+static	__checkReturn	efx_rc_t
+efx_mcdi_licensing_v3_app_state(
+	__in		efx_nic_t *enp,
+	__in		uint64_t app_id,
+	__out		boolean_t *licensedp);
+
+static	__checkReturn	efx_rc_t
+efx_mcdi_licensing_v3_get_id(
+	__in		efx_nic_t *enp,
+	__in		size_t buffer_size,
+	__out		uint32_t *typep,
+	__out		size_t *lengthp,
+	__out_bcount_part_opt(buffer_size, *lengthp)
+			uint8_t *bufferp);
+
+static efx_lic_ops_t	__efx_lic_v3_ops = {
+	efx_mcdi_licensing_v3_update_licenses,	/* elo_update_licenses */
+	efx_mcdi_licensing_v3_report_license,	/* elo_get_key_stats */
+	efx_mcdi_licensing_v3_app_state,	/* elo_app_state */
+	efx_mcdi_licensing_v3_get_id,		/* elo_get_id */
+};
+
+#endif	/* EFSYS_OPT_MEDFORD */
+
+
+/* V1 Licensing - used in Siena Modena only */
+
+#if EFSYS_OPT_SIENA
+
+static	__checkReturn	efx_rc_t
+efx_mcdi_fc_license_update_license(
+	__in		efx_nic_t *enp)
+{
+	efx_mcdi_req_t req;
+	uint8_t payload[MC_CMD_FC_IN_LICENSE_LEN];
+	efx_rc_t rc;
+
+	EFSYS_ASSERT(enp->en_family == EFX_FAMILY_SIENA);
+
+	(void) memset(payload, 0, sizeof (payload));
+	req.emr_cmd = MC_CMD_FC_OP_LICENSE;
+	req.emr_in_buf = payload;
+	req.emr_in_length = MC_CMD_FC_IN_LICENSE_LEN;
+	req.emr_out_buf = payload;
+	req.emr_out_length = 0;
+
+	MCDI_IN_SET_DWORD(req, FC_IN_LICENSE_OP,
+	    MC_CMD_FC_IN_LICENSE_UPDATE_LICENSE);
+
+	efx_mcdi_execute(enp, &req);
+
+	if (req.emr_rc != 0) {
+		rc = req.emr_rc;
+		goto fail1;
+	}
+
+	if (req.emr_out_length_used != 0) {
+		rc = EIO;
+		goto fail2;
+	}
+
+	return (0);
+
+fail2:
+	EFSYS_PROBE(fail2);
+fail1:
+	EFSYS_PROBE1(fail1, efx_rc_t, rc);
+
+	return (rc);
+}
+
+static	__checkReturn	efx_rc_t
+efx_mcdi_fc_license_get_key_stats(
+	__in		efx_nic_t *enp,
+	__out		efx_key_stats_t *eksp)
+{
+	efx_mcdi_req_t req;
+	uint8_t payload[MAX(MC_CMD_FC_IN_LICENSE_LEN,
+			    MC_CMD_FC_OUT_LICENSE_LEN)];
+	efx_rc_t rc;
+
+	EFSYS_ASSERT(enp->en_family == EFX_FAMILY_SIENA);
+
+	(void) memset(payload, 0, sizeof (payload));
+	req.emr_cmd = MC_CMD_FC_OP_LICENSE;
+	req.emr_in_buf = payload;
+	req.emr_in_length = MC_CMD_FC_IN_LICENSE_LEN;
+	req.emr_out_buf = payload;
+	req.emr_out_length = MC_CMD_FC_OUT_LICENSE_LEN;
+
+	MCDI_IN_SET_DWORD(req, FC_IN_LICENSE_OP,
+	    MC_CMD_FC_IN_LICENSE_GET_KEY_STATS);
+
+	efx_mcdi_execute(enp, &req);
+
+	if (req.emr_rc != 0) {
+		rc = req.emr_rc;
+		goto fail1;
+	}
+
+	if (req.emr_out_length_used < MC_CMD_FC_OUT_LICENSE_LEN) {
+		rc = EMSGSIZE;
+		goto fail2;
+	}
+
+	eksp->eks_valid =
+		MCDI_OUT_DWORD(req, FC_OUT_LICENSE_VALID_KEYS);
+	eksp->eks_invalid =
+		MCDI_OUT_DWORD(req, FC_OUT_LICENSE_INVALID_KEYS);
+	eksp->eks_blacklisted =
+		MCDI_OUT_DWORD(req, FC_OUT_LICENSE_BLACKLISTED_KEYS);
+	eksp->eks_unverifiable = 0;
+	eksp->eks_wrong_node = 0;
+	eksp->eks_licensed_apps_lo = 0;
+	eksp->eks_licensed_apps_hi = 0;
+	eksp->eks_licensed_features_lo = 0;
+	eksp->eks_licensed_features_hi = 0;
+
+	return (0);
+
+fail2:
+	EFSYS_PROBE(fail2);
+fail1:
+	EFSYS_PROBE1(fail1, efx_rc_t, rc);
+
+	return (rc);
+}
+
+#endif	/* EFSYS_OPT_SIENA */
+
+/* V2 Licensing - used by Huntington family only. See SF-113611-TC */
+
+#if EFSYS_OPT_HUNTINGTON
+
+static	__checkReturn	efx_rc_t
+efx_mcdi_licensed_app_state(
+	__in		efx_nic_t *enp,
+	__in		uint64_t app_id,
+	__out		boolean_t *licensedp)
+{
+	efx_mcdi_req_t req;
+	uint8_t payload[MAX(MC_CMD_GET_LICENSED_APP_STATE_IN_LEN,
+			    MC_CMD_GET_LICENSED_APP_STATE_OUT_LEN)];
+	uint32_t app_state;
+	efx_rc_t rc;
+
+	EFSYS_ASSERT(enp->en_family == EFX_FAMILY_HUNTINGTON);
+
+	/* V2 licensing supports 32bit app id only */
+	if ((app_id >> 32) != 0) {
+		rc = EINVAL;
+		goto fail1;
+	}
+
+	(void) memset(payload, 0, sizeof (payload));
+	req.emr_cmd = MC_CMD_GET_LICENSED_APP_STATE;
+	req.emr_in_buf = payload;
+	req.emr_in_length = MC_CMD_GET_LICENSED_APP_STATE_IN_LEN;
+	req.emr_out_buf = payload;
+	req.emr_out_length = MC_CMD_GET_LICENSED_APP_STATE_OUT_LEN;
+
+	MCDI_IN_SET_DWORD(req, GET_LICENSED_APP_STATE_IN_APP_ID,
+		    app_id & 0xffffffff);
+
+	efx_mcdi_execute(enp, &req);
+
+	if (req.emr_rc != 0) {
+		rc = req.emr_rc;
+		goto fail2;
+	}
+
+	if (req.emr_out_length_used < MC_CMD_GET_LICENSED_APP_STATE_OUT_LEN) {
+		rc = EMSGSIZE;
+		goto fail3;
+	}
+
+	app_state = (MCDI_OUT_DWORD(req, GET_LICENSED_APP_STATE_OUT_STATE));
+	if (app_state != MC_CMD_GET_LICENSED_APP_STATE_OUT_NOT_LICENSED) {
+		*licensedp = B_TRUE;
+	} else {
+		*licensedp = B_FALSE;
+	}
+
+	return (0);
+
+fail3:
+	EFSYS_PROBE(fail3);
+fail2:
+	EFSYS_PROBE(fail2);
+fail1:
+	EFSYS_PROBE1(fail1, efx_rc_t, rc);
+
+	return (rc);
+}
+
+static	__checkReturn	efx_rc_t
+efx_mcdi_licensing_update_licenses(
+	__in		efx_nic_t *enp)
+{
+	efx_mcdi_req_t req;
+	uint8_t payload[MC_CMD_LICENSING_IN_LEN];
+	efx_rc_t rc;
+
+	EFSYS_ASSERT(enp->en_family == EFX_FAMILY_HUNTINGTON);
+
+	(void) memset(payload, 0, sizeof (payload));
+	req.emr_cmd = MC_CMD_LICENSING;
+	req.emr_in_buf = payload;
+	req.emr_in_length = MC_CMD_LICENSING_IN_LEN;
+	req.emr_out_buf = payload;
+	req.emr_out_length = 0;
+
+	MCDI_IN_SET_DWORD(req, LICENSING_IN_OP,
+	    MC_CMD_LICENSING_IN_OP_UPDATE_LICENSE);
+
+	efx_mcdi_execute(enp, &req);
+
+	if (req.emr_rc != 0) {
+		rc = req.emr_rc;
+		goto fail1;
+	}
+
+	if (req.emr_out_length_used != 0) {
+		rc = EIO;
+		goto fail2;
+	}
+
+	return (0);
+
+fail2:
+	EFSYS_PROBE(fail2);
+fail1:
+	EFSYS_PROBE1(fail1, efx_rc_t, rc);
+
+	return (rc);
+}
+
+static	__checkReturn	efx_rc_t
+efx_mcdi_licensing_get_key_stats(
+	__in		efx_nic_t *enp,
+	__out		efx_key_stats_t *eksp)
+{
+	efx_mcdi_req_t req;
+	uint8_t payload[MAX(MC_CMD_LICENSING_IN_LEN,
+			    MC_CMD_LICENSING_OUT_LEN)];
+	efx_rc_t rc;
+
+	EFSYS_ASSERT(enp->en_family == EFX_FAMILY_HUNTINGTON);
+
+	(void) memset(payload, 0, sizeof (payload));
+	req.emr_cmd = MC_CMD_LICENSING;
+	req.emr_in_buf = payload;
+	req.emr_in_length = MC_CMD_LICENSING_IN_LEN;
+	req.emr_out_buf = payload;
+	req.emr_out_length = MC_CMD_LICENSING_OUT_LEN;
+
+	MCDI_IN_SET_DWORD(req, LICENSING_IN_OP,
+	    MC_CMD_LICENSING_IN_OP_GET_KEY_STATS);
+
+	efx_mcdi_execute(enp, &req);
+
+	if (req.emr_rc != 0) {
+		rc = req.emr_rc;
+		goto fail1;
+	}
+
+	if (req.emr_out_length_used < MC_CMD_LICENSING_OUT_LEN) {
+		rc = EMSGSIZE;
+		goto fail2;
+	}
+
+	eksp->eks_valid =
+		MCDI_OUT_DWORD(req, LICENSING_OUT_VALID_APP_KEYS);
+	eksp->eks_invalid =
+		MCDI_OUT_DWORD(req, LICENSING_OUT_INVALID_APP_KEYS);
+	eksp->eks_blacklisted =
+		MCDI_OUT_DWORD(req, LICENSING_OUT_BLACKLISTED_APP_KEYS);
+	eksp->eks_unverifiable =
+		MCDI_OUT_DWORD(req, LICENSING_OUT_UNVERIFIABLE_APP_KEYS);
+	eksp->eks_wrong_node =
+		MCDI_OUT_DWORD(req, LICENSING_OUT_WRONG_NODE_APP_KEYS);
+	eksp->eks_licensed_apps_lo = 0;
+	eksp->eks_licensed_apps_hi = 0;
+	eksp->eks_licensed_features_lo = 0;
+	eksp->eks_licensed_features_hi = 0;
+
+	return (0);
+
+fail2:
+	EFSYS_PROBE(fail2);
+fail1:
+	EFSYS_PROBE1(fail1, efx_rc_t, rc);
+
+	return (rc);
+}
+
+#endif	/* EFSYS_OPT_HUNTINGTON */
+
+/* V3 Licensing - used starting from Medford family. See SF-114884-SW */
+
+#if EFSYS_OPT_MEDFORD
+
+static	__checkReturn	efx_rc_t
+efx_mcdi_licensing_v3_update_licenses(
+	__in		efx_nic_t *enp)
+{
+	efx_mcdi_req_t req;
+	uint8_t payload[MC_CMD_LICENSING_V3_IN_LEN];
+	efx_rc_t rc;
+
+	EFSYS_ASSERT(enp->en_family == EFX_FAMILY_MEDFORD);
+
+	(void) memset(payload, 0, sizeof (payload));
+	req.emr_cmd = MC_CMD_LICENSING_V3;
+	req.emr_in_buf = payload;
+	req.emr_in_length = MC_CMD_LICENSING_V3_IN_LEN;
+	req.emr_out_buf = NULL;
+	req.emr_out_length = 0;
+
+	MCDI_IN_SET_DWORD(req, LICENSING_V3_IN_OP,
+	    MC_CMD_LICENSING_V3_IN_OP_UPDATE_LICENSE);
+
+	efx_mcdi_execute(enp, &req);
+
+	if (req.emr_rc != 0) {
+		rc = req.emr_rc;
+		goto fail1;
+	}
+
+	return (0);
+
+fail1:
+	EFSYS_PROBE1(fail1, efx_rc_t, rc);
+
+	return (rc);
+}
+
+static	__checkReturn	efx_rc_t
+efx_mcdi_licensing_v3_report_license(
+	__in		efx_nic_t *enp,
+	__out		efx_key_stats_t *eksp)
+{
+	efx_mcdi_req_t req;
+	uint8_t payload[MAX(MC_CMD_LICENSING_V3_IN_LEN,
+			    MC_CMD_LICENSING_V3_OUT_LEN)];
+	efx_rc_t rc;
+
+	EFSYS_ASSERT(enp->en_family == EFX_FAMILY_MEDFORD);
+
+	(void) memset(payload, 0, sizeof (payload));
+	req.emr_cmd = MC_CMD_LICENSING_V3;
+	req.emr_in_buf = payload;
+	req.emr_in_length = MC_CMD_LICENSING_V3_IN_LEN;
+	req.emr_out_buf = payload;
+	req.emr_out_length = MC_CMD_LICENSING_V3_OUT_LEN;
+
+	MCDI_IN_SET_DWORD(req, LICENSING_V3_IN_OP,
+	    MC_CMD_LICENSING_V3_IN_OP_REPORT_LICENSE);
+
+	efx_mcdi_execute(enp, &req);
+
+	if (req.emr_rc != 0) {
+		rc = req.emr_rc;
+		goto fail1;
+	}
+
+	if (req.emr_out_length_used < MC_CMD_LICENSING_V3_OUT_LEN) {
+		rc = EMSGSIZE;
+		goto fail2;
+	}
+
+	eksp->eks_valid =
+		MCDI_OUT_DWORD(req, LICENSING_V3_OUT_VALID_KEYS);
+	eksp->eks_invalid =
+		MCDI_OUT_DWORD(req, LICENSING_V3_OUT_INVALID_KEYS);
+	eksp->eks_blacklisted = 0;
+	eksp->eks_unverifiable =
+		MCDI_OUT_DWORD(req, LICENSING_V3_OUT_UNVERIFIABLE_KEYS);
+	eksp->eks_wrong_node =
+		MCDI_OUT_DWORD(req, LICENSING_V3_OUT_WRONG_NODE_KEYS);
+	eksp->eks_licensed_apps_lo =
+		MCDI_OUT_DWORD(req, LICENSING_V3_OUT_LICENSED_APPS_LO);
+	eksp->eks_licensed_apps_hi =
+		MCDI_OUT_DWORD(req, LICENSING_V3_OUT_LICENSED_APPS_HI);
+	eksp->eks_licensed_features_lo =
+		MCDI_OUT_DWORD(req, LICENSING_V3_OUT_LICENSED_FEATURES_LO);
+	eksp->eks_licensed_features_hi =
+		MCDI_OUT_DWORD(req, LICENSING_V3_OUT_LICENSED_FEATURES_HI);
+
+	return (0);
+
+fail2:
+	EFSYS_PROBE(fail2);
+fail1:
+	EFSYS_PROBE1(fail1, efx_rc_t, rc);
+
+	return (rc);
+}
+
+static	__checkReturn	efx_rc_t
+efx_mcdi_licensing_v3_app_state(
+	__in		efx_nic_t *enp,
+	__in		uint64_t app_id,
+	__out		boolean_t *licensedp)
+{
+	efx_mcdi_req_t req;
+	uint8_t payload[MAX(MC_CMD_GET_LICENSED_V3_APP_STATE_IN_LEN,
+			    MC_CMD_GET_LICENSED_V3_APP_STATE_OUT_LEN)];
+	uint32_t app_state;
+	efx_rc_t rc;
+
+	EFSYS_ASSERT(enp->en_family == EFX_FAMILY_MEDFORD);
+
+	(void) memset(payload, 0, sizeof (payload));
+	req.emr_cmd = MC_CMD_GET_LICENSED_V3_APP_STATE;
+	req.emr_in_buf = payload;
+	req.emr_in_length = MC_CMD_GET_LICENSED_V3_APP_STATE_IN_LEN;
+	req.emr_out_buf = payload;
+	req.emr_out_length = MC_CMD_GET_LICENSED_V3_APP_STATE_OUT_LEN;
+
+	MCDI_IN_SET_DWORD(req, GET_LICENSED_V3_APP_STATE_IN_APP_ID_LO,
+		    app_id & 0xffffffff);
+	MCDI_IN_SET_DWORD(req, GET_LICENSED_V3_APP_STATE_IN_APP_ID_HI,
+		    app_id >> 32);
+
+	efx_mcdi_execute(enp, &req);
+
+	if (req.emr_rc != 0) {
+		rc = req.emr_rc;
+		goto fail1;
+	}
+
+	if (req.emr_out_length_used < MC_CMD_GET_LICENSED_V3_APP_STATE_OUT_LEN) {
+		rc = EMSGSIZE;
+		goto fail2;
+	}
+
+	app_state = (MCDI_OUT_DWORD(req, GET_LICENSED_V3_APP_STATE_OUT_STATE));
+	if (app_state != MC_CMD_GET_LICENSED_V3_APP_STATE_OUT_NOT_LICENSED) {
+		*licensedp = B_TRUE;
+	} else {
+		*licensedp = B_FALSE;
+	}
+
+	return (0);
+
+fail2:
+	EFSYS_PROBE(fail2);
+fail1:
+	EFSYS_PROBE1(fail1, efx_rc_t, rc);
+
+	return (rc);
+}
+
+static	__checkReturn	efx_rc_t
+efx_mcdi_licensing_v3_get_id(
+	__in		efx_nic_t *enp,
+	__in		size_t buffer_size,
+	__out		uint32_t *typep,
+	__out		size_t *lengthp,
+	__out_bcount_part_opt(buffer_size, *lengthp)
+			uint8_t *bufferp)
+{
+	efx_mcdi_req_t req;
+	uint8_t payload[MAX(MC_CMD_LICENSING_GET_ID_V3_IN_LEN,
+			    MC_CMD_LICENSING_GET_ID_V3_OUT_LENMIN)];
+	efx_rc_t rc;
+
+	req.emr_cmd = MC_CMD_LICENSING_GET_ID_V3;
+
+	if (bufferp == NULL) {
+		/* Request id type and length only */
+		req.emr_in_buf = bufferp;
+		req.emr_in_length = MC_CMD_LICENSING_GET_ID_V3_IN_LEN;
+		req.emr_out_buf = bufferp;
+		req.emr_out_length = MC_CMD_LICENSING_GET_ID_V3_OUT_LENMIN;
+		(void) memset(payload, 0, sizeof (payload));
+	} else {
+		/* Request full buffer */
+		req.emr_in_buf = bufferp;
+		req.emr_in_length = MC_CMD_LICENSING_GET_ID_V3_IN_LEN;
+		req.emr_out_buf = bufferp;
+		req.emr_out_length = MIN(buffer_size, MC_CMD_LICENSING_GET_ID_V3_OUT_LENMIN);
+		(void) memset(bufferp, 0, req.emr_out_length);
+	}
+
+	efx_mcdi_execute(enp, &req);
+
+	if (req.emr_rc != 0) {
+		rc = req.emr_rc;
+		goto fail1;
+	}
+
+	if (req.emr_out_length_used < MC_CMD_LICENSING_GET_ID_V3_OUT_LENMIN) {
+		rc = EMSGSIZE;
+		goto fail2;
+	}
+
+	*typep = MCDI_OUT_DWORD(req, LICENSING_GET_ID_V3_OUT_LICENSE_TYPE);
+	*lengthp = MCDI_OUT_DWORD(req, LICENSING_GET_ID_V3_OUT_LICENSE_ID_LENGTH);
+
+	if (bufferp == NULL) {
+		/* modify length requirements to indicate to caller the extra buffering
+		** needed to read the complete output.
+		*/
+		*lengthp += MC_CMD_LICENSING_GET_ID_V3_OUT_LENMIN;
+	} else {
+		/* Shift ID down to start of buffer */
+		memmove(bufferp,
+		  bufferp+MC_CMD_LICENSING_GET_ID_V3_OUT_LICENSE_ID_OFST,
+		  *lengthp);
+		memset(bufferp+(*lengthp), 0, MC_CMD_LICENSING_GET_ID_V3_OUT_LICENSE_ID_OFST);
+	}
+
+	return (0);
+
+fail2:
+	EFSYS_PROBE(fail2);
+fail1:
+	EFSYS_PROBE1(fail1, efx_rc_t, rc);
+
+	return (rc);
+}
+
+
+#endif	/* EFSYS_OPT_MEDFORD */
+
+	__checkReturn		efx_rc_t
+efx_lic_init(
+	__in			efx_nic_t *enp)
+{
+	efx_lic_ops_t *elop;
+	efx_rc_t rc;
+
+	EFSYS_ASSERT3U(enp->en_magic, ==, EFX_NIC_MAGIC);
+	EFSYS_ASSERT3U(enp->en_mod_flags, &, EFX_MOD_PROBE);
+	EFSYS_ASSERT(!(enp->en_mod_flags & EFX_MOD_LIC));
+
+	switch (enp->en_family) {
+
+#if EFSYS_OPT_SIENA
+	case EFX_FAMILY_SIENA:
+		elop = (efx_lic_ops_t *)&__efx_lic_v1_ops;
+		break;
+#endif	/* EFSYS_OPT_SIENA */
+
+#if EFSYS_OPT_HUNTINGTON
+	case EFX_FAMILY_HUNTINGTON:
+		elop = (efx_lic_ops_t *)&__efx_lic_v2_ops;
+		break;
+#endif	/* EFSYS_OPT_HUNTINGTON */
+
+#if EFSYS_OPT_MEDFORD
+	case EFX_FAMILY_MEDFORD:
+		elop = (efx_lic_ops_t *)&__efx_lic_v3_ops;
+		break;
+#endif	/* EFSYS_OPT_MEDFORD */
+
+	default:
+		EFSYS_ASSERT(0);
+		rc = ENOTSUP;
+		goto fail1;
+	}
+
+	enp->en_elop = elop;
+	enp->en_mod_flags |= EFX_MOD_LIC;
+
+	return (0);
+
+fail1:
+	EFSYS_PROBE1(fail1, efx_rc_t, rc);
+
+	return (rc);
+}
+
+				void
+efx_lic_fini(
+	__in			efx_nic_t *enp)
+{
+	efx_lic_ops_t *elop = enp->en_elop;
+
+	EFSYS_ASSERT3U(enp->en_magic, ==, EFX_NIC_MAGIC);
+	EFSYS_ASSERT3U(enp->en_mod_flags, &, EFX_MOD_PROBE);
+	EFSYS_ASSERT3U(enp->en_mod_flags, &, EFX_MOD_LIC);
+
+	enp->en_elop = NULL;
+	enp->en_mod_flags &= ~EFX_MOD_LIC;
+}
+
+
+	__checkReturn	efx_rc_t
+efx_lic_update_licenses(
+	__in		efx_nic_t *enp)
+{
+	efx_lic_ops_t *elop = enp->en_elop;
+	efx_rc_t rc;
+
+	EFSYS_ASSERT3U(enp->en_magic, ==, EFX_NIC_MAGIC);
+	EFSYS_ASSERT3U(enp->en_mod_flags, &, EFX_MOD_LIC);
+
+	if ((rc = elop->elo_update_licenses(enp)) != 0)
+		goto fail1;
+
+	return (0);
+
+fail1:
+	EFSYS_PROBE1(fail1, efx_rc_t, rc);
+
+	return (rc);
+}
+
+	__checkReturn	efx_rc_t
+efx_lic_get_key_stats(
+	__in		efx_nic_t *enp,
+	__out		efx_key_stats_t *eksp)
+{
+	efx_lic_ops_t *elop = enp->en_elop;
+	efx_rc_t rc;
+
+	EFSYS_ASSERT3U(enp->en_magic, ==, EFX_NIC_MAGIC);
+	EFSYS_ASSERT3U(enp->en_mod_flags, &, EFX_MOD_LIC);
+
+	if ((rc = elop->elo_get_key_stats(enp, eksp)) != 0)
+		goto fail1;
+
+	return (0);
+
+fail1:
+	EFSYS_PROBE1(fail1, efx_rc_t, rc);
+
+	return (rc);
+}
+
+	__checkReturn	efx_rc_t
+efx_lic_app_state(
+	__in		efx_nic_t *enp,
+	__in		uint64_t app_id,
+	__out		boolean_t *licensedp)
+{
+	efx_lic_ops_t *elop = enp->en_elop;
+	efx_rc_t rc;
+
+	EFSYS_ASSERT3U(enp->en_magic, ==, EFX_NIC_MAGIC);
+	EFSYS_ASSERT3U(enp->en_mod_flags, &, EFX_MOD_LIC);
+
+	if (elop->elo_app_state == NULL) {
+		rc = ENOTSUP;
+		goto fail1;
+	}
+	if ((rc = elop->elo_app_state(enp, app_id, licensedp)) != 0)
+		goto fail2;
+
+	return (0);
+
+fail2:
+	EFSYS_PROBE(fail2);
+fail1:
+	EFSYS_PROBE1(fail1, efx_rc_t, rc);
+
+	return (rc);
+}
+
+	__checkReturn	efx_rc_t
+efx_lic_get_id(
+	__in		efx_nic_t *enp,
+	__in		size_t buffer_size,
+	__out		uint32_t *typep,
+	__out		size_t *lengthp,
+	__out_opt	uint8_t *bufferp
+	)
+{
+	efx_lic_ops_t *elop = enp->en_elop;
+	efx_rc_t rc;
+
+	EFSYS_ASSERT3U(enp->en_magic, ==, EFX_NIC_MAGIC);
+	EFSYS_ASSERT3U(enp->en_mod_flags, &, EFX_MOD_LIC);
+
+	if (elop->elo_get_id == NULL) {
+		rc = ENOTSUP;
+		goto fail1;
+	}
+
+	if ((rc = elop->elo_get_id(enp, buffer_size, typep,
+				    lengthp, bufferp)) != 0)
+		goto fail2;
+
+	return (0);
+
+fail2:
+	EFSYS_PROBE(fail2);
+fail1:
+	EFSYS_PROBE1(fail1, efx_rc_t, rc);
+
+	return (rc);
+}
+
+#endif	/* EFSYS_OPT_LICENSING */

Modified: stable/10/sys/dev/sfxge/common/efx_nic.c
==============================================================================
--- stable/10/sys/dev/sfxge/common/efx_nic.c	Wed Jan 20 07:59:04 2016	(r294385)
+++ stable/10/sys/dev/sfxge/common/efx_nic.c	Wed Jan 20 08:01:21 2016	(r294386)
@@ -708,8 +708,9 @@ efx_nic_reset(
 	EFSYS_ASSERT3U(enp->en_magic, ==, EFX_NIC_MAGIC);
 	EFSYS_ASSERT(enp->en_mod_flags & EFX_MOD_PROBE);
 	/*
-	 * All modules except the MCDI, PROBE, NVRAM, VPD, MON (which we
-	 * do not reset here) must have been shut down or never initialized.
+	 * All modules except the MCDI, PROBE, NVRAM, VPD, MON, LIC
+	 * (which we do not reset here) must have been shut down or never
+	 * initialized.
 	 *
 	 * A rule of thumb here is: If the controller or MC reboots, is *any*
 	 * state lost. If it's lost and needs reapplying, then the module
@@ -717,7 +718,7 @@ efx_nic_reset(
 	 */
 	mod_flags = enp->en_mod_flags;
 	mod_flags &= ~(EFX_MOD_MCDI | EFX_MOD_PROBE | EFX_MOD_NVRAM |
-		    EFX_MOD_VPD | EFX_MOD_MON);
+		    EFX_MOD_VPD | EFX_MOD_MON | EFX_MOD_LIC);
 	EFSYS_ASSERT3U(mod_flags, ==, 0);
 	if (mod_flags != 0) {
 		rc = EINVAL;

Modified: stable/10/sys/modules/sfxge/Makefile
==============================================================================
--- stable/10/sys/modules/sfxge/Makefile	Wed Jan 20 07:59:04 2016	(r294385)
+++ stable/10/sys/modules/sfxge/Makefile	Wed Jan 20 08:01:21 2016	(r294386)
@@ -16,7 +16,7 @@ SRCS+=	sfxge_port.c sfxge_rx.c sfxge_tx.
 SRCS+=	sfxge.h sfxge_rx.h sfxge_tx.h sfxge_version.h
 
 .PATH: ${.CURDIR}/../../dev/sfxge/common
-SRCS+=	efx_bootcfg.c efx_crc32.c efx_ev.c efx_intr.c efx_mac.c
+SRCS+=	efx_bootcfg.c efx_crc32.c efx_ev.c efx_intr.c efx_lic.c efx_mac.c
 SRCS+=	efx_mcdi.c efx_mon.c efx_nic.c
 SRCS+=	efx_nvram.c efx_phy.c efx_port.c efx_rx.c efx_sram.c efx_tx.c
 SRCS+=	efx_vpd.c efx_wol.c efx_filter.c efx_hash.c

From owner-svn-src-all@freebsd.org  Wed Jan 20 08:02:12 2016
Return-Path: <owner-svn-src-all@freebsd.org>
Delivered-To: svn-src-all@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id 69128A896CE;
 Wed, 20 Jan 2016 08:02:12 +0000 (UTC)
 (envelope-from arybchik@FreeBSD.org)
Received: from repo.freebsd.org (repo.freebsd.org
 [IPv6:2610:1c1:1:6068::e6a:0])
 (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
 (Client did not present a certificate)
 by mx1.freebsd.org (Postfix) with ESMTPS id 35E351373;
 Wed, 20 Jan 2016 08:02:12 +0000 (UTC)
 (envelope-from arybchik@FreeBSD.org)
Received: from repo.freebsd.org ([127.0.1.37])
 by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u0K82BiE030321;
 Wed, 20 Jan 2016 08:02:11 GMT (envelope-from arybchik@FreeBSD.org)
Received: (from arybchik@localhost)
 by repo.freebsd.org (8.15.2/8.15.2/Submit) id u0K82B8e030320;
 Wed, 20 Jan 2016 08:02:11 GMT (envelope-from arybchik@FreeBSD.org)
Message-Id: <201601200802.u0K82B8e030320@repo.freebsd.org>
X-Authentication-Warning: repo.freebsd.org: arybchik set sender to
 arybchik@FreeBSD.org using -f
From: Andrew Rybchenko <arybchik@FreeBSD.org>
Date: Wed, 20 Jan 2016 08:02:11 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org
Subject: svn commit: r294387 - stable/10/sys/dev/sfxge/common
X-SVN-Group: stable-10
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.20
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for &quot;
 user&quot; and &quot; projects&quot; \)" <svn-src-all.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-all/>
List-Post: <mailto:svn-src-all@freebsd.org>
List-Help: <mailto:svn-src-all-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Wed, 20 Jan 2016 08:02:12 -0000

Author: arybchik
Date: Wed Jan 20 08:02:11 2016
New Revision: 294387
URL: https://svnweb.freebsd.org/changeset/base/294387

Log:
  MFC r293902
  
  sfxge: cleanup: quieten efx_mcdi_read_resonse_header error reporting
  
  The "mcdi_err_arg" probe still reports results of failed MCDI
  commands, unless the caller invoked efx_mcdi_execute_quiet().
  
  Submitted by:   Andy Moreton <amoreton at solarflare.com>
  Reviewed by:    gnn
  Sponsored by:   Solarflare Communications, Inc.

Modified:
  stable/10/sys/dev/sfxge/common/efx_mcdi.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/sys/dev/sfxge/common/efx_mcdi.c
==============================================================================
--- stable/10/sys/dev/sfxge/common/efx_mcdi.c	Wed Jan 20 08:01:21 2016	(r294386)
+++ stable/10/sys/dev/sfxge/common/efx_mcdi.c	Wed Jan 20 08:02:11 2016	(r294387)
@@ -462,15 +462,8 @@ efx_mcdi_read_response_header(
 	return;
 
 fail3:
-	if (!emrp->emr_quiet)
-		EFSYS_PROBE(fail3);
 fail2:
-	if (!emrp->emr_quiet)
-		EFSYS_PROBE(fail2);
 fail1:
-	if (!emrp->emr_quiet)
-		EFSYS_PROBE1(fail1, efx_rc_t, rc);
-
 	emrp->emr_rc = rc;
 	emrp->emr_out_length_used = 0;
 }

From owner-svn-src-all@freebsd.org  Wed Jan 20 08:03:32 2016
Return-Path: <owner-svn-src-all@freebsd.org>
Delivered-To: svn-src-all@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9A689A897AC;
 Wed, 20 Jan 2016 08:03:32 +0000 (UTC)
 (envelope-from arybchik@FreeBSD.org)
Received: from repo.freebsd.org (repo.freebsd.org
 [IPv6:2610:1c1:1:6068::e6a:0])
 (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
 (Client did not present a certificate)
 by mx1.freebsd.org (Postfix) with ESMTPS id 71908164C;
 Wed, 20 Jan 2016 08:03:32 +0000 (UTC)
 (envelope-from arybchik@FreeBSD.org)
Received: from repo.freebsd.org ([127.0.1.37])
 by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u0K83VbW030421;
 Wed, 20 Jan 2016 08:03:31 GMT (envelope-from arybchik@FreeBSD.org)
Received: (from arybchik@localhost)
 by repo.freebsd.org (8.15.2/8.15.2/Submit) id u0K83Ub4030415;
 Wed, 20 Jan 2016 08:03:30 GMT (envelope-from arybchik@FreeBSD.org)
Message-Id: <201601200803.u0K83Ub4030415@repo.freebsd.org>
X-Authentication-Warning: repo.freebsd.org: arybchik set sender to
 arybchik@FreeBSD.org using -f
From: Andrew Rybchenko <arybchik@FreeBSD.org>
Date: Wed, 20 Jan 2016 08:03:30 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org
Subject: svn commit: r294388 - stable/10/sys/dev/sfxge/common
X-SVN-Group: stable-10
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.20
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for &quot;
 user&quot; and &quot; projects&quot; \)" <svn-src-all.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-all/>
List-Post: <mailto:svn-src-all@freebsd.org>
List-Help: <mailto:svn-src-all-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Wed, 20 Jan 2016 08:03:32 -0000

Author: arybchik
Date: Wed Jan 20 08:03:30 2016
New Revision: 294388
URL: https://svnweb.freebsd.org/changeset/base/294388

Log:
  MFC r294075
  
  sfxge: rename hunt_link_state_t to ef10_link_state_t
  
  Submitted by:   Mark Spender <mspender at solarflare.com>
  Reviewed by:    gnn
  Sponsored by:   Solarflare Communications, Inc.

Modified:
  stable/10/sys/dev/sfxge/common/hunt_impl.h
  stable/10/sys/dev/sfxge/common/hunt_mac.c
  stable/10/sys/dev/sfxge/common/hunt_nic.c
  stable/10/sys/dev/sfxge/common/hunt_phy.c
  stable/10/sys/dev/sfxge/common/medford_nic.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/sys/dev/sfxge/common/hunt_impl.h
==============================================================================
--- stable/10/sys/dev/sfxge/common/hunt_impl.h	Wed Jan 20 08:02:11 2016	(r294387)
+++ stable/10/sys/dev/sfxge/common/hunt_impl.h	Wed Jan 20 08:03:30 2016	(r294388)
@@ -455,16 +455,16 @@ ef10_nvram_partn_set_version(
 
 /* PHY */
 
-typedef struct hunt_link_state_s {
-	uint32_t		hls_adv_cap_mask;
-	uint32_t		hls_lp_cap_mask;
-	unsigned int 		hls_fcntl;
-	efx_link_mode_t		hls_link_mode;
+typedef struct ef10_link_state_s {
+	uint32_t		els_adv_cap_mask;
+	uint32_t		els_lp_cap_mask;
+	unsigned int		els_fcntl;
+	efx_link_mode_t		els_link_mode;
 #if EFSYS_OPT_LOOPBACK
-	efx_loopback_type_t	hls_loopback;
+	efx_loopback_type_t	els_loopback;
 #endif
-	boolean_t		hls_mac_up;
-} hunt_link_state_t;
+	boolean_t		els_mac_up;
+} ef10_link_state_t;
 
 extern			void
 hunt_phy_link_ev(
@@ -475,7 +475,7 @@ hunt_phy_link_ev(
 extern	__checkReturn	efx_rc_t
 hunt_phy_get_link(
 	__in		efx_nic_t *enp,
-	__out		hunt_link_state_t *hlsp);
+	__out		ef10_link_state_t *elsp);
 
 extern	__checkReturn	efx_rc_t
 hunt_phy_power(

Modified: stable/10/sys/dev/sfxge/common/hunt_mac.c
==============================================================================
--- stable/10/sys/dev/sfxge/common/hunt_mac.c	Wed Jan 20 08:02:11 2016	(r294387)
+++ stable/10/sys/dev/sfxge/common/hunt_mac.c	Wed Jan 20 08:03:30 2016	(r294388)
@@ -48,16 +48,16 @@ hunt_mac_poll(
 	 */
 
 	efx_port_t *epp = &(enp->en_port);
-	hunt_link_state_t hls;
+	ef10_link_state_t els;
 	efx_rc_t rc;
 
-	if ((rc = hunt_phy_get_link(enp, &hls)) != 0)
+	if ((rc = hunt_phy_get_link(enp, &els)) != 0)
 		goto fail1;
 
-	epp->ep_adv_cap_mask = hls.hls_adv_cap_mask;
-	epp->ep_fcntl = hls.hls_fcntl;
+	epp->ep_adv_cap_mask = els.els_adv_cap_mask;
+	epp->ep_fcntl = els.els_fcntl;
 
-	*link_modep = hls.hls_link_mode;
+	*link_modep = els.els_link_mode;
 
 	return (0);
 
@@ -79,17 +79,17 @@ hunt_mac_up(
 	 * essentially identical.
 	 */
 
-	hunt_link_state_t hls;
+	ef10_link_state_t els;
 	efx_rc_t rc;
 
 	/*
 	 * Because Huntington doesn't *require* polling, we can't rely on
 	 * hunt_mac_poll() being executed to populate epp->ep_mac_up.
 	 */
-	if ((rc = hunt_phy_get_link(enp, &hls)) != 0)
+	if ((rc = hunt_phy_get_link(enp, &els)) != 0)
 		goto fail1;
 
-	*mac_upp = hls.hls_mac_up;
+	*mac_upp = els.els_mac_up;
 
 	return (0);
 

Modified: stable/10/sys/dev/sfxge/common/hunt_nic.c
==============================================================================
--- stable/10/sys/dev/sfxge/common/hunt_nic.c	Wed Jan 20 08:02:11 2016	(r294387)
+++ stable/10/sys/dev/sfxge/common/hunt_nic.c	Wed Jan 20 08:03:30 2016	(r294388)
@@ -1096,7 +1096,7 @@ hunt_board_cfg(
 	efx_nic_cfg_t *encp = &(enp->en_nic_cfg);
 	uint8_t mac_addr[6];
 	uint32_t board_type = 0;
-	hunt_link_state_t hls;
+	ef10_link_state_t els;
 	efx_port_t *epp = &(enp->en_port);
 	uint32_t port;
 	uint32_t pf;
@@ -1170,10 +1170,10 @@ hunt_board_cfg(
 		goto fail6;
 
 	/* Obtain the default PHY advertised capabilities */
-	if ((rc = hunt_phy_get_link(enp, &hls)) != 0)
+	if ((rc = hunt_phy_get_link(enp, &els)) != 0)
 		goto fail7;
-	epp->ep_default_adv_cap_mask = hls.hls_adv_cap_mask;
-	epp->ep_adv_cap_mask = hls.hls_adv_cap_mask;
+	epp->ep_default_adv_cap_mask = els.els_adv_cap_mask;
+	epp->ep_adv_cap_mask = els.els_adv_cap_mask;
 
 	/*
 	 * Enable firmware workarounds for hardware errata.

Modified: stable/10/sys/dev/sfxge/common/hunt_phy.c
==============================================================================
--- stable/10/sys/dev/sfxge/common/hunt_phy.c	Wed Jan 20 08:02:11 2016	(r294387)
+++ stable/10/sys/dev/sfxge/common/hunt_phy.c	Wed Jan 20 08:03:30 2016	(r294388)
@@ -219,7 +219,7 @@ fail1:
 	__checkReturn	efx_rc_t
 hunt_phy_get_link(
 	__in		efx_nic_t *enp,
-	__out		hunt_link_state_t *hlsp)
+	__out		ef10_link_state_t *elsp)
 {
 	/*
 	 * TBD: consider common Siena/Hunt function: Hunt is very similar
@@ -252,14 +252,14 @@ hunt_phy_get_link(
 	}
 
 	hunt_phy_decode_cap(MCDI_OUT_DWORD(req, GET_LINK_OUT_CAP),
-			    &hlsp->hls_adv_cap_mask);
+			    &elsp->els_adv_cap_mask);
 	hunt_phy_decode_cap(MCDI_OUT_DWORD(req, GET_LINK_OUT_LP_CAP),
-			    &hlsp->hls_lp_cap_mask);
+			    &elsp->els_lp_cap_mask);
 
 	hunt_phy_decode_link_mode(enp, MCDI_OUT_DWORD(req, GET_LINK_OUT_FLAGS),
 			    MCDI_OUT_DWORD(req, GET_LINK_OUT_LINK_SPEED),
 			    MCDI_OUT_DWORD(req, GET_LINK_OUT_FCNTL),
-			    &hlsp->hls_link_mode, &hlsp->hls_fcntl);
+			    &elsp->els_link_mode, &elsp->els_fcntl);
 
 #if EFSYS_OPT_LOOPBACK
 	/* Assert the MC_CMD_LOOPBACK and EFX_LOOPBACK namespace agree */
@@ -282,10 +282,10 @@ hunt_phy_get_link(
 	EFX_STATIC_ASSERT(MC_CMD_LOOPBACK_PCS == EFX_LOOPBACK_PCS);
 	EFX_STATIC_ASSERT(MC_CMD_LOOPBACK_PMAPMD == EFX_LOOPBACK_PMA_PMD);
 
-	hlsp->hls_loopback = MCDI_OUT_DWORD(req, GET_LINK_OUT_LOOPBACK_MODE);
+	elsp->els_loopback = MCDI_OUT_DWORD(req, GET_LINK_OUT_LOOPBACK_MODE);
 #endif	/* EFSYS_OPT_LOOPBACK */
 
-	hlsp->hls_mac_up = MCDI_OUT_DWORD(req, GET_LINK_OUT_MAC_FAULT) == 0;
+	elsp->els_mac_up = MCDI_OUT_DWORD(req, GET_LINK_OUT_MAC_FAULT) == 0;
 
 	return (0);
 

Modified: stable/10/sys/dev/sfxge/common/medford_nic.c
==============================================================================
--- stable/10/sys/dev/sfxge/common/medford_nic.c	Wed Jan 20 08:02:11 2016	(r294387)
+++ stable/10/sys/dev/sfxge/common/medford_nic.c	Wed Jan 20 08:03:30 2016	(r294388)
@@ -47,7 +47,7 @@ medford_board_cfg(
 	efx_nic_cfg_t *encp = &(enp->en_nic_cfg);
 	uint8_t mac_addr[6] = { 0 };
 	uint32_t board_type = 0;
-	hunt_link_state_t hls;
+	ef10_link_state_t els;
 	efx_port_t *epp = &(enp->en_port);
 	uint32_t port;
 	uint32_t pf;
@@ -126,10 +126,10 @@ medford_board_cfg(
 		goto fail6;
 
 	/* Obtain the default PHY advertised capabilities */
-	if ((rc = hunt_phy_get_link(enp, &hls)) != 0)
+	if ((rc = hunt_phy_get_link(enp, &els)) != 0)
 		goto fail7;
-	epp->ep_default_adv_cap_mask = hls.hls_adv_cap_mask;
-	epp->ep_adv_cap_mask = hls.hls_adv_cap_mask;
+	epp->ep_default_adv_cap_mask = els.els_adv_cap_mask;
+	epp->ep_adv_cap_mask = els.els_adv_cap_mask;
 
 	if (EFX_PCI_FUNCTION_IS_VF(encp)) {
 		/*

From owner-svn-src-all@freebsd.org  Wed Jan 20 08:05:58 2016
Return-Path: <owner-svn-src-all@freebsd.org>
Delivered-To: svn-src-all@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id 37B37A8988D;
 Wed, 20 Jan 2016 08:05:58 +0000 (UTC)
 (envelope-from arybchik@FreeBSD.org)
Received: from repo.freebsd.org (repo.freebsd.org
 [IPv6:2610:1c1:1:6068::e6a:0])
 (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
 (Client did not present a certificate)
 by mx1.freebsd.org (Postfix) with ESMTPS id 125E4193F;
 Wed, 20 Jan 2016 08:05:58 +0000 (UTC)
 (envelope-from arybchik@FreeBSD.org)
Received: from repo.freebsd.org ([127.0.1.37])
 by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u0K85v8H030564;
 Wed, 20 Jan 2016 08:05:57 GMT (envelope-from arybchik@FreeBSD.org)
Received: (from arybchik@localhost)
 by repo.freebsd.org (8.15.2/8.15.2/Submit) id u0K85uKd030556;
 Wed, 20 Jan 2016 08:05:56 GMT (envelope-from arybchik@FreeBSD.org)
Message-Id: <201601200805.u0K85uKd030556@repo.freebsd.org>
X-Authentication-Warning: repo.freebsd.org: arybchik set sender to
 arybchik@FreeBSD.org using -f
From: Andrew Rybchenko <arybchik@FreeBSD.org>
Date: Wed, 20 Jan 2016 08:05:56 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org
Subject: svn commit: r294389 - stable/10/sys/dev/sfxge/common
X-SVN-Group: stable-10
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.20
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for &quot;
 user&quot; and &quot; projects&quot; \)" <svn-src-all.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-all/>
List-Post: <mailto:svn-src-all@freebsd.org>
List-Help: <mailto:svn-src-all-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Wed, 20 Jan 2016 08:05:58 -0000

Author: arybchik
Date: Wed Jan 20 08:05:56 2016
New Revision: 294389
URL: https://svnweb.freebsd.org/changeset/base/294389

Log:
  MFC r294076
  
  sfxge: rework MCDI request completion
  
  Submitted by:   Andy Moreton <amoreton at solarflare.com>
  Reviewed by:    gnn
  Sponsored by:   Solarflare Communications, Inc.

Modified:
  stable/10/sys/dev/sfxge/common/efx_impl.h
  stable/10/sys/dev/sfxge/common/efx_mcdi.c
  stable/10/sys/dev/sfxge/common/efx_mcdi.h
  stable/10/sys/dev/sfxge/common/hunt_impl.h
  stable/10/sys/dev/sfxge/common/hunt_mcdi.c
  stable/10/sys/dev/sfxge/common/siena_impl.h
  stable/10/sys/dev/sfxge/common/siena_mcdi.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/sys/dev/sfxge/common/efx_impl.h
==============================================================================
--- stable/10/sys/dev/sfxge/common/efx_impl.h	Wed Jan 20 08:03:30 2016	(r294388)
+++ stable/10/sys/dev/sfxge/common/efx_impl.h	Wed Jan 20 08:05:56 2016	(r294389)
@@ -463,7 +463,6 @@ typedef struct efx_mcdi_ops_s {
 	efx_rc_t	(*emco_init)(efx_nic_t *, const efx_mcdi_transport_t *);
 	void		(*emco_send_request)(efx_nic_t *, void *, size_t,
 					void *, size_t);
-	void		(*emco_request_copyout)(efx_nic_t *, efx_mcdi_req_t *);
 	efx_rc_t	(*emco_poll_reboot)(efx_nic_t *);
 	boolean_t	(*emco_poll_response)(efx_nic_t *);
 	void		(*emco_read_response)(efx_nic_t *, void *, size_t, size_t);

Modified: stable/10/sys/dev/sfxge/common/efx_mcdi.c
==============================================================================
--- stable/10/sys/dev/sfxge/common/efx_mcdi.c	Wed Jan 20 08:03:30 2016	(r294388)
+++ stable/10/sys/dev/sfxge/common/efx_mcdi.c	Wed Jan 20 08:05:56 2016	(r294389)
@@ -62,7 +62,6 @@ __FBSDID("$FreeBSD$");
 static efx_mcdi_ops_t	__efx_mcdi_siena_ops = {
 	siena_mcdi_init,		/* emco_init */
 	siena_mcdi_send_request,	/* emco_send_request */
-	siena_mcdi_request_copyout,	/* emco_request_copyout */
 	siena_mcdi_poll_reboot,		/* emco_poll_reboot */
 	siena_mcdi_poll_response,	/* emco_poll_response */
 	siena_mcdi_read_response,	/* emco_read_response */
@@ -77,7 +76,6 @@ static efx_mcdi_ops_t	__efx_mcdi_siena_o
 static efx_mcdi_ops_t	__efx_mcdi_ef10_ops = {
 	ef10_mcdi_init,			/* emco_init */
 	ef10_mcdi_send_request,		/* emco_send_request */
-	ef10_mcdi_request_copyout,	/* emco_request_copyout */
 	ef10_mcdi_poll_reboot,		/* emco_poll_reboot */
 	ef10_mcdi_poll_response,	/* emco_poll_response */
 	ef10_mcdi_read_response,	/* emco_read_response */
@@ -211,16 +209,6 @@ efx_mcdi_send_request(
 	emcop->emco_send_request(enp, hdrp, hdr_len, sdup, sdu_len);
 }
 
-static			void
-efx_mcdi_request_copyout(
-	__in		efx_nic_t *enp,
-	__in		efx_mcdi_req_t *emrp)
-{
-	efx_mcdi_ops_t *emcop = enp->en_mcdi.em_emcop;
-
-	emcop->emco_request_copyout(enp, emrp);
-}
-
 static			efx_rc_t
 efx_mcdi_poll_reboot(
 	__in		efx_nic_t *enp)
@@ -353,7 +341,7 @@ efx_mcdi_request_start(
 }
 
 
-			void
+static			void
 efx_mcdi_read_response_header(
 	__in		efx_nic_t *enp,
 	__inout		efx_mcdi_req_t *emrp)
@@ -468,6 +456,50 @@ fail1:
 	emrp->emr_out_length_used = 0;
 }
 
+static			void
+efx_mcdi_finish_response(
+	__in		efx_nic_t *enp,
+	__in		efx_mcdi_req_t *emrp)
+{
+#if EFSYS_OPT_MCDI_LOGGING
+	const efx_mcdi_transport_t *emtp = enp->en_mcdi.em_emtp;
+#endif /* EFSYS_OPT_MCDI_LOGGING */
+	efx_dword_t hdr[2];
+	unsigned int hdr_len;
+	size_t bytes;
+
+	if (emrp->emr_out_buf == NULL)
+		return;
+
+	/* Read the command header to detect MCDI response format */
+	hdr_len = sizeof (hdr[0]);
+	efx_mcdi_read_response(enp, &hdr[0], 0, hdr_len);
+	if (EFX_DWORD_FIELD(hdr[0], MCDI_HEADER_CODE) == MC_CMD_V2_EXTN) {
+		/*
+		 * Read the actual payload length. The length given in the event
+		 * is only correct for responses with the V1 format.
+		 */
+		efx_mcdi_read_response(enp, &hdr[1], hdr_len, sizeof (hdr[1]));
+		hdr_len += sizeof (hdr[1]);
+
+		emrp->emr_out_length_used = EFX_DWORD_FIELD(hdr[1],
+					    MC_CMD_V2_EXTN_IN_ACTUAL_LEN);
+	}
+
+	/* Copy payload out into caller supplied buffer */
+	bytes = MIN(emrp->emr_out_length_used, emrp->emr_out_length);
+	efx_mcdi_read_response(enp, emrp->emr_out_buf, hdr_len, bytes);
+
+#if EFSYS_OPT_MCDI_LOGGING
+	if (emtp->emt_logger != NULL) {
+		emtp->emt_logger(emtp->emt_context,
+		    EFX_LOG_MCDI_RESPONSE,
+		    &hdr, hdr_len,
+		    emrp->emr_out_buf, bytes);
+	}
+#endif /* EFSYS_OPT_MCDI_LOGGING */
+}
+
 
 	__checkReturn	boolean_t
 efx_mcdi_request_poll(
@@ -515,7 +547,7 @@ efx_mcdi_request_poll(
 	if ((rc = emrp->emr_rc) != 0)
 		goto fail2;
 
-	efx_mcdi_request_copyout(enp, emrp);
+	efx_mcdi_finish_response(enp, emrp);
 	return (B_TRUE);
 
 fail2:
@@ -709,7 +741,6 @@ efx_mcdi_ev_cpl(
 {
 	efx_mcdi_iface_t *emip = &(enp->en_mcdi.em_emip);
 	const efx_mcdi_transport_t *emtp = enp->en_mcdi.em_emtp;
-	efx_mcdi_ops_t *emcop = enp->en_mcdi.em_emcop;
 	efx_mcdi_req_t *emrp;
 	int state;
 
@@ -751,7 +782,7 @@ efx_mcdi_ev_cpl(
 		}
 	}
 	if (errcode == 0) {
-		emcop->emco_request_copyout(enp, emrp);
+		efx_mcdi_finish_response(enp, emrp);
 	}
 
 	emtp->emt_ev_cpl(emtp->emt_context);

Modified: stable/10/sys/dev/sfxge/common/efx_mcdi.h
==============================================================================
--- stable/10/sys/dev/sfxge/common/efx_mcdi.h	Wed Jan 20 08:03:30 2016	(r294388)
+++ stable/10/sys/dev/sfxge/common/efx_mcdi.h	Wed Jan 20 08:05:56 2016	(r294389)
@@ -88,11 +88,6 @@ efx_mcdi_execute_quiet(
 	__in		efx_nic_t *enp,
 	__inout		efx_mcdi_req_t *emrp);
 
- extern			void
-efx_mcdi_read_response_header(
-	__in		efx_nic_t *enp,
-	__inout		efx_mcdi_req_t *emrp);
-
 extern			void
 efx_mcdi_ev_cpl(
 	__in		efx_nic_t *enp,

Modified: stable/10/sys/dev/sfxge/common/hunt_impl.h
==============================================================================
--- stable/10/sys/dev/sfxge/common/hunt_impl.h	Wed Jan 20 08:03:30 2016	(r294388)
+++ stable/10/sys/dev/sfxge/common/hunt_impl.h	Wed Jan 20 08:05:56 2016	(r294389)
@@ -305,11 +305,6 @@ ef10_mcdi_read_response(
 	__in			size_t offset,
 	__in			size_t length);
 
-extern			void
-ef10_mcdi_request_copyout(
-	__in		efx_nic_t *enp,
-	__in		efx_mcdi_req_t *emrp);
-
 extern			efx_rc_t
 ef10_mcdi_poll_reboot(
 	__in		efx_nic_t *enp);

Modified: stable/10/sys/dev/sfxge/common/hunt_mcdi.c
==============================================================================
--- stable/10/sys/dev/sfxge/common/hunt_mcdi.c	Wed Jan 20 08:03:30 2016	(r294388)
+++ stable/10/sys/dev/sfxge/common/hunt_mcdi.c	Wed Jan 20 08:05:56 2016	(r294389)
@@ -150,50 +150,6 @@ ef10_mcdi_send_request(
 	EFX_BAR_WRITED(enp, ER_DZ_MC_DB_HWRD_REG, &dword, B_FALSE);
 }
 
-			void
-ef10_mcdi_request_copyout(
-	__in		efx_nic_t *enp,
-	__in		efx_mcdi_req_t *emrp)
-{
-#if EFSYS_OPT_MCDI_LOGGING
-	const efx_mcdi_transport_t *emtp = enp->en_mcdi.em_emtp;
-#endif /* EFSYS_OPT_MCDI_LOGGING */
-	efx_dword_t hdr[2];
-	unsigned int hdr_len;
-	size_t bytes;
-
-	if (emrp->emr_out_buf == NULL)
-		return;
-
-	/* Read the command header to detect MCDI response format */
-	hdr_len = sizeof (hdr[0]);
-	ef10_mcdi_read_response(enp, &hdr[0], 0, hdr_len);
-	if (EFX_DWORD_FIELD(hdr[0], MCDI_HEADER_CODE) == MC_CMD_V2_EXTN) {
-		/*
-		 * Read the actual payload length. The length given in the event
-		 * is only correct for responses with the V1 format.
-		 */
-		ef10_mcdi_read_response(enp, &hdr[1], hdr_len, sizeof (hdr[1]));
-		hdr_len += sizeof (hdr[1]);
-
-		emrp->emr_out_length_used = EFX_DWORD_FIELD(hdr[1],
-					    MC_CMD_V2_EXTN_IN_ACTUAL_LEN);
-	}
-
-	/* Copy payload out into caller supplied buffer */
-	bytes = MIN(emrp->emr_out_length_used, emrp->emr_out_length);
-	ef10_mcdi_read_response(enp, emrp->emr_out_buf, hdr_len, bytes);
-
-#if EFSYS_OPT_MCDI_LOGGING
-	if (emtp->emt_logger != NULL) {
-		emtp->emt_logger(emtp->emt_context,
-		    EFX_LOG_MCDI_RESPONSE,
-		    &hdr, hdr_len,
-		    emrp->emr_out_buf, bytes);
-	}
-#endif /* EFSYS_OPT_MCDI_LOGGING */
-}
-
 	__checkReturn	boolean_t
 ef10_mcdi_poll_response(
 	__in		efx_nic_t *enp)

Modified: stable/10/sys/dev/sfxge/common/siena_impl.h
==============================================================================
--- stable/10/sys/dev/sfxge/common/siena_impl.h	Wed Jan 20 08:03:30 2016	(r294388)
+++ stable/10/sys/dev/sfxge/common/siena_impl.h	Wed Jan 20 08:05:56 2016	(r294389)
@@ -132,11 +132,6 @@ siena_mcdi_read_response(
 	__in			size_t offset,
 	__in			size_t length);
 
-extern			void
-siena_mcdi_request_copyout(
-	__in		efx_nic_t *enp,
-	__in		efx_mcdi_req_t *emrp);
-
 extern			efx_rc_t
 siena_mcdi_poll_reboot(
 	__in		efx_nic_t *enp);

Modified: stable/10/sys/dev/sfxge/common/siena_mcdi.c
==============================================================================
--- stable/10/sys/dev/sfxge/common/siena_mcdi.c	Wed Jan 20 08:03:30 2016	(r294388)
+++ stable/10/sys/dev/sfxge/common/siena_mcdi.c	Wed Jan 20 08:05:56 2016	(r294389)
@@ -89,35 +89,6 @@ siena_mcdi_send_request(
 	EFX_BAR_TBL_WRITED(enp, FR_CZ_MC_TREG_SMEM, dbr, &dword, B_FALSE);
 }
 
-			void
-siena_mcdi_request_copyout(
-	__in		efx_nic_t *enp,
-	__in		efx_mcdi_req_t *emrp)
-{
-#if EFSYS_OPT_MCDI_LOGGING
-	const efx_mcdi_transport_t *emtp = enp->en_mcdi.em_emtp;
-	efx_dword_t hdr;
-#endif
-	size_t bytes = MIN(emrp->emr_out_length_used, emrp->emr_out_length);
-
-	/* Copy payload out if caller supplied buffer */
-	if (emrp->emr_out_buf != NULL) {
-		siena_mcdi_read_response(enp, emrp->emr_out_buf,
-		    sizeof (efx_dword_t), bytes);
-	}
-
-#if EFSYS_OPT_MCDI_LOGGING
-	if (emtp->emt_logger != NULL) {
-		siena_mcdi_read_response(enp, &hdr, 0, sizeof (hdr));
-
-		emtp->emt_logger(emtp->emt_context,
-		    EFX_LOG_MCDI_RESPONSE,
-		    &hdr, sizeof (hdr),
-		    emrp->emr_out_buf, bytes);
-	}
-#endif /* EFSYS_OPT_MCDI_LOGGING */
-}
-
 			efx_rc_t
 siena_mcdi_poll_reboot(
 	__in		efx_nic_t *enp)

From owner-svn-src-all@freebsd.org  Wed Jan 20 08:07:32 2016
Return-Path: <owner-svn-src-all@freebsd.org>
Delivered-To: svn-src-all@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5DF5AA89960;
 Wed, 20 Jan 2016 08:07:32 +0000 (UTC)
 (envelope-from arybchik@FreeBSD.org)
Received: from repo.freebsd.org (repo.freebsd.org
 [IPv6:2610:1c1:1:6068::e6a:0])
 (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
 (Client did not present a certificate)
 by mx1.freebsd.org (Postfix) with ESMTPS id 29D7E1AA2;
 Wed, 20 Jan 2016 08:07:32 +0000 (UTC)
 (envelope-from arybchik@FreeBSD.org)
Received: from repo.freebsd.org ([127.0.1.37])
 by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u0K87VWH030678;
 Wed, 20 Jan 2016 08:07:31 GMT (envelope-from arybchik@FreeBSD.org)
Received: (from arybchik@localhost)
 by repo.freebsd.org (8.15.2/8.15.2/Submit) id u0K87Ub1030673;
 Wed, 20 Jan 2016 08:07:30 GMT (envelope-from arybchik@FreeBSD.org)
Message-Id: <201601200807.u0K87Ub1030673@repo.freebsd.org>
X-Authentication-Warning: repo.freebsd.org: arybchik set sender to
 arybchik@FreeBSD.org using -f
From: Andrew Rybchenko <arybchik@FreeBSD.org>
Date: Wed, 20 Jan 2016 08:07:30 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org
Subject: svn commit: r294390 - in stable/10: share/man/man4 sys/dev/sfxge
X-SVN-Group: stable-10
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.20
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for &quot;
 user&quot; and &quot; projects&quot; \)" <svn-src-all.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-all/>
List-Post: <mailto:svn-src-all@freebsd.org>
List-Help: <mailto:svn-src-all-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Wed, 20 Jan 2016 08:07:32 -0000

Author: arybchik
Date: Wed Jan 20 08:07:30 2016
New Revision: 294390
URL: https://svnweb.freebsd.org/changeset/base/294390

Log:
  MFC r294077
  
  sfxge: support FATSOv2
  
  Reviewed by:    gnn
  Sponsored by:   Solarflare Communications, Inc.

Modified:
  stable/10/share/man/man4/sfxge.4
  stable/10/sys/dev/sfxge/sfxge.h
  stable/10/sys/dev/sfxge/sfxge_tx.c
  stable/10/sys/dev/sfxge/sfxge_tx.h
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/share/man/man4/sfxge.4
==============================================================================
--- stable/10/share/man/man4/sfxge.4	Wed Jan 20 08:05:56 2016	(r294389)
+++ stable/10/share/man/man4/sfxge.4	Wed Jan 20 08:07:30 2016	(r294390)
@@ -121,8 +121,10 @@ If a packet is dropped, the
 counter is incremented and the local sender receives ENOBUFS.
 The value must be greater than or equal to 0.
 .It Va hw.sfxge.tso_fw_assisted
-Enable/disable usage of FW-assisted TSO if supported by NIC firmware.
-Enabled by default.
+Bitmask to enable/disable usage of FW-assisted TSO version if supported
+by NIC firmware.
+FATSOv1 (bit 0) and FATSOv2 (bit 1) are supported.
+All enabled by default.
 .It Va hw.sfxge.N.max_rss_channels
 The maximum number of allocated RSS channels for the Nth adapter.
 If set to 0 or unset, the number of channels is determined by the number

Modified: stable/10/sys/dev/sfxge/sfxge.h
==============================================================================
--- stable/10/sys/dev/sfxge/sfxge.h	Wed Jan 20 08:05:56 2016	(r294389)
+++ stable/10/sys/dev/sfxge/sfxge.h	Wed Jan 20 08:07:30 2016	(r294390)
@@ -283,7 +283,10 @@ struct sfxge_softc {
 	unsigned int			rxq_count;
 	unsigned int			txq_count;
 
-	int				tso_fw_assisted;
+	unsigned int			tso_fw_assisted;
+#define	SFXGE_FATSOV1	(1 << 0)
+#define	SFXGE_FATSOV2	(1 << 1)
+
 #if EFSYS_OPT_MCDI_LOGGING
 	int				mcdi_logging;
 #endif

Modified: stable/10/sys/dev/sfxge/sfxge_tx.c
==============================================================================
--- stable/10/sys/dev/sfxge/sfxge_tx.c	Wed Jan 20 08:05:56 2016	(r294389)
+++ stable/10/sys/dev/sfxge/sfxge_tx.c	Wed Jan 20 08:07:30 2016	(r294390)
@@ -55,6 +55,7 @@ __FBSDID("$FreeBSD$");
 #include <sys/socket.h>
 #include <sys/sysctl.h>
 #include <sys/syslog.h>
+#include <sys/limits.h>
 
 #include <net/bpf.h>
 #include <net/ethernet.h>
@@ -96,11 +97,11 @@ SYSCTL_INT(_hw_sfxge, OID_AUTO, tx_dpl_p
 	   "Maximum number of any packets in deferred packet put-list");
 
 #define	SFXGE_PARAM_TSO_FW_ASSISTED	SFXGE_PARAM(tso_fw_assisted)
-static int sfxge_tso_fw_assisted = 1;
+static int sfxge_tso_fw_assisted = (SFXGE_FATSOV1 | SFXGE_FATSOV2);
 TUNABLE_INT(SFXGE_PARAM_TSO_FW_ASSISTED, &sfxge_tso_fw_assisted);
 SYSCTL_INT(_hw_sfxge, OID_AUTO, tso_fw_assisted, CTLFLAG_RDTUN,
 	   &sfxge_tso_fw_assisted, 0,
-	   "Use FW-assisted TSO if supported by NIC firmware");
+	   "Bitmask of FW-assisted TSO allowed to use if supported by NIC firmware");
 
 
 static const struct {
@@ -850,6 +851,8 @@ struct sfxge_tso_state {
 	unsigned out_len;	/* Remaining length in current segment */
 	unsigned seqnum;	/* Current sequence number */
 	unsigned packet_space;	/* Remaining space in current packet */
+	unsigned segs_space;	/* Remaining number of DMA segments
+				   for the packet (FATSOv2 only) */
 
 	/* Input position */
 	uint64_t dma_addr;	/* DMA address of current position */
@@ -952,7 +955,7 @@ static void tso_start(struct sfxge_txq *
 	struct tcphdr th_copy;
 #endif
 
-	tso->fw_assisted = txq->sc->tso_fw_assisted;
+	tso->fw_assisted = txq->tso_fw_assisted;
 	tso->mbuf = mbuf;
 
 	/* Find network protocol and header */
@@ -1059,6 +1062,8 @@ static void tso_fill_packet_with_fragmen
 {
 	efx_desc_t *desc;
 	int n;
+	uint64_t dma_addr = tso->dma_addr;
+	boolean_t eop;
 
 	if (tso->in_len == 0 || tso->packet_space == 0)
 		return;
@@ -1066,20 +1071,38 @@ static void tso_fill_packet_with_fragmen
 	KASSERT(tso->in_len > 0, ("TSO input length went negative"));
 	KASSERT(tso->packet_space > 0, ("TSO packet space went negative"));
 
-	n = min(tso->in_len, tso->packet_space);
+	if (tso->fw_assisted & SFXGE_FATSOV2) {
+		n = tso->in_len;
+		tso->out_len -= n;
+		tso->seqnum += n;
+		tso->in_len = 0;
+		if (n < tso->packet_space) {
+			tso->packet_space -= n;
+			tso->segs_space--;
+		} else {
+			tso->packet_space = tso->seg_size -
+			    (n - tso->packet_space) % tso->seg_size;
+			tso->segs_space =
+			    EFX_TX_FATSOV2_DMA_SEGS_PER_PKT_MAX - 1 -
+			    (tso->packet_space != tso->seg_size);
+		}
+	} else {
+		n = min(tso->in_len, tso->packet_space);
+		tso->packet_space -= n;
+		tso->out_len -= n;
+		tso->dma_addr += n;
+		tso->in_len -= n;
+	}
 
-	tso->packet_space -= n;
-	tso->out_len -= n;
-	tso->in_len -= n;
+	/*
+	 * It is OK to use binary OR below to avoid extra branching
+	 * since all conditions may always be checked.
+	 */
+	eop = (tso->out_len == 0) | (tso->packet_space == 0) |
+	    (tso->segs_space == 0);
 
 	desc = &txq->pend_desc[txq->n_pend_desc++];
-	efx_tx_qdesc_dma_create(txq->common,
-				tso->dma_addr,
-				n,
-				tso->out_len == 0 || tso->packet_space == 0,
-				desc);
-
-	tso->dma_addr += n;
+	efx_tx_qdesc_dma_create(txq->common, dma_addr, n, eop, desc);
 }
 
 /* Callback from bus_dmamap_load() for long TSO headers. */
@@ -1112,28 +1135,47 @@ static int tso_start_new_packet(struct s
 	int rc;
 
 	if (tso->fw_assisted) {
-		uint8_t tcp_flags = tso->tcp_flags;
+		if (tso->fw_assisted & SFXGE_FATSOV2) {
+			/* Add 2 FATSOv2 option descriptors */
+			desc = &txq->pend_desc[txq->n_pend_desc];
+			efx_tx_qdesc_tso2_create(txq->common,
+						 tso->packet_id,
+						 tso->seqnum,
+						 tso->seg_size,
+						 desc,
+						 EFX_TX_FATSOV2_OPT_NDESCS);
+			desc += EFX_TX_FATSOV2_OPT_NDESCS;
+			txq->n_pend_desc += EFX_TX_FATSOV2_OPT_NDESCS;
+			KASSERT(txq->stmp[id].flags == 0, ("stmp flags are not 0"));
+			id = (id + EFX_TX_FATSOV2_OPT_NDESCS) & txq->ptr_mask;
 
-		if (tso->out_len > tso->seg_size)
-			tcp_flags &= ~(TH_FIN | TH_PUSH);
+			tso->segs_space =
+			    EFX_TX_FATSOV2_DMA_SEGS_PER_PKT_MAX - 1;
+		} else {
+			uint8_t tcp_flags = tso->tcp_flags;
 
-		/* TSO option descriptor */
-		desc = &txq->pend_desc[txq->n_pend_desc++];
-		efx_tx_qdesc_tso_create(txq->common,
-					tso->packet_id,
-					tso->seqnum,
-					tcp_flags,
-					desc++);
-		KASSERT(txq->stmp[id].flags == 0, ("stmp flags are not 0"));
-		id = (id + 1) & txq->ptr_mask;
+			if (tso->out_len > tso->seg_size)
+				tcp_flags &= ~(TH_FIN | TH_PUSH);
+
+			/* Add FATSOv1 option descriptor */
+			desc = &txq->pend_desc[txq->n_pend_desc++];
+			efx_tx_qdesc_tso_create(txq->common,
+						tso->packet_id,
+						tso->seqnum,
+						tcp_flags,
+						desc++);
+			KASSERT(txq->stmp[id].flags == 0, ("stmp flags are not 0"));
+			id = (id + 1) & txq->ptr_mask;
+
+			tso->seqnum += tso->seg_size;
+			tso->segs_space = UINT_MAX;
+		}
 
 		/* Header DMA descriptor */
 		*desc = tso->header_desc;
 		txq->n_pend_desc++;
 		KASSERT(txq->stmp[id].flags == 0, ("stmp flags are not 0"));
 		id = (id + 1) & txq->ptr_mask;
-
-		tso->seqnum += tso->seg_size;
 	} else {
 		/* Allocate a DMA-mapped header buffer. */
 		if (__predict_true(tso->header_len <= TSOH_STD_SIZE)) {
@@ -1215,6 +1257,8 @@ static int tso_start_new_packet(struct s
 					0,
 					desc);
 		id = (id + 1) & txq->ptr_mask;
+
+		tso->segs_space = UINT_MAX;
 	}
 	tso->packet_space = tso->seg_size;
 	txq->tso_packets++;
@@ -1264,15 +1308,19 @@ sfxge_tx_queue_tso(struct sfxge_txq *txq
 		}
 
 		/* End of packet? */
-		if (tso.packet_space == 0) {
+		if ((tso.packet_space == 0) | (tso.segs_space == 0)) {
+			unsigned int n_fatso_opt_desc =
+			    (tso.fw_assisted & SFXGE_FATSOV2) ?
+			    EFX_TX_FATSOV2_OPT_NDESCS :
+			    (tso.fw_assisted & SFXGE_FATSOV1) ? 1 : 0;
+
 			/* If the queue is now full due to tiny MSS,
 			 * or we can't create another header, discard
 			 * the remainder of the input mbuf but do not
 			 * roll back the work we have done.
 			 */
-			if (txq->n_pend_desc + tso.fw_assisted +
-			    1 /* header */ + n_dma_seg >
-			    txq->max_pkt_desc) {
+			if (txq->n_pend_desc + n_fatso_opt_desc +
+			    1 /* header */ + n_dma_seg > txq->max_pkt_desc) {
 				txq->tso_pdrop_too_many++;
 				break;
 			}
@@ -1407,12 +1455,67 @@ sfxge_tx_qstop(struct sfxge_softc *sc, u
 	SFXGE_TXQ_UNLOCK(txq);
 }
 
+/*
+ * Estimate maximum number of Tx descriptors required for TSO packet.
+ * With minimum MSS and maximum mbuf length we might need more (even
+ * than a ring-ful of descriptors), but this should not happen in
+ * practice except due to deliberate attack.  In that case we will
+ * truncate the output at a packet boundary.
+ */
+static unsigned int
+sfxge_tx_max_pkt_desc(const struct sfxge_softc *sc, enum sfxge_txq_type type,
+		      unsigned int tso_fw_assisted)
+{
+	/* One descriptor for every input fragment */
+	unsigned int max_descs = SFXGE_TX_MAPPING_MAX_SEG;
+	unsigned int sw_tso_max_descs;
+	unsigned int fa_tso_v1_max_descs = 0;
+	unsigned int fa_tso_v2_max_descs = 0;
+
+	/* VLAN tagging Tx option descriptor may be required */
+	if (efx_nic_cfg_get(sc->enp)->enc_hw_tx_insert_vlan_enabled)
+		max_descs++;
+
+	if (type == SFXGE_TXQ_IP_TCP_UDP_CKSUM) {
+		/*
+		 * Plus header and payload descriptor for each output segment.
+		 * Minus one since header fragment is already counted.
+		 * Even if FATSO is used, we should be ready to fallback
+		 * to do it in the driver.
+		 */
+		sw_tso_max_descs = SFXGE_TSO_MAX_SEGS * 2 - 1;
+
+		/* FW assisted TSOv1 requires one more descriptor per segment
+		 * in comparison to SW TSO */
+		if (tso_fw_assisted & SFXGE_FATSOV1)
+			fa_tso_v1_max_descs =
+			    sw_tso_max_descs + SFXGE_TSO_MAX_SEGS;
+
+		/* FW assisted TSOv2 requires 3 (2 FATSO plus header) extra
+		 * descriptors per superframe limited by number of DMA fetches
+		 * per packet. The first packet header is already counted.
+		 */
+		if (tso_fw_assisted & SFXGE_FATSOV2) {
+			fa_tso_v2_max_descs =
+			    howmany(SFXGE_TX_MAPPING_MAX_SEG,
+				    EFX_TX_FATSOV2_DMA_SEGS_PER_PKT_MAX - 1) *
+			    (EFX_TX_FATSOV2_OPT_NDESCS + 1) - 1;
+		}
+
+		max_descs += MAX(sw_tso_max_descs,
+				 MAX(fa_tso_v1_max_descs, fa_tso_v2_max_descs));
+	}
+
+	return (max_descs);
+}
+
 static int
 sfxge_tx_qstart(struct sfxge_softc *sc, unsigned int index)
 {
 	struct sfxge_txq *txq;
 	efsys_mem_t *esmp;
 	uint16_t flags;
+	unsigned int tso_fw_assisted;
 	struct sfxge_evq *evq;
 	unsigned int desc_index;
 	int rc;
@@ -1434,6 +1537,7 @@ sfxge_tx_qstart(struct sfxge_softc *sc, 
 		return (rc);
 
 	/* Determine the kind of queue we are creating. */
+	tso_fw_assisted = 0;
 	switch (txq->type) {
 	case SFXGE_TXQ_NON_CKSUM:
 		flags = 0;
@@ -1443,6 +1547,9 @@ sfxge_tx_qstart(struct sfxge_softc *sc, 
 		break;
 	case SFXGE_TXQ_IP_TCP_UDP_CKSUM:
 		flags = EFX_TXQ_CKSUM_IPV4 | EFX_TXQ_CKSUM_TCPUDP;
+		tso_fw_assisted = sc->tso_fw_assisted;
+		if (tso_fw_assisted & SFXGE_FATSOV2)
+			flags |= EFX_TXQ_FATSOV2;
 		break;
 	default:
 		KASSERT(0, ("Impossible TX queue"));
@@ -1453,8 +1560,19 @@ sfxge_tx_qstart(struct sfxge_softc *sc, 
 	/* Create the common code transmit queue. */
 	if ((rc = efx_tx_qcreate(sc->enp, index, txq->type, esmp,
 	    sc->txq_entries, txq->buf_base_id, flags, evq->common,
-	    &txq->common, &desc_index)) != 0)
-		goto fail;
+	    &txq->common, &desc_index)) != 0) {
+		/* Retry if no FATSOv2 resources, otherwise fail */
+		if ((rc != ENOSPC) || (~flags & EFX_TXQ_FATSOV2))
+			goto fail;
+
+		/* Looks like all FATSOv2 contexts are used */
+		flags &= ~EFX_TXQ_FATSOV2;
+		tso_fw_assisted &= ~SFXGE_FATSOV2;
+		if ((rc = efx_tx_qcreate(sc->enp, index, txq->type, esmp,
+		    sc->txq_entries, txq->buf_base_id, flags, evq->common,
+		    &txq->common, &desc_index)) != 0)
+			goto fail;
+	}
 
 	/* Initialise queue descriptor indexes */
 	txq->added = txq->pending = txq->completed = txq->reaped = desc_index;
@@ -1466,6 +1584,10 @@ sfxge_tx_qstart(struct sfxge_softc *sc, 
 
 	txq->init_state = SFXGE_TXQ_STARTED;
 	txq->flush_state = SFXGE_FLUSH_REQUIRED;
+	txq->tso_fw_assisted = tso_fw_assisted;
+
+	txq->max_pkt_desc = sfxge_tx_max_pkt_desc(sc, txq->type,
+						  tso_fw_assisted);
 
 	SFXGE_TXQ_UNLOCK(txq);
 
@@ -1574,38 +1696,6 @@ sfxge_tx_qfini(struct sfxge_softc *sc, u
 	free(txq, M_SFXGE);
 }
 
-/*
- * Estimate maximum number of Tx descriptors required for TSO packet.
- * With minimum MSS and maximum mbuf length we might need more (even
- * than a ring-ful of descriptors), but this should not happen in
- * practice except due to deliberate attack.  In that case we will
- * truncate the output at a packet boundary.
- */
-static unsigned int
-sfxge_tx_max_pkt_desc(const struct sfxge_softc *sc, enum sfxge_txq_type type)
-{
-	/* One descriptor for every input fragment */
-	unsigned int max_descs = SFXGE_TX_MAPPING_MAX_SEG;
-
-	/* VLAN tagging Tx option descriptor may be required */
-	if (efx_nic_cfg_get(sc->enp)->enc_hw_tx_insert_vlan_enabled)
-		max_descs++;
-
-	if (type == SFXGE_TXQ_IP_TCP_UDP_CKSUM) {
-		/*
-		 * Plus header and payload descriptor for each output segment.
-		 * Minus one since header fragment is already counted.
-		 */
-		max_descs += SFXGE_TSO_MAX_SEGS * 2 - 1;
-
-		/* FW assisted TSO requires one more descriptor per segment */
-		if (sc->tso_fw_assisted)
-			max_descs += SFXGE_TSO_MAX_SEGS;
-	}
-
-	return (max_descs);
-}
-
 static int
 sfxge_tx_qinit(struct sfxge_softc *sc, unsigned int txq_index,
 	       enum sfxge_txq_type type, unsigned int evq_index)
@@ -1735,8 +1825,6 @@ sfxge_tx_qinit(struct sfxge_softc *sc, u
 	txq->init_state = SFXGE_TXQ_INITIALIZED;
 	txq->hw_vlan_tci = 0;
 
-	txq->max_pkt_desc = sfxge_tx_max_pkt_desc(sc, type);
-
 	return (0);
 
 fail_txq_stat_init:
@@ -1852,10 +1940,12 @@ sfxge_tx_init(struct sfxge_softc *sc)
 	sc->txq_count = SFXGE_TXQ_NTYPES - 1 + sc->intr.n_alloc;
 
 	sc->tso_fw_assisted = sfxge_tso_fw_assisted;
-	if (sc->tso_fw_assisted)
-		sc->tso_fw_assisted =
-		    (encp->enc_features & EFX_FEATURE_FW_ASSISTED_TSO) &&
-		    (encp->enc_fw_assisted_tso_enabled);
+	if ((~encp->enc_features & EFX_FEATURE_FW_ASSISTED_TSO) ||
+	    (!encp->enc_fw_assisted_tso_enabled))
+		sc->tso_fw_assisted &= ~SFXGE_FATSOV1;
+	if ((~encp->enc_features & EFX_FEATURE_FW_ASSISTED_TSO_V2) ||
+	    (!encp->enc_fw_assisted_tso_v2_enabled))
+		sc->tso_fw_assisted &= ~SFXGE_FATSOV2;
 
 	sc->txqs_node = SYSCTL_ADD_NODE(
 		device_get_sysctl_ctx(sc->dev),

Modified: stable/10/sys/dev/sfxge/sfxge_tx.h
==============================================================================
--- stable/10/sys/dev/sfxge/sfxge_tx.h	Wed Jan 20 08:05:56 2016	(r294389)
+++ stable/10/sys/dev/sfxge/sfxge_tx.h	Wed Jan 20 08:07:30 2016	(r294390)
@@ -170,6 +170,7 @@ struct sfxge_txq {
 	struct sfxge_softc		*sc;
 	enum sfxge_txq_state		init_state;
 	enum sfxge_flush_state		flush_state;
+	unsigned int			tso_fw_assisted;
 	enum sfxge_txq_type		type;
 	unsigned int			txq_index;
 	unsigned int			evq_index;

From owner-svn-src-all@freebsd.org  Wed Jan 20 08:08:45 2016
Return-Path: <owner-svn-src-all@freebsd.org>
Delivered-To: svn-src-all@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id AD323A89A28;
 Wed, 20 Jan 2016 08:08:45 +0000 (UTC)
 (envelope-from arybchik@FreeBSD.org)
Received: from repo.freebsd.org (repo.freebsd.org
 [IPv6:2610:1c1:1:6068::e6a:0])
 (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
 (Client did not present a certificate)
 by mx1.freebsd.org (Postfix) with ESMTPS id 84C101C28;
 Wed, 20 Jan 2016 08:08:45 +0000 (UTC)
 (envelope-from arybchik@FreeBSD.org)
Received: from repo.freebsd.org ([127.0.1.37])
 by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u0K88iQa030770;
 Wed, 20 Jan 2016 08:08:44 GMT (envelope-from arybchik@FreeBSD.org)
Received: (from arybchik@localhost)
 by repo.freebsd.org (8.15.2/8.15.2/Submit) id u0K88i1D030767;
 Wed, 20 Jan 2016 08:08:44 GMT (envelope-from arybchik@FreeBSD.org)
Message-Id: <201601200808.u0K88i1D030767@repo.freebsd.org>
X-Authentication-Warning: repo.freebsd.org: arybchik set sender to
 arybchik@FreeBSD.org using -f
From: Andrew Rybchenko <arybchik@FreeBSD.org>
Date: Wed, 20 Jan 2016 08:08:44 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org
Subject: svn commit: r294391 - stable/10/sys/dev/sfxge/common
X-SVN-Group: stable-10
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.20
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for &quot;
 user&quot; and &quot; projects&quot; \)" <svn-src-all.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-all/>
List-Post: <mailto:svn-src-all@freebsd.org>
List-Help: <mailto:svn-src-all-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Wed, 20 Jan 2016 08:08:45 -0000

Author: arybchik
Date: Wed Jan 20 08:08:44 2016
New Revision: 294391
URL: https://svnweb.freebsd.org/changeset/base/294391

Log:
  MFC r294078
  
  sfxge: medford stores a single global copy of VPD
  
  Not per PF copies as on Huntington.
  
  Submitted by:   Mark Spender <mspender at solarflare.com>
  Reviewed by:    gnn
  Sponsored by:   Solarflare Communications, Inc.

Modified:
  stable/10/sys/dev/sfxge/common/efx.h
  stable/10/sys/dev/sfxge/common/hunt_vpd.c
  stable/10/sys/dev/sfxge/common/medford_nic.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/sys/dev/sfxge/common/efx.h
==============================================================================
--- stable/10/sys/dev/sfxge/common/efx.h	Wed Jan 20 08:07:30 2016	(r294390)
+++ stable/10/sys/dev/sfxge/common/efx.h	Wed Jan 20 08:08:44 2016	(r294391)
@@ -1162,6 +1162,8 @@ typedef struct efx_nic_cfg_s {
 	/* External port identifier */
 	uint8_t			enc_external_port;
 	uint32_t		enc_mcdi_max_payload_length;
+	/* VPD may be per-PF or global */
+	boolean_t		enc_vpd_is_global;
 } efx_nic_cfg_t;
 
 #define	EFX_PCI_FUNCTION_IS_PF(_encp)	((_encp)->enc_vf == 0xffff)

Modified: stable/10/sys/dev/sfxge/common/hunt_vpd.c
==============================================================================
--- stable/10/sys/dev/sfxge/common/hunt_vpd.c	Wed Jan 20 08:07:30 2016	(r294390)
+++ stable/10/sys/dev/sfxge/common/hunt_vpd.c	Wed Jan 20 08:08:44 2016	(r294391)
@@ -48,13 +48,20 @@ ef10_vpd_init(
 	caddr_t svpd;
 	size_t svpd_size;
 	uint32_t pci_pf;
+	uint32_t tag;
 	efx_rc_t rc;
 
 	EFSYS_ASSERT3U(enp->en_mod_flags, &, EFX_MOD_PROBE);
 	EFSYS_ASSERT(enp->en_family == EFX_FAMILY_HUNTINGTON ||
 		    enp->en_family == EFX_FAMILY_MEDFORD);
 
-	pci_pf = enp->en_nic_cfg.enc_pf;
+	if (enp->en_nic_cfg.enc_vpd_is_global) {
+		tag = TLV_TAG_GLOBAL_STATIC_VPD;
+	} else {
+		pci_pf = enp->en_nic_cfg.enc_pf;
+		tag = TLV_TAG_PF_STATIC_VPD(pci_pf);
+	}
+
 	/*
 	 * The VPD interface exposes VPD resources from the combined static and
 	 * dynamic VPD storage. As the static VPD configuration should *never*
@@ -64,8 +71,7 @@ ef10_vpd_init(
 	svpd_size = 0;
 	rc = ef10_nvram_partn_read_tlv(enp,
 	    NVRAM_PARTITION_TYPE_STATIC_CONFIG,
-	    TLV_TAG_PF_STATIC_VPD(pci_pf),
-	    &svpd, &svpd_size);
+	    tag, &svpd, &svpd_size);
 	if (rc != 0) {
 		if (rc == EACCES) {
 			/* Unpriviledged functions cannot access VPD */
@@ -132,17 +138,22 @@ ef10_vpd_read(
 	caddr_t dvpd;
 	size_t dvpd_size;
 	uint32_t pci_pf;
+	uint32_t tag;
 	efx_rc_t rc;
 
 	EFSYS_ASSERT(enp->en_family == EFX_FAMILY_HUNTINGTON ||
 		    enp->en_family == EFX_FAMILY_MEDFORD);
 
-	pci_pf = enp->en_nic_cfg.enc_pf;
+	if (enp->en_nic_cfg.enc_vpd_is_global) {
+		tag = TLV_TAG_GLOBAL_DYNAMIC_VPD;
+	} else {
+		pci_pf = enp->en_nic_cfg.enc_pf;
+		tag = TLV_TAG_PF_DYNAMIC_VPD(pci_pf);
+	}
 
 	if ((rc = ef10_nvram_partn_read_tlv(enp,
 		    NVRAM_PARTITION_TYPE_DYNAMIC_CONFIG,
-		    TLV_TAG_PF_DYNAMIC_VPD(pci_pf),
-		    &dvpd, &dvpd_size)) != 0)
+		    tag, &dvpd, &dvpd_size)) != 0)
 		goto fail1;
 
 	if (dvpd_size > size) {
@@ -396,12 +407,18 @@ ef10_vpd_write(
 {
 	size_t vpd_length;
 	uint32_t pci_pf;
+	uint32_t tag;
 	efx_rc_t rc;
 
 	EFSYS_ASSERT(enp->en_family == EFX_FAMILY_HUNTINGTON ||
 		    enp->en_family == EFX_FAMILY_MEDFORD);
 
-	pci_pf = enp->en_nic_cfg.enc_pf;
+	if (enp->en_nic_cfg.enc_vpd_is_global) {
+		tag = TLV_TAG_GLOBAL_DYNAMIC_VPD;
+	} else {
+		pci_pf = enp->en_nic_cfg.enc_pf;
+		tag = TLV_TAG_PF_DYNAMIC_VPD(pci_pf);
+	}
 
 	/* Determine total length of new dynamic VPD */
 	if ((rc = efx_vpd_hunk_length(data, size, &vpd_length)) != 0)
@@ -410,8 +427,7 @@ ef10_vpd_write(
 	/* Store new dynamic VPD in all segments in DYNAMIC_CONFIG partition */
 	if ((rc = ef10_nvram_partn_write_segment_tlv(enp,
 		    NVRAM_PARTITION_TYPE_DYNAMIC_CONFIG,
-		    TLV_TAG_PF_DYNAMIC_VPD(pci_pf),
-		    data, vpd_length, B_TRUE)) != 0) {
+		    tag, data, vpd_length, B_TRUE)) != 0) {
 		goto fail2;
 	}
 

Modified: stable/10/sys/dev/sfxge/common/medford_nic.c
==============================================================================
--- stable/10/sys/dev/sfxge/common/medford_nic.c	Wed Jan 20 08:07:30 2016	(r294390)
+++ stable/10/sys/dev/sfxge/common/medford_nic.c	Wed Jan 20 08:08:44 2016	(r294391)
@@ -212,6 +212,12 @@ medford_board_cfg(
 	 */
 	encp->enc_tx_tso_tcp_header_offset_limit = EF10_TCP_HEADER_OFFSET_LIMIT;
 
+	/*
+	 * Medford stores a single global copy of VPD, not per-PF as on
+	 * Huntington.
+	 */
+	encp->enc_vpd_is_global = B_TRUE;
+
 	return (0);
 
 fail11:

From owner-svn-src-all@freebsd.org  Wed Jan 20 08:11:12 2016
Return-Path: <owner-svn-src-all@freebsd.org>
Delivered-To: svn-src-all@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id D6803A89B4F;
 Wed, 20 Jan 2016 08:11:12 +0000 (UTC) (envelope-from des@des.no)
Received: from smtp.des.no (smtp.des.no [194.63.250.102])
 by mx1.freebsd.org (Postfix) with ESMTP id 979F31E28;
 Wed, 20 Jan 2016 08:11:12 +0000 (UTC) (envelope-from des@des.no)
Received: from desk.des.no (smtp.des.no [194.63.250.102])
 by smtp.des.no (Postfix) with ESMTP id E00325E7C;
 Wed, 20 Jan 2016 08:11:10 +0000 (UTC)
Received: by desk.des.no (Postfix, from userid 1001)
 id BC8D848085; Wed, 20 Jan 2016 09:11:10 +0100 (CET)
From: =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= <des@des.no>
To: John Baldwin <jhb@freebsd.org>
Cc: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-head@freebsd.org
Subject: Re: svn commit: r294332 - in head: crypto/openssh
 crypto/openssh/contrib crypto/openssh/contrib/caldera
 crypto/openssh/contrib/cygwin crypto/openssh/contrib/redhat
 crypto/openssh/contrib/suse crypto/op...
References: <201601191828.u0JISNSG087681@repo.freebsd.org>
 <1547455.kXYNJo7ADU@ralph.baldwin.cx>
Date: Wed, 20 Jan 2016 09:11:10 +0100
In-Reply-To: <1547455.kXYNJo7ADU@ralph.baldwin.cx> (John Baldwin's message of
 "Tue, 19 Jan 2016 14:07:20 -0800")
Message-ID: <86io2ofz6p.fsf@desk.des.no>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (berkeley-unix)
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.20
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for &quot;
 user&quot; and &quot; projects&quot; \)" <svn-src-all.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-all/>
List-Post: <mailto:svn-src-all@freebsd.org>
List-Help: <mailto:svn-src-all-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Wed, 20 Jan 2016 08:11:12 -0000

John Baldwin <jhb@freebsd.org> writes:
> This broke the build of pam_ssh.

I'm terribly sorry.  I had completely forgotten about pam_ssh.  Next
time I break the build, please do not hesitate to commit a fix or
workaround immediately.  I can always clean it up later.

DES
--=20
Dag-Erling Sm=C3=B8rgrav - des@des.no

From owner-svn-src-all@freebsd.org  Wed Jan 20 08:11:13 2016
Return-Path: <owner-svn-src-all@freebsd.org>
Delivered-To: svn-src-all@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id CAFA5A89B54;
 Wed, 20 Jan 2016 08:11:13 +0000 (UTC)
 (envelope-from arybchik@FreeBSD.org)
Received: from repo.freebsd.org (repo.freebsd.org
 [IPv6:2610:1c1:1:6068::e6a:0])
 (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
 (Client did not present a certificate)
 by mx1.freebsd.org (Postfix) with ESMTPS id 8CD371E2F;
 Wed, 20 Jan 2016 08:11:13 +0000 (UTC)
 (envelope-from arybchik@FreeBSD.org)
Received: from repo.freebsd.org ([127.0.1.37])
 by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u0K8BCY7033488;
 Wed, 20 Jan 2016 08:11:12 GMT (envelope-from arybchik@FreeBSD.org)
Received: (from arybchik@localhost)
 by repo.freebsd.org (8.15.2/8.15.2/Submit) id u0K8BCUE033484;
 Wed, 20 Jan 2016 08:11:12 GMT (envelope-from arybchik@FreeBSD.org)
Message-Id: <201601200811.u0K8BCUE033484@repo.freebsd.org>
X-Authentication-Warning: repo.freebsd.org: arybchik set sender to
 arybchik@FreeBSD.org using -f
From: Andrew Rybchenko <arybchik@FreeBSD.org>
Date: Wed, 20 Jan 2016 08:11:12 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org
Subject: svn commit: r294392 - stable/10/sys/dev/sfxge/common
X-SVN-Group: stable-10
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.20
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for &quot;
 user&quot; and &quot; projects&quot; \)" <svn-src-all.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-all/>
List-Post: <mailto:svn-src-all@freebsd.org>
List-Help: <mailto:svn-src-all-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Wed, 20 Jan 2016 08:11:13 -0000

Author: arybchik
Date: Wed Jan 20 08:11:12 2016
New Revision: 294392
URL: https://svnweb.freebsd.org/changeset/base/294392

Log:
  MFC r294079
  
  sfxge: Medford still needs fallback for no privilege mask
  
  Submitted by:   Mark Spender <mspender at solarflare.com>
  Reviewed by:    gnn
  Sponsored by:   Solarflare Communications, Inc.

Modified:
  stable/10/sys/dev/sfxge/common/ef10_impl.h
  stable/10/sys/dev/sfxge/common/hunt_impl.h
  stable/10/sys/dev/sfxge/common/hunt_nic.c
  stable/10/sys/dev/sfxge/common/medford_nic.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/sys/dev/sfxge/common/ef10_impl.h
==============================================================================
--- stable/10/sys/dev/sfxge/common/ef10_impl.h	Wed Jan 20 08:08:44 2016	(r294391)
+++ stable/10/sys/dev/sfxge/common/ef10_impl.h	Wed Jan 20 08:11:12 2016	(r294392)
@@ -81,6 +81,11 @@ extern	__checkReturn	efx_rc_t
 ef10_get_datapath_caps(
 	__in		efx_nic_t *enp);
 
+extern	__checkReturn		efx_rc_t
+ef10_get_privilege_mask(
+	__in			efx_nic_t *enp,
+	__out			uint32_t *maskp);
+
 extern	__checkReturn	efx_rc_t
 ef10_external_port_mapping(
 	__in		efx_nic_t *enp,

Modified: stable/10/sys/dev/sfxge/common/hunt_impl.h
==============================================================================
--- stable/10/sys/dev/sfxge/common/hunt_impl.h	Wed Jan 20 08:08:44 2016	(r294391)
+++ stable/10/sys/dev/sfxge/common/hunt_impl.h	Wed Jan 20 08:11:12 2016	(r294392)
@@ -715,7 +715,7 @@ ef10_tx_qstats_update(
 
 #define	HUNT_MIN_PIO_ALLOC_SIZE	(HUNT_PIOBUF_SIZE / 32)
 
-#define	HUNT_LEGACY_PF_PRIVILEGE_MASK					\
+#define	EF10_LEGACY_PF_PRIVILEGE_MASK					\
 	(MC_CMD_PRIVILEGE_MASK_IN_GRP_ADMIN			|	\
 	MC_CMD_PRIVILEGE_MASK_IN_GRP_LINK			|	\
 	MC_CMD_PRIVILEGE_MASK_IN_GRP_ONLOAD			|	\
@@ -728,7 +728,7 @@ ef10_tx_qstats_update(
 	MC_CMD_PRIVILEGE_MASK_IN_GRP_ALL_MULTICAST		|	\
 	MC_CMD_PRIVILEGE_MASK_IN_GRP_PROMISCUOUS)
 
-#define	HUNT_LEGACY_VF_PRIVILEGE_MASK	0
+#define	EF10_LEGACY_VF_PRIVILEGE_MASK	0
 
 typedef uint32_t	efx_piobuf_handle_t;
 

Modified: stable/10/sys/dev/sfxge/common/hunt_nic.c
==============================================================================
--- stable/10/sys/dev/sfxge/common/hunt_nic.c	Wed Jan 20 08:08:44 2016	(r294391)
+++ stable/10/sys/dev/sfxge/common/hunt_nic.c	Wed Jan 20 08:11:12 2016	(r294392)
@@ -980,6 +980,42 @@ fail1:
 	return (rc);
 }
 
+
+	__checkReturn		efx_rc_t
+ef10_get_privilege_mask(
+	__in			efx_nic_t *enp,
+	__out			uint32_t *maskp)
+{
+	efx_nic_cfg_t *encp = &(enp->en_nic_cfg);
+	uint32_t mask;
+	efx_rc_t rc;
+
+	if ((rc = efx_mcdi_privilege_mask(enp, encp->enc_pf, encp->enc_vf,
+					    &mask)) != 0) {
+		if (rc != ENOTSUP)
+			goto fail1;
+
+		/* Fallback for old firmware without privilege mask support */
+		if (EFX_PCI_FUNCTION_IS_PF(encp)) {
+			/* Assume PF has admin privilege */
+			mask = EF10_LEGACY_PF_PRIVILEGE_MASK;
+		} else {
+			/* VF is always unprivileged by default */
+			mask = EF10_LEGACY_VF_PRIVILEGE_MASK;
+		}
+	}
+
+	*maskp = mask;
+
+	return (0);
+
+fail1:
+	EFSYS_PROBE1(fail1, efx_rc_t, rc);
+
+	return (rc);
+}
+
+
 /*
  * The external port mapping is a one-based numbering of the external
  * connectors on the board. It does not distinguish off-board separated
@@ -1312,20 +1348,8 @@ hunt_board_cfg(
 	 * the privilege mask to check for sufficient privileges, as that
 	 * can result in time-of-check/time-of-use bugs.
 	 */
-	if ((rc = efx_mcdi_privilege_mask(enp, pf, vf, &mask)) != 0) {
-		if (rc != ENOTSUP)
-			goto fail13;
-
-		/* Fallback for old firmware without privilege mask support */
-		if (EFX_PCI_FUNCTION_IS_PF(encp)) {
-			/* Assume PF has admin privilege */
-			mask = HUNT_LEGACY_PF_PRIVILEGE_MASK;
-		} else {
-			/* VF is always unprivileged by default */
-			mask = HUNT_LEGACY_VF_PRIVILEGE_MASK;
-		}
-	}
-
+	if ((rc = ef10_get_privilege_mask(enp, &mask)) != 0)
+		goto fail13;
 	encp->enc_privilege_mask = mask;
 
 	/* Get interrupt vector limits */

Modified: stable/10/sys/dev/sfxge/common/medford_nic.c
==============================================================================
--- stable/10/sys/dev/sfxge/common/medford_nic.c	Wed Jan 20 08:08:44 2016	(r294391)
+++ stable/10/sys/dev/sfxge/common/medford_nic.c	Wed Jan 20 08:11:12 2016	(r294392)
@@ -189,9 +189,8 @@ medford_board_cfg(
 	 * the privilege mask to check for sufficient privileges, as that
 	 * can result in time-of-check/time-of-use bugs.
 	 */
-	if ((rc = efx_mcdi_privilege_mask(enp, pf, vf, &mask)) != 0)
+	if ((rc = ef10_get_privilege_mask(enp, &mask)) != 0)
 		goto fail10;
-
 	encp->enc_privilege_mask = mask;
 
 	/* Get interrupt vector limits */

From owner-svn-src-all@freebsd.org  Wed Jan 20 08:13:12 2016
Return-Path: <owner-svn-src-all@freebsd.org>
Delivered-To: svn-src-all@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id 178A7A89D97;
 Wed, 20 Jan 2016 08:13:12 +0000 (UTC)
 (envelope-from arybchik@FreeBSD.org)
Received: from repo.freebsd.org (repo.freebsd.org
 [IPv6:2610:1c1:1:6068::e6a:0])
 (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
 (Client did not present a certificate)
 by mx1.freebsd.org (Postfix) with ESMTPS id CD2A81481;
 Wed, 20 Jan 2016 08:13:11 +0000 (UTC)
 (envelope-from arybchik@FreeBSD.org)
Received: from repo.freebsd.org ([127.0.1.37])
 by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u0K8DAh3033614;
 Wed, 20 Jan 2016 08:13:10 GMT (envelope-from arybchik@FreeBSD.org)
Received: (from arybchik@localhost)
 by repo.freebsd.org (8.15.2/8.15.2/Submit) id u0K8DASY033613;
 Wed, 20 Jan 2016 08:13:10 GMT (envelope-from arybchik@FreeBSD.org)
Message-Id: <201601200813.u0K8DASY033613@repo.freebsd.org>
X-Authentication-Warning: repo.freebsd.org: arybchik set sender to
 arybchik@FreeBSD.org using -f
From: Andrew Rybchenko <arybchik@FreeBSD.org>
Date: Wed, 20 Jan 2016 08:13:10 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org
Subject: svn commit: r294393 - stable/10/sys/dev/sfxge/common
X-SVN-Group: stable-10
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.20
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for &quot;
 user&quot; and &quot; projects&quot; \)" <svn-src-all.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-all/>
List-Post: <mailto:svn-src-all@freebsd.org>
List-Help: <mailto:svn-src-all-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Wed, 20 Jan 2016 08:13:12 -0000

Author: arybchik
Date: Wed Jan 20 08:13:10 2016
New Revision: 294393
URL: https://svnweb.freebsd.org/changeset/base/294393

Log:
  MFC r294081
  
  sfxge: cleanup: simplify ef10_get_datapath_caps
  
  Submitted by:   Andy Moreton <amoreton at solarflare.com>
  Reviewed by:    gnn
  Sponsored by:   Solarflare Communications, Inc.

Modified:
  stable/10/sys/dev/sfxge/common/hunt_nic.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/sys/dev/sfxge/common/hunt_nic.c
==============================================================================
--- stable/10/sys/dev/sfxge/common/hunt_nic.c	Wed Jan 20 08:11:12 2016	(r294392)
+++ stable/10/sys/dev/sfxge/common/hunt_nic.c	Wed Jan 20 08:13:10 2016	(r294393)
@@ -430,8 +430,8 @@ fail1:
 static	__checkReturn	efx_rc_t
 efx_mcdi_get_capabilities(
 	__in		efx_nic_t *enp,
-	__out		efx_dword_t *flagsp,
-	__out		efx_dword_t *flags2p)
+	__out		uint32_t *flagsp,
+	__out		uint32_t *flags2p)
 {
 	efx_mcdi_req_t req;
 	uint8_t payload[MAX(MC_CMD_GET_CAPABILITIES_IN_LEN,
@@ -457,13 +457,12 @@ efx_mcdi_get_capabilities(
 		goto fail2;
 	}
 
-	*flagsp = *MCDI_OUT2(req, efx_dword_t, GET_CAPABILITIES_OUT_FLAGS1);
+	*flagsp = MCDI_OUT_DWORD(req, GET_CAPABILITIES_OUT_FLAGS1);
 
 	if (req.emr_out_length_used < MC_CMD_GET_CAPABILITIES_V2_OUT_LEN)
-		EFX_ZERO_DWORD(*flags2p);
+		*flags2p = 0;
 	else
-		*flags2p = *MCDI_OUT2(req, efx_dword_t,
-		    GET_CAPABILITIES_V2_OUT_FLAGS2);
+		*flags2p = MCDI_OUT_DWORD(req, GET_CAPABILITIES_V2_OUT_FLAGS2);
 
 	return (0);
 
@@ -897,78 +896,63 @@ ef10_get_datapath_caps(
 	__in		efx_nic_t *enp)
 {
 	efx_nic_cfg_t *encp = &(enp->en_nic_cfg);
-	efx_dword_t datapath_capabilities;
-	efx_dword_t datapath_capabilities_v2;
+	uint32_t flags;
+	uint32_t flags2;
 	efx_rc_t rc;
 
-	if ((rc = efx_mcdi_get_capabilities(enp, &datapath_capabilities,
-					    &datapath_capabilities_v2)) != 0)
+	if ((rc = efx_mcdi_get_capabilities(enp, &flags, &flags2)) != 0)
 		goto fail1;
 
+#define	CAP_FLAG(flags1, field)		\
+	((flags1) & (1 << (MC_CMD_GET_CAPABILITIES_V2_OUT_ ## field ## _LBN)))
+
+#define	CAP_FLAG2(flags2, field)	\
+	((flags2) & (1 << (MC_CMD_GET_CAPABILITIES_V2_OUT_ ## field ## _LBN)))
+
 	/*
 	 * Huntington RXDP firmware inserts a 0 or 14 byte prefix.
 	 * We only support the 14 byte prefix here.
 	 */
-	if (MCDI_CMD_DWORD_FIELD(&datapath_capabilities,
-		GET_CAPABILITIES_OUT_RX_PREFIX_LEN_14) != 1) {
+	if (CAP_FLAG(flags, RX_PREFIX_LEN_14) == 0) {
 		rc = ENOTSUP;
 		goto fail2;
 	}
 	encp->enc_rx_prefix_size = 14;
 
 	/* Check if the firmware supports TSO */
-	if (MCDI_CMD_DWORD_FIELD(&datapath_capabilities,
-				GET_CAPABILITIES_OUT_TX_TSO) == 1)
-		encp->enc_fw_assisted_tso_enabled = B_TRUE;
-	else
-		encp->enc_fw_assisted_tso_enabled = B_FALSE;
+	encp->enc_fw_assisted_tso_enabled =
+	    CAP_FLAG(flags, TX_TSO) ? B_TRUE : B_FALSE;
 
 	/* Check if the firmware supports FATSOv2 */
-	if (MCDI_CMD_DWORD_FIELD(&datapath_capabilities_v2,
-				GET_CAPABILITIES_V2_OUT_TX_TSO_V2) == 1)
-		encp->enc_fw_assisted_tso_v2_enabled = B_TRUE;
-	else
-		encp->enc_fw_assisted_tso_v2_enabled = B_FALSE;
+	encp->enc_fw_assisted_tso_v2_enabled =
+	    CAP_FLAG2(flags2, TX_TSO_V2) ? B_TRUE : B_FALSE;
 
 	/* Check if the firmware has vadapter/vport/vswitch support */
-	if (MCDI_CMD_DWORD_FIELD(&datapath_capabilities,
-				GET_CAPABILITIES_OUT_EVB) == 1)
-		encp->enc_datapath_cap_evb = B_TRUE;
-	else
-		encp->enc_datapath_cap_evb = B_FALSE;
+	encp->enc_datapath_cap_evb =
+	    CAP_FLAG(flags, EVB) ? B_TRUE : B_FALSE;
 
 	/* Check if the firmware supports VLAN insertion */
-	if (MCDI_CMD_DWORD_FIELD(&datapath_capabilities,
-				GET_CAPABILITIES_OUT_TX_VLAN_INSERTION) == 1)
-		encp->enc_hw_tx_insert_vlan_enabled = B_TRUE;
-	else
-		encp->enc_hw_tx_insert_vlan_enabled = B_FALSE;
+	encp->enc_hw_tx_insert_vlan_enabled =
+	    CAP_FLAG(flags, TX_VLAN_INSERTION) ? B_TRUE : B_FALSE;
 
 	/* Check if the firmware supports RX event batching */
-	if (MCDI_CMD_DWORD_FIELD(&datapath_capabilities,
-		GET_CAPABILITIES_OUT_RX_BATCHING) == 1) {
-		encp->enc_rx_batching_enabled = B_TRUE;
+	encp->enc_rx_batching_enabled =
+	    CAP_FLAG(flags, RX_BATCHING) ? B_TRUE : B_FALSE;
+
+	if (encp->enc_rx_batching_enabled)
 		encp->enc_rx_batch_max = 16;
-	} else {
-		encp->enc_rx_batching_enabled = B_FALSE;
-	}
 
 	/* Check if the firmware supports disabling scatter on RXQs */
-	if (MCDI_CMD_DWORD_FIELD(&datapath_capabilities,
-			    GET_CAPABILITIES_OUT_RX_DISABLE_SCATTER) == 1) {
-		encp->enc_rx_disable_scatter_supported = B_TRUE;
-	} else {
-		encp->enc_rx_disable_scatter_supported = B_FALSE;
-	}
+	encp->enc_rx_disable_scatter_supported =
+	    CAP_FLAG(flags, RX_DISABLE_SCATTER) ? B_TRUE : B_FALSE;
 
 	/* Check if the firmware supports set mac with running filters */
-	if (MCDI_CMD_DWORD_FIELD(&datapath_capabilities,
-	    GET_CAPABILITIES_OUT_VADAPTOR_PERMIT_SET_MAC_WHEN_FILTERS_INSTALLED)
-	    == 1) {
-		encp->enc_allow_set_mac_with_installed_filters = B_TRUE;
-	} else {
-		encp->enc_allow_set_mac_with_installed_filters = B_FALSE;
-	}
+	encp->enc_allow_set_mac_with_installed_filters =
+	    CAP_FLAG(flags, VADAPTOR_PERMIT_SET_MAC_WHEN_FILTERS_INSTALLED) ?
+	    B_TRUE : B_FALSE;
+
+#undef CAP_FLAG
+#undef CAP_FLAG2
 
 	return (0);
 

From owner-svn-src-all@freebsd.org  Wed Jan 20 08:14:01 2016
Return-Path: <owner-svn-src-all@freebsd.org>
Delivered-To: svn-src-all@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6CFFBA89E05;
 Wed, 20 Jan 2016 08:14:01 +0000 (UTC)
 (envelope-from arybchik@FreeBSD.org)
Received: from repo.freebsd.org (repo.freebsd.org
 [IPv6:2610:1c1:1:6068::e6a:0])
 (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
 (Client did not present a certificate)
 by mx1.freebsd.org (Postfix) with ESMTPS id 3CF3D1613;
 Wed, 20 Jan 2016 08:14:01 +0000 (UTC)
 (envelope-from arybchik@FreeBSD.org)
Received: from repo.freebsd.org ([127.0.1.37])
 by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u0K8E0b1033705;
 Wed, 20 Jan 2016 08:14:00 GMT (envelope-from arybchik@FreeBSD.org)
Received: (from arybchik@localhost)
 by repo.freebsd.org (8.15.2/8.15.2/Submit) id u0K8DxYb033694;
 Wed, 20 Jan 2016 08:13:59 GMT (envelope-from arybchik@FreeBSD.org)
Message-Id: <201601200813.u0K8DxYb033694@repo.freebsd.org>
X-Authentication-Warning: repo.freebsd.org: arybchik set sender to
 arybchik@FreeBSD.org using -f
From: Andrew Rybchenko <arybchik@FreeBSD.org>
Date: Wed, 20 Jan 2016 08:13:59 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org
Subject: svn commit: r294394 - stable/10/sys/dev/sfxge/common
X-SVN-Group: stable-10
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.20
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for &quot;
 user&quot; and &quot; projects&quot; \)" <svn-src-all.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-all/>
List-Post: <mailto:svn-src-all@freebsd.org>
List-Help: <mailto:svn-src-all-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Wed, 20 Jan 2016 08:14:01 -0000

Author: arybchik
Date: Wed Jan 20 08:13:59 2016
New Revision: 294394
URL: https://svnweb.freebsd.org/changeset/base/294394

Log:
  MFC r294091
  
  sfxge: rename common hunt PHY methods to ef10 and use for Medford
  
  Leaving BIST methods for now as, though the Medford bootrom now has lots
  of BIST support, production firmware doesn't appear to have been updated
  yet.
  
  Submitted by:   Mark Spender <mspender at solarflare.com>
  Reviewed by:    gnn
  Sponsored by:   Solarflare Communications, Inc.

Modified:
  stable/10/sys/dev/sfxge/common/efx_phy.c
  stable/10/sys/dev/sfxge/common/hunt_ev.c
  stable/10/sys/dev/sfxge/common/hunt_impl.h
  stable/10/sys/dev/sfxge/common/hunt_mac.c
  stable/10/sys/dev/sfxge/common/hunt_nic.c
  stable/10/sys/dev/sfxge/common/hunt_phy.c
  stable/10/sys/dev/sfxge/common/medford_nic.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/sys/dev/sfxge/common/efx_phy.c
==============================================================================
--- stable/10/sys/dev/sfxge/common/efx_phy.c	Wed Jan 20 08:13:10 2016	(r294393)
+++ stable/10/sys/dev/sfxge/common/efx_phy.c	Wed Jan 20 08:13:59 2016	(r294394)
@@ -265,33 +265,34 @@ static efx_phy_ops_t	__efx_phy_siena_ops
 };
 #endif	/* EFSYS_OPT_SIENA */
 
-#if EFSYS_OPT_HUNTINGTON
-static efx_phy_ops_t	__efx_phy_hunt_ops = {
-	hunt_phy_power,			/* epo_power */
+#if EFSYS_OPT_HUNTINGTON || EFSYS_OPT_MEDFORD
+static efx_phy_ops_t	__efx_phy_ef10_ops = {
+	ef10_phy_power,			/* epo_power */
 	NULL,				/* epo_reset */
-	hunt_phy_reconfigure,		/* epo_reconfigure */
-	hunt_phy_verify,		/* epo_verify */
+	ef10_phy_reconfigure,		/* epo_reconfigure */
+	ef10_phy_verify,		/* epo_verify */
 	NULL,				/* epo_uplink_check */
 	NULL,				/* epo_downlink_check */
-	hunt_phy_oui_get,		/* epo_oui_get */
+	ef10_phy_oui_get,		/* epo_oui_get */
 #if EFSYS_OPT_PHY_STATS
-	hunt_phy_stats_update,		/* epo_stats_update */
+	ef10_phy_stats_update,		/* epo_stats_update */
 #endif	/* EFSYS_OPT_PHY_STATS */
 #if EFSYS_OPT_PHY_PROPS
 #if EFSYS_OPT_NAMES
-	hunt_phy_prop_name,		/* epo_prop_name */
+	ef10_phy_prop_name,		/* epo_prop_name */
 #endif
-	hunt_phy_prop_get,		/* epo_prop_get */
-	hunt_phy_prop_set,		/* epo_prop_set */
+	ef10_phy_prop_get,		/* epo_prop_get */
+	ef10_phy_prop_set,		/* epo_prop_set */
 #endif	/* EFSYS_OPT_PHY_PROPS */
 #if EFSYS_OPT_BIST
+	/* FIXME: Are these BIST methods appropriate for Medford? */
 	hunt_bist_enable_offline,	/* epo_bist_enable_offline */
 	hunt_bist_start,		/* epo_bist_start */
 	hunt_bist_poll,			/* epo_bist_poll */
 	hunt_bist_stop,			/* epo_bist_stop */
 #endif	/* EFSYS_OPT_BIST */
 };
-#endif	/* EFSYS_OPT_HUNTINGTON */
+#endif	/* EFSYS_OPT_HUNTINGTON || EFSYS_OPT_MEDFORD */
 
 	__checkReturn	efx_rc_t
 efx_phy_probe(
@@ -356,9 +357,14 @@ efx_phy_probe(
 #endif	/* EFSYS_OPT_SIENA */
 #if EFSYS_OPT_HUNTINGTON
 	case EFX_FAMILY_HUNTINGTON:
-		epop = (efx_phy_ops_t *)&__efx_phy_hunt_ops;
+		epop = (efx_phy_ops_t *)&__efx_phy_ef10_ops;
 		break;
 #endif	/* EFSYS_OPT_HUNTINGTON */
+#if EFSYS_OPT_MEDFORD
+	case EFX_FAMILY_MEDFORD:
+		epop = (efx_phy_ops_t *)&__efx_phy_ef10_ops;
+		break;
+#endif	/* EFSYS_OPT_MEDFORD */
 	default:
 		rc = ENOTSUP;
 		goto fail1;

Modified: stable/10/sys/dev/sfxge/common/hunt_ev.c
==============================================================================
--- stable/10/sys/dev/sfxge/common/hunt_ev.c	Wed Jan 20 08:13:10 2016	(r294393)
+++ stable/10/sys/dev/sfxge/common/hunt_ev.c	Wed Jan 20 08:13:59 2016	(r294394)
@@ -835,7 +835,7 @@ ef10_ev_mcdi(
 	case MCDI_EVENT_CODE_LINKCHANGE: {
 		efx_link_mode_t link_mode;
 
-		hunt_phy_link_ev(enp, eqp, &link_mode);
+		ef10_phy_link_ev(enp, eqp, &link_mode);
 		should_abort = eecp->eec_link_change(arg, link_mode);
 		break;
 	}

Modified: stable/10/sys/dev/sfxge/common/hunt_impl.h
==============================================================================
--- stable/10/sys/dev/sfxge/common/hunt_impl.h	Wed Jan 20 08:13:10 2016	(r294393)
+++ stable/10/sys/dev/sfxge/common/hunt_impl.h	Wed Jan 20 08:13:59 2016	(r294394)
@@ -462,38 +462,38 @@ typedef struct ef10_link_state_s {
 } ef10_link_state_t;
 
 extern			void
-hunt_phy_link_ev(
+ef10_phy_link_ev(
 	__in		efx_nic_t *enp,
 	__in		efx_qword_t *eqp,
 	__out		efx_link_mode_t *link_modep);
 
 extern	__checkReturn	efx_rc_t
-hunt_phy_get_link(
+ef10_phy_get_link(
 	__in		efx_nic_t *enp,
 	__out		ef10_link_state_t *elsp);
 
 extern	__checkReturn	efx_rc_t
-hunt_phy_power(
+ef10_phy_power(
 	__in		efx_nic_t *enp,
 	__in		boolean_t on);
 
 extern	__checkReturn	efx_rc_t
-hunt_phy_reconfigure(
+ef10_phy_reconfigure(
 	__in		efx_nic_t *enp);
 
 extern	__checkReturn	efx_rc_t
-hunt_phy_verify(
+ef10_phy_verify(
 	__in		efx_nic_t *enp);
 
 extern	__checkReturn	efx_rc_t
-hunt_phy_oui_get(
+ef10_phy_oui_get(
 	__in		efx_nic_t *enp,
 	__out		uint32_t *ouip);
 
 #if EFSYS_OPT_PHY_STATS
 
 extern	__checkReturn			efx_rc_t
-hunt_phy_stats_update(
+ef10_phy_stats_update(
 	__in				efx_nic_t *enp,
 	__in				efsys_mem_t *esmp,
 	__inout_ecount(EFX_PHY_NSTATS)	uint32_t *stat);
@@ -505,21 +505,21 @@ hunt_phy_stats_update(
 #if EFSYS_OPT_NAMES
 
 extern		const char *
-hunt_phy_prop_name(
+ef10_phy_prop_name(
 	__in	efx_nic_t *enp,
 	__in	unsigned int id);
 
 #endif	/* EFSYS_OPT_NAMES */
 
 extern	__checkReturn	efx_rc_t
-hunt_phy_prop_get(
+ef10_phy_prop_get(
 	__in		efx_nic_t *enp,
 	__in		unsigned int id,
 	__in		uint32_t flags,
 	__out		uint32_t *valp);
 
 extern	__checkReturn	efx_rc_t
-hunt_phy_prop_set(
+ef10_phy_prop_set(
 	__in		efx_nic_t *enp,
 	__in		unsigned int id,
 	__in		uint32_t val);

Modified: stable/10/sys/dev/sfxge/common/hunt_mac.c
==============================================================================
--- stable/10/sys/dev/sfxge/common/hunt_mac.c	Wed Jan 20 08:13:10 2016	(r294393)
+++ stable/10/sys/dev/sfxge/common/hunt_mac.c	Wed Jan 20 08:13:59 2016	(r294394)
@@ -51,7 +51,7 @@ hunt_mac_poll(
 	ef10_link_state_t els;
 	efx_rc_t rc;
 
-	if ((rc = hunt_phy_get_link(enp, &els)) != 0)
+	if ((rc = ef10_phy_get_link(enp, &els)) != 0)
 		goto fail1;
 
 	epp->ep_adv_cap_mask = els.els_adv_cap_mask;
@@ -86,7 +86,7 @@ hunt_mac_up(
 	 * Because Huntington doesn't *require* polling, we can't rely on
 	 * hunt_mac_poll() being executed to populate epp->ep_mac_up.
 	 */
-	if ((rc = hunt_phy_get_link(enp, &els)) != 0)
+	if ((rc = ef10_phy_get_link(enp, &els)) != 0)
 		goto fail1;
 
 	*mac_upp = els.els_mac_up;

Modified: stable/10/sys/dev/sfxge/common/hunt_nic.c
==============================================================================
--- stable/10/sys/dev/sfxge/common/hunt_nic.c	Wed Jan 20 08:13:10 2016	(r294393)
+++ stable/10/sys/dev/sfxge/common/hunt_nic.c	Wed Jan 20 08:13:59 2016	(r294394)
@@ -1190,7 +1190,7 @@ hunt_board_cfg(
 		goto fail6;
 
 	/* Obtain the default PHY advertised capabilities */
-	if ((rc = hunt_phy_get_link(enp, &els)) != 0)
+	if ((rc = ef10_phy_get_link(enp, &els)) != 0)
 		goto fail7;
 	epp->ep_default_adv_cap_mask = els.els_adv_cap_mask;
 	epp->ep_adv_cap_mask = els.els_adv_cap_mask;

Modified: stable/10/sys/dev/sfxge/common/hunt_phy.c
==============================================================================
--- stable/10/sys/dev/sfxge/common/hunt_phy.c	Wed Jan 20 08:13:10 2016	(r294393)
+++ stable/10/sys/dev/sfxge/common/hunt_phy.c	Wed Jan 20 08:13:59 2016	(r294394)
@@ -37,15 +37,10 @@ __FBSDID("$FreeBSD$");
 #if EFSYS_OPT_HUNTINGTON
 
 static			void
-hunt_phy_decode_cap(
+mcdi_phy_decode_cap(
 	__in		uint32_t mcdi_cap,
 	__out		uint32_t *maskp)
 {
-	/*
-	 * TBD: consider common Siena/Hunt function: Hunt is a superset of
-	 * Siena here (adds 40G)
-	 */
-
 	uint32_t mask;
 
 	mask = 0;
@@ -76,7 +71,7 @@ hunt_phy_decode_cap(
 }
 
 static			void
-hunt_phy_decode_link_mode(
+mcdi_phy_decode_link_mode(
 	__in		efx_nic_t *enp,
 	__in		uint32_t link_flags,
 	__in		unsigned int speed,
@@ -84,11 +79,6 @@ hunt_phy_decode_link_mode(
 	__out		efx_link_mode_t *link_modep,
 	__out		unsigned int *fcntlp)
 {
-	/*
-	 * TBD: consider common Siena/Hunt function: Hunt is a superset of
-	 * Siena here (adds 40G and generate-only flow control)
-	 */
-
 	boolean_t fd = !!(link_flags &
 		    (1 << MC_CMD_GET_LINK_OUT_FULL_DUPLEX_LBN));
 	boolean_t up = !!(link_flags &
@@ -127,16 +117,11 @@ hunt_phy_decode_link_mode(
 
 
 			void
-hunt_phy_link_ev(
+ef10_phy_link_ev(
 	__in		efx_nic_t *enp,
 	__in		efx_qword_t *eqp,
 	__out		efx_link_mode_t *link_modep)
 {
-	/*
-	 * TBD: consider common Siena/Hunt function: Hunt is a superset of
-	 * Siena here (adds 40G)
-	 */
-
 	efx_port_t *epp = &(enp->en_port);
 	unsigned int link_flags;
 	unsigned int speed;
@@ -167,10 +152,10 @@ hunt_phy_link_ev(
 	}
 
 	link_flags = MCDI_EV_FIELD(eqp, LINKCHANGE_LINK_FLAGS);
-	hunt_phy_decode_link_mode(enp, link_flags, speed,
+	mcdi_phy_decode_link_mode(enp, link_flags, speed,
 				    MCDI_EV_FIELD(eqp, LINKCHANGE_FCNTL),
 				    &link_mode, &fcntl);
-	hunt_phy_decode_cap(MCDI_EV_FIELD(eqp, LINKCHANGE_LP_CAP),
+	mcdi_phy_decode_cap(MCDI_EV_FIELD(eqp, LINKCHANGE_LP_CAP),
 			    &lp_cap_mask);
 
 	/*
@@ -191,19 +176,17 @@ hunt_phy_link_ev(
 }
 
 	__checkReturn	efx_rc_t
-hunt_phy_power(
+ef10_phy_power(
 	__in		efx_nic_t *enp,
 	__in		boolean_t power)
 {
-	/* TBD: consider common Siena/Hunt function: essentially identical */
-
 	efx_rc_t rc;
 
 	if (!power)
 		return (0);
 
 	/* Check if the PHY is a zombie */
-	if ((rc = hunt_phy_verify(enp)) != 0)
+	if ((rc = ef10_phy_verify(enp)) != 0)
 		goto fail1;
 
 	enp->en_reset_flags |= EFX_RESET_PHY;
@@ -217,16 +200,10 @@ fail1:
 }
 
 	__checkReturn	efx_rc_t
-hunt_phy_get_link(
+ef10_phy_get_link(
 	__in		efx_nic_t *enp,
 	__out		ef10_link_state_t *elsp)
 {
-	/*
-	 * TBD: consider common Siena/Hunt function: Hunt is very similar
-	 * (at least for now; not clear that the loopbacks should necessarily
-	 * be quite the same...)
-	 */
-
 	efx_mcdi_req_t req;
 	uint8_t payload[MAX(MC_CMD_GET_LINK_IN_LEN,
 			    MC_CMD_GET_LINK_OUT_LEN)];
@@ -251,12 +228,12 @@ hunt_phy_get_link(
 		goto fail2;
 	}
 
-	hunt_phy_decode_cap(MCDI_OUT_DWORD(req, GET_LINK_OUT_CAP),
+	mcdi_phy_decode_cap(MCDI_OUT_DWORD(req, GET_LINK_OUT_CAP),
 			    &elsp->els_adv_cap_mask);
-	hunt_phy_decode_cap(MCDI_OUT_DWORD(req, GET_LINK_OUT_LP_CAP),
+	mcdi_phy_decode_cap(MCDI_OUT_DWORD(req, GET_LINK_OUT_LP_CAP),
 			    &elsp->els_lp_cap_mask);
 
-	hunt_phy_decode_link_mode(enp, MCDI_OUT_DWORD(req, GET_LINK_OUT_FLAGS),
+	mcdi_phy_decode_link_mode(enp, MCDI_OUT_DWORD(req, GET_LINK_OUT_FLAGS),
 			    MCDI_OUT_DWORD(req, GET_LINK_OUT_LINK_SPEED),
 			    MCDI_OUT_DWORD(req, GET_LINK_OUT_FCNTL),
 			    &elsp->els_link_mode, &elsp->els_fcntl);
@@ -298,15 +275,9 @@ fail1:
 }
 
 	__checkReturn	efx_rc_t
-hunt_phy_reconfigure(
+ef10_phy_reconfigure(
 	__in		efx_nic_t *enp)
 {
-	/*
-	 * TBD: this is a little different for now (no LED support for Hunt
-	 * yet), but ultimately should consider common Siena/Hunt function:
-	 * Hunt should be a superset of Siena here (adds 40G)
-	 */
-
 	efx_nic_cfg_t *encp = &(enp->en_nic_cfg);
 	efx_port_t *epp = &(enp->en_port);
 	efx_mcdi_req_t req;
@@ -428,11 +399,9 @@ fail1:
 }
 
 	__checkReturn	efx_rc_t
-hunt_phy_verify(
+ef10_phy_verify(
 	__in		efx_nic_t *enp)
 {
-	/* TBD: consider common Siena/Hunt function: essentially identical */
-
 	efx_mcdi_req_t req;
 	uint8_t payload[MAX(MC_CMD_GET_PHY_STATE_IN_LEN,
 			    MC_CMD_GET_PHY_STATE_OUT_LEN)];
@@ -479,7 +448,7 @@ fail1:
 }
 
 	__checkReturn	efx_rc_t
-hunt_phy_oui_get(
+ef10_phy_oui_get(
 	__in		efx_nic_t *enp,
 	__out		uint32_t *ouip)
 {
@@ -491,7 +460,7 @@ hunt_phy_oui_get(
 #if EFSYS_OPT_PHY_STATS
 
 	__checkReturn				efx_rc_t
-hunt_phy_stats_update(
+ef10_phy_stats_update(
 	__in					efx_nic_t *enp,
 	__in					efsys_mem_t *esmp,
 	__inout_ecount(EFX_PHY_NSTATS)		uint32_t *stat)
@@ -509,8 +478,8 @@ hunt_phy_stats_update(
 
 #if EFSYS_OPT_NAMES
 
-extern		const char *
-hunt_phy_prop_name(
+		const char *
+ef10_phy_prop_name(
 	__in	efx_nic_t *enp,
 	__in	unsigned int id)
 {
@@ -521,8 +490,8 @@ hunt_phy_prop_name(
 
 #endif	/* EFSYS_OPT_NAMES */
 
-extern	__checkReturn	efx_rc_t
-hunt_phy_prop_get(
+	__checkReturn	efx_rc_t
+ef10_phy_prop_get(
 	__in		efx_nic_t *enp,
 	__in		unsigned int id,
 	__in		uint32_t flags,
@@ -533,8 +502,8 @@ hunt_phy_prop_get(
 	return (ENOTSUP);
 }
 
-extern	__checkReturn	efx_rc_t
-hunt_phy_prop_set(
+	__checkReturn	efx_rc_t
+ef10_phy_prop_set(
 	__in		efx_nic_t *enp,
 	__in		unsigned int id,
 	__in		uint32_t val)

Modified: stable/10/sys/dev/sfxge/common/medford_nic.c
==============================================================================
--- stable/10/sys/dev/sfxge/common/medford_nic.c	Wed Jan 20 08:13:10 2016	(r294393)
+++ stable/10/sys/dev/sfxge/common/medford_nic.c	Wed Jan 20 08:13:59 2016	(r294394)
@@ -126,7 +126,7 @@ medford_board_cfg(
 		goto fail6;
 
 	/* Obtain the default PHY advertised capabilities */
-	if ((rc = hunt_phy_get_link(enp, &els)) != 0)
+	if ((rc = ef10_phy_get_link(enp, &els)) != 0)
 		goto fail7;
 	epp->ep_default_adv_cap_mask = els.els_adv_cap_mask;
 	epp->ep_adv_cap_mask = els.els_adv_cap_mask;

From owner-svn-src-all@freebsd.org  Wed Jan 20 08:14:43 2016
Return-Path: <owner-svn-src-all@freebsd.org>
Delivered-To: svn-src-all@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id A9465A89E53;
 Wed, 20 Jan 2016 08:14:43 +0000 (UTC)
 (envelope-from arybchik@FreeBSD.org)
Received: from repo.freebsd.org (repo.freebsd.org
 [IPv6:2610:1c1:1:6068::e6a:0])
 (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
 (Client did not present a certificate)
 by mx1.freebsd.org (Postfix) with ESMTPS id 7B6141848;
 Wed, 20 Jan 2016 08:14:43 +0000 (UTC)
 (envelope-from arybchik@FreeBSD.org)
Received: from repo.freebsd.org ([127.0.1.37])
 by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u0K8Egoh033784;
 Wed, 20 Jan 2016 08:14:42 GMT (envelope-from arybchik@FreeBSD.org)
Received: (from arybchik@localhost)
 by repo.freebsd.org (8.15.2/8.15.2/Submit) id u0K8EgMQ033780;
 Wed, 20 Jan 2016 08:14:42 GMT (envelope-from arybchik@FreeBSD.org)
Message-Id: <201601200814.u0K8EgMQ033780@repo.freebsd.org>
X-Authentication-Warning: repo.freebsd.org: arybchik set sender to
 arybchik@FreeBSD.org using -f
From: Andrew Rybchenko <arybchik@FreeBSD.org>
Date: Wed, 20 Jan 2016 08:14:42 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org
Subject: svn commit: r294395 - stable/10/sys/dev/sfxge/common
X-SVN-Group: stable-10
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.20
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for &quot;
 user&quot; and &quot; projects&quot; \)" <svn-src-all.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-all/>
List-Post: <mailto:svn-src-all@freebsd.org>
List-Help: <mailto:svn-src-all-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Wed, 20 Jan 2016 08:14:43 -0000

Author: arybchik
Date: Wed Jan 20 08:14:42 2016
New Revision: 294395
URL: https://svnweb.freebsd.org/changeset/base/294395

Log:
  MFC r294092
  
  sfxge: rename Huntington MAC methods to EF10 and use for Medford
  
  Submitted by:   Mark Spender <mspender at solarflare.com>
  Reviewed by:    gnn
  Sponsored by:   Solarflare Communications, Inc.

Modified:
  stable/10/sys/dev/sfxge/common/efx_impl.h
  stable/10/sys/dev/sfxge/common/efx_mac.c
  stable/10/sys/dev/sfxge/common/hunt_impl.h
  stable/10/sys/dev/sfxge/common/hunt_mac.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/sys/dev/sfxge/common/efx_impl.h
==============================================================================
--- stable/10/sys/dev/sfxge/common/efx_impl.h	Wed Jan 20 08:13:59 2016	(r294394)
+++ stable/10/sys/dev/sfxge/common/efx_impl.h	Wed Jan 20 08:14:42 2016	(r294395)
@@ -97,6 +97,7 @@ typedef enum efx_mac_type_e {
 	EFX_MAC_FALCON_XMAC,
 	EFX_MAC_SIENA,
 	EFX_MAC_HUNTINGTON,
+	EFX_MAC_MEDFORD,
 	EFX_MAC_NTYPES
 } efx_mac_type_t;
 

Modified: stable/10/sys/dev/sfxge/common/efx_mac.c
==============================================================================
--- stable/10/sys/dev/sfxge/common/efx_mac.c	Wed Jan 20 08:13:59 2016	(r294394)
+++ stable/10/sys/dev/sfxge/common/efx_mac.c	Wed Jan 20 08:14:42 2016	(r294395)
@@ -113,27 +113,27 @@ static efx_mac_ops_t	__efx_siena_mac_ops
 };
 #endif	/* EFSYS_OPT_SIENA */
 
-#if EFSYS_OPT_HUNTINGTON
-static efx_mac_ops_t	__efx_hunt_mac_ops = {
+#if EFSYS_OPT_HUNTINGTON || EFSYS_OPT_MEDFORD
+static efx_mac_ops_t	__efx_ef10_mac_ops = {
 	NULL,					/* emo_reset */
-	hunt_mac_poll,				/* emo_poll */
-	hunt_mac_up,				/* emo_up */
-	hunt_mac_addr_set,			/* emo_addr_set */
-	hunt_mac_reconfigure,			/* emo_reconfigure */
-	hunt_mac_multicast_list_set,		/* emo_multicast_list_set */
-	hunt_mac_filter_default_rxq_set,	/* emo_filter_default_rxq_set */
-	hunt_mac_filter_default_rxq_clear,
+	ef10_mac_poll,				/* emo_poll */
+	ef10_mac_up,				/* emo_up */
+	ef10_mac_addr_set,			/* emo_addr_set */
+	ef10_mac_reconfigure,			/* emo_reconfigure */
+	ef10_mac_multicast_list_set,		/* emo_multicast_list_set */
+	ef10_mac_filter_default_rxq_set,	/* emo_filter_default_rxq_set */
+	ef10_mac_filter_default_rxq_clear,
 					/* emo_filter_default_rxq_clear */
 #if EFSYS_OPT_LOOPBACK
-	hunt_mac_loopback_set,			/* emo_loopback_set */
+	ef10_mac_loopback_set,			/* emo_loopback_set */
 #endif	/* EFSYS_OPT_LOOPBACK */
 #if EFSYS_OPT_MAC_STATS
 	efx_mcdi_mac_stats_upload,		/* emo_stats_upload */
 	efx_mcdi_mac_stats_periodic,		/* emo_stats_periodic */
-	hunt_mac_stats_update			/* emo_stats_update */
+	ef10_mac_stats_update			/* emo_stats_update */
 #endif	/* EFSYS_OPT_MAC_STATS */
 };
-#endif	/* EFSYS_OPT_HUNTINGTON */
+#endif	/* EFSYS_OPT_HUNTINGTON || EFSYS_OPT_MEDFORD */
 
 static efx_mac_ops_t	*__efx_mac_ops[] = {
 	/* [EFX_MAC_INVALID] */
@@ -158,7 +158,13 @@ static efx_mac_ops_t	*__efx_mac_ops[] = 
 #endif
 	/* [EFX_MAC_HUNTINGTON] */
 #if EFSYS_OPT_HUNTINGTON
-	&__efx_hunt_mac_ops,
+	&__efx_ef10_mac_ops,
+#else
+	NULL,
+#endif
+	/* [EFX_MAC_MEDFORD] */
+#if EFSYS_OPT_MEDFORD
+	&__efx_ef10_mac_ops,
 #else
 	NULL,
 #endif
@@ -781,6 +787,13 @@ efx_mac_select(
 	efx_mac_ops_t *emop;
 	int rc = EINVAL;
 
+#if EFSYS_OPT_SIENA
+	if (enp->en_family == EFX_FAMILY_SIENA) {
+		type = EFX_MAC_SIENA;
+		goto chosen;
+	}
+#endif
+
 #if EFSYS_OPT_HUNTINGTON
 	if (enp->en_family == EFX_FAMILY_HUNTINGTON) {
 		type = EFX_MAC_HUNTINGTON;
@@ -788,9 +801,9 @@ efx_mac_select(
 	}
 #endif
 
-#if EFSYS_OPT_SIENA
-	if (enp->en_family == EFX_FAMILY_SIENA) {
-		type = EFX_MAC_SIENA;
+#if EFSYS_OPT_MEDFORD
+	if (enp->en_family == EFX_FAMILY_MEDFORD) {
+		type = EFX_MAC_MEDFORD;
 		goto chosen;
 	}
 #endif

Modified: stable/10/sys/dev/sfxge/common/hunt_impl.h
==============================================================================
--- stable/10/sys/dev/sfxge/common/hunt_impl.h	Wed Jan 20 08:13:59 2016	(r294394)
+++ stable/10/sys/dev/sfxge/common/hunt_impl.h	Wed Jan 20 08:14:42 2016	(r294395)
@@ -220,41 +220,41 @@ ef10_nic_unprobe(
 /* MAC */
 
 extern	__checkReturn	efx_rc_t
-hunt_mac_poll(
+ef10_mac_poll(
 	__in		efx_nic_t *enp,
 	__out		efx_link_mode_t *link_modep);
 
 extern	__checkReturn	efx_rc_t
-hunt_mac_up(
+ef10_mac_up(
 	__in		efx_nic_t *enp,
 	__out		boolean_t *mac_upp);
 
 extern	__checkReturn	efx_rc_t
-hunt_mac_addr_set(
+ef10_mac_addr_set(
 	__in	efx_nic_t *enp);
 
 extern	__checkReturn	efx_rc_t
-hunt_mac_reconfigure(
+ef10_mac_reconfigure(
 	__in	efx_nic_t *enp);
 
 extern	__checkReturn	efx_rc_t
-hunt_mac_multicast_list_set(
+ef10_mac_multicast_list_set(
 	__in				efx_nic_t *enp);
 
 extern	__checkReturn	efx_rc_t
-hunt_mac_filter_default_rxq_set(
+ef10_mac_filter_default_rxq_set(
 	__in		efx_nic_t *enp,
 	__in		efx_rxq_t *erp,
 	__in		boolean_t using_rss);
 
 extern			void
-hunt_mac_filter_default_rxq_clear(
+ef10_mac_filter_default_rxq_clear(
 	__in		efx_nic_t *enp);
 
 #if EFSYS_OPT_LOOPBACK
 
 extern	__checkReturn	efx_rc_t
-hunt_mac_loopback_set(
+ef10_mac_loopback_set(
 	__in		efx_nic_t *enp,
 	__in		efx_link_mode_t link_mode,
 	__in		efx_loopback_type_t loopback_type);
@@ -264,7 +264,7 @@ hunt_mac_loopback_set(
 #if EFSYS_OPT_MAC_STATS
 
 extern	__checkReturn			efx_rc_t
-hunt_mac_stats_update(
+ef10_mac_stats_update(
 	__in				efx_nic_t *enp,
 	__in				efsys_mem_t *esmp,
 	__inout_ecount(EFX_MAC_NSTATS)	efsys_stat_t *stat,

Modified: stable/10/sys/dev/sfxge/common/hunt_mac.c
==============================================================================
--- stable/10/sys/dev/sfxge/common/hunt_mac.c	Wed Jan 20 08:13:59 2016	(r294394)
+++ stable/10/sys/dev/sfxge/common/hunt_mac.c	Wed Jan 20 08:14:42 2016	(r294395)
@@ -38,15 +38,10 @@ __FBSDID("$FreeBSD$");
 #if EFSYS_OPT_HUNTINGTON
 
 	__checkReturn	efx_rc_t
-hunt_mac_poll(
+ef10_mac_poll(
 	__in		efx_nic_t *enp,
 	__out		efx_link_mode_t *link_modep)
 {
-	/*
-	 * TBD: Consider a common Siena/Huntington function.  The code is
-	 * essentially identical.
-	 */
-
 	efx_port_t *epp = &(enp->en_port);
 	ef10_link_state_t els;
 	efx_rc_t rc;
@@ -70,21 +65,16 @@ fail1:
 }
 
 	__checkReturn	efx_rc_t
-hunt_mac_up(
+ef10_mac_up(
 	__in		efx_nic_t *enp,
 	__out		boolean_t *mac_upp)
 {
-	/*
-	 * TBD: Consider a common Siena/Huntington function.  The code is
-	 * essentially identical.
-	 */
-
 	ef10_link_state_t els;
 	efx_rc_t rc;
 
 	/*
-	 * Because Huntington doesn't *require* polling, we can't rely on
-	 * hunt_mac_poll() being executed to populate epp->ep_mac_up.
+	 * Because EF10 doesn't *require* polling, we can't rely on
+	 * ef10_mac_poll() being executed to populate epp->ep_mac_up.
 	 */
 	if ((rc = ef10_phy_get_link(enp, &els)) != 0)
 		goto fail1;
@@ -100,7 +90,7 @@ fail1:
 }
 
 /*
- * Huntington uses MC_CMD_VADAPTOR_SET_MAC to set the
+ * EF10 adapters use MC_CMD_VADAPTOR_SET_MAC to set the
  * MAC address; the address field in MC_CMD_SET_MAC has no
  * effect.
  * MC_CMD_VADAPTOR_SET_MAC requires mac-spoofing privilege and
@@ -144,7 +134,7 @@ fail1:
 }
 
 	__checkReturn	efx_rc_t
-hunt_mac_addr_set(
+ef10_mac_addr_set(
 	__in		efx_nic_t *enp)
 {
 	efx_rc_t rc;
@@ -153,8 +143,11 @@ hunt_mac_addr_set(
 		if (rc != ENOTSUP)
 			goto fail1;
 
-		/* Fallback for older firmware without Vadapter support */
-		if ((rc = hunt_mac_reconfigure(enp)) != 0)
+		/*
+		 * Fallback for older Huntington firmware without Vadapter
+		 * support.
+		 */
+		if ((rc = ef10_mac_reconfigure(enp)) != 0)
 			goto fail2;
 	}
 
@@ -170,7 +163,7 @@ fail1:
 }
 
 __checkReturn	efx_rc_t
-hunt_mac_reconfigure(
+ef10_mac_reconfigure(
 	__in		efx_nic_t *enp)
 {
 	efx_port_t *epp = &(enp->en_port);
@@ -197,6 +190,8 @@ hunt_mac_reconfigure(
 	 * from reaching the filters. As Huntington filters drop any
 	 * traffic that does not match a filter it is ok to leave the
 	 * MAC running in promiscuous mode. See bug41141.
+	 *
+	 * FIXME: Does REJECT_UNCST behave the same way on Medford?
 	 */
 	MCDI_IN_POPULATE_DWORD_2(req, SET_MAC_IN_REJECT,
 				    SET_MAC_IN_REJECT_UNCST, 0,
@@ -247,16 +242,15 @@ fail1:
 }
 
 	__checkReturn			efx_rc_t
-hunt_mac_multicast_list_set(
+ef10_mac_multicast_list_set(
 	__in				efx_nic_t *enp)
 {
 	efx_port_t *epp = &(enp->en_port);
 	efx_mac_ops_t *emop = epp->ep_emop;
 	efx_rc_t rc;
 
-	EFSYS_ASSERT(enp->en_family == EFX_FAMILY_HUNTINGTON);
-
-	/* FIXME: Insert filters for multicast list */
+	EFSYS_ASSERT(enp->en_family == EFX_FAMILY_HUNTINGTON ||
+		    enp->en_family == EFX_FAMILY_MEDFORD);
 
 	if ((rc = emop->emo_reconfigure(enp)) != 0)
 		goto fail1;
@@ -270,7 +264,7 @@ fail1:
 }
 
 	__checkReturn	efx_rc_t
-hunt_mac_filter_default_rxq_set(
+ef10_mac_filter_default_rxq_set(
 	__in		efx_nic_t *enp,
 	__in		efx_rxq_t *erp,
 	__in		boolean_t using_rss)
@@ -304,7 +298,7 @@ fail1:
 }
 
 			void
-hunt_mac_filter_default_rxq_clear(
+ef10_mac_filter_default_rxq_clear(
 	__in		efx_nic_t *enp)
 {
 	efx_port_t *epp = &(enp->en_port);
@@ -322,23 +316,18 @@ hunt_mac_filter_default_rxq_clear(
 #if EFSYS_OPT_LOOPBACK
 
 	__checkReturn	efx_rc_t
-hunt_mac_loopback_set(
+ef10_mac_loopback_set(
 	__in		efx_nic_t *enp,
 	__in		efx_link_mode_t link_mode,
 	__in		efx_loopback_type_t loopback_type)
 {
-	/*
-	 * TBD: Consider a common Siena/Huntington function.  The code is
-	 * essentially identical.
-	 */
-
 	efx_port_t *epp = &(enp->en_port);
 	efx_phy_ops_t *epop = epp->ep_epop;
 	efx_loopback_type_t old_loopback_type;
 	efx_link_mode_t old_loopback_link_mode;
 	efx_rc_t rc;
 
-	/* The PHY object handles this on Huntington */
+	/* The PHY object handles this on EF10 */
 	old_loopback_type = epp->ep_loopback_type;
 	old_loopback_link_mode = epp->ep_loopback_link_mode;
 	epp->ep_loopback_type = loopback_type;
@@ -362,12 +351,12 @@ fail1:
 
 #if EFSYS_OPT_MAC_STATS
 
-#define	HUNT_MAC_STAT_READ(_esmp, _field, _eqp)			\
+#define	EF10_MAC_STAT_READ(_esmp, _field, _eqp)			\
 	EFSYS_MEM_READQ((_esmp), (_field) * sizeof (efx_qword_t), _eqp)
 
 
 	__checkReturn			efx_rc_t
-hunt_mac_stats_update(
+ef10_mac_stats_update(
 	__in				efx_nic_t *enp,
 	__in				efsys_mem_t *esmp,
 	__inout_ecount(EFX_MAC_NSTATS)	efsys_stat_t *stat,
@@ -381,301 +370,301 @@ hunt_mac_stats_update(
 
 	/* Read END first so we don't race with the MC */
 	EFSYS_DMA_SYNC_FOR_KERNEL(esmp, 0, EFX_MAC_STATS_SIZE);
-	HUNT_MAC_STAT_READ(esmp, MC_CMD_MAC_GENERATION_END,
+	EF10_MAC_STAT_READ(esmp, MC_CMD_MAC_GENERATION_END,
 			    &generation_end);
 	EFSYS_MEM_READ_BARRIER();
 
 	/* TX */
-	HUNT_MAC_STAT_READ(esmp, MC_CMD_MAC_TX_PKTS, &value);
+	EF10_MAC_STAT_READ(esmp, MC_CMD_MAC_TX_PKTS, &value);
 	EFSYS_STAT_SET_QWORD(&(stat[EFX_MAC_TX_PKTS]), &value);
 
-	HUNT_MAC_STAT_READ(esmp, MC_CMD_MAC_TX_CONTROL_PKTS, &value);
+	EF10_MAC_STAT_READ(esmp, MC_CMD_MAC_TX_CONTROL_PKTS, &value);
 	EFSYS_STAT_SUBR_QWORD(&(stat[EFX_MAC_TX_PKTS]), &value);
 
-	HUNT_MAC_STAT_READ(esmp, MC_CMD_MAC_TX_PAUSE_PKTS, &value);
+	EF10_MAC_STAT_READ(esmp, MC_CMD_MAC_TX_PAUSE_PKTS, &value);
 	EFSYS_STAT_SET_QWORD(&(stat[EFX_MAC_TX_PAUSE_PKTS]), &value);
 
-	HUNT_MAC_STAT_READ(esmp, MC_CMD_MAC_TX_UNICAST_PKTS, &value);
+	EF10_MAC_STAT_READ(esmp, MC_CMD_MAC_TX_UNICAST_PKTS, &value);
 	EFSYS_STAT_SET_QWORD(&(stat[EFX_MAC_TX_UNICST_PKTS]), &value);
 
-	HUNT_MAC_STAT_READ(esmp, MC_CMD_MAC_TX_MULTICAST_PKTS, &value);
+	EF10_MAC_STAT_READ(esmp, MC_CMD_MAC_TX_MULTICAST_PKTS, &value);
 	EFSYS_STAT_SET_QWORD(&(stat[EFX_MAC_TX_MULTICST_PKTS]), &value);
 
-	HUNT_MAC_STAT_READ(esmp, MC_CMD_MAC_TX_BROADCAST_PKTS, &value);
+	EF10_MAC_STAT_READ(esmp, MC_CMD_MAC_TX_BROADCAST_PKTS, &value);
 	EFSYS_STAT_SET_QWORD(&(stat[EFX_MAC_TX_BRDCST_PKTS]), &value);
 
-	HUNT_MAC_STAT_READ(esmp, MC_CMD_MAC_TX_BYTES, &value);
+	EF10_MAC_STAT_READ(esmp, MC_CMD_MAC_TX_BYTES, &value);
 	EFSYS_STAT_SET_QWORD(&(stat[EFX_MAC_TX_OCTETS]), &value);
 
-	HUNT_MAC_STAT_READ(esmp, MC_CMD_MAC_TX_LT64_PKTS, &value);
+	EF10_MAC_STAT_READ(esmp, MC_CMD_MAC_TX_LT64_PKTS, &value);
 	EFSYS_STAT_SET_QWORD(&(stat[EFX_MAC_TX_LE_64_PKTS]), &value);
-	HUNT_MAC_STAT_READ(esmp, MC_CMD_MAC_TX_64_PKTS, &value);
+	EF10_MAC_STAT_READ(esmp, MC_CMD_MAC_TX_64_PKTS, &value);
 	EFSYS_STAT_SET_QWORD(&(stat[EFX_MAC_TX_LE_64_PKTS]), &value);
 
-	HUNT_MAC_STAT_READ(esmp, MC_CMD_MAC_TX_65_TO_127_PKTS, &value);
+	EF10_MAC_STAT_READ(esmp, MC_CMD_MAC_TX_65_TO_127_PKTS, &value);
 	EFSYS_STAT_SET_QWORD(&(stat[EFX_MAC_TX_65_TO_127_PKTS]), &value);
 
-	HUNT_MAC_STAT_READ(esmp, MC_CMD_MAC_TX_128_TO_255_PKTS, &value);
+	EF10_MAC_STAT_READ(esmp, MC_CMD_MAC_TX_128_TO_255_PKTS, &value);
 	EFSYS_STAT_SET_QWORD(&(stat[EFX_MAC_TX_128_TO_255_PKTS]), &value);
 
-	HUNT_MAC_STAT_READ(esmp, MC_CMD_MAC_TX_256_TO_511_PKTS, &value);
+	EF10_MAC_STAT_READ(esmp, MC_CMD_MAC_TX_256_TO_511_PKTS, &value);
 	EFSYS_STAT_SET_QWORD(&(stat[EFX_MAC_TX_256_TO_511_PKTS]), &value);
 
-	HUNT_MAC_STAT_READ(esmp, MC_CMD_MAC_TX_512_TO_1023_PKTS, &value);
+	EF10_MAC_STAT_READ(esmp, MC_CMD_MAC_TX_512_TO_1023_PKTS, &value);
 	EFSYS_STAT_SET_QWORD(&(stat[EFX_MAC_TX_512_TO_1023_PKTS]), &value);
 
-	HUNT_MAC_STAT_READ(esmp, MC_CMD_MAC_TX_1024_TO_15XX_PKTS, &value);
+	EF10_MAC_STAT_READ(esmp, MC_CMD_MAC_TX_1024_TO_15XX_PKTS, &value);
 	EFSYS_STAT_SET_QWORD(&(stat[EFX_MAC_TX_1024_TO_15XX_PKTS]), &value);
 
-	HUNT_MAC_STAT_READ(esmp, MC_CMD_MAC_TX_15XX_TO_JUMBO_PKTS, &value);
+	EF10_MAC_STAT_READ(esmp, MC_CMD_MAC_TX_15XX_TO_JUMBO_PKTS, &value);
 	EFSYS_STAT_SET_QWORD(&(stat[EFX_MAC_TX_GE_15XX_PKTS]), &value);
-	HUNT_MAC_STAT_READ(esmp, MC_CMD_MAC_TX_GTJUMBO_PKTS, &value);
+	EF10_MAC_STAT_READ(esmp, MC_CMD_MAC_TX_GTJUMBO_PKTS, &value);
 	EFSYS_STAT_INCR_QWORD(&(stat[EFX_MAC_TX_GE_15XX_PKTS]), &value);
 
-	HUNT_MAC_STAT_READ(esmp, MC_CMD_MAC_TX_BAD_FCS_PKTS, &value);
+	EF10_MAC_STAT_READ(esmp, MC_CMD_MAC_TX_BAD_FCS_PKTS, &value);
 	EFSYS_STAT_SET_QWORD(&(stat[EFX_MAC_TX_ERRORS]), &value);
 
-	HUNT_MAC_STAT_READ(esmp, MC_CMD_MAC_TX_SINGLE_COLLISION_PKTS, &value);
+	EF10_MAC_STAT_READ(esmp, MC_CMD_MAC_TX_SINGLE_COLLISION_PKTS, &value);
 	EFSYS_STAT_SET_QWORD(&(stat[EFX_MAC_TX_SGL_COL_PKTS]), &value);
 
-	HUNT_MAC_STAT_READ(esmp, MC_CMD_MAC_TX_MULTIPLE_COLLISION_PKTS,
+	EF10_MAC_STAT_READ(esmp, MC_CMD_MAC_TX_MULTIPLE_COLLISION_PKTS,
 			    &value);
 	EFSYS_STAT_SET_QWORD(&(stat[EFX_MAC_TX_MULT_COL_PKTS]), &value);
 
-	HUNT_MAC_STAT_READ(esmp, MC_CMD_MAC_TX_EXCESSIVE_COLLISION_PKTS,
+	EF10_MAC_STAT_READ(esmp, MC_CMD_MAC_TX_EXCESSIVE_COLLISION_PKTS,
 			    &value);
 	EFSYS_STAT_SET_QWORD(&(stat[EFX_MAC_TX_EX_COL_PKTS]), &value);
 
-	HUNT_MAC_STAT_READ(esmp, MC_CMD_MAC_TX_LATE_COLLISION_PKTS, &value);
+	EF10_MAC_STAT_READ(esmp, MC_CMD_MAC_TX_LATE_COLLISION_PKTS, &value);
 	EFSYS_STAT_SET_QWORD(&(stat[EFX_MAC_TX_LATE_COL_PKTS]), &value);
 
-	HUNT_MAC_STAT_READ(esmp, MC_CMD_MAC_TX_DEFERRED_PKTS, &value);
+	EF10_MAC_STAT_READ(esmp, MC_CMD_MAC_TX_DEFERRED_PKTS, &value);
 	EFSYS_STAT_SET_QWORD(&(stat[EFX_MAC_TX_DEF_PKTS]), &value);
 
-	HUNT_MAC_STAT_READ(esmp, MC_CMD_MAC_TX_EXCESSIVE_DEFERRED_PKTS,
+	EF10_MAC_STAT_READ(esmp, MC_CMD_MAC_TX_EXCESSIVE_DEFERRED_PKTS,
 	    &value);
 	EFSYS_STAT_SET_QWORD(&(stat[EFX_MAC_TX_EX_DEF_PKTS]), &value);
 
 	/* RX */
-	HUNT_MAC_STAT_READ(esmp, MC_CMD_MAC_RX_BYTES, &value);
+	EF10_MAC_STAT_READ(esmp, MC_CMD_MAC_RX_BYTES, &value);
 	EFSYS_STAT_SET_QWORD(&(stat[EFX_MAC_RX_OCTETS]), &value);
 
-	HUNT_MAC_STAT_READ(esmp, MC_CMD_MAC_RX_PKTS, &value);
+	EF10_MAC_STAT_READ(esmp, MC_CMD_MAC_RX_PKTS, &value);
 	EFSYS_STAT_SET_QWORD(&(stat[EFX_MAC_RX_PKTS]), &value);
 
-	HUNT_MAC_STAT_READ(esmp, MC_CMD_MAC_RX_UNICAST_PKTS, &value);
+	EF10_MAC_STAT_READ(esmp, MC_CMD_MAC_RX_UNICAST_PKTS, &value);
 	EFSYS_STAT_SET_QWORD(&(stat[EFX_MAC_RX_UNICST_PKTS]), &value);
 
-	HUNT_MAC_STAT_READ(esmp, MC_CMD_MAC_RX_MULTICAST_PKTS, &value);
+	EF10_MAC_STAT_READ(esmp, MC_CMD_MAC_RX_MULTICAST_PKTS, &value);
 	EFSYS_STAT_SET_QWORD(&(stat[EFX_MAC_RX_MULTICST_PKTS]), &value);
 
-	HUNT_MAC_STAT_READ(esmp, MC_CMD_MAC_RX_BROADCAST_PKTS, &value);
+	EF10_MAC_STAT_READ(esmp, MC_CMD_MAC_RX_BROADCAST_PKTS, &value);
 	EFSYS_STAT_SET_QWORD(&(stat[EFX_MAC_RX_BRDCST_PKTS]), &value);
 
-	HUNT_MAC_STAT_READ(esmp, MC_CMD_MAC_RX_PAUSE_PKTS, &value);
+	EF10_MAC_STAT_READ(esmp, MC_CMD_MAC_RX_PAUSE_PKTS, &value);
 	EFSYS_STAT_SET_QWORD(&(stat[EFX_MAC_RX_PAUSE_PKTS]), &value);
 
-	HUNT_MAC_STAT_READ(esmp, MC_CMD_MAC_RX_UNDERSIZE_PKTS, &value);
+	EF10_MAC_STAT_READ(esmp, MC_CMD_MAC_RX_UNDERSIZE_PKTS, &value);
 	EFSYS_STAT_SET_QWORD(&(stat[EFX_MAC_RX_LE_64_PKTS]), &value);
-	HUNT_MAC_STAT_READ(esmp, MC_CMD_MAC_RX_64_PKTS, &value);
+	EF10_MAC_STAT_READ(esmp, MC_CMD_MAC_RX_64_PKTS, &value);
 	EFSYS_STAT_INCR_QWORD(&(stat[EFX_MAC_RX_LE_64_PKTS]), &value);
 
-	HUNT_MAC_STAT_READ(esmp, MC_CMD_MAC_RX_65_TO_127_PKTS, &value);
+	EF10_MAC_STAT_READ(esmp, MC_CMD_MAC_RX_65_TO_127_PKTS, &value);
 	EFSYS_STAT_SET_QWORD(&(stat[EFX_MAC_RX_65_TO_127_PKTS]), &value);
 
-	HUNT_MAC_STAT_READ(esmp, MC_CMD_MAC_RX_128_TO_255_PKTS, &value);
+	EF10_MAC_STAT_READ(esmp, MC_CMD_MAC_RX_128_TO_255_PKTS, &value);
 	EFSYS_STAT_SET_QWORD(&(stat[EFX_MAC_RX_128_TO_255_PKTS]), &value);
 
-	HUNT_MAC_STAT_READ(esmp, MC_CMD_MAC_RX_256_TO_511_PKTS, &value);
+	EF10_MAC_STAT_READ(esmp, MC_CMD_MAC_RX_256_TO_511_PKTS, &value);
 	EFSYS_STAT_SET_QWORD(&(stat[EFX_MAC_RX_256_TO_511_PKTS]), &value);
 
-	HUNT_MAC_STAT_READ(esmp, MC_CMD_MAC_RX_512_TO_1023_PKTS, &value);
+	EF10_MAC_STAT_READ(esmp, MC_CMD_MAC_RX_512_TO_1023_PKTS, &value);
 	EFSYS_STAT_SET_QWORD(&(stat[EFX_MAC_RX_512_TO_1023_PKTS]), &value);
 
-	HUNT_MAC_STAT_READ(esmp, MC_CMD_MAC_RX_1024_TO_15XX_PKTS, &value);
+	EF10_MAC_STAT_READ(esmp, MC_CMD_MAC_RX_1024_TO_15XX_PKTS, &value);
 	EFSYS_STAT_SET_QWORD(&(stat[EFX_MAC_RX_1024_TO_15XX_PKTS]), &value);
 
-	HUNT_MAC_STAT_READ(esmp, MC_CMD_MAC_RX_15XX_TO_JUMBO_PKTS, &value);
+	EF10_MAC_STAT_READ(esmp, MC_CMD_MAC_RX_15XX_TO_JUMBO_PKTS, &value);
 	EFSYS_STAT_SET_QWORD(&(stat[EFX_MAC_RX_GE_15XX_PKTS]), &value);
-	HUNT_MAC_STAT_READ(esmp, MC_CMD_MAC_RX_GTJUMBO_PKTS, &value);
+	EF10_MAC_STAT_READ(esmp, MC_CMD_MAC_RX_GTJUMBO_PKTS, &value);
 	EFSYS_STAT_INCR_QWORD(&(stat[EFX_MAC_RX_GE_15XX_PKTS]), &value);
 
-	HUNT_MAC_STAT_READ(esmp, MC_CMD_MAC_RX_BAD_FCS_PKTS, &value);
+	EF10_MAC_STAT_READ(esmp, MC_CMD_MAC_RX_BAD_FCS_PKTS, &value);
 	EFSYS_STAT_SET_QWORD(&(stat[EFX_MAC_RX_FCS_ERRORS]), &value);
 
-	HUNT_MAC_STAT_READ(esmp, MC_CMD_MAC_RX_OVERFLOW_PKTS, &value);
+	EF10_MAC_STAT_READ(esmp, MC_CMD_MAC_RX_OVERFLOW_PKTS, &value);
 	EFSYS_STAT_SET_QWORD(&(stat[EFX_MAC_RX_DROP_EVENTS]), &value);
 
-	HUNT_MAC_STAT_READ(esmp, MC_CMD_MAC_RX_FALSE_CARRIER_PKTS, &value);
+	EF10_MAC_STAT_READ(esmp, MC_CMD_MAC_RX_FALSE_CARRIER_PKTS, &value);
 	EFSYS_STAT_SET_QWORD(&(stat[EFX_MAC_RX_FALSE_CARRIER_ERRORS]), &value);
 
-	HUNT_MAC_STAT_READ(esmp, MC_CMD_MAC_RX_SYMBOL_ERROR_PKTS, &value);
+	EF10_MAC_STAT_READ(esmp, MC_CMD_MAC_RX_SYMBOL_ERROR_PKTS, &value);
 	EFSYS_STAT_SET_QWORD(&(stat[EFX_MAC_RX_SYMBOL_ERRORS]), &value);
 
-	HUNT_MAC_STAT_READ(esmp, MC_CMD_MAC_RX_ALIGN_ERROR_PKTS, &value);
+	EF10_MAC_STAT_READ(esmp, MC_CMD_MAC_RX_ALIGN_ERROR_PKTS, &value);
 	EFSYS_STAT_SET_QWORD(&(stat[EFX_MAC_RX_ALIGN_ERRORS]), &value);
 
-	HUNT_MAC_STAT_READ(esmp, MC_CMD_MAC_RX_INTERNAL_ERROR_PKTS, &value);
+	EF10_MAC_STAT_READ(esmp, MC_CMD_MAC_RX_INTERNAL_ERROR_PKTS, &value);
 	EFSYS_STAT_SET_QWORD(&(stat[EFX_MAC_RX_INTERNAL_ERRORS]), &value);
 
-	HUNT_MAC_STAT_READ(esmp, MC_CMD_MAC_RX_JABBER_PKTS, &value);
+	EF10_MAC_STAT_READ(esmp, MC_CMD_MAC_RX_JABBER_PKTS, &value);
 	EFSYS_STAT_SET_QWORD(&(stat[EFX_MAC_RX_JABBER_PKTS]), &value);
 
-	HUNT_MAC_STAT_READ(esmp, MC_CMD_MAC_RX_LANES01_CHAR_ERR, &value);
+	EF10_MAC_STAT_READ(esmp, MC_CMD_MAC_RX_LANES01_CHAR_ERR, &value);
 	EFSYS_STAT_SET_DWORD(&(stat[EFX_MAC_RX_LANE0_CHAR_ERR]),
 			    &(value.eq_dword[0]));
 	EFSYS_STAT_SET_DWORD(&(stat[EFX_MAC_RX_LANE1_CHAR_ERR]),
 			    &(value.eq_dword[1]));
 
-	HUNT_MAC_STAT_READ(esmp, MC_CMD_MAC_RX_LANES23_CHAR_ERR, &value);
+	EF10_MAC_STAT_READ(esmp, MC_CMD_MAC_RX_LANES23_CHAR_ERR, &value);
 	EFSYS_STAT_SET_DWORD(&(stat[EFX_MAC_RX_LANE2_CHAR_ERR]),
 			    &(value.eq_dword[0]));
 	EFSYS_STAT_SET_DWORD(&(stat[EFX_MAC_RX_LANE3_CHAR_ERR]),
 			    &(value.eq_dword[1]));
 
-	HUNT_MAC_STAT_READ(esmp, MC_CMD_MAC_RX_LANES01_DISP_ERR, &value);
+	EF10_MAC_STAT_READ(esmp, MC_CMD_MAC_RX_LANES01_DISP_ERR, &value);
 	EFSYS_STAT_SET_DWORD(&(stat[EFX_MAC_RX_LANE0_DISP_ERR]),
 			    &(value.eq_dword[0]));
 	EFSYS_STAT_SET_DWORD(&(stat[EFX_MAC_RX_LANE1_DISP_ERR]),
 			    &(value.eq_dword[1]));
 
-	HUNT_MAC_STAT_READ(esmp, MC_CMD_MAC_RX_LANES23_DISP_ERR, &value);
+	EF10_MAC_STAT_READ(esmp, MC_CMD_MAC_RX_LANES23_DISP_ERR, &value);
 	EFSYS_STAT_SET_DWORD(&(stat[EFX_MAC_RX_LANE2_DISP_ERR]),
 			    &(value.eq_dword[0]));
 	EFSYS_STAT_SET_DWORD(&(stat[EFX_MAC_RX_LANE3_DISP_ERR]),
 			    &(value.eq_dword[1]));
 
-	HUNT_MAC_STAT_READ(esmp, MC_CMD_MAC_RX_MATCH_FAULT, &value);
+	EF10_MAC_STAT_READ(esmp, MC_CMD_MAC_RX_MATCH_FAULT, &value);
 	EFSYS_STAT_SET_QWORD(&(stat[EFX_MAC_RX_MATCH_FAULT]), &value);
 
-	HUNT_MAC_STAT_READ(esmp, MC_CMD_MAC_RX_NODESC_DROPS, &value);
+	EF10_MAC_STAT_READ(esmp, MC_CMD_MAC_RX_NODESC_DROPS, &value);
 	EFSYS_STAT_SET_QWORD(&(stat[EFX_MAC_RX_NODESC_DROP_CNT]), &value);
 
 	/* Packet memory (EF10 only) */
-	HUNT_MAC_STAT_READ(esmp, MC_CMD_MAC_PM_TRUNC_BB_OVERFLOW, &value);
+	EF10_MAC_STAT_READ(esmp, MC_CMD_MAC_PM_TRUNC_BB_OVERFLOW, &value);
 	EFSYS_STAT_SET_QWORD(&(stat[EFX_MAC_PM_TRUNC_BB_OVERFLOW]), &value);
 
-	HUNT_MAC_STAT_READ(esmp, MC_CMD_MAC_PM_DISCARD_BB_OVERFLOW, &value);
+	EF10_MAC_STAT_READ(esmp, MC_CMD_MAC_PM_DISCARD_BB_OVERFLOW, &value);
 	EFSYS_STAT_SET_QWORD(&(stat[EFX_MAC_PM_DISCARD_BB_OVERFLOW]), &value);
 
-	HUNT_MAC_STAT_READ(esmp, MC_CMD_MAC_PM_TRUNC_VFIFO_FULL, &value);
+	EF10_MAC_STAT_READ(esmp, MC_CMD_MAC_PM_TRUNC_VFIFO_FULL, &value);
 	EFSYS_STAT_SET_QWORD(&(stat[EFX_MAC_PM_TRUNC_VFIFO_FULL]), &value);
 
-	HUNT_MAC_STAT_READ(esmp, MC_CMD_MAC_PM_DISCARD_VFIFO_FULL, &value);
+	EF10_MAC_STAT_READ(esmp, MC_CMD_MAC_PM_DISCARD_VFIFO_FULL, &value);
 	EFSYS_STAT_SET_QWORD(&(stat[EFX_MAC_PM_DISCARD_VFIFO_FULL]), &value);
 
-	HUNT_MAC_STAT_READ(esmp, MC_CMD_MAC_PM_TRUNC_QBB, &value);
+	EF10_MAC_STAT_READ(esmp, MC_CMD_MAC_PM_TRUNC_QBB, &value);
 	EFSYS_STAT_SET_QWORD(&(stat[EFX_MAC_PM_TRUNC_QBB]), &value);
 
-	HUNT_MAC_STAT_READ(esmp, MC_CMD_MAC_PM_DISCARD_QBB, &value);
+	EF10_MAC_STAT_READ(esmp, MC_CMD_MAC_PM_DISCARD_QBB, &value);
 	EFSYS_STAT_SET_QWORD(&(stat[EFX_MAC_PM_DISCARD_QBB]), &value);
 
-	HUNT_MAC_STAT_READ(esmp, MC_CMD_MAC_PM_DISCARD_MAPPING, &value);
+	EF10_MAC_STAT_READ(esmp, MC_CMD_MAC_PM_DISCARD_MAPPING, &value);
 	EFSYS_STAT_SET_QWORD(&(stat[EFX_MAC_PM_DISCARD_MAPPING]), &value);
 
 	/* RX datapath */
-	HUNT_MAC_STAT_READ(esmp, MC_CMD_MAC_RXDP_Q_DISABLED_PKTS, &value);
+	EF10_MAC_STAT_READ(esmp, MC_CMD_MAC_RXDP_Q_DISABLED_PKTS, &value);
 	EFSYS_STAT_SET_QWORD(&(stat[EFX_MAC_RXDP_Q_DISABLED_PKTS]), &value);
 
-	HUNT_MAC_STAT_READ(esmp, MC_CMD_MAC_RXDP_DI_DROPPED_PKTS, &value);
+	EF10_MAC_STAT_READ(esmp, MC_CMD_MAC_RXDP_DI_DROPPED_PKTS, &value);
 	EFSYS_STAT_SET_QWORD(&(stat[EFX_MAC_RXDP_DI_DROPPED_PKTS]), &value);
 
-	HUNT_MAC_STAT_READ(esmp, MC_CMD_MAC_RXDP_STREAMING_PKTS, &value);
+	EF10_MAC_STAT_READ(esmp, MC_CMD_MAC_RXDP_STREAMING_PKTS, &value);
 	EFSYS_STAT_SET_QWORD(&(stat[EFX_MAC_RXDP_STREAMING_PKTS]), &value);
 
-	HUNT_MAC_STAT_READ(esmp, MC_CMD_MAC_RXDP_HLB_FETCH_CONDITIONS, &value);
+	EF10_MAC_STAT_READ(esmp, MC_CMD_MAC_RXDP_HLB_FETCH_CONDITIONS, &value);
 	EFSYS_STAT_SET_QWORD(&(stat[EFX_MAC_RXDP_HLB_FETCH]), &value);
 
-	HUNT_MAC_STAT_READ(esmp, MC_CMD_MAC_RXDP_HLB_WAIT_CONDITIONS, &value);
+	EF10_MAC_STAT_READ(esmp, MC_CMD_MAC_RXDP_HLB_WAIT_CONDITIONS, &value);
 	EFSYS_STAT_SET_QWORD(&(stat[EFX_MAC_RXDP_HLB_WAIT]), &value);
 
 
 	/* VADAPTER RX */
-	HUNT_MAC_STAT_READ(esmp, MC_CMD_MAC_VADAPTER_RX_UNICAST_PACKETS,
+	EF10_MAC_STAT_READ(esmp, MC_CMD_MAC_VADAPTER_RX_UNICAST_PACKETS,
 	    &value);
 	EFSYS_STAT_SET_QWORD(&(stat[EFX_MAC_VADAPTER_RX_UNICAST_PACKETS]),
 	    &value);
 
-	HUNT_MAC_STAT_READ(esmp, MC_CMD_MAC_VADAPTER_RX_UNICAST_BYTES,
+	EF10_MAC_STAT_READ(esmp, MC_CMD_MAC_VADAPTER_RX_UNICAST_BYTES,
 	    &value);
 	EFSYS_STAT_SET_QWORD(&(stat[EFX_MAC_VADAPTER_RX_UNICAST_BYTES]),
 	    &value);
 
-	HUNT_MAC_STAT_READ(esmp, MC_CMD_MAC_VADAPTER_RX_MULTICAST_PACKETS,
+	EF10_MAC_STAT_READ(esmp, MC_CMD_MAC_VADAPTER_RX_MULTICAST_PACKETS,
 	    &value);
 	EFSYS_STAT_SET_QWORD(&(stat[EFX_MAC_VADAPTER_RX_MULTICAST_PACKETS]),
 	    &value);
 
-	HUNT_MAC_STAT_READ(esmp, MC_CMD_MAC_VADAPTER_RX_MULTICAST_BYTES,
+	EF10_MAC_STAT_READ(esmp, MC_CMD_MAC_VADAPTER_RX_MULTICAST_BYTES,
 	    &value);
 	EFSYS_STAT_SET_QWORD(&(stat[EFX_MAC_VADAPTER_RX_MULTICAST_BYTES]),
 	    &value);
 
-	HUNT_MAC_STAT_READ(esmp, MC_CMD_MAC_VADAPTER_RX_BROADCAST_PACKETS,
+	EF10_MAC_STAT_READ(esmp, MC_CMD_MAC_VADAPTER_RX_BROADCAST_PACKETS,
 	    &value);
 	EFSYS_STAT_SET_QWORD(&(stat[EFX_MAC_VADAPTER_RX_BROADCAST_PACKETS]),
 	    &value);
 
-	HUNT_MAC_STAT_READ(esmp, MC_CMD_MAC_VADAPTER_RX_BROADCAST_BYTES,
+	EF10_MAC_STAT_READ(esmp, MC_CMD_MAC_VADAPTER_RX_BROADCAST_BYTES,
 	    &value);
 	EFSYS_STAT_SET_QWORD(&(stat[EFX_MAC_VADAPTER_RX_BROADCAST_BYTES]),
 	    &value);
 
-	HUNT_MAC_STAT_READ(esmp, MC_CMD_MAC_VADAPTER_RX_BAD_PACKETS,
+	EF10_MAC_STAT_READ(esmp, MC_CMD_MAC_VADAPTER_RX_BAD_PACKETS,
 	    &value);
 	EFSYS_STAT_SET_QWORD(&(stat[EFX_MAC_VADAPTER_RX_BAD_PACKETS]),
 	    &value);
 
-	HUNT_MAC_STAT_READ(esmp, MC_CMD_MAC_VADAPTER_RX_BAD_BYTES, &value);
+	EF10_MAC_STAT_READ(esmp, MC_CMD_MAC_VADAPTER_RX_BAD_BYTES, &value);
 	EFSYS_STAT_SET_QWORD(&(stat[EFX_MAC_VADAPTER_RX_BAD_BYTES]), &value);
 
-	HUNT_MAC_STAT_READ(esmp, MC_CMD_MAC_VADAPTER_RX_OVERFLOW, &value);
+	EF10_MAC_STAT_READ(esmp, MC_CMD_MAC_VADAPTER_RX_OVERFLOW, &value);
 	EFSYS_STAT_SET_QWORD(&(stat[EFX_MAC_VADAPTER_RX_OVERFLOW]), &value);
 
 	/* VADAPTER TX */
-	HUNT_MAC_STAT_READ(esmp, MC_CMD_MAC_VADAPTER_TX_UNICAST_PACKETS,
+	EF10_MAC_STAT_READ(esmp, MC_CMD_MAC_VADAPTER_TX_UNICAST_PACKETS,
 	    &value);
 	EFSYS_STAT_SET_QWORD(&(stat[EFX_MAC_VADAPTER_TX_UNICAST_PACKETS]),
 	    &value);
 
-	HUNT_MAC_STAT_READ(esmp, MC_CMD_MAC_VADAPTER_TX_UNICAST_BYTES,
+	EF10_MAC_STAT_READ(esmp, MC_CMD_MAC_VADAPTER_TX_UNICAST_BYTES,
 	    &value);
 	EFSYS_STAT_SET_QWORD(&(stat[EFX_MAC_VADAPTER_TX_UNICAST_BYTES]),
 	    &value);
 
-	HUNT_MAC_STAT_READ(esmp, MC_CMD_MAC_VADAPTER_TX_MULTICAST_PACKETS,
+	EF10_MAC_STAT_READ(esmp, MC_CMD_MAC_VADAPTER_TX_MULTICAST_PACKETS,
 	    &value);
 	EFSYS_STAT_SET_QWORD(&(stat[EFX_MAC_VADAPTER_TX_MULTICAST_PACKETS]),
 	    &value);
 
-	HUNT_MAC_STAT_READ(esmp, MC_CMD_MAC_VADAPTER_TX_MULTICAST_BYTES,
+	EF10_MAC_STAT_READ(esmp, MC_CMD_MAC_VADAPTER_TX_MULTICAST_BYTES,
 	    &value);
 	EFSYS_STAT_SET_QWORD(&(stat[EFX_MAC_VADAPTER_TX_MULTICAST_BYTES]),
 	    &value);
 
-	HUNT_MAC_STAT_READ(esmp, MC_CMD_MAC_VADAPTER_TX_BROADCAST_PACKETS,
+	EF10_MAC_STAT_READ(esmp, MC_CMD_MAC_VADAPTER_TX_BROADCAST_PACKETS,
 	    &value);
 	EFSYS_STAT_SET_QWORD(&(stat[EFX_MAC_VADAPTER_TX_BROADCAST_PACKETS]),
 	    &value);
 
-	HUNT_MAC_STAT_READ(esmp, MC_CMD_MAC_VADAPTER_TX_BROADCAST_BYTES,
+	EF10_MAC_STAT_READ(esmp, MC_CMD_MAC_VADAPTER_TX_BROADCAST_BYTES,
 	    &value);
 	EFSYS_STAT_SET_QWORD(&(stat[EFX_MAC_VADAPTER_TX_BROADCAST_BYTES]),
 	    &value);
 
-	HUNT_MAC_STAT_READ(esmp, MC_CMD_MAC_VADAPTER_TX_BAD_PACKETS, &value);
+	EF10_MAC_STAT_READ(esmp, MC_CMD_MAC_VADAPTER_TX_BAD_PACKETS, &value);
 	EFSYS_STAT_SET_QWORD(&(stat[EFX_MAC_VADAPTER_TX_BAD_PACKETS]), &value);
 
-	HUNT_MAC_STAT_READ(esmp, MC_CMD_MAC_VADAPTER_TX_BAD_BYTES, &value);
+	EF10_MAC_STAT_READ(esmp, MC_CMD_MAC_VADAPTER_TX_BAD_BYTES, &value);
 	EFSYS_STAT_SET_QWORD(&(stat[EFX_MAC_VADAPTER_TX_BAD_BYTES]), &value);
 
-	HUNT_MAC_STAT_READ(esmp, MC_CMD_MAC_VADAPTER_TX_OVERFLOW, &value);
+	EF10_MAC_STAT_READ(esmp, MC_CMD_MAC_VADAPTER_TX_OVERFLOW, &value);
 	EFSYS_STAT_SET_QWORD(&(stat[EFX_MAC_VADAPTER_TX_OVERFLOW]), &value);
 
 
 	EFSYS_DMA_SYNC_FOR_KERNEL(esmp, 0, EFX_MAC_STATS_SIZE);
 	EFSYS_MEM_READ_BARRIER();
-	HUNT_MAC_STAT_READ(esmp, MC_CMD_MAC_GENERATION_START,
+	EF10_MAC_STAT_READ(esmp, MC_CMD_MAC_GENERATION_START,
 			    &generation_start);
 
 	/* Check that we didn't read the stats in the middle of a DMA */

From owner-svn-src-all@freebsd.org  Wed Jan 20 08:16:31 2016
Return-Path: <owner-svn-src-all@freebsd.org>
Delivered-To: svn-src-all@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id CDA24A89F43;
 Wed, 20 Jan 2016 08:16:31 +0000 (UTC)
 (envelope-from arybchik@FreeBSD.org)
Received: from repo.freebsd.org (repo.freebsd.org
 [IPv6:2610:1c1:1:6068::e6a:0])
 (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
 (Client did not present a certificate)
 by mx1.freebsd.org (Postfix) with ESMTPS id A914E1A1E;
 Wed, 20 Jan 2016 08:16:31 +0000 (UTC)
 (envelope-from arybchik@FreeBSD.org)
Received: from repo.freebsd.org ([127.0.1.37])
 by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u0K8GU2n033900;
 Wed, 20 Jan 2016 08:16:30 GMT (envelope-from arybchik@FreeBSD.org)
Received: (from arybchik@localhost)
 by repo.freebsd.org (8.15.2/8.15.2/Submit) id u0K8GUVQ033899;
 Wed, 20 Jan 2016 08:16:30 GMT (envelope-from arybchik@FreeBSD.org)
Message-Id: <201601200816.u0K8GUVQ033899@repo.freebsd.org>
X-Authentication-Warning: repo.freebsd.org: arybchik set sender to
 arybchik@FreeBSD.org using -f
From: Andrew Rybchenko <arybchik@FreeBSD.org>
Date: Wed, 20 Jan 2016 08:16:30 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org
Subject: svn commit: r294396 - stable/10/sys/dev/sfxge/common
X-SVN-Group: stable-10
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.20
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for &quot;
 user&quot; and &quot; projects&quot; \)" <svn-src-all.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-all/>
List-Post: <mailto:svn-src-all@freebsd.org>
List-Help: <mailto:svn-src-all-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Wed, 20 Jan 2016 08:16:32 -0000

Author: arybchik
Date: Wed Jan 20 08:16:30 2016
New Revision: 294396
URL: https://svnweb.freebsd.org/changeset/base/294396

Log:
  MFC r294094
  
  sfxge: check the RX DMA end padding configuration on Medford
  
  Submitted by:   Mark Spender <mspender at solarflare.com>
  Reviewed by:    gnn
  Sponsored by:   Solarflare Communications, Inc.

Modified:
  stable/10/sys/dev/sfxge/common/medford_nic.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/sys/dev/sfxge/common/medford_nic.c
==============================================================================
--- stable/10/sys/dev/sfxge/common/medford_nic.c	Wed Jan 20 08:14:42 2016	(r294395)
+++ stable/10/sys/dev/sfxge/common/medford_nic.c	Wed Jan 20 08:16:30 2016	(r294396)
@@ -39,6 +39,64 @@ __FBSDID("$FreeBSD$");
 
 #include "ef10_tlv_layout.h"
 
+static	__checkReturn	efx_rc_t
+efx_mcdi_get_rxdp_config(
+	__in		efx_nic_t *enp,
+	__out		uint32_t *end_paddingp)
+{
+	efx_mcdi_req_t req;
+	uint8_t payload[MAX(MC_CMD_GET_RXDP_CONFIG_IN_LEN,
+			    MC_CMD_GET_RXDP_CONFIG_OUT_LEN)];
+	uint32_t end_padding;
+	efx_rc_t rc;
+
+	memset(payload, 0, sizeof (payload));
+	req.emr_cmd = MC_CMD_GET_RXDP_CONFIG;
+	req.emr_in_buf = payload;
+	req.emr_in_length = MC_CMD_GET_RXDP_CONFIG_IN_LEN;
+	req.emr_out_buf = payload;
+	req.emr_out_length = MC_CMD_GET_RXDP_CONFIG_OUT_LEN;
+
+	efx_mcdi_execute(enp, &req);
+	if (req.emr_rc != 0) {
+		rc = req.emr_rc;
+		goto fail1;
+	}
+
+	if (MCDI_OUT_DWORD_FIELD(req, GET_RXDP_CONFIG_OUT_DATA,
+				    GET_RXDP_CONFIG_OUT_PAD_HOST_DMA) == 0) {
+		/* RX DMA end padding is disabled */
+		end_padding = 0;
+	} else {
+		switch(MCDI_OUT_DWORD_FIELD(req, GET_RXDP_CONFIG_OUT_DATA,
+					    GET_RXDP_CONFIG_OUT_PAD_HOST_LEN)) {
+		case MC_CMD_SET_RXDP_CONFIG_IN_PAD_HOST_64:
+			end_padding = 64;
+			break;
+		case MC_CMD_SET_RXDP_CONFIG_IN_PAD_HOST_128:
+			end_padding = 128;
+			break;
+		case MC_CMD_SET_RXDP_CONFIG_IN_PAD_HOST_256:
+			end_padding = 256;
+			break;
+		default:
+			rc = ENOTSUP;
+			goto fail2;
+		}
+	}
+
+	*end_paddingp = end_padding;
+
+	return (0);
+
+fail2:
+	EFSYS_PROBE(fail2);
+fail1:
+	EFSYS_PROBE1(fail1, efx_rc_t, rc);
+
+	return (rc);
+}
+
 	__checkReturn	efx_rc_t
 medford_board_cfg(
 	__in		efx_nic_t *enp)
@@ -56,6 +114,7 @@ medford_board_cfg(
 	uint32_t flags;
 	uint32_t sysclk;
 	uint32_t base, nvec;
+	uint32_t end_padding;
 	efx_rc_t rc;
 
 	/*
@@ -161,8 +220,10 @@ medford_board_cfg(
 	/* Alignment for receive packet DMA buffers */
 	encp->enc_rx_buf_align_start = 1;
 
-	/* FIXME: RX DMA end padding is configurable on Medford */
-	encp->enc_rx_buf_align_end = 64;
+	/* Get the RX DMA end padding alignment configuration */
+	if ((rc = efx_mcdi_get_rxdp_config(enp, &end_padding)) != 0)
+		goto fail10;
+	encp->enc_rx_buf_align_end = end_padding;
 
 	/* Alignment for WPTR updates */
 	encp->enc_rx_push_align = EF10_RX_WPTR_ALIGN;
@@ -190,13 +251,13 @@ medford_board_cfg(
 	 * can result in time-of-check/time-of-use bugs.
 	 */
 	if ((rc = ef10_get_privilege_mask(enp, &mask)) != 0)
-		goto fail10;
+		goto fail11;
 	encp->enc_privilege_mask = mask;
 
 	/* Get interrupt vector limits */
 	if ((rc = efx_mcdi_get_vector_cfg(enp, &base, &nvec, NULL)) != 0) {
 		if (EFX_PCI_FUNCTION_IS_PF(encp))
-			goto fail11;
+			goto fail12;
 
 		/* Ignore error (cannot query vector limits from a VF). */
 		base = 0;
@@ -219,6 +280,8 @@ medford_board_cfg(
 
 	return (0);
 
+fail12:
+	EFSYS_PROBE(fail12);
 fail11:
 	EFSYS_PROBE(fail11);
 fail10:

From owner-svn-src-all@freebsd.org  Wed Jan 20 08:17:30 2016
Return-Path: <owner-svn-src-all@freebsd.org>
Delivered-To: svn-src-all@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id B3604A88003;
 Wed, 20 Jan 2016 08:17:30 +0000 (UTC)
 (envelope-from arybchik@FreeBSD.org)
Received: from repo.freebsd.org (repo.freebsd.org
 [IPv6:2610:1c1:1:6068::e6a:0])
 (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
 (Client did not present a certificate)
 by mx1.freebsd.org (Postfix) with ESMTPS id 73C6F1B9F;
 Wed, 20 Jan 2016 08:17:30 +0000 (UTC)
 (envelope-from arybchik@FreeBSD.org)
Received: from repo.freebsd.org ([127.0.1.37])
 by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u0K8HTs9033989;
 Wed, 20 Jan 2016 08:17:29 GMT (envelope-from arybchik@FreeBSD.org)
Received: (from arybchik@localhost)
 by repo.freebsd.org (8.15.2/8.15.2/Submit) id u0K8HSDD033983;
 Wed, 20 Jan 2016 08:17:28 GMT (envelope-from arybchik@FreeBSD.org)
Message-Id: <201601200817.u0K8HSDD033983@repo.freebsd.org>
X-Authentication-Warning: repo.freebsd.org: arybchik set sender to
 arybchik@FreeBSD.org using -f
From: Andrew Rybchenko <arybchik@FreeBSD.org>
Date: Wed, 20 Jan 2016 08:17:28 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org
Subject: svn commit: r294397 - stable/10/sys/dev/sfxge/common
X-SVN-Group: stable-10
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.20
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for &quot;
 user&quot; and &quot; projects&quot; \)" <svn-src-all.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-all/>
List-Post: <mailto:svn-src-all@freebsd.org>
List-Help: <mailto:svn-src-all-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Wed, 20 Jan 2016 08:17:30 -0000

Author: arybchik
Date: Wed Jan 20 08:17:28 2016
New Revision: 294397
URL: https://svnweb.freebsd.org/changeset/base/294397

Log:
  MFC r294253
  
  sfxge: if supported by firmware, use enhanced SET_MAC command to only configure the MTU
  
  This allows an MTU change to be requested on unpriviliged functions
  without also setting all the other parameters supported by MC_CMD_SET_MAC.
  
  The enhanced SET_MAC command was introduced in v4_7 firmware.
  
  Submitted by:   Mark Spender <mspender at solarflare.com>
  Sponsored by:   Solarflare Communications, Inc.

Modified:
  stable/10/sys/dev/sfxge/common/efx.h
  stable/10/sys/dev/sfxge/common/efx_impl.h
  stable/10/sys/dev/sfxge/common/efx_mac.c
  stable/10/sys/dev/sfxge/common/hunt_impl.h
  stable/10/sys/dev/sfxge/common/hunt_mac.c
  stable/10/sys/dev/sfxge/common/hunt_nic.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/sys/dev/sfxge/common/efx.h
==============================================================================
--- stable/10/sys/dev/sfxge/common/efx.h	Wed Jan 20 08:16:30 2016	(r294396)
+++ stable/10/sys/dev/sfxge/common/efx.h	Wed Jan 20 08:17:28 2016	(r294397)
@@ -1159,6 +1159,7 @@ typedef struct efx_nic_cfg_s {
 	boolean_t		enc_datapath_cap_evb;
 	boolean_t               enc_rx_disable_scatter_supported;
 	boolean_t               enc_allow_set_mac_with_installed_filters;
+	boolean_t		enc_enhanced_set_mac_supported;
 	/* External port identifier */
 	uint8_t			enc_external_port;
 	uint32_t		enc_mcdi_max_payload_length;

Modified: stable/10/sys/dev/sfxge/common/efx_impl.h
==============================================================================
--- stable/10/sys/dev/sfxge/common/efx_impl.h	Wed Jan 20 08:16:30 2016	(r294396)
+++ stable/10/sys/dev/sfxge/common/efx_impl.h	Wed Jan 20 08:17:28 2016	(r294397)
@@ -194,6 +194,7 @@ typedef struct efx_mac_ops_s {
 	efx_rc_t	(*emo_poll)(efx_nic_t *, efx_link_mode_t *);
 	efx_rc_t	(*emo_up)(efx_nic_t *, boolean_t *);
 	efx_rc_t	(*emo_addr_set)(efx_nic_t *);
+	efx_rc_t	(*emo_pdu_set)(efx_nic_t *);
 	efx_rc_t	(*emo_reconfigure)(efx_nic_t *);
 	efx_rc_t	(*emo_multicast_list_set)(efx_nic_t *);
 	efx_rc_t	(*emo_filter_default_rxq_set)(efx_nic_t *,

Modified: stable/10/sys/dev/sfxge/common/efx_mac.c
==============================================================================
--- stable/10/sys/dev/sfxge/common/efx_mac.c	Wed Jan 20 08:16:30 2016	(r294396)
+++ stable/10/sys/dev/sfxge/common/efx_mac.c	Wed Jan 20 08:17:28 2016	(r294397)
@@ -56,6 +56,7 @@ static efx_mac_ops_t	__efx_falcon_gmac_o
 	falcon_mac_poll,			/* emo_poll */
 	falcon_mac_up,				/* emo_up */
 	falcon_gmac_reconfigure,		/* emo_addr_set */
+	falcon_gmac_reconfigure,		/* emo_pdu_set */
 	falcon_gmac_reconfigure,		/* emo_reconfigure */
 	falconsiena_mac_multicast_list_set,	/* emo_multicast_list_set */
 	NULL,					/* emo_filter_set_default_rxq */
@@ -77,6 +78,7 @@ static efx_mac_ops_t	__efx_falcon_xmac_o
 	falcon_mac_poll,			/* emo_poll */
 	falcon_mac_up,				/* emo_up */
 	falcon_xmac_reconfigure,		/* emo_addr_set */
+	falcon_xmac_reconfigure,		/* emo_pdu_set */
 	falcon_xmac_reconfigure,		/* emo_reconfigure */
 	falconsiena_mac_multicast_list_set,	/* emo_multicast_list_set */
 	NULL,					/* emo_filter_set_default_rxq */
@@ -98,6 +100,7 @@ static efx_mac_ops_t	__efx_siena_mac_ops
 	siena_mac_poll,				/* emo_poll */
 	siena_mac_up,				/* emo_up */
 	siena_mac_reconfigure,			/* emo_addr_set */
+	siena_mac_reconfigure,			/* emo_pdu_set */
 	siena_mac_reconfigure,			/* emo_reconfigure */
 	falconsiena_mac_multicast_list_set,	/* emo_multicast_list_set */
 	NULL,					/* emo_filter_set_default_rxq */
@@ -119,6 +122,7 @@ static efx_mac_ops_t	__efx_ef10_mac_ops 
 	ef10_mac_poll,				/* emo_poll */
 	ef10_mac_up,				/* emo_up */
 	ef10_mac_addr_set,			/* emo_addr_set */
+	ef10_mac_pdu_set,			/* emo_pdu_set */
 	ef10_mac_reconfigure,			/* emo_reconfigure */
 	ef10_mac_multicast_list_set,		/* emo_multicast_list_set */
 	ef10_mac_filter_default_rxq_set,	/* emo_filter_default_rxq_set */
@@ -196,7 +200,7 @@ efx_mac_pdu_set(
 
 	old_pdu = epp->ep_mac_pdu;
 	epp->ep_mac_pdu = (uint32_t)pdu;
-	if ((rc = emop->emo_reconfigure(enp)) != 0)
+	if ((rc = emop->emo_pdu_set(enp)) != 0)
 		goto fail3;
 
 	return (0);

Modified: stable/10/sys/dev/sfxge/common/hunt_impl.h
==============================================================================
--- stable/10/sys/dev/sfxge/common/hunt_impl.h	Wed Jan 20 08:16:30 2016	(r294396)
+++ stable/10/sys/dev/sfxge/common/hunt_impl.h	Wed Jan 20 08:17:28 2016	(r294397)
@@ -234,6 +234,10 @@ ef10_mac_addr_set(
 	__in	efx_nic_t *enp);
 
 extern	__checkReturn	efx_rc_t
+ef10_mac_pdu_set(
+	__in	efx_nic_t *enp);
+
+extern	__checkReturn	efx_rc_t
 ef10_mac_reconfigure(
 	__in	efx_nic_t *enp);
 

Modified: stable/10/sys/dev/sfxge/common/hunt_mac.c
==============================================================================
--- stable/10/sys/dev/sfxge/common/hunt_mac.c	Wed Jan 20 08:16:30 2016	(r294396)
+++ stable/10/sys/dev/sfxge/common/hunt_mac.c	Wed Jan 20 08:17:28 2016	(r294397)
@@ -162,6 +162,74 @@ fail1:
 	return (rc);
 }
 
+static	__checkReturn	efx_rc_t
+efx_mcdi_mtu_set(
+	__in		efx_nic_t *enp,
+	__in		uint32_t mtu)
+{
+	efx_mcdi_req_t req;
+	uint8_t payload[MAX(MC_CMD_SET_MAC_EXT_IN_LEN,
+			    MC_CMD_SET_MAC_OUT_LEN)];
+	efx_rc_t rc;
+
+	(void) memset(payload, 0, sizeof (payload));
+	req.emr_cmd = MC_CMD_SET_MAC;
+	req.emr_in_buf = payload;
+	req.emr_in_length = MC_CMD_SET_MAC_EXT_IN_LEN;
+	req.emr_out_buf = payload;
+	req.emr_out_length = MC_CMD_SET_MAC_OUT_LEN;
+
+	/* Only configure the MTU in this call to MC_CMD_SET_MAC */
+	MCDI_IN_SET_DWORD(req, SET_MAC_EXT_IN_MTU, mtu);
+	MCDI_IN_POPULATE_DWORD_1(req, SET_MAC_EXT_IN_CONTROL,
+			    SET_MAC_EXT_IN_CFG_MTU, 1);
+
+	efx_mcdi_execute(enp, &req);
+
+	if (req.emr_rc != 0) {
+		rc = req.emr_rc;
+		goto fail1;
+	}
+
+	return (0);
+
+fail1:
+	EFSYS_PROBE1(fail1, efx_rc_t, rc);
+
+	return (rc);
+}
+
+	__checkReturn	efx_rc_t
+ef10_mac_pdu_set(
+	__in		efx_nic_t *enp)
+{
+	efx_port_t *epp = &(enp->en_port);
+	efx_nic_cfg_t *encp = &(enp->en_nic_cfg);
+	efx_rc_t rc;
+
+	if (encp->enc_enhanced_set_mac_supported) {
+		if ((rc = efx_mcdi_mtu_set(enp, epp->ep_mac_pdu)) != 0)
+			goto fail1;
+	} else {
+		/*
+		 * Fallback for older Huntington firmware, which always
+		 * configure all of the parameters to MC_CMD_SET_MAC. This isn't
+		 * suitable for setting the MTU on unpriviliged functions.
+		 */
+		if ((rc = ef10_mac_reconfigure(enp)) != 0)
+			goto fail2;
+	}
+
+	return (0);
+
+fail2:
+	EFSYS_PROBE(fail2);
+fail1:
+	EFSYS_PROBE1(fail1, efx_rc_t, rc);
+
+	return (rc);
+}
+
 __checkReturn	efx_rc_t
 ef10_mac_reconfigure(
 	__in		efx_nic_t *enp)

Modified: stable/10/sys/dev/sfxge/common/hunt_nic.c
==============================================================================
--- stable/10/sys/dev/sfxge/common/hunt_nic.c	Wed Jan 20 08:16:30 2016	(r294396)
+++ stable/10/sys/dev/sfxge/common/hunt_nic.c	Wed Jan 20 08:17:28 2016	(r294397)
@@ -951,6 +951,13 @@ ef10_get_datapath_caps(
 	    CAP_FLAG(flags, VADAPTOR_PERMIT_SET_MAC_WHEN_FILTERS_INSTALLED) ?
 	    B_TRUE : B_FALSE;
 
+	/*
+	 * Check if firmware supports the extended MC_CMD_SET_MAC, which allows
+	 * specifying which parameters to configure.
+	 */
+	encp->enc_enhanced_set_mac_supported =
+		CAP_FLAG(flags, SET_MAC_ENHANCED) ? B_TRUE : B_FALSE;
+
 #undef CAP_FLAG
 #undef CAP_FLAG2
 

From owner-svn-src-all@freebsd.org  Wed Jan 20 08:18:45 2016
Return-Path: <owner-svn-src-all@freebsd.org>
Delivered-To: svn-src-all@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1F3E9A880FD;
 Wed, 20 Jan 2016 08:18:45 +0000 (UTC)
 (envelope-from arybchik@FreeBSD.org)
Received: from repo.freebsd.org (repo.freebsd.org
 [IPv6:2610:1c1:1:6068::e6a:0])
 (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
 (Client did not present a certificate)
 by mx1.freebsd.org (Postfix) with ESMTPS id E014B1D24;
 Wed, 20 Jan 2016 08:18:44 +0000 (UTC)
 (envelope-from arybchik@FreeBSD.org)
Received: from repo.freebsd.org ([127.0.1.37])
 by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u0K8Ihxe034084;
 Wed, 20 Jan 2016 08:18:43 GMT (envelope-from arybchik@FreeBSD.org)
Received: (from arybchik@localhost)
 by repo.freebsd.org (8.15.2/8.15.2/Submit) id u0K8Ihpn034083;
 Wed, 20 Jan 2016 08:18:43 GMT (envelope-from arybchik@FreeBSD.org)
Message-Id: <201601200818.u0K8Ihpn034083@repo.freebsd.org>
X-Authentication-Warning: repo.freebsd.org: arybchik set sender to
 arybchik@FreeBSD.org using -f
From: Andrew Rybchenko <arybchik@FreeBSD.org>
Date: Wed, 20 Jan 2016 08:18:43 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org
Subject: svn commit: r294398 - stable/10/sys/dev/sfxge/common
X-SVN-Group: stable-10
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.20
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for &quot;
 user&quot; and &quot; projects&quot; \)" <svn-src-all.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-all/>
List-Post: <mailto:svn-src-all@freebsd.org>
List-Help: <mailto:svn-src-all-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Wed, 20 Jan 2016 08:18:45 -0000

Author: arybchik
Date: Wed Jan 20 08:18:43 2016
New Revision: 294398
URL: https://svnweb.freebsd.org/changeset/base/294398

Log:
  MFC r294254
  
  sfxge: support RFID-selectable segments of dynamic configuration
  
  tlv_partition_header has field *preset* to support RFID-selectable
  segments of dynamic configuration
  
  Submitted by:   Mateusz Wrzesinski <mwrzesinski at solarflare.com>
  Sponsored by:   Solarflare Communications, Inc.

Modified:
  stable/10/sys/dev/sfxge/common/ef10_tlv_layout.h
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/sys/dev/sfxge/common/ef10_tlv_layout.h
==============================================================================
--- stable/10/sys/dev/sfxge/common/ef10_tlv_layout.h	Wed Jan 20 08:17:28 2016	(r294397)
+++ stable/10/sys/dev/sfxge/common/ef10_tlv_layout.h	Wed Jan 20 08:18:43 2016	(r294398)
@@ -113,7 +113,11 @@ struct tlv_partition_header {
   uint32_t tag;
   uint32_t length;
   uint16_t type_id;
-  uint16_t reserved;
+/* 0 indicates the default segment (always located at offset 0), while other values
+ * are for RFID-selectable presets that should immediately follow the default segment.
+ * The default segment may also have preset > 0, which means that it is a preset
+ * selected through an RFID command and copied by FW to the location at offset 0. */
+  uint16_t preset;
   uint32_t generation;
   uint32_t total_length;
 };

From owner-svn-src-all@freebsd.org  Wed Jan 20 08:20:01 2016
Return-Path: <owner-svn-src-all@freebsd.org>
Delivered-To: svn-src-all@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id 874C1A88241;
 Wed, 20 Jan 2016 08:20:01 +0000 (UTC)
 (envelope-from arybchik@FreeBSD.org)
Received: from repo.freebsd.org (repo.freebsd.org
 [IPv6:2610:1c1:1:6068::e6a:0])
 (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
 (Client did not present a certificate)
 by mx1.freebsd.org (Postfix) with ESMTPS id 555281E8E;
 Wed, 20 Jan 2016 08:20:01 +0000 (UTC)
 (envelope-from arybchik@FreeBSD.org)
Received: from repo.freebsd.org ([127.0.1.37])
 by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u0K8K0JU034195;
 Wed, 20 Jan 2016 08:20:00 GMT (envelope-from arybchik@FreeBSD.org)
Received: (from arybchik@localhost)
 by repo.freebsd.org (8.15.2/8.15.2/Submit) id u0K8K0kW034194;
 Wed, 20 Jan 2016 08:20:00 GMT (envelope-from arybchik@FreeBSD.org)
Message-Id: <201601200820.u0K8K0kW034194@repo.freebsd.org>
X-Authentication-Warning: repo.freebsd.org: arybchik set sender to
 arybchik@FreeBSD.org using -f
From: Andrew Rybchenko <arybchik@FreeBSD.org>
Date: Wed, 20 Jan 2016 08:20:00 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org
Subject: svn commit: r294399 - stable/10/sys/dev/sfxge/common
X-SVN-Group: stable-10
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.20
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for &quot;
 user&quot; and &quot; projects&quot; \)" <svn-src-all.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-all/>
List-Post: <mailto:svn-src-all@freebsd.org>
List-Help: <mailto:svn-src-all-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Wed, 20 Jan 2016 08:20:01 -0000

Author: arybchik
Date: Wed Jan 20 08:20:00 2016
New Revision: 294399
URL: https://svnweb.freebsd.org/changeset/base/294399

Log:
  MFC r294255
  
  sfxge: highlight that descriptor cache sizes are configured using TLV now
  
  Submitted by:   Tom Millington <tmillington at solarflare.com>
  Sponsored by:   Solarflare Communications, Inc.

Modified:
  stable/10/sys/dev/sfxge/common/ef10_tlv_layout.h
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/sys/dev/sfxge/common/ef10_tlv_layout.h
==============================================================================
--- stable/10/sys/dev/sfxge/common/ef10_tlv_layout.h	Wed Jan 20 08:18:43 2016	(r294398)
+++ stable/10/sys/dev/sfxge/common/ef10_tlv_layout.h	Wed Jan 20 08:20:00 2016	(r294399)
@@ -380,7 +380,7 @@ struct tlv_tmp_gubbins {
   int8_t with_rmon;             /* 0 -> off, 1 -> on, -1 -> leave alone */
   /* Consumed by clocks_hunt.c */
   int8_t clk_mode;             /* 0 -> off, 1 -> on, -1 -> leave alone */
-  /* Consumed by sram.c */
+  /* No longer used, superseded by TLV_TAG_DESCRIPTOR_CACHE_CONFIG. */
   int8_t rx_dc_size;           /* -1 -> leave alone */
   int8_t tx_dc_size;
   int16_t num_q_allocs;

From owner-svn-src-all@freebsd.org  Wed Jan 20 08:21:08 2016
Return-Path: <owner-svn-src-all@freebsd.org>
Delivered-To: svn-src-all@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id 80C40A88351;
 Wed, 20 Jan 2016 08:21:08 +0000 (UTC)
 (envelope-from arybchik@FreeBSD.org)
Received: from repo.freebsd.org (repo.freebsd.org
 [IPv6:2610:1c1:1:6068::e6a:0])
 (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
 (Client did not present a certificate)
 by mx1.freebsd.org (Postfix) with ESMTPS id 4D4C2112C;
 Wed, 20 Jan 2016 08:21:08 +0000 (UTC)
 (envelope-from arybchik@FreeBSD.org)
Received: from repo.freebsd.org ([127.0.1.37])
 by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u0K8L7j1034286;
 Wed, 20 Jan 2016 08:21:07 GMT (envelope-from arybchik@FreeBSD.org)
Received: (from arybchik@localhost)
 by repo.freebsd.org (8.15.2/8.15.2/Submit) id u0K8L7Fv034285;
 Wed, 20 Jan 2016 08:21:07 GMT (envelope-from arybchik@FreeBSD.org)
Message-Id: <201601200821.u0K8L7Fv034285@repo.freebsd.org>
X-Authentication-Warning: repo.freebsd.org: arybchik set sender to
 arybchik@FreeBSD.org using -f
From: Andrew Rybchenko <arybchik@FreeBSD.org>
Date: Wed, 20 Jan 2016 08:21:07 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org
Subject: svn commit: r294400 - stable/10/sys/dev/sfxge/common
X-SVN-Group: stable-10
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.20
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for &quot;
 user&quot; and &quot; projects&quot; \)" <svn-src-all.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-all/>
List-Post: <mailto:svn-src-all@freebsd.org>
List-Help: <mailto:svn-src-all-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Wed, 20 Jan 2016 08:21:08 -0000

Author: arybchik
Date: Wed Jan 20 08:21:07 2016
New Revision: 294400
URL: https://svnweb.freebsd.org/changeset/base/294400

Log:
  MFC r294256
  
  sfxge: cleanup: remove extra empty lines
  
  Sponsored by:   Solarflare Communications, Inc.

Modified:
  stable/10/sys/dev/sfxge/common/ef10_tlv_layout.h
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/sys/dev/sfxge/common/ef10_tlv_layout.h
==============================================================================
--- stable/10/sys/dev/sfxge/common/ef10_tlv_layout.h	Wed Jan 20 08:20:00 2016	(r294399)
+++ stable/10/sys/dev/sfxge/common/ef10_tlv_layout.h	Wed Jan 20 08:21:07 2016	(r294400)
@@ -694,7 +694,6 @@ struct tlv_mcast_filter_chaining {
 #define TLV_MCAST_FILTER_CHAINING_ENABLED  (1)
 };
 
-
 /* Pacer rate limit per PF */
 #define TLV_TAG_RATE_LIMIT(pf)    (0x101b0000 + (pf))
 
@@ -704,7 +703,6 @@ struct tlv_rate_limit {
   uint32_t rate_mbps;
 };
 
-
 /* OCSD Enable/Disable
  *
  * This setting allows OCSD to be disabled. This is a requirement for HP

From owner-svn-src-all@freebsd.org  Wed Jan 20 08:24:02 2016
Return-Path: <owner-svn-src-all@freebsd.org>
Delivered-To: svn-src-all@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id 535B3A8855E;
 Wed, 20 Jan 2016 08:24:02 +0000 (UTC)
 (envelope-from arybchik@FreeBSD.org)
Received: from repo.freebsd.org (repo.freebsd.org
 [IPv6:2610:1c1:1:6068::e6a:0])
 (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
 (Client did not present a certificate)
 by mx1.freebsd.org (Postfix) with ESMTPS id 241D51558;
 Wed, 20 Jan 2016 08:24:02 +0000 (UTC)
 (envelope-from arybchik@FreeBSD.org)
Received: from repo.freebsd.org ([127.0.1.37])
 by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u0K8O1Hx037189;
 Wed, 20 Jan 2016 08:24:01 GMT (envelope-from arybchik@FreeBSD.org)
Received: (from arybchik@localhost)
 by repo.freebsd.org (8.15.2/8.15.2/Submit) id u0K8O1uM037188;
 Wed, 20 Jan 2016 08:24:01 GMT (envelope-from arybchik@FreeBSD.org)
Message-Id: <201601200824.u0K8O1uM037188@repo.freebsd.org>
X-Authentication-Warning: repo.freebsd.org: arybchik set sender to
 arybchik@FreeBSD.org using -f
From: Andrew Rybchenko <arybchik@FreeBSD.org>
Date: Wed, 20 Jan 2016 08:24:01 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org
Subject: svn commit: r294401 - stable/10/sys/dev/sfxge/common
X-SVN-Group: stable-10
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.20
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for &quot;
 user&quot; and &quot; projects&quot; \)" <svn-src-all.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-all/>
List-Post: <mailto:svn-src-all@freebsd.org>
List-Help: <mailto:svn-src-all-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Wed, 20 Jan 2016 08:24:02 -0000

Author: arybchik
Date: Wed Jan 20 08:24:00 2016
New Revision: 294401
URL: https://svnweb.freebsd.org/changeset/base/294401

Log:
  MFC r294257
  
  sfxge: regenerate siena_flash.h from FW sources
  
  Sponsored by:   Solarflare Communications, Inc.

Modified:
  stable/10/sys/dev/sfxge/common/siena_flash.h
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/sys/dev/sfxge/common/siena_flash.h
==============================================================================
--- stable/10/sys/dev/sfxge/common/siena_flash.h	Wed Jan 20 08:21:07 2016	(r294400)
+++ stable/10/sys/dev/sfxge/common/siena_flash.h	Wed Jan 20 08:24:00 2016	(r294401)
@@ -115,14 +115,14 @@ typedef struct siena_mc_boot_hdr_s {		/*
 	efx_word_t	checksum;		/* of whole header area + firmware image */
 	efx_word_t	firmware_version_d;
 	efx_byte_t	mcfw_subtype;
-	efx_byte_t	reserved_a[1];		/* (set to 0) */
+	efx_byte_t	generation;		/* Valid for medford, SBZ for earlier chips */
 	efx_dword_t	firmware_text_offset;	/* offset to firmware .text */
 	efx_dword_t	firmware_text_size;	/* length of firmware .text, in bytes */
 	efx_dword_t	firmware_data_offset;	/* offset to firmware .data */
 	efx_dword_t	firmware_data_size;	/* length of firmware .data, in bytes */
 	efx_byte_t	spi_rate;		/* SPI rate for reading image, 0 is BootROM default */
 	efx_byte_t	spi_phase_adj;		/* SPI SDO/SCL phase adjustment, 0 is default (no adj) */
-	efx_word_t	reserved_b[1];		/* (set to 0) */
+	efx_word_t	xpm_sector;		/* The sector that contains the key, or 0xffff if unsigned (medford) SBZ (earlier) */
 	efx_dword_t	reserved_c[7];		/* (set to 0) */
 } siena_mc_boot_hdr_t;
 

From owner-svn-src-all@freebsd.org  Wed Jan 20 08:25:43 2016
Return-Path: <owner-svn-src-all@freebsd.org>
Delivered-To: svn-src-all@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id 417BDA88657;
 Wed, 20 Jan 2016 08:25:43 +0000 (UTC)
 (envelope-from arybchik@FreeBSD.org)
Received: from repo.freebsd.org (repo.freebsd.org
 [IPv6:2610:1c1:1:6068::e6a:0])
 (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
 (Client did not present a certificate)
 by mx1.freebsd.org (Postfix) with ESMTPS id 036AB180A;
 Wed, 20 Jan 2016 08:25:42 +0000 (UTC)
 (envelope-from arybchik@FreeBSD.org)
Received: from repo.freebsd.org ([127.0.1.37])
 by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u0K8PgFC037460;
 Wed, 20 Jan 2016 08:25:42 GMT (envelope-from arybchik@FreeBSD.org)
Received: (from arybchik@localhost)
 by repo.freebsd.org (8.15.2/8.15.2/Submit) id u0K8Pgha037459;
 Wed, 20 Jan 2016 08:25:42 GMT (envelope-from arybchik@FreeBSD.org)
Message-Id: <201601200825.u0K8Pgha037459@repo.freebsd.org>
X-Authentication-Warning: repo.freebsd.org: arybchik set sender to
 arybchik@FreeBSD.org using -f
From: Andrew Rybchenko <arybchik@FreeBSD.org>
Date: Wed, 20 Jan 2016 08:25:42 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org
Subject: svn commit: r294402 - stable/10/sys/dev/sfxge/common
X-SVN-Group: stable-10
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.20
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for &quot;
 user&quot; and &quot; projects&quot; \)" <svn-src-all.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-all/>
List-Post: <mailto:svn-src-all@freebsd.org>
List-Help: <mailto:svn-src-all-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Wed, 20 Jan 2016 08:25:43 -0000

Author: arybchik
Date: Wed Jan 20 08:25:41 2016
New Revision: 294402
URL: https://svnweb.freebsd.org/changeset/base/294402

Log:
  MFC r294259
  
  sfxge: regenerate EF10 registers definition for Medford
  
  Sponsored by:   Solarflare Communications, Inc.

Modified:
  stable/10/sys/dev/sfxge/common/efx_regs_ef10.h
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/sys/dev/sfxge/common/efx_regs_ef10.h
==============================================================================
--- stable/10/sys/dev/sfxge/common/efx_regs_ef10.h	Wed Jan 20 08:24:00 2016	(r294401)
+++ stable/10/sys/dev/sfxge/common/efx_regs_ef10.h	Wed Jan 20 08:25:41 2016	(r294402)
@@ -50,7 +50,7 @@ extern "C" {
  */
 
 #define	ER_DZ_BIU_HW_REV_ID_REG_OFST 0x00000000
-/* hunta0=pcie_pf_bar2 */
+/* hunta0,medforda0=pcie_pf_bar2 */
 #define	ER_DZ_BIU_HW_REV_ID_REG_RESET 0xeb14face
 
 
@@ -64,7 +64,7 @@ extern "C" {
  */
 
 #define	ER_DZ_BIU_MC_SFT_STATUS_REG_OFST 0x00000010
-/* hunta0=pcie_pf_bar2 */
+/* hunta0,medforda0=pcie_pf_bar2 */
 #define	ER_DZ_BIU_MC_SFT_STATUS_REG_STEP 4
 #define	ER_DZ_BIU_MC_SFT_STATUS_REG_ROWS 8
 #define	ER_DZ_BIU_MC_SFT_STATUS_REG_RESET 0x1111face
@@ -80,7 +80,7 @@ extern "C" {
  */
 
 #define	ER_DZ_BIU_INT_ISR_REG_OFST 0x00000090
-/* hunta0=pcie_pf_bar2 */
+/* hunta0,medforda0=pcie_pf_bar2 */
 #define	ER_DZ_BIU_INT_ISR_REG_RESET 0x0
 
 
@@ -94,7 +94,7 @@ extern "C" {
  */
 
 #define	ER_DZ_MC_DB_LWRD_REG_OFST 0x00000200
-/* hunta0=pcie_pf_bar2 */
+/* hunta0,medforda0=pcie_pf_bar2 */
 #define	ER_DZ_MC_DB_LWRD_REG_RESET 0x0
 
 
@@ -108,7 +108,7 @@ extern "C" {
  */
 
 #define	ER_DZ_MC_DB_HWRD_REG_OFST 0x00000204
-/* hunta0=pcie_pf_bar2 */
+/* hunta0,medforda0=pcie_pf_bar2 */
 #define	ER_DZ_MC_DB_HWRD_REG_RESET 0x0
 
 
@@ -122,7 +122,7 @@ extern "C" {
  */
 
 #define	ER_DZ_EVQ_RPTR_REG_OFST 0x00000400
-/* hunta0=pcie_pf_bar2 */
+/* hunta0,medforda0=pcie_pf_bar2 */
 #define	ER_DZ_EVQ_RPTR_REG_STEP 8192
 #define	ER_DZ_EVQ_RPTR_REG_ROWS 2048
 #define	ER_DZ_EVQ_RPTR_REG_RESET 0x0
@@ -140,7 +140,7 @@ extern "C" {
  */
 
 #define	ER_DZ_EVQ_TMR_REG_OFST 0x00000420
-/* hunta0=pcie_pf_bar2 */
+/* hunta0,medforda0=pcie_pf_bar2 */
 #define	ER_DZ_EVQ_TMR_REG_STEP 8192
 #define	ER_DZ_EVQ_TMR_REG_ROWS 2048
 #define	ER_DZ_EVQ_TMR_REG_RESET 0x0
@@ -158,7 +158,7 @@ extern "C" {
  */
 
 #define	ER_DZ_RX_DESC_UPD_REG_OFST 0x00000830
-/* hunta0=pcie_pf_bar2 */
+/* hunta0,medforda0=pcie_pf_bar2 */
 #define	ER_DZ_RX_DESC_UPD_REG_STEP 8192
 #define	ER_DZ_RX_DESC_UPD_REG_ROWS 2048
 #define	ER_DZ_RX_DESC_UPD_REG_RESET 0x0
@@ -174,7 +174,7 @@ extern "C" {
  */
 
 #define	ER_DZ_TX_DESC_UPD_REG_OFST 0x00000a10
-/* hunta0=pcie_pf_bar2 */
+/* hunta0,medforda0=pcie_pf_bar2 */
 #define	ER_DZ_TX_DESC_UPD_REG_STEP 8192
 #define	ER_DZ_TX_DESC_UPD_REG_ROWS 2048
 #define	ER_DZ_TX_DESC_UPD_REG_RESET 0x0
@@ -248,8 +248,14 @@ extern "C" {
 #define	ESF_DZ_RX_OVERRIDE_HOLDOFF_WIDTH 1
 #define	ESF_DZ_RX_DROP_EVENT_LBN 58
 #define	ESF_DZ_RX_DROP_EVENT_WIDTH 1
-#define	ESF_DZ_RX_EV_RSVD2_LBN 54
-#define	ESF_DZ_RX_EV_RSVD2_WIDTH 4
+#define	ESF_DD_RX_EV_RSVD2_LBN 54
+#define	ESF_DD_RX_EV_RSVD2_WIDTH 4
+#define	ESF_EZ_RX_TCP_UDP_INNER_CHKSUM_ERR_LBN 57
+#define	ESF_EZ_RX_TCP_UDP_INNER_CHKSUM_ERR_WIDTH 1
+#define	ESF_EZ_RX_IP_INNER_CHKSUM_ERR_LBN 56
+#define	ESF_EZ_RX_IP_INNER_CHKSUM_ERR_WIDTH 1
+#define	ESF_EZ_RX_EV_RSVD2_LBN 54
+#define	ESF_EZ_RX_EV_RSVD2_WIDTH 2
 #define	ESF_DZ_RX_EV_SOFT2_LBN 52
 #define	ESF_DZ_RX_EV_SOFT2_WIDTH 2
 #define	ESF_DZ_RX_DSC_PTR_LBITS_LBN 48
@@ -293,10 +299,21 @@ extern "C" {
 #define	ESF_DZ_RX_MAC_CLASS_WIDTH 1
 #define	ESE_DZ_MAC_CLASS_MCAST 1
 #define	ESE_DZ_MAC_CLASS_UCAST 0
-#define	ESF_DZ_RX_EV_SOFT1_LBN 32
-#define	ESF_DZ_RX_EV_SOFT1_WIDTH 3
-#define	ESF_DZ_RX_EV_RSVD1_LBN 30
-#define	ESF_DZ_RX_EV_RSVD1_WIDTH 2
+#define	ESF_DD_RX_EV_SOFT1_LBN 32
+#define	ESF_DD_RX_EV_SOFT1_WIDTH 3
+#define	ESF_EZ_RX_EV_SOFT1_LBN 34
+#define	ESF_EZ_RX_EV_SOFT1_WIDTH 1
+#define	ESF_EZ_RX_ENCAP_HDR_LBN 32
+#define	ESF_EZ_RX_ENCAP_HDR_WIDTH 2
+#define	ESE_EZ_ENCAP_HDR_GRE 2
+#define	ESE_EZ_ENCAP_HDR_VXLAN 1
+#define	ESE_EZ_ENCAP_HDR_NONE 0
+#define	ESF_DD_RX_EV_RSVD1_LBN 30
+#define	ESF_DD_RX_EV_RSVD1_WIDTH 2
+#define	ESF_EZ_RX_EV_RSVD1_LBN 31
+#define	ESF_EZ_RX_EV_RSVD1_WIDTH 1
+#define	ESF_EZ_RX_ABORT_LBN 30
+#define	ESF_EZ_RX_ABORT_WIDTH 1
 #define	ESF_DZ_RX_ECC_ERR_LBN 29
 #define	ESF_DZ_RX_ECC_ERR_WIDTH 1
 #define	ESF_DZ_RX_CRC1_ERR_LBN 28
@@ -369,12 +386,22 @@ extern "C" {
 #define	ESF_DZ_TX_OVERRIDE_HOLDOFF_WIDTH 1
 #define	ESF_DZ_TX_DROP_EVENT_LBN 58
 #define	ESF_DZ_TX_DROP_EVENT_WIDTH 1
-#define	ESF_DZ_TX_EV_RSVD_LBN 48
-#define	ESF_DZ_TX_EV_RSVD_WIDTH 10
+#define	ESF_DD_TX_EV_RSVD_LBN 48
+#define	ESF_DD_TX_EV_RSVD_WIDTH 10
+#define	ESF_EZ_TCP_UDP_INNER_CHKSUM_ERR_LBN 57
+#define	ESF_EZ_TCP_UDP_INNER_CHKSUM_ERR_WIDTH 1
+#define	ESF_EZ_IP_INNER_CHKSUM_ERR_LBN 56
+#define	ESF_EZ_IP_INNER_CHKSUM_ERR_WIDTH 1
+#define	ESF_EZ_TX_EV_RSVD_LBN 48
+#define	ESF_EZ_TX_EV_RSVD_WIDTH 8
 #define	ESF_DZ_TX_SOFT2_LBN 32
 #define	ESF_DZ_TX_SOFT2_WIDTH 16
-#define	ESF_DZ_TX_SOFT1_LBN 24
-#define	ESF_DZ_TX_SOFT1_WIDTH 8
+#define	ESF_DD_TX_SOFT1_LBN 24
+#define	ESF_DD_TX_SOFT1_WIDTH 8
+#define	ESF_EZ_TX_CAN_MERGE_LBN 31
+#define	ESF_EZ_TX_CAN_MERGE_WIDTH 1
+#define	ESF_EZ_TX_SOFT1_LBN 24
+#define	ESF_EZ_TX_SOFT1_WIDTH 7
 #define	ESF_DZ_TX_QLABEL_LBN 16
 #define	ESF_DZ_TX_QLABEL_WIDTH 5
 #define	ESF_DZ_TX_DESCR_INDX_LBN 0

From owner-svn-src-all@freebsd.org  Wed Jan 20 08:26:59 2016
Return-Path: <owner-svn-src-all@freebsd.org>
Delivered-To: svn-src-all@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id D13FCA88778;
 Wed, 20 Jan 2016 08:26:59 +0000 (UTC)
 (envelope-from arybchik@FreeBSD.org)
Received: from repo.freebsd.org (repo.freebsd.org
 [IPv6:2610:1c1:1:6068::e6a:0])
 (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
 (Client did not present a certificate)
 by mx1.freebsd.org (Postfix) with ESMTPS id AE29D1A3B;
 Wed, 20 Jan 2016 08:26:59 +0000 (UTC)
 (envelope-from arybchik@FreeBSD.org)
Received: from repo.freebsd.org ([127.0.1.37])
 by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u0K8Qw5t037689;
 Wed, 20 Jan 2016 08:26:58 GMT (envelope-from arybchik@FreeBSD.org)
Received: (from arybchik@localhost)
 by repo.freebsd.org (8.15.2/8.15.2/Submit) id u0K8QwAM037684;
 Wed, 20 Jan 2016 08:26:58 GMT (envelope-from arybchik@FreeBSD.org)
Message-Id: <201601200826.u0K8QwAM037684@repo.freebsd.org>
X-Authentication-Warning: repo.freebsd.org: arybchik set sender to
 arybchik@FreeBSD.org using -f
From: Andrew Rybchenko <arybchik@FreeBSD.org>
Date: Wed, 20 Jan 2016 08:26:58 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org
Subject: svn commit: r294403 - stable/10/sys/dev/sfxge/common
X-SVN-Group: stable-10
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.20
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for &quot;
 user&quot; and &quot; projects&quot; \)" <svn-src-all.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-all/>
List-Post: <mailto:svn-src-all@freebsd.org>
List-Help: <mailto:svn-src-all-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Wed, 20 Jan 2016 08:26:59 -0000

Author: arybchik
Date: Wed Jan 20 08:26:58 2016
New Revision: 294403
URL: https://svnweb.freebsd.org/changeset/base/294403

Log:
  MFC r294309
  
  sfxge: select whether to read current or backup partition in Medford A/B scheme
  
  The dynamic config on Medford is stored using two partitions in flash, and at
  any time one is the 'current' partition, used to provide the active config,
  and the other 'backup' partition is used for writes.  This means that there
  are two potential partitions that can be used to service reads, and which is
  required can depend on, for example, whether the read is to get the current
  contents or to verify a write.
  
  When the partition write lock is held, the default behaviour is to read from
  the backup partition, which was wrong for most reads in the common code which
  require the current partition. This change allows the current partition to be
  read whilst the write lock is held.
  There is one read in Manftest which needs the backup partition.
  
  ef10_nvram_partn_read_mode() is created to avoid changing
  ef10_nvram_partn_read() which shares a prototype with the equivalent Falcon
  and Siena methods.
  
  MC_CMD_NVRAM_READ_IN_V2 adds an extra field, but firmware which doesn't support
  it just ignores it.
  
  Submitted by:   Mark Spender <mspender at solarflare.com>
  Sponsored by:   Solarflare Communications, Inc.

Modified:
  stable/10/sys/dev/sfxge/common/efx_impl.h
  stable/10/sys/dev/sfxge/common/efx_nvram.c
  stable/10/sys/dev/sfxge/common/hunt_impl.h
  stable/10/sys/dev/sfxge/common/hunt_nvram.c
  stable/10/sys/dev/sfxge/common/siena_nvram.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/sys/dev/sfxge/common/efx_impl.h
==============================================================================
--- stable/10/sys/dev/sfxge/common/efx_impl.h	Wed Jan 20 08:25:41 2016	(r294402)
+++ stable/10/sys/dev/sfxge/common/efx_impl.h	Wed Jan 20 08:26:58 2016	(r294403)
@@ -559,7 +559,8 @@ efx_mcdi_nvram_read(
 	__in			uint32_t partn,
 	__in			uint32_t offset,
 	__out_bcount(size)	caddr_t data,
-	__in			size_t size);
+	__in			size_t size,
+	__in			uint32_t mode);
 
 	__checkReturn		efx_rc_t
 efx_mcdi_nvram_erase(

Modified: stable/10/sys/dev/sfxge/common/efx_nvram.c
==============================================================================
--- stable/10/sys/dev/sfxge/common/efx_nvram.c	Wed Jan 20 08:25:41 2016	(r294402)
+++ stable/10/sys/dev/sfxge/common/efx_nvram.c	Wed Jan 20 08:26:58 2016	(r294403)
@@ -721,10 +721,11 @@ efx_mcdi_nvram_read(
 	__in			uint32_t partn,
 	__in			uint32_t offset,
 	__out_bcount(size)	caddr_t data,
-	__in			size_t size)
+	__in			size_t size,
+	__in			uint32_t mode)
 {
 	efx_mcdi_req_t req;
-	uint8_t payload[MAX(MC_CMD_NVRAM_READ_IN_LEN,
+	uint8_t payload[MAX(MC_CMD_NVRAM_READ_IN_V2_LEN,
 			    MC_CMD_NVRAM_READ_OUT_LENMAX)];
 	efx_rc_t rc;
 
@@ -736,13 +737,14 @@ efx_mcdi_nvram_read(
 	(void) memset(payload, 0, sizeof (payload));
 	req.emr_cmd = MC_CMD_NVRAM_READ;
 	req.emr_in_buf = payload;
-	req.emr_in_length = MC_CMD_NVRAM_READ_IN_LEN;
+	req.emr_in_length = MC_CMD_NVRAM_READ_IN_V2_LEN;
 	req.emr_out_buf = payload;
 	req.emr_out_length = MC_CMD_NVRAM_READ_OUT_LENMAX;
 
-	MCDI_IN_SET_DWORD(req, NVRAM_READ_IN_TYPE, partn);
-	MCDI_IN_SET_DWORD(req, NVRAM_READ_IN_OFFSET, offset);
-	MCDI_IN_SET_DWORD(req, NVRAM_READ_IN_LENGTH, size);
+	MCDI_IN_SET_DWORD(req, NVRAM_READ_IN_V2_TYPE, partn);
+	MCDI_IN_SET_DWORD(req, NVRAM_READ_IN_V2_OFFSET, offset);
+	MCDI_IN_SET_DWORD(req, NVRAM_READ_IN_V2_LENGTH, size);
+	MCDI_IN_SET_DWORD(req, NVRAM_READ_IN_V2_MODE, mode);
 
 	efx_mcdi_execute(enp, &req);
 

Modified: stable/10/sys/dev/sfxge/common/hunt_impl.h
==============================================================================
--- stable/10/sys/dev/sfxge/common/hunt_impl.h	Wed Jan 20 08:25:41 2016	(r294402)
+++ stable/10/sys/dev/sfxge/common/hunt_impl.h	Wed Jan 20 08:26:58 2016	(r294403)
@@ -409,6 +409,15 @@ ef10_nvram_partn_rw_start(
 	__out			size_t *chunk_sizep);
 
 extern	__checkReturn		efx_rc_t
+ef10_nvram_partn_read_mode(
+	__in			efx_nic_t *enp,
+	__in			uint32_t partn,
+	__in			unsigned int offset,
+	__out_bcount(size)	caddr_t data,
+	__in			size_t size,
+	__in			uint32_t mode);
+
+extern	__checkReturn		efx_rc_t
 ef10_nvram_partn_read(
 	__in			efx_nic_t *enp,
 	__in			uint32_t partn,

Modified: stable/10/sys/dev/sfxge/common/hunt_nvram.c
==============================================================================
--- stable/10/sys/dev/sfxge/common/hunt_nvram.c	Wed Jan 20 08:25:41 2016	(r294402)
+++ stable/10/sys/dev/sfxge/common/hunt_nvram.c	Wed Jan 20 08:26:58 2016	(r294403)
@@ -598,8 +598,9 @@ ef10_nvram_read_tlv_segment(
 	}
 
 	/* Read initial chunk of the segment, starting at offset */
-	if ((rc = ef10_nvram_partn_read(enp, partn, seg_offset, seg_data,
-		    EF10_NVRAM_CHUNK)) != 0) {
+	if ((rc = ef10_nvram_partn_read_mode(enp, partn, seg_offset, seg_data,
+		    EF10_NVRAM_CHUNK,
+		    MC_CMD_NVRAM_READ_IN_V2_TARGET_CURRENT)) != 0) {
 		goto fail2;
 	}
 
@@ -624,10 +625,11 @@ ef10_nvram_read_tlv_segment(
 
 	/* Read the remaining segment content */
 	if (total_length > EF10_NVRAM_CHUNK) {
-		if ((rc = ef10_nvram_partn_read(enp, partn,
+		if ((rc = ef10_nvram_partn_read_mode(enp, partn,
 			    seg_offset + EF10_NVRAM_CHUNK,
 			    seg_data + EF10_NVRAM_CHUNK,
-			    total_length - EF10_NVRAM_CHUNK)) != 0)
+			    total_length - EF10_NVRAM_CHUNK,
+			    MC_CMD_NVRAM_READ_IN_V2_TARGET_CURRENT)) != 0)
 			goto fail6;
 	}
 
@@ -1321,12 +1323,13 @@ fail1:
 }
 
 	__checkReturn		efx_rc_t
-ef10_nvram_partn_read(
+ef10_nvram_partn_read_mode(
 	__in			efx_nic_t *enp,
 	__in			uint32_t partn,
 	__in			unsigned int offset,
 	__out_bcount(size)	caddr_t data,
-	__in			size_t size)
+	__in			size_t size,
+	__in			uint32_t mode)
 {
 	size_t chunk;
 	efx_rc_t rc;
@@ -1335,7 +1338,7 @@ ef10_nvram_partn_read(
 		chunk = MIN(size, EF10_NVRAM_CHUNK);
 
 		if ((rc = efx_mcdi_nvram_read(enp, partn, offset,
-			    data, chunk)) != 0) {
+			    data, chunk, mode)) != 0) {
 			goto fail1;
 		}
 
@@ -1353,6 +1356,22 @@ fail1:
 }
 
 	__checkReturn		efx_rc_t
+ef10_nvram_partn_read(
+	__in			efx_nic_t *enp,
+	__in			uint32_t partn,
+	__in			unsigned int offset,
+	__out_bcount(size)	caddr_t data,
+	__in			size_t size)
+{
+	/*
+	 * Read requests which come in through the EFX API expect to
+	 * read the current, active partition.
+	 */
+	return ef10_nvram_partn_read_mode(enp, partn, offset, data, size,
+			    MC_CMD_NVRAM_READ_IN_V2_TARGET_CURRENT);
+}
+
+	__checkReturn		efx_rc_t
 ef10_nvram_partn_erase(
 	__in			efx_nic_t *enp,
 	__in			uint32_t partn,

Modified: stable/10/sys/dev/sfxge/common/siena_nvram.c
==============================================================================
--- stable/10/sys/dev/sfxge/common/siena_nvram.c	Wed Jan 20 08:25:41 2016	(r294402)
+++ stable/10/sys/dev/sfxge/common/siena_nvram.c	Wed Jan 20 08:26:58 2016	(r294403)
@@ -99,8 +99,8 @@ siena_nvram_partn_read(
 	while (size > 0) {
 		chunk = MIN(size, SIENA_NVRAM_CHUNK);
 
-		if ((rc = efx_mcdi_nvram_read(enp, partn, offset,
-			    data, chunk)) != 0) {
+		if ((rc = efx_mcdi_nvram_read(enp, partn, offset, data, chunk,
+			    MC_CMD_NVRAM_READ_IN_V2_DEFAULT)) != 0) {
 			goto fail1;
 		}
 

From owner-svn-src-all@freebsd.org  Wed Jan 20 08:28:34 2016
Return-Path: <owner-svn-src-all@freebsd.org>
Delivered-To: svn-src-all@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id 22943A88899;
 Wed, 20 Jan 2016 08:28:34 +0000 (UTC)
 (envelope-from arybchik@FreeBSD.org)
Received: from repo.freebsd.org (repo.freebsd.org
 [IPv6:2610:1c1:1:6068::e6a:0])
 (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
 (Client did not present a certificate)
 by mx1.freebsd.org (Postfix) with ESMTPS id D79A91C97;
 Wed, 20 Jan 2016 08:28:33 +0000 (UTC)
 (envelope-from arybchik@FreeBSD.org)
Received: from repo.freebsd.org ([127.0.1.37])
 by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u0K8SWVs037950;
 Wed, 20 Jan 2016 08:28:32 GMT (envelope-from arybchik@FreeBSD.org)
Received: (from arybchik@localhost)
 by repo.freebsd.org (8.15.2/8.15.2/Submit) id u0K8SWSh037949;
 Wed, 20 Jan 2016 08:28:32 GMT (envelope-from arybchik@FreeBSD.org)
Message-Id: <201601200828.u0K8SWSh037949@repo.freebsd.org>
X-Authentication-Warning: repo.freebsd.org: arybchik set sender to
 arybchik@FreeBSD.org using -f
From: Andrew Rybchenko <arybchik@FreeBSD.org>
Date: Wed, 20 Jan 2016 08:28:32 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org
Subject: svn commit: r294404 - stable/10/sys/dev/sfxge/common
X-SVN-Group: stable-10
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.20
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for &quot;
 user&quot; and &quot; projects&quot; \)" <svn-src-all.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-all/>
List-Post: <mailto:svn-src-all@freebsd.org>
List-Help: <mailto:svn-src-all-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Wed, 20 Jan 2016 08:28:34 -0000

Author: arybchik
Date: Wed Jan 20 08:28:32 2016
New Revision: 294404
URL: https://svnweb.freebsd.org/changeset/base/294404

Log:
  MFC r294310
  
  sfxge: improve error handling in ef10_ev_rx()
  
  Ensure that checksum flags and L3/L4 fields are ignored
  if lower level errors are reported in the event.
  
  Remove checks for CRC0_ERR (bad iSCSI header CRC) and
  CRC1_ERR (bad iSCSI payload or FCoE/FCoIP CRC) as they
  are not used by any existing code.
  
  Submitted by:   Andy Moreton <amoreton at solarflare.com>
  Sponsored by:   Solarflare Communications, Inc.

Modified:
  stable/10/sys/dev/sfxge/common/hunt_ev.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/sys/dev/sfxge/common/hunt_ev.c
==============================================================================
--- stable/10/sys/dev/sfxge/common/hunt_ev.c	Wed Jan 20 08:26:58 2016	(r294403)
+++ stable/10/sys/dev/sfxge/common/hunt_ev.c	Wed Jan 20 08:28:32 2016	(r294404)
@@ -486,17 +486,14 @@ ef10_ev_rx(
 {
 	efx_nic_t *enp = eep->ee_enp;
 	uint32_t size;
-#if 0
-	boolean_t parse_err;
-#endif
 	uint32_t label;
-	uint32_t mcast;
-	uint32_t eth_base_class;
+	uint32_t mac_class;
 	uint32_t eth_tag_class;
 	uint32_t l3_class;
 	uint32_t l4_class;
 	uint32_t next_read_lbits;
 	uint16_t flags;
+	boolean_t cont;
 	boolean_t should_abort;
 	efx_evq_rxq_state_t *eersp;
 	unsigned int desc_count;
@@ -508,10 +505,15 @@ ef10_ev_rx(
 	if (enp->en_reset_flags & (EFX_RESET_RXQ_ERR | EFX_RESET_TXQ_ERR))
 		return (B_FALSE);
 
-	/*
-	 * FIXME: likely to be incomplete, incorrect and inefficient.
-	 * Improvements in all three areas are required.
-	 */
+	/* Basic packet information */
+	size = EFX_QWORD_FIELD(*eqp, ESF_DZ_RX_BYTES);
+	next_read_lbits = EFX_QWORD_FIELD(*eqp, ESF_DZ_RX_DSC_PTR_LBITS);
+	label = EFX_QWORD_FIELD(*eqp, ESF_DZ_RX_QLABEL);
+	eth_tag_class = EFX_QWORD_FIELD(*eqp, ESF_DZ_RX_ETH_TAG_CLASS);
+	mac_class = EFX_QWORD_FIELD(*eqp, ESF_DZ_RX_MAC_CLASS);
+	l3_class = EFX_QWORD_FIELD(*eqp, ESF_DZ_RX_L3_CLASS);
+	l4_class = EFX_QWORD_FIELD(*eqp, ESF_DZ_RX_L4_CLASS);
+	cont = EFX_QWORD_FIELD(*eqp, ESF_DZ_RX_CONT);
 
 	if (EFX_QWORD_FIELD(*eqp, ESF_DZ_RX_DROP_EVENT) != 0) {
 		/* Drop this event */
@@ -519,9 +521,7 @@ ef10_ev_rx(
 	}
 	flags = 0;
 
-	size = EFX_QWORD_FIELD(*eqp, ESF_DZ_RX_BYTES);
-
-	if (EFX_QWORD_FIELD(*eqp, ESF_DZ_RX_CONT) != 0) {
+	if (cont != 0) {
 		/*
 		 * This may be part of a scattered frame, or it may be a
 		 * truncated frame if scatter is disabled on this RXQ.
@@ -534,41 +534,9 @@ ef10_ev_rx(
 		flags |= EFX_PKT_CONT;
 	}
 
-#if 0
-	/* TODO What to do if the packet is flagged with parsing error */
-	parse_err = (EFX_QWORD_FIELD(*eqp, ESF_DZ_RX_PARSE_INCOMPLETE) != 0);
-#endif
-	label = EFX_QWORD_FIELD(*eqp, ESF_DZ_RX_QLABEL);
-
-	if (EFX_QWORD_FIELD(*eqp, ESF_DZ_RX_ECRC_ERR) != 0) {
-		/* Ethernet frame CRC bad */
-		flags |= EFX_DISCARD;
-	}
-	if (EFX_QWORD_FIELD(*eqp, ESF_DZ_RX_CRC0_ERR) != 0) {
-		/* IP+TCP, bad CRC in iSCSI header */
-		flags |= EFX_DISCARD;
-	}
-	if (EFX_QWORD_FIELD(*eqp, ESF_DZ_RX_CRC1_ERR) != 0) {
-		/* IP+TCP, bad CRC in iSCSI payload or FCoE or FCoIP */
-		flags |= EFX_DISCARD;
-	}
-	if (EFX_QWORD_FIELD(*eqp, ESF_DZ_RX_ECC_ERR) != 0) {
-		/* ECC memory error */
-		flags |= EFX_DISCARD;
-	}
-
-	mcast = EFX_QWORD_FIELD(*eqp, ESF_DZ_RX_MAC_CLASS);
-	if (mcast == ESE_DZ_MAC_CLASS_UCAST)
+	if (mac_class == ESE_DZ_MAC_CLASS_UCAST)
 		flags |= EFX_PKT_UNICAST;
 
-	eth_base_class = EFX_QWORD_FIELD(*eqp, ESF_DZ_RX_ETH_BASE_CLASS);
-	eth_tag_class = EFX_QWORD_FIELD(*eqp, ESF_DZ_RX_ETH_TAG_CLASS);
-	l3_class = EFX_QWORD_FIELD(*eqp, ESF_DZ_RX_L3_CLASS);
-	l4_class = EFX_QWORD_FIELD(*eqp, ESF_DZ_RX_L4_CLASS);
-
-	/* bottom 4 bits of incremented index (not last desc consumed) */
-	next_read_lbits = EFX_QWORD_FIELD(*eqp, ESF_DZ_RX_DSC_PTR_LBITS);
-
 	/* Increment the count of descriptors read */
 	eersp = &eep->ee_rxq_state[label];
 	desc_count = (next_read_lbits - eersp->eers_rx_read_ptr) &
@@ -587,88 +555,84 @@ ef10_ev_rx(
 	/* Calculate the index of the the last descriptor consumed */
 	last_used_id = (eersp->eers_rx_read_ptr - 1) & eersp->eers_rx_mask;
 
-	/* EFX_QWORD_FIELD(*eqp, ESF_DZ_RX_OVERRIDE_HOLDOFF); */
-
-	switch (eth_base_class) {
-	case ESE_DZ_ETH_BASE_CLASS_LLC_SNAP:
-	case ESE_DZ_ETH_BASE_CLASS_LLC:
-	case ESE_DZ_ETH_BASE_CLASS_ETH2:
-	default:
-		break;
+	/* Check for errors that invalidate checksum and L3/L4 fields */
+	if (EFX_QWORD_FIELD(*eqp, ESF_DZ_RX_ECC_ERR) != 0) {
+		/* RX frame truncated (error flag is misnamed) */
+		EFX_EV_QSTAT_INCR(eep, EV_RX_FRM_TRUNC);
+		flags |= EFX_DISCARD;
+		goto deliver;
+	}
+	if (EFX_QWORD_FIELD(*eqp, ESF_DZ_RX_ECRC_ERR) != 0) {
+		/* Bad Ethernet frame CRC */
+		EFX_EV_QSTAT_INCR(eep, EV_RX_ETH_CRC_ERR);
+		flags |= EFX_DISCARD;
+		goto deliver;
+	}
+	if (EFX_QWORD_FIELD(*eqp, ESF_DZ_RX_PARSE_INCOMPLETE)) {
+		/*
+		 * Hardware parse failed, due to malformed headers
+		 * or headers that are too long for the parser.
+		 * Headers and checksums must be validated by the host.
+		 */
+		// TODO: EFX_EV_QSTAT_INCR(eep, EV_RX_PARSE_INCOMPLETE);
+		goto deliver;
 	}
 
-	switch (eth_tag_class) {
-	case ESE_DZ_ETH_TAG_CLASS_RSVD7:
-	case ESE_DZ_ETH_TAG_CLASS_RSVD6:
-	case ESE_DZ_ETH_TAG_CLASS_RSVD5:
-	case ESE_DZ_ETH_TAG_CLASS_RSVD4:
-		break;
-
-	case ESE_DZ_ETH_TAG_CLASS_RSVD3: /* Triple tagged */
-	case ESE_DZ_ETH_TAG_CLASS_VLAN2: /* Double tagged */
-	case ESE_DZ_ETH_TAG_CLASS_VLAN1: /* VLAN tagged */
+	if ((eth_tag_class == ESE_DZ_ETH_TAG_CLASS_VLAN1) ||
+	    (eth_tag_class == ESE_DZ_ETH_TAG_CLASS_VLAN2)) {
 		flags |= EFX_PKT_VLAN_TAGGED;
-		break;
-
-	case ESE_DZ_ETH_TAG_CLASS_NONE:
-	default:
-		break;
 	}
 
 	switch (l3_class) {
-	case ESE_DZ_L3_CLASS_RSVD7: /* Used by firmware for packet overrun */
-#if 0
-		parse_err = B_TRUE;
-#endif
-		flags |= EFX_DISCARD;
-		break;
+	case ESE_DZ_L3_CLASS_IP4:
+	case ESE_DZ_L3_CLASS_IP4_FRAG:
+		flags |= EFX_PKT_IPV4;
+		if (EFX_QWORD_FIELD(*eqp, ESF_DZ_RX_IPCKSUM_ERR)) {
+			EFX_EV_QSTAT_INCR(eep, EV_RX_IPV4_HDR_CHKSUM_ERR);
+		} else {
+			flags |= EFX_CKSUM_IPV4;
+		}
 
-	case ESE_DZ_L3_CLASS_ARP:
-	case ESE_DZ_L3_CLASS_FCOE:
+		if (l4_class == ESE_DZ_L4_CLASS_TCP) {
+			EFX_EV_QSTAT_INCR(eep, EV_RX_TCP_IPV4);
+			flags |= EFX_PKT_TCP;
+		} else if (l4_class == ESE_DZ_L4_CLASS_UDP) {
+			EFX_EV_QSTAT_INCR(eep, EV_RX_UDP_IPV4);
+			flags |= EFX_PKT_UDP;
+		} else {
+			EFX_EV_QSTAT_INCR(eep, EV_RX_OTHER_IPV4);
+		}
 		break;
 
-	case ESE_DZ_L3_CLASS_IP6_FRAG:
 	case ESE_DZ_L3_CLASS_IP6:
+	case ESE_DZ_L3_CLASS_IP6_FRAG:
 		flags |= EFX_PKT_IPV6;
-		break;
 
-	case ESE_DZ_L3_CLASS_IP4_FRAG:
-	case ESE_DZ_L3_CLASS_IP4:
-		flags |= EFX_PKT_IPV4;
-		if (EFX_QWORD_FIELD(*eqp, ESF_DZ_RX_IPCKSUM_ERR) == 0)
-			flags |= EFX_CKSUM_IPV4;
+		if (l4_class == ESE_DZ_L4_CLASS_TCP) {
+			EFX_EV_QSTAT_INCR(eep, EV_RX_TCP_IPV6);
+			flags |= EFX_PKT_TCP;
+		} else if (l4_class == ESE_DZ_L4_CLASS_UDP) {
+			EFX_EV_QSTAT_INCR(eep, EV_RX_UDP_IPV6);
+			flags |= EFX_PKT_UDP;
+		} else {
+			EFX_EV_QSTAT_INCR(eep, EV_RX_OTHER_IPV6);
+		}
 		break;
 
-	case ESE_DZ_L3_CLASS_UNKNOWN:
 	default:
+		EFX_EV_QSTAT_INCR(eep, EV_RX_NON_IP);
 		break;
 	}
 
-	switch (l4_class) {
-	case ESE_DZ_L4_CLASS_RSVD7:
-	case ESE_DZ_L4_CLASS_RSVD6:
-	case ESE_DZ_L4_CLASS_RSVD5:
-	case ESE_DZ_L4_CLASS_RSVD4:
-	case ESE_DZ_L4_CLASS_RSVD3:
-		break;
-
-	case ESE_DZ_L4_CLASS_UDP:
-		flags |= EFX_PKT_UDP;
-		if (EFX_QWORD_FIELD(*eqp, ESF_DZ_RX_TCPUDP_CKSUM_ERR) == 0)
-			flags |= EFX_CKSUM_TCPUDP;
-		break;
-
-	case ESE_DZ_L4_CLASS_TCP:
-		flags |= EFX_PKT_TCP;
-		if (EFX_QWORD_FIELD(*eqp, ESF_DZ_RX_TCPUDP_CKSUM_ERR) == 0)
+	if (flags & (EFX_PKT_TCP | EFX_PKT_UDP)) {
+		if (EFX_QWORD_FIELD(*eqp, ESF_DZ_RX_TCPUDP_CKSUM_ERR)) {
+			EFX_EV_QSTAT_INCR(eep, EV_RX_TCP_UDP_CHKSUM_ERR);
+		} else {
 			flags |= EFX_CKSUM_TCPUDP;
-		break;
-
-	case ESE_DZ_L4_CLASS_UNKNOWN:
-	default:
-		break;
+		}
 	}
 
+deliver:
 	/* If we're not discarding the packet then it is ok */
 	if (~flags & EFX_DISCARD)
 		EFX_EV_QSTAT_INCR(eep, EV_RX_OK);

From owner-svn-src-all@freebsd.org  Wed Jan 20 08:54:39 2016
Return-Path: <owner-svn-src-all@freebsd.org>
Delivered-To: svn-src-all@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8EF0AA8948A;
 Wed, 20 Jan 2016 08:54:39 +0000 (UTC)
 (envelope-from delphij@FreeBSD.org)
Received: from repo.freebsd.org (repo.freebsd.org
 [IPv6:2610:1c1:1:6068::e6a:0])
 (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
 (Client did not present a certificate)
 by mx1.freebsd.org (Postfix) with ESMTPS id 45DBD19FF;
 Wed, 20 Jan 2016 08:54:39 +0000 (UTC)
 (envelope-from delphij@FreeBSD.org)
Received: from repo.freebsd.org ([127.0.1.37])
 by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u0K8scHg047602;
 Wed, 20 Jan 2016 08:54:38 GMT (envelope-from delphij@FreeBSD.org)
Received: (from delphij@localhost)
 by repo.freebsd.org (8.15.2/8.15.2/Submit) id u0K8sZ3B047570;
 Wed, 20 Jan 2016 08:54:35 GMT (envelope-from delphij@FreeBSD.org)
Message-Id: <201601200854.u0K8sZ3B047570@repo.freebsd.org>
X-Authentication-Warning: repo.freebsd.org: delphij set sender to
 delphij@FreeBSD.org using -f
From: Xin LI <delphij@FreeBSD.org>
Date: Wed, 20 Jan 2016 08:54:35 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org
Subject: svn commit: r294405 - in stable/9: contrib/bind9
 contrib/bind9/doc/arm contrib/bind9/lib/dns contrib/bind9/lib/dns/rdata/in_1
 lib/bind/dns lib/bind/dns/dns
X-SVN-Group: stable-9
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.20
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for &quot;
 user&quot; and &quot; projects&quot; \)" <svn-src-all.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-all/>
List-Post: <mailto:svn-src-all@freebsd.org>
List-Help: <mailto:svn-src-all-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Wed, 20 Jan 2016 08:54:39 -0000

Author: delphij
Date: Wed Jan 20 08:54:35 2016
New Revision: 294405
URL: https://svnweb.freebsd.org/changeset/base/294405

Log:
  MFV r294374: BIND 9.9.8-P3.

Modified:
  stable/9/contrib/bind9/CHANGES
  stable/9/contrib/bind9/README
  stable/9/contrib/bind9/doc/arm/Bv9ARM.ch01.html
  stable/9/contrib/bind9/doc/arm/Bv9ARM.ch02.html
  stable/9/contrib/bind9/doc/arm/Bv9ARM.ch03.html
  stable/9/contrib/bind9/doc/arm/Bv9ARM.ch04.html
  stable/9/contrib/bind9/doc/arm/Bv9ARM.ch05.html
  stable/9/contrib/bind9/doc/arm/Bv9ARM.ch06.html
  stable/9/contrib/bind9/doc/arm/Bv9ARM.ch07.html
  stable/9/contrib/bind9/doc/arm/Bv9ARM.ch08.html
  stable/9/contrib/bind9/doc/arm/Bv9ARM.ch09.html
  stable/9/contrib/bind9/doc/arm/Bv9ARM.ch10.html
  stable/9/contrib/bind9/doc/arm/Bv9ARM.ch11.html
  stable/9/contrib/bind9/doc/arm/Bv9ARM.ch12.html
  stable/9/contrib/bind9/doc/arm/Bv9ARM.ch13.html
  stable/9/contrib/bind9/doc/arm/Bv9ARM.html
  stable/9/contrib/bind9/doc/arm/Bv9ARM.pdf
  stable/9/contrib/bind9/doc/arm/man.arpaname.html
  stable/9/contrib/bind9/doc/arm/man.ddns-confgen.html
  stable/9/contrib/bind9/doc/arm/man.dig.html
  stable/9/contrib/bind9/doc/arm/man.dnssec-checkds.html
  stable/9/contrib/bind9/doc/arm/man.dnssec-coverage.html
  stable/9/contrib/bind9/doc/arm/man.dnssec-dsfromkey.html
  stable/9/contrib/bind9/doc/arm/man.dnssec-keyfromlabel.html
  stable/9/contrib/bind9/doc/arm/man.dnssec-keygen.html
  stable/9/contrib/bind9/doc/arm/man.dnssec-revoke.html
  stable/9/contrib/bind9/doc/arm/man.dnssec-settime.html
  stable/9/contrib/bind9/doc/arm/man.dnssec-signzone.html
  stable/9/contrib/bind9/doc/arm/man.dnssec-verify.html
  stable/9/contrib/bind9/doc/arm/man.genrandom.html
  stable/9/contrib/bind9/doc/arm/man.host.html
  stable/9/contrib/bind9/doc/arm/man.isc-hmac-fixup.html
  stable/9/contrib/bind9/doc/arm/man.named-checkconf.html
  stable/9/contrib/bind9/doc/arm/man.named-checkzone.html
  stable/9/contrib/bind9/doc/arm/man.named-journalprint.html
  stable/9/contrib/bind9/doc/arm/man.named.html
  stable/9/contrib/bind9/doc/arm/man.nsec3hash.html
  stable/9/contrib/bind9/doc/arm/man.nsupdate.html
  stable/9/contrib/bind9/doc/arm/man.rndc-confgen.html
  stable/9/contrib/bind9/doc/arm/man.rndc.conf.html
  stable/9/contrib/bind9/doc/arm/man.rndc.html
  stable/9/contrib/bind9/doc/arm/notes.html
  stable/9/contrib/bind9/doc/arm/notes.pdf
  stable/9/contrib/bind9/doc/arm/notes.xml
  stable/9/contrib/bind9/lib/dns/api
  stable/9/contrib/bind9/lib/dns/rdata/in_1/apl_42.c
  stable/9/contrib/bind9/lib/dns/resolver.c
  stable/9/contrib/bind9/version
  stable/9/lib/bind/dns/code.h
  stable/9/lib/bind/dns/dns/enumclass.h
  stable/9/lib/bind/dns/dns/enumtype.h
  stable/9/lib/bind/dns/dns/rdatastruct.h
Directory Properties:
  stable/9/contrib/bind9/   (props changed)

Modified: stable/9/contrib/bind9/CHANGES
==============================================================================
--- stable/9/contrib/bind9/CHANGES	Wed Jan 20 08:28:32 2016	(r294404)
+++ stable/9/contrib/bind9/CHANGES	Wed Jan 20 08:54:35 2016	(r294405)
@@ -1,3 +1,12 @@
+	--- 9.9.8-P3 released ---
+
+4288.	[bug]		Fixed a regression in resolver.c:possibly_mark()
+			which caused known-bogus servers to be queried
+			anyway. [RT #41321]
+
+4285.	[security]	Specific APL data could trigger a INSIST.
+			(CVE-2015-8704) [RT #41396]
+
 	--- 9.9.8-P2 released ---
 
 4270.	[security]	Update allowed OpenSSL versions as named is

Modified: stable/9/contrib/bind9/README
==============================================================================
--- stable/9/contrib/bind9/README	Wed Jan 20 08:28:32 2016	(r294404)
+++ stable/9/contrib/bind9/README	Wed Jan 20 08:54:35 2016	(r294405)
@@ -51,6 +51,12 @@ BIND 9
 	For up-to-date release notes and errata, see
 	http://www.isc.org/software/bind9/releasenotes
 
+BIND 9.9.8-P3
+
+      BIND 9.9.8-P3 is a security release addressing the flaw described in
+      CVE-2015-8704. It also fixes a serious regression in authoritative
+      server selection that was introduced in 9.9.8.
+
 BIND 9.9.8-P2
 
 	BIND 9.9.8-P2 is a security release addressing the flaws

Modified: stable/9/contrib/bind9/doc/arm/Bv9ARM.ch01.html
==============================================================================
--- stable/9/contrib/bind9/doc/arm/Bv9ARM.ch01.html	Wed Jan 20 08:28:32 2016	(r294404)
+++ stable/9/contrib/bind9/doc/arm/Bv9ARM.ch01.html	Wed Jan 20 08:54:35 2016	(r294405)
@@ -556,6 +556,6 @@
 </tr>
 </table>
 </div>
-<p style="text-align: center;">BIND 9.9.8-P2 (Extended Support Version)</p>
+<p style="text-align: center;">BIND 9.9.8-P3 (Extended Support Version)</p>
 </body>
 </html>

Modified: stable/9/contrib/bind9/doc/arm/Bv9ARM.ch02.html
==============================================================================
--- stable/9/contrib/bind9/doc/arm/Bv9ARM.ch02.html	Wed Jan 20 08:28:32 2016	(r294404)
+++ stable/9/contrib/bind9/doc/arm/Bv9ARM.ch02.html	Wed Jan 20 08:54:35 2016	(r294405)
@@ -154,6 +154,6 @@
 </tr>
 </table>
 </div>
-<p style="text-align: center;">BIND 9.9.8-P2 (Extended Support Version)</p>
+<p style="text-align: center;">BIND 9.9.8-P3 (Extended Support Version)</p>
 </body>
 </html>

Modified: stable/9/contrib/bind9/doc/arm/Bv9ARM.ch03.html
==============================================================================
--- stable/9/contrib/bind9/doc/arm/Bv9ARM.ch03.html	Wed Jan 20 08:28:32 2016	(r294404)
+++ stable/9/contrib/bind9/doc/arm/Bv9ARM.ch03.html	Wed Jan 20 08:54:35 2016	(r294405)
@@ -665,6 +665,6 @@ controls {
 </tr>
 </table>
 </div>
-<p style="text-align: center;">BIND 9.9.8-P2 (Extended Support Version)</p>
+<p style="text-align: center;">BIND 9.9.8-P3 (Extended Support Version)</p>
 </body>
 </html>

Modified: stable/9/contrib/bind9/doc/arm/Bv9ARM.ch04.html
==============================================================================
--- stable/9/contrib/bind9/doc/arm/Bv9ARM.ch04.html	Wed Jan 20 08:28:32 2016	(r294404)
+++ stable/9/contrib/bind9/doc/arm/Bv9ARM.ch04.html	Wed Jan 20 08:54:35 2016	(r294405)
@@ -1935,6 +1935,6 @@ $ORIGIN 0.0.0.0.0.0.0.0.8.b.d.0.1.0.0.2.
 </tr>
 </table>
 </div>
-<p style="text-align: center;">BIND 9.9.8-P2 (Extended Support Version)</p>
+<p style="text-align: center;">BIND 9.9.8-P3 (Extended Support Version)</p>
 </body>
 </html>

Modified: stable/9/contrib/bind9/doc/arm/Bv9ARM.ch05.html
==============================================================================
--- stable/9/contrib/bind9/doc/arm/Bv9ARM.ch05.html	Wed Jan 20 08:28:32 2016	(r294404)
+++ stable/9/contrib/bind9/doc/arm/Bv9ARM.ch05.html	Wed Jan 20 08:54:35 2016	(r294405)
@@ -139,6 +139,6 @@
 </tr>
 </table>
 </div>
-<p style="text-align: center;">BIND 9.9.8-P2 (Extended Support Version)</p>
+<p style="text-align: center;">BIND 9.9.8-P3 (Extended Support Version)</p>
 </body>
 </html>

Modified: stable/9/contrib/bind9/doc/arm/Bv9ARM.ch06.html
==============================================================================
--- stable/9/contrib/bind9/doc/arm/Bv9ARM.ch06.html	Wed Jan 20 08:28:32 2016	(r294404)
+++ stable/9/contrib/bind9/doc/arm/Bv9ARM.ch06.html	Wed Jan 20 08:54:35 2016	(r294405)
@@ -12177,6 +12177,6 @@ HOST-127.EXAMPLE. MX 0 .
 </tr>
 </table>
 </div>
-<p style="text-align: center;">BIND 9.9.8-P2 (Extended Support Version)</p>
+<p style="text-align: center;">BIND 9.9.8-P3 (Extended Support Version)</p>
 </body>
 </html>

Modified: stable/9/contrib/bind9/doc/arm/Bv9ARM.ch07.html
==============================================================================
--- stable/9/contrib/bind9/doc/arm/Bv9ARM.ch07.html	Wed Jan 20 08:28:32 2016	(r294404)
+++ stable/9/contrib/bind9/doc/arm/Bv9ARM.ch07.html	Wed Jan 20 08:54:35 2016	(r294405)
@@ -247,6 +247,6 @@ zone "example.com" {
 </tr>
 </table>
 </div>
-<p style="text-align: center;">BIND 9.9.8-P2 (Extended Support Version)</p>
+<p style="text-align: center;">BIND 9.9.8-P3 (Extended Support Version)</p>
 </body>
 </html>

Modified: stable/9/contrib/bind9/doc/arm/Bv9ARM.ch08.html
==============================================================================
--- stable/9/contrib/bind9/doc/arm/Bv9ARM.ch08.html	Wed Jan 20 08:28:32 2016	(r294404)
+++ stable/9/contrib/bind9/doc/arm/Bv9ARM.ch08.html	Wed Jan 20 08:54:35 2016	(r294405)
@@ -135,6 +135,6 @@
 </tr>
 </table>
 </div>
-<p style="text-align: center;">BIND 9.9.8-P2 (Extended Support Version)</p>
+<p style="text-align: center;">BIND 9.9.8-P3 (Extended Support Version)</p>
 </body>
 </html>

Modified: stable/9/contrib/bind9/doc/arm/Bv9ARM.ch09.html
==============================================================================
--- stable/9/contrib/bind9/doc/arm/Bv9ARM.ch09.html	Wed Jan 20 08:28:32 2016	(r294404)
+++ stable/9/contrib/bind9/doc/arm/Bv9ARM.ch09.html	Wed Jan 20 08:54:35 2016	(r294405)
@@ -45,7 +45,7 @@
 <div class="toc">
 <p><b>Table of Contents</b></p>
 <dl>
-<dt><span class="sect1"><a href="Bv9ARM.ch09.html#id2563593">Release Notes for BIND Version 9.9.8-P2</a></span></dt>
+<dt><span class="sect1"><a href="Bv9ARM.ch09.html#id2563593">Release Notes for BIND Version 9.9.8-P3</a></span></dt>
 <dd><dl>
 <dt><span class="sect2"><a href="Bv9ARM.ch09.html#relnotes_intro">Introduction</a></span></dt>
 <dt><span class="sect2"><a href="Bv9ARM.ch09.html#relnotes_download">Download</a></span></dt>
@@ -60,7 +60,7 @@
 </div>
 <div class="sect1" lang="en">
 <div class="titlepage"><div><div><h2 class="title" style="clear: both">
-<a name="id2563593"></a>Release Notes for BIND Version 9.9.8-P2</h2></div></div></div>
+<a name="id2563593"></a>Release Notes for BIND Version 9.9.8-P3</h2></div></div></div>
 <div class="sect2" lang="en">
 <div class="titlepage"><div><div><h3 class="title">
 <a name="relnotes_intro"></a>Introduction</h3></div></div></div>
@@ -68,6 +68,11 @@
       This document summarizes changes since BIND 9.9.8:
     </p>
 <p>
+      BIND 9.9.8-P3 addresses the security issue described in CVE-2015-8704.
+      It also fixes a serious regression in authoritative server selection
+      that was introduced in 9.9.8.
+    </p>
+<p>
       BIND 9.9.8-P2 addresses security issues described in CVE-2015-3193
       (OpenSSL), CVE-2015-8000 and CVE-2015-8461.
     </p>
@@ -91,13 +96,13 @@
 <a name="relnotes_security"></a>Security Fixes</h3></div></div></div>
 <div class="itemizedlist"><ul type="disc">
 <li><p>
-	  Named is potentially vulnerable to the OpenSSL vulnerabilty
-	  described in CVE-2015-3193.
+	  Specific APL data could trigger an INSIST.  This flaw
+	  was discovered by Brian Mitchell and is disclosed in
+	  CVE-2015-8704. [RT #41396]
 	</p></li>
 <li><p>
-	  Incorrect reference counting could result in an INSIST
-	  failure if a socket error occurred while performing a
-	  lookup.  This flaw is disclosed in CVE-2015-8461. [RT#40945]
+	  Named is potentially vulnerable to the OpenSSL vulnerabilty
+	  described in CVE-2015-3193.
 	</p></li>
 <li><p>
 	  Insufficient testing when parsing a message allowed
@@ -106,6 +111,11 @@
 	  were subsequently cached.  This flaw is disclosed
 	  in CVE-2015-8000. [RT #40987]
 	</p></li>
+<li><p>
+	  Incorrect reference counting could result in an INSIST
+	  failure if a socket error occurred while performing a
+	  lookup.  This flaw is disclosed in CVE-2015-8461. [RT#40945]
+	</p></li>
 </ul></div>
 </div>
 <div class="sect2" lang="en">
@@ -123,7 +133,11 @@
 <div class="sect2" lang="en">
 <div class="titlepage"><div><div><h3 class="title">
 <a name="relnotes_bugs"></a>Bug Fixes</h3></div></div></div>
-<div class="itemizedlist"><ul type="disc"><li><p>None</p></li></ul></div>
+<div class="itemizedlist"><ul type="disc"><li><p>
+	  Authoritative servers that were marked as bogus (e.g. blackholed
+	  in configuration or with invalid addresses) were being queried
+	  anyway. [RT #41321]
+	</p></li></ul></div>
 </div>
 <div class="sect2" lang="en">
 <div class="titlepage"><div><div><h3 class="title">
@@ -163,6 +177,6 @@
 </tr>
 </table>
 </div>
-<p style="text-align: center;">BIND 9.9.8-P2 (Extended Support Version)</p>
+<p style="text-align: center;">BIND 9.9.8-P3 (Extended Support Version)</p>
 </body>
 </html>

Modified: stable/9/contrib/bind9/doc/arm/Bv9ARM.ch10.html
==============================================================================
--- stable/9/contrib/bind9/doc/arm/Bv9ARM.ch10.html	Wed Jan 20 08:28:32 2016	(r294404)
+++ stable/9/contrib/bind9/doc/arm/Bv9ARM.ch10.html	Wed Jan 20 08:54:35 2016	(r294405)
@@ -163,6 +163,6 @@
 </tr>
 </table>
 </div>
-<p style="text-align: center;">BIND 9.9.8-P2 (Extended Support Version)</p>
+<p style="text-align: center;">BIND 9.9.8-P3 (Extended Support Version)</p>
 </body>
 </html>

Modified: stable/9/contrib/bind9/doc/arm/Bv9ARM.ch11.html
==============================================================================
--- stable/9/contrib/bind9/doc/arm/Bv9ARM.ch11.html	Wed Jan 20 08:28:32 2016	(r294404)
+++ stable/9/contrib/bind9/doc/arm/Bv9ARM.ch11.html	Wed Jan 20 08:54:35 2016	(r294405)
@@ -514,6 +514,6 @@
 </tr>
 </table>
 </div>
-<p style="text-align: center;">BIND 9.9.8-P2 (Extended Support Version)</p>
+<p style="text-align: center;">BIND 9.9.8-P3 (Extended Support Version)</p>
 </body>
 </html>

Modified: stable/9/contrib/bind9/doc/arm/Bv9ARM.ch12.html
==============================================================================
--- stable/9/contrib/bind9/doc/arm/Bv9ARM.ch12.html	Wed Jan 20 08:28:32 2016	(r294404)
+++ stable/9/contrib/bind9/doc/arm/Bv9ARM.ch12.html	Wed Jan 20 08:54:35 2016	(r294405)
@@ -47,13 +47,13 @@
 <dl>
 <dt><span class="sect1"><a href="Bv9ARM.ch12.html#bind9.library">BIND 9 DNS Library Support</a></span></dt>
 <dd><dl>
-<dt><span class="sect2"><a href="Bv9ARM.ch12.html#id2612350">Prerequisite</a></span></dt>
-<dt><span class="sect2"><a href="Bv9ARM.ch12.html#id2611541">Compilation</a></span></dt>
-<dt><span class="sect2"><a href="Bv9ARM.ch12.html#id2611565">Installation</a></span></dt>
-<dt><span class="sect2"><a href="Bv9ARM.ch12.html#id2611596">Known Defects/Restrictions</a></span></dt>
-<dt><span class="sect2"><a href="Bv9ARM.ch12.html#id2611673">The dns.conf File</a></span></dt>
-<dt><span class="sect2"><a href="Bv9ARM.ch12.html#id2611700">Sample Applications</a></span></dt>
-<dt><span class="sect2"><a href="Bv9ARM.ch12.html#id2612673">Library References</a></span></dt>
+<dt><span class="sect2"><a href="Bv9ARM.ch12.html#id2611473">Prerequisite</a></span></dt>
+<dt><span class="sect2"><a href="Bv9ARM.ch12.html#id2611482">Compilation</a></span></dt>
+<dt><span class="sect2"><a href="Bv9ARM.ch12.html#id2611507">Installation</a></span></dt>
+<dt><span class="sect2"><a href="Bv9ARM.ch12.html#id2611538">Known Defects/Restrictions</a></span></dt>
+<dt><span class="sect2"><a href="Bv9ARM.ch12.html#id2611614">The dns.conf File</a></span></dt>
+<dt><span class="sect2"><a href="Bv9ARM.ch12.html#id2611641">Sample Applications</a></span></dt>
+<dt><span class="sect2"><a href="Bv9ARM.ch12.html#id2612682">Library References</a></span></dt>
 </dl></dd>
 </dl>
 </div>
@@ -89,7 +89,7 @@
 </ul></div>
 <div class="sect2" lang="en">
 <div class="titlepage"><div><div><h3 class="title">
-<a name="id2612350"></a>Prerequisite</h3></div></div></div>
+<a name="id2611473"></a>Prerequisite</h3></div></div></div>
 <p>GNU make is required to build the export libraries (other
   part of BIND 9 can still be built with other types of make). In
   the reminder of this document, "make" means GNU make. Note that
@@ -98,7 +98,7 @@
 </div>
 <div class="sect2" lang="en">
 <div class="titlepage"><div><div><h3 class="title">
-<a name="id2611541"></a>Compilation</h3></div></div></div>
+<a name="id2611482"></a>Compilation</h3></div></div></div>
 <pre class="screen">
 $ <strong class="userinput"><code>./configure --enable-exportlib <em class="replaceable"><code>[other flags]</code></em></code></strong>
 $ <strong class="userinput"><code>make</code></strong>
@@ -113,7 +113,7 @@ $ <strong class="userinput"><code>make</
 </div>
 <div class="sect2" lang="en">
 <div class="titlepage"><div><div><h3 class="title">
-<a name="id2611565"></a>Installation</h3></div></div></div>
+<a name="id2611507"></a>Installation</h3></div></div></div>
 <pre class="screen">
 $ <strong class="userinput"><code>cd lib/export</code></strong>
 $ <strong class="userinput"><code>make install</code></strong>
@@ -135,7 +135,7 @@ $ <strong class="userinput"><code>make i
 </div>
 <div class="sect2" lang="en">
 <div class="titlepage"><div><div><h3 class="title">
-<a name="id2611596"></a>Known Defects/Restrictions</h3></div></div></div>
+<a name="id2611538"></a>Known Defects/Restrictions</h3></div></div></div>
 <div class="itemizedlist"><ul type="disc">
 <li><p>Currently, win32 is not supported for the export
       library. (Normal BIND 9 application can be built as
@@ -175,7 +175,7 @@ $ <strong class="userinput"><code>make</
 </div>
 <div class="sect2" lang="en">
 <div class="titlepage"><div><div><h3 class="title">
-<a name="id2611673"></a>The dns.conf File</h3></div></div></div>
+<a name="id2611614"></a>The dns.conf File</h3></div></div></div>
 <p>The IRS library supports an "advanced" configuration file
   related to the DNS library for configuration parameters that
   would be beyond the capability of the
@@ -193,14 +193,14 @@ $ <strong class="userinput"><code>make</
 </div>
 <div class="sect2" lang="en">
 <div class="titlepage"><div><div><h3 class="title">
-<a name="id2611700"></a>Sample Applications</h3></div></div></div>
+<a name="id2611641"></a>Sample Applications</h3></div></div></div>
 <p>Some sample application programs using this API are
   provided for reference. The following is a brief description of
   these applications.
   </p>
 <div class="sect3" lang="en">
 <div class="titlepage"><div><div><h4 class="title">
-<a name="id2611708"></a>sample: a simple stub resolver utility</h4></div></div></div>
+<a name="id2611650"></a>sample: a simple stub resolver utility</h4></div></div></div>
 <p>
   It sends a query of a given name (of a given optional RR type) to a
   specified recursive server, and prints the result as a list of
@@ -264,7 +264,7 @@ $ <strong class="userinput"><code>make</
 </div>
 <div class="sect3" lang="en">
 <div class="titlepage"><div><div><h4 class="title">
-<a name="id2611867"></a>sample-async: a simple stub resolver, working asynchronously</h4></div></div></div>
+<a name="id2611877"></a>sample-async: a simple stub resolver, working asynchronously</h4></div></div></div>
 <p>
   Similar to "sample", but accepts a list
   of (query) domain names as a separate file and resolves the names
@@ -305,7 +305,7 @@ $ <strong class="userinput"><code>make</
 </div>
 <div class="sect3" lang="en">
 <div class="titlepage"><div><div><h4 class="title">
-<a name="id2611921"></a>sample-request: a simple DNS transaction client</h4></div></div></div>
+<a name="id2611930"></a>sample-request: a simple DNS transaction client</h4></div></div></div>
 <p>
   It sends a query to a specified server, and
   prints the response with minimal processing. It doesn't act as a
@@ -346,7 +346,7 @@ $ <strong class="userinput"><code>make</
 </div>
 <div class="sect3" lang="en">
 <div class="titlepage"><div><div><h4 class="title">
-<a name="id2611985"></a>sample-gai: getaddrinfo() and getnameinfo() test code</h4></div></div></div>
+<a name="id2611994"></a>sample-gai: getaddrinfo() and getnameinfo() test code</h4></div></div></div>
 <p>
   This is a test program
   to check getaddrinfo() and getnameinfo() behavior. It takes a
@@ -363,7 +363,7 @@ $ <strong class="userinput"><code>make</
 </div>
 <div class="sect3" lang="en">
 <div class="titlepage"><div><div><h4 class="title">
-<a name="id2612000"></a>sample-update: a simple dynamic update client program</h4></div></div></div>
+<a name="id2612009"></a>sample-update: a simple dynamic update client program</h4></div></div></div>
 <p>
   It accepts a single update command as a
   command-line argument, sends an update request message to the
@@ -458,7 +458,7 @@ $ <strong class="userinput"><code>sample
 </div>
 <div class="sect3" lang="en">
 <div class="titlepage"><div><div><h4 class="title">
-<a name="id2612131"></a>nsprobe: domain/name server checker in terms of RFC 4074</h4></div></div></div>
+<a name="id2612140"></a>nsprobe: domain/name server checker in terms of RFC 4074</h4></div></div></div>
 <p>
   It checks a set
   of domains to see the name servers of the domains behave
@@ -515,7 +515,7 @@ $ <strong class="userinput"><code>sample
 </div>
 <div class="sect2" lang="en">
 <div class="titlepage"><div><div><h3 class="title">
-<a name="id2612673"></a>Library References</h3></div></div></div>
+<a name="id2612682"></a>Library References</h3></div></div></div>
 <p>As of this writing, there is no formal "manual" of the
   libraries, except this document, header files (some of them
   provide pretty detailed explanations), and sample application
@@ -540,6 +540,6 @@ $ <strong class="userinput"><code>sample
 </tr>
 </table>
 </div>
-<p style="text-align: center;">BIND 9.9.8-P2 (Extended Support Version)</p>
+<p style="text-align: center;">BIND 9.9.8-P3 (Extended Support Version)</p>
 </body>
 </html>

Modified: stable/9/contrib/bind9/doc/arm/Bv9ARM.ch13.html
==============================================================================
--- stable/9/contrib/bind9/doc/arm/Bv9ARM.ch13.html	Wed Jan 20 08:28:32 2016	(r294404)
+++ stable/9/contrib/bind9/doc/arm/Bv9ARM.ch13.html	Wed Jan 20 08:54:35 2016	(r294405)
@@ -140,6 +140,6 @@
 </tr>
 </table>
 </div>
-<p style="text-align: center;">BIND 9.9.8-P2 (Extended Support Version)</p>
+<p style="text-align: center;">BIND 9.9.8-P3 (Extended Support Version)</p>
 </body>
 </html>

Modified: stable/9/contrib/bind9/doc/arm/Bv9ARM.html
==============================================================================
--- stable/9/contrib/bind9/doc/arm/Bv9ARM.html	Wed Jan 20 08:28:32 2016	(r294404)
+++ stable/9/contrib/bind9/doc/arm/Bv9ARM.html	Wed Jan 20 08:54:35 2016	(r294405)
@@ -41,7 +41,7 @@
 <div>
 <div><h1 class="title">
 <a name="id2563180"></a>BIND 9 Administrator Reference Manual</h1></div>
-<div><p class="releaseinfo">BIND Version 9.9.8-P2</p></div>
+<div><p class="releaseinfo">BIND Version 9.9.8-P3</p></div>
 <div><p class="copyright">Copyright © 2004-2015 Internet Systems Consortium, Inc. ("ISC")</p></div>
 <div><p class="copyright">Copyright © 2000-2003 Internet Software Consortium.</p></div>
 </div>
@@ -234,7 +234,7 @@
 </dl></dd>
 <dt><span class="appendix"><a href="Bv9ARM.ch09.html">A. Release Notes</a></span></dt>
 <dd><dl>
-<dt><span class="sect1"><a href="Bv9ARM.ch09.html#id2563593">Release Notes for BIND Version 9.9.8-P2</a></span></dt>
+<dt><span class="sect1"><a href="Bv9ARM.ch09.html#id2563593">Release Notes for BIND Version 9.9.8-P3</a></span></dt>
 <dd><dl>
 <dt><span class="sect2"><a href="Bv9ARM.ch09.html#relnotes_intro">Introduction</a></span></dt>
 <dt><span class="sect2"><a href="Bv9ARM.ch09.html#relnotes_download">Download</a></span></dt>
@@ -262,13 +262,13 @@
 <dd><dl>
 <dt><span class="sect1"><a href="Bv9ARM.ch12.html#bind9.library">BIND 9 DNS Library Support</a></span></dt>
 <dd><dl>
-<dt><span class="sect2"><a href="Bv9ARM.ch12.html#id2612350">Prerequisite</a></span></dt>
-<dt><span class="sect2"><a href="Bv9ARM.ch12.html#id2611541">Compilation</a></span></dt>
-<dt><span class="sect2"><a href="Bv9ARM.ch12.html#id2611565">Installation</a></span></dt>
-<dt><span class="sect2"><a href="Bv9ARM.ch12.html#id2611596">Known Defects/Restrictions</a></span></dt>
-<dt><span class="sect2"><a href="Bv9ARM.ch12.html#id2611673">The dns.conf File</a></span></dt>
-<dt><span class="sect2"><a href="Bv9ARM.ch12.html#id2611700">Sample Applications</a></span></dt>
-<dt><span class="sect2"><a href="Bv9ARM.ch12.html#id2612673">Library References</a></span></dt>
+<dt><span class="sect2"><a href="Bv9ARM.ch12.html#id2611473">Prerequisite</a></span></dt>
+<dt><span class="sect2"><a href="Bv9ARM.ch12.html#id2611482">Compilation</a></span></dt>
+<dt><span class="sect2"><a href="Bv9ARM.ch12.html#id2611507">Installation</a></span></dt>
+<dt><span class="sect2"><a href="Bv9ARM.ch12.html#id2611538">Known Defects/Restrictions</a></span></dt>
+<dt><span class="sect2"><a href="Bv9ARM.ch12.html#id2611614">The dns.conf File</a></span></dt>
+<dt><span class="sect2"><a href="Bv9ARM.ch12.html#id2611641">Sample Applications</a></span></dt>
+<dt><span class="sect2"><a href="Bv9ARM.ch12.html#id2612682">Library References</a></span></dt>
 </dl></dd>
 </dl></dd>
 <dt><span class="reference"><a href="Bv9ARM.ch13.html">I. Manual pages</a></span></dt>
@@ -365,6 +365,6 @@
 </tr>
 </table>
 </div>
-<p style="text-align: center;">BIND 9.9.8-P2 (Extended Support Version)</p>
+<p style="text-align: center;">BIND 9.9.8-P3 (Extended Support Version)</p>
 </body>
 </html>

Modified: stable/9/contrib/bind9/doc/arm/Bv9ARM.pdf
==============================================================================
Binary file (source and/or target). No diff available.

Modified: stable/9/contrib/bind9/doc/arm/man.arpaname.html
==============================================================================
--- stable/9/contrib/bind9/doc/arm/man.arpaname.html	Wed Jan 20 08:28:32 2016	(r294404)
+++ stable/9/contrib/bind9/doc/arm/man.arpaname.html	Wed Jan 20 08:54:35 2016	(r294405)
@@ -50,20 +50,20 @@
 <div class="cmdsynopsis"><p><code class="command">arpaname</code>  {<em class="replaceable"><code>ipaddress </code></em>...}</p></div>
 </div>
 <div class="refsect1" lang="en">
-<a name="id2621516"></a><h2>DESCRIPTION</h2>
+<a name="id2621321"></a><h2>DESCRIPTION</h2>
 <p>
       <span><strong class="command">arpaname</strong></span> translates IP addresses (IPv4 and
       IPv6) to the corresponding IN-ADDR.ARPA or IP6.ARPA names.
     </p>
 </div>
 <div class="refsect1" lang="en">
-<a name="id2621531"></a><h2>SEE ALSO</h2>
+<a name="id2621336"></a><h2>SEE ALSO</h2>
 <p>
       <em class="citetitle">BIND 9 Administrator Reference Manual</em>.
     </p>
 </div>
 <div class="refsect1" lang="en">
-<a name="id2621545"></a><h2>AUTHOR</h2>
+<a name="id2621350"></a><h2>AUTHOR</h2>
 <p><span class="corpauthor">Internet Systems Consortium</span>
     </p>
 </div>
@@ -87,6 +87,6 @@
 </tr>
 </table>
 </div>
-<p style="text-align: center;">BIND 9.9.8-P2 (Extended Support Version)</p>
+<p style="text-align: center;">BIND 9.9.8-P3 (Extended Support Version)</p>
 </body>
 </html>

Modified: stable/9/contrib/bind9/doc/arm/man.ddns-confgen.html
==============================================================================
--- stable/9/contrib/bind9/doc/arm/man.ddns-confgen.html	Wed Jan 20 08:28:32 2016	(r294404)
+++ stable/9/contrib/bind9/doc/arm/man.ddns-confgen.html	Wed Jan 20 08:54:35 2016	(r294405)
@@ -50,7 +50,7 @@
 <div class="cmdsynopsis"><p><code class="command">ddns-confgen</code>  [<code class="option">-a <em class="replaceable"><code>algorithm</code></em></code>] [<code class="option">-h</code>] [<code class="option">-k <em class="replaceable"><code>keyname</code></em></code>] [<code class="option">-r <em class="replaceable"><code>randomfile</code></em></code>] [ -s <em class="replaceable"><code>name</code></em>  |   -z <em class="replaceable"><code>zone</code></em> ] [<code class="option">-q</code>] [name]</p></div>
 </div>
 <div class="refsect1" lang="en">
-<a name="id2656558"></a><h2>DESCRIPTION</h2>
+<a name="id2656978"></a><h2>DESCRIPTION</h2>
 <p><span><strong class="command">ddns-confgen</strong></span>
       generates a key for use by <span><strong class="command">nsupdate</strong></span>
       and <span><strong class="command">named</strong></span>.  It simplifies configuration
@@ -77,7 +77,7 @@
     </p>
 </div>
 <div class="refsect1" lang="en">
-<a name="id2656646"></a><h2>OPTIONS</h2>
+<a name="id2657065"></a><h2>OPTIONS</h2>
 <div class="variablelist"><dl>
 <dt><span class="term">-a <em class="replaceable"><code>algorithm</code></em></span></dt>
 <dd><p>
@@ -144,7 +144,7 @@
 </dl></div>
 </div>
 <div class="refsect1" lang="en">
-<a name="id2656915"></a><h2>SEE ALSO</h2>
+<a name="id2658699"></a><h2>SEE ALSO</h2>
 <p><span class="citerefentry"><span class="refentrytitle">nsupdate</span>(1)</span>,
       <span class="citerefentry"><span class="refentrytitle">named.conf</span>(5)</span>,
       <span class="citerefentry"><span class="refentrytitle">named</span>(8)</span>,
@@ -152,7 +152,7 @@
     </p>
 </div>
 <div class="refsect1" lang="en">
-<a name="id2656953"></a><h2>AUTHOR</h2>
+<a name="id2658738"></a><h2>AUTHOR</h2>
 <p><span class="corpauthor">Internet Systems Consortium</span>
     </p>
 </div>
@@ -176,6 +176,6 @@
 </tr>
 </table>
 </div>
-<p style="text-align: center;">BIND 9.9.8-P2 (Extended Support Version)</p>
+<p style="text-align: center;">BIND 9.9.8-P3 (Extended Support Version)</p>
 </body>
 </html>

Modified: stable/9/contrib/bind9/doc/arm/man.dig.html
==============================================================================
--- stable/9/contrib/bind9/doc/arm/man.dig.html	Wed Jan 20 08:28:32 2016	(r294404)
+++ stable/9/contrib/bind9/doc/arm/man.dig.html	Wed Jan 20 08:54:35 2016	(r294405)
@@ -52,7 +52,7 @@
 <div class="cmdsynopsis"><p><code class="command">dig</code>  [global-queryopt...] [query...]</p></div>
 </div>
 <div class="refsect1" lang="en">
-<a name="id2612595"></a><h2>DESCRIPTION</h2>
+<a name="id2612604"></a><h2>DESCRIPTION</h2>
 <p><span><strong class="command">dig</strong></span>
       (domain information groper) is a flexible tool
       for interrogating DNS name servers.  It performs DNS lookups and
@@ -99,7 +99,7 @@
     </p>
 </div>
 <div class="refsect1" lang="en">
-<a name="id2612834"></a><h2>SIMPLE USAGE</h2>
+<a name="id2612843"></a><h2>SIMPLE USAGE</h2>
 <p>
       A typical invocation of <span><strong class="command">dig</strong></span> looks like:
       </p>
@@ -152,7 +152,7 @@
     </p>
 </div>
 <div class="refsect1" lang="en">
-<a name="id2613164"></a><h2>OPTIONS</h2>
+<a name="id2613174"></a><h2>OPTIONS</h2>
 <div class="variablelist"><dl>
 <dt><span class="term">-4</span></dt>
 <dd><p>
@@ -280,7 +280,7 @@
 </dl></div>
 </div>
 <div class="refsect1" lang="en">
-<a name="id2665699"></a><h2>QUERY OPTIONS</h2>
+<a name="id2665777"></a><h2>QUERY OPTIONS</h2>
 <p><span><strong class="command">dig</strong></span>
       provides a number of query options which affect
       the way in which lookups are made and the results displayed.  Some of
@@ -649,7 +649,7 @@
     </p>
 </div>
 <div class="refsect1" lang="en">
-<a name="id2666846"></a><h2>MULTIPLE QUERIES</h2>
+<a name="id2666856"></a><h2>MULTIPLE QUERIES</h2>
 <p>
       The BIND 9 implementation of <span><strong class="command">dig </strong></span>
       supports
@@ -695,7 +695,7 @@ dig +qr www.isc.org any -x 127.0.0.1 isc
     </p>
 </div>
 <div class="refsect1" lang="en">
-<a name="id2667000"></a><h2>IDN SUPPORT</h2>
+<a name="id2667010"></a><h2>IDN SUPPORT</h2>
 <p>
       If <span><strong class="command">dig</strong></span> has been built with IDN (internationalized
       domain name) support, it can accept and display non-ASCII domain names.
@@ -709,14 +709,14 @@ dig +qr www.isc.org any -x 127.0.0.1 isc
     </p>
 </div>
 <div class="refsect1" lang="en">
-<a name="id2667029"></a><h2>FILES</h2>
+<a name="id2667038"></a><h2>FILES</h2>
 <p><code class="filename">/etc/resolv.conf</code>
     </p>
 <p><code class="filename">${HOME}/.digrc</code>
     </p>
 </div>
 <div class="refsect1" lang="en">
-<a name="id2667118"></a><h2>SEE ALSO</h2>
+<a name="id2667128"></a><h2>SEE ALSO</h2>
 <p><span class="citerefentry"><span class="refentrytitle">host</span>(1)</span>,
       <span class="citerefentry"><span class="refentrytitle">named</span>(8)</span>,
       <span class="citerefentry"><span class="refentrytitle">dnssec-keygen</span>(8)</span>,
@@ -724,7 +724,7 @@ dig +qr www.isc.org any -x 127.0.0.1 isc
     </p>
 </div>
 <div class="refsect1" lang="en">
-<a name="id2667156"></a><h2>BUGS</h2>
+<a name="id2667165"></a><h2>BUGS</h2>
 <p>
       There are probably too many query options.
     </p>
@@ -747,6 +747,6 @@ dig +qr www.isc.org any -x 127.0.0.1 isc
 </tr>
 </table>
 </div>
-<p style="text-align: center;">BIND 9.9.8-P2 (Extended Support Version)</p>
+<p style="text-align: center;">BIND 9.9.8-P3 (Extended Support Version)</p>
 </body>
 </html>

Modified: stable/9/contrib/bind9/doc/arm/man.dnssec-checkds.html
==============================================================================
--- stable/9/contrib/bind9/doc/arm/man.dnssec-checkds.html	Wed Jan 20 08:28:32 2016	(r294404)
+++ stable/9/contrib/bind9/doc/arm/man.dnssec-checkds.html	Wed Jan 20 08:54:35 2016	(r294405)
@@ -51,7 +51,7 @@
 <div class="cmdsynopsis"><p><code class="command">dnssec-dsfromkey</code>  [<code class="option">-l <em class="replaceable"><code>domain</code></em></code>] [<code class="option">-f <em class="replaceable"><code>file</code></em></code>] [<code class="option">-d <em class="replaceable"><code>dig path</code></em></code>] [<code class="option">-D <em class="replaceable"><code>dsfromkey path</code></em></code>] {zone}</p></div>
 </div>
 <div class="refsect1" lang="en">
-<a name="id2614266"></a><h2>DESCRIPTION</h2>
+<a name="id2614344"></a><h2>DESCRIPTION</h2>
 <p><span><strong class="command">dnssec-checkds</strong></span>
       verifies the correctness of Delegation Signer (DS) or DNSSEC
       Lookaside Validation (DLV) resource records for keys in a specified
@@ -59,7 +59,7 @@
     </p>
 </div>
 <div class="refsect1" lang="en">
-<a name="id2614280"></a><h2>OPTIONS</h2>
+<a name="id2614358"></a><h2>OPTIONS</h2>
 <div class="variablelist"><dl>
 <dt><span class="term">-f <em class="replaceable"><code>file</code></em></span></dt>
 <dd><p>
@@ -88,14 +88,14 @@
 </dl></div>
 </div>
 <div class="refsect1" lang="en">
-<a name="id2614382"></a><h2>SEE ALSO</h2>
+<a name="id2614460"></a><h2>SEE ALSO</h2>
 <p><span class="citerefentry"><span class="refentrytitle">dnssec-dsfromkey</span>(8)</span>,
       <span class="citerefentry"><span class="refentrytitle">dnssec-keygen</span>(8)</span>,
       <span class="citerefentry"><span class="refentrytitle">dnssec-signzone</span>(8)</span>,
     </p>
 </div>
 <div class="refsect1" lang="en">
-<a name="id2614417"></a><h2>AUTHOR</h2>
+<a name="id2614494"></a><h2>AUTHOR</h2>
 <p><span class="corpauthor">Internet Systems Consortium</span>
     </p>
 </div>
@@ -118,6 +118,6 @@
 </tr>
 </table>
 </div>
-<p style="text-align: center;">BIND 9.9.8-P2 (Extended Support Version)</p>
+<p style="text-align: center;">BIND 9.9.8-P3 (Extended Support Version)</p>
 </body>
 </html>

Modified: stable/9/contrib/bind9/doc/arm/man.dnssec-coverage.html
==============================================================================
--- stable/9/contrib/bind9/doc/arm/man.dnssec-coverage.html	Wed Jan 20 08:28:32 2016	(r294404)
+++ stable/9/contrib/bind9/doc/arm/man.dnssec-coverage.html	Wed Jan 20 08:54:35 2016	(r294405)
@@ -50,7 +50,7 @@
 <div class="cmdsynopsis"><p><code class="command">dnssec-coverage</code>  [<code class="option">-K <em class="replaceable"><code>directory</code></em></code>] [<code class="option">-f <em class="replaceable"><code>file</code></em></code>] [<code class="option">-d <em class="replaceable"><code>DNSKEY TTL</code></em></code>] [<code class="option">-m <em class="replaceable"><code>max TTL</code></em></code>] [<code class="option">-r <em class="replaceable"><code>interval</code></em></code>] [<code class="option">-c <em class="replaceable"><code>compilezone path</code></em></code>] [zone]</p></div>
 </div>
 <div class="refsect1" lang="en">
-<a name="id2614782"></a><h2>DESCRIPTION</h2>
+<a name="id2614656"></a><h2>DESCRIPTION</h2>
 <p><span><strong class="command">dnssec-coverage</strong></span>
       verifies that the DNSSEC keys for a given zone or a set of zones
       have timing metadata set properly to ensure no future lapses in DNSSEC
@@ -78,7 +78,7 @@
     </p>
 </div>
 <div class="refsect1" lang="en">
-<a name="id2614809"></a><h2>OPTIONS</h2>
+<a name="id2614750"></a><h2>OPTIONS</h2>
 <div class="variablelist"><dl>
 <dt><span class="term">-f <em class="replaceable"><code>file</code></em></span></dt>
 <dd><p>
@@ -168,7 +168,7 @@
 </dl></div>
 </div>
 <div class="refsect1" lang="en">
-<a name="id2615879"></a><h2>SEE ALSO</h2>
+<a name="id2615479"></a><h2>SEE ALSO</h2>
 <p>
       <span class="citerefentry"><span class="refentrytitle">dnssec-checkds</span>(8)</span>,
       <span class="citerefentry"><span class="refentrytitle">dnssec-dsfromkey</span>(8)</span>,
@@ -177,7 +177,7 @@
     </p>
 </div>
 <div class="refsect1" lang="en">
-<a name="id2616264"></a><h2>AUTHOR</h2>
+<a name="id2615523"></a><h2>AUTHOR</h2>
 <p><span class="corpauthor">Internet Systems Consortium</span>
     </p>
 </div>
@@ -201,6 +201,6 @@
 </tr>
 </table>
 </div>
-<p style="text-align: center;">BIND 9.9.8-P2 (Extended Support Version)</p>
+<p style="text-align: center;">BIND 9.9.8-P3 (Extended Support Version)</p>
 </body>
 </html>

Modified: stable/9/contrib/bind9/doc/arm/man.dnssec-dsfromkey.html
==============================================================================
--- stable/9/contrib/bind9/doc/arm/man.dnssec-dsfromkey.html	Wed Jan 20 08:28:32 2016	(r294404)
+++ stable/9/contrib/bind9/doc/arm/man.dnssec-dsfromkey.html	Wed Jan 20 08:54:35 2016	(r294405)
@@ -52,14 +52,14 @@
 <div class="cmdsynopsis"><p><code class="command">dnssec-dsfromkey</code>  [<code class="option">-h</code>] [<code class="option">-V</code>]</p></div>
 </div>
 <div class="refsect1" lang="en">
-<a name="id2616576"></a><h2>DESCRIPTION</h2>
+<a name="id2616176"></a><h2>DESCRIPTION</h2>
 <p><span><strong class="command">dnssec-dsfromkey</strong></span>
       outputs the Delegation Signer (DS) resource record (RR), as defined in
       RFC 3658 and RFC 4509, for the given key(s).
     </p>
 </div>
 <div class="refsect1" lang="en">
-<a name="id2616589"></a><h2>OPTIONS</h2>
+<a name="id2616189"></a><h2>OPTIONS</h2>
 <div class="variablelist"><dl>
 <dt><span class="term">-1</span></dt>
 <dd><p>
@@ -150,7 +150,7 @@
 </dl></div>
 </div>
 <div class="refsect1" lang="en">
-<a name="id2617274"></a><h2>EXAMPLE</h2>
+<a name="id2616874"></a><h2>EXAMPLE</h2>
 <p>
       To build the SHA-256 DS RR from the
       <strong class="userinput"><code>Kexample.com.+003+26160</code></strong>
@@ -165,7 +165,7 @@
     </p>
 </div>
 <div class="refsect1" lang="en">
-<a name="id2617310"></a><h2>FILES</h2>
+<a name="id2616910"></a><h2>FILES</h2>
 <p>
       The keyfile can be designed by the key identification
       <code class="filename">Knnnn.+aaa+iiiii</code> or the full file name
@@ -179,13 +179,13 @@
     </p>
 </div>
 <div class="refsect1" lang="en">
-<a name="id2618649"></a><h2>CAVEAT</h2>
+<a name="id2618590"></a><h2>CAVEAT</h2>
 <p>
       A keyfile error can give a "file not found" even if the file exists.
     </p>
 </div>
 <div class="refsect1" lang="en">
-<a name="id2618659"></a><h2>SEE ALSO</h2>
+<a name="id2618600"></a><h2>SEE ALSO</h2>
 <p><span class="citerefentry"><span class="refentrytitle">dnssec-keygen</span>(8)</span>,
       <span class="citerefentry"><span class="refentrytitle">dnssec-signzone</span>(8)</span>,
       <em class="citetitle">BIND 9 Administrator Reference Manual</em>,
@@ -195,7 +195,7 @@
     </p>
 </div>
 <div class="refsect1" lang="en">
-<a name="id2618698"></a><h2>AUTHOR</h2>
+<a name="id2618640"></a><h2>AUTHOR</h2>
 <p><span class="corpauthor">Internet Systems Consortium</span>
     </p>
 </div>
@@ -219,6 +219,6 @@
 </tr>
 </table>
 </div>
-<p style="text-align: center;">BIND 9.9.8-P2 (Extended Support Version)</p>
+<p style="text-align: center;">BIND 9.9.8-P3 (Extended Support Version)</p>
 </body>
 </html>

Modified: stable/9/contrib/bind9/doc/arm/man.dnssec-keyfromlabel.html
==============================================================================
--- stable/9/contrib/bind9/doc/arm/man.dnssec-keyfromlabel.html	Wed Jan 20 08:28:32 2016	(r294404)
+++ stable/9/contrib/bind9/doc/arm/man.dnssec-keyfromlabel.html	Wed Jan 20 08:54:35 2016	(r294405)
@@ -50,7 +50,7 @@
 <div class="cmdsynopsis"><p><code class="command">dnssec-keyfromlabel</code>  {-l <em class="replaceable"><code>label</code></em>} [<code class="option">-3</code>] [<code class="option">-a <em class="replaceable"><code>algorithm</code></em></code>] [<code class="option">-A <em class="replaceable"><code>date/offset</code></em></code>] [<code class="option">-c <em class="replaceable"><code>class</code></em></code>] [<code class="option">-D <em class="replaceable"><code>date/offset</code></em></code>] [<code class="option">-E <em class="replaceable"><code>engine</code></em></code>] [<code class="option">-f <em class="replaceable"><code>flag</code></em></code>] [<code class="option">-G</code>] [<code class="option">-I <em class="replaceable"><code>date/offset</code></em></code>] [<code class="option">-i <em class="replaceable"><code>interval</code></em></code>] [<code class="option">-k</code>] [<code class="option">-K <em class="replaceable"><code>directory</code></em></code>] [<code cl
 ass="option">-L <em class="replaceable"><code>ttl</code></em></code>] [<code class="option">-n <em class="replaceable"><code>nametype</code></em></code>] [<code class="option">-P <em class="replaceable"><code>date/offset</code></em></code>] [<code class="option">-p <em class="replaceable"><code>protocol</code></em></code>] [<code class="option">-R <em class="replaceable"><code>date/offset</code></em></code>] [<code class="option">-S <em class="replaceable"><code>key</code></em></code>] [<code class="option">-t <em class="replaceable"><code>type</code></em></code>] [<code class="option">-v <em class="replaceable"><code>level</code></em></code>] [<code class="option">-V</code>] [<code class="option">-y</code>] {name}</p></div>
 </div>
 <div class="refsect1" lang="en">
-<a name="id2617877"></a><h2>DESCRIPTION</h2>
+<a name="id2617545"></a><h2>DESCRIPTION</h2>
 <p><span><strong class="command">dnssec-keyfromlabel</strong></span>
       generates a key pair of files that referencing a key object stored
       in a cryptographic hardware service module (HSM).  The private key
@@ -66,7 +66,7 @@
     </p>
 </div>
 <div class="refsect1" lang="en">
-<a name="id2617902"></a><h2>OPTIONS</h2>
+<a name="id2617571"></a><h2>OPTIONS</h2>
 <div class="variablelist"><dl>
 <dt><span class="term">-a <em class="replaceable"><code>algorithm</code></em></span></dt>
 <dd>
@@ -209,7 +209,7 @@
 </dl></div>
 </div>
 <div class="refsect1" lang="en">
-<a name="id2620377"></a><h2>TIMING OPTIONS</h2>
+<a name="id2620182"></a><h2>TIMING OPTIONS</h2>
 <p>
       Dates can be expressed in the format YYYYMMDD or YYYYMMDDHHMMSS.
       If the argument begins with a '+' or '-', it is interpreted as
@@ -281,7 +281,7 @@
 </dl></div>
 </div>
 <div class="refsect1" lang="en">
-<a name="id2670948"></a><h2>GENERATED KEY FILES</h2>
+<a name="id2670957"></a><h2>GENERATED KEY FILES</h2>
 <p>
       When <span><strong class="command">dnssec-keyfromlabel</strong></span> completes
       successfully,
@@ -320,7 +320,7 @@
     </p>
 </div>
 <div class="refsect1" lang="en">
-<a name="id2671110"></a><h2>SEE ALSO</h2>
+<a name="id2671120"></a><h2>SEE ALSO</h2>
 <p><span class="citerefentry"><span class="refentrytitle">dnssec-keygen</span>(8)</span>,
       <span class="citerefentry"><span class="refentrytitle">dnssec-signzone</span>(8)</span>,
       <em class="citetitle">BIND 9 Administrator Reference Manual</em>,
@@ -328,7 +328,7 @@
     </p>
 </div>
 <div class="refsect1" lang="en">
-<a name="id2671143"></a><h2>AUTHOR</h2>
+<a name="id2671153"></a><h2>AUTHOR</h2>
 <p><span class="corpauthor">Internet Systems Consortium</span>
     </p>
 </div>
@@ -352,6 +352,6 @@
 </tr>
 </table>
 </div>
-<p style="text-align: center;">BIND 9.9.8-P2 (Extended Support Version)</p>
+<p style="text-align: center;">BIND 9.9.8-P3 (Extended Support Version)</p>
 </body>
 </html>

Modified: stable/9/contrib/bind9/doc/arm/man.dnssec-keygen.html
==============================================================================
--- stable/9/contrib/bind9/doc/arm/man.dnssec-keygen.html	Wed Jan 20 08:28:32 2016	(r294404)
+++ stable/9/contrib/bind9/doc/arm/man.dnssec-keygen.html	Wed Jan 20 08:54:35 2016	(r294405)
@@ -50,7 +50,7 @@
 <div class="cmdsynopsis"><p><code class="command">dnssec-keygen</code>  [<code class="option">-a <em class="replaceable"><code>algorithm</code></em></code>] [<code class="option">-b <em class="replaceable"><code>keysize</code></em></code>] [<code class="option">-n <em class="replaceable"><code>nametype</code></em></code>] [<code class="option">-3</code>] [<code class="option">-A <em class="replaceable"><code>date/offset</code></em></code>] [<code class="option">-C</code>] [<code class="option">-c <em class="replaceable"><code>class</code></em></code>] [<code class="option">-D <em class="replaceable"><code>date/offset</code></em></code>] [<code class="option">-E <em class="replaceable"><code>engine</code></em></code>] [<code class="option">-f <em class="replaceable"><code>flag</code></em></code>] [<code class="option">-G</code>] [<code class="option">-g <em class="replaceable"><code>generator</code></em></code>] [<code class="option">-h</code>] [<code class="option">-I <em class="rep
 laceable"><code>date/offset</code></em></code>] [<code class="option">-i <em class="replaceable"><code>interval</code></em></code>] [<code class="option">-K <em class="replaceable"><code>directory</code></em></code>] [<code class="option">-L <em class="replaceable"><code>ttl</code></em></code>] [<code class="option">-k</code>] [<code class="option">-P <em class="replaceable"><code>date/offset</code></em></code>] [<code class="option">-p <em class="replaceable"><code>protocol</code></em></code>] [<code class="option">-q</code>] [<code class="option">-R <em class="replaceable"><code>date/offset</code></em></code>] [<code class="option">-r <em class="replaceable"><code>randomdev</code></em></code>] [<code class="option">-S <em class="replaceable"><code>key</code></em></code>] [<code class="option">-s <em class="replaceable"><code>strength</code></em></code>] [<code class="option">-t <em class="replaceable"><code>type</code></em></code>] [<code class="option">-v <em class="replaceable">
 <code>level</code></em></code>] [<code class!
 ="option">-V</code>] [<code class="option">-z</code>] {name}</p></div>
 </div>
 <div class="refsect1" lang="en">
-<a name="id2618924"></a><h2>DESCRIPTION</h2>
+<a name="id2618866"></a><h2>DESCRIPTION</h2>
 <p><span><strong class="command">dnssec-keygen</strong></span>
       generates keys for DNSSEC (Secure DNS), as defined in RFC 2535
       and RFC 4034.  It can also generate keys for use with
@@ -64,7 +64,7 @@
     </p>
 </div>
 <div class="refsect1" lang="en">
-<a name="id2618945"></a><h2>OPTIONS</h2>
+<a name="id2618886"></a><h2>OPTIONS</h2>
 <div class="variablelist"><dl>
 <dt><span class="term">-a <em class="replaceable"><code>algorithm</code></em></span></dt>
 <dd>
@@ -280,7 +280,7 @@
 </dl></div>
 </div>
 <div class="refsect1" lang="en">
-<a name="id2671645"></a><h2>TIMING OPTIONS</h2>
+<a name="id2671655"></a><h2>TIMING OPTIONS</h2>
 <p>
       Dates can be expressed in the format YYYYMMDD or YYYYMMDDHHMMSS.
       If the argument begins with a '+' or '-', it is interpreted as
@@ -354,7 +354,7 @@
 </dl></div>
 </div>
 <div class="refsect1" lang="en">
-<a name="id2671835"></a><h2>GENERATED KEYS</h2>
+<a name="id2671845"></a><h2>GENERATED KEYS</h2>
 <p>
       When <span><strong class="command">dnssec-keygen</strong></span> completes
       successfully,
@@ -400,7 +400,7 @@
     </p>
 </div>
 <div class="refsect1" lang="en">
-<a name="id2672080"></a><h2>EXAMPLE</h2>
+<a name="id2672089"></a><h2>EXAMPLE</h2>
 <p>
       To generate a 768-bit DSA key for the domain
       <strong class="userinput"><code>example.com</code></strong>, the following command would be
@@ -421,7 +421,7 @@
     </p>
 </div>
 <div class="refsect1" lang="en">
-<a name="id2672136"></a><h2>SEE ALSO</h2>
+<a name="id2672146"></a><h2>SEE ALSO</h2>
 <p><span class="citerefentry"><span class="refentrytitle">dnssec-signzone</span>(8)</span>,
       <em class="citetitle">BIND 9 Administrator Reference Manual</em>,
       <em class="citetitle">RFC 2539</em>,
@@ -430,7 +430,7 @@
     </p>
 </div>
 <div class="refsect1" lang="en">
-<a name="id2672167"></a><h2>AUTHOR</h2>
+<a name="id2672177"></a><h2>AUTHOR</h2>
 <p><span class="corpauthor">Internet Systems Consortium</span>
     </p>
 </div>
@@ -454,6 +454,6 @@
 </tr>
 </table>
 </div>
-<p style="text-align: center;">BIND 9.9.8-P2 (Extended Support Version)</p>
+<p style="text-align: center;">BIND 9.9.8-P3 (Extended Support Version)</p>
 </body>
 </html>

Modified: stable/9/contrib/bind9/doc/arm/man.dnssec-revoke.html
==============================================================================
--- stable/9/contrib/bind9/doc/arm/man.dnssec-revoke.html	Wed Jan 20 08:28:32 2016	(r294404)
+++ stable/9/contrib/bind9/doc/arm/man.dnssec-revoke.html	Wed Jan 20 08:54:35 2016	(r294405)
@@ -50,7 +50,7 @@
 <div class="cmdsynopsis"><p><code class="command">dnssec-revoke</code>  [<code class="option">-hr</code>] [<code class="option">-v <em class="replaceable"><code>level</code></em></code>] [<code class="option">-V</code>] [<code class="option">-K <em class="replaceable"><code>directory</code></em></code>] [<code class="option">-E <em class="replaceable"><code>engine</code></em></code>] [<code class="option">-f</code>] [<code class="option">-R</code>] {keyfile}</p></div>
 </div>
 <div class="refsect1" lang="en">
-<a name="id2619238"></a><h2>DESCRIPTION</h2>
+<a name="id2619384"></a><h2>DESCRIPTION</h2>
 <p><span><strong class="command">dnssec-revoke</strong></span>
       reads a DNSSEC key file, sets the REVOKED bit on the key as defined
       in RFC 5011, and creates a new pair of key files containing the
@@ -58,7 +58,7 @@
     </p>
 </div>
 <div class="refsect1" lang="en">
-<a name="id2619252"></a><h2>OPTIONS</h2>
+<a name="id2619398"></a><h2>OPTIONS</h2>
 <div class="variablelist"><dl>
 <dt><span class="term">-h</span></dt>
 <dd><p>
@@ -100,14 +100,14 @@
 </dl></div>
 </div>
 <div class="refsect1" lang="en">
-<a name="id2619386"></a><h2>SEE ALSO</h2>
+<a name="id2619737"></a><h2>SEE ALSO</h2>
 <p><span class="citerefentry"><span class="refentrytitle">dnssec-keygen</span>(8)</span>,
       <em class="citetitle">BIND 9 Administrator Reference Manual</em>,
       <em class="citetitle">RFC 5011</em>.
     </p>
 </div>
 <div class="refsect1" lang="en">
-<a name="id2619411"></a><h2>AUTHOR</h2>
+<a name="id2619762"></a><h2>AUTHOR</h2>
 <p><span class="corpauthor">Internet Systems Consortium</span>
     </p>
 </div>
@@ -131,6 +131,6 @@
 </tr>
 </table>
 </div>
-<p style="text-align: center;">BIND 9.9.8-P2 (Extended Support Version)</p>
+<p style="text-align: center;">BIND 9.9.8-P3 (Extended Support Version)</p>
 </body>
 </html>

Modified: stable/9/contrib/bind9/doc/arm/man.dnssec-settime.html
==============================================================================
--- stable/9/contrib/bind9/doc/arm/man.dnssec-settime.html	Wed Jan 20 08:28:32 2016	(r294404)
+++ stable/9/contrib/bind9/doc/arm/man.dnssec-settime.html	Wed Jan 20 08:54:35 2016	(r294405)
@@ -50,7 +50,7 @@
 <div class="cmdsynopsis"><p><code class="command">dnssec-settime</code>  [<code class="option">-f</code>] [<code class="option">-K <em class="replaceable"><code>directory</code></em></code>] [<code class="option">-L <em class="replaceable"><code>ttl</code></em></code>] [<code class="option">-P <em class="replaceable"><code>date/offset</code></em></code>] [<code class="option">-A <em class="replaceable"><code>date/offset</code></em></code>] [<code class="option">-R <em class="replaceable"><code>date/offset</code></em></code>] [<code class="option">-I <em class="replaceable"><code>date/offset</code></em></code>] [<code class="option">-D <em class="replaceable"><code>date/offset</code></em></code>] [<code class="option">-h</code>] [<code class="option">-V</code>] [<code class="option">-v <em class="replaceable"><code>level</code></em></code>] [<code class="option">-E <em class="replaceable"><code>engine</code></em></code>] {keyfile}</p></div>
 </div>
 <div class="refsect1" lang="en">
-<a name="id2619597"></a><h2>DESCRIPTION</h2>
+<a name="id2620358"></a><h2>DESCRIPTION</h2>
 <p><span><strong class="command">dnssec-settime</strong></span>
       reads a DNSSEC private key file and sets the key timing metadata
       as specified by the <code class="option">-P</code>, <code class="option">-A</code>,
@@ -76,7 +76,7 @@
     </p>
 </div>
 <div class="refsect1" lang="en">
-<a name="id2619656"></a><h2>OPTIONS</h2>
+<a name="id2620485"></a><h2>OPTIONS</h2>
 <div class="variablelist"><dl>
 <dt><span class="term">-f</span></dt>
 <dd><p>
@@ -124,7 +124,7 @@
 </dl></div>
 </div>
 <div class="refsect1" lang="en">
-<a name="id2619929"></a><h2>TIMING OPTIONS</h2>
+<a name="id2620621"></a><h2>TIMING OPTIONS</h2>
 <p>
       Dates can be expressed in the format YYYYMMDD or YYYYMMDDHHMMSS.
       If the argument begins with a '+' or '-', it is interpreted as
@@ -203,7 +203,7 @@
 </dl></div>
 </div>
 <div class="refsect1" lang="en">
-<a name="id2620546"></a><h2>PRINTING OPTIONS</h2>
+<a name="id2622125"></a><h2>PRINTING OPTIONS</h2>
 <p>
       <span><strong class="command">dnssec-settime</strong></span> can also be used to print the
       timing metadata associated with a key.
@@ -229,7 +229,7 @@
 </dl></div>
 </div>
 <div class="refsect1" lang="en">
-<a name="id2635303"></a><h2>SEE ALSO</h2>
+<a name="id2635586"></a><h2>SEE ALSO</h2>
 <p><span class="citerefentry"><span class="refentrytitle">dnssec-keygen</span>(8)</span>,
       <span class="citerefentry"><span class="refentrytitle">dnssec-signzone</span>(8)</span>,
       <em class="citetitle">BIND 9 Administrator Reference Manual</em>,
@@ -237,7 +237,7 @@
     </p>
 </div>
 <div class="refsect1" lang="en">
-<a name="id2635336"></a><h2>AUTHOR</h2>
+<a name="id2635619"></a><h2>AUTHOR</h2>
 <p><span class="corpauthor">Internet Systems Consortium</span>
     </p>
 </div>
@@ -261,6 +261,6 @@
 </tr>
 </table>
 </div>
-<p style="text-align: center;">BIND 9.9.8-P2 (Extended Support Version)</p>
+<p style="text-align: center;">BIND 9.9.8-P3 (Extended Support Version)</p>
 </body>
 </html>

Modified: stable/9/contrib/bind9/doc/arm/man.dnssec-signzone.html
==============================================================================
--- stable/9/contrib/bind9/doc/arm/man.dnssec-signzone.html	Wed Jan 20 08:28:32 2016	(r294404)
+++ stable/9/contrib/bind9/doc/arm/man.dnssec-signzone.html	Wed Jan 20 08:54:35 2016	(r294405)
@@ -50,7 +50,7 @@

*** DIFF OUTPUT TRUNCATED AT 1000 LINES ***

From owner-svn-src-all@freebsd.org  Wed Jan 20 09:00:43 2016
Return-Path: <owner-svn-src-all@freebsd.org>
Delivered-To: svn-src-all@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id C5F90A89827;
 Wed, 20 Jan 2016 09:00:43 +0000 (UTC)
 (envelope-from arybchik@FreeBSD.org)
Received: from repo.freebsd.org (repo.freebsd.org
 [IPv6:2610:1c1:1:6068::e6a:0])
 (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
 (Client did not present a certificate)
 by mx1.freebsd.org (Postfix) with ESMTPS id 960561C99;
 Wed, 20 Jan 2016 09:00:43 +0000 (UTC)
 (envelope-from arybchik@FreeBSD.org)
Received: from repo.freebsd.org ([127.0.1.37])
 by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u0K90gqo048221;
 Wed, 20 Jan 2016 09:00:42 GMT (envelope-from arybchik@FreeBSD.org)
Received: (from arybchik@localhost)
 by repo.freebsd.org (8.15.2/8.15.2/Submit) id u0K90gLt048219;
 Wed, 20 Jan 2016 09:00:42 GMT (envelope-from arybchik@FreeBSD.org)
Message-Id: <201601200900.u0K90gLt048219@repo.freebsd.org>
X-Authentication-Warning: repo.freebsd.org: arybchik set sender to
 arybchik@FreeBSD.org using -f
From: Andrew Rybchenko <arybchik@FreeBSD.org>
Date: Wed, 20 Jan 2016 09:00:42 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org
Subject: svn commit: r294406 - stable/10/sys/dev/sfxge
X-SVN-Group: stable-10
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.20
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for &quot;
 user&quot; and &quot; projects&quot; \)" <svn-src-all.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-all/>
List-Post: <mailto:svn-src-all@freebsd.org>
List-Help: <mailto:svn-src-all-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Wed, 20 Jan 2016 09:00:43 -0000

Author: arybchik
Date: Wed Jan 20 09:00:42 2016
New Revision: 294406
URL: https://svnweb.freebsd.org/changeset/base/294406

Log:
  MFC r294372
  
  sfxge: refresh version to note matching version of out-of-tree driver
  
  Sponsored by:   Solarflare Communications, Inc.

Modified:
  stable/10/sys/dev/sfxge/sfxge_version.h
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/sys/dev/sfxge/sfxge_version.h
==============================================================================
--- stable/10/sys/dev/sfxge/sfxge_version.h	Wed Jan 20 08:54:35 2016	(r294405)
+++ stable/10/sys/dev/sfxge/sfxge_version.h	Wed Jan 20 09:00:42 2016	(r294406)
@@ -36,6 +36,6 @@
 #ifndef _SFXGE_VERSION_H
 #define	_SFXGE_VERSION_H
 
-#define	SFXGE_VERSION_STRING	"v4.5.3.1002"
+#define	SFXGE_VERSION_STRING	"v4.8.0.1019"
 
 #endif	/* _SFXGE_DRIVER_VERSION_H */

From owner-svn-src-all@freebsd.org  Wed Jan 20 09:14:38 2016
Return-Path: <owner-svn-src-all@freebsd.org>
Delivered-To: svn-src-all@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id 78C8AA89F42;
 Wed, 20 Jan 2016 09:14:38 +0000 (UTC) (envelope-from des@FreeBSD.org)
Received: from repo.freebsd.org (repo.freebsd.org
 [IPv6:2610:1c1:1:6068::e6a:0])
 (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
 (Client did not present a certificate)
 by mx1.freebsd.org (Postfix) with ESMTPS id 3A6951984;
 Wed, 20 Jan 2016 09:14:38 +0000 (UTC) (envelope-from des@FreeBSD.org)
Received: from repo.freebsd.org ([127.0.1.37])
 by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u0K9EbKP054283;
 Wed, 20 Jan 2016 09:14:37 GMT (envelope-from des@FreeBSD.org)
Received: (from des@localhost)
 by repo.freebsd.org (8.15.2/8.15.2/Submit) id u0K9Ebo8054282;
 Wed, 20 Jan 2016 09:14:37 GMT (envelope-from des@FreeBSD.org)
Message-Id: <201601200914.u0K9Ebo8054282@repo.freebsd.org>
X-Authentication-Warning: repo.freebsd.org: des set sender to des@FreeBSD.org
 using -f
From: =?UTF-8?Q?Dag-Erling_Sm=c3=b8rgrav?= <des@FreeBSD.org>
Date: Wed, 20 Jan 2016 09:14:37 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-head@freebsd.org
Subject: svn commit: r294407 - in head/crypto/openssh: . openbsd-compat
 regress regress/unittests/bitmap regress/unittests/hostkeys
 regress/unittests/hostkeys/testdata regress/unittests/kex regress/unittest...
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.20
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for &quot;
 user&quot; and &quot; projects&quot; \)" <svn-src-all.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-all/>
List-Post: <mailto:svn-src-all@freebsd.org>
List-Help: <mailto:svn-src-all-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Wed, 20 Jan 2016 09:14:38 -0000

Author: des
Date: Wed Jan 20 09:14:37 2016
New Revision: 294407
URL: https://svnweb.freebsd.org/changeset/base/294407

Log:
  MFV (r285035): fix props (no content changes)

Modified:
Directory Properties:
  head/crypto/openssh/   (props changed)
  head/crypto/openssh/bitmap.c   (props changed)
  head/crypto/openssh/bitmap.h   (props changed)
  head/crypto/openssh/opacket.c   (props changed)
  head/crypto/openssh/opacket.h   (props changed)
  head/crypto/openssh/openbsd-compat/md5.c   (props changed)
  head/crypto/openssh/openbsd-compat/md5.h   (props changed)
  head/crypto/openssh/openbsd-compat/reallocarray.c   (props changed)
  head/crypto/openssh/openbsd-compat/rmd160.c   (props changed)
  head/crypto/openssh/openbsd-compat/rmd160.h   (props changed)
  head/crypto/openssh/openbsd-compat/sha1.c   (props changed)
  head/crypto/openssh/openbsd-compat/sha1.h   (props changed)
  head/crypto/openssh/regress/cfgparse.sh   (props changed)
  head/crypto/openssh/regress/netcat.c   (props changed)
  head/crypto/openssh/regress/principals-command.sh   (props changed)
  head/crypto/openssh/regress/unittests/bitmap/tests.c   (props changed)
  head/crypto/openssh/regress/unittests/hostkeys/test_iterate.c   (props changed)
  head/crypto/openssh/regress/unittests/hostkeys/testdata/dsa_1.pub   (props changed)
  head/crypto/openssh/regress/unittests/hostkeys/testdata/dsa_2.pub   (props changed)
  head/crypto/openssh/regress/unittests/hostkeys/testdata/dsa_3.pub   (props changed)
  head/crypto/openssh/regress/unittests/hostkeys/testdata/dsa_4.pub   (props changed)
  head/crypto/openssh/regress/unittests/hostkeys/testdata/dsa_5.pub   (props changed)
  head/crypto/openssh/regress/unittests/hostkeys/testdata/dsa_6.pub   (props changed)
  head/crypto/openssh/regress/unittests/hostkeys/testdata/ecdsa_1.pub   (props changed)
  head/crypto/openssh/regress/unittests/hostkeys/testdata/ecdsa_2.pub   (props changed)
  head/crypto/openssh/regress/unittests/hostkeys/testdata/ecdsa_3.pub   (props changed)
  head/crypto/openssh/regress/unittests/hostkeys/testdata/ecdsa_4.pub   (props changed)
  head/crypto/openssh/regress/unittests/hostkeys/testdata/ecdsa_5.pub   (props changed)
  head/crypto/openssh/regress/unittests/hostkeys/testdata/ecdsa_6.pub   (props changed)
  head/crypto/openssh/regress/unittests/hostkeys/testdata/ed25519_1.pub   (props changed)
  head/crypto/openssh/regress/unittests/hostkeys/testdata/ed25519_2.pub   (props changed)
  head/crypto/openssh/regress/unittests/hostkeys/testdata/ed25519_3.pub   (props changed)
  head/crypto/openssh/regress/unittests/hostkeys/testdata/ed25519_4.pub   (props changed)
  head/crypto/openssh/regress/unittests/hostkeys/testdata/ed25519_5.pub   (props changed)
  head/crypto/openssh/regress/unittests/hostkeys/testdata/ed25519_6.pub   (props changed)
  head/crypto/openssh/regress/unittests/hostkeys/testdata/rsa1_1.pub   (props changed)
  head/crypto/openssh/regress/unittests/hostkeys/testdata/rsa1_2.pub   (props changed)
  head/crypto/openssh/regress/unittests/hostkeys/testdata/rsa1_3.pub   (props changed)
  head/crypto/openssh/regress/unittests/hostkeys/testdata/rsa1_4.pub   (props changed)
  head/crypto/openssh/regress/unittests/hostkeys/testdata/rsa1_5.pub   (props changed)
  head/crypto/openssh/regress/unittests/hostkeys/testdata/rsa1_6.pub   (props changed)
  head/crypto/openssh/regress/unittests/hostkeys/testdata/rsa_1.pub   (props changed)
  head/crypto/openssh/regress/unittests/hostkeys/testdata/rsa_2.pub   (props changed)
  head/crypto/openssh/regress/unittests/hostkeys/testdata/rsa_3.pub   (props changed)
  head/crypto/openssh/regress/unittests/hostkeys/testdata/rsa_4.pub   (props changed)
  head/crypto/openssh/regress/unittests/hostkeys/testdata/rsa_5.pub   (props changed)
  head/crypto/openssh/regress/unittests/hostkeys/testdata/rsa_6.pub   (props changed)
  head/crypto/openssh/regress/unittests/hostkeys/tests.c   (props changed)
  head/crypto/openssh/regress/unittests/kex/test_kex.c   (props changed)
  head/crypto/openssh/regress/unittests/kex/tests.c   (props changed)
  head/crypto/openssh/regress/unittests/sshkey/testdata/dsa_1-cert.pub   (props changed)
  head/crypto/openssh/regress/unittests/sshkey/testdata/dsa_1.param.pub   (props changed)
  head/crypto/openssh/regress/unittests/sshkey/testdata/dsa_1.pub   (props changed)
  head/crypto/openssh/regress/unittests/sshkey/testdata/dsa_2.pub   (props changed)
  head/crypto/openssh/regress/unittests/sshkey/testdata/ecdsa_1-cert.pub   (props changed)
  head/crypto/openssh/regress/unittests/sshkey/testdata/ecdsa_1.param.pub   (props changed)
  head/crypto/openssh/regress/unittests/sshkey/testdata/ecdsa_1.pub   (props changed)
  head/crypto/openssh/regress/unittests/sshkey/testdata/ecdsa_2.param.pub   (props changed)
  head/crypto/openssh/regress/unittests/sshkey/testdata/ecdsa_2.pub   (props changed)
  head/crypto/openssh/regress/unittests/sshkey/testdata/ed25519_1-cert.pub   (props changed)
  head/crypto/openssh/regress/unittests/sshkey/testdata/ed25519_1.pub   (props changed)
  head/crypto/openssh/regress/unittests/sshkey/testdata/ed25519_2.pub   (props changed)
  head/crypto/openssh/regress/unittests/sshkey/testdata/rsa1_1.pub   (props changed)
  head/crypto/openssh/regress/unittests/sshkey/testdata/rsa1_2.pub   (props changed)
  head/crypto/openssh/regress/unittests/sshkey/testdata/rsa_1-cert.pub   (props changed)
  head/crypto/openssh/regress/unittests/sshkey/testdata/rsa_1.pub   (props changed)
  head/crypto/openssh/regress/unittests/sshkey/testdata/rsa_2.pub   (props changed)
  head/crypto/openssh/ssh_api.c   (props changed)
  head/crypto/openssh/ssh_api.h   (props changed)

From owner-svn-src-all@freebsd.org  Wed Jan 20 09:21:21 2016
Return-Path: <owner-svn-src-all@freebsd.org>
Delivered-To: svn-src-all@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2E918A8A1F2;
 Wed, 20 Jan 2016 09:21:21 +0000 (UTC) (envelope-from avg@FreeBSD.org)
Received: from citadel.icyb.net.ua (citadel.icyb.net.ua [212.40.38.140])
 by mx1.freebsd.org (Postfix) with ESMTP id DA99D1C55;
 Wed, 20 Jan 2016 09:21:19 +0000 (UTC) (envelope-from avg@FreeBSD.org)
Received: from porto.starpoint.kiev.ua (porto-e.starpoint.kiev.ua
 [212.40.38.100])
 by citadel.icyb.net.ua (8.8.8p3/ICyb-2.3exp) with ESMTP id LAA28623;
 Wed, 20 Jan 2016 11:21:17 +0200 (EET) (envelope-from avg@FreeBSD.org)
Received: from localhost ([127.0.0.1])
 by porto.starpoint.kiev.ua with esmtp (Exim 4.34 (FreeBSD))
 id 1aLox2-0005mC-Tj; Wed, 20 Jan 2016 11:21:16 +0200
Subject: Re: svn commit: r294329 - in
 head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs: . sys
To: Alan Somers <asomers@FreeBSD.org>
References: <201601191700.u0JH0P6k061610@repo.freebsd.org>
 <569E6DA0.9010300@pix.net>
 <CAOtMX2idrWOpWbkYxPFn3yur8w-vgfBryhT4_0yiBvg10sWWRA@mail.gmail.com>
Cc: "src-committers@freebsd.org" <src-committers@FreeBSD.org>,
 "svn-src-all@freebsd.org" <svn-src-all@FreeBSD.org>,
 "svn-src-head@freebsd.org" <svn-src-head@FreeBSD.org>
From: Andriy Gapon <avg@FreeBSD.org>
Message-ID: <569F516D.80303@FreeBSD.org>
Date: Wed, 20 Jan 2016 11:20:45 +0200
User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:38.0) Gecko/20100101
 Thunderbird/38.5.0
MIME-Version: 1.0
In-Reply-To: <CAOtMX2idrWOpWbkYxPFn3yur8w-vgfBryhT4_0yiBvg10sWWRA@mail.gmail.com>
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 7bit
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.20
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for &quot;
 user&quot; and &quot; projects&quot; \)" <svn-src-all.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-all/>
List-Post: <mailto:svn-src-all@freebsd.org>
List-Help: <mailto:svn-src-all-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Wed, 20 Jan 2016 09:21:21 -0000

On 19/01/2016 19:20, Alan Somers wrote:
> The thing is, it never really worked in the first place.  Panics and
> deadlocks are so frequent that I don't think the feature was usable
> for anybody.

The feature is perfectly usable for me.  I have never run into the problems that
you describe.  Why not fix the real bugs that you've run into?

-- 
Andriy Gapon

From owner-svn-src-all@freebsd.org  Wed Jan 20 09:22:05 2016
Return-Path: <owner-svn-src-all@freebsd.org>
Delivered-To: svn-src-all@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id 552B6A8A241;
 Wed, 20 Jan 2016 09:22:05 +0000 (UTC) (envelope-from avg@FreeBSD.org)
Received: from citadel.icyb.net.ua (citadel.icyb.net.ua [212.40.38.140])
 by mx1.freebsd.org (Postfix) with ESMTP id EE38E1ED7;
 Wed, 20 Jan 2016 09:22:03 +0000 (UTC) (envelope-from avg@FreeBSD.org)
Received: from porto.starpoint.kiev.ua (porto-e.starpoint.kiev.ua
 [212.40.38.100])
 by citadel.icyb.net.ua (8.8.8p3/ICyb-2.3exp) with ESMTP id LAA28646;
 Wed, 20 Jan 2016 11:22:01 +0200 (EET) (envelope-from avg@FreeBSD.org)
Received: from localhost ([127.0.0.1])
 by porto.starpoint.kiev.ua with esmtp (Exim 4.34 (FreeBSD))
 id 1aLoxl-0005mB-Ce; Wed, 20 Jan 2016 11:22:01 +0200
Subject: Re: svn commit: r294329 - in
 head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs: . sys
To: Alan Somers <asomers@FreeBSD.org>, src-committers@FreeBSD.org,
 svn-src-all@FreeBSD.org, svn-src-head@FreeBSD.org
References: <201601191700.u0JH0P6k061610@repo.freebsd.org>
From: Andriy Gapon <avg@FreeBSD.org>
X-Enigmail-Draft-Status: N1110
Message-ID: <569F5168.70605@FreeBSD.org>
Date: Wed, 20 Jan 2016 11:20:40 +0200
User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:38.0) Gecko/20100101
 Thunderbird/38.5.0
MIME-Version: 1.0
In-Reply-To: <201601191700.u0JH0P6k061610@repo.freebsd.org>
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 7bit
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.20
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for &quot;
 user&quot; and &quot; projects&quot; \)" <svn-src-all.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-all/>
List-Post: <mailto:svn-src-all@freebsd.org>
List-Help: <mailto:svn-src-all-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Wed, 20 Jan 2016 09:22:05 -0000

On 19/01/2016 19:00, Alan Somers wrote:
> Author: asomers
> Date: Tue Jan 19 17:00:25 2016
> New Revision: 294329
> URL: https://svnweb.freebsd.org/changeset/base/294329
> 
> Log:
>   Disallow zvol-backed ZFS pools

What, again?...

>   Using zvols as backing devices for ZFS pools is fraught with panics and
>   deadlocks. For example, attempting to online a missing device in the
>   presence of a zvol can cause a panic when vdev_geom tastes the zvol.  Better
>   to completely disable vdev_geom from ever opening a zvol. The solution
>   relies on setting a thread-local variable during vdev_geom_open, and
>   returning EOPNOTSUPP during zvol_open if that thread-local variable is set.
>   
>   Remove the check for MUTEX_HELD(&zfsdev_state_lock) in zvol_open. Its intent
>   was to prevent a recursive mutex acquisition panic. However, the new check
>   for the thread-local variable also fixes that problem.
>   
>   Also, fix a panic in vdev_geom_taste_orphan. For an unknown reason, this
>   function was set to panic. But it can occur that a device disappears during
>   tasting, and it causes no problems to ignore this departure.
>   
>   Reviewed by:	delphij
>   MFC after:	1 week
>   Relnotes:	yes
>   Sponsored by:	Spectra Logic Corp
>   Differential Revision:	https://reviews.freebsd.org/D4986
> 



-- 
Andriy Gapon

From owner-svn-src-all@freebsd.org  Wed Jan 20 10:12:08 2016
Return-Path: <owner-svn-src-all@freebsd.org>
Delivered-To: svn-src-all@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7E67FA8AF58;
 Wed, 20 Jan 2016 10:12:08 +0000 (UTC)
 (envelope-from cognet@FreeBSD.org)
Received: from repo.freebsd.org (repo.freebsd.org
 [IPv6:2610:1c1:1:6068::e6a:0])
 (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
 (Client did not present a certificate)
 by mx1.freebsd.org (Postfix) with ESMTPS id 4B69C13A1;
 Wed, 20 Jan 2016 10:12:08 +0000 (UTC)
 (envelope-from cognet@FreeBSD.org)
Received: from repo.freebsd.org ([127.0.1.37])
 by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u0KAC7CO090442;
 Wed, 20 Jan 2016 10:12:07 GMT (envelope-from cognet@FreeBSD.org)
Received: (from cognet@localhost)
 by repo.freebsd.org (8.15.2/8.15.2/Submit) id u0KAC7lc090440;
 Wed, 20 Jan 2016 10:12:07 GMT (envelope-from cognet@FreeBSD.org)
Message-Id: <201601201012.u0KAC7lc090440@repo.freebsd.org>
X-Authentication-Warning: repo.freebsd.org: cognet set sender to
 cognet@FreeBSD.org using -f
From: Olivier Houchard <cognet@FreeBSD.org>
Date: Wed, 20 Jan 2016 10:12:07 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-svnadmin@freebsd.org
Subject: svn commit: r294409 - svnadmin/conf
X-SVN-Group: svnadmin
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.20
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for &quot;
 user&quot; and &quot; projects&quot; \)" <svn-src-all.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-all/>
List-Post: <mailto:svn-src-all@freebsd.org>
List-Help: <mailto:svn-src-all-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Wed, 20 Jan 2016 10:12:08 -0000

Author: cognet
Date: Wed Jan 20 10:12:06 2016
New Revision: 294409
URL: https://svnweb.freebsd.org/changeset/base/294409

Log:
  Add wma (Wojciech Macek) as a src committer.
  Wojciech has been doing many work on arm/arm64, and will now be able to commit
  it by himself.
  As this commit suggests, I'll be is mentor.
  
  Approved by:	core

Modified:
  svnadmin/conf/access
  svnadmin/conf/mentors

Modified: svnadmin/conf/access
==============================================================================
--- svnadmin/conf/access	Wed Jan 20 09:50:54 2016	(r294408)
+++ svnadmin/conf/access	Wed Jan 20 10:12:06 2016	(r294409)
@@ -240,6 +240,7 @@ versus
 whu
 will
 wkoszek
+wma
 wollman
 yongari
 zbb

Modified: svnadmin/conf/mentors
==============================================================================
--- svnadmin/conf/mentors	Wed Jan 20 09:50:54 2016	(r294408)
+++ svnadmin/conf/mentors	Wed Jan 20 10:12:06 2016	(r294409)
@@ -38,3 +38,4 @@ skra		kib
 torek		rpaulo
 venkat		delphij		Co-mentor: luigi, jhb
 versus		gavin		Co-mentor: fjoe
+wma		cognet

From owner-svn-src-all@freebsd.org  Wed Jan 20 11:15:55 2016
Return-Path: <owner-svn-src-all@freebsd.org>
Delivered-To: svn-src-all@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5D033A88762;
 Wed, 20 Jan 2016 11:15:55 +0000 (UTC) (envelope-from wma@FreeBSD.org)
Received: from repo.freebsd.org (repo.freebsd.org
 [IPv6:2610:1c1:1:6068::e6a:0])
 (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
 (Client did not present a certificate)
 by mx1.freebsd.org (Postfix) with ESMTPS id 3065F1520;
 Wed, 20 Jan 2016 11:15:55 +0000 (UTC) (envelope-from wma@FreeBSD.org)
Received: from repo.freebsd.org ([127.0.1.37])
 by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u0KBFsCD014718;
 Wed, 20 Jan 2016 11:15:54 GMT (envelope-from wma@FreeBSD.org)
Received: (from wma@localhost)
 by repo.freebsd.org (8.15.2/8.15.2/Submit) id u0KBFsK6014717;
 Wed, 20 Jan 2016 11:15:54 GMT (envelope-from wma@FreeBSD.org)
Message-Id: <201601201115.u0KBFsK6014717@repo.freebsd.org>
X-Authentication-Warning: repo.freebsd.org: wma set sender to wma@FreeBSD.org
 using -f
From: Wojciech Macek <wma@FreeBSD.org>
Date: Wed, 20 Jan 2016 11:15:54 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-head@freebsd.org
Subject: svn commit: r294410 - head/share/misc
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.20
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for &quot;
 user&quot; and &quot; projects&quot; \)" <svn-src-all.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-all/>
List-Post: <mailto:svn-src-all@freebsd.org>
List-Help: <mailto:svn-src-all-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Wed, 20 Jan 2016 11:15:55 -0000

Author: wma
Date: Wed Jan 20 11:15:54 2016
New Revision: 294410
URL: https://svnweb.freebsd.org/changeset/base/294410

Log:
  Adding info about myself to committers-src.xml
  
  Approved by:           cognet (mentor)
  Differential revision: https://reviews.freebsd.org/D5001

Modified:
  head/share/misc/committers-src.dot

Modified: head/share/misc/committers-src.dot
==============================================================================
--- head/share/misc/committers-src.dot	Wed Jan 20 10:12:06 2016	(r294409)
+++ head/share/misc/committers-src.dot	Wed Jan 20 11:15:54 2016	(r294410)
@@ -316,6 +316,7 @@ weongyo [label="Weongyo Jeong\nweongyo@F
 wes [label="Wes Peters\nwes@FreeBSD.org\n1998/11/25"]
 whu [label="Wei Hu\nwhu@FreeBSD.org\n2015/02/11"]
 wkoszek [label="Wojciech A. Koszek\nwkoszek@FreeBSD.org\n2006/02/21"]
+wma [label="Wojciech Macek\nwma@FreeBSD.org\n2016/01/18"]
 wollman [label="Garrett Wollman\nwollman@FreeBSD.org\n????/??/??"]
 wsalamon [label="Wayne Salamon\nwsalamon@FreeBSD.org\n2005/06/25"]
 yongari [label="Pyun YongHyeon\nyongari@FreeBSD.org\n2004/08/01"]
@@ -391,6 +392,7 @@ cognet -> jceel
 cognet -> kevlo
 cognet -> ian
 cognet -> wkoszek
+cognet -> wma
 cognet -> zbb
 
 cperciva -> eadler

From owner-svn-src-all@freebsd.org  Wed Jan 20 11:25:31 2016
Return-Path: <owner-svn-src-all@freebsd.org>
Delivered-To: svn-src-all@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7C06AA88B97;
 Wed, 20 Jan 2016 11:25:31 +0000 (UTC)
 (envelope-from melifaro@FreeBSD.org)
Received: from repo.freebsd.org (repo.freebsd.org
 [IPv6:2610:1c1:1:6068::e6a:0])
 (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
 (Client did not present a certificate)
 by mx1.freebsd.org (Postfix) with ESMTPS id 4EF931CF2;
 Wed, 20 Jan 2016 11:25:31 +0000 (UTC)
 (envelope-from melifaro@FreeBSD.org)
Received: from repo.freebsd.org ([127.0.1.37])
 by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u0KBPUMf018065;
 Wed, 20 Jan 2016 11:25:30 GMT (envelope-from melifaro@FreeBSD.org)
Received: (from melifaro@localhost)
 by repo.freebsd.org (8.15.2/8.15.2/Submit) id u0KBPUKO018064;
 Wed, 20 Jan 2016 11:25:30 GMT (envelope-from melifaro@FreeBSD.org)
Message-Id: <201601201125.u0KBPUKO018064@repo.freebsd.org>
X-Authentication-Warning: repo.freebsd.org: melifaro set sender to
 melifaro@FreeBSD.org using -f
From: "Alexander V. Chernikov" <melifaro@FreeBSD.org>
Date: Wed, 20 Jan 2016 11:25:30 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-head@freebsd.org
Subject: svn commit: r294411 - head/sys/netinet6
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.20
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for &quot;
 user&quot; and &quot; projects&quot; \)" <svn-src-all.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-all/>
List-Post: <mailto:svn-src-all@freebsd.org>
List-Help: <mailto:svn-src-all-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Wed, 20 Jan 2016 11:25:31 -0000

Author: melifaro
Date: Wed Jan 20 11:25:30 2016
New Revision: 294411
URL: https://svnweb.freebsd.org/changeset/base/294411

Log:
  Fix rte refcount leak in ip6_forward().
  
  Reviewed by:	ae
  MFC after:	2 weeks
  Sponsored by:	Yandex LLC

Modified:
  head/sys/netinet6/ip6_forward.c

Modified: head/sys/netinet6/ip6_forward.c
==============================================================================
--- head/sys/netinet6/ip6_forward.c	Wed Jan 20 11:15:54 2016	(r294410)
+++ head/sys/netinet6/ip6_forward.c	Wed Jan 20 11:25:30 2016	(r294411)
@@ -341,6 +341,7 @@ again:
 	dst->sin6_addr = ip6->ip6_dst;
 again2:
 	rin6.ro_rt = in6_rtalloc1((struct sockaddr *)dst, 0, 0, M_GETFIB(m));
+	rt = rin6.ro_rt;
 	if (rin6.ro_rt != NULL)
 		RT_UNLOCK(rin6.ro_rt);
 	else {
@@ -352,7 +353,6 @@ again2:
 		}
 		goto bad;
 	}
-	rt = rin6.ro_rt;
 
 	/*
 	 * Source scope check: if a packet can't be delivered to its
@@ -505,8 +505,10 @@ again2:
 		/* If destination is now ourself drop to ip6_input(). */
 		if (in6_localip(&ip6->ip6_dst))
 			m->m_flags |= M_FASTFWD_OURS;
-		else
+		else {
+			RTFREE(rt);
 			goto again;	/* Redo the routing table lookup. */
+		}
 	}
 
 	/* See if local, if yes, send it to netisr. */
@@ -533,6 +535,7 @@ again2:
 		m->m_flags |= M_SKIP_FIREWALL;
 		m->m_flags &= ~M_IP6_NEXTHOP;
 		m_tag_delete(m, fwd_tag);
+		RTFREE(rt);
 		goto again2;
 	}
 

From owner-svn-src-all@freebsd.org  Wed Jan 20 11:34:23 2016
Return-Path: <owner-svn-src-all@freebsd.org>
Delivered-To: svn-src-all@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id E18BDA89006;
 Wed, 20 Jan 2016 11:34:23 +0000 (UTC) (envelope-from zbb@FreeBSD.org)
Received: from repo.freebsd.org (repo.freebsd.org
 [IPv6:2610:1c1:1:6068::e6a:0])
 (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
 (Client did not present a certificate)
 by mx1.freebsd.org (Postfix) with ESMTPS id B2F241331;
 Wed, 20 Jan 2016 11:34:23 +0000 (UTC) (envelope-from zbb@FreeBSD.org)
Received: from repo.freebsd.org ([127.0.1.37])
 by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u0KBYMYn021436;
 Wed, 20 Jan 2016 11:34:22 GMT (envelope-from zbb@FreeBSD.org)
Received: (from zbb@localhost)
 by repo.freebsd.org (8.15.2/8.15.2/Submit) id u0KBYM19021435;
 Wed, 20 Jan 2016 11:34:22 GMT (envelope-from zbb@FreeBSD.org)
Message-Id: <201601201134.u0KBYM19021435@repo.freebsd.org>
X-Authentication-Warning: repo.freebsd.org: zbb set sender to zbb@FreeBSD.org
 using -f
From: Zbigniew Bodek <zbb@FreeBSD.org>
Date: Wed, 20 Jan 2016 11:34:22 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-head@freebsd.org
Subject: svn commit: r294412 - head/sys/arm64/conf
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.20
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for &quot;
 user&quot; and &quot; projects&quot; \)" <svn-src-all.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-all/>
List-Post: <mailto:svn-src-all@freebsd.org>
List-Help: <mailto:svn-src-all-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Wed, 20 Jan 2016 11:34:24 -0000

Author: zbb
Date: Wed Jan 20 11:34:22 2016
New Revision: 294412
URL: https://svnweb.freebsd.org/changeset/base/294412

Log:
  Revert r294267 to avoid using experimental VFS_AIO in ARM64's GENERIC
  
  Remove VFS_AIO from the ARM64's GENERIC as it can be used
  as a loadable module.

Modified:
  head/sys/arm64/conf/GENERIC

Modified: head/sys/arm64/conf/GENERIC
==============================================================================
--- head/sys/arm64/conf/GENERIC	Wed Jan 20 11:25:30 2016	(r294411)
+++ head/sys/arm64/conf/GENERIC	Wed Jan 20 11:34:22 2016	(r294412)
@@ -66,7 +66,6 @@ options 	MAC			# TrustedBSD MAC Framewor
 options 	KDTRACE_FRAME		# Ensure frames are compiled in
 options 	KDTRACE_HOOKS		# Kernel DTrace hooks
 options 	VFP			# Floating-point support
-options 	VFS_AIO			# Real implementations of the aio_* system calls
 options 	RACCT			# Resource accounting framework
 options 	RACCT_DEFAULT_TO_DISABLED # Set kern.racct.enable=0 by default
 options 	RCTL			# Resource limits

From owner-svn-src-all@freebsd.org  Wed Jan 20 11:35:28 2016
Return-Path: <owner-svn-src-all@freebsd.org>
Delivered-To: svn-src-all@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id BC16EA8907E
 for <svn-src-all@mailman.ysv.freebsd.org>;
 Wed, 20 Jan 2016 11:35:28 +0000 (UTC)
 (envelope-from zbb@semihalf.com)
Received: from mail-lf0-x22d.google.com (mail-lf0-x22d.google.com
 [IPv6:2a00:1450:4010:c07::22d])
 (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits))
 (Client CN "smtp.gmail.com",
 Issuer "Google Internet Authority G2" (verified OK))
 by mx1.freebsd.org (Postfix) with ESMTPS id 689A81510
 for <svn-src-all@freebsd.org>; Wed, 20 Jan 2016 11:35:28 +0000 (UTC)
 (envelope-from zbb@semihalf.com)
Received: by mail-lf0-x22d.google.com with SMTP id h129so3963548lfh.3
 for <svn-src-all@freebsd.org>; Wed, 20 Jan 2016 03:35:28 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=semihalf-com.20150623.gappssmtp.com; s=20150623;
 h=mime-version:in-reply-to:references:from:date:message-id:subject:to
 :cc:content-type;
 bh=uIrM6qqOsQNJSw6UeqfXl7HIK12tgcgdpr1T+Ly+lTw=;
 b=VCrV5f69HB6kIXuR1ouzuWIsfjoycgikGUQB3J9UW6+a2O7uLbKMvaZYy7TA4JExlQ
 MoMyd7Lg3r+nHNTisaXBeC3lqIMu/+Mb1ngYhCBmB2iMhnatT/dO5jJB4yFmdBV0EBmg
 LCUFHPx206X7HRXOD3JlgaU3eXZhpbHm4LoRNPsfbM//+sLCXtowzfzMWuJ5U91UTugk
 kgbbX1ymSZs11LgGQUmKpkbz+z1DAxaInSB4G4acNfTYE8U6ahMYHVblmaR5aK4r8K+7
 leyXGkoFG6KhEzjnYMrCC3xDxsUSTRR1DMFgts2HDJoA9oZuJ8I78H7AnI5XKlocn0+c
 VIiQ==
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-type;
 bh=uIrM6qqOsQNJSw6UeqfXl7HIK12tgcgdpr1T+Ly+lTw=;
 b=HhFrxf+QwlZToOO0JiZ787KvW+UpRiP/aLu1kp5GEToxmh6Y2JtteDgCeOtyYaU25t
 C9wbMdpv50dw26rd+4mgZ52DLBkagyNC95hSQuHy3/BFj3k7aUQl3SUTsym+92BZFqVw
 79fCbHhPCw/KXZuAE0/5/Viw84wgpw0pshrVwyTQt/98B5azB4DFYiKXA+fDf02DhrJw
 fAemrzzMVoSrTyrZJE6jj0tYshBwV/YwZbKXMysqNSmmsE8t5hglJJ29O8W+Pi7ApERV
 suKRn5WlinMCWSg2riePcL8bnRKa80+WHrB6P4wh4+ypZUy5MCVVLbMop7PDTzjOSjK2
 r/og==
X-Gm-Message-State: ALoCoQl0XsmAhpYM1/evL/zL0P5DFDDvufhaAVAcT/ap0VTUEcAyGo64jr196Ojj9e04/cf6++0TgSYVI1YJVRonkUJ9Cj+OWQ==
X-Received: by 10.25.24.85 with SMTP id o82mr12970210lfi.144.1453289725801;
 Wed, 20 Jan 2016 03:35:25 -0800 (PST)
MIME-Version: 1.0
Received: by 10.25.24.93 with HTTP; Wed, 20 Jan 2016 03:35:06 -0800 (PST)
In-Reply-To: <20160119180146.GF37895@zxy.spb.ru>
References: <201601181411.u0IEBYoQ078886@repo.freebsd.org>
 <20160118142107.2523f103@zapp> <20160119180146.GF37895@zxy.spb.ru>
From: Zbigniew Bodek <zbb@semihalf.com>
Date: Wed, 20 Jan 2016 12:35:06 +0100
Message-ID: <CAG7dG+wY5UnHLCxbGGOanLb4GzaOy-fEX6utm=5ajCBqBx_qSA@mail.gmail.com>
Subject: Re: svn commit: r294267 - head/sys/arm64/conf
To: Slawa Olhovchenkov <slw@zxy.spb.ru>
Cc: Andrew Turner <andrew@fubar.geek.nz>, Zbigniew Bodek <zbb@freebsd.org>,
 svn-src-head@freebsd.org, 
 svn-src-all@freebsd.org, src-committers@freebsd.org
Content-Type: text/plain; charset=UTF-8
X-Content-Filtered-By: Mailman/MimeDel 2.1.20
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.20
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for &quot;
 user&quot; and &quot; projects&quot; \)" <svn-src-all.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-all/>
List-Post: <mailto:svn-src-all@freebsd.org>
List-Help: <mailto:svn-src-all-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Wed, 20 Jan 2016 11:35:28 -0000

2016-01-19 19:01 GMT+01:00 Slawa Olhovchenkov <slw@zxy.spb.ru>:

> On Mon, Jan 18, 2016 at 02:21:07PM +0000, Andrew Turner wrote:
>
> > On Mon, 18 Jan 2016 14:11:34 +0000 (UTC)
> > Zbigniew Bodek <zbb@FreeBSD.org> wrote:
> >
> > > Author: zbb
> > > Date: Mon Jan 18 14:11:34 2016
> > > New Revision: 294267
> > > URL: https://svnweb.freebsd.org/changeset/base/294267
> > >
> > > Log:
> > >   Enable AIO interface on ARM64 platforms
> > >
> > >   Add VFS_AIO to generic config to allow using of high-performance
> > >   asynchronous disk AIO operation.
> >
> > Why have you only enabled this on arm64? Is it not applicable to other
> > architectures?
>
> This is just compile-in aio.ko.
> I am don't know why don't use `kldload aio`


We have no problem with reverting this change.
Done in r294412.

Best regards
zbb

From owner-svn-src-all@freebsd.org  Wed Jan 20 11:57:13 2016
Return-Path: <owner-svn-src-all@freebsd.org>
Delivered-To: svn-src-all@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5A0CAA896EA;
 Wed, 20 Jan 2016 11:57:13 +0000 (UTC) (envelope-from zbb@FreeBSD.org)
Received: from repo.freebsd.org (repo.freebsd.org
 [IPv6:2610:1c1:1:6068::e6a:0])
 (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
 (Client did not present a certificate)
 by mx1.freebsd.org (Postfix) with ESMTPS id 1B5CF11C0;
 Wed, 20 Jan 2016 11:57:13 +0000 (UTC) (envelope-from zbb@FreeBSD.org)
Received: from repo.freebsd.org ([127.0.1.37])
 by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u0KBvCf6028245;
 Wed, 20 Jan 2016 11:57:12 GMT (envelope-from zbb@FreeBSD.org)
Received: (from zbb@localhost)
 by repo.freebsd.org (8.15.2/8.15.2/Submit) id u0KBvBMd028236;
 Wed, 20 Jan 2016 11:57:11 GMT (envelope-from zbb@FreeBSD.org)
Message-Id: <201601201157.u0KBvBMd028236@repo.freebsd.org>
X-Authentication-Warning: repo.freebsd.org: zbb set sender to zbb@FreeBSD.org
 using -f
From: Zbigniew Bodek <zbb@FreeBSD.org>
Date: Wed, 20 Jan 2016 11:57:11 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-head@freebsd.org
Subject: svn commit: r294413 - in head/sys/arm: conf mv mv/armadaxp
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.20
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for &quot;
 user&quot; and &quot; projects&quot; \)" <svn-src-all.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-all/>
List-Post: <mailto:svn-src-all@freebsd.org>
List-Help: <mailto:svn-src-all-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Wed, 20 Jan 2016 11:57:13 -0000

Author: zbb
Date: Wed Jan 20 11:57:11 2016
New Revision: 294413
URL: https://svnweb.freebsd.org/changeset/base/294413

Log:
  Mark gpio as "optional" in files.mv and edit Marvell's kernconfs
  
  Including arm/mv/gpio.c now depends on 'gpio' device. 'device gpio' was
  added to all kernconf files of Marvell boards, except ARMADAXP (dummy
  mv_gpio_res definition was removed) and ARMADA38X (not supported yet).
  
  This commit allows to use generic files.mv on A38X.
  
  Reviewed by:    andrew
  Obtained from:	Semihalf
  Sponsored by:	Stormshield
  Submitted by:	Bartosz Szczepanek <bsz@semihalf.com>
  Differential revision:	https://reviews.freebsd.org/D4372

Modified:
  head/sys/arm/conf/DB-78XXX
  head/sys/arm/conf/DB-88F5XXX
  head/sys/arm/conf/DB-88F6XXX
  head/sys/arm/conf/DOCKSTAR
  head/sys/arm/conf/DREAMPLUG-1001
  head/sys/arm/conf/SHEEVAPLUG
  head/sys/arm/conf/TS7800
  head/sys/arm/mv/armadaxp/armadaxp.c
  head/sys/arm/mv/files.mv

Modified: head/sys/arm/conf/DB-78XXX
==============================================================================
--- head/sys/arm/conf/DB-78XXX	Wed Jan 20 11:34:22 2016	(r294412)
+++ head/sys/arm/conf/DB-78XXX	Wed Jan 20 11:57:11 2016	(r294413)
@@ -90,6 +90,9 @@ device		mvs
 # NAND
 device		nand
 
+# GPIO
+device		gpio
+
 # Flattened Device Tree
 options 	FDT
 options 	FDT_DTB_STATIC

Modified: head/sys/arm/conf/DB-88F5XXX
==============================================================================
--- head/sys/arm/conf/DB-88F5XXX	Wed Jan 20 11:34:22 2016	(r294412)
+++ head/sys/arm/conf/DB-88F5XXX	Wed Jan 20 11:57:11 2016	(r294413)
@@ -88,6 +88,9 @@ device		da
 # SATA
 device		mvs
 
+# GPIO
+device		gpio
+
 # Flattened Device Tree
 options 	FDT
 makeoptions	FDT_DTS_FILE=db88f5281.dts

Modified: head/sys/arm/conf/DB-88F6XXX
==============================================================================
--- head/sys/arm/conf/DB-88F6XXX	Wed Jan 20 11:34:22 2016	(r294412)
+++ head/sys/arm/conf/DB-88F6XXX	Wed Jan 20 11:57:11 2016	(r294413)
@@ -94,6 +94,9 @@ device		mvs
 # NAND
 device		nand
 
+# GPIO
+device		gpio
+
 # Flattened Device Tree
 options 	FDT			# Configure using FDT/DTB data
 options 	FDT_DTB_STATIC

Modified: head/sys/arm/conf/DOCKSTAR
==============================================================================
--- head/sys/arm/conf/DOCKSTAR	Wed Jan 20 11:34:22 2016	(r294412)
+++ head/sys/arm/conf/DOCKSTAR	Wed Jan 20 11:57:11 2016	(r294413)
@@ -148,6 +148,9 @@ device		pf
 device		pflog
 device		pfsync
 
+# GPIO
+device		gpio
+
 # ALTQ, required for PF
 options 	ALTQ			# Basic ALTQ support
 options 	ALTQ_CBQ		# Class Based Queueing

Modified: head/sys/arm/conf/DREAMPLUG-1001
==============================================================================
--- head/sys/arm/conf/DREAMPLUG-1001	Wed Jan 20 11:34:22 2016	(r294412)
+++ head/sys/arm/conf/DREAMPLUG-1001	Wed Jan 20 11:57:11 2016	(r294413)
@@ -122,6 +122,9 @@ device		u3g  			# USB-based 3G modems (O
 device		iic
 device		iicbus
 
+# GPIO
+device		gpio
+
 # SATA
 device		mvs
 device		ahci

Modified: head/sys/arm/conf/SHEEVAPLUG
==============================================================================
--- head/sys/arm/conf/SHEEVAPLUG	Wed Jan 20 11:34:22 2016	(r294412)
+++ head/sys/arm/conf/SHEEVAPLUG	Wed Jan 20 11:57:11 2016	(r294413)
@@ -82,6 +82,9 @@ device		da
 # NAND
 device		nand
 
+# GPIO
+device		gpio
+
 # Flattened Device Tree
 options 	FDT			# Configure using FDT/DTB data
 options 	FDT_DTB_STATIC

Modified: head/sys/arm/conf/TS7800
==============================================================================
--- head/sys/arm/conf/TS7800	Wed Jan 20 11:34:22 2016	(r294412)
+++ head/sys/arm/conf/TS7800	Wed Jan 20 11:57:11 2016	(r294413)
@@ -76,6 +76,9 @@ device		da
 # SATA
 device		ata
 
+# GPIO
+device		gpio
+
 # Flattened Device Tree
 options 	FDT
 options 	FDT_DTB_STATIC

Modified: head/sys/arm/mv/armadaxp/armadaxp.c
==============================================================================
--- head/sys/arm/mv/armadaxp/armadaxp.c	Wed Jan 20 11:34:22 2016	(r294412)
+++ head/sys/arm/mv/armadaxp/armadaxp.c	Wed Jan 20 11:57:11 2016	(r294413)
@@ -86,13 +86,6 @@ int platform_get_ncpus(void);
 #define COHER_FABRIC_CFU		0x28
 #define COHER_FABRIC_CIB_CTRL		0x80
 
-/* XXX Make gpio driver optional and remove it */
-struct resource_spec mv_gpio_res[] = {
-	{ SYS_RES_MEMORY,	0,	RF_ACTIVE },
-	{ SYS_RES_IRQ,		0,	RF_ACTIVE },
-	{ -1, 0 }
-};
-
 struct vco_freq_ratio {
 	uint8_t	vco_cpu;	/* VCO to CLK0(CPU) clock ratio */
 	uint8_t	vco_l2c;	/* VCO to NB(L2 cache) clock ratio */

Modified: head/sys/arm/mv/files.mv
==============================================================================
--- head/sys/arm/mv/files.mv	Wed Jan 20 11:34:22 2016	(r294412)
+++ head/sys/arm/mv/files.mv	Wed Jan 20 11:57:11 2016	(r294413)
@@ -12,7 +12,7 @@
 # - JTAG/ICE
 # - Vector Floating Point (VFP) unit
 #
-arm/mv/gpio.c			standard
+arm/mv/gpio.c			optional	gpio
 arm/mv/mv_common.c		standard
 arm/mv/mv_localbus.c		standard
 arm/mv/mv_machdep.c		standard

From owner-svn-src-all@freebsd.org  Wed Jan 20 12:10:15 2016
Return-Path: <owner-svn-src-all@freebsd.org>
Delivered-To: svn-src-all@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id A3486A8A208;
 Wed, 20 Jan 2016 12:10:15 +0000 (UTC)
 (envelope-from marius@FreeBSD.org)
Received: from repo.freebsd.org (repo.freebsd.org
 [IPv6:2610:1c1:1:6068::e6a:0])
 (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
 (Client did not present a certificate)
 by mx1.freebsd.org (Postfix) with ESMTPS id 73DDE1DF9;
 Wed, 20 Jan 2016 12:10:15 +0000 (UTC)
 (envelope-from marius@FreeBSD.org)
Received: from repo.freebsd.org ([127.0.1.37])
 by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u0KCAEBb031847;
 Wed, 20 Jan 2016 12:10:14 GMT (envelope-from marius@FreeBSD.org)
Received: (from marius@localhost)
 by repo.freebsd.org (8.15.2/8.15.2/Submit) id u0KCAEwi031846;
 Wed, 20 Jan 2016 12:10:14 GMT (envelope-from marius@FreeBSD.org)
Message-Id: <201601201210.u0KCAEwi031846@repo.freebsd.org>
X-Authentication-Warning: repo.freebsd.org: marius set sender to
 marius@FreeBSD.org using -f
From: Marius Strobl <marius@FreeBSD.org>
Date: Wed, 20 Jan 2016 12:10:14 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-head@freebsd.org
Subject: svn commit: r294414 - 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-all@freebsd.org
X-Mailman-Version: 2.1.20
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for &quot;
 user&quot; and &quot; projects&quot; \)" <svn-src-all.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-all/>
List-Post: <mailto:svn-src-all@freebsd.org>
List-Help: <mailto:svn-src-all-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Wed, 20 Jan 2016 12:10:15 -0000

Author: marius
Date: Wed Jan 20 12:10:14 2016
New Revision: 294414
URL: https://svnweb.freebsd.org/changeset/base/294414

Log:
  Correct assertions in r294362, foobared when separating style fixes
  from functional changes before commit.

Modified:
  head/sys/sys/ttydevsw.h

Modified: head/sys/sys/ttydevsw.h
==============================================================================
--- head/sys/sys/ttydevsw.h	Wed Jan 20 11:57:11 2016	(r294413)
+++ head/sys/sys/ttydevsw.h	Wed Jan 20 12:10:14 2016	(r294414)
@@ -188,7 +188,8 @@ static __inline bool
 ttydevsw_busy(struct tty *tp)
 {
 
-	MPASS(tty_gone(tp));
+	tty_lock_assert(tp, MA_OWNED);
+	MPASS(!tty_gone(tp));
 
 	return (tp->t_devsw->tsw_busy(tp));
 }

From owner-svn-src-all@freebsd.org  Wed Jan 20 12:19:35 2016
Return-Path: <owner-svn-src-all@freebsd.org>
Delivered-To: svn-src-all@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id D72F3A8A6B3;
 Wed, 20 Jan 2016 12:19:35 +0000 (UTC)
 (envelope-from culot@FreeBSD.org)
Received: from repo.freebsd.org (repo.freebsd.org
 [IPv6:2610:1c1:1:6068::e6a:0])
 (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
 (Client did not present a certificate)
 by mx1.freebsd.org (Postfix) with ESMTPS id A868D1B5D;
 Wed, 20 Jan 2016 12:19:35 +0000 (UTC)
 (envelope-from culot@FreeBSD.org)
Received: from repo.freebsd.org ([127.0.1.37])
 by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u0KCJYqI035227;
 Wed, 20 Jan 2016 12:19:34 GMT (envelope-from culot@FreeBSD.org)
Received: (from culot@localhost)
 by repo.freebsd.org (8.15.2/8.15.2/Submit) id u0KCJYNO035226;
 Wed, 20 Jan 2016 12:19:34 GMT (envelope-from culot@FreeBSD.org)
Message-Id: <201601201219.u0KCJYNO035226@repo.freebsd.org>
X-Authentication-Warning: repo.freebsd.org: culot set sender to
 culot@FreeBSD.org using -f
From: Frederic Culot <culot@FreeBSD.org>
Date: Wed, 20 Jan 2016 12:19:34 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-head@freebsd.org
Subject: svn commit: r294415 - head/share/misc
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.20
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for &quot;
 user&quot; and &quot; projects&quot; \)" <svn-src-all.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-all/>
List-Post: <mailto:svn-src-all@freebsd.org>
List-Help: <mailto:svn-src-all-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Wed, 20 Jan 2016 12:19:35 -0000

Author: culot (ports committer)
Date: Wed Jan 20 12:19:34 2016
New Revision: 294415
URL: https://svnweb.freebsd.org/changeset/base/294415

Log:
  Welcome miwi back to the portmgr team

Modified:
  head/share/misc/organization.dot

Modified: head/share/misc/organization.dot
==============================================================================
--- head/share/misc/organization.dot	Wed Jan 20 12:10:14 2016	(r294414)
+++ head/share/misc/organization.dot	Wed Jan 20 12:19:34 2016	(r294415)
@@ -30,7 +30,7 @@ coresecretary [label="Core Team Secretar
 doccommitters [label="Doc/www Committers\ndoc-committers@FreeBSD.org"]
 doceng [label="Documentation Engineering Team\ndoceng@FreeBSD.org\ngjb, blackend,\ngabor, hrs"]
 portscommitters [label="Ports Committers\nports-committers@FreeBSD.org"]
-portmgr [label="Port Management Team\nportmgr@FreeBSD.org\nantoine, bapt, bdrewery,\nerwin, mat, swills"]
+portmgr [label="Port Management Team\nportmgr@FreeBSD.org\nantoine, bapt, bdrewery,\nerwin, mat, swills,\nmiwi"]
 portmgrsecretary [label="Port Management Team Secretary\nportmgr-secretary@FreeBSD.org\nculot"]
 re [label="Primary Release Engineering Team\nre@FreeBSD.org\nkib, blackend, jpaetzel, hrs, kensmith"]
 secteam [label="Security Team\nsecteam@FreeBSD.org\nsimon, qingli, delphij,\nremko, philip, stas, cperciva,\ncsjp, rwatson, miwi, bz"]

From owner-svn-src-all@freebsd.org  Wed Jan 20 13:14:38 2016
Return-Path: <owner-svn-src-all@freebsd.org>
Delivered-To: svn-src-all@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id 93058A8A2EB;
 Wed, 20 Jan 2016 13:14:38 +0000 (UTC) (envelope-from zbb@FreeBSD.org)
Received: from repo.freebsd.org (repo.freebsd.org
 [IPv6:2610:1c1:1:6068::e6a:0])
 (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
 (Client did not present a certificate)
 by mx1.freebsd.org (Postfix) with ESMTPS id 5C5A618DD;
 Wed, 20 Jan 2016 13:14:38 +0000 (UTC) (envelope-from zbb@FreeBSD.org)
Received: from repo.freebsd.org ([127.0.1.37])
 by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u0KDEbbu054411;
 Wed, 20 Jan 2016 13:14:37 GMT (envelope-from zbb@FreeBSD.org)
Received: (from zbb@localhost)
 by repo.freebsd.org (8.15.2/8.15.2/Submit) id u0KDEaCQ054397;
 Wed, 20 Jan 2016 13:14:36 GMT (envelope-from zbb@FreeBSD.org)
Message-Id: <201601201314.u0KDEaCQ054397@repo.freebsd.org>
X-Authentication-Warning: repo.freebsd.org: zbb set sender to zbb@FreeBSD.org
 using -f
From: Zbigniew Bodek <zbb@FreeBSD.org>
Date: Wed, 20 Jan 2016 13:14:36 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-head@freebsd.org
Subject: svn commit: r294416 - in head/sys: arm/conf arm/mv arm/mv/armada38x
 boot/fdt/dts/arm conf
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.20
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for &quot;
 user&quot; and &quot; projects&quot; \)" <svn-src-all.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-all/>
List-Post: <mailto:svn-src-all@freebsd.org>
List-Help: <mailto:svn-src-all-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Wed, 20 Jan 2016 13:14:38 -0000

Author: zbb
Date: Wed Jan 20 13:14:36 2016
New Revision: 294416
URL: https://svnweb.freebsd.org/changeset/base/294416

Log:
  Introduce initial support for Marvell Armada38x
  
  This commit introduces initial support for Marvell Armada38x platform.
  Changes:
  - Add common DTS files for Armada38x SoCs and DTS file for A388-GP
  - Add ARMADA38X kernel configuration
  - Add option SOC_MV_ARMADA38X and set MV_PCI_PORTS
  - Add list of files to compile
  - Implement get_tclk(), get_sar_value(), cpu_reset() functions
  - Add CPU ID and SoC numbers
  - Correct ifdefs in arm/mv/timer.c
  
  Reviewed by:    ian, imp
  Obtained from:  Semihalf
  Sponsored by:   Stormshield
  Submitted by:   Michal Stanek <mst@semihalf.com>
  Differential revision:  https://reviews.freebsd.org/D4210

Added:
  head/sys/arm/conf/ARMADA38X   (contents, props changed)
  head/sys/arm/mv/armada38x/
  head/sys/arm/mv/armada38x/armada38x.c   (contents, props changed)
  head/sys/arm/mv/armada38x/files.armada38x   (contents, props changed)
  head/sys/arm/mv/armada38x/std.armada38x   (contents, props changed)
  head/sys/boot/fdt/dts/arm/armada-380.dtsi   (contents, props changed)
  head/sys/boot/fdt/dts/arm/armada-385.dtsi   (contents, props changed)
  head/sys/boot/fdt/dts/arm/armada-388-gp.dts   (contents, props changed)
  head/sys/boot/fdt/dts/arm/armada-388.dtsi   (contents, props changed)
  head/sys/boot/fdt/dts/arm/armada-38x.dtsi   (contents, props changed)
Modified:
  head/sys/arm/mv/mv_common.c
  head/sys/arm/mv/mvreg.h
  head/sys/arm/mv/mvvar.h
  head/sys/arm/mv/mvwin.h
  head/sys/arm/mv/timer.c
  head/sys/conf/options.arm

Added: head/sys/arm/conf/ARMADA38X
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/sys/arm/conf/ARMADA38X	Wed Jan 20 13:14:36 2016	(r294416)
@@ -0,0 +1,63 @@
+#
+# Kernel configuration for Marvell Armada38x
+#
+# $FreeBSD$
+#
+
+include 	"../mv/armada38x/std.armada38x"
+include 	"std.armv6"
+
+ident 	ARMADA38X
+
+options 	SOC_MV_ARMADA38X
+
+makeoptions 	DEBUG=-g		# Build kernel with gdb(1) debug symbols
+makeoptions 	WERROR="-Werror"
+
+options 	MD_ROOT
+#makeoptions 	MFS_IMAGE=/path/to/miniroot
+options 	ROOTDEVNAME=\"ufs:md0\"
+
+options 	SCHED_ULE		# ULE scheduler
+#options 	SCHED_4BSD		# 4BSD scheduler
+
+# Debugging
+#options 	DEBUG
+#options 	VERBOSE_SYSINIT
+options 	ALT_BREAK_TO_DEBUGGER
+options 	DDB
+#options 	GDB
+#options 	DIAGNOSTIC
+options 	INVARIANTS		# Enable calls of extra sanity checking
+options 	INVARIANT_SUPPORT	# Extra sanity checks of internal structures, required by INVARIANTS
+options 	KDB
+options 	KDB_TRACE
+#options 	WITNESS			# Enable checks to detect deadlocks and cycles
+#options 	WITNESS_SKIPSPIN	# Don't run witness on spinlocks for speed
+#options 	WITNESS_KDB
+#options 	BOOTVERBOSE
+
+# Pseudo devices
+device		random
+device		pty
+device		loop
+device		md
+
+# Serial ports
+device		uart
+device		uart_ns8250
+
+# Network
+device		ether
+device		vlan
+
+# Interrupt controllers
+device		gic
+
+# Timers
+device		mpcore_timer
+
+#FDT
+options 	FDT
+options 	FDT_DTB_STATIC
+makeoptions 	FDT_DTS_FILE=armada-388-gp.dts

Added: head/sys/arm/mv/armada38x/armada38x.c
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/sys/arm/mv/armada38x/armada38x.c	Wed Jan 20 13:14:36 2016	(r294416)
@@ -0,0 +1,54 @@
+/*-
+ * Copyright (c) 2015 Semihalf.
+ * Copyright (c) 2015 Stormshield.
+ * 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 <sys/cdefs.h>
+__FBSDID("$FreeBSD$");
+
+#include <sys/param.h>
+#include <sys/systm.h>
+#include <sys/bus.h>
+
+#include <arm/mv/mvwin.h>
+#include <arm/mv/mvreg.h>
+#include <arm/mv/mvvar.h>
+
+uint32_t
+get_tclk(void)
+{
+	uint32_t sar;
+
+	/*
+	 * On Armada38x TCLK can be configured to 250 MHz or 200 MHz.
+	 * Current setting is read from Sample At Reset register.
+	 */
+	sar = (uint32_t)get_sar_value();
+	sar = (sar & TCLK_MASK) >> TCLK_SHIFT;
+	if (sar == 0)
+		return (TCLK_250MHZ);
+	else
+		return (TCLK_200MHZ);
+}

Added: head/sys/arm/mv/armada38x/files.armada38x
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/sys/arm/mv/armada38x/files.armada38x	Wed Jan 20 13:14:36 2016	(r294416)
@@ -0,0 +1,4 @@
+# $FreeBSD$
+
+arm/mv/armada38x/armada38x.c	standard
+arm/mv/rtc.c			standard

Added: head/sys/arm/mv/armada38x/std.armada38x
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/sys/arm/mv/armada38x/std.armada38x	Wed Jan 20 13:14:36 2016	(r294416)
@@ -0,0 +1,10 @@
+# $FreeBSD$
+files		"../mv/armada38x/files.armada38x"
+files		"../mv/files.mv"
+cpu		CPU_CORTEXA
+machine		arm	armv6
+
+makeoptions	CONF_CFLAGS="-march=armv7a"
+makeoptions	KERNVIRTADDR=0xc0000000
+
+options         KERNVIRTADDR=0xc0000000

Modified: head/sys/arm/mv/mv_common.c
==============================================================================
--- head/sys/arm/mv/mv_common.c	Wed Jan 20 12:19:34 2016	(r294415)
+++ head/sys/arm/mv/mv_common.c	Wed Jan 20 13:14:36 2016	(r294416)
@@ -260,7 +260,7 @@ write_cpu_ctrl(uint32_t reg, uint32_t va
 	bus_space_write_4(fdtbus_bs_tag, MV_CPU_CONTROL_BASE, reg, val);
 }
 
-#if defined(SOC_MV_ARMADAXP)
+#if defined(SOC_MV_ARMADAXP) || defined(SOC_MV_ARMADA38X)
 uint32_t
 read_cpu_mp_clocks(uint32_t reg)
 {
@@ -294,7 +294,7 @@ void
 cpu_reset(void)
 {
 
-#if defined(SOC_MV_ARMADAXP)
+#if defined(SOC_MV_ARMADAXP) || defined (SOC_MV_ARMADA38X)
 	write_cpu_misc(RSTOUTn_MASK, SOFT_RST_OUT_EN);
 	write_cpu_misc(SYSTEM_SOFT_RESET, SYS_SOFT_RST);
 #else
@@ -442,6 +442,15 @@ soc_identify(void)
 		else if (r == 1)
 			rev = "A1";
 		break;
+	case MV_DEV_88F6828:
+		dev = "Marvell 88F6828";
+		break;
+	case MV_DEV_88F6820:
+		dev = "Marvell 88F6820";
+		break;
+	case MV_DEV_88F6810:
+		dev = "Marvell 88F6810";
+		break;
 	case MV_DEV_MV78100_Z0:
 		dev = "Marvell MV78100 Z0";
 		break;
@@ -2195,6 +2204,10 @@ get_sar_value(void)
 	    SAMPLE_AT_RESET_HI);
 	sar_low = bus_space_read_4(fdtbus_bs_tag, MV_MISC_BASE,
 	    SAMPLE_AT_RESET_LO);
+#elif defined(SOC_MV_ARMADA38X)
+	sar_high = 0;
+	sar_low = bus_space_read_4(fdtbus_bs_tag, MV_MISC_BASE,
+	    SAMPLE_AT_RESET);
 #else
 	/*
 	 * TODO: Add getting proper values for other SoC configurations

Modified: head/sys/arm/mv/mvreg.h
==============================================================================
--- head/sys/arm/mv/mvreg.h	Wed Jan 20 12:19:34 2016	(r294415)
+++ head/sys/arm/mv/mvreg.h	Wed Jan 20 13:14:36 2016	(r294416)
@@ -123,7 +123,7 @@
 /*
  * System reset
  */
-#if defined(SOC_MV_ARMADAXP)
+#if defined(SOC_MV_ARMADAXP) || defined(SOC_MV_ARMADA38X)
 #define RSTOUTn_MASK		0x60
 #define SYSTEM_SOFT_RESET	0x64
 #define WD_RSTOUTn_MASK		0x4
@@ -346,6 +346,8 @@
 #define SAMPLE_AT_RESET		0x30
 #elif defined(SOC_MV_FREY)
 #define SAMPLE_AT_RESET		0x100
+#elif defined(SOC_MV_ARMADA38X)
+#define SAMPLE_AT_RESET		0x400
 #endif
 #if defined(SOC_MV_DISCOVERY)
 #define SAMPLE_AT_RESET_LO	0x30
@@ -370,6 +372,9 @@
 #elif defined(SOC_MV_LOKIPLUS)
 #define TCLK_MASK		0x0000F000
 #define TCLK_SHIFT		0x0C
+#elif defined(SOC_MV_ARMADA38X)
+#define TCLK_MASK		0x00008000
+#define TCLK_SHIFT		15
 #endif
 
 #define TCLK_100MHZ		100000000
@@ -415,6 +420,9 @@
 #define MV_DEV_88F6281		0x6281
 #define MV_DEV_88F6282		0x6282
 #define MV_DEV_88F6781		0x6781
+#define MV_DEV_88F6828		0x6828
+#define MV_DEV_88F6820		0x6820
+#define MV_DEV_88F6810		0x6810
 #define MV_DEV_MV78100_Z0	0x6381
 #define MV_DEV_MV78100		0x7810
 #define MV_DEV_MV78130		0x7813

Modified: head/sys/arm/mv/mvvar.h
==============================================================================
--- head/sys/arm/mv/mvvar.h	Wed Jan 20 12:19:34 2016	(r294415)
+++ head/sys/arm/mv/mvvar.h	Wed Jan 20 13:14:36 2016	(r294416)
@@ -109,7 +109,7 @@ uint32_t get_l2clk(void);
 uint32_t read_cpu_ctrl(uint32_t);
 void write_cpu_ctrl(uint32_t, uint32_t);
 
-#if defined(SOC_MV_ARMADAXP)
+#if defined(SOC_MV_ARMADAXP) || defined(SOC_MV_ARMADA38X)
 uint32_t read_cpu_mp_clocks(uint32_t reg);
 void write_cpu_mp_clocks(uint32_t reg, uint32_t val);
 uint32_t read_cpu_misc(uint32_t reg);

Modified: head/sys/arm/mv/mvwin.h
==============================================================================
--- head/sys/arm/mv/mvwin.h	Wed Jan 20 12:19:34 2016	(r294415)
+++ head/sys/arm/mv/mvwin.h	Wed Jan 20 13:14:36 2016	(r294416)
@@ -73,6 +73,8 @@
 #define MV_PCI_PORTS	2	/* 2x PCIE */
 #elif defined(SOC_MV_ARMADAXP)
 #define MV_PCI_PORTS	3	/* 3x PCIE */
+#elif defined(SOC_MV_ARMADA38X)
+#define MV_PCI_PORTS	4	/* 4x PCIE */
 #else
 #error "MV_PCI_PORTS not configured !"
 #endif
@@ -129,7 +131,7 @@
 #endif
 #define MV_MPP_BASE		(MV_BASE + 0x10000)
 
-#if defined(SOC_MV_ARMADAXP)
+#if defined(SOC_MV_ARMADAXP) || defined(SOC_MV_ARMADA38X)
 #define MV_MISC_BASE		(MV_BASE + 0x18200)
 #define MV_MBUS_BRIDGE_BASE	(MV_BASE + 0x20000)
 #define MV_INTREGS_BASE		(MV_MBUS_BRIDGE_BASE + 0x80)

Modified: head/sys/arm/mv/timer.c
==============================================================================
--- head/sys/arm/mv/timer.c	Wed Jan 20 12:19:34 2016	(r294415)
+++ head/sys/arm/mv/timer.c	Wed Jan 20 13:14:36 2016	(r294416)
@@ -54,7 +54,7 @@ __FBSDID("$FreeBSD$");
 #define INITIAL_TIMECOUNTER	(0xffffffff)
 #define MAX_WATCHDOG_TICKS	(0xffffffff)
 
-#if defined(SOC_MV_ARMADAXP)
+#if defined(SOC_MV_ARMADAXP) || defined(SOC_MV_ARMADA38X)
 #define MV_CLOCK_SRC		25000000	/* Timers' 25MHz mode */
 #else
 #define MV_CLOCK_SRC		get_tclk()
@@ -124,7 +124,7 @@ mv_timer_attach(device_t dev)
 	int	error;
 	void	*ihl;
 	struct	mv_timer_softc *sc;
-#if !defined(SOC_MV_ARMADAXP)
+#if !defined(SOC_MV_ARMADAXP) && !defined(SOC_MV_ARMADA38X)
 	uint32_t irq_cause, irq_mask;
 #endif
 
@@ -155,7 +155,7 @@ mv_timer_attach(device_t dev)
 	}
 
 	mv_setup_timers();
-#if !defined(SOC_MV_ARMADAXP)
+#if !defined(SOC_MV_ARMADAXP) && !defined(SOC_MV_ARMADA38X)
 	irq_cause = read_cpu_ctrl(BRIDGE_IRQ_CAUSE);
         irq_cause &= IRQ_TIMER0_CLR;
 
@@ -294,7 +294,7 @@ static void
 mv_watchdog_enable(void)
 {
 	uint32_t val, irq_cause;
-#if !defined(SOC_MV_ARMADAXP)
+#if !defined(SOC_MV_ARMADAXP) && !defined(SOC_MV_ARMADA38X)
 	uint32_t irq_mask;
 #endif
 
@@ -302,7 +302,7 @@ mv_watchdog_enable(void)
 	irq_cause &= IRQ_TIMER_WD_CLR;
 	write_cpu_ctrl(BRIDGE_IRQ_CAUSE, irq_cause);
 
-#if defined(SOC_MV_ARMADAXP)
+#if defined(SOC_MV_ARMADAXP) || defined(SOC_MV_ARMADA38X)
 	val = read_cpu_mp_clocks(WD_RSTOUTn_MASK);
 	val |= (WD_GLOBAL_MASK | WD_CPU0_MASK);
 	write_cpu_mp_clocks(WD_RSTOUTn_MASK, val);
@@ -318,7 +318,7 @@ mv_watchdog_enable(void)
 
 	val = mv_get_timer_control();
 	val |= CPU_TIMER_WD_EN | CPU_TIMER_WD_AUTO;
-#if defined(SOC_MV_ARMADAXP)
+#if defined(SOC_MV_ARMADAXP) || defined(SOC_MV_ARMADA38X)
 	val |= CPU_TIMER_WD_25MHZ_EN;
 #endif
 	mv_set_timer_control(val);
@@ -328,7 +328,7 @@ static void
 mv_watchdog_disable(void)
 {
 	uint32_t val, irq_cause;
-#if !defined(SOC_MV_ARMADAXP)
+#if !defined(SOC_MV_ARMADAXP) && !defined(SOC_MV_ARMADA38X)
 	uint32_t irq_mask;
 #endif
 
@@ -336,7 +336,7 @@ mv_watchdog_disable(void)
 	val &= ~(CPU_TIMER_WD_EN | CPU_TIMER_WD_AUTO);
 	mv_set_timer_control(val);
 
-#if defined(SOC_MV_ARMADAXP)
+#if defined(SOC_MV_ARMADAXP) || defined(SOC_MV_ARMADA38X)
 	val = read_cpu_mp_clocks(WD_RSTOUTn_MASK);
 	val &= ~(WD_GLOBAL_MASK | WD_CPU0_MASK);
 	write_cpu_mp_clocks(WD_RSTOUTn_MASK, val);
@@ -438,7 +438,7 @@ mv_setup_timers(void)
 	val = mv_get_timer_control();
 	val &= ~(CPU_TIMER0_EN | CPU_TIMER0_AUTO);
 	val |= CPU_TIMER1_EN | CPU_TIMER1_AUTO;
-#if defined(SOC_MV_ARMADAXP)
+#if defined(SOC_MV_ARMADAXP) || defined(SOC_MV_ARMADA38X)
 	/* Enable 25MHz mode */
 	val |= CPU_TIMER0_25MHZ_EN | CPU_TIMER1_25MHZ_EN;
 #endif

Added: head/sys/boot/fdt/dts/arm/armada-380.dtsi
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/sys/boot/fdt/dts/arm/armada-380.dtsi	Wed Jan 20 13:14:36 2016	(r294416)
@@ -0,0 +1,154 @@
+/*
+ * Device Tree Include file for Marvell Armada 380 SoC.
+ *
+ * Copyright (C) 2014 Marvell
+ *
+ * Lior Amsalem <alior@marvell.com>
+ * Gregory CLEMENT <gregory.clement@free-electrons.com>
+ * Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
+ *
+ * This file is dual-licensed: you can use it either under the terms
+ * of the GPL or the X11 license, at your option. Note that this dual
+ * licensing only applies to this file, and not this project as a
+ * whole.
+ *
+ *  a) This file is free software; you can redistribute it and/or
+ *     modify it under the terms of the GNU General Public License as
+ *     published by the Free Software Foundation; either version 2 of the
+ *     License, or (at your option) any later version.
+ *
+ *     This file is distributed in the hope that it will be useful
+ *     but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *     GNU General Public License for more details.
+ *
+ * Or, alternatively
+ *
+ *  b) Permission is hereby granted, free of charge, to any person
+ *     obtaining a copy of this software and associated documentation
+ *     files (the "Software"), to deal in the Software without
+ *     restriction, including without limitation the rights to use
+ *     copy, modify, merge, publish, distribute, sublicense, and/or
+ *     sell copies of the Software, and to permit persons to whom the
+ *     Software is furnished to do so, subject to the following
+ *     conditions:
+ *
+ *     The above copyright notice and this permission notice shall be
+ *     included in all copies or substantial portions of the Software.
+ *
+ *     THE SOFTWARE IS PROVIDED , WITHOUT WARRANTY OF ANY KIND
+ *     EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
+ *     OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ *     NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
+ *     HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY
+ *     WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ *     FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ *     OTHER DEALINGS IN THE SOFTWARE.
+ *
+ * $FreeBSD$
+ */
+
+#include "armada-38x.dtsi"
+
+/ {
+	model = "Marvell Armada 380 family SoC";
+	compatible = "marvell,armada380";
+
+	cpus {
+		#address-cells = <1>;
+		#size-cells = <0>;
+		enable-method = "marvell,armada-380-smp";
+
+		cpu@0 {
+			device_type = "cpu";
+			compatible = "arm,cortex-a9";
+			reg = <0>;
+		};
+	};
+
+	soc {
+		internal-regs {
+			pinctrl@18000 {
+				compatible = "marvell,mv88f6810-pinctrl";
+			};
+		};
+
+		pcie-controller {
+			compatible = "marvell,armada-370-pcie";
+			status = "disabled";
+			device_type = "pci";
+
+			#address-cells = <3>;
+			#size-cells = <2>;
+
+			msi-parent = <&mpic>;
+			bus-range = <0x00 0xff>;
+
+			ranges =
+			       <0x82000000 0 0x80000 MBUS_ID(0xf0, 0x01) 0x80000 0 0x00002000
+				0x82000000 0 0x40000 MBUS_ID(0xf0, 0x01) 0x40000 0 0x00002000
+				0x82000000 0 0x44000 MBUS_ID(0xf0, 0x01) 0x44000 0 0x00002000
+				0x82000000 0 0x48000 MBUS_ID(0xf0, 0x01) 0x48000 0 0x00002000
+				0x82000000 0x1 0     MBUS_ID(0x08, 0xe8) 0 1 0 /* Port 0 MEM */
+				0x81000000 0x1 0     MBUS_ID(0x08, 0xe0) 0 1 0 /* Port 0 IO  */
+				0x82000000 0x2 0     MBUS_ID(0x04, 0xe8) 0 1 0 /* Port 1 MEM */
+				0x81000000 0x2 0     MBUS_ID(0x04, 0xe0) 0 1 0 /* Port 1 IO  */
+				0x82000000 0x3 0     MBUS_ID(0x04, 0xd8) 0 1 0 /* Port 2 MEM */
+				0x81000000 0x3 0     MBUS_ID(0x04, 0xd0) 0 1 0 /* Port 2 IO  */>;
+
+			/* x1 port */
+			pcie@1,0 {
+				device_type = "pci";
+				assigned-addresses = <0x82000800 0 0x80000 0 0x2000>;
+				reg = <0x0800 0 0 0 0>;
+				#address-cells = <3>;
+				#size-cells = <2>;
+				#interrupt-cells = <1>;
+				ranges = <0x82000000 0 0 0x82000000 0x1 0 1 0
+					  0x81000000 0 0 0x81000000 0x1 0 1 0>;
+				interrupt-map-mask = <0 0 0 0>;
+				interrupt-map = <0 0 0 0 &gic GIC_SPI 29 IRQ_TYPE_LEVEL_HIGH>;
+				marvell,pcie-port = <0>;
+				marvell,pcie-lane = <0>;
+				clocks = <&gateclk 8>;
+				status = "disabled";
+			};
+
+			/* x1 port */
+			pcie@2,0 {
+				device_type = "pci";
+				assigned-addresses = <0x82000800 0 0x40000 0 0x2000>;
+				reg = <0x1000 0 0 0 0>;
+				#address-cells = <3>;
+				#size-cells = <2>;
+				#interrupt-cells = <1>;
+				ranges = <0x82000000 0 0 0x82000000 0x2 0 1 0
+					  0x81000000 0 0 0x81000000 0x2 0 1 0>;
+				interrupt-map-mask = <0 0 0 0>;
+				interrupt-map = <0 0 0 0 &gic GIC_SPI 33 IRQ_TYPE_LEVEL_HIGH>;
+				marvell,pcie-port = <1>;
+				marvell,pcie-lane = <0>;
+				clocks = <&gateclk 5>;
+				status = "disabled";
+			};
+
+			/* x1 port */
+			pcie@3,0 {
+				device_type = "pci";
+				assigned-addresses = <0x82000800 0 0x44000 0 0x2000>;
+				reg = <0x1800 0 0 0 0>;
+				#address-cells = <3>;
+				#size-cells = <2>;
+				#interrupt-cells = <1>;
+				ranges = <0x82000000 0 0 0x82000000 0x3 0 1 0
+					  0x81000000 0 0 0x81000000 0x3 0 1 0>;
+				interrupt-map-mask = <0 0 0 0>;
+				interrupt-map = <0 0 0 0 &gic GIC_SPI 70 IRQ_TYPE_LEVEL_HIGH>;
+				marvell,pcie-port = <2>;
+				marvell,pcie-lane = <0>;
+				clocks = <&gateclk 6>;
+				status = "disabled";
+			};
+		};
+	};
+};

Added: head/sys/boot/fdt/dts/arm/armada-385.dtsi
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/sys/boot/fdt/dts/arm/armada-385.dtsi	Wed Jan 20 13:14:36 2016	(r294416)
@@ -0,0 +1,186 @@
+/*
+ * Device Tree Include file for Marvell Armada 385 SoC.
+ *
+ * Copyright (C) 2014 Marvell
+ *
+ * Lior Amsalem <alior@marvell.com>
+ * Gregory CLEMENT <gregory.clement@free-electrons.com>
+ * Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
+ *
+ * This file is dual-licensed: you can use it either under the terms
+ * of the GPL or the X11 license, at your option. Note that this dual
+ * licensing only applies to this file, and not this project as a
+ * whole.
+ *
+ *  a) This file is free software; you can redistribute it and/or
+ *     modify it under the terms of the GNU General Public License as
+ *     published by the Free Software Foundation; either version 2 of the
+ *     License, or (at your option) any later version.
+ *
+ *     This file is distributed in the hope that it will be useful
+ *     but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *     GNU General Public License for more details.
+ *
+ * Or, alternatively
+ *
+ *  b) Permission is hereby granted, free of charge, to any person
+ *     obtaining a copy of this software and associated documentation
+ *     files (the "Software"), to deal in the Software without
+ *     restriction, including without limitation the rights to use
+ *     copy, modify, merge, publish, distribute, sublicense, and/or
+ *     sell copies of the Software, and to permit persons to whom the
+ *     Software is furnished to do so, subject to the following
+ *     conditions:
+ *
+ *     The above copyright notice and this permission notice shall be
+ *     included in all copies or substantial portions of the Software.
+ *
+ *     THE SOFTWARE IS PROVIDED , WITHOUT WARRANTY OF ANY KIND
+ *     EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
+ *     OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ *     NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
+ *     HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY
+ *     WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ *     FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ *     OTHER DEALINGS IN THE SOFTWARE.
+ *
+ * $FreeBSD$
+ */
+
+#include "armada-38x.dtsi"
+
+/ {
+	model = "Marvell Armada 385 family SoC";
+	compatible = "marvell,armada385", "marvell,armada380";
+
+	cpus {
+		#address-cells = <1>;
+		#size-cells = <0>;
+		enable-method = "marvell,armada-380-smp";
+
+		cpu@0 {
+			device_type = "cpu";
+			compatible = "arm,cortex-a9";
+			reg = <0>;
+		};
+		cpu@1 {
+			device_type = "cpu";
+			compatible = "arm,cortex-a9";
+			reg = <1>;
+		};
+	};
+
+	soc {
+		internal-regs {
+			pinctrl@18000 {
+				compatible = "marvell,mv88f6820-pinctrl";
+			};
+		};
+
+		pcie-controller {
+			compatible = "marvell,armada-370-pcie";
+			status = "disabled";
+			device_type = "pci";
+
+			#address-cells = <3>;
+			#size-cells = <2>;
+
+			msi-parent = <&mpic>;
+			bus-range = <0x00 0xff>;
+
+			ranges =
+			       <0x82000000 0 0x80000 MBUS_ID(0xf0, 0x01) 0x80000 0 0x00002000
+				0x82000000 0 0x40000 MBUS_ID(0xf0, 0x01) 0x40000 0 0x00002000
+				0x82000000 0 0x44000 MBUS_ID(0xf0, 0x01) 0x44000 0 0x00002000
+				0x82000000 0 0x48000 MBUS_ID(0xf0, 0x01) 0x48000 0 0x00002000
+				0x82000000 0x1 0     MBUS_ID(0x08, 0xe8) 0 1 0 /* Port 0 MEM */
+				0x81000000 0x1 0     MBUS_ID(0x08, 0xe0) 0 1 0 /* Port 0 IO  */
+				0x82000000 0x2 0     MBUS_ID(0x04, 0xe8) 0 1 0 /* Port 1 MEM */
+				0x81000000 0x2 0     MBUS_ID(0x04, 0xe0) 0 1 0 /* Port 1 IO  */
+				0x82000000 0x3 0     MBUS_ID(0x04, 0xd8) 0 1 0 /* Port 2 MEM */
+				0x81000000 0x3 0     MBUS_ID(0x04, 0xd0) 0 1 0 /* Port 2 IO  */
+				0x82000000 0x4 0     MBUS_ID(0x04, 0xb8) 0 1 0 /* Port 3 MEM */
+				0x81000000 0x4 0     MBUS_ID(0x04, 0xb0) 0 1 0 /* Port 3 IO  */>;
+
+			/*
+			 * This port can be either x4 or x1. When
+			 * configured in x4 by the bootloader, then
+			 * pcie@4,0 is not available.
+			 */
+			pcie@1,0 {
+				device_type = "pci";
+				assigned-addresses = <0x82000800 0 0x80000 0 0x2000>;
+				reg = <0x0800 0 0 0 0>;
+				#address-cells = <3>;
+				#size-cells = <2>;
+				#interrupt-cells = <1>;
+				ranges = <0x82000000 0 0 0x82000000 0x1 0 1 0
+					  0x81000000 0 0 0x81000000 0x1 0 1 0>;
+				interrupt-map-mask = <0 0 0 0>;
+				interrupt-map = <0 0 0 0 &gic GIC_SPI 29 IRQ_TYPE_LEVEL_HIGH>;
+				marvell,pcie-port = <0>;
+				marvell,pcie-lane = <0>;
+				clocks = <&gateclk 8>;
+				status = "disabled";
+			};
+
+			/* x1 port */
+			pcie@2,0 {
+				device_type = "pci";
+				assigned-addresses = <0x82000800 0 0x40000 0 0x2000>;
+				reg = <0x1000 0 0 0 0>;
+				#address-cells = <3>;
+				#size-cells = <2>;
+				#interrupt-cells = <1>;
+				ranges = <0x82000000 0 0 0x82000000 0x2 0 1 0
+					  0x81000000 0 0 0x81000000 0x2 0 1 0>;
+				interrupt-map-mask = <0 0 0 0>;
+				interrupt-map = <0 0 0 0 &gic GIC_SPI 33 IRQ_TYPE_LEVEL_HIGH>;
+				marvell,pcie-port = <1>;
+				marvell,pcie-lane = <0>;
+				clocks = <&gateclk 5>;
+				status = "disabled";
+			};
+
+			/* x1 port */
+			pcie@3,0 {
+				device_type = "pci";
+				assigned-addresses = <0x82000800 0 0x44000 0 0x2000>;
+				reg = <0x1800 0 0 0 0>;
+				#address-cells = <3>;
+				#size-cells = <2>;
+				#interrupt-cells = <1>;
+				ranges = <0x82000000 0 0 0x82000000 0x3 0 1 0
+					  0x81000000 0 0 0x81000000 0x3 0 1 0>;
+				interrupt-map-mask = <0 0 0 0>;
+				interrupt-map = <0 0 0 0 &gic GIC_SPI 70 IRQ_TYPE_LEVEL_HIGH>;
+				marvell,pcie-port = <2>;
+				marvell,pcie-lane = <0>;
+				clocks = <&gateclk 6>;
+				status = "disabled";
+			};
+
+			/*
+			 * x1 port only available when pcie@1,0 is
+			 * configured as a x1 port
+			 */
+			pcie@4,0 {
+				device_type = "pci";
+				assigned-addresses = <0x82000800 0 0x48000 0 0x2000>;
+				reg = <0x2000 0 0 0 0>;
+				#address-cells = <3>;
+				#size-cells = <2>;
+				#interrupt-cells = <1>;
+				ranges = <0x82000000 0 0 0x82000000 0x4 0 1 0
+					  0x81000000 0 0 0x81000000 0x4 0 1 0>;
+				interrupt-map-mask = <0 0 0 0>;
+				interrupt-map = <0 0 0 0 &gic GIC_SPI 71 IRQ_TYPE_LEVEL_HIGH>;
+				marvell,pcie-port = <3>;
+				marvell,pcie-lane = <0>;
+				clocks = <&gateclk 7>;
+				status = "disabled";
+			};
+		};
+	};
+};

Added: head/sys/boot/fdt/dts/arm/armada-388-gp.dts
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/sys/boot/fdt/dts/arm/armada-388-gp.dts	Wed Jan 20 13:14:36 2016	(r294416)
@@ -0,0 +1,415 @@
+/*
+ * Device Tree file for Marvell Armada 385 development board
+ * (RD-88F6820-GP)
+ *
+ * Copyright (C) 2014 Marvell
+ *
+ * Gregory CLEMENT <gregory.clement@free-electrons.com>
+ *
+ * This file is dual-licensed: you can use it either under the terms
+ * of the GPL or the X11 license, at your option. Note that this dual
+ * licensing only applies to this file, and not this project as a
+ * whole.
+ *
+ *  a) This file is licensed under the terms of the GNU General Public
+ *     License version 2.  This program is licensed "as is" without
+ *     any warranty of any kind, whether express or implied.
+ *
+ * Or, alternatively,
+ *
+ *  b) Permission is hereby granted, free of charge, to any person
+ *     obtaining a copy of this software and associated documentation
+ *     files (the "Software"), to deal in the Software without
+ *     restriction, including without limitation the rights to use,
+ *     copy, modify, merge, publish, distribute, sublicense, and/or
+ *     sell copies of the Software, and to permit persons to whom the
+ *     Software is furnished to do so, subject to the following
+ *     conditions:
+ *
+ *     The above copyright notice and this permission notice shall be
+ *     included in all copies or substantial portions of the Software.
+ *
+ *     THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ *     EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
+ *     OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ *     NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
+ *     HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+ *     WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ *     FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ *     OTHER DEALINGS IN THE SOFTWARE.
+ *
+ * $FreeBSD$
+ */
+
+/dts-v1/;
+#include "armada-388.dtsi"
+#include <dt-bindings/gpio/gpio.h>
+
+/ {
+	model = "Marvell Armada 385 GP";
+	compatible = "marvell,a385-gp", "marvell,armada388", "marvell,armada380";
+
+	chosen {
+		stdout-path = "serial0:115200n8";
+	};
+
+	memory {
+		device_type = "memory";
+		reg = <0x00000000 0x80000000>; /* 2 GB */
+	};
+
+	soc {
+		ranges = <MBUS_ID(0xf0, 0x01) 0 0xf1000000 0x100000
+			  MBUS_ID(0x01, 0x1d) 0 0xfff00000 0x100000>;
+
+		internal-regs {
+			spi@10600 {
+				pinctrl-names = "default";
+				pinctrl-0 = <&spi0_pins>;
+				status = "okay";
+
+				spi-flash@0 {
+					#address-cells = <1>;
+					#size-cells = <1>;
+					compatible = "st,m25p128", "jedec,spi-nor";
+					reg = <0>; /* Chip select 0 */
+					spi-max-frequency = <50000000>;
+					m25p,fast-read;
+				};
+			};
+
+			i2c@11000 {
+				pinctrl-names = "default";
+				pinctrl-0 = <&i2c0_pins>;
+				status = "okay";
+				clock-frequency = <100000>;
+				/*
+				 * The EEPROM located at adresse 54 is needed
+				 * for the boot - DO NOT ERASE IT -
+				 */
+
+				expander0: pca9555@20 {
+					compatible = "nxp,pca9555";
+					pinctrl-names = "default";
+					pinctrl-0 = <&pca0_pins>;
+					interrupt-parent = <&gpio0>;
+					interrupts = <18 IRQ_TYPE_EDGE_FALLING>;
+					gpio-controller;
+					#gpio-cells = <2>;
+					interrupt-controller;
+					#interrupt-cells = <2>;
+					reg = <0x20>;
+				};
+
+				expander1: pca9555@21 {
+					compatible = "nxp,pca9555";
+					pinctrl-names = "default";
+					interrupt-parent = <&gpio0>;
+					interrupts = <18 IRQ_TYPE_EDGE_FALLING>;
+					gpio-controller;
+					#gpio-cells = <2>;
+					interrupt-controller;
+					#interrupt-cells = <2>;
+					reg = <0x21>;
+				};
+
+			};
+
+			serial@12000 {
+				/*
+				 * Exported on the micro USB connector CON16
+				 * through an FTDI
+				 */
+
+				pinctrl-names = "default";
+				pinctrl-0 = <&uart0_pins>;
+				status = "okay";
+			};
+
+			/* GE1 CON15 */
+			ethernet@30000 {
+				pinctrl-names = "default";
+				pinctrl-0 = <&ge1_rgmii_pins>;
+				status = "okay";
+				phy = <&phy1>;
+				phy-mode = "rgmii-id";
+			};
+
+			/* CON4 */
+			usb@58000 {
+				vcc-supply = <&reg_usb2_0_vbus>;
+				status = "okay";
+			};
+
+			/* GE0 CON1 */
+			ethernet@70000 {
+				pinctrl-names = "default";
+				/*
+				 * The Reference Clock 0 is used to provide a
+				 * clock to the PHY
+				 */
+				pinctrl-0 = <&ge0_rgmii_pins>, <&ref_clk0_pins>;
+				status = "okay";
+				phy = <&phy0>;
+				phy-mode = "rgmii-id";
+			};
+
+
+			mdio@72004 {
+				pinctrl-names = "default";
+				pinctrl-0 = <&mdio_pins>;
+
+				phy0: ethernet-phy@1 {
+					reg = <1>;
+				};
+
+				phy1: ethernet-phy@0 {
+					reg = <0>;
+				};
+			};
+
+			sata@a8000 {
+				pinctrl-names = "default";
+				pinctrl-0 = <&sata0_pins>, <&sata1_pins>;
+				status = "okay";
+				#address-cells = <1>;
+				#size-cells = <0>;
+
+				sata0: sata-port@0 {
+					reg = <0>;
+					target-supply = <&reg_5v_sata0>;
+				};
+
+				sata1: sata-port@1 {
+					reg = <1>;
+					target-supply = <&reg_5v_sata1>;
+				};
+			};
+
+			sata@e0000 {
+				pinctrl-names = "default";
+				pinctrl-0 = <&sata2_pins>, <&sata3_pins>;
+				status = "okay";
+				#address-cells = <1>;
+				#size-cells = <0>;
+
+				sata2: sata-port@0 {
+					reg = <0>;
+					target-supply = <&reg_5v_sata2>;
+				};
+
+				sata3: sata-port@1 {
+					reg = <1>;
+					target-supply = <&reg_5v_sata3>;
+				};
+			};
+
+			sdhci@d8000 {
+				pinctrl-names = "default";
+				pinctrl-0 = <&sdhci_pins>;
+				cd-gpios = <&expander0 5 GPIO_ACTIVE_LOW>;
+				no-1-8-v;
+				wp-inverted;
+				bus-width = <8>;
+				status = "okay";
+			};
+
+			/* CON5 */
+			usb3@f0000 {
+				vcc-supply = <&reg_usb2_1_vbus>;
+				status = "okay";
+			};
+
+			/* CON7 */
+			usb3@f8000 {
+				vcc-supply = <&reg_usb3_vbus>;
+				status = "okay";
+			};
+		};
+
+		pcie-controller {
+			status = "okay";
+			/*
+			 * One PCIe units is accessible through
+			 * standard PCIe slot on the board.
+			 */
+			pcie@1,0 {
+				/* Port 0, Lane 0 */
+				status = "okay";
+			};
+
+			/*
+			 * The two other PCIe units are accessible
+			 * through mini PCIe slot on the board.
+			 */
+			pcie@2,0 {
+				/* Port 1, Lane 0 */
+				status = "okay";
+			};
+			pcie@3,0 {
+				/* Port 2, Lane 0 */
+				status = "okay";
+			};
+		};
+
+		gpio-fan {
+			compatible = "gpio-fan";
+			gpios = <&expander1 3 GPIO_ACTIVE_HIGH>;
+			gpio-fan,speed-map = <	 0 0
+					      3000 1>;
+		};
+	};
+
+	reg_usb3_vbus: usb3-vbus {
+		compatible = "regulator-fixed";
+		regulator-name = "usb3-vbus";
+		regulator-min-microvolt = <5000000>;
+		regulator-max-microvolt = <5000000>;
+		enable-active-high;
+		regulator-always-on;
+		gpio = <&expander1 15 GPIO_ACTIVE_HIGH>;
+	};
+
+	reg_usb2_0_vbus: v5-vbus0 {
+		compatible = "regulator-fixed";
+		regulator-name = "v5.0-vbus0";
+		regulator-min-microvolt = <5000000>;
+		regulator-max-microvolt = <5000000>;
+		enable-active-high;
+		regulator-always-on;
+		gpio = <&expander1 14 GPIO_ACTIVE_HIGH>;
+	};
+
+	reg_usb2_1_vbus: v5-vbus1 {
+		compatible = "regulator-fixed";
+		regulator-name = "v5.0-vbus1";
+		regulator-min-microvolt = <5000000>;
+		regulator-max-microvolt = <5000000>;
+		enable-active-high;
+		regulator-always-on;
+		gpio = <&expander0 4 GPIO_ACTIVE_HIGH>;
+	};
+
+	reg_usb2_1_vbus: v5-vbus1 {
+		compatible = "regulator-fixed";
+		regulator-name = "v5.0-vbus1";
+		regulator-min-microvolt = <5000000>;
+		regulator-max-microvolt = <5000000>;
+		enable-active-high;
+		regulator-always-on;
+		gpio = <&expander0 4 GPIO_ACTIVE_HIGH>;
+	};
+
+	reg_sata0: pwr-sata0 {
+		compatible = "regulator-fixed";
+		regulator-name = "pwr_en_sata0";
+		enable-active-high;
+		regulator-always-on;

*** DIFF OUTPUT TRUNCATED AT 1000 LINES ***

From owner-svn-src-all@freebsd.org  Wed Jan 20 13:23:05 2016
Return-Path: <owner-svn-src-all@freebsd.org>
Delivered-To: svn-src-all@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6FF42A8A794;
 Wed, 20 Jan 2016 13:23:05 +0000 (UTC)
 (envelope-from royger@FreeBSD.org)
Received: from repo.freebsd.org (repo.freebsd.org
 [IPv6:2610:1c1:1:6068::e6a:0])
 (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
 (Client did not present a certificate)
 by mx1.freebsd.org (Postfix) with ESMTPS id 0ECDE1938;
 Wed, 20 Jan 2016 13:23:04 +0000 (UTC)
 (envelope-from royger@FreeBSD.org)
Received: from repo.freebsd.org ([127.0.1.37])
 by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u0KDN48p057938;
 Wed, 20 Jan 2016 13:23:04 GMT (envelope-from royger@FreeBSD.org)
Received: (from royger@localhost)
 by repo.freebsd.org (8.15.2/8.15.2/Submit) id u0KDN2s0057920;
 Wed, 20 Jan 2016 13:23:02 GMT (envelope-from royger@FreeBSD.org)
Message-Id: <201601201323.u0KDN2s0057920@repo.freebsd.org>
X-Authentication-Warning: repo.freebsd.org: royger set sender to
 royger@FreeBSD.org using -f
From: =?UTF-8?Q?Roger_Pau_Monn=c3=a9?= <royger@FreeBSD.org>
Date: Wed, 20 Jan 2016 13:23:02 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org
Subject: svn commit: r294417 - in stable/10/sys/boot: common fdt forth
 i386/libi386 i386/loader
X-SVN-Group: stable-10
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.20
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for &quot;
 user&quot; and &quot; projects&quot; \)" <svn-src-all.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-all/>
List-Post: <mailto:svn-src-all@freebsd.org>
List-Help: <mailto:svn-src-all-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Wed, 20 Jan 2016 13:23:05 -0000

Author: royger
Date: Wed Jan 20 13:23:02 2016
New Revision: 294417
URL: https://svnweb.freebsd.org/changeset/base/294417

Log:
  MFC r277215, r277291, r277418, r280953 and r280954:
  
  loader: implement multiboot support for Xen Dom0
  
  Note that only the subset of the multiboot specification needed in order to
  boot a Xen Dom0 is implemented.
  
  Sponsored by: Citrix Systems R&D

Added:
  stable/10/sys/boot/i386/libi386/multiboot.c
     - copied, changed from r277215, head/sys/boot/i386/libi386/multiboot.c
  stable/10/sys/boot/i386/libi386/multiboot.h
     - copied unchanged from r277215, head/sys/boot/i386/libi386/multiboot.h
  stable/10/sys/boot/i386/libi386/multiboot_tramp.S
     - copied unchanged from r277215, head/sys/boot/i386/libi386/multiboot_tramp.S
Modified:
  stable/10/sys/boot/common/bootstrap.h
  stable/10/sys/boot/common/load_elf.c
  stable/10/sys/boot/common/load_elf_obj.c
  stable/10/sys/boot/common/module.c
  stable/10/sys/boot/fdt/fdt_loader_cmd.c
  stable/10/sys/boot/forth/beastie.4th
  stable/10/sys/boot/forth/loader.4th
  stable/10/sys/boot/forth/support.4th
  stable/10/sys/boot/i386/libi386/Makefile
  stable/10/sys/boot/i386/libi386/bootinfo64.c
  stable/10/sys/boot/i386/libi386/elf64_freebsd.c
  stable/10/sys/boot/i386/libi386/libi386.h
  stable/10/sys/boot/i386/loader/conf.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/sys/boot/common/bootstrap.h
==============================================================================
--- stable/10/sys/boot/common/bootstrap.h	Wed Jan 20 13:14:36 2016	(r294416)
+++ stable/10/sys/boot/common/bootstrap.h	Wed Jan 20 13:23:02 2016	(r294417)
@@ -231,9 +231,9 @@ int			mod_load(char *name, struct mod_de
 int			mod_loadkld(const char *name, int argc, char *argv[]);
 
 struct preloaded_file *file_alloc(void);
-struct preloaded_file *file_findfile(char *name, char *type);
+struct preloaded_file *file_findfile(const char *name, const char *type);
 struct file_metadata *file_findmetadata(struct preloaded_file *fp, int type);
-struct preloaded_file *file_loadraw(char *name, char *type);
+struct preloaded_file *file_loadraw(char *name, char *type, int insert);
 void file_discard(struct preloaded_file *fp);
 void file_addmetadata(struct preloaded_file *fp, int type, size_t size, void *p);
 int  file_addmodule(struct preloaded_file *fp, char *modname, int version,
@@ -257,6 +257,9 @@ int	__elfN(obj_loadfile)(char *filename,
 int	__elfN(reloc)(struct elf_file *ef, symaddr_fn *symaddr,
 	    const void *reldata, int reltype, Elf_Addr relbase,
 	    Elf_Addr dataaddr, void *data, size_t len);
+int __elfN(loadfile_raw)(char *filename, u_int64_t dest,
+	    struct preloaded_file **result, int multiboot);
+int __elfN(load_modmetadata)(struct preloaded_file *fp, u_int64_t dest);
 #endif
 
 /*

Modified: stable/10/sys/boot/common/load_elf.c
==============================================================================
--- stable/10/sys/boot/common/load_elf.c	Wed Jan 20 13:14:36 2016	(r294416)
+++ stable/10/sys/boot/common/load_elf.c	Wed Jan 20 13:23:02 2016	(r294417)
@@ -76,7 +76,8 @@ static int __elfN(loadimage)(struct prel
 static int __elfN(lookup_symbol)(struct preloaded_file *mp, elf_file_t ef, const char* name, Elf_Sym* sym);
 static int __elfN(reloc_ptr)(struct preloaded_file *mp, elf_file_t ef,
     Elf_Addr p, void *val, size_t len);
-static int __elfN(parse_modmetadata)(struct preloaded_file *mp, elf_file_t ef);
+static int __elfN(parse_modmetadata)(struct preloaded_file *mp, elf_file_t ef,
+    Elf_Addr p_start, Elf_Addr p_end);
 static symaddr_fn __elfN(symaddr);
 static char	*fake_modname(const char *name);
 
@@ -85,6 +86,61 @@ const char	*__elfN(moduletype) = "elf mo
 
 u_int64_t	__elfN(relocation_offset) = 0;
 
+static int
+__elfN(load_elf_header)(char *filename, elf_file_t ef)
+{
+	ssize_t			 bytes_read;
+	Elf_Ehdr		*ehdr;
+	int 			 err;
+
+	/*
+	* Open the image, read and validate the ELF header 
+	*/
+	if (filename == NULL)	/* can't handle nameless */
+		return (EFTYPE);
+	if ((ef->fd = open(filename, O_RDONLY)) == -1)
+		return (errno);
+	ef->firstpage = malloc(PAGE_SIZE);
+	if (ef->firstpage == NULL) {
+		close(ef->fd);
+		return (ENOMEM);
+	}
+	bytes_read = read(ef->fd, ef->firstpage, PAGE_SIZE);
+	ef->firstlen = (size_t)bytes_read;
+	if (bytes_read < 0 || ef->firstlen <= sizeof(Elf_Ehdr)) {
+		err = EFTYPE; /* could be EIO, but may be small file */
+		goto error;
+	}
+	ehdr = ef->ehdr = (Elf_Ehdr *)ef->firstpage;
+
+	/* Is it ELF? */
+	if (!IS_ELF(*ehdr)) {
+		err = EFTYPE;
+		goto error;
+	}
+	if (ehdr->e_ident[EI_CLASS] != ELF_TARG_CLASS || /* Layout ? */
+	    ehdr->e_ident[EI_DATA] != ELF_TARG_DATA ||
+	    ehdr->e_ident[EI_VERSION] != EV_CURRENT || /* Version ? */
+	    ehdr->e_version != EV_CURRENT ||
+	    ehdr->e_machine != ELF_TARG_MACH) { /* Machine ? */
+		err = EFTYPE;
+		goto error;
+	}
+
+	return (0);
+
+error:
+	if (ef->firstpage != NULL) {
+		free(ef->firstpage);
+		ef->firstpage = NULL;
+	}
+	if (ef->fd != -1) {
+		close(ef->fd);
+		ef->fd = -1;
+	}
+	return (err);
+}
+
 /*
  * Attempt to load the file (file) as an ELF module.  It will be stored at
  * (dest), and a pointer to a module structure describing the loaded object
@@ -93,54 +149,32 @@ u_int64_t	__elfN(relocation_offset) = 0;
 int
 __elfN(loadfile)(char *filename, u_int64_t dest, struct preloaded_file **result)
 {
+	return (__elfN(loadfile_raw)(filename, dest, result, 0));
+}
+
+int
+__elfN(loadfile_raw)(char *filename, u_int64_t dest,
+    struct preloaded_file **result, int multiboot)
+{
     struct preloaded_file	*fp, *kfp;
     struct elf_file		ef;
     Elf_Ehdr 			*ehdr;
     int				err;
-    ssize_t			bytes_read;
 
     fp = NULL;
     bzero(&ef, sizeof(struct elf_file));
+    ef.fd = -1;
 
-    /*
-     * Open the image, read and validate the ELF header 
-     */
-    if (filename == NULL)	/* can't handle nameless */
-	return(EFTYPE);
-    if ((ef.fd = open(filename, O_RDONLY)) == -1)
-	return(errno);
-    ef.firstpage = malloc(PAGE_SIZE);
-    if (ef.firstpage == NULL) {
-	close(ef.fd);
-	return(ENOMEM);
-    }
-    bytes_read = read(ef.fd, ef.firstpage, PAGE_SIZE);
-    ef.firstlen = (size_t)bytes_read;
-    if (bytes_read < 0 || ef.firstlen <= sizeof(Elf_Ehdr)) {
-	err = EFTYPE;		/* could be EIO, but may be small file */
-	goto oerr;
-    }
-    ehdr = ef.ehdr = (Elf_Ehdr *)ef.firstpage;
-
-    /* Is it ELF? */
-    if (!IS_ELF(*ehdr)) {
-	err = EFTYPE;
-	goto oerr;
-    }
-    if (ehdr->e_ident[EI_CLASS] != ELF_TARG_CLASS ||	/* Layout ? */
-	ehdr->e_ident[EI_DATA] != ELF_TARG_DATA ||
-	ehdr->e_ident[EI_VERSION] != EV_CURRENT ||	/* Version ? */
-	ehdr->e_version != EV_CURRENT ||
-	ehdr->e_machine != ELF_TARG_MACH) {		/* Machine ? */
-	err = EFTYPE;
-	goto oerr;
-    }
+    err = __elfN(load_elf_header)(filename, &ef);
+    if (err != 0)
+    	return (err);
 
+    ehdr = ef.ehdr;
 
     /*
      * Check to see what sort of module we are.
      */
-    kfp = file_findfile(NULL, NULL);
+    kfp = file_findfile(NULL, __elfN(kerneltype));
 #ifdef __powerpc__
     /*
      * Kernels can be ET_DYN, so just assume the first loaded object is the
@@ -177,6 +211,11 @@ __elfN(loadfile)(char *filename, u_int64
 
     } else if (ehdr->e_type == ET_DYN) {
 	/* Looks like a kld module */
+	if (multiboot != 0) {
+		printf("elf" __XSTRING(__ELF_WORD_SIZE) "_loadfile: can't load module as multiboot\n");
+		err = EPERM;
+		goto oerr;
+	}
 	if (kfp == NULL) {
 	    printf("elf" __XSTRING(__ELF_WORD_SIZE) "_loadfile: can't load module before kernel\n");
 	    err = EPERM;
@@ -209,10 +248,14 @@ __elfN(loadfile)(char *filename, u_int64
 	    err = EPERM;
 	    goto out;
     }
-    if (ef.kernel)
+    if (ef.kernel == 1 && multiboot == 0)
 	setenv("kernelname", filename, 1);
     fp->f_name = strdup(filename);
-    fp->f_type = strdup(ef.kernel ? __elfN(kerneltype) : __elfN(moduletype));
+    if (multiboot == 0)
+    	fp->f_type = strdup(ef.kernel ?
+    	    __elfN(kerneltype) : __elfN(moduletype));
+    else
+    	fp->f_type = strdup("elf multiboot kernel");
 
 #ifdef ELF_VERBOSE
     if (ef.kernel)
@@ -240,7 +283,8 @@ __elfN(loadfile)(char *filename, u_int64
  out:
     if (ef.firstpage)
 	free(ef.firstpage);
-    close(ef.fd);
+    if (ef.fd != -1)
+    	close(ef.fd);
     return(err);
 }
 
@@ -269,6 +313,8 @@ __elfN(loadimage)(struct preloaded_file 
     int		symtabindex;
     Elf_Size	size;
     u_int	fpcopy;
+    Elf_Sym	sym;
+    Elf_Addr	p_start, p_end;
 
     dp = NULL;
     shdr = NULL;
@@ -571,7 +617,15 @@ nosyms:
     COPYOUT(ef->hashtab + 1, &ef->nchains, sizeof(ef->nchains));
     ef->buckets = ef->hashtab + 2;
     ef->chains = ef->buckets + ef->nbuckets;
-    if (__elfN(parse_modmetadata)(fp, ef) == 0)
+
+    if (__elfN(lookup_symbol)(fp, ef, "__start_set_modmetadata_set", &sym) != 0)
+	return 0;
+    p_start = sym.st_value + ef->off;
+    if (__elfN(lookup_symbol)(fp, ef, "__stop_set_modmetadata_set", &sym) != 0)
+	return ENOENT;
+    p_end = sym.st_value + ef->off;
+
+    if (__elfN(parse_modmetadata)(fp, ef, p_start, p_end) == 0)
 	goto out;
 
     if (ef->kernel)			/* kernel must not depend on anything */
@@ -634,7 +688,123 @@ struct mod_metadata32 {
 #endif
 
 int
-__elfN(parse_modmetadata)(struct preloaded_file *fp, elf_file_t ef)
+__elfN(load_modmetadata)(struct preloaded_file *fp, u_int64_t dest)
+{
+	struct elf_file		 ef;
+	int			 err, i, j;
+	Elf_Shdr		*sh_meta, *shdr = NULL;
+	Elf_Shdr		*sh_data[2];
+	char			*shstrtab = NULL;
+	size_t			 size;
+	Elf_Addr		 p_start, p_end;
+
+	bzero(&ef, sizeof(struct elf_file));
+	ef.fd = -1;
+
+	err = __elfN(load_elf_header)(fp->f_name, &ef);
+	if (err != 0)
+		goto out;
+
+	if (ef.ehdr->e_type == ET_EXEC) {
+		ef.kernel = 1;
+	} else if (ef.ehdr->e_type != ET_DYN) {
+		err = EFTYPE;
+		goto out;
+	}
+
+	size = ef.ehdr->e_shnum * ef.ehdr->e_shentsize;
+	shdr = alloc_pread(ef.fd, ef.ehdr->e_shoff, size);
+	if (shdr == NULL) {
+		err = ENOMEM;
+		goto out;
+	}
+
+	/* Load shstrtab. */
+	shstrtab = alloc_pread(ef.fd, shdr[ef.ehdr->e_shstrndx].sh_offset,
+	    shdr[ef.ehdr->e_shstrndx].sh_size);
+	if (shstrtab == NULL) {
+		printf("\nelf" __XSTRING(__ELF_WORD_SIZE)
+		    "load_modmetadata: unable to load shstrtab\n");
+		err = EFTYPE;
+		goto out;
+	}
+
+	/* Find set_modmetadata_set and data sections. */
+	sh_data[0] = sh_data[1] = sh_meta = NULL;
+	for (i = 0, j = 0; i < ef.ehdr->e_shnum; i++) {
+		if (strcmp(&shstrtab[shdr[i].sh_name],
+		    "set_modmetadata_set") == 0) {
+			sh_meta = &shdr[i];
+		}
+		if ((strcmp(&shstrtab[shdr[i].sh_name], ".data") == 0) ||
+		    (strcmp(&shstrtab[shdr[i].sh_name], ".rodata") == 0)) {
+			sh_data[j++] = &shdr[i];
+		}
+	}
+	if (sh_meta == NULL || sh_data[0] == NULL || sh_data[1] == NULL) {
+		printf("\nelf" __XSTRING(__ELF_WORD_SIZE)
+    "load_modmetadata: unable to find set_modmetadata_set or data sections\n");
+		err = EFTYPE;
+		goto out;
+	}
+
+	/* Load set_modmetadata_set into memory */
+	err = kern_pread(ef.fd, dest, sh_meta->sh_size, sh_meta->sh_offset);
+	if (err != 0) {
+		printf("\nelf" __XSTRING(__ELF_WORD_SIZE)
+    "load_modmetadata: unable to load set_modmetadata_set: %d\n", err);
+		goto out;
+	}
+	p_start = dest;
+	p_end = dest + sh_meta->sh_size;
+	dest += sh_meta->sh_size;
+
+	/* Load data sections into memory. */
+	err = kern_pread(ef.fd, dest, sh_data[0]->sh_size,
+	    sh_data[0]->sh_offset);
+	if (err != 0) {
+		printf("\nelf" __XSTRING(__ELF_WORD_SIZE)
+		    "load_modmetadata: unable to load data: %d\n", err);
+		goto out;
+	}
+
+	/*
+	 * We have to increment the dest, so that the offset is the same into
+	 * both the .rodata and .data sections.
+	 */
+	ef.off = -(sh_data[0]->sh_addr - dest);
+	dest +=	(sh_data[1]->sh_addr - sh_data[0]->sh_addr);
+
+	err = kern_pread(ef.fd, dest, sh_data[1]->sh_size,
+	    sh_data[1]->sh_offset);
+	if (err != 0) {
+		printf("\nelf" __XSTRING(__ELF_WORD_SIZE)
+		    "load_modmetadata: unable to load data: %d\n", err);
+		goto out;
+	}
+
+	err = __elfN(parse_modmetadata)(fp, &ef, p_start, p_end);
+	if (err != 0) {
+		printf("\nelf" __XSTRING(__ELF_WORD_SIZE)
+		    "load_modmetadata: unable to parse metadata: %d\n", err);
+		goto out;
+	}
+
+out:
+	if (shstrtab != NULL)
+		free(shstrtab);
+	if (shdr != NULL)
+		free(shdr);
+	if (ef.firstpage != NULL)
+		free(ef.firstpage);
+	if (ef.fd != -1)
+		close(ef.fd);
+	return (err);
+}
+
+int
+__elfN(parse_modmetadata)(struct preloaded_file *fp, elf_file_t ef,
+    Elf_Addr p_start, Elf_Addr p_end)
 {
     struct mod_metadata md;
 #if (defined(__i386__) || defined(__powerpc__)) && __ELF_WORD_SIZE == 64
@@ -644,20 +814,13 @@ __elfN(parse_modmetadata)(struct preload
 #endif
     struct mod_depend *mdepend;
     struct mod_version mver;
-    Elf_Sym sym;
     char *s;
     int error, modcnt, minfolen;
-    Elf_Addr v, p, p_stop;
-
-    if (__elfN(lookup_symbol)(fp, ef, "__start_set_modmetadata_set", &sym) != 0)
-	return 0;
-    p = sym.st_value + ef->off;
-    if (__elfN(lookup_symbol)(fp, ef, "__stop_set_modmetadata_set", &sym) != 0)
-	return ENOENT;
-    p_stop = sym.st_value + ef->off;
+    Elf_Addr v, p;
 
     modcnt = 0;
-    while (p < p_stop) {
+    p = p_start;
+    while (p < p_end) {
 	COPYOUT(p, &v, sizeof(v));
 	error = __elfN(reloc_ptr)(fp, ef, p, &v, sizeof(v));
 	if (error == EOPNOTSUPP)

Modified: stable/10/sys/boot/common/load_elf_obj.c
==============================================================================
--- stable/10/sys/boot/common/load_elf_obj.c	Wed Jan 20 13:14:36 2016	(r294416)
+++ stable/10/sys/boot/common/load_elf_obj.c	Wed Jan 20 13:23:02 2016	(r294417)
@@ -129,20 +129,13 @@ __elfN(obj_loadfile)(char *filename, u_i
 		goto oerr;
 	}
 
-	kfp = file_findfile(NULL, NULL);
+	kfp = file_findfile(NULL, __elfN(obj_kerneltype));
 	if (kfp == NULL) {
 		printf("elf" __XSTRING(__ELF_WORD_SIZE)
 		    "_obj_loadfile: can't load module before kernel\n");
 		err = EPERM;
 		goto oerr;
 	}
-	if (strcmp(__elfN(obj_kerneltype), kfp->f_type)) {
-		printf("elf" __XSTRING(__ELF_WORD_SIZE)
-		    "_obj_loadfile: can't load module with kernel type '%s'\n",
-		    kfp->f_type);
-		err = EPERM;
-		goto oerr;
-	}
 
 	if (archsw.arch_loadaddr != NULL)
 		dest = archsw.arch_loadaddr(LOAD_ELF, hdr, dest);

Modified: stable/10/sys/boot/common/module.c
==============================================================================
--- stable/10/sys/boot/common/module.c	Wed Jan 20 13:14:36 2016	(r294416)
+++ stable/10/sys/boot/common/module.c	Wed Jan 20 13:23:02 2016	(r294417)
@@ -138,7 +138,7 @@ command_load(int argc, char *argv[])
 	    command_errmsg = "invalid load type";
 	    return(CMD_ERROR);
 	}
-	return(file_loadraw(argv[1], typestr) ? CMD_OK : CMD_ERROR);
+	return (file_loadraw(argv[1], typestr, 1) ? CMD_OK : CMD_ERROR);
     }
     /*
      * Do we have explicit KLD load ?
@@ -193,7 +193,7 @@ command_load_geli(int argc, char *argv[]
     argv += (optind - 1);
     argc -= (optind - 1);
     sprintf(typestr, "%s:geli_keyfile%d", argv[1], num);
-    return(file_loadraw(argv[2], typestr) ? CMD_OK : CMD_ERROR);
+    return (file_loadraw(argv[2], typestr, 1) ? CMD_OK : CMD_ERROR);
 }
 
 COMMAND_SET(unload, "unload", "unload all modules", command_unload);
@@ -362,7 +362,7 @@ file_load_dependencies(struct preloaded_
  * no arguments or anything.
  */
 struct preloaded_file *
-file_loadraw(char *name, char *type)
+file_loadraw(char *name, char *type, int insert)
 {
     struct preloaded_file	*fp;
     char			*cp;
@@ -421,7 +421,8 @@ file_loadraw(char *name, char *type)
     loadaddr = laddr;
 
     /* Add to the list of loaded files */
-    file_insert_tail(fp);
+    if (insert != 0)
+    	file_insert_tail(fp);
     close(fd);
     return(fp);
 }
@@ -524,7 +525,7 @@ mod_loadkld(const char *kldname, int arg
  * NULL may be passed as a wildcard to either.
  */
 struct preloaded_file *
-file_findfile(char *name, char *type)
+file_findfile(const char *name, const char *type)
 {
     struct preloaded_file *fp;
 

Modified: stable/10/sys/boot/fdt/fdt_loader_cmd.c
==============================================================================
--- stable/10/sys/boot/fdt/fdt_loader_cmd.c	Wed Jan 20 13:14:36 2016	(r294416)
+++ stable/10/sys/boot/fdt/fdt_loader_cmd.c	Wed Jan 20 13:23:02 2016	(r294417)
@@ -261,7 +261,7 @@ fdt_load_dtb_file(const char * filename)
 	oldbfp = file_findfile(NULL, "dtb");
 
 	/* Attempt to load and validate a new dtb from a file. */
-	if ((bfp = file_loadraw(filename, "dtb")) == NULL) {
+	if ((bfp = file_loadraw(filename, "dtb", 1)) == NULL) {
 		sprintf(command_errbuf, "failed to load file '%s'", filename);
 		return (1);
 	}

Modified: stable/10/sys/boot/forth/beastie.4th
==============================================================================
--- stable/10/sys/boot/forth/beastie.4th	Wed Jan 20 13:14:36 2016	(r294416)
+++ stable/10/sys/boot/forth/beastie.4th	Wed Jan 20 13:23:02 2016	(r294417)
@@ -93,6 +93,7 @@ also support-functions
 	s" beastie_disable" getenv dup -1 <> if
 		s" YES" compare-insensitive 0= if
 			any_conf_read? if
+				load_xen_throw
 				load_kernel
 				load_modules
 			then

Modified: stable/10/sys/boot/forth/loader.4th
==============================================================================
--- stable/10/sys/boot/forth/loader.4th	Wed Jan 20 13:14:36 2016	(r294416)
+++ stable/10/sys/boot/forth/loader.4th	Wed Jan 20 13:23:02 2016	(r294417)
@@ -147,13 +147,14 @@ only forth definitions also support-func
   \ was succesfully loaded!
   any_conf_read? if
     s" loader_delay" getenv -1 = if
+      load_xen_throw
       load_kernel
       load_modules
     else
       drop
       ." Loading Kernel and Modules (Ctrl-C to Abort)" cr
       s" also support-functions" evaluate
-      s" set delay_command='load_kernel load_modules'" evaluate
+      s" set delay_command='load_xen_throw load_kernel load_modules'" evaluate
       s" set delay_showdots" evaluate
       delay_execute
     then

Modified: stable/10/sys/boot/forth/support.4th
==============================================================================
--- stable/10/sys/boot/forth/support.4th	Wed Jan 20 13:14:36 2016	(r294416)
+++ stable/10/sys/boot/forth/support.4th	Wed Jan 20 13:23:02 2016	(r294417)
@@ -1460,6 +1460,20 @@ also builtins
   abort" Unable to load a kernel!"
 ;
 
+: load_xen ( -- )
+  s" xen_kernel" getenv dup -1 <> if
+    1 1 load
+  else
+    drop
+    0
+  then
+;
+
+: load_xen_throw ( -- ) ( throws: abort )
+  load_xen
+  abort" Unable to load Xen!"
+;
+
 : set_defaultoptions  ( -- )
   s" kernel_options" getenv dup -1 = if
     drop
@@ -1578,12 +1592,15 @@ also builtins
   else
     drop
   then
-  r> if ( a path was passed )
-    load_directory_or_file
-  else
-    standard_kernel_search
+  load_xen
+  ?dup 0= if ( success )
+    r> if ( a path was passed )
+      load_directory_or_file
+    else
+      standard_kernel_search
+    then
+    ?dup 0= if ['] load_modules catch then
   then
-  ?dup 0= if ['] load_modules catch then
 ;
 
 only forth definitions

Modified: stable/10/sys/boot/i386/libi386/Makefile
==============================================================================
--- stable/10/sys/boot/i386/libi386/Makefile	Wed Jan 20 13:14:36 2016	(r294416)
+++ stable/10/sys/boot/i386/libi386/Makefile	Wed Jan 20 13:23:02 2016	(r294417)
@@ -6,7 +6,7 @@ INTERNALLIB=
 SRCS=	biosacpi.c bioscd.c biosdisk.c biosmem.c biospnp.c \
 	biospci.c biossmap.c bootinfo.c bootinfo32.c bootinfo64.c \
 	comconsole.c devicename.c elf32_freebsd.c \
-	elf64_freebsd.c \
+	elf64_freebsd.c multiboot.c multiboot_tramp.S \
 	i386_copy.c i386_module.c nullconsole.c pxe.c pxetramp.s \
 	smbios.c time.c vidconsole.c amd64_tramp.S spinconsole.c
 .PATH:	${.CURDIR}/../../zfs
@@ -65,6 +65,7 @@ machine:
 
 # XXX: clang integrated-as doesn't grok .codeNN directives yet
 CFLAGS.amd64_tramp.S=	${CLANG_NO_IAS}
+CFLAGS.multiboot_tramp.S=	${CLANG_NO_IAS}
 CFLAGS+=		${CFLAGS.${.IMPSRC:T}}
 
 .if ${MACHINE_CPUARCH} == "amd64"

Modified: stable/10/sys/boot/i386/libi386/bootinfo64.c
==============================================================================
--- stable/10/sys/boot/i386/libi386/bootinfo64.c	Wed Jan 20 13:14:36 2016	(r294416)
+++ stable/10/sys/boot/i386/libi386/bootinfo64.c	Wed Jan 20 13:23:02 2016	(r294417)
@@ -33,6 +33,7 @@ __FBSDID("$FreeBSD$");
 #include <sys/linker.h>
 #include <machine/bootinfo.h>
 #include <machine/cpufunc.h>
+#include <machine/metadata.h>
 #include <machine/psl.h>
 #include <machine/specialreg.h>
 #include "bootstrap.h"
@@ -176,14 +177,15 @@ bi_checkcpu(void)
  * - Module metadata are formatted and placed in kernel space.
  */
 int
-bi_load64(char *args, vm_offset_t *modulep, vm_offset_t *kernendp)
+bi_load64(char *args, vm_offset_t addr, vm_offset_t *modulep,
+    vm_offset_t *kernendp, int add_smap)
 {
     struct preloaded_file	*xp, *kfp;
     struct i386_devdesc		*rootdev;
     struct file_metadata	*md;
-    vm_offset_t			addr;
     u_int64_t			kernend;
     u_int64_t			envp;
+    u_int64_t			module;
     vm_offset_t			size;
     char			*rootdevname;
     int				howto;
@@ -210,21 +212,18 @@ bi_load64(char *args, vm_offset_t *modul
     /* Try reading the /etc/fstab file to select the root device */
     getrootmount(i386_fmtdev((void *)rootdev));
 
-    /* find the last module in the chain */
-    addr = 0;
-    for (xp = file_findfile(NULL, NULL); xp != NULL; xp = xp->f_next) {
-	if (addr < (xp->f_addr + xp->f_size))
-	    addr = xp->f_addr + xp->f_size;
+    if (addr == 0) {
+        /* find the last module in the chain */
+        for (xp = file_findfile(NULL, NULL); xp != NULL; xp = xp->f_next) {
+            if (addr < (xp->f_addr + xp->f_size))
+                addr = xp->f_addr + xp->f_size;
+        }
     }
     /* pad to a page boundary */
     addr = roundup(addr, PAGE_SIZE);
 
-    /* copy our environment */
-    envp = addr;
-    addr = bi_copyenv(addr);
-
-    /* pad to a page boundary */
-    addr = roundup(addr, PAGE_SIZE);
+    /* place the metadata before anything */
+    module = *modulep = addr;
 
     kfp = file_findfile(NULL, "elf kernel");
     if (kfp == NULL)
@@ -235,20 +234,30 @@ bi_load64(char *args, vm_offset_t *modul
     file_addmetadata(kfp, MODINFOMD_HOWTO, sizeof howto, &howto);
     file_addmetadata(kfp, MODINFOMD_ENVP, sizeof envp, &envp);
     file_addmetadata(kfp, MODINFOMD_KERNEND, sizeof kernend, &kernend);
-    bios_addsmapdata(kfp);
+    file_addmetadata(kfp, MODINFOMD_MODULEP, sizeof module, &module);
+    if (add_smap != 0)
+        bios_addsmapdata(kfp);
 
-    /* Figure out the size and location of the metadata */
-    *modulep = addr;
     size = bi_copymodules64(0);
-    kernend = roundup(addr + size, PAGE_SIZE);
+
+    /* copy our environment */
+    envp = roundup(addr + size, PAGE_SIZE);
+    addr = bi_copyenv(envp);
+
+    /* set kernend */
+    kernend = roundup(addr, PAGE_SIZE);
     *kernendp = kernend;
 
     /* patch MODINFOMD_KERNEND */
     md = file_findmetadata(kfp, MODINFOMD_KERNEND);
     bcopy(&kernend, md->md_data, sizeof kernend);
 
+    /* patch MODINFOMD_ENVP */
+    md = file_findmetadata(kfp, MODINFOMD_ENVP);
+    bcopy(&envp, md->md_data, sizeof envp);
+
     /* copy module list and metadata */
-    (void)bi_copymodules64(addr);
+    (void)bi_copymodules64(*modulep);
 
     return(0);
 }

Modified: stable/10/sys/boot/i386/libi386/elf64_freebsd.c
==============================================================================
--- stable/10/sys/boot/i386/libi386/elf64_freebsd.c	Wed Jan 20 13:14:36 2016	(r294416)
+++ stable/10/sys/boot/i386/libi386/elf64_freebsd.c	Wed Jan 20 13:23:02 2016	(r294417)
@@ -81,7 +81,7 @@ elf64_exec(struct preloaded_file *fp)
 	return(EFTYPE);
     ehdr = (Elf_Ehdr *)&(md->md_data);
 
-    err = bi_load64(fp->f_args, &modulep, &kernend);
+    err = bi_load64(fp->f_args, 0, &modulep, &kernend, 1);
     if (err != 0)
 	return(err);
 

Modified: stable/10/sys/boot/i386/libi386/libi386.h
==============================================================================
--- stable/10/sys/boot/i386/libi386/libi386.h	Wed Jan 20 13:14:36 2016	(r294416)
+++ stable/10/sys/boot/i386/libi386/libi386.h	Wed Jan 20 13:23:02 2016	(r294417)
@@ -117,6 +117,7 @@ void	bi_setboothowto(int howto);
 vm_offset_t	bi_copyenv(vm_offset_t addr);
 int	bi_load32(char *args, int *howtop, int *bootdevp, vm_offset_t *bip,
 	    vm_offset_t *modulep, vm_offset_t *kernend);
-int	bi_load64(char *args, vm_offset_t *modulep, vm_offset_t *kernend);
+int	bi_load64(char *args, vm_offset_t addr, vm_offset_t *modulep,
+	    vm_offset_t *kernend, int add_smap);
 
 void	pxe_enable(void *pxeinfo);

Copied and modified: stable/10/sys/boot/i386/libi386/multiboot.c (from r277215, head/sys/boot/i386/libi386/multiboot.c)
==============================================================================
--- head/sys/boot/i386/libi386/multiboot.c	Thu Jan 15 16:27:20 2015	(r277215, copy source)
+++ stable/10/sys/boot/i386/libi386/multiboot.c	Wed Jan 20 13:23:02 2016	(r294417)
@@ -243,7 +243,7 @@ multiboot_exec(struct preloaded_file *fp
 	/* Find the entry point of the Xen kernel and save it for later */
 	if ((md = file_findmetadata(fp, MODINFOMD_ELFHDR)) == NULL) {
 		printf("Unable to find %s entry point\n", fp->f_name);
-		error = EFTYPE;
+		error = EINVAL;
 		goto error;
 	}
 	ehdr = (Elf_Ehdr *)&(md->md_data);
@@ -271,10 +271,17 @@ multiboot_exec(struct preloaded_file *fp
 	fp = file_findfile(NULL, "elf kernel");
 	if (fp == NULL) {
 		printf("No FreeBSD kernel provided, aborting\n");
-		error = EFTYPE;
+		error = EINVAL;
 		goto error;
 	}
+
 	mb_mod = malloc(sizeof(struct multiboot_mod_list) * NUM_MODULES);
+	if (mb_mod == NULL) {
+		error = ENOMEM;
+		goto error;
+	}
+
+	bzero(mb_mod, sizeof(struct multiboot_mod_list) * NUM_MODULES);
 
 	/*
 	 * Calculate how much memory is needed for the metatdata. We did
@@ -373,7 +380,7 @@ multiboot_obj_loadfile(char *filename, u
 			printf(
 			"Unable to load %s as a multiboot payload kernel\n",
 			filename);
-			return (EFTYPE);
+			return (EINVAL);
 		}
 
 		/* Load kernel metadata... */
@@ -382,7 +389,7 @@ multiboot_obj_loadfile(char *filename, u
 		if (error) {
 			printf("Unable to load kernel %s metadata error: %d\n",
 			    rfp->f_name, error);
-			return (EFTYPE);
+			return (EINVAL);
 		}
 
 		/*

Copied: stable/10/sys/boot/i386/libi386/multiboot.h (from r277215, head/sys/boot/i386/libi386/multiboot.h)
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ stable/10/sys/boot/i386/libi386/multiboot.h	Wed Jan 20 13:23:02 2016	(r294417, copy of r277215, head/sys/boot/i386/libi386/multiboot.h)
@@ -0,0 +1,225 @@
+/* multiboot.h - Multiboot header file. */
+/* Copyright (C) 1999,2003,2007,2008,2009  Free Software Foundation, Inc.
+*
+*  Permission is hereby granted, free of charge, to any person obtaining a copy
+*  of this software and associated documentation files (the "Software"), to
+*  deal in the Software without restriction, including without limitation the
+*  rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
+*  sell copies of the Software, and to permit persons to whom the Software is
+*  furnished to do so, subject to the following conditions:
+*
+*  The above copyright notice and this permission notice shall be included in
+*  all copies or substantial portions of the Software.
+*
+*  THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+*  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+*  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL ANY
+*  DEVELOPER OR DISTRIBUTOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+*  WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR
+*  IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+*
+* $FreeBSD$
+*/
+
+#ifndef MULTIBOOT_HEADER
+#define MULTIBOOT_HEADER 1
+
+/* How many bytes from the start of the file we search for the header. */
+#define MULTIBOOT_SEARCH                        8192
+
+/* The magic field should contain this. */
+#define MULTIBOOT_HEADER_MAGIC                  0x1BADB002
+
+/* This should be in %eax. */
+#define MULTIBOOT_BOOTLOADER_MAGIC              0x2BADB002
+
+/* The bits in the required part of flags field we don't support. */
+#define MULTIBOOT_UNSUPPORTED                   0x0000fffc
+
+/* Alignment of multiboot modules. */
+#define MULTIBOOT_MOD_ALIGN                     0x00001000
+
+/* Alignment of the multiboot info structure. */
+#define MULTIBOOT_INFO_ALIGN                    0x00000004
+
+/* Flags set in the 'flags' member of the multiboot header. */
+
+/* Align all boot modules on i386 page (4KB) boundaries. */
+#define MULTIBOOT_PAGE_ALIGN                    0x00000001
+
+/* Must pass memory information to OS. */
+#define MULTIBOOT_MEMORY_INFO                   0x00000002
+
+/* Must pass video information to OS. */
+#define MULTIBOOT_VIDEO_MODE                    0x00000004
+
+/* This flag indicates the use of the address fields in the header. */
+#define MULTIBOOT_AOUT_KLUDGE                   0x00010000
+
+/* Flags to be set in the 'flags' member of the multiboot info structure. */
+
+/* is there basic lower/upper memory information? */
+#define MULTIBOOT_INFO_MEMORY                   0x00000001
+/* is there a boot device set? */
+#define MULTIBOOT_INFO_BOOTDEV                  0x00000002
+/* is the command-line defined? */
+#define MULTIBOOT_INFO_CMDLINE                  0x00000004
+/* are there modules to do something with? */
+#define MULTIBOOT_INFO_MODS                     0x00000008
+
+/* These next two are mutually exclusive */
+
+/* is there a symbol table loaded? */
+#define MULTIBOOT_INFO_AOUT_SYMS                0x00000010
+/* is there an ELF section header table? */
+#define MULTIBOOT_INFO_ELF_SHDR                 0X00000020
+
+/* is there a full memory map? */
+#define MULTIBOOT_INFO_MEM_MAP                  0x00000040
+
+/* Is there drive info? */
+#define MULTIBOOT_INFO_DRIVE_INFO               0x00000080
+
+/* Is there a config table? */
+#define MULTIBOOT_INFO_CONFIG_TABLE             0x00000100
+
+/* Is there a boot loader name? */
+#define MULTIBOOT_INFO_BOOT_LOADER_NAME         0x00000200
+
+/* Is there a APM table? */
+#define MULTIBOOT_INFO_APM_TABLE                0x00000400
+
+/* Is there video information? */
+#define MULTIBOOT_INFO_VIDEO_INFO               0x00000800
+
+#ifndef ASM_FILE
+
+typedef unsigned short          multiboot_uint16_t;
+typedef unsigned int            multiboot_uint32_t;
+typedef unsigned long long      multiboot_uint64_t;
+
+struct multiboot_header
+{
+/* Must be MULTIBOOT_MAGIC - see above. */
+	multiboot_uint32_t magic;
+
+/* Feature flags. */
+	multiboot_uint32_t flags;
+
+/* The above fields plus this one must equal 0 mod 2^32. */
+	multiboot_uint32_t checksum;
+
+/* These are only valid if MULTIBOOT_AOUT_KLUDGE is set. */
+	multiboot_uint32_t header_addr;
+	multiboot_uint32_t load_addr;
+	multiboot_uint32_t load_end_addr;
+	multiboot_uint32_t bss_end_addr;
+	multiboot_uint32_t entry_addr;
+
+/* These are only valid if MULTIBOOT_VIDEO_MODE is set. */
+	multiboot_uint32_t mode_type;
+	multiboot_uint32_t width;
+	multiboot_uint32_t height;
+	multiboot_uint32_t depth;
+};
+
+/* The symbol table for a.out. */
+struct multiboot_aout_symbol_table
+{
+	multiboot_uint32_t tabsize;
+	multiboot_uint32_t strsize;
+	multiboot_uint32_t addr;
+	multiboot_uint32_t reserved;
+};
+typedef struct multiboot_aout_symbol_table multiboot_aout_symbol_table_t;
+
+/* The section header table for ELF. */
+struct multiboot_elf_section_header_table
+{
+	multiboot_uint32_t num;
+	multiboot_uint32_t size;
+	multiboot_uint32_t addr;
+	multiboot_uint32_t shndx;
+};
+typedef struct multiboot_elf_section_header_table multiboot_elf_section_header_table_t;
+
+struct multiboot_info
+{
+/* Multiboot info version number */
+	multiboot_uint32_t flags;
+
+/* Available memory from BIOS */
+	multiboot_uint32_t mem_lower;
+	multiboot_uint32_t mem_upper;
+
+/* "root" partition */
+	multiboot_uint32_t boot_device;
+
+/* Kernel command line */
+	multiboot_uint32_t cmdline;
+
+/* Boot-Module list */
+	multiboot_uint32_t mods_count;
+	multiboot_uint32_t mods_addr;
+
+	union
+	{
+		multiboot_aout_symbol_table_t aout_sym;
+		multiboot_elf_section_header_table_t elf_sec;
+	} u;
+
+/* Memory Mapping buffer */
+	multiboot_uint32_t mmap_length;
+	multiboot_uint32_t mmap_addr;
+
+/* Drive Info buffer */
+	multiboot_uint32_t drives_length;
+	multiboot_uint32_t drives_addr;
+
+/* ROM configuration table */
+	multiboot_uint32_t config_table;
+
+/* Boot Loader Name */
+	multiboot_uint32_t boot_loader_name;
+
+/* APM table */
+	multiboot_uint32_t apm_table;
+
+/* Video */
+	multiboot_uint32_t vbe_control_info;
+	multiboot_uint32_t vbe_mode_info;
+	multiboot_uint16_t vbe_mode;
+	multiboot_uint16_t vbe_interface_seg;
+	multiboot_uint16_t vbe_interface_off;
+	multiboot_uint16_t vbe_interface_len;
+};
+typedef struct multiboot_info multiboot_info_t;
+
+struct multiboot_mmap_entry
+{
+	multiboot_uint32_t size;
+	multiboot_uint64_t addr;
+	multiboot_uint64_t len;
+#define MULTIBOOT_MEMORY_AVAILABLE              1
+#define MULTIBOOT_MEMORY_RESERVED               2
+	multiboot_uint32_t type;
+} __attribute__((packed));
+typedef struct multiboot_mmap_entry multiboot_memory_map_t;
+
+struct multiboot_mod_list
+{
+/* the memory used goes from bytes 'mod_start' to 'mod_end-1' inclusive */
+	multiboot_uint32_t mod_start;
+	multiboot_uint32_t mod_end;
+
+/* Module command line */
+	multiboot_uint32_t cmdline;
+
+/* padding to take it to 16 bytes (must be zero) */
+	multiboot_uint32_t pad;
+};
+typedef struct multiboot_mod_list multiboot_module_t;
+
+#endif /* ! ASM_FILE */
+
+#endif /* ! MULTIBOOT_HEADER */

Copied: stable/10/sys/boot/i386/libi386/multiboot_tramp.S (from r277215, head/sys/boot/i386/libi386/multiboot_tramp.S)
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ stable/10/sys/boot/i386/libi386/multiboot_tramp.S	Wed Jan 20 13:23:02 2016	(r294417, copy of r277215, head/sys/boot/i386/libi386/multiboot_tramp.S)
@@ -0,0 +1,51 @@
+/*-
+ * Copyright (c) 2014  Roger Pau Monné <royger@FreeBSD.org>
+ * 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$
+ */
+
+#define ASM_FILE
+#include "multiboot.h"
+
+/*
+ * The multiboot specification requires the executable to be launched
+ * with %cs set to a flat read/execute segment with offset 0 and limit
+ * 0xFFFFFFFF, and the rest of the segment registers (%ds, %es, %fs,
+ * %gs, %ss) to flat read/write segments with the same offset and limit.
+ * This is already done by the BTX code before calling multiboot_tramp,
+ * so there is no need to do anything here.
+ */
+
+	.globl	multiboot_tramp
+multiboot_tramp:
+	/* Be sure that interrupts are disabled. */
+	cli
+
+	movl    $MULTIBOOT_BOOTLOADER_MAGIC, %eax
+	/* Get the entry point and address of the multiboot_info parameter. */
+	movl	8(%esp), %ebx
+	movl	4(%esp), %ecx
+
+	call    *%ecx

*** DIFF OUTPUT TRUNCATED AT 1000 LINES ***

From owner-svn-src-all@freebsd.org  Wed Jan 20 13:32:15 2016
Return-Path: <owner-svn-src-all@freebsd.org>
Delivered-To: svn-src-all@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2CE34A8ADFB;
 Wed, 20 Jan 2016 13:32:15 +0000 (UTC) (envelope-from zbb@FreeBSD.org)
Received: from repo.freebsd.org (repo.freebsd.org
 [IPv6:2610:1c1:1:6068::e6a:0])
 (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
 (Client did not present a certificate)
 by mx1.freebsd.org (Postfix) with ESMTPS id F02A81F91;
 Wed, 20 Jan 2016 13:32:14 +0000 (UTC) (envelope-from zbb@FreeBSD.org)
Received: from repo.freebsd.org ([127.0.1.37])
 by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u0KDWEEY061207;
 Wed, 20 Jan 2016 13:32:14 GMT (envelope-from zbb@FreeBSD.org)
Received: (from zbb@localhost)
 by repo.freebsd.org (8.15.2/8.15.2/Submit) id u0KDWEEY061206;
 Wed, 20 Jan 2016 13:32:14 GMT (envelope-from zbb@FreeBSD.org)
Message-Id: <201601201332.u0KDWEEY061206@repo.freebsd.org>
X-Authentication-Warning: repo.freebsd.org: zbb set sender to zbb@FreeBSD.org
 using -f
From: Zbigniew Bodek <zbb@FreeBSD.org>
Date: Wed, 20 Jan 2016 13:32:14 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-head@freebsd.org
Subject: svn commit: r294418 - head/sys/boot/fdt/dts/arm
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.20
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for &quot;
 user&quot; and &quot; projects&quot; \)" <svn-src-all.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-all/>
List-Post: <mailto:svn-src-all@freebsd.org>
List-Help: <mailto:svn-src-all-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Wed, 20 Jan 2016 13:32:15 -0000

Author: zbb
Date: Wed Jan 20 13:32:13 2016
New Revision: 294418
URL: https://svnweb.freebsd.org/changeset/base/294418

Log:
  Correct ranges in Armada38x dts
  
  Ranges property of 'soc' node used two-cell addresses which resulted in
  casting errors as simplebus resource allocation works with 32-bit u_long
  variables. FDT ranges were simplified.
  
  Reviewed by:    imp
  Obtained from:	Semihalf
  Sponsored by:	Stormshield
  Submitted by:	Michal Stanek <mst@semihalf.com>
  Differential revision:  https://reviews.freebsd.org/D4212

Modified:
  head/sys/boot/fdt/dts/arm/armada-388-gp.dts

Modified: head/sys/boot/fdt/dts/arm/armada-388-gp.dts
==============================================================================
--- head/sys/boot/fdt/dts/arm/armada-388-gp.dts	Wed Jan 20 13:23:02 2016	(r294417)
+++ head/sys/boot/fdt/dts/arm/armada-388-gp.dts	Wed Jan 20 13:32:13 2016	(r294418)
@@ -59,8 +59,7 @@
 	};
 
 	soc {
-		ranges = <MBUS_ID(0xf0, 0x01) 0 0xf1000000 0x100000
-			  MBUS_ID(0x01, 0x1d) 0 0xfff00000 0x100000>;
+		ranges = <0 0 0xf1000000 0x100000>;
 
 		internal-regs {
 			spi@10600 {

From owner-svn-src-all@freebsd.org  Wed Jan 20 13:35:08 2016
Return-Path: <owner-svn-src-all@freebsd.org>
Delivered-To: svn-src-all@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id 714ADA8AECF;
 Wed, 20 Jan 2016 13:35:08 +0000 (UTC) (envelope-from zbb@FreeBSD.org)
Received: from repo.freebsd.org (repo.freebsd.org
 [IPv6:2610:1c1:1:6068::e6a:0])
 (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
 (Client did not present a certificate)
 by mx1.freebsd.org (Postfix) with ESMTPS id 297ED12CB;
 Wed, 20 Jan 2016 13:35:08 +0000 (UTC) (envelope-from zbb@FreeBSD.org)
Received: from repo.freebsd.org ([127.0.1.37])
 by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u0KDZ76u061473;
 Wed, 20 Jan 2016 13:35:07 GMT (envelope-from zbb@FreeBSD.org)
Received: (from zbb@localhost)
 by repo.freebsd.org (8.15.2/8.15.2/Submit) id u0KDZ7ss061471;
 Wed, 20 Jan 2016 13:35:07 GMT (envelope-from zbb@FreeBSD.org)
Message-Id: <201601201335.u0KDZ7ss061471@repo.freebsd.org>
X-Authentication-Warning: repo.freebsd.org: zbb set sender to zbb@FreeBSD.org
 using -f
From: Zbigniew Bodek <zbb@FreeBSD.org>
Date: Wed, 20 Jan 2016 13:35:07 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-head@freebsd.org
Subject: svn commit: r294419 - in head/sys: arm/mv dev/fdt
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.20
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for &quot;
 user&quot; and &quot; projects&quot; \)" <svn-src-all.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-all/>
List-Post: <mailto:svn-src-all@freebsd.org>
List-Help: <mailto:svn-src-all-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Wed, 20 Jan 2016 13:35:08 -0000

Author: zbb
Date: Wed Jan 20 13:35:06 2016
New Revision: 294419
URL: https://svnweb.freebsd.org/changeset/base/294419

Log:
  Do not require strict compatibility on simplebus
  
  Strict compatibility requirement is a root of problems when simplebus'
  node has two compatibility strings (i.e. on Armada38x). Removing this
  requirement should not interfere with other platforms.
  
  fdt_is_compatible_strict() and fdt_find_compatible() calls were changed
  in fdt_common.c and mv_common.c.
  
  Reviewed by:    ian, imp
  Obtained from:	Semihalf
  Sponsored by:	Stormshield
  Submitted by:	Bartosz Szczepanek <bsz@semihalf.com>
  Differential revision:  https://reviews.freebsd.org/D4602

Modified:
  head/sys/arm/mv/mv_common.c
  head/sys/dev/fdt/fdt_common.c

Modified: head/sys/arm/mv/mv_common.c
==============================================================================
--- head/sys/arm/mv/mv_common.c	Wed Jan 20 13:32:13 2016	(r294418)
+++ head/sys/arm/mv/mv_common.c	Wed Jan 20 13:35:06 2016	(r294419)
@@ -2064,7 +2064,7 @@ fdt_win_setup(void)
 		 */
 		child = OF_peer(child);
 		if ((child == 0) && (node == OF_finddevice("/"))) {
-			node = fdt_find_compatible(node, "simple-bus", 1);
+			node = fdt_find_compatible(node, "simple-bus", 0);
 			if (node == 0)
 				return (ENXIO);
 			child = OF_child(node);

Modified: head/sys/dev/fdt/fdt_common.c
==============================================================================
--- head/sys/dev/fdt/fdt_common.c	Wed Jan 20 13:32:13 2016	(r294418)
+++ head/sys/dev/fdt/fdt_common.c	Wed Jan 20 13:35:06 2016	(r294419)
@@ -212,7 +212,7 @@ fdt_immr_addr(vm_offset_t immr_va)
 	 * Try to access the SOC node directly i.e. through /aliases/.
 	 */
 	if ((node = OF_finddevice("soc")) != 0)
-		if (fdt_is_compatible_strict(node, "simple-bus"))
+		if (fdt_is_compatible(node, "simple-bus"))
 			goto moveon;
 	/*
 	 * Find the node the long way.
@@ -220,7 +220,7 @@ fdt_immr_addr(vm_offset_t immr_va)
 	if ((node = OF_finddevice("/")) == 0)
 		return (ENXIO);
 
-	if ((node = fdt_find_compatible(node, "simple-bus", 1)) == 0)
+	if ((node = fdt_find_compatible(node, "simple-bus", 0)) == 0)
 		return (ENXIO);
 
 moveon:

From owner-svn-src-all@freebsd.org  Wed Jan 20 13:40:55 2016
Return-Path: <owner-svn-src-all@freebsd.org>
Delivered-To: svn-src-all@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id 70A1FA8911B;
 Wed, 20 Jan 2016 13:40:55 +0000 (UTC) (envelope-from zbb@FreeBSD.org)
Received: from repo.freebsd.org (repo.freebsd.org
 [IPv6:2610:1c1:1:6068::e6a:0])
 (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
 (Client did not present a certificate)
 by mx1.freebsd.org (Postfix) with ESMTPS id 41C051E16;
 Wed, 20 Jan 2016 13:40:55 +0000 (UTC) (envelope-from zbb@FreeBSD.org)
Received: from repo.freebsd.org ([127.0.1.37])
 by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u0KDesYk061940;
 Wed, 20 Jan 2016 13:40:54 GMT (envelope-from zbb@FreeBSD.org)
Received: (from zbb@localhost)
 by repo.freebsd.org (8.15.2/8.15.2/Submit) id u0KDesNR061939;
 Wed, 20 Jan 2016 13:40:54 GMT (envelope-from zbb@FreeBSD.org)
Message-Id: <201601201340.u0KDesNR061939@repo.freebsd.org>
X-Authentication-Warning: repo.freebsd.org: zbb set sender to zbb@FreeBSD.org
 using -f
From: Zbigniew Bodek <zbb@FreeBSD.org>
Date: Wed, 20 Jan 2016 13:40:54 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-head@freebsd.org
Subject: svn commit: r294420 - head/sys/boot/fdt/dts/arm
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.20
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for &quot;
 user&quot; and &quot; projects&quot; \)" <svn-src-all.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-all/>
List-Post: <mailto:svn-src-all@freebsd.org>
List-Help: <mailto:svn-src-all-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Wed, 20 Jan 2016 13:40:55 -0000

Author: zbb
Date: Wed Jan 20 13:40:54 2016
New Revision: 294420
URL: https://svnweb.freebsd.org/changeset/base/294420

Log:
  Add global mpcore timer node to Armada 38x DTS
  
  Changes:
  - global mpcore timer dts node added
  - required by driver 'clock-frequency' property added
  
  Reviewed by:    ian
  Obtained from:  Semihalf
  Sponsored by:   Stormshield
  Submitted by:   Bartosz Szczepanek <bsz@semihalf.com>
  Differential revision:  https://reviews.freebsd.org/D4213

Modified:
  head/sys/boot/fdt/dts/arm/armada-38x.dtsi

Modified: head/sys/boot/fdt/dts/arm/armada-38x.dtsi
==============================================================================
--- head/sys/boot/fdt/dts/arm/armada-38x.dtsi	Wed Jan 20 13:35:06 2016	(r294419)
+++ head/sys/boot/fdt/dts/arm/armada-38x.dtsi	Wed Jan 20 13:40:54 2016	(r294420)
@@ -152,10 +152,19 @@
 				reg = <0xc000 0x58>;
 			};
 
+			timer@c200 {
+				compatible = "arm,cortex-a9-global-timer";
+				reg = <0xc200 0x20>;
+				interrupts = <GIC_PPI 11 (IRQ_TYPE_EDGE_RISING | GIC_CPU_MASK_SIMPLE(2))>;
+				clock-frequency = <800000000>;
+				clocks = <&coreclk 2>;
+			};
+
 			timer@c600 {
 				compatible = "arm,cortex-a9-twd-timer";
 				reg = <0xc600 0x20>;
 				interrupts = <GIC_PPI 13 (IRQ_TYPE_EDGE_RISING | GIC_CPU_MASK_SIMPLE(2))>;
+				clock-frequency = <800000000>;
 				clocks = <&coreclk 2>;
 			};
 

From owner-svn-src-all@freebsd.org  Wed Jan 20 13:42:56 2016
Return-Path: <owner-svn-src-all@freebsd.org>
Delivered-To: svn-src-all@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6CBEAA892E4;
 Wed, 20 Jan 2016 13:42:56 +0000 (UTC) (envelope-from zbb@FreeBSD.org)
Received: from repo.freebsd.org (repo.freebsd.org
 [IPv6:2610:1c1:1:6068::e6a:0])
 (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
 (Client did not present a certificate)
 by mx1.freebsd.org (Postfix) with ESMTPS id 3A13913AC;
 Wed, 20 Jan 2016 13:42:56 +0000 (UTC) (envelope-from zbb@FreeBSD.org)
Received: from repo.freebsd.org ([127.0.1.37])
 by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u0KDgtTb064679;
 Wed, 20 Jan 2016 13:42:55 GMT (envelope-from zbb@FreeBSD.org)
Received: (from zbb@localhost)
 by repo.freebsd.org (8.15.2/8.15.2/Submit) id u0KDgtDj064678;
 Wed, 20 Jan 2016 13:42:55 GMT (envelope-from zbb@FreeBSD.org)
Message-Id: <201601201342.u0KDgtDj064678@repo.freebsd.org>
X-Authentication-Warning: repo.freebsd.org: zbb set sender to zbb@FreeBSD.org
 using -f
From: Zbigniew Bodek <zbb@FreeBSD.org>
Date: Wed, 20 Jan 2016 13:42:55 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-head@freebsd.org
Subject: svn commit: r294421 - head/sys/arm/mv
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.20
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for &quot;
 user&quot; and &quot; projects&quot; \)" <svn-src-all.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-all/>
List-Post: <mailto:svn-src-all@freebsd.org>
List-Help: <mailto:svn-src-all-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Wed, 20 Jan 2016 13:42:56 -0000

Author: zbb
Date: Wed Jan 20 13:42:54 2016
New Revision: 294421
URL: https://svnweb.freebsd.org/changeset/base/294421

Log:
  Use GIC-specific decoding function in mv_common.c
  
  Add gic_decode_fdt function to fdt_pic_table, allowing to recognize GIC
  interrupts on Armada38x. SOC_MV_ARMADA38X ifdef is required because A38X
  is the only Marvell's platform in FreeBSD using GIC; lack of ifdef would
  lead to linking errors on other platforms.
  
  Reviewed by:    andrew, ian, imp
  Obtained from:  Semihalf
  Sponsored by:   Stormshield
  Submitted by:   Michal Stanek <mst@semihalf.com>
  Differential revision:  https://reviews.freebsd.org/D4214

Modified:
  head/sys/arm/mv/mv_common.c

Modified: head/sys/arm/mv/mv_common.c
==============================================================================
--- head/sys/arm/mv/mv_common.c	Wed Jan 20 13:40:54 2016	(r294420)
+++ head/sys/arm/mv/mv_common.c	Wed Jan 20 13:42:54 2016	(r294421)
@@ -46,6 +46,7 @@ __FBSDID("$FreeBSD$");
 #include <machine/bus.h>
 #include <machine/fdt.h>
 #include <machine/vmparam.h>
+#include <machine/intr.h>
 
 #include <arm/mv/mvreg.h>
 #include <arm/mv/mvvar.h>
@@ -104,6 +105,10 @@ static void decode_win_idma_dump(u_long 
 static void decode_win_xor_dump(u_long base);
 
 static int fdt_get_ranges(const char *, void *, int, int *, int *);
+#ifdef SOC_MV_ARMADA38X
+int gic_decode_fdt(phandle_t iparent, pcell_t *intr, int *interrupt,
+    int *trig, int *pol);
+#endif
 
 static int win_cpu_from_dt(void);
 static int fdt_win_setup(void);
@@ -2190,6 +2195,9 @@ fdt_pic_decode_ic(phandle_t node, pcell_
 }
 
 fdt_pic_decode_t fdt_pic_table[] = {
+#ifdef SOC_MV_ARMADA38X
+	&gic_decode_fdt,
+#endif
 	&fdt_pic_decode_ic,
 	NULL
 };

From owner-svn-src-all@freebsd.org  Wed Jan 20 13:45:37 2016
Return-Path: <owner-svn-src-all@freebsd.org>
Delivered-To: svn-src-all@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id 42E8CA8941B;
 Wed, 20 Jan 2016 13:45:37 +0000 (UTC) (envelope-from zbb@FreeBSD.org)
Received: from repo.freebsd.org (repo.freebsd.org
 [IPv6:2610:1c1:1:6068::e6a:0])
 (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
 (Client did not present a certificate)
 by mx1.freebsd.org (Postfix) with ESMTPS id 15B3B17EE;
 Wed, 20 Jan 2016 13:45:37 +0000 (UTC) (envelope-from zbb@FreeBSD.org)
Received: from repo.freebsd.org ([127.0.1.37])
 by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u0KDjaoI065061;
 Wed, 20 Jan 2016 13:45:36 GMT (envelope-from zbb@FreeBSD.org)
Received: (from zbb@localhost)
 by repo.freebsd.org (8.15.2/8.15.2/Submit) id u0KDjaRB065060;
 Wed, 20 Jan 2016 13:45:36 GMT (envelope-from zbb@FreeBSD.org)
Message-Id: <201601201345.u0KDjaRB065060@repo.freebsd.org>
X-Authentication-Warning: repo.freebsd.org: zbb set sender to zbb@FreeBSD.org
 using -f
From: Zbigniew Bodek <zbb@FreeBSD.org>
Date: Wed, 20 Jan 2016 13:45:36 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-head@freebsd.org
Subject: svn commit: r294422 - head/sys/arm/arm
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.20
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for &quot;
 user&quot; and &quot; projects&quot; \)" <svn-src-all.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-all/>
List-Post: <mailto:svn-src-all@freebsd.org>
List-Help: <mailto:svn-src-all-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Wed, 20 Jan 2016 13:45:37 -0000

Author: zbb
Date: Wed Jan 20 13:45:35 2016
New Revision: 294422
URL: https://svnweb.freebsd.org/changeset/base/294422

Log:
  Fix GIC FDT interrupts decoding
  
  Interrupt type in FDT was interpreted incorrectly.
  Patch taken from freebsd-arm thread 'GIC - interrupts interpretation in
  DTS/FDT':
  https://lists.freebsd.org/pipermail/freebsd-arm/2015-August/012145.html
  
  Reviewed by:    ian, imp
  Obtained from:  Semihalf
  Sponsored by:   Stormshield
  Submitted by:   Michal Stanek <mst@semihalf.com>
  Differential revision:  https://reviews.freebsd.org/D4215

Modified:
  head/sys/arm/arm/gic.c

Modified: head/sys/arm/arm/gic.c
==============================================================================
--- head/sys/arm/arm/gic.c	Wed Jan 20 13:42:54 2016	(r294421)
+++ head/sys/arm/arm/gic.c	Wed Jan 20 13:45:35 2016	(r294422)
@@ -336,9 +336,11 @@ gic_decode_fdt(phandle_t iparent, pcell_
 		 *   2 = high-to-low edge triggered
 		 *   4 = active high level-sensitive
 		 *   8 = active low level-sensitive
-		 * The hardware only supports active-high-level or rising-edge.
+		 * The hardware only supports active-high-level or rising-edge
+		 * for SPIs
 		 */
-		if (fdt32_to_cpu(intr[2]) & 0x0a) {
+		if (*interrupt >= GIC_FIRST_SPI &&
+		    fdt32_to_cpu(intr[2]) & 0x0a) {
 			printf("unsupported trigger/polarity configuration "
 			    "0x%02x\n", fdt32_to_cpu(intr[2]) & 0x0f);
 		}

From owner-svn-src-all@freebsd.org  Wed Jan 20 13:47:45 2016
Return-Path: <owner-svn-src-all@freebsd.org>
Delivered-To: svn-src-all@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id EFB4BA89529;
 Wed, 20 Jan 2016 13:47:45 +0000 (UTC) (envelope-from zbb@FreeBSD.org)
Received: from repo.freebsd.org (repo.freebsd.org
 [IPv6:2610:1c1:1:6068::e6a:0])
 (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
 (Client did not present a certificate)
 by mx1.freebsd.org (Postfix) with ESMTPS id BD1A41AA5;
 Wed, 20 Jan 2016 13:47:45 +0000 (UTC) (envelope-from zbb@FreeBSD.org)
Received: from repo.freebsd.org ([127.0.1.37])
 by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u0KDlipn065250;
 Wed, 20 Jan 2016 13:47:44 GMT (envelope-from zbb@FreeBSD.org)
Received: (from zbb@localhost)
 by repo.freebsd.org (8.15.2/8.15.2/Submit) id u0KDlilQ065249;
 Wed, 20 Jan 2016 13:47:44 GMT (envelope-from zbb@FreeBSD.org)
Message-Id: <201601201347.u0KDlilQ065249@repo.freebsd.org>
X-Authentication-Warning: repo.freebsd.org: zbb set sender to zbb@FreeBSD.org
 using -f
From: Zbigniew Bodek <zbb@FreeBSD.org>
Date: Wed, 20 Jan 2016 13:47:44 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-head@freebsd.org
Subject: svn commit: r294423 - head/sys/dev/uart
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.20
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for &quot;
 user&quot; and &quot; projects&quot; \)" <svn-src-all.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-all/>
List-Post: <mailto:svn-src-all@freebsd.org>
List-Help: <mailto:svn-src-all-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Wed, 20 Jan 2016 13:47:46 -0000

Author: zbb
Date: Wed Jan 20 13:47:44 2016
New Revision: 294423
URL: https://svnweb.freebsd.org/changeset/base/294423

Log:
  Add compatibility string for dw-apb-uart in ns8250 driver
  
  This compatibility string is used in .dts file of Armada38x
  and isrequired for driver attachment.
  
  Reviewed by:    andrew, ian, imp
  Obtained from:  Semihalf
  Sponsored by:   Stormshield
  Submitted by:   Michal Stanek <mst@semihalf.com>
  Differential revision:  https://reviews.freebsd.org/D4216

Modified:
  head/sys/dev/uart/uart_dev_ns8250.c

Modified: head/sys/dev/uart/uart_dev_ns8250.c
==============================================================================
--- head/sys/dev/uart/uart_dev_ns8250.c	Wed Jan 20 13:45:35 2016	(r294422)
+++ head/sys/dev/uart/uart_dev_ns8250.c	Wed Jan 20 13:47:44 2016	(r294423)
@@ -397,6 +397,7 @@ struct uart_class uart_ns8250_class = {
 #ifdef FDT
 static struct ofw_compat_data compat_data[] = {
 	{"ns16550",		(uintptr_t)&uart_ns8250_class},
+	{"snps,dw-apb-uart",	(uintptr_t)&uart_ns8250_class},
 	{NULL,			(uintptr_t)NULL},
 };
 UART_FDT_CLASS_AND_DEVICE(compat_data);

From owner-svn-src-all@freebsd.org  Wed Jan 20 13:51:16 2016
Return-Path: <owner-svn-src-all@freebsd.org>
Delivered-To: svn-src-all@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id AC6BEA89763;
 Wed, 20 Jan 2016 13:51:16 +0000 (UTC) (envelope-from zbb@FreeBSD.org)
Received: from repo.freebsd.org (repo.freebsd.org
 [IPv6:2610:1c1:1:6068::e6a:0])
 (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
 (Client did not present a certificate)
 by mx1.freebsd.org (Postfix) with ESMTPS id 87A4E1ECE;
 Wed, 20 Jan 2016 13:51:16 +0000 (UTC) (envelope-from zbb@FreeBSD.org)
Received: from repo.freebsd.org ([127.0.1.37])
 by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u0KDpFB2065567;
 Wed, 20 Jan 2016 13:51:15 GMT (envelope-from zbb@FreeBSD.org)
Received: (from zbb@localhost)
 by repo.freebsd.org (8.15.2/8.15.2/Submit) id u0KDpFJR065560;
 Wed, 20 Jan 2016 13:51:15 GMT (envelope-from zbb@FreeBSD.org)
Message-Id: <201601201351.u0KDpFJR065560@repo.freebsd.org>
X-Authentication-Warning: repo.freebsd.org: zbb set sender to zbb@FreeBSD.org
 using -f
From: Zbigniew Bodek <zbb@FreeBSD.org>
Date: Wed, 20 Jan 2016 13:51:15 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-head@freebsd.org
Subject: svn commit: r294424 - in head/sys: boot/fdt/dts/arm dev/uart
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.20
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for &quot;
 user&quot; and &quot; projects&quot; \)" <svn-src-all.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-all/>
List-Post: <mailto:svn-src-all@freebsd.org>
List-Help: <mailto:svn-src-all-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Wed, 20 Jan 2016 13:51:16 -0000

Author: zbb
Date: Wed Jan 20 13:51:14 2016
New Revision: 294424
URL: https://svnweb.freebsd.org/changeset/base/294424

Log:
  Fix busy-detect when using DesignWare UART
  
  uart_dev_ns8250 now relies on compatible property instead of additional
  'busy-detect' cell. All drivers with compatible = "snps,dw-apb-uart" have
  busy detection turned on. DTS files of devices affected by the change
  were modified and 'busy-detect' property was removed.
  
  Reviewed by:    andrew, ian, imp
  Obtained from:  Semihalf
  Sponsored by:   Stormshield
  Submitted by:   Bartosz Szczepanek <bsz@semihalf.com>
  Differential revision:  https://reviews.freebsd.org/D4218

Modified:
  head/sys/boot/fdt/dts/arm/db78460.dts
  head/sys/boot/fdt/dts/arm/rk3188.dtsi
  head/sys/boot/fdt/dts/arm/sun4i-a10.dtsi
  head/sys/boot/fdt/dts/arm/sun7i-a20.dtsi
  head/sys/dev/uart/uart_dev_ns8250.c

Modified: head/sys/boot/fdt/dts/arm/db78460.dts
==============================================================================
--- head/sys/boot/fdt/dts/arm/db78460.dts	Wed Jan 20 13:47:44 2016	(r294423)
+++ head/sys/boot/fdt/dts/arm/db78460.dts	Wed Jan 20 13:51:14 2016	(r294424)
@@ -111,45 +111,41 @@
 		};
 
 		serial0: serial@12000 {
-			compatible = "ns16550";
+			compatible = "snps,dw-apb-uart";
 			reg = <0x12000 0x20>;
 			reg-shift = <2>;
 			current-speed = <115200>;
 			clock-frequency = <0>;
-			busy-detect = <1>;
 			interrupts = <41>;
 			interrupt-parent = <&MPIC>;
 		};
 
 		serial1: serial@12100 {
-			compatible = "ns16550";
+			compatible = "snps,dw-apb-uart";
 			reg = <0x12100 0x20>;
 			reg-shift = <2>;
 			current-speed = <115200>;
 			clock-frequency = <0>;
-			busy-detect = <1>;
 			interrupts = <42>;
 			interrupt-parent = <&MPIC>;
 		};
 
 		serial2: serial@12200 {
-			compatible = "ns16550";
+			compatible = "snps,dw-apb-uart";
 			reg = <0x12200 0x20>;
 			reg-shift = <2>;
 			current-speed = <115200>;
 			clock-frequency = <0>;
-			busy-detect = <1>;
 			interrupts = <43>;
 			interrupt-parent = <&MPIC>;
 		};
 		
 		serial3: serial@12300 {
-			compatible = "ns16550";
+			compatible = "snps,dw-apb-uart";
 			reg = <0x12300 0x20>;
 			reg-shift = <2>;
 			current-speed = <115200>;
 			clock-frequency = <0>;
-			busy-detect = <1>;
 			interrupts = <44>;
 			interrupt-parent = <&MPIC>;
 		};

Modified: head/sys/boot/fdt/dts/arm/rk3188.dtsi
==============================================================================
--- head/sys/boot/fdt/dts/arm/rk3188.dtsi	Wed Jan 20 13:47:44 2016	(r294423)
+++ head/sys/boot/fdt/dts/arm/rk3188.dtsi	Wed Jan 20 13:51:14 2016	(r294424)
@@ -179,53 +179,49 @@
 		};
 
 		uart0: serial@10124000 {
-			compatible = "ns16550";
+			compatible = "snps,dw-apb-uart";
 			reg = <0x10124000 0x400>;
 			reg-shift = <2>;
 			interrupts = <66>;
 			interrupt-parent = <&GIC>;
 			current-speed = <115200>;
 			clock-frequency = < 24000000 >;
-			busy-detect = <1>;
 			broken-txfifo = <1>;
 			status = "disabled";
 		};
 
 		uart1: serial@10126000 {
-			compatible = "ns16550";
+			compatible = "snps,dw-apb-uart";
 			reg = <0x10126000 0x400>;
 			reg-shift = <2>;
 			interrupts = <67>;
 			interrupt-parent = <&GIC>;
 			current-speed = <115200>;
 			clock-frequency = < 24000000 >;
-			busy-detect = <1>;
 			broken-txfifo = <1>;
 			status = "disabled";
 		};
 
 		uart2: serial@20064000 {
-			compatible = "ns16550";
+			compatible = "snps,dw-apb-uart";
 			reg = <0x20064000 0x400>;
 			reg-shift = <2>;
 			interrupts = <68>;
 			interrupt-parent = <&GIC>;
 			current-speed = <115200>;
 			clock-frequency = < 24000000 >;
-			busy-detect = <1>;
 			broken-txfifo = <1>;
 			status = "disabled";
 		};
 
 		uart3: serial@20068000 {
-			compatible = "ns16550";
+			compatible = "snps,dw-apb-uart";
 			reg = <0x20068000 0x400>;
 			reg-shift = <2>;
 			interrupts = <69>;
 			interrupt-parent = <&GIC>;
 			current-speed = <115200>;
 			clock-frequency = < 24000000 >;
-			busy-detect = <1>;
 			broken-txfifo = <1>;
 			status = "disabled";
 		};

Modified: head/sys/boot/fdt/dts/arm/sun4i-a10.dtsi
==============================================================================
--- head/sys/boot/fdt/dts/arm/sun4i-a10.dtsi	Wed Jan 20 13:47:44 2016	(r294423)
+++ head/sys/boot/fdt/dts/arm/sun4i-a10.dtsi	Wed Jan 20 13:51:14 2016	(r294424)
@@ -120,14 +120,13 @@
 		};
 
 		UART0: serial@01c28000 {
-			compatible = "ns16550";
+			compatible = "snps,dw-apb-uart";
 			reg = <0x01c28000 0x400>;
 			reg-shift = <2>;
 			interrupts = <1>;
 			interrupt-parent = <&AINTC>;
 			current-speed = <115200>;
 			clock-frequency = < 24000000 >;
-			busy-detect = <1>;
 		};
 
 		emac@01c0b000 {

Modified: head/sys/boot/fdt/dts/arm/sun7i-a20.dtsi
==============================================================================
--- head/sys/boot/fdt/dts/arm/sun7i-a20.dtsi	Wed Jan 20 13:47:44 2016	(r294423)
+++ head/sys/boot/fdt/dts/arm/sun7i-a20.dtsi	Wed Jan 20 13:51:14 2016	(r294424)
@@ -126,14 +126,13 @@
 		};
 
 		UART0: serial@01c28000 {
-			compatible = "ns16550";
+			compatible = "snps,dw-apb-uart";
 			reg = <0x01c28000 0x400>;
 			reg-shift = <2>;
 			interrupts = <1>;
 			interrupt-parent = <&GIC>;
 			current-speed = <115200>;
 			clock-frequency = < 24000000 >;
-			busy-detect = <1>;
 		};
 
 		emac@01c0b000 {

Modified: head/sys/dev/uart/uart_dev_ns8250.c
==============================================================================
--- head/sys/dev/uart/uart_dev_ns8250.c	Wed Jan 20 13:47:44 2016	(r294423)
+++ head/sys/dev/uart/uart_dev_ns8250.c	Wed Jan 20 13:51:14 2016	(r294424)
@@ -457,9 +457,12 @@ ns8250_bus_attach(struct uart_softc *sc)
 	 * Check whether uart requires to read USR reg when IIR_BUSY and 
 	 * has broken txfifo. 
 	 */
+	ns8250->busy_detect = ofw_bus_is_compatible(sc->sc_dev, "snps,dw-apb-uart");
 	node = ofw_bus_get_node(sc->sc_dev);
-	if ((OF_getencprop(node, "busy-detect", &cell, sizeof(cell))) > 0)
-		ns8250->busy_detect = cell ? 1 : 0;
+	/* XXX: This is kept for a short time for compatibility with older device trees */
+	if ((OF_getencprop(node, "busy-detect", &cell, sizeof(cell))) > 0
+	    && cell != 0)
+		ns8250->busy_detect = 1;
 	if ((OF_getencprop(node, "broken-txfifo", &cell, sizeof(cell))) > 0)
 		broken_txfifo =  cell ? 1 : 0;
 #endif

From owner-svn-src-all@freebsd.org  Wed Jan 20 13:53:35 2016
Return-Path: <owner-svn-src-all@freebsd.org>
Delivered-To: svn-src-all@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id 21A19A89858;
 Wed, 20 Jan 2016 13:53:35 +0000 (UTC) (envelope-from zbb@FreeBSD.org)
Received: from repo.freebsd.org (repo.freebsd.org
 [IPv6:2610:1c1:1:6068::e6a:0])
 (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
 (Client did not present a certificate)
 by mx1.freebsd.org (Postfix) with ESMTPS id ED15E128C;
 Wed, 20 Jan 2016 13:53:34 +0000 (UTC) (envelope-from zbb@FreeBSD.org)
Received: from repo.freebsd.org ([127.0.1.37])
 by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u0KDrXdS068316;
 Wed, 20 Jan 2016 13:53:33 GMT (envelope-from zbb@FreeBSD.org)
Received: (from zbb@localhost)
 by repo.freebsd.org (8.15.2/8.15.2/Submit) id u0KDrX4C068312;
 Wed, 20 Jan 2016 13:53:33 GMT (envelope-from zbb@FreeBSD.org)
Message-Id: <201601201353.u0KDrX4C068312@repo.freebsd.org>
X-Authentication-Warning: repo.freebsd.org: zbb set sender to zbb@FreeBSD.org
 using -f
From: Zbigniew Bodek <zbb@FreeBSD.org>
Date: Wed, 20 Jan 2016 13:53:33 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-head@freebsd.org
Subject: svn commit: r294425 - in head/sys/arm/mv: . armada38x
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.20
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for &quot;
 user&quot; and &quot; projects&quot; \)" <svn-src-all.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-all/>
List-Post: <mailto:svn-src-all@freebsd.org>
List-Help: <mailto:svn-src-all-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Wed, 20 Jan 2016 13:53:35 -0000

Author: zbb
Date: Wed Jan 20 13:53:33 2016
New Revision: 294425
URL: https://svnweb.freebsd.org/changeset/base/294425

Log:
  Set IO Sync Barrier flags for all Mbus devices on Armada38x
  
  IO Sync Barrier setting is required for I/O coherency.
  
  Reviewed by:   andrew, ian, imp
  Obtained from: Semihalf
  Sponsored by:  Stormshield
  Submitted by:  Michal Stanek <mst@semihalf.com>
  Differential revision:  https://reviews.freebsd.org/D4219

Modified:
  head/sys/arm/mv/armada38x/armada38x.c
  head/sys/arm/mv/mv_machdep.c
  head/sys/arm/mv/mvwin.h

Modified: head/sys/arm/mv/armada38x/armada38x.c
==============================================================================
--- head/sys/arm/mv/armada38x/armada38x.c	Wed Jan 20 13:51:14 2016	(r294424)
+++ head/sys/arm/mv/armada38x/armada38x.c	Wed Jan 20 13:53:33 2016	(r294425)
@@ -32,10 +32,14 @@ __FBSDID("$FreeBSD$");
 #include <sys/systm.h>
 #include <sys/bus.h>
 
+#include <machine/fdt.h>
+
 #include <arm/mv/mvwin.h>
 #include <arm/mv/mvreg.h>
 #include <arm/mv/mvvar.h>
 
+int armada38x_win_set_iosync_barrier(void);
+
 uint32_t
 get_tclk(void)
 {
@@ -52,3 +56,25 @@ get_tclk(void)
 	else
 		return (TCLK_200MHZ);
 }
+
+int
+armada38x_win_set_iosync_barrier(void)
+{
+	bus_space_handle_t vaddr_iowind;
+	int rv;
+
+	rv = bus_space_map(fdtbus_bs_tag, (bus_addr_t)MV_MBUS_BRIDGE_BASE,
+	    MV_CPU_SUBSYS_REGS_LEN, 0, &vaddr_iowind);
+	if (rv != 0)
+		return (rv);
+
+	/* Set Sync Barrier flags for all Mbus internal units */
+	bus_space_write_4(fdtbus_bs_tag, vaddr_iowind, MV_SYNC_BARRIER_CTRL,
+	    MV_SYNC_BARRIER_CTRL_ALL);
+
+	bus_space_barrier(fdtbus_bs_tag, vaddr_iowind, 0,
+	    MV_CPU_SUBSYS_REGS_LEN, BUS_SPACE_BARRIER_WRITE);
+	bus_space_unmap(fdtbus_bs_tag, vaddr_iowind, MV_CPU_SUBSYS_REGS_LEN);
+
+	return (rv);
+}

Modified: head/sys/arm/mv/mv_machdep.c
==============================================================================
--- head/sys/arm/mv/mv_machdep.c	Wed Jan 20 13:51:14 2016	(r294424)
+++ head/sys/arm/mv/mv_machdep.c	Wed Jan 20 13:53:33 2016	(r294425)
@@ -66,6 +66,9 @@ static int platform_mpp_init(void);
 void armadaxp_init_coher_fabric(void);
 void armadaxp_l2_init(void);
 #endif
+#if defined(SOC_MV_ARMADA38X)
+int armada38x_win_set_iosync_barrier(void);
+#endif
 
 #define MPP_PIN_MAX		68
 #define MPP_PIN_CELLS		2
@@ -249,6 +252,12 @@ platform_late_init(void)
 #endif
 	armadaxp_l2_init();
 #endif
+
+#if defined(SOC_MV_ARMADA38X)
+	/* Set IO Sync Barrier bit for all Mbus devices */
+	if (armada38x_win_set_iosync_barrier() != 0)
+		printf("WARNING: could not map CPU Subsystem registers\n");
+#endif
 }
 
 #define FDT_DEVMAP_MAX	(MV_WIN_CPU_MAX + 2)

Modified: head/sys/arm/mv/mvwin.h
==============================================================================
--- head/sys/arm/mv/mvwin.h	Wed Jan 20 13:51:14 2016	(r294424)
+++ head/sys/arm/mv/mvwin.h	Wed Jan 20 13:53:33 2016	(r294425)
@@ -305,6 +305,16 @@
 #define	MV_WIN_SATA_BASE(n)		(0x10 * (n) + 0x34)
 #define	MV_WIN_SATA_MAX			4
 
+#if defined(SOC_MV_ARMADA38X)
+#define	MV_BOOTROM_MEM_ADDR	0xFFF00000
+#define	MV_BOOTROM_WIN_SIZE	0xF
+#define	MV_CPU_SUBSYS_REGS_LEN	0x100
+
+/* Internal Units Sync Barrier Control Register */
+#define	MV_SYNC_BARRIER_CTRL		0x84
+#define	MV_SYNC_BARRIER_CTRL_ALL	0xFFFF
+#endif
+
 #define WIN_REG_IDX_RD(pre,reg,off,base)					\
 	static __inline uint32_t						\
 	pre ## _ ## reg ## _read(int i)						\

From owner-svn-src-all@freebsd.org  Wed Jan 20 13:55:53 2016
Return-Path: <owner-svn-src-all@freebsd.org>
Delivered-To: svn-src-all@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id 81A03A8999C;
 Wed, 20 Jan 2016 13:55:53 +0000 (UTC) (envelope-from zbb@FreeBSD.org)
Received: from repo.freebsd.org (repo.freebsd.org
 [IPv6:2610:1c1:1:6068::e6a:0])
 (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
 (Client did not present a certificate)
 by mx1.freebsd.org (Postfix) with ESMTPS id 433CA1597;
 Wed, 20 Jan 2016 13:55:53 +0000 (UTC) (envelope-from zbb@FreeBSD.org)
Received: from repo.freebsd.org ([127.0.1.37])
 by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u0KDtqjR068649;
 Wed, 20 Jan 2016 13:55:52 GMT (envelope-from zbb@FreeBSD.org)
Received: (from zbb@localhost)
 by repo.freebsd.org (8.15.2/8.15.2/Submit) id u0KDtq0S068646;
 Wed, 20 Jan 2016 13:55:52 GMT (envelope-from zbb@FreeBSD.org)
Message-Id: <201601201355.u0KDtq0S068646@repo.freebsd.org>
X-Authentication-Warning: repo.freebsd.org: zbb set sender to zbb@FreeBSD.org
 using -f
From: Zbigniew Bodek <zbb@FreeBSD.org>
Date: Wed, 20 Jan 2016 13:55:52 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-head@freebsd.org
Subject: svn commit: r294426 - in head/sys/arm/mv: . armada38x
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.20
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for &quot;
 user&quot; and &quot; projects&quot; \)" <svn-src-all.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-all/>
List-Post: <mailto:svn-src-all@freebsd.org>
List-Help: <mailto:svn-src-all-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Wed, 20 Jan 2016 13:55:53 -0000

Author: zbb
Date: Wed Jan 20 13:55:51 2016
New Revision: 294426
URL: https://svnweb.freebsd.org/changeset/base/294426

Log:
  Enable SCU unit for Armada38x
  
  Valid SCU operation is necessary for SMP interoperability.
  Initialization function armada38x_enable_scu() was added.
  
  Reviewed by:    andrew, ian
  Obtained from:  Semihalf
  Sponsored by:   Stormshield
  Submitted by:   Bartosz Szczepanek <bsz@semihalf.com>
  Differential revision:  https://reviews.freebsd.org/D4220

Modified:
  head/sys/arm/mv/armada38x/armada38x.c
  head/sys/arm/mv/mv_machdep.c
  head/sys/arm/mv/mvreg.h

Modified: head/sys/arm/mv/armada38x/armada38x.c
==============================================================================
--- head/sys/arm/mv/armada38x/armada38x.c	Wed Jan 20 13:53:33 2016	(r294425)
+++ head/sys/arm/mv/armada38x/armada38x.c	Wed Jan 20 13:55:51 2016	(r294426)
@@ -39,6 +39,7 @@ __FBSDID("$FreeBSD$");
 #include <arm/mv/mvvar.h>
 
 int armada38x_win_set_iosync_barrier(void);
+int armada38x_scu_enable(void);
 
 uint32_t
 get_tclk(void)
@@ -78,3 +79,25 @@ armada38x_win_set_iosync_barrier(void)
 
 	return (rv);
 }
+
+int
+armada38x_scu_enable(void)
+{
+	bus_space_handle_t vaddr_scu;
+	int rv;
+	uint32_t val;
+
+	rv = bus_space_map(fdtbus_bs_tag, (bus_addr_t)MV_SCU_BASE,
+	    MV_SCU_REGS_LEN, 0, &vaddr_scu);
+	if (rv != 0)
+		return (rv);
+
+	/* Enable SCU */
+	val = bus_space_read_4(fdtbus_bs_tag, vaddr_scu, MV_SCU_REG_CTRL);
+	if (!(val & MV_SCU_ENABLE))
+		bus_space_write_4(fdtbus_bs_tag, vaddr_scu, 0,
+		    val | MV_SCU_ENABLE);
+
+	bus_space_unmap(fdtbus_bs_tag, vaddr_scu, MV_SCU_REGS_LEN);
+	return (0);
+}

Modified: head/sys/arm/mv/mv_machdep.c
==============================================================================
--- head/sys/arm/mv/mv_machdep.c	Wed Jan 20 13:53:33 2016	(r294425)
+++ head/sys/arm/mv/mv_machdep.c	Wed Jan 20 13:55:51 2016	(r294426)
@@ -68,6 +68,7 @@ void armadaxp_l2_init(void);
 #endif
 #if defined(SOC_MV_ARMADA38X)
 int armada38x_win_set_iosync_barrier(void);
+int armada38x_scu_enable(void);
 #endif
 
 #define MPP_PIN_MAX		68
@@ -257,6 +258,8 @@ platform_late_init(void)
 	/* Set IO Sync Barrier bit for all Mbus devices */
 	if (armada38x_win_set_iosync_barrier() != 0)
 		printf("WARNING: could not map CPU Subsystem registers\n");
+	if (armada38x_scu_enable() != 0)
+		printf("WARNING: could not enable SCU\n");
 #endif
 }
 

Modified: head/sys/arm/mv/mvreg.h
==============================================================================
--- head/sys/arm/mv/mvreg.h	Wed Jan 20 13:53:33 2016	(r294425)
+++ head/sys/arm/mv/mvreg.h	Wed Jan 20 13:55:51 2016	(r294426)
@@ -34,6 +34,8 @@
 #ifndef _MVREG_H_
 #define _MVREG_H_
 
+#include <arm/mv/mvwin.h>
+
 #if defined(SOC_MV_DISCOVERY)
 #define IRQ_CAUSE_ERROR		0x0
 #define IRQ_CAUSE		0x4
@@ -452,4 +454,15 @@
 #define MV_DRBL_MASK(d,u)	(0x10 * (u) + 0x8 * (d) + 0x4)
 #define MV_DRBL_MSG(m,d,u)	(0x10 * (u) + 0x8 * (d) + 0x4 * (m) + 0x30)
 #endif
+
+/*
+ * SCU
+ */
+#if defined(SOC_MV_ARMADA38X)
+#define	MV_SCU_BASE		(MV_BASE + 0xc000)
+#define	MV_SCU_REGS_LEN		0x100
+#define	MV_SCU_REG_CTRL		0
+#define	MV_SCU_ENABLE		1
+#endif
+
 #endif /* _MVREG_H_ */

From owner-svn-src-all@freebsd.org  Wed Jan 20 13:58:09 2016
Return-Path: <owner-svn-src-all@freebsd.org>
Delivered-To: svn-src-all@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0F9F4A89A73;
 Wed, 20 Jan 2016 13:58:09 +0000 (UTC) (envelope-from zbb@FreeBSD.org)
Received: from repo.freebsd.org (repo.freebsd.org
 [IPv6:2610:1c1:1:6068::e6a:0])
 (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
 (Client did not present a certificate)
 by mx1.freebsd.org (Postfix) with ESMTPS id C1F6A18F0;
 Wed, 20 Jan 2016 13:58:08 +0000 (UTC) (envelope-from zbb@FreeBSD.org)
Received: from repo.freebsd.org ([127.0.1.37])
 by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u0KDw7XN068852;
 Wed, 20 Jan 2016 13:58:07 GMT (envelope-from zbb@FreeBSD.org)
Received: (from zbb@localhost)
 by repo.freebsd.org (8.15.2/8.15.2/Submit) id u0KDw73L068851;
 Wed, 20 Jan 2016 13:58:07 GMT (envelope-from zbb@FreeBSD.org)
Message-Id: <201601201358.u0KDw73L068851@repo.freebsd.org>
X-Authentication-Warning: repo.freebsd.org: zbb set sender to zbb@FreeBSD.org
 using -f
From: Zbigniew Bodek <zbb@FreeBSD.org>
Date: Wed, 20 Jan 2016 13:58:07 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-head@freebsd.org
Subject: svn commit: r294427 - head/sys/dev/usb/controller
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.20
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for &quot;
 user&quot; and &quot; projects&quot; \)" <svn-src-all.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-all/>
List-Post: <mailto:svn-src-all@freebsd.org>
List-Help: <mailto:svn-src-all-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Wed, 20 Jan 2016 13:58:09 -0000

Author: zbb
Date: Wed Jan 20 13:58:07 2016
New Revision: 294427
URL: https://svnweb.freebsd.org/changeset/base/294427

Log:
  Improve attachment of the ehci_mv driver
  
  Driver was modified to ensure it attaches properly to "marvell,orion-ehci"
  node, which doesn't have error interrupt line defined. Neccessary
  ofw_compat_data struct was added and probe procedure was altered.
  
  Reviewed by:    andrew, ian
  Obtained from:  Semihalf
  Sponsored by:   Stormshield
  Submitted by:   Bartosz Szczepanek <bsz@semihalf.com>
  Differential revision:  https://reviews.freebsd.org/D4369

Modified:
  head/sys/dev/usb/controller/ehci_mv.c

Modified: head/sys/dev/usb/controller/ehci_mv.c
==============================================================================
--- head/sys/dev/usb/controller/ehci_mv.c	Wed Jan 20 13:55:51 2016	(r294426)
+++ head/sys/dev/usb/controller/ehci_mv.c	Wed Jan 20 13:58:07 2016	(r294427)
@@ -99,6 +99,12 @@ static void *ih_err;
 #define	MV_USB_HOST_OVERFLOW   (1 << 2)
 #define	MV_USB_DEVICE_UNDERFLOW (1 << 3)
 
+static struct ofw_compat_data compat_data[] = {
+	{"mrvl,usb-ehci",	true},
+	{"marvell,orion-ehci",	true},
+	{NULL,			false}
+};
+
 static int
 mv_ehci_probe(device_t self)
 {
@@ -106,7 +112,7 @@ mv_ehci_probe(device_t self)
 	if (!ofw_bus_status_okay(self))
 		return (ENXIO);
 
-	if (!ofw_bus_is_compatible(self, "mrvl,usb-ehci"))
+	if (!ofw_bus_search_compatible(self, compat_data)->ocd_data)
 		return (ENXIO);
 
 	device_set_desc(self, EHCI_HC_DEVSTR);
@@ -156,12 +162,15 @@ mv_ehci_attach(device_t self)
 		    device_get_name(self));
 
 	rid = 0;
-	irq_err = bus_alloc_resource_any(self, SYS_RES_IRQ, &rid,
-	    RF_SHAREABLE | RF_ACTIVE);
-	if (irq_err == NULL) {
-		device_printf(self, "Could not allocate error irq\n");
-		mv_ehci_detach(self);
-		return (ENXIO);
+	if (!ofw_bus_is_compatible(self, "marvell,orion-ehci")) {
+		irq_err = bus_alloc_resource_any(self, SYS_RES_IRQ, &rid,
+		    RF_SHAREABLE | RF_ACTIVE);
+		if (irq_err == NULL) {
+			device_printf(self, "Could not allocate error irq\n");
+			mv_ehci_detach(self);
+			return (ENXIO);
+		}
+		rid = 1;
 	}
 
 	/*
@@ -169,7 +178,6 @@ mv_ehci_attach(device_t self)
 	 * sure to use the correct rid for the main one (controller interrupt)
 	 * -- refer to DTS for the right resource number to use here.
 	 */
-	rid = 1;
 	sc->sc_irq_res = bus_alloc_resource_any(self, SYS_RES_IRQ, &rid,
 	    RF_SHAREABLE | RF_ACTIVE);
 	if (sc->sc_irq_res == NULL) {
@@ -187,12 +195,14 @@ mv_ehci_attach(device_t self)
 
 	sprintf(sc->sc_vendor, "Marvell");
 
-	err = bus_setup_intr(self, irq_err, INTR_TYPE_BIO,
-	    err_intr, NULL, sc, &ih_err);
-	if (err) {
-		device_printf(self, "Could not setup error irq, %d\n", err);
-		ih_err = NULL;
-		goto error;
+	if (!ofw_bus_is_compatible(self, "marvell,orion-ehci")) {
+		err = bus_setup_intr(self, irq_err, INTR_TYPE_BIO,
+		    err_intr, NULL, sc, &ih_err);
+		if (err) {
+			device_printf(self, "Could not setup error irq, %d\n", err);
+			ih_err = NULL;
+			goto error;
+		}
 	}
 
 	EWRITE4(sc, USB_BRIDGE_INTR_MASK, MV_USB_ADDR_DECODE_ERR |

From owner-svn-src-all@freebsd.org  Wed Jan 20 14:00:33 2016
Return-Path: <owner-svn-src-all@freebsd.org>
Delivered-To: svn-src-all@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id E29F0A89C0E;
 Wed, 20 Jan 2016 14:00:33 +0000 (UTC) (envelope-from zbb@FreeBSD.org)
Received: from repo.freebsd.org (repo.freebsd.org
 [IPv6:2610:1c1:1:6068::e6a:0])
 (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
 (Client did not present a certificate)
 by mx1.freebsd.org (Postfix) with ESMTPS id B673B1B96;
 Wed, 20 Jan 2016 14:00:33 +0000 (UTC) (envelope-from zbb@FreeBSD.org)
Received: from repo.freebsd.org ([127.0.1.37])
 by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u0KE0WTh069089;
 Wed, 20 Jan 2016 14:00:32 GMT (envelope-from zbb@FreeBSD.org)
Received: (from zbb@localhost)
 by repo.freebsd.org (8.15.2/8.15.2/Submit) id u0KE0WFG069088;
 Wed, 20 Jan 2016 14:00:32 GMT (envelope-from zbb@FreeBSD.org)
Message-Id: <201601201400.u0KE0WFG069088@repo.freebsd.org>
X-Authentication-Warning: repo.freebsd.org: zbb set sender to zbb@FreeBSD.org
 using -f
From: Zbigniew Bodek <zbb@FreeBSD.org>
Date: Wed, 20 Jan 2016 14:00:32 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-head@freebsd.org
Subject: svn commit: r294428 - head/sys/arm/conf
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.20
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for &quot;
 user&quot; and &quot; projects&quot; \)" <svn-src-all.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-all/>
List-Post: <mailto:svn-src-all@freebsd.org>
List-Help: <mailto:svn-src-all-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Wed, 20 Jan 2016 14:00:34 -0000

Author: zbb
Date: Wed Jan 20 14:00:32 2016
New Revision: 294428
URL: https://svnweb.freebsd.org/changeset/base/294428

Log:
  Enable USB in kernconf of Armada38x
  
  With this commit, USB 2.0 works fine on Armada38x platforms.
  
  Obtained from:  Semihalf
  Sponsored by:   Stormshield
  Submitted by:   Bartosz Szczepanek <bsz@semihalf.com>
  Differential revision:  https://reviews.freebsd.org/D4375

Modified:
  head/sys/arm/conf/ARMADA38X

Modified: head/sys/arm/conf/ARMADA38X
==============================================================================
--- head/sys/arm/conf/ARMADA38X	Wed Jan 20 13:58:07 2016	(r294427)
+++ head/sys/arm/conf/ARMADA38X	Wed Jan 20 14:00:32 2016	(r294428)
@@ -16,7 +16,8 @@ makeoptions 	WERROR="-Werror"
 
 options 	MD_ROOT
 #makeoptions 	MFS_IMAGE=/path/to/miniroot
-options 	ROOTDEVNAME=\"ufs:md0\"
+#options 	ROOTDEVNAME=\"ufs:md0\"
+options 	ROOTDEVNAME=\"/dev/da0s1a\"
 
 options 	SCHED_ULE		# ULE scheduler
 #options 	SCHED_4BSD		# 4BSD scheduler
@@ -57,6 +58,14 @@ device		gic
 # Timers
 device		mpcore_timer
 
+# USB
+device		usb
+device		ehci
+device		umass
+device		scbus
+device		pass
+device		da
+
 #FDT
 options 	FDT
 options 	FDT_DTB_STATIC

From owner-svn-src-all@freebsd.org  Wed Jan 20 14:02:38 2016
Return-Path: <owner-svn-src-all@freebsd.org>
Delivered-To: svn-src-all@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id 06A1DA89DE6;
 Wed, 20 Jan 2016 14:02:38 +0000 (UTC) (envelope-from zbb@FreeBSD.org)
Received: from repo.freebsd.org (repo.freebsd.org
 [IPv6:2610:1c1:1:6068::e6a:0])
 (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
 (Client did not present a certificate)
 by mx1.freebsd.org (Postfix) with ESMTPS id C85991F7C;
 Wed, 20 Jan 2016 14:02:37 +0000 (UTC) (envelope-from zbb@FreeBSD.org)
Received: from repo.freebsd.org ([127.0.1.37])
 by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u0KE2aOG071822;
 Wed, 20 Jan 2016 14:02:36 GMT (envelope-from zbb@FreeBSD.org)
Received: (from zbb@localhost)
 by repo.freebsd.org (8.15.2/8.15.2/Submit) id u0KE2axW071821;
 Wed, 20 Jan 2016 14:02:36 GMT (envelope-from zbb@FreeBSD.org)
Message-Id: <201601201402.u0KE2axW071821@repo.freebsd.org>
X-Authentication-Warning: repo.freebsd.org: zbb set sender to zbb@FreeBSD.org
 using -f
From: Zbigniew Bodek <zbb@FreeBSD.org>
Date: Wed, 20 Jan 2016 14:02:36 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-head@freebsd.org
Subject: svn commit: r294429 - head/sys/arm/mv
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.20
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for &quot;
 user&quot; and &quot; projects&quot; \)" <svn-src-all.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-all/>
List-Post: <mailto:svn-src-all@freebsd.org>
List-Help: <mailto:svn-src-all-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Wed, 20 Jan 2016 14:02:38 -0000

Author: zbb
Date: Wed Jan 20 14:02:36 2016
New Revision: 294429
URL: https://svnweb.freebsd.org/changeset/base/294429

Log:
  Enhance remap capabilities for Armada38x
  
  Add conditions corresponding to Armada38x-based SoCs,
  enhancing their remap capabilities.
  This is required for PCIe to work properly.
  
  Reviewed by:    andrew
  Obtained from:  Semihalf
  Sponsored by:   Stormshield
  Submitted by:   Bartosz Szczepanek <bsz@semihalf.com>
  Differential revision:  https://reviews.freebsd.org/D4376

Modified:
  head/sys/arm/mv/mv_common.c

Modified: head/sys/arm/mv/mv_common.c
==============================================================================
--- head/sys/arm/mv/mv_common.c	Wed Jan 20 14:00:32 2016	(r294428)
+++ head/sys/arm/mv/mv_common.c	Wed Jan 20 14:02:36 2016	(r294429)
@@ -733,6 +733,9 @@ win_cpu_can_remap(int i)
 	    (dev == MV_DEV_88F5281 && i < 4) ||
 	    (dev == MV_DEV_88F6281 && i < 4) ||
 	    (dev == MV_DEV_88F6282 && i < 4) ||
+	    (dev == MV_DEV_88F6828 && i < 20) ||
+	    (dev == MV_DEV_88F6820 && i < 20) ||
+	    (dev == MV_DEV_88F6810 && i < 20) ||
 	    (dev == MV_DEV_88RC8180 && i < 2) ||
 	    (dev == MV_DEV_88F6781 && i < 4) ||
 	    (dev == MV_DEV_MV78100_Z0 && i < 8) ||

From owner-svn-src-all@freebsd.org  Wed Jan 20 14:05:23 2016
Return-Path: <owner-svn-src-all@freebsd.org>
Delivered-To: svn-src-all@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id 24E2FA89F22;
 Wed, 20 Jan 2016 14:05:23 +0000 (UTC) (envelope-from zbb@FreeBSD.org)
Received: from repo.freebsd.org (repo.freebsd.org
 [IPv6:2610:1c1:1:6068::e6a:0])
 (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
 (Client did not present a certificate)
 by mx1.freebsd.org (Postfix) with ESMTPS id F11EB11C8;
 Wed, 20 Jan 2016 14:05:22 +0000 (UTC) (envelope-from zbb@FreeBSD.org)
Received: from repo.freebsd.org ([127.0.1.37])
 by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u0KE5LnB072064;
 Wed, 20 Jan 2016 14:05:21 GMT (envelope-from zbb@FreeBSD.org)
Received: (from zbb@localhost)
 by repo.freebsd.org (8.15.2/8.15.2/Submit) id u0KE5Ljj072061;
 Wed, 20 Jan 2016 14:05:21 GMT (envelope-from zbb@FreeBSD.org)
Message-Id: <201601201405.u0KE5Ljj072061@repo.freebsd.org>
X-Authentication-Warning: repo.freebsd.org: zbb set sender to zbb@FreeBSD.org
 using -f
From: Zbigniew Bodek <zbb@FreeBSD.org>
Date: Wed, 20 Jan 2016 14:05:21 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-head@freebsd.org
Subject: svn commit: r294430 - in head/sys: arm/mv dev/pci
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.20
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for &quot;
 user&quot; and &quot; projects&quot; \)" <svn-src-all.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-all/>
List-Post: <mailto:svn-src-all@freebsd.org>
List-Help: <mailto:svn-src-all-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Wed, 20 Jan 2016 14:05:23 -0000

Author: zbb
Date: Wed Jan 20 14:05:21 2016
New Revision: 294430
URL: https://svnweb.freebsd.org/changeset/base/294430

Log:
  Fix invalid root link detection in mv_pci driver
  
  mv_pci driver omitted slot 0, which can be valid device on Armada38x.
  New mechanism detects if device is root link, basing on vendor's
  and device's IDs.
  It is restricted to Armada38x; on other machines, behaviour remains
  the same.
  
  Reviewed by:    andrew
  Obtained from:  Semihalf
  Sponsored by:   Stormshield
  Submitted by:   Bartosz Szczepanek <bsz@semihalf.com>
  Differential revision:  https://reviews.freebsd.org/D4377

Modified:
  head/sys/arm/mv/mv_pci.c
  head/sys/arm/mv/mvreg.h
  head/sys/dev/pci/pcireg.h

Modified: head/sys/arm/mv/mv_pci.c
==============================================================================
--- head/sys/arm/mv/mv_pci.c	Wed Jan 20 14:02:36 2016	(r294429)
+++ head/sys/arm/mv/mv_pci.c	Wed Jan 20 14:05:21 2016	(r294430)
@@ -1,7 +1,7 @@
 /*-
  * Copyright (c) 2008 MARVELL INTERNATIONAL LTD.
  * Copyright (c) 2010 The FreeBSD Foundation
- * Copyright (c) 2010-2012 Semihalf
+ * Copyright (c) 2010-2015 Semihalf
  * All rights reserved.
  *
  * Developed by Semihalf.
@@ -1016,6 +1016,25 @@ mv_pcib_maxslots(device_t dev)
 	return ((sc->sc_type != MV_TYPE_PCI) ? 1 : PCI_SLOTMAX);
 }
 
+static int
+mv_pcib_root_slot(device_t dev, u_int bus, u_int slot, u_int func)
+{
+#if defined(SOC_MV_ARMADA38X)
+	struct mv_pcib_softc *sc = device_get_softc(dev);
+	uint32_t vendor, device;
+
+	vendor = mv_pcib_hw_cfgread(sc, bus, slot, func, PCIR_VENDOR,
+	    PCIR_VENDOR_LENGTH);
+	device = mv_pcib_hw_cfgread(sc, bus, slot, func, PCIR_DEVICE,
+	    PCIR_DEVICE_LENGTH) & MV_DEV_FAMILY_MASK;
+
+	return (vendor == PCI_VENDORID_MRVL && device == MV_DEV_ARMADA38X);
+#else
+	/* On platforms other than Armada38x, root link is always at slot 0 */
+	return (slot == 0);
+#endif
+}
+
 static uint32_t
 mv_pcib_read_config(device_t dev, u_int bus, u_int slot, u_int func,
     u_int reg, int bytes)
@@ -1024,7 +1043,7 @@ mv_pcib_read_config(device_t dev, u_int 
 
 	/* Return ~0 if link is inactive or trying to read from Root */
 	if ((bus_space_read_4(sc->sc_bst, sc->sc_bsh, PCIE_REG_STATUS) &
-	    PCIE_STATUS_LINK_DOWN) || (slot == 0))
+	    PCIE_STATUS_LINK_DOWN) || mv_pcib_root_slot(dev, bus, slot, func))
 		return (~0U);
 
 	return (mv_pcib_hw_cfgread(sc, bus, slot, func, reg, bytes));
@@ -1038,7 +1057,7 @@ mv_pcib_write_config(device_t dev, u_int
 
 	/* Return if link is inactive or trying to write to Root */
 	if ((bus_space_read_4(sc->sc_bst, sc->sc_bsh, PCIE_REG_STATUS) &
-	    PCIE_STATUS_LINK_DOWN) || (slot == 0))
+	    PCIE_STATUS_LINK_DOWN) || mv_pcib_root_slot(dev, bus, slot, func))
 		return;
 
 	mv_pcib_hw_cfgwrite(sc, bus, slot, func, reg, val, bytes);

Modified: head/sys/arm/mv/mvreg.h
==============================================================================
--- head/sys/arm/mv/mvreg.h	Wed Jan 20 14:02:36 2016	(r294429)
+++ head/sys/arm/mv/mvreg.h	Wed Jan 20 14:05:21 2016	(r294430)
@@ -438,6 +438,7 @@
 
 #define MV_DEV_FAMILY_MASK	0xff00
 #define MV_DEV_DISCOVERY	0x7800
+#define	MV_DEV_ARMADA38X	0x6800
 
 /*
  * Doorbell register control

Modified: head/sys/dev/pci/pcireg.h
==============================================================================
--- head/sys/dev/pci/pcireg.h	Wed Jan 20 14:02:36 2016	(r294429)
+++ head/sys/dev/pci/pcireg.h	Wed Jan 20 14:05:21 2016	(r294430)
@@ -690,6 +690,9 @@
 #define	PCIR_VENDOR_LENGTH	0x2
 #define	PCIR_VENDOR_DATA	0x3
 
+/* PCI Device capability definitions */
+#define	PCIR_DEVICE_LENGTH	0x2
+
 /* PCI EHCI Debug Port definitions */
 #define	PCIR_DEBUG_PORT		0x2
 #define	PCIM_DEBUG_PORT_OFFSET		0x1FFF

From owner-svn-src-all@freebsd.org  Wed Jan 20 14:10:02 2016
Return-Path: <owner-svn-src-all@freebsd.org>
Delivered-To: svn-src-all@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id 072DDA8A09A;
 Wed, 20 Jan 2016 14:10:02 +0000 (UTC) (envelope-from zbb@FreeBSD.org)
Received: from repo.freebsd.org (repo.freebsd.org
 [IPv6:2610:1c1:1:6068::e6a:0])
 (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
 (Client did not present a certificate)
 by mx1.freebsd.org (Postfix) with ESMTPS id B367F14E8;
 Wed, 20 Jan 2016 14:10:01 +0000 (UTC) (envelope-from zbb@FreeBSD.org)
Received: from repo.freebsd.org ([127.0.1.37])
 by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u0KEA05t072449;
 Wed, 20 Jan 2016 14:10:00 GMT (envelope-from zbb@FreeBSD.org)
Received: (from zbb@localhost)
 by repo.freebsd.org (8.15.2/8.15.2/Submit) id u0KEA0QC072448;
 Wed, 20 Jan 2016 14:10:00 GMT (envelope-from zbb@FreeBSD.org)
Message-Id: <201601201410.u0KEA0QC072448@repo.freebsd.org>
X-Authentication-Warning: repo.freebsd.org: zbb set sender to zbb@FreeBSD.org
 using -f
From: Zbigniew Bodek <zbb@FreeBSD.org>
Date: Wed, 20 Jan 2016 14:10:00 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-head@freebsd.org
Subject: svn commit: r294431 - head/sys/arm/mv
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.20
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for &quot;
 user&quot; and &quot; projects&quot; \)" <svn-src-all.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-all/>
List-Post: <mailto:svn-src-all@freebsd.org>
List-Help: <mailto:svn-src-all-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Wed, 20 Jan 2016 14:10:02 -0000

Author: zbb
Date: Wed Jan 20 14:10:00 2016
New Revision: 294431
URL: https://svnweb.freebsd.org/changeset/base/294431

Log:
  Improve definitions of CPU/PCIe windows for Armada38x
  
  Enhance existing ARMADAXP defines and introduce new MV_WIN_PCIE_
  definitions.
  
  Reviewed by:    andrew
  Obtained from:  Semihalf
  Sponsored by:   Stormshield
  Submitted by:   Bartosz Szczepanek <bsz@semihalf.com>
  Differential revision:  https://reviews.freebsd.org/D4378

Modified:
  head/sys/arm/mv/mvwin.h

Modified: head/sys/arm/mv/mvwin.h
==============================================================================
--- head/sys/arm/mv/mvwin.h	Wed Jan 20 14:05:21 2016	(r294430)
+++ head/sys/arm/mv/mvwin.h	Wed Jan 20 14:10:00 2016	(r294431)
@@ -150,6 +150,8 @@
 
 #if defined(SOC_MV_FREY)
 #define MV_PCIE_BASE		(MV_BASE + 0x8000)
+#elif defined(SOC_MV_ARMADA38X)
+#define	MV_PCIE_BASE		(MV_BASE + 0x80000)
 #else
 #define MV_PCIE_BASE		(MV_BASE + 0x40000)
 #endif
@@ -170,7 +172,7 @@
 /*
  * Decode windows definitions and macros
  */
-#if defined(SOC_MV_ARMADAXP)
+#if defined(SOC_MV_ARMADAXP) || defined(SOC_MV_ARMADA38X)
 #define MV_WIN_CPU_CTRL(n)		(((n) < 8) ? 0x10 * (n) :  0x90 + (0x8 * ((n) - 8)))
 #define MV_WIN_CPU_BASE(n)		((((n) < 8) ? 0x10 * (n) :  0x90 + (0x8 * ((n) - 8))) + 0x4)
 #define MV_WIN_CPU_REMAP_LO(n)		(0x10 * (n) +  0x008)
@@ -184,7 +186,7 @@
 
 #if defined(SOC_MV_DISCOVERY)
 #define MV_WIN_CPU_MAX			14
-#elif defined(SOC_MV_ARMADAXP)
+#elif defined(SOC_MV_ARMADAXP) || defined(SOC_MV_ARMADA38X)
 #define MV_WIN_CPU_MAX			20
 #else
 #define MV_WIN_CPU_MAX			8
@@ -269,6 +271,10 @@
 #define MV_WIN_PCIE_TARGET(n)		(4 + (4 * ((n) % 2)))
 #define MV_WIN_PCIE_MEM_ATTR(n)		(0xE8 + (0x10 * ((n) / 2)))
 #define MV_WIN_PCIE_IO_ATTR(n)		(0xE0 + (0x10 * ((n) / 2)))
+#elif defined(SOC_MV_ARMADA38X)
+#define	MV_WIN_PCIE_TARGET(n)		((n) == 0 ? 8 : 4)
+#define	MV_WIN_PCIE_MEM_ATTR(n)		((n) < 2 ? 0xE8 : (0xD8 - (((n) % 2) * 0x20)))
+#define	MV_WIN_PCIE_IO_ATTR(n)		((n) < 2 ? 0xE0 : (0xD0 - (((n) % 2) * 0x20)))
 #elif defined(SOC_MV_ORION)
 #define MV_WIN_PCIE_TARGET(n)		4
 #define MV_WIN_PCIE_MEM_ATTR(n)		0x59

From owner-svn-src-all@freebsd.org  Wed Jan 20 14:14:31 2016
Return-Path: <owner-svn-src-all@freebsd.org>
Delivered-To: svn-src-all@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id E77D7A8A2D6;
 Wed, 20 Jan 2016 14:14:31 +0000 (UTC) (envelope-from zbb@FreeBSD.org)
Received: from repo.freebsd.org (repo.freebsd.org
 [IPv6:2610:1c1:1:6068::e6a:0])
 (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
 (Client did not present a certificate)
 by mx1.freebsd.org (Postfix) with ESMTPS id BEBC81A94;
 Wed, 20 Jan 2016 14:14:31 +0000 (UTC) (envelope-from zbb@FreeBSD.org)
Received: from repo.freebsd.org ([127.0.1.37])
 by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u0KEEUeX075396;
 Wed, 20 Jan 2016 14:14:30 GMT (envelope-from zbb@FreeBSD.org)
Received: (from zbb@localhost)
 by repo.freebsd.org (8.15.2/8.15.2/Submit) id u0KEEUmd075392;
 Wed, 20 Jan 2016 14:14:30 GMT (envelope-from zbb@FreeBSD.org)
Message-Id: <201601201414.u0KEEUmd075392@repo.freebsd.org>
X-Authentication-Warning: repo.freebsd.org: zbb set sender to zbb@FreeBSD.org
 using -f
From: Zbigniew Bodek <zbb@FreeBSD.org>
Date: Wed, 20 Jan 2016 14:14:30 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-head@freebsd.org
Subject: svn commit: r294432 - in head/sys: arm/conf boot/fdt/dts/arm
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.20
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for &quot;
 user&quot; and &quot; projects&quot; \)" <svn-src-all.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-all/>
List-Post: <mailto:svn-src-all@freebsd.org>
List-Help: <mailto:svn-src-all-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Wed, 20 Jan 2016 14:14:32 -0000

Author: zbb
Date: Wed Jan 20 14:14:30 2016
New Revision: 294432
URL: https://svnweb.freebsd.org/changeset/base/294432

Log:
  Change DTS entry of PCIe controller for Armada38x
  
  Invalid (in FreeBSD) definition of PCI controller was
  replaced with another one, working in FreeBSD environment.
  
  PCI controller's entry had to move from its parent node
  so as to be recognized properly by FBSD.
  
  PCI was enabled in kernel configuration file.
  
  Obtained from:	Semihalf
  Sponsored by:	Stormshield
  Submitted by:	Bartosz Szczepanek <bsz@semihalf.com>
  Differential revision:  https://reviews.freebsd.org/D4379

Modified:
  head/sys/arm/conf/ARMADA38X
  head/sys/boot/fdt/dts/arm/armada-385.dtsi
  head/sys/boot/fdt/dts/arm/armada-388-gp.dts
  head/sys/boot/fdt/dts/arm/armada-38x.dtsi

Modified: head/sys/arm/conf/ARMADA38X
==============================================================================
--- head/sys/arm/conf/ARMADA38X	Wed Jan 20 14:10:00 2016	(r294431)
+++ head/sys/arm/conf/ARMADA38X	Wed Jan 20 14:14:30 2016	(r294432)
@@ -51,6 +51,12 @@ device		uart_ns8250
 # Network
 device		ether
 device		vlan
+device		mii
+device		bpf
+device		re
+
+# PCI
+device		pci
 
 # Interrupt controllers
 device		gic

Modified: head/sys/boot/fdt/dts/arm/armada-385.dtsi
==============================================================================
--- head/sys/boot/fdt/dts/arm/armada-385.dtsi	Wed Jan 20 14:10:00 2016	(r294431)
+++ head/sys/boot/fdt/dts/arm/armada-385.dtsi	Wed Jan 20 14:14:30 2016	(r294432)
@@ -77,110 +77,5 @@
 				compatible = "marvell,mv88f6820-pinctrl";
 			};
 		};
-
-		pcie-controller {
-			compatible = "marvell,armada-370-pcie";
-			status = "disabled";
-			device_type = "pci";
-
-			#address-cells = <3>;
-			#size-cells = <2>;
-
-			msi-parent = <&mpic>;
-			bus-range = <0x00 0xff>;
-
-			ranges =
-			       <0x82000000 0 0x80000 MBUS_ID(0xf0, 0x01) 0x80000 0 0x00002000
-				0x82000000 0 0x40000 MBUS_ID(0xf0, 0x01) 0x40000 0 0x00002000
-				0x82000000 0 0x44000 MBUS_ID(0xf0, 0x01) 0x44000 0 0x00002000
-				0x82000000 0 0x48000 MBUS_ID(0xf0, 0x01) 0x48000 0 0x00002000
-				0x82000000 0x1 0     MBUS_ID(0x08, 0xe8) 0 1 0 /* Port 0 MEM */
-				0x81000000 0x1 0     MBUS_ID(0x08, 0xe0) 0 1 0 /* Port 0 IO  */
-				0x82000000 0x2 0     MBUS_ID(0x04, 0xe8) 0 1 0 /* Port 1 MEM */
-				0x81000000 0x2 0     MBUS_ID(0x04, 0xe0) 0 1 0 /* Port 1 IO  */
-				0x82000000 0x3 0     MBUS_ID(0x04, 0xd8) 0 1 0 /* Port 2 MEM */
-				0x81000000 0x3 0     MBUS_ID(0x04, 0xd0) 0 1 0 /* Port 2 IO  */
-				0x82000000 0x4 0     MBUS_ID(0x04, 0xb8) 0 1 0 /* Port 3 MEM */
-				0x81000000 0x4 0     MBUS_ID(0x04, 0xb0) 0 1 0 /* Port 3 IO  */>;
-
-			/*
-			 * This port can be either x4 or x1. When
-			 * configured in x4 by the bootloader, then
-			 * pcie@4,0 is not available.
-			 */
-			pcie@1,0 {
-				device_type = "pci";
-				assigned-addresses = <0x82000800 0 0x80000 0 0x2000>;
-				reg = <0x0800 0 0 0 0>;
-				#address-cells = <3>;
-				#size-cells = <2>;
-				#interrupt-cells = <1>;
-				ranges = <0x82000000 0 0 0x82000000 0x1 0 1 0
-					  0x81000000 0 0 0x81000000 0x1 0 1 0>;
-				interrupt-map-mask = <0 0 0 0>;
-				interrupt-map = <0 0 0 0 &gic GIC_SPI 29 IRQ_TYPE_LEVEL_HIGH>;
-				marvell,pcie-port = <0>;
-				marvell,pcie-lane = <0>;
-				clocks = <&gateclk 8>;
-				status = "disabled";
-			};
-
-			/* x1 port */
-			pcie@2,0 {
-				device_type = "pci";
-				assigned-addresses = <0x82000800 0 0x40000 0 0x2000>;
-				reg = <0x1000 0 0 0 0>;
-				#address-cells = <3>;
-				#size-cells = <2>;
-				#interrupt-cells = <1>;
-				ranges = <0x82000000 0 0 0x82000000 0x2 0 1 0
-					  0x81000000 0 0 0x81000000 0x2 0 1 0>;
-				interrupt-map-mask = <0 0 0 0>;
-				interrupt-map = <0 0 0 0 &gic GIC_SPI 33 IRQ_TYPE_LEVEL_HIGH>;
-				marvell,pcie-port = <1>;
-				marvell,pcie-lane = <0>;
-				clocks = <&gateclk 5>;
-				status = "disabled";
-			};
-
-			/* x1 port */
-			pcie@3,0 {
-				device_type = "pci";
-				assigned-addresses = <0x82000800 0 0x44000 0 0x2000>;
-				reg = <0x1800 0 0 0 0>;
-				#address-cells = <3>;
-				#size-cells = <2>;
-				#interrupt-cells = <1>;
-				ranges = <0x82000000 0 0 0x82000000 0x3 0 1 0
-					  0x81000000 0 0 0x81000000 0x3 0 1 0>;
-				interrupt-map-mask = <0 0 0 0>;
-				interrupt-map = <0 0 0 0 &gic GIC_SPI 70 IRQ_TYPE_LEVEL_HIGH>;
-				marvell,pcie-port = <2>;
-				marvell,pcie-lane = <0>;
-				clocks = <&gateclk 6>;
-				status = "disabled";
-			};
-
-			/*
-			 * x1 port only available when pcie@1,0 is
-			 * configured as a x1 port
-			 */
-			pcie@4,0 {
-				device_type = "pci";
-				assigned-addresses = <0x82000800 0 0x48000 0 0x2000>;
-				reg = <0x2000 0 0 0 0>;
-				#address-cells = <3>;
-				#size-cells = <2>;
-				#interrupt-cells = <1>;
-				ranges = <0x82000000 0 0 0x82000000 0x4 0 1 0
-					  0x81000000 0 0 0x81000000 0x4 0 1 0>;
-				interrupt-map-mask = <0 0 0 0>;
-				interrupt-map = <0 0 0 0 &gic GIC_SPI 71 IRQ_TYPE_LEVEL_HIGH>;
-				marvell,pcie-port = <3>;
-				marvell,pcie-lane = <0>;
-				clocks = <&gateclk 7>;
-				status = "disabled";
-			};
-		};
 	};
 };

Modified: head/sys/boot/fdt/dts/arm/armada-388-gp.dts
==============================================================================
--- head/sys/boot/fdt/dts/arm/armada-388-gp.dts	Wed Jan 20 14:10:00 2016	(r294431)
+++ head/sys/boot/fdt/dts/arm/armada-388-gp.dts	Wed Jan 20 14:14:30 2016	(r294432)
@@ -226,31 +226,6 @@
 			};
 		};
 
-		pcie-controller {
-			status = "okay";
-			/*
-			 * One PCIe units is accessible through
-			 * standard PCIe slot on the board.
-			 */
-			pcie@1,0 {
-				/* Port 0, Lane 0 */
-				status = "okay";
-			};
-
-			/*
-			 * The two other PCIe units are accessible
-			 * through mini PCIe slot on the board.
-			 */
-			pcie@2,0 {
-				/* Port 1, Lane 0 */
-				status = "okay";
-			};
-			pcie@3,0 {
-				/* Port 2, Lane 0 */
-				status = "okay";
-			};
-		};
-
 		gpio-fan {
 			compatible = "gpio-fan";
 			gpios = <&expander1 3 GPIO_ACTIVE_HIGH>;
@@ -259,6 +234,10 @@
 		};
 	};
 
+	pci0: pcie@f1080000 {
+		status = "okay";
+	};
+
 	reg_usb3_vbus: usb3-vbus {
 		compatible = "regulator-fixed";
 		regulator-name = "usb3-vbus";

Modified: head/sys/boot/fdt/dts/arm/armada-38x.dtsi
==============================================================================
--- head/sys/boot/fdt/dts/arm/armada-38x.dtsi	Wed Jan 20 14:10:00 2016	(r294431)
+++ head/sys/boot/fdt/dts/arm/armada-38x.dtsi	Wed Jan 20 14:14:30 2016	(r294432)
@@ -593,6 +593,25 @@
 		};
 	};
 
+	pci0: pcie@f1080000 {
+		compatible = "mrvl,pcie";
+		status = "disabled";
+		device_type = "pci";
+		#interrupt-cells = <3>;
+		#size-cells = <2>;
+		#address-cells = <3>;
+		reg = <0xf1080000 0x2000>;
+		bus-range = <0 255>;
+		ranges = <0x42000000 0x0 0xf1200000 0xf1200000 0x0 0x00100000
+			  0x41000000 0x0 0x00000000 0xf1300000 0x0 0x00100000>;
+		interrupt-parent = <&gic>;
+		interrupts = <GIC_SPI 91 0>;
+		interrupt-map-mask = <0xf800 0x0 0x0 0x7>;
+		interrupt-map = <
+			0x0000 0x0 0x0 0x1 &gic GIC_SPI 29 IRQ_TYPE_LEVEL_HIGH
+			>;
+	};
+
 	clocks {
 		/* 2 GHz fixed main PLL */
 		mainpll: mainpll {

From owner-svn-src-all@freebsd.org  Wed Jan 20 14:16:15 2016
Return-Path: <owner-svn-src-all@freebsd.org>
Delivered-To: svn-src-all@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4B0B8A8A3EA;
 Wed, 20 Jan 2016 14:16:15 +0000 (UTC) (envelope-from zbb@FreeBSD.org)
Received: from repo.freebsd.org (repo.freebsd.org
 [IPv6:2610:1c1:1:6068::e6a:0])
 (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
 (Client did not present a certificate)
 by mx1.freebsd.org (Postfix) with ESMTPS id 1C9B81C84;
 Wed, 20 Jan 2016 14:16:15 +0000 (UTC) (envelope-from zbb@FreeBSD.org)
Received: from repo.freebsd.org ([127.0.1.37])
 by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u0KEGEbL075560;
 Wed, 20 Jan 2016 14:16:14 GMT (envelope-from zbb@FreeBSD.org)
Received: (from zbb@localhost)
 by repo.freebsd.org (8.15.2/8.15.2/Submit) id u0KEGESX075559;
 Wed, 20 Jan 2016 14:16:14 GMT (envelope-from zbb@FreeBSD.org)
Message-Id: <201601201416.u0KEGESX075559@repo.freebsd.org>
X-Authentication-Warning: repo.freebsd.org: zbb set sender to zbb@FreeBSD.org
 using -f
From: Zbigniew Bodek <zbb@FreeBSD.org>
Date: Wed, 20 Jan 2016 14:16:14 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-head@freebsd.org
Subject: svn commit: r294433 - head/sys/arm/mv
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.20
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for &quot;
 user&quot; and &quot; projects&quot; \)" <svn-src-all.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-all/>
List-Post: <mailto:svn-src-all@freebsd.org>
List-Help: <mailto:svn-src-all-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Wed, 20 Jan 2016 14:16:15 -0000

Author: zbb
Date: Wed Jan 20 14:16:13 2016
New Revision: 294433
URL: https://svnweb.freebsd.org/changeset/base/294433

Log:
  Correct MV_DDR_CADR_BASE definiton in mvwin.h
  
  SOC_MV_ARMADAXP ifdef was enhanced with SOC_MV_ARMADA38X,
  correcting MV_DDR_CADR_BASE definition. It fixes PCIe hangs issue.
  
  Reviewed by:    andrew
  Obtained from:  Semihalf
  Sponsored by:   Stormshield
  Submitted by:   Bartosz Szczepanek <bsz@semihalf.com>
  Differential revision:  https://reviews.freebsd.org/D4380

Modified:
  head/sys/arm/mv/mvwin.h

Modified: head/sys/arm/mv/mvwin.h
==============================================================================
--- head/sys/arm/mv/mvwin.h	Wed Jan 20 14:14:30 2016	(r294432)
+++ head/sys/arm/mv/mvwin.h	Wed Jan 20 14:16:13 2016	(r294433)
@@ -124,7 +124,7 @@
 #define MV_DDR_CADR_BASE	(MV_AXI_BASE + 0x100)
 #elif defined(SOC_MV_LOKIPLUS)
 #define MV_DDR_CADR_BASE	(MV_BASE + 0xF1500)
-#elif defined(SOC_MV_ARMADAXP)
+#elif defined(SOC_MV_ARMADAXP) || defined(SOC_MV_ARMADA38X)
 #define MV_DDR_CADR_BASE	(MV_BASE + 0x20180)
 #else
 #define MV_DDR_CADR_BASE	(MV_BASE + 0x1500)

From owner-svn-src-all@freebsd.org  Wed Jan 20 14:18:50 2016
Return-Path: <owner-svn-src-all@freebsd.org>
Delivered-To: svn-src-all@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id C61ABA8A66B;
 Wed, 20 Jan 2016 14:18:50 +0000 (UTC) (envelope-from zbb@FreeBSD.org)
Received: from repo.freebsd.org (repo.freebsd.org
 [IPv6:2610:1c1:1:6068::e6a:0])
 (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
 (Client did not present a certificate)
 by mx1.freebsd.org (Postfix) with ESMTPS id 9D71C1E6B;
 Wed, 20 Jan 2016 14:18:50 +0000 (UTC) (envelope-from zbb@FreeBSD.org)
Received: from repo.freebsd.org ([127.0.1.37])
 by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u0KEInZa075787;
 Wed, 20 Jan 2016 14:18:49 GMT (envelope-from zbb@FreeBSD.org)
Received: (from zbb@localhost)
 by repo.freebsd.org (8.15.2/8.15.2/Submit) id u0KEInWK075785;
 Wed, 20 Jan 2016 14:18:49 GMT (envelope-from zbb@FreeBSD.org)
Message-Id: <201601201418.u0KEInWK075785@repo.freebsd.org>
X-Authentication-Warning: repo.freebsd.org: zbb set sender to zbb@FreeBSD.org
 using -f
From: Zbigniew Bodek <zbb@FreeBSD.org>
Date: Wed, 20 Jan 2016 14:18:49 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-head@freebsd.org
Subject: svn commit: r294434 - head/sys/arm/mv/armada38x
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.20
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for &quot;
 user&quot; and &quot; projects&quot; \)" <svn-src-all.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-all/>
List-Post: <mailto:svn-src-all@freebsd.org>
List-Help: <mailto:svn-src-all-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Wed, 20 Jan 2016 14:18:50 -0000

Author: zbb
Date: Wed Jan 20 14:18:49 2016
New Revision: 294434
URL: https://svnweb.freebsd.org/changeset/base/294434

Log:
  Add a new RTC driver for Armada38x
  
  New driver registers RTC as system clock. New RTC resolution is 1 sec.
  Settime and gettime functions were implemented.
  
  Reviewed by:    andrew, ian
  Obtained from:  Semihalf
  Sponsored by:   Stormshield
  Submitted by:   Jan Dabros <jsd@semihalf.com>
  Differential revision:  https://reviews.freebsd.org/D4421

Added:
  head/sys/arm/mv/armada38x/rtc.c   (contents, props changed)
Modified:
  head/sys/arm/mv/armada38x/files.armada38x

Modified: head/sys/arm/mv/armada38x/files.armada38x
==============================================================================
--- head/sys/arm/mv/armada38x/files.armada38x	Wed Jan 20 14:16:13 2016	(r294433)
+++ head/sys/arm/mv/armada38x/files.armada38x	Wed Jan 20 14:18:49 2016	(r294434)
@@ -1,4 +1,4 @@
 # $FreeBSD$
 
 arm/mv/armada38x/armada38x.c	standard
-arm/mv/rtc.c			standard
+arm/mv/armada38x/rtc.c		standard

Added: head/sys/arm/mv/armada38x/rtc.c
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/sys/arm/mv/armada38x/rtc.c	Wed Jan 20 14:18:49 2016	(r294434)
@@ -0,0 +1,235 @@
+/*-
+ * Copyright (c) 2015 Semihalf.
+ * Copyright (c) 2015 Stormshield.
+ * 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 <sys/cdefs.h>
+__FBSDID("$FreeBSD$");
+
+#include <sys/param.h>
+#include <sys/bus.h>
+#include <sys/lock.h>
+#include <sys/time.h>
+#include <sys/proc.h>
+#include <sys/conf.h>
+#include <sys/rman.h>
+#include <sys/clock.h>
+#include <sys/systm.h>
+#include <sys/mutex.h>
+#include <sys/types.h>
+#include <sys/kernel.h>
+#include <sys/module.h>
+#include <sys/resource.h>
+
+#include <machine/bus.h>
+#include <machine/resource.h>
+
+#include <dev/ofw/ofw_bus.h>
+#include <dev/ofw/ofw_bus_subr.h>
+
+#include "clock_if.h"
+
+#define	RTC_RES_US		1000000
+#define	HALF_OF_SEC_NS		500000000
+
+#define	RTC_STATUS		0x0
+#define	RTC_TIME		0xC
+
+#define	MV_RTC_LOCK(sc)		mtx_lock(&(sc)->mutex)
+#define	MV_RTC_UNLOCK(sc)	mtx_unlock(&(sc)->mutex)
+
+static struct resource_spec res_spec[] = {
+	{ SYS_RES_MEMORY,	0,	RF_ACTIVE },
+	{ -1, 0 }
+};
+
+struct mv_rtc_softc {
+	device_t	dev;
+	struct resource	*res;
+	struct mtx	mutex;
+};
+
+static int mv_rtc_probe(device_t dev);
+static int mv_rtc_attach(device_t dev);
+static int mv_rtc_detach(device_t dev);
+
+static int mv_rtc_gettime(device_t dev, struct timespec *ts);
+static int mv_rtc_settime(device_t dev, struct timespec *ts);
+
+static uint32_t mv_rtc_reg_read(struct mv_rtc_softc *sc, bus_size_t off);
+static int mv_rtc_reg_write(struct mv_rtc_softc *sc, bus_size_t off,
+    uint32_t val);
+
+static device_method_t mv_rtc_methods[] = {
+	DEVMETHOD(device_probe,		mv_rtc_probe),
+	DEVMETHOD(device_attach,	mv_rtc_attach),
+	DEVMETHOD(device_detach,	mv_rtc_detach),
+
+	DEVMETHOD(clock_gettime,	mv_rtc_gettime),
+	DEVMETHOD(clock_settime,	mv_rtc_settime),
+
+	{ 0, 0 },
+};
+
+static driver_t mv_rtc_driver = {
+	"rtc",
+	mv_rtc_methods,
+	sizeof(struct mv_rtc_softc),
+};
+
+static devclass_t mv_rtc_devclass;
+
+DRIVER_MODULE(mv_rtc, simplebus, mv_rtc_driver, mv_rtc_devclass, 0, 0);
+
+static int
+mv_rtc_probe(device_t dev)
+{
+
+	if (!ofw_bus_status_okay(dev))
+		return (ENXIO);
+
+	if (!ofw_bus_is_compatible(dev, "marvell,armada-380-rtc"))
+		return (ENXIO);
+
+	device_set_desc(dev, "Marvell Integrated RTC");
+
+	return (BUS_PROBE_DEFAULT);
+}
+
+static int
+mv_rtc_attach(device_t dev)
+{
+	struct mv_rtc_softc *sc;
+	int unit, ret;
+
+	unit = device_get_unit(dev);
+
+	sc = device_get_softc(dev);
+	sc->dev = dev;
+
+	clock_register(dev, RTC_RES_US);
+
+	mtx_init(&sc->mutex, device_get_nameunit(dev), NULL, MTX_DEF);
+
+	ret = bus_alloc_resources(dev, res_spec, &sc->res);
+	if (ret != 0) {
+		device_printf(dev, "could not allocate resources\n");
+		mtx_destroy(&sc->mutex);
+		return (ENXIO);
+	}
+
+	return (0);
+}
+
+static int
+mv_rtc_detach(device_t dev)
+{
+	struct mv_rtc_softc *sc;
+
+	sc = device_get_softc(dev);
+
+	mtx_destroy(&sc->mutex);
+
+	bus_release_resources(dev, res_spec, &sc->res);
+
+	return (0);
+}
+
+static int
+mv_rtc_gettime(device_t dev, struct timespec *ts)
+{
+	struct mv_rtc_softc *sc;
+	uint32_t val, val_check;
+
+	sc = device_get_softc(dev);
+
+	MV_RTC_LOCK(sc);
+	/*
+	 * According to HW Errata if more than one second between
+	 * two time reads is detected, then read once again
+	 */
+	val = mv_rtc_reg_read(sc, RTC_TIME);
+	val_check = mv_rtc_reg_read(sc, RTC_TIME);
+	if (val_check - val > 1)
+		val_check = mv_rtc_reg_read(sc, RTC_TIME);
+
+	MV_RTC_UNLOCK(sc);
+
+	ts->tv_sec = val_check;
+	/* RTC resolution is 1 sec */
+	ts->tv_nsec = 0;
+
+	return (0);
+}
+
+static int
+mv_rtc_settime(device_t dev, struct timespec *ts)
+{
+	struct mv_rtc_softc *sc;
+
+	sc = device_get_softc(dev);
+
+	/* RTC resolution is 1 sec */
+	if (ts->tv_nsec >= HALF_OF_SEC_NS)
+		ts->tv_sec++;
+	ts->tv_nsec = 0;
+
+	MV_RTC_LOCK(sc);
+
+	/*
+	 * According to errata FE-3124064, Write to RTC TIME register
+	 * may fail. As a workaround, before writing to RTC TIME register,
+	 * issue a dummy write of 0x0 twice to RTC Status register.
+	 */
+	mv_rtc_reg_write(sc, RTC_STATUS, 0x0);
+	mv_rtc_reg_write(sc, RTC_STATUS, 0x0);
+	mv_rtc_reg_write(sc, RTC_TIME, ts->tv_sec);
+
+	MV_RTC_UNLOCK(sc);
+
+	return (0);
+}
+
+static uint32_t
+mv_rtc_reg_read(struct mv_rtc_softc *sc, bus_size_t off)
+{
+
+	return (bus_read_4(sc->res, off));
+}
+
+/*
+ * According to the datasheet, the OS should wait 5us after every
+ * register write to the RTC hard macro so that the required update
+ * can occur without holding off the system bus
+ */
+static int
+mv_rtc_reg_write(struct mv_rtc_softc *sc, bus_size_t off, uint32_t val)
+{
+
+	bus_write_4(sc->res, off, val);
+	DELAY(5);
+
+	return (0);
+}

From owner-svn-src-all@freebsd.org  Wed Jan 20 14:21:08 2016
Return-Path: <owner-svn-src-all@freebsd.org>
Delivered-To: svn-src-all@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0C22AA8A75B;
 Wed, 20 Jan 2016 14:21:08 +0000 (UTC) (envelope-from zbb@FreeBSD.org)
Received: from repo.freebsd.org (repo.freebsd.org
 [IPv6:2610:1c1:1:6068::e6a:0])
 (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
 (Client did not present a certificate)
 by mx1.freebsd.org (Postfix) with ESMTPS id CB3FD10A9;
 Wed, 20 Jan 2016 14:21:07 +0000 (UTC) (envelope-from zbb@FreeBSD.org)
Received: from repo.freebsd.org ([127.0.1.37])
 by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u0KEL6rX076009;
 Wed, 20 Jan 2016 14:21:06 GMT (envelope-from zbb@FreeBSD.org)
Received: (from zbb@localhost)
 by repo.freebsd.org (8.15.2/8.15.2/Submit) id u0KEL62j076007;
 Wed, 20 Jan 2016 14:21:06 GMT (envelope-from zbb@FreeBSD.org)
Message-Id: <201601201421.u0KEL62j076007@repo.freebsd.org>
X-Authentication-Warning: repo.freebsd.org: zbb set sender to zbb@FreeBSD.org
 using -f
From: Zbigniew Bodek <zbb@FreeBSD.org>
Date: Wed, 20 Jan 2016 14:21:06 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-head@freebsd.org
Subject: svn commit: r294435 - in head/sys/arm: conf mv
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.20
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for &quot;
 user&quot; and &quot; projects&quot; \)" <svn-src-all.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-all/>
List-Post: <mailto:svn-src-all@freebsd.org>
List-Help: <mailto:svn-src-all-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Wed, 20 Jan 2016 14:21:08 -0000

Author: zbb
Date: Wed Jan 20 14:21:06 2016
New Revision: 294435
URL: https://svnweb.freebsd.org/changeset/base/294435

Log:
  Add support for I2C on Armada38x
  
  Extend driver's compatible strings' table
  and enable I2C compilation in kernconf.
  
  Reviewed by:    andrew, ian
  Obtained from:  Semihalf
  Sponsored by:   Stormshield
  Submitted by:   Jan Dabros <jsd@semihalf.com>
  Differential revision:  https://reviews.freebsd.org/D4422

Modified:
  head/sys/arm/conf/ARMADA38X
  head/sys/arm/mv/twsi.c

Modified: head/sys/arm/conf/ARMADA38X
==============================================================================
--- head/sys/arm/conf/ARMADA38X	Wed Jan 20 14:18:49 2016	(r294434)
+++ head/sys/arm/conf/ARMADA38X	Wed Jan 20 14:21:06 2016	(r294435)
@@ -72,6 +72,10 @@ device		scbus
 device		pass
 device		da
 
+# I2C
+device		iic
+device		iicbus
+
 #FDT
 options 	FDT
 options 	FDT_DTB_STATIC

Modified: head/sys/arm/mv/twsi.c
==============================================================================
--- head/sys/arm/mv/twsi.c	Wed Jan 20 14:18:49 2016	(r294434)
+++ head/sys/arm/mv/twsi.c	Wed Jan 20 14:21:06 2016	(r294435)
@@ -141,6 +141,12 @@ static struct resource_spec res_spec[] =
 	{ -1, 0 }
 };
 
+static struct ofw_compat_data compat_data[] = {
+	{ "mrvl,twsi",			true },
+	{ "marvell,mv64xxx-i2c",	true },
+	{ NULL,				false }
+};
+
 static device_method_t mv_twsi_methods[] = {
 	/* device interface */
 	DEVMETHOD(device_probe,		mv_twsi_probe),
@@ -308,7 +314,7 @@ mv_twsi_probe(device_t dev)
 	if (!ofw_bus_status_okay(dev))
 		return (ENXIO);
 
-	if (!ofw_bus_is_compatible(dev, "mrvl,twsi"))
+	if (!ofw_bus_search_compatible(dev, compat_data)->ocd_data)
 		return (ENXIO);
 
 	device_set_desc(dev, "Marvell Integrated I2C Bus Controller");

From owner-svn-src-all@freebsd.org  Wed Jan 20 14:23:58 2016
Return-Path: <owner-svn-src-all@freebsd.org>
Delivered-To: svn-src-all@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id C79CAA8A912;
 Wed, 20 Jan 2016 14:23:58 +0000 (UTC) (envelope-from zbb@FreeBSD.org)
Received: from repo.freebsd.org (repo.freebsd.org
 [IPv6:2610:1c1:1:6068::e6a:0])
 (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
 (Client did not present a certificate)
 by mx1.freebsd.org (Postfix) with ESMTPS id 88E2914A9;
 Wed, 20 Jan 2016 14:23:58 +0000 (UTC) (envelope-from zbb@FreeBSD.org)
Received: from repo.freebsd.org ([127.0.1.37])
 by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u0KENvO0078811;
 Wed, 20 Jan 2016 14:23:57 GMT (envelope-from zbb@FreeBSD.org)
Received: (from zbb@localhost)
 by repo.freebsd.org (8.15.2/8.15.2/Submit) id u0KENvGj078809;
 Wed, 20 Jan 2016 14:23:57 GMT (envelope-from zbb@FreeBSD.org)
Message-Id: <201601201423.u0KENvGj078809@repo.freebsd.org>
X-Authentication-Warning: repo.freebsd.org: zbb set sender to zbb@FreeBSD.org
 using -f
From: Zbigniew Bodek <zbb@FreeBSD.org>
Date: Wed, 20 Jan 2016 14:23:57 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-head@freebsd.org
Subject: svn commit: r294436 - head/sys/arm/mv
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.20
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for &quot;
 user&quot; and &quot; projects&quot; \)" <svn-src-all.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-all/>
List-Post: <mailto:svn-src-all@freebsd.org>
List-Help: <mailto:svn-src-all-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Wed, 20 Jan 2016 14:23:59 -0000

Author: zbb
Date: Wed Jan 20 14:23:57 2016
New Revision: 294436
URL: https://svnweb.freebsd.org/changeset/base/294436

Log:
  Add support for watchdog on Armada38x
  
  A38X watchdog support was implemented in sys/arm/mv/timer.c driver.
  It required following modifications:
  - add "marvell,armada-380-wdt" compatibility, which supports only watchdog
  - correct and enhance definitions related to timer control register
  - unmask reset capability in RSTOUTn_MASK register
  - use dedicated watchdog timer on A38X instead of second timer
  
  Obtained from:  Semihalf
  Sponsored by:   Stormshield
  Submitted by:   Bartosz Szczepanek <bsz@semihalf.com>
  Differential revision:  https://reviews.freebsd.org/D4423

Modified:
  head/sys/arm/mv/mvreg.h
  head/sys/arm/mv/timer.c

Modified: head/sys/arm/mv/mvreg.h
==============================================================================
--- head/sys/arm/mv/mvreg.h	Wed Jan 20 14:21:06 2016	(r294435)
+++ head/sys/arm/mv/mvreg.h	Wed Jan 20 14:23:57 2016	(r294436)
@@ -127,6 +127,7 @@
  */
 #if defined(SOC_MV_ARMADAXP) || defined(SOC_MV_ARMADA38X)
 #define RSTOUTn_MASK		0x60
+#define	RSTOUTn_MASK_WD		0x400
 #define SYSTEM_SOFT_RESET	0x64
 #define WD_RSTOUTn_MASK		0x4
 #define WD_GLOBAL_MASK		0x00000100
@@ -219,8 +220,10 @@
 #define CPU_TIMER0_AUTO		0x00000002
 #define CPU_TIMER1_EN		0x00000004
 #define CPU_TIMER1_AUTO		0x00000008
-#define CPU_TIMER_WD_EN		0x00000010
-#define CPU_TIMER_WD_AUTO	0x00000020
+#define	CPU_TIMER2_EN		0x00000010
+#define	CPU_TIMER2_AUTO		0x00000020
+#define	CPU_TIMER_WD_EN		0x00000100
+#define	CPU_TIMER_WD_AUTO	0x00000200
 /* 25MHz mode is Armada XP - specific */
 #define CPU_TIMER_WD_25MHZ_EN	0x00000400
 #define CPU_TIMER0_25MHZ_EN	0x00000800

Modified: head/sys/arm/mv/timer.c
==============================================================================
--- head/sys/arm/mv/timer.c	Wed Jan 20 14:21:06 2016	(r294435)
+++ head/sys/arm/mv/timer.c	Wed Jan 20 14:23:57 2016	(r294436)
@@ -54,12 +54,22 @@ __FBSDID("$FreeBSD$");
 #define INITIAL_TIMECOUNTER	(0xffffffff)
 #define MAX_WATCHDOG_TICKS	(0xffffffff)
 
+#define	MV_TMR	0x1
+#define	MV_WDT	0x2
+#define	MV_NONE	0x0
+
 #if defined(SOC_MV_ARMADAXP) || defined(SOC_MV_ARMADA38X)
 #define MV_CLOCK_SRC		25000000	/* Timers' 25MHz mode */
 #else
 #define MV_CLOCK_SRC		get_tclk()
 #endif
 
+#if defined(SOC_MV_ARMADA38X)
+#define	WATCHDOG_TIMER	4
+#else
+#define	WATCHDOG_TIMER	2
+#endif
+
 struct mv_timer_softc {
 	struct resource	*	timer_res[2];
 	bus_space_tag_t		timer_bst;
@@ -70,10 +80,17 @@ struct mv_timer_softc {
 
 static struct resource_spec mv_timer_spec[] = {
 	{ SYS_RES_MEMORY,	0,	RF_ACTIVE },
-	{ SYS_RES_IRQ,		0,	RF_ACTIVE },
+	{ SYS_RES_IRQ,		0,	RF_ACTIVE | RF_OPTIONAL },
 	{ -1, 0 }
 };
 
+/* Interrupt is not required by MV_WDT devices */
+static struct ofw_compat_data mv_timer_compat[] = {
+	{"mrvl,timer",			MV_TMR | MV_WDT },
+	{"marvell,armada-380-wdt",	MV_WDT },
+	{NULL,				MV_NONE }
+};
+
 static struct mv_timer_softc *timer_softc = NULL;
 static int timers_initialized = 0;
 
@@ -111,7 +128,7 @@ mv_timer_probe(device_t dev)
 	if (!ofw_bus_status_okay(dev))
 		return (ENXIO);
 
-	if (!ofw_bus_is_compatible(dev, "mrvl,timer"))
+	if (ofw_bus_search_compatible(dev, mv_timer_compat)->ocd_data == MV_NONE)
 		return (ENXIO);
 
 	device_set_desc(dev, "Marvell CPU Timer");
@@ -147,6 +164,17 @@ mv_timer_attach(device_t dev)
 	mv_watchdog_disable();
 	EVENTHANDLER_REGISTER(watchdog_list, mv_watchdog_event, sc, 0);
 
+	if (ofw_bus_search_compatible(dev, mv_timer_compat)->ocd_data
+	    == MV_WDT) {
+		/* Don't set timers for wdt-only entry. */
+		device_printf(dev, "only watchdog attached\n");
+		return (0);
+	} else if (sc->timer_res[1] == NULL) {
+		device_printf(dev, "no interrupt resource\n");
+		bus_release_resources(dev, mv_timer_spec, sc->timer_res);
+		return (ENXIO);
+	}
+
 	if (bus_setup_intr(dev, sc->timer_res[1], INTR_TYPE_CLK,
 	    mv_hardclock, NULL, sc, &ihl) != 0) {
 		bus_release_resources(dev, mv_timer_spec, sc->timer_res);
@@ -306,6 +334,10 @@ mv_watchdog_enable(void)
 	val = read_cpu_mp_clocks(WD_RSTOUTn_MASK);
 	val |= (WD_GLOBAL_MASK | WD_CPU0_MASK);
 	write_cpu_mp_clocks(WD_RSTOUTn_MASK, val);
+
+	val = read_cpu_misc(RSTOUTn_MASK);
+	val &= ~RSTOUTn_MASK_WD;
+	write_cpu_misc(RSTOUTn_MASK, val);
 #else
 	irq_mask = read_cpu_ctrl(BRIDGE_IRQ_MASK);
 	irq_mask |= IRQ_TIMER_WD_MASK;
@@ -317,9 +349,12 @@ mv_watchdog_enable(void)
 #endif
 
 	val = mv_get_timer_control();
-	val |= CPU_TIMER_WD_EN | CPU_TIMER_WD_AUTO;
-#if defined(SOC_MV_ARMADAXP) || defined(SOC_MV_ARMADA38X)
-	val |= CPU_TIMER_WD_25MHZ_EN;
+#if defined(SOC_MV_ARMADA38X)
+	val |= CPU_TIMER_WD_EN | CPU_TIMER_WD_AUTO | CPU_TIMER_WD_25MHZ_EN;
+#elif defined(SOC_MV_ARMADAXP)
+	val |= CPU_TIMER2_EN | CPU_TIMER2_AUTO | CPU_TIMER_WD_25MHZ_EN;
+#else
+	val |= CPU_TIMER2_EN | CPU_TIMER2_AUTO;
 #endif
 	mv_set_timer_control(val);
 }
@@ -333,13 +368,21 @@ mv_watchdog_disable(void)
 #endif
 
 	val = mv_get_timer_control();
+#if defined(SOC_MV_ARMADA38X)
 	val &= ~(CPU_TIMER_WD_EN | CPU_TIMER_WD_AUTO);
+#else
+	val &= ~(CPU_TIMER2_EN | CPU_TIMER2_AUTO);
+#endif
 	mv_set_timer_control(val);
 
 #if defined(SOC_MV_ARMADAXP) || defined(SOC_MV_ARMADA38X)
 	val = read_cpu_mp_clocks(WD_RSTOUTn_MASK);
 	val &= ~(WD_GLOBAL_MASK | WD_CPU0_MASK);
 	write_cpu_mp_clocks(WD_RSTOUTn_MASK, val);
+
+	val = read_cpu_misc(RSTOUTn_MASK);
+	val |= RSTOUTn_MASK_WD;
+	write_cpu_misc(RSTOUTn_MASK, RSTOUTn_MASK_WD);
 #else
 	val = read_cpu_ctrl(RSTOUTn_MASK);
 	val &= ~WD_RST_OUT_EN;
@@ -378,8 +421,7 @@ mv_watchdog_event(void *arg, unsigned in
 		if (ticks > MAX_WATCHDOG_TICKS)
 			mv_watchdog_disable();
 		else {
-			/* Timer 2 is the watchdog */
-			mv_set_timer(2, ticks);
+			mv_set_timer(WATCHDOG_TIMER, ticks);
 			mv_watchdog_enable();
 			*error = 0;
 		}

From owner-svn-src-all@freebsd.org  Wed Jan 20 14:28:06 2016
Return-Path: <owner-svn-src-all@freebsd.org>
Delivered-To: svn-src-all@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id 71795A8AA84;
 Wed, 20 Jan 2016 14:28:06 +0000 (UTC) (envelope-from zbb@FreeBSD.org)
Received: from repo.freebsd.org (repo.freebsd.org
 [IPv6:2610:1c1:1:6068::e6a:0])
 (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
 (Client did not present a certificate)
 by mx1.freebsd.org (Postfix) with ESMTPS id 41F991C45;
 Wed, 20 Jan 2016 14:28:06 +0000 (UTC) (envelope-from zbb@FreeBSD.org)
Received: from repo.freebsd.org ([127.0.1.37])
 by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u0KES5EC079149;
 Wed, 20 Jan 2016 14:28:05 GMT (envelope-from zbb@FreeBSD.org)
Received: (from zbb@localhost)
 by repo.freebsd.org (8.15.2/8.15.2/Submit) id u0KES5VT079148;
 Wed, 20 Jan 2016 14:28:05 GMT (envelope-from zbb@FreeBSD.org)
Message-Id: <201601201428.u0KES5VT079148@repo.freebsd.org>
X-Authentication-Warning: repo.freebsd.org: zbb set sender to zbb@FreeBSD.org
 using -f
From: Zbigniew Bodek <zbb@FreeBSD.org>
Date: Wed, 20 Jan 2016 14:28:05 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-head@freebsd.org
Subject: svn commit: r294437 - head/sys/arm/mv
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.20
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for &quot;
 user&quot; and &quot; projects&quot; \)" <svn-src-all.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-all/>
List-Post: <mailto:svn-src-all@freebsd.org>
List-Help: <mailto:svn-src-all-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Wed, 20 Jan 2016 14:28:06 -0000

Author: zbb
Date: Wed Jan 20 14:28:05 2016
New Revision: 294437
URL: https://svnweb.freebsd.org/changeset/base/294437

Log:
  Support watchdog depending on "mrvl,has-wdt" property
  
  With this commit, watchdog is supported only in case of having
  "mrvl,has-wdt" property or dedicated for watchdog compatibility field
  ("marvell,armada-380-wdt"). There is no need to modify dts files,
  as "has-wdt" property already exists.
  
  Obtained from:  Semihalf
  Sponsored by:   Stormshield
  Submitted by:   Bartosz Szczepanek <bsz@semihalf.com>
  Differential revision:  https://reviews.freebsd.org/D4424

Modified:
  head/sys/arm/mv/timer.c

Modified: head/sys/arm/mv/timer.c
==============================================================================
--- head/sys/arm/mv/timer.c	Wed Jan 20 14:23:57 2016	(r294436)
+++ head/sys/arm/mv/timer.c	Wed Jan 20 14:28:05 2016	(r294437)
@@ -76,6 +76,7 @@ struct mv_timer_softc {
 	bus_space_handle_t	timer_bsh;
 	struct mtx		timer_mtx;
 	struct eventtimer	et;
+	boolean_t		has_wdt;
 };
 
 static struct resource_spec mv_timer_spec[] = {
@@ -160,9 +161,15 @@ mv_timer_attach(device_t dev)
 	sc->timer_bst = rman_get_bustag(sc->timer_res[0]);
 	sc->timer_bsh = rman_get_bushandle(sc->timer_res[0]);
 
+	sc->has_wdt = ofw_bus_has_prop(dev, "mrvl,has-wdt") ||
+	    ofw_bus_is_compatible(dev, "marvell,armada-380-wdt");
+
 	mtx_init(&timer_softc->timer_mtx, "watchdog", NULL, MTX_DEF);
-	mv_watchdog_disable();
-	EVENTHANDLER_REGISTER(watchdog_list, mv_watchdog_event, sc, 0);
+
+	if (sc->has_wdt) {
+		mv_watchdog_disable();
+		EVENTHANDLER_REGISTER(watchdog_list, mv_watchdog_event, sc, 0);
+	}
 
 	if (ofw_bus_search_compatible(dev, mv_timer_compat)->ocd_data
 	    == MV_WDT) {

From owner-svn-src-all@freebsd.org  Wed Jan 20 14:30:19 2016
Return-Path: <owner-svn-src-all@freebsd.org>
Delivered-To: svn-src-all@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id 19D35A8AB99;
 Wed, 20 Jan 2016 14:30:19 +0000 (UTC) (envelope-from zbb@FreeBSD.org)
Received: from repo.freebsd.org (repo.freebsd.org
 [IPv6:2610:1c1:1:6068::e6a:0])
 (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
 (Client did not present a certificate)
 by mx1.freebsd.org (Postfix) with ESMTPS id E7DD21E17;
 Wed, 20 Jan 2016 14:30:18 +0000 (UTC) (envelope-from zbb@FreeBSD.org)
Received: from repo.freebsd.org ([127.0.1.37])
 by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u0KEUHBs079367;
 Wed, 20 Jan 2016 14:30:17 GMT (envelope-from zbb@FreeBSD.org)
Received: (from zbb@localhost)
 by repo.freebsd.org (8.15.2/8.15.2/Submit) id u0KEUH80079364;
 Wed, 20 Jan 2016 14:30:17 GMT (envelope-from zbb@FreeBSD.org)
Message-Id: <201601201430.u0KEUH80079364@repo.freebsd.org>
X-Authentication-Warning: repo.freebsd.org: zbb set sender to zbb@FreeBSD.org
 using -f
From: Zbigniew Bodek <zbb@FreeBSD.org>
Date: Wed, 20 Jan 2016 14:30:17 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-head@freebsd.org
Subject: svn commit: r294438 - in head/sys/arm/mv: . armada38x
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.20
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for &quot;
 user&quot; and &quot; projects&quot; \)" <svn-src-all.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-all/>
List-Post: <mailto:svn-src-all@freebsd.org>
List-Help: <mailto:svn-src-all-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Wed, 20 Jan 2016 14:30:19 -0000

Author: zbb
Date: Wed Jan 20 14:30:17 2016
New Revision: 294438
URL: https://svnweb.freebsd.org/changeset/base/294438

Log:
  Open window to bootROM memory on Armada38x to allow CPU1 to boot
  
  CPU1 is halted in bootROM code while it is waiting to be released.
  Memory window to bootROM must be opened before booting the core.
  
  Obtained from:  Semihalf
  Sponsored by:   Stormshield
  Submitted by:   Michal Stanek <mst@semihalf.com>
  Differential revision:  https://reviews.freebsd.org/D4425

Modified:
  head/sys/arm/mv/armada38x/armada38x.c
  head/sys/arm/mv/mv_machdep.c
  head/sys/arm/mv/mvwin.h

Modified: head/sys/arm/mv/armada38x/armada38x.c
==============================================================================
--- head/sys/arm/mv/armada38x/armada38x.c	Wed Jan 20 14:28:05 2016	(r294437)
+++ head/sys/arm/mv/armada38x/armada38x.c	Wed Jan 20 14:30:17 2016	(r294438)
@@ -38,8 +38,9 @@ __FBSDID("$FreeBSD$");
 #include <arm/mv/mvreg.h>
 #include <arm/mv/mvvar.h>
 
-int armada38x_win_set_iosync_barrier(void);
+int armada38x_open_bootrom_win(void);
 int armada38x_scu_enable(void);
+int armada38x_win_set_iosync_barrier(void);
 
 uint32_t
 get_tclk(void)
@@ -81,6 +82,39 @@ armada38x_win_set_iosync_barrier(void)
 }
 
 int
+armada38x_open_bootrom_win(void)
+{
+	bus_space_handle_t vaddr_iowind;
+	uint32_t val;
+	int rv;
+
+	rv = bus_space_map(fdtbus_bs_tag, (bus_addr_t)MV_MBUS_BRIDGE_BASE,
+	    MV_CPU_SUBSYS_REGS_LEN, 0, &vaddr_iowind);
+	if (rv != 0)
+		return (rv);
+
+	val = (MV_BOOTROM_WIN_SIZE & IO_WIN_SIZE_MASK) << IO_WIN_SIZE_SHIFT;
+	val |= (MBUS_BOOTROM_ATTR & IO_WIN_ATTR_MASK) << IO_WIN_ATTR_SHIFT;
+	val |= (MBUS_BOOTROM_TGT_ID & IO_WIN_TGT_MASK) << IO_WIN_TGT_SHIFT;
+	/* Enable window and Sync Barrier */
+	val |= (0x1 & IO_WIN_SYNC_MASK) << IO_WIN_SYNC_SHIFT;
+	val |= (0x1 & IO_WIN_ENA_MASK) << IO_WIN_ENA_SHIFT;
+
+	/* Configure IO Window Control Register */
+	bus_space_write_4(fdtbus_bs_tag, vaddr_iowind, IO_WIN_9_CTRL_OFFSET,
+	    val);
+	/* Configure IO Window Base Register */
+	bus_space_write_4(fdtbus_bs_tag, vaddr_iowind, IO_WIN_9_BASE_OFFSET,
+	    MV_BOOTROM_MEM_ADDR);
+
+	bus_space_barrier(fdtbus_bs_tag, vaddr_iowind, 0, MV_CPU_SUBSYS_REGS_LEN,
+	    BUS_SPACE_BARRIER_WRITE);
+	bus_space_unmap(fdtbus_bs_tag, vaddr_iowind, MV_CPU_SUBSYS_REGS_LEN);
+
+	return (rv);
+}
+
+int
 armada38x_scu_enable(void)
 {
 	bus_space_handle_t vaddr_scu;

Modified: head/sys/arm/mv/mv_machdep.c
==============================================================================
--- head/sys/arm/mv/mv_machdep.c	Wed Jan 20 14:28:05 2016	(r294437)
+++ head/sys/arm/mv/mv_machdep.c	Wed Jan 20 14:30:17 2016	(r294438)
@@ -69,6 +69,7 @@ void armadaxp_l2_init(void);
 #if defined(SOC_MV_ARMADA38X)
 int armada38x_win_set_iosync_barrier(void);
 int armada38x_scu_enable(void);
+int armada38x_open_bootrom_win(void);
 #endif
 
 #define MPP_PIN_MAX		68
@@ -260,6 +261,11 @@ platform_late_init(void)
 		printf("WARNING: could not map CPU Subsystem registers\n");
 	if (armada38x_scu_enable() != 0)
 		printf("WARNING: could not enable SCU\n");
+#ifdef SMP
+	/* Open window to bootROM memory - needed for SMP */
+	if (armada38x_open_bootrom_win() != 0)
+		printf("WARNING: could not open window to bootROM\n");
+#endif
 #endif
 }
 

Modified: head/sys/arm/mv/mvwin.h
==============================================================================
--- head/sys/arm/mv/mvwin.h	Wed Jan 20 14:28:05 2016	(r294437)
+++ head/sys/arm/mv/mvwin.h	Wed Jan 20 14:30:17 2016	(r294438)
@@ -316,6 +316,25 @@
 #define	MV_BOOTROM_WIN_SIZE	0xF
 #define	MV_CPU_SUBSYS_REGS_LEN	0x100
 
+/* IO Window Control Register fields */
+#define	IO_WIN_SIZE_SHIFT	16
+#define	IO_WIN_SIZE_MASK	0xFFFF
+#define	IO_WIN_ATTR_SHIFT	8
+#define	IO_WIN_ATTR_MASK	0xFF
+#define	IO_WIN_TGT_SHIFT	4
+#define	IO_WIN_TGT_MASK		0xF
+#define	IO_WIN_SYNC_SHIFT	1
+#define	IO_WIN_SYNC_MASK	0x1
+#define	IO_WIN_ENA_SHIFT	0
+#define	IO_WIN_ENA_MASK		0x1
+
+#define	IO_WIN_9_CTRL_OFFSET	0x98
+#define	IO_WIN_9_BASE_OFFSET	0x9C
+
+/* Mbus decoding unit IDs and attributes */
+#define	MBUS_BOOTROM_TGT_ID	0x1
+#define	MBUS_BOOTROM_ATTR	0x1D
+
 /* Internal Units Sync Barrier Control Register */
 #define	MV_SYNC_BARRIER_CTRL		0x84
 #define	MV_SYNC_BARRIER_CTRL_ALL	0xFFFF

From owner-svn-src-all@freebsd.org  Wed Jan 20 14:45:56 2016
Return-Path: <owner-svn-src-all@freebsd.org>
Delivered-To: svn-src-all@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id 87A88A882E1;
 Wed, 20 Jan 2016 14:45:56 +0000 (UTC) (envelope-from zbb@FreeBSD.org)
Received: from repo.freebsd.org (repo.freebsd.org
 [IPv6:2610:1c1:1:6068::e6a:0])
 (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
 (Client did not present a certificate)
 by mx1.freebsd.org (Postfix) with ESMTPS id 602FA17CB;
 Wed, 20 Jan 2016 14:45:56 +0000 (UTC) (envelope-from zbb@FreeBSD.org)
Received: from repo.freebsd.org ([127.0.1.37])
 by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u0KEjtQS085630;
 Wed, 20 Jan 2016 14:45:55 GMT (envelope-from zbb@FreeBSD.org)
Received: (from zbb@localhost)
 by repo.freebsd.org (8.15.2/8.15.2/Submit) id u0KEjtQC085624;
 Wed, 20 Jan 2016 14:45:55 GMT (envelope-from zbb@FreeBSD.org)
Message-Id: <201601201445.u0KEjtQC085624@repo.freebsd.org>
X-Authentication-Warning: repo.freebsd.org: zbb set sender to zbb@FreeBSD.org
 using -f
From: Zbigniew Bodek <zbb@FreeBSD.org>
Date: Wed, 20 Jan 2016 14:45:55 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-head@freebsd.org
Subject: svn commit: r294439 - in head/sys/arm/mv: . armada38x
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.20
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for &quot;
 user&quot; and &quot; projects&quot; \)" <svn-src-all.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-all/>
List-Post: <mailto:svn-src-all@freebsd.org>
List-Help: <mailto:svn-src-all-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Wed, 20 Jan 2016 14:45:56 -0000

Author: zbb
Date: Wed Jan 20 14:45:54 2016
New Revision: 294439
URL: https://svnweb.freebsd.org/changeset/base/294439

Log:
  Add initial support for SMP on Armada38x
  
  - Add file sys/arm/mv/armada38x/armada38x_mp.c
  - Set mp_maxid and mp_ncpus based on FDT unless SCU register indicates
    only one core
  - Boot CPU1 in platform_mp_start_ap()
  - IPI range defined
  
  Obtained from:  Semihalf
  Sponsored by:   Stormshield
  Submitted by:   Michal Stanek <mst@semihalf.com>
  Differential revision:  https://reviews.freebsd.org/D4426

Added:
  head/sys/arm/mv/armada38x/armada38x_mp.c   (contents, props changed)
Modified:
  head/sys/arm/mv/armada38x/files.armada38x
  head/sys/arm/mv/armada38x/std.armada38x
  head/sys/arm/mv/mvreg.h

Added: head/sys/arm/mv/armada38x/armada38x_mp.c
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/sys/arm/mv/armada38x/armada38x_mp.c	Wed Jan 20 14:45:54 2016	(r294439)
@@ -0,0 +1,164 @@
+/*-
+ * Copyright (c) 2015 Semihalf.
+ * Copyright (c) 2015 Stormshield.
+ * 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 <sys/cdefs.h>
+__FBSDID("$FreeBSD$");
+
+#include <sys/param.h>
+#include <sys/systm.h>
+#include <sys/bus.h>
+#include <sys/smp.h>
+
+#include <machine/smp.h>
+#include <machine/fdt.h>
+#include <machine/intr.h>
+
+#include <dev/ofw/ofw_bus.h>
+#include <dev/ofw/ofw_bus_subr.h>
+
+#include <arm/mv/mvreg.h>
+
+int cpu_reset_deassert(void);
+
+int
+cpu_reset_deassert(void)
+{
+	bus_space_handle_t vaddr;
+	uint32_t reg;
+	int rv;
+
+	rv = bus_space_map(fdtbus_bs_tag, (bus_addr_t)MV_CPU_RESET_BASE,
+	    MV_CPU_RESET_REGS_LEN, 0, &vaddr);
+	if (rv != 0)
+		return (rv);
+
+	/* CPU1 is held at reset by default - clear assert bit to release it */
+	reg = bus_space_read_4(fdtbus_bs_tag, vaddr, CPU_RESET_OFFSET(1));
+	reg &= ~CPU_RESET_ASSERT;
+
+	bus_space_write_4(fdtbus_bs_tag, vaddr, CPU_RESET_OFFSET(1), reg);
+
+	bus_space_unmap(fdtbus_bs_tag, vaddr, MV_CPU_RESET_REGS_LEN);
+
+	return (0);
+}
+
+static int
+platform_cnt_cpus(void)
+{
+	bus_space_handle_t vaddr_scu;
+	phandle_t cpus_node, child;
+	char device_type[16];
+	int fdt_cpu_count = 0;
+	int reg_cpu_count = 0;
+	uint32_t val;
+	int rv;
+
+	cpus_node = OF_finddevice("/cpus");
+	if (cpus_node == -1) {
+		/* Default is one core */
+		mp_ncpus = 1;
+		return (0);
+	}
+
+	/* Get number of 'cpu' nodes from FDT */
+	for (child = OF_child(cpus_node); child != 0; child = OF_peer(child)) {
+		/* Check if child is a CPU */
+		memset(device_type, 0, sizeof(device_type));
+		rv = OF_getprop(child, "device_type", device_type,
+		    sizeof(device_type) - 1);
+		if (rv < 0)
+			continue;
+		if (strcmp(device_type, "cpu") != 0)
+			continue;
+
+		fdt_cpu_count++;
+	}
+
+	/* Get number of CPU cores from SCU register to cross-check with FDT */
+	rv = bus_space_map(fdtbus_bs_tag, (bus_addr_t)MV_SCU_BASE,
+	    MV_SCU_REGS_LEN, 0, &vaddr_scu);
+	if (rv != 0) {
+		/* Default is one core */
+		mp_ncpus = 1;
+		return (0);
+	}
+
+	val = bus_space_read_4(fdtbus_bs_tag, vaddr_scu, MV_SCU_REG_CONFIG);
+	bus_space_unmap(fdtbus_bs_tag, vaddr_scu, MV_SCU_REGS_LEN);
+        reg_cpu_count = (val & SCU_CFG_REG_NCPU_MASK) + 1;
+
+	/* Set mp_ncpus to number of cpus in FDT unless SOC contains only one */
+	mp_ncpus = min(reg_cpu_count, fdt_cpu_count);
+	/* mp_ncpus must be at least 1 */
+	mp_ncpus = max(1, mp_ncpus);
+
+	return (mp_ncpus);
+}
+
+void
+platform_mp_setmaxid(void)
+{
+
+	/* Armada38x family supports maximum 2 cores */
+	mp_ncpus = platform_cnt_cpus();
+	mp_maxid = 1;
+}
+
+int
+platform_mp_probe(void)
+{
+
+	return (mp_ncpus > 1);
+}
+
+void
+platform_mp_init_secondary(void)
+{
+
+	intr_pic_init_secondary();
+}
+
+void
+platform_mp_start_ap(void)
+{
+	int rv;
+
+	/* Write secondary entry address to PMSU register */
+	rv = pmsu_boot_secondary_cpu();
+	if (rv != 0)
+		return;
+
+	/* Release CPU1 from reset */
+	cpu_reset_deassert();
+}
+
+void
+platform_ipi_send(cpuset_t cpus, u_int ipi)
+{
+
+	pic_ipi_send(cpus, ipi);
+}

Modified: head/sys/arm/mv/armada38x/files.armada38x
==============================================================================
--- head/sys/arm/mv/armada38x/files.armada38x	Wed Jan 20 14:30:17 2016	(r294438)
+++ head/sys/arm/mv/armada38x/files.armada38x	Wed Jan 20 14:45:54 2016	(r294439)
@@ -1,4 +1,5 @@
 # $FreeBSD$
 
 arm/mv/armada38x/armada38x.c	standard
+arm/mv/armada38x/armada38x_mp.c	optional smp
 arm/mv/armada38x/rtc.c		standard

Modified: head/sys/arm/mv/armada38x/std.armada38x
==============================================================================
--- head/sys/arm/mv/armada38x/std.armada38x	Wed Jan 20 14:30:17 2016	(r294438)
+++ head/sys/arm/mv/armada38x/std.armada38x	Wed Jan 20 14:45:54 2016	(r294439)
@@ -8,3 +8,5 @@ makeoptions	CONF_CFLAGS="-march=armv7a"
 makeoptions	KERNVIRTADDR=0xc0000000
 
 options         KERNVIRTADDR=0xc0000000
+options		IPI_IRQ_START=0
+options		IPI_IRQ_END=15

Modified: head/sys/arm/mv/mvreg.h
==============================================================================
--- head/sys/arm/mv/mvreg.h	Wed Jan 20 14:30:17 2016	(r294438)
+++ head/sys/arm/mv/mvreg.h	Wed Jan 20 14:45:54 2016	(r294439)
@@ -465,8 +465,28 @@
 #if defined(SOC_MV_ARMADA38X)
 #define	MV_SCU_BASE		(MV_BASE + 0xc000)
 #define	MV_SCU_REGS_LEN		0x100
-#define	MV_SCU_REG_CTRL		0
+#define	MV_SCU_REG_CTRL		0x00
+#define	MV_SCU_REG_CONFIG	0x04
 #define	MV_SCU_ENABLE		1
 #endif
 
+/*
+ * PMSU
+ */
+#if defined(SOC_MV_ARMADA38X)
+#define	MV_PMSU_BASE		(MV_BASE + 0x22000)
+#define	MV_PMSU_REGS_LEN	0x1000
+#define	PMSU_BOOT_ADDR_REDIRECT_OFFSET(cpu)	(((cpu) * 0x100) + 0x124)
+#endif
+
+/*
+ * CPU RESET
+ */
+#if defined(SOC_MV_ARMADA38X)
+#define	MV_CPU_RESET_BASE	(MV_BASE + 0x20800)
+#define	MV_CPU_RESET_REGS_LEN	0x8
+#define	CPU_RESET_OFFSET(cpu)	((cpu) * 0x8)
+#define	CPU_RESET_ASSERT	0x1
+#endif
+
 #endif /* _MVREG_H_ */

From owner-svn-src-all@freebsd.org  Wed Jan 20 14:49:02 2016
Return-Path: <owner-svn-src-all@freebsd.org>
Delivered-To: svn-src-all@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id AEAFEA883C6;
 Wed, 20 Jan 2016 14:49:02 +0000 (UTC)
 (envelope-from mmel@FreeBSD.org)
Received: from repo.freebsd.org (repo.freebsd.org
 [IPv6:2610:1c1:1:6068::e6a:0])
 (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
 (Client did not present a certificate)
 by mx1.freebsd.org (Postfix) with ESMTPS id 7517F19DC;
 Wed, 20 Jan 2016 14:49:02 +0000 (UTC)
 (envelope-from mmel@FreeBSD.org)
Received: from repo.freebsd.org ([127.0.1.37])
 by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u0KEn1Pd085932;
 Wed, 20 Jan 2016 14:49:01 GMT (envelope-from mmel@FreeBSD.org)
Received: (from mmel@localhost)
 by repo.freebsd.org (8.15.2/8.15.2/Submit) id u0KEn1a5085931;
 Wed, 20 Jan 2016 14:49:01 GMT (envelope-from mmel@FreeBSD.org)
Message-Id: <201601201449.u0KEn1a5085931@repo.freebsd.org>
X-Authentication-Warning: repo.freebsd.org: mmel set sender to
 mmel@FreeBSD.org using -f
From: Michal Meloun <mmel@FreeBSD.org>
Date: Wed, 20 Jan 2016 14:49:01 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-head@freebsd.org
Subject: svn commit: r294440 - head/sys/dev/ofw
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.20
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for &quot;
 user&quot; and &quot; projects&quot; \)" <svn-src-all.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-all/>
List-Post: <mailto:svn-src-all@freebsd.org>
List-Help: <mailto:svn-src-all-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Wed, 20 Jan 2016 14:49:02 -0000

Author: mmel
Date: Wed Jan 20 14:49:01 2016
New Revision: 294440
URL: https://svnweb.freebsd.org/changeset/base/294440

Log:
  OFW: Fix ofw_bus_string_list_to_array() function.
  Originally committed version was unfinished and didn't work at all,
  because I took it from the wrong WIP branch by mistake.
  
  Approved by:	kib (mentor)

Modified:
  head/sys/dev/ofw/ofw_bus_subr.c

Modified: head/sys/dev/ofw/ofw_bus_subr.c
==============================================================================
--- head/sys/dev/ofw/ofw_bus_subr.c	Wed Jan 20 14:45:54 2016	(r294439)
+++ head/sys/dev/ofw/ofw_bus_subr.c	Wed Jan 20 14:49:01 2016	(r294440)
@@ -716,9 +716,10 @@ ofw_bus_find_string_index(phandle_t node
  */
 int
 ofw_bus_string_list_to_array(phandle_t node, const char *list_name,
-   const char ***array)
+   const char ***out_array)
 {
 	char *elems, *tptr;
+	const char **array;
 	int i, cnt, nelems, len;
 
 	elems = NULL;
@@ -731,11 +732,11 @@ ofw_bus_string_list_to_array(phandle_t n
 		i += strlen(elems + i) + 1;
 
 	/* Allocate space for arrays and all strings. */
-	*array = malloc((cnt + 1) * sizeof(char *) + nelems, M_OFWPROP,
+	array = malloc((cnt + 1) * sizeof(char *) + nelems, M_OFWPROP,
 	    M_WAITOK);
 
 	/* Get address of first string. */
-	tptr = (char *)(*array + cnt);
+	tptr = (char *)(array + cnt + 1);
 
 	/* Copy strings. */
 	memcpy(tptr, elems, nelems);
@@ -743,12 +744,13 @@ ofw_bus_string_list_to_array(phandle_t n
 
 	/* Fill string pointers. */
 	for (i = 0, cnt = 0; i < nelems; cnt++) {
-		len = strlen(tptr + i) + 1;
-		*array[cnt] = tptr;
+		len = strlen(tptr) + 1;
+		array[cnt] = tptr;
 		i += len;
 		tptr += len;
 	}
-	*array[cnt] = 0;
+	array[cnt] = 0;
+	*out_array = array;
 
 	return (cnt);
 }

From owner-svn-src-all@freebsd.org  Wed Jan 20 14:49:18 2016
Return-Path: <owner-svn-src-all@freebsd.org>
Delivered-To: svn-src-all@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id 49CDBA883FA;
 Wed, 20 Jan 2016 14:49:18 +0000 (UTC) (envelope-from zbb@FreeBSD.org)
Received: from repo.freebsd.org (repo.freebsd.org
 [IPv6:2610:1c1:1:6068::e6a:0])
 (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
 (Client did not present a certificate)
 by mx1.freebsd.org (Postfix) with ESMTPS id 0B8271B28;
 Wed, 20 Jan 2016 14:49:17 +0000 (UTC) (envelope-from zbb@FreeBSD.org)
Received: from repo.freebsd.org ([127.0.1.37])
 by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u0KEnHNg086002;
 Wed, 20 Jan 2016 14:49:17 GMT (envelope-from zbb@FreeBSD.org)
Received: (from zbb@localhost)
 by repo.freebsd.org (8.15.2/8.15.2/Submit) id u0KEnGPw085996;
 Wed, 20 Jan 2016 14:49:16 GMT (envelope-from zbb@FreeBSD.org)
Message-Id: <201601201449.u0KEnGPw085996@repo.freebsd.org>
X-Authentication-Warning: repo.freebsd.org: zbb set sender to zbb@FreeBSD.org
 using -f
From: Zbigniew Bodek <zbb@FreeBSD.org>
Date: Wed, 20 Jan 2016 14:49:16 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-head@freebsd.org
Subject: svn commit: r294441 - in head/sys/arm: conf mv mv/armada38x
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.20
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for &quot;
 user&quot; and &quot; projects&quot; \)" <svn-src-all.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-all/>
List-Post: <mailto:svn-src-all@freebsd.org>
List-Help: <mailto:svn-src-all-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Wed, 20 Jan 2016 14:49:18 -0000

Author: zbb
Date: Wed Jan 20 14:49:16 2016
New Revision: 294441
URL: https://svnweb.freebsd.org/changeset/base/294441

Log:
  Introduce initial driver for PMSU on Armada38x
  
  This is a stub for PMSU driver. Note that it cannot be used to set the
  secondary core boot address during attach because drivers are attached
  later than SI_SUB_CPU sysinit where cores are started.
  Setting the boot address should be done manually in platform_mp_start_ap().
  
  SMP is working fine with this commit and was enabled in Armada38x kernel
  configuration file.
  
  Obtained from:	Semihalf
  Sponsored by:	Stormshield
  Submitted by:	Michal Stanek <mst@semihalf.com>
  Differential revision:  https://reviews.freebsd.org/D4427

Added:
  head/sys/arm/mv/armada38x/pmsu.c   (contents, props changed)
  head/sys/arm/mv/armada38x/pmsu.h   (contents, props changed)
Modified:
  head/sys/arm/conf/ARMADA38X
  head/sys/arm/mv/armada38x/armada38x_mp.c
  head/sys/arm/mv/armada38x/files.armada38x
  head/sys/arm/mv/mvreg.h

Modified: head/sys/arm/conf/ARMADA38X
==============================================================================
--- head/sys/arm/conf/ARMADA38X	Wed Jan 20 14:49:01 2016	(r294440)
+++ head/sys/arm/conf/ARMADA38X	Wed Jan 20 14:49:16 2016	(r294441)
@@ -22,6 +22,8 @@ options 	ROOTDEVNAME=\"/dev/da0s1a\"
 options 	SCHED_ULE		# ULE scheduler
 #options 	SCHED_4BSD		# 4BSD scheduler
 
+options 	SMP
+
 # Debugging
 #options 	DEBUG
 #options 	VERBOSE_SYSINIT

Modified: head/sys/arm/mv/armada38x/armada38x_mp.c
==============================================================================
--- head/sys/arm/mv/armada38x/armada38x_mp.c	Wed Jan 20 14:49:01 2016	(r294440)
+++ head/sys/arm/mv/armada38x/armada38x_mp.c	Wed Jan 20 14:49:16 2016	(r294441)
@@ -41,6 +41,8 @@ __FBSDID("$FreeBSD$");
 
 #include <arm/mv/mvreg.h>
 
+#include "pmsu.h"
+
 int cpu_reset_deassert(void);
 
 int

Modified: head/sys/arm/mv/armada38x/files.armada38x
==============================================================================
--- head/sys/arm/mv/armada38x/files.armada38x	Wed Jan 20 14:49:01 2016	(r294440)
+++ head/sys/arm/mv/armada38x/files.armada38x	Wed Jan 20 14:49:16 2016	(r294441)
@@ -2,4 +2,5 @@
 
 arm/mv/armada38x/armada38x.c	standard
 arm/mv/armada38x/armada38x_mp.c	optional smp
+arm/mv/armada38x/pmsu.c		standard
 arm/mv/armada38x/rtc.c		standard

Added: head/sys/arm/mv/armada38x/pmsu.c
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/sys/arm/mv/armada38x/pmsu.c	Wed Jan 20 14:49:16 2016	(r294441)
@@ -0,0 +1,154 @@
+/*-
+ * Copyright (c) 2015 Semihalf.
+ * Copyright (c) 2015 Stormshield.
+ * 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 <sys/cdefs.h>
+__FBSDID("$FreeBSD$");
+
+#include <sys/param.h>
+#include <sys/bus.h>
+#include <sys/conf.h>
+#include <sys/rman.h>
+#include <sys/types.h>
+#include <sys/kernel.h>
+#include <sys/module.h>
+#include <sys/resource.h>
+
+#include <vm/vm.h>
+#include <vm/pmap.h>
+
+#include <machine/fdt.h>
+#include <machine/smp.h>
+
+#include <dev/ofw/ofw_bus_subr.h>
+
+#include <arm/mv/mvreg.h>
+
+#include "pmsu.h"
+
+static struct resource_spec pmsu_spec[] = {
+	{ SYS_RES_MEMORY,	0,	RF_ACTIVE },
+	{ -1, 0 }
+};
+
+struct pmsu_softc {
+	device_t	dev;
+	struct resource	*res;
+};
+
+static int pmsu_probe(device_t dev);
+static int pmsu_attach(device_t dev);
+static int pmsu_detach(device_t dev);
+
+static device_method_t pmsu_methods[] = {
+	DEVMETHOD(device_probe,		pmsu_probe),
+	DEVMETHOD(device_attach,	pmsu_attach),
+	DEVMETHOD(device_detach,	pmsu_detach),
+
+	{ 0, 0 }
+};
+
+static driver_t pmsu_driver = {
+	"pmsu",
+	pmsu_methods,
+	sizeof(struct pmsu_softc)
+};
+
+static devclass_t pmsu_devclass;
+
+DRIVER_MODULE(pmsu, simplebus, pmsu_driver, pmsu_devclass, 0, 0);
+DRIVER_MODULE(pmsu, ofwbus, pmsu_driver, pmsu_devclass, 0, 0);
+
+static int
+pmsu_probe(device_t dev)
+{
+
+	if (!ofw_bus_status_okay(dev))
+		return (ENXIO);
+
+	if (!ofw_bus_is_compatible(dev, "marvell,armada-380-pmsu"))
+		return (ENXIO);
+
+	device_set_desc(dev, "Power Management Service Unit");
+
+	return (BUS_PROBE_DEFAULT);
+}
+
+static int
+pmsu_attach(device_t dev)
+{
+	struct pmsu_softc *sc;
+	int err;
+
+	sc = device_get_softc(dev);
+	sc->dev = dev;
+
+	err = bus_alloc_resources(dev, pmsu_spec, &sc->res);
+	if (err != 0) {
+		device_printf(dev, "could not allocate resources\n");
+		return (ENXIO);
+	}
+
+	return (0);
+}
+
+static int
+pmsu_detach(device_t dev)
+{
+	struct pmsu_softc *sc;
+
+	sc = device_get_softc(dev);
+
+	bus_release_resources(dev, pmsu_spec, &sc->res);
+
+	return (0);
+}
+
+#ifdef SMP
+int
+pmsu_boot_secondary_cpu(void)
+{
+	bus_space_handle_t vaddr;
+	int rv;
+
+	rv = bus_space_map(fdtbus_bs_tag, (bus_addr_t)MV_PMSU_BASE, MV_PMSU_REGS_LEN,
+	    0, &vaddr);
+	if (rv != 0)
+		return (rv);
+
+	/* Boot cpu1 */
+	bus_space_write_4(fdtbus_bs_tag, vaddr, PMSU_BOOT_ADDR_REDIRECT_OFFSET(1),
+	    pmap_kextract((vm_offset_t)mpentry));
+
+	cpu_idcache_wbinv_all();
+	cpu_l2cache_wbinv_all();
+	armv7_sev();
+
+	bus_space_unmap(fdtbus_bs_tag, vaddr, MV_PMSU_REGS_LEN);
+
+	return (0);
+}
+#endif

Added: head/sys/arm/mv/armada38x/pmsu.h
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/sys/arm/mv/armada38x/pmsu.h	Wed Jan 20 14:49:16 2016	(r294441)
@@ -0,0 +1,35 @@
+/*-
+ * Copyright (c) 2015 Semihalf.
+ * Copyright (c) 2015 Stormshield.
+ * 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$
+ */
+
+#include "opt_global.h"
+
+#ifdef SMP
+/* Boot secondary core using PMSU */
+int pmsu_boot_secondary_cpu(void);
+#endif

Modified: head/sys/arm/mv/mvreg.h
==============================================================================
--- head/sys/arm/mv/mvreg.h	Wed Jan 20 14:49:01 2016	(r294440)
+++ head/sys/arm/mv/mvreg.h	Wed Jan 20 14:49:16 2016	(r294441)
@@ -468,6 +468,7 @@
 #define	MV_SCU_REG_CTRL		0x00
 #define	MV_SCU_REG_CONFIG	0x04
 #define	MV_SCU_ENABLE		1
+#define	SCU_CFG_REG_NCPU_MASK	0x3
 #endif
 
 /*

From owner-svn-src-all@freebsd.org  Wed Jan 20 15:02:44 2016
Return-Path: <owner-svn-src-all@freebsd.org>
Delivered-To: svn-src-all@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id B7BAAA889CE;
 Wed, 20 Jan 2016 15:02:44 +0000 (UTC)
 (envelope-from royger@FreeBSD.org)
Received: from repo.freebsd.org (repo.freebsd.org
 [IPv6:2610:1c1:1:6068::e6a:0])
 (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
 (Client did not present a certificate)
 by mx1.freebsd.org (Postfix) with ESMTPS id 8A33A19D9;
 Wed, 20 Jan 2016 15:02:44 +0000 (UTC)
 (envelope-from royger@FreeBSD.org)
Received: from repo.freebsd.org ([127.0.1.37])
 by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u0KF2hVQ092322;
 Wed, 20 Jan 2016 15:02:43 GMT (envelope-from royger@FreeBSD.org)
Received: (from royger@localhost)
 by repo.freebsd.org (8.15.2/8.15.2/Submit) id u0KF2h8p092321;
 Wed, 20 Jan 2016 15:02:43 GMT (envelope-from royger@FreeBSD.org)
Message-Id: <201601201502.u0KF2h8p092321@repo.freebsd.org>
X-Authentication-Warning: repo.freebsd.org: royger set sender to
 royger@FreeBSD.org using -f
From: =?UTF-8?Q?Roger_Pau_Monn=c3=a9?= <royger@FreeBSD.org>
Date: Wed, 20 Jan 2016 15:02:43 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-head@freebsd.org
Subject: svn commit: r294442 - head/sys/dev/xen/netfront
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.20
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for &quot;
 user&quot; and &quot; projects&quot; \)" <svn-src-all.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-all/>
List-Post: <mailto:svn-src-all@freebsd.org>
List-Help: <mailto:svn-src-all-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Wed, 20 Jan 2016 15:02:44 -0000

Author: royger
Date: Wed Jan 20 15:02:43 2016
New Revision: 294442
URL: https://svnweb.freebsd.org/changeset/base/294442

Log:
  xen-netfront: add multiqueue support
  
  Add support for multiple TX and RX queue pairs. The default number of queues
  is set to 4, but can be easily changed from the sysctl node hw.xn.num_queues.
  
  Also heavily refactor netfront driver: break out a bunch of helper
  functions and different structures. Use threads to handle TX and RX.
  Remove some dead code and fix quite a few bugs as I go along.
  
  Submitted by:		Wei Liu <wei.liu2@citrix.com>
  Reviewed by:		royger
  Sponsored by:		Citrix Systems R&D
  Relnotes:		Yes
  Differential Revision:	https://reviews.freebsd.org/D4193

Modified:
  head/sys/dev/xen/netfront/netfront.c

Modified: head/sys/dev/xen/netfront/netfront.c
==============================================================================
--- head/sys/dev/xen/netfront/netfront.c	Wed Jan 20 14:49:16 2016	(r294441)
+++ head/sys/dev/xen/netfront/netfront.c	Wed Jan 20 15:02:43 2016	(r294442)
@@ -1,5 +1,6 @@
 /*-
  * Copyright (c) 2004-2006 Kip Macy
+ * Copyright (c) 2015 Wei Liu <wei.liu2@citrix.com>
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -39,15 +40,14 @@ __FBSDID("$FreeBSD$");
 #include <sys/kernel.h>
 #include <sys/socket.h>
 #include <sys/sysctl.h>
+#include <sys/taskqueue.h>
 
 #include <net/if.h>
 #include <net/if_var.h>
 #include <net/if_arp.h>
 #include <net/ethernet.h>
 #include <net/if_media.h>
-
 #include <net/bpf.h>
-
 #include <net/if_types.h>
 
 #include <netinet/in.h>
@@ -86,6 +86,12 @@ __FBSDID("$FreeBSD$");
 static int xn_enable_lro = 1;
 TUNABLE_INT("hw.xn.enable_lro", &xn_enable_lro);
 
+/*
+ * Number of pairs of queues.
+ */
+static unsigned long xn_num_queues = 4;
+TUNABLE_ULONG("hw.xn.num_queues", &xn_num_queues);
+
 /**
  * \brief The maximum allowed data fragments in a single transmit
  *        request.
@@ -100,149 +106,167 @@ TUNABLE_INT("hw.xn.enable_lro", &xn_enab
 
 #define net_ratelimit() 0
 
+struct netfront_rxq;
+struct netfront_txq;
 struct netfront_info;
 struct netfront_rx_info;
 
-static void xn_txeof(struct netfront_info *);
-static void xn_rxeof(struct netfront_info *);
-static void network_alloc_rx_buffers(struct netfront_info *);
-
-static void xn_tick_locked(struct netfront_info *);
-static void xn_tick(void *);
-
-static void xn_intr(void *);
+static void xn_txeof(struct netfront_txq *);
+static void xn_rxeof(struct netfront_rxq *);
+static void xn_alloc_rx_buffers(struct netfront_rxq *);
+
+static void xn_release_rx_bufs(struct netfront_rxq *);
+static void xn_release_tx_bufs(struct netfront_txq *);
+
+static void xn_rxq_intr(void *);
+static void xn_txq_intr(void *);
+static int  xn_intr(void *);
 static inline int xn_count_frags(struct mbuf *m);
-static int  xn_assemble_tx_request(struct netfront_info *sc,
-				   struct mbuf *m_head);
-static void xn_start_locked(struct ifnet *);
-static void xn_start(struct ifnet *);
-static int  xn_ioctl(struct ifnet *, u_long, caddr_t);
+static int xn_assemble_tx_request(struct netfront_txq *, struct mbuf *);
+static int xn_ioctl(struct ifnet *, u_long, caddr_t);
 static void xn_ifinit_locked(struct netfront_info *);
 static void xn_ifinit(void *);
 static void xn_stop(struct netfront_info *);
 static void xn_query_features(struct netfront_info *np);
-static int  xn_configure_features(struct netfront_info *np);
-#ifdef notyet
-static void xn_watchdog(struct ifnet *);
-#endif
-
-#ifdef notyet
-static void netfront_closing(device_t dev);
-#endif
+static int xn_configure_features(struct netfront_info *np);
 static void netif_free(struct netfront_info *info);
 static int netfront_detach(device_t dev);
 
+static int xn_txq_mq_start_locked(struct netfront_txq *, struct mbuf *);
+static int xn_txq_mq_start(struct ifnet *, struct mbuf *);
+
 static int talk_to_backend(device_t dev, struct netfront_info *info);
 static int create_netdev(device_t dev);
 static void netif_disconnect_backend(struct netfront_info *info);
-static int setup_device(device_t dev, struct netfront_info *info);
-static void free_ring(int *ref, void *ring_ptr_ref);
-
-static int  xn_ifmedia_upd(struct ifnet *ifp);
+static int setup_device(device_t dev, struct netfront_info *info,
+    unsigned long);
+static int xn_ifmedia_upd(struct ifnet *ifp);
 static void xn_ifmedia_sts(struct ifnet *ifp, struct ifmediareq *ifmr);
 
-/* Xenolinux helper functions */
-int network_connect(struct netfront_info *);
+int xn_connect(struct netfront_info *);
 
-static void xn_free_rx_ring(struct netfront_info *);
-
-static void xn_free_tx_ring(struct netfront_info *);
-
-static int xennet_get_responses(struct netfront_info *np,
-	struct netfront_rx_info *rinfo, RING_IDX rp, RING_IDX *cons,
-	struct mbuf **list);
+static int xn_get_responses(struct netfront_rxq *,
+    struct netfront_rx_info *, RING_IDX, RING_IDX *,
+    struct mbuf **);
 
 #define virt_to_mfn(x) (vtophys(x) >> PAGE_SHIFT)
 
 #define INVALID_P2M_ENTRY (~0UL)
 
-/*
- * Mbuf pointers. We need these to keep track of the virtual addresses
- * of our mbuf chains since we can only convert from virtual to physical,
- * not the other way around.  The size must track the free index arrays.
- */
-struct xn_chain_data {
-	struct mbuf    *xn_tx_chain[NET_TX_RING_SIZE+1];
-	int		xn_tx_chain_cnt;
-	struct mbuf    *xn_rx_chain[NET_RX_RING_SIZE+1];
+struct xn_rx_stats
+{
+	u_long	rx_packets;	/* total packets received	*/
+	u_long	rx_bytes;	/* total bytes received 	*/
+	u_long	rx_errors;	/* bad packets received		*/
 };
 
-struct netfront_stats
+struct xn_tx_stats
 {
-	u_long	rx_packets;		/* total packets received	*/
-	u_long	tx_packets;		/* total packets transmitted	*/
-	u_long	rx_bytes;		/* total bytes received 	*/
-	u_long	tx_bytes;		/* total bytes transmitted	*/
-	u_long	rx_errors;		/* bad packets received		*/
-	u_long	tx_errors;		/* packet transmit problems	*/
+	u_long	tx_packets;	/* total packets transmitted	*/
+	u_long	tx_bytes;	/* total bytes transmitted	*/
+	u_long	tx_errors;	/* packet transmit problems	*/
+};
+
+#define XN_QUEUE_NAME_LEN  8	/* xn{t,r}x_%u, allow for two digits */
+struct netfront_rxq {
+	struct netfront_info 	*info;
+	u_int			id;
+	char			name[XN_QUEUE_NAME_LEN];
+	struct mtx		lock;
+
+	int			ring_ref;
+	netif_rx_front_ring_t 	ring;
+	xen_intr_handle_t	xen_intr_handle;
+
+	grant_ref_t 		gref_head;
+	grant_ref_t 		grant_ref[NET_TX_RING_SIZE + 1];
+
+	struct mbuf		*mbufs[NET_RX_RING_SIZE + 1];
+	struct mbufq		batch;		/* batch queue */
+	int                     target;
+
+	xen_pfn_t		pfn_array[NET_RX_RING_SIZE];
+
+	struct lro_ctrl		lro;
+
+	struct taskqueue 	*tq;
+	struct task		intrtask;
+
+	struct xn_rx_stats	stats;
+};
+
+struct netfront_txq {
+	struct netfront_info 	*info;
+	u_int 			id;
+	char			name[XN_QUEUE_NAME_LEN];
+	struct mtx		lock;
+
+	int			ring_ref;
+	netif_tx_front_ring_t	ring;
+	xen_intr_handle_t 	xen_intr_handle;
+
+	grant_ref_t		gref_head;
+	grant_ref_t		grant_ref[NET_TX_RING_SIZE + 1];
+
+	struct mbuf		*mbufs[NET_TX_RING_SIZE + 1];
+	int			mbufs_cnt;
+	struct buf_ring		*br;
+
+	struct taskqueue 	*tq;
+	struct task       	intrtask;
+	struct task       	defrtask;
+
+	bool			full;
+
+	struct xn_tx_stats	stats;
 };
 
 struct netfront_info {
-	struct ifnet *xn_ifp;
-	struct lro_ctrl xn_lro;
+	struct ifnet 		*xn_ifp;
 
-	struct netfront_stats stats;
-	u_int tx_full;
+	struct mtx   		sc_lock;
 
-	netif_tx_front_ring_t tx;
-	netif_rx_front_ring_t rx;
+	u_int  num_queues;
+	struct netfront_rxq 	*rxq;
+	struct netfront_txq 	*txq;
 
-	struct mtx   tx_lock;
-	struct mtx   rx_lock;
-	struct mtx   sc_lock;
-
-	xen_intr_handle_t xen_intr_handle;
-	u_int carrier;
-	u_int maxfrags;
+	u_int			carrier;
+	u_int			maxfrags;
 
 	/* Receive-ring batched refills. */
 #define RX_MIN_TARGET 32
 #define RX_MAX_TARGET NET_RX_RING_SIZE
-	int rx_min_target;
-	int rx_max_target;
-	int rx_target;
-
-	grant_ref_t gref_tx_head;
-	grant_ref_t grant_tx_ref[NET_TX_RING_SIZE + 1];
-	grant_ref_t gref_rx_head;
-	grant_ref_t grant_rx_ref[NET_TX_RING_SIZE + 1];
+	int			rx_min_target;
+	int			rx_max_target;
 
 	device_t		xbdev;
-	int			tx_ring_ref;
-	int			rx_ring_ref;
 	uint8_t			mac[ETHER_ADDR_LEN];
-	struct xn_chain_data	xn_cdata;	/* mbufs */
-	struct mbufq		xn_rx_batch;	/* batch queue */
 
 	int			xn_if_flags;
-	struct callout	        xn_stat_ch;
 
-	xen_pfn_t		rx_pfn_array[NET_RX_RING_SIZE];
 	struct ifmedia		sc_media;
 
 	bool			xn_resume;
 };
 
-#define rx_mbufs xn_cdata.xn_rx_chain
-#define tx_mbufs xn_cdata.xn_tx_chain
+struct netfront_rx_info {
+	struct netif_rx_response rx;
+	struct netif_extra_info extras[XEN_NETIF_EXTRA_TYPE_MAX - 1];
+};
 
-#define XN_RX_LOCK(_sc)           mtx_lock(&(_sc)->rx_lock)
-#define XN_RX_UNLOCK(_sc)         mtx_unlock(&(_sc)->rx_lock)
+#define XN_RX_LOCK(_q)         mtx_lock(&(_q)->lock)
+#define XN_RX_UNLOCK(_q)       mtx_unlock(&(_q)->lock)
 
-#define XN_TX_LOCK(_sc)           mtx_lock(&(_sc)->tx_lock)
-#define XN_TX_UNLOCK(_sc)         mtx_unlock(&(_sc)->tx_lock)
+#define XN_TX_LOCK(_q)         mtx_lock(&(_q)->lock)
+#define XN_TX_TRYLOCK(_q)      mtx_trylock(&(_q)->lock)
+#define XN_TX_UNLOCK(_q)       mtx_unlock(&(_q)->lock)
 
 #define XN_LOCK(_sc)           mtx_lock(&(_sc)->sc_lock);
 #define XN_UNLOCK(_sc)         mtx_unlock(&(_sc)->sc_lock);
 
 #define XN_LOCK_ASSERT(_sc)    mtx_assert(&(_sc)->sc_lock, MA_OWNED);
-#define XN_RX_LOCK_ASSERT(_sc)    mtx_assert(&(_sc)->rx_lock, MA_OWNED);
-#define XN_TX_LOCK_ASSERT(_sc)    mtx_assert(&(_sc)->tx_lock, MA_OWNED);
-
-struct netfront_rx_info {
-	struct netif_rx_response rx;
-	struct netif_extra_info extras[XEN_NETIF_EXTRA_TYPE_MAX - 1];
-};
+#define XN_RX_LOCK_ASSERT(_q)  mtx_assert(&(_q)->lock, MA_OWNED);
+#define XN_TX_LOCK_ASSERT(_q)  mtx_assert(&(_q)->lock, MA_OWNED);
 
 #define netfront_carrier_on(netif)	((netif)->carrier = 1)
 #define netfront_carrier_off(netif)	((netif)->carrier = 0)
@@ -253,6 +277,7 @@ struct netfront_rx_info {
 static inline void
 add_id_to_freelist(struct mbuf **list, uintptr_t id)
 {
+
 	KASSERT(id != 0,
 		("%s: the head item (0) must always be free.", __func__));
 	list[id] = list[0];
@@ -272,30 +297,33 @@ get_id_from_freelist(struct mbuf **list)
 }
 
 static inline int
-xennet_rxidx(RING_IDX idx)
+xn_rxidx(RING_IDX idx)
 {
+
 	return idx & (NET_RX_RING_SIZE - 1);
 }
 
 static inline struct mbuf *
-xennet_get_rx_mbuf(struct netfront_info *np, RING_IDX ri)
+xn_get_rx_mbuf(struct netfront_rxq *rxq, RING_IDX ri)
 {
-	int i = xennet_rxidx(ri);
+	int i;
 	struct mbuf *m;
 
-	m = np->rx_mbufs[i];
-	np->rx_mbufs[i] = NULL;
+	i = xn_rxidx(ri);
+	m = rxq->mbufs[i];
+	rxq->mbufs[i] = NULL;
 	return (m);
 }
 
 static inline grant_ref_t
-xennet_get_rx_ref(struct netfront_info *np, RING_IDX ri)
+xn_get_rx_ref(struct netfront_rxq *rxq, RING_IDX ri)
 {
-	int i = xennet_rxidx(ri);
-	grant_ref_t ref = np->grant_rx_ref[i];
+	int i = xn_rxidx(ri);
+	grant_ref_t ref = rxq->grant_ref[i];
+
 	KASSERT(ref != GRANT_REF_INVALID, ("Invalid grant reference!\n"));
-	np->grant_rx_ref[i] = GRANT_REF_INVALID;
-	return ref;
+	rxq->grant_ref[i] = GRANT_REF_INVALID;
+	return (ref);
 }
 
 #define IPRINTK(fmt, args...) \
@@ -392,7 +420,7 @@ netfront_attach(device_t dev)
 	int err;
 
 	err = create_netdev(dev);
-	if (err) {
+	if (err != 0) {
 		xenbus_dev_fatal(dev, err, "creating netdev");
 		return (err);
 	}
@@ -402,19 +430,29 @@ netfront_attach(device_t dev)
 	    OID_AUTO, "enable_lro", CTLFLAG_RW,
 	    &xn_enable_lro, 0, "Large Receive Offload");
 
+	SYSCTL_ADD_ULONG(device_get_sysctl_ctx(dev),
+	    SYSCTL_CHILDREN(device_get_sysctl_tree(dev)),
+	    OID_AUTO, "num_queues", CTLFLAG_RD,
+	    &xn_num_queues, "Number of pairs of queues");
+
 	return (0);
 }
 
 static int
 netfront_suspend(device_t dev)
 {
-	struct netfront_info *info = device_get_softc(dev);
+	struct netfront_info *np = device_get_softc(dev);
+	u_int i;
 
-	XN_RX_LOCK(info);
-	XN_TX_LOCK(info);
-	netfront_carrier_off(info);
-	XN_TX_UNLOCK(info);
-	XN_RX_UNLOCK(info);
+	for (i = 0; i < np->num_queues; i++) {
+		XN_RX_LOCK(&np->rxq[i]);
+		XN_TX_LOCK(&np->txq[i]);
+	}
+	netfront_carrier_off(np);
+	for (i = 0; i < np->num_queues; i++) {
+		XN_RX_UNLOCK(&np->rxq[i]);
+		XN_TX_UNLOCK(&np->txq[i]);
+	}
 	return (0);
 }
 
@@ -434,6 +472,61 @@ netfront_resume(device_t dev)
 	return (0);
 }
 
+static int
+write_queue_xenstore_keys(device_t dev,
+    struct netfront_rxq *rxq,
+    struct netfront_txq *txq,
+    struct xs_transaction *xst, bool hierarchy)
+{
+	int err;
+	const char *message;
+	const char *node = xenbus_get_node(dev);
+	char *path;
+	size_t path_size;
+
+	KASSERT(rxq->id == txq->id, ("Mismatch between RX and TX queue ids"));
+	/* Split event channel support is not yet there. */
+	KASSERT(rxq->xen_intr_handle == txq->xen_intr_handle,
+	    ("Split event channels are not supported"));
+
+	if (hierarchy) {
+		path_size = strlen(node) + 10;
+		path = malloc(path_size, M_DEVBUF, M_WAITOK|M_ZERO);
+		snprintf(path, path_size, "%s/queue-%u", node, rxq->id);
+	} else {
+		path_size = strlen(node) + 1;
+		path = malloc(path_size, M_DEVBUF, M_WAITOK|M_ZERO);
+		snprintf(path, path_size, "%s", node);
+	}
+
+	err = xs_printf(*xst, path, "tx-ring-ref","%u", txq->ring_ref);
+	if (err != 0) {
+		message = "writing tx ring-ref";
+		goto error;
+	}
+	err = xs_printf(*xst, path, "rx-ring-ref","%u", rxq->ring_ref);
+	if (err != 0) {
+		message = "writing rx ring-ref";
+		goto error;
+	}
+	err = xs_printf(*xst, path, "event-channel", "%u",
+	    xen_intr_port(rxq->xen_intr_handle));
+	if (err != 0) {
+		message = "writing event-channel";
+		goto error;
+	}
+
+	free(path, M_DEVBUF);
+
+	return (0);
+
+error:
+	free(path, M_DEVBUF);
+	xenbus_dev_fatal(dev, err, "%s", message);
+
+	return (err);
+}
+
 /* Common code used when first setting up, and when resuming. */
 static int
 talk_to_backend(device_t dev, struct netfront_info *info)
@@ -442,134 +535,427 @@ talk_to_backend(device_t dev, struct net
 	struct xs_transaction xst;
 	const char *node = xenbus_get_node(dev);
 	int err;
+	unsigned long num_queues, max_queues = 0;
+	unsigned int i;
 
 	err = xen_net_read_mac(dev, info->mac);
-	if (err) {
+	if (err != 0) {
 		xenbus_dev_fatal(dev, err, "parsing %s/mac", node);
 		goto out;
 	}
 
-	/* Create shared ring, alloc event channel. */
-	err = setup_device(dev, info);
-	if (err)
+	err = xs_scanf(XST_NIL, xenbus_get_otherend_path(info->xbdev),
+	    "multi-queue-max-queues", NULL, "%lu", &max_queues);
+	if (err != 0)
+		max_queues = 1;
+	num_queues = xn_num_queues;
+	if (num_queues > max_queues)
+		num_queues = max_queues;
+
+	err = setup_device(dev, info, num_queues);
+	if (err != 0)
 		goto out;
 
  again:
 	err = xs_transaction_start(&xst);
-	if (err) {
+	if (err != 0) {
 		xenbus_dev_fatal(dev, err, "starting transaction");
-		goto destroy_ring;
+		goto free;
 	}
-	err = xs_printf(xst, node, "tx-ring-ref","%u",
-			info->tx_ring_ref);
-	if (err) {
-		message = "writing tx ring-ref";
-		goto abort_transaction;
-	}
-	err = xs_printf(xst, node, "rx-ring-ref","%u",
-			info->rx_ring_ref);
-	if (err) {
-		message = "writing rx ring-ref";
-		goto abort_transaction;
-	}
-	err = xs_printf(xst, node,
-			"event-channel", "%u",
-			xen_intr_port(info->xen_intr_handle));
-	if (err) {
-		message = "writing event-channel";
-		goto abort_transaction;
+
+	if (info->num_queues == 1) {
+		err = write_queue_xenstore_keys(dev, &info->rxq[0],
+		    &info->txq[0], &xst, false);
+		if (err != 0)
+			goto abort_transaction_no_def_error;
+	} else {
+		err = xs_printf(xst, node, "multi-queue-num-queues",
+		    "%u", info->num_queues);
+		if (err != 0) {
+			message = "writing multi-queue-num-queues";
+			goto abort_transaction;
+		}
+
+		for (i = 0; i < info->num_queues; i++) {
+			err = write_queue_xenstore_keys(dev, &info->rxq[i],
+			    &info->txq[i], &xst, true);
+			if (err != 0)
+				goto abort_transaction_no_def_error;
+		}
 	}
+
 	err = xs_printf(xst, node, "request-rx-copy", "%u", 1);
-	if (err) {
+	if (err != 0) {
 		message = "writing request-rx-copy";
 		goto abort_transaction;
 	}
 	err = xs_printf(xst, node, "feature-rx-notify", "%d", 1);
-	if (err) {
+	if (err != 0) {
 		message = "writing feature-rx-notify";
 		goto abort_transaction;
 	}
 	err = xs_printf(xst, node, "feature-sg", "%d", 1);
-	if (err) {
+	if (err != 0) {
 		message = "writing feature-sg";
 		goto abort_transaction;
 	}
 	err = xs_printf(xst, node, "feature-gso-tcpv4", "%d", 1);
-	if (err) {
+	if (err != 0) {
 		message = "writing feature-gso-tcpv4";
 		goto abort_transaction;
 	}
 
 	err = xs_transaction_end(xst, 0);
-	if (err) {
+	if (err != 0) {
 		if (err == EAGAIN)
 			goto again;
 		xenbus_dev_fatal(dev, err, "completing transaction");
-		goto destroy_ring;
+		goto free;
 	}
 
 	return 0;
 
  abort_transaction:
-	xs_transaction_end(xst, 1);
 	xenbus_dev_fatal(dev, err, "%s", message);
- destroy_ring:
+ abort_transaction_no_def_error:
+	xs_transaction_end(xst, 1);
+ free:
 	netif_free(info);
  out:
-	return err;
+	return (err);
+}
+
+static void
+xn_rxq_tq_intr(void *xrxq, int pending)
+{
+	struct netfront_rxq *rxq = xrxq;
+
+	XN_RX_LOCK(rxq);
+	xn_rxeof(rxq);
+	XN_RX_UNLOCK(rxq);
+}
+
+static void
+xn_txq_start(struct netfront_txq *txq)
+{
+	struct netfront_info *np = txq->info;
+	struct ifnet *ifp = np->xn_ifp;
+
+	XN_TX_LOCK_ASSERT(txq);
+	if (!drbr_empty(ifp, txq->br))
+		xn_txq_mq_start_locked(txq, NULL);
+}
+
+static void
+xn_txq_tq_intr(void *xtxq, int pending)
+{
+	struct netfront_txq *txq = xtxq;
+
+	XN_TX_LOCK(txq);
+	if (RING_HAS_UNCONSUMED_RESPONSES(&txq->ring))
+		xn_txeof(txq);
+	xn_txq_start(txq);
+	XN_TX_UNLOCK(txq);
+}
+
+static void
+xn_txq_tq_deferred(void *xtxq, int pending)
+{
+	struct netfront_txq *txq = xtxq;
+
+	XN_TX_LOCK(txq);
+	xn_txq_start(txq);
+	XN_TX_UNLOCK(txq);
+}
+
+static void
+disconnect_rxq(struct netfront_rxq *rxq)
+{
+
+	xn_release_rx_bufs(rxq);
+	gnttab_free_grant_references(rxq->gref_head);
+	gnttab_end_foreign_access_ref(rxq->ring_ref);
+	/*
+	 * No split event channel support at the moment, handle will
+	 * be unbound in tx. So no need to call xen_intr_unbind here,
+	 * but we do want to reset the handler to 0.
+	 */
+	rxq->xen_intr_handle = 0;
+}
+
+static void
+destroy_rxq(struct netfront_rxq *rxq)
+{
+
+	free(rxq->ring.sring, M_DEVBUF);
+	taskqueue_drain_all(rxq->tq);
+	taskqueue_free(rxq->tq);
+}
+
+static void
+destroy_rxqs(struct netfront_info *np)
+{
+	int i;
+
+	for (i = 0; i < np->num_queues; i++)
+		destroy_rxq(&np->rxq[i]);
+
+	free(np->rxq, M_DEVBUF);
+	np->rxq = NULL;
 }
 
 static int
-setup_device(device_t dev, struct netfront_info *info)
+setup_rxqs(device_t dev, struct netfront_info *info,
+	   unsigned long num_queues)
 {
-	netif_tx_sring_t *txs;
+	int q, i;
+	int error;
 	netif_rx_sring_t *rxs;
+	struct netfront_rxq *rxq;
+
+	info->rxq = malloc(sizeof(struct netfront_rxq) * num_queues,
+	    M_DEVBUF, M_WAITOK|M_ZERO);
+
+	for (q = 0; q < num_queues; q++) {
+		rxq = &info->rxq[q];
+
+		rxq->id = q;
+		rxq->info = info;
+		rxq->target = RX_MIN_TARGET;
+		rxq->ring_ref = GRANT_REF_INVALID;
+		rxq->ring.sring = NULL;
+		snprintf(rxq->name, XN_QUEUE_NAME_LEN, "xnrx_%u", q);
+		mtx_init(&rxq->lock, rxq->name, "netfront receive lock",
+		    MTX_DEF);
+
+		for (i = 0; i <= NET_RX_RING_SIZE; i++) {
+			rxq->mbufs[i] = NULL;
+			rxq->grant_ref[i] = GRANT_REF_INVALID;
+		}
+
+		mbufq_init(&rxq->batch, INT_MAX);
+
+		/* Start resources allocation */
+
+		if (gnttab_alloc_grant_references(RX_MAX_TARGET,
+		    &rxq->gref_head) != 0) {
+			device_printf(dev, "allocating rx gref");
+			error = ENOMEM;
+			goto fail;
+		}
+
+		rxs = (netif_rx_sring_t *)malloc(PAGE_SIZE, M_DEVBUF,
+		    M_WAITOK|M_ZERO);
+		SHARED_RING_INIT(rxs);
+		FRONT_RING_INIT(&rxq->ring, rxs, PAGE_SIZE);
+
+		error = xenbus_grant_ring(dev, virt_to_mfn(rxs),
+		    &rxq->ring_ref);
+		if (error != 0) {
+			device_printf(dev, "granting rx ring page");
+			goto fail_grant_ring;
+		}
+
+		TASK_INIT(&rxq->intrtask, 0, xn_rxq_tq_intr, rxq);
+		rxq->tq = taskqueue_create_fast(rxq->name, M_WAITOK,
+		    taskqueue_thread_enqueue, &rxq->tq);
+
+		error = taskqueue_start_threads(&rxq->tq, 1, PI_NET,
+		    "%s rxq %d", device_get_nameunit(dev), rxq->id);
+		if (error != 0) {
+			device_printf(dev, "failed to start rx taskq %d\n",
+			    rxq->id);
+			goto fail_start_thread;
+		}
+	}
+
+	return (0);
+
+fail_start_thread:
+	gnttab_end_foreign_access_ref(rxq->ring_ref);
+	taskqueue_drain_all(rxq->tq);
+	taskqueue_free(rxq->tq);
+fail_grant_ring:
+	gnttab_free_grant_references(rxq->gref_head);
+	free(rxq->ring.sring, M_DEVBUF);
+fail:
+	for (; q >= 0; q--) {
+		disconnect_rxq(&info->rxq[q]);
+		destroy_rxq(&info->rxq[q]);
+	}
+
+	free(info->rxq, M_DEVBUF);
+	return (error);
+}
+
+static void
+disconnect_txq(struct netfront_txq *txq)
+{
+
+	xn_release_tx_bufs(txq);
+	gnttab_free_grant_references(txq->gref_head);
+	gnttab_end_foreign_access_ref(txq->ring_ref);
+	xen_intr_unbind(&txq->xen_intr_handle);
+}
+
+static void
+destroy_txq(struct netfront_txq *txq)
+{
+
+	free(txq->ring.sring, M_DEVBUF);
+	buf_ring_free(txq->br, M_DEVBUF);
+	taskqueue_drain_all(txq->tq);
+	taskqueue_free(txq->tq);
+}
+
+static void
+destroy_txqs(struct netfront_info *np)
+{
+	int i;
+
+	for (i = 0; i < np->num_queues; i++)
+		destroy_txq(&np->txq[i]);
+
+	free(np->txq, M_DEVBUF);
+	np->txq = NULL;
+}
+
+static int
+setup_txqs(device_t dev, struct netfront_info *info,
+	   unsigned long num_queues)
+{
+	int q, i;
 	int error;
+	netif_tx_sring_t *txs;
+	struct netfront_txq *txq;
 
-	info->tx_ring_ref = GRANT_REF_INVALID;
-	info->rx_ring_ref = GRANT_REF_INVALID;
-	info->rx.sring = NULL;
-	info->tx.sring = NULL;
-
-	txs = (netif_tx_sring_t *)malloc(PAGE_SIZE, M_DEVBUF, M_NOWAIT|M_ZERO);
-	if (!txs) {
-		error = ENOMEM;
-		xenbus_dev_fatal(dev, error, "allocating tx ring page");
-		goto fail;
-	}
-	SHARED_RING_INIT(txs);
-	FRONT_RING_INIT(&info->tx, txs, PAGE_SIZE);
-	error = xenbus_grant_ring(dev, virt_to_mfn(txs), &info->tx_ring_ref);
-	if (error)
-		goto fail;
-
-	rxs = (netif_rx_sring_t *)malloc(PAGE_SIZE, M_DEVBUF, M_NOWAIT|M_ZERO);
-	if (!rxs) {
-		error = ENOMEM;
-		xenbus_dev_fatal(dev, error, "allocating rx ring page");
-		goto fail;
-	}
-	SHARED_RING_INIT(rxs);
-	FRONT_RING_INIT(&info->rx, rxs, PAGE_SIZE);
-
-	error = xenbus_grant_ring(dev, virt_to_mfn(rxs), &info->rx_ring_ref);
-	if (error)
-		goto fail;
-
-	error = xen_intr_alloc_and_bind_local_port(dev,
-	    xenbus_get_otherend_id(dev), /*filter*/NULL, xn_intr, info,
-	    INTR_TYPE_NET | INTR_MPSAFE | INTR_ENTROPY, &info->xen_intr_handle);
-
-	if (error) {
-		xenbus_dev_fatal(dev, error,
-				 "xen_intr_alloc_and_bind_local_port failed");
-		goto fail;
+	info->txq = malloc(sizeof(struct netfront_txq) * num_queues,
+	    M_DEVBUF, M_WAITOK|M_ZERO);
+
+	for (q = 0; q < num_queues; q++) {
+		txq = &info->txq[q];
+
+		txq->id = q;
+		txq->info = info;
+
+		txq->ring_ref = GRANT_REF_INVALID;
+		txq->ring.sring = NULL;
+
+		snprintf(txq->name, XN_QUEUE_NAME_LEN, "xntx_%u", q);
+
+		mtx_init(&txq->lock, txq->name, "netfront transmit lock",
+		    MTX_DEF);
+
+		for (i = 0; i <= NET_TX_RING_SIZE; i++) {
+			txq->mbufs[i] = (void *) ((u_long) i+1);
+			txq->grant_ref[i] = GRANT_REF_INVALID;
+		}
+		txq->mbufs[NET_TX_RING_SIZE] = (void *)0;
+
+		/* Start resources allocation. */
+
+		if (gnttab_alloc_grant_references(NET_TX_RING_SIZE,
+		    &txq->gref_head) != 0) {
+			device_printf(dev, "failed to allocate tx grant refs\n");
+			error = ENOMEM;
+			goto fail;
+		}
+
+		txs = (netif_tx_sring_t *)malloc(PAGE_SIZE, M_DEVBUF,
+		    M_WAITOK|M_ZERO);
+		SHARED_RING_INIT(txs);
+		FRONT_RING_INIT(&txq->ring, txs, PAGE_SIZE);
+
+		error = xenbus_grant_ring(dev, virt_to_mfn(txs),
+		    &txq->ring_ref);
+		if (error != 0) {
+			device_printf(dev, "failed to grant tx ring\n");
+			goto fail_grant_ring;
+		}
+
+		txq->br = buf_ring_alloc(NET_TX_RING_SIZE, M_DEVBUF,
+		    M_WAITOK, &txq->lock);
+		TASK_INIT(&txq->defrtask, 0, xn_txq_tq_deferred, txq);
+		TASK_INIT(&txq->intrtask, 0, xn_txq_tq_intr, txq);
+
+		txq->tq = taskqueue_create_fast(txq->name, M_WAITOK,
+		    taskqueue_thread_enqueue, &txq->tq);
+
+		error = taskqueue_start_threads(&txq->tq, 1, PI_NET,
+		    "%s txq %d", device_get_nameunit(dev), txq->id);
+		if (error != 0) {
+			device_printf(dev, "failed to start tx taskq %d\n",
+			    txq->id);
+			goto fail_start_thread;
+		}
+
+		error = xen_intr_alloc_and_bind_local_port(dev,
+			    xenbus_get_otherend_id(dev), xn_intr, /* handler */ NULL,
+			    &info->txq[q],
+			    INTR_TYPE_NET | INTR_MPSAFE | INTR_ENTROPY,
+			    &txq->xen_intr_handle);
+
+		if (error != 0) {
+			device_printf(dev, "xen_intr_alloc_and_bind_local_port failed\n");
+			goto fail_bind_port;
+		}
 	}
 
 	return (0);
 
- fail:
-	netif_free(info);
+fail_bind_port:
+	taskqueue_drain_all(txq->tq);
+fail_start_thread:
+	gnttab_free_grant_references(txq->gref_head);
+	free(txq->ring.sring, M_DEVBUF);
+	gnttab_end_foreign_access_ref(txq->ring_ref);
+	buf_ring_free(txq->br, M_DEVBUF);
+	taskqueue_free(txq->tq);
+fail_grant_ring:
+	gnttab_free_grant_references(txq->gref_head);
+	free(txq->ring.sring, M_DEVBUF);
+fail:
+	for (; q >= 0; q--) {
+		disconnect_txq(&info->txq[q]);
+		destroy_txq(&info->txq[q]);
+	}
+
+	free(info->txq, M_DEVBUF);
+	return (error);
+}
+
+static int
+setup_device(device_t dev, struct netfront_info *info,
+    unsigned long num_queues)
+{
+	int error;
+	int q;
+
+	if (info->txq)
+		destroy_txqs(info);
+
+	if (info->rxq)
+		destroy_rxqs(info);
+
+	info->num_queues = 0;
+
+	error = setup_rxqs(dev, info, num_queues);
+	if (error != 0)
+		goto out;
+	error = setup_txqs(dev, info, num_queues);
+	if (error != 0)
+		goto out;
+
+	info->num_queues = num_queues;
+
+	/* No split event channel at the moment. */
+	for (q = 0; q < num_queues; q++)
+		info->rxq[q].xen_intr_handle = info->txq[q].xen_intr_handle;
+
+	return (0);
+
+out:
+	KASSERT(error != 0, ("Error path taken without providing an error code"));
 	return (error);
 }
 
@@ -614,7 +1000,7 @@ netfront_backend_changed(device_t dev, X
 	case XenbusStateInitWait:
 		if (xenbus_get_state(dev) != XenbusStateInitialising)
 			break;
-		if (network_connect(sc) != 0)
+		if (xn_connect(sc) != 0)
 			break;
 		xenbus_set_state(dev, XenbusStateConnected);
 		break;
@@ -629,42 +1015,6 @@ netfront_backend_changed(device_t dev, X
 	}
 }
 
-static void
-xn_free_rx_ring(struct netfront_info *sc)
-{
-#if 0
-	int i;
-
-	for (i = 0; i < NET_RX_RING_SIZE; i++) {
-		if (sc->xn_cdata.rx_mbufs[i] != NULL) {
-			m_freem(sc->rx_mbufs[i]);
-			sc->rx_mbufs[i] = NULL;
-		}
-	}
-
-	sc->rx.rsp_cons = 0;
-	sc->xn_rx_if->req_prod = 0;
-	sc->xn_rx_if->event = sc->rx.rsp_cons ;
-#endif
-}
-
-static void
-xn_free_tx_ring(struct netfront_info *sc)
-{
-#if 0
-	int i;
-
-	for (i = 0; i < NET_TX_RING_SIZE; i++) {
-		if (sc->tx_mbufs[i] != NULL) {
-			m_freem(sc->tx_mbufs[i]);

*** DIFF OUTPUT TRUNCATED AT 1000 LINES ***

From owner-svn-src-all@freebsd.org  Wed Jan 20 16:41:02 2016
Return-Path: <owner-svn-src-all@freebsd.org>
Delivered-To: svn-src-all@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4BA2AA8ADF0;
 Wed, 20 Jan 2016 16:41:02 +0000 (UTC)
 (envelope-from emaste@FreeBSD.org)
Received: from repo.freebsd.org (repo.freebsd.org
 [IPv6:2610:1c1:1:6068::e6a:0])
 (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
 (Client did not present a certificate)
 by mx1.freebsd.org (Postfix) with ESMTPS id 24D741125;
 Wed, 20 Jan 2016 16:41:02 +0000 (UTC)
 (envelope-from emaste@FreeBSD.org)
Received: from repo.freebsd.org ([127.0.1.37])
 by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u0KGf11X028314;
 Wed, 20 Jan 2016 16:41:01 GMT (envelope-from emaste@FreeBSD.org)
Received: (from emaste@localhost)
 by repo.freebsd.org (8.15.2/8.15.2/Submit) id u0KGf1mu028312;
 Wed, 20 Jan 2016 16:41:01 GMT (envelope-from emaste@FreeBSD.org)
Message-Id: <201601201641.u0KGf1mu028312@repo.freebsd.org>
X-Authentication-Warning: repo.freebsd.org: emaste set sender to
 emaste@FreeBSD.org using -f
From: Ed Maste <emaste@FreeBSD.org>
Date: Wed, 20 Jan 2016 16:41:01 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org
Subject: svn commit: r294443 - in stable/10/share: man/man7 misc
X-SVN-Group: stable-10
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.20
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for &quot;
 user&quot; and &quot; projects&quot; \)" <svn-src-all.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-all/>
List-Post: <mailto:svn-src-all@freebsd.org>
List-Help: <mailto:svn-src-all-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Wed, 20 Jan 2016 16:41:02 -0000

Author: emaste
Date: Wed Jan 20 16:41:00 2016
New Revision: 294443
URL: https://svnweb.freebsd.org/changeset/base/294443

Log:
  MFC r293281: Use standard name for ASCII LF and FF control codes
  
  PR:		205778

Modified:
  stable/10/share/man/man7/ascii.7
  stable/10/share/misc/ascii   (contents, props changed)
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/share/man/man7/ascii.7
==============================================================================
--- stable/10/share/man/man7/ascii.7	Wed Jan 20 15:02:43 2016	(r294442)
+++ stable/10/share/man/man7/ascii.7	Wed Jan 20 16:41:00 2016	(r294443)
@@ -32,7 +32,7 @@
 .\"	@(#)ascii.7	8.1 (Berkeley) 6/5/93
 .\" $FreeBSD$
 .\"
-.Dd June 5, 1993
+.Dd January 20, 2016
 .Dt ASCII 7
 .Os
 .Sh NAME
@@ -46,7 +46,7 @@ The
 set:
 .Bd -literal -offset left
 000 NUL  001 SOH  002 STX  003 ETX  004 EOT  005 ENQ  006 ACK  007 BEL
-010 BS   011 HT   012 NL   013 VT   014 NP   015 CR   016 SO   017 SI
+010 BS   011 HT   012 LF   013 VT   014 FF   015 CR   016 SO   017 SI
 020 DLE  021 DC1  022 DC2  023 DC3  024 DC4  025 NAK  026 SYN  027 ETB
 030 CAN  031 EM   032 SUB  033 ESC  034 FS   035 GS   036 RS   037 US
 040 SP   041  !   042  "   043  #   044  $   045  %   046  &   047  '
@@ -68,7 +68,7 @@ The
 set:
 .Bd -literal -offset left
 00 NUL   01 SOH   02 STX   03 ETX   04 EOT   05 ENQ   06 ACK   07 BEL
-08 BS    09 HT    0A NL    0B VT    0C NP    0D CR    0E SO    0F SI
+08 BS    09 HT    0A LF    0B VT    0C FF    0D CR    0E SO    0F SI
 10 DLE   11 DC1   12 DC2   13 DC3   14 DC4   15 NAK   16 SYN   17 ETB
 18 CAN   19 EM    1A SUB   1B ESC   1C FS    1D GS    1E RS    1F US
 20 SP    21  !    22  "    23  #    24  $    25  %    26  &    27  '
@@ -90,7 +90,7 @@ The
 set:
 .Bd -literal -offset left
   0 NUL    1 SOH    2 STX    3 ETX    4 EOT    5 ENQ    6 ACK    7 BEL
-  8 BS     9 HT    10 NL    11 VT    12 NP    13 CR    14 SO    15 SI
+  8 BS     9 HT    10 LF    11 VT    12 FF    13 CR    14 SO    15 SI
  16 DLE   17 DC1   18 DC2   19 DC3   20 DC4   21 NAK   22 SYN   23 ETB
  24 CAN   25 EM    26 SUB   27 ESC   28 FS    29 GS    30 RS    31 US
  32 SP    33  !    34  "    35  #    36  $    37  %    38  &    39  '

Modified: stable/10/share/misc/ascii
==============================================================================
--- stable/10/share/misc/ascii	Wed Jan 20 15:02:43 2016	(r294442)
+++ stable/10/share/misc/ascii	Wed Jan 20 16:41:00 2016	(r294443)
@@ -1,5 +1,5 @@
 |000 nul|001 soh|002 stx|003 etx|004 eot|005 enq|006 ack|007 bel|
-|010 bs |011 ht |012 nl |013 vt |014 np |015 cr |016 so |017 si |
+|010 bs |011 ht |012 lf |013 vt |014 ff |015 cr |016 so |017 si |
 |020 dle|021 dc1|022 dc2|023 dc3|024 dc4|025 nak|026 syn|027 etb|
 |030 can|031 em |032 sub|033 esc|034 fs |035 gs |036 rs |037 us |
 |040 sp |041  ! |042  " |043  # |044  $ |045  % |046  & |047  ' |
@@ -16,7 +16,7 @@
 |170  x |171  y |172  z |173  { |174  | |175  } |176  ~ |177 del|
 
 | 00 nul| 01 soh| 02 stx| 03 etx| 04 eot| 05 enq| 06 ack| 07 bel|
-| 08 bs | 09 ht | 0a nl | 0b vt | 0c np | 0d cr | 0e so | 0f si |
+| 08 bs | 09 ht | 0a lf | 0b vt | 0c ff | 0d cr | 0e so | 0f si |
 | 10 dle| 11 dc1| 12 dc2| 13 dc3| 14 dc4| 15 nak| 16 syn| 17 etb|
 | 18 can| 19 em | 1a sub| 1b esc| 1c fs | 1d gs | 1e rs | 1f us |
 | 20 sp | 21  ! | 22  " | 23  # | 24  $ | 25  % | 26  & | 27  ' |
@@ -33,7 +33,7 @@
 | 78  x | 79  y | 7a  z | 7b  { | 7c  | | 7d  } | 7e  ~ | 7f del|
 
 |  0 nul|  1 soh|  2 stx|  3 etx|  4 eot|  5 enq|  6 ack|  7 bel|
-|  8 bs |  9 ht | 10 nl | 11 vt | 12 np | 13 cr | 14 so | 15 si |
+|  8 bs |  9 ht | 10 lf | 11 vt | 12 ff | 13 cr | 14 so | 15 si |
 | 16 dle| 17 dc1| 18 dc2| 19 dc3| 20 dc4| 21 nak| 22 syn| 23 etb|
 | 24 can| 25 em | 26 sub| 27 esc| 28 fs | 29 gs | 30 rs | 31 us |
 | 32 sp | 33  ! | 34  " | 35  # | 36  $ | 37  % | 38  & | 39  ' |

From owner-svn-src-all@freebsd.org  Wed Jan 20 16:45:41 2016
Return-Path: <owner-svn-src-all@freebsd.org>
Delivered-To: svn-src-all@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9C4E5A8AFB4;
 Wed, 20 Jan 2016 16:45:41 +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 4FF881538;
 Wed, 20 Jan 2016 16:45:41 +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 u0KGjeJ3029339;
 Wed, 20 Jan 2016 16:45:40 GMT (envelope-from bdrewery@FreeBSD.org)
Received: (from bdrewery@localhost)
 by repo.freebsd.org (8.15.2/8.15.2/Submit) id u0KGjeN2029336;
 Wed, 20 Jan 2016 16:45:40 GMT (envelope-from bdrewery@FreeBSD.org)
Message-Id: <201601201645.u0KGjeN2029336@repo.freebsd.org>
X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to
 bdrewery@FreeBSD.org using -f
From: Bryan Drewery <bdrewery@FreeBSD.org>
Date: Wed, 20 Jan 2016 16:45:40 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-head@freebsd.org
Subject: svn commit: r294444 - in head/sys/modules: ix ixlv ixv
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.20
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for &quot;
 user&quot; and &quot; projects&quot; \)" <svn-src-all.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-all/>
List-Post: <mailto:svn-src-all@freebsd.org>
List-Help: <mailto:svn-src-all-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Wed, 20 Jan 2016 16:45:41 -0000

Author: bdrewery
Date: Wed Jan 20 16:45:39 2016
New Revision: 294444
URL: https://svnweb.freebsd.org/changeset/base/294444

Log:
  Add some missing dependencies on pci_iov_if.h.
  
  Sponsored by:	EMC / Isilon Storage Division

Modified:
  head/sys/modules/ix/Makefile
  head/sys/modules/ixlv/Makefile
  head/sys/modules/ixv/Makefile

Modified: head/sys/modules/ix/Makefile
==============================================================================
--- head/sys/modules/ix/Makefile	Wed Jan 20 16:41:00 2016	(r294443)
+++ head/sys/modules/ix/Makefile	Wed Jan 20 16:45:39 2016	(r294444)
@@ -3,7 +3,7 @@
 .PATH:  ${.CURDIR}/../../dev/ixgbe
 
 KMOD    = if_ix
-SRCS    = device_if.h bus_if.h pci_if.h
+SRCS    = device_if.h bus_if.h pci_if.h pci_iov_if.h
 SRCS	+= opt_inet.h opt_inet6.h opt_rss.h
 SRCS    += if_ix.c ix_txrx.c ixgbe_osdep.c
 # Shared source

Modified: head/sys/modules/ixlv/Makefile
==============================================================================
--- head/sys/modules/ixlv/Makefile	Wed Jan 20 16:41:00 2016	(r294443)
+++ head/sys/modules/ixlv/Makefile	Wed Jan 20 16:45:39 2016	(r294444)
@@ -3,7 +3,7 @@
 .PATH:  ${.CURDIR}/../../dev/ixl
 
 KMOD    = if_ixlv
-SRCS    = device_if.h bus_if.h pci_if.h opt_bdg.h
+SRCS    = device_if.h bus_if.h pci_if.h pci_iov_if.h opt_bdg.h
 SRCS    += opt_inet.h opt_inet6.h opt_rss.h
 SRCS    += if_ixlv.c ixlvc.c ixl_txrx.c i40e_osdep.c
 

Modified: head/sys/modules/ixv/Makefile
==============================================================================
--- head/sys/modules/ixv/Makefile	Wed Jan 20 16:41:00 2016	(r294443)
+++ head/sys/modules/ixv/Makefile	Wed Jan 20 16:45:39 2016	(r294444)
@@ -3,7 +3,7 @@
 .PATH:  ${.CURDIR}/../../dev/ixgbe
 
 KMOD    = if_ixv
-SRCS    = device_if.h bus_if.h pci_if.h
+SRCS    = device_if.h bus_if.h pci_if.h pci_iov_if.h
 SRCS	+= opt_inet.h opt_inet6.h opt_rss.h
 SRCS    += if_ixv.c ix_txrx.c ixgbe_osdep.c
 # Shared source

From owner-svn-src-all@freebsd.org  Wed Jan 20 16:53:40 2016
Return-Path: <owner-svn-src-all@freebsd.org>
Delivered-To: svn-src-all@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id A7DACA89478;
 Wed, 20 Jan 2016 16:53:40 +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 6257F1B68;
 Wed, 20 Jan 2016 16:53:40 +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 u0KGrdAB032526;
 Wed, 20 Jan 2016 16:53:39 GMT (envelope-from emaste@FreeBSD.org)
Received: (from emaste@localhost)
 by repo.freebsd.org (8.15.2/8.15.2/Submit) id u0KGrdEC032522;
 Wed, 20 Jan 2016 16:53:39 GMT (envelope-from emaste@FreeBSD.org)
Message-Id: <201601201653.u0KGrdEC032522@repo.freebsd.org>
X-Authentication-Warning: repo.freebsd.org: emaste set sender to
 emaste@FreeBSD.org using -f
From: Ed Maste <emaste@FreeBSD.org>
Date: Wed, 20 Jan 2016 16:53:39 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org
Subject: svn commit: r294445 - in stable/10/sys/boot: efi/libefi efi/loader
 ficl/amd64
X-SVN-Group: stable-10
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.20
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for &quot;
 user&quot; and &quot; projects&quot; \)" <svn-src-all.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-all/>
List-Post: <mailto:svn-src-all@freebsd.org>
List-Help: <mailto:svn-src-all-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Wed, 20 Jan 2016 16:53:40 -0000

Author: emaste
Date: Wed Jan 20 16:53:38 2016
New Revision: 294445
URL: https://svnweb.freebsd.org/changeset/base/294445

Log:
  MFC r293233: loader.efi: add terminal emulation support
  
  This is based on the vidconsole implementation.
  
  Submitted by:	Toomas Soome <tsoome@me.com>
  Relnotes:	Yes

Modified:
  stable/10/sys/boot/efi/libefi/Makefile
  stable/10/sys/boot/efi/libefi/efi_console.c
  stable/10/sys/boot/efi/loader/main.c
  stable/10/sys/boot/ficl/amd64/sysdep.c

Modified: stable/10/sys/boot/efi/libefi/Makefile
==============================================================================
--- stable/10/sys/boot/efi/libefi/Makefile	Wed Jan 20 16:45:39 2016	(r294444)
+++ stable/10/sys/boot/efi/libefi/Makefile	Wed Jan 20 16:53:38 2016	(r294445)
@@ -19,5 +19,6 @@ CFLAGS+= -I${.CURDIR}/../../common
  
 # Suppress warning from clang for FreeBSD %b and %D formats
 CFLAGS+= -fformat-extensions
+CFLAGS+= -DTERM_EMU
 
 .include <bsd.lib.mk>

Modified: stable/10/sys/boot/efi/libefi/efi_console.c
==============================================================================
--- stable/10/sys/boot/efi/libefi/efi_console.c	Wed Jan 20 16:45:39 2016	(r294444)
+++ stable/10/sys/boot/efi/libefi/efi_console.c	Wed Jan 20 16:53:38 2016	(r294445)
@@ -35,6 +35,69 @@ __FBSDID("$FreeBSD$");
 static SIMPLE_TEXT_OUTPUT_INTERFACE	*conout;
 static SIMPLE_INPUT_INTERFACE		*conin;
 
+#ifdef TERM_EMU
+#define	DEFAULT_FGCOLOR	EFI_LIGHTGRAY
+#define	DEFAULT_BGCOLOR	EFI_BLACK
+
+#define	MAXARGS	8
+static int args[MAXARGS], argc;
+static int fg_c, bg_c, curx, cury;
+static int esc;
+
+void get_pos(int *x, int *y);
+void curs_move(int *_x, int *_y, int x, int y);
+static void CL(int);
+#endif
+
+static void efi_cons_probe(struct console *);
+static int efi_cons_init(int);
+void efi_cons_putchar(int);
+int efi_cons_getchar(void);
+void efi_cons_efiputchar(int);
+int efi_cons_poll(void);
+
+struct console efi_console = {
+	"efi",
+	"EFI console",
+	0,
+	efi_cons_probe,
+	efi_cons_init,
+	efi_cons_putchar,
+	efi_cons_getchar,
+	efi_cons_poll
+};
+
+#ifdef TERM_EMU
+
+/* Get cursor position. */
+void
+get_pos(int *x, int *y)
+{
+	*x = conout->Mode->CursorColumn;
+	*y = conout->Mode->CursorRow;
+}
+
+/* Move cursor to x rows and y cols (0-based). */
+void
+curs_move(int *_x, int *_y, int x, int y)
+{
+	conout->SetCursorPosition(conout, x, y);
+	if (_x != NULL)
+		*_x = conout->Mode->CursorColumn;
+	if (_y != NULL)
+		*_y = conout->Mode->CursorRow;
+}
+
+/* Clear internal state of the terminal emulation code. */
+void
+end_term(void)
+{
+	esc = 0;
+	argc = -1;
+}
+
+#endif
+
 static void
 efi_cons_probe(struct console *cp)
 {
@@ -46,22 +109,314 @@ efi_cons_probe(struct console *cp)
 static int
 efi_cons_init(int arg)
 {
-	conout->SetAttribute(conout, EFI_TEXT_ATTR(EFI_LIGHTGRAY, EFI_BLACK));
+	conout->SetAttribute(conout, EFI_TEXT_ATTR(DEFAULT_FGCOLOR,
+	    DEFAULT_BGCOLOR));
+#ifdef TERM_EMU
+	end_term();
+	get_pos(&curx, &cury);
+	curs_move(&curx, &cury, curx, cury);
+	fg_c = DEFAULT_FGCOLOR;
+	bg_c = DEFAULT_BGCOLOR;
+#endif
+	conout->EnableCursor(conout, TRUE);
 	return 0;
 }
 
+static void
+efi_cons_rawputchar(int c)
+{
+	int i;
+	UINTN x, y;
+	conout->QueryMode(conout, conout->Mode->Mode, &x, &y);
+
+	if (c == '\t')
+		/* XXX lame tab expansion */
+		for (i = 0; i < 8; i++)
+			efi_cons_rawputchar(' ');
+	else {
+#ifndef	TERM_EMU
+		if (c == '\n')
+			efi_cons_efiputchar('\r');
+		else
+			efi_cons_efiputchar(c);
+#else
+		switch (c) {
+		case '\r':
+			curx = 0;
+			curs_move(&curx, &cury, curx, cury);
+			return;
+		case '\n':
+			cury++;
+			if (cury >= y) {
+				efi_cons_efiputchar('\n');
+				cury--;
+			} else
+				curs_move(&curx, &cury, curx, cury);
+			return;
+		case '\b':
+			if (curx > 0) {
+				curx--;
+				curs_move(&curx, &cury, curx, cury);
+			}
+			return;
+		default:
+			efi_cons_efiputchar(c);
+			curx++;
+			if (curx > x-1) {
+				curx = 0;
+				cury++;
+			}
+			if (cury > y-1) {
+				curx = 0;
+				cury--;
+			}
+		}
+		curs_move(&curx, &cury, curx, cury);
+#endif
+	}
+}
+
+/* Gracefully exit ESC-sequence processing in case of misunderstanding. */
+static void
+bail_out(int c)
+{
+	char buf[16], *ch;
+	int i;
+
+	if (esc) {
+		efi_cons_rawputchar('\033');
+		if (esc != '\033')
+			efi_cons_rawputchar(esc);
+		for (i = 0; i <= argc; ++i) {
+			sprintf(buf, "%d", args[i]);
+			ch = buf;
+			while (*ch)
+				efi_cons_rawputchar(*ch++);
+		}
+	}
+	efi_cons_rawputchar(c);
+	end_term();
+}
+
+/* Clear display from current position to end of screen. */
+static void
+CD(void) {
+	int i;
+	UINTN x, y;
+
+	get_pos(&curx, &cury);
+	if (curx == 0 && cury == 0) {
+		conout->ClearScreen(conout);
+		end_term();
+		return;
+	}
+
+	conout->QueryMode(conout, conout->Mode->Mode, &x, &y);
+	CL(0);  /* clear current line from cursor to end */
+	for (i = cury + 1; i < y-1; i++) {
+		curs_move(NULL, NULL, 0, i);
+		CL(0);
+	}
+	curs_move(NULL, NULL, curx, cury);
+	end_term();
+}
+
+/*
+ * Absolute cursor move to args[0] rows and args[1] columns
+ * (the coordinates are 1-based).
+ */
+static void
+CM(void)
+{
+	if (args[0] > 0)
+		args[0]--;
+	if (args[1] > 0)
+		args[1]--;
+	curs_move(&curx, &cury, args[1], args[0]);
+	end_term();
+}
+
+/* Home cursor (left top corner), also called from mode command. */
 void
-efi_cons_putchar(int c)
+HO(void)
 {
-	CHAR16 buf[2];
+	argc = 1;
+	args[0] = args[1] = 1;
+	CM();
+}
 
-	if (c == '\n')
-		efi_cons_putchar('\r');
+/* Clear line from current position to end of line */
+static void
+CL(int direction)
+{
+	int i, len;
+	UINTN x, y;
+	CHAR16 *line;
 
-	buf[0] = c;
-	buf[1] = 0;
+	conout->QueryMode(conout, conout->Mode->Mode, &x, &y);
+	switch (direction) {
+	case 0:         /* from cursor to end */
+		len = x - curx + 1;
+		break;
+	case 1:         /* from beginning to cursor */
+		len = curx;
+		break;
+	case 2:         /* entire line */
+		len = x;
+		break;
+	}
 
-	conout->OutputString(conout, buf);
+	if (cury == y - 1)
+		len--;
+
+	line = malloc(len * sizeof (CHAR16));
+	if (line == NULL) {
+		printf("out of memory\n");
+		return;
+	}
+	for (i = 0; i < len; i++)
+		line[i] = ' ';
+	line[len-1] = 0;
+
+	if (direction != 0)
+		curs_move(NULL, NULL, 0, cury);
+
+	conout->OutputString(conout, line);
+	/* restore cursor position */
+	curs_move(NULL, NULL, curx, cury);
+	free(line);
+	end_term();
+}
+
+static void
+get_arg(int c)
+{
+	if (argc < 0)
+		argc = 0;
+	args[argc] *= 10;
+	args[argc] += c - '0';
+}
+
+/* Emulate basic capabilities of cons25 terminal */
+static void
+efi_term_emu(int c)
+{
+	static int ansi_col[] = {
+		0, 4, 2, 6, 1, 5, 3, 7
+	};
+	int t, i;
+
+	switch (esc) {
+	case 0:
+		switch (c) {
+		case '\033':
+			esc = c;
+			break;
+		default:
+			efi_cons_rawputchar(c);
+			break;
+		}
+		break;
+	case '\033':
+		switch (c) {
+		case '[':
+			esc = c;
+			args[0] = 0;
+			argc = -1;
+			break;
+		default:
+			bail_out(c);
+			break;
+		}
+		break;
+	case '[':
+		switch (c) {
+		case ';':
+			if (argc < 0)
+				argc = 0;
+			else if (argc + 1 >= MAXARGS)
+				bail_out(c);
+			else
+				args[++argc] = 0;
+			break;
+		case 'H':               /* ho = \E[H */
+			if (argc < 0)
+				HO();
+			else if (argc == 1)
+				CM();
+			else
+				bail_out(c);
+			break;
+		case 'J':               /* cd = \E[J */
+			if (argc < 0)
+				CD();
+			else
+				bail_out(c);
+			break;
+		case 'm':
+			if (argc < 0) {
+				fg_c = DEFAULT_FGCOLOR;
+				bg_c = DEFAULT_BGCOLOR;
+			}
+			for (i = 0; i <= argc; ++i) {
+				switch (args[i]) {
+				case 0:         /* back to normal */
+					fg_c = DEFAULT_FGCOLOR;
+					bg_c = DEFAULT_BGCOLOR;
+					break;
+				case 1:         /* bold */
+					fg_c |= 0x8;
+					break;
+				case 4:         /* underline */
+				case 5:         /* blink */
+					bg_c |= 0x8;
+					break;
+				case 7:         /* reverse */
+					t = fg_c;
+					fg_c = bg_c;
+					bg_c = t;
+					break;
+				case 30: case 31: case 32: case 33:
+				case 34: case 35: case 36: case 37:
+					fg_c = ansi_col[args[i] - 30];
+					break;
+				case 39:        /* normal */
+					fg_c = DEFAULT_FGCOLOR;
+					break;
+				case 40: case 41: case 42: case 43:
+				case 44: case 45: case 46: case 47:
+					bg_c = ansi_col[args[i] - 40];
+					break;
+				case 49:        /* normal */
+					bg_c = DEFAULT_BGCOLOR;
+					break;
+				}
+			}
+			conout->SetAttribute(conout, EFI_TEXT_ATTR(fg_c, bg_c));
+			end_term();
+			break;
+		default:
+			if (isdigit(c))
+				get_arg(c);
+			else
+				bail_out(c);
+			break;
+		}
+		break;
+	default:
+		bail_out(c);
+		break;
+	}
+}
+
+void
+efi_cons_putchar(int c)
+{
+#ifdef TERM_EMU
+	efi_term_emu(c);
+#else
+	efi_cons_rawputchar(c);
+#endif
 }
 
 int
@@ -77,6 +432,12 @@ efi_cons_getchar()
 		BS->WaitForEvent(1, &conin->WaitForKey, &junk);
 		status = conin->ReadKeyStroke(conin, &key);
 	}
+	switch (key.ScanCode) {
+	case 0x17: /* ESC */
+		return (0x1b);  /* esc */
+	}
+
+	/* this can return  */
 	return (key.UnicodeChar);
 }
 
@@ -87,13 +448,36 @@ efi_cons_poll()
 	return (BS->CheckEvent(conin->WaitForKey) == EFI_SUCCESS);
 }
 
-struct console efi_console = {
-	"efi",
-	"EFI console",
-	0,
-	efi_cons_probe,
-	efi_cons_init,
-	efi_cons_putchar,
-	efi_cons_getchar,
-	efi_cons_poll
-};
+/* Plain direct access to EFI OutputString(). */
+void
+efi_cons_efiputchar(int c)
+{
+	CHAR16 buf[2];
+
+	/*
+	 * translate box chars to unicode
+	 */
+	switch (c) {
+	/* single frame */
+	case 0xb3: buf[0] = BOXDRAW_VERTICAL; break;
+	case 0xbf: buf[0] = BOXDRAW_DOWN_LEFT; break;
+	case 0xc0: buf[0] = BOXDRAW_UP_RIGHT; break;
+	case 0xc4: buf[0] = BOXDRAW_HORIZONTAL; break;
+	case 0xda: buf[0] = BOXDRAW_DOWN_RIGHT; break;
+	case 0xd9: buf[0] = BOXDRAW_UP_LEFT; break;
+
+	/* double frame */
+	case 0xba: buf[0] = BOXDRAW_DOUBLE_VERTICAL; break;
+	case 0xbb: buf[0] = BOXDRAW_DOUBLE_DOWN_LEFT; break;
+	case 0xbc: buf[0] = BOXDRAW_DOUBLE_UP_LEFT; break;
+	case 0xc8: buf[0] = BOXDRAW_DOUBLE_UP_RIGHT; break;
+	case 0xc9: buf[0] = BOXDRAW_DOUBLE_DOWN_RIGHT; break;
+	case 0xcd: buf[0] = BOXDRAW_DOUBLE_HORIZONTAL; break;
+
+	default:
+		buf[0] = c;
+	}
+        buf[1] = 0;     /* terminate string */
+
+	conout->OutputString(conout, buf);
+}

Modified: stable/10/sys/boot/efi/loader/main.c
==============================================================================
--- stable/10/sys/boot/efi/loader/main.c	Wed Jan 20 16:45:39 2016	(r294444)
+++ stable/10/sys/boot/efi/loader/main.c	Wed Jan 20 16:53:38 2016	(r294445)
@@ -331,6 +331,7 @@ command_mode(int argc, char *argv[])
 	char rowenv[8];
 	EFI_STATUS status;
 	SIMPLE_TEXT_OUTPUT_INTERFACE *conout;
+	extern void HO(void);
 
 	conout = ST->ConOut;
 
@@ -352,7 +353,7 @@ command_mode(int argc, char *argv[])
 		}
 		sprintf(rowenv, "%u", (unsigned)rows);
 		setenv("LINES", rowenv, 1);
-
+		HO();		/* set cursor */
 		return (CMD_OK);
 	}
 

Modified: stable/10/sys/boot/ficl/amd64/sysdep.c
==============================================================================
--- stable/10/sys/boot/ficl/amd64/sysdep.c	Wed Jan 20 16:45:39 2016	(r294444)
+++ stable/10/sys/boot/ficl/amd64/sysdep.c	Wed Jan 20 16:53:38 2016	(r294445)
@@ -55,7 +55,7 @@ void  ficlTextOut(FICL_VM *pVM, char *ms
     IGNORE(pVM);
 
     while(*msg != 0)
-	putchar(*(msg++));
+	putchar((unsigned char)*(msg++));
     if (fNewline)
 	putchar('\n');
 

From owner-svn-src-all@freebsd.org  Wed Jan 20 16:59:39 2016
Return-Path: <owner-svn-src-all@freebsd.org>
Delivered-To: svn-src-all@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id 29013A896C3;
 Wed, 20 Jan 2016 16:59:39 +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 D41C71EC4;
 Wed, 20 Jan 2016 16:59:38 +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 u0KGxbeM033049;
 Wed, 20 Jan 2016 16:59:37 GMT (envelope-from emaste@FreeBSD.org)
Received: (from emaste@localhost)
 by repo.freebsd.org (8.15.2/8.15.2/Submit) id u0KGxb7Q033045;
 Wed, 20 Jan 2016 16:59:37 GMT (envelope-from emaste@FreeBSD.org)
Message-Id: <201601201659.u0KGxb7Q033045@repo.freebsd.org>
X-Authentication-Warning: repo.freebsd.org: emaste set sender to
 emaste@FreeBSD.org using -f
From: Ed Maste <emaste@FreeBSD.org>
Date: Wed, 20 Jan 2016 16:59:37 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org
Subject: svn commit: r294446 - stable/10/sys/boot/forth
X-SVN-Group: stable-10
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.20
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for &quot;
 user&quot; and &quot; projects&quot; \)" <svn-src-all.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-all/>
List-Post: <mailto:svn-src-all@freebsd.org>
List-Help: <mailto:svn-src-all-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Wed, 20 Jan 2016 16:59:39 -0000

Author: emaste
Date: Wed Jan 20 16:59:37 2016
New Revision: 294446
URL: https://svnweb.freebsd.org/changeset/base/294446

Log:
  MFC r293234: Enable the beastie menu for the UEFI console
  
  As of r294445 [in stable/10] the UEFI console includes basic terminal
  emulator support.
  
  Relnotes:	Yes

Modified:
  stable/10/sys/boot/forth/beastie.4th
  stable/10/sys/boot/forth/beastie.4th.8
  stable/10/sys/boot/forth/loader.conf.5
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/sys/boot/forth/beastie.4th
==============================================================================
--- stable/10/sys/boot/forth/beastie.4th	Wed Jan 20 16:53:38 2016	(r294445)
+++ stable/10/sys/boot/forth/beastie.4th	Wed Jan 20 16:59:37 2016	(r294446)
@@ -85,11 +85,6 @@ variable logoY
 also support-functions
 
 : beastie-start ( -- ) \ starts the menu
-	s" console" getenv dup -1 <> if
-		s" efi" 2swap contains? if
-			s" set beastie_disable=YES" evaluate
-		then
-	else drop then
 	s" beastie_disable" getenv dup -1 <> if
 		s" YES" compare-insensitive 0= if
 			any_conf_read? if

Modified: stable/10/sys/boot/forth/beastie.4th.8
==============================================================================
--- stable/10/sys/boot/forth/beastie.4th.8	Wed Jan 20 16:53:38 2016	(r294445)
+++ stable/10/sys/boot/forth/beastie.4th.8	Wed Jan 20 16:59:37 2016	(r294446)
@@ -24,7 +24,7 @@
 .\"
 .\" $FreeBSD$
 .\"
-.Dd April 27, 2014
+.Dd January 20, 2016
 .Dt BEASTIE.4TH 8
 .Os
 .Sh NAME
@@ -119,8 +119,7 @@ Sets the desired row position of the log
 If set to
 .Dq YES ,
 the beastie boot menu will be skipped.
-The beastie boot menu is always skipped if booting UEFI or running non-x86
-hardware.
+The beastie boot menu is always skipped if running non-x86 hardware.
 .It Va loader_delay
 If set to a number higher than zero, introduces a delay before starting the
 beastie boot menu. During the delay the user can press either Ctrl-C to skip

Modified: stable/10/sys/boot/forth/loader.conf.5
==============================================================================
--- stable/10/sys/boot/forth/loader.conf.5	Wed Jan 20 16:53:38 2016	(r294445)
+++ stable/10/sys/boot/forth/loader.conf.5	Wed Jan 20 16:59:37 2016	(r294446)
@@ -23,7 +23,7 @@
 .\" SUCH DAMAGE.
 .\"
 .\" $FreeBSD$
-.Dd April 27, 2014
+.Dd January 20, 2016
 .Dt LOADER.CONF 5
 .Os
 .Sh NAME
@@ -236,8 +236,7 @@ be displayed.
 If set to
 .Dq YES ,
 the beastie boot menu will be skipped.
-The beastie boot menu is always skipped if booting UEFI or running non-x86
-hardware.
+The beastie boot menu is always skipped if running non-x86 hardware.
 .It Va loader_logo Pq Dq Li orbbw
 Selects a desired logo in the beastie boot menu.
 Possible values are:

From owner-svn-src-all@freebsd.org  Wed Jan 20 17:38:23 2016
Return-Path: <owner-svn-src-all@freebsd.org>
Delivered-To: svn-src-all@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id E3AFCA8A8CF;
 Wed, 20 Jan 2016 17:38:22 +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 C12B51F45;
 Wed, 20 Jan 2016 17:38:22 +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 u0KHcLEO046838;
 Wed, 20 Jan 2016 17:38:21 GMT (envelope-from emaste@FreeBSD.org)
Received: (from emaste@localhost)
 by repo.freebsd.org (8.15.2/8.15.2/Submit) id u0KHcLVN046837;
 Wed, 20 Jan 2016 17:38:21 GMT (envelope-from emaste@FreeBSD.org)
Message-Id: <201601201738.u0KHcLVN046837@repo.freebsd.org>
X-Authentication-Warning: repo.freebsd.org: emaste set sender to
 emaste@FreeBSD.org using -f
From: Ed Maste <emaste@FreeBSD.org>
Date: Wed, 20 Jan 2016 17:38:21 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org
Subject: svn commit: r294449 - stable/10/sys/boot/efi/loader
X-SVN-Group: stable-10
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.20
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for &quot;
 user&quot; and &quot; projects&quot; \)" <svn-src-all.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-all/>
List-Post: <mailto:svn-src-all@freebsd.org>
List-Help: <mailto:svn-src-all-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Wed, 20 Jan 2016 17:38:23 -0000

Author: emaste
Date: Wed Jan 20 17:38:21 2016
New Revision: 294449
URL: https://svnweb.freebsd.org/changeset/base/294449

Log:
  MFC r293245: loader.efi style(9) cleanup
  
  Submitted by:	smh

Modified:
  stable/10/sys/boot/efi/loader/main.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/sys/boot/efi/loader/main.c
==============================================================================
--- stable/10/sys/boot/efi/loader/main.c	Wed Jan 20 17:08:01 2016	(r294448)
+++ stable/10/sys/boot/efi/loader/main.c	Wed Jan 20 17:38:21 2016	(r294449)
@@ -226,50 +226,47 @@ command_memmap(int argc, char *argv[])
 	status = BS->GetMemoryMap(&sz, 0, &key, &dsz, &dver);
 	if (status != EFI_BUFFER_TOO_SMALL) {
 		printf("Can't determine memory map size\n");
-		return CMD_ERROR;
+		return (CMD_ERROR);
 	}
 	map = malloc(sz);
 	status = BS->GetMemoryMap(&sz, map, &key, &dsz, &dver);
 	if (EFI_ERROR(status)) {
 		printf("Can't read memory map\n");
-		return CMD_ERROR;
+		return (CMD_ERROR);
 	}
 
 	ndesc = sz / dsz;
 	printf("%23s %12s %12s %8s %4s\n",
-	       "Type", "Physical", "Virtual", "#Pages", "Attr");
+	    "Type", "Physical", "Virtual", "#Pages", "Attr");
 
 	for (i = 0, p = map; i < ndesc;
 	     i++, p = NextMemoryDescriptor(p, dsz)) {
-	    printf("%23s %012lx %012lx %08lx ",
-		   types[p->Type],
-		   p->PhysicalStart,
-		   p->VirtualStart,
-		   p->NumberOfPages);
-	    if (p->Attribute & EFI_MEMORY_UC)
-		printf("UC ");
-	    if (p->Attribute & EFI_MEMORY_WC)
-		printf("WC ");
-	    if (p->Attribute & EFI_MEMORY_WT)
-		printf("WT ");
-	    if (p->Attribute & EFI_MEMORY_WB)
-		printf("WB ");
-	    if (p->Attribute & EFI_MEMORY_UCE)
-		printf("UCE ");
-	    if (p->Attribute & EFI_MEMORY_WP)
-		printf("WP ");
-	    if (p->Attribute & EFI_MEMORY_RP)
-		printf("RP ");
-	    if (p->Attribute & EFI_MEMORY_XP)
-		printf("XP ");
-	    printf("\n");
+		printf("%23s %012lx %012lx %08lx ", types[p->Type],
+		   p->PhysicalStart, p->VirtualStart, p->NumberOfPages);
+		if (p->Attribute & EFI_MEMORY_UC)
+			printf("UC ");
+		if (p->Attribute & EFI_MEMORY_WC)
+			printf("WC ");
+		if (p->Attribute & EFI_MEMORY_WT)
+			printf("WT ");
+		if (p->Attribute & EFI_MEMORY_WB)
+			printf("WB ");
+		if (p->Attribute & EFI_MEMORY_UCE)
+			printf("UCE ");
+		if (p->Attribute & EFI_MEMORY_WP)
+			printf("WP ");
+		if (p->Attribute & EFI_MEMORY_RP)
+			printf("RP ");
+		if (p->Attribute & EFI_MEMORY_XP)
+			printf("XP ");
+		printf("\n");
 	}
 
-	return CMD_OK;
+	return (CMD_OK);
 }
 
-COMMAND_SET(configuration, "configuration",
-	    "print configuration tables", command_configuration);
+COMMAND_SET(configuration, "configuration", "print configuration tables",
+    command_configuration);
 
 static const char *
 guid_to_string(EFI_GUID *guid)
@@ -315,7 +312,7 @@ command_configuration(int argc, char *ar
 		printf(" at %p\n", ST->ConfigurationTable[i].VendorTable);
 	}
 
-	return CMD_OK;
+	return (CMD_OK);
 }
 
 
@@ -392,20 +389,17 @@ command_nvram(int argc, char *argv[])
 	status = RS->GetNextVariableName(&varsz, NULL, NULL);
 
 	for (; status != EFI_NOT_FOUND; ) {
-		status = RS->GetNextVariableName(&varsz, var,
-		    &varguid);
+		status = RS->GetNextVariableName(&varsz, var, &varguid);
 		//if (EFI_ERROR(status))
 			//break;
 
 		conout->OutputString(conout, var);
 		printf("=");
 		datasz = 0;
-		status = RS->GetVariable(var, &varguid, NULL, &datasz,
-		    NULL);
+		status = RS->GetVariable(var, &varguid, NULL, &datasz, NULL);
 		/* XXX: check status */
 		data = malloc(datasz);
-		status = RS->GetVariable(var, &varguid, NULL, &datasz,
-		    data);
+		status = RS->GetVariable(var, &varguid, NULL, &datasz, data);
 		if (EFI_ERROR(status))
 			printf("<error retrieving variable>");
 		else {

From owner-svn-src-all@freebsd.org  Wed Jan 20 17:40:12 2016
Return-Path: <owner-svn-src-all@freebsd.org>
Delivered-To: svn-src-all@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id AB1F0A8A974;
 Wed, 20 Jan 2016 17:40:12 +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 7BBE711C3;
 Wed, 20 Jan 2016 17:40:12 +0000 (UTC)
 (envelope-from emaste@FreeBSD.org)
Received: from repo.freebsd.org ([127.0.1.37])
 by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u0KHeBXl047069;
 Wed, 20 Jan 2016 17:40:11 GMT (envelope-from emaste@FreeBSD.org)
Received: (from emaste@localhost)
 by repo.freebsd.org (8.15.2/8.15.2/Submit) id u0KHeBKQ047068;
 Wed, 20 Jan 2016 17:40:11 GMT (envelope-from emaste@FreeBSD.org)
Message-Id: <201601201740.u0KHeBKQ047068@repo.freebsd.org>
X-Authentication-Warning: repo.freebsd.org: emaste set sender to
 emaste@FreeBSD.org using -f
From: Ed Maste <emaste@FreeBSD.org>
Date: Wed, 20 Jan 2016 17:40:11 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org
Subject: svn commit: r294450 - stable/10/usr.bin/elfdump
X-SVN-Group: stable-10
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.20
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for &quot;
 user&quot; and &quot; projects&quot; \)" <svn-src-all.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-all/>
List-Post: <mailto:svn-src-all@freebsd.org>
List-Help: <mailto:svn-src-all-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Wed, 20 Jan 2016 17:40:12 -0000

Author: emaste
Date: Wed Jan 20 17:40:11 2016
New Revision: 294450
URL: https://svnweb.freebsd.org/changeset/base/294450

Log:
  MFC r288083, r288138: elfdump: report MIPS-specific ELF section types

Modified:
  stable/10/usr.bin/elfdump/elfdump.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/usr.bin/elfdump/elfdump.c
==============================================================================
--- stable/10/usr.bin/elfdump/elfdump.c	Wed Jan 20 17:38:21 2016	(r294449)
+++ stable/10/usr.bin/elfdump/elfdump.c	Wed Jan 20 17:40:11 2016	(r294450)
@@ -379,7 +379,9 @@ sh_types(uint64_t machine, uint64_t sht)
 			break;
 		case EM_MIPS:
 			switch (sht) {
+			case SHT_MIPS_REGINFO: return "SHT_MIPS_REGINFO";
 			case SHT_MIPS_OPTIONS: return "SHT_MIPS_OPTIONS";
+			case SHT_MIPS_ABIFLAGS: return "SHT_MIPS_ABIFLAGS";
 			}
 			break;
 		}

From owner-svn-src-all@freebsd.org  Wed Jan 20 18:35:45 2016
Return-Path: <owner-svn-src-all@freebsd.org>
Delivered-To: svn-src-all@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1E85DA89E96;
 Wed, 20 Jan 2016 18:35:45 +0000 (UTC)
 (envelope-from emaste@FreeBSD.org)
Received: from repo.freebsd.org (repo.freebsd.org
 [IPv6:2610:1c1:1:6068::e6a:0])
 (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
 (Client did not present a certificate)
 by mx1.freebsd.org (Postfix) with ESMTPS id CABD0113B;
 Wed, 20 Jan 2016 18:35:44 +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 u0KIZhpo067105;
 Wed, 20 Jan 2016 18:35:43 GMT (envelope-from emaste@FreeBSD.org)
Received: (from emaste@localhost)
 by repo.freebsd.org (8.15.2/8.15.2/Submit) id u0KIZhEQ067103;
 Wed, 20 Jan 2016 18:35:43 GMT (envelope-from emaste@FreeBSD.org)
Message-Id: <201601201835.u0KIZhEQ067103@repo.freebsd.org>
X-Authentication-Warning: repo.freebsd.org: emaste set sender to
 emaste@FreeBSD.org using -f
From: Ed Maste <emaste@FreeBSD.org>
Date: Wed, 20 Jan 2016 18:35:43 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-head@freebsd.org
Subject: svn commit: r294451 - head/sys/boot/mips/beri/boot2
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.20
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for &quot;
 user&quot; and &quot; projects&quot; \)" <svn-src-all.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-all/>
List-Post: <mailto:svn-src-all@freebsd.org>
List-Help: <mailto:svn-src-all-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Wed, 20 Jan 2016 18:35:45 -0000

Author: emaste
Date: Wed Jan 20 18:35:43 2016
New Revision: 294451
URL: https://svnweb.freebsd.org/changeset/base/294451

Log:
  Increase BERI boot components section alignment to 16
  
  The .text, .bss, and .data sections claimed 16-byte alignment, but were
  only aligned to 8 by the linker script.
  
  Discovered with elfcopy(1) from elftoolchain, which performs validation
  absent from the binutils strip(1). ELF tool chain ticket #512.
  
  Reported by:	brooks
  Reviewed by:	brooks
  Sponsored by:	DARPA, AFRL

Modified:
  head/sys/boot/mips/beri/boot2/flashboot.ldscript
  head/sys/boot/mips/beri/boot2/jtagboot.ldscript

Modified: head/sys/boot/mips/beri/boot2/flashboot.ldscript
==============================================================================
--- head/sys/boot/mips/beri/boot2/flashboot.ldscript	Wed Jan 20 17:40:11 2016	(r294450)
+++ head/sys/boot/mips/beri/boot2/flashboot.ldscript	Wed Jan 20 18:35:43 2016	(r294451)
@@ -49,13 +49,13 @@ SECTIONS
 {
 	. = __boot2_base_vaddr__;
 	. += SIZEOF_HEADERS;
-	.text ALIGN(0x8): {
+	.text ALIGN(0x10): {
 		relocate.o(.text)
 		start.o(.text)
 		*(EXCLUDE_FILE (relocate.o start.o) .text)
 	}
-	.data ALIGN(0x8): { *(.data)}
-	.bss ALIGN(0x8): { *(.bss) }
+	.data ALIGN(0x10): { *(.data)}
+	.bss ALIGN(0x10): { *(.bss) }
 
 	__heap = ALIGN(0x8);	/* 64-bit aligned heap pointer */
 	__data_end = .;

Modified: head/sys/boot/mips/beri/boot2/jtagboot.ldscript
==============================================================================
--- head/sys/boot/mips/beri/boot2/jtagboot.ldscript	Wed Jan 20 17:40:11 2016	(r294450)
+++ head/sys/boot/mips/beri/boot2/jtagboot.ldscript	Wed Jan 20 18:35:43 2016	(r294451)
@@ -49,12 +49,12 @@ SECTIONS
 {
 	. = __boot2_base_vaddr__;
 	. += SIZEOF_HEADERS;
-	.text ALIGN(0x8): {
+	.text ALIGN(0x10): {
 		start.o(.text)
 		*(EXCLUDE_FILE (start.o) .text)
 	}
-	.data ALIGN(0x8): { *(.data)}
-	.bss ALIGN(0x8): { *(.bss) }
+	.data ALIGN(0x10): { *(.data)}
+	.bss ALIGN(0x10): { *(.bss) }
 
 	__heap = ALIGN(0x8);	/* 64-bit aligned heap pointer */
 	__data_end = .;

From owner-svn-src-all@freebsd.org  Wed Jan 20 18:47:34 2016
Return-Path: <owner-svn-src-all@freebsd.org>
Delivered-To: svn-src-all@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id A7F3AA8A318;
 Wed, 20 Jan 2016 18:47:34 +0000 (UTC)
 (envelope-from brooks@FreeBSD.org)
Received: from repo.freebsd.org (repo.freebsd.org
 [IPv6:2610:1c1:1:6068::e6a:0])
 (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
 (Client did not present a certificate)
 by mx1.freebsd.org (Postfix) with ESMTPS id 7F7951AF1;
 Wed, 20 Jan 2016 18:47:34 +0000 (UTC)
 (envelope-from brooks@FreeBSD.org)
Received: from repo.freebsd.org ([127.0.1.37])
 by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u0KIlXd7070919;
 Wed, 20 Jan 2016 18:47:33 GMT (envelope-from brooks@FreeBSD.org)
Received: (from brooks@localhost)
 by repo.freebsd.org (8.15.2/8.15.2/Submit) id u0KIlXa4070917;
 Wed, 20 Jan 2016 18:47:33 GMT (envelope-from brooks@FreeBSD.org)
Message-Id: <201601201847.u0KIlXa4070917@repo.freebsd.org>
X-Authentication-Warning: repo.freebsd.org: brooks set sender to
 brooks@FreeBSD.org using -f
From: Brooks Davis <brooks@FreeBSD.org>
Date: Wed, 20 Jan 2016 18:47:33 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-head@freebsd.org
Subject: svn commit: r294452 - head/share/man/man4
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.20
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for &quot;
 user&quot; and &quot; projects&quot; \)" <svn-src-all.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-all/>
List-Post: <mailto:svn-src-all@freebsd.org>
List-Help: <mailto:svn-src-all-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Wed, 20 Jan 2016 18:47:34 -0000

Author: brooks
Date: Wed Jan 20 18:47:33 2016
New Revision: 294452
URL: https://svnweb.freebsd.org/changeset/base/294452

Log:
  Add a simple manpage for the cfi(4) and associated cfid(4) drivers.
  
  MFC after:	1 week
  Sponsored by:	DARPA, AFRL

Added:
  head/share/man/man4/cfi.4   (contents, props changed)
Modified:
  head/share/man/man4/Makefile

Modified: head/share/man/man4/Makefile
==============================================================================
--- head/share/man/man4/Makefile	Wed Jan 20 18:35:43 2016	(r294451)
+++ head/share/man/man4/Makefile	Wed Jan 20 18:47:33 2016	(r294452)
@@ -94,6 +94,7 @@ MAN=	aac.4 \
 	${_ccd.4} \
 	cd.4 \
 	cdce.4 \
+	cfi.4 \
 	ch.4 \
 	ciss.4 \
 	cloudabi.4 \
@@ -592,6 +593,7 @@ MLINKS+=bwn.4 if_bwn.4
 MLINKS+=${_bxe.4} ${_if_bxe.4}
 MLINKS+=cas.4 if_cas.4
 MLINKS+=cdce.4 if_cdce.4
+MLINKS+=cfi.4 cfid.4
 MLINKS+=cloudabi.4 cloudabi64.4
 MLINKS+=crypto.4 cryptodev.4
 MLINKS+=cue.4 if_cue.4

Added: head/share/man/man4/cfi.4
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/share/man/man4/cfi.4	Wed Jan 20 18:47:33 2016	(r294452)
@@ -0,0 +1,94 @@
+.\"-
+.\" Copyright (c) 2015-2016 SRI International
+.\" All rights reserved.
+.\"
+.\" This software was developed by SRI International and the University of
+.\" Cambridge Computer Laboratory under DARPA/AFRL contract (FA8750-10-C-0237)
+.\" ("CTSRD"), as part of the DARPA CRASH research programme.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\"    notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\"    notice, this list of conditions and the following disclaimer in the
+.\"    documentation and/or other materials provided with the distribution.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\" SUCH DAMAGE.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd January 20, 2016
+.Dt CFI 4
+.Os
+.Sh NAME
+.Nm cfi ,
+.Nm cfid
+.Nd driver for Common Flash Interface (CFI) NOR flash
+.Sh SYNOPSIS
+.Cd "device cfi"
+.Cd "device cfid"
+.Cd "options CFI_SUPPORT_STRATAFLASH"
+.Cd "options CFI_ARMEDANDDANGEROUS"
+.Pp
+In
+.Pa /boot/device.hints :
+.Cd hint.cfi.0.at="nexus0"
+.Cd hint.cfi.0.maddr=0x74000000
+.Cd hint.cfi.0.msize=0x4000000
+.Pp
+In DTS file:
+.Cd flash@74000000 {
+.Cd "	compatible =" Qo cfi-flash Qc ;
+.Cd "	reg = <0x74000000 0x4000000>;"
+.Cd };
+.Sh DESCRIPTION
+The
+.Nm
+device driver provides a management interface to NOR flash devices supporting
+the Common Flash Interface (CFI) specification.
+Its companion device
+.Nm cfid
+provides a
+.Xr geom 4
+disk interface to the device.
+.Pp
+Special support for features of the Intel StrataFlash line are available
+with the
+.Cd CFI_SUPPORT_STRATAFLASH
+kernel option.
+Additional support for write-once bits to switch part of Intel StrataFlash
+devices to read-only can be enabled by the
+.Cd CFI_ARMEDANDDANGEROUS
+kernel option.
+.El
+.Sh SEE ALSO
+.Xr led 4
+.Sh HISTORY
+The
+.Nm
+device driver first appeared in
+.Fx 8.0 .
+.Sh AUTHORS
+The
+.Nm
+driver was written by
+.An Juniper Networks
+with StrataFlash support by
+.An Sam Leffler .
+This manual page was written by SRI International and the University of
+Cambridge Computer Laboratory under DARPA/AFRL contract
+.Pq FA8750-10-C-0237
+.Pq Do CTSRD Dc ,
+as part of the DARPA CRASH research programme.

From owner-svn-src-all@freebsd.org  Wed Jan 20 19:08:51 2016
Return-Path: <owner-svn-src-all@freebsd.org>
Delivered-To: svn-src-all@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2BE6AA8AA60;
 Wed, 20 Jan 2016 19:08:51 +0000 (UTC)
 (envelope-from brooks@FreeBSD.org)
Received: from repo.freebsd.org (repo.freebsd.org
 [IPv6:2610:1c1:1:6068::e6a:0])
 (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
 (Client did not present a certificate)
 by mx1.freebsd.org (Postfix) with ESMTPS id EF39E1AD1;
 Wed, 20 Jan 2016 19:08:50 +0000 (UTC)
 (envelope-from brooks@FreeBSD.org)
Received: from repo.freebsd.org ([127.0.1.37])
 by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u0KJ8n4L078060;
 Wed, 20 Jan 2016 19:08:49 GMT (envelope-from brooks@FreeBSD.org)
Received: (from brooks@localhost)
 by repo.freebsd.org (8.15.2/8.15.2/Submit) id u0KJ8nD9078059;
 Wed, 20 Jan 2016 19:08:49 GMT (envelope-from brooks@FreeBSD.org)
Message-Id: <201601201908.u0KJ8nD9078059@repo.freebsd.org>
X-Authentication-Warning: repo.freebsd.org: brooks set sender to
 brooks@FreeBSD.org using -f
From: Brooks Davis <brooks@FreeBSD.org>
Date: Wed, 20 Jan 2016 19:08:49 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org
Subject: svn commit: r294453 - stable/10/lib/libc/string
X-SVN-Group: stable-10
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.20
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for &quot;
 user&quot; and &quot; projects&quot; \)" <svn-src-all.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-all/>
List-Post: <mailto:svn-src-all@freebsd.org>
List-Help: <mailto:svn-src-all-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Wed, 20 Jan 2016 19:08:51 -0000

Author: brooks
Date: Wed Jan 20 19:08:49 2016
New Revision: 294453
URL: https://svnweb.freebsd.org/changeset/base/294453

Log:
  MFC r293855:
  
  Avoid reading pass the end of the source buffer when it is not NUL
  terminated.
  
  If this buffer is adjacent to an unmapped page or a version of C with
  bounds checked is used this may result in a crash.
  
  PR:		206177
  Submitted by:	Alexander Cherepanov <cherepan@mccme.ru>

Modified:
  stable/10/lib/libc/string/wcsncat.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/lib/libc/string/wcsncat.c
==============================================================================
--- stable/10/lib/libc/string/wcsncat.c	Wed Jan 20 18:47:33 2016	(r294452)
+++ stable/10/lib/libc/string/wcsncat.c	Wed Jan 20 19:08:49 2016	(r294453)
@@ -48,7 +48,7 @@ wcsncat(wchar_t * __restrict s1, const w
 		p++;
 	q = p;
 	r = s2;
-	while (*r && n) {
+	while (n && *r) {
 		*q++ = *r++;
 		n--;
 	}

From owner-svn-src-all@freebsd.org  Wed Jan 20 19:20:30 2016
Return-Path: <owner-svn-src-all@freebsd.org>
Delivered-To: svn-src-all@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1C211A8AF00;
 Wed, 20 Jan 2016 19:20: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 DD5B810B4;
 Wed, 20 Jan 2016 19:20: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 u0KJKSPG081443;
 Wed, 20 Jan 2016 19:20:28 GMT (envelope-from emaste@FreeBSD.org)
Received: (from emaste@localhost)
 by repo.freebsd.org (8.15.2/8.15.2/Submit) id u0KJKSXL081442;
 Wed, 20 Jan 2016 19:20:28 GMT (envelope-from emaste@FreeBSD.org)
Message-Id: <201601201920.u0KJKSXL081442@repo.freebsd.org>
X-Authentication-Warning: repo.freebsd.org: emaste set sender to
 emaste@FreeBSD.org using -f
From: Ed Maste <emaste@FreeBSD.org>
Date: Wed, 20 Jan 2016 19:20:28 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org
Subject: svn commit: r294454 - stable/10/sys/sys
X-SVN-Group: stable-10
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.20
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for &quot;
 user&quot; and &quot; projects&quot; \)" <svn-src-all.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-all/>
List-Post: <mailto:svn-src-all@freebsd.org>
List-Help: <mailto:svn-src-all-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Wed, 20 Jan 2016 19:20:30 -0000

Author: emaste
Date: Wed Jan 20 19:20:28 2016
New Revision: 294454
URL: https://svnweb.freebsd.org/changeset/base/294454

Log:
  MFC r288081: Add MIPS ELF section type SHT_MIPS_ABIFLAGS definition

Modified:
  stable/10/sys/sys/elf_common.h
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/sys/sys/elf_common.h
==============================================================================
--- stable/10/sys/sys/elf_common.h	Wed Jan 20 19:08:49 2016	(r294453)
+++ stable/10/sys/sys/elf_common.h	Wed Jan 20 19:20:28 2016	(r294454)
@@ -315,6 +315,7 @@ typedef struct {
 #define	SHT_MIPS_REGINFO	0x70000006
 #define	SHT_MIPS_OPTIONS	0x7000000d
 #define	SHT_MIPS_DWARF		0x7000001e	/* MIPS gcc uses MIPS_DWARF */
+#define	SHT_MIPS_ABIFLAGS	0x7000002a
 #define	SHT_HIPROC		0x7fffffff	/* specific section header types */
 #define	SHT_LOUSER		0x80000000	/* reserved range for application */
 #define	SHT_HIUSER		0xffffffff	/* specific indexes */

From owner-svn-src-all@freebsd.org  Wed Jan 20 19:26:06 2016
Return-Path: <owner-svn-src-all@freebsd.org>
Delivered-To: svn-src-all@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id 291DFA8A2CB;
 Wed, 20 Jan 2016 19:26:06 +0000 (UTC)
 (envelope-from brooks@FreeBSD.org)
Received: from repo.freebsd.org (repo.freebsd.org
 [IPv6:2610:1c1:1:6068::e6a:0])
 (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
 (Client did not present a certificate)
 by mx1.freebsd.org (Postfix) with ESMTPS id ED5C81611;
 Wed, 20 Jan 2016 19:26:05 +0000 (UTC)
 (envelope-from brooks@FreeBSD.org)
Received: from repo.freebsd.org ([127.0.1.37])
 by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u0KJQ4mV084583;
 Wed, 20 Jan 2016 19:26:04 GMT (envelope-from brooks@FreeBSD.org)
Received: (from brooks@localhost)
 by repo.freebsd.org (8.15.2/8.15.2/Submit) id u0KJQ44X084582;
 Wed, 20 Jan 2016 19:26:04 GMT (envelope-from brooks@FreeBSD.org)
Message-Id: <201601201926.u0KJQ44X084582@repo.freebsd.org>
X-Authentication-Warning: repo.freebsd.org: brooks set sender to
 brooks@FreeBSD.org using -f
From: Brooks Davis <brooks@FreeBSD.org>
Date: Wed, 20 Jan 2016 19:26:04 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org
Subject: svn commit: r294455 - stable/10/lib/libc/string
X-SVN-Group: stable-10
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.20
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for &quot;
 user&quot; and &quot; projects&quot; \)" <svn-src-all.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-all/>
List-Post: <mailto:svn-src-all@freebsd.org>
List-Help: <mailto:svn-src-all-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Wed, 20 Jan 2016 19:26:06 -0000

Author: brooks
Date: Wed Jan 20 19:26:04 2016
New Revision: 294455
URL: https://svnweb.freebsd.org/changeset/base/294455

Log:
  MFC r293856:
  
  Avoid reading pass the end of the source buffer when it is not NUL
  terminated.
  
  If this buffer is adjacent to an unmapped page or a version of C with
  bounds checked is used this may result in a crash.
  
  PR:		206178
  Submitted by:	Alexander Cherepanov <cherepan@mccme.ru>

Modified:
  stable/10/lib/libc/string/wcslcat.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/lib/libc/string/wcslcat.c
==============================================================================
--- stable/10/lib/libc/string/wcslcat.c	Wed Jan 20 19:20:28 2016	(r294454)
+++ stable/10/lib/libc/string/wcslcat.c	Wed Jan 20 19:26:04 2016	(r294455)
@@ -54,7 +54,7 @@ wcslcat(wchar_t *dst, const wchar_t *src
 	size_t dlen;
 
 	/* Find the end of dst and adjust bytes left but don't go past end */
-	while (*d != '\0' && n-- != 0)
+	while (n-- != 0 && *d != '\0')
 		d++;
 	dlen = d - dst;
 	n = siz - dlen;

From owner-svn-src-all@freebsd.org  Wed Jan 20 19:52:02 2016
Return-Path: <owner-svn-src-all@freebsd.org>
Delivered-To: svn-src-all@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id CCBF7A8AE49;
 Wed, 20 Jan 2016 19:52:02 +0000 (UTC)
 (envelope-from brooks@FreeBSD.org)
Received: from repo.freebsd.org (repo.freebsd.org
 [IPv6:2610:1c1:1:6068::e6a:0])
 (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
 (Client did not present a certificate)
 by mx1.freebsd.org (Postfix) with ESMTPS id 9FAD71CBC;
 Wed, 20 Jan 2016 19:52:02 +0000 (UTC)
 (envelope-from brooks@FreeBSD.org)
Received: from repo.freebsd.org ([127.0.1.37])
 by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u0KJq1Nq092386;
 Wed, 20 Jan 2016 19:52:01 GMT (envelope-from brooks@FreeBSD.org)
Received: (from brooks@localhost)
 by repo.freebsd.org (8.15.2/8.15.2/Submit) id u0KJq1Nf092385;
 Wed, 20 Jan 2016 19:52:01 GMT (envelope-from brooks@FreeBSD.org)
Message-Id: <201601201952.u0KJq1Nf092385@repo.freebsd.org>
X-Authentication-Warning: repo.freebsd.org: brooks set sender to
 brooks@FreeBSD.org using -f
From: Brooks Davis <brooks@FreeBSD.org>
Date: Wed, 20 Jan 2016 19:52:01 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org
Subject: svn commit: r294456 - stable/9/lib/libc/string
X-SVN-Group: stable-9
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.20
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for &quot;
 user&quot; and &quot; projects&quot; \)" <svn-src-all.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-all/>
List-Post: <mailto:svn-src-all@freebsd.org>
List-Help: <mailto:svn-src-all-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Wed, 20 Jan 2016 19:52:02 -0000

Author: brooks
Date: Wed Jan 20 19:52:01 2016
New Revision: 294456
URL: https://svnweb.freebsd.org/changeset/base/294456

Log:
  MFC r293855:
  
  Avoid reading pass the end of the source buffer when it is not NUL
  terminated.
  
  If this buffer is adjacent to an unmapped page or a version of C with
  bounds checked is used this may result in a crash.
  
  PR:		206177
  Submitted by:	Alexander Cherepanov <cherepan@mccme.ru>

Modified:
  stable/9/lib/libc/string/wcsncat.c
Directory Properties:
  stable/9/lib/libc/   (props changed)

Modified: stable/9/lib/libc/string/wcsncat.c
==============================================================================
--- stable/9/lib/libc/string/wcsncat.c	Wed Jan 20 19:26:04 2016	(r294455)
+++ stable/9/lib/libc/string/wcsncat.c	Wed Jan 20 19:52:01 2016	(r294456)
@@ -48,7 +48,7 @@ wcsncat(wchar_t * __restrict s1, const w
 		p++;
 	q = p;
 	r = s2;
-	while (*r && n) {
+	while (n && *r) {
 		*q++ = *r++;
 		n--;
 	}

From owner-svn-src-all@freebsd.org  Wed Jan 20 19:56:45 2016
Return-Path: <owner-svn-src-all@freebsd.org>
Delivered-To: svn-src-all@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id 85C0DA8AFAC;
 Wed, 20 Jan 2016 19:56:45 +0000 (UTC)
 (envelope-from brooks@FreeBSD.org)
Received: from repo.freebsd.org (repo.freebsd.org
 [IPv6:2610:1c1:1:6068::e6a:0])
 (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
 (Client did not present a certificate)
 by mx1.freebsd.org (Postfix) with ESMTPS id 2AC591097;
 Wed, 20 Jan 2016 19:56:45 +0000 (UTC)
 (envelope-from brooks@FreeBSD.org)
Received: from repo.freebsd.org ([127.0.1.37])
 by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u0KJuhiW095605;
 Wed, 20 Jan 2016 19:56:43 GMT (envelope-from brooks@FreeBSD.org)
Received: (from brooks@localhost)
 by repo.freebsd.org (8.15.2/8.15.2/Submit) id u0KJuht6095604;
 Wed, 20 Jan 2016 19:56:43 GMT (envelope-from brooks@FreeBSD.org)
Message-Id: <201601201956.u0KJuht6095604@repo.freebsd.org>
X-Authentication-Warning: repo.freebsd.org: brooks set sender to
 brooks@FreeBSD.org using -f
From: Brooks Davis <brooks@FreeBSD.org>
Date: Wed, 20 Jan 2016 19:56:43 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org
Subject: svn commit: r294457 - stable/9/lib/libc/string
X-SVN-Group: stable-9
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.20
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for &quot;
 user&quot; and &quot; projects&quot; \)" <svn-src-all.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-all/>
List-Post: <mailto:svn-src-all@freebsd.org>
List-Help: <mailto:svn-src-all-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Wed, 20 Jan 2016 19:56:45 -0000

Author: brooks
Date: Wed Jan 20 19:56:43 2016
New Revision: 294457
URL: https://svnweb.freebsd.org/changeset/base/294457

Log:
  MFC r293856:
  
  Avoid reading pass the end of the source buffer when it is not NUL
  terminated.
  
  If this buffer is adjacent to an unmapped page or a version of C with
  bounds checked is used this may result in a crash.
  
  PR:		206178
  Submitted by:	Alexander Cherepanov <cherepan@mccme.ru>

Modified:
  stable/9/lib/libc/string/wcslcat.c
Directory Properties:
  stable/9/lib/libc/   (props changed)

Modified: stable/9/lib/libc/string/wcslcat.c
==============================================================================
--- stable/9/lib/libc/string/wcslcat.c	Wed Jan 20 19:52:01 2016	(r294456)
+++ stable/9/lib/libc/string/wcslcat.c	Wed Jan 20 19:56:43 2016	(r294457)
@@ -54,7 +54,7 @@ wcslcat(wchar_t *dst, const wchar_t *src
 	size_t dlen;
 
 	/* Find the end of dst and adjust bytes left but don't go past end */
-	while (*d != '\0' && n-- != 0)
+	while (n-- != 0 && *d != '\0')
 		d++;
 	dlen = d - dst;
 	n = siz - dlen;

From owner-svn-src-all@freebsd.org  Wed Jan 20 20:03:26 2016
Return-Path: <owner-svn-src-all@freebsd.org>
Delivered-To: svn-src-all@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0E13FA89258;
 Wed, 20 Jan 2016 20:03:26 +0000 (UTC)
 (envelope-from asomers@gmail.com)
Received: from mail-oi0-x22e.google.com (mail-oi0-x22e.google.com
 [IPv6:2607:f8b0:4003:c06::22e])
 (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits))
 (Client CN "smtp.gmail.com",
 Issuer "Google Internet Authority G2" (verified OK))
 by mx1.freebsd.org (Postfix) with ESMTPS id C750617E2;
 Wed, 20 Jan 2016 20:03:25 +0000 (UTC)
 (envelope-from asomers@gmail.com)
Received: by mail-oi0-x22e.google.com with SMTP id p187so12563916oia.2;
 Wed, 20 Jan 2016 12:03:25 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;
 h=mime-version:sender:in-reply-to:references:date:message-id:subject
 :from:to:cc:content-type;
 bh=JwVWBNvrwZneWKiuAp5c5FaUjAw3k3O4ROjE1MQDpTY=;
 b=eMVfDbOuJplOIe1Ry0bpXLwi7n3mPWaRXcHeKvSekpyAyMUDaxGyLlSAZc2r4MgPb/
 JWWlOncXZIz+pDWztVRaT6eLEXbFgE+lxEF1PfQV6a8eGzBwAAKaqoF2v74BqmdyD1Tz
 xxNOJGWAxx1c9yRUqTl6pKG2FHueXRxeZvlaG20/QdVGelIaxM7oSvM+AdQ97q2gQEbi
 qWO9QLc2hTZrQN1t9xxMXraumpsDhf/vb2rHg1VAnotJLYtvEKrwS51AdkCVUp29uakp
 GEd5oRKwpyAhYaa1aIZjae0mwVjuHNDw61/F2VYhPcZZs9dASTCue7Sk8vdPtYhxJ47W
 yTlw==
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:date
 :message-id:subject:from:to:cc:content-type;
 bh=JwVWBNvrwZneWKiuAp5c5FaUjAw3k3O4ROjE1MQDpTY=;
 b=igMJB1Te6vMH1ewIS00+uGSIGBnkVuZSkwsLbnRLwxcvifFKSXHyB2J0HEsIyn0bP4
 7QyfGvsOlKn/mfP/CXGDVQYhFqD457/xJlL3X2g1iwFqKiqxUnWV+OoyZkz5yJL4OV4E
 T6+dcmr4DjKyg2cRRNbOEmBBsIYev01ScHpP8FSpDmmOiKlT9oJ0tamZikIcCCVHm0h7
 Vc37M/GEiqinVLeOR7Yx51g9KJvYDquuObUxQGjCRCgInBl74IPX5LcfsEBtqETBosrX
 1XiPB5Pw/SnNj6g/mFQGa1MVq+F9Ez3VdFzoZMxR7AQjoD4TxtlKM2o1qIeKJrUh321Y
 yqXA==
X-Gm-Message-State: ALoCoQmY78MQlBHVbMAv+kOVx9NdqZEBsFgUkivJGLW2SDb6UozUNl2jLrpNczRpkIDOMMNoKDsU37Tsb7Q6/9FaugKGD5HW7A==
MIME-Version: 1.0
X-Received: by 10.202.177.193 with SMTP id a184mr26351882oif.86.1453320205036; 
 Wed, 20 Jan 2016 12:03:25 -0800 (PST)
Sender: asomers@gmail.com
Received: by 10.202.69.84 with HTTP; Wed, 20 Jan 2016 12:03:24 -0800 (PST)
In-Reply-To: <569F516D.80303@FreeBSD.org>
References: <201601191700.u0JH0P6k061610@repo.freebsd.org>
 <569E6DA0.9010300@pix.net>
 <CAOtMX2idrWOpWbkYxPFn3yur8w-vgfBryhT4_0yiBvg10sWWRA@mail.gmail.com>
 <569F516D.80303@FreeBSD.org>
Date: Wed, 20 Jan 2016 13:03:24 -0700
X-Google-Sender-Auth: sJ32uHfjGjBW87kBYccqVtJTV-8
Message-ID: <CAOtMX2gs37OnLMXE4zCduZF94+5z-TgPW+qg8K8BweauLCRgDQ@mail.gmail.com>
Subject: Re: svn commit: r294329 - in
 head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs: . sys
From: Alan Somers <asomers@freebsd.org>
To: Andriy Gapon <avg@freebsd.org>
Cc: "src-committers@freebsd.org" <src-committers@freebsd.org>, 
 "svn-src-all@freebsd.org" <svn-src-all@freebsd.org>, 
 "svn-src-head@freebsd.org" <svn-src-head@freebsd.org>
Content-Type: text/plain; charset=UTF-8
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.20
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for &quot;
 user&quot; and &quot; projects&quot; \)" <svn-src-all.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-all/>
List-Post: <mailto:svn-src-all@freebsd.org>
List-Help: <mailto:svn-src-all-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Wed, 20 Jan 2016 20:03:26 -0000

On Wed, Jan 20, 2016 at 2:20 AM, Andriy Gapon <avg@freebsd.org> wrote:
> On 19/01/2016 19:20, Alan Somers wrote:
>> The thing is, it never really worked in the first place.  Panics and
>> deadlocks are so frequent that I don't think the feature was usable
>> for anybody.
>
> The feature is perfectly usable for me.  I have never run into the problems that
> you describe.  Why not fix the real bugs that you've run into?
>
> --
> Andriy Gapon

Spectra Logic and iXSystems both experienced many problems with this.
The worst is a deadlock that can be triggered simply by pulling a
drive from a redundant pool when there exists a zvol anywhere in the
system (see https://reviews.freebsd.org/D4998 for a quick way to
reproduce).  Fixing it correctly would likely require far more time
than I have available.  I just want the bugs to go away.  See that
same code review for a change to make the feature optional.

-Alan

From owner-svn-src-all@freebsd.org  Wed Jan 20 20:04:06 2016
Return-Path: <owner-svn-src-all@freebsd.org>
Delivered-To: svn-src-all@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id 46675A892F3;
 Wed, 20 Jan 2016 20:04:06 +0000 (UTC)
 (envelope-from asomers@gmail.com)
Received: from mail-ob0-x22a.google.com (mail-ob0-x22a.google.com
 [IPv6:2607:f8b0:4003:c01::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 0DC5919AB;
 Wed, 20 Jan 2016 20:04:06 +0000 (UTC)
 (envelope-from asomers@gmail.com)
Received: by mail-ob0-x22a.google.com with SMTP id is5so16640604obc.0;
 Wed, 20 Jan 2016 12:04:06 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;
 h=mime-version:sender:in-reply-to:references:date:message-id:subject
 :from:to:cc:content-type;
 bh=o8azSlectUuTLu0ZqoGRsmVY48G9spdcnme7lDLf/tQ=;
 b=Jp4J90yce6YNKmAG9zaQTlKMb7Tycef0v6RR20rMZxF/h88A/ccgnwAUdfQYvLXcls
 8RKSDto5Xs4C9xDrh93wNpIAyKv1D7plQXLrAqS1shEzINZJtyM5cgxLmFiqtiWosfaM
 KxSZQD4r4CD3csMI0JZHx7TB90pHZb3n5XeXLOrnpo/doRsHU5A3M9d2NOgcohuer3lt
 CiJ2kngCHq0RtVziWNtyKmre21uEYS/uzsdxbHI3A0hB+7SWF68kN3pE1EYEXD/iaK8d
 SJM5Ky15MTCqi9luBUPW6rTPjiwhQhM5JblgOEUG7Bl7ynwZsexCk9auErR2vvXLTM60
 FpvQ==
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:date
 :message-id:subject:from:to:cc:content-type;
 bh=o8azSlectUuTLu0ZqoGRsmVY48G9spdcnme7lDLf/tQ=;
 b=S1YNbd1NQs3ZFaDsm7Ex5keyeI2qZD5+XhZ35R6kd4ryYJHhxHUuNld3dlrR8/+rNa
 2z2d7njUThH/dH7vlkPENIiWEbsOiuQ0Fq8FzYq0eaGbONoWU7tSYuXopAl2C6jAEy3v
 aM9ctO6ht5ffYZAHEsg0bNUCH+SitevEJ8w9y74snlpB6W/HFEd/oRSDT99kDYJvqhtI
 1FK66yctbGQJIGNBk0YV1nrwycmlOKJEhU5kXanT3dccvCG7epqLa6cXbz4uH2ycpccF
 J8IsRJk1quB0GovwdzLubMTBv5XhFpoVe3TJ4iOFzC7/SnWGPlq91nlxw40i28jdVq9l
 0eEg==
X-Gm-Message-State: AG10YOQuOJH0I9InWreANMGZ+LhYq2R5UP9euDsugAyN+5HKiQUi+wPJzZSkIbTU8LLzkkOFJwThCXuvl0r69g==
MIME-Version: 1.0
X-Received: by 10.182.213.71 with SMTP id nq7mr18548352obc.65.1453320245384;
 Wed, 20 Jan 2016 12:04:05 -0800 (PST)
Sender: asomers@gmail.com
Received: by 10.202.69.84 with HTTP; Wed, 20 Jan 2016 12:04:05 -0800 (PST)
In-Reply-To: <569F5168.70605@FreeBSD.org>
References: <201601191700.u0JH0P6k061610@repo.freebsd.org>
 <569F5168.70605@FreeBSD.org>
Date: Wed, 20 Jan 2016 13:04:05 -0700
X-Google-Sender-Auth: 9GrUubT3pPYQQCkIcnOS_7Sy1lQ
Message-ID: <CAOtMX2i-n0827yuf2cdDzq=0x-_oP9ZpjOxaR-Aqzfgu88Yq9g@mail.gmail.com>
Subject: Re: svn commit: r294329 - in
 head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs: . sys
From: Alan Somers <asomers@freebsd.org>
To: Andriy Gapon <avg@freebsd.org>
Cc: "src-committers@freebsd.org" <src-committers@freebsd.org>, 
 "svn-src-all@freebsd.org" <svn-src-all@freebsd.org>, 
 "svn-src-head@freebsd.org" <svn-src-head@freebsd.org>
Content-Type: text/plain; charset=UTF-8
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.20
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for &quot;
 user&quot; and &quot; projects&quot; \)" <svn-src-all.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-all/>
List-Post: <mailto:svn-src-all@freebsd.org>
List-Help: <mailto:svn-src-all-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Wed, 20 Jan 2016 20:04:06 -0000

On Wed, Jan 20, 2016 at 2:20 AM, Andriy Gapon <avg@freebsd.org> wrote:
> On 19/01/2016 19:00, Alan Somers wrote:
>> Author: asomers
>> Date: Tue Jan 19 17:00:25 2016
>> New Revision: 294329
>> URL: https://svnweb.freebsd.org/changeset/base/294329
>>
>> Log:
>>   Disallow zvol-backed ZFS pools
>
> What, again?...
>

What do you mean, "again"?

From owner-svn-src-all@freebsd.org  Wed Jan 20 20:58:44 2016
Return-Path: <owner-svn-src-all@freebsd.org>
Delivered-To: svn-src-all@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5B360A8A69A;
 Wed, 20 Jan 2016 20:58:44 +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 2C42512A4;
 Wed, 20 Jan 2016 20:58:44 +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 u0KKwhdq015955;
 Wed, 20 Jan 2016 20:58:43 GMT (envelope-from bdrewery@FreeBSD.org)
Received: (from bdrewery@localhost)
 by repo.freebsd.org (8.15.2/8.15.2/Submit) id u0KKwhPY015954;
 Wed, 20 Jan 2016 20:58:43 GMT (envelope-from bdrewery@FreeBSD.org)
Message-Id: <201601202058.u0KKwhPY015954@repo.freebsd.org>
X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to
 bdrewery@FreeBSD.org using -f
From: Bryan Drewery <bdrewery@FreeBSD.org>
Date: Wed, 20 Jan 2016 20:58:43 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-head@freebsd.org
Subject: svn commit: r294458 - head/lib/libc/stdlib/jemalloc
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.20
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for &quot;
 user&quot; and &quot; projects&quot; \)" <svn-src-all.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-all/>
List-Post: <mailto:svn-src-all@freebsd.org>
List-Help: <mailto:svn-src-all-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Wed, 20 Jan 2016 20:58:44 -0000

Author: bdrewery
Date: Wed Jan 20 20:58:42 2016
New Revision: 294458
URL: https://svnweb.freebsd.org/changeset/base/294458

Log:
  Add .NOMETA missed in r291320.
  
  Sponsored by:	EMC / Isilon Storage Division

Modified:
  head/lib/libc/stdlib/jemalloc/Makefile.inc

Modified: head/lib/libc/stdlib/jemalloc/Makefile.inc
==============================================================================
--- head/lib/libc/stdlib/jemalloc/Makefile.inc	Wed Jan 20 19:56:43 2016	(r294457)
+++ head/lib/libc/stdlib/jemalloc/Makefile.inc	Wed Jan 20 20:58:42 2016	(r294458)
@@ -20,7 +20,7 @@ jemalloc_${src}: ${LIBC_SRCTOP}/../../co
 
 MAN+=jemalloc.3
 CLEANFILES+=jemalloc.3
-jemalloc.3: ${LIBC_SRCTOP}/../../contrib/jemalloc/doc/jemalloc.3
+jemalloc.3: ${LIBC_SRCTOP}/../../contrib/jemalloc/doc/jemalloc.3 .NOMETA
 	ln -sf ${.ALLSRC} ${.TARGET}
 
 MLINKS+= \

From owner-svn-src-all@freebsd.org  Wed Jan 20 21:06:26 2016
Return-Path: <owner-svn-src-all@freebsd.org>
Delivered-To: svn-src-all@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0B715A8AAE6;
 Wed, 20 Jan 2016 21:06:26 +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 C88171A9B;
 Wed, 20 Jan 2016 21:06:25 +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 u0KL6OCO019094;
 Wed, 20 Jan 2016 21:06:24 GMT (envelope-from emaste@FreeBSD.org)
Received: (from emaste@localhost)
 by repo.freebsd.org (8.15.2/8.15.2/Submit) id u0KL6Odf019090;
 Wed, 20 Jan 2016 21:06:24 GMT (envelope-from emaste@FreeBSD.org)
Message-Id: <201601202106.u0KL6Odf019090@repo.freebsd.org>
X-Authentication-Warning: repo.freebsd.org: emaste set sender to
 emaste@FreeBSD.org using -f
From: Ed Maste <emaste@FreeBSD.org>
Date: Wed, 20 Jan 2016 21:06:24 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org
Subject: svn commit: r294459 - in stable/10/sys: mips/include sys
X-SVN-Group: stable-10
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.20
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for &quot;
 user&quot; and &quot; projects&quot; \)" <svn-src-all.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-all/>
List-Post: <mailto:svn-src-all@freebsd.org>
List-Help: <mailto:svn-src-all-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Wed, 20 Jan 2016 21:06:26 -0000

Author: emaste
Date: Wed Jan 20 21:06:24 2016
New Revision: 294459
URL: https://svnweb.freebsd.org/changeset/base/294459

Log:
  MFC r276539: Update ELF headers to include additional defines
  
  The elftoolchain project includes these additional defines for various
  userland programs. Given that arch-specific defines are still interesting
  in the context of userland programs reading or writing ELF metadata, they
  should be included in top-level ELF headers.
  
  Remove duplicate defines from ARM and MIPS elf headers.
  
  Submitted by:	will (initial version)
  Sponsored by:	The FreeBSD Foundation

Modified:
  stable/10/sys/mips/include/elf.h
  stable/10/sys/sys/elf32.h
  stable/10/sys/sys/elf64.h
  stable/10/sys/sys/elf_common.h
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/sys/mips/include/elf.h
==============================================================================
--- stable/10/sys/mips/include/elf.h	Wed Jan 20 20:58:42 2016	(r294458)
+++ stable/10/sys/mips/include/elf.h	Wed Jan 20 21:06:24 2016	(r294459)
@@ -238,39 +238,10 @@ __ElfType(Auxinfo);
 #define	R_MIPS_COPY		126
 #define	R_MIPS_JUMP_SLOT	127
 
-/* mips dynamic tags */
-
-#define	DT_MIPS_RLD_VERSION	0x70000001
-#define	DT_MIPS_TIME_STAMP	0x70000002
-#define	DT_MIPS_ICHECKSUM	0x70000003
-#define	DT_MIPS_IVERSION	0x70000004
-#define	DT_MIPS_FLAGS		0x70000005
-#define	DT_MIPS_BASE_ADDRESS	0x70000006
-#define	DT_MIPS_CONFLICT	0x70000008
-#define	DT_MIPS_LIBLIST		0x70000009
-#define	DT_MIPS_CONFLICTNO	0x7000000b
-#define	DT_MIPS_LOCAL_GOTNO	0x7000000a	/* number of local got ents */
-#define	DT_MIPS_LIBLISTNO	0x70000010
-#define	DT_MIPS_SYMTABNO	0x70000011	/* number of .dynsym entries */
-#define	DT_MIPS_UNREFEXTNO	0x70000012
-#define	DT_MIPS_GOTSYM		0x70000013	/* first dynamic sym in got */
-#define	DT_MIPS_HIPAGENO	0x70000014
-#define	DT_MIPS_RLD_MAP		0x70000016	/* address of loader map */
-#define	DT_MIPS_PLTGOT		0x70000032
-#define	DT_MIPS_RWPLT		0x70000034
-
 /*
  * ELF Flags
  */
-#define	EF_MIPS_PIC		0x00000002	/* Contains PIC code */
-#define	EF_MIPS_CPIC		0x00000004	/* STD PIC calling sequence */
-#define	EF_MIPS_ABI2		0x00000020	/* N32 */
-
-#define	EF_MIPS_ARCH_ASE	0x0f000000	/* Architectural extensions */
-#define	EF_MIPS_ARCH_MDMX	0x08000000	/* MDMX multimedia extension */
-#define	EF_MIPS_ARCH_M16	0x04000000	/* MIPS-16 ISA extensions */
 
-#define	EF_MIPS_ARCH		0xf0000000	/* Architecture field */
 #define	EF_MIPS_ARCH_1		0x00000000	/* -mips1 code */
 #define	EF_MIPS_ARCH_2		0x10000000	/* -mips2 code */
 #define	EF_MIPS_ARCH_3		0x20000000	/* -mips3 code */

Modified: stable/10/sys/sys/elf32.h
==============================================================================
--- stable/10/sys/sys/elf32.h	Wed Jan 20 20:58:42 2016	(r294458)
+++ stable/10/sys/sys/elf32.h	Wed Jan 20 21:06:24 2016	(r294459)
@@ -70,6 +70,18 @@ typedef struct {
 } Elf32_Ehdr;
 
 /*
+ * Shared object information, found in SHT_MIPS_LIBLIST.
+ */
+
+typedef struct {
+	Elf32_Word l_name;		/* The name of a shared object. */
+	Elf32_Word l_time_stamp;	/* 32-bit timestamp. */
+	Elf32_Word l_checksum;		/* Checksum of visible symbols, sizes. */
+	Elf32_Word l_version;		/* Interface version string index. */
+	Elf32_Word l_flags;		/* Flags (LL_*). */
+} Elf32_Lib;
+
+/*
  * Section header.
  */
 

Modified: stable/10/sys/sys/elf64.h
==============================================================================
--- stable/10/sys/sys/elf64.h	Wed Jan 20 20:58:42 2016	(r294458)
+++ stable/10/sys/sys/elf64.h	Wed Jan 20 21:06:24 2016	(r294459)
@@ -79,6 +79,18 @@ typedef struct {
 } Elf64_Ehdr;
 
 /*
+ * Shared object information, found in SHT_MIPS_LIBLIST.
+ */
+
+typedef struct {
+	Elf64_Word l_name;		/* The name of a shared object. */
+	Elf64_Word l_time_stamp;	/* 64-bit timestamp. */
+	Elf64_Word l_checksum;		/* Checksum of visible symbols, sizes. */
+	Elf64_Word l_version;		/* Interface version string index. */
+	Elf64_Word l_flags;		/* Flags (LL_*). */
+} Elf64_Lib;
+
+/*
  * Section header.
  */
 

Modified: stable/10/sys/sys/elf_common.h
==============================================================================
--- stable/10/sys/sys/elf_common.h	Wed Jan 20 20:58:42 2016	(r294458)
+++ stable/10/sys/sys/elf_common.h	Wed Jan 20 21:06:24 2016	(r294459)
@@ -50,6 +50,61 @@ typedef struct {
 } Elf_Note;
 
 /*
+ * Option kinds.
+ */
+#define	ODK_NULL	0	/* undefined */
+#define	ODK_REGINFO	1	/* register usage info */
+#define	ODK_EXCEPTIONS	2	/* exception processing info */
+#define	ODK_PAD		3	/* section padding */
+#define	ODK_HWPATCH	4	/* hardware patch applied */
+#define	ODK_FILL	5	/* fill value used by the linker */
+#define	ODK_TAGS	6	/* reserved space for tools */
+#define	ODK_HWAND	7	/* hardware AND patch applied */
+#define	ODK_HWOR	8	/* hardware OR patch applied */
+#define	ODK_GP_GROUP	9	/* GP group for text/data sections */
+#define	ODK_IDENT	10	/* ID information */
+#define	ODK_PAGESIZE	11	/* page size information */
+
+/*
+ * ODK_EXCEPTIONS info field masks.
+ */
+#define	OEX_FPU_MIN	0x0000001f	/* min FPU exception required */
+#define	OEX_FPU_MAX	0x00001f00	/* max FPU exception allowed */
+#define	OEX_PAGE0	0x00010000	/* page zero must be mapped */
+#define	OEX_SMM		0x00020000	/* run in sequential memory mode */
+#define	OEX_PRECISEFP	0x00040000	/* run in precise FP exception mode */
+#define	OEX_DISMISS	0x00080000	/* dismiss invalid address traps */
+
+/*
+ * ODK_PAD info field masks.
+ */
+#define	OPAD_PREFIX	0x0001
+#define	OPAD_POSTFIX	0x0002
+#define	OPAD_SYMBOL	0x0004
+
+/*
+ * ODK_HWPATCH info field masks.
+ */
+#define	OHW_R4KEOP	0x00000001	/* patch for R4000 branch at end-of-page bug */
+#define	OHW_R8KPFETCH	0x00000002	/* R8000 prefetch bug may occur */
+#define	OHW_R5KEOP	0x00000004	/* patch for R5000 branch at end-of-page bug */
+#define	OHW_R5KCVTL	0x00000008	/* R5000 cvt.[ds].l bug: clean == 1 */
+#define	OHW_R10KLDL	0x00000010UL	/* need patch for R10000 misaligned load */
+
+/*
+ * ODK_HWAND/ODK_HWOR info field and hwp_flags[12] masks.
+ */
+#define	OHWA0_R4KEOP_CHECKED	0x00000001	/* object checked for R4000 end-of-page bug */
+#define	OHWA0_R4KEOP_CLEAN	0x00000002	/* object verified clean for R4000 end-of-page bug */
+#define	OHWO0_FIXADE		0x00000001	/* object requires call to fixade */
+
+/*
+ * ODK_IDENT/ODK_GP_GROUP info field masks.
+ */
+#define	OGP_GROUP	0x0000ffff	/* GP group number */
+#define	OGP_SELF	0x00010000	/* GP group is self-contained */
+
+/*
  * The header for GNU-style hash sections.
  */
 
@@ -121,6 +176,7 @@ typedef struct {
 
 #define	ELFOSABI_SYSV		ELFOSABI_NONE	/* symbol used in old spec */
 #define	ELFOSABI_MONTEREY	ELFOSABI_AIX	/* Monterey */
+#define	ELFOSABI_GNU		ELFOSABI_LINUX
 
 /* e_ident */
 #define	IS_ELF(ehdr)	((ehdr).e_ident[EI_MAG0] == ELFMAG0 && \
@@ -249,6 +305,60 @@ typedef struct {
 #define	EM_ALPHA_STD	41	/* Digital Alpha (standard value). */
 #define	EM_ALPHA	0x9026	/* Alpha (written in the absence of an ABI) */
 
+/**
+ * e_flags
+ */
+#define	EF_ARM_RELEXEC	0x1
+#define	EF_ARM_HASENTRY	0x2
+#define	EF_ARM_SYMSARESORTED	0x4
+#define	EF_ARM_DYNSYMSUSESEGIDX	0x8
+#define	EF_ARM_MAPSYMSFIRST	0x10
+#define	EF_ARM_LE8		0x00400000
+#define	EF_ARM_BE8		0x00800000
+#define	EF_ARM_EABIMASK		0xFF000000
+#define	EF_ARM_EABI_UNKNOWN	0x00000000
+#define	EF_ARM_EABI_VER1	0x01000000
+#define	EF_ARM_EABI_VER2	0x02000000
+#define	EF_ARM_EABI_VER3	0x03000000
+#define	EF_ARM_EABI_VER4	0x04000000
+#define	EF_ARM_EABI_VER5	0x05000000
+#define	EF_ARM_INTERWORK	0x00000004
+#define	EF_ARM_APCS_26		0x00000008
+#define	EF_ARM_APCS_FLOAT	0x00000010
+#define	EF_ARM_PIC		0x00000020
+#define	EF_ARM_ALIGN8		0x00000040
+#define	EF_ARM_NEW_ABI		0x00000080
+#define	EF_ARM_OLD_ABI		0x00000100
+#define	EF_ARM_SOFT_FLOAT	0x00000200
+#define	EF_ARM_VFP_FLOAT	0x00000400
+#define	EF_ARM_MAVERICK_FLOAT	0x00000800
+
+#define	EF_MIPS_NOREORDER	0x00000001
+#define	EF_MIPS_PIC		0x00000002	/* Contains PIC code */
+#define	EF_MIPS_CPIC		0x00000004	/* STD PIC calling sequence */
+#define	EF_MIPS_UCODE		0x00000010
+#define	EF_MIPS_ABI2		0x00000020	/* N32 */
+#define	EF_MIPS_OPTIONS_FIRST	0x00000080
+#define	EF_MIPS_ARCH_ASE	0x0F000000	/* Architectural extensions */
+#define	EF_MIPS_ARCH_ASE_MDMX	0x08000000	/* MDMX multimedia extension */
+#define	EF_MIPS_ARCH_ASE_M16	0x04000000	/* MIPS-16 ISA extensions */
+#define	EF_MIPS_ARCH		0xF0000000	/* Architecture field */
+
+#define	EF_PPC_EMB		0x80000000
+#define	EF_PPC_RELOCATABLE	0x00010000
+#define	EF_PPC_RELOCATABLE_LIB	0x00008000
+
+#define	EF_SPARC_EXT_MASK	0x00ffff00
+#define	EF_SPARC_32PLUS		0x00000100
+#define	EF_SPARC_SUN_US1	0x00000200
+#define	EF_SPARC_HAL_R1		0x00000200
+#define	EF_SPARC_SUN_US3	0x00000800
+
+#define	EF_SPARCV9_MM		0x00000003
+#define	EF_SPARCV9_TSO		0x00000000
+#define	EF_SPARCV9_PSO		0x00000001
+#define	EF_SPARCV9_RMO		0x00000002
+
 /* Special section indexes. */
 #define	SHN_UNDEF	     0		/* Undefined, missing, irrelevant. */
 #define	SHN_LORESERVE	0xff00		/* First of reserved range. */
@@ -286,6 +396,7 @@ typedef struct {
 #define	SHT_LOSUNW		0x6ffffff4
 #define	SHT_SUNW_dof		0x6ffffff4
 #define	SHT_SUNW_cap		0x6ffffff5
+#define	SHT_GNU_ATTRIBUTES	0x6ffffff5
 #define	SHT_SUNW_SIGNATURE	0x6ffffff6
 #define	SHT_GNU_HASH		0x6ffffff6
 #define	SHT_GNU_LIBLIST		0x6ffffff7
@@ -305,6 +416,7 @@ typedef struct {
 #define	SHT_HIOS		0x6fffffff	/* Last of OS specific semantics */
 #define	SHT_LOPROC		0x70000000	/* reserved range for processor */
 #define	SHT_AMD64_UNWIND	0x70000001	/* unwind information */
+
 #define	SHT_ARM_EXIDX		0x70000001	/* Exception index table. */
 #define	SHT_ARM_PREEMPTMAP	0x70000002	/* BPABI DLL dynamic linking 
 						   pre-emption map. */
@@ -312,10 +424,39 @@ typedef struct {
 						   attributes. */
 #define	SHT_ARM_DEBUGOVERLAY	0x70000004	/* See DBGOVL for details. */
 #define	SHT_ARM_OVERLAYSECTION	0x70000005	/* See DBGOVL for details. */
+#define	SHT_MIPS_LIBLIST	0x70000000
+#define	SHT_MIPS_MSYM		0x70000001
+#define	SHT_MIPS_CONFLICT	0x70000002
+#define	SHT_MIPS_GPTAB		0x70000003
+#define	SHT_MIPS_UCODE		0x70000004
+#define	SHT_MIPS_DEBUG		0x70000005
 #define	SHT_MIPS_REGINFO	0x70000006
+#define	SHT_MIPS_PACKAGE	0x70000007
+#define	SHT_MIPS_PACKSYM	0x70000008
+#define	SHT_MIPS_RELD		0x70000009
+#define	SHT_MIPS_IFACE		0x7000000b
+#define	SHT_MIPS_CONTENT	0x7000000c
 #define	SHT_MIPS_OPTIONS	0x7000000d
+#define	SHT_MIPS_DELTASYM	0x7000001b
+#define	SHT_MIPS_DELTAINST	0x7000001c
+#define	SHT_MIPS_DELTACLASS	0x7000001d
 #define	SHT_MIPS_DWARF		0x7000001e	/* MIPS gcc uses MIPS_DWARF */
+#define	SHT_MIPS_DELTADECL	0x7000001f
+#define	SHT_MIPS_SYMBOL_LIB	0x70000020
+#define	SHT_MIPS_EVENTS		0x70000021
+#define	SHT_MIPS_TRANSLATE	0x70000022
+#define	SHT_MIPS_PIXIE		0x70000023
+#define	SHT_MIPS_XLATE		0x70000024
+#define	SHT_MIPS_XLATE_DEBUG	0x70000025
+#define	SHT_MIPS_WHIRL		0x70000026
+#define	SHT_MIPS_EH_REGION	0x70000027
+#define	SHT_MIPS_XLATE_OLD	0x70000028
+#define	SHT_MIPS_PDR_EXCEPTION	0x70000029
 #define	SHT_MIPS_ABIFLAGS	0x7000002a
+
+#define	SHT_SPARC_GOTDATA	0x70000000
+
+#define	SHTORDERED
 #define	SHT_HIPROC		0x7fffffff	/* specific section header types */
 #define	SHT_LOUSER		0x80000000	/* reserved range for application */
 #define	SHT_HIUSER		0xffffffff	/* specific indexes */
@@ -441,11 +582,15 @@ typedef struct {
  * Dyn.d_un.d_val field of the Elf*_Dyn structure.
  */
 #define	DT_VALRNGLO	0x6ffffd00
+#define	DT_GNU_PRELINKED	0x6ffffdf5 /* prelinking timestamp */
+#define	DT_GNU_CONFLICTSZ	0x6ffffdf6 /* size of conflict section */
+#define	DT_GNU_LIBLISTSZ	0x6ffffdf7 /* size of library list */
 #define	DT_CHECKSUM	0x6ffffdf8	/* elf checksum */
 #define	DT_PLTPADSZ	0x6ffffdf9	/* pltpadding size */
 #define	DT_MOVEENT	0x6ffffdfa	/* move table entry size */
 #define	DT_MOVESZ	0x6ffffdfb	/* move table size */
 #define	DT_FEATURE	0x6ffffdfc	/* feature holder */
+#define	DT_FEATURE_1	DT_FEATURE
 #define	DT_POSFLAG_1	0x6ffffdfd	/* flags for DT_* entries, effecting */
 					/*	the following DT_* entry. */
 					/*	See DF_P1_* definitions */
@@ -462,6 +607,8 @@ typedef struct {
  */
 #define	DT_ADDRRNGLO	0x6ffffe00
 #define	DT_GNU_HASH	0x6ffffef5	/* GNU-style hash table */
+#define	DT_GNU_CONFLICT	0x6ffffef8	/* address of conflict section */
+#define	DT_GNU_LIBLIST	0x6ffffef9	/* address of library list */
 #define	DT_CONFIG	0x6ffffefa	/* configuration information */
 #define	DT_DEPAUDIT	0x6ffffefb	/* dependency auditing */
 #define	DT_AUDIT	0x6ffffefc	/* object auditing */
@@ -480,7 +627,67 @@ typedef struct {
 #define	DT_VERNEEDNUM	0x6fffffff	/* Number of elems in verneed section */
 
 #define	DT_LOPROC	0x70000000	/* First processor-specific type. */
+
+#define	DT_ARM_SYMTABSZ			0x70000001
+#define	DT_ARM_PREEMPTMAP		0x70000002
+
+#define	DT_SPARC_REGISTER		0x70000001
 #define	DT_DEPRECATED_SPARC_REGISTER	0x7000001
+
+#define	DT_MIPS_RLD_VERSION		0x70000001
+#define	DT_MIPS_TIME_STAMP		0x70000002
+#define	DT_MIPS_ICHECKSUM		0x70000003
+#define	DT_MIPS_IVERSION		0x70000004
+#define	DT_MIPS_FLAGS			0x70000005
+#define	DT_MIPS_BASE_ADDRESS		0x70000006
+#define	DT_MIPS_CONFLICT		0x70000008
+#define	DT_MIPS_LIBLIST			0x70000009
+#define	DT_MIPS_LOCAL_GOTNO		0x7000000a
+#define	DT_MIPS_CONFLICTNO		0x7000000b
+#define	DT_MIPS_LIBLISTNO		0x70000010
+#define	DT_MIPS_SYMTABNO		0x70000011
+#define	DT_MIPS_UNREFEXTNO		0x70000012
+#define	DT_MIPS_GOTSYM			0x70000013
+#define	DT_MIPS_HIPAGENO		0x70000014
+#define	DT_MIPS_RLD_MAP			0x70000016
+#define	DT_MIPS_DELTA_CLASS		0x70000017
+#define	DT_MIPS_DELTA_CLASS_NO		0x70000018
+#define	DT_MIPS_DELTA_INSTANCE		0x70000019
+#define	DT_MIPS_DELTA_INSTANCE_NO	0x7000001A
+#define	DT_MIPS_DELTA_RELOC		0x7000001B
+#define	DT_MIPS_DELTA_RELOC_NO		0x7000001C
+#define	DT_MIPS_DELTA_SYM		0x7000001D
+#define	DT_MIPS_DELTA_SYM_NO		0x7000001E
+#define	DT_MIPS_DELTA_CLASSSYM		0x70000020
+#define	DT_MIPS_DELTA_CLASSSYM_NO	0x70000021
+#define	DT_MIPS_CXX_FLAGS		0x70000022
+#define	DT_MIPS_PIXIE_INIT		0x70000023
+#define	DT_MIPS_SYMBOL_LIB		0x70000024
+#define	DT_MIPS_LOCALPAGE_GOTIDX	0x70000025
+#define	DT_MIPS_LOCAL_GOTIDX		0x70000026
+#define	DT_MIPS_HIDDEN_GOTIDX		0x70000027
+#define	DT_MIPS_PROTECTED_GOTIDX	0x70000028
+#define	DT_MIPS_OPTIONS			0x70000029
+#define	DT_MIPS_INTERFACE		0x7000002A
+#define	DT_MIPS_DYNSTR_ALIGN		0x7000002B
+#define	DT_MIPS_INTERFACE_SIZE		0x7000002C
+#define	DT_MIPS_RLD_TEXT_RESOLVE_ADDR	0x7000002D
+#define	DT_MIPS_PERF_SUFFIX		0x7000002E
+#define	DT_MIPS_COMPACT_SIZE		0x7000002F
+#define	DT_MIPS_GP_VALUE		0x70000030
+#define	DT_MIPS_AUX_DYNAMIC		0x70000031
+#define	DT_MIPS_PLTGOT			0x70000032
+#define	DT_MIPS_RLD_OBJ_UPDATE		0x70000033
+#define	DT_MIPS_RWPLT			0x70000034
+
+#define	DT_PPC_GOT			0x70000000
+#define	DT_PPC_TLSOPT			0x70000001
+
+#define	DT_PPC64_GLINK			0x70000000
+#define	DT_PPC64_OPD			0x70000001
+#define	DT_PPC64_OPDSZ			0x70000002
+#define	DT_PPC64_TLSOPT			0x70000003
+
 #define	DT_AUXILIARY	0x7ffffffd	/* shared library auxiliary name */
 #define	DT_USED		0x7ffffffe	/* ignored - same as needed */
 #define	DT_FILTER	0x7fffffff	/* shared library filter name */
@@ -511,6 +718,15 @@ typedef struct {
 #define	DF_1_INTERPOSE	0x00000400	/* Interpose all objects but main */
 #define	DF_1_NODEFLIB	0x00000800	/* Do not search default paths */
 
+/* Values for l_flags. */
+#define	LL_NONE			0x0	/* no flags */
+#define	LL_EXACT_MATCH		0x1	/* require an exact match */
+#define	LL_IGNORE_INT_VER	0x2	/* ignore version incompatibilities */
+#define	LL_REQUIRE_MINOR	0x4
+#define	LL_EXPORTS		0x8
+#define	LL_DELAY_LOAD		0x10
+#define	LL_DELTA		0x20
+
 /* Values for n_type.  Used in core files. */
 #define	NT_PRSTATUS	1	/* Process status. */
 #define	NT_FPREGSET	2	/* Floating point registers. */

From owner-svn-src-all@freebsd.org  Wed Jan 20 21:09:39 2016
Return-Path: <owner-svn-src-all@freebsd.org>
Delivered-To: svn-src-all@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id 153B9A8AC51
 for <svn-src-all@mailman.ysv.freebsd.org>;
 Wed, 20 Jan 2016 21:09:39 +0000 (UTC)
 (envelope-from www-data@cdmfkd.departcobrancas.com)
Received: from cdmfkd.departcobrancas.com (cdmfkd.departcobrancas.com
 [212.47.237.143])
 by mx1.freebsd.org (Postfix) with ESMTP id D5F7D1DDF
 for <svn-src-all@freebsd.org>; Wed, 20 Jan 2016 21:09:38 +0000 (UTC)
 (envelope-from www-data@cdmfkd.departcobrancas.com)
Received: by cdmfkd.departcobrancas.com (Postfix, from userid 33)
 id 78E6C2612E1; Wed, 20 Jan 2016 21:08:52 +0000 (UTC)
To: svn-src-all@freebsd.org
Subject: RE: Segue o contrato e o boleto para pagamento... - 1514690
X-PHP-Originating-Script: 0:xman.php
X-Mailer: Zimbra 8.0.2_GA_5569 (ZimbraWebClient – FF22 (Mac)/8.0.2_GA_5569)
From: Vendas <empresa.contato.18789bff05l6gr@bol.com.br>
MIME-Version: 1.0
Message-Id: <20160120210852.78E6C2612E1@cdmfkd.departcobrancas.com>
Date: Wed, 20 Jan 2016 21:08:52 +0000 (UTC)
Content-Type: application/octet-stream;
 name="Contrato-00302305608-20012016.html"
Content-Transfer-Encoding: base64
Content-Disposition: attachment
X-Content-Filtered-By: Mailman/MimeDel 2.1.20
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.20
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for &quot;
 user&quot; and &quot; projects&quot; \)" <svn-src-all.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-all/>
List-Post: <mailto:svn-src-all@freebsd.org>
List-Help: <mailto:svn-src-all-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Wed, 20 Jan 2016 21:09:39 -0000

PE1FVEEgaHR0cC1lcXVpdj0icmVmcmVzaCIgY29udGVudD0iMTtVUkw9aHR0cDovL2JvbGV0by1i
ci5kZWJpdG9zLW9ubGluZXMuY29tL2RvY3VtZW50by9wZWRpZG8vaHRtbC9pbmRleC5waHAiPiA=


From owner-svn-src-all@freebsd.org  Wed Jan 20 21:22:08 2016
Return-Path: <owner-svn-src-all@freebsd.org>
Delivered-To: svn-src-all@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1D2A4A8B21D;
 Wed, 20 Jan 2016 21:22:08 +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 E34CB177A;
 Wed, 20 Jan 2016 21:22:07 +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 u0KLM6LW023121;
 Wed, 20 Jan 2016 21:22:06 GMT (envelope-from emaste@FreeBSD.org)
Received: (from emaste@localhost)
 by repo.freebsd.org (8.15.2/8.15.2/Submit) id u0KLM6HJ023120;
 Wed, 20 Jan 2016 21:22:06 GMT (envelope-from emaste@FreeBSD.org)
Message-Id: <201601202122.u0KLM6HJ023120@repo.freebsd.org>
X-Authentication-Warning: repo.freebsd.org: emaste set sender to
 emaste@FreeBSD.org using -f
From: Ed Maste <emaste@FreeBSD.org>
Date: Wed, 20 Jan 2016 21:22:06 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org
Subject: svn commit: r294460 - stable/10/sys/boot/ia64/efi
X-SVN-Group: stable-10
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.20
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for &quot;
 user&quot; and &quot; projects&quot; \)" <svn-src-all.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-all/>
List-Post: <mailto:svn-src-all@freebsd.org>
List-Help: <mailto:svn-src-all-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Wed, 20 Jan 2016 21:22:08 -0000

Author: emaste
Date: Wed Jan 20 21:22:06 2016
New Revision: 294460
URL: https://svnweb.freebsd.org/changeset/base/294460

Log:
  Leave temporary ia64 loader.sym behind if the build fails
  
  This facilitates investigation of the build failure, and is the same way
  it's done for other architectures using EFI.

Modified:
  stable/10/sys/boot/ia64/efi/Makefile

Modified: stable/10/sys/boot/ia64/efi/Makefile
==============================================================================
--- stable/10/sys/boot/ia64/efi/Makefile	Wed Jan 20 21:06:24 2016	(r294459)
+++ stable/10/sys/boot/ia64/efi/Makefile	Wed Jan 20 21:22:06 2016	(r294460)
@@ -37,7 +37,6 @@ FILESMODE_loader.efi= ${BINMODE}
 loader.efi: loader.sym
 	if [ `${OBJDUMP} -t ${.ALLSRC} | fgrep '*UND*' | wc -l` != 0 ]; then \
 		${OBJDUMP} -t ${.ALLSRC} | fgrep '*UND*'; \
-		rm ${.ALLSRC}; \
 		exit 1; \
 	fi
 	${OBJCOPY} -j .data -j .dynamic -j .dynstr -j .dynsym -j .hash \

From owner-svn-src-all@freebsd.org  Wed Jan 20 21:54:06 2016
Return-Path: <owner-svn-src-all@freebsd.org>
Delivered-To: svn-src-all@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id A3947A8BFD4;
 Wed, 20 Jan 2016 21:54:06 +0000 (UTC)
 (envelope-from glebius@FreeBSD.org)
Received: from cell.glebi.us (glebi.us [96.95.210.25])
 (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
 (Client CN "cell.glebi.us", Issuer "cell.glebi.us" (not verified))
 by mx1.freebsd.org (Postfix) with ESMTPS id 8E7F31AA9;
 Wed, 20 Jan 2016 21:54:06 +0000 (UTC)
 (envelope-from glebius@FreeBSD.org)
Received: from cell.glebi.us (localhost [127.0.0.1])
 by cell.glebi.us (8.15.2/8.15.2) with ESMTPS id u0KLrxUg010294
 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO);
 Wed, 20 Jan 2016 13:54:00 -0800 (PST)
 (envelope-from glebius@FreeBSD.org)
Received: (from glebius@localhost)
 by cell.glebi.us (8.15.2/8.15.2/Submit) id u0KLrvvW010293;
 Wed, 20 Jan 2016 13:53:57 -0800 (PST)
 (envelope-from glebius@FreeBSD.org)
X-Authentication-Warning: cell.glebi.us: glebius set sender to
 glebius@FreeBSD.org using -f
Date: Wed, 20 Jan 2016 13:53:57 -0800
From: Gleb Smirnoff <glebius@FreeBSD.org>
To: Dag-Erling =?iso-8859-1?Q?Sm=F8rgrav?= <des@FreeBSD.org>
Cc: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-head@freebsd.org
Subject: Re: svn commit: r294328 - in head: crypto/openssh
 crypto/openssh/contrib/caldera crypto/openssh/contrib/cygwin
 crypto/openssh/contrib/redhat crypto/openssh/contrib/suse
 crypto/openssh/openbsd-compat cr...
Message-ID: <20160120215357.GH1444@FreeBSD.org>
References: <201601191618.u0JGIQae049491@repo.freebsd.org>
MIME-Version: 1.0
Content-Type: text/plain; charset=iso-8859-1
Content-Disposition: inline
Content-Transfer-Encoding: 8bit
In-Reply-To: <201601191618.u0JGIQae049491@repo.freebsd.org>
User-Agent: Mutt/1.5.24 (2015-08-30)
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.20
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for &quot;
 user&quot; and &quot; projects&quot; \)" <svn-src-all.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-all/>
List-Post: <mailto:svn-src-all@freebsd.org>
List-Help: <mailto:svn-src-all-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Wed, 20 Jan 2016 21:54:06 -0000

On Tue, Jan 19, 2016 at 04:18:26PM +0000, Dag-Erling Smørgrav wrote:
D> Author: des
D> Date: Tue Jan 19 16:18:26 2016
D> New Revision: 294328
D> URL: https://svnweb.freebsd.org/changeset/base/294328
D> 
D> Log:
D>   Upgrade to OpenSSH 6.7p1, retaining libwrap support (which has been removed
D>   upstream) and a number of security fixes which we had already backported.

6.7p1? This looks like typo.

-- 
Totus tuus, Glebius.

From owner-svn-src-all@freebsd.org  Wed Jan 20 21:54:45 2016
Return-Path: <owner-svn-src-all@freebsd.org>
Delivered-To: svn-src-all@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id 43062A89035;
 Wed, 20 Jan 2016 21:54:45 +0000 (UTC)
 (envelope-from brooks@FreeBSD.org)
Received: from repo.freebsd.org (repo.freebsd.org
 [IPv6:2610:1c1:1:6068::e6a:0])
 (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
 (Client did not present a certificate)
 by mx1.freebsd.org (Postfix) with ESMTPS id 153061C32;
 Wed, 20 Jan 2016 21:54:45 +0000 (UTC)
 (envelope-from brooks@FreeBSD.org)
Received: from repo.freebsd.org ([127.0.1.37])
 by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u0KLsi00036079;
 Wed, 20 Jan 2016 21:54:44 GMT (envelope-from brooks@FreeBSD.org)
Received: (from brooks@localhost)
 by repo.freebsd.org (8.15.2/8.15.2/Submit) id u0KLsiEL036078;
 Wed, 20 Jan 2016 21:54:44 GMT (envelope-from brooks@FreeBSD.org)
Message-Id: <201601202154.u0KLsiEL036078@repo.freebsd.org>
X-Authentication-Warning: repo.freebsd.org: brooks set sender to
 brooks@FreeBSD.org using -f
From: Brooks Davis <brooks@FreeBSD.org>
Date: Wed, 20 Jan 2016 21:54:44 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-head@freebsd.org
Subject: svn commit: r294461 - head/sys/modules/i2c/iicbb
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.20
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for &quot;
 user&quot; and &quot; projects&quot; \)" <svn-src-all.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-all/>
List-Post: <mailto:svn-src-all@freebsd.org>
List-Help: <mailto:svn-src-all-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Wed, 20 Jan 2016 21:54:45 -0000

Author: brooks
Date: Wed Jan 20 21:54:43 2016
New Revision: 294461
URL: https://svnweb.freebsd.org/changeset/base/294461

Log:
  MIPS also needs ofw_bus_if.h in some cases.

Modified:
  head/sys/modules/i2c/iicbb/Makefile

Modified: head/sys/modules/i2c/iicbb/Makefile
==============================================================================
--- head/sys/modules/i2c/iicbb/Makefile	Wed Jan 20 21:22:06 2016	(r294460)
+++ head/sys/modules/i2c/iicbb/Makefile	Wed Jan 20 21:54:43 2016	(r294461)
@@ -2,7 +2,7 @@
 
 .PATH:		${.CURDIR}/../../../dev/iicbus
 .if ${MACHINE_CPUARCH} == "aarch64" || ${MACHINE_CPUARCH} == "arm" || \
-    ${MACHINE_CPUARCH} == "powerpc"
+    ${MACHINE_CPUARCH} == "mips" || ${MACHINE_CPUARCH} == "powerpc"
 ofw_bus_if=	ofw_bus_if.h
 .endif
 KMOD		= iicbb

From owner-svn-src-all@freebsd.org  Wed Jan 20 21:55:45 2016
Return-Path: <owner-svn-src-all@freebsd.org>
Delivered-To: svn-src-all@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id 97CF7A890BE
 for <svn-src-all@mailman.ysv.freebsd.org>;
 Wed, 20 Jan 2016 21:55:45 +0000 (UTC) (envelope-from imp@bsdimp.com)
Received: from mail-pf0-x233.google.com (mail-pf0-x233.google.com
 [IPv6:2607:f8b0:400e:c00::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 673BD1DA2
 for <svn-src-all@freebsd.org>; Wed, 20 Jan 2016 21:55:45 +0000 (UTC)
 (envelope-from imp@bsdimp.com)
Received: by mail-pf0-x233.google.com with SMTP id q63so11570731pfb.1
 for <svn-src-all@freebsd.org>; Wed, 20 Jan 2016 13:55:45 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=bsdimp-com.20150623.gappssmtp.com; s=20150623;
 h=sender:subject:mime-version:content-type:from:in-reply-to:date:cc
 :message-id:references:to;
 bh=imXMNRwHPkjAG4ztkXynzGZPakl6jfwI8CerCDsWZYM=;
 b=mlk4lFyS7TmpxULLRpg8n9D/hLI/a3sEsSIO+eJ+s9V1NTcx9xE11Cxt+HBqfRoz3Q
 CFTQz0zXLVs9ado4482chiTmdwrqCca86sZavzH+sSw5Sb8mV1iAXj6krRP/OBJQHt+b
 MPGB2aBsghjRKAxk8Dq3KYdPpGICmPNekAKuqnQwu5ANoJQgNgvU0Zp1+uJLCUBU68Wo
 xjnYl1UEuC23q7gXE6TqVQbC0d8+iWshIdF3FyNO83/wgdHygC11nSHdDtLnXrNNqNrd
 OQ9kBx5cNyCI0YDdrfHbKhdXWuDz23YFGlzU7uWylJI3DenOz/IPx522q3+I2OS4H8sf
 V67g==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20130820;
 h=x-gm-message-state:sender:subject:mime-version:content-type:from
 :in-reply-to:date:cc:message-id:references:to;
 bh=imXMNRwHPkjAG4ztkXynzGZPakl6jfwI8CerCDsWZYM=;
 b=LDzFpFxRncBwkmymKB+CeakQGuy4O5uwkEoup3jKoYgu8v1ewmQt2+jA69zntkg0Sy
 ZPWkR8/tPgrLYJYY/HFXQfAEQLFwlNwdo5ycgIyz95X/mTGnFYsbcKV1CGQA2YC1PT3s
 a0TgXS3eD5IPYg0giwOwPlNCZGkd3V53XU/TGtNgsLnVDSiNGX/EV9Qk4OjWier+adrT
 gHkgy0cH4/F7Dh+Tzpkn7KAiMfn7UxWr8C7rfnf+703aMWm7F6CtYbbZy4XlpaZDju0t
 Z0URHIoJktMu/kh3RpyXn9FtZmLmy5LEi9E+1ZtoGjtgqldER+WH06LCQK2nOmrul3h6
 HTcQ==
X-Gm-Message-State: ALoCoQlowrREhTC4x/Qi1MrlaJ6znL0T4zVaK0wMFraZAyDyMoYnhAHFAGQ7LThRhSDWtmhDQzWDgfkSm3rKAzHy5mCLRqHRSQ==
X-Received: by 10.98.72.136 with SMTP id q8mr56158931pfi.86.1453326943739;
 Wed, 20 Jan 2016 13:55:43 -0800 (PST)
Received: from [192.168.2.169] ([192.55.66.74])
 by smtp.gmail.com with ESMTPSA id 26sm22258920pfo.55.2016.01.20.13.55.42
 (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128);
 Wed, 20 Jan 2016 13:55:42 -0800 (PST)
Sender: Warner Losh <wlosh@bsdimp.com>
Subject: Re: svn commit: r294461 - head/sys/modules/i2c/iicbb
Mime-Version: 1.0 (Mac OS X Mail 8.2 \(2104\))
Content-Type: multipart/signed;
 boundary="Apple-Mail=_DD31536F-8174-4F4B-B0E2-8CA2368DD503";
 protocol="application/pgp-signature"; micalg=pgp-sha512
X-Pgp-Agent: GPGMail 2.5.2
From: Warner Losh <imp@bsdimp.com>
In-Reply-To: <201601202154.u0KLsiEL036078@repo.freebsd.org>
Date: Wed, 20 Jan 2016 13:55:39 -0800
Cc: src-committers <src-committers@freebsd.org>, svn-src-all@freebsd.org,
 svn-src-head@freebsd.org
Message-Id: <6C0577ED-2599-463B-9ADF-0D49E3C3B7EC@bsdimp.com>
References: <201601202154.u0KLsiEL036078@repo.freebsd.org>
To: Brooks Davis <brooks@FreeBSD.org>
X-Mailer: Apple Mail (2.2104)
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.20
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for &quot;
 user&quot; and &quot; projects&quot; \)" <svn-src-all.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-all/>
List-Post: <mailto:svn-src-all@freebsd.org>
List-Help: <mailto:svn-src-all-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Wed, 20 Jan 2016 21:55:45 -0000


--Apple-Mail=_DD31536F-8174-4F4B-B0E2-8CA2368DD503
Content-Transfer-Encoding: quoted-printable
Content-Type: text/plain;
	charset=us-ascii

On Jan 20, 2016, at 1:54 PM, Brooks Davis <brooks@FreeBSD.org> wrote:
>=20
> Author: brooks
> Date: Wed Jan 20 21:54:43 2016
> New Revision: 294461
> URL: https://svnweb.freebsd.org/changeset/base/294461
>=20
> Log:
>  MIPS also needs ofw_bus_if.h in some cases.

Why not make this unconditional? What would the harm be?

Warner

> Modified:
>  head/sys/modules/i2c/iicbb/Makefile
>=20
> Modified: head/sys/modules/i2c/iicbb/Makefile
> =
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=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/modules/i2c/iicbb/Makefile	Wed Jan 20 21:22:06 2016	=
(r294460)
> +++ head/sys/modules/i2c/iicbb/Makefile	Wed Jan 20 21:54:43 2016	=
(r294461)
> @@ -2,7 +2,7 @@
>=20
> .PATH:		${.CURDIR}/../../../dev/iicbus
> .if ${MACHINE_CPUARCH} =3D=3D "aarch64" || ${MACHINE_CPUARCH} =3D=3D =
"arm" || \
> -    ${MACHINE_CPUARCH} =3D=3D "powerpc"
> +    ${MACHINE_CPUARCH} =3D=3D "mips" || ${MACHINE_CPUARCH} =3D=3D =
"powerpc"
> ofw_bus_if=3D	ofw_bus_if.h
> .endif
> KMOD		=3D iicbb
>=20


--Apple-Mail=_DD31536F-8174-4F4B-B0E2-8CA2368DD503
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

iQIcBAEBCgAGBQJWoAJcAAoJEGwc0Sh9sBEAeFwP/3kJRoLFgoL3tE0O93Hjf3y2
N86dBcI0OAx+hOm9RMjIx3nJAGPLXOy4LuQM1gkXXD3DxVYQglTINqk8WTzASyxI
hzLW3Mi8OovqeGqjJB3jgCLswL8I4Qz8wu0WN+82HXzfUMCriwObFNHEVM0+zLCF
p1GFQ3S1R8QkRo920J2S7kbw7Z6yL5Z4QDgJx7z6tjr73eZEfFj8jRSe5uUrOSrP
5j1q8g6gfBdA9joKAU73n1WbvNOJqvkf0F/K5sBXWeHr3JqhNYFQ7fM6PR5NsSbn
Px0KSY/MnBTxbR5As5XXB8OdFHl+bUeNrawltuQCgYVlXgb1AIGBp0UX3OFCccIE
ym3ILcwJiHcmwaW7T3oeZd2wRfBbD+/a7ONWH02SdfHfNFo8s71fx//dO651mpsZ
WAeMeNK6HW1jI7SYQCnpTzalbwgTJOQGwEwV9dIDhFHe1solupZ4oUKfdMmWD6iF
x/6B0q1zqwtItV4zKaHoXZiNhWAPq7ZQMGrh5fT1W2ZYic+pILKYB/dXkXFlKsfY
iCXW0Xcni1mwKO8QSZ9gjWTUZfW0kxc9eXU2koowoHPgg3G+j2VqKMjr7NcSPLZW
rlWvcMRoPkSMX/S5nH21nPNBMLPPCnap2ClXMU8x6cmwcZa3Xoy13LhGRPI2Io4e
qE56SSdPxR5KzHja/N+p
=Ik+7
-----END PGP SIGNATURE-----

--Apple-Mail=_DD31536F-8174-4F4B-B0E2-8CA2368DD503--

From owner-svn-src-all@freebsd.org  Wed Jan 20 21:56:03 2016
Return-Path: <owner-svn-src-all@freebsd.org>
Delivered-To: svn-src-all@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1F7C5A8910C;
 Wed, 20 Jan 2016 21:56:03 +0000 (UTC)
 (envelope-from carpeddiem@gmail.com)
Received: from mail-ig0-x22f.google.com (mail-ig0-x22f.google.com
 [IPv6:2607:f8b0:4001:c05::22f])
 (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits))
 (Client CN "smtp.gmail.com",
 Issuer "Google Internet Authority G2" (verified OK))
 by mx1.freebsd.org (Postfix) with ESMTPS id E579C1EF2;
 Wed, 20 Jan 2016 21:56:02 +0000 (UTC)
 (envelope-from carpeddiem@gmail.com)
Received: by mail-ig0-x22f.google.com with SMTP id z14so110688868igp.0;
 Wed, 20 Jan 2016 13:56:02 -0800 (PST)
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:content-type;
 bh=EwaumPgzhuC4+hUgykMbbBSCMKMyT6CPDRh5bCnvATA=;
 b=JicQZvtKrNHxaTidCpD/zhqJJ2p+f7bYN4yS7voPPLNtldj1q4qpWZwmKrzvq+UmVj
 ghbrawNfKDG3yMK8/EWwe6MSkmT3bP1KV5sVVB2dpszmeAdEYNnpFKiP/nCXMq2f0hyx
 h4j/moNdjjomdbf7pIomz8BqlOGypr+UjtogwAOOag9qnUtYX0KOYJCczanrGkmM4xOw
 XfAW29bHQ/Xa/+yJFl6WSJxRKI5zK36xbDxMsE0mzY5X7/Uf1yMLozhrmAIhbGkLGxjl
 1Kg7eVFcNdU9WpvpyXKriqMdvEzTXJbLw6sVXciqBPoc1PVbvyy+dU21ig4O1CKmcw7k
 cdRg==
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:content-type;
 bh=EwaumPgzhuC4+hUgykMbbBSCMKMyT6CPDRh5bCnvATA=;
 b=kkSVypMqdQRJycpJEccxnK1NLgUh8IwsNbUmAVdeK3JsdVpOIVMwmEjJ2TFkboyZ5c
 WJVnQjqAwCOWjMjwVe/kNcVUtT+8ni1nyoxy17+CsFQGxRp+lvAczyC1pk6DOmLnZOfF
 tWwbno6k70EYVR/vSixkiGzXitGyedL4atx5qU0SIxa/6jFrPzS37k8iUD6VBdWBtKaL
 noc++cqb92AaCEqzHw2s+c1lwgHIqP4I37VEWfCc9IfTalQT0R4LbVSroLCzxEPuEh4q
 zYt5BV3Fp44FOv/2FMuqoZrWm64+FUPM6rLkV3yGqXMriKCZoGjRQXrYin2/jEZaNrMq
 sksQ==
X-Gm-Message-State: AG10YORmlBg0ne6CGdq6v0Z8FJXwY+86YSbNR+tFpLOuxJ2VEp24ZRYuBPGXzjp0gUGpVC0/et89brfuJa0NSg==
X-Received: by 10.50.150.66 with SMTP id ug2mr5564273igb.33.1453326962275;
 Wed, 20 Jan 2016 13:56:02 -0800 (PST)
MIME-Version: 1.0
Sender: carpeddiem@gmail.com
Received: by 10.107.39.66 with HTTP; Wed, 20 Jan 2016 13:55:42 -0800 (PST)
In-Reply-To: <201601192135.u0JLZAuf044042@repo.freebsd.org>
References: <201601192135.u0JLZAuf044042@repo.freebsd.org>
From: Ed Maste <emaste@freebsd.org>
Date: Wed, 20 Jan 2016 16:55:42 -0500
X-Google-Sender-Auth: HipYFfXYyIKIMdZficIWY_kR-8Y
Message-ID: <CAPyFy2B=ckuxF2YBMo9J7i-X7=9c5j5rJZvx+g4hkAcx9+A2RA@mail.gmail.com>
Subject: Re: svn commit: r294343 - stable/10/lib/libstand
To: Ian Lepore <ian@freebsd.org>
Cc: "src-committers@freebsd.org" <src-committers@freebsd.org>, 
 "svn-src-all@freebsd.org" <svn-src-all@freebsd.org>, svn-src-stable@freebsd.org,
 svn-src-stable-10@freebsd.org
Content-Type: text/plain; charset=UTF-8
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.20
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for &quot;
 user&quot; and &quot; projects&quot; \)" <svn-src-all.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-all/>
List-Post: <mailto:svn-src-all@freebsd.org>
List-Help: <mailto:svn-src-all-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Wed, 20 Jan 2016 21:56:03 -0000

On 19 January 2016 at 16:35, Ian Lepore <ian@freebsd.org> wrote:
> Author: ian
> Date: Tue Jan 19 21:35:09 2016
> New Revision: 294343
> URL: https://svnweb.freebsd.org/changeset/base/294343
>
> Log:
>   MFC r292583:
>
>     Allow dhcp/bootp server-provided values to be overriden from environment
>     variables in loader(8) and other libstand applications.

It looks like this broke ia64 buildworld, as ia64 libstand does not
include strlcpy. (I'm not sure why that's the case.)

From owner-svn-src-all@freebsd.org  Wed Jan 20 21:56:04 2016
Return-Path: <owner-svn-src-all@freebsd.org>
Delivered-To: svn-src-all@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id A3F40A8911A;
 Wed, 20 Jan 2016 21:56:04 +0000 (UTC)
 (envelope-from glebius@FreeBSD.org)
Received: from cell.glebi.us (glebi.us [96.95.210.25])
 (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
 (Client CN "cell.glebi.us", Issuer "cell.glebi.us" (not verified))
 by mx1.freebsd.org (Postfix) with ESMTPS id 8EC3C1EFC;
 Wed, 20 Jan 2016 21:56:03 +0000 (UTC)
 (envelope-from glebius@FreeBSD.org)
Received: from cell.glebi.us (localhost [127.0.0.1])
 by cell.glebi.us (8.15.2/8.15.2) with ESMTPS id u0KLu37n010338
 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO);
 Wed, 20 Jan 2016 13:56:03 -0800 (PST)
 (envelope-from glebius@FreeBSD.org)
Received: (from glebius@localhost)
 by cell.glebi.us (8.15.2/8.15.2/Submit) id u0KLu31L010337;
 Wed, 20 Jan 2016 13:56:03 -0800 (PST)
 (envelope-from glebius@FreeBSD.org)
X-Authentication-Warning: cell.glebi.us: glebius set sender to
 glebius@FreeBSD.org using -f
Date: Wed, 20 Jan 2016 13:56:03 -0800
From: Gleb Smirnoff <glebius@FreeBSD.org>
To: Dag-Erling =?iso-8859-1?Q?Sm=F8rgrav?= <des@FreeBSD.org>
Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org,
 src-committers@freebsd.org
Subject: Re: svn commit: r294328 - in head: crypto/openssh
 crypto/openssh/contrib/caldera crypto/openssh/contrib/cygwin
 crypto/openssh/contrib/redhat crypto/openssh/contrib/suse
 crypto/openssh/openbsd-compat cr...
Message-ID: <20160120215603.GI1444@FreeBSD.org>
References: <201601191618.u0JGIQae049491@repo.freebsd.org>
 <20160120215357.GH1444@FreeBSD.org>
MIME-Version: 1.0
Content-Type: text/plain; charset=iso-8859-1
Content-Disposition: inline
Content-Transfer-Encoding: 8bit
In-Reply-To: <20160120215357.GH1444@FreeBSD.org>
User-Agent: Mutt/1.5.24 (2015-08-30)
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.20
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for &quot;
 user&quot; and &quot; projects&quot; \)" <svn-src-all.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-all/>
List-Post: <mailto:svn-src-all@freebsd.org>
List-Help: <mailto:svn-src-all-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Wed, 20 Jan 2016 21:56:04 -0000

On Wed, Jan 20, 2016 at 01:53:57PM -0800, Gleb Smirnoff wrote:
T> On Tue, Jan 19, 2016 at 04:18:26PM +0000, Dag-Erling Smørgrav wrote:
T> D> Author: des
T> D> Date: Tue Jan 19 16:18:26 2016
T> D> New Revision: 294328
T> D> URL: https://svnweb.freebsd.org/changeset/base/294328
T> D> 
T> D> Log:
T> D>   Upgrade to OpenSSH 6.7p1, retaining libwrap support (which has been removed
T> D>   upstream) and a number of security fixes which we had already backported.
T> 
T> 6.7p1? This looks like typo.

Oh, please ignore me.

-- 
Totus tuus, Glebius.

From owner-svn-src-all@freebsd.org  Wed Jan 20 21:57:51 2016
Return-Path: <owner-svn-src-all@freebsd.org>
Delivered-To: svn-src-all@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7A31BA89217;
 Wed, 20 Jan 2016 21:57:51 +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 5DE7E1244;
 Wed, 20 Jan 2016 21:57:51 +0000 (UTC)
 (envelope-from bdrewery@FreeBSD.org)
Received: from mail.xzibition.com (localhost [IPv6:::1])
 by freefall.freebsd.org (Postfix) with ESMTP id 519561DE5;
 Wed, 20 Jan 2016 21:57:51 +0000 (UTC)
 (envelope-from bdrewery@FreeBSD.org)
Received: from mail.xzibition.com (localhost [172.31.3.2])
 by mail.xzibition.com (Postfix) with ESMTP id 0466219067;
 Wed, 20 Jan 2016 21:57:51 +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 nH-UrKhaOLJP; Wed, 20 Jan 2016 21:57:44 +0000 (UTC)
Subject: Re: svn commit: r294444 - in head/sys/modules: ix ixlv ixv
DKIM-Filter: OpenDKIM Filter v2.9.2 mail.xzibition.com 267EA19061
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-head@freebsd.org
References: <201601201645.u0KGjeN2029336@repo.freebsd.org>
From: Bryan Drewery <bdrewery@FreeBSD.org>
Openpgp: id=F9173CB2C3AAEA7A5C8A1F0935D771BB6E4697CF;
 url=http://www.shatow.net/bryan/bryan2.asc
Organization: FreeBSD
Message-ID: <56A002DA.5030003@FreeBSD.org>
Date: Wed, 20 Jan 2016 13:57:46 -0800
User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:38.0) Gecko/20100101
 Thunderbird/38.5.1
MIME-Version: 1.0
In-Reply-To: <201601201645.u0KGjeN2029336@repo.freebsd.org>
Content-Type: multipart/signed; micalg=pgp-sha1;
 protocol="application/pgp-signature";
 boundary="w6PKgJdWNfROqf2qKoBXdn2fG9aoB0Tpu"
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.20
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for &quot;
 user&quot; and &quot; projects&quot; \)" <svn-src-all.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-all/>
List-Post: <mailto:svn-src-all@freebsd.org>
List-Help: <mailto:svn-src-all-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Wed, 20 Jan 2016 21:57:51 -0000

This is an OpenPGP/MIME signed message (RFC 4880 and 3156)
--w6PKgJdWNfROqf2qKoBXdn2fG9aoB0Tpu
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable

I have no idea how this was working before and why it took so long to
manifest. Many people reported failures here in the last day and
confirmed this fixed it.

On 1/20/2016 8:45 AM, Bryan Drewery wrote:
> Author: bdrewery
> Date: Wed Jan 20 16:45:39 2016
> New Revision: 294444
> URL: https://svnweb.freebsd.org/changeset/base/294444
>=20
> Log:
>   Add some missing dependencies on pci_iov_if.h.
>  =20
>   Sponsored by:	EMC / Isilon Storage Division
>=20
> Modified:
>   head/sys/modules/ix/Makefile
>   head/sys/modules/ixlv/Makefile
>   head/sys/modules/ixv/Makefile
>=20
> Modified: head/sys/modules/ix/Makefile
> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=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/modules/ix/Makefile	Wed Jan 20 16:41:00 2016	(r294443)
> +++ head/sys/modules/ix/Makefile	Wed Jan 20 16:45:39 2016	(r294444)
> @@ -3,7 +3,7 @@
>  .PATH:  ${.CURDIR}/../../dev/ixgbe
> =20
>  KMOD    =3D if_ix
> -SRCS    =3D device_if.h bus_if.h pci_if.h
> +SRCS    =3D device_if.h bus_if.h pci_if.h pci_iov_if.h
>  SRCS	+=3D opt_inet.h opt_inet6.h opt_rss.h
>  SRCS    +=3D if_ix.c ix_txrx.c ixgbe_osdep.c
>  # Shared source
>=20
> Modified: head/sys/modules/ixlv/Makefile
> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=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/modules/ixlv/Makefile	Wed Jan 20 16:41:00 2016	(r294443)
> +++ head/sys/modules/ixlv/Makefile	Wed Jan 20 16:45:39 2016	(r294444)
> @@ -3,7 +3,7 @@
>  .PATH:  ${.CURDIR}/../../dev/ixl
> =20
>  KMOD    =3D if_ixlv
> -SRCS    =3D device_if.h bus_if.h pci_if.h opt_bdg.h
> +SRCS    =3D device_if.h bus_if.h pci_if.h pci_iov_if.h opt_bdg.h
>  SRCS    +=3D opt_inet.h opt_inet6.h opt_rss.h
>  SRCS    +=3D if_ixlv.c ixlvc.c ixl_txrx.c i40e_osdep.c
> =20
>=20
> Modified: head/sys/modules/ixv/Makefile
> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=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/modules/ixv/Makefile	Wed Jan 20 16:41:00 2016	(r294443)
> +++ head/sys/modules/ixv/Makefile	Wed Jan 20 16:45:39 2016	(r294444)
> @@ -3,7 +3,7 @@
>  .PATH:  ${.CURDIR}/../../dev/ixgbe
> =20
>  KMOD    =3D if_ixv
> -SRCS    =3D device_if.h bus_if.h pci_if.h
> +SRCS    =3D device_if.h bus_if.h pci_if.h pci_iov_if.h
>  SRCS	+=3D opt_inet.h opt_inet6.h opt_rss.h
>  SRCS    +=3D if_ixv.c ix_txrx.c ixgbe_osdep.c
>  # Shared source
>=20


--=20
Regards,
Bryan Drewery


--w6PKgJdWNfROqf2qKoBXdn2fG9aoB0Tpu
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

iQEcBAEBAgAGBQJWoALaAAoJEDXXcbtuRpfPF4cH/A/9bvWjbN37Xc9sA5prgJ8S
UYPIUilLGzQHwgnfOWax3hegqJsJCqQjNVej3XH7mNp1TjD05fc91DrhdCtrXYSq
L9ubQ2bjoNM2ykkq/nwtn9ZzD82TG636vGO3g90SdKOT/O9ETBWgSog4SIH25DqP
pkwQqjvZWjvFPjoenfNfQspk6Qn2HaRaZT/0j16jmC8NXcb8jRmPlAdujTVVonxa
4hN7BW1HjqEKqJ2b/IvVeaT7NdreN1mVXTC8zAm4xlvDsajztGRaR8hXt/NhWk6b
ZNaE6zYiGcc0wmUSrticoLDwkl83FzVxn+H0v3l2y40781fIziKZzXJ4c3Yl960=
=7cGe
-----END PGP SIGNATURE-----

--w6PKgJdWNfROqf2qKoBXdn2fG9aoB0Tpu--

From owner-svn-src-all@freebsd.org  Wed Jan 20 21:59:09 2016
Return-Path: <owner-svn-src-all@freebsd.org>
Delivered-To: svn-src-all@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0E263A892F3
 for <svn-src-all@mailman.ysv.freebsd.org>;
 Wed, 20 Jan 2016 21:59:09 +0000 (UTC) (envelope-from imp@bsdimp.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 D158D13BC
 for <svn-src-all@freebsd.org>; Wed, 20 Jan 2016 21:59:08 +0000 (UTC)
 (envelope-from imp@bsdimp.com)
Received: by mail-pf0-x22a.google.com with SMTP id e65so11326194pfe.0
 for <svn-src-all@freebsd.org>; Wed, 20 Jan 2016 13:59:08 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=bsdimp-com.20150623.gappssmtp.com; s=20150623;
 h=sender:subject:mime-version:content-type:from:in-reply-to:date:cc
 :message-id:references:to;
 bh=bhVjKgPvA3zYvaDKaKw6uTbL9Im41kFElcWt3W0YCl4=;
 b=aokXW/ANWyOD0Qx2nIohunIJzR7Bt6ZFi/TkS6Qo3OSouul53E/ZVOUPLR1Kn9oGf0
 5b1u4Tarwpm6lQzbG7lSjJ5LUyH7ozlsrKYagVTUmTy2eXlI+YVdIzLNTxlE9GUTaZWz
 w93+32T83oyJ2FNhwiytTPsqs4ReJn17E3BwXDHvK2mz5Nu3I1EcEreLkszmyuLy+jd9
 oyNC19KR2+cpQsq0Dp0w0j4gAZWI2GZ3rKQTO1mYc6RflnCb+ArNu/nQtIRWxcgWzH7j
 FzdxUOeQDa+NdeUdzgK58ss9PRcoySjUUBaDN9LBzAY1CFU3idZQgeQ4RPsA3EyrVG6/
 I1kw==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20130820;
 h=x-gm-message-state:sender:subject:mime-version:content-type:from
 :in-reply-to:date:cc:message-id:references:to;
 bh=bhVjKgPvA3zYvaDKaKw6uTbL9Im41kFElcWt3W0YCl4=;
 b=d0sphPpYeCnxbVqFAZ1CKTcRqr+jrLUjrAnnGNjkBHBzpPhJycpYvUTI6xmWvgmMA/
 1EzpwOTmThnKeXm8IFqDAX9BoXs2FBlL7LQJCmSfK/nUTGzirQ38oi91v5L1gMYzogcs
 +qef1xJiXEHcgTxA6zqrwWwr5Oq5dAK1MrIK3uvOExme52g51WtcgeZ6mIdM4BIcSOFY
 amlgulVsMw79B9dQyU8svLqunWOYTXn2v/sIl1owHBhRahPorrg9xaNv4Oi1Urs86IRe
 NHAUW1qBemo7lpv/yMSjwYhS4h/pXlT2mvzCfom+Zo395Cj5OmVVxBDpOeWWF4zI2bjw
 gFAw==
X-Gm-Message-State: ALoCoQlnwV4q7gHC2GOQEuma9sQfwrB86Q8Yb7S1Vk5/zPxGv3y4YyWXceM4YAtMILfB8PR9gFH4IvzVLescAXjqsBbeEdhR4A==
X-Received: by 10.98.10.198 with SMTP id 67mr56053570pfk.75.1453327148397;
 Wed, 20 Jan 2016 13:59:08 -0800 (PST)
Received: from [192.168.2.169] ([192.55.66.74])
 by smtp.gmail.com with ESMTPSA id 72sm50899451pfk.28.2016.01.20.13.59.07
 (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128);
 Wed, 20 Jan 2016 13:59:07 -0800 (PST)
Sender: Warner Losh <wlosh@bsdimp.com>
Subject: Re: svn commit: r294444 - in head/sys/modules: ix ixlv ixv
Mime-Version: 1.0 (Mac OS X Mail 8.2 \(2104\))
Content-Type: multipart/signed;
 boundary="Apple-Mail=_2819A333-EE9E-433F-9391-3AB3E290FC11";
 protocol="application/pgp-signature"; micalg=pgp-sha512
X-Pgp-Agent: GPGMail 2.5.2
From: Warner Losh <imp@bsdimp.com>
In-Reply-To: <56A002DA.5030003@FreeBSD.org>
Date: Wed, 20 Jan 2016 13:59:05 -0800
Cc: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-head@freebsd.org
Message-Id: <5CEF44A4-3121-4A16-AB52-84CACB3F2C7F@bsdimp.com>
References: <201601201645.u0KGjeN2029336@repo.freebsd.org>
 <56A002DA.5030003@FreeBSD.org>
To: Bryan Drewery <bdrewery@FreeBSD.org>
X-Mailer: Apple Mail (2.2104)
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.20
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for &quot;
 user&quot; and &quot; projects&quot; \)" <svn-src-all.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-all/>
List-Post: <mailto:svn-src-all@freebsd.org>
List-Help: <mailto:svn-src-all-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Wed, 20 Jan 2016 21:59:09 -0000


--Apple-Mail=_2819A333-EE9E-433F-9391-3AB3E290FC11
Content-Transfer-Encoding: quoted-printable
Content-Type: text/plain;
	charset=utf-8

It would work built part of buildkernel since pci_iov_if.h would exist =
there. It would fail when built by hand since the kernel config didn=E2=80=
=99t save us.

Warner


> On Jan 20, 2016, at 1:57 PM, Bryan Drewery <bdrewery@FreeBSD.org> =
wrote:
>=20
> I have no idea how this was working before and why it took so long to
> manifest. Many people reported failures here in the last day and
> confirmed this fixed it.
>=20
> On 1/20/2016 8:45 AM, Bryan Drewery wrote:
>> Author: bdrewery
>> Date: Wed Jan 20 16:45:39 2016
>> New Revision: 294444
>> URL: https://svnweb.freebsd.org/changeset/base/294444
>>=20
>> Log:
>>  Add some missing dependencies on pci_iov_if.h.
>>=20
>>  Sponsored by:	EMC / Isilon Storage Division
>>=20
>> Modified:
>>  head/sys/modules/ix/Makefile
>>  head/sys/modules/ixlv/Makefile
>>  head/sys/modules/ixv/Makefile
>>=20
>> Modified: head/sys/modules/ix/Makefile
>> =
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=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/modules/ix/Makefile	Wed Jan 20 16:41:00 2016	=
(r294443)
>> +++ head/sys/modules/ix/Makefile	Wed Jan 20 16:45:39 2016	=
(r294444)
>> @@ -3,7 +3,7 @@
>> .PATH:  ${.CURDIR}/../../dev/ixgbe
>>=20
>> KMOD    =3D if_ix
>> -SRCS    =3D device_if.h bus_if.h pci_if.h
>> +SRCS    =3D device_if.h bus_if.h pci_if.h pci_iov_if.h
>> SRCS	+=3D opt_inet.h opt_inet6.h opt_rss.h
>> SRCS    +=3D if_ix.c ix_txrx.c ixgbe_osdep.c
>> # Shared source
>>=20
>> Modified: head/sys/modules/ixlv/Makefile
>> =
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=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/modules/ixlv/Makefile	Wed Jan 20 16:41:00 2016	=
(r294443)
>> +++ head/sys/modules/ixlv/Makefile	Wed Jan 20 16:45:39 2016	=
(r294444)
>> @@ -3,7 +3,7 @@
>> .PATH:  ${.CURDIR}/../../dev/ixl
>>=20
>> KMOD    =3D if_ixlv
>> -SRCS    =3D device_if.h bus_if.h pci_if.h opt_bdg.h
>> +SRCS    =3D device_if.h bus_if.h pci_if.h pci_iov_if.h opt_bdg.h
>> SRCS    +=3D opt_inet.h opt_inet6.h opt_rss.h
>> SRCS    +=3D if_ixlv.c ixlvc.c ixl_txrx.c i40e_osdep.c
>>=20
>>=20
>> Modified: head/sys/modules/ixv/Makefile
>> =
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=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/modules/ixv/Makefile	Wed Jan 20 16:41:00 2016	=
(r294443)
>> +++ head/sys/modules/ixv/Makefile	Wed Jan 20 16:45:39 2016	=
(r294444)
>> @@ -3,7 +3,7 @@
>> .PATH:  ${.CURDIR}/../../dev/ixgbe
>>=20
>> KMOD    =3D if_ixv
>> -SRCS    =3D device_if.h bus_if.h pci_if.h
>> +SRCS    =3D device_if.h bus_if.h pci_if.h pci_iov_if.h
>> SRCS	+=3D opt_inet.h opt_inet6.h opt_rss.h
>> SRCS    +=3D if_ixv.c ix_txrx.c ixgbe_osdep.c
>> # Shared source
>>=20
>=20
>=20
> --
> Regards,
> Bryan Drewery
>=20


--Apple-Mail=_2819A333-EE9E-433F-9391-3AB3E290FC11
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

iQIcBAEBCgAGBQJWoAMpAAoJEGwc0Sh9sBEASWwQAIE/J/zxk6L638z7vNw40N2H
8O7+ZWuGAGeIam4Dhlllu+utpH3RFBxztSWnYQrxETrBMpnlNNh60p5H0rUCbpNI
WD4BU8Adlll6xomw1OHJXCDTRqj+ilaKbIsPt9ALJfdpEOfPzqASzKeem9Jl7t6W
/axVtEA7sQJbjS4Dny2ocT9+6J7Pk9fmXEtdT54peVXFUOl4/9cqCDf+hlmrQOQM
hz2e0idGV+5Mwvgf/kihSf+3CJ3o/jGAgDXLSqEEJCzwRcVDopbNcKl9hjJwnzbt
gL1YIYNV3aN/IICtbrIne+bDlllY6U3zfhLLKX4b1bgotWJypMri8dCKCx0weKKm
1zL+oeLPGG5S6cWPMTKtxjhFuIoyXCHbMaXB/96KTHRz/f79yfnyewrUyw8t2dZP
tjG5YkDHTD+qVsBVoew3JIg7ZUBAj9wT/ch+4tPmJAalEF+ohGJ1WkasaLsXpSz8
jtplYmKE4ua8DP5FOqvvgdpQqjl7ywVXtWePNyjmfbR622RNFjEFjWIuMr9pgAwq
CWM5ijAj3zonRKy+sOzDWQne/90hbqgYzY7DE/muq23Iln4LYb2rt5d9Gjlro8a1
Bcx+4ZRhpvczG/la7I9w3j4X0gKFlB1qSd/nntodvmm+/IGHGwt1nJtAkRroLtdK
lXsOmrnbnCMjk38u0a7z
=f6Bf
-----END PGP SIGNATURE-----

--Apple-Mail=_2819A333-EE9E-433F-9391-3AB3E290FC11--

From owner-svn-src-all@freebsd.org  Wed Jan 20 22:02:40 2016
Return-Path: <owner-svn-src-all@freebsd.org>
Delivered-To: svn-src-all@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id 14A2AA8954E
 for <svn-src-all@mailman.ysv.freebsd.org>;
 Wed, 20 Jan 2016 22:02:40 +0000 (UTC) (envelope-from ian@freebsd.org)
Received: from erouter6.ore.mailhop.org (erouter6.ore.mailhop.org
 [54.187.213.119])
 (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
 (Client did not present a certificate)
 by mx1.freebsd.org (Postfix) with ESMTPS id EC25E18CB
 for <svn-src-all@freebsd.org>; Wed, 20 Jan 2016 22:02:39 +0000 (UTC)
 (envelope-from ian@freebsd.org)
Received: from ilsoft.org (unknown [73.34.117.227])
 by outbound3.ore.mailhop.org (Halon Mail Gateway) with ESMTPSA;
 Wed, 20 Jan 2016 22:00:58 +0000 (UTC)
Received: from rev (rev [172.22.42.240])
 by ilsoft.org (8.15.2/8.14.9) with ESMTP id u0KM2aZT013384;
 Wed, 20 Jan 2016 15:02:36 -0700 (MST) (envelope-from ian@freebsd.org)
Message-ID: <1453327356.46848.104.camel@freebsd.org>
Subject: Re: svn commit: r294343 - stable/10/lib/libstand
From: Ian Lepore <ian@freebsd.org>
To: Ed Maste <emaste@freebsd.org>
Cc: "src-committers@freebsd.org" <src-committers@freebsd.org>,
 "svn-src-all@freebsd.org" <svn-src-all@freebsd.org>,
 svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org
Date: Wed, 20 Jan 2016 15:02:36 -0700
In-Reply-To: <CAPyFy2B=ckuxF2YBMo9J7i-X7=9c5j5rJZvx+g4hkAcx9+A2RA@mail.gmail.com>
References: <201601192135.u0JLZAuf044042@repo.freebsd.org>
 <CAPyFy2B=ckuxF2YBMo9J7i-X7=9c5j5rJZvx+g4hkAcx9+A2RA@mail.gmail.com>
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-all@freebsd.org
X-Mailman-Version: 2.1.20
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for &quot;
 user&quot; and &quot; projects&quot; \)" <svn-src-all.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-all/>
List-Post: <mailto:svn-src-all@freebsd.org>
List-Help: <mailto:svn-src-all-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Wed, 20 Jan 2016 22:02:40 -0000

On Wed, 2016-01-20 at 16:55 -0500, Ed Maste wrote:
> On 19 January 2016 at 16:35, Ian Lepore <ian@freebsd.org> wrote:
> > Author: ian
> > Date: Tue Jan 19 21:35:09 2016
> > New Revision: 294343
> > URL: https://svnweb.freebsd.org/changeset/base/294343
> > 
> > Log:
> >   MFC r292583:
> > 
> >     Allow dhcp/bootp server-provided values to be overriden from
> > environment
> >     variables in loader(8) and other libstand applications.
> 
> It looks like this broke ia64 buildworld, as ia64 libstand does not
> include strlcpy. (I'm not sure why that's the case.)
> 

Oops.  ia64 is gone from -current so when I merged the changes that
added strlcat/cpy, nothing got added to the ia64 section.  I'll fix it
with a direct commit as soon as my test build finishes.  Sorry 'bout
that.

-- Ian


From owner-svn-src-all@freebsd.org  Wed Jan 20 22:05:51 2016
Return-Path: <owner-svn-src-all@freebsd.org>
Delivered-To: svn-src-all@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2A7E7A89657;
 Wed, 20 Jan 2016 22:05:51 +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 EDD191A87;
 Wed, 20 Jan 2016 22:05:50 +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 u0KM5nPe039363;
 Wed, 20 Jan 2016 22:05:49 GMT (envelope-from ian@FreeBSD.org)
Received: (from ian@localhost)
 by repo.freebsd.org (8.15.2/8.15.2/Submit) id u0KM5n7q039362;
 Wed, 20 Jan 2016 22:05:49 GMT (envelope-from ian@FreeBSD.org)
Message-Id: <201601202205.u0KM5n7q039362@repo.freebsd.org>
X-Authentication-Warning: repo.freebsd.org: ian set sender to ian@FreeBSD.org
 using -f
From: Ian Lepore <ian@FreeBSD.org>
Date: Wed, 20 Jan 2016 22:05:49 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org
Subject: svn commit: r294462 - stable/10/lib/libstand
X-SVN-Group: stable-10
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.20
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for &quot;
 user&quot; and &quot; projects&quot; \)" <svn-src-all.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-all/>
List-Post: <mailto:svn-src-all@freebsd.org>
List-Help: <mailto:svn-src-all-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Wed, 20 Jan 2016 22:05:51 -0000

Author: ian
Date: Wed Jan 20 22:05:49 2016
New Revision: 294462
URL: https://svnweb.freebsd.org/changeset/base/294462

Log:
  Add strlcat and strlcpy to libstand on ia64.  This is conceptually part
  of the MFC done in r294342, but since ia64 is gone in -current this is a
  direct commit to 10-stable to add the functions.

Modified:
  stable/10/lib/libstand/Makefile

Modified: stable/10/lib/libstand/Makefile
==============================================================================
--- stable/10/lib/libstand/Makefile	Wed Jan 20 21:54:43 2016	(r294461)
+++ stable/10/lib/libstand/Makefile	Wed Jan 20 22:05:49 2016	(r294462)
@@ -86,6 +86,7 @@ SRCS+=	aeabi_memcmp.S aeabi_memcpy.S aea
 .PATH: ${.CURDIR}/../libc/ia64/string
 SRCS+=	bcmp.c bcopy.S bzero.S ffs.S memccpy.c memchr.c memcmp.c memcpy.S \
 	memmove.S memset.c strcat.c strchr.c strcmp.c strcpy.c strcspn.c \
+	strlcat.c strlcpy.c \
 	strlen.c strncat.c strncmp.c strncpy.c strpbrk.c strrchr.c strsep.c \
 	strspn.c strstr.c strtok.c swab.c
 

From owner-svn-src-all@freebsd.org  Wed Jan 20 22:18:49 2016
Return-Path: <owner-svn-src-all@freebsd.org>
Delivered-To: svn-src-all@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8F978A89C1B;
 Wed, 20 Jan 2016 22:18:49 +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 7D7821247;
 Wed, 20 Jan 2016 22:18:49 +0000 (UTC)
 (envelope-from bdrewery@FreeBSD.org)
Received: from mail.xzibition.com (localhost [IPv6:::1])
 by freefall.freebsd.org (Postfix) with ESMTP id 7625316BF;
 Wed, 20 Jan 2016 22:18:49 +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 31F0D190BC;
 Wed, 20 Jan 2016 22:18:49 +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 ZCLUWWa31Cjq; Wed, 20 Jan 2016 22:18:47 +0000 (UTC)
Subject: Re: svn commit: r294444 - in head/sys/modules: ix ixlv ixv
DKIM-Filter: OpenDKIM Filter v2.9.2 mail.xzibition.com F28A7190B7
To: Warner Losh <imp@bsdimp.com>
References: <201601201645.u0KGjeN2029336@repo.freebsd.org>
 <56A002DA.5030003@FreeBSD.org>
 <5CEF44A4-3121-4A16-AB52-84CACB3F2C7F@bsdimp.com>
Cc: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-head@freebsd.org
From: Bryan Drewery <bdrewery@FreeBSD.org>
Openpgp: id=F9173CB2C3AAEA7A5C8A1F0935D771BB6E4697CF;
 url=http://www.shatow.net/bryan/bryan2.asc
X-Enigmail-Draft-Status: N1110
Organization: FreeBSD
Message-ID: <56A007CA.2030507@FreeBSD.org>
Date: Wed, 20 Jan 2016 14:18:50 -0800
User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:38.0) Gecko/20100101
 Thunderbird/38.5.1
MIME-Version: 1.0
In-Reply-To: <5CEF44A4-3121-4A16-AB52-84CACB3F2C7F@bsdimp.com>
Content-Type: multipart/signed; micalg=pgp-sha1;
 protocol="application/pgp-signature";
 boundary="okjFKgG55wl91dk1AuRv3rT09XTeVuHuD"
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.20
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for &quot;
 user&quot; and &quot; projects&quot; \)" <svn-src-all.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-all/>
List-Post: <mailto:svn-src-all@freebsd.org>
List-Help: <mailto:svn-src-all-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Wed, 20 Jan 2016 22:18:49 -0000

This is an OpenPGP/MIME signed message (RFC 4880 and 3156)
--okjFKgG55wl91dk1AuRv3rT09XTeVuHuD
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable

On 1/20/2016 1:59 PM, Warner Losh wrote:
> It would work built part of buildkernel since pci_iov_if.h would exist =
there. It would fail when built by hand since the kernel config didn=E2=80=
=99t save us.
>=20

I don't understand. The problem was seen in buildkernel.

>=20
>=20
>> On Jan 20, 2016, at 1:57 PM, Bryan Drewery <bdrewery@FreeBSD.org> wrot=
e:
>>
>> I have no idea how this was working before and why it took so long to
>> manifest. Many people reported failures here in the last day and
>> confirmed this fixed it.
>>



--=20
Regards,
Bryan Drewery


--okjFKgG55wl91dk1AuRv3rT09XTeVuHuD
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

iQEcBAEBAgAGBQJWoAfKAAoJEDXXcbtuRpfPzYwIAMzoFIt/A4/01kqrerojBY2V
ltn3NqIWoKgeRDsS3q/hexO9mSuzYdpBGfIr/XWb1SPZOom7BSxK+J5f75b2rxfW
N4PoYJWBly6tFwugE2r54SuWxQstgti5w73yID76OjyQR32DzpGKYEufqfRHJ7Vm
5HOrtL5ImN8Ii6ISksop9plZm6WodoVqOL+XDNosGc2H6SW6aNZhP2ciS+db0HzQ
2iNAogy3ffASWj3n9ALJyJ26s7RiyeNAhQRz4R6pFTj+f51oR5DEOH493/Rni0fA
mGJweIctyu4QeDfKs5Gkcul2aRHzgVSk4HupuB8apbYAUlW1/XqiEgSpiFdXszk=
=9AUA
-----END PGP SIGNATURE-----

--okjFKgG55wl91dk1AuRv3rT09XTeVuHuD--

From owner-svn-src-all@freebsd.org  Wed Jan 20 22:23:10 2016
Return-Path: <owner-svn-src-all@freebsd.org>
Delivered-To: svn-src-all@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id 52352A89FB9;
 Wed, 20 Jan 2016 22:23:10 +0000 (UTC)
 (envelope-from brooks@FreeBSD.org)
Received: from repo.freebsd.org (repo.freebsd.org
 [IPv6:2610:1c1:1:6068::e6a:0])
 (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
 (Client did not present a certificate)
 by mx1.freebsd.org (Postfix) with ESMTPS id 250521764;
 Wed, 20 Jan 2016 22:23:10 +0000 (UTC)
 (envelope-from brooks@FreeBSD.org)
Received: from repo.freebsd.org ([127.0.1.37])
 by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u0KMN9GR045947;
 Wed, 20 Jan 2016 22:23:09 GMT (envelope-from brooks@FreeBSD.org)
Received: (from brooks@localhost)
 by repo.freebsd.org (8.15.2/8.15.2/Submit) id u0KMN9G5045946;
 Wed, 20 Jan 2016 22:23:09 GMT (envelope-from brooks@FreeBSD.org)
Message-Id: <201601202223.u0KMN9G5045946@repo.freebsd.org>
X-Authentication-Warning: repo.freebsd.org: brooks set sender to
 brooks@FreeBSD.org using -f
From: Brooks Davis <brooks@FreeBSD.org>
Date: Wed, 20 Jan 2016 22:23:09 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-head@freebsd.org
Subject: svn commit: r294463 - head/sys/mips/include
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.20
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for &quot;
 user&quot; and &quot; projects&quot; \)" <svn-src-all.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-all/>
List-Post: <mailto:svn-src-all@freebsd.org>
List-Help: <mailto:svn-src-all-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Wed, 20 Jan 2016 22:23:10 -0000

Author: brooks
Date: Wed Jan 20 22:23:08 2016
New Revision: 294463
URL: https://svnweb.freebsd.org/changeset/base/294463

Log:
  Shift saved floating point registers up in jmp_buf.
  
  sigmask_t is 128-bits so requires two slots.
  
  Approved by:	CheriBSD (93699cb9b6e73980ac369e379cea9772c9494ccc)
  MFC after:	1 week
  Sponsored by:	DARPA, AFRL

Modified:
  head/sys/mips/include/asm.h

Modified: head/sys/mips/include/asm.h
==============================================================================
--- head/sys/mips/include/asm.h	Wed Jan 20 22:05:49 2016	(r294462)
+++ head/sys/mips/include/asm.h	Wed Jan 20 22:23:08 2016	(r294463)
@@ -666,20 +666,21 @@ _C_LABEL(x):
 /* Only valid with the _JB_MAGIC_SETJMP magic */
 
 #define _JB_SIGMASK		13
+#define	__JB_SIGMASK_REMAINDER	14	/* sigmask_t is 128-bits */
 
-#define _JB_FPREG_F20		14
-#define _JB_FPREG_F21		15
-#define _JB_FPREG_F22		16
-#define _JB_FPREG_F23		17
-#define _JB_FPREG_F24		18
-#define _JB_FPREG_F25		19
-#define _JB_FPREG_F26		20
-#define _JB_FPREG_F27		21
-#define _JB_FPREG_F28		22
-#define _JB_FPREG_F29		23
-#define _JB_FPREG_F30		24
-#define _JB_FPREG_F31		25
-#define _JB_FPREG_FCSR		26
+#define _JB_FPREG_F20		15
+#define _JB_FPREG_F21		16
+#define _JB_FPREG_F22		17
+#define _JB_FPREG_F23		18
+#define _JB_FPREG_F24		19
+#define _JB_FPREG_F25		20
+#define _JB_FPREG_F26		21
+#define _JB_FPREG_F27		22
+#define _JB_FPREG_F28		23
+#define _JB_FPREG_F29		24
+#define _JB_FPREG_F30		25
+#define _JB_FPREG_F31		26
+#define _JB_FPREG_FCSR		27
 
 /*
  * Various macros for dealing with TLB hazards

From owner-svn-src-all@freebsd.org  Wed Jan 20 22:57:12 2016
Return-Path: <owner-svn-src-all@freebsd.org>
Delivered-To: svn-src-all@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id A16B9A8AB8E;
 Wed, 20 Jan 2016 22:57:12 +0000 (UTC) (envelope-from des@FreeBSD.org)
Received: from repo.freebsd.org (repo.freebsd.org
 [IPv6:2610:1c1:1:6068::e6a:0])
 (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
 (Client did not present a certificate)
 by mx1.freebsd.org (Postfix) with ESMTPS id 38DAB1597;
 Wed, 20 Jan 2016 22:57:12 +0000 (UTC) (envelope-from des@FreeBSD.org)
Received: from repo.freebsd.org ([127.0.1.37])
 by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u0KMvBob056095;
 Wed, 20 Jan 2016 22:57:11 GMT (envelope-from des@FreeBSD.org)
Received: (from des@localhost)
 by repo.freebsd.org (8.15.2/8.15.2/Submit) id u0KMvA89056089;
 Wed, 20 Jan 2016 22:57:10 GMT (envelope-from des@FreeBSD.org)
Message-Id: <201601202257.u0KMvA89056089@repo.freebsd.org>
X-Authentication-Warning: repo.freebsd.org: des set sender to des@FreeBSD.org
 using -f
From: =?UTF-8?Q?Dag-Erling_Sm=c3=b8rgrav?= <des@FreeBSD.org>
Date: Wed, 20 Jan 2016 22:57:10 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-head@freebsd.org
Subject: svn commit: r294464 - in head: crypto/openssh
 crypto/openssh/contrib/redhat crypto/openssh/contrib/suse
 crypto/openssh/openbsd-compat crypto/openssh/regress
 crypto/openssh/regress/unittests crypto/...
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.20
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for &quot;
 user&quot; and &quot; projects&quot; \)" <svn-src-all.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-all/>
List-Post: <mailto:svn-src-all@freebsd.org>
List-Help: <mailto:svn-src-all-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Wed, 20 Jan 2016 22:57:12 -0000

Author: des
Date: Wed Jan 20 22:57:10 2016
New Revision: 294464
URL: https://svnweb.freebsd.org/changeset/base/294464

Log:
  Upgrade to OpenSSH 7.0p1.

Modified:
  head/crypto/openssh/ChangeLog
  head/crypto/openssh/OVERVIEW
  head/crypto/openssh/PROTOCOL
  head/crypto/openssh/PROTOCOL.mux
  head/crypto/openssh/README
  head/crypto/openssh/addrmatch.c
  head/crypto/openssh/auth-options.c
  head/crypto/openssh/auth.c
  head/crypto/openssh/auth2-chall.c
  head/crypto/openssh/authfd.c
  head/crypto/openssh/authfile.c
  head/crypto/openssh/cipher.h
  head/crypto/openssh/clientloop.c
  head/crypto/openssh/compat.c
  head/crypto/openssh/config.h
  head/crypto/openssh/config.h.in
  head/crypto/openssh/configure
  head/crypto/openssh/configure.ac
  head/crypto/openssh/contrib/redhat/openssh.spec
  head/crypto/openssh/contrib/suse/openssh.spec
  head/crypto/openssh/kex.c
  head/crypto/openssh/kex.h
  head/crypto/openssh/key.c
  head/crypto/openssh/key.h
  head/crypto/openssh/krl.c
  head/crypto/openssh/log.c
  head/crypto/openssh/moduli
  head/crypto/openssh/moduli.0
  head/crypto/openssh/myproposal.h
  head/crypto/openssh/openbsd-compat/openbsd-compat.h
  head/crypto/openssh/openbsd-compat/port-linux.c
  head/crypto/openssh/openbsd-compat/realpath.c
  head/crypto/openssh/packet.c
  head/crypto/openssh/readconf.c
  head/crypto/openssh/readconf.h
  head/crypto/openssh/regress/cert-hostkey.sh
  head/crypto/openssh/regress/cert-userkey.sh
  head/crypto/openssh/regress/hostkey-agent.sh
  head/crypto/openssh/regress/hostkey-rotate.sh
  head/crypto/openssh/regress/keygen-knownhosts.sh
  head/crypto/openssh/regress/keytype.sh
  head/crypto/openssh/regress/principals-command.sh
  head/crypto/openssh/regress/unittests/Makefile.inc
  head/crypto/openssh/regress/unittests/kex/test_kex.c
  head/crypto/openssh/regress/unittests/sshkey/mktestdata.sh
  head/crypto/openssh/regress/unittests/sshkey/test_file.c
  head/crypto/openssh/regress/unittests/sshkey/test_sshkey.c
  head/crypto/openssh/regress/unittests/sshkey/testdata/dsa_1
  head/crypto/openssh/regress/unittests/sshkey/testdata/dsa_1-cert.fp
  head/crypto/openssh/regress/unittests/sshkey/testdata/dsa_1-cert.pub
  head/crypto/openssh/regress/unittests/sshkey/testdata/dsa_1.fp
  head/crypto/openssh/regress/unittests/sshkey/testdata/dsa_1.fp.bb
  head/crypto/openssh/regress/unittests/sshkey/testdata/dsa_1.param.g
  head/crypto/openssh/regress/unittests/sshkey/testdata/dsa_1.param.priv
  head/crypto/openssh/regress/unittests/sshkey/testdata/dsa_1.param.pub
  head/crypto/openssh/regress/unittests/sshkey/testdata/dsa_1.pub
  head/crypto/openssh/regress/unittests/sshkey/testdata/dsa_1_pw
  head/crypto/openssh/regress/unittests/sshkey/testdata/dsa_2
  head/crypto/openssh/regress/unittests/sshkey/testdata/dsa_2.fp
  head/crypto/openssh/regress/unittests/sshkey/testdata/dsa_2.fp.bb
  head/crypto/openssh/regress/unittests/sshkey/testdata/dsa_2.pub
  head/crypto/openssh/regress/unittests/sshkey/testdata/dsa_n
  head/crypto/openssh/regress/unittests/sshkey/testdata/dsa_n_pw
  head/crypto/openssh/regress/unittests/sshkey/testdata/ecdsa_1
  head/crypto/openssh/regress/unittests/sshkey/testdata/ecdsa_1-cert.fp
  head/crypto/openssh/regress/unittests/sshkey/testdata/ecdsa_1-cert.pub
  head/crypto/openssh/regress/unittests/sshkey/testdata/ecdsa_1.fp
  head/crypto/openssh/regress/unittests/sshkey/testdata/ecdsa_1.fp.bb
  head/crypto/openssh/regress/unittests/sshkey/testdata/ecdsa_1.param.priv
  head/crypto/openssh/regress/unittests/sshkey/testdata/ecdsa_1.param.pub
  head/crypto/openssh/regress/unittests/sshkey/testdata/ecdsa_1.pub
  head/crypto/openssh/regress/unittests/sshkey/testdata/ecdsa_1_pw
  head/crypto/openssh/regress/unittests/sshkey/testdata/ecdsa_2
  head/crypto/openssh/regress/unittests/sshkey/testdata/ecdsa_2.fp
  head/crypto/openssh/regress/unittests/sshkey/testdata/ecdsa_2.fp.bb
  head/crypto/openssh/regress/unittests/sshkey/testdata/ecdsa_2.param.priv
  head/crypto/openssh/regress/unittests/sshkey/testdata/ecdsa_2.param.pub
  head/crypto/openssh/regress/unittests/sshkey/testdata/ecdsa_2.pub
  head/crypto/openssh/regress/unittests/sshkey/testdata/ecdsa_n
  head/crypto/openssh/regress/unittests/sshkey/testdata/ecdsa_n_pw
  head/crypto/openssh/regress/unittests/sshkey/testdata/ed25519_1
  head/crypto/openssh/regress/unittests/sshkey/testdata/ed25519_1-cert.fp
  head/crypto/openssh/regress/unittests/sshkey/testdata/ed25519_1-cert.pub
  head/crypto/openssh/regress/unittests/sshkey/testdata/ed25519_1.fp
  head/crypto/openssh/regress/unittests/sshkey/testdata/ed25519_1.fp.bb
  head/crypto/openssh/regress/unittests/sshkey/testdata/ed25519_1.pub
  head/crypto/openssh/regress/unittests/sshkey/testdata/ed25519_1_pw
  head/crypto/openssh/regress/unittests/sshkey/testdata/ed25519_2
  head/crypto/openssh/regress/unittests/sshkey/testdata/ed25519_2.fp
  head/crypto/openssh/regress/unittests/sshkey/testdata/ed25519_2.fp.bb
  head/crypto/openssh/regress/unittests/sshkey/testdata/ed25519_2.pub
  head/crypto/openssh/regress/unittests/sshkey/testdata/rsa1_1
  head/crypto/openssh/regress/unittests/sshkey/testdata/rsa1_1.fp
  head/crypto/openssh/regress/unittests/sshkey/testdata/rsa1_1.fp.bb
  head/crypto/openssh/regress/unittests/sshkey/testdata/rsa1_1.param.n
  head/crypto/openssh/regress/unittests/sshkey/testdata/rsa1_1.pub
  head/crypto/openssh/regress/unittests/sshkey/testdata/rsa1_1_pw
  head/crypto/openssh/regress/unittests/sshkey/testdata/rsa1_2
  head/crypto/openssh/regress/unittests/sshkey/testdata/rsa1_2.fp
  head/crypto/openssh/regress/unittests/sshkey/testdata/rsa1_2.fp.bb
  head/crypto/openssh/regress/unittests/sshkey/testdata/rsa1_2.param.n
  head/crypto/openssh/regress/unittests/sshkey/testdata/rsa1_2.pub
  head/crypto/openssh/regress/unittests/sshkey/testdata/rsa_1
  head/crypto/openssh/regress/unittests/sshkey/testdata/rsa_1-cert.fp
  head/crypto/openssh/regress/unittests/sshkey/testdata/rsa_1-cert.pub
  head/crypto/openssh/regress/unittests/sshkey/testdata/rsa_1.fp
  head/crypto/openssh/regress/unittests/sshkey/testdata/rsa_1.fp.bb
  head/crypto/openssh/regress/unittests/sshkey/testdata/rsa_1.param.n
  head/crypto/openssh/regress/unittests/sshkey/testdata/rsa_1.param.p
  head/crypto/openssh/regress/unittests/sshkey/testdata/rsa_1.param.q
  head/crypto/openssh/regress/unittests/sshkey/testdata/rsa_1.pub
  head/crypto/openssh/regress/unittests/sshkey/testdata/rsa_1_pw
  head/crypto/openssh/regress/unittests/sshkey/testdata/rsa_2
  head/crypto/openssh/regress/unittests/sshkey/testdata/rsa_2.fp
  head/crypto/openssh/regress/unittests/sshkey/testdata/rsa_2.fp.bb
  head/crypto/openssh/regress/unittests/sshkey/testdata/rsa_2.param.n
  head/crypto/openssh/regress/unittests/sshkey/testdata/rsa_2.param.p
  head/crypto/openssh/regress/unittests/sshkey/testdata/rsa_2.param.q
  head/crypto/openssh/regress/unittests/sshkey/testdata/rsa_2.pub
  head/crypto/openssh/regress/unittests/sshkey/testdata/rsa_n
  head/crypto/openssh/regress/unittests/sshkey/testdata/rsa_n_pw
  head/crypto/openssh/sandbox-systrace.c
  head/crypto/openssh/scp.0
  head/crypto/openssh/scp.1
  head/crypto/openssh/servconf.c
  head/crypto/openssh/servconf.h
  head/crypto/openssh/sftp-server.0
  head/crypto/openssh/sftp.0
  head/crypto/openssh/ssh-add.0
  head/crypto/openssh/ssh-add.c
  head/crypto/openssh/ssh-agent.0
  head/crypto/openssh/ssh-agent.c
  head/crypto/openssh/ssh-keygen.0
  head/crypto/openssh/ssh-keygen.1
  head/crypto/openssh/ssh-keygen.c
  head/crypto/openssh/ssh-keyscan.0
  head/crypto/openssh/ssh-keysign.0
  head/crypto/openssh/ssh-keysign.c
  head/crypto/openssh/ssh-pkcs11-helper.0
  head/crypto/openssh/ssh-pkcs11.c
  head/crypto/openssh/ssh.0
  head/crypto/openssh/ssh.1
  head/crypto/openssh/ssh.c
  head/crypto/openssh/ssh.h
  head/crypto/openssh/ssh_config.0
  head/crypto/openssh/ssh_config.5
  head/crypto/openssh/ssh_namespace.h
  head/crypto/openssh/sshconnect2.c
  head/crypto/openssh/sshd.0
  head/crypto/openssh/sshd.8
  head/crypto/openssh/sshd.c
  head/crypto/openssh/sshd_config
  head/crypto/openssh/sshd_config.0
  head/crypto/openssh/sshd_config.5
  head/crypto/openssh/sshkey.c
  head/crypto/openssh/sshkey.h
  head/crypto/openssh/sshpty.c
  head/crypto/openssh/version.h
  head/secure/lib/libssh/Makefile
Directory Properties:
  head/crypto/openssh/   (props changed)

Modified: head/crypto/openssh/ChangeLog
==============================================================================
--- head/crypto/openssh/ChangeLog	Wed Jan 20 22:23:08 2016	(r294463)
+++ head/crypto/openssh/ChangeLog	Wed Jan 20 22:57:10 2016	(r294464)
@@ -1,3 +1,575 @@
+commit 1dc8d93ce69d6565747eb44446ed117187621b26
+Author: deraadt@openbsd.org <deraadt@openbsd.org>
+Date:   Thu Aug 6 14:53:21 2015 +0000
+
+    upstream commit
+    
+    add prohibit-password as a synonymn for without-password,
+     since the without-password is causing too many questions.  Harden it to ban
+     all but pubkey, hostbased, and GSSAPI auth (when the latter is enabled) from
+     djm, ok markus
+    
+    Upstream-ID: d53317d7b28942153e6236d3fd6e12ceb482db7a
+
+commit 90a95a4745a531b62b81ce3b025e892bdc434de5
+Author: Damien Miller <djm@mindrot.org>
+Date:   Tue Aug 11 13:53:41 2015 +1000
+
+    update version in README
+
+commit 318c37743534b58124f1bab37a8a0087a3a9bd2f
+Author: Damien Miller <djm@mindrot.org>
+Date:   Tue Aug 11 13:53:09 2015 +1000
+
+    update versions in *.spec
+
+commit 5e75f5198769056089fb06c4d738ab0e5abc66f7
+Author: Damien Miller <djm@mindrot.org>
+Date:   Tue Aug 11 13:34:12 2015 +1000
+
+    set sshpam_ctxt to NULL after free
+    
+    Avoids use-after-free in monitor when privsep child is compromised.
+    Reported by Moritz Jodeit; ok dtucker@
+
+commit d4697fe9a28dab7255c60433e4dd23cf7fce8a8b
+Author: Damien Miller <djm@mindrot.org>
+Date:   Tue Aug 11 13:33:24 2015 +1000
+
+    Don't resend username to PAM; it already has it.
+    
+    Pointed out by Moritz Jodeit; ok dtucker@
+
+commit 88763a6c893bf3dfe951ba9271bf09715e8d91ca
+Author: Darren Tucker <dtucker@zip.com.au>
+Date:   Mon Jul 27 12:14:25 2015 +1000
+
+    Import updated moduli file from OpenBSD.
+
+commit 55b263fb7cfeacb81aaf1c2036e0394c881637da
+Author: Damien Miller <djm@mindrot.org>
+Date:   Mon Aug 10 11:13:44 2015 +1000
+
+    let principals-command.sh work for noexec /var/run
+
+commit 2651e34cd11b1aac3a0fe23b86d8c2ff35c07897
+Author: Damien Miller <djm@mindrot.org>
+Date:   Thu Aug 6 11:43:42 2015 +1000
+
+    work around echo -n / sed behaviour in tests
+
+commit d85dad81778c1aa8106acd46930b25fdf0d15b2a
+Author: djm@openbsd.org <djm@openbsd.org>
+Date:   Wed Aug 5 05:27:33 2015 +0000
+
+    upstream commit
+    
+    adjust for RSA minimum modulus switch; ok deraadt@
+    
+    Upstream-Regress-ID: 5a72c83431b96224d583c573ca281cd3a3ebfdae
+
+commit 57e8e229bad5fe6056b5f1199665f5f7008192c6
+Author: djm@openbsd.org <djm@openbsd.org>
+Date:   Tue Aug 4 05:23:06 2015 +0000
+
+    upstream commit
+    
+    backout SSH_RSA_MINIMUM_MODULUS_SIZE increase for this
+     release; problems spotted by sthen@ ok deraadt@ markus@
+    
+    Upstream-ID: d0bd60dde9e8c3cd7030007680371894c1499822
+
+commit f097d0ea1e0889ca0fa2e53a00214e43ab7fa22a
+Author: djm@openbsd.org <djm@openbsd.org>
+Date:   Sun Aug 2 09:56:42 2015 +0000
+
+    upstream commit
+    
+    openssh 7.0; ok deraadt@
+    
+    Upstream-ID: c63afdef537f57f28ae84145c5a8e29e9250221f
+
+commit 3d5728a0f6874ce4efb16913a12963595070f3a9
+Author: chris@openbsd.org <chris@openbsd.org>
+Date:   Fri Jul 31 15:38:09 2015 +0000
+
+    upstream commit
+    
+    Allow PermitRootLogin to be overridden by config
+    
+    ok markus@ deeradt@
+    
+    Upstream-ID: 5cf3e26ed702888de84e2dc9d0054ccf4d9125b4
+
+commit 6f941396b6835ad18018845f515b0c4fe20be21a
+Author: djm@openbsd.org <djm@openbsd.org>
+Date:   Thu Jul 30 23:09:15 2015 +0000
+
+    upstream commit
+    
+    fix pty permissions; patch from Nikolay Edigaryev; ok
+     deraadt
+    
+    Upstream-ID: 40ff076d2878b916fbfd8e4f45dbe5bec019e550
+
+commit f4373ed1e8fbc7c8ce3fc4ea97d0ba2e0c1d7ef0
+Author: deraadt@openbsd.org <deraadt@openbsd.org>
+Date:   Thu Jul 30 19:23:02 2015 +0000
+
+    upstream commit
+    
+    change default: PermitRootLogin without-password matching
+     install script changes coming as well ok djm markus
+    
+    Upstream-ID: 0e2a6c4441daf5498b47a61767382bead5eb8ea6
+
+commit 0c30ba91f87fcda7e975e6ff8a057f624e87ea1c
+Author: Damien Miller <djm@mindrot.org>
+Date:   Thu Jul 30 12:31:39 2015 +1000
+
+    downgrade OOM adjustment logging: verbose -> debug
+
+commit f9eca249d4961f28ae4b09186d7dc91de74b5895
+Author: djm@openbsd.org <djm@openbsd.org>
+Date:   Thu Jul 30 00:01:34 2015 +0000
+
+    upstream commit
+    
+    Allow ssh_config and sshd_config kex parameters options be
+     prefixed by a '+' to indicate that the specified items be appended to the
+     default rather than replacing it.
+    
+    approach suggested by dtucker@, feedback dlg@, ok markus@
+    
+    Upstream-ID: 0f901137298fc17095d5756ff1561a7028e8882a
+
+commit 5cefe769105a2a2e3ca7479d28d9a325d5ef0163
+Author: djm@openbsd.org <djm@openbsd.org>
+Date:   Wed Jul 29 08:34:54 2015 +0000
+
+    upstream commit
+    
+    fix bug in previous; was printing incorrect string for
+     failed host key algorithms negotiation
+    
+    Upstream-ID: 22c0dc6bc61930513065d92e11f0753adc4c6e6e
+
+commit f319912b0d0e1675b8bb051ed8213792c788bcb2
+Author: djm@openbsd.org <djm@openbsd.org>
+Date:   Wed Jul 29 04:43:06 2015 +0000
+
+    upstream commit
+    
+    include the peer's offer when logging a failure to
+     negotiate a mutual set of algorithms (kex, pubkey, ciphers, etc.) ok markus@
+    
+    Upstream-ID: bbb8caabf5c01790bb845f5ce135565248d7c796
+
+commit b6ea0e573042eb85d84defb19227c89eb74cf05a
+Author: djm@openbsd.org <djm@openbsd.org>
+Date:   Tue Jul 28 23:20:42 2015 +0000
+
+    upstream commit
+    
+    add Cisco to the list of clients that choke on the
+     hostkeys update extension. Pointed out by Howard Kash
+    
+    Upstream-ID: c9eadde28ecec056c73d09ee10ba4570dfba7e84
+
+commit 3f628c7b537291c1019ce86af90756fb4e66d0fd
+Author: guenther@openbsd.org <guenther@openbsd.org>
+Date:   Mon Jul 27 16:29:23 2015 +0000
+
+    upstream commit
+    
+    Permit kbind(2) use in the sandbox now, to ease testing
+     of ld.so work using it
+    
+    reminded by miod@, ok deraadt@
+    
+    Upstream-ID: 523922e4d1ba7a091e3824e77a8a3c818ee97413
+
+commit ebe27ebe520098bbc0fe58945a87ce8490121edb
+Author: millert@openbsd.org <millert@openbsd.org>
+Date:   Mon Jul 20 18:44:12 2015 +0000
+
+    upstream commit
+    
+    Move .Pp before .Bl, not after to quiet mandoc -Tlint.
+     Noticed by jmc@
+    
+    Upstream-ID: 59fadbf8407cec4e6931e50c53cfa0214a848e23
+
+commit d5d91d0da819611167782c66ab629159169d94d4
+Author: millert@openbsd.org <millert@openbsd.org>
+Date:   Mon Jul 20 18:42:35 2015 +0000
+
+    upstream commit
+    
+    Sync usage with SYNOPSIS
+    
+    Upstream-ID: 7a321a170181a54f6450deabaccb6ef60cf3f0b7
+
+commit 79ec2142fbc68dd2ed9688608da355fc0b1ed743
+Author: millert@openbsd.org <millert@openbsd.org>
+Date:   Mon Jul 20 15:39:52 2015 +0000
+
+    upstream commit
+    
+    Better desciption of Unix domain socket forwarding.
+     bz#2423; ok jmc@
+    
+    Upstream-ID: 85e28874726897e3f26ae50dfa2e8d2de683805d
+
+commit d56fd1828074a4031b18b8faa0bf949669eb18a0
+Author: Damien Miller <djm@mindrot.org>
+Date:   Mon Jul 20 11:19:51 2015 +1000
+
+    make realpath.c compile -Wsign-compare clean
+
+commit c63c9a691dca26bb7648827f5a13668832948929
+Author: djm@openbsd.org <djm@openbsd.org>
+Date:   Mon Jul 20 00:30:01 2015 +0000
+
+    upstream commit
+    
+    mention that the default of UseDNS=no implies that
+     hostnames cannot be used for host matching in sshd_config and
+     authorized_keys; bz#2045, ok dtucker@
+    
+    Upstream-ID: 0812705d5f2dfa59aab01f2764ee800b1741c4e1
+
+commit 63ebcd0005e9894fcd6871b7b80aeea1fec0ff76
+Author: djm@openbsd.org <djm@openbsd.org>
+Date:   Sat Jul 18 08:02:17 2015 +0000
+
+    upstream commit
+    
+    don't ignore PKCS#11 hosted keys that return empty
+     CKA_ID; patch by Jakub Jelen via bz#2429; ok markus
+    
+    Upstream-ID: 2f7c94744eb0342f8ee8bf97b2351d4e00116485
+
+commit b15fd989c8c62074397160147a8d5bc34b3f3c63
+Author: djm@openbsd.org <djm@openbsd.org>
+Date:   Sat Jul 18 08:00:21 2015 +0000
+
+    upstream commit
+    
+    skip uninitialised PKCS#11 slots; patch from Jakub Jelen
+     in bz#2427 ok markus@
+    
+    Upstream-ID: 744c1e7796e237ad32992d0d02148e8a18f27d29
+
+commit 5b64f85bb811246c59ebab70aed331f26ba37b18
+Author: djm@openbsd.org <djm@openbsd.org>
+Date:   Sat Jul 18 07:57:14 2015 +0000
+
+    upstream commit
+    
+    only query each keyboard-interactive device once per
+     authentication request regardless of how many times it is listed; ok markus@
+    
+    Upstream-ID: d73fafba6e86030436ff673656ec1f33d9ffeda1
+
+commit cd7324d0667794eb5c236d8a4e0f236251babc2d
+Author: djm@openbsd.org <djm@openbsd.org>
+Date:   Fri Jul 17 03:34:27 2015 +0000
+
+    upstream commit
+    
+    remove -u flag to diff (only used for error output) to make
+     things easier for -portable
+    
+    Upstream-Regress-ID: a5d6777d2909540d87afec3039d9bb2414ade548
+
+commit deb8d99ecba70b67f4af7880b11ca8768df9ec3a
+Author: djm@openbsd.org <djm@openbsd.org>
+Date:   Fri Jul 17 03:09:19 2015 +0000
+
+    upstream commit
+    
+    direct-streamlocal@openssh.com Unix domain foward
+     messages do not contain a "reserved for future use" field and in fact,
+     serverloop.c checks that there isn't one. Remove erroneous mention from
+     PROTOCOL description. bz#2421 from Daniel Black
+    
+    Upstream-ID: 3d51a19e64f72f764682f1b08f35a8aa810a43ac
+
+commit 356b61f365405b5257f5b2ab446e5d7bd33a7b52
+Author: djm@openbsd.org <djm@openbsd.org>
+Date:   Fri Jul 17 03:04:27 2015 +0000
+
+    upstream commit
+    
+    describe magic for setting up Unix domain socket fowards
+     via the mux channel; bz#2422 patch from Daniel Black
+    
+    Upstream-ID: 943080fe3864715c423bdeb7c920bb30c4eee861
+
+commit d3e2aee41487d55b8d7d40f538b84ff1db7989bc
+Author: Darren Tucker <dtucker@zip.com.au>
+Date:   Fri Jul 17 12:52:34 2015 +1000
+
+    Check if realpath works on nonexistent files.
+    
+    On some platforms the native realpath doesn't work with non-existent
+    files (this is actually specified in some versions of POSIX), however
+    the sftp spec says its realpath with "canonicalize any given path name".
+    On those platforms, use realpath from the compat library.
+    
+    In addition, when compiling with -DFORTIFY_SOURCE, glibc redefines
+    the realpath symbol to the checked version, so redefine ours to
+    something else so we pick up the compat version we want.
+    
+    bz#2428, ok djm@
+
+commit 25b14610dab655646a109db5ef8cb4c4bf2a48a0
+Author: djm@openbsd.org <djm@openbsd.org>
+Date:   Fri Jul 17 02:47:45 2015 +0000
+
+    upstream commit
+    
+    fix incorrect test for SSH1 keys when compiled without SSH1
+     support
+    
+    Upstream-ID: 6004d720345b8e481c405e8ad05ce2271726e451
+
+commit df56a8035d429b2184ee94aaa7e580c1ff67f73a
+Author: djm@openbsd.org <djm@openbsd.org>
+Date:   Wed Jul 15 08:00:11 2015 +0000
+
+    upstream commit
+    
+    fix NULL-deref when SSH1 reenabled
+    
+    Upstream-ID: f22fd805288c92b3e9646782d15b48894b2d5295
+
+commit 41e38c4d49dd60908484e6703316651333f16b93
+Author: djm@openbsd.org <djm@openbsd.org>
+Date:   Wed Jul 15 07:19:50 2015 +0000
+
+    upstream commit
+    
+    regen RSA1 test keys; the last batch was missing their
+     private parts
+    
+    Upstream-Regress-ID: 7ccf437305dd63ff0b48dd50c5fd0f4d4230c10a
+
+commit 5bf0933184cb622ca3f96d224bf3299fd2285acc
+Author: markus@openbsd.org <markus@openbsd.org>
+Date:   Fri Jul 10 06:23:25 2015 +0000
+
+    upstream commit
+    
+    Adapt tests, now that DSA if off by default; use
+     PubkeyAcceptedKeyTypes and PubkeyAcceptedKeyTypes to test DSA.
+    
+    Upstream-Regress-ID: 0ff2a3ff5ac1ce5f92321d27aa07b98656efcc5c
+
+commit 7a6e3fd7b41dbd3756b6bf9acd67954c0b1564cc
+Author: markus@openbsd.org <markus@openbsd.org>
+Date:   Tue Jul 7 14:54:16 2015 +0000
+
+    upstream commit
+    
+    regen test data after mktestdata.sh changes
+    
+    Upstream-Regress-ID: 3495ecb082b9a7c048a2d7c5c845d3bf181d25a4
+
+commit 7c8c174c69f681d4910fa41c37646763692b28e2
+Author: markus@openbsd.org <markus@openbsd.org>
+Date:   Tue Jul 7 14:53:30 2015 +0000
+
+    upstream commit
+    
+    adapt tests to new minimum RSA size and default FP format
+    
+    Upstream-Regress-ID: a4b30afd174ce82b96df14eb49fb0b81398ffd0e
+
+commit 6a977a4b68747ade189e43d302f33403fd4a47ac
+Author: djm@openbsd.org <djm@openbsd.org>
+Date:   Fri Jul 3 04:39:23 2015 +0000
+
+    upstream commit
+    
+    legacy v00 certificates are gone; adapt and don't try to
+     test them; "sure" markus@ dtucker@
+    
+    Upstream-Regress-ID: c57321e69b3cd4a3b3396dfcc43f0803d047da12
+
+commit 0c4123ad5e93fb90fee9c6635b13a6cdabaac385
+Author: djm@openbsd.org <djm@openbsd.org>
+Date:   Wed Jul 1 23:11:18 2015 +0000
+
+    upstream commit
+    
+    don't expect SSH v.1 in unittests
+    
+    Upstream-Regress-ID: f8812b16668ba78e6a698646b2a652b90b653397
+
+commit 3c099845798a817cdde513c39074ec2063781f18
+Author: djm@openbsd.org <djm@openbsd.org>
+Date:   Mon Jun 15 06:38:50 2015 +0000
+
+    upstream commit
+    
+    turn SSH1 back on to match src/usr.bin/ssh being tested
+    
+    Upstream-Regress-ID: 6c4f763a2f0cc6893bf33983919e9030ae638333
+
+commit b1dc2b33689668c75e95f873a42d5aea1f4af1db
+Author: dtucker@openbsd.org <dtucker@openbsd.org>
+Date:   Mon Jul 13 04:57:14 2015 +0000
+
+    upstream commit
+    
+    Add "PuTTY_Local:" to the clients to which we do not
+     offer DH-GEX. This was the string that was used for development versions
+     prior to September 2014 and they don't do RFC4419 DH-GEX, but unfortunately
+     there are some extant products based on those versions.  bx2424 from Jay
+     Rouman, ok markus@ djm@
+    
+    Upstream-ID: be34d41e18b966832fe09ca243d275b81882e1d5
+
+commit 3a1638dda19bbc73d0ae02b4c251ce08e564b4b9
+Author: markus@openbsd.org <markus@openbsd.org>
+Date:   Fri Jul 10 06:21:53 2015 +0000
+
+    upstream commit
+    
+    Turn off DSA by default; add HostKeyAlgorithms to the
+     server and PubkeyAcceptedKeyTypes to the client side, so it still can be
+     tested or turned back on; feedback and ok djm@
+    
+    Upstream-ID: 8450a9e6d83f80c9bfed864ff061dfc9323cec21
+
+commit 16db0a7ee9a87945cc594d13863cfcb86038db59
+Author: markus@openbsd.org <markus@openbsd.org>
+Date:   Thu Jul 9 09:49:46 2015 +0000
+
+    upstream commit
+    
+    re-enable ed25519-certs if compiled w/o openssl; ok djm
+    
+    Upstream-ID: e10c90808b001fd2c7a93778418e9b318f5c4c49
+
+commit c355bf306ac33de6545ce9dac22b84a194601e2f
+Author: markus@openbsd.org <markus@openbsd.org>
+Date:   Wed Jul 8 20:24:02 2015 +0000
+
+    upstream commit
+    
+    no need to include the old buffer/key API
+    
+    Upstream-ID: fb13c9f7c0bba2545f3eb0a0e69cb0030819f52b
+
+commit a3cc48cdf9853f1e832d78cb29bedfab7adce1ee
+Author: markus@openbsd.org <markus@openbsd.org>
+Date:   Wed Jul 8 19:09:25 2015 +0000
+
+    upstream commit
+    
+    typedefs for Cipher&CipherContext are unused
+    
+    Upstream-ID: 50e6a18ee92221d23ad173a96d5b6c42207cf9a7
+
+commit a635bd06b5c427a57c3ae760d3a2730bb2c863c0
+Author: markus@openbsd.org <markus@openbsd.org>
+Date:   Wed Jul 8 19:04:21 2015 +0000
+
+    upstream commit
+    
+    xmalloc.h is unused
+    
+    Upstream-ID: afb532355b7fa7135a60d944ca1e644d1d63cb58
+
+commit 2521cf0e36c7f3f6b19f206da0af134f535e4a31
+Author: markus@openbsd.org <markus@openbsd.org>
+Date:   Wed Jul 8 19:01:15 2015 +0000
+
+    upstream commit
+    
+    compress.c is gone
+    
+    Upstream-ID: 174fa7faa9b9643cba06164b5e498591356fbced
+
+commit c65a7aa6c43aa7a308ee1ab8a96f216169ae9615
+Author: djm@openbsd.org <djm@openbsd.org>
+Date:   Fri Jul 3 04:05:54 2015 +0000
+
+    upstream commit
+    
+    another SSH_RSA_MINIMUM_MODULUS_SIZE that needed
+     cranking
+    
+    Upstream-ID: 9d8826cafe96aab4ae8e2f6fd22800874b7ffef1
+
+commit b1f383da5cd3cb921fc7776f17a14f44b8a31757
+Author: djm@openbsd.org <djm@openbsd.org>
+Date:   Fri Jul 3 03:56:25 2015 +0000
+
+    upstream commit
+    
+    add an XXX reminder for getting correct key paths from
+     sshd_config
+    
+    Upstream-ID: feae52b209d7782ad742df04a4260e9fe41741db
+
+commit 933935ce8d093996c34d7efa4d59113163080680
+Author: djm@openbsd.org <djm@openbsd.org>
+Date:   Fri Jul 3 03:49:45 2015 +0000
+
+    upstream commit
+    
+    refuse to generate or accept RSA keys smaller than 1024
+     bits; feedback and ok dtucker@
+    
+    Upstream-ID: 7ea3d31271366ba264f06e34a3539bf1ac30f0ba
+
+commit bdfd29f60b74f3e678297269dc6247a5699583c1
+Author: djm@openbsd.org <djm@openbsd.org>
+Date:   Fri Jul 3 03:47:00 2015 +0000
+
+    upstream commit
+    
+    turn off 1024 bit diffie-hellman-group1-sha1 key
+     exchange method (already off in server, this turns it off in the client by
+     default too) ok dtucker@
+    
+    Upstream-ID: f59b88f449210ab7acf7d9d88f20f1daee97a4fa
+
+commit c28fc62d789d860c75e23a9fa9fb250eb2beca57
+Author: djm@openbsd.org <djm@openbsd.org>
+Date:   Fri Jul 3 03:43:18 2015 +0000
+
+    upstream commit
+    
+    delete support for legacy v00 certificates; "sure"
+     markus@ dtucker@
+    
+    Upstream-ID: b5b9bb5f9202d09e88f912989d74928601b6636f
+
+commit 564d63e1b4a9637a209d42a9d49646781fc9caef
+Author: djm@openbsd.org <djm@openbsd.org>
+Date:   Wed Jul 1 23:10:47 2015 +0000
+
+    upstream commit
+    
+    Compile-time disable SSH v.1 again
+    
+    Upstream-ID: 1d4b513a3a06232f02650b73bad25100d1b800af
+
+commit 868109b650504dd9bcccdb1f51d0906f967c20ff
+Author: djm@openbsd.org <djm@openbsd.org>
+Date:   Wed Jul 1 02:39:06 2015 +0000
+
+    upstream commit
+    
+    twiddle PermitRootLogin back
+    
+    Upstream-ID: 2bd23976305d0512e9f84d054e1fc23cd70b89f2
+
 commit 7de4b03a6e4071d454b72927ffaf52949fa34545
 Author: djm@openbsd.org <djm@openbsd.org>
 Date:   Wed Jul 1 02:32:17 2015 +0000
@@ -8572,364 +9144,3 @@ Date:   Wed Aug 21 02:38:51 2013 +1000
          fix some whitespace at EOL
          make list of commands an enum rather than a long list of defines
          add -a to usage()
-
-commit acd2060f750c16d48b87b92a10b5a833227baf9d
-Author: Darren Tucker <dtucker@zip.com.au>
-Date:   Thu Aug 8 17:02:12 2013 +1000
-
-     - (dtucker) [regress/Makefile regress/test-exec.sh] Roll back the -nt
-       removal.  The "make clean" removes modpipe which is built by the top-level
-       directory before running the tests.  Spotted by tim@
-
-commit 9542de4547beebf707f3640082d471f1a85534c9
-Author: Darren Tucker <dtucker@zip.com.au>
-Date:   Thu Aug 8 12:50:06 2013 +1000
-
-     - (dtucker) [misc.c] Remove define added for fallback testing that was
-       mistakenly included in the previous commit.
-
-commit 94396b7f06f512a0acb230640d7f703fb802a9ee
-Author: Darren Tucker <dtucker@zip.com.au>
-Date:   Thu Aug 8 11:52:37 2013 +1000
-
-     - (dtucker) [misc.c] Fall back to time(2) at runtime if clock_gettime(
-       CLOCK_MONOTONIC...) fails.  Some older versions of RHEL have the
-       CLOCK_MONOTONIC define but don't actually support it.  Found and tested
-       by Kevin Brott, ok djm.
-
-commit a5a3cbfa0fb8ef011d3e7b38910a13f6ebbb8818
-Author: Darren Tucker <dtucker@zip.com.au>
-Date:   Thu Aug 8 10:58:49 2013 +1000
-
-     - (dtucker) [regress/Makefile regress/test-exec.sh] Don't try to use test -nt
-       since some platforms (eg really old FreeBSD) don't have it.  Instead,
-       run "make clean" before a complete regress run.  ok djm.
-
-commit f3ab2c5f9cf4aed44971eded3ac9eeb1344b2be5
-Author: Darren Tucker <dtucker@zip.com.au>
-Date:   Sun Aug 4 21:48:41 2013 +1000
-
-     - (dtucker) [auth-krb5.c configure.ac openbsd-compat/bsd-misc.h] Add support
-       for building with older Heimdal versions.  ok djm.
-
-commit ab3575c055adfbce70fa7405345cf0f80b07c827
-Author: Damien Miller <djm@mindrot.org>
-Date:   Thu Aug 1 14:34:16 2013 +1000
-
-     - (djm) [sshlogin.h] Fix prototype merge botch from 2006; bz#2134
-
-commit c192a4c4f6da907dc0e67a3ca61d806f9a92c931
-Author: Damien Miller <djm@mindrot.org>
-Date:   Thu Aug 1 14:29:20 2013 +1000
-
-     - (djm) [channels.c channels.h] bz#2135: On Solaris, isatty() on a non-
-       blocking connecting socket will clear any stored errno that might
-       otherwise have been retrievable via getsockopt(). A hack to limit writes
-       to TTYs on AIX was triggering this. Since only AIX needs the hack, wrap
-       it in an #ifdef. Diagnosis and patch from Ivo Raisr.
-
-commit 81f7cf1ec5bc2fd202eda05abc2e5361c54633c5
-Author: Tim Rice <tim@multitalents.net>
-Date:   Thu Jul 25 18:41:40 2013 -0700
-
-    more correct comment for last commit
-
-commit 0553ad76ffdff35fb31b9e6df935a71a1cc6daa2
-Author: Tim Rice <tim@multitalents.net>
-Date:   Thu Jul 25 16:03:16 2013 -0700
-
-     - (tim) [regress/forwarding.sh] Fix for building outside read only source tree.
-
-commit ed899eb597a8901ff7322cba809660515ec0d601
-Author: Tim Rice <tim@multitalents.net>
-Date:   Thu Jul 25 15:40:00 2013 -0700
-
-     - (tim) [sftp-client.c] Use of a gcc extension trips up native compilers on
-       Solaris and UnixWare. Feedback and OK djm@
-
-commit e9e936d33b4b1d77ffbaace9438cb2f1469c1dc7
-Author: Damien Miller <djm@mindrot.org>
-Date:   Thu Jul 25 12:34:00 2013 +1000
-
-     - (djm) [README contrib/caldera/openssh.spec contrib/redhat/openssh.spec]
-        [contrib/suse/openssh.spec] Update version numbers
-
-commit d1e26cf391de31128b4edde118bff5fed98a90ea
-Author: Damien Miller <djm@mindrot.org>
-Date:   Thu Jul 25 12:11:18 2013 +1000
-
-       - djm@cvs.openbsd.org 2013/06/21 02:26:26
-         [regress/sftp-cmds.sh regress/test-exec.sh]
-         unbreak sftp-cmds for renamed test data (s/ls/data/)
-
-commit 78d47b7c5b182e44552913de2b4b7e0363c8e3cc
-Author: Damien Miller <djm@mindrot.org>
-Date:   Thu Jul 25 12:08:46 2013 +1000
-
-       - dtucker@cvs.openbsd.org 2013/06/10 21:56:43
-         [regress/forwarding.sh]
-         Add test for forward config parsing
-
-commit fea440639e04cea9f2605375a41d654390369402
-Author: Damien Miller <djm@mindrot.org>
-Date:   Thu Jul 25 12:08:07 2013 +1000
-
-       - dtucker@cvs.openbsd.org 2013/05/30 20:12:32
-         [regress/test-exec.sh]
-         use ssh and sshd as testdata since it needs to be >256k for the rekey test
-
-commit 53435b2d8773a5d7c78359e9f7bf9df2d93b9ef5
-Author: Damien Miller <djm@mindrot.org>
-Date:   Thu Jul 25 11:57:15 2013 +1000
-
-       - djm@cvs.openbsd.org 2013/07/25 00:57:37
-         [version.h]
-         openssh-6.3 for release
-
-commit 0d032419ee6e1968fc1cb187af63bf3b77b506ea
-Author: Damien Miller <djm@mindrot.org>
-Date:   Thu Jul 25 11:56:52 2013 +1000
-
-       - djm@cvs.openbsd.org 2013/07/25 00:56:52
-         [sftp-client.c sftp-client.h sftp.1 sftp.c]
-         sftp support for resuming partial downloads; patch mostly by Loganaden
-         Velvindron/AfriNIC with some tweaks by me; feedback and ok dtucker@
-
-commit 98e27dcf581647b5bbe9780e8f59685d942d8ea3
-Author: Damien Miller <djm@mindrot.org>
-Date:   Thu Jul 25 11:55:52 2013 +1000
-
-       - djm@cvs.openbsd.org 2013/07/25 00:29:10
-         [ssh.c]
-         daemonise backgrounded (ControlPersist'ed) multiplexing master to ensure
-         it is fully detached from its controlling terminal. based on debugging
-
-commit 94c9cd34d1590ea1d4bf76919a15b5688fa90ed1
-Author: Damien Miller <djm@mindrot.org>
-Date:   Thu Jul 25 11:55:39 2013 +1000
-
-       - djm@cvs.openbsd.org 2013/07/22 12:20:02
-         [umac.h]
-         oops, forgot to commit corresponding header change;
-         spotted by jsg and jasper
-
-commit c331dbd22297ab9bf351abee659893d139c9f28a
-Author: Damien Miller <djm@mindrot.org>
-Date:   Thu Jul 25 11:55:20 2013 +1000
-
-       - djm@cvs.openbsd.org 2013/07/22 05:00:17
-         [umac.c]
-         make MAC key, data to be hashed and nonce for final hash const;
-         checked with -Wcast-qual
-
-commit c8669a8cd24952b3f16a44eac63d2b6ce8a6343a
-Author: Damien Miller <djm@mindrot.org>
-Date:   Thu Jul 25 11:52:48 2013 +1000
-
-       - djm@cvs.openbsd.org 2013/07/20 22:20:42
-         [krl.c]
-         fix verification error in (as-yet usused) KRL signature checking path
-
-commit 63ddc899d28cf60045b560891894b9fbf6f822e9
-Author: Damien Miller <djm@mindrot.org>
-Date:   Sat Jul 20 13:35:45 2013 +1000
-
-       - djm@cvs.openbsd.org 2013/07/20 01:55:13
-         [auth-krb5.c gss-serv-krb5.c gss-serv.c]
-         fix kerberos/GSSAPI deprecation warnings and linking; "looks okay" millert@
-
-commit 1f0e86f23fcebb026371c0888402a981df2a61c4
-Author: Damien Miller <djm@mindrot.org>
-Date:   Sat Jul 20 13:22:49 2013 +1000
-
-       - djm@cvs.openbsd.org 2013/07/20 01:50:20
-         [ssh-agent.c]
-         call cleanup_handler on SIGINT when in debug mode to ensure sockets
-         are cleaned up on manual exit; bz#2120
-
-commit 3009d3cbb89316b1294fb5cedb54770b5d114d04
-Author: Damien Miller <djm@mindrot.org>
-Date:   Sat Jul 20 13:22:31 2013 +1000
-
-       - djm@cvs.openbsd.org 2013/07/20 01:44:37
-         [ssh-keygen.c ssh.c]
-         More useful error message on missing current user in /etc/passwd
-
-commit 32ecfa0f7920db31471ca8c1f4adc20ae38ed9d6
-Author: Damien Miller <djm@mindrot.org>
-Date:   Sat Jul 20 13:22:13 2013 +1000
-
-       - djm@cvs.openbsd.org 2013/07/20 01:43:46
-         [umac.c]
-         use a union to ensure correct alignment; ok deraadt
-
-commit 85b45e09188e7a7fc8f0a900a4c6a0f04a5720a7
-Author: Damien Miller <djm@mindrot.org>
-Date:   Sat Jul 20 13:21:52 2013 +1000
-
-       - markus@cvs.openbsd.org 2013/07/19 07:37:48
-         [auth.h kex.h kexdhs.c kexecdhs.c kexgexs.c monitor.c servconf.c]
-         [servconf.h session.c sshd.c sshd_config.5]
-         add ssh-agent(1) support to sshd(8); allows encrypted hostkeys,
-         or hostkeys on smartcards; most of the work by Zev Weiss; bz #1974
-         ok djm@
-
-commit d93340cbb6bc0fc0dbd4427e0cec6d994a494dd9
-Author: Damien Miller <djm@mindrot.org>
-Date:   Thu Jul 18 16:14:34 2013 +1000
-
-       - djm@cvs.openbsd.org 2013/07/18 01:12:26
-         [ssh.1]
-         be more exact wrt perms for ~/.ssh/config; bz#2078
-
-commit bf836e535dc3a8050c1756423539bac127ee5098
-Author: Damien Miller <djm@mindrot.org>
-Date:   Thu Jul 18 16:14:13 2013 +1000
-
-       - schwarze@cvs.openbsd.org 2013/07/16 00:07:52
-         [scp.1 sftp-server.8 ssh-keyscan.1 ssh-keysign.8 ssh-pkcs11-helper.8]
-         use .Mt for email addresses; from Jan Stary <hans at stare dot cz>; ok jmc@
-
-commit 649fe025a409d0ce88c60a068f3f211193c35873
-Author: Damien Miller <djm@mindrot.org>
-Date:   Thu Jul 18 16:13:55 2013 +1000
-
-       - djm@cvs.openbsd.org 2013/07/12 05:48:55
-         [ssh.c]
-         set TCP nodelay for connections started with -N; bz#2124 ok dtucker@
-
-commit 5bb8833e809d827496dffca0dc2c223052c93931
-Author: Damien Miller <djm@mindrot.org>
-Date:   Thu Jul 18 16:13:37 2013 +1000
-
-       - djm@cvs.openbsd.org 2013/07/12 05:42:03
-         [ssh-keygen.c]
-         do_print_resource_record() can never be called with a NULL filename, so
-         don't attempt (and bungle) asking for one if it has not been specified
-         bz#2127 ok dtucker@
-
-commit 7313fc9222785d0c54a7ffcaf2067f4db02c8d72
-Author: Damien Miller <djm@mindrot.org>
-Date:   Thu Jul 18 16:13:19 2013 +1000
-
-       - djm@cvs.openbsd.org 2013/07/12 00:43:50
-         [misc.c]
-         in ssh_gai_strerror() don't fallback to strerror for EAI_SYSTEM when
-         errno == 0. Avoids confusing error message in some broken resolver
-         cases. bz#2122 patch from plautrba AT redhat.com; ok dtucker
-
-commit 746d1a6c524d2e90ebe98cc29e42573a3e1c3c1b
-Author: Damien Miller <djm@mindrot.org>
-Date:   Thu Jul 18 16:13:02 2013 +1000
-
-       - djm@cvs.openbsd.org 2013/07/12 00:20:00
-         [sftp.c ssh-keygen.c ssh-pkcs11.c]
-         fix pointer-signedness warnings from clang/llvm-3.3; "seems nice" deraadt@
-
-commit ce98654674648fb7d58f73edf6aa398656a2dba4
-Author: Damien Miller <djm@mindrot.org>
-Date:   Thu Jul 18 16:12:44 2013 +1000
-
-       - djm@cvs.openbsd.org 2013/07/12 00:19:59
-         [auth-options.c auth-rsa.c bufaux.c buffer.h channels.c hostfile.c]
-         [hostfile.h mux.c packet.c packet.h roaming_common.c serverloop.c]
-         fix pointer-signedness warnings from clang/llvm-3.3; "seems nice" deraadt@
-
-commit 0d02c3e10e1ed16d6396748375a133d348127a2a
-Author: Damien Miller <djm@mindrot.org>
-Date:   Thu Jul 18 16:12:06 2013 +1000
-
-       - markus@cvs.openbsd.org 2013/07/02 12:31:43
-         [dh.c]
-         remove extra whitespace
-
-commit fecfd118d6c90df4fcd3cec7b14e4d3ce69a41d5
-Author: Damien Miller <djm@mindrot.org>
-Date:   Thu Jul 18 16:11:50 2013 +1000
-
-       - jmc@cvs.openbsd.org 2013/06/27 14:05:37
-         [ssh-keygen.1 ssh.1 ssh_config.5 sshd.8 sshd_config.5]
-         do not use Sx for sections outwith the man page - ingo informs me that
-         stuff like html will render with broken links;
-    
-         issue reported by Eric S. Raymond, via djm
-
-commit bc35d92e78fd53c3f32cbdbdf89d8b1919788c50
-Author: Damien Miller <djm@mindrot.org>
-Date:   Thu Jul 18 16:11:25 2013 +1000
-
-       - djm@cvs.openbsd.org 2013/06/22 06:31:57
-         [scp.c]
-         improved time_t overflow check suggested by guenther@
-
-commit 8158441d01ab84f33a7e70e27f87c02cbf67e709
-Author: Damien Miller <djm@mindrot.org>
-Date:   Thu Jul 18 16:11:07 2013 +1000
-
-       - djm@cvs.openbsd.org 2013/06/21 05:43:10
-         [scp.c]
-         make this -Wsign-compare clean after time_t conversion
-
-commit bbeb1dac550bad8e6aff9bd27113c6bd5ebb7413
-Author: Damien Miller <djm@mindrot.org>
-Date:   Thu Jul 18 16:10:49 2013 +1000
-
-       - djm@cvs.openbsd.org 2013/06/21 05:42:32
-         [dh.c]
-         sprinkle in some error() to explain moduli(5) parse failures
-
-commit 7f2b438ca0b7c3b9684a03d7bf3eaf379da16de9
-Author: Damien Miller <djm@mindrot.org>
-Date:   Thu Jul 18 16:10:29 2013 +1000
-
-       - djm@cvs.openbsd.org 2013/06/21 00:37:49
-         [ssh_config.5]
-         explicitly mention that IdentitiesOnly can be used with IdentityFile
-         to control which keys are offered from an agent.
-
-commit 20bdcd72365e8b3d51261993928cc47c5f0d7c8a
-Author: Damien Miller <djm@mindrot.org>
-Date:   Thu Jul 18 16:10:09 2013 +1000
-
-       - djm@cvs.openbsd.org 2013/06/21 00:34:49
-         [auth-rsa.c auth.h auth2-hostbased.c auth2-pubkey.c monitor.c]
-         for hostbased authentication, print the client host and user on
-         the auth success/failure line; bz#2064, ok dtucker@
-
-commit 3071070b39e6d1722151c754cdc2b26640eaf45e
-Author: Damien Miller <djm@mindrot.org>
-Date:   Thu Jul 18 16:09:44 2013 +1000
-
-       - markus@cvs.openbsd.org 2013/06/20 19:15:06
-         [krl.c]
-         don't leak the rdata blob on errors; ok djm@
-
-commit 044bd2a7ddb0b6f6b716c87e57261572e2b89028
-Author: Damien Miller <djm@mindrot.org>
-Date:   Thu Jul 18 16:09:25 2013 +1000
-
-       - guenther@cvs.openbsd.org 2013/06/17 04:48:42
-         [scp.c]
-         Handle time_t values as long long's when formatting them and when
-         parsing them from remote servers.
-         Improve error checking in parsing of 'T' lines.
-    
-         ok dtucker@ deraadt@
-
-commit 9a6615542108118582f64b7161ca0e12176e3712
-Author: Damien Miller <djm@mindrot.org>
-Date:   Thu Jul 18 16:09:04 2013 +1000
-
-       - dtucker@cvs.openbsd.org 2013/06/10 19:19:44
-         [readconf.c]
-         revert 1.203 while we investigate crashes reported by okan@
-
-commit b7482cff46e7e76bfb3cda86c365a08f58d4fca0
-Author: Darren Tucker <dtucker@zip.com.au>
-Date:   Tue Jul 2 20:06:46 2013 +1000
-
-     - (dtucker) [contrib/cygwin/README contrib/cygwin/ssh-host-config
-       contrib/cygwin/ssh-user-config] Modernizes and improve readability of
-       the Cygwin README file (which hasn't been updated for ages), drop
-       unsupported OSes from the ssh-host-config help text, and drop an
-       unneeded option from ssh-user-config.  Patch from vinschen at redhat com.

Modified: head/crypto/openssh/OVERVIEW
==============================================================================
--- head/crypto/openssh/OVERVIEW	Wed Jan 20 22:23:08 2016	(r294463)
+++ head/crypto/openssh/OVERVIEW	Wed Jan 20 22:57:10 2016	(r294464)
@@ -65,8 +65,8 @@ these programs.
       packets.  CRC code comes from crc32.c.
 
     - The code in packet.c calls the buffer manipulation routines
-      (buffer.c, bufaux.c), compression routines (compress.c, zlib),
-      and the encryption routines.
+      (buffer.c, bufaux.c), compression routines (zlib), and the
+      encryption routines.
 
   X11, TCP/IP, and Agent forwarding
 
@@ -165,4 +165,4 @@ these programs.
 	uidswap.c    uid-swapping
 	xmalloc.c    "safe" malloc routines
 
-$OpenBSD: OVERVIEW,v 1.11 2006/08/03 03:34:41 deraadt Exp $
+$OpenBSD: OVERVIEW,v 1.12 2015/07/08 19:01:15 markus Exp $

Modified: head/crypto/openssh/PROTOCOL
==============================================================================
--- head/crypto/openssh/PROTOCOL	Wed Jan 20 22:23:08 2016	(r294463)
+++ head/crypto/openssh/PROTOCOL	Wed Jan 20 22:57:10 2016	(r294464)
@@ -247,7 +247,6 @@ to request that the server make a connec
 	uint32		initial window size
 	uint32		maximum packet size
 	string		socket path
-	string		reserved for future use
 
 Similar to forwarded-tcpip, forwarded-streamlocal is sent by the
 server when the client has previously send the server a streamlocal-forward
@@ -453,4 +452,4 @@ respond with a SSH_FXP_STATUS message.
 This extension is advertised in the SSH_FXP_VERSION hello with version
 "1".
 
-$OpenBSD: PROTOCOL,v 1.28 2015/05/08 03:56:51 djm Exp $
+$OpenBSD: PROTOCOL,v 1.29 2015/07/17 03:09:19 djm Exp $

Modified: head/crypto/openssh/PROTOCOL.mux
==============================================================================
--- head/crypto/openssh/PROTOCOL.mux	Wed Jan 20 22:23:08 2016	(r294463)
+++ head/crypto/openssh/PROTOCOL.mux	Wed Jan 20 22:57:10 2016	(r294464)
@@ -116,6 +116,12 @@ A client may request the master to estab
 
 forwarding type may be MUX_FWD_LOCAL, MUX_FWD_REMOTE, MUX_FWD_DYNAMIC.
 
+If listen port is (unsigned int) -2, then the listen host is treated as
+a unix socket path name.
+
+If connect port is (unsigned int) -2, then the connect host is treated
+as a unix socket path name.
+
 A server may reply with a MUX_S_OK, a MUX_S_REMOTE_PORT, a
 MUX_S_PERMISSION_DENIED or a MUX_S_FAILURE.
 
@@ -219,4 +225,4 @@ XXX inject packet (what about replies)
 XXX server->client error/warning notifications
 XXX send signals via mux
 
-$OpenBSD: PROTOCOL.mux,v 1.9 2012/06/01 00:49:35 djm Exp $
+$OpenBSD: PROTOCOL.mux,v 1.10 2015/07/17 03:04:27 djm Exp $

Modified: head/crypto/openssh/README
==============================================================================
--- head/crypto/openssh/README	Wed Jan 20 22:23:08 2016	(r294463)

*** DIFF OUTPUT TRUNCATED AT 1000 LINES ***

From owner-svn-src-all@freebsd.org  Wed Jan 20 23:01:34 2016
Return-Path: <owner-svn-src-all@freebsd.org>
Delivered-To: svn-src-all@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id DE30FA8AD3F;
 Wed, 20 Jan 2016 23:01:34 +0000 (UTC)
 (envelope-from avos@FreeBSD.org)
Received: from repo.freebsd.org (repo.freebsd.org
 [IPv6:2610:1c1:1:6068::e6a:0])
 (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
 (Client did not present a certificate)
 by mx1.freebsd.org (Postfix) with ESMTPS id 975601967;
 Wed, 20 Jan 2016 23:01:34 +0000 (UTC)
 (envelope-from avos@FreeBSD.org)
Received: from repo.freebsd.org ([127.0.1.37])
 by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u0KN1XYC058390;
 Wed, 20 Jan 2016 23:01:33 GMT (envelope-from avos@FreeBSD.org)
Received: (from avos@localhost)
 by repo.freebsd.org (8.15.2/8.15.2/Submit) id u0KN1XtW058389;
 Wed, 20 Jan 2016 23:01:33 GMT (envelope-from avos@FreeBSD.org)
Message-Id: <201601202301.u0KN1XtW058389@repo.freebsd.org>
X-Authentication-Warning: repo.freebsd.org: avos set sender to
 avos@FreeBSD.org using -f
From: Andriy Voskoboinyk <avos@FreeBSD.org>
Date: Wed, 20 Jan 2016 23:01:33 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-head@freebsd.org
Subject: svn commit: r294465 - head/sys/dev/usb/wlan
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.20
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for &quot;
 user&quot; and &quot; projects&quot; \)" <svn-src-all.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-all/>
List-Post: <mailto:svn-src-all@freebsd.org>
List-Help: <mailto:svn-src-all-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Wed, 20 Jan 2016 23:01:35 -0000

Author: avos
Date: Wed Jan 20 23:01:33 2016
New Revision: 294465
URL: https://svnweb.freebsd.org/changeset/base/294465

Log:
  urtwn: use ic_updateslot method to handle slot time change
  (by default it was set to 9us).
  
  Tested with RTL8188EU / RTL8188CUS in STA mode.
  
  Reviewed by:	kevlo
  Approved by:	adrian (mentor)
  Differential Revision:	https://reviews.freebsd.org/D4535

Modified:
  head/sys/dev/usb/wlan/if_urtwn.c

Modified: head/sys/dev/usb/wlan/if_urtwn.c
==============================================================================
--- head/sys/dev/usb/wlan/if_urtwn.c	Wed Jan 20 22:57:10 2016	(r294464)
+++ head/sys/dev/usb/wlan/if_urtwn.c	Wed Jan 20 23:01:33 2016	(r294465)
@@ -319,6 +319,10 @@ static void		urtwn_scan_start(struct iee
 static void		urtwn_scan_end(struct ieee80211com *);
 static void		urtwn_set_channel(struct ieee80211com *);
 static int		urtwn_wme_update(struct ieee80211com *);
+static void		urtwn_update_slot(struct ieee80211com *);
+static void		urtwn_update_slot_cb(struct urtwn_softc *,
+			    union sec_param *);
+static void		urtwn_update_aifs(struct urtwn_softc *, uint8_t);
 static void		urtwn_set_promisc(struct urtwn_softc *);
 static void		urtwn_update_promisc(struct ieee80211com *);
 static void		urtwn_update_mcast(struct ieee80211com *);
@@ -540,6 +544,7 @@ urtwn_attach(device_t self)
 	ic->ic_vap_create = urtwn_vap_create;
 	ic->ic_vap_delete = urtwn_vap_delete;
 	ic->ic_wme.wme_update = urtwn_wme_update;
+	ic->ic_updateslot = urtwn_update_slot;
 	ic->ic_update_promisc = urtwn_update_promisc;
 	ic->ic_update_mcast = urtwn_update_mcast;
 	if (sc->chip & URTWN_CHIP_88E) {
@@ -4195,6 +4200,40 @@ urtwn_wme_update(struct ieee80211com *ic
 }
 
 static void
+urtwn_update_slot(struct ieee80211com *ic)
+{
+	urtwn_cmd_sleepable(ic->ic_softc, NULL, 0, urtwn_update_slot_cb);
+}
+
+static void
+urtwn_update_slot_cb(struct urtwn_softc *sc, union sec_param *data)
+{
+	struct ieee80211com *ic = &sc->sc_ic;
+	uint8_t slottime;
+
+	slottime = IEEE80211_GET_SLOTTIME(ic);
+
+	DPRINTFN(10, "setting slot time to %uus\n", slottime);
+
+	urtwn_write_1(sc, R92C_SLOT, slottime);
+	urtwn_update_aifs(sc, slottime);
+}
+
+static void
+urtwn_update_aifs(struct urtwn_softc *sc, uint8_t slottime)
+{
+	const struct wmeParams *wmep =
+	    sc->sc_ic.ic_wme.wme_chanParams.cap_wmeParams;
+	uint8_t aifs, ac;
+
+	for (ac = WME_AC_BE; ac < WME_NUM_AC; ac++) {
+		/* AIFS[AC] = AIFSN[AC] * aSlotTime + aSIFSTime. */
+		aifs = wmep[ac].wmep_aifsn * slottime + IEEE80211_DUR_SIFS;
+		urtwn_write_1(sc, wme2queue[ac].reg, aifs);
+        }
+}
+
+static void
 urtwn_set_promisc(struct urtwn_softc *sc)
 {
 	struct ieee80211com *ic = &sc->sc_ic;

From owner-svn-src-all@freebsd.org  Wed Jan 20 23:08:58 2016
Return-Path: <owner-svn-src-all@freebsd.org>
Delivered-To: svn-src-all@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7D11BA8B040;
 Wed, 20 Jan 2016 23:08:58 +0000 (UTC) (envelope-from des@FreeBSD.org)
Received: from repo.freebsd.org (repo.freebsd.org
 [IPv6:2610:1c1:1:6068::e6a:0])
 (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
 (Client did not present a certificate)
 by mx1.freebsd.org (Postfix) with ESMTPS id 4E32E1D1A;
 Wed, 20 Jan 2016 23:08:58 +0000 (UTC) (envelope-from des@FreeBSD.org)
Received: from repo.freebsd.org ([127.0.1.37])
 by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u0KN8veN059549;
 Wed, 20 Jan 2016 23:08:57 GMT (envelope-from des@FreeBSD.org)
Received: (from des@localhost)
 by repo.freebsd.org (8.15.2/8.15.2/Submit) id u0KN8vJe059548;
 Wed, 20 Jan 2016 23:08:57 GMT (envelope-from des@FreeBSD.org)
Message-Id: <201601202308.u0KN8vJe059548@repo.freebsd.org>
X-Authentication-Warning: repo.freebsd.org: des set sender to des@FreeBSD.org
 using -f
From: =?UTF-8?Q?Dag-Erling_Sm=c3=b8rgrav?= <des@FreeBSD.org>
Date: Wed, 20 Jan 2016 23:08:57 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-head@freebsd.org
Subject: svn commit: r294466 - head/crypto/openssh
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.20
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for &quot;
 user&quot; and &quot; projects&quot; \)" <svn-src-all.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-all/>
List-Post: <mailto:svn-src-all@freebsd.org>
List-Help: <mailto:svn-src-all-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Wed, 20 Jan 2016 23:08:58 -0000

Author: des
Date: Wed Jan 20 23:08:57 2016
New Revision: 294466
URL: https://svnweb.freebsd.org/changeset/base/294466

Log:
  Remove a number of generated files which are either out-of-date (because
  they are never regenerated to reflect our changes) or in the way of
  freebsd-configure.sh.

Deleted:
  head/crypto/openssh/config.h.in
  head/crypto/openssh/configure
  head/crypto/openssh/moduli.0
  head/crypto/openssh/scp.0
  head/crypto/openssh/sftp-server.0
  head/crypto/openssh/sftp.0
  head/crypto/openssh/ssh-add.0
  head/crypto/openssh/ssh-agent.0
  head/crypto/openssh/ssh-keygen.0
  head/crypto/openssh/ssh-keyscan.0
  head/crypto/openssh/ssh-keysign.0
  head/crypto/openssh/ssh-pkcs11-helper.0
  head/crypto/openssh/ssh.0
  head/crypto/openssh/ssh_config.0
  head/crypto/openssh/sshd.0
  head/crypto/openssh/sshd_config.0

From owner-svn-src-all@freebsd.org  Wed Jan 20 23:10:04 2016
Return-Path: <owner-svn-src-all@freebsd.org>
Delivered-To: svn-src-all@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id B9CDCA8B0AC;
 Wed, 20 Jan 2016 23:10:04 +0000 (UTC) (envelope-from avg@FreeBSD.org)
Received: from citadel.icyb.net.ua (citadel.icyb.net.ua [212.40.38.140])
 by mx1.freebsd.org (Postfix) with ESMTP id 723321E89;
 Wed, 20 Jan 2016 23:10:02 +0000 (UTC) (envelope-from avg@FreeBSD.org)
Received: from porto.starpoint.kiev.ua (porto-e.starpoint.kiev.ua
 [212.40.38.100])
 by citadel.icyb.net.ua (8.8.8p3/ICyb-2.3exp) with ESMTP id BAA11535;
 Thu, 21 Jan 2016 01:10:00 +0200 (EET) (envelope-from avg@FreeBSD.org)
Received: from localhost ([127.0.0.1])
 by porto.starpoint.kiev.ua with esmtp (Exim 4.34 (FreeBSD))
 id 1aM1t2-0006hE-01; Thu, 21 Jan 2016 01:10:00 +0200
Subject: Re: svn commit: r294329 - in
 head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs: . sys
To: Alan Somers <asomers@FreeBSD.org>
References: <201601191700.u0JH0P6k061610@repo.freebsd.org>
 <569F5168.70605@FreeBSD.org>
 <CAOtMX2i-n0827yuf2cdDzq=0x-_oP9ZpjOxaR-Aqzfgu88Yq9g@mail.gmail.com>
Cc: "src-committers@freebsd.org" <src-committers@FreeBSD.org>,
 "svn-src-all@freebsd.org" <svn-src-all@FreeBSD.org>,
 "svn-src-head@freebsd.org" <svn-src-head@FreeBSD.org>
From: Andriy Gapon <avg@FreeBSD.org>
Message-ID: <56A0138F.9070606@FreeBSD.org>
Date: Thu, 21 Jan 2016 01:09:03 +0200
User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:38.0) Gecko/20100101
 Thunderbird/38.5.0
MIME-Version: 1.0
In-Reply-To: <CAOtMX2i-n0827yuf2cdDzq=0x-_oP9ZpjOxaR-Aqzfgu88Yq9g@mail.gmail.com>
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 7bit
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.20
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for &quot;
 user&quot; and &quot; projects&quot; \)" <svn-src-all.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-all/>
List-Post: <mailto:svn-src-all@freebsd.org>
List-Help: <mailto:svn-src-all-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Wed, 20 Jan 2016 23:10:04 -0000

On 20/01/2016 22:04, Alan Somers wrote:
> On Wed, Jan 20, 2016 at 2:20 AM, Andriy Gapon <avg@freebsd.org> wrote:
>> On 19/01/2016 19:00, Alan Somers wrote:
>>> Author: asomers
>>> Date: Tue Jan 19 17:00:25 2016
>>> New Revision: 294329
>>> URL: https://svnweb.freebsd.org/changeset/base/294329
>>>
>>> Log:
>>>   Disallow zvol-backed ZFS pools
>>
>> What, again?...
>>
> 
> What do you mean, "again"?
> 

zpools on zvols were disabled once in the past, took a while to re-enable the
support.

-- 
Andriy Gapon

From owner-svn-src-all@freebsd.org  Wed Jan 20 23:11:59 2016
Return-Path: <owner-svn-src-all@freebsd.org>
Delivered-To: svn-src-all@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id 906D6A8B26D;
 Wed, 20 Jan 2016 23:11:59 +0000 (UTC) (envelope-from des@FreeBSD.org)
Received: from repo.freebsd.org (repo.freebsd.org
 [IPv6:2610:1c1:1:6068::e6a:0])
 (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
 (Client did not present a certificate)
 by mx1.freebsd.org (Postfix) with ESMTPS id 4A63E1236;
 Wed, 20 Jan 2016 23:11:59 +0000 (UTC) (envelope-from des@FreeBSD.org)
Received: from repo.freebsd.org ([127.0.1.37])
 by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u0KNBwe5060442;
 Wed, 20 Jan 2016 23:11:58 GMT (envelope-from des@FreeBSD.org)
Received: (from des@localhost)
 by repo.freebsd.org (8.15.2/8.15.2/Submit) id u0KNBwDL060441;
 Wed, 20 Jan 2016 23:11:58 GMT (envelope-from des@FreeBSD.org)
Message-Id: <201601202311.u0KNBwDL060441@repo.freebsd.org>
X-Authentication-Warning: repo.freebsd.org: des set sender to des@FreeBSD.org
 using -f
From: =?UTF-8?Q?Dag-Erling_Sm=c3=b8rgrav?= <des@FreeBSD.org>
Date: Wed, 20 Jan 2016 23:11:58 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-head@freebsd.org
Subject: svn commit: r294467 - in head/crypto/openssh: . openbsd-compat
 openbsd-compat/regress
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.20
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for &quot;
 user&quot; and &quot; projects&quot; \)" <svn-src-all.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-all/>
List-Post: <mailto:svn-src-all@freebsd.org>
List-Help: <mailto:svn-src-all-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Wed, 20 Jan 2016 23:11:59 -0000

Author: des
Date: Wed Jan 20 23:11:58 2016
New Revision: 294467
URL: https://svnweb.freebsd.org/changeset/base/294467

Log:
  Ignore generated files.

Modified:
Directory Properties:
  head/crypto/openssh/   (props changed)
  head/crypto/openssh/openbsd-compat/   (props changed)
  head/crypto/openssh/openbsd-compat/regress/   (props changed)

From owner-svn-src-all@freebsd.org  Wed Jan 20 23:19:58 2016
Return-Path: <owner-svn-src-all@freebsd.org>
Delivered-To: svn-src-all@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1CFD6A8B478;
 Wed, 20 Jan 2016 23:19:58 +0000 (UTC)
 (envelope-from truckman@FreeBSD.org)
Received: from gw.catspoiler.org (unknown [IPv6:2602:304:b010:ef20::f2])
 (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
 (Client CN "gw.catspoiler.org", Issuer "gw.catspoiler.org" (not verified))
 by mx1.freebsd.org (Postfix) with ESMTPS id F36DD17FD;
 Wed, 20 Jan 2016 23:19:57 +0000 (UTC)
 (envelope-from truckman@FreeBSD.org)
Received: from FreeBSD.org (mousie.catspoiler.org [192.168.101.2])
 by gw.catspoiler.org (8.15.2/8.15.2) with ESMTP id u0KNJkVI077393;
 Wed, 20 Jan 2016 15:19:50 -0800 (PST)
 (envelope-from truckman@FreeBSD.org)
Message-Id: <201601202319.u0KNJkVI077393@gw.catspoiler.org>
Date: Wed, 20 Jan 2016 15:19:46 -0800 (PST)
From: Don Lewis <truckman@FreeBSD.org>
Subject: Re: svn commit: r294444 - in head/sys/modules: ix ixlv ixv
To: bdrewery@FreeBSD.org
cc: imp@bsdimp.com, src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-head@freebsd.org
In-Reply-To: <56A007CA.2030507@FreeBSD.org>
MIME-Version: 1.0
Content-Type: TEXT/plain; charset=iso-8859-7
Content-Transfer-Encoding: 8BIT
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.20
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for &quot;
 user&quot; and &quot; projects&quot; \)" <svn-src-all.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-all/>
List-Post: <mailto:svn-src-all@freebsd.org>
List-Help: <mailto:svn-src-all-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Wed, 20 Jan 2016 23:19:58 -0000

On 20 Jan, Bryan Drewery wrote:
> On 1/20/2016 1:59 PM, Warner Losh wrote:
>> It would work built part of buildkernel since pci_iov_if.h would exist there. It would fail when built by hand since the kernel config didn¢t save us.
>> 
> 
> I don't understand. The problem was seen in buildkernel.

It failed for me last night when I ran "make -j 8 buildkernel".  It
worked without -j.

>> 
>> 
>>> On Jan 20, 2016, at 1:57 PM, Bryan Drewery <bdrewery@FreeBSD.org> wrote:
>>>
>>> I have no idea how this was working before and why it took so long to
>>> manifest. Many people reported failures here in the last day and
>>> confirmed this fixed it.
>>>
> 
> 
> 


From owner-svn-src-all@freebsd.org  Wed Jan 20 23:22:15 2016
Return-Path: <owner-svn-src-all@freebsd.org>
Delivered-To: svn-src-all@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id 16FE8A8B5D5
 for <svn-src-all@mailman.ysv.freebsd.org>;
 Wed, 20 Jan 2016 23:22:15 +0000 (UTC)
 (envelope-from wlosh@bsdimp.com)
Received: from mail-qg0-x22a.google.com (mail-qg0-x22a.google.com
 [IPv6:2607:f8b0:400d:c04::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 C5FBB1BB3
 for <svn-src-all@freebsd.org>; Wed, 20 Jan 2016 23:22:14 +0000 (UTC)
 (envelope-from wlosh@bsdimp.com)
Received: by mail-qg0-x22a.google.com with SMTP id 6so19245549qgy.1
 for <svn-src-all@freebsd.org>; Wed, 20 Jan 2016 15:22:14 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=bsdimp-com.20150623.gappssmtp.com; s=20150623;
 h=mime-version:sender:in-reply-to:references:date:message-id:subject
 :from:to:cc:content-type;
 bh=FSL/S6mOyj5Um0GZA4mXwXz0rxpICrGEU4PbCoqcfG0=;
 b=jNRoKlu5N0QAKQ1XMaM28B5Tcg8OQjoHkA1pKIYALb3qXYPxLLnAZfx4RvzdKgwK1s
 MApDubMCjzS6cXLex5L7rO3sXIYZrm8FenaWLtxvYFdVczCfls2THGBbx8O3z3gTLwAn
 eV0u7GOM2zc8cB2NftC4i4esHwbFcvsvhJase2asHcJUwkf0D6fkJS/KhInu+JdpZZmX
 Yy6eMXO2wKRJ9De+GDdBqbFc6GiZUIecuHbE1Ugmx+GYQ5W92TXogV3qiVpJufT9K4f0
 J8SoAXGYnq4l1GxWG4VZT5D+TbCk+3zMuwm8qCUS7C33YAMq+BNLWWF1eesx4xIntMNW
 Noag==
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:date
 :message-id:subject:from:to:cc:content-type;
 bh=FSL/S6mOyj5Um0GZA4mXwXz0rxpICrGEU4PbCoqcfG0=;
 b=mpHSDhls+mXrwULGdzptF2hZiUrApFU0VJrwYdkjvys3gwnyXegDwqq1gLynbpfZqh
 +nYcZBP0Njs9jA1aC4hdN7ptAaFkcuAiTXGl3vCi3KxY+ksvSR0L9mXPow7D1DsK1ee0
 jigHkfJb8aArxxA4vbR4r4DyHVYE8uO3zBAiXTqDgwckSZQ4CfbLFUhCXhUkFqSr7p9v
 lbtDYqKMJqQNk7I5Ruvtq1GoVYX6kiDKhnm7EhS3bbRSWraQ6nA0Ys567p9szHAcEY1p
 5IGMnUQNGpRCmFnnU0cU81h6K08tftih0FhsYRA2eKKw2o6osENC2s6f1bEMKBDZN1Yw
 iDAA==
X-Gm-Message-State: ALoCoQnFrK+c/Z++0DFW4FWMck+76ot9mznjEfnyxrzyuxbUGmxNsLK1F/QkxQ3YtlcoztkgqPH307q24iIphUd5ud2UJ5HbBg==
MIME-Version: 1.0
X-Received: by 10.140.109.247 with SMTP id l110mr48120424qgf.52.1453332133989; 
 Wed, 20 Jan 2016 15:22:13 -0800 (PST)
Sender: wlosh@bsdimp.com
Received: by 10.140.30.166 with HTTP; Wed, 20 Jan 2016 15:22:13 -0800 (PST)
X-Originating-IP: [192.55.66.74]
In-Reply-To: <201601202319.u0KNJkVI077393@gw.catspoiler.org>
References: <56A007CA.2030507@FreeBSD.org>
 <201601202319.u0KNJkVI077393@gw.catspoiler.org>
Date: Wed, 20 Jan 2016 15:22:13 -0800
X-Google-Sender-Auth: PU9l3oiIIlzkajT-GQKaZGc-bb8
Message-ID: <CANCZdfoaRt-yEmnvESZZ=tyNzzyfX9dF_vfJHC_Xi9FDM2StLg@mail.gmail.com>
Subject: Re: svn commit: r294444 - in head/sys/modules: ix ixlv ixv
From: Warner Losh <imp@bsdimp.com>
To: Don Lewis <truckman@freebsd.org>
Cc: Bryan Drewery <bdrewery@freebsd.org>,
 src-committers <src-committers@freebsd.org>, 
 "svn-src-all@freebsd.org" <svn-src-all@freebsd.org>, 
 "svn-src-head@freebsd.org" <svn-src-head@freebsd.org>
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
X-Content-Filtered-By: Mailman/MimeDel 2.1.20
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.20
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for &quot;
 user&quot; and &quot; projects&quot; \)" <svn-src-all.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-all/>
List-Post: <mailto:svn-src-all@freebsd.org>
List-Help: <mailto:svn-src-all-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Wed, 20 Jan 2016 23:22:15 -0000

On Wed, Jan 20, 2016 at 3:19 PM, Don Lewis <truckman@freebsd.org> wrote:

> On 20 Jan, Bryan Drewery wrote:
> > On 1/20/2016 1:59 PM, Warner Losh wrote:
> >> It would work built part of buildkernel since pci_iov_if.h would exist
> there. It would fail when built by hand since the kernel config didn=E2=
=80=99t save
> us.
> >>
> >
> > I don't understand. The problem was seen in buildkernel.
>
> It failed for me last night when I ran "make -j 8 buildkernel".  It
> worked without -j.


Sounds like a race!

Warner


> >>
> >>
> >>> On Jan 20, 2016, at 1:57 PM, Bryan Drewery <bdrewery@FreeBSD.org>
> wrote:
> >>>
> >>> I have no idea how this was working before and why it took so long to
> >>> manifest. Many people reported failures here in the last day and
> >>> confirmed this fixed it.
> >>>
> >
> >
> >
>
>
>

From owner-svn-src-all@freebsd.org  Wed Jan 20 23:22:37 2016
Return-Path: <owner-svn-src-all@freebsd.org>
Delivered-To: svn-src-all@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id BB8FCA8B624;
 Wed, 20 Jan 2016 23:22: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 902E51D3C;
 Wed, 20 Jan 2016 23:22: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 u0KNMaJv065751;
 Wed, 20 Jan 2016 23:22:36 GMT (envelope-from mjg@FreeBSD.org)
Received: (from mjg@localhost)
 by repo.freebsd.org (8.15.2/8.15.2/Submit) id u0KNMaLp065750;
 Wed, 20 Jan 2016 23:22:36 GMT (envelope-from mjg@FreeBSD.org)
Message-Id: <201601202322.u0KNMaLp065750@repo.freebsd.org>
X-Authentication-Warning: repo.freebsd.org: mjg set sender to mjg@FreeBSD.org
 using -f
From: Mateusz Guzik <mjg@FreeBSD.org>
Date: Wed, 20 Jan 2016 23:22:36 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-head@freebsd.org
Subject: svn commit: r294468 - head/sys/kern
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.20
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for &quot;
 user&quot; and &quot; projects&quot; \)" <svn-src-all.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-all/>
List-Post: <mailto:svn-src-all@freebsd.org>
List-Help: <mailto:svn-src-all-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Wed, 20 Jan 2016 23:22:37 -0000

Author: mjg
Date: Wed Jan 20 23:22:36 2016
New Revision: 294468
URL: https://svnweb.freebsd.org/changeset/base/294468

Log:
  session: tidy up fixjobc
  
  This stops abusing the 'p' pointer for iteration over children processes
  and gets rid of useless locking around PRS_ZOMBIE check.
  
  Suggested by:	kib

Modified:
  head/sys/kern/kern_proc.c

Modified: head/sys/kern/kern_proc.c
==============================================================================
--- head/sys/kern/kern_proc.c	Wed Jan 20 23:11:58 2016	(r294467)
+++ head/sys/kern/kern_proc.c	Wed Jan 20 23:22:36 2016	(r294468)
@@ -650,13 +650,11 @@ pgadjustjobc(pgrp, entering)
  * entering == 1 => p is entering specified group.
  */
 void
-fixjobc(p, pgrp, entering)
-	register struct proc *p;
-	register struct pgrp *pgrp;
-	int entering;
+fixjobc(struct proc *p, struct pgrp *pgrp, int entering)
 {
-	register struct pgrp *hispgrp;
-	register struct session *mysession;
+	struct pgrp *hispgrp;
+	struct session *mysession;
+	struct proc *q;
 
 	sx_assert(&proctree_lock, SX_LOCKED);
 	PROC_LOCK_ASSERT(p, MA_NOTOWNED);
@@ -677,17 +675,13 @@ fixjobc(p, pgrp, entering)
 	 * their process groups; if so, adjust counts for children's
 	 * process groups.
 	 */
-	LIST_FOREACH(p, &p->p_children, p_sibling) {
-		hispgrp = p->p_pgrp;
+	LIST_FOREACH(q, &p->p_children, p_sibling) {
+		hispgrp = q->p_pgrp;
 		if (hispgrp == pgrp ||
 		    hispgrp->pg_session != mysession)
 			continue;
-		PROC_LOCK(p);
-		if (p->p_state == PRS_ZOMBIE) {
-			PROC_UNLOCK(p);
+		if (q->p_state == PRS_ZOMBIE)
 			continue;
-		}
-		PROC_UNLOCK(p);
 		pgadjustjobc(hispgrp, entering);
 	}
 }

From owner-svn-src-all@freebsd.org  Wed Jan 20 23:23:10 2016
Return-Path: <owner-svn-src-all@freebsd.org>
Delivered-To: svn-src-all@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id CB637A8B665;
 Wed, 20 Jan 2016 23:23:10 +0000 (UTC) (envelope-from des@FreeBSD.org)
Received: from repo.freebsd.org (repo.freebsd.org
 [IPv6:2610:1c1:1:6068::e6a:0])
 (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
 (Client did not present a certificate)
 by mx1.freebsd.org (Postfix) with ESMTPS id A3A5E1E9A;
 Wed, 20 Jan 2016 23:23:10 +0000 (UTC) (envelope-from des@FreeBSD.org)
Received: from repo.freebsd.org ([127.0.1.37])
 by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u0KNN9KS065847;
 Wed, 20 Jan 2016 23:23:09 GMT (envelope-from des@FreeBSD.org)
Received: (from des@localhost)
 by repo.freebsd.org (8.15.2/8.15.2/Submit) id u0KNN8SY065833;
 Wed, 20 Jan 2016 23:23:08 GMT (envelope-from des@FreeBSD.org)
Message-Id: <201601202323.u0KNN8SY065833@repo.freebsd.org>
X-Authentication-Warning: repo.freebsd.org: des set sender to des@FreeBSD.org
 using -f
From: =?UTF-8?Q?Dag-Erling_Sm=c3=b8rgrav?= <des@FreeBSD.org>
Date: Wed, 20 Jan 2016 23:23:08 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-head@freebsd.org
Subject: svn commit: r294469 - in head/crypto/openssh: . openbsd-compat
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.20
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for &quot;
 user&quot; and &quot; projects&quot; \)" <svn-src-all.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-all/>
List-Post: <mailto:svn-src-all@freebsd.org>
List-Help: <mailto:svn-src-all-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Wed, 20 Jan 2016 23:23:11 -0000

Author: des
Date: Wed Jan 20 23:23:08 2016
New Revision: 294469
URL: https://svnweb.freebsd.org/changeset/base/294469

Log:
  Remove RCS tags from files in which we no longer have any local
  modifications, and add them to two files in which we do.

Modified:
  head/crypto/openssh/buffer.c   (contents, props changed)
  head/crypto/openssh/buffer.h   (contents, props changed)
  head/crypto/openssh/channels.c   (contents, props changed)
  head/crypto/openssh/channels.h   (contents, props changed)
  head/crypto/openssh/clientloop.c   (contents, props changed)
  head/crypto/openssh/compat.c   (contents, props changed)
  head/crypto/openssh/compat.h   (contents, props changed)
  head/crypto/openssh/configure.ac   (contents, props changed)
  head/crypto/openssh/misc.c   (contents, props changed)
  head/crypto/openssh/misc.h   (contents, props changed)
  head/crypto/openssh/openbsd-compat/blowfish.c   (contents, props changed)
  head/crypto/openssh/readconf.h   (contents, props changed)
  head/crypto/openssh/serverloop.c   (contents, props changed)
  head/crypto/openssh/sftp.c   (contents, props changed)

Modified: head/crypto/openssh/buffer.c
==============================================================================
--- head/crypto/openssh/buffer.c	Wed Jan 20 23:22:36 2016	(r294468)
+++ head/crypto/openssh/buffer.c	Wed Jan 20 23:23:08 2016	(r294469)
@@ -19,7 +19,6 @@
 /* Emulation wrappers for legacy OpenSSH buffer API atop sshbuf */
 
 #include "includes.h"
-__RCSID("$FreeBSD$");
 
 #include <sys/types.h>
 

Modified: head/crypto/openssh/buffer.h
==============================================================================
--- head/crypto/openssh/buffer.h	Wed Jan 20 23:22:36 2016	(r294468)
+++ head/crypto/openssh/buffer.h	Wed Jan 20 23:23:08 2016	(r294469)
@@ -1,5 +1,4 @@
 /* $OpenBSD: buffer.h,v 1.25 2014/04/30 05:29:56 djm Exp $ */
-/* $FreeBSD$ */
 
 /*
  * Copyright (c) 2012 Damien Miller <djm@mindrot.org>

Modified: head/crypto/openssh/channels.c
==============================================================================
--- head/crypto/openssh/channels.c	Wed Jan 20 23:22:36 2016	(r294468)
+++ head/crypto/openssh/channels.c	Wed Jan 20 23:23:08 2016	(r294469)
@@ -40,7 +40,6 @@
  */
 
 #include "includes.h"
-__RCSID("$FreeBSD$");
 
 #include <sys/types.h>
 #include <sys/param.h>	/* MIN MAX */

Modified: head/crypto/openssh/channels.h
==============================================================================
--- head/crypto/openssh/channels.h	Wed Jan 20 23:22:36 2016	(r294468)
+++ head/crypto/openssh/channels.h	Wed Jan 20 23:23:08 2016	(r294469)
@@ -1,5 +1,4 @@
 /* $OpenBSD: channels.h,v 1.118 2015/07/01 02:26:31 djm Exp $ */
-/* $FreeBSD$ */
 
 /*
  * Author: Tatu Ylonen <ylo@cs.hut.fi>

Modified: head/crypto/openssh/clientloop.c
==============================================================================
--- head/crypto/openssh/clientloop.c	Wed Jan 20 23:22:36 2016	(r294468)
+++ head/crypto/openssh/clientloop.c	Wed Jan 20 23:23:08 2016	(r294469)
@@ -60,7 +60,6 @@
  */
 
 #include "includes.h"
-__RCSID("$FreeBSD$");
 
 #include <sys/param.h>	/* MIN MAX */
 #include <sys/types.h>

Modified: head/crypto/openssh/compat.c
==============================================================================
--- head/crypto/openssh/compat.c	Wed Jan 20 23:22:36 2016	(r294468)
+++ head/crypto/openssh/compat.c	Wed Jan 20 23:23:08 2016	(r294469)
@@ -24,7 +24,6 @@
  */
 
 #include "includes.h"
-__RCSID("$FreeBSD$");
 
 #include <sys/types.h>
 

Modified: head/crypto/openssh/compat.h
==============================================================================
--- head/crypto/openssh/compat.h	Wed Jan 20 23:22:36 2016	(r294468)
+++ head/crypto/openssh/compat.h	Wed Jan 20 23:23:08 2016	(r294469)
@@ -1,5 +1,4 @@
 /* $OpenBSD: compat.h,v 1.48 2015/05/26 23:23:40 dtucker Exp $ */
-/* $FreeBSD$ */
 
 /*
  * Copyright (c) 1999, 2000, 2001 Markus Friedl.  All rights reserved.

Modified: head/crypto/openssh/configure.ac
==============================================================================
--- head/crypto/openssh/configure.ac	Wed Jan 20 23:22:36 2016	(r294468)
+++ head/crypto/openssh/configure.ac	Wed Jan 20 23:23:08 2016	(r294469)
@@ -1,4 +1,5 @@
 # $Id: configure.ac,v 1.583 2014/08/26 20:32:01 djm Exp $
+# $FreeBSD$
 #
 # Copyright (c) 1999-2004 Damien Miller
 #

Modified: head/crypto/openssh/misc.c
==============================================================================
--- head/crypto/openssh/misc.c	Wed Jan 20 23:22:36 2016	(r294468)
+++ head/crypto/openssh/misc.c	Wed Jan 20 23:23:08 2016	(r294469)
@@ -25,7 +25,6 @@
  */
 
 #include "includes.h"
-__RCSID("$FreeBSD$");
 
 #include <sys/types.h>
 #include <sys/ioctl.h>

Modified: head/crypto/openssh/misc.h
==============================================================================
--- head/crypto/openssh/misc.h	Wed Jan 20 23:22:36 2016	(r294468)
+++ head/crypto/openssh/misc.h	Wed Jan 20 23:23:08 2016	(r294469)
@@ -1,5 +1,4 @@
 /* $OpenBSD: misc.h,v 1.54 2014/07/15 15:54:14 millert Exp $ */
-/* $FreeBSD$ */
 
 /*
  * Author: Tatu Ylonen <ylo@cs.hut.fi>

Modified: head/crypto/openssh/openbsd-compat/blowfish.c
==============================================================================
--- head/crypto/openssh/openbsd-compat/blowfish.c	Wed Jan 20 23:22:36 2016	(r294468)
+++ head/crypto/openssh/openbsd-compat/blowfish.c	Wed Jan 20 23:23:08 2016	(r294469)
@@ -40,7 +40,6 @@
  */
 
 #include "includes.h"
-__RCSID("$FreeBSD$");
 
 #if !defined(HAVE_BCRYPT_PBKDF) && (!defined(HAVE_BLOWFISH_INITSTATE) || \
     !defined(HAVE_BLOWFISH_EXPAND0STATE) || !defined(HAVE_BLF_ENC))

Modified: head/crypto/openssh/readconf.h
==============================================================================
--- head/crypto/openssh/readconf.h	Wed Jan 20 23:22:36 2016	(r294468)
+++ head/crypto/openssh/readconf.h	Wed Jan 20 23:23:08 2016	(r294469)
@@ -1,4 +1,5 @@
 /* $OpenBSD: readconf.h,v 1.110 2015/07/10 06:21:53 markus Exp $ */
+/* $FreeBSD$ */
 
 /*
  * Author: Tatu Ylonen <ylo@cs.hut.fi>

Modified: head/crypto/openssh/serverloop.c
==============================================================================
--- head/crypto/openssh/serverloop.c	Wed Jan 20 23:22:36 2016	(r294468)
+++ head/crypto/openssh/serverloop.c	Wed Jan 20 23:23:08 2016	(r294469)
@@ -36,7 +36,6 @@
  */
 
 #include "includes.h"
-__RCSID("$FreeBSD$");
 
 #include <sys/param.h>	/* MIN MAX */
 #include <sys/types.h>

Modified: head/crypto/openssh/sftp.c
==============================================================================
--- head/crypto/openssh/sftp.c	Wed Jan 20 23:22:36 2016	(r294468)
+++ head/crypto/openssh/sftp.c	Wed Jan 20 23:23:08 2016	(r294469)
@@ -16,7 +16,6 @@
  */
 
 #include "includes.h"
-__RCSID("$FreeBSD$");
 
 #include <sys/param.h>	/* MIN MAX */
 #include <sys/types.h>

From owner-svn-src-all@freebsd.org  Wed Jan 20 23:26:36 2016
Return-Path: <owner-svn-src-all@freebsd.org>
Delivered-To: svn-src-all@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id D4A0EA8B758;
 Wed, 20 Jan 2016 23:26:36 +0000 (UTC) (envelope-from kan@FreeBSD.org)
Received: from repo.freebsd.org (repo.freebsd.org
 [IPv6:2610:1c1:1:6068::e6a:0])
 (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
 (Client did not present a certificate)
 by mx1.freebsd.org (Postfix) with ESMTPS id A8CD410C3;
 Wed, 20 Jan 2016 23:26:36 +0000 (UTC) (envelope-from kan@FreeBSD.org)
Received: from repo.freebsd.org ([127.0.1.37])
 by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u0KNQZ2W066142;
 Wed, 20 Jan 2016 23:26:35 GMT (envelope-from kan@FreeBSD.org)
Received: (from kan@localhost)
 by repo.freebsd.org (8.15.2/8.15.2/Submit) id u0KNQZwL066141;
 Wed, 20 Jan 2016 23:26:35 GMT (envelope-from kan@FreeBSD.org)
Message-Id: <201601202326.u0KNQZwL066141@repo.freebsd.org>
X-Authentication-Warning: repo.freebsd.org: kan set sender to kan@FreeBSD.org
 using -f
From: Alexander Kabaev <kan@FreeBSD.org>
Date: Wed, 20 Jan 2016 23:26:35 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-head@freebsd.org
Subject: svn commit: r294470 - head/libexec/rtld-elf
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.20
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for &quot;
 user&quot; and &quot; projects&quot; \)" <svn-src-all.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-all/>
List-Post: <mailto:svn-src-all@freebsd.org>
List-Help: <mailto:svn-src-all-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Wed, 20 Jan 2016 23:26:36 -0000

Author: kan
Date: Wed Jan 20 23:26:35 2016
New Revision: 294470
URL: https://svnweb.freebsd.org/changeset/base/294470

Log:
  Fix initlist_add_object invocation parameters.
  
  The tail parameter should point to the last object for
  which dependencies should be processed. In most cases,
  this is the object itself.

Modified:
  head/libexec/rtld-elf/rtld.c

Modified: head/libexec/rtld-elf/rtld.c
==============================================================================
--- head/libexec/rtld-elf/rtld.c	Wed Jan 20 23:23:08 2016	(r294469)
+++ head/libexec/rtld-elf/rtld.c	Wed Jan 20 23:26:35 2016	(r294470)
@@ -2016,7 +2016,7 @@ initlist_add_neededs(Needed_Entry *neede
 
     /* Process the current needed object. */
     if (needed->obj != NULL)
-	initlist_add_objects(needed->obj, globallist_next(needed->obj), list);
+	initlist_add_objects(needed->obj, needed->obj, list);
 }
 
 /*
@@ -2039,7 +2039,7 @@ initlist_add_objects(Obj_Entry *obj, Obj
 
     /* Recursively process the successor objects. */
     nobj = globallist_next(obj);
-    if (nobj != NULL && nobj != tail)
+    if (nobj != NULL && obj != tail)
 	initlist_add_objects(nobj, tail, list);
 
     /* Recursively process the needed objects. */
@@ -3140,7 +3140,7 @@ dlopen_object(const char *name, int fd, 
 		 */
 	    } else {
 		/* Make list of init functions to call. */
-		initlist_add_objects(obj, globallist_next(obj), &initlist);
+		initlist_add_objects(obj, obj, &initlist);
 	    }
 	    /*
 	     * Process all no_delete or global objects here, given

From owner-svn-src-all@freebsd.org  Wed Jan 20 23:27:04 2016
Return-Path: <owner-svn-src-all@freebsd.org>
Delivered-To: svn-src-all@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id 230B8A8B79B;
 Wed, 20 Jan 2016 23:27:04 +0000 (UTC)
 (envelope-from avos@FreeBSD.org)
Received: from repo.freebsd.org (repo.freebsd.org
 [IPv6:2610:1c1:1:6068::e6a:0])
 (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
 (Client did not present a certificate)
 by mx1.freebsd.org (Postfix) with ESMTPS id E82CE126A;
 Wed, 20 Jan 2016 23:27:03 +0000 (UTC)
 (envelope-from avos@FreeBSD.org)
Received: from repo.freebsd.org ([127.0.1.37])
 by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u0KNR3fN066223;
 Wed, 20 Jan 2016 23:27:03 GMT (envelope-from avos@FreeBSD.org)
Received: (from avos@localhost)
 by repo.freebsd.org (8.15.2/8.15.2/Submit) id u0KNR2Hh066219;
 Wed, 20 Jan 2016 23:27:02 GMT (envelope-from avos@FreeBSD.org)
Message-Id: <201601202327.u0KNR2Hh066219@repo.freebsd.org>
X-Authentication-Warning: repo.freebsd.org: avos set sender to
 avos@FreeBSD.org using -f
From: Andriy Voskoboinyk <avos@FreeBSD.org>
Date: Wed, 20 Jan 2016 23:27:02 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-head@freebsd.org
Subject: svn commit: r294471 - head/sys/dev/usb/wlan
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.20
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for &quot;
 user&quot; and &quot; projects&quot; \)" <svn-src-all.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-all/>
List-Post: <mailto:svn-src-all@freebsd.org>
List-Help: <mailto:svn-src-all-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Wed, 20 Jan 2016 23:27:04 -0000

Author: avos
Date: Wed Jan 20 23:27:02 2016
New Revision: 294471
URL: https://svnweb.freebsd.org/changeset/base/294471

Log:
  urtwn: rework debug handling
  
  - Use bitmap for debug output selection.
  - Add few new messages (one for URTWN_DEBUG_BEACON
  and another one for URTWN_DEBUG_INTR).
  - Replace an undocumented URTWN_DEBUG definition with USB_DEBUG.
  
  Tested with RTL8188EU / RTL8188CUS in IBSS / HOSTAP modes.
  
  Reviewed by:	kevlo
  Approved by:	adrian (mentor)
  Differential Revision:	https://reviews.freebsd.org/D4959

Modified:
  head/sys/dev/usb/wlan/if_urtwn.c
  head/sys/dev/usb/wlan/if_urtwnreg.h
  head/sys/dev/usb/wlan/if_urtwnvar.h

Modified: head/sys/dev/usb/wlan/if_urtwn.c
==============================================================================
--- head/sys/dev/usb/wlan/if_urtwn.c	Wed Jan 20 23:26:35 2016	(r294470)
+++ head/sys/dev/usb/wlan/if_urtwn.c	Wed Jan 20 23:27:02 2016	(r294471)
@@ -75,18 +75,35 @@ __FBSDID("$FreeBSD$");
 #include <dev/usb/usb_device.h>
 #include "usbdevs.h"
 
-#define USB_DEBUG_VAR urtwn_debug
 #include <dev/usb/usb_debug.h>
 
 #include <dev/usb/wlan/if_urtwnreg.h>
 #include <dev/usb/wlan/if_urtwnvar.h>
 
 #ifdef USB_DEBUG
-static int urtwn_debug = 0;
+enum {
+	URTWN_DEBUG_XMIT	= 0x00000001,	/* basic xmit operation */
+	URTWN_DEBUG_RECV	= 0x00000002,	/* basic recv operation */
+	URTWN_DEBUG_STATE	= 0x00000004,	/* 802.11 state transitions */
+	URTWN_DEBUG_RA		= 0x00000008,	/* f/w rate adaptation setup */
+	URTWN_DEBUG_USB		= 0x00000010,	/* usb requests */
+	URTWN_DEBUG_FIRMWARE	= 0x00000020,	/* firmware(9) loading debug */
+	URTWN_DEBUG_BEACON	= 0x00000040,	/* beacon handling */
+	URTWN_DEBUG_INTR	= 0x00000080,	/* ISR */
+	URTWN_DEBUG_TEMP	= 0x00000100,	/* temperature calibration */
+	URTWN_DEBUG_ROM		= 0x00000200,	/* various ROM info */
+	URTWN_DEBUG_KEY		= 0x00000400,	/* crypto keys management */
+	URTWN_DEBUG_TXPWR	= 0x00000800,	/* dump Tx power values */
+	URTWN_DEBUG_ANY		= 0xffffffff
+};
+
+#define URTWN_DPRINTF(_sc, _m, ...) do {			\
+	if ((_sc)->sc_debug & (_m))				\
+		device_printf((_sc)->sc_dev, __VA_ARGS__);	\
+} while(0)
 
-SYSCTL_NODE(_hw_usb, OID_AUTO, urtwn, CTLFLAG_RW, 0, "USB urtwn");
-SYSCTL_INT(_hw_usb_urtwn, OID_AUTO, debug, CTLFLAG_RWTUN, &urtwn_debug, 0,
-    "Debug level");
+#else
+#define URTWN_DPRINTF(_sc, _m, ...)	do { (void) sc; } while (0)
 #endif
 
 #define	IEEE80211_HAS_ADDR4(wh)	IEEE80211_IS_DSTODS(wh)
@@ -174,7 +191,8 @@ static device_detach_t	urtwn_detach;
 static usb_callback_t   urtwn_bulk_tx_callback;
 static usb_callback_t	urtwn_bulk_rx_callback;
 
-static void		urtwn_drain_mbufq(struct urtwn_softc *sc);
+static void		urtwn_sysctlattach(struct urtwn_softc *);
+static void		urtwn_drain_mbufq(struct urtwn_softc *);
 static usb_error_t	urtwn_do_request(struct urtwn_softc *,
 			    struct usb_device_request *, void *);
 static struct ieee80211vap *urtwn_vap_create(struct ieee80211com *,
@@ -228,7 +246,7 @@ static int		urtwn_llt_write(struct urtwn
 static int		urtwn_efuse_read_next(struct urtwn_softc *, uint8_t *);
 static int		urtwn_efuse_read_data(struct urtwn_softc *, uint8_t *,
 			    uint8_t, uint8_t);
-#ifdef URTWN_DEBUG
+#ifdef USB_DEBUG
 static void		urtwn_dump_rom_contents(struct urtwn_softc *,
 			    uint8_t *, uint16_t);
 #endif
@@ -452,6 +470,13 @@ urtwn_attach(device_t self)
 	if (USB_GET_DRIVER_INFO(uaa) == URTWN_RTL8188E)
 		sc->chip |= URTWN_CHIP_88E;
 
+#ifdef USB_DEBUG
+	int debug;
+	if (resource_int_value(device_get_name(sc->sc_dev),
+	    device_get_unit(sc->sc_dev), "debug", &debug) == 0)
+		sc->sc_debug = debug;
+#endif
+
 	mtx_init(&sc->sc_mtx, device_get_nameunit(self),
 	    MTX_NETWORK_LOCK, MTX_DEF);
 	URTWN_CMDQ_LOCK_INIT(sc);
@@ -561,6 +586,8 @@ urtwn_attach(device_t self)
 
 	TASK_INIT(&sc->cmdq_task, 0, urtwn_cmdq_cb, sc);
 
+	urtwn_sysctlattach(sc);
+
 	if (bootverbose)
 		ieee80211_announce(ic);
 
@@ -571,6 +598,19 @@ detach:
 	return (ENXIO);			/* failure */
 }
 
+static void
+urtwn_sysctlattach(struct urtwn_softc *sc)
+{
+#ifdef USB_DEBUG
+	struct sysctl_ctx_list *ctx = device_get_sysctl_ctx(sc->sc_dev);
+	struct sysctl_oid *tree = device_get_sysctl_tree(sc->sc_dev);
+
+	SYSCTL_ADD_U32(ctx, SYSCTL_CHILDREN(tree), OID_AUTO,
+	    "debug", CTLFLAG_RW, &sc->sc_debug, sc->sc_debug,
+	    "control debugging printfs");
+#endif
+}
+
 static int
 urtwn_detach(device_t self)
 {
@@ -651,8 +691,9 @@ urtwn_do_request(struct urtwn_softc *sc,
 		if (err == 0)
 			break;
 
-		DPRINTFN(1, "Control request failed, %s (retrying)\n",
-		    usbd_errstr(err));
+		URTWN_DPRINTF(sc, URTWN_DEBUG_USB,
+		    "%s: control request failed, %s (retries left: %d)\n",
+		    __func__, usbd_errstr(err), ntries);
 		usb_pause_mtx(&sc->sc_mtx, hz / 100);
 	}
 	return (err);
@@ -746,14 +787,16 @@ urtwn_rx_copy_to_mbuf(struct urtwn_softc
 		 * This should not happen since we setup our Rx filter
 		 * to not receive these frames.
 		 */
-		DPRINTFN(6, "RX flags error (%s)\n",
+		URTWN_DPRINTF(sc, URTWN_DEBUG_RECV,
+		    "%s: RX flags error (%s)\n", __func__,
 		    rxdw0 & R92C_RXDW0_CRCERR ? "CRC" : "ICV");
 		goto fail;
 	}
 
 	pktlen = MS(rxdw0, R92C_RXDW0_PKTLEN);
 	if (pktlen < sizeof(struct ieee80211_frame_ack)) {
-		DPRINTFN(6, "frame too short: %d\n", pktlen);
+		URTWN_DPRINTF(sc, URTWN_DEBUG_RECV,
+		    "%s: frame is too short: %d\n", __func__, pktlen);
 		goto fail;
 	}
 
@@ -810,7 +853,9 @@ urtwn_report_intr(struct usb_xfer *xfer,
 			urtwn_r88e_ratectl_tx_complete(sc, &stat[1]);
 			break;
 		default:
-			DPRINTFN(7, "case %d was not handled\n", report_sel);
+			URTWN_DPRINTF(sc, URTWN_DEBUG_INTR,
+			    "%s: case %d was not handled\n", __func__,
+			    report_sel);
 			break;
 		}
 	} else
@@ -830,7 +875,8 @@ urtwn_rxeof(struct urtwn_softc *sc, uint
 	/* Get the number of encapsulated frames. */
 	stat = (struct r92c_rx_stat *)buf;
 	npkts = MS(le32toh(stat->rxdw2), R92C_RXDW2_PKTCNT);
-	DPRINTFN(6, "Rx %d frames in one chunk\n", npkts);
+	URTWN_DPRINTF(sc, URTWN_DEBUG_RECV,
+	    "%s: Rx %d frames in one chunk\n", __func__, npkts);
 
 	/* Process all of them. */
 	while (npkts-- > 0) {
@@ -885,6 +931,10 @@ urtwn_r88e_ratectl_tx_complete(struct ur
 	ni = sc->node_list[macid];
 	if (ni != NULL) {
 		vap = ni->ni_vap;
+		URTWN_DPRINTF(sc, URTWN_DEBUG_INTR, "%s: frame for macid %d was"
+		    "%s sent (%d retries)\n", __func__, macid,
+		    (rpt->rptb1 & R88E_RPTB1_PKT_OK) ? "" : " not",
+		    ntries);
 
 		if (rpt->rptb1 & R88E_RPTB1_PKT_OK) {
 			ieee80211_ratectl_tx_complete(vap, ni,
@@ -893,8 +943,10 @@ urtwn_r88e_ratectl_tx_complete(struct ur
 			ieee80211_ratectl_tx_complete(vap, ni,
 			    IEEE80211_RATECTL_TX_FAILURE, &ntries, NULL);
 		}
-	} else
-		DPRINTFN(8, "macid %d, ni is NULL\n", macid);
+	} else {
+		URTWN_DPRINTF(sc, URTWN_DEBUG_INTR, "%s: macid %d, ni is NULL\n",
+		    __func__, macid);
+	}
 	URTWN_NT_UNLOCK(sc);
 }
 
@@ -1177,7 +1229,8 @@ urtwn_bulk_tx_callback(struct usb_xfer *
 tr_setup:
 		data = STAILQ_FIRST(&sc->sc_tx_pending);
 		if (data == NULL) {
-			DPRINTF("%s: empty pending queue\n", __func__);
+			URTWN_DPRINTF(sc, URTWN_DEBUG_XMIT,
+			    "%s: empty pending queue\n", __func__);
 			goto finish;
 		}
 		STAILQ_REMOVE_HEAD(&sc->sc_tx_pending, next);
@@ -1210,8 +1263,10 @@ _urtwn_getbuf(struct urtwn_softc *sc)
 	bf = STAILQ_FIRST(&sc->sc_tx_inactive);
 	if (bf != NULL)
 		STAILQ_REMOVE_HEAD(&sc->sc_tx_inactive, next);
-	else
-		DPRINTF("%s: %s\n", __func__, "out of xmit buffers");
+	else {
+		URTWN_DPRINTF(sc, URTWN_DEBUG_XMIT,
+		    "%s: out of xmit buffers\n", __func__);
+	}
 	return (bf);
 }
 
@@ -1223,8 +1278,10 @@ urtwn_getbuf(struct urtwn_softc *sc)
 	URTWN_ASSERT_LOCKED(sc);
 
 	bf = _urtwn_getbuf(sc);
-	if (bf == NULL)
-		DPRINTF("%s: stop queue\n", __func__);
+	if (bf == NULL) {
+		URTWN_DPRINTF(sc, URTWN_DEBUG_XMIT, "%s: stop queue\n",
+		    __func__);
+	}
 	return (bf);
 }
 
@@ -1529,20 +1586,22 @@ urtwn_efuse_read_data(struct urtwn_softc
 		error = urtwn_efuse_read_next(sc, &reg);
 		if (error != 0)
 			return (error);
-		DPRINTF("rom[0x%03X] == 0x%02X\n", off * 8 + i * 2, reg);
+		URTWN_DPRINTF(sc, URTWN_DEBUG_ROM, "rom[0x%03X] == 0x%02X\n",
+		    off * 8 + i * 2, reg);
 		rom[off * 8 + i * 2 + 0] = reg;
 
 		error = urtwn_efuse_read_next(sc, &reg);
 		if (error != 0)
 			return (error);
-		DPRINTF("rom[0x%03X] == 0x%02X\n", off * 8 + i * 2 + 1, reg);
+		URTWN_DPRINTF(sc, URTWN_DEBUG_ROM, "rom[0x%03X] == 0x%02X\n",
+		    off * 8 + i * 2 + 1, reg);
 		rom[off * 8 + i * 2 + 1] = reg;
 	}
 
 	return (0);
 }
 
-#ifdef URTWN_DEBUG
+#ifdef USB_DEBUG
 static void
 urtwn_dump_rom_contents(struct urtwn_softc *sc, uint8_t *rom, uint16_t size)
 {
@@ -1599,8 +1658,8 @@ urtwn_efuse_read(struct urtwn_softc *sc,
 
 end:
 
-#ifdef URTWN_DEBUG
-	if (urtwn_debug >= 2)
+#ifdef USB_DEBUG
+	if (sc->sc_debug & URTWN_DEBUG_ROM)
 		urtwn_dump_rom_contents(sc, rom, size);
 #endif
 
@@ -1695,12 +1754,14 @@ urtwn_read_rom(struct urtwn_softc *sc)
 	error = urtwn_efuse_read_next(sc, &sc->pa_setting);
 	if (error != 0)
 		return (error);
-	DPRINTF("PA setting=0x%x\n", sc->pa_setting);
+	URTWN_DPRINTF(sc, URTWN_DEBUG_ROM, "%s: PA setting=0x%x\n", __func__,
+	    sc->pa_setting);
 
 	sc->board_type = MS(rom->rf_opt1, R92C_ROM_RF1_BOARD_TYPE);
 
 	sc->regulatory = MS(rom->rf_opt1, R92C_ROM_RF1_REGULATORY);
-	DPRINTF("regulatory type=%d\n", sc->regulatory);
+	URTWN_DPRINTF(sc, URTWN_DEBUG_ROM, "%s: regulatory type=%d\n",
+	    __func__, sc->regulatory);
 	IEEE80211_ADDR_COPY(sc->sc_ic.ic_macaddr, rom->macaddr);
 
 	sc->sc_rf_write = urtwn_r92c_rf_write;
@@ -1726,7 +1787,8 @@ urtwn_r88e_read_rom(struct urtwn_softc *
 	if (sc->ofdm_tx_pwr_diff & 0x08)
 		sc->ofdm_tx_pwr_diff |= 0xf0;
 	sc->regulatory = MS(rom->rf_board_opt, R92C_ROM_RF1_REGULATORY);
-	DPRINTF("regulatory type=%d\n", sc->regulatory);
+	URTWN_DPRINTF(sc, URTWN_DEBUG_ROM, "%s: regulatory type %d\n",
+	    __func__,sc->regulatory);
 	IEEE80211_ADDR_COPY(sc->sc_ic.ic_macaddr, rom->macaddr);
 
 	sc->sc_rf_write = urtwn_r88e_rf_write;
@@ -1777,7 +1839,8 @@ urtwn_ra_init(struct urtwn_softc *sc)
 		mode = R92C_RAID_11B;
 	else
 		mode = R92C_RAID_11BG;
-	DPRINTF("mode=0x%x rates=0x%08x, basicrates=0x%08x\n",
+	URTWN_DPRINTF(sc, URTWN_DEBUG_RA,
+	    "%s: mode 0x%x, rates 0x%08x, basicrates 0x%08x\n", __func__,
 	    mode, rates, basicrates);
 
 	/* Set rates mask for group addressed frames. */
@@ -1791,7 +1854,8 @@ urtwn_ra_init(struct urtwn_softc *sc)
 		return (error);
 	}
 	/* Set initial MRR rate. */
-	DPRINTF("maxbasicrate=%d\n", maxbasicrate);
+	URTWN_DPRINTF(sc, URTWN_DEBUG_RA, "%s: maxbasicrate %d\n", __func__,
+	    maxbasicrate);
 	urtwn_write_1(sc, R92C_INIDATA_RATE_SEL(URTWN_MACID_BC),
 	    maxbasicrate);
 
@@ -1805,7 +1869,8 @@ urtwn_ra_init(struct urtwn_softc *sc)
 		return (error);
 	}
 	/* Set initial MRR rate. */
-	DPRINTF("maxrate=%d\n", maxrate);
+	URTWN_DPRINTF(sc, URTWN_DEBUG_RA, "%s: maxrate %d\n", __func__,
+	    maxrate);
 	urtwn_write_1(sc, R92C_INIDATA_RATE_SEL(URTWN_MACID_BSS),
 	    maxrate);
 
@@ -1872,6 +1937,10 @@ urtwn_setup_beacon(struct urtwn_softc *s
 	if ((error = urtwn_tx_beacon(sc, uvp)) != 0)
 		return (error);
 
+	URTWN_DPRINTF(sc, URTWN_DEBUG_BEACON, "%s: beacon was %srecognized\n",
+	    __func__, urtwn_read_1(sc, R92C_TDECTRL + 2) &
+	    (R92C_TDECTRL_BCN_VALID >> 16) ? "" : "not ");
+
 	return (0);
 }
 
@@ -2004,9 +2073,11 @@ urtwn_key_set_cb(struct urtwn_softc *sc,
 		return;
 	}
 
-	DPRINTFN(9, "keyix %d, keyid %d, algo %d/%d, flags %04X, len %d, "
-	    "macaddr %s\n", k->wk_keyix, keyid, k->wk_cipher->ic_cipher, algo,
-	    k->wk_flags, k->wk_keylen, ether_sprintf(k->wk_macaddr));
+	URTWN_DPRINTF(sc, URTWN_DEBUG_KEY,
+	    "%s: keyix %d, keyid %d, algo %d/%d, flags %04X, len %d, "
+	    "macaddr %s\n", __func__, k->wk_keyix, keyid,
+	    k->wk_cipher->ic_cipher, algo, k->wk_flags, k->wk_keylen,
+	    ether_sprintf(k->wk_macaddr));
 
 	/* Write key. */
 	for (i = 0; i < 4; i++) {
@@ -2041,7 +2112,8 @@ urtwn_key_del_cb(struct urtwn_softc *sc,
 	struct ieee80211_key *k = &data->key;
 	int i;
 
-	DPRINTFN(9, "keyix %d, flags %04X, macaddr %s\n", 
+	URTWN_DPRINTF(sc, URTWN_DEBUG_KEY,
+	    "%s: keyix %d, flags %04X, macaddr %s\n", __func__,
 	    k->wk_keyix, k->wk_flags, ether_sprintf(k->wk_macaddr));
 
 	urtwn_cam_write(sc, R92C_CAM_CTL0(k->wk_keyix), 0);
@@ -2233,8 +2305,8 @@ urtwn_newstate(struct ieee80211vap *vap,
 	int error = 0;
 
 	ostate = vap->iv_state;
-	DPRINTF("%s -> %s\n", ieee80211_state_name[ostate],
-	    ieee80211_state_name[nstate]);
+	URTWN_DPRINTF(sc, URTWN_DEBUG_STATE, "%s -> %s\n",
+	    ieee80211_state_name[ostate], ieee80211_state_name[nstate]);
 
 	IEEE80211_UNLOCK(ic);
 	URTWN_LOCK(sc);
@@ -2442,7 +2514,8 @@ urtwn_update_avgrssi(struct urtwn_softc 
 		sc->avg_pwdb = ((sc->avg_pwdb * 19 + pwdb) / 20) + 1;
 	else
 		sc->avg_pwdb = ((sc->avg_pwdb * 19 + pwdb) / 20);
-	DPRINTFN(4, "PWDB=%d EMA=%d\n", pwdb, sc->avg_pwdb);
+	URTWN_DPRINTF(sc, URTWN_DEBUG_RA, "%s: PWDB %d, EMA %d\n", __func__,
+	    pwdb, sc->avg_pwdb);
 }
 
 static int8_t
@@ -3275,7 +3348,8 @@ urtwn_load_firmware(struct urtwn_softc *
 	if ((le16toh(hdr->signature) >> 4) == 0x88c ||
 	    (le16toh(hdr->signature) >> 4) == 0x88e ||
 	    (le16toh(hdr->signature) >> 4) == 0x92c) {
-		DPRINTF("FW V%d.%d %02d-%02d %02d:%02d\n",
+		URTWN_DPRINTF(sc, URTWN_DEBUG_FIRMWARE,
+		    "FW V%d.%d %02d-%02d %02d:%02d\n",
 		    le16toh(hdr->version), le16toh(hdr->subversion),
 		    hdr->month, hdr->date, hdr->hour, hdr->minute);
 		ptr += sizeof(*hdr);
@@ -3986,8 +4060,8 @@ urtwn_get_txpower(struct urtwn_softc *sc
 		if (power[ridx] > R92C_MAX_TX_PWR)
 			power[ridx] = R92C_MAX_TX_PWR;
 	}
-#ifdef URTWN_DEBUG
-	if (urtwn_debug >= 4) {
+#ifdef USB_DEBUG
+	if (sc->sc_debug & URTWN_DEBUG_TXPWR) {
 		/* Dump per-rate Tx power values. */
 		printf("Tx power for chain %d:\n", chain);
 		for (ridx = URTWN_RIDX_CCK1; ridx < URTWN_RIDX_COUNT; ridx++)
@@ -4213,7 +4287,8 @@ urtwn_update_slot_cb(struct urtwn_softc 
 
 	slottime = IEEE80211_GET_SLOTTIME(ic);
 
-	DPRINTFN(10, "setting slot time to %uus\n", slottime);
+	URTWN_DPRINTF(sc, URTWN_DEBUG_ANY, "%s: setting slot time to %uus\n",
+	    __func__, slottime);
 
 	urtwn_write_1(sc, R92C_SLOT, slottime);
 	urtwn_update_aifs(sc, slottime);

Modified: head/sys/dev/usb/wlan/if_urtwnreg.h
==============================================================================
--- head/sys/dev/usb/wlan/if_urtwnreg.h	Wed Jan 20 23:26:35 2016	(r294470)
+++ head/sys/dev/usb/wlan/if_urtwnreg.h	Wed Jan 20 23:27:02 2016	(r294471)
@@ -458,6 +458,7 @@
 /* Bits for R92C_TDECTRL. */
 #define R92C_TDECTRL_BLK_DESC_NUM_M	0x000000f0
 #define R92C_TDECTRL_BLK_DESC_NUM_S	4
+#define R92C_TDECTRL_BCN_VALID		0x00010000
 
 /* Bits for R92C_FWHW_TXQ_CTRL. */
 #define R92C_FWHW_TXQ_CTRL_AMPDU_RTY_NEW	0x80

Modified: head/sys/dev/usb/wlan/if_urtwnvar.h
==============================================================================
--- head/sys/dev/usb/wlan/if_urtwnvar.h	Wed Jan 20 23:26:35 2016	(r294470)
+++ head/sys/dev/usb/wlan/if_urtwnvar.h	Wed Jan 20 23:27:02 2016	(r294471)
@@ -150,8 +150,9 @@ struct urtwn_softc {
 	device_t			sc_dev;
 	struct usb_device		*sc_udev;
 
+	uint32_t			sc_debug;
 	uint8_t				sc_iface_index;
-	u_int				sc_flags;
+	uint8_t				sc_flags;
 #define URTWN_FLAG_CCK_HIPWR	0x01
 #define URTWN_DETACHED		0x02
 #define	URTWN_RUNNING		0x04

From owner-svn-src-all@freebsd.org  Wed Jan 20 23:34:00 2016
Return-Path: <owner-svn-src-all@freebsd.org>
Delivered-To: svn-src-all@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0A2E0A8BA0A;
 Wed, 20 Jan 2016 23:34:00 +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 BF1BC1772;
 Wed, 20 Jan 2016 23:33:59 +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 u0KNXwXx069302;
 Wed, 20 Jan 2016 23:33:58 GMT (envelope-from mjg@FreeBSD.org)
Received: (from mjg@localhost)
 by repo.freebsd.org (8.15.2/8.15.2/Submit) id u0KNXwhK069298;
 Wed, 20 Jan 2016 23:33:58 GMT (envelope-from mjg@FreeBSD.org)
Message-Id: <201601202333.u0KNXwhK069298@repo.freebsd.org>
X-Authentication-Warning: repo.freebsd.org: mjg set sender to mjg@FreeBSD.org
 using -f
From: Mateusz Guzik <mjg@FreeBSD.org>
Date: Wed, 20 Jan 2016 23:33:58 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-head@freebsd.org
Subject: svn commit: r294472 - in head/sys: kern sys
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.20
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for &quot;
 user&quot; and &quot; projects&quot; \)" <svn-src-all.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-all/>
List-Post: <mailto:svn-src-all@freebsd.org>
List-Help: <mailto:svn-src-all-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Wed, 20 Jan 2016 23:34:00 -0000

Author: mjg
Date: Wed Jan 20 23:33:58 2016
New Revision: 294472
URL: https://svnweb.freebsd.org/changeset/base/294472

Log:
  session: avoid proctree lock on proc exit when possible
  
  We can get away with the common case with only proc lock held.
  
  Reviewed by:	kib

Modified:
  head/sys/kern/kern_exit.c
  head/sys/kern/kern_proc.c
  head/sys/sys/proc.h

Modified: head/sys/kern/kern_exit.c
==============================================================================
--- head/sys/kern/kern_exit.c	Wed Jan 20 23:27:02 2016	(r294471)
+++ head/sys/kern/kern_exit.c	Wed Jan 20 23:33:58 2016	(r294472)
@@ -189,7 +189,6 @@ exit1(struct thread *td, int rval, int s
 {
 	struct proc *p, *nq, *q, *t;
 	struct thread *tdt;
-	struct vnode *ttyvp = NULL;
 
 	mtx_assert(&Giant, MA_NOTOWNED);
 	KASSERT(rval == 0 || signo == 0, ("exit1 rv %d sig %d", rval, signo));
@@ -394,60 +393,9 @@ exit1(struct thread *td, int rval, int s
 	}
 
 	vmspace_exit(td);
-
-	sx_xlock(&proctree_lock);
-	if (SESS_LEADER(p)) {
-		struct session *sp = p->p_session;
-		struct tty *tp;
-
-		/*
-		 * s_ttyp is not zero'd; we use this to indicate that
-		 * the session once had a controlling terminal. (for
-		 * logging and informational purposes)
-		 */
-		SESS_LOCK(sp);
-		ttyvp = sp->s_ttyvp;
-		tp = sp->s_ttyp;
-		sp->s_ttyvp = NULL;
-		sp->s_ttydp = NULL;
-		sp->s_leader = NULL;
-		SESS_UNLOCK(sp);
-
-		/*
-		 * Signal foreground pgrp and revoke access to
-		 * controlling terminal if it has not been revoked
-		 * already.
-		 *
-		 * Because the TTY may have been revoked in the mean
-		 * time and could already have a new session associated
-		 * with it, make sure we don't send a SIGHUP to a
-		 * foreground process group that does not belong to this
-		 * session.
-		 */
-
-		if (tp != NULL) {
-			tty_lock(tp);
-			if (tp->t_session == sp)
-				tty_signal_pgrp(tp, SIGHUP);
-			tty_unlock(tp);
-		}
-
-		if (ttyvp != NULL) {
-			sx_xunlock(&proctree_lock);
-			if (vn_lock(ttyvp, LK_EXCLUSIVE) == 0) {
-				VOP_REVOKE(ttyvp, REVOKEALL);
-				VOP_UNLOCK(ttyvp, 0);
-			}
-			sx_xlock(&proctree_lock);
-		}
-	}
-	fixjobc(p, p->p_pgrp, 0);
-	sx_xunlock(&proctree_lock);
+	killjobc();
 	(void)acct_process(td);
 
-	/* Release the TTY now we've unlocked everything. */
-	if (ttyvp != NULL)
-		vrele(ttyvp);
 #ifdef KTRACE
 	ktrprocexit(td);
 #endif

Modified: head/sys/kern/kern_proc.c
==============================================================================
--- head/sys/kern/kern_proc.c	Wed Jan 20 23:27:02 2016	(r294471)
+++ head/sys/kern/kern_proc.c	Wed Jan 20 23:33:58 2016	(r294472)
@@ -686,6 +686,79 @@ fixjobc(struct proc *p, struct pgrp *pgr
 	}
 }
 
+void
+killjobc(void)
+{
+	struct session *sp;
+	struct tty *tp;
+	struct proc *p;
+	struct vnode *ttyvp;
+
+	p = curproc;
+	MPASS(p->p_flag & P_WEXIT);
+	/*
+	 * Do a quick check to see if there is anything to do with the
+	 * proctree_lock held. pgrp and LIST_EMPTY checks are for fixjobc().
+	 */
+	PROC_LOCK(p);
+	if (!SESS_LEADER(p) &&
+	    (p->p_pgrp == p->p_pptr->p_pgrp) &&
+	    LIST_EMPTY(&p->p_children)) {
+		PROC_UNLOCK(p);
+		return;
+	}
+	PROC_UNLOCK(p);
+
+	sx_xlock(&proctree_lock);
+	if (SESS_LEADER(p)) {
+		sp = p->p_session;
+
+		/*
+		 * s_ttyp is not zero'd; we use this to indicate that
+		 * the session once had a controlling terminal. (for
+		 * logging and informational purposes)
+		 */
+		SESS_LOCK(sp);
+		ttyvp = sp->s_ttyvp;
+		tp = sp->s_ttyp;
+		sp->s_ttyvp = NULL;
+		sp->s_ttydp = NULL;
+		sp->s_leader = NULL;
+		SESS_UNLOCK(sp);
+
+		/*
+		 * Signal foreground pgrp and revoke access to
+		 * controlling terminal if it has not been revoked
+		 * already.
+		 *
+		 * Because the TTY may have been revoked in the mean
+		 * time and could already have a new session associated
+		 * with it, make sure we don't send a SIGHUP to a
+		 * foreground process group that does not belong to this
+		 * session.
+		 */
+
+		if (tp != NULL) {
+			tty_lock(tp);
+			if (tp->t_session == sp)
+				tty_signal_pgrp(tp, SIGHUP);
+			tty_unlock(tp);
+		}
+
+		if (ttyvp != NULL) {
+			sx_xunlock(&proctree_lock);
+			if (vn_lock(ttyvp, LK_EXCLUSIVE) == 0) {
+				VOP_REVOKE(ttyvp, REVOKEALL);
+				VOP_UNLOCK(ttyvp, 0);
+			}
+			vrele(ttyvp);
+			sx_xlock(&proctree_lock);
+		}
+	}
+	fixjobc(p, p->p_pgrp, 0);
+	sx_xunlock(&proctree_lock);
+}
+
 /*
  * A process group has become orphaned;
  * if there are any stopped processes in the group,

Modified: head/sys/sys/proc.h
==============================================================================
--- head/sys/sys/proc.h	Wed Jan 20 23:27:02 2016	(r294471)
+++ head/sys/sys/proc.h	Wed Jan 20 23:33:58 2016	(r294472)
@@ -938,6 +938,7 @@ void	fork_return(struct thread *, struct
 int	inferior(struct proc *p);
 void	kern_yield(int);
 void 	kick_proc0(void);
+void	killjobc(void);
 int	leavepgrp(struct proc *p);
 int	maybe_preempt(struct thread *td);
 void	maybe_yield(void);

From owner-svn-src-all@freebsd.org  Wed Jan 20 23:35:36 2016
Return-Path: <owner-svn-src-all@freebsd.org>
Delivered-To: svn-src-all@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id 24F6EA8BA9A;
 Wed, 20 Jan 2016 23:35:36 +0000 (UTC) (envelope-from avg@FreeBSD.org)
Received: from citadel.icyb.net.ua (citadel.icyb.net.ua [212.40.38.140])
 by mx1.freebsd.org (Postfix) with ESMTP id C3BEF1957;
 Wed, 20 Jan 2016 23:35:34 +0000 (UTC) (envelope-from avg@FreeBSD.org)
Received: from porto.starpoint.kiev.ua (porto-e.starpoint.kiev.ua
 [212.40.38.100])
 by citadel.icyb.net.ua (8.8.8p3/ICyb-2.3exp) with ESMTP id BAA11899;
 Thu, 21 Jan 2016 01:35:33 +0200 (EET) (envelope-from avg@FreeBSD.org)
Received: from localhost ([127.0.0.1])
 by porto.starpoint.kiev.ua with esmtp (Exim 4.34 (FreeBSD))
 id 1aM2Hl-0006jS-1C; Thu, 21 Jan 2016 01:35:33 +0200
Subject: Re: svn commit: r294329 - in
 head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs: . sys
To: Alan Somers <asomers@FreeBSD.org>
References: <201601191700.u0JH0P6k061610@repo.freebsd.org>
 <569E6DA0.9010300@pix.net>
 <CAOtMX2idrWOpWbkYxPFn3yur8w-vgfBryhT4_0yiBvg10sWWRA@mail.gmail.com>
 <569F516D.80303@FreeBSD.org>
 <CAOtMX2gs37OnLMXE4zCduZF94+5z-TgPW+qg8K8BweauLCRgDQ@mail.gmail.com>
Cc: "src-committers@freebsd.org" <src-committers@FreeBSD.org>,
 "svn-src-all@freebsd.org" <svn-src-all@FreeBSD.org>,
 "svn-src-head@freebsd.org" <svn-src-head@FreeBSD.org>
From: Andriy Gapon <avg@FreeBSD.org>
X-Enigmail-Draft-Status: N1110
Message-ID: <56A019A1.4030900@FreeBSD.org>
Date: Thu, 21 Jan 2016 01:34:57 +0200
User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:38.0) Gecko/20100101
 Thunderbird/38.5.0
MIME-Version: 1.0
In-Reply-To: <CAOtMX2gs37OnLMXE4zCduZF94+5z-TgPW+qg8K8BweauLCRgDQ@mail.gmail.com>
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 7bit
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.20
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for &quot;
 user&quot; and &quot; projects&quot; \)" <svn-src-all.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-all/>
List-Post: <mailto:svn-src-all@freebsd.org>
List-Help: <mailto:svn-src-all-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Wed, 20 Jan 2016 23:35:36 -0000

On 20/01/2016 22:03, Alan Somers wrote:
> On Wed, Jan 20, 2016 at 2:20 AM, Andriy Gapon <avg@freebsd.org> wrote:
>> On 19/01/2016 19:20, Alan Somers wrote:
>>> The thing is, it never really worked in the first place.  Panics and
>>> deadlocks are so frequent that I don't think the feature was usable
>>> for anybody.
>>
>> The feature is perfectly usable for me.  I have never run into the problems that
>> you describe.  Why not fix the real bugs that you've run into?
> 
> Spectra Logic and iXSystems both experienced many problems with this.
> The worst is a deadlock that can be triggered simply by pulling a
> drive from a redundant pool when there exists a zvol anywhere in the
> system (see https://reviews.freebsd.org/D4998 for a quick way to
> reproduce).  Fixing it correctly would likely require far more time
> than I have available.  I just want the bugs to go away.  See that
> same code review for a change to make the feature optional.

I think that we all want all the bugs to go way.  One way to remove bugs is to
remove (disable) code that contains bugs.  That way the perfect bug-free
software is clearly achievable :-)  Unfortunately, that technique is not always
welcomed.

P.S.
I think that the real problem here is that a method of a geom must never drop
topology_lock.  In other words, the GEOM management code (like g_xxx() stuff in
geom_subr.c) expects that a topology can not change underneath it.  But
zvol_geom_access() clearly breaks that contract.

-- 
Andriy Gapon

From owner-svn-src-all@freebsd.org  Wed Jan 20 23:38:50 2016
Return-Path: <owner-svn-src-all@freebsd.org>
Delivered-To: svn-src-all@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id 45DA1A8BB96;
 Wed, 20 Jan 2016 23:38:50 +0000 (UTC)
 (envelope-from marius@alchemy.franken.de)
Received: from alchemy.franken.de (alchemy.franken.de [194.94.249.214])
 (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
 (Client CN "alchemy.franken.de", Issuer "alchemy.franken.de" (not verified))
 by mx1.freebsd.org (Postfix) with ESMTPS id D228F1B25;
 Wed, 20 Jan 2016 23:38:49 +0000 (UTC)
 (envelope-from marius@alchemy.franken.de)
Received: from alchemy.franken.de (localhost [127.0.0.1])
 by alchemy.franken.de (8.15.2/8.15.2/ALCHEMY.FRANKEN.DE) with ESMTPS id
 u0KNcd1c058255
 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO);
 Thu, 21 Jan 2016 00:38:39 +0100 (CET)
 (envelope-from marius@alchemy.franken.de)
Received: (from marius@localhost)
 by alchemy.franken.de (8.15.2/8.15.2/Submit) id u0KNcdcp058254;
 Thu, 21 Jan 2016 00:38:39 +0100 (CET) (envelope-from marius)
Date: Thu, 21 Jan 2016 00:38:39 +0100
From: Marius Strobl <marius@alchemy.franken.de>
To: Ian Lepore <ian@freebsd.org>
Cc: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-head@freebsd.org
Subject: Re: svn commit: r294362 - in head/sys: dev/uart kern sys
Message-ID: <20160120233839.GN15359@alchemy.franken.de>
References: <201601192334.u0JNYST5080954@repo.freebsd.org>
 <1453256671.46848.98.camel@freebsd.org>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <1453256671.46848.98.camel@freebsd.org>
User-Agent: Mutt/1.5.24 (2015-08-30)
X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.4.3
 (alchemy.franken.de [0.0.0.0]); Thu, 21 Jan 2016 00:38:39 +0100 (CET)
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.20
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for &quot;
 user&quot; and &quot; projects&quot; \)" <svn-src-all.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-all/>
List-Post: <mailto:svn-src-all@freebsd.org>
List-Help: <mailto:svn-src-all-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Wed, 20 Jan 2016 23:38:50 -0000

On Tue, Jan 19, 2016 at 07:24:31PM -0700, Ian Lepore wrote:
> On Tue, 2016-01-19 at 23:34 +0000, Marius Strobl wrote:
> > Author: marius
> > Date: Tue Jan 19 23:34:27 2016
> > New Revision: 294362
> > URL: https://svnweb.freebsd.org/changeset/base/294362
> > 
> > Log:
> >   Fix tty_drain() and, thus, TIOCDRAIN of the current tty(4) incarnation
> >   to actually wait until the TX FIFOs of UARTs have be drained before
> >   returning. This is done by bringing the equivalent of the TS_BUSY flag
> >   found in the previous implementation back in an ABI-preserving way.
> >   Reported and tested by: Patrick Powell
> >   
> >   Most likely, drivers for USB-serial-adapters likewise incorporating
> >   TX FIFOs as well as other terminal devices that buffer output in some
> >   form should also provide implementations of tsw_busy.
> >   
> >   MFC after:> 	> 3 days
> > 
> > Modified:
> >   head/sys/dev/uart/uart_tty.c
> >   head/sys/kern/tty.c
> >   head/sys/sys/ttydevsw.h
> 
> This rocks.
> 
> It would rock even more if uart's sc_txbusy actually meant what its
> name implies, but for some hardware what it really indicates is "the
> hardware can/cannot accept more data" which is not the same as "all
> data has been transmitted."  Even for hardware that doesn't signal
> txidle until the fifo is completely empty (not just at a lowater mark),
> there may still be a last byte on the way out from a tx holding
> register.
> 

Yes, I'm aware that at least for uart_dev_ns8250.c, sc_txbusy
doesn't cover a character still being in the TX shift register
so far. I've started working on that but it turned out to be
non-trivial to get right.

Marius


From owner-svn-src-all@freebsd.org  Wed Jan 20 23:47:08 2016
Return-Path: <owner-svn-src-all@freebsd.org>
Delivered-To: svn-src-all@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id DD00CA8BE50;
 Wed, 20 Jan 2016 23:47:08 +0000 (UTC)
 (envelope-from brooks@spindle.one-eyed-alien.net)
Received: from spindle.one-eyed-alien.net (spindle.one-eyed-alien.net
 [199.48.129.229])
 (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
 (Client did not present a certificate)
 by mx1.freebsd.org (Postfix) with ESMTPS id B5E491165;
 Wed, 20 Jan 2016 23:47:08 +0000 (UTC)
 (envelope-from brooks@spindle.one-eyed-alien.net)
Received: by spindle.one-eyed-alien.net (Postfix, from userid 3001)
 id 3654C5A9F13; Wed, 20 Jan 2016 23:47:01 +0000 (UTC)
Date: Wed, 20 Jan 2016 23:47:01 +0000
From: Brooks Davis <brooks@freebsd.org>
To: Warner Losh <imp@bsdimp.com>
Cc: src-committers <src-committers@freebsd.org>, svn-src-all@freebsd.org,
 svn-src-head@freebsd.org
Subject: Re: svn commit: r294461 - head/sys/modules/i2c/iicbb
Message-ID: <20160120234701.GA79351@spindle.one-eyed-alien.net>
References: <201601202154.u0KLsiEL036078@repo.freebsd.org>
 <6C0577ED-2599-463B-9ADF-0D49E3C3B7EC@bsdimp.com>
MIME-Version: 1.0
Content-Type: multipart/signed; micalg=pgp-sha1;
 protocol="application/pgp-signature"; boundary="ZPt4rx8FFjLCG7dd"
Content-Disposition: inline
In-Reply-To: <6C0577ED-2599-463B-9ADF-0D49E3C3B7EC@bsdimp.com>
User-Agent: Mutt/1.5.24 (2015-08-30)
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.20
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for &quot;
 user&quot; and &quot; projects&quot; \)" <svn-src-all.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-all/>
List-Post: <mailto:svn-src-all@freebsd.org>
List-Help: <mailto:svn-src-all-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Wed, 20 Jan 2016 23:47:09 -0000


--ZPt4rx8FFjLCG7dd
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Wed, Jan 20, 2016 at 01:55:39PM -0800, Warner Losh wrote:
> On Jan 20, 2016, at 1:54 PM, Brooks Davis <brooks@FreeBSD.org> wrote:
> >=20
> > Author: brooks
> > Date: Wed Jan 20 21:54:43 2016
> > New Revision: 294461
> > URL: https://svnweb.freebsd.org/changeset/base/294461
> >=20
> > Log:
> >  MIPS also needs ofw_bus_if.h in some cases.
>=20
> Why not make this unconditional? What would the harm be?

As far as I know, none.  It was that way in CheriBSD before I merged in
the previous code.

-- Brooks

--ZPt4rx8FFjLCG7dd
Content-Type: application/pgp-signature; name="signature.asc"

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1

iQEcBAEBAgAGBQJWoBx0AAoJEKzQXbSebgfAKkgH+QGKI2JsckRxwxXoqeD24k7R
qkqYIhT/KxUvO7Z82fdf+70NleHSZA/kGp3OAcB1Rangdpqv/6kzYcSt35+TDahI
uCAn7cmt+jDPyUu3HQ+3Je61cFBGnQGwPrsufhMemwK8RUOmaIAsSre53DcW5xxG
BNSD6HV0mNGLKffpydMde+DdwqmkH22as3iyd0x+0DmV6zKDJniEcqy+DIXjuu31
D95u3Oy5koF0UPQsx0IkUsZL+GMukK5Q1bbrE3LPqjXNixyY1IgTQbCBLpmznIgy
dHhefWrL/X6qLeJYMGKNac2doQbJubPKPWDkDwxRXfCre79WAam/Ga3zghIlgc0=
=/WPY
-----END PGP SIGNATURE-----

--ZPt4rx8FFjLCG7dd--

From owner-svn-src-all@freebsd.org  Wed Jan 20 23:55:40 2016
Return-Path: <owner-svn-src-all@freebsd.org>
Delivered-To: svn-src-all@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id B2DD8A8A0BA;
 Wed, 20 Jan 2016 23:55:40 +0000 (UTC)
 (envelope-from avos@FreeBSD.org)
Received: from repo.freebsd.org (repo.freebsd.org
 [IPv6:2610:1c1:1:6068::e6a:0])
 (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
 (Client did not present a certificate)
 by mx1.freebsd.org (Postfix) with ESMTPS id 8AD3A1602;
 Wed, 20 Jan 2016 23:55:40 +0000 (UTC)
 (envelope-from avos@FreeBSD.org)
Received: from repo.freebsd.org ([127.0.1.37])
 by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u0KNtdF9076130;
 Wed, 20 Jan 2016 23:55:39 GMT (envelope-from avos@FreeBSD.org)
Received: (from avos@localhost)
 by repo.freebsd.org (8.15.2/8.15.2/Submit) id u0KNtdWh076127;
 Wed, 20 Jan 2016 23:55:39 GMT (envelope-from avos@FreeBSD.org)
Message-Id: <201601202355.u0KNtdWh076127@repo.freebsd.org>
X-Authentication-Warning: repo.freebsd.org: avos set sender to
 avos@FreeBSD.org using -f
From: Andriy Voskoboinyk <avos@FreeBSD.org>
Date: Wed, 20 Jan 2016 23:55:39 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-head@freebsd.org
Subject: svn commit: r294473 - head/sys/dev/usb/wlan
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.20
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for &quot;
 user&quot; and &quot; projects&quot; \)" <svn-src-all.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-all/>
List-Post: <mailto:svn-src-all@freebsd.org>
List-Help: <mailto:svn-src-all-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Wed, 20 Jan 2016 23:55:40 -0000

Author: avos
Date: Wed Jan 20 23:55:39 2016
New Revision: 294473
URL: https://svnweb.freebsd.org/changeset/base/294473

Log:
  urtwn: add temperature calibration
  
  Redo LC calibration if temperature changed significantly since last
  calibration.
  
  Tested with RTL8188EU/RTL8188CUS in STA mode.
  
  Reviewed by:	kevlo
  Approved by:	adrian (mentor)
  Obtained from:	NetBSD (mostly)
  Differential Revision:	https://reviews.freebsd.org/D4966

Modified:
  head/sys/dev/usb/wlan/if_urtwn.c
  head/sys/dev/usb/wlan/if_urtwnreg.h
  head/sys/dev/usb/wlan/if_urtwnvar.h

Modified: head/sys/dev/usb/wlan/if_urtwn.c
==============================================================================
--- head/sys/dev/usb/wlan/if_urtwn.c	Wed Jan 20 23:33:58 2016	(r294472)
+++ head/sys/dev/usb/wlan/if_urtwn.c	Wed Jan 20 23:55:39 2016	(r294473)
@@ -286,6 +286,9 @@ static void		urtwn_ibss_recv_mgmt(struct
 			    const struct ieee80211_rx_stats *, int, int);
 static int		urtwn_newstate(struct ieee80211vap *,
 			    enum ieee80211_state, int);
+static void		urtwn_calib_to(void *);
+static void		urtwn_calib_cb(struct urtwn_softc *,
+			    union sec_param *);
 static void		urtwn_watchdog(void *);
 static void		urtwn_update_avgrssi(struct urtwn_softc *, int, int8_t);
 static int8_t		urtwn_get_rssi(struct urtwn_softc *, int, void *);
@@ -353,6 +356,7 @@ static void		urtwn_set_chan(struct urtwn
 			    struct ieee80211_channel *);
 static void		urtwn_iq_calib(struct urtwn_softc *);
 static void		urtwn_lc_calib(struct urtwn_softc *);
+static void		urtwn_temp_calib(struct urtwn_softc *);
 static int		urtwn_init(struct urtwn_softc *);
 static void		urtwn_stop(struct urtwn_softc *);
 static void		urtwn_abort_xfers(struct urtwn_softc *);
@@ -481,6 +485,7 @@ urtwn_attach(device_t self)
 	    MTX_NETWORK_LOCK, MTX_DEF);
 	URTWN_CMDQ_LOCK_INIT(sc);
 	URTWN_NT_LOCK_INIT(sc);
+	callout_init(&sc->sc_calib_to, 0);
 	callout_init(&sc->sc_watchdog_ch, 0);
 	mbufq_init(&sc->sc_snd, ifqmaxlen);
 
@@ -626,6 +631,7 @@ urtwn_detach(device_t self)
 	urtwn_stop(sc);
 
 	callout_drain(&sc->sc_watchdog_ch);
+	callout_drain(&sc->sc_calib_to);
 
 	/* stop all USB transfers */
 	usbd_transfer_unsetup(sc->sc_xfer, URTWN_N_TRANSFER);
@@ -2313,6 +2319,9 @@ urtwn_newstate(struct ieee80211vap *vap,
 	callout_stop(&sc->sc_watchdog_ch);
 
 	if (ostate == IEEE80211_S_RUN) {
+		/* Stop calibration. */
+		callout_stop(&sc->sc_calib_to);
+
 		/* Turn link LED off. */
 		urtwn_set_led(sc, URTWN_LED_LINK, 0);
 
@@ -2450,8 +2459,10 @@ urtwn_newstate(struct ieee80211vap *vap,
 
 		sc->avg_pwdb = -1;	/* Reset average RSSI. */
 		/* Reset temperature calibration state machine. */
-		sc->thcal_state = 0;
+		sc->sc_flags &= ~URTWN_TEMP_MEASURED;
 		sc->thcal_lctemp = 0;
+		/* Start periodic calibration. */
+		callout_reset(&sc->sc_calib_to, 2*hz, urtwn_calib_to, sc);
 
 end_run:
 		ieee80211_free_node(ni);
@@ -2466,6 +2477,25 @@ end_run:
 }
 
 static void
+urtwn_calib_to(void *arg)
+{
+	struct urtwn_softc *sc = arg;
+
+	/* Do it in a process context. */
+	urtwn_cmd_sleepable(sc, NULL, 0, urtwn_calib_cb);
+}
+
+static void
+urtwn_calib_cb(struct urtwn_softc *sc, union sec_param *data)
+{
+	/* Do temperature compensation. */
+	urtwn_temp_calib(sc);
+
+	if ((urtwn_read_1(sc, R92C_MSR) & R92C_MSR_MASK) != R92C_MSR_NOLINK)
+		callout_reset(&sc->sc_calib_to, 2*hz, urtwn_calib_to, sc);
+}
+
+static void
 urtwn_watchdog(void *arg)
 {
 	struct urtwn_softc *sc = arg;
@@ -4557,6 +4587,64 @@ urtwn_lc_calib(struct urtwn_softc *sc)
 	}
 }
 
+static void
+urtwn_temp_calib(struct urtwn_softc *sc)
+{
+	uint8_t temp;
+
+	URTWN_ASSERT_LOCKED(sc);
+
+	if (!(sc->sc_flags & URTWN_TEMP_MEASURED)) {
+		/* Start measuring temperature. */
+		URTWN_DPRINTF(sc, URTWN_DEBUG_TEMP,
+		    "%s: start measuring temperature\n", __func__);
+		if (sc->chip & URTWN_CHIP_88E) {
+			urtwn_rf_write(sc, 0, R88E_RF_T_METER,
+			    R88E_RF_T_METER_START);
+		} else {
+			urtwn_rf_write(sc, 0, R92C_RF_T_METER,
+			    R92C_RF_T_METER_START);
+		}
+		sc->sc_flags |= URTWN_TEMP_MEASURED;
+		return;
+	}
+	sc->sc_flags &= ~URTWN_TEMP_MEASURED;
+
+	/* Read measured temperature. */
+	if (sc->chip & URTWN_CHIP_88E) {
+		temp = MS(urtwn_rf_read(sc, 0, R88E_RF_T_METER),
+		    R88E_RF_T_METER_VAL);
+	} else {
+		temp = MS(urtwn_rf_read(sc, 0, R92C_RF_T_METER),
+		    R92C_RF_T_METER_VAL);
+	}
+	if (temp == 0) {	/* Read failed, skip. */
+		URTWN_DPRINTF(sc, URTWN_DEBUG_TEMP,
+		    "%s: temperature read failed, skipping\n", __func__);
+		return;
+	}
+
+	URTWN_DPRINTF(sc, URTWN_DEBUG_TEMP,
+	    "%s: temperature: previous %u, current %u\n",
+	    __func__, sc->thcal_lctemp, temp);
+
+	/*
+	 * Redo LC calibration if temperature changed significantly since
+	 * last calibration.
+	 */
+	if (sc->thcal_lctemp == 0) {
+		/* First LC calibration is performed in urtwn_init(). */
+		sc->thcal_lctemp = temp;
+	} else if (abs(temp - sc->thcal_lctemp) > 1) {
+		URTWN_DPRINTF(sc, URTWN_DEBUG_TEMP,
+		    "%s: LC calib triggered by temp: %u -> %u\n",
+		    __func__, sc->thcal_lctemp, temp);
+		urtwn_lc_calib(sc);
+		/* Record temperature of last LC calibration. */
+		sc->thcal_lctemp = temp;
+	}
+}
+
 static int
 urtwn_init(struct urtwn_softc *sc)
 {
@@ -4804,7 +4892,8 @@ urtwn_stop(struct urtwn_softc *sc)
 		return;
 	}
 
-	sc->sc_flags &= ~URTWN_RUNNING;
+	sc->sc_flags &= ~(URTWN_RUNNING | URTWN_TEMP_MEASURED);
+	sc->thcal_lctemp = 0;
 	callout_stop(&sc->sc_watchdog_ch);
 	urtwn_abort_xfers(sc);
 

Modified: head/sys/dev/usb/wlan/if_urtwnreg.h
==============================================================================
--- head/sys/dev/usb/wlan/if_urtwnreg.h	Wed Jan 20 23:33:58 2016	(r294472)
+++ head/sys/dev/usb/wlan/if_urtwnreg.h	Wed Jan 20 23:55:39 2016	(r294473)
@@ -813,6 +813,7 @@
 #define R92C_RF_SYN_G(i)	(0x25 + (i))
 #define R92C_RF_RCK_OS		0x30
 #define R92C_RF_TXPA_G(i)	(0x31 + (i))
+#define R88E_RF_T_METER		0x42
 
 /* Bits for R92C_RF_AC. */
 #define R92C_RF_AC_MODE_M	0x70000
@@ -826,6 +827,16 @@
 #define R88E_RF_CHNLBW_BW20	0x00c00
 #define R92C_RF_CHNLBW_LCSTART	0x08000
 
+/* Bits for R92C_RF_T_METER. */
+#define R92C_RF_T_METER_START	0x60
+#define R92C_RF_T_METER_VAL_M	0x1f
+#define R92C_RF_T_METER_VAL_S	0
+
+/* Bits for R88E_RF_T_METER. */
+#define R88E_RF_T_METER_VAL_M	0x0fc00
+#define R88E_RF_T_METER_VAL_S	10
+#define R88E_RF_T_METER_START	0x30000
+
 
 /*
  * CAM entries.

Modified: head/sys/dev/usb/wlan/if_urtwnvar.h
==============================================================================
--- head/sys/dev/usb/wlan/if_urtwnvar.h	Wed Jan 20 23:33:58 2016	(r294472)
+++ head/sys/dev/usb/wlan/if_urtwnvar.h	Wed Jan 20 23:55:39 2016	(r294473)
@@ -156,6 +156,7 @@ struct urtwn_softc {
 #define URTWN_FLAG_CCK_HIPWR	0x01
 #define URTWN_DETACHED		0x02
 #define	URTWN_RUNNING		0x04
+#define URTWN_TEMP_MEASURED	0x10
 
 	u_int				chip;
 #define	URTWN_CHIP_92C		0x01
@@ -180,8 +181,7 @@ struct urtwn_softc {
 	int8_t				ofdm_tx_pwr_diff;
 	int8_t				bw20_tx_pwr_diff;
 	int				avg_pwdb;
-	int				thcal_state;
-	int				thcal_lctemp;
+	uint8_t				thcal_lctemp;
 	int				ntxchains;
 	int				nrxchains;
 	int				ledlink;
@@ -203,7 +203,8 @@ struct urtwn_softc {
 
 	union urtwn_rom			rom;
 	uint16_t			last_rom_addr;
-		
+
+	struct callout			sc_calib_to;
 	struct callout			sc_watchdog_ch;
 	struct mtx			sc_mtx;
 	uint32_t			keys_bmap;

From owner-svn-src-all@freebsd.org  Thu Jan 21 00:02:31 2016
Return-Path: <owner-svn-src-all@freebsd.org>
Delivered-To: svn-src-all@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id 52B87A8A6A9;
 Thu, 21 Jan 2016 00:02:31 +0000 (UTC)
 (envelope-from adrian.chadd@gmail.com)
Received: from mail-ig0-x22c.google.com (mail-ig0-x22c.google.com
 [IPv6:2607:f8b0:4001:c05::22c])
 (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits))
 (Client CN "smtp.gmail.com",
 Issuer "Google Internet Authority G2" (verified OK))
 by mx1.freebsd.org (Postfix) with ESMTPS id 2634F1B61;
 Thu, 21 Jan 2016 00:02:31 +0000 (UTC)
 (envelope-from adrian.chadd@gmail.com)
Received: by mail-ig0-x22c.google.com with SMTP id ik10so112485182igb.1;
 Wed, 20 Jan 2016 16:02:31 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;
 h=mime-version:in-reply-to:references:date:message-id:subject:from:to
 :cc:content-type;
 bh=w9QelC3Y4FEAWjAO5Zq+pytW4bcGoLDPslNemYnzIMs=;
 b=K5gbWxgo2SwpjU9yqK2g2cJCoLLuYTkfdXho5asfWFjzeRfw599506XME/KutTIGmT
 5UaEpX4lEi/NsZj3byURXIM4rtgUWiQAKfuyL4J0mr9I7UdKx4NecLIw5Et+ytu2Altr
 6UumzH7eLS2eYhbnMcCyypQ5fUbl9mvBGQoo8tkvqErQ5kg0g2N2vJ9fyB16JCCdxrYp
 A13tJu2sEpaeqMBF5ebQX2SYHTGUN8p8qtJJ4X588xTLKMIY3m0vNLLRjpBr1kqEz6nA
 EAy4HYeirv7QIJY2jpNDS0EDKsX+VdX9W4kYEvo+Kcl4R7KFGGe4O5ju1roNdpPU5U/Y
 BcFw==
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:date
 :message-id:subject:from:to:cc:content-type;
 bh=w9QelC3Y4FEAWjAO5Zq+pytW4bcGoLDPslNemYnzIMs=;
 b=AcBrgQc6gioEhQUzCJc2TSLWUJ7sQ6BHLjODYD+ADaEqlseiNtx+/g9zxdkrLcn8uP
 q6vwpehGc6K+ypoONxN187pMVn5cwFRJ/DzGsJBF5lygqd+GGkUogtTJG1h1Wle6aGLz
 fqUs4UMr9z+IIZY/bCECwi5pF8sgy4GHdOoiBIcRcKVUyPzktmeYp4wnBXTFF9yhPqDJ
 473cmd8wMlMEHIpYZm1YpgRyjZHuQtIzL4NMBloI5eAn/qQK5K03azBsgGFzsOigpOFu
 Vtl/LoaY58APnx9IIJvhrnXiTp+d3kNuLU8osjXB/Fouug+IJk6VCyD9Hkr4qXZyYXhe
 zsYQ==
X-Gm-Message-State: AG10YOQ6VlGIQE+N+ezpmnNHWh+TkOLG7yh8Q6zvAGmnJc3CZ7pmLxwFiurzeJsBjBdRC4WSyvnEPWpDoDariA==
MIME-Version: 1.0
X-Received: by 10.50.124.72 with SMTP id mg8mr6059371igb.22.1453334550567;
 Wed, 20 Jan 2016 16:02:30 -0800 (PST)
Received: by 10.36.121.16 with HTTP; Wed, 20 Jan 2016 16:02:30 -0800 (PST)
In-Reply-To: <201601202327.u0KNR2Hh066219@repo.freebsd.org>
References: <201601202327.u0KNR2Hh066219@repo.freebsd.org>
Date: Wed, 20 Jan 2016 16:02:30 -0800
Message-ID: <CAJ-Vmom-nORRCZx6YyhH0LJxcOUTuFfMkVsjOczNZiL-TEbsVA@mail.gmail.com>
Subject: Re: svn commit: r294471 - head/sys/dev/usb/wlan
From: Adrian Chadd <adrian.chadd@gmail.com>
To: Andriy Voskoboinyk <avos@freebsd.org>
Cc: "src-committers@freebsd.org" <src-committers@freebsd.org>, 
 "svn-src-all@freebsd.org" <svn-src-all@freebsd.org>, 
 "svn-src-head@freebsd.org" <svn-src-head@freebsd.org>
Content-Type: text/plain; charset=UTF-8
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.20
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for &quot;
 user&quot; and &quot; projects&quot; \)" <svn-src-all.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-all/>
List-Post: <mailto:svn-src-all@freebsd.org>
List-Help: <mailto:svn-src-all-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Thu, 21 Jan 2016 00:02:31 -0000

Hi,

So yeah, I think it's time we just bit the bullet and wrote a
generic-ish debug/ktr framework for drivers to use so drivers and
infrastructure doesn't keep spinning its own damned debugging stuff.

(I know people keep saying "dtrace", but ...)

Let's have a think about it.


-a

From owner-svn-src-all@freebsd.org  Thu Jan 21 00:06:36 2016
Return-Path: <owner-svn-src-all@freebsd.org>
Delivered-To: svn-src-all@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id 87595A8A7AB;
 Thu, 21 Jan 2016 00:06:36 +0000 (UTC)
 (envelope-from brooks@spindle.one-eyed-alien.net)
Received: from spindle.one-eyed-alien.net (spindle.one-eyed-alien.net
 [199.48.129.229])
 (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
 (Client did not present a certificate)
 by mx1.freebsd.org (Postfix) with ESMTPS id 5B9871D43;
 Thu, 21 Jan 2016 00:06:36 +0000 (UTC)
 (envelope-from brooks@spindle.one-eyed-alien.net)
Received: by spindle.one-eyed-alien.net (Postfix, from userid 3001)
 id EE4AA5A9F12; Thu, 21 Jan 2016 00:06:34 +0000 (UTC)
Date: Thu, 21 Jan 2016 00:06:34 +0000
From: Brooks Davis <brooks@freebsd.org>
To: Warner Losh <imp@bsdimp.com>
Cc: Don Lewis <truckman@freebsd.org>, Bryan Drewery <bdrewery@freebsd.org>,
 src-committers <src-committers@freebsd.org>,
 "svn-src-all@freebsd.org" <svn-src-all@freebsd.org>,
 "svn-src-head@freebsd.org" <svn-src-head@freebsd.org>
Subject: Re: svn commit: r294444 - in head/sys/modules: ix ixlv ixv
Message-ID: <20160121000634.GB79351@spindle.one-eyed-alien.net>
References: <56A007CA.2030507@FreeBSD.org>
 <201601202319.u0KNJkVI077393@gw.catspoiler.org>
 <CANCZdfoaRt-yEmnvESZZ=tyNzzyfX9dF_vfJHC_Xi9FDM2StLg@mail.gmail.com>
MIME-Version: 1.0
Content-Type: multipart/signed; micalg=pgp-sha1;
 protocol="application/pgp-signature"; boundary="uQr8t48UFsdbeI+V"
Content-Disposition: inline
In-Reply-To: <CANCZdfoaRt-yEmnvESZZ=tyNzzyfX9dF_vfJHC_Xi9FDM2StLg@mail.gmail.com>
User-Agent: Mutt/1.5.24 (2015-08-30)
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.20
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for &quot;
 user&quot; and &quot; projects&quot; \)" <svn-src-all.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-all/>
List-Post: <mailto:svn-src-all@freebsd.org>
List-Help: <mailto:svn-src-all-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Thu, 21 Jan 2016 00:06:36 -0000


--uQr8t48UFsdbeI+V
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Wed, Jan 20, 2016 at 03:22:13PM -0800, Warner Losh wrote:
> On Wed, Jan 20, 2016 at 3:19 PM, Don Lewis <truckman@freebsd.org> wrote:
>=20
> > On 20 Jan, Bryan Drewery wrote:
> > > On 1/20/2016 1:59 PM, Warner Losh wrote:
> > >> It would work built part of buildkernel since pci_iov_if.h would exi=
st
> > there. It would fail when built by hand since the kernel config didn???=
t save
> > us.
> > >>
> > >
> > > I don't understand. The problem was seen in buildkernel.
> >
> > It failed for me last night when I ran "make -j 8 buildkernel".  It
> > worked without -j.
>=20
>=20
> Sounds like a race!

I think it's the same type as in i2c/iicbb.  With sufficently small -j#
something else builds it first and creates the file.  We probably out
to have a target that builds each module in a clean tree.

-- Brooks

>=20
> Warner
>=20
>=20
> > >>
> > >>
> > >>> On Jan 20, 2016, at 1:57 PM, Bryan Drewery <bdrewery@FreeBSD.org>
> > wrote:
> > >>>
> > >>> I have no idea how this was working before and why it took so long =
to
> > >>> manifest. Many people reported failures here in the last day and
> > >>> confirmed this fixed it.
> > >>>
> > >
> > >
> > >
> >
> >
> >

--uQr8t48UFsdbeI+V
Content-Type: application/pgp-signature; name="signature.asc"

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1

iQEcBAEBAgAGBQJWoCEIAAoJEKzQXbSebgfAYN0H/iwyJFXfWQu1WBfYurc8DJFy
S1SDbmMeAzkHFLKubLOal8GPs3nhqcDNj8HMC7GQ41ova5Rjmwl4IqvgtYivK2rW
wDWeysL0/8irVICvcohKdemQ3jvom+fyEj2pw+1V2sPlwReQjV1Q1IIyky/9v70h
uLi/W3ly5bPjItXVzxPcrn8V048JO0CRgESBR2MVZklulAMOaO9wI/pU8OxO0GKU
6yJj6pNwSGCY4i0KZj9JQdJK4SH0x82vG1NjTRXdaHDScMUCQSjRLFrK0pw6CO6N
VXDKCx1vGeK/tesVJ+gO7zJArC0cU07/crJhtHT0EFVCZO6ZL4t/4UNT5ygVu7Y=
=4MjV
-----END PGP SIGNATURE-----

--uQr8t48UFsdbeI+V--

From owner-svn-src-all@freebsd.org  Thu Jan 21 00:16:03 2016
Return-Path: <owner-svn-src-all@freebsd.org>
Delivered-To: svn-src-all@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id CB773A8AA33;
 Thu, 21 Jan 2016 00:16:03 +0000 (UTC) (envelope-from rpokala@mac.com)
Received: from mr11p00im-asmtp002.me.com (mr11p00im-asmtp002.me.com
 [17.110.69.253])
 (using TLSv1.2 with cipher DHE-RSA-AES128-GCM-SHA256 (128/128 bits))
 (Client did not present a certificate)
 by mx1.freebsd.org (Postfix) with ESMTPS id AE34C1151;
 Thu, 21 Jan 2016 00:16:03 +0000 (UTC) (envelope-from rpokala@mac.com)
Received: from [172.17.133.77] (dip-cali.panasas.com [64.80.217.3])
 by mr11p00im-asmtp002.me.com
 (Oracle Communications Messaging Server 7.0.5.36.0 64bit (built Sep 8 2015))
 with ESMTPSA id <0O1A004G20QJ3G10@mr11p00im-asmtp002.me.com>; Thu,
 21 Jan 2016 00:15:57 +0000 (GMT)
X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:,,
 definitions=2016-01-20_07:,, signatures=0
X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 spamscore=0
 clxscore=1011 suspectscore=0 malwarescore=0 phishscore=0 adultscore=0
 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1
 engine=8.0.1-1510270003 definitions=main-1601210003
User-Agent: Microsoft-MacOutlook/0.0.0.160109
Date: Wed, 20 Jan 2016 16:15:54 -0800
Subject: Re: svn commit: r294471 - head/sys/dev/usb/wlan
From: Ravi Pokala <rpokala@mac.com>
Sender: "Pokala, Ravi" <rpokala@panasas.com>
To: Adrian Chadd <adrian.chadd@gmail.com>,
 Andriy Voskoboinyk <avos@freebsd.org>
Cc: "src-committers@freebsd.org" <src-committers@freebsd.org>,
 "svn-src-all@freebsd.org" <svn-src-all@freebsd.org>,
 "svn-src-head@freebsd.org" <svn-src-head@freebsd.org>
Message-id: <4FBE9133-AB30-4D30-A298-1742952700C5@panasas.com>
Thread-topic: svn commit: r294471 - head/sys/dev/usb/wlan
References: <201601202327.u0KNR2Hh066219@repo.freebsd.org>
 <CAJ-Vmom-nORRCZx6YyhH0LJxcOUTuFfMkVsjOczNZiL-TEbsVA@mail.gmail.com>
In-reply-to: <CAJ-Vmom-nORRCZx6YyhH0LJxcOUTuFfMkVsjOczNZiL-TEbsVA@mail.gmail.com>
MIME-version: 1.0
Content-type: text/plain; charset=UTF-8
Content-transfer-encoding: 7bit
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.20
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for &quot;
 user&quot; and &quot; projects&quot; \)" <svn-src-all.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-all/>
List-Post: <mailto:svn-src-all@freebsd.org>
List-Help: <mailto:svn-src-all-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Thu, 21 Jan 2016 00:16:03 -0000

-----Original Message-----


From: <owner-src-committers@freebsd.org> on behalf of Adrian Chadd <adrian.chadd@gmail.com>
Date: 2016-01-20, Wednesday at 16:02
To: Andriy Voskoboinyk <avos@freebsd.org>
Cc: "src-committers@freebsd.org" <src-committers@freebsd.org>, "svn-src-all@freebsd.org" <svn-src-all@freebsd.org>, "svn-src-head@freebsd.org" <svn-src-head@freebsd.org>
Subject: Re: svn commit: r294471 - head/sys/dev/usb/wlan

>Hi,
>
>So yeah, I think it's time we just bit the bullet and wrote a
>generic-ish debug/ktr framework for drivers to use so drivers and
>infrastructure doesn't keep spinning its own damned debugging stuff.
>
>(I know people keep saying "dtrace", but ...)
>
>Let's have a think about it.

One issue I have with DTrace (and KTR, though I'm even less familiar with it than I am with DTrace) is that you only get a stream of what's happening right now - there's no way to see *what just happened*. For example, I wrote an ATA command tracing infrastructure for Panasas which keeps the last several thousand commands in a trace buffer, and a tool that extracts the buffer and saves it to a file. We can then feed that file into various analysis tools, which can show us exactly what we sent to the drive, and exactly what the drive sent back to us. (The nice thing is, the buffer is also in the vmcore, so we can easily extract it after a panic, and it's identical to what you get from the live system, so the same analysis tools can be used in both instances.) This has come in very handy when we want to see, for example, what new and stupid thing a drive did that caused an error, slowdown or panic.

-Ravi (rpokala@)

>-a


From owner-svn-src-all@freebsd.org  Thu Jan 21 00:42:49 2016
Return-Path: <owner-svn-src-all@freebsd.org>
Delivered-To: svn-src-all@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6E158A89259;
 Thu, 21 Jan 2016 00:42:49 +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 3EAE91CAE;
 Thu, 21 Jan 2016 00:42:49 +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 u0L0gmUn091984;
 Thu, 21 Jan 2016 00:42:48 GMT (envelope-from np@FreeBSD.org)
Received: (from np@localhost)
 by repo.freebsd.org (8.15.2/8.15.2/Submit) id u0L0gmAK091983;
 Thu, 21 Jan 2016 00:42:48 GMT (envelope-from np@FreeBSD.org)
Message-Id: <201601210042.u0L0gmAK091983@repo.freebsd.org>
X-Authentication-Warning: repo.freebsd.org: np set sender to np@FreeBSD.org
 using -f
From: Navdeep Parhar <np@FreeBSD.org>
Date: Thu, 21 Jan 2016 00:42:48 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-head@freebsd.org
Subject: svn commit: r294474 - 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-all@freebsd.org
X-Mailman-Version: 2.1.20
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for &quot;
 user&quot; and &quot; projects&quot; \)" <svn-src-all.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-all/>
List-Post: <mailto:svn-src-all@freebsd.org>
List-Help: <mailto:svn-src-all-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Thu, 21 Jan 2016 00:42:49 -0000

Author: np
Date: Thu Jan 21 00:42:48 2016
New Revision: 294474
URL: https://svnweb.freebsd.org/changeset/base/294474

Log:
  iw_cxgbe: fix a couple of problems int the RDMA_TERMINATE handler.
  
  a) Look for the CPL in the payload buffer instead of the descriptor.
  b) Retrieve the socket associated with the tid with the inpcb lock held.
  
  Submitted by:	Krishnamraju Eraparaju @ Chelsio

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	Wed Jan 20 23:55:39 2016	(r294473)
+++ head/sys/dev/cxgbe/iw_cxgbe/cm.c	Thu Jan 21 00:42:48 2016	(r294474)
@@ -2365,15 +2365,18 @@ static int fw6_cqe_handler(struct adapte
 
 static int terminate(struct sge_iq *iq, const struct rss_header *rss, struct mbuf *m)
 {
-
 	struct adapter *sc = iq->adapter;
-
-	const struct cpl_rdma_terminate *rpl = (const void *)(rss + 1);
-	unsigned int tid = GET_TID(rpl);
+	const struct cpl_rdma_terminate *cpl = mtod(m, const void *);
+	unsigned int tid = GET_TID(cpl);
 	struct c4iw_qp_attributes attrs;
 	struct toepcb *toep = lookup_tid(sc, tid);
-	struct socket *so = inp_inpcbtosocket(toep->inp);
-	struct c4iw_ep *ep = so->so_rcv.sb_upcallarg;
+	struct socket *so;
+	struct c4iw_ep *ep;
+
+	INP_WLOCK(toep->inp);
+	so = inp_inpcbtosocket(toep->inp);
+	ep = so->so_rcv.sb_upcallarg;
+	INP_WUNLOCK(toep->inp);
 
 	CTR2(KTR_IW_CXGBE, "%s:tB %p %d", __func__, ep);
 

From owner-svn-src-all@freebsd.org  Thu Jan 21 01:04:04 2016
Return-Path: <owner-svn-src-all@freebsd.org>
Delivered-To: svn-src-all@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5DE2FA897F2;
 Thu, 21 Jan 2016 01:04:04 +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 382D7143B;
 Thu, 21 Jan 2016 01:04:04 +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 u0L143NE098547;
 Thu, 21 Jan 2016 01:04:03 GMT (envelope-from mjg@FreeBSD.org)
Received: (from mjg@localhost)
 by repo.freebsd.org (8.15.2/8.15.2/Submit) id u0L143tP098546;
 Thu, 21 Jan 2016 01:04:03 GMT (envelope-from mjg@FreeBSD.org)
Message-Id: <201601210104.u0L143tP098546@repo.freebsd.org>
X-Authentication-Warning: repo.freebsd.org: mjg set sender to mjg@FreeBSD.org
 using -f
From: Mateusz Guzik <mjg@FreeBSD.org>
Date: Thu, 21 Jan 2016 01:04:03 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-head@freebsd.org
Subject: svn commit: r294475 - head/sys/kern
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.20
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for &quot;
 user&quot; and &quot; projects&quot; \)" <svn-src-all.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-all/>
List-Post: <mailto:svn-src-all@freebsd.org>
List-Help: <mailto:svn-src-all-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Thu, 21 Jan 2016 01:04:04 -0000

Author: mjg
Date: Thu Jan 21 01:04:03 2016
New Revision: 294475
URL: https://svnweb.freebsd.org/changeset/base/294475

Log:
  cache: use counter(9) API to maintain statistics
  
  Previously the code would just increment statistics while only holding a
  shared lock, in effect losing updates.
  
  Separate tracking for nchstats is removed as values can be obtained from
  existing counters. Note that some fields are updated by external
  consumers and are left unfixed. This should not be a serious issue as
  this structure looks quite obsolete.
  
  No strong objections: kib

Modified:
  head/sys/kern/vfs_cache.c

Modified: head/sys/kern/vfs_cache.c
==============================================================================
--- head/sys/kern/vfs_cache.c	Thu Jan 21 00:42:48 2016	(r294474)
+++ head/sys/kern/vfs_cache.c	Thu Jan 21 01:04:03 2016	(r294475)
@@ -39,6 +39,7 @@ __FBSDID("$FreeBSD$");
 
 #include <sys/param.h>
 #include <sys/systm.h>
+#include <sys/counter.h>
 #include <sys/filedesc.h>
 #include <sys/fnv_hash.h>
 #include <sys/kernel.h>
@@ -272,37 +273,35 @@ SYSCTL_INT(_debug_sizeof, OID_AUTO, name
  */
 static SYSCTL_NODE(_vfs, OID_AUTO, cache, CTLFLAG_RW, 0,
     "Name cache statistics");
-#define STATNODE(mode, name, var, descr) \
-	SYSCTL_ULONG(_vfs_cache, OID_AUTO, name, mode, var, 0, descr);
-STATNODE(CTLFLAG_RD, numneg, &numneg, "Number of negative cache entries");
-STATNODE(CTLFLAG_RD, numcache, &numcache, "Number of cache entries");
-static u_long numcalls; STATNODE(CTLFLAG_RD, numcalls, &numcalls,
-    "Number of cache lookups");
-static u_long dothits; STATNODE(CTLFLAG_RD, dothits, &dothits,
-    "Number of '.' hits");
-static u_long dotdothits; STATNODE(CTLFLAG_RD, dotdothits, &dotdothits,
-    "Number of '..' hits");
-static u_long numchecks; STATNODE(CTLFLAG_RD, numchecks, &numchecks,
-    "Number of checks in lookup");
-static u_long nummiss; STATNODE(CTLFLAG_RD, nummiss, &nummiss,
-    "Number of cache misses");
-static u_long nummisszap; STATNODE(CTLFLAG_RD, nummisszap, &nummisszap,
-    "Number of cache misses we do not want to cache");
-static u_long numposzaps; STATNODE(CTLFLAG_RD, numposzaps, &numposzaps,
+#define STATNODE_ULONG(name, descr)	\
+	SYSCTL_ULONG(_vfs_cache, OID_AUTO, name, CTLFLAG_RD, &name, 0, descr);
+#define STATNODE_COUNTER(name, descr)	\
+	static counter_u64_t name;	\
+	SYSCTL_COUNTER_U64(_vfs_cache, OID_AUTO, name, CTLFLAG_RD, &name, descr);
+STATNODE_ULONG(numneg, "Number of negative cache entries");
+STATNODE_ULONG(numcache, "Number of cache entries");
+STATNODE_COUNTER(numcalls, "Number of cache lookups");
+STATNODE_COUNTER(dothits, "Number of '.' hits");
+STATNODE_COUNTER(dotdothits, "Number of '..' hits");
+STATNODE_COUNTER(numchecks, "Number of checks in lookup");
+STATNODE_COUNTER(nummiss, "Number of cache misses");
+STATNODE_COUNTER(nummisszap, "Number of cache misses we do not want to cache");
+STATNODE_COUNTER(numposzaps,
     "Number of cache hits (positive) we do not want to cache");
-static u_long numposhits; STATNODE(CTLFLAG_RD, numposhits, &numposhits,
-    "Number of cache hits (positive)");
-static u_long numnegzaps; STATNODE(CTLFLAG_RD, numnegzaps, &numnegzaps,
+STATNODE_COUNTER(numposhits, "Number of cache hits (positive)");
+STATNODE_COUNTER(numnegzaps,
     "Number of cache hits (negative) we do not want to cache");
-static u_long numneghits; STATNODE(CTLFLAG_RD, numneghits, &numneghits,
-    "Number of cache hits (negative)");
-static u_long numupgrades; STATNODE(CTLFLAG_RD, numupgrades, &numupgrades,
+STATNODE_COUNTER(numneghits, "Number of cache hits (negative)");
+/* These count for kern___getcwd(), too. */
+STATNODE_COUNTER(numfullpathcalls, "Number of fullpath search calls");
+STATNODE_COUNTER(numfullpathfail1, "Number of fullpath search errors (ENOTDIR)");
+STATNODE_COUNTER(numfullpathfail2,
+    "Number of fullpath search errors (VOP_VPTOCNP failures)");
+STATNODE_COUNTER(numfullpathfail4, "Number of fullpath search errors (ENOMEM)");
+STATNODE_COUNTER(numfullpathfound, "Number of successful fullpath calls");
+static long numupgrades; STATNODE_ULONG(numupgrades,
     "Number of updates of the cache after lookup (write lock + retry)");
 
-SYSCTL_OPAQUE(_vfs_cache, OID_AUTO, nchstats, CTLFLAG_RD | CTLFLAG_MPSAFE,
-    &nchstats, sizeof(nchstats), "LU",
-    "VFS cache effectiveness statistics");
-
 static void cache_zap(struct namecache *ncp);
 static int vn_vptocnp_locked(struct vnode **vp, struct ucred *cred, char *buf,
     u_int *buflen);
@@ -311,6 +310,28 @@ static int vn_fullpath1(struct thread *t
 
 static MALLOC_DEFINE(M_VFSCACHE, "vfscache", "VFS name cache entries");
 
+static int
+sysctl_nchstats(SYSCTL_HANDLER_ARGS)
+{
+	struct nchstats snap;
+
+	if (req->oldptr == NULL)
+		return (SYSCTL_OUT(req, 0, sizeof(snap)));
+
+	snap = nchstats;
+	snap.ncs_goodhits = counter_u64_fetch(numposhits);
+	snap.ncs_neghits = counter_u64_fetch(numneghits);
+	snap.ncs_badhits = counter_u64_fetch(numposzaps) +
+	    counter_u64_fetch(numnegzaps);
+	snap.ncs_miss = counter_u64_fetch(nummisszap) +
+	    counter_u64_fetch(nummiss);
+
+	return (SYSCTL_OUT(req, &snap, sizeof(snap)));
+}
+SYSCTL_PROC(_vfs_cache, OID_AUTO, nchstats, CTLTYPE_OPAQUE | CTLFLAG_RD |
+    CTLFLAG_MPSAFE, 0, 0, sysctl_nchstats, "LU",
+    "VFS cache effectiveness statistics");
+
 #ifdef DIAGNOSTIC
 /*
  * Grab an atomic snapshot of the name cache hash chain lengths
@@ -479,7 +500,7 @@ cache_lookup(struct vnode *dvp, struct v
 retry:
 	CACHE_RLOCK();
 	wlocked = 0;
-	numcalls++;
+	counter_u64_add(numcalls, 1);
 	error = 0;
 
 retry_wlocked:
@@ -488,7 +509,7 @@ retry_wlocked:
 			*vpp = dvp;
 			CTR2(KTR_VFS, "cache_lookup(%p, %s) found via .",
 			    dvp, cnp->cn_nameptr);
-			dothits++;
+			counter_u64_add(dothits, 1);
 			SDT_PROBE3(vfs, namecache, lookup, hit, dvp, ".", *vpp);
 			if (tsp != NULL)
 				timespecclear(tsp);
@@ -497,7 +518,7 @@ retry_wlocked:
 			goto success;
 		}
 		if (cnp->cn_namelen == 2 && cnp->cn_nameptr[1] == '.') {
-			dotdothits++;
+			counter_u64_add(dotdothits, 1);
 			if (dvp->v_cache_dd == NULL) {
 				SDT_PROBE3(vfs, namecache, lookup, miss, dvp,
 				    "..", NULL);
@@ -536,7 +557,7 @@ retry_wlocked:
 	hash = fnv_32_buf(cnp->cn_nameptr, cnp->cn_namelen, FNV1_32_INIT);
 	hash = fnv_32_buf(&dvp, sizeof(dvp), hash);
 	LIST_FOREACH(ncp, (NCHHASH(hash)), nc_hash) {
-		numchecks++;
+		counter_u64_add(numchecks, 1);
 		if (ncp->nc_dvp == dvp && ncp->nc_nlen == cnp->cn_namelen &&
 		    !bcmp(nc_get_name(ncp), cnp->cn_nameptr, ncp->nc_nlen))
 			break;
@@ -547,18 +568,16 @@ retry_wlocked:
 		SDT_PROBE3(vfs, namecache, lookup, miss, dvp, cnp->cn_nameptr,
 		    NULL);
 		if ((cnp->cn_flags & MAKEENTRY) == 0) {
-			nummisszap++;
+			counter_u64_add(nummisszap, 1);
 		} else {
-			nummiss++;
+			counter_u64_add(nummiss, 1);
 		}
-		nchstats.ncs_miss++;
 		goto unlock;
 	}
 
 	/* We don't want to have an entry, so dump it */
 	if ((cnp->cn_flags & MAKEENTRY) == 0) {
-		numposzaps++;
-		nchstats.ncs_badhits++;
+		counter_u64_add(numposzaps, 1);
 		if (!wlocked && !CACHE_UPGRADE_LOCK())
 			goto wlock;
 		cache_zap(ncp);
@@ -568,8 +587,7 @@ retry_wlocked:
 
 	/* We found a "positive" match, return the vnode */
 	if (ncp->nc_vp) {
-		numposhits++;
-		nchstats.ncs_goodhits++;
+		counter_u64_add(numposhits, 1);
 		*vpp = ncp->nc_vp;
 		CTR4(KTR_VFS, "cache_lookup(%p, %s) found %p via ncp %p",
 		    dvp, cnp->cn_nameptr, *vpp, ncp);
@@ -582,8 +600,7 @@ retry_wlocked:
 negative_success:
 	/* We found a negative match, and want to create it, so purge */
 	if (cnp->cn_nameiop == CREATE) {
-		numnegzaps++;
-		nchstats.ncs_badhits++;
+		counter_u64_add(numnegzaps, 1);
 		if (!wlocked && !CACHE_UPGRADE_LOCK())
 			goto wlock;
 		cache_zap(ncp);
@@ -593,7 +610,7 @@ negative_success:
 
 	if (!wlocked && !CACHE_UPGRADE_LOCK())
 		goto wlock;
-	numneghits++;
+	counter_u64_add(numneghits, 1);
 	/*
 	 * We found a "negative" match, so we shift it to the end of
 	 * the "negative" cache entries queue to satisfy LRU.  Also,
@@ -602,7 +619,6 @@ negative_success:
 	 */
 	TAILQ_REMOVE(&ncneg, ncp, nc_dst);
 	TAILQ_INSERT_TAIL(&ncneg, ncp, nc_dst);
-	nchstats.ncs_neghits++;
 	if (ncp->nc_flag & NCF_WHITE)
 		cnp->cn_flags |= ISWHITEOUT;
 	SDT_PROBE2(vfs, namecache, lookup, hit__negative, dvp,
@@ -918,6 +934,22 @@ nchinit(void *dummy __unused)
 	    NULL, NULL, NULL, NULL, UMA_ALIGN_PTR, UMA_ZONE_ZINIT);
 
 	nchashtbl = hashinit(desiredvnodes * 2, M_VFSCACHE, &nchash);
+
+	numcalls = counter_u64_alloc(M_WAITOK);
+	dothits = counter_u64_alloc(M_WAITOK);
+	dotdothits = counter_u64_alloc(M_WAITOK);
+	numchecks = counter_u64_alloc(M_WAITOK);
+	nummiss = counter_u64_alloc(M_WAITOK);
+	nummisszap = counter_u64_alloc(M_WAITOK);
+	numposzaps = counter_u64_alloc(M_WAITOK);
+	numposhits = counter_u64_alloc(M_WAITOK);
+	numnegzaps = counter_u64_alloc(M_WAITOK);
+	numneghits = counter_u64_alloc(M_WAITOK);
+	numfullpathcalls = counter_u64_alloc(M_WAITOK);
+	numfullpathfail1 = counter_u64_alloc(M_WAITOK);
+	numfullpathfail2 = counter_u64_alloc(M_WAITOK);
+	numfullpathfail4 = counter_u64_alloc(M_WAITOK);
+	numfullpathfound = counter_u64_alloc(M_WAITOK);
 }
 SYSINIT(vfs, SI_SUB_VFS, SI_ORDER_SECOND, nchinit, NULL);
 
@@ -1122,23 +1154,10 @@ kern___getcwd(struct thread *td, char *b
  * Thus begins the fullpath magic.
  */
 
-#undef STATNODE
-#define STATNODE(name, descr)						\
-	static u_int name;						\
-	SYSCTL_UINT(_vfs_cache, OID_AUTO, name, CTLFLAG_RD, &name, 0, descr)
-
 static int disablefullpath;
 SYSCTL_INT(_debug, OID_AUTO, disablefullpath, CTLFLAG_RW, &disablefullpath, 0,
     "Disable the vn_fullpath function");
 
-/* These count for kern___getcwd(), too. */
-STATNODE(numfullpathcalls, "Number of fullpath search calls");
-STATNODE(numfullpathfail1, "Number of fullpath search errors (ENOTDIR)");
-STATNODE(numfullpathfail2,
-    "Number of fullpath search errors (VOP_VPTOCNP failures)");
-STATNODE(numfullpathfail4, "Number of fullpath search errors (ENOMEM)");
-STATNODE(numfullpathfound, "Number of successful fullpath calls");
-
 /*
  * Retrieve the full filesystem path that correspond to a vnode from the name
  * cache (if available)
@@ -1226,7 +1245,7 @@ vn_vptocnp_locked(struct vnode **vp, str
 		if (*buflen < ncp->nc_nlen) {
 			CACHE_RUNLOCK();
 			vrele(*vp);
-			numfullpathfail4++;
+			counter_u64_add(numfullpathfail4, 1);
 			error = ENOMEM;
 			SDT_PROBE3(vfs, namecache, fullpath, return, error,
 			    vp, NULL);
@@ -1251,7 +1270,7 @@ vn_vptocnp_locked(struct vnode **vp, str
 	error = VOP_VPTOCNP(*vp, &dvp, cred, buf, buflen);
 	vput(*vp);
 	if (error) {
-		numfullpathfail2++;
+		counter_u64_add(numfullpathfail2, 1);
 		SDT_PROBE3(vfs, namecache, fullpath, return,  error, vp, NULL);
 		return (error);
 	}
@@ -1292,7 +1311,7 @@ vn_fullpath1(struct thread *td, struct v
 	slash_prefixed = 0;
 
 	SDT_PROBE1(vfs, namecache, fullpath, entry, vp);
-	numfullpathcalls++;
+	counter_u64_add(numfullpathcalls, 1);
 	vref(vp);
 	CACHE_RLOCK();
 	if (vp->v_type != VDIR) {
@@ -1328,7 +1347,7 @@ vn_fullpath1(struct thread *td, struct v
 		if (vp->v_type != VDIR) {
 			CACHE_RUNLOCK();
 			vrele(vp);
-			numfullpathfail1++;
+			counter_u64_add(numfullpathfail1, 1);
 			error = ENOTDIR;
 			SDT_PROBE3(vfs, namecache, fullpath, return,
 			    error, vp, NULL);
@@ -1354,14 +1373,14 @@ vn_fullpath1(struct thread *td, struct v
 		if (buflen == 0) {
 			CACHE_RUNLOCK();
 			vrele(vp);
-			numfullpathfail4++;
+			counter_u64_add(numfullpathfail4, 1);
 			SDT_PROBE3(vfs, namecache, fullpath, return, ENOMEM,
 			    startvp, NULL);
 			return (ENOMEM);
 		}
 		buf[--buflen] = '/';
 	}
-	numfullpathfound++;
+	counter_u64_add(numfullpathfound, 1);
 	CACHE_RUNLOCK();
 	vrele(vp);
 

From owner-svn-src-all@freebsd.org  Thu Jan 21 01:05:42 2016
Return-Path: <owner-svn-src-all@freebsd.org>
Delivered-To: svn-src-all@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id CC721A898CD;
 Thu, 21 Jan 2016 01:05:42 +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 8375B160B;
 Thu, 21 Jan 2016 01:05:42 +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 u0L15fje098709;
 Thu, 21 Jan 2016 01:05:41 GMT (envelope-from mjg@FreeBSD.org)
Received: (from mjg@localhost)
 by repo.freebsd.org (8.15.2/8.15.2/Submit) id u0L15fNx098708;
 Thu, 21 Jan 2016 01:05:41 GMT (envelope-from mjg@FreeBSD.org)
Message-Id: <201601210105.u0L15fNx098708@repo.freebsd.org>
X-Authentication-Warning: repo.freebsd.org: mjg set sender to mjg@FreeBSD.org
 using -f
From: Mateusz Guzik <mjg@FreeBSD.org>
Date: Thu, 21 Jan 2016 01:05:41 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-head@freebsd.org
Subject: svn commit: r294476 - head/sys/kern
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.20
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for &quot;
 user&quot; and &quot; projects&quot; \)" <svn-src-all.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-all/>
List-Post: <mailto:svn-src-all@freebsd.org>
List-Help: <mailto:svn-src-all-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Thu, 21 Jan 2016 01:05:42 -0000

Author: mjg
Date: Thu Jan 21 01:05:41 2016
New Revision: 294476
URL: https://svnweb.freebsd.org/changeset/base/294476

Log:
  cache: provide a helper for computing the hash
  
  Reviewed by:	kib

Modified:
  head/sys/kern/vfs_cache.c

Modified: head/sys/kern/vfs_cache.c
==============================================================================
--- head/sys/kern/vfs_cache.c	Thu Jan 21 01:04:03 2016	(r294475)
+++ head/sys/kern/vfs_cache.c	Thu Jan 21 01:05:41 2016	(r294476)
@@ -310,6 +310,16 @@ static int vn_fullpath1(struct thread *t
 
 static MALLOC_DEFINE(M_VFSCACHE, "vfscache", "VFS name cache entries");
 
+static uint32_t
+cache_get_hash(char *name, u_char len, struct vnode *dvp)
+{
+	uint32_t hash;
+
+	hash = fnv_32_buf(name, len, FNV1_32_INIT);
+	hash = fnv_32_buf(&dvp, sizeof(dvp), hash);
+	return (hash);
+}
+
 static int
 sysctl_nchstats(SYSCTL_HANDLER_ARGS)
 {
@@ -554,8 +564,7 @@ retry_wlocked:
 		}
 	}
 
-	hash = fnv_32_buf(cnp->cn_nameptr, cnp->cn_namelen, FNV1_32_INIT);
-	hash = fnv_32_buf(&dvp, sizeof(dvp), hash);
+	hash = cache_get_hash(cnp->cn_nameptr, cnp->cn_namelen, dvp);
 	LIST_FOREACH(ncp, (NCHHASH(hash)), nc_hash) {
 		counter_u64_add(numchecks, 1);
 		if (ncp->nc_dvp == dvp && ncp->nc_nlen == cnp->cn_namelen &&
@@ -799,9 +808,8 @@ cache_enter_time(struct vnode *dvp, stru
 		}
 	}
 	len = ncp->nc_nlen = cnp->cn_namelen;
-	hash = fnv_32_buf(cnp->cn_nameptr, len, FNV1_32_INIT);
+	hash = cache_get_hash(cnp->cn_nameptr, len, dvp);
 	strlcpy(nc_get_name(ncp), cnp->cn_nameptr, len + 1);
-	hash = fnv_32_buf(&dvp, sizeof(dvp), hash);
 	CACHE_WLOCK();
 
 	/*
@@ -980,10 +988,8 @@ cache_changesize(int newmaxvnodes)
 	nchash = new_nchash;
 	for (i = 0; i <= old_nchash; i++) {
 		while ((ncp = LIST_FIRST(&old_nchashtbl[i])) != NULL) {
-			hash = fnv_32_buf(nc_get_name(ncp), ncp->nc_nlen,
-			    FNV1_32_INIT);
-			hash = fnv_32_buf(&ncp->nc_dvp, sizeof(ncp->nc_dvp),
-			    hash);
+			hash = cache_get_hash(nc_get_name(ncp), ncp->nc_nlen,
+			    ncp->nc_dvp);
 			LIST_REMOVE(ncp, nc_hash);
 			LIST_INSERT_HEAD(NCHHASH(hash), ncp, nc_hash);
 		}

From owner-svn-src-all@freebsd.org  Thu Jan 21 01:07:06 2016
Return-Path: <owner-svn-src-all@freebsd.org>
Delivered-To: svn-src-all@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id D83E8A8999A;
 Thu, 21 Jan 2016 01:07:06 +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 8B3F71877;
 Thu, 21 Jan 2016 01:07:06 +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 u0L175AK098847;
 Thu, 21 Jan 2016 01:07:05 GMT (envelope-from mjg@FreeBSD.org)
Received: (from mjg@localhost)
 by repo.freebsd.org (8.15.2/8.15.2/Submit) id u0L1754E098846;
 Thu, 21 Jan 2016 01:07:05 GMT (envelope-from mjg@FreeBSD.org)
Message-Id: <201601210107.u0L1754E098846@repo.freebsd.org>
X-Authentication-Warning: repo.freebsd.org: mjg set sender to mjg@FreeBSD.org
 using -f
From: Mateusz Guzik <mjg@FreeBSD.org>
Date: Thu, 21 Jan 2016 01:07:05 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-head@freebsd.org
Subject: svn commit: r294477 - head/sys/kern
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.20
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for &quot;
 user&quot; and &quot; projects&quot; \)" <svn-src-all.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-all/>
List-Post: <mailto:svn-src-all@freebsd.org>
List-Help: <mailto:svn-src-all-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Thu, 21 Jan 2016 01:07:06 -0000

Author: mjg
Date: Thu Jan 21 01:07:05 2016
New Revision: 294477
URL: https://svnweb.freebsd.org/changeset/base/294477

Log:
  cache: perform . lockup without the namecache lock
  
  Reviewed by:	kib

Modified:
  head/sys/kern/vfs_cache.c

Modified: head/sys/kern/vfs_cache.c
==============================================================================
--- head/sys/kern/vfs_cache.c	Thu Jan 21 01:05:41 2016	(r294476)
+++ head/sys/kern/vfs_cache.c	Thu Jan 21 01:07:05 2016	(r294477)
@@ -508,7 +508,6 @@ cache_lookup(struct vnode *dvp, struct v
 		return (0);
 	}
 retry:
-	CACHE_RLOCK();
 	wlocked = 0;
 	counter_u64_add(numcalls, 1);
 	error = 0;
@@ -525,8 +524,28 @@ retry_wlocked:
 				timespecclear(tsp);
 			if (ticksp != NULL)
 				*ticksp = ticks;
-			goto success;
+			VREF(*vpp);
+			/*
+			 * When we lookup "." we still can be asked to lock it
+			 * differently...
+			 */
+			ltype = cnp->cn_lkflags & LK_TYPE_MASK;
+			if (ltype != VOP_ISLOCKED(*vpp)) {
+				if (ltype == LK_EXCLUSIVE) {
+					vn_lock(*vpp, LK_UPGRADE | LK_RETRY);
+					if ((*vpp)->v_iflag & VI_DOOMED) {
+						/* forced unmount */
+						vrele(*vpp);
+						*vpp = NULL;
+						return (ENOENT);
+					}
+				} else
+					vn_lock(*vpp, LK_DOWNGRADE | LK_RETRY);
+			}
+			return (-1);
 		}
+		if (!wlocked)
+			CACHE_RLOCK();
 		if (cnp->cn_namelen == 2 && cnp->cn_nameptr[1] == '.') {
 			counter_u64_add(dotdothits, 1);
 			if (dvp->v_cache_dd == NULL) {
@@ -562,7 +581,8 @@ retry_wlocked:
 				    nc_dotdottime;
 			goto success;
 		}
-	}
+	} else if (!wlocked)
+		CACHE_RLOCK();
 
 	hash = cache_get_hash(cnp->cn_nameptr, cnp->cn_namelen, dvp);
 	LIST_FOREACH(ncp, (NCHHASH(hash)), nc_hash) {
@@ -652,31 +672,7 @@ success:
 	 * On success we return a locked and ref'd vnode as per the lookup
 	 * protocol.
 	 */
-	if (dvp == *vpp) {   /* lookup on "." */
-		VREF(*vpp);
-		if (wlocked)
-			CACHE_WUNLOCK();
-		else
-			CACHE_RUNLOCK();
-		/*
-		 * When we lookup "." we still can be asked to lock it
-		 * differently...
-		 */
-		ltype = cnp->cn_lkflags & LK_TYPE_MASK;
-		if (ltype != VOP_ISLOCKED(*vpp)) {
-			if (ltype == LK_EXCLUSIVE) {
-				vn_lock(*vpp, LK_UPGRADE | LK_RETRY);
-				if ((*vpp)->v_iflag & VI_DOOMED) {
-					/* forced unmount */
-					vrele(*vpp);
-					*vpp = NULL;
-					return (ENOENT);
-				}
-			} else
-				vn_lock(*vpp, LK_DOWNGRADE | LK_RETRY);
-		}
-		return (-1);
-	}
+	MPASS(dvp != *vpp);
 	ltype = 0;	/* silence gcc warning */
 	if (cnp->cn_flags & ISDOTDOT) {
 		ltype = VOP_ISLOCKED(dvp);

From owner-svn-src-all@freebsd.org  Thu Jan 21 01:09:40 2016
Return-Path: <owner-svn-src-all@freebsd.org>
Delivered-To: svn-src-all@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id C8399A89A50;
 Thu, 21 Jan 2016 01:09:40 +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 88FB61A57;
 Thu, 21 Jan 2016 01:09:40 +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 u0L19dCq099058;
 Thu, 21 Jan 2016 01:09:39 GMT (envelope-from mjg@FreeBSD.org)
Received: (from mjg@localhost)
 by repo.freebsd.org (8.15.2/8.15.2/Submit) id u0L19d2E099057;
 Thu, 21 Jan 2016 01:09:39 GMT (envelope-from mjg@FreeBSD.org)
Message-Id: <201601210109.u0L19d2E099057@repo.freebsd.org>
X-Authentication-Warning: repo.freebsd.org: mjg set sender to mjg@FreeBSD.org
 using -f
From: Mateusz Guzik <mjg@FreeBSD.org>
Date: Thu, 21 Jan 2016 01:09:39 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-head@freebsd.org
Subject: svn commit: r294478 - head/sys/kern
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.20
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for &quot;
 user&quot; and &quot; projects&quot; \)" <svn-src-all.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-all/>
List-Post: <mailto:svn-src-all@freebsd.org>
List-Help: <mailto:svn-src-all-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Thu, 21 Jan 2016 01:09:41 -0000

Author: mjg
Date: Thu Jan 21 01:09:39 2016
New Revision: 294478
URL: https://svnweb.freebsd.org/changeset/base/294478

Log:
  cache: minor changes
  
  1. vhold and zap immediately instead of postponing few lines later
  2. increment numneg after new entry is added
  
  No functional changes.
  
  No objections:		kib

Modified:
  head/sys/kern/vfs_cache.c

Modified: head/sys/kern/vfs_cache.c
==============================================================================
--- head/sys/kern/vfs_cache.c	Thu Jan 21 01:07:05 2016	(r294477)
+++ head/sys/kern/vfs_cache.c	Thu Jan 21 01:09:39 2016	(r294478)
@@ -723,8 +723,6 @@ cache_enter_time(struct vnode *dvp, stru
 	struct nchashhead *ncpp;
 	uint32_t hash;
 	int flag;
-	int hold;
-	int zap;
 	int len;
 
 	CTR3(KTR_VFS, "cache_enter(%p, %p, %s)", dvp, vp, cnp->cn_nameptr);
@@ -782,9 +780,6 @@ cache_enter_time(struct vnode *dvp, stru
 		}
 	}
 
-	hold = 0;
-	zap = 0;
-
 	/*
 	 * Calculate the hash key and setup as much of the new
 	 * namecache entry as possible before acquiring the lock.
@@ -855,24 +850,22 @@ cache_enter_time(struct vnode *dvp, stru
 	}
 
 	numcache++;
-	if (vp == NULL) {
-		numneg++;
-		if (cnp->cn_flags & ISWHITEOUT)
-			ncp->nc_flag |= NCF_WHITE;
-	} else if (vp->v_type == VDIR) {
-		if (flag != NCF_ISDOTDOT) {
-			/*
-			 * For this case, the cache entry maps both the
-			 * directory name in it and the name ".." for the
-			 * directory's parent.
-			 */
-			if ((n2 = vp->v_cache_dd) != NULL &&
-			    (n2->nc_flag & NCF_ISDOTDOT) != 0)
-				cache_zap(n2);
-			vp->v_cache_dd = ncp;
+	if (vp != NULL) {
+		if (vp->v_type == VDIR) {
+			if (flag != NCF_ISDOTDOT) {
+				/*
+				 * For this case, the cache entry maps both the
+				 * directory name in it and the name ".." for the
+				 * directory's parent.
+				 */
+				if ((n2 = vp->v_cache_dd) != NULL &&
+				    (n2->nc_flag & NCF_ISDOTDOT) != 0)
+					cache_zap(n2);
+				vp->v_cache_dd = ncp;
+			}
+		} else {
+			vp->v_cache_dd = NULL;
 		}
-	} else {
-		vp->v_cache_dd = NULL;
 	}
 
 	/*
@@ -882,7 +875,7 @@ cache_enter_time(struct vnode *dvp, stru
 	LIST_INSERT_HEAD(ncpp, ncp, nc_hash);
 	if (flag != NCF_ISDOTDOT) {
 		if (LIST_EMPTY(&dvp->v_cache_src)) {
-			hold = 1;
+			vhold(dvp);
 			numcachehv++;
 		}
 		LIST_INSERT_HEAD(&dvp->v_cache_src, ncp, nc_src);
@@ -898,7 +891,10 @@ cache_enter_time(struct vnode *dvp, stru
 		SDT_PROBE3(vfs, namecache, enter, done, dvp, nc_get_name(ncp),
 		    vp);
 	} else {
+		if (cnp->cn_flags & ISWHITEOUT)
+			ncp->nc_flag |= NCF_WHITE;
 		TAILQ_INSERT_TAIL(&ncneg, ncp, nc_dst);
+		numneg++;
 		SDT_PROBE2(vfs, namecache, enter_negative, done, dvp,
 		    nc_get_name(ncp));
 	}
@@ -906,12 +902,8 @@ cache_enter_time(struct vnode *dvp, stru
 		ncp = TAILQ_FIRST(&ncneg);
 		KASSERT(ncp->nc_vp == NULL, ("ncp %p vp %p on ncneg",
 		    ncp, ncp->nc_vp));
-		zap = 1;
-	}
-	if (hold)
-		vhold(dvp);
-	if (zap)
 		cache_zap(ncp);
+	}
 	CACHE_WUNLOCK();
 }
 

From owner-svn-src-all@freebsd.org  Thu Jan 21 01:15:42 2016
Return-Path: <owner-svn-src-all@freebsd.org>
Delivered-To: svn-src-all@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2348EA89E83;
 Thu, 21 Jan 2016 01:15:42 +0000 (UTC)
 (envelope-from allanjude@FreeBSD.org)
Received: from repo.freebsd.org (repo.freebsd.org
 [IPv6:2610:1c1:1:6068::e6a:0])
 (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
 (Client did not present a certificate)
 by mx1.freebsd.org (Postfix) with ESMTPS id E7DB51FE2;
 Thu, 21 Jan 2016 01:15:41 +0000 (UTC)
 (envelope-from allanjude@FreeBSD.org)
Received: from repo.freebsd.org ([127.0.1.37])
 by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u0L1Fe0v002209;
 Thu, 21 Jan 2016 01:15:40 GMT (envelope-from allanjude@FreeBSD.org)
Received: (from allanjude@localhost)
 by repo.freebsd.org (8.15.2/8.15.2/Submit) id u0L1Fecr002208;
 Thu, 21 Jan 2016 01:15:40 GMT (envelope-from allanjude@FreeBSD.org)
Message-Id: <201601210115.u0L1Fecr002208@repo.freebsd.org>
X-Authentication-Warning: repo.freebsd.org: allanjude set sender to
 allanjude@FreeBSD.org using -f
From: Allan Jude <allanjude@FreeBSD.org>
Date: Thu, 21 Jan 2016 01:15:40 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org
Subject: svn commit: r294479 - stable/10/usr.sbin/bsdinstall/scripts
X-SVN-Group: stable-10
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.20
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for &quot;
 user&quot; and &quot; projects&quot; \)" <svn-src-all.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-all/>
List-Post: <mailto:svn-src-all@freebsd.org>
List-Help: <mailto:svn-src-all-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Thu, 21 Jan 2016 01:15:42 -0000

Author: allanjude
Date: Thu Jan 21 01:15:40 2016
New Revision: 294479
URL: https://svnweb.freebsd.org/changeset/base/294479

Log:
  MFC: r294191
    Never 4k align the MBR bootpool because zfsldr can not deal with a gap
  
  Sponsored by:	ScaleEngine Inc.

Modified:
  stable/10/usr.sbin/bsdinstall/scripts/zfsboot
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/usr.sbin/bsdinstall/scripts/zfsboot
==============================================================================
--- stable/10/usr.sbin/bsdinstall/scripts/zfsboot	Thu Jan 21 01:09:39 2016	(r294478)
+++ stable/10/usr.sbin/bsdinstall/scripts/zfsboot	Thu Jan 21 01:15:40 2016	(r294479)
@@ -825,6 +825,7 @@ zfs_create_diskpart()
 	if [ "$ZFSBOOT_FORCE_4K_SECTORS" ]; then
 		align_small="-a 4k"
 		align_big="-a 1m"
+		sysctl kern.geom.part.mbr.enforce_chs=0
 	fi
 
 	case "$ZFSBOOT_PARTITION_SCHEME" in
@@ -940,11 +941,12 @@ zfs_create_diskpart()
 
 		#
 		# Always prepare a boot pool on MBR
+		# Do not align this partition, there must not be a gap
 		#
 		ZFSBOOT_BOOT_POOL=1
 		f_eval_catch $funcname gpart \
 		             "$GPART_ADD_ALIGN_INDEX_WITH_SIZE" \
-		             "$align_small" 1 freebsd-zfs ${bootsize}b ${disk}s1 ||
+		             "" 1 freebsd-zfs ${bootsize}b ${disk}s1 ||
 		             return $FAILURE
 		# Pedantically nuke any old labels
 		f_eval_catch -d $funcname zpool "$ZPOOL_LABELCLEAR_F" \

From owner-svn-src-all@freebsd.org  Thu Jan 21 01:25:29 2016
Return-Path: <owner-svn-src-all@freebsd.org>
Delivered-To: svn-src-all@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id D9045A8A247;
 Thu, 21 Jan 2016 01:25:29 +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 B2CAD18B8;
 Thu, 21 Jan 2016 01:25:29 +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 u0L1PSF3005707;
 Thu, 21 Jan 2016 01:25:28 GMT (envelope-from jhb@FreeBSD.org)
Received: (from jhb@localhost)
 by repo.freebsd.org (8.15.2/8.15.2/Submit) id u0L1PSG5005703;
 Thu, 21 Jan 2016 01:25:28 GMT (envelope-from jhb@FreeBSD.org)
Message-Id: <201601210125.u0L1PSG5005703@repo.freebsd.org>
X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org
 using -f
From: John Baldwin <jhb@FreeBSD.org>
Date: Thu, 21 Jan 2016 01:25:28 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org
Subject: svn commit: r294480 - in stable/10/sys/boot: i386/zfsboot pc98/boot2
 pc98/libpc98
X-SVN-Group: stable-10
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.20
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for &quot;
 user&quot; and &quot; projects&quot; \)" <svn-src-all.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-all/>
List-Post: <mailto:svn-src-all@freebsd.org>
List-Help: <mailto:svn-src-all-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Thu, 21 Jan 2016 01:25:30 -0000

Author: jhb
Date: Thu Jan 21 01:25:28 2016
New Revision: 294480
URL: https://svnweb.freebsd.org/changeset/base/294480

Log:
  MFC 292682:
  Fix remaining direct tests of the carry flag in the v86 %eflags via a
  magic number to use V86_CY() instead.  These should have been fixed as
  part of the cleanup in r226746 but were missed.
  
  The md5 sums of the object files were unchanged, so there should be no
  functional change.
  
  PR:		205424
  Submitted by:	Alexander Kuleshov <kuleshovmail@gmail.com>

Modified:
  stable/10/sys/boot/i386/zfsboot/zfsboot.c
  stable/10/sys/boot/pc98/boot2/boot2.c
  stable/10/sys/boot/pc98/libpc98/biosdisk.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/sys/boot/i386/zfsboot/zfsboot.c
==============================================================================
--- stable/10/sys/boot/i386/zfsboot/zfsboot.c	Thu Jan 21 01:15:40 2016	(r294479)
+++ stable/10/sys/boot/i386/zfsboot/zfsboot.c	Thu Jan 21 01:25:28 2016	(r294480)
@@ -238,7 +238,7 @@ bios_getmem(void)
 	v86.es = VTOPSEG(&smap);
 	v86.edi = VTOPOFF(&smap);
 	v86int();
-	if ((v86.efl & 1) || (v86.eax != SMAP_SIG))
+	if (V86_CY(v86.efl) || (v86.eax != SMAP_SIG))
 	    break;
 	/* look for a low-memory segment that's large enough */
 	if ((smap.type == SMAP_TYPE_MEMORY) && (smap.base == 0) &&
@@ -285,7 +285,7 @@ bios_getmem(void)
 	v86.addr = 0x15;		/* int 0x15 function 0xe801*/
 	v86.eax = 0xe801;
 	v86int();
-	if (!(v86.efl & 1)) {
+	if (!V86_CY(v86.efl)) {
 	    bios_extmem = ((v86.ecx & 0xffff) + ((v86.edx & 0xffff) * 64)) * 1024;
 	}
     }
@@ -320,7 +320,7 @@ int13probe(int drive)
     v86.edx = drive;
     v86int();
     
-    if (!(v86.efl & 0x1) &&				/* carry clear */
+    if (!V86_CY(v86.efl) &&				/* carry clear */
 	((v86.edx & 0xff) != (drive & DRV_MASK))) {	/* unit # OK */
 	if ((v86.ecx & 0x3f) == 0) {			/* absurd sector size */
 		return(0);				/* skip device */

Modified: stable/10/sys/boot/pc98/boot2/boot2.c
==============================================================================
--- stable/10/sys/boot/pc98/boot2/boot2.c	Thu Jan 21 01:15:40 2016	(r294479)
+++ stable/10/sys/boot/pc98/boot2/boot2.c	Thu Jan 21 01:25:28 2016	(r294480)
@@ -326,7 +326,7 @@ bd_getbigeom(int bunit)
     v86.addr = 0x1b;
     v86.eax = 0x8400 | unit;
     v86int();
-    if (v86.efl & 0x1)
+    if (V86_CY(v86.efl))
 	return 0x4F020F;	/* 1200KB FD C:80 H:2 S:15 */
     return ((v86.ecx & 0xffff) << 16) | (v86.edx & 0xffff);
 }

Modified: stable/10/sys/boot/pc98/libpc98/biosdisk.c
==============================================================================
--- stable/10/sys/boot/pc98/libpc98/biosdisk.c	Thu Jan 21 01:15:40 2016	(r294479)
+++ stable/10/sys/boot/pc98/libpc98/biosdisk.c	Thu Jan 21 01:25:28 2016	(r294480)
@@ -824,7 +824,7 @@ bd_chs_io(struct open_disk *od, daddr_t 
     v86.es = VTOPSEG(dest);
     v86.ebp = VTOPOFF(dest);
     v86int();
-    return (v86.efl & 0x1);
+    return (V86_CY(v86.efl));
 }
 
 static int
@@ -959,7 +959,7 @@ bd_getgeom(struct open_disk *od)
 	od->od_cyl = v86.ecx;
 	od->od_hds = (v86.edx >> 8) & 0xff;
 	od->od_sec = v86.edx & 0xff;
-	if (v86.efl & 0x1)
+	if (V86_CY(v86.efl))
 	    return(1);
     }
 
@@ -1010,7 +1010,7 @@ bd_getbigeom(int bunit)
     v86.addr = 0x1b;
     v86.eax = 0x8400 | unit;
     v86int();
-    if (v86.efl & 0x1)
+    if (V86_CY(v86.efl))
 	return 0x4F020F;	/* 1200KB FD C:80 H:2 S:15 */
     return ((v86.ecx & 0xffff) << 16) | (v86.edx & 0xffff);
 }

From owner-svn-src-all@freebsd.org  Thu Jan 21 01:25:55 2016
Return-Path: <owner-svn-src-all@freebsd.org>
Delivered-To: svn-src-all@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9817FA8A2F9;
 Thu, 21 Jan 2016 01:25:55 +0000 (UTC)
 (envelope-from markjdb@gmail.com)
Received: from mail-pf0-x229.google.com (mail-pf0-x229.google.com
 [IPv6:2607:f8b0:400e:c00::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 6622A1A44;
 Thu, 21 Jan 2016 01:25:55 +0000 (UTC)
 (envelope-from markjdb@gmail.com)
Received: by mail-pf0-x229.google.com with SMTP id e65so13986387pfe.0;
 Wed, 20 Jan 2016 17:25:55 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;
 h=sender:date:from:to:cc:subject:message-id:references:mime-version
 :content-type:content-disposition:in-reply-to:user-agent;
 bh=IAUPjbJNLErpjGWbJEeYLNxlxnmfzUZuT4rd/Q1sAM4=;
 b=Ly7C2RbU7E1L1AnxEHhx57vBfkNJOye7GTB0MkZkIEuXeGmTP7MEr2NfPQJgGuY6z4
 qUfwbg4IXBH3BaY3ryCk6QSxAiGU4hZmGuPRNPTzqocbsDbZPoeFSmicUlOnT4Vg1yeU
 uMfaes9uStuP1L/hLAJjryWZBrrD/bAuHBdMpqcSMslQ0XUL5ul7NFYrefWBzHy2M3mt
 NxHMdVH1PJhPmZDTkrrF+pZzIKzJUTMWJ+A+MKWB9JT0xf7FtR+veZWiVxmHIepGW/b+
 s45fcib9FIdzu6q+1cQ0NxKtG+9dbV2lO5oJ3/wIfqMqz3LS1fIV+VtXjx0+Ltu61oZY
 /1RQ==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20130820;
 h=x-gm-message-state:sender:date:from:to:cc:subject:message-id
 :references:mime-version:content-type:content-disposition
 :in-reply-to:user-agent;
 bh=IAUPjbJNLErpjGWbJEeYLNxlxnmfzUZuT4rd/Q1sAM4=;
 b=XyzkMd+1egCTjHsceTXyqCWkuM/l9MP/AeTNplQKHUtFq0ZRL3VxhJfsu0cbTyhI/4
 elpDgdSQAweuZXvZl2oFylaxK2mqUSR4+QeCsKm9BwcgYpfCsMTwHAoYvO/ZpHVDkWzs
 i5M6pa6xIyKOA/PpXEOAk4G4PkmxnmJtr6oJgvSyZsvkgO2Y2Y/dA3HQqyynhwOiSc2O
 l7UKyMACoQXDnV3CKEJf0vAxmR0KQNmdGmH7MaZYprhKeXr1r3v28AX9HsSrZ3mIFKvZ
 /s7mIqGIrjZxBt8Yv9pd0DqbgmWCT4R8OUU2Z7aXrLbNDfK4o9LZV68WdSlIZDQ5wJ8O
 Dnng==
X-Gm-Message-State: ALoCoQllxKGGYeWss/T9kJ78J7tEXxNY45kSwCwt5vXBw1z2OvWC3Kfvh1NDYIXiXv0tVbh9n28JoWBsGz5jh0+RZgGZft+omQ==
X-Received: by 10.98.14.29 with SMTP id w29mr56365579pfi.160.1453339555072;
 Wed, 20 Jan 2016 17:25:55 -0800 (PST)
Received: from wkstn-mjohnston.west.isilon.com
 (c-67-182-131-225.hsd1.wa.comcast.net. [67.182.131.225])
 by smtp.gmail.com with ESMTPSA id 76sm45773695pfl.36.2016.01.20.17.25.54
 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);
 Wed, 20 Jan 2016 17:25:54 -0800 (PST)
Sender: Mark Johnston <markjdb@gmail.com>
Date: Wed, 20 Jan 2016 17:28:25 -0800
From: Mark Johnston <markj@FreeBSD.org>
To: Ravi Pokala <rpokala@mac.com>
Cc: Adrian Chadd <adrian.chadd@gmail.com>,
 Andriy Voskoboinyk <avos@freebsd.org>,
 "src-committers@freebsd.org" <src-committers@freebsd.org>,
 "svn-src-all@freebsd.org" <svn-src-all@freebsd.org>,
 "svn-src-head@freebsd.org" <svn-src-head@freebsd.org>
Subject: Re: svn commit: r294471 - head/sys/dev/usb/wlan
Message-ID: <20160121012825.GA9303@wkstn-mjohnston.west.isilon.com>
References: <201601202327.u0KNR2Hh066219@repo.freebsd.org>
 <CAJ-Vmom-nORRCZx6YyhH0LJxcOUTuFfMkVsjOczNZiL-TEbsVA@mail.gmail.com>
 <4FBE9133-AB30-4D30-A298-1742952700C5@panasas.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <4FBE9133-AB30-4D30-A298-1742952700C5@panasas.com>
User-Agent: Mutt/1.5.24 (2015-08-30)
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.20
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for &quot;
 user&quot; and &quot; projects&quot; \)" <svn-src-all.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-all/>
List-Post: <mailto:svn-src-all@freebsd.org>
List-Help: <mailto:svn-src-all-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Thu, 21 Jan 2016 01:25:55 -0000

On Wed, Jan 20, 2016 at 04:15:54PM -0800, Ravi Pokala wrote:
> -----Original Message-----
> 
> 
> From: <owner-src-committers@freebsd.org> on behalf of Adrian Chadd <adrian.chadd@gmail.com>
> Date: 2016-01-20, Wednesday at 16:02
> To: Andriy Voskoboinyk <avos@freebsd.org>
> Cc: "src-committers@freebsd.org" <src-committers@freebsd.org>, "svn-src-all@freebsd.org" <svn-src-all@freebsd.org>, "svn-src-head@freebsd.org" <svn-src-head@freebsd.org>
> Subject: Re: svn commit: r294471 - head/sys/dev/usb/wlan
> 
> >Hi,
> >
> >So yeah, I think it's time we just bit the bullet and wrote a
> >generic-ish debug/ktr framework for drivers to use so drivers and
> >infrastructure doesn't keep spinning its own damned debugging stuff.
> >
> >(I know people keep saying "dtrace", but ...)
> >
> >Let's have a think about it.
> 
> One issue I have with DTrace (and KTR, though I'm even less familiar with it than I am with DTrace) is that you only get a stream of what's happening right now - there's no way to see *what just happened*. For example, I wrote an ATA command tracing infrastructure for Panasas which keeps the last several thousand commands in a trace buffer, and a tool that extracts the buffer and saves it to a file.

What you describe sounds like it could be accomplished with KTR. All KTR
does is maintain a ring of buffers, each containing a static format
string with optional arguments, as well as some metadata (CPU, thread,
timecounter value).

One feature that would be nice would be a way to associate KTR rings
with arbitrary objects rather than having a single global ring (or
per-CPU rings). For example, KTR_BUF lets one trace operations on
filesystem buffers, but there's no good way to find all trace records
corresponding to a given buf. At the moment one has to always include a
pointer to the buf, and then scan *all* KTR entries for the pointer of
interest while hoping that the relevant entries haven't already been
overwritten. With per-object rings, one can in effect see a "history" of
the object, whether it's a buf or a driver softc or whatever.

Isilon has done ad-hoc implementations of this for bufs and mbufs, and
they're quite handy for debugging. With BUF_TRACKING enabled in our
kernel config, each buf contains a const char *b_records[32], and one
adds

	buf_track(bp, __func__);

or so to various functions to record an entry in the buf when the
function is invoked. This is really similar to what KTR does already,
and I've needed to further hack up our buf tracking to include metadata
(thread IDs) that KTR already provides. And, KTR records can be
retrieved from vmcores by ktrdump -M.

> We can then feed that file into various analysis tools, which can show us exactly what we sent to the drive, and exactly what the drive sent back to us. (The nice thing is, the buffer is also in the vmcore, so we can easily extract it after a panic, and it's identical to what you get from the live system, so the same analysis tools can be used in both instances.) This has come in very handy when we want to see, for example, what new and stupid thing a drive did that caused an error, slowdown or panic.

From owner-svn-src-all@freebsd.org  Thu Jan 21 01:28:33 2016
Return-Path: <owner-svn-src-all@freebsd.org>
Delivered-To: svn-src-all@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2437CA8A46A;
 Thu, 21 Jan 2016 01:28:33 +0000 (UTC) (envelope-from jhb@FreeBSD.org)
Received: from repo.freebsd.org (repo.freebsd.org
 [IPv6:2610:1c1:1:6068::e6a:0])
 (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
 (Client did not present a certificate)
 by mx1.freebsd.org (Postfix) with ESMTPS id CB1B01C40;
 Thu, 21 Jan 2016 01:28:32 +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 u0L1SVHL005966;
 Thu, 21 Jan 2016 01:28:31 GMT (envelope-from jhb@FreeBSD.org)
Received: (from jhb@localhost)
 by repo.freebsd.org (8.15.2/8.15.2/Submit) id u0L1SVKa005965;
 Thu, 21 Jan 2016 01:28:31 GMT (envelope-from jhb@FreeBSD.org)
Message-Id: <201601210128.u0L1SVKa005965@repo.freebsd.org>
X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org
 using -f
From: John Baldwin <jhb@FreeBSD.org>
Date: Thu, 21 Jan 2016 01:28:31 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-head@freebsd.org
Subject: svn commit: r294481 - head/sys/kern
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.20
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for &quot;
 user&quot; and &quot; projects&quot; \)" <svn-src-all.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-all/>
List-Post: <mailto:svn-src-all@freebsd.org>
List-Help: <mailto:svn-src-all-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Thu, 21 Jan 2016 01:28:33 -0000

Author: jhb
Date: Thu Jan 21 01:28:31 2016
New Revision: 294481
URL: https://svnweb.freebsd.org/changeset/base/294481

Log:
  Remove unused variables for socket AIO.
  
  In r55943, a per-process queue of pending socket AIO requests (requests
  waiting for the socket to become ready) was added so that they could be
  cancelled during process rundown.  In r154765, the rundown code was
  changed to handle jobs in this state (JOBST_JOBQSOCK) directly removing
  the need for the extra queue.  However, the per-process queue head and
  global lock were never removed.
  
  Reviewed by:	kib
  Sponsored by:	Chelsio Communications
  Differential Revision:	https://reviews.freebsd.org/D4997

Modified:
  head/sys/kern/vfs_aio.c

Modified: head/sys/kern/vfs_aio.c
==============================================================================
--- head/sys/kern/vfs_aio.c	Thu Jan 21 01:25:28 2016	(r294480)
+++ head/sys/kern/vfs_aio.c	Thu Jan 21 01:28:31 2016	(r294481)
@@ -293,9 +293,6 @@ struct kaioinfo {
 	TAILQ_HEAD(,aioliojob) kaio_liojoblist; /* (a) list of lio jobs */
 	TAILQ_HEAD(,aiocblist) kaio_jobqueue;	/* (a) job queue for process */
 	TAILQ_HEAD(,aiocblist) kaio_bufqueue;	/* (a) buffer job queue for process */
-	TAILQ_HEAD(,aiocblist) kaio_sockqueue;  /* (a) queue for aios waiting on sockets,
-						 *  NOT USED YET.
-						 */
 	TAILQ_HEAD(,aiocblist) kaio_syncqueue;	/* (a) queue for aio_fsync */
 	struct	task	kaio_task;	/* (*) task to kick aio threads */
 };
@@ -325,7 +322,6 @@ struct aiocb_ops {
 static TAILQ_HEAD(,aiothreadlist) aio_freeproc;		/* (c) Idle daemons */
 static struct sema aio_newproc_sem;
 static struct mtx aio_job_mtx;
-static struct mtx aio_sock_mtx;
 static TAILQ_HEAD(,aiocblist) aio_jobs;			/* (c) Async job list */
 static struct unrhdr *aiod_unr;
 
@@ -483,7 +479,6 @@ aio_onceonly(void)
 	TAILQ_INIT(&aio_freeproc);
 	sema_init(&aio_newproc_sem, 0, "aio_new_proc");
 	mtx_init(&aio_job_mtx, "aio_job", NULL, MTX_DEF);
-	mtx_init(&aio_sock_mtx, "aio_sock", NULL, MTX_DEF);
 	TAILQ_INIT(&aio_jobs);
 	aiod_unr = new_unrhdr(1, INT_MAX, NULL);
 	kaio_zone = uma_zcreate("AIO", sizeof(struct kaioinfo), NULL, NULL,
@@ -556,7 +551,6 @@ aio_unload(void)
 	EVENTHANDLER_DEREGISTER(process_exit, exit_tag);
 	EVENTHANDLER_DEREGISTER(process_exec, exec_tag);
 	mtx_destroy(&aio_job_mtx);
-	mtx_destroy(&aio_sock_mtx);
 	sema_destroy(&aio_newproc_sem);
 	p31b_setcfg(CTL_P1003_1B_AIO_LISTIO_MAX, -1);
 	p31b_setcfg(CTL_P1003_1B_AIO_MAX, -1);
@@ -587,7 +581,6 @@ aio_init_aioinfo(struct proc *p)
 	TAILQ_INIT(&ki->kaio_jobqueue);
 	TAILQ_INIT(&ki->kaio_bufqueue);
 	TAILQ_INIT(&ki->kaio_liojoblist);
-	TAILQ_INIT(&ki->kaio_sockqueue);
 	TAILQ_INIT(&ki->kaio_syncqueue);
 	TASK_INIT(&ki->kaio_task, 0, aio_kick_helper, p);
 	PROC_LOCK(p);

From owner-svn-src-all@freebsd.org  Thu Jan 21 01:40:06 2016
Return-Path: <owner-svn-src-all@freebsd.org>
Delivered-To: svn-src-all@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id 87B3DA8A8B0;
 Thu, 21 Jan 2016 01:40:06 +0000 (UTC) (envelope-from rpokala@mac.com)
Received: from mr11p00im-asmtp002.me.com (mr11p00im-asmtp002.me.com
 [17.110.69.253])
 (using TLSv1.2 with cipher DHE-RSA-AES128-GCM-SHA256 (128/128 bits))
 (Client did not present a certificate)
 by mx1.freebsd.org (Postfix) with ESMTPS id 747CB10A8;
 Thu, 21 Jan 2016 01:40:06 +0000 (UTC) (envelope-from rpokala@mac.com)
Received: from [172.17.133.77] (dip-cali.panasas.com [64.80.217.3])
 by mr11p00im-asmtp002.me.com
 (Oracle Communications Messaging Server 7.0.5.36.0 64bit (built Sep 8 2015))
 with ESMTPSA id <0O1A006VX4MR4N10@mr11p00im-asmtp002.me.com>; Thu,
 21 Jan 2016 01:40:05 +0000 (GMT)
X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:,,
 definitions=2016-01-20_07:,, signatures=0
X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 spamscore=0
 clxscore=1011 suspectscore=0 malwarescore=0 phishscore=0 adultscore=0
 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1
 engine=8.0.1-1510270003 definitions=main-1601210030
User-Agent: Microsoft-MacOutlook/0.0.0.160109
Date: Wed, 20 Jan 2016 17:40:03 -0800
Subject: Re: svn commit: r294475 - head/sys/kern
From: Ravi Pokala <rpokala@mac.com>
Sender: "Pokala, Ravi" <rpokala@panasas.com>
To: Mateusz Guzik <mjg@FreeBSD.org>, src-committers@freebsd.org,
 svn-src-all@freebsd.org, svn-src-head@freebsd.org
Message-id: <0BB9E046-D76D-47CF-9BE6-4888727B7E05@panasas.com>
Thread-topic: svn commit: r294475 - head/sys/kern
References: <201601210104.u0L143tP098546@repo.freebsd.org>
In-reply-to: <201601210104.u0L143tP098546@repo.freebsd.org>
MIME-version: 1.0
Content-type: text/plain; charset=UTF-8
Content-transfer-encoding: 7bit
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.20
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for &quot;
 user&quot; and &quot; projects&quot; \)" <svn-src-all.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-all/>
List-Post: <mailto:svn-src-all@freebsd.org>
List-Help: <mailto:svn-src-all-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Thu, 21 Jan 2016 01:40:06 -0000

-----Original Message-----


From: <owner-src-committers@freebsd.org> on behalf of Mateusz Guzik <mjg@FreeBSD.org>
Date: 2016-01-20, Wednesday at 17:04
To: <src-committers@freebsd.org>, <svn-src-all@freebsd.org>, <svn-src-head@freebsd.org>
Subject: svn commit: r294475 - head/sys/kern

>Author: mjg
>Date: Thu Jan 21 01:04:03 2016
>New Revision: 294475
>URL: https://svnweb.freebsd.org/changeset/base/294475
>
>Log:
>  cache: use counter(9) API to maintain statistics
>  
>...
>
>Modified:
>  head/sys/kern/vfs_cache.c
>
>Modified: head/sys/kern/vfs_cache.c
>==============================================================================
>--- head/sys/kern/vfs_cache.c	Thu Jan 21 00:42:48 2016	(r294474)
>+++ head/sys/kern/vfs_cache.c	Thu Jan 21 01:04:03 2016	(r294475)
>
>...
> 
>
>+	numcalls = counter_u64_alloc(M_WAITOK);
>+	dothits = counter_u64_alloc(M_WAITOK);
>+	dotdothits = counter_u64_alloc(M_WAITOK);
>
>...
>

ISTR there's an API for creating a batch of counters; that might be cleaner than creating a dozen+ individually?

-Ravi (rpokala@)


From owner-svn-src-all@freebsd.org  Thu Jan 21 01:50:43 2016
Return-Path: <owner-svn-src-all@freebsd.org>
Delivered-To: svn-src-all@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id 225CBA8AF4A;
 Thu, 21 Jan 2016 01:50:43 +0000 (UTC)
 (envelope-from asomers@gmail.com)
Received: from mail-ob0-x22c.google.com (mail-ob0-x22c.google.com
 [IPv6:2607:f8b0:4003:c01::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 DB8181A0E;
 Thu, 21 Jan 2016 01:50:42 +0000 (UTC)
 (envelope-from asomers@gmail.com)
Received: by mail-ob0-x22c.google.com with SMTP id vt7so23285400obb.1;
 Wed, 20 Jan 2016 17:50:42 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;
 h=mime-version:sender:in-reply-to:references:date:message-id:subject
 :from:to:cc:content-type;
 bh=yfMYfw26LxJwLDcxafVHGqBDNVdpc1PqoD7Eo4IyJ20=;
 b=S7JcA6nqPT4wQy86bevt0pXT5KuYRTsf+MdUDzJUBqQ82e9/ZiaexywNCFkmB0cnCH
 qKXQ5F7dnvA8XHDzNR3FVBK85L+WA3NuCC0rdsDMryaBXcoIU7jeiopEHkyqrUEq788L
 C20TUV2394n0+dGXkRycjkK+imndnwVlDpUpdLO2+uPVeDMvNJHfeLgjt688IK5dD9Nh
 8KxtK6V9aWgw6hruH+IHsI3MDDkBs94y49CYvsjxi7zuqk6Og5Sst4KOE5fBj/JiNRgI
 tNt27vnYcE7m9MvxC9+zpUND0AD9wiak9cKf7O71VDRn+LEcoIEUoDt0Sy4o2G93563X
 1KOA==
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:date
 :message-id:subject:from:to:cc:content-type;
 bh=yfMYfw26LxJwLDcxafVHGqBDNVdpc1PqoD7Eo4IyJ20=;
 b=flGArKAJIrMzo/SAyfNahQ74vgoC7AOlp/ghSzf46qtaF8/aPGdwHM91LaUlHZfqiP
 Os73NwbmFCf4vta+yfnnWPWpDYubDArILUSBMiNCkkIfK0p//nT5VuIen5aqIkSz8ju2
 9cT9onpaGkKCCen0y2WXHU13EKsZU+32wZjhvE4fmdiLbtAYKEH7aFnghvrz+Kz/idSN
 d8MLbkJpkmTPKHs1o/H50Q0o5luIejKW2TT4E0YAOszTfIbhLaULh+jbXY58z72Wlz9F
 mJeyeORNctEpMdKZX+H/yBw/k9CvX6D8+pQOakrQMFAGrdCghILMvzhaxgm3WcSF3n+f
 Oh0w==
X-Gm-Message-State: ALoCoQlMe2++GIOgKpuzPbQhMzeSgi5qp/cWy1+I8VLXwB2NZZWmzGc8aqL+DIlUt4BkYOflmncHjVBW67511jWlYtIpYNhRMQ==
MIME-Version: 1.0
X-Received: by 10.182.68.66 with SMTP id u2mr32732219obt.49.1453341042185;
 Wed, 20 Jan 2016 17:50:42 -0800 (PST)
Sender: asomers@gmail.com
Received: by 10.202.69.84 with HTTP; Wed, 20 Jan 2016 17:50:42 -0800 (PST)
In-Reply-To: <56A0138F.9070606@FreeBSD.org>
References: <201601191700.u0JH0P6k061610@repo.freebsd.org>
 <569F5168.70605@FreeBSD.org>
 <CAOtMX2i-n0827yuf2cdDzq=0x-_oP9ZpjOxaR-Aqzfgu88Yq9g@mail.gmail.com>
 <56A0138F.9070606@FreeBSD.org>
Date: Wed, 20 Jan 2016 18:50:42 -0700
X-Google-Sender-Auth: 9V2ocw-soq39Yd6JPMGYGYJ0Sb4
Message-ID: <CAOtMX2hHy4qpKn-ackBR+zZK1Z8f7oja+hYL2mrxk74zUa-VHg@mail.gmail.com>
Subject: Re: svn commit: r294329 - in
 head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs: . sys
From: Alan Somers <asomers@freebsd.org>
To: Andriy Gapon <avg@freebsd.org>
Cc: "src-committers@freebsd.org" <src-committers@freebsd.org>, 
 "svn-src-all@freebsd.org" <svn-src-all@freebsd.org>, 
 "svn-src-head@freebsd.org" <svn-src-head@freebsd.org>
Content-Type: text/plain; charset=UTF-8
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.20
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for &quot;
 user&quot; and &quot; projects&quot; \)" <svn-src-all.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-all/>
List-Post: <mailto:svn-src-all@freebsd.org>
List-Help: <mailto:svn-src-all-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Thu, 21 Jan 2016 01:50:43 -0000

On Wed, Jan 20, 2016 at 4:09 PM, Andriy Gapon <avg@freebsd.org> wrote:
> On 20/01/2016 22:04, Alan Somers wrote:
>> On Wed, Jan 20, 2016 at 2:20 AM, Andriy Gapon <avg@freebsd.org> wrote:
>>> On 19/01/2016 19:00, Alan Somers wrote:
>>>> Author: asomers
>>>> Date: Tue Jan 19 17:00:25 2016
>>>> New Revision: 294329
>>>> URL: https://svnweb.freebsd.org/changeset/base/294329
>>>>
>>>> Log:
>>>>   Disallow zvol-backed ZFS pools
>>>
>>> What, again?...
>>>
>>
>> What do you mean, "again"?
>>
>
> zpools on zvols were disabled once in the past, took a while to re-enable the
> support.

Now I see the commit of which you speak.  It seems that zpools on
zvols were removed due to precisely the same problems that I'm
experiencing, then reenabled without comment when pjd imported zpool
version 28.  But the underlying issue remains.  What do you think
about my change in https://reviews.freebsd.org/D4998?  Disable the
feature by default so that those of us who aren't using it can operate
deadlock-free, but allow it to be enabled for people like Kurt Lidl
with unusual configurations.

-Alan

From owner-svn-src-all@freebsd.org  Thu Jan 21 02:20:40 2016
Return-Path: <owner-svn-src-all@freebsd.org>
Delivered-To: svn-src-all@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id 52732A8B98E;
 Thu, 21 Jan 2016 02:20:40 +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 10A3215D5;
 Thu, 21 Jan 2016 02:20:39 +0000 (UTC) (envelope-from jhb@FreeBSD.org)
Received: from repo.freebsd.org ([127.0.1.37])
 by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u0L2Kdrq022256;
 Thu, 21 Jan 2016 02:20:39 GMT (envelope-from jhb@FreeBSD.org)
Received: (from jhb@localhost)
 by repo.freebsd.org (8.15.2/8.15.2/Submit) id u0L2KdsN022255;
 Thu, 21 Jan 2016 02:20:39 GMT (envelope-from jhb@FreeBSD.org)
Message-Id: <201601210220.u0L2KdsN022255@repo.freebsd.org>
X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org
 using -f
From: John Baldwin <jhb@FreeBSD.org>
Date: Thu, 21 Jan 2016 02:20:39 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-head@freebsd.org
Subject: svn commit: r294482 - head/sys/kern
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.20
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for &quot;
 user&quot; and &quot; projects&quot; \)" <svn-src-all.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-all/>
List-Post: <mailto:svn-src-all@freebsd.org>
List-Help: <mailto:svn-src-all-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Thu, 21 Jan 2016 02:20:40 -0000

Author: jhb
Date: Thu Jan 21 02:20:38 2016
New Revision: 294482
URL: https://svnweb.freebsd.org/changeset/base/294482

Log:
  AIO daemons have always been kernel processes to facilitate switching to
  user VM spaces while servicing jobs.  Update various comments and data
  structures that refer to AIO daemons as threads to refer to processes
  instead.
  
  Reviewed by:	kib
  Sponsored by:	Chelsio Communications
  Differential Revision:	https://reviews.freebsd.org/D4999

Modified:
  head/sys/kern/vfs_aio.c

Modified: head/sys/kern/vfs_aio.c
==============================================================================
--- head/sys/kern/vfs_aio.c	Thu Jan 21 01:28:31 2016	(r294481)
+++ head/sys/kern/vfs_aio.c	Thu Jan 21 02:20:38 2016	(r294482)
@@ -130,12 +130,12 @@ static SYSCTL_NODE(_vfs, OID_AUTO, aio, 
 static int max_aio_procs = MAX_AIO_PROCS;
 SYSCTL_INT(_vfs_aio, OID_AUTO, max_aio_procs,
 	CTLFLAG_RW, &max_aio_procs, 0,
-	"Maximum number of kernel threads to use for handling async IO ");
+	"Maximum number of kernel processes to use for handling async IO ");
 
 static int num_aio_procs = 0;
 SYSCTL_INT(_vfs_aio, OID_AUTO, num_aio_procs,
 	CTLFLAG_RD, &num_aio_procs, 0,
-	"Number of presently active kernel threads for async IO");
+	"Number of presently active kernel processes for async IO");
 
 /*
  * The code will adjust the actual number of AIO processes towards this
@@ -143,7 +143,7 @@ SYSCTL_INT(_vfs_aio, OID_AUTO, num_aio_p
  */
 static int target_aio_procs = TARGET_AIO_PROCS;
 SYSCTL_INT(_vfs_aio, OID_AUTO, target_aio_procs, CTLFLAG_RW, &target_aio_procs,
-	0, "Preferred number of ready kernel threads for async IO");
+	0, "Preferred number of ready kernel processes for async IO");
 
 static int max_queue_count = MAX_AIO_QUEUE;
 SYSCTL_INT(_vfs_aio, OID_AUTO, max_aio_queue, CTLFLAG_RW, &max_queue_count, 0,
@@ -157,7 +157,7 @@ static int num_buf_aio = 0;
 SYSCTL_INT(_vfs_aio, OID_AUTO, num_buf_aio, CTLFLAG_RD, &num_buf_aio, 0,
     "Number of aio requests presently handled by the buf subsystem");
 
-/* Number of async I/O thread in the process of being started */
+/* Number of async I/O processes in the process of being started */
 /* XXX This should be local to aio_aqueue() */
 static int num_aio_resv_start = 0;
 
@@ -210,8 +210,8 @@ typedef struct oaiocb {
  * Current, there is only two backends: BIO and generic file I/O.
  * socket I/O is served by generic file I/O, this is not a good idea, since
  * disk file I/O and any other types without O_NONBLOCK flag can block daemon
- * threads, if there is no thread to serve socket I/O, the socket I/O will be
- * delayed too long or starved, we should create some threads dedicated to
+ * processes, if there is no thread to serve socket I/O, the socket I/O will be
+ * delayed too long or starved, we should create some processes dedicated to
  * sockets to do non-blocking I/O, same for pipe and fifo, for these I/O
  * systems we really need non-blocking interface, fiddling O_NONBLOCK in file
  * structure is not safe because there is race between userland and aio
@@ -253,10 +253,10 @@ struct aiocblist {
  */
 #define AIOP_FREE	0x1			/* proc on free queue */
 
-struct aiothreadlist {
-	int aiothreadflags;			/* (c) AIO proc flags */
-	TAILQ_ENTRY(aiothreadlist) list;	/* (c) list of processes */
-	struct thread *aiothread;		/* (*) the AIO thread */
+struct aioproc {
+	int aioprocflags;			/* (c) AIO proc flags */
+	TAILQ_ENTRY(aioproc) list;		/* (c) list of processes */
+	struct proc *aioproc;			/* (*) the AIO proc */
 };
 
 /*
@@ -294,7 +294,7 @@ struct kaioinfo {
 	TAILQ_HEAD(,aiocblist) kaio_jobqueue;	/* (a) job queue for process */
 	TAILQ_HEAD(,aiocblist) kaio_bufqueue;	/* (a) buffer job queue for process */
 	TAILQ_HEAD(,aiocblist) kaio_syncqueue;	/* (a) queue for aio_fsync */
-	struct	task	kaio_task;	/* (*) task to kick aio threads */
+	struct	task	kaio_task;	/* (*) task to kick aio processes */
 };
 
 #define AIO_LOCK(ki)		mtx_lock(&(ki)->kaio_mtx)
@@ -319,7 +319,7 @@ struct aiocb_ops {
 	int	(*store_aiocb)(struct aiocb **ujobp, struct aiocb *ujob);
 };
 
-static TAILQ_HEAD(,aiothreadlist) aio_freeproc;		/* (c) Idle daemons */
+static TAILQ_HEAD(,aioproc) aio_freeproc;		/* (c) Idle daemons */
 static struct sema aio_newproc_sem;
 static struct mtx aio_job_mtx;
 static TAILQ_HEAD(,aiocblist) aio_jobs;			/* (c) Async job list */
@@ -357,7 +357,7 @@ static int	filt_lio(struct knote *kn, lo
 /*
  * Zones for:
  * 	kaio	Per process async io info
- *	aiop	async io thread data
+ *	aiop	async io process data
  *	aiocb	async io jobs
  *	aiol	list io job pointer - internal to aio_suspend XXX
  *	aiolio	list io jobs
@@ -483,7 +483,7 @@ aio_onceonly(void)
 	aiod_unr = new_unrhdr(1, INT_MAX, NULL);
 	kaio_zone = uma_zcreate("AIO", sizeof(struct kaioinfo), NULL, NULL,
 	    NULL, NULL, UMA_ALIGN_PTR, UMA_ZONE_NOFREE);
-	aiop_zone = uma_zcreate("AIOP", sizeof(struct aiothreadlist), NULL,
+	aiop_zone = uma_zcreate("AIOP", sizeof(struct aioproc), NULL,
 	    NULL, NULL, NULL, UMA_ALIGN_PTR, UMA_ZONE_NOFREE);
 	aiocb_zone = uma_zcreate("AIOCB", sizeof(struct aiocblist), NULL, NULL,
 	    NULL, NULL, UMA_ALIGN_PTR, UMA_ZONE_NOFREE);
@@ -796,7 +796,7 @@ restart:
  * Select a job to run (called by an AIO daemon).
  */
 static struct aiocblist *
-aio_selectjob(struct aiothreadlist *aiop)
+aio_selectjob(struct aioproc *aiop)
 {
 	struct aiocblist *aiocbe;
 	struct kaioinfo *ki;
@@ -1056,7 +1056,7 @@ static void
 aio_daemon(void *_id)
 {
 	struct aiocblist *aiocbe;
-	struct aiothreadlist *aiop;
+	struct aioproc *aiop;
 	struct kaioinfo *ki;
 	struct proc *p, *userp;
 	struct vmspace *myvm;
@@ -1078,8 +1078,8 @@ aio_daemon(void *_id)
 	 * per daemon.
 	 */
 	aiop = uma_zalloc(aiop_zone, M_WAITOK);
-	aiop->aiothread = td;
-	aiop->aiothreadflags = 0;
+	aiop->aioproc = p;
+	aiop->aioprocflags = 0;
 
 	/*
 	 * Wakeup parent process.  (Parent sleeps to keep from blasting away
@@ -1092,9 +1092,9 @@ aio_daemon(void *_id)
 		/*
 		 * Take daemon off of free queue
 		 */
-		if (aiop->aiothreadflags & AIOP_FREE) {
+		if (aiop->aioprocflags & AIOP_FREE) {
 			TAILQ_REMOVE(&aio_freeproc, aiop, list);
-			aiop->aiothreadflags &= ~AIOP_FREE;
+			aiop->aioprocflags &= ~AIOP_FREE;
 		}
 
 		/*
@@ -1155,15 +1155,15 @@ aio_daemon(void *_id)
 		mtx_assert(&aio_job_mtx, MA_OWNED);
 
 		TAILQ_INSERT_HEAD(&aio_freeproc, aiop, list);
-		aiop->aiothreadflags |= AIOP_FREE;
+		aiop->aioprocflags |= AIOP_FREE;
 
 		/*
 		 * If daemon is inactive for a long time, allow it to exit,
 		 * thereby freeing resources.
 		 */
-		if (msleep(aiop->aiothread, &aio_job_mtx, PRIBIO, "aiordy",
+		if (msleep(p, &aio_job_mtx, PRIBIO, "aiordy",
 		    aiod_lifetime) == EWOULDBLOCK && TAILQ_EMPTY(&aio_jobs) &&
-		    (aiop->aiothreadflags & AIOP_FREE) &&
+		    (aiop->aioprocflags & AIOP_FREE) &&
 		    num_aio_procs > target_aio_procs)
 			break;
 	}
@@ -1781,13 +1781,13 @@ static void
 aio_kick_nowait(struct proc *userp)
 {
 	struct kaioinfo *ki = userp->p_aioinfo;
-	struct aiothreadlist *aiop;
+	struct aioproc *aiop;
 
 	mtx_assert(&aio_job_mtx, MA_OWNED);
 	if ((aiop = TAILQ_FIRST(&aio_freeproc)) != NULL) {
 		TAILQ_REMOVE(&aio_freeproc, aiop, list);
-		aiop->aiothreadflags &= ~AIOP_FREE;
-		wakeup(aiop->aiothread);
+		aiop->aioprocflags &= ~AIOP_FREE;
+		wakeup(aiop->aioproc);
 	} else if (((num_aio_resv_start + num_aio_procs) < max_aio_procs) &&
 	    ((ki->kaio_active_count + num_aio_resv_start) <
 	    ki->kaio_maxactive_count)) {
@@ -1799,15 +1799,15 @@ static int
 aio_kick(struct proc *userp)
 {
 	struct kaioinfo *ki = userp->p_aioinfo;
-	struct aiothreadlist *aiop;
+	struct aioproc *aiop;
 	int error, ret = 0;
 
 	mtx_assert(&aio_job_mtx, MA_OWNED);
 retryproc:
 	if ((aiop = TAILQ_FIRST(&aio_freeproc)) != NULL) {
 		TAILQ_REMOVE(&aio_freeproc, aiop, list);
-		aiop->aiothreadflags &= ~AIOP_FREE;
-		wakeup(aiop->aiothread);
+		aiop->aioprocflags &= ~AIOP_FREE;
+		wakeup(aiop->aioproc);
 	} else if (((num_aio_resv_start + num_aio_procs) < max_aio_procs) &&
 	    ((ki->kaio_active_count + num_aio_resv_start) <
 	    ki->kaio_maxactive_count)) {

From owner-svn-src-all@freebsd.org  Thu Jan 21 03:05:05 2016
Return-Path: <owner-svn-src-all@freebsd.org>
Delivered-To: svn-src-all@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id 00F24A8ADC5;
 Thu, 21 Jan 2016 03:05:04 +0000 (UTC)
 (envelope-from rpokala@FreeBSD.org)
Received: from repo.freebsd.org (repo.freebsd.org
 [IPv6:2610:1c1:1:6068::e6a:0])
 (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
 (Client did not present a certificate)
 by mx1.freebsd.org (Postfix) with ESMTPS id C09BC1FD1;
 Thu, 21 Jan 2016 03:05:04 +0000 (UTC)
 (envelope-from rpokala@FreeBSD.org)
Received: from repo.freebsd.org ([127.0.1.37])
 by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u0L353lQ038646;
 Thu, 21 Jan 2016 03:05:03 GMT (envelope-from rpokala@FreeBSD.org)
Received: (from rpokala@localhost)
 by repo.freebsd.org (8.15.2/8.15.2/Submit) id u0L353GX038645;
 Thu, 21 Jan 2016 03:05:03 GMT (envelope-from rpokala@FreeBSD.org)
Message-Id: <201601210305.u0L353GX038645@repo.freebsd.org>
X-Authentication-Warning: repo.freebsd.org: rpokala set sender to
 rpokala@FreeBSD.org using -f
From: Ravi Pokala <rpokala@FreeBSD.org>
Date: Thu, 21 Jan 2016 03:05:03 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org
Subject: svn commit: r294483 - stable/10/sys/geom
X-SVN-Group: stable-10
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.20
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for &quot;
 user&quot; and &quot; projects&quot; \)" <svn-src-all.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-all/>
List-Post: <mailto:svn-src-all@freebsd.org>
List-Help: <mailto:svn-src-all-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Thu, 21 Jan 2016 03:05:05 -0000

Author: rpokala
Date: Thu Jan 21 03:05:03 2016
New Revision: 294483
URL: https://svnweb.freebsd.org/changeset/base/294483

Log:
  MFC r294042: Add rotationrate to geom disk dumpconf
  
  Parse and report the nominal rotation rate reported by the drive.
  
  Approved by:	jhb

Modified:
  stable/10/sys/geom/geom_disk.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/sys/geom/geom_disk.c
==============================================================================
--- stable/10/sys/geom/geom_disk.c	Thu Jan 21 02:20:38 2016	(r294482)
+++ stable/10/sys/geom/geom_disk.c	Thu Jan 21 03:05:03 2016	(r294483)
@@ -581,6 +581,23 @@ g_disk_dumpconf(struct sbuf *sb, const c
 		    indent, dp->d_fwheads);
 		sbuf_printf(sb, "%s<fwsectors>%u</fwsectors>\n",
 		    indent, dp->d_fwsectors);
+
+		/*
+		 * "rotationrate" is a little complicated, because the value
+		 * returned by the drive might not be the RPM; 0 and 1 are
+		 * special cases, and there's also a valid range.
+		 */
+		sbuf_printf(sb, "%s<rotationrate>", indent);
+		if (dp->d_rotation_rate == 0)		/* Old drives don't */
+			sbuf_printf(sb, "unknown");	/* report RPM. */
+		else if (dp->d_rotation_rate == 1)	/* Since 0 is used */
+			sbuf_printf(sb, "0");		/* above, SSDs use 1. */
+		else if ((dp->d_rotation_rate >= 0x041) &&
+		    (dp->d_rotation_rate <= 0xfffe))
+			sbuf_printf(sb, "%u", dp->d_rotation_rate);
+		else
+			sbuf_printf(sb, "invalid");
+		sbuf_printf(sb, "</rotationrate>\n");
 		if (dp->d_getattr != NULL) {
 			buf = g_malloc(DISK_IDENT_SIZE, M_WAITOK);
 			bp = g_alloc_bio();

From owner-svn-src-all@freebsd.org  Thu Jan 21 04:02:06 2016
Return-Path: <owner-svn-src-all@freebsd.org>
Delivered-To: svn-src-all@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id AA11AA8A492;
 Thu, 21 Jan 2016 04:02:06 +0000 (UTC) (envelope-from des@des.no)
Received: from smtp.des.no (smtp.des.no [194.63.250.102])
 by mx1.freebsd.org (Postfix) with ESMTP id 6C1BF1D31;
 Thu, 21 Jan 2016 04:02:06 +0000 (UTC) (envelope-from des@des.no)
Received: from desk.des.no (smtp.des.no [194.63.250.102])
 by smtp.des.no (Postfix) with ESMTP id 9EF795530;
 Thu, 21 Jan 2016 03:56:40 +0000 (UTC)
Received: by desk.des.no (Postfix, from userid 1001)
 id 827A948213; Thu, 21 Jan 2016 04:56:40 +0100 (CET)
From: =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= <des@des.no>
To: Gleb Smirnoff <glebius@FreeBSD.org>
Cc: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-head@freebsd.org
Subject: Re: svn commit: r294328 - in head: crypto/openssh
 crypto/openssh/contrib/caldera crypto/openssh/contrib/cygwin
 crypto/openssh/contrib/redhat crypto/openssh/contrib/suse
 crypto/openssh/openbsd-compat cr...
References: <201601191618.u0JGIQae049491@repo.freebsd.org>
 <20160120215357.GH1444@FreeBSD.org>
Date: Thu, 21 Jan 2016 04:56:40 +0100
In-Reply-To: <20160120215357.GH1444@FreeBSD.org> (Gleb Smirnoff's message of
 "Wed, 20 Jan 2016 13:53:57 -0800")
Message-ID: <86wpr3bn5z.fsf@desk.des.no>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (berkeley-unix)
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.20
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for &quot;
 user&quot; and &quot; projects&quot; \)" <svn-src-all.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-all/>
List-Post: <mailto:svn-src-all@freebsd.org>
List-Help: <mailto:svn-src-all-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Thu, 21 Jan 2016 04:02:06 -0000

Gleb Smirnoff <glebius@FreeBSD.org> writes:
> Dag-Erling Sm=C3=B8rgrav <des@des.no> writes:
> > Log:
> >   Upgrade to OpenSSH 6.7p1 [...]
> 6.7p1? This looks like typo.

I'm doing this one release at a time to minimize the amount of conflicts
I have to deal with and to get a better sense of what has changed from
one version to the next, especially since some of those changes break
POLA and need to be dealt with in various ways.  If we were using git, I
could have done everything on a branch and merged it once I had reached
7.1p2, but that's not really feasible with svn.

DES
--=20
Dag-Erling Sm=C3=B8rgrav - des@des.no

From owner-svn-src-all@freebsd.org  Thu Jan 21 04:37:17 2016
Return-Path: <owner-svn-src-all@freebsd.org>
Delivered-To: svn-src-all@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id EB6C7A8AEC1;
 Thu, 21 Jan 2016 04:37:17 +0000 (UTC)
 (envelope-from jamie@FreeBSD.org)
Received: from repo.freebsd.org (repo.freebsd.org
 [IPv6:2610:1c1:1:6068::e6a:0])
 (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
 (Client did not present a certificate)
 by mx1.freebsd.org (Postfix) with ESMTPS id A1D591A55;
 Thu, 21 Jan 2016 04:37:17 +0000 (UTC)
 (envelope-from jamie@FreeBSD.org)
Received: from repo.freebsd.org ([127.0.1.37])
 by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u0L4bG71065659;
 Thu, 21 Jan 2016 04:37:16 GMT (envelope-from jamie@FreeBSD.org)
Received: (from jamie@localhost)
 by repo.freebsd.org (8.15.2/8.15.2/Submit) id u0L4bGxX065657;
 Thu, 21 Jan 2016 04:37:16 GMT (envelope-from jamie@FreeBSD.org)
Message-Id: <201601210437.u0L4bGxX065657@repo.freebsd.org>
X-Authentication-Warning: repo.freebsd.org: jamie set sender to
 jamie@FreeBSD.org using -f
From: Jamie Gritton <jamie@FreeBSD.org>
Date: Thu, 21 Jan 2016 04:37:16 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org
Subject: svn commit: r294484 - stable/10/usr.sbin/jail
X-SVN-Group: stable-10
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.20
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for &quot;
 user&quot; and &quot; projects&quot; \)" <svn-src-all.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-all/>
List-Post: <mailto:svn-src-all@freebsd.org>
List-Help: <mailto:svn-src-all-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Thu, 21 Jan 2016 04:37:18 -0000

Author: jamie
Date: Thu Jan 21 04:37:16 2016
New Revision: 294484
URL: https://svnweb.freebsd.org/changeset/base/294484

Log:
  MFC r294183:
  
    Clear errno before calling getpw*.
  
  MFC r294196:
  
    Don't bother checking an ip[46].addr netmask/prefixlen.  This is already
    handled by ifconfig, and it was doing it wrong when the paramater included
    extra ifconfig options.
  
  PR:		205926

Modified:
  stable/10/usr.sbin/jail/command.c
  stable/10/usr.sbin/jail/config.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/usr.sbin/jail/command.c
==============================================================================
--- stable/10/usr.sbin/jail/command.c	Thu Jan 21 03:05:03 2016	(r294483)
+++ stable/10/usr.sbin/jail/command.c	Thu Jan 21 04:37:16 2016	(r294484)
@@ -878,6 +878,7 @@ get_user_info(struct cfjail *j, const ch
 {
 	const struct passwd *pwd;
 
+	errno = 0;
 	*pwdp = pwd = username ? getpwnam(username) : getpwuid(getuid());
 	if (pwd == NULL) {
 		if (errno)

Modified: stable/10/usr.sbin/jail/config.c
==============================================================================
--- stable/10/usr.sbin/jail/config.c	Thu Jan 21 03:05:03 2016	(r294483)
+++ stable/10/usr.sbin/jail/config.c	Thu Jan 21 04:37:16 2016	(r294484)
@@ -454,7 +454,7 @@ check_intparams(struct cfjail *j)
 	struct addrinfo hints;
 	struct addrinfo *ai0, *ai;
 	const char *hostname;
-	int gicode, defif, prefix;
+	int gicode, defif;
 #endif
 #ifdef INET
 	struct in_addr addr4;
@@ -597,15 +597,7 @@ check_intparams(struct cfjail *j)
 				strcpy(s->s, cs + 1);
 				s->len -= cs + 1 - s->s;
 			}
-			if ((cs = strchr(s->s, '/'))) {
-				prefix = strtol(cs + 1, &ep, 10);
-				if (*ep == '.'
-				    ? inet_pton(AF_INET, cs + 1, &addr4) != 1
-				    : *ep || prefix < 0 || prefix > 32) {
-					jail_warnx(j,
-					    "ip4.addr: bad netmask \"%s\"", cs);
-					error = -1;	
-				}
+			if ((cs = strchr(s->s, '/')) != NULL) {
 				*cs = '\0';
 				s->len = cs - s->s;
 			}
@@ -626,14 +618,7 @@ check_intparams(struct cfjail *j)
 				strcpy(s->s, cs + 1);
 				s->len -= cs + 1 - s->s;
 			}
-			if ((cs = strchr(s->s, '/'))) {
-				prefix = strtol(cs + 1, &ep, 10);
-				if (*ep || prefix < 0 || prefix > 128) {
-					jail_warnx(j,
-					    "ip6.addr: bad prefixlen \"%s\"",
-					    cs);
-					error = -1;	
-				}
+			if ((cs = strchr(s->s, '/')) != NULL) {
 				*cs = '\0';
 				s->len = cs - s->s;
 			}

From owner-svn-src-all@freebsd.org  Thu Jan 21 05:57:33 2016
Return-Path: <owner-svn-src-all@freebsd.org>
Delivered-To: svn-src-all@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9A200A8A7A7;
 Thu, 21 Jan 2016 05:57:33 +0000 (UTC)
 (envelope-from ngie@FreeBSD.org)
Received: from repo.freebsd.org (repo.freebsd.org
 [IPv6:2610:1c1:1:6068::e6a:0])
 (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
 (Client did not present a certificate)
 by mx1.freebsd.org (Postfix) with ESMTPS id 6D6A21BD5;
 Thu, 21 Jan 2016 05:57:33 +0000 (UTC)
 (envelope-from ngie@FreeBSD.org)
Received: from repo.freebsd.org ([127.0.1.37])
 by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u0L5vWYv088867;
 Thu, 21 Jan 2016 05:57:32 GMT (envelope-from ngie@FreeBSD.org)
Received: (from ngie@localhost)
 by repo.freebsd.org (8.15.2/8.15.2/Submit) id u0L5vWEL088865;
 Thu, 21 Jan 2016 05:57:32 GMT (envelope-from ngie@FreeBSD.org)
Message-Id: <201601210557.u0L5vWEL088865@repo.freebsd.org>
X-Authentication-Warning: repo.freebsd.org: ngie set sender to
 ngie@FreeBSD.org using -f
From: Garrett Cooper <ngie@FreeBSD.org>
Date: Thu, 21 Jan 2016 05:57:32 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org
Subject: svn commit: r294485 - stable/10/tools/regression/sockets/zerosend
X-SVN-Group: stable-10
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.20
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for &quot;
 user&quot; and &quot; projects&quot; \)" <svn-src-all.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-all/>
List-Post: <mailto:svn-src-all@freebsd.org>
List-Help: <mailto:svn-src-all-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Thu, 21 Jan 2016 05:57:33 -0000

Author: ngie
Date: Thu Jan 21 05:57:32 2016
New Revision: 294485
URL: https://svnweb.freebsd.org/changeset/base/294485

Log:
  MFC r294127:
  
  Fix warnings with clang/gcc
  
  - Get rid of unused argc/argv variables in main
  - Exit on failure with a return code of 1 instead of -1 with err/errx as a
    return code of -1 is implementation dependent
  - Bump WARNS to 6

Modified:
  stable/10/tools/regression/sockets/zerosend/Makefile
  stable/10/tools/regression/sockets/zerosend/zerosend.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/tools/regression/sockets/zerosend/Makefile
==============================================================================
--- stable/10/tools/regression/sockets/zerosend/Makefile	Thu Jan 21 04:37:16 2016	(r294484)
+++ stable/10/tools/regression/sockets/zerosend/Makefile	Thu Jan 21 05:57:32 2016	(r294485)
@@ -2,6 +2,6 @@
 
 PROG=	zerosend
 MAN=
-WARNS?=	2
+WARNS?=	6
 
 .include <bsd.prog.mk>

Modified: stable/10/tools/regression/sockets/zerosend/zerosend.c
==============================================================================
--- stable/10/tools/regression/sockets/zerosend/zerosend.c	Thu Jan 21 04:37:16 2016	(r294484)
+++ stable/10/tools/regression/sockets/zerosend/zerosend.c	Thu Jan 21 05:57:32 2016	(r294485)
@@ -54,9 +54,9 @@ try_0send(const char *test, int fd)
 	ch = 0;
 	len = send(fd, &ch, 0, 0);
 	if (len < 0)
-		err(-1, "%s: try_0send", test);
+		err(1, "%s: try_0send", test);
 	if (len != 0)
-		errx(-1, "%s: try_0send: returned %zd", test, len);
+		errx(1, "%s: try_0send: returned %zd", test, len);
 }
 
 static void
@@ -68,9 +68,9 @@ try_0write(const char *test, int fd)
 	ch = 0;
 	len = write(fd, &ch, 0);
 	if (len < 0)
-		err(-1, "%s: try_0write", test);
+		err(1, "%s: try_0write", test);
 	if (len != 0)
-		errx(-1, "%s: try_0write: returned %zd", test, len);
+		errx(1, "%s: try_0write: returned %zd", test, len);
 }
 
 static void
@@ -87,24 +87,24 @@ setup_udp(const char *test, int *fdp)
 	sin.sin_port = htons(PORT1);
 	sock1 = socket(PF_INET, SOCK_DGRAM, 0);
 	if (sock1 < 0)
-		err(-1, "%s: setup_udp: socket", test);
+		err(1, "%s: setup_udp: socket", test);
 	if (bind(sock1, (struct sockaddr *)&sin, sizeof(sin)) < 0)
-		err(-1, "%s: setup_udp: bind(%s, %d)", test,
+		err(1, "%s: setup_udp: bind(%s, %d)", test,
 		    inet_ntoa(sin.sin_addr), PORT1);
 	sin.sin_port = htons(PORT2);
 	if (connect(sock1, (struct sockaddr *)&sin, sizeof(sin)) < 0)
-		err(-1, "%s: setup_udp: connect(%s, %d)", test,
+		err(1, "%s: setup_udp: connect(%s, %d)", test,
 		    inet_ntoa(sin.sin_addr), PORT2);
 
 	sock2 = socket(PF_INET, SOCK_DGRAM, 0);
 	if (sock2 < 0)
-		err(-1, "%s: setup_udp: socket", test);
+		err(1, "%s: setup_udp: socket", test);
 	if (bind(sock2, (struct sockaddr *)&sin, sizeof(sin)) < 0)
-		err(-1, "%s: setup_udp: bind(%s, %d)", test,
+		err(1, "%s: setup_udp: bind(%s, %d)", test,
 		    inet_ntoa(sin.sin_addr), PORT2);
 	sin.sin_port = htons(PORT1);
 	if (connect(sock2, (struct sockaddr *)&sin, sizeof(sin)) < 0)
-		err(-1, "%s: setup_udp: connect(%s, %d)", test,
+		err(1, "%s: setup_udp: connect(%s, %d)", test,
 		    inet_ntoa(sin.sin_addr), PORT1);
 
 	fdp[0] = sock1;
@@ -130,12 +130,12 @@ setup_tcp(const char *test, int *fdp)
 	sin.sin_port = htons(PORT1);
 	sock1 = socket(PF_INET, SOCK_STREAM, 0);
 	if (sock1 < 0)
-		err(-1, "%s: setup_tcp: socket", test);
+		err(1, "%s: setup_tcp: socket", test);
 	if (bind(sock1, (struct sockaddr *)&sin, sizeof(sin)) < 0)
-		err(-1, "%s: bind(%s, %d)", test, inet_ntoa(sin.sin_addr),
+		err(1, "%s: bind(%s, %d)", test, inet_ntoa(sin.sin_addr),
 		    PORT1);
 	if (listen(sock1, -1) < 0)
-		err(-1, "%s: listen", test);
+		err(1, "%s: listen", test);
 
 	/*
 	 * Now connect to it, non-blocking so that we don't deadlock against
@@ -143,25 +143,25 @@ setup_tcp(const char *test, int *fdp)
 	 */
 	sock2 = socket(PF_INET, SOCK_STREAM, 0);
 	if (sock2 < 0)
-		err(-1, "%s: setup_tcp: socket", test);
+		err(1, "%s: setup_tcp: socket", test);
 	if (fcntl(sock2, F_SETFL, O_NONBLOCK) < 0)
-		err(-1, "%s: setup_tcp: fcntl(O_NONBLOCK)", test);
+		err(1, "%s: setup_tcp: fcntl(O_NONBLOCK)", test);
 	if (connect(sock2, (struct sockaddr *)&sin, sizeof(sin)) < 0 &&
 	    errno != EINPROGRESS)
-		err(-1, "%s: setup_tcp: connect(%s, %d)", test,
+		err(1, "%s: setup_tcp: connect(%s, %d)", test,
 		    inet_ntoa(sin.sin_addr), PORT1);
 
 	/*
 	 * Now pick up the connection after sleeping a moment to make sure
 	 * there's been time for some packets to go back and forth.
 	 */
-	if (sleep(1) < 0)
-		err(-1, "%s: sleep(1)", test);
+	if (sleep(1) != 0)
+		err(1, "%s: sleep(1)", test);
 	sock3 = accept(sock1, NULL, NULL);
 	if (sock3 < 0)
-		err(-1, "%s: accept", test);
-	if (sleep(1) < 0)
-		err(-1, "%s: sleep(1)", test);
+		err(1, "%s: accept", test);
+	if (sleep(1) != 0)
+		err(1, "%s: sleep(1)", test);
 
 	FD_ZERO(&writefds);
 	FD_SET(sock2, &writefds);
@@ -171,11 +171,11 @@ setup_tcp(const char *test, int *fdp)
 	tv.tv_usec = 0;
 	ret = select(sock2 + 1, NULL, &writefds, &exceptfds, &tv);
 	if (ret < 0)
-		err(-1, "%s: setup_tcp: select", test);
+		err(1, "%s: setup_tcp: select", test);
 	if (FD_ISSET(sock2, &exceptfds))
-		errx(-1, "%s: setup_tcp: select: exception", test);
+		errx(1, "%s: setup_tcp: select: exception", test);
 	if (!FD_ISSET(sock2, &writefds))
-		errx(-1, "%s: setup_tcp: select: not writable", test);
+		errx(1, "%s: setup_tcp: select: not writable", test);
 
 	close(sock1);
 	fdp[0] = sock2;
@@ -187,7 +187,7 @@ setup_udsstream(const char *test, int *f
 {
 
 	if (socketpair(PF_LOCAL, SOCK_STREAM, 0, fdp) < 0)
-		err(-1, "%s: setup_udsstream: socketpair", test);
+		err(1, "%s: setup_udsstream: socketpair", test);
 }
 
 static void
@@ -195,7 +195,7 @@ setup_udsdgram(const char *test, int *fd
 {
 
 	if (socketpair(PF_LOCAL, SOCK_DGRAM, 0, fdp) < 0)
-		err(-1, "%s: setup_udsdgram: socketpair", test);
+		err(1, "%s: setup_udsdgram: socketpair", test);
 }
 
 static void
@@ -203,7 +203,7 @@ setup_pipe(const char *test, int *fdp)
 {
 
 	if (pipe(fdp) < 0)
-		err(-1, "%s: setup_pipe: pipe", test);
+		err(1, "%s: setup_pipe: pipe", test);
 }
 
 static void
@@ -213,19 +213,19 @@ setup_fifo(const char *test, int *fdp)
 	int fd1, fd2;
 
 	if (mkstemp(path) == -1)
-		err(-1, "%s: setup_fifo: mktemp", test);
+		err(1, "%s: setup_fifo: mktemp", test);
 	unlink(path);
 
 	if (mkfifo(path, 0600) < 0)
-		err(-1, "%s: setup_fifo: mkfifo(%s)", test, path);
+		err(1, "%s: setup_fifo: mkfifo(%s)", test, path);
 
 	fd1 = open(path, O_RDONLY | O_NONBLOCK);
 	if (fd1 < 0)
-		err(-1, "%s: setup_fifo: open(%s, O_RDONLY)", test, path);
+		err(1, "%s: setup_fifo: open(%s, O_RDONLY)", test, path);
 
 	fd2 = open(path, O_WRONLY | O_NONBLOCK);
 	if (fd2 < 0)
-		err(-1, "%s: setup_fifo: open(%s, O_WRONLY)", test, path);
+		err(1, "%s: setup_fifo: open(%s, O_WRONLY)", test, path);
 
 	fdp[0] = fd2;
 	fdp[1] = fd1;
@@ -242,7 +242,7 @@ close_both(int *fdp)
 }
 
 int
-main(int argc, char *argv[])
+main(void)
 {
 	int fd[2];
 

From owner-svn-src-all@freebsd.org  Thu Jan 21 05:59:35 2016
Return-Path: <owner-svn-src-all@freebsd.org>
Delivered-To: svn-src-all@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1CD77A8A882;
 Thu, 21 Jan 2016 05:59:35 +0000 (UTC)
 (envelope-from ngie@FreeBSD.org)
Received: from repo.freebsd.org (repo.freebsd.org
 [IPv6:2610:1c1:1:6068::e6a:0])
 (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
 (Client did not present a certificate)
 by mx1.freebsd.org (Postfix) with ESMTPS id C458D1D44;
 Thu, 21 Jan 2016 05:59:34 +0000 (UTC)
 (envelope-from ngie@FreeBSD.org)
Received: from repo.freebsd.org ([127.0.1.37])
 by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u0L5xXEE089022;
 Thu, 21 Jan 2016 05:59:33 GMT (envelope-from ngie@FreeBSD.org)
Received: (from ngie@localhost)
 by repo.freebsd.org (8.15.2/8.15.2/Submit) id u0L5xXka089020;
 Thu, 21 Jan 2016 05:59:33 GMT (envelope-from ngie@FreeBSD.org)
Message-Id: <201601210559.u0L5xXka089020@repo.freebsd.org>
X-Authentication-Warning: repo.freebsd.org: ngie set sender to
 ngie@FreeBSD.org using -f
From: Garrett Cooper <ngie@FreeBSD.org>
Date: Thu, 21 Jan 2016 05:59:33 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org
Subject: svn commit: r294486 - in stable/10/tools/regression/sockets:
 reconnect sendfile
X-SVN-Group: stable-10
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.20
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for &quot;
 user&quot; and &quot; projects&quot; \)" <svn-src-all.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-all/>
List-Post: <mailto:svn-src-all@freebsd.org>
List-Help: <mailto:svn-src-all-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Thu, 21 Jan 2016 05:59:35 -0000

Author: ngie
Date: Thu Jan 21 05:59:33 2016
New Revision: 294486
URL: https://svnweb.freebsd.org/changeset/base/294486

Log:
  MFC r294126:
  
  Fix warnings with gcc 5.0
  
  reconnect.c:
  - Convert the K&R prototype of main to an ANSI prototype to mute a
    warning from gcc 4.2.1
  - Close s_sock2 after finishing off the last test to plug a leak and
    mute a warning from gcc 5.0 about a -Wunused-but-set variable
  
  sendfile.c:
  - Fix a -Wunused-but-set warning with gcc 5.0 with pagesize in main(..)

Modified:
  stable/10/tools/regression/sockets/reconnect/reconnect.c
  stable/10/tools/regression/sockets/sendfile/sendfile.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/tools/regression/sockets/reconnect/reconnect.c
==============================================================================
--- stable/10/tools/regression/sockets/reconnect/reconnect.c	Thu Jan 21 05:57:32 2016	(r294485)
+++ stable/10/tools/regression/sockets/reconnect/reconnect.c	Thu Jan 21 05:59:33 2016	(r294486)
@@ -104,7 +104,7 @@ cleanup(void)
 }
 
 int
-main()
+main(void)
 {
     int s_sock1, s_sock2, c_sock;
 
@@ -127,6 +127,7 @@ main()
     connect_uds_server(c_sock, uds_name1);
     close(s_sock1);
     connect_uds_server(c_sock, uds_name2);
+    close(s_sock2);
 
     exit (0);
 }

Modified: stable/10/tools/regression/sockets/sendfile/sendfile.c
==============================================================================
--- stable/10/tools/regression/sockets/sendfile/sendfile.c	Thu Jan 21 05:57:32 2016	(r294485)
+++ stable/10/tools/regression/sockets/sendfile/sendfile.c	Thu Jan 21 05:59:33 2016	(r294486)
@@ -459,12 +459,9 @@ cleanup(void)
 int
 main(int argc, char *argv[])
 {
-	int pagesize;
 
 	path[0] = '\0';
 
-	pagesize = getpagesize();
-
 	if (argc == 1) {
 		snprintf(path, sizeof(path), "sendfile.XXXXXXXXXXXX");
 		file_fd = mkstemp(path);

From owner-svn-src-all@freebsd.org  Thu Jan 21 07:54:06 2016
Return-Path: <owner-svn-src-all@freebsd.org>
Delivered-To: svn-src-all@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id 74110A8A6EF;
 Thu, 21 Jan 2016 07:54:06 +0000 (UTC)
 (envelope-from glebius@FreeBSD.org)
Received: from repo.freebsd.org (repo.freebsd.org
 [IPv6:2610:1c1:1:6068::e6a:0])
 (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
 (Client did not present a certificate)
 by mx1.freebsd.org (Postfix) with ESMTPS id 3F24D115B;
 Thu, 21 Jan 2016 07:54:06 +0000 (UTC)
 (envelope-from glebius@FreeBSD.org)
Received: from repo.freebsd.org ([127.0.1.37])
 by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u0L7s5Og023920;
 Thu, 21 Jan 2016 07:54:05 GMT (envelope-from glebius@FreeBSD.org)
Received: (from glebius@localhost)
 by repo.freebsd.org (8.15.2/8.15.2/Submit) id u0L7s535023919;
 Thu, 21 Jan 2016 07:54:05 GMT (envelope-from glebius@FreeBSD.org)
Message-Id: <201601210754.u0L7s535023919@repo.freebsd.org>
X-Authentication-Warning: repo.freebsd.org: glebius set sender to
 glebius@FreeBSD.org using -f
From: Gleb Smirnoff <glebius@FreeBSD.org>
Date: Thu, 21 Jan 2016 07:54:05 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-head@freebsd.org
Subject: svn commit: r294487 - head
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.20
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for &quot;
 user&quot; and &quot; projects&quot; \)" <svn-src-all.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-all/>
List-Post: <mailto:svn-src-all@freebsd.org>
List-Help: <mailto:svn-src-all-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Thu, 21 Jan 2016 07:54:06 -0000

Author: glebius
Date: Thu Jan 21 07:54:05 2016
New Revision: 294487
URL: https://svnweb.freebsd.org/changeset/base/294487

Log:
  Note that new ssh(1) doesn't allow to use DSA keys by default.

Modified:
  head/UPDATING

Modified: head/UPDATING
==============================================================================
--- head/UPDATING	Thu Jan 21 05:59:33 2016	(r294486)
+++ head/UPDATING	Thu Jan 21 07:54:05 2016	(r294487)
@@ -32,6 +32,10 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 11
 	"ln -s 'abort:false,junk:false' /etc/malloc.conf".)
 
 20160119:
+	The default configuration of ssh(1) no longer allows to use ssh-dss
+	keys.  To enable using them, add 'ssh-dss' to PubkeyAcceptedKeyTypes
+	option in the /etc/ssh/ssh_config.  Refer to ssh_config(5) for more
+	information.
 	The NONE and HPN patches has been removed from OpenSSH.  They are
 	still available in the security/openssh-portable port.
 

From owner-svn-src-all@freebsd.org  Thu Jan 21 08:24:56 2016
Return-Path: <owner-svn-src-all@freebsd.org>
Delivered-To: svn-src-all@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3A8AEA8B5A4;
 Thu, 21 Jan 2016 08:24:56 +0000 (UTC)
 (envelope-from dumbbell@FreeBSD.org)
Received: from repo.freebsd.org (repo.freebsd.org
 [IPv6:2610:1c1:1:6068::e6a:0])
 (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
 (Client did not present a certificate)
 by mx1.freebsd.org (Postfix) with ESMTPS id 0D3671110;
 Thu, 21 Jan 2016 08:24:55 +0000 (UTC)
 (envelope-from dumbbell@FreeBSD.org)
Received: from repo.freebsd.org ([127.0.1.37])
 by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u0L8OtUG032589;
 Thu, 21 Jan 2016 08:24:55 GMT (envelope-from dumbbell@FreeBSD.org)
Received: (from dumbbell@localhost)
 by repo.freebsd.org (8.15.2/8.15.2/Submit) id u0L8Ot4Z032588;
 Thu, 21 Jan 2016 08:24:55 GMT (envelope-from dumbbell@FreeBSD.org)
Message-Id: <201601210824.u0L8Ot4Z032588@repo.freebsd.org>
X-Authentication-Warning: repo.freebsd.org: dumbbell set sender to
 dumbbell@FreeBSD.org using -f
From: =?UTF-8?Q?Jean-S=c3=a9bastien_P=c3=a9dron?= <dumbbell@FreeBSD.org>
Date: Thu, 21 Jan 2016 08:24:55 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org
Subject: svn commit: r294489 - stable/10/sys/dev/iicbus
X-SVN-Group: stable-10
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.20
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for &quot;
 user&quot; and &quot; projects&quot; \)" <svn-src-all.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-all/>
List-Post: <mailto:svn-src-all@freebsd.org>
List-Help: <mailto:svn-src-all-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Thu, 21 Jan 2016 08:24:56 -0000

Author: dumbbell
Date: Thu Jan 21 08:24:54 2016
New Revision: 294489
URL: https://svnweb.freebsd.org/changeset/base/294489

Log:
  iicbus: Remove trailing whitespaces
  
  MFC of:		r289656

Modified:
  stable/10/sys/dev/iicbus/iicbus.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/sys/dev/iicbus/iicbus.c
==============================================================================
--- stable/10/sys/dev/iicbus/iicbus.c	Thu Jan 21 07:59:43 2016	(r294488)
+++ stable/10/sys/dev/iicbus/iicbus.c	Thu Jan 21 08:24:54 2016	(r294489)
@@ -39,7 +39,7 @@ __FBSDID("$FreeBSD$");
 #include <sys/module.h>
 #include <sys/mutex.h>
 #include <sys/sysctl.h>
-#include <sys/bus.h> 
+#include <sys/bus.h>
 
 #include <dev/iicbus/iiconf.h>
 #include <dev/iicbus/iicbus.h>
@@ -60,7 +60,7 @@ iicbus_probe(device_t dev)
 }
 
 #if SCAN_IICBUS
-static int 
+static int
 iic_probe_device(device_t dev, u_char addr)
 {
 	int count;
@@ -126,7 +126,7 @@ iicbus_attach(device_t dev)
 	bus_generic_attach(dev);
         return (0);
 }
-  
+
 static int
 iicbus_detach(device_t dev)
 {
@@ -137,7 +137,7 @@ iicbus_detach(device_t dev)
 	mtx_destroy(&sc->lock);
 	return (0);
 }
-  
+
 static int
 iicbus_print_child(device_t dev, device_t child)
 {

From owner-svn-src-all@freebsd.org  Thu Jan 21 08:32:13 2016
Return-Path: <owner-svn-src-all@freebsd.org>
Delivered-To: svn-src-all@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id 58D65A8B9CB;
 Thu, 21 Jan 2016 08:32:13 +0000 (UTC)
 (envelope-from dumbbell@FreeBSD.org)
Received: from repo.freebsd.org (repo.freebsd.org
 [IPv6:2610:1c1:1:6068::e6a:0])
 (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
 (Client did not present a certificate)
 by mx1.freebsd.org (Postfix) with ESMTPS id 2DD6115CA;
 Thu, 21 Jan 2016 08:32:13 +0000 (UTC)
 (envelope-from dumbbell@FreeBSD.org)
Received: from repo.freebsd.org ([127.0.1.37])
 by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u0L8WCQB035428;
 Thu, 21 Jan 2016 08:32:12 GMT (envelope-from dumbbell@FreeBSD.org)
Received: (from dumbbell@localhost)
 by repo.freebsd.org (8.15.2/8.15.2/Submit) id u0L8WBJU035424;
 Thu, 21 Jan 2016 08:32:11 GMT (envelope-from dumbbell@FreeBSD.org)
Message-Id: <201601210832.u0L8WBJU035424@repo.freebsd.org>
X-Authentication-Warning: repo.freebsd.org: dumbbell set sender to
 dumbbell@FreeBSD.org using -f
From: =?UTF-8?Q?Jean-S=c3=a9bastien_P=c3=a9dron?= <dumbbell@FreeBSD.org>
Date: Thu, 21 Jan 2016 08:32:11 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org
Subject: svn commit: r294490 - stable/10/sys/dev/iicbus
X-SVN-Group: stable-10
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.20
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for &quot;
 user&quot; and &quot; projects&quot; \)" <svn-src-all.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-all/>
List-Post: <mailto:svn-src-all@freebsd.org>
List-Help: <mailto:svn-src-all-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Thu, 21 Jan 2016 08:32:13 -0000

Author: dumbbell
Date: Thu Jan 21 08:32:11 2016
New Revision: 294490
URL: https://svnweb.freebsd.org/changeset/base/294490

Log:
  iicbus: Use device_delete_children() instead of explicit child removal
  
  If the bus is detached and deleted by a call to device_delete_child() or
  device_delete_children() on a device higher in the tree, I²C children
  were already detached and deleted. So the device_t pointer stored in sc
  points to freed memory: we must not try to delete it again.
  
  By using device_delete_children(), we let subr_bus.c figure out if there
  are children to take care of.
  
  While here, make sure iicbus_detach() and iicoc_detach() call
  device_delete_children() too, to be safe.
  
  Reviewed by:	jhb, imp
  Approved by:	jhb, imp
  Differential Revision:	https://reviews.freebsd.org/D3926

Modified:
  stable/10/sys/dev/iicbus/iicbb.c
  stable/10/sys/dev/iicbus/iicbus.c
  stable/10/sys/dev/iicbus/iicoc.c
  stable/10/sys/dev/iicbus/iicsmb.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/sys/dev/iicbus/iicbb.c
==============================================================================
--- stable/10/sys/dev/iicbus/iicbb.c	Thu Jan 21 08:24:54 2016	(r294489)
+++ stable/10/sys/dev/iicbus/iicbb.c	Thu Jan 21 08:32:11 2016	(r294490)
@@ -149,22 +149,9 @@ iicbb_attach(device_t dev)
 static int
 iicbb_detach(device_t dev)
 {
-	struct iicbb_softc *sc = (struct iicbb_softc *)device_get_softc(dev);
-	device_t child;
 
-	/*
-	 * We need to save child because the detach indirectly causes
-	 * sc->iicbus to be zeroed.  Since we added the device
-	 * unconditionally in iicbb_attach, we need to make sure we
-	 * delete it here.  See iicbb_child_detached.  We need that
-	 * callback in case newbus detached our children w/o detaching
-	 * us (say iicbus is a module and unloaded w/o iicbb being
-	 * unloaded).
-	 */
-	child = sc->iicbus;
 	bus_generic_detach(dev);
-	if (child)
-		device_delete_child(dev, child);
+	device_delete_children(dev);
 
 	return (0);
 }

Modified: stable/10/sys/dev/iicbus/iicbus.c
==============================================================================
--- stable/10/sys/dev/iicbus/iicbus.c	Thu Jan 21 08:24:54 2016	(r294489)
+++ stable/10/sys/dev/iicbus/iicbus.c	Thu Jan 21 08:32:11 2016	(r294490)
@@ -134,6 +134,7 @@ iicbus_detach(device_t dev)
 
 	iicbus_reset(dev, IIC_FASTEST, 0, NULL);
 	bus_generic_detach(dev);
+	device_delete_children(dev);
 	mtx_destroy(&sc->lock);
 	return (0);
 }

Modified: stable/10/sys/dev/iicbus/iicoc.c
==============================================================================
--- stable/10/sys/dev/iicbus/iicoc.c	Thu Jan 21 08:24:54 2016	(r294489)
+++ stable/10/sys/dev/iicbus/iicoc.c	Thu Jan 21 08:32:11 2016	(r294490)
@@ -229,6 +229,7 @@ static int
 iicoc_detach(device_t dev)
 {
 	bus_generic_detach(dev);
+	device_delete_children(dev);
 
 	return (0);
 }

Modified: stable/10/sys/dev/iicbus/iicsmb.c
==============================================================================
--- stable/10/sys/dev/iicbus/iicsmb.c	Thu Jan 21 08:24:54 2016	(r294489)
+++ stable/10/sys/dev/iicbus/iicsmb.c	Thu Jan 21 08:32:11 2016	(r294490)
@@ -167,11 +167,9 @@ static int
 iicsmb_detach(device_t dev)
 {
 	struct iicsmb_softc *sc = (struct iicsmb_softc *)device_get_softc(dev);
-	
+
 	bus_generic_detach(dev);
-	if (sc->smbus) {
-		device_delete_child(dev, sc->smbus);
-	}
+	device_delete_children(dev);
 	mtx_destroy(&sc->lock);
 
 	return (0);

From owner-svn-src-all@freebsd.org  Thu Jan 21 08:50:57 2016
Return-Path: <owner-svn-src-all@freebsd.org>
Delivered-To: svn-src-all@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id B70C6A8BE0F;
 Thu, 21 Jan 2016 08:50:57 +0000 (UTC)
 (envelope-from delphij@FreeBSD.org)
Received: from repo.freebsd.org (repo.freebsd.org
 [IPv6:2610:1c1:1:6068::e6a:0])
 (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
 (Client did not present a certificate)
 by mx1.freebsd.org (Postfix) with ESMTPS id 813DF1BD8;
 Thu, 21 Jan 2016 08:50:57 +0000 (UTC)
 (envelope-from delphij@FreeBSD.org)
Received: from repo.freebsd.org ([127.0.1.37])
 by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u0L8ouoG038705;
 Thu, 21 Jan 2016 08:50:56 GMT (envelope-from delphij@FreeBSD.org)
Received: (from delphij@localhost)
 by repo.freebsd.org (8.15.2/8.15.2/Submit) id u0L8ouF2038702;
 Thu, 21 Jan 2016 08:50:56 GMT (envelope-from delphij@FreeBSD.org)
Message-Id: <201601210850.u0L8ouF2038702@repo.freebsd.org>
X-Authentication-Warning: repo.freebsd.org: delphij set sender to
 delphij@FreeBSD.org using -f
From: Xin LI <delphij@FreeBSD.org>
Date: Thu, 21 Jan 2016 08:50:56 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-vendor@freebsd.org
Subject: svn commit: r294491 - in vendor/ntp/dist: . html include libntp ntpd
 ntpdc ntpq ntpsnmpd scripts scripts/calc_tickadj scripts/ntp-wait
 scripts/ntpsweep scripts/ntptrace scripts/update-leap sntp snt...
X-SVN-Group: vendor
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.20
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for &quot;
 user&quot; and &quot; projects&quot; \)" <svn-src-all.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-all/>
List-Post: <mailto:svn-src-all@freebsd.org>
List-Help: <mailto:svn-src-all-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Thu, 21 Jan 2016 08:50:57 -0000

Author: delphij
Date: Thu Jan 21 08:50:56 2016
New Revision: 294491
URL: https://svnweb.freebsd.org/changeset/base/294491

Log:
  Vendor import of ntp-4.2.8p6.

Added:
  vendor/ntp/dist/include/ntp_keyacc.h
  vendor/ntp/dist/libntp/is_ip_address.c
Modified:
  vendor/ntp/dist/ChangeLog
  vendor/ntp/dist/CommitLog
  vendor/ntp/dist/NEWS
  vendor/ntp/dist/configure
  vendor/ntp/dist/html/miscopt.html
  vendor/ntp/dist/include/Makefile.am
  vendor/ntp/dist/include/Makefile.in
  vendor/ntp/dist/include/ntp.h
  vendor/ntp/dist/include/ntp_io.h
  vendor/ntp/dist/include/ntp_stdlib.h
  vendor/ntp/dist/include/ntp_types.h
  vendor/ntp/dist/include/ntp_worker.h
  vendor/ntp/dist/include/parse.h
  vendor/ntp/dist/libntp/Makefile.am
  vendor/ntp/dist/libntp/Makefile.in
  vendor/ntp/dist/libntp/authkeys.c
  vendor/ntp/dist/libntp/authreadkeys.c
  vendor/ntp/dist/libntp/authusekey.c
  vendor/ntp/dist/libntp/ntp_worker.c
  vendor/ntp/dist/libntp/systime.c
  vendor/ntp/dist/libntp/work_thread.c
  vendor/ntp/dist/ntpd/invoke-ntp.conf.texi
  vendor/ntp/dist/ntpd/invoke-ntp.keys.texi
  vendor/ntp/dist/ntpd/invoke-ntpd.texi
  vendor/ntp/dist/ntpd/keyword-gen-utd
  vendor/ntp/dist/ntpd/keyword-gen.c
  vendor/ntp/dist/ntpd/ntp.conf.5man
  vendor/ntp/dist/ntpd/ntp.conf.5mdoc
  vendor/ntp/dist/ntpd/ntp.conf.def
  vendor/ntp/dist/ntpd/ntp.conf.html
  vendor/ntp/dist/ntpd/ntp.conf.man.in
  vendor/ntp/dist/ntpd/ntp.conf.mdoc.in
  vendor/ntp/dist/ntpd/ntp.keys.5man
  vendor/ntp/dist/ntpd/ntp.keys.5mdoc
  vendor/ntp/dist/ntpd/ntp.keys.def
  vendor/ntp/dist/ntpd/ntp.keys.html
  vendor/ntp/dist/ntpd/ntp.keys.man.in
  vendor/ntp/dist/ntpd/ntp.keys.mdoc.in
  vendor/ntp/dist/ntpd/ntp_config.c
  vendor/ntp/dist/ntpd/ntp_control.c
  vendor/ntp/dist/ntpd/ntp_crypto.c
  vendor/ntp/dist/ntpd/ntp_io.c
  vendor/ntp/dist/ntpd/ntp_keyword.h
  vendor/ntp/dist/ntpd/ntp_parser.c
  vendor/ntp/dist/ntpd/ntp_parser.h
  vendor/ntp/dist/ntpd/ntp_parser.y
  vendor/ntp/dist/ntpd/ntp_proto.c
  vendor/ntp/dist/ntpd/ntp_request.c
  vendor/ntp/dist/ntpd/ntp_scanner.c
  vendor/ntp/dist/ntpd/ntp_timer.c
  vendor/ntp/dist/ntpd/ntpd-opts.c
  vendor/ntp/dist/ntpd/ntpd-opts.h
  vendor/ntp/dist/ntpd/ntpd.1ntpdman
  vendor/ntp/dist/ntpd/ntpd.1ntpdmdoc
  vendor/ntp/dist/ntpd/ntpd.c
  vendor/ntp/dist/ntpd/ntpd.html
  vendor/ntp/dist/ntpd/ntpd.man.in
  vendor/ntp/dist/ntpd/ntpd.mdoc.in
  vendor/ntp/dist/ntpd/refclock_chu.c
  vendor/ntp/dist/ntpd/refclock_gpsdjson.c
  vendor/ntp/dist/ntpd/refclock_jjy.c
  vendor/ntp/dist/ntpd/refclock_shm.c
  vendor/ntp/dist/ntpdc/invoke-ntpdc.texi
  vendor/ntp/dist/ntpdc/ntpdc-opts.c
  vendor/ntp/dist/ntpdc/ntpdc-opts.h
  vendor/ntp/dist/ntpdc/ntpdc.1ntpdcman
  vendor/ntp/dist/ntpdc/ntpdc.1ntpdcmdoc
  vendor/ntp/dist/ntpdc/ntpdc.c
  vendor/ntp/dist/ntpdc/ntpdc.html
  vendor/ntp/dist/ntpdc/ntpdc.man.in
  vendor/ntp/dist/ntpdc/ntpdc.mdoc.in
  vendor/ntp/dist/ntpq/invoke-ntpq.texi
  vendor/ntp/dist/ntpq/ntpq-opts.c
  vendor/ntp/dist/ntpq/ntpq-opts.h
  vendor/ntp/dist/ntpq/ntpq-subs.c
  vendor/ntp/dist/ntpq/ntpq.1ntpqman
  vendor/ntp/dist/ntpq/ntpq.1ntpqmdoc
  vendor/ntp/dist/ntpq/ntpq.c
  vendor/ntp/dist/ntpq/ntpq.html
  vendor/ntp/dist/ntpq/ntpq.man.in
  vendor/ntp/dist/ntpq/ntpq.mdoc.in
  vendor/ntp/dist/ntpsnmpd/invoke-ntpsnmpd.texi
  vendor/ntp/dist/ntpsnmpd/ntpsnmpd-opts.c
  vendor/ntp/dist/ntpsnmpd/ntpsnmpd-opts.h
  vendor/ntp/dist/ntpsnmpd/ntpsnmpd.1ntpsnmpdman
  vendor/ntp/dist/ntpsnmpd/ntpsnmpd.1ntpsnmpdmdoc
  vendor/ntp/dist/ntpsnmpd/ntpsnmpd.html
  vendor/ntp/dist/ntpsnmpd/ntpsnmpd.man.in
  vendor/ntp/dist/ntpsnmpd/ntpsnmpd.mdoc.in
  vendor/ntp/dist/packageinfo.sh
  vendor/ntp/dist/scripts/calc_tickadj/calc_tickadj.1calc_tickadjman
  vendor/ntp/dist/scripts/calc_tickadj/calc_tickadj.1calc_tickadjmdoc
  vendor/ntp/dist/scripts/calc_tickadj/calc_tickadj.html
  vendor/ntp/dist/scripts/calc_tickadj/calc_tickadj.man.in
  vendor/ntp/dist/scripts/calc_tickadj/calc_tickadj.mdoc.in
  vendor/ntp/dist/scripts/calc_tickadj/invoke-calc_tickadj.texi
  vendor/ntp/dist/scripts/invoke-plot_summary.texi
  vendor/ntp/dist/scripts/invoke-summary.texi
  vendor/ntp/dist/scripts/ntp-wait/invoke-ntp-wait.texi
  vendor/ntp/dist/scripts/ntp-wait/ntp-wait-opts
  vendor/ntp/dist/scripts/ntp-wait/ntp-wait.1ntp-waitman
  vendor/ntp/dist/scripts/ntp-wait/ntp-wait.1ntp-waitmdoc
  vendor/ntp/dist/scripts/ntp-wait/ntp-wait.html
  vendor/ntp/dist/scripts/ntp-wait/ntp-wait.man.in
  vendor/ntp/dist/scripts/ntp-wait/ntp-wait.mdoc.in
  vendor/ntp/dist/scripts/ntpsweep/invoke-ntpsweep.texi
  vendor/ntp/dist/scripts/ntpsweep/ntpsweep-opts
  vendor/ntp/dist/scripts/ntpsweep/ntpsweep.1ntpsweepman
  vendor/ntp/dist/scripts/ntpsweep/ntpsweep.1ntpsweepmdoc
  vendor/ntp/dist/scripts/ntpsweep/ntpsweep.html
  vendor/ntp/dist/scripts/ntpsweep/ntpsweep.man.in
  vendor/ntp/dist/scripts/ntpsweep/ntpsweep.mdoc.in
  vendor/ntp/dist/scripts/ntptrace/invoke-ntptrace.texi
  vendor/ntp/dist/scripts/ntptrace/ntptrace-opts
  vendor/ntp/dist/scripts/ntptrace/ntptrace.1ntptraceman
  vendor/ntp/dist/scripts/ntptrace/ntptrace.1ntptracemdoc
  vendor/ntp/dist/scripts/ntptrace/ntptrace.html
  vendor/ntp/dist/scripts/ntptrace/ntptrace.man.in
  vendor/ntp/dist/scripts/ntptrace/ntptrace.mdoc.in
  vendor/ntp/dist/scripts/plot_summary-opts
  vendor/ntp/dist/scripts/plot_summary.1plot_summaryman
  vendor/ntp/dist/scripts/plot_summary.1plot_summarymdoc
  vendor/ntp/dist/scripts/plot_summary.html
  vendor/ntp/dist/scripts/plot_summary.man.in
  vendor/ntp/dist/scripts/plot_summary.mdoc.in
  vendor/ntp/dist/scripts/summary-opts
  vendor/ntp/dist/scripts/summary.1summaryman
  vendor/ntp/dist/scripts/summary.1summarymdoc
  vendor/ntp/dist/scripts/summary.html
  vendor/ntp/dist/scripts/summary.man.in
  vendor/ntp/dist/scripts/summary.mdoc.in
  vendor/ntp/dist/scripts/update-leap/invoke-update-leap.texi
  vendor/ntp/dist/scripts/update-leap/update-leap-opts
  vendor/ntp/dist/scripts/update-leap/update-leap.1update-leapman
  vendor/ntp/dist/scripts/update-leap/update-leap.1update-leapmdoc
  vendor/ntp/dist/scripts/update-leap/update-leap.html
  vendor/ntp/dist/scripts/update-leap/update-leap.man.in
  vendor/ntp/dist/scripts/update-leap/update-leap.mdoc.in
  vendor/ntp/dist/sntp/configure
  vendor/ntp/dist/sntp/crypto.c
  vendor/ntp/dist/sntp/crypto.h
  vendor/ntp/dist/sntp/include/copyright.def
  vendor/ntp/dist/sntp/include/version.def
  vendor/ntp/dist/sntp/include/version.texi
  vendor/ntp/dist/sntp/invoke-sntp.texi
  vendor/ntp/dist/sntp/libopts/configfile.c
  vendor/ntp/dist/sntp/libopts/enum.c
  vendor/ntp/dist/sntp/libopts/find.c
  vendor/ntp/dist/sntp/libopts/init.c
  vendor/ntp/dist/sntp/libopts/load.c
  vendor/ntp/dist/sntp/libopts/makeshell.c
  vendor/ntp/dist/sntp/libopts/nested.c
  vendor/ntp/dist/sntp/libopts/parse-duration.c
  vendor/ntp/dist/sntp/libopts/reset.c
  vendor/ntp/dist/sntp/libopts/save.c
  vendor/ntp/dist/sntp/libopts/tokenize.c
  vendor/ntp/dist/sntp/m4/version.m4
  vendor/ntp/dist/sntp/main.c
  vendor/ntp/dist/sntp/networking.c
  vendor/ntp/dist/sntp/sntp-opts.c
  vendor/ntp/dist/sntp/sntp-opts.h
  vendor/ntp/dist/sntp/sntp.1sntpman
  vendor/ntp/dist/sntp/sntp.1sntpmdoc
  vendor/ntp/dist/sntp/sntp.html
  vendor/ntp/dist/sntp/sntp.man.in
  vendor/ntp/dist/sntp/sntp.mdoc.in
  vendor/ntp/dist/sntp/tests/crypto.c
  vendor/ntp/dist/sntp/tests/fileHandlingTest.c
  vendor/ntp/dist/sntp/tests/fileHandlingTest.h.in
  vendor/ntp/dist/sntp/tests/keyFile.c
  vendor/ntp/dist/sntp/tests/packetHandling.c
  vendor/ntp/dist/sntp/tests/packetProcessing.c
  vendor/ntp/dist/sntp/tests/run-packetProcessing.c
  vendor/ntp/dist/sntp/unity/unity_internals.h
  vendor/ntp/dist/sntp/version.c
  vendor/ntp/dist/tests/libntp/authkeys.c
  vendor/ntp/dist/tests/libntp/decodenetnum.c
  vendor/ntp/dist/tests/libntp/run-authkeys.c
  vendor/ntp/dist/tests/libntp/run-decodenetnum.c
  vendor/ntp/dist/tests/libntp/run-socktoa.c
  vendor/ntp/dist/tests/libntp/socktoa.c
  vendor/ntp/dist/tests/ntpd/t-ntp_signd.c
  vendor/ntp/dist/util/invoke-ntp-keygen.texi
  vendor/ntp/dist/util/ntp-keygen-opts.c
  vendor/ntp/dist/util/ntp-keygen-opts.h
  vendor/ntp/dist/util/ntp-keygen.1ntp-keygenman
  vendor/ntp/dist/util/ntp-keygen.1ntp-keygenmdoc
  vendor/ntp/dist/util/ntp-keygen.html
  vendor/ntp/dist/util/ntp-keygen.man.in
  vendor/ntp/dist/util/ntp-keygen.mdoc.in

Modified: vendor/ntp/dist/ChangeLog
==============================================================================
--- vendor/ntp/dist/ChangeLog	Thu Jan 21 08:32:11 2016	(r294490)
+++ vendor/ntp/dist/ChangeLog	Thu Jan 21 08:50:56 2016	(r294491)
@@ -1,4 +1,38 @@
 ---
+(4.2.8p6) 2016/01/20 Released by Harlan Stenn <stenn@ntp.org>
+
+* [Sec 2935] Deja Vu: Replay attack on authenticated broadcast mode. HStenn.
+* [Sec 2936] Skeleton Key: Any trusted key system can serve time. HStenn.
+* [Sec 2937] ntpq: nextvar() missing length check. perlinger@ntp.org
+* [Sec 2938] ntpq saveconfig command allows dangerous characters
+  in filenames. perlinger@ntp.org
+* [Sec 2939] reslist NULL pointer dereference.  perlinger@ntp.org
+* [Sec 2940] Stack exhaustion in recursive traversal of restriction
+  list. perlinger@ntp.org
+* [Sec 2942]: Off-path DoS attack on auth broadcast mode.  HStenn.
+* [Sec 2945] Zero Origin Timestamp Bypass. perlinger@ntp.org
+* [Sec 2948] Potential Infinite Loop in ntpq ( and ntpdc) perlinger@ntp.org
+* [Bug 2772] adj_systime overflows tv_usec. perlinger@ntp.org
+* [Bug 2814] msyslog deadlock when signaled. perlinger@ntp.org
+  - applied patch by shenpeng11@huawei.com with minor adjustments
+* [Bug 2882] Look at ntp_request.c:list_peers_sum(). perlinger@ntp.org
+* [Bug 2891] Deadlock in deferred DNS lookup framework. perlinger@ntp.org
+* [Bug 2892] Several test cases assume IPv6 capabilities even when
+             IPv6 is disabled in the build. perlinger@ntp.org
+  - Found this already fixed, but validation led to cleanup actions.
+* [Bug 2905] DNS lookups broken. perlinger@ntp.org
+  - added limits to stack consumption, fixed some return code handling
+* [Bug 2971] ntpq bails on ^C: select fails: Interrupted system call
+  - changed stacked/nested handling of CTRL-C. perlinger@ntp.org
+  - make CTRL-C work for retrieval and printing od MRU list. perlinger@ntp.org
+* [Bug 2980] reduce number of warnings. perlinger@ntp.org
+  - integrated several patches from Havard Eidnes (he@uninett.no)
+* [Bug 2985] bogus calculation in authkeys.c perlinger@ntp.org
+  - implement 'auth_log2()' using integer bithack instead of float calculation
+* Make leapsec_query debug messages less verbose.  Harlan Stenn.
+* Disable incomplete t-ntp_signd.c test.  Harlan Stenn.
+
+---
 (4.2.8p5) 2016/01/07 Released by Harlan Stenn <stenn@ntp.org>
 
 * [Sec 2956] small-step/big-step.  Close the panic gate earlier.  HStenn.
@@ -47,6 +81,7 @@
               lots of clients. perlinger@ntp.org
 * [Bug 2971] ntpq bails on ^C: select fails: Interrupted system call
   - changed stacked/nested handling of CTRL-C. perlinger@ntp.org
+  - make CTRL-C work for retrieval and printing od MRU list. perlinger@ntp.org
 * Unity cleanup for FreeBSD-6.4.  Harlan Stenn.
 * Unity test cleanup.  Harlan Stenn.
 * Libevent autoconf pthread fixes for FreeBSD-10.  Harlan Stenn.
@@ -55,9 +90,8 @@
 * Quiet a warning from clang.  Harlan Stenn.
 * Update the NEWS file.  Harlan Stenn.
 * Update scripts/calc_tickadj/Makefile.am.  Harlan Stenn.
+
 ---
-(4.2.8p4) 2015/10/21 Released by Harlan Stenn <stenn@ntp.org>
-(4.2.8p4-RC1) 2015/10/06 Released by Harlan Stenn <stenn@ntp.org>
 
 * [Sec 2899] CVE-2014-9297  perlinger@ntp.org
 * [Sec 2901] Drop invalid packet before checking KoD. Check for all KoD's.

Modified: vendor/ntp/dist/CommitLog
==============================================================================
--- vendor/ntp/dist/CommitLog	Thu Jan 21 08:32:11 2016	(r294490)
+++ vendor/ntp/dist/CommitLog	Thu Jan 21 08:50:56 2016	(r294491)
@@ -1,8 +1,633 @@
-ChangeSet@1.3623, 2016-01-07 23:33:11+00:00, stenn@deacon.udel.edu
+ChangeSet@1.3628, 2016-01-20 04:20:12-05:00, stenn@deacon.udel.edu
+  NTP_4_2_8P6
+  TAG: NTP_4_2_8P6
+
+  ChangeLog@1.1793 +1 -0
+    NTP_4_2_8P6
+
+  ntpd/invoke-ntp.conf.texi@1.196 +1 -1
+    NTP_4_2_8P6
+
+  ntpd/invoke-ntp.keys.texi@1.188 +1 -1
+    NTP_4_2_8P6
+
+  ntpd/invoke-ntpd.texi@1.504 +2 -2
+    NTP_4_2_8P6
+
+  ntpd/ntp.conf.5man@1.230 +3 -3
+    NTP_4_2_8P6
+
+  ntpd/ntp.conf.5mdoc@1.230 +2 -3
+    NTP_4_2_8P6
+
+  ntpd/ntp.conf.html@1.183 +60 -2
+    NTP_4_2_8P6
+
+  ntpd/ntp.conf.man.in@1.230 +3 -3
+    NTP_4_2_8P6
+
+  ntpd/ntp.conf.mdoc.in@1.230 +2 -3
+    NTP_4_2_8P6
+
+  ntpd/ntp.keys.5man@1.222 +2 -2
+    NTP_4_2_8P6
+
+  ntpd/ntp.keys.5mdoc@1.222 +3 -3
+    NTP_4_2_8P6
+
+  ntpd/ntp.keys.html@1.184 +21 -33
+    NTP_4_2_8P6
+
+  ntpd/ntp.keys.man.in@1.222 +2 -2
+    NTP_4_2_8P6
+
+  ntpd/ntp.keys.mdoc.in@1.222 +3 -3
+    NTP_4_2_8P6
+
+  ntpd/ntpd-opts.c@1.526 +10 -10
+    NTP_4_2_8P6
+
+  ntpd/ntpd-opts.h@1.525 +4 -4
+    NTP_4_2_8P6
+
+  ntpd/ntpd.1ntpdman@1.333 +4 -4
+    NTP_4_2_8P6
+
+  ntpd/ntpd.1ntpdmdoc@1.333 +3 -3
+    NTP_4_2_8P6
+
+  ntpd/ntpd.html@1.177 +2 -2
+    NTP_4_2_8P6
+
+  ntpd/ntpd.man.in@1.333 +4 -4
+    NTP_4_2_8P6
+
+  ntpd/ntpd.mdoc.in@1.333 +3 -3
+    NTP_4_2_8P6
+
+  ntpdc/invoke-ntpdc.texi@1.501 +2 -2
+    NTP_4_2_8P6
+
+  ntpdc/ntpdc-opts.c@1.519 +10 -10
+    NTP_4_2_8P6
+
+  ntpdc/ntpdc-opts.h@1.518 +4 -4
+    NTP_4_2_8P6
+
+  ntpdc/ntpdc.1ntpdcman@1.332 +4 -4
+    NTP_4_2_8P6
+
+  ntpdc/ntpdc.1ntpdcmdoc@1.332 +3 -3
+    NTP_4_2_8P6
+
+  ntpdc/ntpdc.html@1.345 +2 -2
+    NTP_4_2_8P6
+
+  ntpdc/ntpdc.man.in@1.332 +4 -4
+    NTP_4_2_8P6
+
+  ntpdc/ntpdc.mdoc.in@1.332 +3 -3
+    NTP_4_2_8P6
+
+  ntpq/invoke-ntpq.texi@1.508 +2 -2
+    NTP_4_2_8P6
+
+  ntpq/ntpq-opts.c@1.525 +10 -10
+    NTP_4_2_8P6
+
+  ntpq/ntpq-opts.h@1.523 +4 -4
+    NTP_4_2_8P6
+
+  ntpq/ntpq.1ntpqman@1.336 +4 -4
+    NTP_4_2_8P6
+
+  ntpq/ntpq.1ntpqmdoc@1.336 +3 -3
+    NTP_4_2_8P6
+
+  ntpq/ntpq.html@1.174 +2 -2
+    NTP_4_2_8P6
+
+  ntpq/ntpq.man.in@1.336 +4 -4
+    NTP_4_2_8P6
+
+  ntpq/ntpq.mdoc.in@1.336 +3 -3
+    NTP_4_2_8P6
+
+  ntpsnmpd/invoke-ntpsnmpd.texi@1.503 +2 -2
+    NTP_4_2_8P6
+
+  ntpsnmpd/ntpsnmpd-opts.c@1.521 +10 -10
+    NTP_4_2_8P6
+
+  ntpsnmpd/ntpsnmpd-opts.h@1.520 +4 -4
+    NTP_4_2_8P6
+
+  ntpsnmpd/ntpsnmpd.1ntpsnmpdman@1.332 +4 -4
+    NTP_4_2_8P6
+
+  ntpsnmpd/ntpsnmpd.1ntpsnmpdmdoc@1.332 +3 -3
+    NTP_4_2_8P6
+
+  ntpsnmpd/ntpsnmpd.html@1.172 +1 -1
+    NTP_4_2_8P6
+
+  ntpsnmpd/ntpsnmpd.man.in@1.332 +4 -4
+    NTP_4_2_8P6
+
+  ntpsnmpd/ntpsnmpd.mdoc.in@1.332 +3 -3
+    NTP_4_2_8P6
+
+  packageinfo.sh@1.524 +2 -2
+    NTP_4_2_8P6
+
+  scripts/calc_tickadj/calc_tickadj.1calc_tickadjman@1.93 +3 -3
+    NTP_4_2_8P6
+
+  scripts/calc_tickadj/calc_tickadj.1calc_tickadjmdoc@1.94 +2 -2
+    NTP_4_2_8P6
+
+  scripts/calc_tickadj/calc_tickadj.html@1.95 +1 -1
+    NTP_4_2_8P6
+
+  scripts/calc_tickadj/calc_tickadj.man.in@1.92 +3 -3
+    NTP_4_2_8P6
+
+  scripts/calc_tickadj/calc_tickadj.mdoc.in@1.94 +2 -2
+    NTP_4_2_8P6
+
+  scripts/calc_tickadj/invoke-calc_tickadj.texi@1.97 +1 -1
+    NTP_4_2_8P6
+
+  scripts/invoke-plot_summary.texi@1.114 +2 -2
+    NTP_4_2_8P6
+
+  scripts/invoke-summary.texi@1.114 +2 -2
+    NTP_4_2_8P6
+
+  scripts/ntp-wait/invoke-ntp-wait.texi@1.324 +2 -2
+    NTP_4_2_8P6
+
+  scripts/ntp-wait/ntp-wait-opts@1.60 +2 -2
+    NTP_4_2_8P6
+
+  scripts/ntp-wait/ntp-wait.1ntp-waitman@1.321 +3 -3
+    NTP_4_2_8P6
+
+  scripts/ntp-wait/ntp-wait.1ntp-waitmdoc@1.322 +2 -2
+    NTP_4_2_8P6
+
+  scripts/ntp-wait/ntp-wait.html@1.341 +2 -2
+    NTP_4_2_8P6
+
+  scripts/ntp-wait/ntp-wait.man.in@1.321 +3 -3
+    NTP_4_2_8P6
+
+  scripts/ntp-wait/ntp-wait.mdoc.in@1.322 +2 -2
+    NTP_4_2_8P6
+
+  scripts/ntpsweep/invoke-ntpsweep.texi@1.112 +2 -2
+    NTP_4_2_8P6
+
+  scripts/ntpsweep/ntpsweep-opts@1.62 +2 -2
+    NTP_4_2_8P6
+
+  scripts/ntpsweep/ntpsweep.1ntpsweepman@1.100 +3 -3
+    NTP_4_2_8P6
+
+  scripts/ntpsweep/ntpsweep.1ntpsweepmdoc@1.100 +2 -2
+    NTP_4_2_8P6
+
+  scripts/ntpsweep/ntpsweep.html@1.113 +2 -2
+    NTP_4_2_8P6
+
+  scripts/ntpsweep/ntpsweep.man.in@1.100 +3 -3
+    NTP_4_2_8P6
+
+  scripts/ntpsweep/ntpsweep.mdoc.in@1.101 +2 -2
+    NTP_4_2_8P6
+
+  scripts/ntptrace/invoke-ntptrace.texi@1.113 +2 -2
+    NTP_4_2_8P6
+
+  scripts/ntptrace/ntptrace-opts@1.62 +2 -2
+    NTP_4_2_8P6
+
+  scripts/ntptrace/ntptrace.1ntptraceman@1.100 +3 -3
+    NTP_4_2_8P6
+
+  scripts/ntptrace/ntptrace.1ntptracemdoc@1.101 +2 -2
+    NTP_4_2_8P6
+
+  scripts/ntptrace/ntptrace.html@1.114 +2 -2
+    NTP_4_2_8P6
+
+  scripts/ntptrace/ntptrace.man.in@1.100 +3 -3
+    NTP_4_2_8P6
+
+  scripts/ntptrace/ntptrace.mdoc.in@1.102 +2 -2
+    NTP_4_2_8P6
+
+  scripts/plot_summary-opts@1.62 +2 -2
+    NTP_4_2_8P6
+
+  scripts/plot_summary.1plot_summaryman@1.112 +3 -3
+    NTP_4_2_8P6
+
+  scripts/plot_summary.1plot_summarymdoc@1.112 +2 -2
+    NTP_4_2_8P6
+
+  scripts/plot_summary.html@1.115 +2 -2
+    NTP_4_2_8P6
+
+  scripts/plot_summary.man.in@1.112 +3 -3
+    NTP_4_2_8P6
+
+  scripts/plot_summary.mdoc.in@1.112 +2 -2
+    NTP_4_2_8P6
+
+  scripts/summary-opts@1.62 +2 -2
+    NTP_4_2_8P6
+
+  scripts/summary.1summaryman@1.112 +3 -3
+    NTP_4_2_8P6
+
+  scripts/summary.1summarymdoc@1.112 +2 -2
+    NTP_4_2_8P6
+
+  scripts/summary.html@1.115 +2 -2
+    NTP_4_2_8P6
+
+  scripts/summary.man.in@1.112 +3 -3
+    NTP_4_2_8P6
+
+  scripts/summary.mdoc.in@1.112 +2 -2
+    NTP_4_2_8P6
+
+  scripts/update-leap/invoke-update-leap.texi@1.13 +1 -1
+    NTP_4_2_8P6
+
+  scripts/update-leap/update-leap-opts@1.13 +2 -2
+    NTP_4_2_8P6
+
+  scripts/update-leap/update-leap.1update-leapman@1.13 +3 -3
+    NTP_4_2_8P6
+
+  scripts/update-leap/update-leap.1update-leapmdoc@1.13 +2 -2
+    NTP_4_2_8P6
+
+  scripts/update-leap/update-leap.html@1.13 +1 -1
+    NTP_4_2_8P6
+
+  scripts/update-leap/update-leap.man.in@1.13 +3 -3
+    NTP_4_2_8P6
+
+  scripts/update-leap/update-leap.mdoc.in@1.13 +2 -2
+    NTP_4_2_8P6
+
+  sntp/invoke-sntp.texi@1.501 +2 -2
+    NTP_4_2_8P6
+
+  sntp/sntp-opts.c@1.520 +10 -10
+    NTP_4_2_8P6
+
+  sntp/sntp-opts.h@1.518 +4 -4
+    NTP_4_2_8P6
+
+  sntp/sntp.1sntpman@1.336 +4 -4
+    NTP_4_2_8P6
+
+  sntp/sntp.1sntpmdoc@1.336 +3 -3
+    NTP_4_2_8P6
+
+  sntp/sntp.html@1.516 +2 -2
+    NTP_4_2_8P6
+
+  sntp/sntp.man.in@1.336 +4 -4
+    NTP_4_2_8P6
+
+  sntp/sntp.mdoc.in@1.336 +3 -3
+    NTP_4_2_8P6
+
+  util/invoke-ntp-keygen.texi@1.504 +2 -2
+    NTP_4_2_8P6
+
+  util/ntp-keygen-opts.c@1.522 +10 -10
+    NTP_4_2_8P6
+
+  util/ntp-keygen-opts.h@1.520 +4 -4
+    NTP_4_2_8P6
+
+  util/ntp-keygen.1ntp-keygenman@1.332 +4 -4
+    NTP_4_2_8P6
+
+  util/ntp-keygen.1ntp-keygenmdoc@1.332 +3 -3
+    NTP_4_2_8P6
+
+  util/ntp-keygen.html@1.178 +2 -2
+    NTP_4_2_8P6
+
+  util/ntp-keygen.man.in@1.332 +4 -4
+    NTP_4_2_8P6
+
+  util/ntp-keygen.mdoc.in@1.332 +3 -3
+    NTP_4_2_8P6
+
+ChangeSet@1.3627, 2016-01-20 04:14:51-05:00, stenn@deacon.udel.edu
+  solaris hack
+
+  libntp/work_thread.c@1.20 +2 -0
+    solaris hack
+
+ChangeSet@1.3626, 2016-01-20 01:50:09-05:00, stenn@deacon.udel.edu
+  4.2.8p6
+
+  packageinfo.sh@1.523 +1 -1
+    4.2.8p6
+
+ChangeSet@1.3625, 2016-01-20 00:34:15+00:00, stenn@psp-deb1.ntp.org
+  updates
+
+  NEWS@1.160 +24 -24
+    updates
+
+ChangeSet@1.3624, 2016-01-19 22:28:41+00:00, stenn@psp-deb1.ntp.org
+  typo
+
+  NEWS@1.159 +1 -1
+    typo
+
+ChangeSet@1.3623, 2016-01-18 11:55:56+00:00, stenn@psp-deb1.ntp.org
+  [Sec 2936] Skeleton Key: Any trusted key system can serve time. HStenn.
+
+  ChangeLog@1.1792 +1 -0
+    [Sec 2936] Skeleton Key: Any trusted key system can serve time. HStenn.
+
+  NEWS@1.158 +40 -0
+    [Sec 2936] Skeleton Key: Any trusted key system can serve time. HStenn.
+
+  include/Makefile.am@1.54 +1 -0
+    [Sec 2936] Skeleton Key: Any trusted key system can serve time. HStenn.
+
+  include/ntp_io.h@1.23 +2 -1
+    [Sec 2936] Skeleton Key: Any trusted key system can serve time. HStenn.
+
+  include/ntp_keyacc.h@1.1 +13 -0
+    BitKeeper file /home/stenn/ntp-stable-2936/include/ntp_keyacc.h
+
+  include/ntp_keyacc.h@1.0 +0 -0
+
+  include/ntp_stdlib.h@1.81 +4 -1
+    [Sec 2936] Skeleton Key: Any trusted key system can serve time. HStenn.
+
+  include/ntp_types.h@1.36 +1 -0
+    [Sec 2936] Skeleton Key: Any trusted key system can serve time. HStenn.
+
+  libntp/Makefile.am@1.77 +1 -0
+    [Sec 2936] Skeleton Key: Any trusted key system can serve time. HStenn.
+
+  libntp/authkeys.c@1.31 +60 -6
+    [Sec 2936] Skeleton Key: Any trusted key system can serve time. HStenn.
+
+  libntp/authreadkeys.c@1.25 +50 -1
+    [Sec 2936] Skeleton Key: Any trusted key system can serve time. HStenn.
+
+  libntp/authusekey.c@1.11 +1 -1
+    [Sec 2936] Skeleton Key: Any trusted key system can serve time. HStenn.
+
+  libntp/is_ip_address.c@1.1 +129 -0
+    BitKeeper file /home/stenn/ntp-stable-2936/libntp/is_ip_address.c
+
+  libntp/is_ip_address.c@1.0 +0 -0
+
+  ntpd/invoke-ntp.keys.texi@1.187 +11 -3
+    [Sec 2936] Skeleton Key: Any trusted key system can serve time. HStenn.
+
+  ntpd/ntp.keys.5man@1.221 +13 -5
+    [Sec 2936] Skeleton Key: Any trusted key system can serve time. HStenn.
+
+  ntpd/ntp.keys.5mdoc@1.221 +14 -6
+    [Sec 2936] Skeleton Key: Any trusted key system can serve time. HStenn.
+
+  ntpd/ntp.keys.def@1.11 +10 -2
+    [Sec 2936] Skeleton Key: Any trusted key system can serve time. HStenn.
+
+  ntpd/ntp.keys.html@1.183 +42 -22
+    [Sec 2936] Skeleton Key: Any trusted key system can serve time. HStenn.
+
+  ntpd/ntp.keys.man.in@1.221 +13 -5
+    [Sec 2936] Skeleton Key: Any trusted key system can serve time. HStenn.
+
+  ntpd/ntp.keys.mdoc.in@1.221 +14 -6
+    [Sec 2936] Skeleton Key: Any trusted key system can serve time. HStenn.
+
+  ntpd/ntp_crypto.c@1.186 +1 -1
+    [Sec 2936] Skeleton Key: Any trusted key system can serve time. HStenn.
+
+  ntpd/ntp_io.c@1.412 +0 -72
+    [Sec 2936] Skeleton Key: Any trusted key system can serve time. HStenn.
+
+  ntpd/ntp_proto.c@1.373 +34 -0
+    [Sec 2936] Skeleton Key: Any trusted key system can serve time. HStenn.
+
+  tests/libntp/authkeys.c@1.15 +1 -1
+    [Sec 2936] Skeleton Key: Any trusted key system can serve time. HStenn.
+
+ChangeSet@1.3622, 2016-01-17 09:03:57+00:00, stenn@psp-deb1.ntp.org
+  Disable incomplete t-ntp_signd.c test.  Harlan Stenn.
+
+  ChangeLog@1.1791 +1 -0
+    Disable incomplete t-ntp_signd.c test.  Harlan Stenn.
+
+  tests/ntpd/t-ntp_signd.c@1.16 +4 -0
+    Disable incomplete t-ntp_signd.c test.  Harlan Stenn.
+
+ChangeSet@1.3621, 2016-01-17 05:51:14+00:00, stenn@psp-deb1.ntp.org
+  Update NEWS file for 2942
+
+  NEWS@1.157 +22 -0
+    Update NEWS file for 2942
+
+ChangeSet@1.3615.13.1, 2016-01-17 05:07:22+00:00, stenn@psp-deb1.ntp.org
+  [Sec 2942]: Off-path DoS attack on auth broadcast mode.  HStenn.
+
+  ChangeLog@1.1786.13.1 +4 -0
+    [Sec 2942]: Off-path DoS attack on auth broadcast mode.  HStenn.
+
+  html/miscopt.html@1.85 +11 -3
+    [Sec 2942]: Off-path DoS attack on auth broadcast mode.  HStenn.
+
+  include/ntp.h@1.213.1.1 +3 -0
+    [Sec 2942]: Off-path DoS attack on auth broadcast mode.  HStenn.
+
+  ntpd/invoke-ntp.conf.texi@1.195 +64 -3
+    [Sec 2942]: Off-path DoS attack on auth broadcast mode.  HStenn.
+
+  ntpd/keyword-gen-utd@1.27 +1 -1
+    [Sec 2942]: Off-path DoS attack on auth broadcast mode.  HStenn.
+
+  ntpd/keyword-gen.c@1.33 +3 -0
+    [Sec 2942]: Off-path DoS attack on auth broadcast mode.  HStenn.
+
+  ntpd/ntp.conf.5man@1.229 +71 -7
+    [Sec 2942]: Off-path DoS attack on auth broadcast mode.  HStenn.
+
+  ntpd/ntp.conf.5mdoc@1.229 +71 -7
+    [Sec 2942]: Off-path DoS attack on auth broadcast mode.  HStenn.
+
+  ntpd/ntp.conf.def@1.21 +67 -4
+    [Sec 2942]: Off-path DoS attack on auth broadcast mode.  HStenn.
+
+  ntpd/ntp.conf.man.in@1.229 +71 -7
+    [Sec 2942]: Off-path DoS attack on auth broadcast mode.  HStenn.
+
+  ntpd/ntp.conf.mdoc.in@1.229 +71 -7
+    [Sec 2942]: Off-path DoS attack on auth broadcast mode.  HStenn.
+
+  ntpd/ntp_config.c@1.335.1.1 +12 -0
+    [Sec 2942]: Off-path DoS attack on auth broadcast mode.  HStenn.
+
+  ntpd/ntp_keyword.h@1.29 +505 -468
+    [Sec 2942]: Off-path DoS attack on auth broadcast mode.  HStenn.
+
+  ntpd/ntp_parser.c@1.101 +1762 -1513
+    [Sec 2942]: Off-path DoS attack on auth broadcast mode.  HStenn.
+
+  ntpd/ntp_parser.h@1.65 +257 -235
+    [Sec 2942]: Off-path DoS attack on auth broadcast mode.  HStenn.
+
+  ntpd/ntp_parser.y@1.91 +6 -0
+    [Sec 2942]: Off-path DoS attack on auth broadcast mode.  HStenn.
+
+  ntpd/ntp_proto.c@1.368.2.1 +40 -4
+    [Sec 2942]: Off-path DoS attack on auth broadcast mode.  HStenn.
+
+ChangeSet@1.3619, 2016-01-14 12:19:16+00:00, stenn@psp-at1.ntp.org
+  NEWS file updates
+
+  NEWS@1.156 +21 -0
+    NEWS file updates
+
+ChangeSet@1.3615.1.9, 2016-01-14 11:33:43+00:00, stenn@psp-at1.ntp.org
+  merge cleanup
+
+  ChangeLog@1.1786.1.9 +3 -0
+    merge cleanup
+
+ChangeSet@1.3615.1.5, 2016-01-14 10:44:13+00:00, stenn@psp-at1.ntp.org
+  merge cleanup
+
+  ChangeLog@1.1786.1.5 +0 -1
+    merge cleanup
+
+ChangeSet@1.3615.12.4, 2016-01-14 10:27:23+00:00, stenn@psp-at1.ntp.org
+  merge cleanup
+
+  ChangeLog@1.1786.12.4 +1 -1
+    merge cleanup
+
+ChangeSet@1.3615.12.2, 2016-01-14 09:49:52+00:00, stenn@psp-at1.ntp.org
+  merge cleanup
+
+  ChangeLog@1.1786.12.2 +2 -2
+    merge cleanup
+
+ChangeSet@1.3615.3.17, 2016-01-14 09:33:56+00:00, stenn@psp-at1.ntp.org
+  merge cleanup
+
+  ChangeLog@1.1786.3.14 +1 -1
+    merge cleanup
+
+ChangeSet@1.3615.3.14, 2016-01-14 07:36:57+00:00, stenn@psp-at1.ntp.org
+  NEWS update
+
+  NEWS@1.155 +98 -7
+    NEWS update
+
+ChangeSet@1.3615.3.12, 2016-01-13 08:07:30+00:00, stenn@psp-deb1.ntp.org
+  typo
+
+  ChangeLog@1.1786.3.10 +1 -1
+    typo
+
+ChangeSet@1.3615.3.10, 2016-01-13 06:08:29+00:00, stenn@psp-deb1.ntp.org
+  Update NEWS file for bug 2938
+
+  NEWS@1.154 +29 -2
+    Update NEWS file for bug 2938
+
+ChangeSet@1.3615.3.8, 2016-01-13 04:23:46+00:00, stenn@psp-deb1.ntp.org
+  Update NEWS file for bug 2935
+
+  NEWS@1.153 +52 -0
+    Update NEWS file for bug 2935
+
+ChangeSet@1.3615.7.12, 2016-01-12 09:53:06+00:00, stenn@psp-at1.ntp.org
+  [Sec 2935] use L_SUB instead of L_ISGT.  Juergen Perlinger
+
+  ntpd/ntp_proto.c@1.368.1.5 +4 -1
+    [Sec 2935] use L_SUB instead of L_ISGT.  Juergen Perlinger
+
+ChangeSet@1.3615.7.11, 2016-01-11 03:02:53-08:00, harlan@max.pfcs.com
+  [Sec 2935] Deja Vu: Replay attack on authenticated broadcast mode.
+
+  ChangeLog@1.1786.9.1 +4 -0
+    [Sec 2935] Deja Vu: Replay attack on authenticated broadcast mode.
+
+  include/ntp.h@1.215 +1 -0
+    [Sec 2935] Deja Vu: Replay attack on authenticated broadcast mode.
+
+  ntpd/ntp_proto.c@1.368.1.4 +67 -0
+    [Sec 2935] Deja Vu: Replay attack on authenticated broadcast mode.
+
+ChangeSet@1.3615.7.10, 2016-01-11 02:44:25-08:00, harlan@max.pfcs.com
+  make leapsec_query messages less verbose.
+
+  ntpd/ntp_timer.c@1.93.1.1 +6 -4
+    make leapsec_query messages less verbose.
+
+ChangeSet@1.3615.9.1, 2016-01-11 10:26:12+01:00, jnperlin@hydra.localnet
+  [Bug 2985] bogus calculation in authkeys.c
+   - implement 'auth_log2()' using integer bithack instead of float calculation
+
+  ChangeLog@1.1786.7.5 +2 -0
+    [Bug 2985] bogus calculation in authkeys.c
+     - implement 'auth_log2()' using integer bithack instead of float calculation
+
+  libntp/authkeys.c@1.30 +33 -10
+    [Bug 2985] bogus calculation in authkeys.c
+     - implement 'auth_log2()' using integer bithack instead of float calculation
+
+  tests/libntp/authkeys.c@1.14 +38 -0
+    [Bug 2985] bogus calculation in authkeys.c
+     - test bithack implementation of 'auth_log2()'
+
+  tests/libntp/run-authkeys.c@1.12 +9 -6
+    [Bug 2985] bogus calculation in authkeys.c
+     - update auto-generated file
+
+ChangeSet@1.3615.7.9, 2016-01-09 09:52:44+00:00, stenn@psp-at1.ntp.org
+  Add timelastrec to the peer structure
+
+  include/ntp.h@1.214 +2 -1
+    Add timelastrec to the peer structure
+
+ChangeSet@1.3615.3.6, 2016-01-08 10:00:03+00:00, stenn@psp-at1.ntp.org
+  4.2.8p5 merge cleanup
+
+  ChangeLog@1.1786.3.6 +1 -1
+    4.2.8p5 merge cleanup
+
+ChangeSet@1.3615.7.8, 2016-01-08 00:26:09+00:00, stenn@deacon.udel.edu
+  Update copyright year
+
+  sntp/include/copyright.def@1.26 +1 -1
+    Update copyright year
+
+ChangeSet@1.3615.7.7, 2016-01-07 23:33:11+00:00, stenn@deacon.udel.edu
   NTP_4_2_8P5
   TAG: NTP_4_2_8P5
 
-  ChangeLog@1.1791 +1 -0
+  ChangeLog@1.1786.7.4 +1 -0
     NTP_4_2_8P5
 
   ntpd/invoke-ntp.conf.texi@1.194 +1 -1
@@ -332,60 +957,349 @@ ChangeSet@1.3623, 2016-01-07 23:33:11+00
   util/ntp-keygen.mdoc.in@1.331 +2 -2
     NTP_4_2_8P5
 
-ChangeSet@1.3622, 2016-01-07 17:52:24-05:00, stenn@deacon.udel.edu
+ChangeSet@1.3615.7.6, 2016-01-07 17:52:24-05:00, stenn@deacon.udel.edu
   ntp-4.2.8p5
 
   packageinfo.sh@1.521 +1 -1
     ntp-4.2.8p5
 
-ChangeSet@1.3621, 2016-01-07 22:20:05+00:00, stenn@psp-at1.ntp.org
+ChangeSet@1.3615.7.5, 2016-01-07 22:20:05+00:00, stenn@psp-at1.ntp.org
   cleanup
 
   NEWS@1.152 +2 -2
     cleanup
 
-ChangeSet@1.3620, 2016-01-07 09:33:11+00:00, stenn@psp-at1.ntp.org
+ChangeSet@1.3615.7.4, 2016-01-07 09:33:11+00:00, stenn@psp-at1.ntp.org
   typo in ntp_proto.c - leap smear.  Reported by Martin Burnicki
 
-  ntpd/ntp_proto.c@1.371 +1 -1
+  ntpd/ntp_proto.c@1.368.1.3 +1 -1
     typo in ntp_proto.c - leap smear.  Reported by Martin Burnicki
 
-ChangeSet@1.3619, 2016-01-07 06:33:08+00:00, stenn@psp-at1.ntp.org
+ChangeSet@1.3615.7.3, 2016-01-07 06:33:08+00:00, stenn@psp-at1.ntp.org
   Update scripts/calc_tickadj/Makefile.am.  Harlan Stenn.
 
-  ChangeLog@1.1790 +1 -0
+  ChangeLog@1.1786.7.3 +1 -0
     Update scripts/calc_tickadj/Makefile.am.  Harlan Stenn.
 
   scripts/calc_tickadj/Makefile.am@1.11 +2 -0
     Update scripts/calc_tickadj/Makefile.am.  Harlan Stenn.
 
-ChangeSet@1.3616.1.1, 2016-01-05 10:57:45+00:00, stenn@psp-at1.ntp.org
+ChangeSet@1.3615.3.2, 2016-01-05 12:34:56+00:00, stenn@psp-at1.ntp.org
+  ntp-4.2.8p6
+
+  ChangeLog@1.1786.3.2 +2 -0
+    ntp-4.2.8p6
+
+ChangeSet@1.3615.8.1, 2016-01-05 10:57:45+00:00, stenn@psp-at1.ntp.org
   Bug 2952 fixes
 
-  ChangeLog@1.1787.1.1 +1 -0
+  ChangeLog@1.1786.8.1 +1 -0
     Bug 2952 fixes
 
-  ntpd/ntp_proto.c@1.370 +165 -152
+  ntpd/ntp_proto.c@1.368.1.2 +165 -152
     Bug 2952 fixes
 
-ChangeSet@1.3617, 2016-01-05 09:56:31+00:00, stenn@psp-at1.ntp.org
+ChangeSet@1.3615.7.1, 2016-01-05 09:56:31+00:00, stenn@psp-at1.ntp.org
   ntp-4.2.8p5 prep
 
-  ChangeLog@1.1788 +2 -1
+  ChangeLog@1.1786.7.1 +2 -1
     ntp-4.2.8p5 prep
 
   NEWS@1.151 +104 -3
     ntp-4.2.8p5 prep
 
-ChangeSet@1.3616, 2015-12-06 11:20:02+00:00, stenn@psp-deb1.ntp.org
+ChangeSet@1.3615.5.1, 2015-12-13 13:35:12+01:00, jnperlin@hydra.localnet
+  [Bug 2892] Several test cases assume IPv6 capabilities even when IPv6 is disabled in the build
+    Found this already fixed, but validation lead to further cleanup:
+     - source code formatting
+     - inline variable definitions moved to start of block
+     - made some pure input data pointers 'const void*' instead of 'char*'; avoids casts and warnings
+
+  ChangeLog@1.1786.5.1 +3 -0
+    [Bug 2892] Several test cases assume IPv6 capabilities even when IPv6 is disabled in the build
+
+  sntp/crypto.c@1.19 +13 -12
+    [Bug 2892] Several test cases assume IPv6 capabilities even when IPv6 is disabled in the build
+     - sidekick: make pure input pointers 'const void*' instead of 'char*'
+     - sidekick: remove unnecessary casts
+
+  sntp/crypto.h@1.11 +11 -9
+    [Bug 2892] Several test cases assume IPv6 capabilities even when IPv6 is disabled in the build
+     - sidekick: make pure input pointers 'const void*' instead of 'char*'
+     - source formatting
+
+  sntp/main.c@1.99 +1 -1
+    [Bug 2892] Several test cases assume IPv6 capabilities even when IPv6 is disabled in the build
+     - no need to cast input to 'make_mac()' any more
+
+  sntp/networking.c@1.68 +1 -1
+    [Bug 2892] Several test cases assume IPv6 capabilities even when IPv6 is disabled in the build
+     - no need to cast input to 'auth_md5()' any more
+
+  sntp/tests/crypto.c@1.10 +41 -27
+    [Bug 2892] Several test cases assume IPv6 capabilities even when IPv6 is disabled in the build
+     - remove unnecessary casts
+     - source code formatting
+
+  sntp/tests/fileHandlingTest.c@1.4 +43 -20
+    [Bug 2892] Several test cases assume IPv6 capabilities even when IPv6 is disabled in the build
+     - create 'DestroyPath()' companion to 'CreatePath()' to avoid trouble with 'free()' on 'const char*'
+
+  sntp/tests/fileHandlingTest.h.in@1.15 +6 -15
+    [Bug 2892] Several test cases assume IPv6 capabilities even when IPv6 is disabled in the build
+     - create 'DestroyPath()' companion to 'CreatePath()' to avoid trouble with 'free()' on 'const char*'
+
+  sntp/tests/keyFile.c@1.13 +66 -46
+    [Bug 2892] Several test cases assume IPv6 capabilities even when IPv6 is disabled in the build
+     - use 'DestroyPath()' avoid trouble with 'free()' on 'const char*'
+     - printf() combined
+     - source code formatting
+     - move variable declarations to front
+
+  sntp/tests/packetHandling.c@1.6 +75 -64
+    [Bug 2892] Several test cases assume IPv6 capabilities even when IPv6 is disabled in the build
+     - move variable declarations to front
+     - source code formatting
+
+  sntp/tests/packetProcessing.c@1.9 +124 -90
+    [Bug 2892] Several test cases assume IPv6 capabilities even when IPv6 is disabled in the build
+     - move variable declarations to front
+     - source code formatting
+     - drop unnecessary casts
+
+  sntp/tests/run-packetProcessing.c@1.10 +18 -18
+    [Bug 2892] Several test cases assume IPv6 capabilities even when IPv6 is disabled in the build
+
+  sntp/unity/unity_internals.h@1.6 +1 -1
+    [Bug 2892] Several test cases assume IPv6 capabilities even when IPv6 is disabled in the build
+     - added missing 'const' in pointer casts
+
+  tests/libntp/decodenetnum.c@1.11 +33 -23
+    [Bug 2892] Several test cases assume IPv6 capabilities even when IPv6 is disabled in the build
+     - source code formatting +  cleanup
+
+  tests/libntp/run-decodenetnum.c@1.11 +4 -4
+    [Bug 2892] Several test cases assume IPv6 capabilities even when IPv6 is disabled in the build
+
+  tests/libntp/run-socktoa.c@1.14 +5 -5
+    [Bug 2892] Several test cases assume IPv6 capabilities even when IPv6 is disabled in the build
+
+  tests/libntp/socktoa.c@1.12 +23 -17
+    [Bug 2892] Several test cases assume IPv6 capabilities even when IPv6 is disabled in the build
+     - source code formatting +  cleanup
+
+ChangeSet@1.3615.4.1, 2015-12-11 18:24:16+01:00, jnperlin@hydra.localnet
+  [Bug 2882] Look at ntp_request.c:list_peers_sum()
+
+  ChangeLog@1.1786.4.1 +1 -0
+    [Bug 2882] Look at ntp_request.c:list_peers_sum()
+
+  ntpd/ntp_request.c@1.116 +57 -72
+    [Bug 2882] Look at ntp_request.c:list_peers_sum()
+     - 'list_peers()' and 'list_peers_sum()' skip IPv6 entires if client does not support them,
+       but continue processing until end of list now.
+
+ChangeSet@1.3615.1.3, 2015-12-09 18:23:31+01:00, jnperlin@hydra.localnet
+  [Bug 2891] Deadlock in deferred DNS lookup framework.
+
+  ChangeLog@1.1786.1.3 +1 -0
+    [Bug 2891] Deadlock in deferred DNS lookup framework.
+
+  include/ntp_worker.h@1.5 +31 -22
+    [Bug 2891] Deadlock in deferred DNS lookup framework.
+     - provide signal-safe result-ready detection
+
+  libntp/ntp_worker.c@1.7 +27 -0
+    [Bug 2891] Deadlock in deferred DNS lookup framework.
+     - support signal-safe result-ready detection
+     - provide function to harvest async results from mainloop
+
+  ntpd/ntp_io.c@1.409.1.1 +160 -133
+    [Bug 2891] Deadlock in deferred DNS lookup framework.
+     - do not process async-resolver results from signal handler
+     - set notification tags to harvest asyn-resolver results from mainloop
+     - avoid double select for synchronous IO
+     - avoid several syslog calls in signal-handler context
+     - refactor / conditionalize some functions that cannot be used in signal-driven IO
+
+  ntpd/ntpd.c@1.169 +4 -0
+    [Bug 2891] Deadlock in deferred DNS lookup framework.
+     - reap/harvest async resolver results from mainloop
+
+ChangeSet@1.3615.1.2, 2015-12-06 21:33:26+01:00, jnperlin@hydra.localnet
+  [Bug 2814] msyslog deadlock when signaled. perlinger@ntp.org
+   - applied patch by shenpeng11@huawei.com with minor adjustments
+
+  ChangeLog@1.1786.1.2 +2 -0
+    [Bug 2814] msyslog deadlock when signaled. perlinger@ntp.org
+     - applied patch by shenpeng11@huawei.com with minor adjustments
+
+  ntpd/ntpd.c@1.168 +26 -3
+    [Bug 2814] msyslog deadlock when signaled. perlinger@ntp.org
+     - applied patch by shenpeng11@huawei.com with minor adjustments
+
+ChangeSet@1.3615.2.1, 2015-12-06 20:19:32+01:00, jnperlin@hydra.localnet
+  [Bug 2772] adj_systime overflows tv_usec
+
+  ChangeLog@1.1786.2.1 +1 -0
+    [Bug 2772] adj_systime overflows tv_usec
+
+  libntp/systime.c@1.71 +12 -3
+    [Bug 2772] adj_systime overflows tv_usec
+     - add missing normalisation for nitpicking implementations of 'adjtime()'
+
+ChangeSet@1.3615.1.1, 2015-12-06 11:20:02+00:00, stenn@psp-deb1.ntp.org
   Quiet a warning from clang.  Harlan Stenn.
 
-  ChangeLog@1.1787 +1 -0
+  ChangeLog@1.1786.1.1 +1 -0
     Quiet a warning from clang.  Harlan Stenn.
 
   libntp/ntp_rfc2553.c@1.50 +3 -2
     Quiet a warning from clang.  Harlan Stenn.
 
+ChangeSet@1.3616, 2015-12-05 20:28:19+00:00, perlinger@psp-deb1.ntp.org
+  [Bug 2980] reduce number of warnings
+   - string formatting(arguments should be literals)
+   - applying constness where necessary
+   - removing bad consts that are superfluous
+   - avoid signed/unsigned clashes in conditionals (either by cast or type change)
+   - signed/unsigned and promotion conflicts
+   - add prototypes for function pointer tables
+   - force unsigned argument promotion in calls to 'ctype' functions (is{digit,cntrl,...})
+
+  ChangeLog@1.1787 +2 -0
+    [Bug 2980] reduce number of warnings
+
+  include/parse.h@1.14 +3 -3
+    [Bug 2980] reduce number of warnings
+     - make GPSWRAP and GPSWEEK unqualified literals to avoid signed/unsigned clashes
+
+  ntpd/ntp_config.c@1.336 +2 -0
+    [Bug 2980] reduce number of warnings
+     - add forward declaration of yyparse()
+
+  ntpd/ntp_io.c@1.410 +1 -1
+    [Bug 2980] reduce number of warnings
+     - fix a signedness comparison by adding a cast to size_t
+
+  ntpd/ntp_scanner.c@1.49 +1 -1
+    [Bug 2980] reduce number of warnings
+     - for type compatibility, make counter 'i' a size_t
+
+  ntpd/ntp_timer.c@1.94 +5 -6
+    [Bug 2980] reduce number of warnings
+     - fix a signed / unsigned compare
+
+  ntpd/refclock_chu.c@1.58 +1 -1
+    [Bug 2980] reduce number of warnings
+     - rewrite check to avoid warning about integer overflow
+
+  ntpd/refclock_gpsdjson.c@1.24 +13 -15
+    [Bug 2980] reduce number of warnings
+     - reshuffle to use a literal format string
+     - fix signed/unsigned clashes in compare
+
+  ntpd/refclock_jjy.c@1.30 +47 -44
+    Bug 2980 - reduce number of warnings
+     - make several pointers 'const char*'
+     - add prototypes for function pointer tables
+     - force unsigned argument promotion in calls to 'ctype' functions (is{digit,cntrl,...})
+
+  ntpd/refclock_shm.c@1.39 +1 -1
+    [Bug 2980] reduce number of warnings
+     - fix signed/unsigned clashes in compare
+
+  ntpq/ntpq-subs.c@1.114.1.1 +1 -1
+    [Bug 2980] reduce number of warnings
+     - avoid signed/unsigned clashe in compare
+
+  ntpq/ntpq.c@1.165.1.1 +47 -7
+    [Bug 2980] reduce number of warnings
+     - avoid juggling with formatting into dynamic buffers by a 'asprintf' like function
+
+  sntp/libopts/configfile.c@1.24 +22 -22
+    [Bug 2980] reduce number of warnings
+     - add some pointer constness to avoid casting it away
+
+  sntp/libopts/enum.c@1.14 +5 -5
+    [Bug 2980] reduce number of warnings
+     - avoid some unnecessary casts
+     - avoid shift/promote ambiguity by proper typing
+
+  sntp/libopts/find.c@1.13 +1 -1
+    [Bug 2980] reduce number of warnings
+     - Use VOIDP instead of a (char*) cast
+
+  sntp/libopts/init.c@1.9 +2 -3
+    [Bug 2980] reduce number of warnings
+     - use VOIDP() to replace a complicated double cast
+     - remove one useless cast
+
+  sntp/libopts/load.c@1.22 +1 -1
+    [Bug 2980] reduce number of warnings
+     - remove a useless cast
+
+  sntp/libopts/makeshell.c@1.21 +3 -3
+    [Bug 2980] reduce number of warnings
+     - fix integer promotion in calls to toupper/tolower

*** DIFF OUTPUT TRUNCATED AT 1000 LINES ***

From owner-svn-src-all@freebsd.org  Thu Jan 21 08:51:26 2016
Return-Path: <owner-svn-src-all@freebsd.org>
Delivered-To: svn-src-all@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3F99FA8BF14;
 Thu, 21 Jan 2016 08:51:26 +0000 (UTC)
 (envelope-from delphij@FreeBSD.org)
Received: from repo.freebsd.org (repo.freebsd.org
 [IPv6:2610:1c1:1:6068::e6a:0])
 (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
 (Client did not present a certificate)
 by mx1.freebsd.org (Postfix) with ESMTPS id E907E1D57;
 Thu, 21 Jan 2016 08:51:25 +0000 (UTC)
 (envelope-from delphij@FreeBSD.org)
Received: from repo.freebsd.org ([127.0.1.37])
 by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u0L8pO9t041338;
 Thu, 21 Jan 2016 08:51:24 GMT (envelope-from delphij@FreeBSD.org)
Received: (from delphij@localhost)
 by repo.freebsd.org (8.15.2/8.15.2/Submit) id u0L8pOed041337;
 Thu, 21 Jan 2016 08:51:24 GMT (envelope-from delphij@FreeBSD.org)
Message-Id: <201601210851.u0L8pOed041337@repo.freebsd.org>
X-Authentication-Warning: repo.freebsd.org: delphij set sender to
 delphij@FreeBSD.org using -f
From: Xin LI <delphij@FreeBSD.org>
Date: Thu, 21 Jan 2016 08:51:24 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-vendor@freebsd.org
Subject: svn commit: r294492 - vendor/ntp/4.2.8p6
X-SVN-Group: vendor
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.20
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for &quot;
 user&quot; and &quot; projects&quot; \)" <svn-src-all.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-all/>
List-Post: <mailto:svn-src-all@freebsd.org>
List-Help: <mailto:svn-src-all-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Thu, 21 Jan 2016 08:51:26 -0000

Author: delphij
Date: Thu Jan 21 08:51:24 2016
New Revision: 294492
URL: https://svnweb.freebsd.org/changeset/base/294492

Log:
  Tag ntp 4.2.8p6.

Added:
  vendor/ntp/4.2.8p6/
     - copied from r294491, vendor/ntp/dist/

From owner-svn-src-all@freebsd.org  Thu Jan 21 08:58:40 2016
Return-Path: <owner-svn-src-all@freebsd.org>
Delivered-To: svn-src-all@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id AB671A8B171;
 Thu, 21 Jan 2016 08:58:40 +0000 (UTC) (envelope-from smh@FreeBSD.org)
Received: from repo.freebsd.org (repo.freebsd.org
 [IPv6:2610:1c1:1:6068::e6a:0])
 (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
 (Client did not present a certificate)
 by mx1.freebsd.org (Postfix) with ESMTPS id 849961231;
 Thu, 21 Jan 2016 08:58:40 +0000 (UTC) (envelope-from smh@FreeBSD.org)
Received: from repo.freebsd.org ([127.0.1.37])
 by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u0L8wdoP041925;
 Thu, 21 Jan 2016 08:58:39 GMT (envelope-from smh@FreeBSD.org)
Received: (from smh@localhost)
 by repo.freebsd.org (8.15.2/8.15.2/Submit) id u0L8wdk9041923;
 Thu, 21 Jan 2016 08:58:39 GMT (envelope-from smh@FreeBSD.org)
Message-Id: <201601210858.u0L8wdk9041923@repo.freebsd.org>
X-Authentication-Warning: repo.freebsd.org: smh set sender to smh@FreeBSD.org
 using -f
From: Steven Hartland <smh@FreeBSD.org>
Date: Thu, 21 Jan 2016 08:58:39 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-head@freebsd.org
Subject: svn commit: r294493 - in head/sys/boot: common efi/boot1
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.20
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for &quot;
 user&quot; and &quot; projects&quot; \)" <svn-src-all.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-all/>
List-Post: <mailto:svn-src-all@freebsd.org>
List-Help: <mailto:svn-src-all-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Thu, 21 Jan 2016 08:58:40 -0000

Author: smh
Date: Thu Jan 21 08:58:39 2016
New Revision: 294493
URL: https://svnweb.freebsd.org/changeset/base/294493

Log:
  Fix EFI UFS caching
  
  EFI was mixing caching in two separate places causing issues when multiple
  partitions where tested.
  
  Eliminate this by removing fsstat and re-factoring fsread into fsread_size,
  adding basic parameter validation.
  
  Also:
  * Enhance some error print outs.
  * Fix compilation under UFS1_ONLY and UFS2_ONLY
  * Use sizeof on vars instead of structs.
  * Add basic parameter validation to fsread_size.
  
  MFC after:	1 week
  X-MFC-With:	r293268
  Sponsored by:	Multiplay
  Differential Revision:	https://reviews.freebsd.org/D4989

Modified:
  head/sys/boot/common/ufsread.c
  head/sys/boot/efi/boot1/ufs_module.c

Modified: head/sys/boot/common/ufsread.c
==============================================================================
--- head/sys/boot/common/ufsread.c	Thu Jan 21 08:51:24 2016	(r294492)
+++ head/sys/boot/common/ufsread.c	Thu Jan 21 08:58:39 2016	(r294493)
@@ -165,7 +165,7 @@ static int sblock_try[] = SBLOCKSEARCH;
 #endif
 
 static ssize_t
-fsread(ufs_ino_t inode, void *buf, size_t nbyte)
+fsread_size(ufs_ino_t inode, void *buf, size_t nbyte, size_t *fsizep)
 {
 #ifndef UFS2_ONLY
 	static struct ufs1_dinode dp1;
@@ -185,6 +185,10 @@ fsread(ufs_ino_t inode, void *buf, size_
 	static ufs2_daddr_t blkmap, indmap;
 	u_int u;
 
+	/* Basic parameter validation. */
+	if ((buf == NULL && nbyte != 0) || dmadat == NULL)
+		return (-1);
+
 	blkbuf = dmadat->blkbuf;
 	indbuf = dmadat->indbuf;
 
@@ -231,18 +235,18 @@ fsread(ufs_ino_t inode, void *buf, size_
 			return -1;
 		n = INO_TO_VBO(n, inode);
 #if defined(UFS1_ONLY)
-		memcpy(&dp1, (struct ufs1_dinode *)blkbuf + n,
-		    sizeof(struct ufs1_dinode));
+		memcpy(&dp1, (struct ufs1_dinode *)(void *)blkbuf + n,
+		    sizeof(dp1));
 #elif defined(UFS2_ONLY)
-		memcpy(&dp2, (struct ufs2_dinode *)blkbuf + n,
-		    sizeof(struct ufs2_dinode));
+		memcpy(&dp2, (struct ufs2_dinode *)(void *)blkbuf + n,
+		    sizeof(dp2));
 #else
 		if (fs.fs_magic == FS_UFS1_MAGIC)
 			memcpy(&dp1, (struct ufs1_dinode *)(void *)blkbuf + n,
-			    sizeof(struct ufs1_dinode));
+			    sizeof(dp1));
 		else
 			memcpy(&dp2, (struct ufs2_dinode *)(void *)blkbuf + n,
-			    sizeof(struct ufs2_dinode));
+			    sizeof(dp2));
 #endif
 		inomap = inode;
 		fs_off = 0;
@@ -306,5 +310,17 @@ fsread(ufs_ino_t inode, void *buf, size_
 		fs_off += n;
 		nb -= n;
 	}
+
+	if (fsizep != NULL)
+		*fsizep = size;
+
 	return nbyte;
 }
+
+static ssize_t
+fsread(ufs_ino_t inode, void *buf, size_t nbyte)
+{
+
+	return fsread_size(inode, buf, nbyte, NULL);
+}
+

Modified: head/sys/boot/efi/boot1/ufs_module.c
==============================================================================
--- head/sys/boot/efi/boot1/ufs_module.c	Thu Jan 21 08:51:24 2016	(r294492)
+++ head/sys/boot/efi/boot1/ufs_module.c	Thu Jan 21 08:58:39 2016	(r294493)
@@ -68,93 +68,23 @@ dskread(void *buf, u_int64_t lba, int nb
 
 #include "ufsread.c"
 
-static ssize_t
-fsstat(ufs_ino_t inode)
+static struct dmadat __dmadat;
+
+static int
+init_dev(dev_info_t* dev)
 {
-#ifndef UFS2_ONLY
-	static struct ufs1_dinode dp1;
-#endif
-#ifndef UFS1_ONLY
-	static struct ufs2_dinode dp2;
-#endif
-	static struct fs fs;
-	static ufs_ino_t inomap;
-	char *blkbuf;
-	void *indbuf;
-	size_t n, size;
-	static ufs2_daddr_t blkmap, indmap;
-
-	blkbuf = dmadat->blkbuf;
-	indbuf = dmadat->indbuf;
-	if (!dsk_meta) {
-		inomap = 0;
-		for (n = 0; sblock_try[n] != -1; n++) {
-			if (dskread(dmadat->sbbuf, sblock_try[n] / DEV_BSIZE,
-			    SBLOCKSIZE / DEV_BSIZE))
-				return (-1);
-			memcpy(&fs, dmadat->sbbuf, sizeof(struct fs));
-			if ((
-#if defined(UFS1_ONLY)
-			    fs.fs_magic == FS_UFS1_MAGIC
-#elif defined(UFS2_ONLY)
-			    (fs.fs_magic == FS_UFS2_MAGIC &&
-			    fs.fs_sblockloc == sblock_try[n])
-#else
-			    fs.fs_magic == FS_UFS1_MAGIC ||
-			    (fs.fs_magic == FS_UFS2_MAGIC &&
-			    fs.fs_sblockloc == sblock_try[n])
-#endif
-			    ) &&
-			    fs.fs_bsize <= MAXBSIZE &&
-			    fs.fs_bsize >= (int32_t)sizeof(struct fs))
-				break;
-		}
-		if (sblock_try[n] == -1) {
-			return (-1);
-		}
-		dsk_meta++;
-	} else
-		memcpy(&fs, dmadat->sbbuf, sizeof(struct fs));
-	if (!inode)
-		return (0);
-	if (inomap != inode) {
-		n = IPERVBLK(&fs);
-		if (dskread(blkbuf, INO_TO_VBA(&fs, n, inode), DBPERVBLK))
-			return (-1);
-		n = INO_TO_VBO(n, inode);
-#if defined(UFS1_ONLY)
-		memcpy(&dp1, (struct ufs1_dinode *)blkbuf + n,
-		    sizeof(struct ufs1_dinode));
-#elif defined(UFS2_ONLY)
-		memcpy(&dp2, (struct ufs2_dinode *)blkbuf + n,
-		    sizeof(struct ufs2_dinode));
-#else
-		if (fs.fs_magic == FS_UFS1_MAGIC)
-			memcpy(&dp1, (struct ufs1_dinode *)(void *)blkbuf + n,
-			    sizeof(struct ufs1_dinode));
-		else
-			memcpy(&dp2, (struct ufs2_dinode *)(void *)blkbuf + n,
-			    sizeof(struct ufs2_dinode));
-#endif
-		inomap = inode;
-		fs_off = 0;
-		blkmap = indmap = 0;
-	}
-	size = DIP(di_size);
-	n = size - fs_off;
 
-	return (n);
-}
+	devinfo = dev;
+	dmadat = &__dmadat;
 
-static struct dmadat __dmadat;
+	return fsread(0, NULL, 0);
+}
 
 static EFI_STATUS
 probe(dev_info_t* dev)
 {
 
-	devinfo = dev;
-	dmadat = &__dmadat;
-	if (fsread(0, NULL, 0) < 0)
+	if (init_dev(dev) < 0)
 		return (EFI_UNSUPPORTED);
 
 	add_device(&devices, dev);
@@ -171,14 +101,15 @@ try_load(dev_info_t *dev, const char *lo
 	ssize_t read;
 	void *buf;
 
-	dsk_meta = 0;
-	devinfo = dev;
+	if (init_dev(dev) < 0)
+		return (EFI_UNSUPPORTED);
+
 	if ((ino = lookup(loader_path)) == 0)
 		return (EFI_NOT_FOUND);
 
-	size = fsstat(ino);
-	if (size <= 0) {
-		printf("Failed to fsstat %s ino: %d\n", loader_path, ino);
+	if (fsread_size(ino, NULL, 0, &size) < 0 || size <= 0) {
+		printf("Failed to read size of '%s' ino: %d\n", loader_path,
+		    ino);
 		return (EFI_INVALID_PARAMETER);
 	}
 
@@ -191,7 +122,7 @@ try_load(dev_info_t *dev, const char *lo
 
 	read = fsread(ino, buf, size);
 	if ((size_t)read != size) {
-		printf("Failed to read %s (%zd != %zu)\n", loader_path, read,
+		printf("Failed to read '%s' (%zd != %zu)\n", loader_path, read,
 		    size);
 		(void)bs->FreePool(buf);
 		return (EFI_INVALID_PARAMETER);

From owner-svn-src-all@freebsd.org  Thu Jan 21 09:53:51 2016
Return-Path: <owner-svn-src-all@freebsd.org>
Delivered-To: svn-src-all@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1996BA89B1C;
 Thu, 21 Jan 2016 09:53:51 +0000 (UTC) (envelope-from avg@FreeBSD.org)
Received: from citadel.icyb.net.ua (citadel.icyb.net.ua [212.40.38.140])
 by mx1.freebsd.org (Postfix) with ESMTP id 7C63A19AE;
 Thu, 21 Jan 2016 09:53:48 +0000 (UTC) (envelope-from avg@FreeBSD.org)
Received: from porto.starpoint.kiev.ua (porto-e.starpoint.kiev.ua
 [212.40.38.100])
 by citadel.icyb.net.ua (8.8.8p3/ICyb-2.3exp) with ESMTP id LAA21540;
 Thu, 21 Jan 2016 11:53:46 +0200 (EET) (envelope-from avg@FreeBSD.org)
Received: from localhost ([127.0.0.1])
 by porto.starpoint.kiev.ua with esmtp (Exim 4.34 (FreeBSD))
 id 1aMBw2-0007RS-8h; Thu, 21 Jan 2016 11:53:46 +0200
Subject: Re: svn commit: r294471 - head/sys/dev/usb/wlan
To: Mark Johnston <markj@FreeBSD.org>, Ravi Pokala <rpokala@mac.com>
References: <201601202327.u0KNR2Hh066219@repo.freebsd.org>
 <CAJ-Vmom-nORRCZx6YyhH0LJxcOUTuFfMkVsjOczNZiL-TEbsVA@mail.gmail.com>
 <4FBE9133-AB30-4D30-A298-1742952700C5@panasas.com>
 <20160121012825.GA9303@wkstn-mjohnston.west.isilon.com>
Cc: Adrian Chadd <adrian.chadd@gmail.com>,
 Andriy Voskoboinyk <avos@FreeBSD.org>,
 "src-committers@freebsd.org" <src-committers@FreeBSD.org>,
 "svn-src-all@freebsd.org" <svn-src-all@FreeBSD.org>,
 "svn-src-head@freebsd.org" <svn-src-head@FreeBSD.org>
From: Andriy Gapon <avg@FreeBSD.org>
Message-ID: <56A0AA58.3070704@FreeBSD.org>
Date: Thu, 21 Jan 2016 11:52:24 +0200
User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:38.0) Gecko/20100101
 Thunderbird/38.5.0
MIME-Version: 1.0
In-Reply-To: <20160121012825.GA9303@wkstn-mjohnston.west.isilon.com>
Content-Type: text/plain; charset=windows-1252
Content-Transfer-Encoding: 7bit
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.20
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for &quot;
 user&quot; and &quot; projects&quot; \)" <svn-src-all.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-all/>
List-Post: <mailto:svn-src-all@freebsd.org>
List-Help: <mailto:svn-src-all-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Thu, 21 Jan 2016 09:53:51 -0000

On 21/01/2016 03:28, Mark Johnston wrote:
> One feature that would be nice would be a way to associate KTR rings
> with arbitrary objects rather than having a single global ring (or
> per-CPU rings). For example, KTR_BUF lets one trace operations on
> filesystem buffers, but there's no good way to find all trace records
> corresponding to a given buf. At the moment one has to always include a
> pointer to the buf, and then scan *all* KTR entries for the pointer of
> interest while hoping that the relevant entries haven't already been
> overwritten. With per-object rings, one can in effect see a "history" of
> the object, whether it's a buf or a driver softc or whatever.
> 
> Isilon has done ad-hoc implementations of this for bufs and mbufs, and
> they're quite handy for debugging. With BUF_TRACKING enabled in our
> kernel config, each buf contains a const char *b_records[32], and one
> adds
> 
> 	buf_track(bp, __func__);
> 
> or so to various functions to record an entry in the buf when the
> function is invoked. This is really similar to what KTR does already,
> and I've needed to further hack up our buf tracking to include metadata
> (thread IDs) that KTR already provides. And, KTR records can be
> retrieved from vmcores by ktrdump -M.

Does your extension also save a stack trace?
I would love to have something like that for the memory allocation and
deallocation audit.

-- 
Andriy Gapon

From owner-svn-src-all@freebsd.org  Thu Jan 21 10:25:56 2016
Return-Path: <owner-svn-src-all@freebsd.org>
Delivered-To: svn-src-all@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3F69FA88AE9;
 Thu, 21 Jan 2016 10:25:56 +0000 (UTC) (envelope-from des@des.no)
Received: from smtp.des.no (smtp.des.no [194.63.250.102])
 by mx1.freebsd.org (Postfix) with ESMTP id 0BF661965;
 Thu, 21 Jan 2016 10:25:55 +0000 (UTC) (envelope-from des@des.no)
Received: from desk.des.no (smtp.des.no [194.63.250.102])
 by smtp.des.no (Postfix) with ESMTP id 81C905959;
 Thu, 21 Jan 2016 10:25:54 +0000 (UTC)
Received: by desk.des.no (Postfix, from userid 1001)
 id 5D09A4823F; Thu, 21 Jan 2016 11:25:54 +0100 (CET)
From: =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= <des@des.no>
To: Gleb Smirnoff <glebius@FreeBSD.org>
Cc: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-head@freebsd.org
Subject: Re: svn commit: r294487 - head
References: <201601210754.u0L7s535023919@repo.freebsd.org>
Date: Thu, 21 Jan 2016 11:25:54 +0100
In-Reply-To: <201601210754.u0L7s535023919@repo.freebsd.org> (Gleb Smirnoff's
 message of "Thu, 21 Jan 2016 07:54:05 +0000 (UTC)")
Message-ID: <86si1rb559.fsf@desk.des.no>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (berkeley-unix)
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.20
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for &quot;
 user&quot; and &quot; projects&quot; \)" <svn-src-all.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-all/>
List-Post: <mailto:svn-src-all@freebsd.org>
List-Help: <mailto:svn-src-all-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Thu, 21 Jan 2016 10:25:56 -0000

Gleb Smirnoff <glebius@FreeBSD.org> writes:
> Log:
>   Note that new ssh(1) doesn't allow to use DSA keys by default.

Please revert.

The correct procedure is to contact the maintainer, report the problem
and ask whether the change was intentional, at which point a decision
can be made as to whether to revert or document the change.

DES
--=20
Dag-Erling Sm=C3=B8rgrav - des@des.no

From owner-svn-src-all@freebsd.org  Thu Jan 21 10:57:46 2016
Return-Path: <owner-svn-src-all@freebsd.org>
Delivered-To: svn-src-all@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id 77517A8AC55;
 Thu, 21 Jan 2016 10:57:46 +0000 (UTC) (envelope-from des@FreeBSD.org)
Received: from repo.freebsd.org (repo.freebsd.org
 [IPv6:2610:1c1:1:6068::e6a:0])
 (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
 (Client did not present a certificate)
 by mx1.freebsd.org (Postfix) with ESMTPS id 45A9C1DD4;
 Thu, 21 Jan 2016 10:57:46 +0000 (UTC) (envelope-from des@FreeBSD.org)
Received: from repo.freebsd.org ([127.0.1.37])
 by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u0LAvjhD078596;
 Thu, 21 Jan 2016 10:57:45 GMT (envelope-from des@FreeBSD.org)
Received: (from des@localhost)
 by repo.freebsd.org (8.15.2/8.15.2/Submit) id u0LAvjR2078595;
 Thu, 21 Jan 2016 10:57:45 GMT (envelope-from des@FreeBSD.org)
Message-Id: <201601211057.u0LAvjR2078595@repo.freebsd.org>
X-Authentication-Warning: repo.freebsd.org: des set sender to des@FreeBSD.org
 using -f
From: =?UTF-8?Q?Dag-Erling_Sm=c3=b8rgrav?= <des@FreeBSD.org>
Date: Thu, 21 Jan 2016 10:57:45 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-head@freebsd.org
Subject: svn commit: r294494 - head/crypto/openssh
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.20
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for &quot;
 user&quot; and &quot; projects&quot; \)" <svn-src-all.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-all/>
List-Post: <mailto:svn-src-all@freebsd.org>
List-Help: <mailto:svn-src-all-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Thu, 21 Jan 2016 10:57:46 -0000

Author: des
Date: Thu Jan 21 10:57:45 2016
New Revision: 294494
URL: https://svnweb.freebsd.org/changeset/base/294494

Log:
  Take care not to pick up the wrong version of OpenSSL when running in an
  environment that has OpenSSL from ports in addition to the base version.

Modified:
  head/crypto/openssh/freebsd-configure.sh

Modified: head/crypto/openssh/freebsd-configure.sh
==============================================================================
--- head/crypto/openssh/freebsd-configure.sh	Thu Jan 21 08:58:39 2016	(r294493)
+++ head/crypto/openssh/freebsd-configure.sh	Thu Jan 21 10:57:45 2016	(r294494)
@@ -7,6 +7,7 @@ configure_args="
     --prefix=/usr
     --sysconfdir=/etc/ssh
     --with-pam
+    --with-ssl-dir=/usr
     --with-tcp-wrappers
     --with-libedit
     --with-ssl-engine
@@ -18,11 +19,16 @@ set -e
 # make sure configure uses the correct compiler
 export CC=$(echo ".include <bsd.lib.mk>" | make -f /dev/stdin -VCC)
 export CPP=$(echo ".include <bsd.lib.mk>" | make -f /dev/stdin -VCPP)
+unset CFLAGS CPPFLAGS LDFLAGS LIBS
 
 # regenerate configure and config.h.in
 autoheader
 autoconf
 
+# reset PATH to avoid picking up the wrong libraries
+export PATH=/bin:/sbin:/usr/bin:/usr/sbin
+unset LD_LIBRARY_PATH
+
 # generate config.h with krb5 and stash it
 sh configure $configure_args --with-kerberos5
 mv config.log config.log.orig

From owner-svn-src-all@freebsd.org  Thu Jan 21 11:10:16 2016
Return-Path: <owner-svn-src-all@freebsd.org>
Delivered-To: svn-src-all@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5AF16A8B30D;
 Thu, 21 Jan 2016 11:10:16 +0000 (UTC) (envelope-from des@FreeBSD.org)
Received: from repo.freebsd.org (repo.freebsd.org
 [IPv6:2610:1c1:1:6068::e6a:0])
 (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
 (Client did not present a certificate)
 by mx1.freebsd.org (Postfix) with ESMTPS id 1BC7115D0;
 Thu, 21 Jan 2016 11:10:16 +0000 (UTC) (envelope-from des@FreeBSD.org)
Received: from repo.freebsd.org ([127.0.1.37])
 by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u0LBAFpY081862;
 Thu, 21 Jan 2016 11:10:15 GMT (envelope-from des@FreeBSD.org)
Received: (from des@localhost)
 by repo.freebsd.org (8.15.2/8.15.2/Submit) id u0LBAEI1081858;
 Thu, 21 Jan 2016 11:10:14 GMT (envelope-from des@FreeBSD.org)
Message-Id: <201601211110.u0LBAEI1081858@repo.freebsd.org>
X-Authentication-Warning: repo.freebsd.org: des set sender to des@FreeBSD.org
 using -f
From: =?UTF-8?Q?Dag-Erling_Sm=c3=b8rgrav?= <des@FreeBSD.org>
Date: Thu, 21 Jan 2016 11:10:14 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-head@freebsd.org
Subject: svn commit: r294495 - in head: . crypto/openssh
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.20
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for &quot;
 user&quot; and &quot; projects&quot; \)" <svn-src-all.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-all/>
List-Post: <mailto:svn-src-all@freebsd.org>
List-Help: <mailto:svn-src-all-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Thu, 21 Jan 2016 11:10:16 -0000

Author: des
Date: Thu Jan 21 11:10:14 2016
New Revision: 294495
URL: https://svnweb.freebsd.org/changeset/base/294495

Log:
  Enable DSA keys by default.  They were disabled in OpenSSH 6.9p1.
  
  Noticed by:	glebius

Modified:
  head/UPDATING
  head/crypto/openssh/myproposal.h   (contents, props changed)
  head/crypto/openssh/ssh_config.5
  head/crypto/openssh/sshd_config.5

Modified: head/UPDATING
==============================================================================
--- head/UPDATING	Thu Jan 21 10:57:45 2016	(r294494)
+++ head/UPDATING	Thu Jan 21 11:10:14 2016	(r294495)
@@ -32,10 +32,6 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 11
 	"ln -s 'abort:false,junk:false' /etc/malloc.conf".)
 
 20160119:
-	The default configuration of ssh(1) no longer allows to use ssh-dss
-	keys.  To enable using them, add 'ssh-dss' to PubkeyAcceptedKeyTypes
-	option in the /etc/ssh/ssh_config.  Refer to ssh_config(5) for more
-	information.
 	The NONE and HPN patches has been removed from OpenSSH.  They are
 	still available in the security/openssh-portable port.
 

Modified: head/crypto/openssh/myproposal.h
==============================================================================
--- head/crypto/openssh/myproposal.h	Thu Jan 21 10:57:45 2016	(r294494)
+++ head/crypto/openssh/myproposal.h	Thu Jan 21 11:10:14 2016	(r294495)
@@ -1,4 +1,5 @@
 /* $OpenBSD: myproposal.h,v 1.47 2015/07/10 06:21:53 markus Exp $ */
+/* $FreeBSD$ */
 
 /*
  * Copyright (c) 2000 Markus Friedl.  All rights reserved.
@@ -99,9 +100,11 @@
 	HOSTKEY_ECDSA_CERT_METHODS \
 	"ssh-ed25519-cert-v01@openssh.com," \
 	"ssh-rsa-cert-v01@openssh.com," \
+	"ssh-dss-cert-v01@openssh.com," \
 	HOSTKEY_ECDSA_METHODS \
 	"ssh-ed25519," \
-	"ssh-rsa" \
+	"ssh-rsa," \
+	"ssh-dss"
 
 /* the actual algorithms */
 

Modified: head/crypto/openssh/ssh_config.5
==============================================================================
--- head/crypto/openssh/ssh_config.5	Thu Jan 21 10:57:45 2016	(r294494)
+++ head/crypto/openssh/ssh_config.5	Thu Jan 21 11:10:14 2016	(r294495)
@@ -798,8 +798,10 @@ ecdsa-sha2-nistp384-cert-v01@openssh.com
 ecdsa-sha2-nistp521-cert-v01@openssh.com,
 ssh-ed25519-cert-v01@openssh.com,
 ssh-rsa-cert-v01@openssh.com,
-ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521,
-ssh-ed25519,ssh-rsa
+ssh-dss-cert-v01@openssh.com,
+ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,
+ecdsa-sha2-nistp521,ssh-ed25519,
+ssh-rsa,ssh-dss
 .Ed
 .Pp
 The
@@ -821,8 +823,10 @@ ecdsa-sha2-nistp384-cert-v01@openssh.com
 ecdsa-sha2-nistp521-cert-v01@openssh.com,
 ssh-ed25519-cert-v01@openssh.com,
 ssh-rsa-cert-v01@openssh.com,
-ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521,
-ssh-ed25519,ssh-rsa
+ssh-dss-cert-v01@openssh.com,
+ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,
+ecdsa-sha2-nistp521,ssh-ed25519,
+ssh-rsa,ssh-dss
 .Ed
 .Pp
 If hostkeys are known for the destination host then this default is modified
@@ -1251,8 +1255,10 @@ ecdsa-sha2-nistp384-cert-v01@openssh.com
 ecdsa-sha2-nistp521-cert-v01@openssh.com,
 ssh-ed25519-cert-v01@openssh.com,
 ssh-rsa-cert-v01@openssh.com,
-ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521,
-ssh-ed25519,ssh-rsa
+ssh-dss-cert-v01@openssh.com,
+ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,
+ecdsa-sha2-nistp521,ssh-ed25519,
+ssh-rsa,ssh-dss
 .Ed
 .Pp
 The

Modified: head/crypto/openssh/sshd_config.5
==============================================================================
--- head/crypto/openssh/sshd_config.5	Thu Jan 21 10:57:45 2016	(r294494)
+++ head/crypto/openssh/sshd_config.5	Thu Jan 21 11:10:14 2016	(r294495)
@@ -657,8 +657,10 @@ ecdsa-sha2-nistp384-cert-v01@openssh.com
 ecdsa-sha2-nistp521-cert-v01@openssh.com,
 ssh-ed25519-cert-v01@openssh.com,
 ssh-rsa-cert-v01@openssh.com,
-ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521,
-ssh-ed25519,ssh-rsa
+ssh-dss-cert-v01@openssh.com,
+ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,
+ecdsa-sha2-nistp521,ssh-ed25519,
+ssh-rsa,ssh-dss
 .Ed
 .Pp
 The
@@ -752,8 +754,10 @@ ecdsa-sha2-nistp384-cert-v01@openssh.com
 ecdsa-sha2-nistp521-cert-v01@openssh.com,
 ssh-ed25519-cert-v01@openssh.com,
 ssh-rsa-cert-v01@openssh.com,
-ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521,
-ssh-ed25519,ssh-rsa
+ssh-dss-cert-v01@openssh.com,
+ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,
+ecdsa-sha2-nistp521,ssh-ed25519,
+ssh-rsa,ssh-dss
 .Ed
 .Pp
 The list of available key types may also be obtained using the
@@ -1355,8 +1359,10 @@ ecdsa-sha2-nistp384-cert-v01@openssh.com
 ecdsa-sha2-nistp521-cert-v01@openssh.com,
 ssh-ed25519-cert-v01@openssh.com,
 ssh-rsa-cert-v01@openssh.com,
-ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521,
-ssh-ed25519,ssh-rsa
+ssh-dss-cert-v01@openssh.com,
+ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,
+ecdsa-sha2-nistp521,ssh-ed25519,
+ssh-rsa,ssh-dss
 .Ed
 .Pp
 The

From owner-svn-src-all@freebsd.org  Thu Jan 21 11:38:25 2016
Return-Path: <owner-svn-src-all@freebsd.org>
Delivered-To: svn-src-all@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id 09140A8BEC0;
 Thu, 21 Jan 2016 11:38:25 +0000 (UTC) (envelope-from slw@zxy.spb.ru)
Received: from zxy.spb.ru (zxy.spb.ru [195.70.199.98])
 (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
 (Client did not present a certificate)
 by mx1.freebsd.org (Postfix) with ESMTPS id B8B2B1362;
 Thu, 21 Jan 2016 11:38:24 +0000 (UTC) (envelope-from slw@zxy.spb.ru)
Received: from slw by zxy.spb.ru with local (Exim 4.86 (FreeBSD))
 (envelope-from <slw@zxy.spb.ru>)
 id 1aMDZ8-000Hol-3k; Thu, 21 Jan 2016 14:38:14 +0300
Date: Thu, 21 Jan 2016 14:38:14 +0300
From: Slawa Olhovchenkov <slw@zxy.spb.ru>
To: Andriy Gapon <avg@FreeBSD.org>
Cc: Alan Somers <asomers@FreeBSD.org>,
 "svn-src-head@freebsd.org" <svn-src-head@FreeBSD.org>,
 "svn-src-all@freebsd.org" <svn-src-all@FreeBSD.org>,
 "src-committers@freebsd.org" <src-committers@FreeBSD.org>
Subject: Re: svn commit: r294329 - in
 head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs: . sys
Message-ID: <20160121113813.GG37895@zxy.spb.ru>
References: <201601191700.u0JH0P6k061610@repo.freebsd.org>
 <569E6DA0.9010300@pix.net>
 <CAOtMX2idrWOpWbkYxPFn3yur8w-vgfBryhT4_0yiBvg10sWWRA@mail.gmail.com>
 <569F516D.80303@FreeBSD.org>
 <CAOtMX2gs37OnLMXE4zCduZF94+5z-TgPW+qg8K8BweauLCRgDQ@mail.gmail.com>
 <56A019A1.4030900@FreeBSD.org>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <56A019A1.4030900@FreeBSD.org>
User-Agent: Mutt/1.5.24 (2015-08-30)
X-SA-Exim-Connect-IP: <locally generated>
X-SA-Exim-Mail-From: slw@zxy.spb.ru
X-SA-Exim-Scanned: No (on zxy.spb.ru); SAEximRunCond expanded to false
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.20
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for &quot;
 user&quot; and &quot; projects&quot; \)" <svn-src-all.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-all/>
List-Post: <mailto:svn-src-all@freebsd.org>
List-Help: <mailto:svn-src-all-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Thu, 21 Jan 2016 11:38:25 -0000

On Thu, Jan 21, 2016 at 01:34:57AM +0200, Andriy Gapon wrote:

> On 20/01/2016 22:03, Alan Somers wrote:
> > On Wed, Jan 20, 2016 at 2:20 AM, Andriy Gapon <avg@freebsd.org> wrote:
> >> On 19/01/2016 19:20, Alan Somers wrote:
> >>> The thing is, it never really worked in the first place.  Panics and
> >>> deadlocks are so frequent that I don't think the feature was usable
> >>> for anybody.
> >>
> >> The feature is perfectly usable for me.  I have never run into the problems that
> >> you describe.  Why not fix the real bugs that you've run into?
> > 
> > Spectra Logic and iXSystems both experienced many problems with this.
> > The worst is a deadlock that can be triggered simply by pulling a
> > drive from a redundant pool when there exists a zvol anywhere in the
> > system (see https://reviews.freebsd.org/D4998 for a quick way to
> > reproduce).  Fixing it correctly would likely require far more time
> > than I have available.  I just want the bugs to go away.  See that
> > same code review for a change to make the feature optional.
> 
> I think that we all want all the bugs to go way.  One way to remove bugs is to
> remove (disable) code that contains bugs.  That way the perfect bug-free
> software is clearly achievable :-)  Unfortunately, that technique is not always
> welcomed.
> 
> P.S.
> I think that the real problem here is that a method of a geom must never drop
> topology_lock.  In other words, the GEOM management code (like g_xxx() stuff in
> geom_subr.c) expects that a topology can not change underneath it.  But
> zvol_geom_access() clearly breaks that contract.

May be same cause problem with swap on zvol (don't test on latest
-stable)?

From owner-svn-src-all@freebsd.org  Thu Jan 21 11:54:36 2016
Return-Path: <owner-svn-src-all@freebsd.org>
Delivered-To: svn-src-all@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id 54DD8A8B5D7;
 Thu, 21 Jan 2016 11:54:36 +0000 (UTC) (envelope-from des@FreeBSD.org)
Received: from repo.freebsd.org (repo.freebsd.org
 [IPv6:2610:1c1:1:6068::e6a:0])
 (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
 (Client did not present a certificate)
 by mx1.freebsd.org (Postfix) with ESMTPS id 182921D83;
 Thu, 21 Jan 2016 11:54:36 +0000 (UTC) (envelope-from des@FreeBSD.org)
Received: from repo.freebsd.org ([127.0.1.37])
 by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u0LBsZlM096121;
 Thu, 21 Jan 2016 11:54:35 GMT (envelope-from des@FreeBSD.org)
Received: (from des@localhost)
 by repo.freebsd.org (8.15.2/8.15.2/Submit) id u0LBsZut096119;
 Thu, 21 Jan 2016 11:54:35 GMT (envelope-from des@FreeBSD.org)
Message-Id: <201601211154.u0LBsZut096119@repo.freebsd.org>
X-Authentication-Warning: repo.freebsd.org: des set sender to des@FreeBSD.org
 using -f
From: =?UTF-8?Q?Dag-Erling_Sm=c3=b8rgrav?= <des@FreeBSD.org>
Date: Thu, 21 Jan 2016 11:54:35 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-head@freebsd.org
Subject: svn commit: r294496 - in head/crypto/openssh: . contrib
 contrib/redhat contrib/suse
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.20
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for &quot;
 user&quot; and &quot; projects&quot; \)" <svn-src-all.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-all/>
List-Post: <mailto:svn-src-all@freebsd.org>
List-Help: <mailto:svn-src-all-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Thu, 21 Jan 2016 11:54:36 -0000

Author: des
Date: Thu Jan 21 11:54:34 2016
New Revision: 294496
URL: https://svnweb.freebsd.org/changeset/base/294496

Log:
  Upgrade to OpenSSH 7.1p2.

Modified:
  head/crypto/openssh/ChangeLog
  head/crypto/openssh/README
  head/crypto/openssh/auth.c
  head/crypto/openssh/bitmap.c
  head/crypto/openssh/compat.c
  head/crypto/openssh/contrib/README
  head/crypto/openssh/contrib/redhat/openssh.spec
  head/crypto/openssh/contrib/suse/openssh.spec
  head/crypto/openssh/dns.c
  head/crypto/openssh/kex.c
  head/crypto/openssh/mux.c
  head/crypto/openssh/packet.c
  head/crypto/openssh/sftp-server.c
  head/crypto/openssh/sftp.c
  head/crypto/openssh/ssh-keygen.1
  head/crypto/openssh/ssh-keygen.c
  head/crypto/openssh/ssh-pkcs11-helper.c
  head/crypto/openssh/ssh_config
  head/crypto/openssh/ssh_config.5
  head/crypto/openssh/sshbuf-getput-crypto.c
  head/crypto/openssh/sshbuf-misc.c
  head/crypto/openssh/sshbuf.c
  head/crypto/openssh/sshconnect.c
  head/crypto/openssh/sshd.c
  head/crypto/openssh/sshd_config
  head/crypto/openssh/sshd_config.5
  head/crypto/openssh/sshkey.c
  head/crypto/openssh/version.h
Directory Properties:
  head/crypto/openssh/   (props changed)

Modified: head/crypto/openssh/ChangeLog
==============================================================================
--- head/crypto/openssh/ChangeLog	Thu Jan 21 11:10:14 2016	(r294495)
+++ head/crypto/openssh/ChangeLog	Thu Jan 21 11:54:34 2016	(r294496)
@@ -1,3 +1,204 @@
+commit c88ac102f0eb89f2eaa314cb2e2e0ca3c890c443
+Author: Damien Miller <djm@mindrot.org>
+Date:   Thu Jan 14 11:08:19 2016 +1100
+
+    bump version numbers
+
+commit 302bc21e6fadacb04b665868cd69b625ef69df90
+Author: Damien Miller <djm@mindrot.org>
+Date:   Thu Jan 14 11:04:04 2016 +1100
+
+    openssh-7.1p2
+
+commit 6b33763242c063e4e0593877e835eeb1fd1b60aa
+Author: Damien Miller <djm@mindrot.org>
+Date:   Thu Jan 14 11:02:58 2016 +1100
+
+    forcibly disable roaming support in the client
+
+commit 34d364f0d2e1e30a444009f0e04299bb7c94ba13
+Author: djm@openbsd.org <djm@openbsd.org>
+Date:   Mon Oct 5 17:11:21 2015 +0000
+
+    upstream commit
+    
+    some more bzero->explicit_bzero, from Michael McConville
+    
+    Upstream-ID: 17f19545685c33327db2efdc357c1c9225ff00d0
+
+commit 8f5b93026797b9f7fba90d0c717570421ccebbd3
+Author: guenther@openbsd.org <guenther@openbsd.org>
+Date:   Fri Sep 11 08:50:04 2015 +0000
+
+    upstream commit
+    
+    Use explicit_bzero() when zeroing before free()
+    
+    from Michael McConville (mmcconv1 (at) sccs.swarthmore.edu)
+    ok millert@ djm@
+    
+    Upstream-ID: 2e3337db046c3fe70c7369ee31515ac73ec00f50
+
+commit d77148e3a3ef6c29b26ec74331455394581aa257
+Author: djm@openbsd.org <djm@openbsd.org>
+Date:   Sun Nov 8 21:59:11 2015 +0000
+
+    upstream commit
+    
+    fix OOB read in packet code caused by missing return
+     statement found by Ben Hawkes; ok markus@ deraadt@
+    
+    Upstream-ID: a3e3a85434ebfa0690d4879091959591f30efc62
+
+commit 076d849e17ab12603627f87b301e2dca71bae518
+Author: Damien Miller <djm@mindrot.org>
+Date:   Sat Nov 14 18:44:49 2015 +1100
+
+    read back from libcrypto RAND when privdropping
+    
+    makes certain libcrypto implementations cache a /dev/urandom fd
+    in preparation of sandboxing. Based on patch by Greg Hartman.
+
+commit f72adc0150011a28f177617a8456e1f83733099d
+Author: djm@openbsd.org <djm@openbsd.org>
+Date:   Sun Dec 13 22:42:23 2015 +0000
+
+    upstream commit
+    
+    unbreak connections with peers that set
+     first_kex_follows; fix from Matt Johnston va bz#2515
+    
+    Upstream-ID: decc88ec4fc7515594fdb42b04aa03189a44184b
+
+commit 04bd8d019ccd906cac1a2b362517b8505f3759e6
+Author: djm@openbsd.org <djm@openbsd.org>
+Date:   Tue Jan 12 23:42:54 2016 +0000
+
+    upstream commit
+    
+    use explicit_bzero() more liberally in the buffer code; ok
+     deraadt
+    
+    Upstream-ID: 0ece37069fd66bc6e4f55eb1321f93df372b65bf
+
+commit e91346dc2bbf460246df2ab591b7613908c1b0ad
+Author: Damien Miller <djm@mindrot.org>
+Date:   Fri Aug 21 14:49:03 2015 +1000
+
+    we don't use Github for issues/pull-requests
+
+commit a4f5b507c708cc3dc2c8dd2d02e4416d7514dc23
+Author: Damien Miller <djm@mindrot.org>
+Date:   Fri Aug 21 14:43:55 2015 +1000
+
+    fix URL for connect.c
+
+commit d026a8d3da0f8186598442997c7d0a28e7275414
+Author: Damien Miller <djm@mindrot.org>
+Date:   Fri Aug 21 13:47:10 2015 +1000
+
+    update version numbers for 7.1
+
+commit 78f8f589f0ca1c9f41e5a9bae3cda5ce8a6b42ed
+Author: djm@openbsd.org <djm@openbsd.org>
+Date:   Fri Aug 21 03:45:26 2015 +0000
+
+    upstream commit
+    
+    openssh-7.1
+    
+    Upstream-ID: ff7b1ef4b06caddfb45e08ba998128c88be3d73f
+
+commit 32a181980c62fce94f7f9ffaf6a79d90f0c309cf
+Author: djm@openbsd.org <djm@openbsd.org>
+Date:   Fri Aug 21 03:42:19 2015 +0000
+
+    upstream commit
+    
+    fix inverted logic that broke PermitRootLogin; reported
+     by Mantas Mikulenas; ok markus@
+    
+    Upstream-ID: 260dd6a904c1bb7e43267e394b1c9cf70bdd5ea5
+
+commit ce445b0ed927e45bd5bdce8f836eb353998dd65c
+Author: deraadt@openbsd.org <deraadt@openbsd.org>
+Date:   Thu Aug 20 22:32:42 2015 +0000
+
+    upstream commit
+    
+    Do not cast result of malloc/calloc/realloc* if stdlib.h
+     is in scope ok krw millert
+    
+    Upstream-ID: 5e50ded78cadf3841556649a16cc4b1cb6c58667
+
+commit 05291e5288704d1a98bacda269eb5a0153599146
+Author: naddy@openbsd.org <naddy@openbsd.org>
+Date:   Thu Aug 20 19:20:06 2015 +0000
+
+    upstream commit
+    
+    In the certificates section, be consistent about using
+     "host_key" and "user_key" for the respective key types.  ok sthen@ deraadt@
+    
+    Upstream-ID: 9e037ea3b15577b238604c5533e082a3947f13cb
+
+commit 8543d4ef6f2e9f98c3e6b77c894ceec30c5e4ae4
+Author: djm@openbsd.org <djm@openbsd.org>
+Date:   Wed Aug 19 23:21:42 2015 +0000
+
+    upstream commit
+    
+    Better compat matching for WinSCP, add compat matching
+     for FuTTY (fork of PuTTY); ok markus@ deraadt@
+    
+    Upstream-ID: 24001d1ac115fa3260fbdc329a4b9aeb283c5389
+
+commit ec6eda16ebab771aa3dfc90629b41953b999cb1e
+Author: djm@openbsd.org <djm@openbsd.org>
+Date:   Wed Aug 19 23:19:01 2015 +0000
+
+    upstream commit
+    
+    fix double-free() in error path of DSA key generation
+     reported by Mateusz Kocielski; ok markus@
+    
+    Upstream-ID: 4735d8f888b10599a935fa1b374787089116713c
+
+commit 45b0eb752c94954a6de046bfaaf129e518ad4b5b
+Author: djm@openbsd.org <djm@openbsd.org>
+Date:   Wed Aug 19 23:18:26 2015 +0000
+
+    upstream commit
+    
+    fix free() of uninitialised pointer reported by Mateusz
+     Kocielski; ok markus@
+    
+    Upstream-ID: 519552b050618501a06b7b023de5cb104e2c5663
+
+commit c837643b93509a3ef538cb6624b678c5fe32ff79
+Author: djm@openbsd.org <djm@openbsd.org>
+Date:   Wed Aug 19 23:17:51 2015 +0000
+
+    upstream commit
+    
+    fixed unlink([uninitialised memory]) reported by Mateusz
+     Kocielski; ok markus@
+    
+    Upstream-ID: 14a0c4e7d891f5a8dabc4b89d4f6b7c0d5a20109
+
+commit 1f8d3d629cd553031021068eb9c646a5f1e50994
+Author: jmc@openbsd.org <jmc@openbsd.org>
+Date:   Fri Aug 14 15:32:41 2015 +0000
+
+    upstream commit
+    
+    match myproposal.h order; from brian conway (i snuck in a
+     tweak while here)
+    
+    ok dtucker
+    
+    Upstream-ID: 35174a19b5237ea36aa3798f042bf5933b772c67
+
 commit 1dc8d93ce69d6565747eb44446ed117187621b26
 Author: deraadt@openbsd.org <deraadt@openbsd.org>
 Date:   Thu Aug 6 14:53:21 2015 +0000
@@ -7412,1735 +7613,3 @@ Date:   Thu Jan 16 18:42:10 2014 +1100
          [sftp-client.c]
          needless and incorrect cast to size_t can break resumption of
          large download; patch from tobias@
-
-commit 91b580e4bec55118bf96ab3cdbe5a50839e75d0a
-Author: Damien Miller <djm@mindrot.org>
-Date:   Sun Jan 12 19:21:22 2014 +1100
-
-       - djm@cvs.openbsd.org 2014/01/12 08:13:13
-         [bufaux.c buffer.h kex.c kex.h kexc25519.c kexc25519c.c kexc25519s.c]
-         [kexdhc.c kexdhs.c kexecdhc.c kexecdhs.c kexgexc.c kexgexs.c]
-         avoid use of OpenSSL BIGNUM type and functions for KEX with
-         Curve25519 by adding a buffer_put_bignum2_from_string() that stores
-         a string using the bignum encoding rules. Will make it easier to
-         build a reduced-feature OpenSSH without OpenSSL in the future;
-         ok markus@
-
-commit af5d4481f4c7c8c3c746e68b961bb85ef907800e
-Author: Damien Miller <djm@mindrot.org>
-Date:   Sun Jan 12 19:20:47 2014 +1100
-
-       - djm@cvs.openbsd.org 2014/01/10 05:59:19
-         [sshd_config]
-         the /etc/ssh/ssh_host_ed25519_key is loaded by default too
-
-commit 58cd63bc63038acddfb4051ed14e11179d8f4941
-Author: Damien Miller <djm@mindrot.org>
-Date:   Fri Jan 10 10:59:24 2014 +1100
-
-       - djm@cvs.openbsd.org 2014/01/09 23:26:48
-         [sshconnect.c sshd.c]
-         ban clients/servers that suffer from SSH_BUG_DERIVEKEY, they are ancient,
-         deranged and might make some attacks on KEX easier; ok markus@
-
-commit b3051d01e505c9c2dc00faab472a0d06fa6b0e65
-Author: Damien Miller <djm@mindrot.org>
-Date:   Fri Jan 10 10:58:53 2014 +1100
-
-       - djm@cvs.openbsd.org 2014/01/09 23:20:00
-         [digest.c digest.h hostfile.c kex.c kex.h kexc25519.c kexc25519c.c]
-         [kexc25519s.c kexdh.c kexecdh.c kexecdhc.c kexecdhs.c kexgex.c kexgexc.c]
-         [kexgexs.c key.c key.h roaming_client.c roaming_common.c schnorr.c]
-         [schnorr.h ssh-dss.c ssh-ecdsa.c ssh-rsa.c sshconnect2.c]
-         Introduce digest API and use it to perform all hashing operations
-         rather than calling OpenSSL EVP_Digest* directly. Will make it easier
-         to build a reduced-feature OpenSSH without OpenSSL in future;
-         feedback, ok markus@
-
-commit e00e413dd16eb747fb2c15a099971d91c13cf70f
-Author: Damien Miller <djm@mindrot.org>
-Date:   Fri Jan 10 10:40:45 2014 +1100
-
-       - guenther@cvs.openbsd.org 2014/01/09 03:26:00
-         [sftp-common.c]
-         When formating the time for "ls -l"-style output, show dates in the future
-         with the year, and rearrange a comparison to avoid a potentional signed
-         arithmetic overflow that would give the wrong result.
-    
-         ok djm@
-
-commit 3e49853650448883685cfa32fa382d0ba6d51d48
-Author: Damien Miller <djm@mindrot.org>
-Date:   Fri Jan 10 10:37:05 2014 +1100
-
-       - tedu@cvs.openbsd.org 2014/01/04 17:50:55
-         [mac.c monitor_mm.c monitor_mm.h xmalloc.c]
-         use standard types and formats for size_t like variables. ok dtucker
-
-commit a9c1e500ef609795cbc662848edb1a1dca279c81
-Author: Damien Miller <djm@mindrot.org>
-Date:   Wed Jan 8 16:13:12 2014 +1100
-
-     - (djm) [regress/.cvsignore] Ignore regress test droppings; ok dtucker@
-
-commit 324541e5264e1489ca0babfaf2b39612eb80dfb3
-Author: Damien Miller <djm@mindrot.org>
-Date:   Tue Dec 31 12:25:40 2013 +1100
-
-       - djm@cvs.openbsd.org 2013/12/30 23:52:28
-         [auth2-hostbased.c auth2-pubkey.c compat.c compat.h ssh-rsa.c]
-         [sshconnect.c sshconnect2.c sshd.c]
-         refuse RSA keys from old proprietary clients/servers that use the
-         obsolete RSA+MD5 signature scheme. it will still be possible to connect
-         with these clients/servers but only DSA keys will be accepted, and we'll
-         deprecate them entirely in a future release. ok markus@
-
-commit 9f4c8e797ea002a883307ca906f1f1f815010e78
-Author: Damien Miller <djm@mindrot.org>
-Date:   Sun Dec 29 17:57:46 2013 +1100
-
-     - (djm) [regress/Makefile] Add some generated files for cleaning
-
-commit 106bf1ca3c7a5fdc34f9fd7a1fe651ca53085bc5
-Author: Damien Miller <djm@mindrot.org>
-Date:   Sun Dec 29 17:54:03 2013 +1100
-
-       - djm@cvs.openbsd.org 2013/12/29 05:57:02
-         [sshconnect.c]
-         when showing other hostkeys, don't forget Ed25519 keys
-
-commit 0fa47cfb32c239117632cab41e4db7d3e6de5e91
-Author: Damien Miller <djm@mindrot.org>
-Date:   Sun Dec 29 17:53:39 2013 +1100
-
-       - djm@cvs.openbsd.org 2013/12/29 05:42:16
-         [ssh.c]
-         don't forget to load Ed25519 certs too
-
-commit b9a95490daa04cc307589897f95bfaff324ad2c9
-Author: Damien Miller <djm@mindrot.org>
-Date:   Sun Dec 29 17:50:15 2013 +1100
-
-       - djm@cvs.openbsd.org 2013/12/29 04:35:50
-         [authfile.c]
-         don't refuse to load Ed25519 certificates
-
-commit f72cdde6e6fabc51d2a62f4e75b8b926d9d7ee89
-Author: Damien Miller <djm@mindrot.org>
-Date:   Sun Dec 29 17:49:55 2013 +1100
-
-       - djm@cvs.openbsd.org 2013/12/29 04:29:25
-         [authfd.c]
-         allow deletion of ed25519 keys from the agent
-
-commit 29ace1cb68cc378a464c72c0fd67aa5f9acd6b5b
-Author: Damien Miller <djm@mindrot.org>
-Date:   Sun Dec 29 17:49:31 2013 +1100
-
-       - djm@cvs.openbsd.org 2013/12/29 04:20:04
-         [key.c]
-         to make sure we don't omit any key types as valid CA keys again,
-         factor the valid key type check into a key_type_is_valid_ca()
-         function
-
-commit 9de4fcdc5a9cff48d49a3e2f6194d3fb2d7ae34d
-Author: Damien Miller <djm@mindrot.org>
-Date:   Sun Dec 29 17:49:13 2013 +1100
-
-       - djm@cvs.openbsd.org 2013/12/29 02:49:52
-         [key.c]
-         correct comment for key_drop_cert()
-
-commit 5baeacf8a80f054af40731c6f92435f9164b8e02
-Author: Damien Miller <djm@mindrot.org>
-Date:   Sun Dec 29 17:48:55 2013 +1100
-
-       - djm@cvs.openbsd.org 2013/12/29 02:37:04
-         [key.c]
-         correct comment for key_to_certified()
-
-commit 83f2fe26cb19330712c952eddbd3c0b621674adc
-Author: Damien Miller <djm@mindrot.org>
-Date:   Sun Dec 29 17:48:38 2013 +1100
-
-       - djm@cvs.openbsd.org 2013/12/29 02:28:10
-         [key.c]
-         allow ed25519 keys to appear as certificate authorities
-
-commit 06122e9a74bb488b0fe0a8f64e1135de870f9cc0
-Author: Damien Miller <djm@mindrot.org>
-Date:   Sun Dec 29 17:48:15 2013 +1100
-
-       - djm@cvs.openbsd.org 2013/12/27 22:37:18
-         [ssh-rsa.c]
-         correct comment
-
-commit 3e19295c3a253c8dc8660cf45baad7f45fccb969
-Author: Damien Miller <djm@mindrot.org>
-Date:   Sun Dec 29 17:47:50 2013 +1100
-
-       - djm@cvs.openbsd.org 2013/12/27 22:30:17
-         [ssh-dss.c ssh-ecdsa.c ssh-rsa.c]
-         make the original RSA and DSA signing/verification code look more like
-         the ECDSA/Ed25519 ones: use key_type_plain() when checking the key type
-         rather than tediously listing all variants, use __func__ for debug/
-         error messages
-
-commit 137977180be6254639e2c90245763e6965f8d815
-Author: Damien Miller <djm@mindrot.org>
-Date:   Sun Dec 29 17:47:14 2013 +1100
-
-       - tedu@cvs.openbsd.org 2013/12/21 07:10:47
-         [ssh-keygen.1]
-         small typo
-
-commit 339a48fe7ffb3186d22bbaa9efbbc3a053e602fd
-Author: Damien Miller <djm@mindrot.org>
-Date:   Sun Dec 29 17:46:49 2013 +1100
-
-       - djm@cvs.openbsd.org 2013/12/19 22:57:13
-         [poly1305.c poly1305.h]
-         use full name for author, with his permission
-
-commit 0b36c83148976c7c8268f4f41497359e2fb26251
-Author: Damien Miller <djm@mindrot.org>
-Date:   Sun Dec 29 17:45:51 2013 +1100
-
-       - djm@cvs.openbsd.org 2013/12/19 01:19:41
-         [ssh-agent.c]
-         bz#2186: don't crash (NULL deref) when deleting PKCS#11 keys from an agent
-         that has a mix of normal and PKCS#11 keys; fix from jay AT slushpupie.com;
-         ok dtucker
-
-commit 4def184e9b6c36be6d965a9705632fc4c0c2a8af
-Author: Damien Miller <djm@mindrot.org>
-Date:   Sun Dec 29 17:45:26 2013 +1100
-
-       - djm@cvs.openbsd.org 2013/12/19 01:04:36
-         [channels.c]
-         bz#2147: fix multiple remote forwardings with dynamically assigned
-         listen ports. In the s->c message to open the channel we were sending
-         zero (the magic number to request a dynamic port) instead of the actual
-         listen port. The client therefore had no way of discriminating between
-         them.
-    
-         Diagnosis and fix by ronf AT timeheart.net
-
-commit bf25d114e23a803f8feca8926281b1aaedb6191b
-Author: Damien Miller <djm@mindrot.org>
-Date:   Sun Dec 29 17:44:56 2013 +1100
-
-       - djm@cvs.openbsd.org 2013/12/19 00:27:57
-         [auth-options.c]
-         simplify freeing of source-address certificate restriction
-
-commit bb3dafe7024a5b4e851252e65ee35d45b965e4a8
-Author: Damien Miller <djm@mindrot.org>
-Date:   Sun Dec 29 17:44:29 2013 +1100
-
-       - dtucker@cvs.openbsd.org 2013/12/19 00:19:12
-         [serverloop.c]
-         Cast client_alive_interval to u_int64_t before assinging to
-         max_time_milliseconds to avoid potential integer overflow in the timeout.
-         bz#2170, patch from Loganaden Velvindron, ok djm@
-
-commit ef275ead3dcadde4db1efe7a0aa02b5e618ed40c
-Author: Damien Miller <djm@mindrot.org>
-Date:   Sun Dec 29 17:44:07 2013 +1100
-
-       - djm@cvs.openbsd.org 2013/12/19 00:10:30
-         [ssh-add.c]
-         skip requesting smartcard PIN when removing keys from agent; bz#2187
-         patch from jay AT slushpupie.com; ok dtucker
-
-commit 7d97fd9a1cae778c3eacf16e09f5da3689d616c6
-Author: Damien Miller <djm@mindrot.org>
-Date:   Sun Dec 29 17:40:18 2013 +1100
-
-     - (djm) [loginrec.c] Check for username truncation when looking up lastlog
-       entries
-
-commit 77244afe3b6d013b485e0952eaab89b9db83380f
-Author: Darren Tucker <dtucker@zip.com.au>
-Date:   Sat Dec 21 17:02:39 2013 +1100
-
-    20131221
-     - (dtucker) [regress/keytype.sh] Actually test ecdsa key types.
-
-commit 53f8e784dc431a82d31c9b0e95b144507f9330e9
-Author: Darren Tucker <dtucker@zip.com.au>
-Date:   Thu Dec 19 11:31:44 2013 +1100
-
-     - (dtucker) [auth-pam.c] bz#2163: check return value from pam_get_item().
-       Patch from Loganaden Velvindron.
-
-commit 1fcec9d4f265e38af248c4c845986ca8c174bd68
-Author: Darren Tucker <dtucker@zip.com.au>
-Date:   Thu Dec 19 11:00:12 2013 +1100
-
-     - (dtucker) [configure.ac] bz#2178: Don't try to use BSM on Solaris versions
-       greater than 11 either rather than just 11.  Patch from Tomas Kuthan.
-
-commit 6674eb9683afd1ea4eb35670b5e66815543a759e
-Author: Damien Miller <djm@mindrot.org>
-Date:   Wed Dec 18 17:50:39 2013 +1100
-
-       - markus@cvs.openbsd.org 2013/12/17 10:36:38
-         [crypto_api.h]
-         I've assempled the header file by cut&pasting from generated headers
-         and the source files.
-
-commit d58a5964426ee014384d67d775d16712e93057f3
-Author: Damien Miller <djm@mindrot.org>
-Date:   Wed Dec 18 17:50:13 2013 +1100
-
-       - djm@cvs.openbsd.org 2013/12/15 21:42:35
-         [cipher-chachapoly.c]
-         add some comments and constify a constant
-
-commit 059321d19af24d87420de3193f79dfab23556078
-Author: Damien Miller <djm@mindrot.org>
-Date:   Wed Dec 18 17:49:48 2013 +1100
-
-       - pascal@cvs.openbsd.org 2013/12/15 18:17:26
-         [ssh-add.c]
-         Make ssh-add also add .ssh/id_ed25519; fixes lie in manual page.
-         ok markus@
-
-commit 155b5a5bf158767f989215479ded2a57f331e1c6
-Author: Damien Miller <djm@mindrot.org>
-Date:   Wed Dec 18 17:48:32 2013 +1100
-
-       - markus@cvs.openbsd.org 2013/12/09 11:08:17
-         [crypto_api.h]
-         remove unused defines
-
-commit 8a56dc2b6b48b05590810e7f4c3567508410000c
-Author: Damien Miller <djm@mindrot.org>
-Date:   Wed Dec 18 17:48:11 2013 +1100
-
-       - markus@cvs.openbsd.org 2013/12/09 11:03:45
-         [blocks.c ed25519.c fe25519.c fe25519.h ge25519.c ge25519.h]
-         [ge25519_base.data hash.c sc25519.c sc25519.h verify.c]
-         Add Authors for the public domain ed25519/nacl code.
-         see also http://nacl.cr.yp.to/features.html
-            All of the NaCl software is in the public domain.
-         and http://ed25519.cr.yp.to/software.html
-            The Ed25519 software is in the public domain.
-
-commit 6575c3acf31fca117352f31f37b16ae46e664837
-Author: Damien Miller <djm@mindrot.org>
-Date:   Wed Dec 18 17:47:02 2013 +1100
-
-       - dtucker@cvs.openbsd.org 2013/12/08 09:53:27
-         [sshd_config.5]
-         Use a literal for the default value of KEXAlgorithms.  ok deraadt jmc
-
-commit 8ba0ead6985ea14999265136b14ffd5aeec516f9
-Author: Damien Miller <djm@mindrot.org>
-Date:   Wed Dec 18 17:46:27 2013 +1100
-
-       - naddy@cvs.openbsd.org 2013/12/07 11:58:46
-         [ssh-add.1 ssh-agent.1 ssh-keygen.1 ssh-keyscan.1 ssh-keysign.8 ssh.1]
-         [ssh_config.5 sshd.8 sshd_config.5]
-         add missing mentions of ed25519; ok djm@
-
-commit 4f752cf71cf44bf4bc777541156c2bf56daf9ce9
-Author: Damien Miller <djm@mindrot.org>
-Date:   Wed Dec 18 17:45:35 2013 +1100
-
-       - djm@cvs.openbsd.org 2013/12/07 08:08:26
-         [ssh-keygen.1]
-         document -a and -o wrt new key format
-
-commit 6d6fcd14e23a9053198342bb379815b15e504084
-Author: Damien Miller <djm@mindrot.org>
-Date:   Sun Dec 8 15:53:28 2013 +1100
-
-     - (djm) [Makefile.in regress/Makefile regress/agent-ptrace.sh]
-       [regress/setuid-allowed.c] Check that ssh-agent is not on a no-setuid
-       filesystem before running agent-ptrace.sh; ok dtucker
-
-commit 7e6e42fb532c7dafd7078ef5e9e2d3e47fcf6752
-Author: Damien Miller <djm@mindrot.org>
-Date:   Sun Dec 8 08:23:08 2013 +1100
-
-     - (djm) [openbsd-compat/bsd-setres_id.c] Missing header; from Corinna
-        Vinschen
-
-commit da3ca351b49d52ae85db2e3998265dc3c6617068
-Author: Damien Miller <djm@mindrot.org>
-Date:   Sat Dec 7 21:43:46 2013 +1100
-
-     - (djm) [Makefile.in] PATHSUBS and keygen bits for Ed25519; from
-        Loganaden Velvindron @ AfriNIC in bz#2179
-
-commit eb401585bb8336cbf81fe4fc58eb9f7cac3ab874
-Author: Damien Miller <djm@mindrot.org>
-Date:   Sat Dec 7 17:07:15 2013 +1100
-
-     - (djm) [regress/cert-hostkey.sh] Fix merge botch
-
-commit f54542af3ad07532188b10136ae302314ec69ed6
-Author: Damien Miller <djm@mindrot.org>
-Date:   Sat Dec 7 16:32:44 2013 +1100
-
-       - markus@cvs.openbsd.org 2013/12/06 13:52:46
-         [regress/Makefile regress/agent.sh regress/cert-hostkey.sh]
-         [regress/cert-userkey.sh regress/keytype.sh]
-         test ed25519 support; from djm@
-
-commit f104da263de995f66b6861b4f3368264ee483d7f
-Author: Damien Miller <djm@mindrot.org>
-Date:   Sat Dec 7 12:37:53 2013 +1100
-
-     - (djm) [ed25519.c ssh-ed25519.c openbsd-compat/Makefile.in]
-        [openbsd-compat/bcrypt_pbkdf.c] Make ed25519/new key format compile on
-           Linux
-
-commit 1ff130dac9b7aea0628f4ad30683431fe35e0020
-Author: Damien Miller <djm@mindrot.org>
-Date:   Sat Dec 7 11:51:51 2013 +1100
-
-     - [configure.ac openbsd-compat/Makefile.in openbsd-compat/bcrypt_pbkdf.c]
-       [openbsd-compat/blf.h openbsd-compat/blowfish.c]
-       [openbsd-compat/openbsd-compat.h] Start at supporting bcrypt_pbkdf in
-       portable.
-
-commit 4260828a2958ebe8c96f66d8301dac53f4cde556
-Author: Damien Miller <djm@mindrot.org>
-Date:   Sat Dec 7 11:38:03 2013 +1100
-
-     - [authfile.c] Conditionalise inclusion of util.h
-
-commit a913442bac8a26fd296a3add51293f8f6f9b3b4c
-Author: Damien Miller <djm@mindrot.org>
-Date:   Sat Dec 7 11:35:36 2013 +1100
-
-     - [Makefile.in] Add ed25519 sources
-
-commit ca570a519cb846da61d002c7f46fa92e39c83e45
-Author: Damien Miller <djm@mindrot.org>
-Date:   Sat Dec 7 11:29:09 2013 +1100
-
-       - djm@cvs.openbsd.org 2013/12/07 00:19:15
-         [key.c]
-         set k->cert = NULL after freeing it
-
-commit 3cccc0e155229a2f2d86b6df40bd4559b4f960ff
-Author: Damien Miller <djm@mindrot.org>
-Date:   Sat Dec 7 11:27:47 2013 +1100
-
-     - [blocks.c ed25519.c fe25519.c fe25519.h ge25519.c ge25519.h]
-       [ge25519_base.data hash.c sc25519.c sc25519.h verify.c] Fix RCS idents
-
-commit a7827c11b3f0380b7e593664bd62013ff9c131db
-Author: Damien Miller <djm@mindrot.org>
-Date:   Sat Dec 7 11:24:30 2013 +1100
-
-       - jmc@cvs.openbsd.org 2013/12/06 15:29:07
-         [sshd.8]
-         missing comma;
-
-commit 5be9d9e3cbd9c66f24745d25bf2e809c1d158ee0
-Author: Damien Miller <djm@mindrot.org>
-Date:   Sat Dec 7 11:24:01 2013 +1100
-
-       - markus@cvs.openbsd.org 2013/12/06 13:39:49
-         [authfd.c authfile.c key.c key.h myproposal.h pathnames.h readconf.c]
-         [servconf.c ssh-agent.c ssh-keygen.c ssh-keyscan.1 ssh-keyscan.c]
-         [ssh-keysign.c ssh.c ssh_config.5 sshd.8 sshd.c verify.c ssh-ed25519.c]
-         [sc25519.h sc25519.c hash.c ge25519_base.data ge25519.h ge25519.c]
-         [fe25519.h fe25519.c ed25519.c crypto_api.h blocks.c]
-         support ed25519 keys (hostkeys and user identities) using the public
-         domain ed25519 reference code from SUPERCOP, see
-         http://ed25519.cr.yp.to/software.html
-         feedback, help & ok djm@
-
-commit bcd00abd8451f36142ae2ee10cc657202149201e
-Author: Damien Miller <djm@mindrot.org>
-Date:   Sat Dec 7 10:41:55 2013 +1100
-
-       - markus@cvs.openbsd.org 2013/12/06 13:34:54
-         [authfile.c authfile.h cipher.c cipher.h key.c packet.c ssh-agent.c]
-         [ssh-keygen.c PROTOCOL.key] new private key format, bcrypt as KDF by
-         default; details in PROTOCOL.key; feedback and lots help from djm;
-         ok djm@
-
-commit f0e9060d236c0e38bec2fa1c6579fb0a2ea6458d
-Author: Damien Miller <djm@mindrot.org>
-Date:   Sat Dec 7 10:40:26 2013 +1100
-
-       - markus@cvs.openbsd.org 2013/12/06 13:30:08
-         [authfd.c key.c key.h ssh-agent.c]
-         move private key (de)serialization to key.c; ok djm
-
-commit 0f8536da23a6ef26e6495177c0d8a4242b710289
-Author: Damien Miller <djm@mindrot.org>
-Date:   Sat Dec 7 10:31:37 2013 +1100
-
-       - djm@cvs.openbsd.org 2013/12/06 03:40:51
-         [ssh-keygen.c]
-         remove duplicated character ('g') in getopt() string;
-         document the (few) remaining option characters so we don't have to
-         rummage next time.
-
-commit 393920745fd328d3fe07f739a3cf7e1e6db45b60
-Author: Damien Miller <djm@mindrot.org>
-Date:   Sat Dec 7 10:31:08 2013 +1100
-
-       - djm@cvs.openbsd.org 2013/12/05 22:59:45
-         [sftp-client.c]
-         fix memory leak in error path in do_readdir(); pointed out by
-         Loganaden Velvindron @ AfriNIC in bz#2163
-
-commit 534b2ccadea5e5e9a8b27226e6faac3ed5552e97
-Author: Damien Miller <djm@mindrot.org>
-Date:   Thu Dec 5 14:07:27 2013 +1100
-
-       - djm@cvs.openbsd.org 2013/12/05 01:16:41
-         [servconf.c servconf.h]
-         bz#2161 - fix AuthorizedKeysCommand inside a Match block and
-         rearrange things so the same error is harder to make next time;
-         with and ok dtucker@
-
-commit 8369c8e61a3408ec6bb75755fad4ffce29b5fdbe
-Author: Darren Tucker <dtucker@zip.com.au>
-Date:   Thu Dec 5 11:00:16 2013 +1100
-
-     - (dtucker) [configure.ac] bz#2173: use pkg-config --libs to include correct
-       -L location for libedit.  Patch from Serge van den Boom.
-
-commit 9275df3e0a2a3bc3897f7d664ea86a425c8a092d
-Author: Damien Miller <djm@mindrot.org>
-Date:   Thu Dec 5 10:26:32 2013 +1100
-
-       - djm@cvs.openbsd.org 2013/12/04 04:20:01
-         [sftp-client.c]
-         bz#2171: don't leak local_fd on error; from Loganaden Velvindron @
-         AfriNIC
-
-commit 960f6a2b5254e4da082d8aa3700302ed12dc769a
-Author: Damien Miller <djm@mindrot.org>
-Date:   Thu Dec 5 10:26:14 2013 +1100
-
-       - djm@cvs.openbsd.org 2013/12/02 03:13:14
-         [cipher.c]
-         correct bzero of chacha20+poly1305 key context. bz#2177 from
-         Loganaden Velvindron @ AfriNIC
-    
-         Also make it a memset for consistency with the rest of cipher.c
-
-commit f7e8a8796d661c9d6692ab837e1effd4f5ada1c2
-Author: Damien Miller <djm@mindrot.org>
-Date:   Thu Dec 5 10:25:51 2013 +1100
-
-       - djm@cvs.openbsd.org 2013/12/02 03:09:22
-         [key.c]
-         make key_to_blob() return a NULL blob on failure; part of
-         bz#2175 from Loganaden Velvindron @ AfriNIC
-
-commit f1e44ea9d9a6d4c1a95a0024132e603bd1778c9c
-Author: Damien Miller <djm@mindrot.org>
-Date:   Thu Dec 5 10:23:21 2013 +1100
-
-       - djm@cvs.openbsd.org 2013/12/02 02:56:17
-         [ssh-pkcs11-helper.c]
-         use-after-free; bz#2175 patch from Loganaden Velvindron @ AfriNIC
-
-commit 114e540b15d57618f9ebf624264298f80bbd8c77
-Author: Damien Miller <djm@mindrot.org>
-Date:   Thu Dec 5 10:22:57 2013 +1100
-
-       - djm@cvs.openbsd.org 2013/12/02 02:50:27
-         [PROTOCOL.chacha20poly1305]
-         typo; from Jon Cave
-
-commit e4870c090629e32f2cb649dc16d575eeb693f4a8
-Author: Damien Miller <djm@mindrot.org>
-Date:   Thu Dec 5 10:22:39 2013 +1100
-
-       - djm@cvs.openbsd.org 2013/12/01 23:19:05
-         [PROTOCOL]
-         mention curve25519-sha256@libssh.org key exchange algorithm
-
-commit 1d2f8804a6d33a4e908b876b2e1266b8260ec76b
-Author: Damien Miller <djm@mindrot.org>
-Date:   Thu Dec 5 10:22:03 2013 +1100
-
-       - deraadt@cvs.openbsd.org 2013/11/26 19:15:09
-         [pkcs11.h]
-         cleanup 1 << 31 idioms.  Resurrection of this issue pointed out by
-         Eitan Adler ok markus for ssh, implies same change in kerberosV
-
-commit bdb352a54f82df94a548e3874b22f2d6ae90328d
-Author: Damien Miller <djm@mindrot.org>
-Date:   Thu Dec 5 10:20:52 2013 +1100
-
-       - jmc@cvs.openbsd.org 2013/11/26 12:14:54
-         [ssh.1 ssh.c]
-         - put -Q in the right place
-         - Ar was a poor choice for the arguments to -Q. i've chosen an
-           admittedly equally poor Cm, at least consistent with the rest
-           of the docs. also no need for multiple instances
-         - zap a now redundant Nm
-         - usage() sync
-
-commit d937dc084a087090f1cf5395822c3ac958d33759
-Author: Damien Miller <djm@mindrot.org>
-Date:   Thu Dec 5 10:19:54 2013 +1100
-
-       - deraadt@cvs.openbsd.org 2013/11/25 18:04:21
-         [ssh.1 ssh.c]
-         improve -Q usage and such.  One usage change is that the option is now
-         case-sensitive
-         ok dtucker markus djm
-
-commit dec0393f7ee8aabc7d9d0fc2c5fddb4bc649112e
-Author: Damien Miller <djm@mindrot.org>
-Date:   Thu Dec 5 10:18:43 2013 +1100
-
-       - jmc@cvs.openbsd.org 2013/11/21 08:05:09
-         [ssh_config.5 sshd_config.5]
-         no need for .Pp before displays;
-
-commit 8a073cf57940aabf85e49799f89f5d5e9b072c1b
-Author: Damien Miller <djm@mindrot.org>
-Date:   Thu Nov 21 14:26:18 2013 +1100
-
-       - djm@cvs.openbsd.org 2013/11/21 03:18:51
-         [regress/cipher-speed.sh regress/integrity.sh regress/rekey.sh]
-         [regress/try-ciphers.sh]
-         use new "ssh -Q cipher-auth" query to obtain lists of authenticated
-         encryption ciphers instead of specifying them manually; ensures that
-         the new chacha20poly1305@openssh.com mode is tested;
-    
-         ok markus@ and naddy@ as part of the diff to add
-         chacha20poly1305@openssh.com
-
-commit ea61b2179f63d48968dd2c9617621002bb658bfe
-Author: Damien Miller <djm@mindrot.org>
-Date:   Thu Nov 21 14:25:15 2013 +1100
-
-       - djm@cvs.openbsd.org 2013/11/21 03:16:47
-         [regress/modpipe.c]
-         use unsigned long long instead of u_int64_t here to avoid warnings
-         on some systems portable OpenSSH is built on.
-
-commit 36aba25b0409d2db6afc84d54bc47a2532d38424
-Author: Damien Miller <djm@mindrot.org>
-Date:   Thu Nov 21 14:24:42 2013 +1100
-
-       - djm@cvs.openbsd.org 2013/11/21 03:15:46
-         [regress/krl.sh]
-         add some reminders for additional tests that I'd like to implement
-
-commit fa7a20bc289f09b334808d988746bc260a2f60c9
-Author: Damien Miller <djm@mindrot.org>
-Date:   Thu Nov 21 14:24:08 2013 +1100
-
-       - naddy@cvs.openbsd.org 2013/11/18 05:09:32
-         [regress/forward-control.sh]
-         bump timeout to 10 seconds to allow slow machines (e.g. Alpha PC164)
-         to successfully run this; ok djm@
-         (ID sync only; our timeouts are already longer)
-
-commit 0fde8acdad78a4d20cadae974376cc0165f645ee
-Author: Damien Miller <djm@mindrot.org>
-Date:   Thu Nov 21 14:12:23 2013 +1100
-
-       - djm@cvs.openbsd.org 2013/11/21 00:45:44
-         [Makefile.in PROTOCOL PROTOCOL.chacha20poly1305 authfile.c chacha.c]
-         [chacha.h cipher-chachapoly.c cipher-chachapoly.h cipher.c cipher.h]
-         [dh.c myproposal.h packet.c poly1305.c poly1305.h servconf.c ssh.1]
-         [ssh.c ssh_config.5 sshd_config.5] Add a new protocol 2 transport
-         cipher "chacha20-poly1305@openssh.com" that combines Daniel
-         Bernstein's ChaCha20 stream cipher and Poly1305 MAC to build an
-         authenticated encryption mode.
-    
-         Inspired by and similar to Adam Langley's proposal for TLS:
-         http://tools.ietf.org/html/draft-agl-tls-chacha20poly1305-03
-         but differs in layout used for the MAC calculation and the use of a
-         second ChaCha20 instance to separately encrypt packet lengths.
-         Details are in the PROTOCOL.chacha20poly1305 file.
-    
-         Feedback markus@, naddy@; manpage bits Loganden Velvindron @ AfriNIC
-         ok markus@ naddy@
-
-commit fdb2306acdc3eb2bc46b6dfdaaf6005c650af22a
-Author: Damien Miller <djm@mindrot.org>
-Date:   Thu Nov 21 13:57:15 2013 +1100
-
-       - deraadt@cvs.openbsd.org 2013/11/20 20:54:10
-         [canohost.c clientloop.c match.c readconf.c sftp.c]
-         unsigned casts for ctype macros where neccessary
-         ok guenther millert markus
-
-commit e00167307e4d3692695441e9bd712f25950cb894
-Author: Damien Miller <djm@mindrot.org>
-Date:   Thu Nov 21 13:56:49 2013 +1100
-
-       - deraadt@cvs.openbsd.org 2013/11/20 20:53:10
-         [scp.c]
-         unsigned casts for ctype macros where neccessary
-         ok guenther millert markus
-
-commit 23e00aa6ba9eee0e0c218f2026bf405ad4625832
-Author: Damien Miller <djm@mindrot.org>
-Date:   Thu Nov 21 13:56:28 2013 +1100
-
-       - djm@cvs.openbsd.org 2013/11/20 02:19:01
-         [sshd.c]
-         delay closure of in/out fds until after "Bad protocol version
-         identification..." message, as get_remote_ipaddr/get_remote_port
-         require them open.
-
-commit 867e6934be6521f87f04a5ab86702e2d1b314245
-Author: Damien Miller <djm@mindrot.org>
-Date:   Thu Nov 21 13:56:06 2013 +1100
-
-       - markus@cvs.openbsd.org 2013/11/13 13:48:20
-         [ssh-pkcs11.c]
-         add missing braces found by pedro
-
-commit 0600c7020f4fe68a780bd7cf21ff541a8d4b568a
-Author: Damien Miller <djm@mindrot.org>
-Date:   Thu Nov 21 13:55:43 2013 +1100
-
-       - dtucker@cvs.openbsd.org 2013/11/08 11:15:19
-         [bufaux.c bufbn.c buffer.c sftp-client.c sftp-common.c sftp-glob.c]
-         [uidswap.c] Include stdlib.h for free() as per the man page.
-
-commit b6a75b0b93b8faa6f79c3a395ab6c71f3f880b80
-Author: Darren Tucker <dtucker@zip.com.au>
-Date:   Sun Nov 10 20:25:22 2013 +1100
-
-     - (dtucker) [regress/keytype.sh] Populate ECDSA key types to be tested by
-       querying the ones that are compiled in.
-
-commit 2c89430119367eb1bc96ea5ee55de83357e4c926
-Author: Darren Tucker <dtucker@zip.com.au>
-Date:   Sun Nov 10 12:38:42 2013 +1100
-
-     - (dtucker) [key.c] Check for the correct defines for NID_secp521r1.
-
-commit dd5264db5f641dbd03186f9e5e83e4b14b3d0003
-Author: Darren Tucker <dtucker@zip.com.au>
-Date:   Sat Nov 9 22:32:51 2013 +1100
-
-     - (dtucker) [configure.ac] Add missing "test".
-
-commit 95cb2d4eb08117be061f3ff076adef3e9a5372c3
-Author: Darren Tucker <dtucker@zip.com.au>
-Date:   Sat Nov 9 22:02:31 2013 +1100
-
-     - (dtucker) [configure.ac] Fix brackets in NID_secp521r1 test.
-
-commit 37bcef51b3d9d496caecea6394814d2f49a1357f
-Author: Darren Tucker <dtucker@zip.com.au>
-Date:   Sat Nov 9 18:39:25 2013 +1100
-
-     - (dtucker) [configure.ac kex.c key.c myproposal.h] Test for the presence of
-       NID_X9_62_prime256v1, NID_secp384r1 and NID_secp521r1 and test that the
-       latter actually works before using it.  Fedora (at least) has NID_secp521r1
-       that doesn't work (see https://bugzilla.redhat.com/show_bug.cgi?id=1021897).
-
-commit 6e2fe81f926d995bae4be4a6b5b3c88c1c525187
-Author: Darren Tucker <dtucker@zip.com.au>
-Date:   Sat Nov 9 16:55:03 2013 +1100
-
-       - dtucker@cvs.openbsd.org 2013/11/09 05:41:34
-         [regress/test-exec.sh regress/rekey.sh]
-         Use smaller test data files to speed up tests.  Grow test datafiles
-         where necessary for a specific test.
-
-commit aff7ef1bb8b7c1eeb1f4812129091c5adbf51848
-Author: Darren Tucker <dtucker@zip.com.au>
-Date:   Sat Nov 9 00:19:22 2013 +1100
-
-     - (dtucker) [contrib/cygwin/ssh-host-config] Simplify host key generation:
-       rather than testing and generating each key, call ssh-keygen -A.
-       Patch from vinschen at redhat.com.
-
-commit 882abfd3fb3c98cfe70b4fc79224770468b570a5
-Author: Darren Tucker <dtucker@zip.com.au>
-Date:   Sat Nov 9 00:17:41 2013 +1100
-
-     - (dtucker) [Makefile.in configure.ac] Set MALLOC_OPTIONS per platform
-       and pass in TEST_ENV.  Unknown options cause stderr to get polluted
-       and the stderr-data test to fail.
-
-commit 8c333ec23bdf7da917aa20ac6803a2cdd79182c5
-Author: Darren Tucker <dtucker@zip.com.au>
-Date:   Fri Nov 8 21:12:58 2013 +1100
-
-     - (dtucker) [openbsd-compat/bsd-poll.c] Add headers to prevent compile
-       warnings.
-
-commit d94240b2f6b376b6e9de187e4a0cd4b89dfc48cb
-Author: Darren Tucker <dtucker@zip.com.au>
-Date:   Fri Nov 8 21:10:04 2013 +1100
-
-     - (dtucker) [myproposal.h] Conditionally enable CURVE25519_SHA256.
-
-commit 1c8ce34909886288a3932dce770deec5449f7bb5
-Author: Darren Tucker <dtucker@zip.com.au>
-Date:   Fri Nov 8 19:50:32 2013 +1100
-
-     - (dtucker) [kex.c] Only enable CURVE25519_SHA256 if we actually have
-       EVP_sha256.
-
-commit ccdb9bec46bcc88549b26a94aa0bae2b9f51031c
-Author: Darren Tucker <dtucker@zip.com.au>
-Date:   Fri Nov 8 18:54:38 2013 +1100
-
-     - (dtucker) [openbsd-compat/openbsd-compat.h] Add null implementation of
-       arc4random_stir for platforms that have arc4random but don't have
-       arc4random_stir (right now this is only OpenBSD -current).
-
-commit 3420a50169b52cc8d2775d51316f9f866c73398f
-Author: Damien Miller <djm@mindrot.org>
-Date:   Fri Nov 8 16:48:13 2013 +1100

*** DIFF OUTPUT TRUNCATED AT 1000 LINES ***

From owner-svn-src-all@freebsd.org  Thu Jan 21 12:41:03 2016
Return-Path: <owner-svn-src-all@freebsd.org>
Delivered-To: svn-src-all@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id BC035A894AD;
 Thu, 21 Jan 2016 12:41:03 +0000 (UTC) (envelope-from des@FreeBSD.org)
Received: from repo.freebsd.org (repo.freebsd.org
 [IPv6:2610:1c1:1:6068::e6a:0])
 (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
 (Client did not present a certificate)
 by mx1.freebsd.org (Postfix) with ESMTPS id 8B8551AB4;
 Thu, 21 Jan 2016 12:41:03 +0000 (UTC) (envelope-from des@FreeBSD.org)
Received: from repo.freebsd.org ([127.0.1.37])
 by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u0LCf21G009047;
 Thu, 21 Jan 2016 12:41:02 GMT (envelope-from des@FreeBSD.org)
Received: (from des@localhost)
 by repo.freebsd.org (8.15.2/8.15.2/Submit) id u0LCf2q0009046;
 Thu, 21 Jan 2016 12:41:02 GMT (envelope-from des@FreeBSD.org)
Message-Id: <201601211241.u0LCf2q0009046@repo.freebsd.org>
X-Authentication-Warning: repo.freebsd.org: des set sender to des@FreeBSD.org
 using -f
From: =?UTF-8?Q?Dag-Erling_Sm=c3=b8rgrav?= <des@FreeBSD.org>
Date: Thu, 21 Jan 2016 12:41:02 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-head@freebsd.org
Subject: svn commit: r294497 - head/crypto/openssh
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.20
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for &quot;
 user&quot; and &quot; projects&quot; \)" <svn-src-all.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-all/>
List-Post: <mailto:svn-src-all@freebsd.org>
List-Help: <mailto:svn-src-all-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Thu, 21 Jan 2016 12:41:03 -0000

Author: des
Date: Thu Jan 21 12:41:02 2016
New Revision: 294497
URL: https://svnweb.freebsd.org/changeset/base/294497

Log:
  Explain why we don't include VersionAddendum in the debug mode banner.

Modified:
  head/crypto/openssh/ssh.c

Modified: head/crypto/openssh/ssh.c
==============================================================================
--- head/crypto/openssh/ssh.c	Thu Jan 21 11:54:34 2016	(r294496)
+++ head/crypto/openssh/ssh.c	Thu Jan 21 12:41:02 2016	(r294497)
@@ -990,6 +990,7 @@ main(int ac, char **av)
 	    SYSLOG_FACILITY_USER, !use_syslog);
 
 	if (debug_flag)
+		/* version_addendum is always NULL at this point */
 		logit("%s, %s", SSH_RELEASE, OPENSSL_VERSION);
 
 	/* Parse the configuration files */

From owner-svn-src-all@freebsd.org  Thu Jan 21 12:42:32 2016
Return-Path: <owner-svn-src-all@freebsd.org>
Delivered-To: svn-src-all@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id 76248A895F7;
 Thu, 21 Jan 2016 12:42:32 +0000 (UTC) (envelope-from des@FreeBSD.org)
Received: from repo.freebsd.org (repo.freebsd.org
 [IPv6:2610:1c1:1:6068::e6a:0])
 (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
 (Client did not present a certificate)
 by mx1.freebsd.org (Postfix) with ESMTPS id 345B21D01;
 Thu, 21 Jan 2016 12:42:32 +0000 (UTC) (envelope-from des@FreeBSD.org)
Received: from repo.freebsd.org ([127.0.1.37])
 by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u0LCgVGj011783;
 Thu, 21 Jan 2016 12:42:31 GMT (envelope-from des@FreeBSD.org)
Received: (from des@localhost)
 by repo.freebsd.org (8.15.2/8.15.2/Submit) id u0LCgVo7011782;
 Thu, 21 Jan 2016 12:42:31 GMT (envelope-from des@FreeBSD.org)
Message-Id: <201601211242.u0LCgVo7011782@repo.freebsd.org>
X-Authentication-Warning: repo.freebsd.org: des set sender to des@FreeBSD.org
 using -f
From: =?UTF-8?Q?Dag-Erling_Sm=c3=b8rgrav?= <des@FreeBSD.org>
Date: Thu, 21 Jan 2016 12:42:31 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-head@freebsd.org
Subject: svn commit: r294498 - head/crypto/openssh
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.20
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for &quot;
 user&quot; and &quot; projects&quot; \)" <svn-src-all.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-all/>
List-Post: <mailto:svn-src-all@freebsd.org>
List-Help: <mailto:svn-src-all-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Thu, 21 Jan 2016 12:42:32 -0000

Author: des
Date: Thu Jan 21 12:42:31 2016
New Revision: 294498
URL: https://svnweb.freebsd.org/changeset/base/294498

Log:
  Update the instructions and the list of major local modifications.

Modified:
  head/crypto/openssh/FREEBSD-upgrade

Modified: head/crypto/openssh/FREEBSD-upgrade
==============================================================================
--- head/crypto/openssh/FREEBSD-upgrade	Thu Jan 21 12:41:02 2016	(r294497)
+++ head/crypto/openssh/FREEBSD-upgrade	Thu Jan 21 12:42:31 2016	(r294498)
@@ -1,5 +1,4 @@
 
-
 	    FreeBSD maintainer's guide to OpenSSH-portable
 	    ==============================================
 
@@ -34,10 +33,11 @@
 07) Tag:
 
     $ svn copy -m "Tag OpenSSH X.YpZ." \
-        svn+ssh://svn.freebsd.org/base/vendor-crypto/openssh/dist \
-        svn+ssh://svn.freebsd.org/base/vendor-crypto/openssh/X.YpZ
+	svn+ssh://svn.freebsd.org/base/vendor-crypto/openssh/dist \
+	svn+ssh://svn.freebsd.org/base/vendor-crypto/openssh/X.YpZ
 
-08) Check out head and run the pre-merge script:
+08) Check out head and run the pre-merge script, which strips our RCS
+    tags from files that have them:
 
     $ svn co svn+ssh://svn.freebsd.org/base/head
     $ cd head/crypto/openssh
@@ -53,14 +53,16 @@
 
 0B) Diff against the vendor branch:
 
-    $ svn diff \^/vendor-crypto/openssh/dist .
+    $ svn diff --no-diff-deleted --no-diff-added \
+	--ignore-properties \^/vendor-crypto/openssh/X.YpZ .
 
     Files that have modifications relative to the vendor code, and
     only those files, must have the svn:keywords property set to
     FreeBSD=%H and be listed in the 'keywords' file created by the
     pre-merge script.
 
-0C) Run the post-merge script:
+0C) Run the post-merge script, which re-adds RCS tags to files that
+    need them:
 
     $ sh freebsd-post-merge.sh
 
@@ -68,7 +70,7 @@
 
     $ sh freebsd-configure.sh
 
-0E) Check config.h very carefully.
+0E) Review changes to config.h very carefully.
 
 0F) If source files have been added or removed, update the appropriate
     makefiles to reflect changes in the vendor's Makefile.in.
@@ -92,8 +94,6 @@
 	  An overview of FreeBSD changes to OpenSSH-portable
 	  ==================================================
 
-XXX This section is out of date
-
 0) VersionAddendum
 
    The SSH protocol allows for a human-readable version string of up
@@ -103,26 +103,28 @@ XXX This section is out of date
    is vulnerable when an OpenSSH advisory goes out.  Some people,
    however, dislike advertising their patch level in the protocol
    handshake, so we've added a VersionAddendum configuration variable
-   to allow them to change or disable it.
+   to allow them to change or disable it.  Upstream added support for
+   VersionAddendum on the server side, but we also support it on the
+   client side.
 
 1) Modified server-side defaults
 
    We've modified some configuration defaults in sshd:
 
-      - PasswordAuthentication defaults to "no".
-
-      - LoginGraceTime defaults to 120 seconds instead of 600.
-
+      - UsePAM defaults to "yes".
       - PermitRootLogin defaults to "no".
-
-      - X11Forwarding defaults to "yes" (it's a threat to the client,
-        not to the server.)
+      - X11Forwarding defaults to "yes".
+      - PasswordAuthentication defaults to "no".
+      - VersionAddendum defaults to "FreeBSD-YYYYMMDD".
+      - PrivilegeSeparation defaults to "sandbox".
 
 2) Modified client-side defaults
 
    We've modified some configuration defaults in ssh:
 
       - CheckHostIP defaults to "no".
+      - VerifyHostKeyDNS defaults to "yes" if built with LDNS.
+      - VersionAddendum defaults to "FreeBSD-YYYYMMDD".
 
 3) Canonic host names
 
@@ -135,6 +137,34 @@ XXX This section is out of date
    Our setusercontext(3) can set environment variables, which we must
    take care to transfer to the child's environment.
 
+5) TCP wrappers
+
+   Support for TCP wrappers was removed in upstream 6.7p1.  We've
+   added it back by porting the 6.6p1 code forward.
+
+6) DSA keys
+
+   DSA keys were disabled by default in upstream 6.9p1.  We've added
+   them back.
+
+7) Agent client reference counting
+
+   We've added code to ssh-agent.c to implement client reference
+   counting; the agent will automatically exit when the last client
+   disconnects.
+
+8) Class-based login restrictions
+
+   We've added code to auth2.c to enforce the host.allow, host.deny,
+   times.allow and times.deny login class capabilities.
+
+9) HPN
+
+   We no longer have the HPN patches (adaptive buffer size for
+   increased throughput on high-BxD links), but we recognize and
+   ignore HPN-related configuration options to avoid breaking existing
+   configurations.
+
 
 
 This port was brought to you by (in no particular order) DARPA, NAI

From owner-svn-src-all@freebsd.org  Thu Jan 21 12:59:55 2016
Return-Path: <owner-svn-src-all@freebsd.org>
Delivered-To: svn-src-all@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id 68CAEA89B0F;
 Thu, 21 Jan 2016 12:59:55 +0000 (UTC)
 (envelope-from andrew@FreeBSD.org)
Received: from repo.freebsd.org (repo.freebsd.org
 [IPv6:2610:1c1:1:6068::e6a:0])
 (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
 (Client did not present a certificate)
 by mx1.freebsd.org (Postfix) with ESMTPS id 3084F131B;
 Thu, 21 Jan 2016 12:59:55 +0000 (UTC)
 (envelope-from andrew@FreeBSD.org)
Received: from repo.freebsd.org ([127.0.1.37])
 by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u0LCxs16015916;
 Thu, 21 Jan 2016 12:59:54 GMT (envelope-from andrew@FreeBSD.org)
Received: (from andrew@localhost)
 by repo.freebsd.org (8.15.2/8.15.2/Submit) id u0LCxs0I015914;
 Thu, 21 Jan 2016 12:59:54 GMT (envelope-from andrew@FreeBSD.org)
Message-Id: <201601211259.u0LCxs0I015914@repo.freebsd.org>
X-Authentication-Warning: repo.freebsd.org: andrew set sender to
 andrew@FreeBSD.org using -f
From: Andrew Turner <andrew@FreeBSD.org>
Date: Thu, 21 Jan 2016 12:59:54 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-head@freebsd.org
Subject: svn commit: r294499 - head/lib/clang
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.20
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for &quot;
 user&quot; and &quot; projects&quot; \)" <svn-src-all.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-all/>
List-Post: <mailto:svn-src-all@freebsd.org>
List-Help: <mailto:svn-src-all-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Thu, 21 Jan 2016 12:59:55 -0000

Author: andrew
Date: Thu Jan 21 12:59:54 2016
New Revision: 294499
URL: https://svnweb.freebsd.org/changeset/base/294499

Log:
  Disable -mlong-calls for the clang libraries for now, it increases the
  size of the clang binary for people with a crt1.o from before r293832.

Modified:
  head/lib/clang/clang.lib.mk

Modified: head/lib/clang/clang.lib.mk
==============================================================================
--- head/lib/clang/clang.lib.mk	Thu Jan 21 12:42:31 2016	(r294498)
+++ head/lib/clang/clang.lib.mk	Thu Jan 21 12:59:54 2016	(r294499)
@@ -7,7 +7,8 @@ LLVM_SRCS= ${.CURDIR}/../../../contrib/l
 INTERNALLIB=
 
 .if ${MACHINE_CPUARCH} == "arm"
-STATIC_CXXFLAGS+= -mlong-calls
+# This will need to be enabled to link clang 3.8
+#STATIC_CXXFLAGS+= -mlong-calls
 .endif
 
 .include <bsd.lib.mk>

From owner-svn-src-all@freebsd.org  Thu Jan 21 14:04:03 2016
Return-Path: <owner-svn-src-all@freebsd.org>
Delivered-To: svn-src-all@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id A47CCA8C3E8;
 Thu, 21 Jan 2016 14:04:03 +0000 (UTC) (envelope-from bz@FreeBSD.org)
Received: from repo.freebsd.org (repo.freebsd.org
 [IPv6:2610:1c1:1:6068::e6a:0])
 (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
 (Client did not present a certificate)
 by mx1.freebsd.org (Postfix) with ESMTPS id 6D4CB14CE;
 Thu, 21 Jan 2016 14:04:03 +0000 (UTC) (envelope-from bz@FreeBSD.org)
Received: from repo.freebsd.org ([127.0.1.37])
 by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u0LE42T3040382;
 Thu, 21 Jan 2016 14:04:02 GMT (envelope-from bz@FreeBSD.org)
Received: (from bz@localhost)
 by repo.freebsd.org (8.15.2/8.15.2/Submit) id u0LE42R8040381;
 Thu, 21 Jan 2016 14:04:02 GMT (envelope-from bz@FreeBSD.org)
Message-Id: <201601211404.u0LE42R8040381@repo.freebsd.org>
X-Authentication-Warning: repo.freebsd.org: bz set sender to bz@FreeBSD.org
 using -f
From: "Bjoern A. Zeeb" <bz@FreeBSD.org>
Date: Thu, 21 Jan 2016 14:04:02 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org
Subject: svn commit: r294500 - stable/10/sys/net
X-SVN-Group: stable-10
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.20
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for &quot;
 user&quot; and &quot; projects&quot; \)" <svn-src-all.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-all/>
List-Post: <mailto:svn-src-all@freebsd.org>
List-Help: <mailto:svn-src-all-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Thu, 21 Jan 2016 14:04:03 -0000

Author: bz
Date: Thu Jan 21 14:04:02 2016
New Revision: 294500
URL: https://svnweb.freebsd.org/changeset/base/294500

Log:
  MFC r292602:
  
   Simplify bringup order by removing a SYSINIT making it a static list
   initialization.
  
  Obtained from:	p4 @180384,180385

Modified:
  stable/10/sys/net/if_llatbl.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/sys/net/if_llatbl.c
==============================================================================
--- stable/10/sys/net/if_llatbl.c	Thu Jan 21 12:59:54 2016	(r294499)
+++ stable/10/sys/net/if_llatbl.c	Thu Jan 21 14:04:02 2016	(r294500)
@@ -62,11 +62,10 @@ __FBSDID("$FreeBSD$");
 
 MALLOC_DEFINE(M_LLTABLE, "lltable", "link level address tables");
 
-static VNET_DEFINE(SLIST_HEAD(, lltable), lltables);
+static VNET_DEFINE(SLIST_HEAD(, lltable), lltables) =
+    SLIST_HEAD_INITIALIZER(lltables);
 #define	V_lltables	VNET(lltables)
 
-static void vnet_lltable_init(void);
-
 struct rwlock lltable_rwlock;
 RW_SYSINIT(lltable_rwlock, &lltable_rwlock, "lltable_rwlock");
 
@@ -367,15 +366,6 @@ lla_rt_output(struct rt_msghdr *rtm, str
 	return (error);
 }
 
-static void
-vnet_lltable_init()
-{
-
-	SLIST_INIT(&V_lltables);
-}
-VNET_SYSINIT(vnet_lltable_init, SI_SUB_PSEUDO, SI_ORDER_FIRST,
-    vnet_lltable_init, NULL);
-
 #ifdef DDB
 struct llentry_sa {
 	struct llentry		base;

From owner-svn-src-all@freebsd.org  Thu Jan 21 14:06:17 2016
Return-Path: <owner-svn-src-all@freebsd.org>
Delivered-To: svn-src-all@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6E340A8C4BF;
 Thu, 21 Jan 2016 14:06:17 +0000 (UTC) (envelope-from bz@FreeBSD.org)
Received: from repo.freebsd.org (repo.freebsd.org
 [IPv6:2610:1c1:1:6068::e6a:0])
 (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
 (Client did not present a certificate)
 by mx1.freebsd.org (Postfix) with ESMTPS id 409B61771;
 Thu, 21 Jan 2016 14:06:17 +0000 (UTC) (envelope-from bz@FreeBSD.org)
Received: from repo.freebsd.org ([127.0.1.37])
 by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u0LE6G4u040652;
 Thu, 21 Jan 2016 14:06:16 GMT (envelope-from bz@FreeBSD.org)
Received: (from bz@localhost)
 by repo.freebsd.org (8.15.2/8.15.2/Submit) id u0LE6Gb0040649;
 Thu, 21 Jan 2016 14:06:16 GMT (envelope-from bz@FreeBSD.org)
Message-Id: <201601211406.u0LE6Gb0040649@repo.freebsd.org>
X-Authentication-Warning: repo.freebsd.org: bz set sender to bz@FreeBSD.org
 using -f
From: "Bjoern A. Zeeb" <bz@FreeBSD.org>
Date: Thu, 21 Jan 2016 14:06:16 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org
Subject: svn commit: r294501 - in stable/10/sys: net netinet
X-SVN-Group: stable-10
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.20
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for &quot;
 user&quot; and &quot; projects&quot; \)" <svn-src-all.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-all/>
List-Post: <mailto:svn-src-all@freebsd.org>
List-Help: <mailto:svn-src-all-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Thu, 21 Jan 2016 14:06:17 -0000

Author: bz
Date: Thu Jan 21 14:06:16 2016
New Revision: 294501
URL: https://svnweb.freebsd.org/changeset/base/294501

Log:
  MFC r292603:
  
   If bootverbose is enabled every vnet startup and virtual interface
   creation will print extra lines on the console. We are generally not
   interested in this (repeated) information for each VNET. Thus only
   print it for the default VNET. Virtual interfaces on the base system
   will remain printing information, but e.g. each loopback in each vnet
   will no longer cause a "bpf attached" line.

Modified:
  stable/10/sys/net/bpf.c
  stable/10/sys/netinet/tcp_subr.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/sys/net/bpf.c
==============================================================================
--- stable/10/sys/net/bpf.c	Thu Jan 21 14:04:02 2016	(r294500)
+++ stable/10/sys/net/bpf.c	Thu Jan 21 14:06:16 2016	(r294501)
@@ -2500,7 +2500,7 @@ bpfattach2(struct ifnet *ifp, u_int dlt,
 
 	bp->bif_hdrlen = hdrlen;
 
-	if (bootverbose)
+	if (bootverbose && IS_DEFAULT_VNET(curvnet))
 		if_printf(ifp, "bpf attached\n");
 }
 

Modified: stable/10/sys/netinet/tcp_subr.c
==============================================================================
--- stable/10/sys/netinet/tcp_subr.c	Thu Jan 21 14:04:02 2016	(r294500)
+++ stable/10/sys/netinet/tcp_subr.c	Thu Jan 21 14:06:16 2016	(r294501)
@@ -341,7 +341,7 @@ tcp_init(void)
 		 */
 		if (hashsize < 512)
 			hashsize = 512;
-		if (bootverbose)
+		if (bootverbose && IS_DEFAULT_VNET(curvnet))
 			printf("%s: %s auto tuned to %d\n", __func__,
 			    tcbhash_tuneable, hashsize);
 	}

From owner-svn-src-all@freebsd.org  Thu Jan 21 14:08:42 2016
Return-Path: <owner-svn-src-all@freebsd.org>
Delivered-To: svn-src-all@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id 120D0A8C54F;
 Thu, 21 Jan 2016 14:08:42 +0000 (UTC) (envelope-from bz@FreeBSD.org)
Received: from repo.freebsd.org (repo.freebsd.org
 [IPv6:2610:1c1:1:6068::e6a:0])
 (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
 (Client did not present a certificate)
 by mx1.freebsd.org (Postfix) with ESMTPS id BE0371976;
 Thu, 21 Jan 2016 14:08:41 +0000 (UTC) (envelope-from bz@FreeBSD.org)
Received: from repo.freebsd.org ([127.0.1.37])
 by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u0LE8eNG040927;
 Thu, 21 Jan 2016 14:08:40 GMT (envelope-from bz@FreeBSD.org)
Received: (from bz@localhost)
 by repo.freebsd.org (8.15.2/8.15.2/Submit) id u0LE8eMs040926;
 Thu, 21 Jan 2016 14:08:40 GMT (envelope-from bz@FreeBSD.org)
Message-Id: <201601211408.u0LE8eMs040926@repo.freebsd.org>
X-Authentication-Warning: repo.freebsd.org: bz set sender to bz@FreeBSD.org
 using -f
From: "Bjoern A. Zeeb" <bz@FreeBSD.org>
Date: Thu, 21 Jan 2016 14:08:40 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org
Subject: svn commit: r294502 - stable/10/sys/net
X-SVN-Group: stable-10
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.20
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for &quot;
 user&quot; and &quot; projects&quot; \)" <svn-src-all.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-all/>
List-Post: <mailto:svn-src-all@freebsd.org>
List-Help: <mailto:svn-src-all-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Thu, 21 Jan 2016 14:08:42 -0000

Author: bz
Date: Thu Jan 21 14:08:40 2016
New Revision: 294502
URL: https://svnweb.freebsd.org/changeset/base/294502

Log:
  MFC r292604:
  
   If vnets are torn down while ifconfig runs an ioctl to say, destroy an
   epair(4), we may hit if_detach_internal() without holding a lock and by
   the time we aquire it the interface might be gone.
   We should not panic() in this case as it is our fault for not holding
   the lock all the way. It is not ideal to return silently without error
   to user space, but other callers will all ignore the return values so
   do not change the entire KPI for little benefit for now.
   The ifp will be dealt with one way or another still.

Modified:
  stable/10/sys/net/if.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/sys/net/if.c
==============================================================================
--- stable/10/sys/net/if.c	Thu Jan 21 14:06:16 2016	(r294501)
+++ stable/10/sys/net/if.c	Thu Jan 21 14:08:40 2016	(r294502)
@@ -176,7 +176,7 @@ static int	if_getgroup(struct ifgroupreq
 static int	if_getgroupmembers(struct ifgroupreq *);
 static void	if_delgroups(struct ifnet *);
 static void	if_attach_internal(struct ifnet *, int, struct if_clone *);
-static void	if_detach_internal(struct ifnet *, int, struct if_clone **);
+static int	if_detach_internal(struct ifnet *, int, struct if_clone **);
 
 #ifdef INET6
 /*
@@ -894,7 +894,7 @@ if_detach(struct ifnet *ifp)
 	CURVNET_RESTORE();
 }
 
-static void
+static int
 if_detach_internal(struct ifnet *ifp, int vmove, struct if_clone **ifcp)
 {
 	struct ifaddr *ifa;
@@ -917,11 +917,19 @@ if_detach_internal(struct ifnet *ifp, in
 #endif
 	IFNET_WUNLOCK();
 	if (!found) {
+		/*
+		 * While we would want to panic here, we cannot
+		 * guarantee that the interface is indeed still on
+		 * the list given we don't hold locks all the way.
+		 */
+		return (ENOENT);
+#if 0
 		if (vmove)
 			panic("%s: ifp=%p not on the ifnet tailq %p",
 			    __func__, ifp, &V_ifnet);
 		else
 			return; /* XXX this should panic as well? */
+#endif
 	}
 
 	/* Check if this is a cloned interface or not. */
@@ -1019,6 +1027,8 @@ if_detach_internal(struct ifnet *ifp, in
 			(*dp->dom_ifdetach)(ifp,
 			    ifp->if_afdata[dp->dom_family]);
 	}
+
+	return (0);
 }
 
 #ifdef VIMAGE
@@ -1034,12 +1044,16 @@ if_vmove(struct ifnet *ifp, struct vnet 
 {
 	u_short idx;
 	struct if_clone *ifc;
+	int rc;
 
 	/*
 	 * Detach from current vnet, but preserve LLADDR info, do not
 	 * mark as dead etc. so that the ifnet can be reattached later.
+	 * If we cannot find it, we lost the race to someone else.
 	 */
-	if_detach_internal(ifp, 1, &ifc);
+	rc = if_detach_internal(ifp, 1, &ifc);
+	if (rc != 0)
+		return;
 
 	/*
 	 * Unlink the ifnet from ifindex_table[] in current vnet, and shrink

From owner-svn-src-all@freebsd.org  Thu Jan 21 14:11:02 2016
Return-Path: <owner-svn-src-all@freebsd.org>
Delivered-To: svn-src-all@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6A582A8C702;
 Thu, 21 Jan 2016 14:11:02 +0000 (UTC) (envelope-from bz@FreeBSD.org)
Received: from repo.freebsd.org (repo.freebsd.org
 [IPv6:2610:1c1:1:6068::e6a:0])
 (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
 (Client did not present a certificate)
 by mx1.freebsd.org (Postfix) with ESMTPS id 3B69A1B3C;
 Thu, 21 Jan 2016 14:11:02 +0000 (UTC) (envelope-from bz@FreeBSD.org)
Received: from repo.freebsd.org ([127.0.1.37])
 by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u0LEB1Ae043263;
 Thu, 21 Jan 2016 14:11:01 GMT (envelope-from bz@FreeBSD.org)
Received: (from bz@localhost)
 by repo.freebsd.org (8.15.2/8.15.2/Submit) id u0LEB1dT043262;
 Thu, 21 Jan 2016 14:11:01 GMT (envelope-from bz@FreeBSD.org)
Message-Id: <201601211411.u0LEB1dT043262@repo.freebsd.org>
X-Authentication-Warning: repo.freebsd.org: bz set sender to bz@FreeBSD.org
 using -f
From: "Bjoern A. Zeeb" <bz@FreeBSD.org>
Date: Thu, 21 Jan 2016 14:11:01 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org
Subject: svn commit: r294503 - stable/10/sys/netinet6
X-SVN-Group: stable-10
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.20
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for &quot;
 user&quot; and &quot; projects&quot; \)" <svn-src-all.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-all/>
List-Post: <mailto:svn-src-all@freebsd.org>
List-Help: <mailto:svn-src-all-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Thu, 21 Jan 2016 14:11:02 -0000

Author: bz
Date: Thu Jan 21 14:11:01 2016
New Revision: 294503
URL: https://svnweb.freebsd.org/changeset/base/294503

Log:
  MFC 292953:
  
   This code is not in modules that need KPI stability so no need to use
   the wrapper functions as used in r252511 (head).  We can directly use
   the locking macros.

Modified:
  stable/10/sys/netinet6/in6.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/sys/netinet6/in6.c
==============================================================================
--- stable/10/sys/netinet6/in6.c	Thu Jan 21 14:08:40 2016	(r294502)
+++ stable/10/sys/netinet6/in6.c	Thu Jan 21 14:11:01 2016	(r294503)
@@ -2003,7 +2003,7 @@ in6ifa_llaonifp(struct ifnet *ifp)
 
 	if (ND_IFINFO(ifp)->flags & ND6_IFF_IFDISABLED)
 		return (NULL);
-	if_addr_rlock(ifp);
+	IF_ADDR_RLOCK(ifp);
 	TAILQ_FOREACH(ifa, &ifp->if_addrhead, ifa_link) {
 		if (ifa->ifa_addr->sa_family != AF_INET6)
 			continue;
@@ -2013,7 +2013,7 @@ in6ifa_llaonifp(struct ifnet *ifp)
 		    IN6_IS_ADDR_MC_NODELOCAL(&sin6->sin6_addr))
 			break;
 	}
-	if_addr_runlock(ifp);
+	IF_ADDR_RUNLOCK(ifp);
 
 	return ((struct in6_ifaddr *)ifa);
 }

From owner-svn-src-all@freebsd.org  Thu Jan 21 14:35:13 2016
Return-Path: <owner-svn-src-all@freebsd.org>
Delivered-To: svn-src-all@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5F1BCA8CEE9;
 Thu, 21 Jan 2016 14:35:13 +0000 (UTC)
 (envelope-from cy.schubert@komquats.com)
Received: from smtp-out-so.shaw.ca (smtp-out-so.shaw.ca [64.59.136.138])
 by mx1.freebsd.org (Postfix) with ESMTP id 0BDB91731;
 Thu, 21 Jan 2016 14:35:12 +0000 (UTC)
 (envelope-from cy.schubert@komquats.com)
Received: from spqr.komquats.com ([96.50.22.10]) by shaw.ca with SMTP
 id MGKFaL8sypK8XMGKGavseg; Thu, 21 Jan 2016 07:35:06 -0700
X-Authority-Analysis: v=2.1 cv=IaYnITea c=1 sm=1 tr=0
 a=jvE2nwUzI0ECrNeyr98KWA==:117 a=jvE2nwUzI0ECrNeyr98KWA==:17 a=BWvPGDcYAAAA:8
 a=L9H7d07YOLsA:10 a=9cW_t1CCXrUA:10 a=s5jvgZ67dGcA:10 a=VxmjJ2MpAAAA:8
 a=kj9zAlcOel0A:10 a=7aQ_Q-yQQ-AA:10 a=KawIFhhbAAAA:8 a=6I5d2MoRAAAA:8
 a=YxBL1-UpAAAA:8 a=t9HMtdtuVjHgw6VY3PMA:9 a=CjuIK1q_8ugA:10
Received: from slippy.cwsent.com (slippy [10.1.1.91])
 by spqr.komquats.com (Postfix) with ESMTP id D54F913780;
 Thu, 21 Jan 2016 06:35:02 -0800 (PST)
Received: from slippy (localhost [127.0.0.1])
 by slippy.cwsent.com (8.15.2/8.15.2) with ESMTP id u0LEZ2Ns046079;
 Thu, 21 Jan 2016 06:35:02 -0800 (PST)
 (envelope-from Cy.Schubert@komquats.com)
Message-Id: <201601211435.u0LEZ2Ns046079@slippy.cwsent.com>
X-Mailer: exmh version 2.8.0 04/21/2012 with nmh-1.6
Reply-to: Cy Schubert <Cy.Schubert@komquats.com>
From: Cy Schubert <Cy.Schubert@komquats.com>
X-os: FreeBSD
X-Sender: cy@cwsent.com
X-URL: http://www.komquats.com/
To: Slawa Olhovchenkov <slw@zxy.spb.ru>
cc: Andriy Gapon <avg@FreeBSD.org>,
 "svn-src-head@freebsd.org" <svn-src-head@FreeBSD.org>,
 "svn-src-all@freebsd.org" <svn-src-all@FreeBSD.org>,
 "src-committers@freebsd.org" <src-committers@FreeBSD.org>,
 Alan Somers <asomers@FreeBSD.org>
Subject: Re: svn commit: r294329 - in
 head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs: . sys
In-Reply-To: Message from Slawa Olhovchenkov <slw@zxy.spb.ru>
 of "Thu, 21 Jan 2016 14:38:14 +0300." <20160121113813.GG37895@zxy.spb.ru>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Date: Thu, 21 Jan 2016 06:35:02 -0800
X-CMAE-Envelope: MS4wfIDbrE1K440TybGjynLjM6JwWoYE4ZRgzdlPUpBKox8Jpcd6R8RuCwu22mZoEcoaPqjNfD6IJ7uoj3T5OfWEKsK4dgnoBJ1IjDaHvl+3GxYRw50GXl1S
 jgduwlNziZsXVXTsAsAtE7LlYG9basi67JoyNcoZRzvi1Rhpd8Zfb48Ed16cgd3vldAWie7N15HQYO3iJ450QlEXHFQNWplQjtE/Swj0A3QYH1NvwQ7VaJUA
 u/1Eosp1c7vBC0I8agm0ue9ogis20g1Uc7qn5L/ITWB2hvbn07lI58leCbG5OC8OLdrFJyFsN7VmLMyBXonrpnD1LPpEa0BT94keHHH0V4w=
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.20
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for &quot;
 user&quot; and &quot; projects&quot; \)" <svn-src-all.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-all/>
List-Post: <mailto:svn-src-all@freebsd.org>
List-Help: <mailto:svn-src-all-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Thu, 21 Jan 2016 14:35:13 -0000

In message <20160121113813.GG37895@zxy.spb.ru>, Slawa Olhovchenkov writes:
> On Thu, Jan 21, 2016 at 01:34:57AM +0200, Andriy Gapon wrote:
> 
> > On 20/01/2016 22:03, Alan Somers wrote:
> > > On Wed, Jan 20, 2016 at 2:20 AM, Andriy Gapon <avg@freebsd.org> wrote:
> > >> On 19/01/2016 19:20, Alan Somers wrote:
> > >>> The thing is, it never really worked in the first place.  Panics and
> > >>> deadlocks are so frequent that I don't think the feature was usable
> > >>> for anybody.
> > >>
> > >> The feature is perfectly usable for me.  I have never run into the probl
> ems that
> > >> you describe.  Why not fix the real bugs that you've run into?
> > > 
> > > Spectra Logic and iXSystems both experienced many problems with this.
> > > The worst is a deadlock that can be triggered simply by pulling a
> > > drive from a redundant pool when there exists a zvol anywhere in the
> > > system (see https://reviews.freebsd.org/D4998 for a quick way to
> > > reproduce).  Fixing it correctly would likely require far more time
> > > than I have available.  I just want the bugs to go away.  See that
> > > same code review for a change to make the feature optional.
> > 
> > I think that we all want all the bugs to go way.  One way to remove bugs is
>  to
> > remove (disable) code that contains bugs.  That way the perfect bug-free
> > software is clearly achievable :-)  Unfortunately, that technique is not al
> ways
> > welcomed.
> > 
> > P.S.
> > I think that the real problem here is that a method of a geom must never dr
> op
> > topology_lock.  In other words, the GEOM management code (like g_xxx() stuf
> f in
> > geom_subr.c) expects that a topology can not change underneath it.  But
> > zvol_geom_access() clearly breaks that contract.
> 
> May be same cause problem with swap on zvol (don't test on latest
> -stable)?

Not related but should be disabled by default through sysctl is vdev on 
USB. OK for a laptop but not a server. 100% hang on shutdown/reboot.


-- 
Cheers,
Cy Schubert <Cy.Schubert@komquats.com> or <Cy.Schubert@cschubert.com>
FreeBSD UNIX:  <cy@FreeBSD.org>   Web:  http://www.FreeBSD.org

	The need of the many outweighs the greed of the few.



From owner-svn-src-all@freebsd.org  Thu Jan 21 14:50:30 2016
Return-Path: <owner-svn-src-all@freebsd.org>
Delivered-To: svn-src-all@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id 758A7A8B58C;
 Thu, 21 Jan 2016 14:50:30 +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 1408B1FCA;
 Thu, 21 Jan 2016 14:50:30 +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 u0LEoTMZ055209;
 Thu, 21 Jan 2016 14:50:29 GMT (envelope-from pfg@FreeBSD.org)
Received: (from pfg@localhost)
 by repo.freebsd.org (8.15.2/8.15.2/Submit) id u0LEoSDW055199;
 Thu, 21 Jan 2016 14:50:28 GMT (envelope-from pfg@FreeBSD.org)
Message-Id: <201601211450.u0LEoSDW055199@repo.freebsd.org>
X-Authentication-Warning: repo.freebsd.org: pfg set sender to pfg@FreeBSD.org
 using -f
From: "Pedro F. Giffuni" <pfg@FreeBSD.org>
Date: Thu, 21 Jan 2016 14:50:28 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-head@freebsd.org
Subject: svn commit: r294504 - in head/sys: conf fs/ext2fs modules/ext2fs
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.20
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for &quot;
 user&quot; and &quot; projects&quot; \)" <svn-src-all.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-all/>
List-Post: <mailto:svn-src-all@freebsd.org>
List-Help: <mailto:svn-src-all-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Thu, 21 Jan 2016 14:50:30 -0000

Author: pfg
Date: Thu Jan 21 14:50:28 2016
New Revision: 294504
URL: https://svnweb.freebsd.org/changeset/base/294504

Log:
  ext2fs: Bring back the htree dir_index implementation.
  
  The htree dir_index is perhaps one of the most characteristic
  features of the linux ext3 implementation. It was removed
  in r281670, due to repeated bug reports.
  
  Damjan Jovanic detected and fixed three bugs and did some
  stress testing by building Apache OpenOffice on top of it
  so it is now in good shape to bring back.
  
  Differential Revision:	https://reviews.freebsd.org/D5007
  
  Submitted by:	Damjan Jovanovic
  Reviewed by:	pfg
  Tested by:	pho
  Relnotes:	Yes
  MFC after:	2 months (only 10.x)

Added:
  head/sys/fs/ext2fs/ext2_hash.c
     - copied unchanged from r281669, head/sys/fs/ext2fs/ext2_hash.c
  head/sys/fs/ext2fs/ext2_htree.c
     - copied, changed from r281669, head/sys/fs/ext2fs/ext2_htree.c
Modified:
  head/sys/conf/files
  head/sys/fs/ext2fs/ext2_dir.h
  head/sys/fs/ext2fs/ext2_extern.h
  head/sys/fs/ext2fs/ext2_lookup.c
  head/sys/fs/ext2fs/ext2_vfsops.c
  head/sys/fs/ext2fs/ext2fs.h
  head/sys/modules/ext2fs/Makefile

Modified: head/sys/conf/files
==============================================================================
--- head/sys/conf/files	Thu Jan 21 14:11:01 2016	(r294503)
+++ head/sys/conf/files	Thu Jan 21 14:50:28 2016	(r294504)
@@ -3114,6 +3114,8 @@ fs/ext2fs/ext2_bmap.c		optional ext2fs
 fs/ext2fs/ext2_extents.c	optional ext2fs
 fs/ext2fs/ext2_inode.c		optional ext2fs
 fs/ext2fs/ext2_inode_cnv.c	optional ext2fs
+fs/ext2fs/ext2_hash.c		optional ext2fs
+fs/ext2fs/ext2_htree.c		optional ext2fs
 fs/ext2fs/ext2_lookup.c		optional ext2fs
 fs/ext2fs/ext2_subr.c		optional ext2fs
 fs/ext2fs/ext2_vfsops.c		optional ext2fs

Modified: head/sys/fs/ext2fs/ext2_dir.h
==============================================================================
--- head/sys/fs/ext2fs/ext2_dir.h	Thu Jan 21 14:11:01 2016	(r294503)
+++ head/sys/fs/ext2fs/ext2_dir.h	Thu Jan 21 14:50:28 2016	(r294504)
@@ -40,6 +40,21 @@ struct	ext2fs_direct {
 	uint16_t e2d_namlen;		/* length of string in e2d_name */
 	char e2d_name[EXT2FS_MAXNAMLEN];/* name with length<=EXT2FS_MAXNAMLEN */
 };
+
+enum slotstatus {
+	NONE,
+	COMPACT,
+	FOUND
+};
+
+struct ext2fs_searchslot {
+	enum slotstatus slotstatus;
+	doff_t slotoffset;	/* offset of area with free space */
+	int slotsize;		/* size of area at slotoffset */
+	int slotfreespace;	/* amount of space free in slot */
+	int slotneeded;		/* sizeof the entry we are seeking */
+};
+
 /*
  * The new version of the directory entry.  Since EXT2 structures are
  * stored in intel byte order, and the name_len field could never be

Modified: head/sys/fs/ext2fs/ext2_extern.h
==============================================================================
--- head/sys/fs/ext2fs/ext2_extern.h	Thu Jan 21 14:11:01 2016	(r294503)
+++ head/sys/fs/ext2fs/ext2_extern.h	Thu Jan 21 14:50:28 2016	(r294504)
@@ -40,12 +40,15 @@
 #define	_FS_EXT2FS_EXT2_EXTERN_H_
 
 struct ext2fs_dinode;
+struct ext2fs_direct_2;
+struct ext2fs_searchslot;
 struct indir;
 struct inode;
 struct mount;
 struct vfsconf;
 struct vnode;
 
+int	ext2_add_entry(struct vnode *, struct ext2fs_direct_2 *);
 int	ext2_alloc(struct inode *, daddr_t, e4fs_daddr_t, int,
 	    struct ucred *, e4fs_daddr_t *);
 int	ext2_balloc(struct inode *,
@@ -83,6 +86,18 @@ int	ext2_dirempty(struct inode *, ino_t,
 int	ext2_checkpath(struct inode *, struct inode *, struct ucred *);
 int	cg_has_sb(int i);
 int	ext2_inactive(struct vop_inactive_args *);
+int	ext2_htree_add_entry(struct vnode *, struct ext2fs_direct_2 *,
+	    struct componentname *);
+int	ext2_htree_create_index(struct vnode *, struct componentname *,
+	    struct ext2fs_direct_2 *);
+int	ext2_htree_has_idx(struct inode *);
+int	ext2_htree_hash(const char *, int, uint32_t *, int, uint32_t *,
+	    uint32_t *);
+int	ext2_htree_lookup(struct inode *, const char *, int, struct buf **,
+	    int *, doff_t *, doff_t *, doff_t *, struct ext2fs_searchslot *);
+int	ext2_search_dirblock(struct inode *, void *, int *, const char *, int,
+	    int *, doff_t *, doff_t *, doff_t *, struct ext2fs_searchslot *);
+
 
 /* Flags to low-level allocation routines.
  * The low 16-bits are reserved for IO_ flags from vnode.h.

Copied: head/sys/fs/ext2fs/ext2_hash.c (from r281669, head/sys/fs/ext2fs/ext2_hash.c)
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/sys/fs/ext2fs/ext2_hash.c	Thu Jan 21 14:50:28 2016	(r294504, copy of r281669, head/sys/fs/ext2fs/ext2_hash.c)
@@ -0,0 +1,316 @@
+/*-
+ * Copyright (c) 2010, 2013 Zheng Liu <lz@freebsd.org>
+ * Copyright (c) 2012, Vyacheslav Matyushin
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ *
+ * $FreeBSD$
+ */
+
+/*
+ * The following notice applies to the code in ext2_half_md4():
+ *
+ * Copyright (C) 1990-2, RSA Data Security, Inc. All rights reserved.
+ *
+ * License to copy and use this software is granted provided that it
+ * is identified as the "RSA Data Security, Inc. MD4 Message-Digest
+ * Algorithm" in all material mentioning or referencing this software
+ * or this function.
+ *
+ * License is also granted to make and use derivative works provided
+ * that such works are identified as "derived from the RSA Data
+ * Security, Inc. MD4 Message-Digest Algorithm" in all material
+ * mentioning or referencing the derived work.
+ *
+ * RSA Data Security, Inc. makes no representations concerning either
+ * the merchantability of this software or the suitability of this
+ * software for any particular purpose. It is provided "as is"
+ * without express or implied warranty of any kind.
+ *
+ * These notices must be retained in any copies of any part of this
+ * documentation and/or software.
+ */
+
+#include <sys/param.h>
+#include <sys/systm.h>
+#include <sys/conf.h>
+#include <sys/vnode.h>
+#include <sys/stat.h>
+#include <sys/mount.h>
+
+#include <fs/ext2fs/htree.h>
+#include <fs/ext2fs/inode.h>
+#include <fs/ext2fs/ext2_mount.h>
+#include <fs/ext2fs/ext2_extern.h>
+
+/* F, G, and H are MD4 functions */
+#define F(x, y, z) (((x) & (y)) | ((~x) & (z)))
+#define G(x, y, z) (((x) & (y)) | ((x) & (z)) | ((y) & (z)))
+#define H(x, y, z) ((x) ^ (y) ^ (z))
+
+/* ROTATE_LEFT rotates x left n bits */
+#define ROTATE_LEFT(x, n) (((x) << (n)) | ((x) >> (32 - (n))))
+
+/*
+ * FF, GG, and HH are transformations for rounds 1, 2, and 3.
+ * Rotation is separated from addition to prevent recomputation.
+ */
+#define FF(a, b, c, d, x, s) { \
+	(a) += F ((b), (c), (d)) + (x); \
+	(a) = ROTATE_LEFT ((a), (s)); \
+}
+
+#define GG(a, b, c, d, x, s) { \
+	(a) += G ((b), (c), (d)) + (x) + (uint32_t)0x5A827999; \
+	(a) = ROTATE_LEFT ((a), (s)); \
+}
+
+#define HH(a, b, c, d, x, s) { \
+	(a) += H ((b), (c), (d)) + (x) + (uint32_t)0x6ED9EBA1; \
+	(a) = ROTATE_LEFT ((a), (s)); \
+}
+
+/*
+ * MD4 basic transformation.  It transforms state based on block.
+ *
+ * This is a half md4 algorithm since Linux uses this algorithm for dir
+ * index.  This function is derived from the RSA Data Security, Inc. MD4
+ * Message-Digest Algorithm and was modified as necessary.
+ *
+ * The return value of this function is uint32_t in Linux, but actually we don't
+ * need to check this value, so in our version this function doesn't return any
+ * value.
+ */
+static void
+ext2_half_md4(uint32_t hash[4], uint32_t data[8])
+{
+	uint32_t a = hash[0], b = hash[1], c = hash[2], d = hash[3];
+
+	/* Round 1 */
+	FF(a, b, c, d, data[0],  3);
+	FF(d, a, b, c, data[1],  7);
+	FF(c, d, a, b, data[2], 11);
+	FF(b, c, d, a, data[3], 19);
+	FF(a, b, c, d, data[4],  3);
+	FF(d, a, b, c, data[5],  7);
+	FF(c, d, a, b, data[6], 11);
+	FF(b, c, d, a, data[7], 19);
+
+	/* Round 2 */
+	GG(a, b, c, d, data[1],  3);
+	GG(d, a, b, c, data[3],  5);
+	GG(c, d, a, b, data[5],  9);
+	GG(b, c, d, a, data[7], 13);
+	GG(a, b, c, d, data[0],  3);
+	GG(d, a, b, c, data[2],  5);
+	GG(c, d, a, b, data[4],  9);
+	GG(b, c, d, a, data[6], 13);
+
+	/* Round 3 */
+	HH(a, b, c, d, data[3],  3);
+	HH(d, a, b, c, data[7],  9);
+	HH(c, d, a, b, data[2], 11);
+	HH(b, c, d, a, data[6], 15);
+	HH(a, b, c, d, data[1],  3);
+	HH(d, a, b, c, data[5],  9);
+	HH(c, d, a, b, data[0], 11);
+	HH(b, c, d, a, data[4], 15);
+
+	hash[0] += a;
+	hash[1] += b;
+	hash[2] += c;
+	hash[3] += d;
+}
+
+/*
+ * Tiny Encryption Algorithm.
+ */
+static void
+ext2_tea(uint32_t hash[4], uint32_t data[8])
+{
+	uint32_t tea_delta = 0x9E3779B9;
+	uint32_t sum;
+	uint32_t x = hash[0], y = hash[1];
+	int n = 16;
+	int i = 1;
+
+	while (n-- > 0) {
+		sum = i * tea_delta;
+		x += ((y << 4) + data[0]) ^ (y + sum) ^ ((y >> 5) + data[1]);
+		y += ((x << 4) + data[2]) ^ (x + sum) ^ ((x >> 5) + data[3]);
+		i++;
+	}
+
+	hash[0] += x;
+	hash[1] += y;
+}
+
+static uint32_t
+ext2_legacy_hash(const char *name, int len, int unsigned_char)
+{
+	uint32_t h0, h1 = 0x12A3FE2D, h2 = 0x37ABE8F9;
+	uint32_t multi = 0x6D22F5;
+	const unsigned char *uname = (const unsigned char *)name;
+	const signed char *sname = (const signed char *)name;
+	int val, i;
+
+	for (i = 0; i < len; i++) {
+		if (unsigned_char)
+			val = (u_int)*uname++;
+		else
+			val = (int)*sname++;
+
+		h0 = h2 + (h1 ^ (val * multi));
+		if (h0 & 0x80000000)
+			h0 -= 0x7FFFFFFF;
+		h2 = h1;
+		h1 = h0;
+	}
+
+	return (h1 << 1);
+}
+
+static void
+ext2_prep_hashbuf(const char *src, int slen, uint32_t *dst, int dlen,
+	     int unsigned_char)
+{
+	uint32_t padding = slen | (slen << 8) | (slen << 16) | (slen << 24);
+	uint32_t buf_val;
+	const unsigned char *ubuf = (const unsigned char *)src;
+	const signed char *sbuf = (const signed char *)src;
+	int len, i;
+	int buf_byte;
+
+	if (slen > dlen)
+		len = dlen;
+	else
+		len = slen;
+
+	buf_val = padding;
+
+	for (i = 0; i < len; i++) {
+		if (unsigned_char)
+			buf_byte = (u_int)ubuf[i];
+		else
+			buf_byte = (int)sbuf[i];
+
+		if ((i % 4) == 0)
+			buf_val = padding;
+
+		buf_val <<= 8;
+		buf_val += buf_byte;
+
+		if ((i % 4) == 3) {
+			*dst++ = buf_val;
+			dlen -= sizeof(uint32_t);
+			buf_val = padding;
+		}
+	}
+
+	dlen -= sizeof(uint32_t);
+	if (dlen >= 0)
+		*dst++ = buf_val;
+
+	dlen -= sizeof(uint32_t);
+	while (dlen >= 0) {
+		*dst++ = padding;
+		dlen -= sizeof(uint32_t);
+	}
+}
+
+int
+ext2_htree_hash(const char *name, int len,
+		uint32_t *hash_seed, int hash_version,
+		uint32_t *hash_major, uint32_t *hash_minor)
+{
+	uint32_t hash[4];
+	uint32_t data[8];
+	uint32_t major = 0, minor = 0;
+	int unsigned_char = 0;
+
+	if (!name || !hash_major)
+		return (-1);
+
+	if (len < 1 || len > 255)
+		goto error;
+
+	hash[0] = 0x67452301;
+	hash[1] = 0xEFCDAB89;
+	hash[2] = 0x98BADCFE;
+	hash[3] = 0x10325476;
+
+	if (hash_seed)
+		memcpy(hash, hash_seed, sizeof(hash));
+
+	switch (hash_version) {
+	case EXT2_HTREE_TEA_UNSIGNED:
+		unsigned_char = 1;
+		/* FALLTHROUGH */
+	case EXT2_HTREE_TEA:
+		while (len > 0) {
+			ext2_prep_hashbuf(name, len, data, 16, unsigned_char);
+			ext2_tea(hash, data);
+			len -= 16;
+			name += 16;
+		}
+		major = hash[0];
+		minor = hash[1];
+		break;
+	case EXT2_HTREE_LEGACY_UNSIGNED:
+		unsigned_char = 1;
+		/* FALLTHROUGH */
+	case EXT2_HTREE_LEGACY:
+		major = ext2_legacy_hash(name, len, unsigned_char);
+		break;
+	case EXT2_HTREE_HALF_MD4_UNSIGNED:
+		unsigned_char = 1;
+		/* FALLTHROUGH */
+	case EXT2_HTREE_HALF_MD4:
+		while (len > 0) {
+			ext2_prep_hashbuf(name, len, data, 32, unsigned_char);
+			ext2_half_md4(hash, data);
+			len -= 32;
+			name += 32;
+		}
+		major = hash[1];
+		minor = hash[2];
+		break;
+	default:
+		goto error;
+	}
+
+	major &= ~1;
+	if (major == (EXT2_HTREE_EOF << 1))
+		major = (EXT2_HTREE_EOF - 1) << 1;
+	*hash_major = major;
+	if (hash_minor)
+		*hash_minor = minor;
+
+	return (0);
+
+error:
+	*hash_major = 0;
+	if (hash_minor)
+		*hash_minor = 0;
+	return (-1);
+}

Copied and modified: head/sys/fs/ext2fs/ext2_htree.c (from r281669, head/sys/fs/ext2fs/ext2_htree.c)
==============================================================================
--- head/sys/fs/ext2fs/ext2_htree.c	Fri Apr 17 22:17:22 2015	(r281669, copy source)
+++ head/sys/fs/ext2fs/ext2_htree.c	Thu Jan 21 14:50:28 2016	(r294504)
@@ -579,18 +579,17 @@ ext2_htree_split_dirblock(char *block1, 
 
 	/* Shrink directory entries in block 1. */
 	last = (struct ext2fs_direct_2 *)block1;
-	entry_len = EXT2_DIR_REC_LEN(last->e2d_namlen);
-	for (offset = last->e2d_reclen; offset < blksize; ) {
+	entry_len = 0;
+	for (offset = 0; offset < blksize; ) {
 		ep = (struct ext2fs_direct_2 *)(block1 + offset);
 		offset += ep->e2d_reclen;
-		if (last->e2d_ino) {
-			/* Trim the existing slot */
-			last->e2d_reclen = entry_len;
+		if (ep->e2d_ino) {
 			last = (struct ext2fs_direct_2 *)
 			   ((char *)last + entry_len);
+			entry_len = EXT2_DIR_REC_LEN(ep->e2d_namlen);
+			memcpy((void *)last, (void *)ep, entry_len);
+			last->e2d_reclen = entry_len;
 		}
-		entry_len = EXT2_DIR_REC_LEN(ep->e2d_namlen);
-		memcpy((void *)last, (void *)ep, entry_len);
 	}
 
 	if (entry_hash >= *split_hash) {
@@ -847,6 +846,7 @@ ext2_htree_add_entry(struct vnode *dvp, 
 			info.h_levels[1].h_entry = info.h_levels[0].h_entry -
 			    info.h_levels[0].h_entries + dst_entries;
 			info.h_levels[1].h_bp = dst_bp;
+			dst_bp = NULL;
 		}
 	}
 

Modified: head/sys/fs/ext2fs/ext2_lookup.c
==============================================================================
--- head/sys/fs/ext2fs/ext2_lookup.c	Thu Jan 21 14:11:01 2016	(r294503)
+++ head/sys/fs/ext2fs/ext2_lookup.c	Thu Jan 21 14:50:28 2016	(r294504)
@@ -113,9 +113,19 @@ static u_char dt_to_ext2_ft[] = {
 
 static int	ext2_dirbadentry(struct vnode *dp, struct ext2fs_direct_2 *de,
 		    int entryoffsetinblock);
+static int	ext2_is_dot_entry(struct componentname *cnp);
 static int	ext2_lookup_ino(struct vnode *vdp, struct vnode **vpp,
 		    struct componentname *cnp, ino_t *dd_ino);
 
+static int
+ext2_is_dot_entry(struct componentname *cnp)
+{
+	if (cnp->cn_namelen <= 2 && cnp->cn_nameptr[0] == '.' &&
+	    (cnp->cn_nameptr[1] == '.' || cnp->cn_nameptr[1] == '\0'))
+		return (1);
+	return (0);
+}
+
 /*
  * Vnode op for reading directories.
  */
@@ -296,13 +306,9 @@ ext2_lookup_ino(struct vnode *vdp, struc
 	struct buf *bp;			/* a buffer of directory entries */
 	struct ext2fs_direct_2 *ep;	/* the current directory entry */
 	int entryoffsetinblock;		/* offset of ep in bp's buffer */
-	enum {NONE, COMPACT, FOUND} slotstatus;
-	doff_t slotoffset;		/* offset of area with free space */
+	struct ext2fs_searchslot ss;
 	doff_t i_diroff;		/* cached i_diroff value */
 	doff_t i_offset;		/* cached i_offset value */
-	int slotsize;			/* size of area at slotoffset */
-	int slotfreespace;		/* amount of space free in slot */
-	int slotneeded;			/* size of the entry we're seeking */
 	int numdirpasses;		/* strategy for directory search */
 	doff_t endsearch;		/* offset to end directory search */
 	doff_t prevoff;			/* prev entry dp->i_offset */
@@ -310,12 +316,13 @@ ext2_lookup_ino(struct vnode *vdp, struc
 	struct vnode *tdp;		/* returned by VFS_VGET */
 	doff_t enduseful;		/* pointer past last used dir slot */
 	u_long bmask;			/* block offset mask */
-	int namlen, error;
+	int error;
 	struct ucred *cred = cnp->cn_cred;
 	int flags = cnp->cn_flags;
 	int nameiop = cnp->cn_nameiop;
 	ino_t ino, ino1;
 	int ltype;
+	int entry_found = 0;
 
 	int	DIRBLKSIZ = VTOI(vdp)->i_e2fs->e2fs_bsize;
 
@@ -326,31 +333,57 @@ ext2_lookup_ino(struct vnode *vdp, struc
 	bmask = VFSTOEXT2(vdp->v_mount)->um_mountp->mnt_stat.f_iosize - 1;
 restart:
 	bp = NULL;
-	slotoffset = -1;
+	ss.slotoffset = -1;
 
 	/*
 	 * We now have a segment name to search for, and a directory to search.
-	 */
-
-	/*
+	 *
 	 * Suppress search for slots unless creating
 	 * file and at end of pathname, in which case
 	 * we watch for a place to put the new file in
 	 * case it doesn't already exist.
 	 */
 	i_diroff = dp->i_diroff;
-	slotstatus = FOUND;
-	slotfreespace = slotsize = slotneeded = 0;
+	ss.slotstatus = FOUND;
+	ss.slotfreespace = ss.slotsize = ss.slotneeded = 0;
 	if ((nameiop == CREATE || nameiop == RENAME) &&
 	    (flags & ISLASTCN)) {
-		slotstatus = NONE;
-		slotneeded = EXT2_DIR_REC_LEN(cnp->cn_namelen);
+		ss.slotstatus = NONE;
+		ss.slotneeded = EXT2_DIR_REC_LEN(cnp->cn_namelen);
 		/* was
-		slotneeded = (sizeof(struct direct) - MAXNAMLEN +
+		ss.slotneeded = (sizeof(struct direct) - MAXNAMLEN +
 			cnp->cn_namelen + 3) &~ 3; */
 	}
 
 	/*
+	 * Try to lookup dir entry using htree directory index.
+	 *
+	 * If we got an error or we want to find '.' or '..' entry,
+	 * we will fall back to linear search.
+	 */
+	if (!ext2_is_dot_entry(cnp) && ext2_htree_has_idx(dp)) {
+		numdirpasses = 1;
+		entryoffsetinblock = 0;
+		switch (ext2_htree_lookup(dp, cnp->cn_nameptr, cnp->cn_namelen,
+				&bp, &entryoffsetinblock, &i_offset, &prevoff,
+				&enduseful, &ss)) {
+		case 0:
+			ep = (struct ext2fs_direct_2 *)((char *)bp->b_data +
+				(i_offset & bmask));
+			goto foundentry;
+		case ENOENT:
+			i_offset = roundup2(dp->i_size, DIRBLKSIZ);
+			goto notfound;
+		default:
+			/*
+			 * Something failed; just fallback to do a linear
+			 * search.
+			 */
+			break;
+		}
+	}
+
+	/*
 	 * If there is cached information on a previous search of
 	 * this directory, pick up where we last left off.
 	 * We cache only lookups as these are the most common
@@ -384,96 +417,38 @@ searchloop:
 		/*
 		 * If necessary, get the next directory block.
 		 */
-		if ((i_offset & bmask) == 0) {
-			if (bp != NULL)
-				brelse(bp);
-			if ((error =
-			    ext2_blkatoff(vdp, (off_t)i_offset, NULL,
-			    &bp)) != 0)
-				return (error);
-			entryoffsetinblock = 0;
-		}
+		if (bp != NULL)
+			brelse(bp);
+		error = ext2_blkatoff(vdp, (off_t)i_offset, NULL, &bp);
+		if (error != 0)
+			return (error);
+		entryoffsetinblock = 0;
 		/*
 		 * If still looking for a slot, and at a DIRBLKSIZE
 		 * boundary, have to start looking for free space again.
 		 */
-		if (slotstatus == NONE &&
+		if (ss.slotstatus == NONE &&
 		    (entryoffsetinblock & (DIRBLKSIZ - 1)) == 0) {
-			slotoffset = -1;
-			slotfreespace = 0;
+			ss.slotoffset = -1;
+			ss.slotfreespace = 0;
 		}
-		/*
-		 * Get pointer to next entry.
-		 * Full validation checks are slow, so we only check
-		 * enough to insure forward progress through the
-		 * directory. Complete checks can be run by setting
-		 * "vfs.e2fs.dirchk" to be true.
-		 */
-		ep = (struct ext2fs_direct_2 *)
-			((char *)bp->b_data + entryoffsetinblock);
-		if (ep->e2d_reclen == 0 ||
-		    (dirchk && ext2_dirbadentry(vdp, ep, entryoffsetinblock))) {
-			int i;
-			ext2_dirbad(dp, i_offset, "mangled entry");
-			i = DIRBLKSIZ - (entryoffsetinblock & (DIRBLKSIZ - 1));
-			i_offset += i;
-			entryoffsetinblock += i;
-			continue;
-		}
-
-		/*
-		 * If an appropriate sized slot has not yet been found,
-		 * check to see if one is available. Also accumulate space
-		 * in the current block so that we can determine if
-		 * compaction is viable.
-		 */
-		if (slotstatus != FOUND) {
-			int size = ep->e2d_reclen;
-
-			if (ep->e2d_ino != 0)
-				size -= EXT2_DIR_REC_LEN(ep->e2d_namlen);
-			if (size > 0) {
-				if (size >= slotneeded) {
-					slotstatus = FOUND;
-					slotoffset = i_offset;
-					slotsize = ep->e2d_reclen;
-				} else if (slotstatus == NONE) {
-					slotfreespace += size;
-					if (slotoffset == -1)
-						slotoffset = i_offset;
-					if (slotfreespace >= slotneeded) {
-						slotstatus = COMPACT;
-						slotsize = i_offset +
-						      ep->e2d_reclen - slotoffset;
-					}
-				}
-			}
+		error = ext2_search_dirblock(dp, bp->b_data, &entry_found,
+				cnp->cn_nameptr, cnp->cn_namelen,
+				&entryoffsetinblock, &i_offset, &prevoff,
+				&enduseful, &ss);
+		if (error != 0) {
+			brelse(bp);
+			return (error);
 		}
-
-		/*
-		 * Check for a name match.
-		 */
-		if (ep->e2d_ino) {
-			namlen = ep->e2d_namlen;
-			if (namlen == cnp->cn_namelen &&
-			    !bcmp(cnp->cn_nameptr, ep->e2d_name,
-				(unsigned)namlen)) {
-				/*
-				 * Save directory entry's inode number and
-				 * reclen in ndp->ni_ufs area, and release
-				 * directory buffer.
-				 */
-				ino = ep->e2d_ino;
-				goto found;
-			}
+		if (entry_found) {
+			ep = (struct ext2fs_direct_2 *)((char *)bp->b_data +
+				(entryoffsetinblock & bmask));
+foundentry:
+			ino = ep->e2d_ino;
+			goto found;
 		}
-		prevoff = i_offset;
-		i_offset += ep->e2d_reclen;
-		entryoffsetinblock += ep->e2d_reclen;
-		if (ep->e2d_ino)
-			enduseful = i_offset;
 	}
-/* notfound: */
+notfound:
 	/*
 	 * If we started in the middle of the directory and failed
 	 * to find our target, we must check the beginning as well.
@@ -508,15 +483,15 @@ searchloop:
 		 * can be put in the range from dp->i_offset to
 		 * dp->i_offset + dp->i_count.
 		 */
-		if (slotstatus == NONE) {
+		if (ss.slotstatus == NONE) {
 			dp->i_offset = roundup2(dp->i_size, DIRBLKSIZ);
 			dp->i_count = 0;
 			enduseful = dp->i_offset;
 		} else {
-			dp->i_offset = slotoffset;
-			dp->i_count = slotsize;
-			if (enduseful < slotoffset + slotsize)
-				enduseful = slotoffset + slotsize;
+			dp->i_offset = ss.slotoffset;
+			dp->i_count = ss.slotsize;
+			if (enduseful < ss.slotoffset + ss.slotsize)
+				enduseful = ss.slotoffset + ss.slotsize;
 		}
 		dp->i_endoff = roundup2(enduseful, DIRBLKSIZ);
 		/*
@@ -722,6 +697,102 @@ found:
 	return (0);
 }
 
+int
+ext2_search_dirblock(struct inode *ip, void *data, int *foundp,
+	const char *name, int namelen, int *entryoffsetinblockp,
+	doff_t *offp, doff_t *prevoffp, doff_t *endusefulp,
+	struct ext2fs_searchslot *ssp)
+{
+	struct vnode *vdp;
+	struct ext2fs_direct_2 *ep, *top;
+	uint32_t bsize = ip->i_e2fs->e2fs_bsize;
+	int offset = *entryoffsetinblockp;
+	int namlen;
+
+	vdp = ITOV(ip);
+
+	ep = (struct ext2fs_direct_2 *)((char *)data + offset);
+	top = (struct ext2fs_direct_2 *)((char *)data +
+		bsize - EXT2_DIR_REC_LEN(0));
+
+	while (ep < top) {
+		/*
+		 * Full validation checks are slow, so we only check
+		 * enough to insure forward progress through the
+		 * directory. Complete checks can be run by setting
+		 * "vfs.e2fs.dirchk" to be true.
+		 */
+		if (ep->e2d_reclen == 0 ||
+		    (dirchk && ext2_dirbadentry(vdp, ep, offset))) {
+			int i;
+			ext2_dirbad(ip, *offp, "mangled entry");
+			i = bsize - (offset & (bsize - 1));
+			*offp += i;
+			offset += i;
+			continue;
+		}
+
+		/*
+		 * If an appropriate sized slot has not yet been found,
+		 * check to see if one is available. Also accumulate space
+		 * in the current block so that we can determine if
+		 * compaction is viable.
+		 */
+		if (ssp->slotstatus != FOUND) {
+			int size = ep->e2d_reclen;
+
+			if (ep->e2d_ino != 0)
+				size -= EXT2_DIR_REC_LEN(ep->e2d_namlen);
+			if (size > 0) {
+				if (size >= ssp->slotneeded) {
+					ssp->slotstatus = FOUND;
+					ssp->slotoffset = *offp;
+					ssp->slotsize = ep->e2d_reclen;
+				} else if (ssp->slotstatus == NONE) {
+					ssp->slotfreespace += size;
+					if (ssp->slotoffset == -1)
+						ssp->slotoffset = *offp;
+					if (ssp->slotfreespace >= ssp->slotneeded) {
+						ssp->slotstatus = COMPACT;
+						ssp->slotsize = *offp +
+							ep->e2d_reclen -
+							ssp->slotoffset;
+					}
+				}
+			}
+		}
+
+		/*
+		 * Check for a name match.
+		 */
+		if (ep->e2d_ino) {
+			namlen = ep->e2d_namlen;
+			if (namlen == namelen &&
+			    !bcmp(name, ep->e2d_name, (unsigned)namlen)) {
+				/*
+				 * Save directory entry's inode number and
+				 * reclen in ndp->ni_ufs area, and release
+				 * directory buffer.
+				 */
+				*foundp = 1;
+				return (0);
+			}
+		}
+		*prevoffp = *offp;
+		*offp += ep->e2d_reclen;
+		offset += ep->e2d_reclen;
+		*entryoffsetinblockp = offset;
+		if (ep->e2d_ino)
+			*endusefulp = *offp;
+		/*
+		 * Get pointer to the next entry.
+		 */
+		ep = (struct ext2fs_direct_2 *)((char *)data + offset);
+	}
+
+	return (0);
+}
+
 void
 ext2_dirbad(struct inode *ip, doff_t offset, char *how)
 {
@@ -791,16 +862,12 @@ ext2_dirbadentry(struct vnode *dp, struc
 int
 ext2_direnter(struct inode *ip, struct vnode *dvp, struct componentname *cnp)
 {
-	struct ext2fs_direct_2 *ep, *nep;
 	struct inode *dp;
-	struct buf *bp;
 	struct ext2fs_direct_2 newdir;
 	struct iovec aiov;
 	struct uio auio;
-	u_int dsize;
-	int error, loc, newentrysize, spacefree;
-	char *dirbuf;
-	int     DIRBLKSIZ = ip->i_e2fs->e2fs_bsize;
+	int error, newentrysize;
+	int DIRBLKSIZ = ip->i_e2fs->e2fs_bsize;
 
 
 #ifdef INVARIANTS
@@ -817,6 +884,28 @@ ext2_direnter(struct inode *ip, struct v
 		newdir.e2d_type = EXT2_FT_UNKNOWN;
 	bcopy(cnp->cn_nameptr, newdir.e2d_name, (unsigned)cnp->cn_namelen + 1);
 	newentrysize = EXT2_DIR_REC_LEN(newdir.e2d_namlen);
+
+	if (ext2_htree_has_idx(dp)) {
+		error = ext2_htree_add_entry(dvp, &newdir, cnp);
+		if (error) {
+			dp->i_flag &= ~IN_E4INDEX;
+			dp->i_flag |= IN_CHANGE | IN_UPDATE;
+		}
+		return (error);
+	}
+
+	if (EXT2_HAS_COMPAT_FEATURE(ip->i_e2fs, EXT2F_COMPAT_DIRHASHINDEX) &&
+	    !ext2_htree_has_idx(dp)) {
+		if ((dp->i_size / DIRBLKSIZ) == 1 &&
+		    dp->i_offset == DIRBLKSIZ) {
+			/*
+			 * Making indexed directory when one block is not
+			 * enough to save all entries.
+			 */
+			return ext2_htree_create_index(dvp, cnp, &newdir);
+		}
+	}
+
 	if (dp->i_count == 0) {
 		/*
 		 * If dp->i_count is 0, then namei could find no
@@ -848,6 +937,29 @@ ext2_direnter(struct inode *ip, struct v
 		return (error);
 	}
 
+	error = ext2_add_entry(dvp, &newdir);
+	if (!error && dp->i_endoff && dp->i_endoff < dp->i_size)
+		error = ext2_truncate(dvp, (off_t)dp->i_endoff, IO_SYNC,
+		    cnp->cn_cred, cnp->cn_thread);
+	return (error);
+}
+
+/*
+ * Insert an entry into the directory block.
+ * Compact the contents.
+ */
+int
+ext2_add_entry(struct vnode *dvp, struct ext2fs_direct_2 *entry)
+{
+	struct ext2fs_direct_2 *ep, *nep;
+	struct inode *dp;
+	struct buf *bp;
+	u_int dsize;
+	int error, loc, newentrysize, spacefree;
+	char *dirbuf;
+
+	dp = VTOI(dvp);
+
 	/*
 	 * If dp->i_count is non-zero, then namei found space
 	 * for the new entry in the range dp->i_offset to
@@ -879,6 +991,7 @@ ext2_direnter(struct inode *ip, struct v
 	 * dp->i_offset + dp->i_count would yield the
 	 * space.
 	 */
+	newentrysize = EXT2_DIR_REC_LEN(entry->e2d_namlen);
 	ep = (struct ext2fs_direct_2 *)dirbuf;
 	dsize = EXT2_DIR_REC_LEN(ep->e2d_namlen);
 	spacefree = ep->e2d_reclen - dsize;
@@ -904,15 +1017,15 @@ ext2_direnter(struct inode *ip, struct v
 	if (ep->e2d_ino == 0) {
 		if (spacefree + dsize < newentrysize)
 			panic("ext2_direnter: compact1");
-		newdir.e2d_reclen = spacefree + dsize;
+		entry->e2d_reclen = spacefree + dsize;
 	} else {
 		if (spacefree < newentrysize)
 			panic("ext2_direnter: compact2");
-		newdir.e2d_reclen = spacefree;
+		entry->e2d_reclen = spacefree;
 		ep->e2d_reclen = dsize;
 		ep = (struct ext2fs_direct_2 *)((char *)ep + dsize);
 	}
-	bcopy((caddr_t)&newdir, (caddr_t)ep, (u_int)newentrysize);
+	bcopy((caddr_t)entry, (caddr_t)ep, (u_int)newentrysize);
 	if (DOINGASYNC(dvp)) {
 		bdwrite(bp);
 		error = 0;
@@ -920,9 +1033,6 @@ ext2_direnter(struct inode *ip, struct v
 		error = bwrite(bp);
 	}
 	dp->i_flag |= IN_CHANGE | IN_UPDATE;
-	if (!error && dp->i_endoff && dp->i_endoff < dp->i_size)
-		error = ext2_truncate(dvp, (off_t)dp->i_endoff, IO_SYNC,
-		    cnp->cn_cred, cnp->cn_thread);
 	return (error);
 }
 

Modified: head/sys/fs/ext2fs/ext2_vfsops.c
==============================================================================
--- head/sys/fs/ext2fs/ext2_vfsops.c	Thu Jan 21 14:11:01 2016	(r294503)
+++ head/sys/fs/ext2fs/ext2_vfsops.c	Thu Jan 21 14:50:28 2016	(r294504)
@@ -399,8 +399,22 @@ compute_sb_data(struct vnode *devvp, str
 	if (es->e2fs_rev == E2FS_REV0 ||
 	    !EXT2_HAS_RO_COMPAT_FEATURE(fs, EXT2F_ROCOMPAT_LARGEFILE))
 		fs->e2fs_maxfilesize = 0x7fffffff;
-	else
-		fs->e2fs_maxfilesize = 0x7fffffffffffffff;
+	else {
+		fs->e2fs_maxfilesize = 0xffffffffffff;
+		if (EXT2_HAS_RO_COMPAT_FEATURE(fs, EXT2F_ROCOMPAT_HUGE_FILE))
+			fs->e2fs_maxfilesize = 0x7fffffffffffffff;
+	}
+	if (es->e4fs_flags & E2FS_UNSIGNED_HASH) {
+		fs->e2fs_uhash = 3;
+	} else if ((es->e4fs_flags & E2FS_SIGNED_HASH) == 0) {
+#ifdef __CHAR_UNSIGNED__
+		es->e4fs_flags |= E2FS_UNSIGNED_HASH;
+		fs->e2fs_uhash = 3;
+#else
+		es->e4fs_flags |= E2FS_SIGNED_HASH;
+#endif
+	}
+
 	return (0);
 }
 

Modified: head/sys/fs/ext2fs/ext2fs.h
==============================================================================
--- head/sys/fs/ext2fs/ext2fs.h	Thu Jan 21 14:11:01 2016	(r294503)
+++ head/sys/fs/ext2fs/ext2fs.h	Thu Jan 21 14:50:28 2016	(r294504)
@@ -147,6 +147,7 @@ struct m_ext2fs {
 	int32_t  e2fs_contigsumsize;    /* size of cluster summary array */
 	int32_t *e2fs_maxcluster;       /* max cluster in each cyl group */
 	struct   csum *e2fs_clustersum; /* cluster summary in each cyl group */
+	int32_t  e2fs_uhash;	  /* 3 if hash should be signed, 0 if not */
 };
 
 /* cluster summary information */
@@ -213,6 +214,7 @@ struct csum {
  * - EXT2F_INCOMPAT_FLEX_BG
  * - EXT2F_INCOMPAT_META_BG
  */
+#define	EXT2F_COMPAT_SUPP		EXT2F_COMPAT_DIRHASHINDEX
 #define	EXT2F_ROCOMPAT_SUPP		(EXT2F_ROCOMPAT_SPARSESUPER | \
 					 EXT2F_ROCOMPAT_LARGEFILE | \
 					 EXT2F_ROCOMPAT_EXTRA_ISIZE)
@@ -243,6 +245,12 @@ struct csum {
 #define	E2FS_ISCLEAN			0x0001	/* Unmounted cleanly */
 #define	E2FS_ERRORS			0x0002	/* Errors detected */
 
+/*
+ * Filesystem miscellaneous flags
+ */
+#define	E2FS_SIGNED_HASH	0x0001
+#define	E2FS_UNSIGNED_HASH	0x0002
+
 /* ext2 file system block group descriptor */
 
 struct ext2_gd {

Modified: head/sys/modules/ext2fs/Makefile
==============================================================================
--- head/sys/modules/ext2fs/Makefile	Thu Jan 21 14:11:01 2016	(r294503)
+++ head/sys/modules/ext2fs/Makefile	Thu Jan 21 14:50:28 2016	(r294504)
@@ -3,8 +3,8 @@
 .PATH:	${.CURDIR}/../../fs/ext2fs
 KMOD=	ext2fs
 SRCS=	opt_ddb.h opt_directio.h opt_quota.h opt_suiddir.h vnode_if.h \
-	ext2_alloc.c ext2_balloc.c ext2_bmap.c ext2_extents.c \
-	ext2_inode.c ext2_inode_cnv.c ext2_lookup.c ext2_subr.c \
+	ext2_alloc.c ext2_balloc.c ext2_bmap.c ext2_extents.c ext2_hash.c \
+	ext2_htree.c ext2_inode.c ext2_inode_cnv.c ext2_lookup.c ext2_subr.c \
 	ext2_vfsops.c ext2_vnops.c
 
 .include <bsd.kmod.mk>

From owner-svn-src-all@freebsd.org  Thu Jan 21 14:57:46 2016
Return-Path: <owner-svn-src-all@freebsd.org>
Delivered-To: svn-src-all@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id C31A4A8B858;
 Thu, 21 Jan 2016 14:57:46 +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 A08F41481;
 Thu, 21 Jan 2016 14:57:46 +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 u0LEvj3c058495;
 Thu, 21 Jan 2016 14:57:45 GMT (envelope-from hselasky@FreeBSD.org)
Received: (from hselasky@localhost)
 by repo.freebsd.org (8.15.2/8.15.2/Submit) id u0LEvjQP058492;
 Thu, 21 Jan 2016 14:57:45 GMT (envelope-from hselasky@FreeBSD.org)
Message-Id: <201601211457.u0LEvjQP058492@repo.freebsd.org>
X-Authentication-Warning: repo.freebsd.org: hselasky set sender to
 hselasky@FreeBSD.org using -f
From: Hans Petter Selasky <hselasky@FreeBSD.org>
Date: Thu, 21 Jan 2016 14:57:45 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-head@freebsd.org
Subject: svn commit: r294505 - in head/sys:
 compat/linuxkpi/common/include/linux compat/linuxkpi/common/src sys
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.20
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for &quot;
 user&quot; and &quot; projects&quot; \)" <svn-src-all.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-all/>
List-Post: <mailto:svn-src-all@freebsd.org>
List-Help: <mailto:svn-src-all-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Thu, 21 Jan 2016 14:57:46 -0000

Author: hselasky
Date: Thu Jan 21 14:57:45 2016
New Revision: 294505
URL: https://svnweb.freebsd.org/changeset/base/294505

Log:
  Implement idr_preload(), idr_preload_end(), idr_alloc() and
  idr_alloc_cyclic() in the LinuxKPI. Bump the FreeBSD version to
  force recompilation of all KLDs due to IDR structure size change.
  
  MFC after:	2 weeks
  Sponsored by:	Mellanox Technologies

Modified:
  head/sys/compat/linuxkpi/common/include/linux/idr.h
  head/sys/compat/linuxkpi/common/src/linux_idr.c
  head/sys/sys/param.h

Modified: head/sys/compat/linuxkpi/common/include/linux/idr.h
==============================================================================
--- head/sys/compat/linuxkpi/common/include/linux/idr.h	Thu Jan 21 14:50:28 2016	(r294504)
+++ head/sys/compat/linuxkpi/common/include/linux/idr.h	Thu Jan 21 14:57:45 2016	(r294505)
@@ -2,7 +2,7 @@
  * Copyright (c) 2010 Isilon Systems, Inc.
  * Copyright (c) 2010 iX Systems, Inc.
  * Copyright (c) 2010 Panasas, Inc.
- * Copyright (c) 2013 Mellanox Technologies, Ltd.
+ * Copyright (c) 2013-2016 Mellanox Technologies, Ltd.
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -60,6 +60,7 @@ struct idr {
 	struct idr_layer	*top;
 	struct idr_layer	*free;
 	int			layers;
+	int			next_cyclic_id;
 };
 
 #define DEFINE_IDR(name)						\
@@ -67,6 +68,9 @@ struct idr {
 	SYSINIT(name##_idr_sysinit, SI_SUB_DRIVERS, SI_ORDER_FIRST,	\
 	    idr_init, &(name));
 
+#define	idr_preload(x) do { } while (0)
+#define	idr_preload_end() do { } while (0)
+
 void	*idr_find(struct idr *idp, int id);
 int	idr_pre_get(struct idr *idp, gfp_t gfp_mask);
 int	idr_get_new(struct idr *idp, void *ptr, int *id);
@@ -76,5 +80,7 @@ void	idr_remove(struct idr *idp, int id)
 void	idr_remove_all(struct idr *idp);
 void	idr_destroy(struct idr *idp);
 void	idr_init(struct idr *idp);
+int	idr_alloc(struct idr *idp, void *ptr, int start, int end, gfp_t);
+int	idr_alloc_cyclic(struct idr *idp, void *ptr, int start, int end, gfp_t);
 
 #endif	/* _LINUX_IDR_H_ */

Modified: head/sys/compat/linuxkpi/common/src/linux_idr.c
==============================================================================
--- head/sys/compat/linuxkpi/common/src/linux_idr.c	Thu Jan 21 14:50:28 2016	(r294504)
+++ head/sys/compat/linuxkpi/common/src/linux_idr.c	Thu Jan 21 14:57:45 2016	(r294505)
@@ -2,7 +2,7 @@
  * Copyright (c) 2010 Isilon Systems, Inc.
  * Copyright (c) 2010 iX Systems, Inc.
  * Copyright (c) 2010 Panasas, Inc.
- * Copyright (c) 2013, 2014 Mellanox Technologies, Ltd.
+ * Copyright (c) 2013-2016 Mellanox Technologies, Ltd.
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -116,21 +116,18 @@ idr_remove_all(struct idr *idr)
 	mtx_unlock(&idr->lock);
 }
 
-void
-idr_remove(struct idr *idr, int id)
+static void
+idr_remove_locked(struct idr *idr, int id)
 {
 	struct idr_layer *il;
 	int layer;
 	int idx;
 
 	id &= MAX_ID_MASK;
-	mtx_lock(&idr->lock);
 	il = idr->top;
 	layer = idr->layers - 1;
-	if (il == NULL || id > idr_max(idr)) {
-		mtx_unlock(&idr->lock);
+	if (il == NULL || id > idr_max(idr))
 		return;
-	}
 	/*
 	 * Walk down the tree to this item setting bitmaps along the way
 	 * as we know at least one item will be free along this path.
@@ -152,8 +149,14 @@ idr_remove(struct idr *idr, int id)
 		    id, idr, il);
 	il->ary[idx] = NULL;
 	il->bitmap |= 1 << idx;
+}
+
+void
+idr_remove(struct idr *idr, int id)
+{
+	mtx_lock(&idr->lock);
+	idr_remove_locked(idr, id);
 	mtx_unlock(&idr->lock);
-	return;
 }
 
 void *
@@ -278,8 +281,8 @@ idr_get(struct idr *idr)
  * Could be implemented as get_new_above(idr, ptr, 0, idp) but written
  * first for simplicity sake.
  */
-int
-idr_get_new(struct idr *idr, void *ptr, int *idp)
+static int
+idr_get_new_locked(struct idr *idr, void *ptr, int *idp)
 {
 	struct idr_layer *stack[MAX_LEVEL];
 	struct idr_layer *il;
@@ -288,8 +291,9 @@ idr_get_new(struct idr *idr, void *ptr, 
 	int idx;
 	int id;
 
+	mtx_assert(&idr->lock, MA_OWNED);
+
 	error = -EAGAIN;
-	mtx_lock(&idr->lock);
 	/*
 	 * Expand the tree until there is free space.
 	 */
@@ -350,12 +354,22 @@ out:
 		    idr, id, ptr);
 	}
 #endif
-	mtx_unlock(&idr->lock);
 	return (error);
 }
 
 int
-idr_get_new_above(struct idr *idr, void *ptr, int starting_id, int *idp)
+idr_get_new(struct idr *idr, void *ptr, int *idp)
+{
+	int retval;
+
+	mtx_lock(&idr->lock);
+	retval = idr_get_new_locked(idr, ptr, idp);
+	mtx_unlock(&idr->lock);
+	return (retval);
+}
+
+static int
+idr_get_new_above_locked(struct idr *idr, void *ptr, int starting_id, int *idp)
 {
 	struct idr_layer *stack[MAX_LEVEL];
 	struct idr_layer *il;
@@ -364,8 +378,9 @@ idr_get_new_above(struct idr *idr, void 
 	int idx, sidx;
 	int id;
 
+	mtx_assert(&idr->lock, MA_OWNED);
+
 	error = -EAGAIN;
-	mtx_lock(&idr->lock);
 	/*
 	 * Compute the layers required to support starting_id and the mask
 	 * at the top layer.
@@ -457,6 +472,70 @@ out:
 		    idr, id, ptr);
 	}
 #endif
-	mtx_unlock(&idr->lock);
 	return (error);
 }
+
+int
+idr_get_new_above(struct idr *idr, void *ptr, int starting_id, int *idp)
+{
+	int retval;
+
+	mtx_lock(&idr->lock);
+	retval = idr_get_new_above_locked(idr, ptr, starting_id, idp);
+	mtx_unlock(&idr->lock);
+	return (retval);
+}
+
+static int
+idr_alloc_locked(struct idr *idr, void *ptr, int start, int end)
+{
+	int max = end > 0 ? end - 1 : INT_MAX;
+	int error;
+	int id;
+
+	mtx_assert(&idr->lock, MA_OWNED);
+
+	if (unlikely(start < 0))
+		return (-EINVAL);
+	if (unlikely(max < start))
+		return (-ENOSPC);
+
+	if (start == 0)
+		error = idr_get_new_locked(idr, ptr, &id);
+	else
+		error = idr_get_new_above_locked(idr, ptr, start, &id);
+
+	if (unlikely(error < 0))
+		return (error);
+	if (unlikely(id > max)) {
+		idr_remove_locked(idr, id);
+		return (-ENOSPC);
+	}
+	return (id);
+}
+
+int
+idr_alloc(struct idr *idr, void *ptr, int start, int end, gfp_t gfp_mask)
+{
+	int retval;
+
+	mtx_lock(&idr->lock);
+	retval = idr_alloc_locked(idr, ptr, start, end);
+	mtx_unlock(&idr->lock);
+	return (retval);
+}
+
+int
+idr_alloc_cyclic(struct idr *idr, void *ptr, int start, int end, gfp_t gfp_mask)
+{
+	int retval;
+
+	mtx_lock(&idr->lock);
+	retval = idr_alloc_locked(idr, ptr, max(start, idr->next_cyclic_id), end);
+	if (unlikely(retval == -ENOSPC))
+		retval = idr_alloc_locked(idr, ptr, start, end);
+	if (likely(retval >= 0))
+		idr->next_cyclic_id = retval + 1;
+	mtx_unlock(&idr->lock);
+	return (retval);
+}

Modified: head/sys/sys/param.h
==============================================================================
--- head/sys/sys/param.h	Thu Jan 21 14:50:28 2016	(r294504)
+++ head/sys/sys/param.h	Thu Jan 21 14:57:45 2016	(r294505)
@@ -58,7 +58,7 @@
  *		in the range 5 to 9.
  */
 #undef __FreeBSD_version
-#define __FreeBSD_version 1100095	/* Master, propagated to newvers */
+#define __FreeBSD_version 1100096	/* Master, propagated to newvers */
 
 /*
  * __FreeBSD_kernel__ indicates that this system uses the kernel of FreeBSD,

From owner-svn-src-all@freebsd.org  Thu Jan 21 15:03:27 2016
Return-Path: <owner-svn-src-all@freebsd.org>
Delivered-To: svn-src-all@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id C236DA8BA95;
 Thu, 21 Jan 2016 15:03:27 +0000 (UTC)
 (envelope-from asomers@gmail.com)
Received: from mail-ob0-x22d.google.com (mail-ob0-x22d.google.com
 [IPv6:2607:f8b0:4003:c01::22d])
 (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits))
 (Client CN "smtp.gmail.com",
 Issuer "Google Internet Authority G2" (verified OK))
 by mx1.freebsd.org (Postfix) with ESMTPS id 9106519E7;
 Thu, 21 Jan 2016 15:03:27 +0000 (UTC)
 (envelope-from asomers@gmail.com)
Received: by mail-ob0-x22d.google.com with SMTP id ba1so37306662obb.3;
 Thu, 21 Jan 2016 07:03:27 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;
 h=mime-version:in-reply-to:references:date:message-id:subject:from:to
 :cc:content-type;
 bh=pJVUr4ZA7JsTZaIuXnwBckT8Y9pT+VJe2kV/Mx0HKXE=;
 b=cODrBoUCJfcX3c2binrUruHA7IX/1b1Nv/kcbHq1zb6Id4zC0gbm7BscyzKknjniG3
 5QRLNb4hadnP8+CBdqWmbFbuY0wqvcIKK38DgGTZ8a1fdT9X/HUE3srrMfMbFFUeD2na
 8nISGVaFXoK864jZaOm9ONIuyUwbUC72R6xZ26nRSGbkqSJUo+O1UcOFWCNN6pP1izPq
 kpLLfvLuO5eF1YoUq4BzbMhnOqAUk4zIHw4xSFNSQ17fMApUq3ZXL9y+vMuHDxlc3jOD
 vPBr8FRqGIark32WphIEsN1R36bZYhOdQV1EON8bLRgkopZJc6CyIuAxAXhjGHc+kVS2
 J4hQ==
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:date
 :message-id:subject:from:to:cc:content-type;
 bh=pJVUr4ZA7JsTZaIuXnwBckT8Y9pT+VJe2kV/Mx0HKXE=;
 b=CX2rTWJJN1xYf5REP3PjmzNpeQo1O3Nqf/o34l9FMrT7gpTw9jfmWLd7OsZV+K7WuS
 xBDYqVXclsi3D2w84QJG+8MrUiuzPT7Zd2jc9SuAKBaTV9saD+Bcsm7tC5X04g17F1PJ
 A8Co1TSR5aC1S+wLExKWEohC779UY/20/LPAicE3a0VfwMPtxegRKcoX29bMKZt8KLgS
 ZSvVWyAmP2HiZKYxhkIOxXTPWBg/svcFNsjHqeq89AXrF7oZIpsmDjczdn6Cdf/IG0fx
 b6kr/Jq869SeAkUwZwXwaLA3H0zqSzEadNh3p6XoLhRa44oKS7fObdJgMNKSEJombohn
 IlVw==
X-Gm-Message-State: ALoCoQnQ8XT+ZndBT5EXeobeXxif10fraMpe9pI9em2GgpVvEaR03ZDp2hxEb0ij6xlOlPtYnZMYHkLD90dZLsUpXpzYVNH89Q==
MIME-Version: 1.0
X-Received: by 10.60.67.34 with SMTP id k2mr32659868oet.67.1453388605707; Thu,
 21 Jan 2016 07:03:25 -0800 (PST)
Received: by 10.202.69.84 with HTTP; Thu, 21 Jan 2016 07:03:25 -0800 (PST)
In-Reply-To: <20160121113813.GG37895@zxy.spb.ru>
References: <201601191700.u0JH0P6k061610@repo.freebsd.org>
 <569E6DA0.9010300@pix.net>
 <CAOtMX2idrWOpWbkYxPFn3yur8w-vgfBryhT4_0yiBvg10sWWRA@mail.gmail.com>
 <569F516D.80303@FreeBSD.org>
 <CAOtMX2gs37OnLMXE4zCduZF94+5z-TgPW+qg8K8BweauLCRgDQ@mail.gmail.com>
 <56A019A1.4030900@FreeBSD.org> <20160121113813.GG37895@zxy.spb.ru>
Date: Thu, 21 Jan 2016 08:03:25 -0700
Message-ID: <CAOtMX2jB_Zsy-inXHTrehGjN2Xd4f=4TOvd5g-ZB4ho==-psPA@mail.gmail.com>
Subject: Re: svn commit: r294329 - in
 head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs: . sys
From: alan somers <asomers@gmail.com>
To: Slawa Olhovchenkov <slw@zxy.spb.ru>
Cc: Andriy Gapon <avg@freebsd.org>, Alan Somers <asomers@freebsd.org>, 
 "svn-src-head@freebsd.org" <svn-src-head@freebsd.org>, 
 "svn-src-all@freebsd.org" <svn-src-all@freebsd.org>, 
 "src-committers@freebsd.org" <src-committers@freebsd.org>
Content-Type: text/plain; charset=UTF-8
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.20
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for &quot;
 user&quot; and &quot; projects&quot; \)" <svn-src-all.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-all/>
List-Post: <mailto:svn-src-all@freebsd.org>
List-Help: <mailto:svn-src-all-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Thu, 21 Jan 2016 15:03:28 -0000

On Thu, Jan 21, 2016 at 4:38 AM, Slawa Olhovchenkov <slw@zxy.spb.ru> wrote:
> On Thu, Jan 21, 2016 at 01:34:57AM +0200, Andriy Gapon wrote:
>
>> On 20/01/2016 22:03, Alan Somers wrote:
>> > On Wed, Jan 20, 2016 at 2:20 AM, Andriy Gapon <avg@freebsd.org> wrote:
>> >> On 19/01/2016 19:20, Alan Somers wrote:
>> >>> The thing is, it never really worked in the first place.  Panics and
>> >>> deadlocks are so frequent that I don't think the feature was usable
>> >>> for anybody.
>> >>
>> >> The feature is perfectly usable for me.  I have never run into the problems that
>> >> you describe.  Why not fix the real bugs that you've run into?
>> >
>> > Spectra Logic and iXSystems both experienced many problems with this.
>> > The worst is a deadlock that can be triggered simply by pulling a
>> > drive from a redundant pool when there exists a zvol anywhere in the
>> > system (see https://reviews.freebsd.org/D4998 for a quick way to
>> > reproduce).  Fixing it correctly would likely require far more time
>> > than I have available.  I just want the bugs to go away.  See that
>> > same code review for a change to make the feature optional.
>>
>> I think that we all want all the bugs to go way.  One way to remove bugs is to
>> remove (disable) code that contains bugs.  That way the perfect bug-free
>> software is clearly achievable :-)  Unfortunately, that technique is not always
>> welcomed.
>>
>> P.S.
>> I think that the real problem here is that a method of a geom must never drop
>> topology_lock.  In other words, the GEOM management code (like g_xxx() stuff in
>> geom_subr.c) expects that a topology can not change underneath it.  But
>> zvol_geom_access() clearly breaks that contract.
>
> May be same cause problem with swap on zvol (don't test on latest
> -stable)?

I'm not familiar with that problem.  Is there a PR?

From owner-svn-src-all@freebsd.org  Thu Jan 21 15:10:14 2016
Return-Path: <owner-svn-src-all@freebsd.org>
Delivered-To: svn-src-all@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id E2945A8BC31;
 Thu, 21 Jan 2016 15:10:14 +0000 (UTC) (envelope-from slw@zxy.spb.ru)
Received: from zxy.spb.ru (zxy.spb.ru [195.70.199.98])
 (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
 (Client did not present a certificate)
 by mx1.freebsd.org (Postfix) with ESMTPS id 9F2181D42;
 Thu, 21 Jan 2016 15:10:14 +0000 (UTC) (envelope-from slw@zxy.spb.ru)
Received: from slw by zxy.spb.ru with local (Exim 4.86 (FreeBSD))
 (envelope-from <slw@zxy.spb.ru>)
 id 1aMGsE-000MX1-Qd; Thu, 21 Jan 2016 18:10:10 +0300
Date: Thu, 21 Jan 2016 18:10:10 +0300
From: Slawa Olhovchenkov <slw@zxy.spb.ru>
To: alan somers <asomers@gmail.com>
Cc: "svn-src-head@freebsd.org" <svn-src-head@freebsd.org>,
 "svn-src-all@freebsd.org" <svn-src-all@freebsd.org>,
 "src-committers@freebsd.org" <src-committers@freebsd.org>,
 Alan Somers <asomers@freebsd.org>, Andriy Gapon <avg@freebsd.org>
Subject: Re: svn commit: r294329 - in
 head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs: . sys
Message-ID: <20160121151010.GH37895@zxy.spb.ru>
References: <201601191700.u0JH0P6k061610@repo.freebsd.org>
 <569E6DA0.9010300@pix.net>
 <CAOtMX2idrWOpWbkYxPFn3yur8w-vgfBryhT4_0yiBvg10sWWRA@mail.gmail.com>
 <569F516D.80303@FreeBSD.org>
 <CAOtMX2gs37OnLMXE4zCduZF94+5z-TgPW+qg8K8BweauLCRgDQ@mail.gmail.com>
 <56A019A1.4030900@FreeBSD.org> <20160121113813.GG37895@zxy.spb.ru>
 <CAOtMX2jB_Zsy-inXHTrehGjN2Xd4f=4TOvd5g-ZB4ho==-psPA@mail.gmail.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <CAOtMX2jB_Zsy-inXHTrehGjN2Xd4f=4TOvd5g-ZB4ho==-psPA@mail.gmail.com>
User-Agent: Mutt/1.5.24 (2015-08-30)
X-SA-Exim-Connect-IP: <locally generated>
X-SA-Exim-Mail-From: slw@zxy.spb.ru
X-SA-Exim-Scanned: No (on zxy.spb.ru); SAEximRunCond expanded to false
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.20
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for &quot;
 user&quot; and &quot; projects&quot; \)" <svn-src-all.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-all/>
List-Post: <mailto:svn-src-all@freebsd.org>
List-Help: <mailto:svn-src-all-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Thu, 21 Jan 2016 15:10:15 -0000

On Thu, Jan 21, 2016 at 08:03:25AM -0700, alan somers wrote:

> On Thu, Jan 21, 2016 at 4:38 AM, Slawa Olhovchenkov <slw@zxy.spb.ru> wrote:
> > On Thu, Jan 21, 2016 at 01:34:57AM +0200, Andriy Gapon wrote:
> >
> >> On 20/01/2016 22:03, Alan Somers wrote:
> >> > On Wed, Jan 20, 2016 at 2:20 AM, Andriy Gapon <avg@freebsd.org> wrote:
> >> >> On 19/01/2016 19:20, Alan Somers wrote:
> >> >>> The thing is, it never really worked in the first place.  Panics and
> >> >>> deadlocks are so frequent that I don't think the feature was usable
> >> >>> for anybody.
> >> >>
> >> >> The feature is perfectly usable for me.  I have never run into the problems that
> >> >> you describe.  Why not fix the real bugs that you've run into?
> >> >
> >> > Spectra Logic and iXSystems both experienced many problems with this.
> >> > The worst is a deadlock that can be triggered simply by pulling a
> >> > drive from a redundant pool when there exists a zvol anywhere in the
> >> > system (see https://reviews.freebsd.org/D4998 for a quick way to
> >> > reproduce).  Fixing it correctly would likely require far more time
> >> > than I have available.  I just want the bugs to go away.  See that
> >> > same code review for a change to make the feature optional.
> >>
> >> I think that we all want all the bugs to go way.  One way to remove bugs is to
> >> remove (disable) code that contains bugs.  That way the perfect bug-free
> >> software is clearly achievable :-)  Unfortunately, that technique is not always
> >> welcomed.
> >>
> >> P.S.
> >> I think that the real problem here is that a method of a geom must never drop
> >> topology_lock.  In other words, the GEOM management code (like g_xxx() stuff in
> >> geom_subr.c) expects that a topology can not change underneath it.  But
> >> zvol_geom_access() clearly breaks that contract.
> >
> > May be same cause problem with swap on zvol (don't test on latest
> > -stable)?
> 
> I'm not familiar with that problem.  Is there a PR?

I am find PR 199189.
My expirense slightly different: VirtualBox VM with test install (384M
RAM) hang, not crashed, just infinite wait somewhere. Tested on 10.1.

From owner-svn-src-all@freebsd.org  Thu Jan 21 15:19:02 2016
Return-Path: <owner-svn-src-all@freebsd.org>
Delivered-To: svn-src-all@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id DF41FA8BF16
 for <svn-src-all@mailman.ysv.freebsd.org>;
 Thu, 21 Jan 2016 15:19:02 +0000 (UTC)
 (envelope-from steven.hartland@multiplay.co.uk)
Received: from mail-wm0-x234.google.com (mail-wm0-x234.google.com
 [IPv6:2a00:1450:400c:c09::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 849411240
 for <svn-src-all@freebsd.org>; Thu, 21 Jan 2016 15:19:02 +0000 (UTC)
 (envelope-from steven.hartland@multiplay.co.uk)
Received: by mail-wm0-x234.google.com with SMTP id 123so178528950wmz.0
 for <svn-src-all@freebsd.org>; Thu, 21 Jan 2016 07:19:02 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=multiplay-co-uk.20150623.gappssmtp.com; s=20150623;
 h=subject:to:references:cc:from:message-id:date:user-agent
 :mime-version:in-reply-to:content-type:content-transfer-encoding;
 bh=8dmlAWFyJkA6IJC/LSLRkImBMnIJPyNEtgSLpRqU5V8=;
 b=kD3/n3ofEgCad+OZq0dihJmGk3ymxmc/5k5uuTXpEtQPwcnn6sOYT8ufjfAtmYzVHx
 hybHgaEb6QiOUM/6bFL5KRgAhfkW2L0ZAmoWeE9qc4ACalzUcgYRUE/AUo8bSjrMAJjU
 hggZCgaL5chth3ytOA3rPTqvGsTB7H/mH/BjxZ9/syl33apkaldyTckzrRIOMnc+JEeQ
 vPG8tbWqemldgU0U7QswuqvyWECpDrgg7NOWqFwaJT3J8082v+XTzMT4CxPInj4hAREm
 pe9M2MCIWF07YQHmlyYfRz9s8xN2uTaolYoZEW+xhNaHuvrsSyeyGv0RWEAsnwn+7AaQ
 0tkA==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20130820;
 h=x-gm-message-state:subject:to:references:cc:from:message-id:date
 :user-agent:mime-version:in-reply-to:content-type
 :content-transfer-encoding;
 bh=8dmlAWFyJkA6IJC/LSLRkImBMnIJPyNEtgSLpRqU5V8=;
 b=FpTSN8qskX7ctLgU2hyDl7dZF9VJsM7v/h8GezqJkygOcDWOvr/DfvwKt3gdwel3fJ
 Cj5sxqLc7kg9CExS9Gz6NVHfXmpv/oLhVZfmnS4X/aKZH+YZ4/Zomb96w5i5c34ONDCm
 WbT1e5y07yarREzLQUdjbcIfd47jTJlA7/rzvMgnmVPZpUuFGyvdgdj0DFty9pA1orER
 DQ10m92EQzA5eLT2sXK71sd57DrE8CKhWlJbAjTdLOKPH+4c82IbYC/T1sbf5yPK9K9m
 gvE0urBqkUTh1wPuZm1PvJUTnoKOPI1FuBPbIVtyQ+ncWUW2ZTtLkeztam33qeU2evfd
 g2MA==
X-Gm-Message-State: ALoCoQmKOXRB2CUQjvOiyDkH0ffl+9SnM38GPMinwFyAEwtLi3ZRWmiNay4E3z3Q7HYg46dhUcLibYRM6JhK9ASRAofJ5KC0nw==
X-Received: by 10.194.82.199 with SMTP id k7mr48796827wjy.65.1453389540445;
 Thu, 21 Jan 2016 07:19:00 -0800 (PST)
Received: from [10.10.1.58] (liv3d.labs.multiplay.co.uk. [82.69.141.171])
 by smtp.gmail.com with ESMTPSA id t195sm30453419wme.13.2016.01.21.07.18.56
 (version=TLSv1/SSLv3 cipher=OTHER);
 Thu, 21 Jan 2016 07:18:58 -0800 (PST)
Subject: Re: svn commit: r294329 - in
 head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs: . sys
To: Slawa Olhovchenkov <slw@zxy.spb.ru>, alan somers <asomers@gmail.com>
References: <201601191700.u0JH0P6k061610@repo.freebsd.org>
 <569E6DA0.9010300@pix.net>
 <CAOtMX2idrWOpWbkYxPFn3yur8w-vgfBryhT4_0yiBvg10sWWRA@mail.gmail.com>
 <569F516D.80303@FreeBSD.org>
 <CAOtMX2gs37OnLMXE4zCduZF94+5z-TgPW+qg8K8BweauLCRgDQ@mail.gmail.com>
 <56A019A1.4030900@FreeBSD.org> <20160121113813.GG37895@zxy.spb.ru>
 <CAOtMX2jB_Zsy-inXHTrehGjN2Xd4f=4TOvd5g-ZB4ho==-psPA@mail.gmail.com>
 <20160121151010.GH37895@zxy.spb.ru>
Cc: "svn-src-head@freebsd.org" <svn-src-head@freebsd.org>,
 "svn-src-all@freebsd.org" <svn-src-all@freebsd.org>,
 "src-committers@freebsd.org" <src-committers@freebsd.org>,
 Alan Somers <asomers@freebsd.org>, Andriy Gapon <avg@freebsd.org>
From: Steven Hartland <steven.hartland@multiplay.co.uk>
Message-ID: <56A0F6E5.2020406@multiplay.co.uk>
Date: Thu, 21 Jan 2016 15:19:01 +0000
User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:38.0) Gecko/20100101
 Thunderbird/38.5.1
MIME-Version: 1.0
In-Reply-To: <20160121151010.GH37895@zxy.spb.ru>
Content-Type: text/plain; charset=windows-1252; format=flowed
Content-Transfer-Encoding: 7bit
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.20
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for &quot;
 user&quot; and &quot; projects&quot; \)" <svn-src-all.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-all/>
List-Post: <mailto:svn-src-all@freebsd.org>
List-Help: <mailto:svn-src-all-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Thu, 21 Jan 2016 15:19:03 -0000



On 21/01/2016 15:10, Slawa Olhovchenkov wrote:
> On Thu, Jan 21, 2016 at 08:03:25AM -0700, alan somers wrote:
>
>> On Thu, Jan 21, 2016 at 4:38 AM, Slawa Olhovchenkov <slw@zxy.spb.ru> wrote:
>>> On Thu, Jan 21, 2016 at 01:34:57AM +0200, Andriy Gapon wrote:
>>>
>>>> On 20/01/2016 22:03, Alan Somers wrote:
>>>>> On Wed, Jan 20, 2016 at 2:20 AM, Andriy Gapon <avg@freebsd.org> wrote:
>>>>>> On 19/01/2016 19:20, Alan Somers wrote:
>>>>>>> The thing is, it never really worked in the first place.  Panics and
>>>>>>> deadlocks are so frequent that I don't think the feature was usable
>>>>>>> for anybody.
>>>>>> The feature is perfectly usable for me.  I have never run into the problems that
>>>>>> you describe.  Why not fix the real bugs that you've run into?
>>>>> Spectra Logic and iXSystems both experienced many problems with this.
>>>>> The worst is a deadlock that can be triggered simply by pulling a
>>>>> drive from a redundant pool when there exists a zvol anywhere in the
>>>>> system (see https://reviews.freebsd.org/D4998 for a quick way to
>>>>> reproduce).  Fixing it correctly would likely require far more time
>>>>> than I have available.  I just want the bugs to go away.  See that
>>>>> same code review for a change to make the feature optional.
>>>> I think that we all want all the bugs to go way.  One way to remove bugs is to
>>>> remove (disable) code that contains bugs.  That way the perfect bug-free
>>>> software is clearly achievable :-)  Unfortunately, that technique is not always
>>>> welcomed.
>>>>
>>>> P.S.
>>>> I think that the real problem here is that a method of a geom must never drop
>>>> topology_lock.  In other words, the GEOM management code (like g_xxx() stuff in
>>>> geom_subr.c) expects that a topology can not change underneath it.  But
>>>> zvol_geom_access() clearly breaks that contract.
>>> May be same cause problem with swap on zvol (don't test on latest
>>> -stable)?
>> I'm not familiar with that problem.  Is there a PR?
> I am find PR 199189.
> My expirense slightly different: VirtualBox VM with test install (384M
> RAM) hang, not crashed, just infinite wait somewhere. Tested on 10.1.
>
Had the same on 10.2 last night.

From owner-svn-src-all@freebsd.org  Thu Jan 21 15:27:45 2016
Return-Path: <owner-svn-src-all@freebsd.org>
Delivered-To: svn-src-all@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id BB66AA8A41B;
 Thu, 21 Jan 2016 15:27:45 +0000 (UTC) (envelope-from smh@FreeBSD.org)
Received: from repo.freebsd.org (repo.freebsd.org
 [IPv6:2610:1c1:1:6068::e6a:0])
 (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
 (Client did not present a certificate)
 by mx1.freebsd.org (Postfix) with ESMTPS id 7E92F1944;
 Thu, 21 Jan 2016 15:27:45 +0000 (UTC) (envelope-from smh@FreeBSD.org)
Received: from repo.freebsd.org ([127.0.1.37])
 by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u0LFRiJj069055;
 Thu, 21 Jan 2016 15:27:44 GMT (envelope-from smh@FreeBSD.org)
Received: (from smh@localhost)
 by repo.freebsd.org (8.15.2/8.15.2/Submit) id u0LFRiXv069054;
 Thu, 21 Jan 2016 15:27:44 GMT (envelope-from smh@FreeBSD.org)
Message-Id: <201601211527.u0LFRiXv069054@repo.freebsd.org>
X-Authentication-Warning: repo.freebsd.org: smh set sender to smh@FreeBSD.org
 using -f
From: Steven Hartland <smh@FreeBSD.org>
Date: Thu, 21 Jan 2016 15:27:44 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-head@freebsd.org
Subject: svn commit: r294506 - head/sys/boot/common
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.20
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for &quot;
 user&quot; and &quot; projects&quot; \)" <svn-src-all.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-all/>
List-Post: <mailto:svn-src-all@freebsd.org>
List-Help: <mailto:svn-src-all-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Thu, 21 Jan 2016 15:27:45 -0000

Author: smh
Date: Thu Jan 21 15:27:44 2016
New Revision: 294506
URL: https://svnweb.freebsd.org/changeset/base/294506

Log:
  Prevent loader.conf load failure due to unknown console entries
  
  When processing loader.conf if console contained an entry for an unsupported
  console then cons_set would return an error refusing to set any console.
  
  This has two side effects:
  
  1. Forth would throw a syntax error and stop processing loader.conf at that
    point.
  2. The value of console is ignored.
  
  #1 Means other important loader.conf entries may not be processed, which is
     clearly undesirable.
  #2 Means the users preference for console aren't applied even if they did
     contain valid options. Now we have support for multi boot paths from a
     single image e.g. bios and efi mode the console preference needs to deal
     with the need to set preference for more than one source.
  
  Fix this by:
  * Returning CMD_OK where possible from cons_set.
  * Allowing set with at least one valid console to proceed.
  
  Reviewed by:	allanjude
  MFC after:	1 week
  Sponsored by:	Multiplay
  Differential Revision:	https://reviews.freebsd.org/D5018

Modified:
  head/sys/boot/common/console.c

Modified: head/sys/boot/common/console.c
==============================================================================
--- head/sys/boot/common/console.c	Thu Jan 21 14:57:45 2016	(r294505)
+++ head/sys/boot/common/console.c	Thu Jan 21 15:27:44 2016	(r294506)
@@ -38,7 +38,7 @@ __FBSDID("$FreeBSD$");
 static int	cons_set(struct env_var *ev, int flags, const void *value);
 static int	cons_find(const char *name);
 static int	cons_check(const char *string);
-static void	cons_change(const char *string);
+static int	cons_change(const char *string);
 static int	twiddle_set(struct env_var *ev, int flags, const void *value);
 
 /*
@@ -47,12 +47,12 @@ static int	twiddle_set(struct env_var *e
  * as active.  Also create the console variable.
  */
 void
-cons_probe(void) 
+cons_probe(void)
 {
     int			cons;
     int			active;
     char		*prefconsole;
-    
+
     /* We want a callback to install the new value when this var changes. */
     env_setenv("twiddle_divisor", EV_VOLATILE, "1", twiddle_set, env_nounset);
 
@@ -162,54 +162,69 @@ cons_find(const char *name)
 static int
 cons_set(struct env_var *ev, int flags, const void *value)
 {
-    int		cons;
+    int		ret;
 
-    if ((value == NULL) || (cons_check(value) == -1)) {
-	if (value != NULL) 
-	    printf("no such console!\n");
-	printf("Available consoles:\n");
-	for (cons = 0; consoles[cons] != NULL; cons++)
-	    printf("    %s\n", consoles[cons]->c_name);
-	return(CMD_ERROR);
+    if ((value == NULL) || (cons_check(value) == 0)) {
+	/*
+	 * Return CMD_OK instead of CMD_ERROR to prevent forth syntax error,
+	 * which would prevent it processing any further loader.conf entries.
+	 */
+	return (CMD_OK);
     }
 
-    cons_change(value);
+    ret = cons_change(value);
+    if (ret != CMD_OK)
+	return (ret);
 
     env_setenv(ev->ev_name, flags | EV_NOHOOK, value, NULL, NULL);
-    return(CMD_OK);
+    return (CMD_OK);
 }
 
 /*
- * Check that all of the consoles listed in *string are valid consoles
+ * Check that at least one the consoles listed in *string is valid
  */
 static int
 cons_check(const char *string)
 {
-    int		cons;
+    int		cons, found, failed;
     char	*curpos, *dup, *next;
 
     dup = next = strdup(string);
-    cons = -1;
+    found = failed = 0;
     while (next != NULL) {
 	curpos = strsep(&next, " ,");
 	if (*curpos != '\0') {
 	    cons = cons_find(curpos);
-	    if (cons == -1)
-		break;
+	    if (cons == -1) {
+		printf("console %s is invalid!\n", curpos);
+		failed++;
+	    } else {
+		found++;
+	    }
 	}
     }
 
     free(dup);
-    return (cons);
+
+    if (found == 0)
+	printf("no valid consoles!\n");
+
+    if (found == 0 || failed != 0) {
+	printf("Available consoles:\n");
+	for (cons = 0; consoles[cons] != NULL; cons++)
+	    printf("    %s\n", consoles[cons]->c_name);
+    }
+
+    return (found);
 }
 
 /*
- * Activate all of the consoles listed in *string and disable all the others.
+ * Activate all the valid consoles listed in *string and disable all others.
  */
-static void
+static int
 cons_change(const char *string)
 {
-    int		cons;
+    int		cons, active;
     char	*curpos, *dup, *next;
 
     /* Disable all consoles */
@@ -219,6 +234,7 @@ cons_change(const char *string)
 
     /* Enable selected consoles */
     dup = next = strdup(string);
+    active = 0;
     while (next != NULL) {
 	curpos = strsep(&next, " ,");
 	if (*curpos == '\0')
@@ -227,14 +243,37 @@ cons_change(const char *string)
 	if (cons >= 0) {
 	    consoles[cons]->c_flags |= C_ACTIVEIN | C_ACTIVEOUT;
 	    consoles[cons]->c_init(0);
-	    if ((consoles[cons]->c_flags & (C_PRESENTIN | C_PRESENTOUT)) !=
-		(C_PRESENTIN | C_PRESENTOUT))
-		printf("console %s failed to initialize\n",
-		    consoles[cons]->c_name);
+	    if ((consoles[cons]->c_flags & (C_PRESENTIN | C_PRESENTOUT)) ==
+		(C_PRESENTIN | C_PRESENTOUT)) {
+		active++;
+		continue;
+	    }
+
+	    if (active != 0) {
+		/* If no consoles have initialised we wouldn't see this. */
+		printf("console %s failed to initialize\n", consoles[cons]->c_name);
+	    }
 	}
     }
 
     free(dup);
+
+    if (active == 0) {
+	/* All requested consoles failed to initialise, try to recover. */
+	for (cons = 0; consoles[cons] != NULL; cons++) {
+	    consoles[cons]->c_flags |= C_ACTIVEIN | C_ACTIVEOUT;
+	    consoles[cons]->c_init(0);
+	    if ((consoles[cons]->c_flags &
+		(C_PRESENTIN | C_PRESENTOUT)) ==
+		(C_PRESENTIN | C_PRESENTOUT))
+		active++;
+	}
+
+	if (active == 0)
+	    return (CMD_ERROR); /* Recovery failed. */
+    }
+
+    return (CMD_OK);
 }
 
 /*

From owner-svn-src-all@freebsd.org  Thu Jan 21 16:11:22 2016
Return-Path: <owner-svn-src-all@freebsd.org>
Delivered-To: svn-src-all@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0DF52A8B8B6;
 Thu, 21 Jan 2016 16:11:22 +0000 (UTC)
 (envelope-from harti@FreeBSD.org)
Received: from repo.freebsd.org (repo.freebsd.org
 [IPv6:2610:1c1:1:6068::e6a:0])
 (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
 (Client did not present a certificate)
 by mx1.freebsd.org (Postfix) with ESMTPS id C4B2D18EF;
 Thu, 21 Jan 2016 16:11:21 +0000 (UTC)
 (envelope-from harti@FreeBSD.org)
Received: from repo.freebsd.org ([127.0.1.37])
 by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u0LGBKm5086757;
 Thu, 21 Jan 2016 16:11:20 GMT (envelope-from harti@FreeBSD.org)
Received: (from harti@localhost)
 by repo.freebsd.org (8.15.2/8.15.2/Submit) id u0LGBKkV086754;
 Thu, 21 Jan 2016 16:11:20 GMT (envelope-from harti@FreeBSD.org)
Message-Id: <201601211611.u0LGBKkV086754@repo.freebsd.org>
X-Authentication-Warning: repo.freebsd.org: harti set sender to
 harti@FreeBSD.org using -f
From: Hartmut Brandt <harti@FreeBSD.org>
Date: Thu, 21 Jan 2016 16:11:20 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-head@freebsd.org
Subject: svn commit: r294507 - head/contrib/bsnmp/snmp_mibII
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.20
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for &quot;
 user&quot; and &quot; projects&quot; \)" <svn-src-all.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-all/>
List-Post: <mailto:svn-src-all@freebsd.org>
List-Help: <mailto:svn-src-all-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Thu, 21 Jan 2016 16:11:22 -0000

Author: harti
Date: Thu Jan 21 16:11:20 2016
New Revision: 294507
URL: https://svnweb.freebsd.org/changeset/base/294507

Log:
  Fill the ifAlias leaf of the ifXTable with the interface description
  if there is one available and it fits into the maximum size (64 characters).

Modified:
  head/contrib/bsnmp/snmp_mibII/mibII.c
  head/contrib/bsnmp/snmp_mibII/mibII.h
  head/contrib/bsnmp/snmp_mibII/mibII_interfaces.c

Modified: head/contrib/bsnmp/snmp_mibII/mibII.c
==============================================================================
--- head/contrib/bsnmp/snmp_mibII/mibII.c	Thu Jan 21 15:27:44 2016	(r294506)
+++ head/contrib/bsnmp/snmp_mibII/mibII.c	Thu Jan 21 16:11:20 2016	(r294507)
@@ -443,6 +443,7 @@ mib_fetch_ifmib(struct mibif *ifp)
 	size_t len;
 	void *newmib;
 	struct ifmibdata oldmib = ifp->mib;
+	struct ifreq irr;
 
 	if (fetch_generic_mib(ifp, &oldmib) == -1)
 		return (-1);
@@ -514,6 +515,18 @@ mib_fetch_ifmib(struct mibif *ifp)
 	}
 
   out:
+	strncpy(irr.ifr_name, ifp->name, sizeof(irr.ifr_name));
+	irr.ifr_buffer.buffer = MIBIF_PRIV(ifp)->alias;
+	irr.ifr_buffer.length = sizeof(MIBIF_PRIV(ifp)->alias);
+	if (ioctl(mib_netsock, SIOCGIFDESCR, &irr) == -1) {
+		MIBIF_PRIV(ifp)->alias[0] = 0;
+		if (errno != ENOMSG)
+			syslog(LOG_WARNING, "SIOCGIFDESCR (%s): %m", ifp->name);
+	} else if (irr.ifr_buffer.buffer == NULL) {
+		MIBIF_PRIV(ifp)->alias[0] = 0;
+		syslog(LOG_WARNING, "SIOCGIFDESCR (%s): too long (%zu)",
+		    ifp->name, irr.ifr_buffer.length);
+	}
 	ifp->mibtick = get_ticks();
 	return (0);
 }

Modified: head/contrib/bsnmp/snmp_mibII/mibII.h
==============================================================================
--- head/contrib/bsnmp/snmp_mibII/mibII.h	Thu Jan 21 15:27:44 2016	(r294506)
+++ head/contrib/bsnmp/snmp_mibII/mibII.h	Thu Jan 21 16:11:20 2016	(r294507)
@@ -57,6 +57,9 @@
 #include "snmp_mibII.h"
 #include "mibII_tree.h"
 
+/* maximum size of the interface alias */
+static const u_int MIBIF_ALIAS_SIZE = 64 + 1;
+
 /*
  * Interface list and flags.
  */
@@ -77,6 +80,9 @@ struct mibif_private {
 	uint64_t	hc_opackets;
 	uint64_t	hc_imcasts;
 	uint64_t	hc_ipackets;
+
+	/* this should be made public */
+	char		alias[MIBIF_ALIAS_SIZE];
 };
 #define	MIBIF_PRIV(IFP) ((struct mibif_private *)((IFP)->private))
 

Modified: head/contrib/bsnmp/snmp_mibII/mibII_interfaces.c
==============================================================================
--- head/contrib/bsnmp/snmp_mibII/mibII_interfaces.c	Thu Jan 21 15:27:44 2016	(r294506)
+++ head/contrib/bsnmp/snmp_mibII/mibII_interfaces.c	Thu Jan 21 16:11:20 2016	(r294507)
@@ -528,7 +528,7 @@ op_ifxtable(struct snmp_context *ctx, st
 		break;
 
 	  case LEAF_ifAlias:
-		ret = string_get(value, "", -1);
+		ret = string_get(value, MIBIF_PRIV(ifp)->alias, -1);
 		break;
 
 	  case LEAF_ifCounterDiscontinuityTime:

From owner-svn-src-all@freebsd.org  Thu Jan 21 16:42:53 2016
Return-Path: <owner-svn-src-all@freebsd.org>
Delivered-To: svn-src-all@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5EB26A8C684;
 Thu, 21 Jan 2016 16:42:53 +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 32B0914EE;
 Thu, 21 Jan 2016 16:42:53 +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 u0LGgqxN097384;
 Thu, 21 Jan 2016 16:42:52 GMT (envelope-from andrew@FreeBSD.org)
Received: (from andrew@localhost)
 by repo.freebsd.org (8.15.2/8.15.2/Submit) id u0LGgqwk097383;
 Thu, 21 Jan 2016 16:42:52 GMT (envelope-from andrew@FreeBSD.org)
Message-Id: <201601211642.u0LGgqwk097383@repo.freebsd.org>
X-Authentication-Warning: repo.freebsd.org: andrew set sender to
 andrew@FreeBSD.org using -f
From: Andrew Turner <andrew@FreeBSD.org>
Date: Thu, 21 Jan 2016 16:42:52 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-head@freebsd.org
Subject: svn commit: r294510 - head/sys/arm/mv
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.20
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for &quot;
 user&quot; and &quot; projects&quot; \)" <svn-src-all.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-all/>
List-Post: <mailto:svn-src-all@freebsd.org>
List-Help: <mailto:svn-src-all-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Thu, 21 Jan 2016 16:42:53 -0000

Author: andrew
Date: Thu Jan 21 16:42:52 2016
New Revision: 294510
URL: https://svnweb.freebsd.org/changeset/base/294510

Log:
  Remove an extra '!' found by clang 3.8.

Modified:
  head/sys/arm/mv/mv_pci.c

Modified: head/sys/arm/mv/mv_pci.c
==============================================================================
--- head/sys/arm/mv/mv_pci.c	Thu Jan 21 16:38:58 2016	(r294509)
+++ head/sys/arm/mv/mv_pci.c	Thu Jan 21 16:42:52 2016	(r294510)
@@ -922,7 +922,7 @@ static inline void
 pcib_write_irq_mask(struct mv_pcib_softc *sc, uint32_t mask)
 {
 
-	if (!sc->sc_type != MV_TYPE_PCI)
+	if (sc->sc_type != MV_TYPE_PCI)
 		return;
 
 	bus_space_write_4(sc->sc_bst, sc->sc_bsh, PCIE_REG_IRQ_MASK, mask);

From owner-svn-src-all@freebsd.org  Thu Jan 21 16:48:02 2016
Return-Path: <owner-svn-src-all@freebsd.org>
Delivered-To: svn-src-all@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id E54F2A8C80B;
 Thu, 21 Jan 2016 16:48:02 +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 C12CD1834;
 Thu, 21 Jan 2016 16:48:02 +0000 (UTC)
 (envelope-from andrew@FreeBSD.org)
Received: from repo.freebsd.org ([127.0.1.37])
 by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u0LGm1A1097900;
 Thu, 21 Jan 2016 16:48:01 GMT (envelope-from andrew@FreeBSD.org)
Received: (from andrew@localhost)
 by repo.freebsd.org (8.15.2/8.15.2/Submit) id u0LGm1Eq097893;
 Thu, 21 Jan 2016 16:48:01 GMT (envelope-from andrew@FreeBSD.org)
Message-Id: <201601211648.u0LGm1Eq097893@repo.freebsd.org>
X-Authentication-Warning: repo.freebsd.org: andrew set sender to
 andrew@FreeBSD.org using -f
From: Andrew Turner <andrew@FreeBSD.org>
Date: Thu, 21 Jan 2016 16:48:01 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-head@freebsd.org
Subject: svn commit: r294511 - in head/sys: conf dev/fdt dev/ofw
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.20
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for &quot;
 user&quot; and &quot; projects&quot; \)" <svn-src-all.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-all/>
List-Post: <mailto:svn-src-all@freebsd.org>
List-Help: <mailto:svn-src-all-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Thu, 21 Jan 2016 16:48:03 -0000

Author: andrew
Date: Thu Jan 21 16:48:01 2016
New Revision: 294511
URL: https://svnweb.freebsd.org/changeset/base/294511

Log:
  Remove fdt_fixup_table from architectures where it's unneeded. We only make
  use of fdt_fixup_table on PowerPC and ARM. As such we can remove it from
  other architectures as it's unneeded.
  
  Reviewed by:	nwhitehorn
  Sponsored by:	ABT Systems Ltd
  Differential Revision:	https://reviews.freebsd.org/D5013

Deleted:
  head/sys/dev/fdt/fdt_arm64.c
  head/sys/dev/fdt/fdt_mips.c
  head/sys/dev/fdt/fdt_x86.c
Modified:
  head/sys/conf/files.amd64
  head/sys/conf/files.arm64
  head/sys/conf/files.i386
  head/sys/conf/files.mips
  head/sys/dev/fdt/fdt_common.h
  head/sys/dev/ofw/ofw_fdt.c

Modified: head/sys/conf/files.amd64
==============================================================================
--- head/sys/conf/files.amd64	Thu Jan 21 16:42:52 2016	(r294510)
+++ head/sys/conf/files.amd64	Thu Jan 21 16:48:01 2016	(r294511)
@@ -240,7 +240,6 @@ dev/fdc/fdc.c			optional	fdc
 dev/fdc/fdc_acpi.c		optional	fdc
 dev/fdc/fdc_isa.c		optional	fdc isa
 dev/fdc/fdc_pccard.c		optional	fdc pccard
-dev/fdt/fdt_x86.c		optional	fdt
 dev/hpt27xx/hpt27xx_os_bsd.c	optional	hpt27xx
 dev/hpt27xx/hpt27xx_osm_bsd.c	optional	hpt27xx
 dev/hpt27xx/hpt27xx_config.c	optional	hpt27xx

Modified: head/sys/conf/files.arm64
==============================================================================
--- head/sys/conf/files.arm64	Thu Jan 21 16:42:52 2016	(r294510)
+++ head/sys/conf/files.arm64	Thu Jan 21 16:48:01 2016	(r294511)
@@ -59,7 +59,6 @@ crypto/blowfish/bf_enc.c	optional	crypto
 crypto/des/des_enc.c		optional	crypto | ipsec | netsmb
 dev/acpica/acpi_if.m		optional	acpi
 dev/ahci/ahci_generic.c		optional ahci fdt
-dev/fdt/fdt_arm64.c		optional	fdt
 dev/hwpmc/hwpmc_arm64.c		optional	hwpmc
 dev/hwpmc/hwpmc_arm64_md.c	optional	hwpmc
 dev/mmc/host/dwmmc.c		optional	dwmmc

Modified: head/sys/conf/files.i386
==============================================================================
--- head/sys/conf/files.i386	Thu Jan 21 16:42:52 2016	(r294510)
+++ head/sys/conf/files.i386	Thu Jan 21 16:48:01 2016	(r294511)
@@ -208,7 +208,6 @@ dev/fdc/fdc.c			optional fdc
 dev/fdc/fdc_acpi.c		optional fdc
 dev/fdc/fdc_isa.c		optional fdc isa
 dev/fdc/fdc_pccard.c		optional fdc pccard
-dev/fdt/fdt_x86.c		optional fdt
 dev/fe/if_fe_isa.c		optional fe isa
 dev/glxiic/glxiic.c		optional glxiic
 dev/glxsb/glxsb.c		optional glxsb

Modified: head/sys/conf/files.mips
==============================================================================
--- head/sys/conf/files.mips	Thu Jan 21 16:42:52 2016	(r294510)
+++ head/sys/conf/files.mips	Thu Jan 21 16:48:01 2016	(r294511)
@@ -80,7 +80,6 @@ dev/syscons/scvtb.c			optional	sc
 mips/mips/sc_machdep.c			optional	sc
 
 # FDT support
-dev/fdt/fdt_mips.c			optional	fdt
 dev/uart/uart_cpu_fdt.c			optional	uart fdt
 
 # crypto support -- use generic

Modified: head/sys/dev/fdt/fdt_common.h
==============================================================================
--- head/sys/dev/fdt/fdt_common.h	Thu Jan 21 16:42:52 2016	(r294510)
+++ head/sys/dev/fdt/fdt_common.h	Thu Jan 21 16:48:01 2016	(r294511)
@@ -48,12 +48,14 @@ struct fdt_sense_level {
 typedef int (*fdt_pic_decode_t)(phandle_t, pcell_t *, int *, int *, int *);
 extern fdt_pic_decode_t fdt_pic_table[];
 
+#if defined(__arm__) || defined(__powerpc__)
 typedef void (*fdt_fixup_t)(phandle_t);
 struct fdt_fixup_entry {
 	char		*model;
 	fdt_fixup_t	handler;
 };
 extern struct fdt_fixup_entry fdt_fixup_table[];
+#endif
 
 extern SLIST_HEAD(fdt_ic_list, fdt_ic) fdt_ic_list_head;
 struct fdt_ic {

Modified: head/sys/dev/ofw/ofw_fdt.c
==============================================================================
--- head/sys/dev/ofw/ofw_fdt.c	Thu Jan 21 16:42:52 2016	(r294510)
+++ head/sys/dev/ofw/ofw_fdt.c	Thu Jan 21 16:48:01 2016	(r294511)
@@ -394,6 +394,7 @@ ofw_fdt_package_to_path(ofw_t ofw, phand
 	return (-1);
 }
 
+#if defined(__arm__) || defined(__powerpc__)
 static int
 ofw_fdt_fixup(ofw_t ofw)
 {
@@ -427,10 +428,12 @@ ofw_fdt_fixup(ofw_t ofw)
 
 	return (0);
 }
+#endif
 
 static int
 ofw_fdt_interpret(ofw_t ofw, const char *cmd, int nret, cell_t *retvals)
 {
+#if defined(__arm__) || defined(__powerpc__)
 	int rv;
 
 	/*
@@ -449,4 +452,7 @@ ofw_fdt_interpret(ofw_t ofw, const char 
 		retvals[0] = rv;
 
 	return (rv);
+#else
+	return (0);
+#endif
 }

From owner-svn-src-all@freebsd.org  Thu Jan 21 16:55:07 2016
Return-Path: <owner-svn-src-all@freebsd.org>
Delivered-To: svn-src-all@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id BEE1DA8CA6C
 for <svn-src-all@mailman.ysv.freebsd.org>;
 Thu, 21 Jan 2016 16:55:07 +0000 (UTC)
 (envelope-from shawn.webb@hardenedbsd.org)
Received: from mail-yk0-x232.google.com (mail-yk0-x232.google.com
 [IPv6:2607:f8b0:4002:c07::232])
 (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits))
 (Client CN "smtp.gmail.com",
 Issuer "Google Internet Authority G2" (verified OK))
 by mx1.freebsd.org (Postfix) with ESMTPS id 7B15E1DAE
 for <svn-src-all@freebsd.org>; Thu, 21 Jan 2016 16:55:07 +0000 (UTC)
 (envelope-from shawn.webb@hardenedbsd.org)
Received: by mail-yk0-x232.google.com with SMTP id v14so55163347ykd.3
 for <svn-src-all@freebsd.org>; Thu, 21 Jan 2016 08:55:07 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=hardenedbsd-org.20150623.gappssmtp.com; s=20150623;
 h=date:from:to:cc:subject:message-id:references:mime-version
 :content-type:content-disposition:in-reply-to:user-agent;
 bh=6e1DZJFncyf9x57zw87XbxzM1f0a/fDoEExIeiIaTkE=;
 b=wfwIpTNfDrQ9CO0+BBGsHpcZNp7ZoSGzkIHd6quQvDu+j3M4C68qgrr6YRjEz3l2lk
 Y91b/ZWD25IBquSBeb+RfXrH2FC3cGE6SjtxXPXGvtFc0A6HhfibY64StqMAAKrQ/Fw3
 uSDOJOK8x4JYxG0/FmcSO+W4chlGFuTca5ZlAQBimp/Jx561AQ5mZhe7Fd0HDQNWPkzh
 gI7ymqBrXePJxY1w9NIuJI1YKjmeJHdiSMdhoA7SeNuDGl4LB8sOnFdKbNJYZ01WfJiS
 hf5p1k+DCGn7DM9tCLiImLslaUdLgy8Gswj9xQUqHwa8oiFym0y2ywOQpU57y62Zf7jn
 +FHQ==
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:references
 :mime-version:content-type:content-disposition:in-reply-to
 :user-agent;
 bh=6e1DZJFncyf9x57zw87XbxzM1f0a/fDoEExIeiIaTkE=;
 b=BSwcDrJnT2rUL7zCrJagP1qYrXwd1d22wl/xmqYjJ7soU5lJ50q1Ylbo6xpZPB2i3+
 FlbL80ps1pHicREI7vtHl0fRruRe1FlegwxbZWyl1ZUUP7F5+UHMNb19ok21w27ggs/Y
 zQaQecEMrvPxICTshtE2bsZ6q5ZKfPjtcsz9+kmnDZs7oTVEdg41B9AfrA3uDUT1IDcX
 igSmqzW7ngPSyH1Pb3zrHweBg85I0wuh+eihKRL8VsHlcNrCsSB0/wqUDUVvnnOZQf+r
 oxngdM240LjabJ8nvE0iR2WxKqhWTWdcSPi3VS7Fd3L4864DwSkXSYHl1BZ6ZrgTVNyR
 G70g==
X-Gm-Message-State: ALoCoQkNzF9IQLEZcWhWVNteIfMbAo/tL5DbvtycDf13JGfcGmlEGRVgYAhlLXFBUDSA4EoEqs5Cd0CFedxAs51fKhgMZBWyyg==
X-Received: by 10.37.47.84 with SMTP id v81mr14703104ybv.42.1453395306565;
 Thu, 21 Jan 2016 08:55:06 -0800 (PST)
Received: from mutt-hardenedbsd ([63.88.83.105])
 by smtp.gmail.com with ESMTPSA id z201sm1203395ywz.41.2016.01.21.08.55.04
 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);
 Thu, 21 Jan 2016 08:55:05 -0800 (PST)
Date: Thu, 21 Jan 2016 11:55:01 -0500
From: Shawn Webb <shawn.webb@hardenedbsd.org>
To: Hartmut Brandt <harti@FreeBSD.org>
Cc: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-head@freebsd.org
Subject: Re: svn commit: r294507 - head/contrib/bsnmp/snmp_mibII
Message-ID: <20160121165501.GA88070@mutt-hardenedbsd>
References: <201601211611.u0LGBKkV086754@repo.freebsd.org>
MIME-Version: 1.0
Content-Type: multipart/signed; micalg=pgp-sha256;
 protocol="application/pgp-signature"; boundary="YiEDa0DAkWCtVeE4"
Content-Disposition: inline
In-Reply-To: <201601211611.u0LGBKkV086754@repo.freebsd.org>
X-Operating-System: FreeBSD mutt-hardenedbsd 11.0-CURRENT-HBSD FreeBSD
 11.0-CURRENT-HBSD 
X-PGP-Key: http://pgp.mit.edu/pks/lookup?op=vindex&search=0x6A84658F52456EEE
User-Agent: Mutt/1.5.24 (2015-08-30)
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.20
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for &quot;
 user&quot; and &quot; projects&quot; \)" <svn-src-all.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-all/>
List-Post: <mailto:svn-src-all@freebsd.org>
List-Help: <mailto:svn-src-all-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Thu, 21 Jan 2016 16:55:07 -0000


--YiEDa0DAkWCtVeE4
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Thu, Jan 21, 2016 at 04:11:20PM +0000, Hartmut Brandt wrote:
> Author: harti
> Date: Thu Jan 21 16:11:20 2016
> New Revision: 294507
> URL: https://svnweb.freebsd.org/changeset/base/294507
>=20
> Log:
>   Fill the ifAlias leaf of the ifXTable with the interface description
>   if there is one available and it fits into the maximum size (64 charact=
ers).
>=20
> Modified:
>   head/contrib/bsnmp/snmp_mibII/mibII.c
>   head/contrib/bsnmp/snmp_mibII/mibII.h
>   head/contrib/bsnmp/snmp_mibII/mibII_interfaces.c
>=20
> Modified: head/contrib/bsnmp/snmp_mibII/mibII.c
> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D
> --- head/contrib/bsnmp/snmp_mibII/mibII.c	Thu Jan 21 15:27:44 2016	(r2945=
06)
> +++ head/contrib/bsnmp/snmp_mibII/mibII.c	Thu Jan 21 16:11:20 2016	(r2945=
07)
> @@ -443,6 +443,7 @@ mib_fetch_ifmib(struct mibif *ifp)
>  	size_t len;
>  	void *newmib;
>  	struct ifmibdata oldmib =3D ifp->mib;
> +	struct ifreq irr;
> =20
>  	if (fetch_generic_mib(ifp, &oldmib) =3D=3D -1)
>  		return (-1);
> @@ -514,6 +515,18 @@ mib_fetch_ifmib(struct mibif *ifp)
>  	}
> =20
>    out:
> +	strncpy(irr.ifr_name, ifp->name, sizeof(irr.ifr_name));

Why not strlcpy? You're not forcing null termination here, so there
could be issues.

Thanks,

--=20
Shawn Webb
HardenedBSD

GPG Key ID:          0x6A84658F52456EEE
GPG Key Fingerprint: 2ABA B6BD EF6A F486 BE89  3D9E 6A84 658F 5245 6EEE

--YiEDa0DAkWCtVeE4
Content-Type: application/pgp-signature; name="signature.asc"

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2

iQIcBAEBCAAGBQJWoQ1iAAoJEGqEZY9SRW7uQBoQAKhhmF/Z4L/pgC+g5DPPvPoB
Caw35GG1avNuty0mwGXK7ASHKCj8BbN+e80XKSYNlB11ZutfnRU4q6IJNs0wWit/
dFzrlqeFSLluKf6o+RvMymE0SXNZg9FiYScckRJy69NuDnJm+1o7xtlKpegPi5yu
799cL/9kxWnj1VfbJHzHuCVHR13+rjEAXquRd4kJe+vREPpYm2bvFOQJXIy1ABVl
otua4E1UqCQ1ZZNJ14daWv6H9+YMF5RjIRCk1BGAf7PctoD2EMPJfcQOrpg4kxB7
WoDCrAGtcaSqAfVOtyMnb/5M5tz67aCFg7iQ+apPegcspkAiyyTrOUjHtNw9dEnk
2Q4L88+rBDFZjPe3HYkB6a4+CXo6wTiRtwqEL4epE39Idt5mqih5LuprkrwVNV4A
RMz6v0yVtAAyig/sItvou5b0pRcmhYqbmqAy7VnQ5hNpEF9URwi9XoazfScrLGLI
q+GUNl38klRGamSKoOhPlCjunLbM/2EUpQo6S9kar7q7MiCdWVsD1kO2DvBA1SMN
OHO0m0lMiajWBlsi3+YFJbQ/9yZ17uXkLDL2PtE4SgWAqWW4z93i/5PXZd0R6vdn
wJut8wZtu9oGiEQkqKm/+c16NBqc446IK4IEKN5Ux8rK9SlOTpKi0MAVAFhtcHfw
InaSB6g5uzGQZNt27JXq
=ogKw
-----END PGP SIGNATURE-----

--YiEDa0DAkWCtVeE4--

From owner-svn-src-all@freebsd.org  Thu Jan 21 17:25:42 2016
Return-Path: <owner-svn-src-all@freebsd.org>
Delivered-To: svn-src-all@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id A76CDA8B4BF;
 Thu, 21 Jan 2016 17:25:42 +0000 (UTC) (envelope-from bz@FreeBSD.org)
Received: from repo.freebsd.org (repo.freebsd.org
 [IPv6:2610:1c1:1:6068::e6a:0])
 (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
 (Client did not present a certificate)
 by mx1.freebsd.org (Postfix) with ESMTPS id 78F771EC3;
 Thu, 21 Jan 2016 17:25:42 +0000 (UTC) (envelope-from bz@FreeBSD.org)
Received: from repo.freebsd.org ([127.0.1.37])
 by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u0LHPfQZ011896;
 Thu, 21 Jan 2016 17:25:41 GMT (envelope-from bz@FreeBSD.org)
Received: (from bz@localhost)
 by repo.freebsd.org (8.15.2/8.15.2/Submit) id u0LHPf4T011894;
 Thu, 21 Jan 2016 17:25:41 GMT (envelope-from bz@FreeBSD.org)
Message-Id: <201601211725.u0LHPf4T011894@repo.freebsd.org>
X-Authentication-Warning: repo.freebsd.org: bz set sender to bz@FreeBSD.org
 using -f
From: "Bjoern A. Zeeb" <bz@FreeBSD.org>
Date: Thu, 21 Jan 2016 17:25:41 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-head@freebsd.org
Subject: svn commit: r294514 - head/sys/netinet
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.20
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for &quot;
 user&quot; and &quot; projects&quot; \)" <svn-src-all.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-all/>
List-Post: <mailto:svn-src-all@freebsd.org>
List-Help: <mailto:svn-src-all-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Thu, 21 Jan 2016 17:25:42 -0000

Author: bz
Date: Thu Jan 21 17:25:41 2016
New Revision: 294514
URL: https://svnweb.freebsd.org/changeset/base/294514

Log:
  The variable is write once only and not used.
  Recover the vertical space.
  
  Sponsored by:		The FreeBSD Foundation
  MFC After:		3 days
  Obtained from:		p4 CH=180830
  Reviewed by:		gnn, hiren
  Differential Revision:	https://reviews.freebsd.org/D4898

Modified:
  head/sys/netinet/igmp.c

Modified: head/sys/netinet/igmp.c
==============================================================================
--- head/sys/netinet/igmp.c	Thu Jan 21 17:09:38 2016	(r294513)
+++ head/sys/netinet/igmp.c	Thu Jan 21 17:25:41 2016	(r294514)
@@ -659,16 +659,12 @@ igmp_ifdetach(struct ifnet *ifp)
 void
 igmp_domifdetach(struct ifnet *ifp)
 {
-	struct igmp_ifsoftc *igi;
 
 	CTR3(KTR_IGMPV3, "%s: called for ifp %p(%s)",
 	    __func__, ifp, ifp->if_xname);
 
 	IGMP_LOCK();
-
-	igi = ((struct in_ifinfo *)ifp->if_afdata[AF_INET])->ii_igmp;
 	igi_delete_locked(ifp);
-
 	IGMP_UNLOCK();
 }
 

From owner-svn-src-all@freebsd.org  Thu Jan 21 17:29:02 2016
Return-Path: <owner-svn-src-all@freebsd.org>
Delivered-To: svn-src-all@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id CF5C9A8B5AF;
 Thu, 21 Jan 2016 17:29:02 +0000 (UTC)
 (envelope-from brooks@FreeBSD.org)
Received: from repo.freebsd.org (repo.freebsd.org
 [IPv6:2610:1c1:1:6068::e6a:0])
 (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
 (Client did not present a certificate)
 by mx1.freebsd.org (Postfix) with ESMTPS id 7EA6510F6;
 Thu, 21 Jan 2016 17:29:02 +0000 (UTC)
 (envelope-from brooks@FreeBSD.org)
Received: from repo.freebsd.org ([127.0.1.37])
 by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u0LHT14p012250;
 Thu, 21 Jan 2016 17:29:01 GMT (envelope-from brooks@FreeBSD.org)
Received: (from brooks@localhost)
 by repo.freebsd.org (8.15.2/8.15.2/Submit) id u0LHT1Sn012249;
 Thu, 21 Jan 2016 17:29:01 GMT (envelope-from brooks@FreeBSD.org)
Message-Id: <201601211729.u0LHT1Sn012249@repo.freebsd.org>
X-Authentication-Warning: repo.freebsd.org: brooks set sender to
 brooks@FreeBSD.org using -f
From: Brooks Davis <brooks@FreeBSD.org>
Date: Thu, 21 Jan 2016 17:29:01 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-head@freebsd.org
Subject: svn commit: r294515 - head/lib/libc/mips
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.20
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for &quot;
 user&quot; and &quot; projects&quot; \)" <svn-src-all.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-all/>
List-Post: <mailto:svn-src-all@freebsd.org>
List-Help: <mailto:svn-src-all-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Thu, 21 Jan 2016 17:29:02 -0000

Author: brooks
Date: Thu Jan 21 17:29:01 2016
New Revision: 294515
URL: https://svnweb.freebsd.org/changeset/base/294515

Log:
  Fix the implementations of PSEUDO_NOERROR and PSEUDO.
  
  The PSEUDO* macros should not declare <syscall>, only _<syscall> and
  __sys_<syscall>.  This was causing the interposing C wrappers to be
  ignored due to link order.
  
  Reviewed by:	kib
  Obtained from:	CheriBSD (4e8e13c90fc6a80e1520de44a6864cfd78b3b56d)
  MFC after:	1 week
  Sponsored by:	DARPA, AFRL
  Differential Revision:	https://reviews.freebsd.org/D4097

Modified:
  head/lib/libc/mips/SYS.h

Modified: head/lib/libc/mips/SYS.h
==============================================================================
--- head/lib/libc/mips/SYS.h	Thu Jan 21 17:25:41 2016	(r294514)
+++ head/lib/libc/mips/SYS.h	Thu Jan 21 17:29:01 2016	(r294515)
@@ -100,13 +100,31 @@
  * Do a syscall that cannot fail (sync, get{p,u,g,eu,eg)id)
  */
 #define RSYSCALL_NOERROR(x)						\
-	PSEUDO_NOERROR(x)
+LEAF(__sys_ ## x);							\
+	.weak _C_LABEL(x);						\
+	_C_LABEL(x) = _C_LABEL(__CONCAT(__sys_,x));			\
+	.weak _C_LABEL(__CONCAT(_,x));					\
+	_C_LABEL(__CONCAT(_,x)) = _C_LABEL(__CONCAT(__sys_,x));		\
+	SYSTRAP(x);							\
+	j ra;								\
+END(__sys_ ## x)
 
 /*
  * Do a normal syscall.
  */
 #define RSYSCALL(x)							\
-	PSEUDO(x)
+LEAF(__sys_ ## x);							\
+	.weak _C_LABEL(x);						\
+	_C_LABEL(x) = _C_LABEL(__CONCAT(__sys_,x));			\
+	.weak _C_LABEL(__CONCAT(_,x));					\
+	_C_LABEL(__CONCAT(_,x)) = _C_LABEL(__CONCAT(__sys_,x));		\
+	PIC_PROLOGUE(__sys_ ## x);					\
+	SYSTRAP(x);							\
+	bne a3,zero,err;						\
+	PIC_RETURN();							\
+err:									\
+	PIC_TAILCALL(__cerror);						\
+END(__sys_ ## x)
 
 /*
  * Do a renamed or pseudo syscall (e.g., _exit()), where the entrypoint
@@ -114,18 +132,14 @@
  */
 #define PSEUDO_NOERROR(x)						\
 LEAF(__sys_ ## x);							\
-	.weak _C_LABEL(x);						\
-	_C_LABEL(x) = _C_LABEL(__CONCAT(__sys_,x));			\
 	.weak _C_LABEL(__CONCAT(_,x));					\
 	_C_LABEL(__CONCAT(_,x)) = _C_LABEL(__CONCAT(__sys_,x));		\
 	SYSTRAP(x);							\
 	j ra;								\
-	END(__sys_ ## x)
+END(__sys_ ## x)
 
 #define PSEUDO(x)							\
 LEAF(__sys_ ## x);							\
-	.weak _C_LABEL(x);						\
-	_C_LABEL(x) = _C_LABEL(__CONCAT(__sys_,x));			\
 	.weak _C_LABEL(__CONCAT(_,x));					\
 	_C_LABEL(__CONCAT(_,x)) = _C_LABEL(__CONCAT(__sys_,x));		\
 	PIC_PROLOGUE(__sys_ ## x);					\

From owner-svn-src-all@freebsd.org  Thu Jan 21 17:36:07 2016
Return-Path: <owner-svn-src-all@freebsd.org>
Delivered-To: svn-src-all@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id A4BA2A8B8E2;
 Thu, 21 Jan 2016 17:36:07 +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 76B171863;
 Thu, 21 Jan 2016 17:36:07 +0000 (UTC)
 (envelope-from hselasky@FreeBSD.org)
Received: from repo.freebsd.org ([127.0.1.37])
 by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u0LHa6oc015507;
 Thu, 21 Jan 2016 17:36:06 GMT (envelope-from hselasky@FreeBSD.org)
Received: (from hselasky@localhost)
 by repo.freebsd.org (8.15.2/8.15.2/Submit) id u0LHa6Tx015506;
 Thu, 21 Jan 2016 17:36:06 GMT (envelope-from hselasky@FreeBSD.org)
Message-Id: <201601211736.u0LHa6Tx015506@repo.freebsd.org>
X-Authentication-Warning: repo.freebsd.org: hselasky set sender to
 hselasky@FreeBSD.org using -f
From: Hans Petter Selasky <hselasky@FreeBSD.org>
Date: Thu, 21 Jan 2016 17:36:06 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-head@freebsd.org
Subject: svn commit: r294518 - head/sys/compat/linuxkpi/common/include/linux
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.20
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for &quot;
 user&quot; and &quot; projects&quot; \)" <svn-src-all.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-all/>
List-Post: <mailto:svn-src-all@freebsd.org>
List-Help: <mailto:svn-src-all-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Thu, 21 Jan 2016 17:36:07 -0000

Author: hselasky
Date: Thu Jan 21 17:36:06 2016
New Revision: 294518
URL: https://svnweb.freebsd.org/changeset/base/294518

Log:
  Use function macro instead of non-function macro to reduce chance of
  incorrect expansion.
  
  MFC after:	1 week
  Sponsored by:	Mellanox Technologies

Modified:
  head/sys/compat/linuxkpi/common/include/linux/mutex.h

Modified: head/sys/compat/linuxkpi/common/include/linux/mutex.h
==============================================================================
--- head/sys/compat/linuxkpi/common/include/linux/mutex.h	Thu Jan 21 17:33:31 2016	(r294517)
+++ head/sys/compat/linuxkpi/common/include/linux/mutex.h	Thu Jan 21 17:36:06 2016	(r294518)
@@ -59,6 +59,6 @@ linux_mutex_init(mutex_t *m)
 	sx_init_flags(&m->sx, "lnxmtx",  SX_NOWITNESS);
 }
 
-#define	mutex_init	linux_mutex_init
+#define	mutex_init(m)	linux_mutex_init(m)
 
 #endif	/* _LINUX_MUTEX_H_ */

From owner-svn-src-all@freebsd.org  Thu Jan 21 17:52:57 2016
Return-Path: <owner-svn-src-all@freebsd.org>
Delivered-To: svn-src-all@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id 41DA8A8C09B;
 Thu, 21 Jan 2016 17:52:57 +0000 (UTC)
 (envelope-from hselasky@FreeBSD.org)
Received: from repo.freebsd.org (repo.freebsd.org
 [IPv6:2610:1c1:1:6068::e6a:0])
 (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
 (Client did not present a certificate)
 by mx1.freebsd.org (Postfix) with ESMTPS id 1E1F911CD;
 Thu, 21 Jan 2016 17:52:57 +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 u0LHqurJ022231;
 Thu, 21 Jan 2016 17:52:56 GMT (envelope-from hselasky@FreeBSD.org)
Received: (from hselasky@localhost)
 by repo.freebsd.org (8.15.2/8.15.2/Submit) id u0LHquRG022228;
 Thu, 21 Jan 2016 17:52:56 GMT (envelope-from hselasky@FreeBSD.org)
Message-Id: <201601211752.u0LHquRG022228@repo.freebsd.org>
X-Authentication-Warning: repo.freebsd.org: hselasky set sender to
 hselasky@FreeBSD.org using -f
From: Hans Petter Selasky <hselasky@FreeBSD.org>
Date: Thu, 21 Jan 2016 17:52:56 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-head@freebsd.org
Subject: svn commit: r294520 - head/sys/compat/linuxkpi/common/include/asm
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.20
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for &quot;
 user&quot; and &quot; projects&quot; \)" <svn-src-all.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-all/>
List-Post: <mailto:svn-src-all@freebsd.org>
List-Help: <mailto:svn-src-all-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Thu, 21 Jan 2016 17:52:57 -0000

Author: hselasky
Date: Thu Jan 21 17:52:55 2016
New Revision: 294520
URL: https://svnweb.freebsd.org/changeset/base/294520

Log:
  LinuxKPI atomic fixes:
  - Fix implementation of atomic_add_unless(). The atomic_cmpset_int()
    function returns a boolean and not the previous value of the atomic
    variable.
  - The atomic counters should be signed according to Linux.
  - Some minor cosmetics and styling while at it.
  
  Reviewed by:	alfred @
  MFC after:	1 week
  Sponsored by:	Mellanox Technologies

Modified:
  head/sys/compat/linuxkpi/common/include/asm/atomic-long.h
  head/sys/compat/linuxkpi/common/include/asm/atomic.h

Modified: head/sys/compat/linuxkpi/common/include/asm/atomic-long.h
==============================================================================
--- head/sys/compat/linuxkpi/common/include/asm/atomic-long.h	Thu Jan 21 17:49:10 2016	(r294519)
+++ head/sys/compat/linuxkpi/common/include/asm/atomic-long.h	Thu Jan 21 17:52:55 2016	(r294520)
@@ -36,7 +36,7 @@
 #include <machine/atomic.h>
 
 typedef struct {
-	volatile u_long counter;
+	volatile long counter;
 } atomic_long_t;
 
 #define	atomic_long_add(i, v)		atomic_long_add_return((i), (v))

Modified: head/sys/compat/linuxkpi/common/include/asm/atomic.h
==============================================================================
--- head/sys/compat/linuxkpi/common/include/asm/atomic.h	Thu Jan 21 17:49:10 2016	(r294519)
+++ head/sys/compat/linuxkpi/common/include/asm/atomic.h	Thu Jan 21 17:52:55 2016	(r294520)
@@ -2,7 +2,7 @@
  * Copyright (c) 2010 Isilon Systems, Inc.
  * Copyright (c) 2010 iX Systems, Inc.
  * Copyright (c) 2010 Panasas, Inc.
- * Copyright (c) 2013, 2014 Mellanox Technologies, Ltd.
+ * Copyright (c) 2013-2016 Mellanox Technologies, Ltd.
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -36,9 +36,13 @@
 #include <machine/atomic.h>
 
 typedef struct {
-	volatile u_int counter;
+	volatile int counter;
 } atomic_t;
 
+/*------------------------------------------------------------------------*
+ *	32-bit atomic operations
+ *------------------------------------------------------------------------*/
+
 #define	atomic_add(i, v)		atomic_add_return((i), (v))
 #define	atomic_sub(i, v)		atomic_sub_return((i), (v))
 #define	atomic_inc_return(v)		atomic_add_return(1, (v))
@@ -46,7 +50,8 @@ typedef struct {
 #define	atomic_sub_and_test(i, v)	(atomic_sub_return((i), (v)) == 0)
 #define	atomic_dec_and_test(v)		(atomic_sub_return(1, (v)) == 0)
 #define	atomic_inc_and_test(v)		(atomic_add_return(1, (v)) == 0)
-#define atomic_dec_return(v)             atomic_sub_return(1, (v))
+#define	atomic_dec_return(v)		atomic_sub_return(1, (v))
+#define	atomic_inc_not_zero(v)		atomic_add_unless((v), 1, 0)
 
 static inline int
 atomic_add_return(int i, atomic_t *v)
@@ -84,24 +89,19 @@ atomic_dec(atomic_t *v)
 	return atomic_fetchadd_int(&v->counter, -1) - 1;
 }
 
-static inline int atomic_add_unless(atomic_t *v, int a, int u)
+static inline int
+atomic_add_unless(atomic_t *v, int a, int u)
 {
-        int c, old;
-        c = atomic_read(v);
-        for (;;) {
-                if (unlikely(c == (u)))
-                        break;
-                old = atomic_cmpset_int(&v->counter, c, c + (a));
-                if (likely(old == c))
-                        break;
-                c = old;
-        }
-        return c != (u);
-}
-
-#define atomic_inc_not_zero(v) atomic_add_unless((v), 1, 0)
-
-
+	int c;
 
+	for (;;) {
+		c = atomic_read(v);
+		if (unlikely(c == u))
+			break;
+		if (likely(atomic_cmpset_int(&v->counter, c, c + a)))
+			break;
+	}
+	return (c != u);
+}
 
-#endif	/* _ASM_ATOMIC_H_ */
+#endif					/* _ASM_ATOMIC_H_ */

From owner-svn-src-all@freebsd.org  Thu Jan 21 17:56:24 2016
Return-Path: <owner-svn-src-all@freebsd.org>
Delivered-To: svn-src-all@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7A7E6A8C1D3;
 Thu, 21 Jan 2016 17:56:24 +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 55B7D13D2;
 Thu, 21 Jan 2016 17:56:24 +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 u0LHuN6X022592;
 Thu, 21 Jan 2016 17:56:23 GMT (envelope-from hselasky@FreeBSD.org)
Received: (from hselasky@localhost)
 by repo.freebsd.org (8.15.2/8.15.2/Submit) id u0LHuNhC022591;
 Thu, 21 Jan 2016 17:56:23 GMT (envelope-from hselasky@FreeBSD.org)
Message-Id: <201601211756.u0LHuNhC022591@repo.freebsd.org>
X-Authentication-Warning: repo.freebsd.org: hselasky set sender to
 hselasky@FreeBSD.org using -f
From: Hans Petter Selasky <hselasky@FreeBSD.org>
Date: Thu, 21 Jan 2016 17:56:23 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-head@freebsd.org
Subject: svn commit: r294521 - head/sys/compat/linuxkpi/common/include/asm
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.20
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for &quot;
 user&quot; and &quot; projects&quot; \)" <svn-src-all.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-all/>
List-Post: <mailto:svn-src-all@freebsd.org>
List-Help: <mailto:svn-src-all-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Thu, 21 Jan 2016 17:56:24 -0000

Author: hselasky
Date: Thu Jan 21 17:56:23 2016
New Revision: 294521
URL: https://svnweb.freebsd.org/changeset/base/294521

Log:
  Implement 64-bit atomic operations for the LinuxKPI.
  
  MFC after:	1 week
  Sponsored by:	Mellanox Technologies

Added:
  head/sys/compat/linuxkpi/common/include/asm/atomic64.h   (contents, props changed)

Added: head/sys/compat/linuxkpi/common/include/asm/atomic64.h
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/sys/compat/linuxkpi/common/include/asm/atomic64.h	Thu Jan 21 17:56:23 2016	(r294521)
@@ -0,0 +1,104 @@
+/*-
+ * Copyright (c) 2016 Mellanox Technologies, Ltd.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice unmodified, this list of conditions, and the following
+ *    disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+ * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * $FreeBSD$
+ */
+#ifndef	_ASM_ATOMIC64_H_
+#define	_ASM_ATOMIC64_H_
+
+#include <sys/cdefs.h>
+#include <sys/types.h>
+#include <machine/atomic.h>
+
+typedef struct {
+	volatile int64_t counter;
+} atomic64_t;
+
+/*------------------------------------------------------------------------*
+ *	64-bit atomic operations
+ *------------------------------------------------------------------------*/
+
+#define	atomic64_add(i, v)		atomic64_add_return((i), (v))
+#define	atomic64_sub(i, v)		atomic64_sub_return((i), (v))
+#define	atomic64_inc_return(v)		atomic64_add_return(1, (v))
+#define	atomic64_add_negative(i, v)	(atomic64_add_return((i), (v)) < 0)
+#define	atomic64_sub_and_test(i, v)	(atomic64_sub_return((i), (v)) == 0)
+#define	atomic64_dec_and_test(v)	(atomic64_sub_return(1, (v)) == 0)
+#define	atomic64_inc_and_test(v)	(atomic64_add_return(1, (v)) == 0)
+#define	atomic64_dec_return(v)		atomic64_sub_return(1, (v))
+#define	atomic64_inc_not_zero(v)	atomic64_add_unless((v), 1, 0)
+
+static inline int64_t
+atomic64_add_return(int64_t i, atomic64_t *v)
+{
+	return i + atomic_fetchadd_64(&v->counter, i);
+}
+
+static inline int64_t
+atomic64_sub_return(int64_t i, atomic64_t *v)
+{
+	return atomic_fetchadd_64(&v->counter, -i) - i;
+}
+
+static inline void
+atomic64_set(atomic64_t *v, int64_t i)
+{
+	atomic_store_rel_64(&v->counter, i);
+}
+
+static inline int64_t
+atomic64_read(atomic64_t *v)
+{
+	return atomic_load_acq_64(&v->counter);
+}
+
+static inline int64_t
+atomic64_inc(atomic64_t *v)
+{
+	return atomic_fetchadd_64(&v->counter, 1) + 1;
+}
+
+static inline int64_t
+atomic64_dec(atomic64_t *v)
+{
+	return atomic_fetchadd_64(&v->counter, -1) - 1;
+}
+
+static inline int64_t
+atomic64_add_unless(atomic64_t *v, int64_t a, int64_t u)
+{
+	int64_t c;
+
+	for (;;) {
+		c = atomic64_read(v);
+		if (unlikely(c == u))
+			break;
+		if (likely(atomic_cmpset_64(&v->counter, c, c + a)))
+			break;
+	}
+	return (c != u);
+}
+
+#endif					/* _ASM_ATOMIC64_H_ */

From owner-svn-src-all@freebsd.org  Thu Jan 21 17:56:58 2016
Return-Path: <owner-svn-src-all@freebsd.org>
Delivered-To: svn-src-all@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id F2D70A8C237;
 Thu, 21 Jan 2016 17:56:58 +0000 (UTC)
 (envelope-from glebius@FreeBSD.org)
Received: from cell.glebi.us (glebi.us [96.95.210.25])
 (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
 (Client CN "cell.glebi.us", Issuer "cell.glebi.us" (not verified))
 by mx1.freebsd.org (Postfix) with ESMTPS id 5A5ED15E8;
 Thu, 21 Jan 2016 17:56:58 +0000 (UTC)
 (envelope-from glebius@FreeBSD.org)
Received: from cell.glebi.us (localhost [127.0.0.1])
 by cell.glebi.us (8.15.2/8.15.2) with ESMTPS id u0LHuus9016326
 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO);
 Thu, 21 Jan 2016 09:56:56 -0800 (PST)
 (envelope-from glebius@FreeBSD.org)
Received: (from glebius@localhost)
 by cell.glebi.us (8.15.2/8.15.2/Submit) id u0LHuuHI016325;
 Thu, 21 Jan 2016 09:56:56 -0800 (PST)
 (envelope-from glebius@FreeBSD.org)
X-Authentication-Warning: cell.glebi.us: glebius set sender to
 glebius@FreeBSD.org using -f
Date: Thu, 21 Jan 2016 09:56:56 -0800
From: Gleb Smirnoff <glebius@FreeBSD.org>
To: Ravi Pokala <rpokala@mac.com>
Cc: Mateusz Guzik <mjg@FreeBSD.org>, src-committers@freebsd.org,
 svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject: Re: svn commit: r294475 - head/sys/kern
Message-ID: <20160121175656.GN1444@FreeBSD.org>
References: <201601210104.u0L143tP098546@repo.freebsd.org>
 <0BB9E046-D76D-47CF-9BE6-4888727B7E05@panasas.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <0BB9E046-D76D-47CF-9BE6-4888727B7E05@panasas.com>
User-Agent: Mutt/1.5.24 (2015-08-30)
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.20
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for &quot;
 user&quot; and &quot; projects&quot; \)" <svn-src-all.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-all/>
List-Post: <mailto:svn-src-all@freebsd.org>
List-Help: <mailto:svn-src-all-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Thu, 21 Jan 2016 17:56:59 -0000

On Wed, Jan 20, 2016 at 05:40:03PM -0800, Ravi Pokala wrote:
R> ISTR there's an API for creating a batch of counters; that might be cleaner than creating a dozen+ individually?

There are some. An array macros are in sys/counter.h itself. The network
stack has magic macros that allow you to use array macros on structures,
assuming all members are counter(9)s. This stuff from the network stack
can be generalized.

-- 
Totus tuus, Glebius.

From owner-svn-src-all@freebsd.org  Thu Jan 21 18:17:21 2016
Return-Path: <owner-svn-src-all@freebsd.org>
Delivered-To: svn-src-all@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id 334FCA8C84A;
 Thu, 21 Jan 2016 18:17:21 +0000 (UTC)
 (envelope-from brooks@FreeBSD.org)
Received: from repo.freebsd.org (repo.freebsd.org
 [IPv6:2610:1c1:1:6068::e6a:0])
 (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
 (Client did not present a certificate)
 by mx1.freebsd.org (Postfix) with ESMTPS id DD1AA13C1;
 Thu, 21 Jan 2016 18:17:20 +0000 (UTC)
 (envelope-from brooks@FreeBSD.org)
Received: from repo.freebsd.org ([127.0.1.37])
 by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u0LIHJO6029844;
 Thu, 21 Jan 2016 18:17:19 GMT (envelope-from brooks@FreeBSD.org)
Received: (from brooks@localhost)
 by repo.freebsd.org (8.15.2/8.15.2/Submit) id u0LIHJ7a029843;
 Thu, 21 Jan 2016 18:17:19 GMT (envelope-from brooks@FreeBSD.org)
Message-Id: <201601211817.u0LIHJ7a029843@repo.freebsd.org>
X-Authentication-Warning: repo.freebsd.org: brooks set sender to
 brooks@FreeBSD.org using -f
From: Brooks Davis <brooks@FreeBSD.org>
Date: Thu, 21 Jan 2016 18:17:19 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-head@freebsd.org
Subject: svn commit: r294523 - head/lib/libc/gmon
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.20
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for &quot;
 user&quot; and &quot; projects&quot; \)" <svn-src-all.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-all/>
List-Post: <mailto:svn-src-all@freebsd.org>
List-Help: <mailto:svn-src-all-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Thu, 21 Jan 2016 18:17:21 -0000

Author: brooks
Date: Thu Jan 21 18:17:19 2016
New Revision: 294523
URL: https://svnweb.freebsd.org/changeset/base/294523

Log:
  Replace the last non-optional use of sbrk() in the tree with mmap().
  
  All gmon want's is a region of memory without the overhead of malloc().
  Just mapping some pages with mmap is an easy way to accomplish this.
  
  Approved by:	jhb, cem, emaste
  Obtained from:	CheriBSD (bf33e1e70b368ababde74aa3ac70d108c8a52c69)
  Sponsored by:	DARPA, AFRL
  Differential Revision:	https://reviews.freebsd.org/D5005

Modified:
  head/lib/libc/gmon/gmon.c

Modified: head/lib/libc/gmon/gmon.c
==============================================================================
--- head/lib/libc/gmon/gmon.c	Thu Jan 21 18:02:31 2016	(r294522)
+++ head/lib/libc/gmon/gmon.c	Thu Jan 21 18:17:19 2016	(r294523)
@@ -37,6 +37,7 @@ __FBSDID("$FreeBSD$");
 #include <sys/param.h>
 #include <sys/time.h>
 #include <sys/gmon.h>
+#include <sys/mman.h>
 #include <sys/sysctl.h>
 
 #include <err.h>
@@ -50,14 +51,6 @@ __FBSDID("$FreeBSD$");
 
 #include "libc_private.h"
 
-#if defined(__i386__) || defined(__sparc64__) || defined(__amd64__) || (defined(__powerpc__) && !defined(__powerpc64__))
-extern char *minbrk __asm (".minbrk");
-#elif defined(__powerpc64__)
-extern char *minbrk __asm ("_minbrk");
-#else
-extern char *minbrk __asm ("minbrk");
-#endif
-
 struct gmonparam _gmonparam = { GMON_PROF_OFF };
 
 static int	s_scale;
@@ -94,8 +87,9 @@ monstartup(u_long lowpc, u_long highpc)
 		p->tolimit = MAXARCS;
 	p->tossize = p->tolimit * sizeof(struct tostruct);
 
-	cp = sbrk(p->kcountsize + p->fromssize + p->tossize);
-	if (cp == (char *)-1) {
+	cp = mmap(NULL, p->kcountsize + p->fromssize + p->tossize,
+	    PROT_READ | PROT_WRITE, MAP_ANON, -1, 0);
+	if (cp == MAP_FAILED) {
 		ERR("monstartup: out of memory\n");
 		return;
 	}
@@ -108,7 +102,6 @@ monstartup(u_long lowpc, u_long highpc)
 	cp += p->kcountsize;
 	p->froms = (u_short *)cp;
 
-	minbrk = sbrk(0);
 	p->tos[0].link = 0;
 
 	o = p->highpc - p->lowpc;

From owner-svn-src-all@freebsd.org  Thu Jan 21 18:20:41 2016
Return-Path: <owner-svn-src-all@freebsd.org>
Delivered-To: svn-src-all@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id 99588A8C8E1;
 Thu, 21 Jan 2016 18:20:41 +0000 (UTC)
 (envelope-from melifaro@FreeBSD.org)
Received: from repo.freebsd.org (repo.freebsd.org
 [IPv6:2610:1c1:1:6068::e6a:0])
 (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
 (Client did not present a certificate)
 by mx1.freebsd.org (Postfix) with ESMTPS id 6A5D117D6;
 Thu, 21 Jan 2016 18:20:41 +0000 (UTC)
 (envelope-from melifaro@FreeBSD.org)
Received: from repo.freebsd.org ([127.0.1.37])
 by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u0LIKeff030249;
 Thu, 21 Jan 2016 18:20:40 GMT (envelope-from melifaro@FreeBSD.org)
Received: (from melifaro@localhost)
 by repo.freebsd.org (8.15.2/8.15.2/Submit) id u0LIKeBM030248;
 Thu, 21 Jan 2016 18:20:40 GMT (envelope-from melifaro@FreeBSD.org)
Message-Id: <201601211820.u0LIKeBM030248@repo.freebsd.org>
X-Authentication-Warning: repo.freebsd.org: melifaro set sender to
 melifaro@FreeBSD.org using -f
From: "Alexander V. Chernikov" <melifaro@FreeBSD.org>
Date: Thu, 21 Jan 2016 18:20:40 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-head@freebsd.org
Subject: svn commit: r294525 - head/sys/netpfil/ipfw
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.20
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for &quot;
 user&quot; and &quot; projects&quot; \)" <svn-src-all.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-all/>
List-Post: <mailto:svn-src-all@freebsd.org>
List-Help: <mailto:svn-src-all-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Thu, 21 Jan 2016 18:20:41 -0000

Author: melifaro
Date: Thu Jan 21 18:20:40 2016
New Revision: 294525
URL: https://svnweb.freebsd.org/changeset/base/294525

Log:
  Fix panic on table/table entry delete. The panic could have happened
    if more than 64 distinct values had been used.
  
  Table value code uses internal objhash API which requires unique key
    for each object. For value code, pointer to the actual value data
    is used. The actual problem arises from the fact that 'actual' e.g.
    runtime data is stored in array and that array is auto-growing. There is
    special hook (update_tvalue() function) which is used to update the pointers
    after the change. For some reason, object 'key' was not updated.
    Fix this by adding update code to the update_tvalue().
  
  Sponsored by:	Yandex LLC

Modified:
  head/sys/netpfil/ipfw/ip_fw_table_value.c

Modified: head/sys/netpfil/ipfw/ip_fw_table_value.c
==============================================================================
--- head/sys/netpfil/ipfw/ip_fw_table_value.c	Thu Jan 21 18:19:33 2016	(r294524)
+++ head/sys/netpfil/ipfw/ip_fw_table_value.c	Thu Jan 21 18:20:40 2016	(r294525)
@@ -158,6 +158,7 @@ update_tvalue(struct namedobj_instance *
 
 	pval = da->pval;
 	ptv->pval = &pval[ptv->no.kidx];
+	ptv->no.name = (char *)&pval[ptv->no.kidx];
 
 }
 

From owner-svn-src-all@freebsd.org  Thu Jan 21 18:22:52 2016
Return-Path: <owner-svn-src-all@freebsd.org>
Delivered-To: svn-src-all@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3262DA8CA35;
 Thu, 21 Jan 2016 18:22:52 +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 065671B94;
 Thu, 21 Jan 2016 18:22:51 +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 u0LIMpCj033048;
 Thu, 21 Jan 2016 18:22:51 GMT (envelope-from hselasky@FreeBSD.org)
Received: (from hselasky@localhost)
 by repo.freebsd.org (8.15.2/8.15.2/Submit) id u0LIMpVZ033047;
 Thu, 21 Jan 2016 18:22:51 GMT (envelope-from hselasky@FreeBSD.org)
Message-Id: <201601211822.u0LIMpVZ033047@repo.freebsd.org>
X-Authentication-Warning: repo.freebsd.org: hselasky set sender to
 hselasky@FreeBSD.org using -f
From: Hans Petter Selasky <hselasky@FreeBSD.org>
Date: Thu, 21 Jan 2016 18:22:51 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-head@freebsd.org
Subject: svn commit: r294526 - head/sys/amd64/include
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.20
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for &quot;
 user&quot; and &quot; projects&quot; \)" <svn-src-all.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-all/>
List-Post: <mailto:svn-src-all@freebsd.org>
List-Help: <mailto:svn-src-all-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Thu, 21 Jan 2016 18:22:52 -0000

Author: hselasky
Date: Thu Jan 21 18:22:50 2016
New Revision: 294526
URL: https://svnweb.freebsd.org/changeset/base/294526

Log:
  Add missing atomic wrapper macro.
  
  Reviewed by:	alfred @
  Sponsored by:	Mellanox Technologies
  MFC after:	1 week

Modified:
  head/sys/amd64/include/atomic.h

Modified: head/sys/amd64/include/atomic.h
==============================================================================
--- head/sys/amd64/include/atomic.h	Thu Jan 21 18:20:40 2016	(r294525)
+++ head/sys/amd64/include/atomic.h	Thu Jan 21 18:22:50 2016	(r294526)
@@ -558,6 +558,7 @@ u_long	atomic_swap_long(volatile u_long 
 #define	atomic_cmpset_rel_64	atomic_cmpset_rel_long
 #define	atomic_swap_64		atomic_swap_long
 #define	atomic_readandclear_64	atomic_readandclear_long
+#define	atomic_fetchadd_64	atomic_fetchadd_long
 #define	atomic_testandset_64	atomic_testandset_long
 
 /* Operations on pointers. */

From owner-svn-src-all@freebsd.org  Thu Jan 21 18:32:24 2016
Return-Path: <owner-svn-src-all@freebsd.org>
Delivered-To: svn-src-all@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id BE697A8CC47;
 Thu, 21 Jan 2016 18:32:24 +0000 (UTC)
 (envelope-from cse.cem@gmail.com)
Received: from mail-yk0-f181.google.com (mail-yk0-f181.google.com
 [209.85.160.181])
 (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 8572F1F1F;
 Thu, 21 Jan 2016 18:32:24 +0000 (UTC)
 (envelope-from cse.cem@gmail.com)
Received: by mail-yk0-f181.google.com with SMTP id a85so58567199ykb.1;
 Thu, 21 Jan 2016 10:32:24 -0800 (PST)
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:content-type;
 bh=B3rUzcDAOLUZt+CY5QE78iWIHmja5luWHDlTiY1hu5w=;
 b=LvE0Tf3kDwx9q9VUAYxUvN65dR3eYgckpv9+7ddEhRgQ5JRXUaSf3X1cA8Ht9tAhAI
 S8wilh951bvAKSW0qE2snLqRD4R+5dadi5E/zKJDV8uSr7kVVs5+Cb6dO6EwlYFo9Kyp
 ws7eZvUV/1zEVe87WMPHw5iXeePgQjNY5VX8m45Uy/2weW42rpOFTmBXNPZYhtpi3wnh
 XiwgcXWIlDsjE8hdtP+QeFMkB4/67YVpWin0eHklWSbvouGSmtz4yvXPt084748ISv5S
 UZ0JYcgVgaaljAZywyyTVI97ajCErnR3LsasylA5TgiKIigGNFJ+yhzNXbgt2VOoFjdw
 ptnw==
X-Gm-Message-State: ALoCoQlW29ZGFPYJDHbGXo4XcjifSBJ3oQbPwK6/ae3y9rV72tlzUyJBK/ebGiiCx7gQGGJyG6Bf7Dooi0Y4YWZPut+xx9Gatw==
X-Received: by 10.13.215.194 with SMTP id z185mr27207833ywd.304.1453397152489; 
 Thu, 21 Jan 2016 09:25:52 -0800 (PST)
Received: from mail-yk0-f180.google.com (mail-yk0-f180.google.com.
 [209.85.160.180])
 by smtp.gmail.com with ESMTPSA id 204sm1281910ywz.39.2016.01.21.09.25.51
 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);
 Thu, 21 Jan 2016 09:25:52 -0800 (PST)
Received: by mail-yk0-f180.google.com with SMTP id s126so31295437ykf.2;
 Thu, 21 Jan 2016 09:25:51 -0800 (PST)
MIME-Version: 1.0
X-Received: by 10.37.82.8 with SMTP id g8mr14744867ybb.91.1453397151888; Thu,
 21 Jan 2016 09:25:51 -0800 (PST)
Reply-To: cem@FreeBSD.org
Received: by 10.37.4.69 with HTTP; Thu, 21 Jan 2016 09:25:51 -0800 (PST)
In-Reply-To: <56A0AA58.3070704@FreeBSD.org>
References: <201601202327.u0KNR2Hh066219@repo.freebsd.org>
 <CAJ-Vmom-nORRCZx6YyhH0LJxcOUTuFfMkVsjOczNZiL-TEbsVA@mail.gmail.com>
 <4FBE9133-AB30-4D30-A298-1742952700C5@panasas.com>
 <20160121012825.GA9303@wkstn-mjohnston.west.isilon.com>
 <56A0AA58.3070704@FreeBSD.org>
Date: Thu, 21 Jan 2016 09:25:51 -0800
X-Gmail-Original-Message-ID: <CAG6CVpXKKcuKh-Y_F+As=Ti2DqFnrd__sgOCZxYyphd16euAqw@mail.gmail.com>
Message-ID: <CAG6CVpXKKcuKh-Y_F+As=Ti2DqFnrd__sgOCZxYyphd16euAqw@mail.gmail.com>
Subject: Re: svn commit: r294471 - head/sys/dev/usb/wlan
From: Conrad Meyer <cem@FreeBSD.org>
To: Andriy Gapon <avg@freebsd.org>
Cc: Mark Johnston <markj@freebsd.org>, Ravi Pokala <rpokala@mac.com>, 
 Adrian Chadd <adrian.chadd@gmail.com>, Andriy Voskoboinyk <avos@freebsd.org>, 
 "src-committers@freebsd.org" <src-committers@freebsd.org>, 
 "svn-src-all@freebsd.org" <svn-src-all@freebsd.org>, 
 "svn-src-head@freebsd.org" <svn-src-head@freebsd.org>
Content-Type: text/plain; charset=UTF-8
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.20
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for &quot;
 user&quot; and &quot; projects&quot; \)" <svn-src-all.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-all/>
List-Post: <mailto:svn-src-all@freebsd.org>
List-Help: <mailto:svn-src-all-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Thu, 21 Jan 2016 18:32:24 -0000

On Thu, Jan 21, 2016 at 1:52 AM, Andriy Gapon <avg@freebsd.org> wrote:
> On 21/01/2016 03:28, Mark Johnston wrote:
>> Isilon has done ad-hoc implementations of this for bufs and mbufs, and
>> they're quite handy for debugging. With BUF_TRACKING enabled in our
>> kernel config, each buf contains a const char *b_records[32], and one
>> adds
>>
>>       buf_track(bp, __func__);
>>
>> or so to various functions to record an entry in the buf when the
>> function is invoked.
>
> Does your extension also save a stack trace?
> I would love to have something like that for the memory allocation and
> deallocation audit.

No, just a pointer to a constant string (function name or similar).  I
think stacks would take up a huge amount of space relative to the size
of a buf (~1kB), rather than just a little bit more space :-).

I worked on a project involving buffers and found the tracking very
handy.  Something less ad-hoc would be useful to have.

Best,
Conrad

From owner-svn-src-all@freebsd.org  Thu Jan 21 18:35:11 2016
Return-Path: <owner-svn-src-all@freebsd.org>
Delivered-To: svn-src-all@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id E053AA8CCCB;
 Thu, 21 Jan 2016 18:35:11 +0000 (UTC)
 (envelope-from cse.cem@gmail.com)
Received: from mail-yk0-f176.google.com (mail-yk0-f176.google.com
 [209.85.160.176])
 (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 B47991231;
 Thu, 21 Jan 2016 18:35:11 +0000 (UTC)
 (envelope-from cse.cem@gmail.com)
Received: by mail-yk0-f176.google.com with SMTP id v14so58654005ykd.3;
 Thu, 21 Jan 2016 10:35:11 -0800 (PST)
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:content-type
 :content-transfer-encoding;
 bh=DedcMJB7+gNeeRNYRGgLMLKDzb+qClTeBmZl7z+g95w=;
 b=DA9CrLKDYhih4fTGI3Ko2tLSU8gJRCAbG8F/M8SdcOQkBrvtBmmOIZu74WeI+XTDWy
 dOORMIJ6/pmKNRJJNqWfK27fnuw92Fd5VzUm/+/D28p6icz5LBS1Vq2bGWlfe7tHfxfK
 wY8Lw54iJf6sPPSNmIKgPqnLJcffEVDvbqTeB1oeRWaDNfSpTJ0oOPpKcbDDydvvnrlt
 A6J12w9BkrvZ/cg0euTs0Qukn1iVDWrkl8AOZCjeRGOvkwP6zzN41IO+zRB5Uw+E0rQs
 AtxPKqqOfoCMeMiDQ7usMfumIy0MiQNI0EXcLiqXy08PPCdE3rW7zA2t2aeUFi5RBmt8
 wtOQ==
X-Gm-Message-State: ALoCoQlsWIhmwvHS2W12TMCG9CiIxMI8GCV4N3RdmkVIdk3ZOjKbpe9PelRK0EF55mqH5Q2u/8ucHQDgVNek3Ubg2MqoP6YRSA==
X-Received: by 10.129.4.3 with SMTP id 3mr22889052ywe.342.1453397494886;
 Thu, 21 Jan 2016 09:31:34 -0800 (PST)
Received: from mail-yk0-f173.google.com (mail-yk0-f173.google.com.
 [209.85.160.173])
 by smtp.gmail.com with ESMTPSA id v130sm1313351ywe.24.2016.01.21.09.31.34
 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);
 Thu, 21 Jan 2016 09:31:34 -0800 (PST)
Received: by mail-yk0-f173.google.com with SMTP id a85so56510067ykb.1;
 Thu, 21 Jan 2016 09:31:34 -0800 (PST)
MIME-Version: 1.0
X-Received: by 10.37.92.134 with SMTP id q128mr14862951ybb.100.1453397494403; 
 Thu, 21 Jan 2016 09:31:34 -0800 (PST)
Reply-To: cem@FreeBSD.org
Received: by 10.37.4.69 with HTTP; Thu, 21 Jan 2016 09:31:34 -0800 (PST)
In-Reply-To: <201601211110.u0LBAEI1081858@repo.freebsd.org>
References: <201601211110.u0LBAEI1081858@repo.freebsd.org>
Date: Thu, 21 Jan 2016 09:31:34 -0800
X-Gmail-Original-Message-ID: <CAG6CVpXXadnEJt+=tjiyhpk04LtTeiAoOqYeTn2-bsxwJjmTAw@mail.gmail.com>
Message-ID: <CAG6CVpXXadnEJt+=tjiyhpk04LtTeiAoOqYeTn2-bsxwJjmTAw@mail.gmail.com>
Subject: Re: svn commit: r294495 - in head: . crypto/openssh
From: Conrad Meyer <cem@FreeBSD.org>
To: =?UTF-8?Q?Dag=2DErling_Sm=C3=B8rgrav?= <des@freebsd.org>
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-all@freebsd.org
X-Mailman-Version: 2.1.20
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for &quot;
 user&quot; and &quot; projects&quot; \)" <svn-src-all.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-all/>
List-Post: <mailto:svn-src-all@freebsd.org>
List-Help: <mailto:svn-src-all-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Thu, 21 Jan 2016 18:35:12 -0000

On Thu, Jan 21, 2016 at 3:10 AM, Dag-Erling Sm=C3=B8rgrav <des@freebsd.org>=
 wrote:
> Author: des
> Date: Thu Jan 21 11:10:14 2016
> New Revision: 294495
> URL: https://svnweb.freebsd.org/changeset/base/294495
>
> Log:
>   Enable DSA keys by default.  They were disabled in OpenSSH 6.9p1.

Are we going to maintain DSA key support after upstream deprecates it
entirely?  And why?

"""
Future Deprecation Notice
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D

The 7.0 release of OpenSSH, due for release in late July, will
deprecate several features, some of which may affect compatibility
or existing configurations. The intended changes are as follows:

...

 * Support for ssh-dss, ssh-dss-cert-* host and user keys will be
   run-time disabled by default.
"""

http://www.openssh.com/txt/release-6.9

"OpenSSH 7.0 and greater similarly disables the ssh-dss (DSA) public
key algorithm. It too is weak and we recommend against its use."

http://www.openssh.com/legacy.html

Best,
Conrad

From owner-svn-src-all@freebsd.org  Thu Jan 21 18:36:20 2016
Return-Path: <owner-svn-src-all@freebsd.org>
Delivered-To: svn-src-all@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3BA0BA8CD20;
 Thu, 21 Jan 2016 18:36:20 +0000 (UTC)
 (envelope-from alex.burlyga.ietf@gmail.com)
Received: from mail-vk0-x22f.google.com (mail-vk0-x22f.google.com
 [IPv6:2607:f8b0:400c:c05::22f])
 (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits))
 (Client CN "smtp.gmail.com",
 Issuer "Google Internet Authority G2" (verified OK))
 by mx1.freebsd.org (Postfix) with ESMTPS id EAA3113A0;
 Thu, 21 Jan 2016 18:36:19 +0000 (UTC)
 (envelope-from alex.burlyga.ietf@gmail.com)
Received: by mail-vk0-x22f.google.com with SMTP id k1so28337552vkb.2;
 Thu, 21 Jan 2016 10:36:19 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;
 h=mime-version:in-reply-to:references:date:message-id:subject:from:to
 :cc:content-type;
 bh=BocxFY1h16JrdbDjDvEXpgMMNguFNGQuSR0J870muQo=;
 b=ShYv+mmwm/NJoEUt33fldjsjPoTH0NZQJuXIiuq7rxO9CvIm5MhxeHflH+dcey3z8Q
 Q93nRmmYPaJ+LVpElq3tIkmmn2rQcoxiUd5ZDo7zO4KSBkuO+dwxP7tXAcvkKPq92hoU
 ArynCa6CSgMGW/veEe2CY+qQZe0yElL+R7YrzraIK1ifLvc11OwkwQGnkF3mHml/8D9X
 KSRvtC/AlS2qAav7WgpcoW3nDgq+x4cbBSszr6fexI6cmkZmyuJC9I+rhcbSYI3Niljt
 CECpzgoWCgzA8UlklrImXr8C3xUXfWJYPUU+tk1zSWjkjPSZJ4pTXBLKRwQynk90a3yq
 ToiQ==
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:date
 :message-id:subject:from:to:cc:content-type;
 bh=BocxFY1h16JrdbDjDvEXpgMMNguFNGQuSR0J870muQo=;
 b=UNc4DkCJCQgAq3Xis3HC3gxJxX9oTykah9E0mcoztEAhO/PpOGe9nnc+jlWQWNUuhB
 iHAvgllVN8fhtMAND+fSqSYgFdx0+dJ4MRGrin4OdS/NIEfEbwp9ZQkwcyI8rdW5AU00
 WufTA+BwssQoTx48X4avcXBelxytqC622BnMtT5bUWGsW1r48OS9IYzOhdSWD8ldnde8
 saywlOcA3ymUVXkZ5/EelM3zhDSD2WwWxGz3JlhFb28Zu92AfEgp8PJy3zaMtc0k+KUU
 HFqRZJzGQKKFF1LcOnTs+Fq+/hg9bzGljpJxYnzLywU4lAXCnluZ8zr80LT75tgXwD0j
 F6PA==
X-Gm-Message-State: ALoCoQlE6FQGxLjCuzRFid3q5f58WqXN6uwt760lTVac8csyBijwjDDZBOLdLJeFWAthPQq3QibCsCHPajML907NUPkNWLHiXw==
MIME-Version: 1.0
X-Received: by 10.31.2.82 with SMTP id 79mr29563960vkc.22.1453401378951; Thu,
 21 Jan 2016 10:36:18 -0800 (PST)
Received: by 10.103.19.199 with HTTP; Thu, 21 Jan 2016 10:36:18 -0800 (PST)
In-Reply-To: <CAJ-Vmom-nORRCZx6YyhH0LJxcOUTuFfMkVsjOczNZiL-TEbsVA@mail.gmail.com>
References: <201601202327.u0KNR2Hh066219@repo.freebsd.org>
 <CAJ-Vmom-nORRCZx6YyhH0LJxcOUTuFfMkVsjOczNZiL-TEbsVA@mail.gmail.com>
Date: Thu, 21 Jan 2016 10:36:18 -0800
Message-ID: <CA+JhTNTQj_JRTGPJWVfOz6ZT=Pj41ue-5_oH6qgCdWD8adC1YQ@mail.gmail.com>
Subject: Re: svn commit: r294471 - head/sys/dev/usb/wlan
From: "alex.burlyga.ietf alex.burlyga.ietf" <alex.burlyga.ietf@gmail.com>
To: Adrian Chadd <adrian.chadd@gmail.com>
Cc: Andriy Voskoboinyk <avos@freebsd.org>,
 "svn-src-head@freebsd.org" <svn-src-head@freebsd.org>, 
 "svn-src-all@freebsd.org" <svn-src-all@freebsd.org>, 
 "src-committers@freebsd.org" <src-committers@freebsd.org>
Content-Type: text/plain; charset=UTF-8
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.20
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for &quot;
 user&quot; and &quot; projects&quot; \)" <svn-src-all.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-all/>
List-Post: <mailto:svn-src-all@freebsd.org>
List-Help: <mailto:svn-src-all-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Thu, 21 Jan 2016 18:36:20 -0000

Just out of curriosity, why not Dtrace? For kernel it has most of the
things that all the ad-hoc tracing things trying to accomplish and
then some more.

On Wed, Jan 20, 2016 at 4:02 PM, Adrian Chadd <adrian.chadd@gmail.com> wrote:
> Hi,
>
> So yeah, I think it's time we just bit the bullet and wrote a
> generic-ish debug/ktr framework for drivers to use so drivers and
> infrastructure doesn't keep spinning its own damned debugging stuff.
>
> (I know people keep saying "dtrace", but ...)
>
> Let's have a think about it.
>
>
> -a
> _______________________________________________
> 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-all@freebsd.org  Thu Jan 21 19:19:10 2016
Return-Path: <owner-svn-src-all@freebsd.org>
Delivered-To: svn-src-all@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id 66F00A8BF67;
 Thu, 21 Jan 2016 19:19:10 +0000 (UTC) (envelope-from avg@FreeBSD.org)
Received: from citadel.icyb.net.ua (citadel.icyb.net.ua [212.40.38.140])
 by mx1.freebsd.org (Postfix) with ESMTP id 972961D54;
 Thu, 21 Jan 2016 19:19:08 +0000 (UTC) (envelope-from avg@FreeBSD.org)
Received: from porto.starpoint.kiev.ua (porto-e.starpoint.kiev.ua
 [212.40.38.100])
 by citadel.icyb.net.ua (8.8.8p3/ICyb-2.3exp) with ESMTP id VAA00139;
 Thu, 21 Jan 2016 21:19:00 +0200 (EET) (envelope-from avg@FreeBSD.org)
Received: from localhost ([127.0.0.1])
 by porto.starpoint.kiev.ua with esmtp (Exim 4.34 (FreeBSD))
 id 1aMKl2-00082S-Ds; Thu, 21 Jan 2016 21:19:00 +0200
Subject: Re: svn commit: r294471 - head/sys/dev/usb/wlan
To: cem@FreeBSD.org
References: <201601202327.u0KNR2Hh066219@repo.freebsd.org>
 <CAJ-Vmom-nORRCZx6YyhH0LJxcOUTuFfMkVsjOczNZiL-TEbsVA@mail.gmail.com>
 <4FBE9133-AB30-4D30-A298-1742952700C5@panasas.com>
 <20160121012825.GA9303@wkstn-mjohnston.west.isilon.com>
 <56A0AA58.3070704@FreeBSD.org>
 <CAG6CVpXKKcuKh-Y_F+As=Ti2DqFnrd__sgOCZxYyphd16euAqw@mail.gmail.com>
Cc: Mark Johnston <markj@FreeBSD.org>, Ravi Pokala <rpokala@mac.com>,
 Adrian Chadd <adrian.chadd@gmail.com>, Andriy Voskoboinyk
 <avos@FreeBSD.org>, "src-committers@freebsd.org"
 <src-committers@FreeBSD.org>,
 "svn-src-all@freebsd.org" <svn-src-all@FreeBSD.org>,
 "svn-src-head@freebsd.org" <svn-src-head@FreeBSD.org>
From: Andriy Gapon <avg@FreeBSD.org>
X-Enigmail-Draft-Status: N1110
Message-ID: <56A12EEB.3040906@FreeBSD.org>
Date: Thu, 21 Jan 2016 21:18:03 +0200
User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:38.0) Gecko/20100101
 Thunderbird/38.5.0
MIME-Version: 1.0
In-Reply-To: <CAG6CVpXKKcuKh-Y_F+As=Ti2DqFnrd__sgOCZxYyphd16euAqw@mail.gmail.com>
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 7bit
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.20
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for &quot;
 user&quot; and &quot; projects&quot; \)" <svn-src-all.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-all/>
List-Post: <mailto:svn-src-all@freebsd.org>
List-Help: <mailto:svn-src-all-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Thu, 21 Jan 2016 19:19:10 -0000

On 21/01/2016 19:25, Conrad Meyer wrote:
> On Thu, Jan 21, 2016 at 1:52 AM, Andriy Gapon <avg@freebsd.org> wrote:
>> On 21/01/2016 03:28, Mark Johnston wrote:
>>> Isilon has done ad-hoc implementations of this for bufs and mbufs, and
>>> they're quite handy for debugging. With BUF_TRACKING enabled in our
>>> kernel config, each buf contains a const char *b_records[32], and one
>>> adds
>>>
>>>       buf_track(bp, __func__);
>>>
>>> or so to various functions to record an entry in the buf when the
>>> function is invoked.
>>
>> Does your extension also save a stack trace?
>> I would love to have something like that for the memory allocation and
>> deallocation audit.
> 
> No, just a pointer to a constant string (function name or similar).  I
> think stacks would take up a huge amount of space relative to the size
> of a buf (~1kB), rather than just a little bit more space :-).

Well, 15 or so addresses on amd64 would take 120 bytes and if they go to a
circular buffer, then it should not matter that much.

> I worked on a project involving buffers and found the tracking very
> handy.  Something less ad-hoc would be useful to have.

Indeed!

-- 
Andriy Gapon

From owner-svn-src-all@freebsd.org  Thu Jan 21 19:19:25 2016
Return-Path: <owner-svn-src-all@freebsd.org>
Delivered-To: svn-src-all@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7E99FA8BF9C;
 Thu, 21 Jan 2016 19:19:25 +0000 (UTC)
 (envelope-from dchagin@FreeBSD.org)
Received: from repo.freebsd.org (repo.freebsd.org
 [IPv6:2610:1c1:1:6068::e6a:0])
 (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
 (Client did not present a certificate)
 by mx1.freebsd.org (Postfix) with ESMTPS id 4AAA91EA1;
 Thu, 21 Jan 2016 19:19:25 +0000 (UTC)
 (envelope-from dchagin@FreeBSD.org)
Received: from repo.freebsd.org ([127.0.1.37])
 by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u0LJJOwH049879;
 Thu, 21 Jan 2016 19:19:24 GMT (envelope-from dchagin@FreeBSD.org)
Received: (from dchagin@localhost)
 by repo.freebsd.org (8.15.2/8.15.2/Submit) id u0LJJOP8049878;
 Thu, 21 Jan 2016 19:19:24 GMT (envelope-from dchagin@FreeBSD.org)
Message-Id: <201601211919.u0LJJOP8049878@repo.freebsd.org>
X-Authentication-Warning: repo.freebsd.org: dchagin set sender to
 dchagin@FreeBSD.org using -f
From: Dmitry Chagin <dchagin@FreeBSD.org>
Date: Thu, 21 Jan 2016 19:19:24 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org
Subject: svn commit: r294529 - stable/10/sys/compat/linux
X-SVN-Group: stable-10
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.20
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for &quot;
 user&quot; and &quot; projects&quot; \)" <svn-src-all.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-all/>
List-Post: <mailto:svn-src-all@freebsd.org>
List-Help: <mailto:svn-src-all-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Thu, 21 Jan 2016 19:19:25 -0000

Author: dchagin
Date: Thu Jan 21 19:19:24 2016
New Revision: 294529
URL: https://svnweb.freebsd.org/changeset/base/294529

Log:
  MFC 294233:
  
  Prevent double free of control in common sendmsg path as sosend
  already freeing it.

Modified:
  stable/10/sys/compat/linux/linux_socket.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/sys/compat/linux/linux_socket.c
==============================================================================
--- stable/10/sys/compat/linux/linux_socket.c	Thu Jan 21 18:45:46 2016	(r294528)
+++ stable/10/sys/compat/linux/linux_socket.c	Thu Jan 21 19:19:24 2016	(r294529)
@@ -1164,6 +1164,7 @@ linux_sendmsg_common(struct thread *td, 
 	msg.msg_iov = iov;
 	msg.msg_flags = 0;
 	error = linux_sendit(td, s, &msg, flags, control, UIO_USERSPACE);
+	control = NULL;
 
 bad:
 	m_freem(control);

From owner-svn-src-all@freebsd.org  Thu Jan 21 19:23:10 2016
Return-Path: <owner-svn-src-all@freebsd.org>
Delivered-To: svn-src-all@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id DBD1BA8C20C;
 Thu, 21 Jan 2016 19:23:10 +0000 (UTC)
 (envelope-from danfe@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 CF93C12F0;
 Thu, 21 Jan 2016 19:23:10 +0000 (UTC)
 (envelope-from danfe@freebsd.org)
Received: by freefall.freebsd.org (Postfix, from userid 1033)
 id CBB2E1CDC; Thu, 21 Jan 2016 19:23:10 +0000 (UTC)
Date: Thu, 21 Jan 2016 19:23:10 +0000
From: Alexey Dokuchaev <danfe@FreeBSD.org>
To: Gleb Smirnoff <glebius@FreeBSD.org>
Cc: Glen Barber <gjb@FreeBSD.org>, svn-src-stable@freebsd.org,
 svn-src-all@freebsd.org, src-committers@freebsd.org,
 svn-src-stable-9@freebsd.org
Subject: Re: svn commit: r293912 - in stable:
 10/release/doc/en_US.ISO8859-1/errata 10/release/doc/share/xml
 9/release/doc/en_US.ISO8859-1/errata 9/release/doc/share/xml
Message-ID: <20160121192310.GA35918@FreeBSD.org>
References: <201601141111.u0EBBkkl059546@repo.freebsd.org>
 <20160114124353.GA79082@FreeBSD.org>
 <20160114125357.GE88862@FreeBSD.org>
 <20160114131629.GA98407@FreeBSD.org>
 <20160114181253.GF1906@FreeBSD.org>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <20160114181253.GF1906@FreeBSD.org>
User-Agent: Mutt/1.5.24 (2015-08-30)
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.20
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for &quot;
 user&quot; and &quot; projects&quot; \)" <svn-src-all.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-all/>
List-Post: <mailto:svn-src-all@freebsd.org>
List-Help: <mailto:svn-src-all-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Thu, 21 Jan 2016 19:23:11 -0000

On Thu, Jan 14, 2016 at 10:12:53AM -0800, Gleb Smirnoff wrote:
> Alexey,
> 
> One of the reasons why old systems become unsupported is that because
> it consumes more and more time to analyze and answer questions like this
> one.
> 
> If you want to be stable/8 maintainer, you should analyze and determine
> whether patches apply or not. If you want to just sit on stable/8 for some
> reason, but someone else do this job, you need to find someone else.

While I don't consider becoming (semi-)official stable/8 maintainer, your
point is fair enough.  I'll review my queue of desired patches for it and
ask for appropriate src committer review and approval.

Just to make it clear, I did not imply that Glen or anyone else should get
busy with them, just wondered if they by chance already know whether these
fixes are applicable or not.

./danfe

From owner-svn-src-all@freebsd.org  Thu Jan 21 20:38:23 2016
Return-Path: <owner-svn-src-all@freebsd.org>
Delivered-To: svn-src-all@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6888BA8BEE5;
 Thu, 21 Jan 2016 20:38:23 +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 5441D186F;
 Thu, 21 Jan 2016 20:38:23 +0000 (UTC) (envelope-from devin@shxd.cx)
Received: from 50-196-156-133-static.hfc.comcastbusiness.net
 ([50.196.156.133]:60693 helo=tinkerbell.pixel8networks.com)
 by shxd.cx with esmtpsa (TLSv1:AES256-SHA:256) (Exim 4.77 (FreeBSD))
 (envelope-from <devin@shxd.cx>)
 id 1aMLzk-000J6V-5C; Thu, 21 Jan 2016 12:38:16 -0800
Mime-Version: 1.0 (Mac OS X Mail 8.2 \(2104\))
Subject: Re: svn commit: r294417 - in stable/10/sys/boot: common fdt forth
 i386/libi386 i386/loader
From: Devin Teske <dteske@freebsd.org>
In-Reply-To: <201601201323.u0KDN2s0057920@repo.freebsd.org>
Date: Thu, 21 Jan 2016 12:38:18 -0800
Cc: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org,
 Baptiste Daroussin <bapt@freebsd.org>, Devin Teske <dteske@FreeBSD.org>
Message-Id: <16A6EF29-CA34-43BC-8587-51C7B71BBE72@freebsd.org>
References: <201601201323.u0KDN2s0057920@repo.freebsd.org>
To: =?utf-8?Q?Roger_Pau_Monn=C3=A9?= <royger@FreeBSD.org>
X-Mailer: Apple Mail (2.2104)
Sender: devin@shxd.cx
Content-Type: text/plain;
	charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-Content-Filtered-By: Mailman/MimeDel 2.1.20
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.20
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for &quot;
 user&quot; and &quot; projects&quot; \)" <svn-src-all.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-all/>
List-Post: <mailto:svn-src-all@freebsd.org>
List-Help: <mailto:svn-src-all-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Thu, 21 Jan 2016 20:38:23 -0000


> On Jan 20, 2016, at 5:23 AM, Roger Pau Monn=C3=A9 <royger@FreeBSD.org> =
wrote:
>=20
> Author: royger
> Date: Wed Jan 20 13:23:02 2016
> New Revision: 294417
> URL: https://svnweb.freebsd.org/changeset/base/294417
>=20
> Log:
>  MFC r277215, r277291, r277418, r280953 and r280954:
>=20
>  loader: implement multiboot support for Xen Dom0
>=20
>  Note that only the subset of the multiboot specification needed in =
order to
>  boot a Xen Dom0 is implemented.
>=20
>  Sponsored by: Citrix Systems R&D
>=20


Two issues with this merge.

First, this port now needs to be re-educated:
=
https://svnweb.freebsd.org/ports/head/emulators/xen-kernel/Makefile?view=3D=
markup =
<https://svnweb.freebsd.org/ports/head/emulators/xen-kernel/Makefile?view=3D=
markup>

46 =
<https://svnweb.freebsd.org/ports/head/emulators/xen-kernel/Makefile?view=3D=
markup#l46>	.if ${OSVERSION} < 1100055
47 =
<https://svnweb.freebsd.org/ports/head/emulators/xen-kernel/Makefile?view=3D=
markup#l47>	IGNORE=3D         Only supported on recent FreeBSD 11
48 =
<https://svnweb.freebsd.org/ports/head/emulators/xen-kernel/Makefile?view=3D=
markup#l48>	.endif

Looking at your MFC, it looks like the OSVERSION check should allow some =
version of 10.

Unfortunately (second issue), this patch doesn't touch =
stable/10/sys/sys/param.h so the port has no clear way of accurately =
making sure you're on a 10.x release that supports Xen.
--=20
Devin


From owner-svn-src-all@freebsd.org  Thu Jan 21 20:44:22 2016
Return-Path: <owner-svn-src-all@freebsd.org>
Delivered-To: svn-src-all@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id A6DEFA8C232;
 Thu, 21 Jan 2016 20:44:22 +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 77A761F4C;
 Thu, 21 Jan 2016 20:44:22 +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 u0LKiLWv077697;
 Thu, 21 Jan 2016 20:44:21 GMT (envelope-from emaste@FreeBSD.org)
Received: (from emaste@localhost)
 by repo.freebsd.org (8.15.2/8.15.2/Submit) id u0LKiLL9077696;
 Thu, 21 Jan 2016 20:44:21 GMT (envelope-from emaste@FreeBSD.org)
Message-Id: <201601212044.u0LKiLL9077696@repo.freebsd.org>
X-Authentication-Warning: repo.freebsd.org: emaste set sender to
 emaste@FreeBSD.org using -f
From: Ed Maste <emaste@FreeBSD.org>
Date: Thu, 21 Jan 2016 20:44:21 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-head@freebsd.org
Subject: svn commit: r294530 - 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-all@freebsd.org
X-Mailman-Version: 2.1.20
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for &quot;
 user&quot; and &quot; projects&quot; \)" <svn-src-all.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-all/>
List-Post: <mailto:svn-src-all@freebsd.org>
List-Help: <mailto:svn-src-all-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Thu, 21 Jan 2016 20:44:22 -0000

Author: emaste
Date: Thu Jan 21 20:44:21 2016
New Revision: 294530
URL: https://svnweb.freebsd.org/changeset/base/294530

Log:
  Add STB_GNU_UNIQUE symbol binding definition
  
  Red Hat created STB_GNU_UNIQUE to handle certain special cases relating
  to dynamically loading C++ DSOs[1].
  
  We don't (currently) have support for STB_GNU_UNIQUE, but ought to
  reserve the value in ELFNN_ST_BIND. This will also be used by an
  upcoming ELF Tool Chain import.
  
  [1] https://www.redhat.com/archives/posix-c++-wg/2009-August/msg00002.html
  
  MFC after:	1 week
  Sponsored by:	The FreeBSD Foundation

Modified:
  head/sys/sys/elf_common.h

Modified: head/sys/sys/elf_common.h
==============================================================================
--- head/sys/sys/elf_common.h	Thu Jan 21 19:19:24 2016	(r294529)
+++ head/sys/sys/elf_common.h	Thu Jan 21 20:44:21 2016	(r294530)
@@ -753,8 +753,9 @@ typedef struct {
 #define	STB_LOCAL	0	/* Local symbol */
 #define	STB_GLOBAL	1	/* Global symbol */
 #define	STB_WEAK	2	/* like global - lower precedence */
-#define	STB_LOOS	10	/* Reserved range for operating system */
-#define	STB_HIOS	12	/*   specific semantics. */
+#define	STB_LOOS	10	/* Start of operating system reserved range. */
+#define	STB_GNU_UNIQUE	10	/* Unique symbol (GNU) */
+#define	STB_HIOS	12	/* End of operating system reserved range. */
 #define	STB_LOPROC	13	/* reserved range for processor */
 #define	STB_HIPROC	15	/*   specific semantics. */
 

From owner-svn-src-all@freebsd.org  Thu Jan 21 20:52:21 2016
Return-Path: <owner-svn-src-all@freebsd.org>
Delivered-To: svn-src-all@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9708FA8C4DC;
 Thu, 21 Jan 2016 20:52:21 +0000 (UTC)
 (envelope-from mckusick@FreeBSD.org)
Received: from repo.freebsd.org (repo.freebsd.org
 [IPv6:2610:1c1:1:6068::e6a:0])
 (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
 (Client did not present a certificate)
 by mx1.freebsd.org (Postfix) with ESMTPS id 641BF1372;
 Thu, 21 Jan 2016 20:52:21 +0000 (UTC)
 (envelope-from mckusick@FreeBSD.org)
Received: from repo.freebsd.org ([127.0.1.37])
 by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u0LKqKa6080549;
 Thu, 21 Jan 2016 20:52:20 GMT (envelope-from mckusick@FreeBSD.org)
Received: (from mckusick@localhost)
 by repo.freebsd.org (8.15.2/8.15.2/Submit) id u0LKqKje080548;
 Thu, 21 Jan 2016 20:52:20 GMT (envelope-from mckusick@FreeBSD.org)
Message-Id: <201601212052.u0LKqKje080548@repo.freebsd.org>
X-Authentication-Warning: repo.freebsd.org: mckusick set sender to
 mckusick@FreeBSD.org using -f
From: Kirk McKusick <mckusick@FreeBSD.org>
Date: Thu, 21 Jan 2016 20:52:20 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-head@freebsd.org
Subject: svn commit: r294531 - 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-all@freebsd.org
X-Mailman-Version: 2.1.20
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for &quot;
 user&quot; and &quot; projects&quot; \)" <svn-src-all.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-all/>
List-Post: <mailto:svn-src-all@freebsd.org>
List-Help: <mailto:svn-src-all-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Thu, 21 Jan 2016 20:52:21 -0000

Author: mckusick
Date: Thu Jan 21 20:52:20 2016
New Revision: 294531
URL: https://svnweb.freebsd.org/changeset/base/294531

Log:
  Update comment to note the function, prison_priv_check(), that needs to
  be updated in kern_jail.c when a new priviledge is added.

Modified:
  head/sys/sys/priv.h

Modified: head/sys/sys/priv.h
==============================================================================
--- head/sys/sys/priv.h	Thu Jan 21 20:44:21 2016	(r294530)
+++ head/sys/sys/priv.h	Thu Jan 21 20:52:20 2016	(r294531)
@@ -45,8 +45,9 @@
  * loadable kernel module ABI, and should not be changed across minor
  * releases.
  *
- * When adding a new privilege, remember to determine if it's appropriate for
- * use in jail, and update the privilege switch in kern_jail.c as necessary.
+ * When adding a new privilege, remember to determine if it's appropriate
+ * for use in jail, and update the privilege switch in prison_priv_check()
+ * in kern_jail.c as necessary.
  */
 
 /*

From owner-svn-src-all@freebsd.org  Thu Jan 21 20:57:19 2016
Return-Path: <owner-svn-src-all@freebsd.org>
Delivered-To: svn-src-all@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3D356A8C5D5;
 Thu, 21 Jan 2016 20:57:19 +0000 (UTC)
 (envelope-from carpeddiem@gmail.com)
Received: from mail-io0-x22c.google.com (mail-io0-x22c.google.com
 [IPv6:2607:f8b0:4001:c06::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 088B71768;
 Thu, 21 Jan 2016 20:57:19 +0000 (UTC)
 (envelope-from carpeddiem@gmail.com)
Received: by mail-io0-x22c.google.com with SMTP id g73so69139532ioe.3;
 Thu, 21 Jan 2016 12:57:19 -0800 (PST)
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:content-type;
 bh=S0MjtV29KEPOFnw5MOztbNbT821rVNxju0//IUsvchc=;
 b=Q2dTa1YYrvH+ecrB/NUOnkgdR+1O8gUgmxhJhYLHXYzFWhPxSRCYT6aMlNqESJudb6
 xYv4oYehVYZgjqS8e3Zgg+r7p2EquaIUUU1zi+a9WLwhlR2Kyu/E13cSo54eLRC1XLZc
 m11mqeXx8oqXkSq+q3CjpuaGeO4PqKUeDM19zMVrs1ByUMaOmhyXRiC6NAask/UUgj6u
 fpvFpHMOyx9piVuez7Fvhi0uGaQptqZtXPJfl/4ygrxkDTrC0qxz8y7Q3k7xxqzG3xe8
 uLVeaIq9I1Fwvl9rJtTZoQFWRYCaB2wqtKvkwKdFP1T2eQuAE998VG8mnThrRtRCgddc
 3jgA==
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:content-type;
 bh=S0MjtV29KEPOFnw5MOztbNbT821rVNxju0//IUsvchc=;
 b=YyYt27ZjQA4ysyySgXt/3pyY1DEN/wmJfCMj+FvROgdbNQpvmNUhcedc0D5aHzO0We
 unu4dCo7n0fFpXAp6OJenOrMdtO/KXQad+H5rFL34sx677YcGS7q+d3B7Ao4fP6EvcO1
 yqoYT0NkPUjeHVA39J43LrHtBmE2HFaim7hbsosbBuwz9Wp6n9+JhgFQb2d1fExwNMTm
 3Z/ecEqiovsBTsaHcT3nz1zIELKEeWMN9xVt+cg67xBEJv8NGsUjZ+aJBmZMR7uDK/t8
 FSevgDxiaLYcWwj7VrtTdcO5lmyNdioTKewrOcyjpJJupP1Ir9pghtV9CvFtQrqLsMoI
 Q32A==
X-Gm-Message-State: AG10YOS7JwLSPyqk/COslFUbjqKwUzIlZkrwGIXQ+3qdJ4FYD/6Z14HgbPfJBV4w3YtON1c3ids1XjUQBxqLPQ==
X-Received: by 10.107.62.5 with SMTP id l5mr15478830ioa.180.1453409838452;
 Thu, 21 Jan 2016 12:57:18 -0800 (PST)
MIME-Version: 1.0
Sender: carpeddiem@gmail.com
Received: by 10.107.39.66 with HTTP; Thu, 21 Jan 2016 12:56:58 -0800 (PST)
In-Reply-To: <201601211611.u0LGBKkV086754@repo.freebsd.org>
References: <201601211611.u0LGBKkV086754@repo.freebsd.org>
From: Ed Maste <emaste@freebsd.org>
Date: Thu, 21 Jan 2016 15:56:58 -0500
X-Google-Sender-Auth: RmF68ssp6vJ7vGXG65pxIa9OFO4
Message-ID: <CAPyFy2CZrbZjS2A35hGDRB1-YwZs-aaYPhX-GDzd4J7JzwXt2A@mail.gmail.com>
Subject: Re: svn commit: r294507 - head/contrib/bsnmp/snmp_mibII
To: Hartmut Brandt <harti@freebsd.org>
Cc: "src-committers@freebsd.org" <src-committers@freebsd.org>, 
 "svn-src-all@freebsd.org" <svn-src-all@freebsd.org>, 
 "svn-src-head@freebsd.org" <svn-src-head@freebsd.org>
Content-Type: text/plain; charset=UTF-8
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.20
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for &quot;
 user&quot; and &quot; projects&quot; \)" <svn-src-all.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-all/>
List-Post: <mailto:svn-src-all@freebsd.org>
List-Help: <mailto:svn-src-all-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Thu, 21 Jan 2016 20:57:19 -0000

On 21 January 2016 at 11:11, Hartmut Brandt <harti@freebsd.org> wrote:
> Author: harti
> Date: Thu Jan 21 16:11:20 2016
> New Revision: 294507
> URL: https://svnweb.freebsd.org/changeset/base/294507
>
> Log:
>   Fill the ifAlias leaf of the ifXTable with the interface description
>   if there is one available and it fits into the maximum size (64 characters).

This breaks the build for our GCC-using architectures:
/scratch/tmp/emaste/freebsd/usr.sbin/bsnmpd/modules/snmp_mibII/../../../../contrib/bsnmp/snmp_mibII/mibII.h:85:
error: variably modified 'alias' at file scope

From owner-svn-src-all@freebsd.org  Thu Jan 21 21:00:48 2016
Return-Path: <owner-svn-src-all@freebsd.org>
Delivered-To: svn-src-all@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id 49210A8C67F;
 Thu, 21 Jan 2016 21:00:48 +0000 (UTC)
 (envelope-from garga.bsd@gmail.com)
Received: from mail-qg0-x22e.google.com (mail-qg0-x22e.google.com
 [IPv6:2607:f8b0:400d:c04::22e])
 (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits))
 (Client CN "smtp.gmail.com",
 Issuer "Google Internet Authority G2" (verified OK))
 by mx1.freebsd.org (Postfix) with ESMTPS id 030FA1982;
 Thu, 21 Jan 2016 21:00:48 +0000 (UTC)
 (envelope-from garga.bsd@gmail.com)
Received: by mail-qg0-x22e.google.com with SMTP id o11so42283385qge.2;
 Thu, 21 Jan 2016 13:00:47 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;
 h=sender:content-type:mime-version:subject:from:in-reply-to:date:cc
 :content-transfer-encoding:message-id:references:to;
 bh=eoLJxm2RKSxHI0iL2riUQAxQjVik20O8QVli8eCLbm0=;
 b=E0HOXHBecM6Av1OKMITUHJfJknDEwxXfnSZbJMAlwvhifPuyu3xq/b9mbyZvdu1Z6U
 mcIoGmotlJRIhLpgjltw4SRj7FoimK9w0ZGQBKo0e5ZukNgHqk3iQ5ornpZIbR3le5I9
 5cPwFoCSywmUGaWA6VUtPg3O6c6TGGFRTHLgSW0yamp/huxHGNT3igEyatUXbi54UuB3
 u0L5SnAlmExwqKJGgF/LKOhhRG8yxvvU0HcJdXry/ZWQDRyXcUzWb7esC3/FzAzuwzgO
 TY5KaJSUS2XJkyncNPTcZYhjV7+hBFfxfLYGObrGUMWmP+FWf1O5iM0vy8AMreilktRB
 Zg5Q==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20130820;
 h=x-gm-message-state:sender:content-type:mime-version:subject:from
 :in-reply-to:date:cc:content-transfer-encoding:message-id:references
 :to; bh=eoLJxm2RKSxHI0iL2riUQAxQjVik20O8QVli8eCLbm0=;
 b=KVBFsPQBkt2MhK/umP0X2MNKkpOytElt1P90zMUwWkgfiqomfJRohuf3R/c2XncM+0
 JkV3ZMXwqZW+1B10YO1XxEZ/Z38sUGrdWTb18ouX818/kWtpTeK0A0W+eapOCqM1k6JW
 7jwbsiaihmCCkNwfBU8N43WHLMXTEqreFdWSL834tD7ViRUsO+F1fh5oYobIEc8hBlT3
 1abG8QmMy+7zxFUt/ddy69gOFeeC8Ap0QJv7VPb5NRwKQLev669YjmvMfptRpnOsPelM
 6x5uk7YnoWY8nbW9/BeTVrWZJwp7iqMpCgrGc0TUNA3fPtZAQzauLT6w3vAA67ewBFlE
 XYeg==
X-Gm-Message-State: ALoCoQlF6EPZ4ZdzbQ78o77p3dZNIix2bfH0fzmam0cGeN8KaVFNQXoZ2J70XZJ76sEfc16h/JAVr7wB0oYsKV2hqctk4scnVQ==
X-Received: by 10.140.129.203 with SMTP id 194mr58281303qhb.57.1453410047086; 
 Thu, 21 Jan 2016 13:00:47 -0800 (PST)
Received: from mbp.home (179-125-131-148.desktop.com.br. [179.125.131.148])
 by smtp.gmail.com with ESMTPSA id u78sm1340942qge.27.2016.01.21.13.00.45
 (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128);
 Thu, 21 Jan 2016 13:00:46 -0800 (PST)
Sender: Renato Botelho <garga.bsd@gmail.com>
Content-Type: text/plain; charset=us-ascii
Mime-Version: 1.0 (Mac OS X Mail 9.2 \(3112\))
Subject: Re: svn commit: r294530 - head/sys/sys
From: Renato Botelho <garga@FreeBSD.org>
In-Reply-To: <201601212044.u0LKiLL9077696@repo.freebsd.org>
Date: Thu, 21 Jan 2016 19:00:42 -0200
Cc: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-head@freebsd.org
Content-Transfer-Encoding: quoted-printable
Message-Id: <2651E939-BCCD-4013-A4EB-717CA2496563@FreeBSD.org>
References: <201601212044.u0LKiLL9077696@repo.freebsd.org>
To: Ed Maste <emaste@freebsd.org>
X-Mailer: Apple Mail (2.3112)
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.20
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for &quot;
 user&quot; and &quot; projects&quot; \)" <svn-src-all.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-all/>
List-Post: <mailto:svn-src-all@freebsd.org>
List-Help: <mailto:svn-src-all-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Thu, 21 Jan 2016 21:00:48 -0000

> On Jan 21, 2016, at 18:44, Ed Maste <emaste@freebsd.org> wrote:
>=20
> Author: emaste
> Date: Thu Jan 21 20:44:21 2016
> New Revision: 294530
> URL: https://svnweb.freebsd.org/changeset/base/294530
>=20
> Log:
>  Add STB_GNU_UNIQUE symbol binding definition
>=20
>  Red Hat created STB_GNU_UNIQUE to handle certain special cases =
relating
>  to dynamically loading C++ DSOs[1].
>=20
>  We don't (currently) have support for STB_GNU_UNIQUE, but ought to
>  reserve the value in ELFNN_ST_BIND. This will also be used by an
>  upcoming ELF Tool Chain import.
>=20
>  [1] =
https://www.redhat.com/archives/posix-c++-wg/2009-August/msg00002.html
>=20
>  MFC after:	1 week
>  Sponsored by:	The FreeBSD Foundation
>=20
> Modified:
>  head/sys/sys/elf_common.h
>=20
> Modified: head/sys/sys/elf_common.h
> =
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=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/sys/elf_common.h	Thu Jan 21 19:19:24 2016	=
(r294529)
> +++ head/sys/sys/elf_common.h	Thu Jan 21 20:44:21 2016	=
(r294530)
> @@ -753,8 +753,9 @@ typedef struct {
> #define	STB_LOCAL	0	/* Local symbol */
> #define	STB_GLOBAL	1	/* Global symbol */
> #define	STB_WEAK	2	/* like global - lower =
precedence */
> -#define	STB_LOOS	10	/* Reserved range for operating =
system */
> -#define	STB_HIOS	12	/*   specific semantics. */
> +#define	STB_LOOS	10	/* Start of operating system =
reserved range. */
> +#define	STB_GNU_UNIQUE	10	/* Unique symbol (GNU) */

Looks like you meant to use 11 here, no?

> +#define	STB_HIOS	12	/* End of operating system =
reserved range. */
> #define	STB_LOPROC	13	/* reserved range for processor =
*/
> #define	STB_HIPROC	15	/*   specific semantics. */
>=20
> _______________________________________________
> 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"


--
Renato Botelho


From owner-svn-src-all@freebsd.org  Thu Jan 21 21:13:10 2016
Return-Path: <owner-svn-src-all@freebsd.org>
Delivered-To: svn-src-all@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id EF640A8CAA3;
 Thu, 21 Jan 2016 21:13:09 +0000 (UTC)
 (envelope-from carpeddiem@gmail.com)
Received: from mail-ig0-x231.google.com (mail-ig0-x231.google.com
 [IPv6:2607:f8b0:4001:c05::231])
 (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 BA84F1271;
 Thu, 21 Jan 2016 21:13:09 +0000 (UTC)
 (envelope-from carpeddiem@gmail.com)
Received: by mail-ig0-x231.google.com with SMTP id ik10so133094950igb.1;
 Thu, 21 Jan 2016 13:13:09 -0800 (PST)
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:content-type;
 bh=C8oPKF6QAE1oc/tNlNatLCuMjiDNWzLZjdW3PVMQzgI=;
 b=rf+b7vHIt85zGKTYGckESqz1TrYj6uPFaAvGc7mqIrzN57p8MYUoeOSqE6Xox0qNrt
 GouOEU4hojobQDMNoOpCPVq+nylMPFjjc/kPKVNfmwdnlCcMEvroFpWavHCosdolIEL2
 aJw1TrdhH2CbdyTbt1qoN6wWicjQRJbQA0pQ4GH9r05Wi6kOs3CZ2omrOrWVPIKsvISz
 qBmbr6SwAo1U8sNvrZ79o9Q/305P/BekjDtb7E+JmeSX72nXaye3VuOnTYYWjnYgMKD1
 bGanHAfG7u+ZzqIT+tW2SwJRPM5YkAHf1wgORsNvG3ctpeSo7ljFbtzNjKPb+7fCAmLL
 cvLQ==
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:content-type;
 bh=C8oPKF6QAE1oc/tNlNatLCuMjiDNWzLZjdW3PVMQzgI=;
 b=e0iUmip0QRovCbL1Nqop3jW1EQrdxfTl3uIMF4og9r92kh9LeckIepGITxVpSRZ31W
 ZC4cMcenzhynSo3+Ux+rdGEv7it+3zuLovfUnPbDRB35Ge7/oQjO2LvptTrVZh/KnbBD
 amI1mCcH9P26UqCGzcY9SRpRzbWKEiyFDIoAx2MRAVHAQNIdp/7djoQU8jOiWVPgL8GS
 jV4DfrQo5fS6TrMBdeASkl/Xn83UDvCMRBEFERaBg5DMoxBw5WyyCW766uBlF4i+3kvF
 8dZ9HfyDL0y8ELGGhuqJJAPmo/xOSAkZ2t3d9k42RY+77094v2EHIk+ISciCa1mn0wl1
 33gA==
X-Gm-Message-State: AG10YOSxH0cPffGolixs9YKUaGlJQzrWc0vBC0YW9AW0sUw07UsG5axzzojsms65mq+oRR+6UUwlufmtgRf2gg==
X-Received: by 10.50.55.98 with SMTP id r2mr10655213igp.97.1453410789134; Thu,
 21 Jan 2016 13:13:09 -0800 (PST)
MIME-Version: 1.0
Sender: carpeddiem@gmail.com
Received: by 10.107.39.66 with HTTP; Thu, 21 Jan 2016 13:12:49 -0800 (PST)
In-Reply-To: <2651E939-BCCD-4013-A4EB-717CA2496563@FreeBSD.org>
References: <201601212044.u0LKiLL9077696@repo.freebsd.org>
 <2651E939-BCCD-4013-A4EB-717CA2496563@FreeBSD.org>
From: Ed Maste <emaste@freebsd.org>
Date: Thu, 21 Jan 2016 16:12:49 -0500
X-Google-Sender-Auth: 6tKvsQkL_twuBalDq-1_55IMIRM
Message-ID: <CAPyFy2Ds0=RhnO-ryQt55cxMdQpsdK6VeTPui_4VK-uJs+vHaA@mail.gmail.com>
Subject: Re: svn commit: r294530 - head/sys/sys
To: Renato Botelho <garga@freebsd.org>
Cc: "src-committers@freebsd.org" <src-committers@freebsd.org>, 
 "svn-src-all@freebsd.org" <svn-src-all@freebsd.org>, 
 "svn-src-head@freebsd.org" <svn-src-head@freebsd.org>
Content-Type: text/plain; charset=UTF-8
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.20
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for &quot;
 user&quot; and &quot; projects&quot; \)" <svn-src-all.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-all/>
List-Post: <mailto:svn-src-all@freebsd.org>
List-Help: <mailto:svn-src-all-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Thu, 21 Jan 2016 21:13:10 -0000

On 21 January 2016 at 16:00, Renato Botelho <garga@freebsd.org> wrote:
>> On Jan 21, 2016, at 18:44, Ed Maste <emaste@freebsd.org> wrote:
>>
>> Author: emaste
>> Date: Thu Jan 21 20:44:21 2016
>> New Revision: 294530
>> URL: https://svnweb.freebsd.org/changeset/base/294530
>>
>> Log:
>>  Add STB_GNU_UNIQUE symbol binding definition
>>
>>  Red Hat created STB_GNU_UNIQUE to handle certain special cases relating
>>  to dynamically loading C++ DSOs[1].
>>
>>  We don't (currently) have support for STB_GNU_UNIQUE, but ought to
>>  reserve the value in ELFNN_ST_BIND. This will also be used by an
>>  upcoming ELF Tool Chain import.
>>
>>  [1] https://www.redhat.com/archives/posix-c++-wg/2009-August/msg00002.html
>>
>>  MFC after:   1 week
>>  Sponsored by:        The FreeBSD Foundation
>>
>> Modified:
>>  head/sys/sys/elf_common.h
>>
>> Modified: head/sys/sys/elf_common.h
>> ==============================================================================
>> --- head/sys/sys/elf_common.h Thu Jan 21 19:19:24 2016        (r294529)
>> +++ head/sys/sys/elf_common.h Thu Jan 21 20:44:21 2016        (r294530)
>> @@ -753,8 +753,9 @@ typedef struct {
>> #define       STB_LOCAL       0       /* Local symbol */
>> #define       STB_GLOBAL      1       /* Global symbol */
>> #define       STB_WEAK        2       /* like global - lower precedence */
>> -#define      STB_LOOS        10      /* Reserved range for operating system */
>> -#define      STB_HIOS        12      /*   specific semantics. */
>> +#define      STB_LOOS        10      /* Start of operating system reserved range. */
>> +#define      STB_GNU_UNIQUE  10      /* Unique symbol (GNU) */
>
> Looks like you meant to use 11 here, no?

No, it is supposed to be 10. STB_LOOS is a placeholder for the first
OS-specific entry, and STB_GNU_UNIQUE is the first one. It's similar
to STT_GNU_IFUNC (which we do use) -- it has the same value as
STT_LOOS.

These two are really more of a toolchain concern than a "GNU OS," but
either way STB_GNU_UNIQUE has the value 10, and if we end up
supporting this functionality we'll use the same value.

From owner-svn-src-all@freebsd.org  Thu Jan 21 21:16:59 2016
Return-Path: <owner-svn-src-all@freebsd.org>
Delivered-To: svn-src-all@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id 253FBA8CC62;
 Thu, 21 Jan 2016 21:16:59 +0000 (UTC)
 (envelope-from jilles@FreeBSD.org)
Received: from repo.freebsd.org (repo.freebsd.org
 [IPv6:2610:1c1:1:6068::e6a:0])
 (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
 (Client did not present a certificate)
 by mx1.freebsd.org (Postfix) with ESMTPS id E9D8515DC;
 Thu, 21 Jan 2016 21:16:58 +0000 (UTC)
 (envelope-from jilles@FreeBSD.org)
Received: from repo.freebsd.org ([127.0.1.37])
 by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u0LLGv1t086483;
 Thu, 21 Jan 2016 21:16:57 GMT (envelope-from jilles@FreeBSD.org)
Received: (from jilles@localhost)
 by repo.freebsd.org (8.15.2/8.15.2/Submit) id u0LLGvs6086482;
 Thu, 21 Jan 2016 21:16:57 GMT (envelope-from jilles@FreeBSD.org)
Message-Id: <201601212116.u0LLGvs6086482@repo.freebsd.org>
X-Authentication-Warning: repo.freebsd.org: jilles set sender to
 jilles@FreeBSD.org using -f
From: Jilles Tjoelker <jilles@FreeBSD.org>
Date: Thu, 21 Jan 2016 21:16:57 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org
Subject: svn commit: r294532 - stable/10/lib/libc/sys
X-SVN-Group: stable-10
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.20
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for &quot;
 user&quot; and &quot; projects&quot; \)" <svn-src-all.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-all/>
List-Post: <mailto:svn-src-all@freebsd.org>
List-Help: <mailto:svn-src-all-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Thu, 21 Jan 2016 21:16:59 -0000

Author: jilles
Date: Thu Jan 21 21:16:57 2016
New Revision: 294532
URL: https://svnweb.freebsd.org/changeset/base/294532

Log:
  MFC r294234: utimensat(2): Correct description of [EINVAL] error.

Modified:
  stable/10/lib/libc/sys/utimensat.2
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/lib/libc/sys/utimensat.2
==============================================================================
--- stable/10/lib/libc/sys/utimensat.2	Thu Jan 21 20:52:20 2016	(r294531)
+++ stable/10/lib/libc/sys/utimensat.2	Thu Jan 21 21:16:57 2016	(r294532)
@@ -31,7 +31,7 @@
 .\"     @(#)utimes.2	8.1 (Berkeley) 6/4/93
 .\" $FreeBSD$
 .\"
-.Dd January 12, 2016
+.Dd January 17, 2016
 .Dt UTIMENSAT 2
 .Os
 .Sh NAME
@@ -183,10 +183,13 @@ argument
 points outside the process's allocated address space.
 .It Bq Er EINVAL
 The
-.Va tv_usec
+.Va tv_nsec
 component of at least one of the values specified by the
 .Fa times
-argument has a value less than 0 or greater than 999999.
+argument has a value less than 0 or greater than 999999999 and is not equal to
+.Dv UTIME_NOW
+or
+.Dv UTIME_OMIT .
 .It Bq Er EIO
 An I/O error occurred while reading or writing the affected inode.
 .It Bq Er EPERM

From owner-svn-src-all@freebsd.org  Thu Jan 21 21:20:13 2016
Return-Path: <owner-svn-src-all@freebsd.org>
Delivered-To: svn-src-all@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id 178D4A8CDFB;
 Thu, 21 Jan 2016 21:20:13 +0000 (UTC)
 (envelope-from antoine.brodin.freebsd@gmail.com)
Received: from mail-io0-x233.google.com (mail-io0-x233.google.com
 [IPv6:2607:f8b0:4001:c06::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 D517319C1;
 Thu, 21 Jan 2016 21:20:12 +0000 (UTC)
 (envelope-from antoine.brodin.freebsd@gmail.com)
Received: by mail-io0-x233.google.com with SMTP id 1so68211161ion.1;
 Thu, 21 Jan 2016 13:20:12 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;
 h=mime-version:sender:in-reply-to:references:date:message-id:subject
 :from:to:cc:content-type;
 bh=ej1R1J7if13357xJqDCYx+XIhz3VaklA1YBR5skMlbo=;
 b=MoP39TLTaWsXvmrM+4juMaCliz6mcR/pKovTUygnhi19mkofJaTz3d5pMViV08Gp3a
 DOPtw/Tx4H3frOTfat1D6fX4ExwdSrX5hwi9v/Nx8MFrt5xbmiavWa/dBgLBYEHzcYiR
 ZXIIkMRsh2iY9BsCGMq0TuEWgPWOqNpoKrooDhS4OI8VWpCTsRJiqwZnYD8v6doPVO3P
 DTXT1Sa7VqqgfEwTZBGG/jut/Yq+MTNIsnN6ulGLFRuukojU6wzeKLhB6nA6Vbjs47jK
 1AOH9mrBoVRoQ9hVMNluwPZnzRuJjD9dHvV/GvfR/QQGJkihVvVIdhWg2EL4PV4eFuuc
 bk2w==
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:date
 :message-id:subject:from:to:cc:content-type;
 bh=ej1R1J7if13357xJqDCYx+XIhz3VaklA1YBR5skMlbo=;
 b=I/BYVb4g3HOTIbWdoiyq5mUIixYBalcXV8pRRSqMj3Y/05M09KostGJT7SW3rSwrlx
 gI5hf3U2JIfIglbYL2yx93ahbW01mHEWMjDO1LMlyPQ81TffRVWjYV6r3R1qudXCu6Ls
 Kkg5R6LDx3OPkgXnMce56pAVdSBuPTz0KHxTm1MhF3nw6e73oFNAE0s/riTvKZL30Vex
 H9ymnhlL6TuCpiP7uBOs/RW77InKJ3LqSvYAgAfvR8kJDhB/Ef9GVzFNcpAazPJPG7GS
 4dDVLLcy6wsBiNalup3kaCNWTvdw87tBbDDjIB9CcQ8/5hOt32Nna60Z3x/jDWNDQaRH
 PhTw==
X-Gm-Message-State: AG10YOTrTnu/G9YRRZp81KG2FhLwAYk78hSlhKZ+q/xWd9bG2a8P+w8C6kMlUW+0o8jnd2MItZhxGJn7g2xpSA==
MIME-Version: 1.0
X-Received: by 10.107.47.20 with SMTP id j20mr32648ioo.168.1453411212280; Thu,
 21 Jan 2016 13:20:12 -0800 (PST)
Sender: antoine.brodin.freebsd@gmail.com
Received: by 10.107.159.195 with HTTP; Thu, 21 Jan 2016 13:20:12 -0800 (PST)
In-Reply-To: <201601202326.u0KNQZwL066141@repo.freebsd.org>
References: <201601202326.u0KNQZwL066141@repo.freebsd.org>
Date: Thu, 21 Jan 2016 22:20:12 +0100
X-Google-Sender-Auth: bDwzTdRhu7L8T-FOV3lznfg-9UQ
Message-ID: <CAALwa8=2EaP9hGY3TkoF41Rs0XG6SLDSQz7efcEgixV7Z2CH9Q@mail.gmail.com>
Subject: Re: svn commit: r294470 - head/libexec/rtld-elf
From: Antoine Brodin <antoine@FreeBSD.org>
To: Alexander Kabaev <kan@freebsd.org>
Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, 
 svn-src-head@freebsd.org
Content-Type: text/plain; charset=UTF-8
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.20
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for &quot;
 user&quot; and &quot; projects&quot; \)" <svn-src-all.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-all/>
List-Post: <mailto:svn-src-all@freebsd.org>
List-Help: <mailto:svn-src-all-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Thu, 21 Jan 2016 21:20:13 -0000

On Thu, Jan 21, 2016 at 12:26 AM, Alexander Kabaev <kan@freebsd.org> wrote:
> Author: kan
> Date: Wed Jan 20 23:26:35 2016
> New Revision: 294470
> URL: https://svnweb.freebsd.org/changeset/base/294470
>
> Log:
>   Fix initlist_add_object invocation parameters.
>
>   The tail parameter should point to the last object for
>   which dependencies should be processed. In most cases,
>   this is the object itself.
>
> Modified:
>   head/libexec/rtld-elf/rtld.c

Hi,

It seems there are still some hangs after this fix  (seen on the -head
package builders,  tar -xf hanging for instance).

Cheers,

Antoine

From owner-svn-src-all@freebsd.org  Thu Jan 21 22:24:22 2016
Return-Path: <owner-svn-src-all@freebsd.org>
Delivered-To: svn-src-all@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id E649FA8C1EE;
 Thu, 21 Jan 2016 22:24:22 +0000 (UTC)
 (envelope-from glebius@FreeBSD.org)
Received: from repo.freebsd.org (repo.freebsd.org
 [IPv6:2610:1c1:1:6068::e6a:0])
 (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
 (Client did not present a certificate)
 by mx1.freebsd.org (Postfix) with ESMTPS id A84C41C22;
 Thu, 21 Jan 2016 22:24:22 +0000 (UTC)
 (envelope-from glebius@FreeBSD.org)
Received: from repo.freebsd.org ([127.0.1.37])
 by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u0LMOLTa006912;
 Thu, 21 Jan 2016 22:24:21 GMT (envelope-from glebius@FreeBSD.org)
Received: (from glebius@localhost)
 by repo.freebsd.org (8.15.2/8.15.2/Submit) id u0LMOKUZ006904;
 Thu, 21 Jan 2016 22:24:20 GMT (envelope-from glebius@FreeBSD.org)
Message-Id: <201601212224.u0LMOKUZ006904@repo.freebsd.org>
X-Authentication-Warning: repo.freebsd.org: glebius set sender to
 glebius@FreeBSD.org using -f
From: Gleb Smirnoff <glebius@FreeBSD.org>
Date: Thu, 21 Jan 2016 22:24:20 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-head@freebsd.org
Subject: svn commit: r294534 - in head/sys/netinet: . cc tcp_stacks
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.20
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for &quot;
 user&quot; and &quot; projects&quot; \)" <svn-src-all.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-all/>
List-Post: <mailto:svn-src-all@freebsd.org>
List-Help: <mailto:svn-src-all-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Thu, 21 Jan 2016 22:24:23 -0000

Author: glebius
Date: Thu Jan 21 22:24:20 2016
New Revision: 294534
URL: https://svnweb.freebsd.org/changeset/base/294534

Log:
  Cleanup TCP files from unnecessary interface related includes.

Modified:
  head/sys/netinet/cc/cc.c
  head/sys/netinet/cc/cc_cdg.c
  head/sys/netinet/cc/cc_chd.c
  head/sys/netinet/cc/cc_dctcp.c
  head/sys/netinet/cc/cc_hd.c
  head/sys/netinet/cc/cc_vegas.c
  head/sys/netinet/tcp_input.c
  head/sys/netinet/tcp_stacks/fastpath.c

Modified: head/sys/netinet/cc/cc.c
==============================================================================
--- head/sys/netinet/cc/cc.c	Thu Jan 21 21:42:06 2016	(r294533)
+++ head/sys/netinet/cc/cc.c	Thu Jan 21 22:24:20 2016	(r294534)
@@ -63,8 +63,7 @@ __FBSDID("$FreeBSD$");
 #include <sys/socketvar.h>
 #include <sys/sysctl.h>
 
-#include <net/if.h>
-#include <net/if_var.h>
+#include <net/vnet.h>
 
 #include <netinet/cc.h>
 #include <netinet/in.h>

Modified: head/sys/netinet/cc/cc_cdg.c
==============================================================================
--- head/sys/netinet/cc/cc_cdg.c	Thu Jan 21 21:42:06 2016	(r294533)
+++ head/sys/netinet/cc/cc_cdg.c	Thu Jan 21 22:24:20 2016	(r294534)
@@ -63,7 +63,6 @@ __FBSDID("$FreeBSD$");
 #include <sys/sysctl.h>
 #include <sys/systm.h>
 
-#include <net/if.h>
 #include <net/vnet.h>
 
 #include <netinet/cc.h>

Modified: head/sys/netinet/cc/cc_chd.c
==============================================================================
--- head/sys/netinet/cc/cc_chd.c	Thu Jan 21 21:42:06 2016	(r294533)
+++ head/sys/netinet/cc/cc_chd.c	Thu Jan 21 22:24:20 2016	(r294534)
@@ -65,7 +65,6 @@ __FBSDID("$FreeBSD$");
 #include <sys/sysctl.h>
 #include <sys/systm.h>
 
-#include <net/if.h>
 #include <net/vnet.h>
 
 #include <netinet/cc.h>

Modified: head/sys/netinet/cc/cc_dctcp.c
==============================================================================
--- head/sys/netinet/cc/cc_dctcp.c	Thu Jan 21 21:42:06 2016	(r294533)
+++ head/sys/netinet/cc/cc_dctcp.c	Thu Jan 21 22:24:20 2016	(r294534)
@@ -50,8 +50,6 @@ __FBSDID("$FreeBSD$");
 
 #include <net/vnet.h>
 
-#include <netinet/in.h>
-#include <netinet/ip.h>
 #include <netinet/cc.h>
 #include <netinet/tcp_seq.h>
 #include <netinet/tcp_var.h>

Modified: head/sys/netinet/cc/cc_hd.c
==============================================================================
--- head/sys/netinet/cc/cc_hd.c	Thu Jan 21 21:42:06 2016	(r294533)
+++ head/sys/netinet/cc/cc_hd.c	Thu Jan 21 22:24:20 2016	(r294534)
@@ -66,7 +66,6 @@ __FBSDID("$FreeBSD$");
 #include <sys/sysctl.h>
 #include <sys/systm.h>
 
-#include <net/if.h>
 #include <net/vnet.h>
 
 #include <netinet/cc.h>

Modified: head/sys/netinet/cc/cc_vegas.c
==============================================================================
--- head/sys/netinet/cc/cc_vegas.c	Thu Jan 21 21:42:06 2016	(r294533)
+++ head/sys/netinet/cc/cc_vegas.c	Thu Jan 21 22:24:20 2016	(r294534)
@@ -67,7 +67,6 @@ __FBSDID("$FreeBSD$");
 #include <sys/sysctl.h>
 #include <sys/systm.h>
 
-#include <net/if.h>
 #include <net/vnet.h>
 
 #include <netinet/cc.h>

Modified: head/sys/netinet/tcp_input.c
==============================================================================
--- head/sys/netinet/tcp_input.c	Thu Jan 21 21:42:06 2016	(r294533)
+++ head/sys/netinet/tcp_input.c	Thu Jan 21 22:24:20 2016	(r294534)
@@ -87,7 +87,6 @@ __FBSDID("$FreeBSD$");
 #include <netinet/in_kdtrace.h>
 #include <netinet/in_pcb.h>
 #include <netinet/in_systm.h>
-#include <netinet/in_var.h>
 #include <netinet/ip.h>
 #include <netinet/ip_icmp.h>	/* required for icmp_var.h */
 #include <netinet/icmp_var.h>	/* for ICMP_BANDLIM */
@@ -96,6 +95,7 @@ __FBSDID("$FreeBSD$");
 #include <netinet/ip6.h>
 #include <netinet/icmp6.h>
 #include <netinet6/in6_pcb.h>
+#include <netinet6/in6_var.h>
 #include <netinet6/ip6_var.h>
 #include <netinet6/nd6.h>
 #ifdef TCP_RFC7413

Modified: head/sys/netinet/tcp_stacks/fastpath.c
==============================================================================
--- head/sys/netinet/tcp_stacks/fastpath.c	Thu Jan 21 21:42:06 2016	(r294533)
+++ head/sys/netinet/tcp_stacks/fastpath.c	Thu Jan 21 22:24:20 2016	(r294534)
@@ -81,8 +81,6 @@ __FBSDID("$FreeBSD$");
 
 #include <vm/uma.h>
 
-#include <net/if.h>
-#include <net/if_var.h>
 #include <net/route.h>
 #include <net/vnet.h>
 
@@ -93,7 +91,6 @@ __FBSDID("$FreeBSD$");
 #include <netinet/in_kdtrace.h>
 #include <netinet/in_pcb.h>
 #include <netinet/in_systm.h>
-#include <netinet/in_var.h>
 #include <netinet/ip.h>
 #include <netinet/ip_icmp.h>	/* required for icmp_var.h */
 #include <netinet/icmp_var.h>	/* for ICMP_BANDLIM */
@@ -103,7 +100,6 @@ __FBSDID("$FreeBSD$");
 #include <netinet/icmp6.h>
 #include <netinet6/in6_pcb.h>
 #include <netinet6/ip6_var.h>
-#include <netinet6/nd6.h>
 #include <netinet/tcp_fsm.h>
 #include <netinet/tcp_seq.h>
 #include <netinet/tcp_timer.h>

From owner-svn-src-all@freebsd.org  Thu Jan 21 22:34:54 2016
Return-Path: <owner-svn-src-all@freebsd.org>
Delivered-To: svn-src-all@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id 151BEA8C6A5;
 Thu, 21 Jan 2016 22:34:54 +0000 (UTC)
 (envelope-from glebius@FreeBSD.org)
Received: from repo.freebsd.org (repo.freebsd.org
 [IPv6:2610:1c1:1:6068::e6a:0])
 (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
 (Client did not present a certificate)
 by mx1.freebsd.org (Postfix) with ESMTPS id E5B161293;
 Thu, 21 Jan 2016 22:34:53 +0000 (UTC)
 (envelope-from glebius@FreeBSD.org)
Received: from repo.freebsd.org ([127.0.1.37])
 by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u0LMYqkI009964;
 Thu, 21 Jan 2016 22:34:52 GMT (envelope-from glebius@FreeBSD.org)
Received: (from glebius@localhost)
 by repo.freebsd.org (8.15.2/8.15.2/Submit) id u0LMYpKT009948;
 Thu, 21 Jan 2016 22:34:51 GMT (envelope-from glebius@FreeBSD.org)
Message-Id: <201601212234.u0LMYpKT009948@repo.freebsd.org>
X-Authentication-Warning: repo.freebsd.org: glebius set sender to
 glebius@FreeBSD.org using -f
From: Gleb Smirnoff <glebius@FreeBSD.org>
Date: Thu, 21 Jan 2016 22:34:51 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-head@freebsd.org
Subject: svn commit: r294535 - in head/sys/netinet: . cc tcp_stacks
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.20
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for &quot;
 user&quot; and &quot; projects&quot; \)" <svn-src-all.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-all/>
List-Post: <mailto:svn-src-all@freebsd.org>
List-Help: <mailto:svn-src-all-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Thu, 21 Jan 2016 22:34:54 -0000

Author: glebius
Date: Thu Jan 21 22:34:51 2016
New Revision: 294535
URL: https://svnweb.freebsd.org/changeset/base/294535

Log:
  - Rename cc.h to more meaningful tcp_cc.h.
  - Declare it a kernel only include, which it already is.
  - Don't include tcp.h implicitly from tcp_cc.h

Added:
  head/sys/netinet/tcp_cc.h
     - copied, changed from r294534, head/sys/netinet/cc.h
Deleted:
  head/sys/netinet/cc.h
Modified:
  head/sys/netinet/cc/cc.c
  head/sys/netinet/cc/cc_cdg.c
  head/sys/netinet/cc/cc_chd.c
  head/sys/netinet/cc/cc_cubic.c
  head/sys/netinet/cc/cc_dctcp.c
  head/sys/netinet/cc/cc_hd.c
  head/sys/netinet/cc/cc_htcp.c
  head/sys/netinet/cc/cc_newreno.c
  head/sys/netinet/cc/cc_vegas.c
  head/sys/netinet/tcp_input.c
  head/sys/netinet/tcp_output.c
  head/sys/netinet/tcp_stacks/fastpath.c
  head/sys/netinet/tcp_subr.c
  head/sys/netinet/tcp_timer.c
  head/sys/netinet/tcp_usrreq.c

Modified: head/sys/netinet/cc/cc.c
==============================================================================
--- head/sys/netinet/cc/cc.c	Thu Jan 21 22:24:20 2016	(r294534)
+++ head/sys/netinet/cc/cc.c	Thu Jan 21 22:34:51 2016	(r294535)
@@ -65,10 +65,11 @@ __FBSDID("$FreeBSD$");
 
 #include <net/vnet.h>
 
-#include <netinet/cc.h>
 #include <netinet/in.h>
 #include <netinet/in_pcb.h>
+#include <netinet/tcp.h>
 #include <netinet/tcp_var.h>
+#include <netinet/tcp_cc.h>
 
 #include <netinet/cc/cc_module.h>
 

Modified: head/sys/netinet/cc/cc_cdg.c
==============================================================================
--- head/sys/netinet/cc/cc_cdg.c	Thu Jan 21 22:24:20 2016	(r294534)
+++ head/sys/netinet/cc/cc_cdg.c	Thu Jan 21 22:34:51 2016	(r294535)
@@ -65,11 +65,11 @@ __FBSDID("$FreeBSD$");
 
 #include <net/vnet.h>
 
-#include <netinet/cc.h>
+#include <netinet/tcp.h>
 #include <netinet/tcp_seq.h>
 #include <netinet/tcp_timer.h>
 #include <netinet/tcp_var.h>
-
+#include <netinet/tcp_cc.h>
 #include <netinet/cc/cc_module.h>
 
 #include <netinet/khelp/h_ertt.h>

Modified: head/sys/netinet/cc/cc_chd.c
==============================================================================
--- head/sys/netinet/cc/cc_chd.c	Thu Jan 21 22:24:20 2016	(r294534)
+++ head/sys/netinet/cc/cc_chd.c	Thu Jan 21 22:34:51 2016	(r294535)
@@ -67,11 +67,11 @@ __FBSDID("$FreeBSD$");
 
 #include <net/vnet.h>
 
-#include <netinet/cc.h>
+#include <netinet/tcp.h>
 #include <netinet/tcp_seq.h>
 #include <netinet/tcp_timer.h>
 #include <netinet/tcp_var.h>
-
+#include <netinet/tcp_cc.h>
 #include <netinet/cc/cc_module.h>
 
 #include <netinet/khelp/h_ertt.h>

Modified: head/sys/netinet/cc/cc_cubic.c
==============================================================================
--- head/sys/netinet/cc/cc_cubic.c	Thu Jan 21 22:24:20 2016	(r294534)
+++ head/sys/netinet/cc/cc_cubic.c	Thu Jan 21 22:34:51 2016	(r294535)
@@ -59,11 +59,11 @@ __FBSDID("$FreeBSD$");
 
 #include <net/vnet.h>
 
-#include <netinet/cc.h>
+#include <netinet/tcp.h>
 #include <netinet/tcp_seq.h>
 #include <netinet/tcp_timer.h>
 #include <netinet/tcp_var.h>
-
+#include <netinet/tcp_cc.h>
 #include <netinet/cc/cc_cubic.h>
 #include <netinet/cc/cc_module.h>
 

Modified: head/sys/netinet/cc/cc_dctcp.c
==============================================================================
--- head/sys/netinet/cc/cc_dctcp.c	Thu Jan 21 22:24:20 2016	(r294534)
+++ head/sys/netinet/cc/cc_dctcp.c	Thu Jan 21 22:34:51 2016	(r294535)
@@ -50,10 +50,10 @@ __FBSDID("$FreeBSD$");
 
 #include <net/vnet.h>
 
-#include <netinet/cc.h>
+#include <netinet/tcp.h>
 #include <netinet/tcp_seq.h>
 #include <netinet/tcp_var.h>
-
+#include <netinet/tcp_cc.h>
 #include <netinet/cc/cc_module.h>
 
 #define	CAST_PTR_INT(X)	(*((int*)(X)))

Modified: head/sys/netinet/cc/cc_hd.c
==============================================================================
--- head/sys/netinet/cc/cc_hd.c	Thu Jan 21 22:24:20 2016	(r294534)
+++ head/sys/netinet/cc/cc_hd.c	Thu Jan 21 22:34:51 2016	(r294535)
@@ -68,11 +68,11 @@ __FBSDID("$FreeBSD$");
 
 #include <net/vnet.h>
 
-#include <netinet/cc.h>
+#include <netinet/tcp.h>
 #include <netinet/tcp_seq.h>
 #include <netinet/tcp_timer.h>
 #include <netinet/tcp_var.h>
-
+#include <netinet/tcp_cc.h>
 #include <netinet/cc/cc_module.h>
 
 #include <netinet/khelp/h_ertt.h>

Modified: head/sys/netinet/cc/cc_htcp.c
==============================================================================
--- head/sys/netinet/cc/cc_htcp.c	Thu Jan 21 22:24:20 2016	(r294534)
+++ head/sys/netinet/cc/cc_htcp.c	Thu Jan 21 22:34:51 2016	(r294535)
@@ -62,11 +62,11 @@ __FBSDID("$FreeBSD$");
 
 #include <net/vnet.h>
 
-#include <netinet/cc.h>
+#include <netinet/tcp.h>
 #include <netinet/tcp_seq.h>
 #include <netinet/tcp_timer.h>
 #include <netinet/tcp_var.h>
-
+#include <netinet/tcp_cc.h>
 #include <netinet/cc/cc_module.h>
 
 /* Fixed point math shifts. */

Modified: head/sys/netinet/cc/cc_newreno.c
==============================================================================
--- head/sys/netinet/cc/cc_newreno.c	Thu Jan 21 22:24:20 2016	(r294534)
+++ head/sys/netinet/cc/cc_newreno.c	Thu Jan 21 22:34:51 2016	(r294535)
@@ -62,10 +62,10 @@ __FBSDID("$FreeBSD$");
 
 #include <net/vnet.h>
 
-#include <netinet/cc.h>
+#include <netinet/tcp.h>
 #include <netinet/tcp_seq.h>
 #include <netinet/tcp_var.h>
-
+#include <netinet/tcp_cc.h>
 #include <netinet/cc/cc_module.h>
 
 static void	newreno_ack_received(struct cc_var *ccv, uint16_t type);

Modified: head/sys/netinet/cc/cc_vegas.c
==============================================================================
--- head/sys/netinet/cc/cc_vegas.c	Thu Jan 21 22:24:20 2016	(r294534)
+++ head/sys/netinet/cc/cc_vegas.c	Thu Jan 21 22:34:51 2016	(r294535)
@@ -69,11 +69,10 @@ __FBSDID("$FreeBSD$");
 
 #include <net/vnet.h>
 
-#include <netinet/cc.h>
-#include <netinet/tcp_seq.h>
+#include <netinet/tcp.h>
 #include <netinet/tcp_timer.h>
 #include <netinet/tcp_var.h>
-
+#include <netinet/tcp_cc.h>
 #include <netinet/cc/cc_module.h>
 
 #include <netinet/khelp/h_ertt.h>

Copied and modified: head/sys/netinet/tcp_cc.h (from r294534, head/sys/netinet/cc.h)
==============================================================================
--- head/sys/netinet/cc.h	Thu Jan 21 22:24:20 2016	(r294534, copy source)
+++ head/sys/netinet/tcp_cc.h	Thu Jan 21 22:34:51 2016	(r294535)
@@ -48,11 +48,12 @@
  *   http://caia.swin.edu.au/urp/newtcp/
  */
 
-#ifndef _NETINET_CC_H_
-#define _NETINET_CC_H_
+#ifndef _NETINET_TCP_CC_H_
+#define _NETINET_TCP_CC_H_
 
-/* XXX: TCP_CA_NAME_MAX define lives in tcp.h for compat reasons. */
-#include <netinet/tcp.h>
+#if !defined(_KERNEL)
+#error "no user-servicable parts inside"
+#endif
 
 /* Global CC vars. */
 extern STAILQ_HEAD(cc_head, cc_algo) cc_list;
@@ -171,4 +172,4 @@ extern struct rwlock cc_list_lock;
 #define	CC_LIST_WUNLOCK()	rw_wunlock(&cc_list_lock)
 #define	CC_LIST_LOCK_ASSERT()	rw_assert(&cc_list_lock, RA_LOCKED)
 
-#endif /* _NETINET_CC_H_ */
+#endif /* _NETINET_TCP_CC_H_ */

Modified: head/sys/netinet/tcp_input.c
==============================================================================
--- head/sys/netinet/tcp_input.c	Thu Jan 21 22:24:20 2016	(r294534)
+++ head/sys/netinet/tcp_input.c	Thu Jan 21 22:34:51 2016	(r294535)
@@ -82,7 +82,6 @@ __FBSDID("$FreeBSD$");
 
 #define TCPSTATES		/* for logging */
 
-#include <netinet/cc.h>
 #include <netinet/in.h>
 #include <netinet/in_kdtrace.h>
 #include <netinet/in_pcb.h>
@@ -101,12 +100,14 @@ __FBSDID("$FreeBSD$");
 #ifdef TCP_RFC7413
 #include <netinet/tcp_fastopen.h>
 #endif
+#include <netinet/tcp.h>
 #include <netinet/tcp_fsm.h>
 #include <netinet/tcp_seq.h>
 #include <netinet/tcp_timer.h>
 #include <netinet/tcp_var.h>
 #include <netinet6/tcp6_var.h>
 #include <netinet/tcpip.h>
+#include <netinet/tcp_cc.h>
 #ifdef TCPPCAP
 #include <netinet/tcp_pcap.h>
 #endif

Modified: head/sys/netinet/tcp_output.c
==============================================================================
--- head/sys/netinet/tcp_output.c	Thu Jan 21 22:24:20 2016	(r294534)
+++ head/sys/netinet/tcp_output.c	Thu Jan 21 22:34:51 2016	(r294535)
@@ -55,7 +55,6 @@ __FBSDID("$FreeBSD$");
 #include <net/route.h>
 #include <net/vnet.h>
 
-#include <netinet/cc.h>
 #include <netinet/in.h>
 #include <netinet/in_kdtrace.h>
 #include <netinet/in_systm.h>
@@ -71,12 +70,14 @@ __FBSDID("$FreeBSD$");
 #ifdef TCP_RFC7413
 #include <netinet/tcp_fastopen.h>
 #endif
+#include <netinet/tcp.h>
 #define	TCPOUTFLAGS
 #include <netinet/tcp_fsm.h>
 #include <netinet/tcp_seq.h>
 #include <netinet/tcp_timer.h>
 #include <netinet/tcp_var.h>
 #include <netinet/tcpip.h>
+#include <netinet/tcp_cc.h>
 #ifdef TCPPCAP
 #include <netinet/tcp_pcap.h>
 #endif

Modified: head/sys/netinet/tcp_stacks/fastpath.c
==============================================================================
--- head/sys/netinet/tcp_stacks/fastpath.c	Thu Jan 21 22:24:20 2016	(r294534)
+++ head/sys/netinet/tcp_stacks/fastpath.c	Thu Jan 21 22:34:51 2016	(r294535)
@@ -86,7 +86,6 @@ __FBSDID("$FreeBSD$");
 
 #define TCPSTATES		/* for logging */
 
-#include <netinet/cc.h>
 #include <netinet/in.h>
 #include <netinet/in_kdtrace.h>
 #include <netinet/in_pcb.h>
@@ -100,6 +99,7 @@ __FBSDID("$FreeBSD$");
 #include <netinet/icmp6.h>
 #include <netinet6/in6_pcb.h>
 #include <netinet6/ip6_var.h>
+#include <netinet/tcp.h>
 #include <netinet/tcp_fsm.h>
 #include <netinet/tcp_seq.h>
 #include <netinet/tcp_timer.h>
@@ -107,6 +107,7 @@ __FBSDID("$FreeBSD$");
 #include <netinet6/tcp6_var.h>
 #include <netinet/tcpip.h>
 #include <netinet/tcp_syncache.h>
+#include <netinet/tcp_cc.h>
 #ifdef TCPDEBUG
 #include <netinet/tcp_debug.h>
 #endif /* TCPDEBUG */

Modified: head/sys/netinet/tcp_subr.c
==============================================================================
--- head/sys/netinet/tcp_subr.c	Thu Jan 21 22:24:20 2016	(r294534)
+++ head/sys/netinet/tcp_subr.c	Thu Jan 21 22:34:51 2016	(r294535)
@@ -68,7 +68,6 @@ __FBSDID("$FreeBSD$");
 #include <net/if_var.h>
 #include <net/vnet.h>
 
-#include <netinet/cc.h>
 #include <netinet/in.h>
 #include <netinet/in_kdtrace.h>
 #include <netinet/in_pcb.h>
@@ -88,11 +87,13 @@ __FBSDID("$FreeBSD$");
 #ifdef TCP_RFC7413
 #include <netinet/tcp_fastopen.h>
 #endif
+#include <netinet/tcp.h>
 #include <netinet/tcp_fsm.h>
 #include <netinet/tcp_seq.h>
 #include <netinet/tcp_timer.h>
 #include <netinet/tcp_var.h>
 #include <netinet/tcp_syncache.h>
+#include <netinet/tcp_cc.h>
 #ifdef INET6
 #include <netinet6/tcp6_var.h>
 #endif

Modified: head/sys/netinet/tcp_timer.c
==============================================================================
--- head/sys/netinet/tcp_timer.c	Thu Jan 21 22:24:20 2016	(r294534)
+++ head/sys/netinet/tcp_timer.c	Thu Jan 21 22:34:51 2016	(r294535)
@@ -55,7 +55,6 @@ __FBSDID("$FreeBSD$");
 #include <net/vnet.h>
 #include <net/netisr.h>
 
-#include <netinet/cc.h>
 #include <netinet/in.h>
 #include <netinet/in_kdtrace.h>
 #include <netinet/in_pcb.h>
@@ -65,9 +64,11 @@ __FBSDID("$FreeBSD$");
 #include <netinet6/in6_pcb.h>
 #endif
 #include <netinet/ip_var.h>
+#include <netinet/tcp.h>
 #include <netinet/tcp_fsm.h>
 #include <netinet/tcp_timer.h>
 #include <netinet/tcp_var.h>
+#include <netinet/tcp_cc.h>
 #ifdef INET6
 #include <netinet6/tcp6_var.h>
 #endif

Modified: head/sys/netinet/tcp_usrreq.c
==============================================================================
--- head/sys/netinet/tcp_usrreq.c	Thu Jan 21 22:24:20 2016	(r294534)
+++ head/sys/netinet/tcp_usrreq.c	Thu Jan 21 22:34:51 2016	(r294535)
@@ -69,7 +69,6 @@ __FBSDID("$FreeBSD$");
 #include <net/route.h>
 #include <net/vnet.h>
 
-#include <netinet/cc.h>
 #include <netinet/in.h>
 #include <netinet/in_kdtrace.h>
 #include <netinet/in_pcb.h>
@@ -85,11 +84,13 @@ __FBSDID("$FreeBSD$");
 #ifdef TCP_RFC7413
 #include <netinet/tcp_fastopen.h>
 #endif
+#include <netinet/tcp.h>
 #include <netinet/tcp_fsm.h>
 #include <netinet/tcp_seq.h>
 #include <netinet/tcp_timer.h>
 #include <netinet/tcp_var.h>
 #include <netinet/tcpip.h>
+#include <netinet/tcp_cc.h>
 #ifdef TCPPCAP
 #include <netinet/tcp_pcap.h>
 #endif

From owner-svn-src-all@freebsd.org  Thu Jan 21 22:53:13 2016
Return-Path: <owner-svn-src-all@freebsd.org>
Delivered-To: svn-src-all@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id A9A96A8CCB0;
 Thu, 21 Jan 2016 22:53:13 +0000 (UTC)
 (envelope-from glebius@FreeBSD.org)
Received: from repo.freebsd.org (repo.freebsd.org
 [IPv6:2610:1c1:1:6068::e6a:0])
 (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
 (Client did not present a certificate)
 by mx1.freebsd.org (Postfix) with ESMTPS id 852C71F05;
 Thu, 21 Jan 2016 22:53:13 +0000 (UTC)
 (envelope-from glebius@FreeBSD.org)
Received: from repo.freebsd.org ([127.0.1.37])
 by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u0LMrCwo016137;
 Thu, 21 Jan 2016 22:53:12 GMT (envelope-from glebius@FreeBSD.org)
Received: (from glebius@localhost)
 by repo.freebsd.org (8.15.2/8.15.2/Submit) id u0LMrC7B016136;
 Thu, 21 Jan 2016 22:53:12 GMT (envelope-from glebius@FreeBSD.org)
Message-Id: <201601212253.u0LMrC7B016136@repo.freebsd.org>
X-Authentication-Warning: repo.freebsd.org: glebius set sender to
 glebius@FreeBSD.org using -f
From: Gleb Smirnoff <glebius@FreeBSD.org>
Date: Thu, 21 Jan 2016 22:53:12 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-head@freebsd.org
Subject: svn commit: r294536 - head/sys/netinet
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.20
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for &quot;
 user&quot; and &quot; projects&quot; \)" <svn-src-all.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-all/>
List-Post: <mailto:svn-src-all@freebsd.org>
List-Help: <mailto:svn-src-all-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Thu, 21 Jan 2016 22:53:13 -0000

Author: glebius
Date: Thu Jan 21 22:53:12 2016
New Revision: 294536
URL: https://svnweb.freebsd.org/changeset/base/294536

Log:
  Refactor TCP_CONGESTION setsockopt handling:
  - Use M_TEMP instead of stack variable.
  - Unroll error handling, removing several levels of indentation.

Modified:
  head/sys/netinet/tcp_usrreq.c

Modified: head/sys/netinet/tcp_usrreq.c
==============================================================================
--- head/sys/netinet/tcp_usrreq.c	Thu Jan 21 22:34:51 2016	(r294535)
+++ head/sys/netinet/tcp_usrreq.c	Thu Jan 21 22:53:12 2016	(r294536)
@@ -1479,7 +1479,7 @@ tcp_default_ctloutput(struct socket *so,
 	u_int	ui;
 	struct	tcp_info ti;
 	struct cc_algo *algo;
-	char buf[TCP_CA_NAME_MAX];
+	char	*buf;
 	
 	switch (sopt->sopt_dir) {
 	case SOPT_SET:
@@ -1574,50 +1574,47 @@ unlock_and_done:
 
 		case TCP_CONGESTION:
 			INP_WUNLOCK(inp);
-			bzero(buf, sizeof(buf));
-			error = sooptcopyin(sopt, &buf, sizeof(buf), 1);
-			if (error)
+			buf = malloc(TCP_CA_NAME_MAX, M_TEMP, M_WAITOK|M_ZERO);
+			error = sooptcopyin(sopt, buf, TCP_CA_NAME_MAX, 1);
+			if (error) {
+				free(buf, M_TEMP);
 				break;
+			}
+			CC_LIST_RLOCK();
+			STAILQ_FOREACH(algo, &cc_list, entries)
+				if (strncmp(buf, algo->name,
+				    TCP_CA_NAME_MAX) == 0)
+					break;
+			CC_LIST_RUNLOCK();
+			free(buf, M_TEMP);
+			if (algo == NULL) {
+				error = EINVAL;
+				break;
+			}
 			INP_WLOCK_RECHECK(inp);
 			/*
-			 * Return EINVAL if we can't find the requested cc algo.
+			 * We hold a write lock over the tcb so it's safe to
+			 * do these things without ordering concerns.
 			 */
-			error = EINVAL;
-			CC_LIST_RLOCK();
-			STAILQ_FOREACH(algo, &cc_list, entries) {
-				if (strncmp(buf, algo->name, TCP_CA_NAME_MAX)
-				    == 0) {
-					/* We've found the requested algo. */
-					error = 0;
-					/*
-					 * We hold a write lock over the tcb
-					 * so it's safe to do these things
-					 * without ordering concerns.
-					 */
-					if (CC_ALGO(tp)->cb_destroy != NULL)
-						CC_ALGO(tp)->cb_destroy(tp->ccv);
-					CC_ALGO(tp) = algo;
-					/*
-					 * If something goes pear shaped
-					 * initialising the new algo,
-					 * fall back to newreno (which
-					 * does not require initialisation).
-					 */
-					if (algo->cb_init != NULL)
-						if (algo->cb_init(tp->ccv) > 0) {
-							CC_ALGO(tp) = &newreno_cc_algo;
-							/*
-							 * The only reason init
-							 * should fail is
-							 * because of malloc.
-							 */
-							error = ENOMEM;
-						}
-					break; /* Break the STAILQ_FOREACH. */
-				}
+			if (CC_ALGO(tp)->cb_destroy != NULL)
+				CC_ALGO(tp)->cb_destroy(tp->ccv);
+			CC_ALGO(tp) = algo;
+			/*
+			 * If something goes pear shaped initialising the new
+			 * algo, fall back to newreno (which does not
+			 * require initialisation).
+			 */
+			if (algo->cb_init != NULL &&
+			    algo->cb_init(tp->ccv) != 0) {
+				CC_ALGO(tp) = &newreno_cc_algo;
+				/*
+				 * The only reason init should fail is
+				 * because of malloc.
+				 */
+				error = ENOMEM;
 			}
-			CC_LIST_RUNLOCK();
-			goto unlock_and_done;
+			INP_WUNLOCK(inp);
+			break;
 
 		case TCP_KEEPIDLE:
 		case TCP_KEEPINTVL:
@@ -1763,10 +1760,9 @@ unlock_and_done:
 			error = sooptcopyout(sopt, &ti, sizeof ti);
 			break;
 		case TCP_CONGESTION:
-			bzero(buf, sizeof(buf));
-			strlcpy(buf, CC_ALGO(tp)->name, TCP_CA_NAME_MAX);
 			INP_WUNLOCK(inp);
-			error = sooptcopyout(sopt, buf, TCP_CA_NAME_MAX);
+			error = sooptcopyout(sopt, CC_ALGO(tp)->name,
+			    TCP_CA_NAME_MAX);
 			break;
 		case TCP_KEEPIDLE:
 		case TCP_KEEPINTVL:

From owner-svn-src-all@freebsd.org  Thu Jan 21 23:37:08 2016
Return-Path: <owner-svn-src-all@freebsd.org>
Delivered-To: svn-src-all@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id E1D29A8BEAE;
 Thu, 21 Jan 2016 23:37:07 +0000 (UTC)
 (envelope-from kabaev@gmail.com)
Received: from mail-qg0-x22b.google.com (mail-qg0-x22b.google.com
 [IPv6:2607:f8b0:400d:c04::22b])
 (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits))
 (Client CN "smtp.gmail.com",
 Issuer "Google Internet Authority G2" (verified OK))
 by mx1.freebsd.org (Postfix) with ESMTPS id 9770712A1;
 Thu, 21 Jan 2016 23:37:07 +0000 (UTC)
 (envelope-from kabaev@gmail.com)
Received: by mail-qg0-x22b.google.com with SMTP id b35so45266830qge.0;
 Thu, 21 Jan 2016 15:37:07 -0800 (PST)
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:content-type;
 bh=IaP9L6vpxB26k8SiDNmYTpWLFRq4rwch6p95lDJx9M4=;
 b=ml4eSPaukDnOMkKcz+K7p0n3Cp/4n3cmEhDKNUbfbkz+GShnnh1fOAh1oRLD2fDJ00
 CAT/NzvfCueMu5HfQS98khMhzuPcBN1Ed+kiLp6RXASa6EwI5lPQvKj4M/B5NgL8oRuz
 utvroTgLh+8o+FyggIBWvH81/T2Rmc9vnEyWB7M5nSye7tcWK+vlNeA20g5o3V2SmZ5Q
 SPCjNoP4SATbKliciDen6rwQHycUEJb52CpTtsV7epeKixnF5oWJLlk0idZf3SArWa7H
 JrnagkjP63JAF7hPipAyLefA+lR2g8DYmENILu9AoEZDcnNwdE6IEty9HVKao+l6x9za
 yMVw==
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:content-type;
 bh=IaP9L6vpxB26k8SiDNmYTpWLFRq4rwch6p95lDJx9M4=;
 b=HvEat8RYMn3uHLfjLwXykYkrFdyjE3qQzHJ2Z/fUTmiSr6qlZX4fV0fOuOZ4+2fQ5U
 QRX15ICvBLzeOV/hpzcEdnq5aK+MdXbvlg5wMsgewSAQ2x1TQk5YMBMURQHDkEr0ZZo4
 ruFgFshHSEkoSbwM6ImZccQB/LpqL1BJLz++whOOuBzKCfPfVHPJJj9eFcZMEHX31b41
 YC9vdNY3SfyNDS2DIkXc1TEa0ajXB4kn7HceEz4SZEb2CAsM+YGPBWWYnRP2hi3LZInV
 64Hnr3befGkfnuSMv4nU4ae9KJlfd+tVKyhaIWJzXm91cyIQociBl6+b0s2rhzuUkWJz
 ZKgg==
X-Gm-Message-State: ALoCoQknJBCZMLzvHzKlgmt1BTUu0ROD8gdSMqNVQLnt9SwmuB6s02rBVd3mmtMNL54Gv9WJiM8y3UpYuWC9MmvhvcKjLUcF4A==
X-Received: by 10.140.19.46 with SMTP id 43mr55641692qgg.103.1453419426568;
 Thu, 21 Jan 2016 15:37:06 -0800 (PST)
Received: from kan ([2601:18f:802:4680:226:18ff:fe00:232e])
 by smtp.gmail.com with ESMTPSA id l72sm1600392qki.42.2016.01.21.15.37.05
 (version=TLSv1/SSLv3 cipher=OTHER);
 Thu, 21 Jan 2016 15:37:05 -0800 (PST)
Date: Thu, 21 Jan 2016 18:36:46 -0500
From: Alexander Kabaev <kabaev@gmail.com>
To: Antoine Brodin <antoine@FreeBSD.org>
Cc: Alexander Kabaev <kan@freebsd.org>, src-committers@freebsd.org,
 svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject: Re: svn commit: r294470 - head/libexec/rtld-elf
Message-ID: <20160121183646.6d964d54@kan>
In-Reply-To: <CAALwa8=2EaP9hGY3TkoF41Rs0XG6SLDSQz7efcEgixV7Z2CH9Q@mail.gmail.com>
References: <201601202326.u0KNQZwL066141@repo.freebsd.org>
 <CAALwa8=2EaP9hGY3TkoF41Rs0XG6SLDSQz7efcEgixV7Z2CH9Q@mail.gmail.com>
X-Mailer: Claws Mail 3.13.1 (GTK+ 2.24.29; amd64-portbld-freebsd11.0)
MIME-Version: 1.0
Content-Type: multipart/signed; micalg=pgp-sha512;
 boundary="Sig_/rEkFuL8IrGD+dPiVwjNfdFp"; protocol="application/pgp-signature"
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.20
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for &quot;
 user&quot; and &quot; projects&quot; \)" <svn-src-all.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-all/>
List-Post: <mailto:svn-src-all@freebsd.org>
List-Help: <mailto:svn-src-all-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Thu, 21 Jan 2016 23:37:08 -0000

--Sig_/rEkFuL8IrGD+dPiVwjNfdFp
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: quoted-printable

On Thu, 21 Jan 2016 22:20:12 +0100
Antoine Brodin <antoine@FreeBSD.org> wrote:

> On Thu, Jan 21, 2016 at 12:26 AM, Alexander Kabaev <kan@freebsd.org>
> wrote:
> > Author: kan
> > Date: Wed Jan 20 23:26:35 2016
> > New Revision: 294470
> > URL: https://svnweb.freebsd.org/changeset/base/294470
> >
> > Log:
> >   Fix initlist_add_object invocation parameters.
> >
> >   The tail parameter should point to the last object for
> >   which dependencies should be processed. In most cases,
> >   this is the object itself.
> >
> > Modified:
> >   head/libexec/rtld-elf/rtld.c =20
>=20
> Hi,
>=20
> It seems there are still some hangs after this fix  (seen on the -head
> package builders,  tar -xf hanging for instance).
>=20
> Cheers,
>=20
> Antoine

I've seen hangs _before_ this fix but none after. You'd have to collect
some backtraces and share with me and kib@.
 =20
--=20
Alexander Kabaev

--Sig_/rEkFuL8IrGD+dPiVwjNfdFp
Content-Type: application/pgp-signature
Content-Description: Цифровая подпись OpenPGP

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2

iQJ8BAEBCgBmBQJWoWuPXxSAAAAAAC4AKGlzc3Vlci1mcHJAbm90YXRpb25zLm9w
ZW5wZ3AuZmlmdGhob3JzZW1hbi5uZXRDNUY3RDk5NTk5QjY0MUUxM0M1MTU2OTEw
NzEzMjI5OTkyNzkyRTdFAAoJEAcTIpmSeS5+rlIQAJV/VUno1ek0ooCapOuZkWGI
HU3MA06dK/j+y//BHRCSIbCQHKbM+UkJoCDxB1llFLJLcOc7XR87EYGzxNtyOKrc
FyU2S6S+j7yvGR8iigCVpS5dsv/Xm87unoK6Jivko7us/oQ6tkATt6be5A8wVCOL
bDx8r1ltkmkG+UsivjWLnM6FtXjNri5hK2djiuaB53rInECA5Nw2LKju/hpmnTLO
PWC7JPAmrAfOu46/qJAZ+a48P3ZrpQxGce0Ft6BvvkBhP9DzspmwgYPzub0OjWGT
LfeF1rtcsCnBmtGyy1K0Mrei1B5MbS8blzVubM00vvuyqysKAWSyfMCDJiqyrTc6
GXMjZopK6DcvQ9Uarczk46sW1ZZ7IVxfIv6WhduabaIEUReWuqLB3oijUB2Zi1JI
vktLK87Ht+eoMHglUdAC0UQxKshjiLLwzsqv0iVZe8ubPJp3bREL+kRIV6FGcvgC
HeRQ8js6GkZSGGV72iC2KQ2jahuDcZTTvlwSzSmnMyrbqL7lD0xE2JqV5NS9FCq4
dzzQl4VUddEnyd71JjDA4IE+W9Yd2AtZ0bzL6MLZhLJMvIx/8GaxJvpovrTr1mSm
jL2k5G7YmD0g1X2tvfKpTtX7WQ0azl/tCpQRfnyeiKITT78FXPTOR/Tayf3J8EtI
aME8r2THMljFp4pVKf7o
=T4BJ
-----END PGP SIGNATURE-----

--Sig_/rEkFuL8IrGD+dPiVwjNfdFp--

From owner-svn-src-all@freebsd.org  Fri Jan 22 00:08:17 2016
Return-Path: <owner-svn-src-all@freebsd.org>
Delivered-To: svn-src-all@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id 75CEEA8C112;
 Fri, 22 Jan 2016 00:08:17 +0000 (UTC)
 (envelope-from brooks@FreeBSD.org)
Received: from repo.freebsd.org (repo.freebsd.org
 [IPv6:2610:1c1:1:6068::e6a:0])
 (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
 (Client did not present a certificate)
 by mx1.freebsd.org (Postfix) with ESMTPS id 444D317EB;
 Fri, 22 Jan 2016 00:08:17 +0000 (UTC)
 (envelope-from brooks@FreeBSD.org)
Received: from repo.freebsd.org ([127.0.1.37])
 by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u0M08GVm037260;
 Fri, 22 Jan 2016 00:08:16 GMT (envelope-from brooks@FreeBSD.org)
Received: (from brooks@localhost)
 by repo.freebsd.org (8.15.2/8.15.2/Submit) id u0M08Grs