From owner-svn-src-all@freebsd.org Sun Oct 11 01:31:19 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8FA61A0F2FD; Sun, 11 Oct 2015 01:31:19 +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 59E5C7B; Sun, 11 Oct 2015 01:31:19 +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 t9B1VIsP023044; Sun, 11 Oct 2015 01:31:18 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9B1VI7N023041; Sun, 11 Oct 2015 01:31:18 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201510110131.t9B1VI7N023041@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Sun, 11 Oct 2015 01:31:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289124 - head/sys/dev/wpi X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 11 Oct 2015 01:31:19 -0000 Author: adrian Date: Sun Oct 11 01:31:18 2015 New Revision: 289124 URL: https://svnweb.freebsd.org/changeset/base/289124 Log: wpi(4): use more correct types. This change fixes some amount of -Wsign-conversion and -Wconversion warnings and sets correct sizes for some variables (as a result, some loop counters were touched too). Submitted by: Differential Revision: https://reviews.freebsd.org/D3763 Modified: head/sys/dev/wpi/if_wpi.c head/sys/dev/wpi/if_wpireg.h head/sys/dev/wpi/if_wpivar.h Modified: head/sys/dev/wpi/if_wpi.c ============================================================================== --- head/sys/dev/wpi/if_wpi.c Sat Oct 10 23:31:47 2015 (r289123) +++ head/sys/dev/wpi/if_wpi.c Sun Oct 11 01:31:18 2015 (r289124) @@ -156,7 +156,7 @@ static void wpi_update_rx_ring_ps(struct static void wpi_reset_rx_ring(struct wpi_softc *); static void wpi_free_rx_ring(struct wpi_softc *); static int wpi_alloc_tx_ring(struct wpi_softc *, struct wpi_tx_ring *, - int); + uint8_t); static void wpi_update_tx_ring(struct wpi_softc *, struct wpi_tx_ring *); static void wpi_update_tx_ring_ps(struct wpi_softc *, struct wpi_tx_ring *); @@ -165,15 +165,14 @@ static void wpi_free_tx_ring(struct wpi_ static int wpi_read_eeprom(struct wpi_softc *, uint8_t macaddr[IEEE80211_ADDR_LEN]); static uint32_t wpi_eeprom_channel_flags(struct wpi_eeprom_chan *); -static void wpi_read_eeprom_band(struct wpi_softc *, int); -static int wpi_read_eeprom_channels(struct wpi_softc *, int); +static void wpi_read_eeprom_band(struct wpi_softc *, uint8_t); +static int wpi_read_eeprom_channels(struct wpi_softc *, uint8_t); static struct wpi_eeprom_chan *wpi_find_eeprom_channel(struct wpi_softc *, struct ieee80211_channel *); static int wpi_setregdomain(struct ieee80211com *, struct ieee80211_regdomain *, int, struct ieee80211_channel[]); -static int wpi_read_eeprom_group(struct wpi_softc *, int); -static int wpi_add_node_entry_adhoc(struct wpi_softc *); +static int wpi_read_eeprom_group(struct wpi_softc *, uint8_t); static struct ieee80211_node *wpi_node_alloc(struct ieee80211vap *, const uint8_t mac[IEEE80211_ADDR_LEN]); static void wpi_node_free(struct ieee80211_node *); @@ -210,7 +209,8 @@ static void wpi_watchdog_rfkill(void *); static void wpi_scan_timeout(void *); static void wpi_tx_timeout(void *); static void wpi_parent(struct ieee80211com *); -static int wpi_cmd(struct wpi_softc *, int, const void *, size_t, int); +static int wpi_cmd(struct wpi_softc *, uint8_t, const void *, uint16_t, + int); static int wpi_mrr_setup(struct wpi_softc *); static int wpi_add_node(struct wpi_softc *, struct ieee80211_node *); static int wpi_add_broadcast_node(struct wpi_softc *, int); @@ -257,7 +257,8 @@ static int wpi_key_set(struct ieee80211v static int wpi_key_delete(struct ieee80211vap *, const struct ieee80211_key *); static int wpi_post_alive(struct wpi_softc *); -static int wpi_load_bootcode(struct wpi_softc *, const uint8_t *, int); +static int wpi_load_bootcode(struct wpi_softc *, const uint8_t *, + uint32_t); static int wpi_load_firmware(struct wpi_softc *); static int wpi_read_firmware(struct wpi_softc *); static void wpi_unload_firmware(struct wpi_softc *); @@ -327,7 +328,8 @@ wpi_attach(device_t dev) { struct wpi_softc *sc = (struct wpi_softc *)device_get_softc(dev); struct ieee80211com *ic; - int i, error, rid; + uint8_t i; + int error, rid; #ifdef WPI_DEBUG int supportsa = 1; const struct wpi_ident *ident; @@ -387,10 +389,11 @@ wpi_attach(device_t dev) sc->sc_st = rman_get_bustag(sc->mem); sc->sc_sh = rman_get_bushandle(sc->mem); - i = 1; - rid = 0; - if (pci_alloc_msi(dev, &i) == 0) + rid = 1; + if (pci_alloc_msi(dev, &rid) == 0) rid = 1; + else + rid = 0; /* Install interrupt handler. */ sc->irq = bus_alloc_resource_any(dev, SYS_RES_IRQ, &rid, RF_ACTIVE | (rid != 0 ? 0 : RF_SHAREABLE)); @@ -677,7 +680,7 @@ wpi_detach(device_t dev) { struct wpi_softc *sc = device_get_softc(dev); struct ieee80211com *ic = &sc->sc_ic; - int qid; + uint8_t qid; DPRINTF(sc, WPI_DEBUG_TRACE, TRACE_STR_BEGIN, __func__); @@ -828,9 +831,9 @@ wpi_prph_clrbits(struct wpi_softc *sc, u static __inline void wpi_prph_write_region_4(struct wpi_softc *sc, uint32_t addr, - const uint32_t *data, int count) + const uint32_t *data, uint32_t count) { - for (; count > 0; count--, data++, addr += 4) + for (; count != 0; count--, data++, addr += 4) wpi_prph_write(sc, addr, *data); } @@ -1152,7 +1155,7 @@ wpi_free_rx_ring(struct wpi_softc *sc) } static int -wpi_alloc_tx_ring(struct wpi_softc *sc, struct wpi_tx_ring *ring, int qid) +wpi_alloc_tx_ring(struct wpi_softc *sc, struct wpi_tx_ring *ring, uint8_t qid) { bus_addr_t paddr; bus_size_t size; @@ -1332,7 +1335,8 @@ wpi_read_eeprom(struct wpi_softc *sc, ui if ((error = res) != 0) \ goto fail; \ } while (0) - int error, i; + uint8_t i; + int error; DPRINTF(sc, WPI_DEBUG_TRACE, TRACE_STR_BEGIN, __func__); @@ -1416,14 +1420,14 @@ wpi_eeprom_channel_flags(struct wpi_eepr } static void -wpi_read_eeprom_band(struct wpi_softc *sc, int n) +wpi_read_eeprom_band(struct wpi_softc *sc, uint8_t n) { struct ieee80211com *ic = &sc->sc_ic; struct wpi_eeprom_chan *channels = sc->eeprom_channels[n]; const struct wpi_chan_band *band = &wpi_bands[n]; struct ieee80211_channel *c; - uint8_t chan; - int i, nflags; + uint32_t nflags; + uint8_t chan, i; for (i = 0; i < band->nchan; i++) { if (!(channels[i].flags & WPI_EEPROM_CHAN_VALID)) { @@ -1473,7 +1477,7 @@ wpi_read_eeprom_band(struct wpi_softc *s * band and update net80211 with what we find. */ static int -wpi_read_eeprom_channels(struct wpi_softc *sc, int n) +wpi_read_eeprom_channels(struct wpi_softc *sc, uint8_t n) { struct ieee80211com *ic = &sc->sc_ic; const struct wpi_chan_band *band = &wpi_bands[n]; @@ -1537,7 +1541,7 @@ wpi_setregdomain(struct ieee80211com *ic } static int -wpi_read_eeprom_group(struct wpi_softc *sc, int n) +wpi_read_eeprom_group(struct wpi_softc *sc, uint8_t n) { struct wpi_power_group *group = &sc->groups[n]; struct wpi_eeprom_group rgroup; @@ -1575,10 +1579,10 @@ wpi_read_eeprom_group(struct wpi_softc * return 0; } -static int +static __inline uint8_t wpi_add_node_entry_adhoc(struct wpi_softc *sc) { - int newid = WPI_ID_IBSS_MIN; + uint8_t newid = WPI_ID_IBSS_MIN; for (; newid <= WPI_ID_IBSS_MAX; newid++) { if ((sc->nodesmsk & (1 << newid)) == 0) { @@ -1590,7 +1594,7 @@ wpi_add_node_entry_adhoc(struct wpi_soft return WPI_ID_UNDEFINED; } -static __inline int +static __inline uint8_t wpi_add_node_entry_sta(struct wpi_softc *sc) { sc->nodesmsk |= 1 << WPI_ID_BSS; @@ -2585,7 +2589,9 @@ wpi_cmd2(struct wpi_softc *sc, struct wp struct wpi_tx_ring *ring; struct mbuf *m1; bus_dma_segment_t *seg, segs[WPI_MAX_SCATTER]; - int error, i, hdrlen, nsegs, totlen, pad; + uint8_t pad; + uint16_t hdrlen; + int error, i, nsegs, totlen; WPI_TXQ_LOCK(sc); @@ -2730,9 +2736,9 @@ wpi_tx_data(struct wpi_softc *sc, struct struct wpi_buf tx_data; struct wpi_cmd_data *tx = (struct wpi_cmd_data *)&tx_data.data; uint32_t flags; - uint16_t qos; - uint8_t tid, type; - int ac, error, swcrypt, rate, ismcast, totlen; + uint16_t ac, qos; + uint8_t tid, type, rate; + int error, swcrypt, ismcast, totlen; wh = mtod(m, struct ieee80211_frame *); type = wh->i_fc[0] & IEEE80211_FC0_TYPE_MASK; @@ -2896,8 +2902,8 @@ wpi_tx_data_raw(struct wpi_softc *sc, st struct wpi_buf tx_data; struct wpi_cmd_data *tx = (struct wpi_cmd_data *)&tx_data.data; uint32_t flags; - uint8_t type; - int ac, rate, swcrypt, totlen; + uint8_t ac, type, rate; + int swcrypt, totlen; wh = mtod(m, struct ieee80211_frame *); type = wh->i_fc[0] & IEEE80211_FC0_TYPE_MASK; @@ -2991,7 +2997,7 @@ wpi_tx_data_raw(struct wpi_softc *sc, st } static __inline int -wpi_tx_ring_is_full(struct wpi_softc *sc, int ac) +wpi_tx_ring_is_full(struct wpi_softc *sc, uint16_t ac) { struct wpi_tx_ring *ring = &sc->txq[ac]; int retval; @@ -3017,7 +3023,8 @@ wpi_raw_xmit(struct ieee80211_node *ni, { struct ieee80211com *ic = ni->ni_ic; struct wpi_softc *sc = ic->ic_softc; - int ac, error = 0; + uint16_t ac; + int error = 0; DPRINTF(sc, WPI_DEBUG_TRACE, TRACE_STR_BEGIN, __func__); @@ -3064,7 +3071,8 @@ wpi_transmit(struct ieee80211com *ic, st { struct wpi_softc *sc = ic->ic_softc; struct ieee80211_node *ni; - int ac, error; + uint16_t ac; + int error; WPI_TX_LOCK(sc); DPRINTF(sc, WPI_DEBUG_XMIT, "%s: called\n", __func__); @@ -3154,7 +3162,7 @@ wpi_parent(struct ieee80211com *ic) * Send a command to the firmware. */ static int -wpi_cmd(struct wpi_softc *sc, int code, const void *buf, size_t size, +wpi_cmd(struct wpi_softc *sc, uint8_t code, const void *buf, uint16_t size, int async) { struct wpi_tx_ring *ring = &sc->txq[WPI_CMD_QUEUE_NUM]; @@ -3163,7 +3171,8 @@ wpi_cmd(struct wpi_softc *sc, int code, struct wpi_tx_cmd *cmd; struct mbuf *m; bus_addr_t paddr; - int totlen, error; + uint16_t totlen; + int error; WPI_TXQ_LOCK(sc); @@ -3182,7 +3191,7 @@ wpi_cmd(struct wpi_softc *sc, int code, if (async == 0) WPI_LOCK_ASSERT(sc); - DPRINTF(sc, WPI_DEBUG_CMD, "%s: cmd %s size %zu async %d\n", + DPRINTF(sc, WPI_DEBUG_CMD, "%s: cmd %s size %u async %d\n", __func__, wpi_cmd_str(code), size, async); desc = &ring->desc[ring->cur]; @@ -3258,7 +3267,8 @@ wpi_mrr_setup(struct wpi_softc *sc) { struct ieee80211com *ic = &sc->sc_ic; struct wpi_mrr_setup mrr; - int i, error; + uint8_t i; + int error; /* CCK rates (not used with 802.11a). */ for (i = WPI_RIDX_CCK1; i <= WPI_RIDX_CCK11; i++) { @@ -3715,8 +3725,8 @@ wpi_set_pslevel(struct wpi_softc *sc, ui { struct wpi_pmgt_cmd cmd; const struct wpi_pmgt *pmgt; - uint32_t max, skip_dtim; - uint32_t reg; + uint32_t max, reg; + uint8_t skip_dtim; int i; DPRINTF(sc, WPI_DEBUG_PWRSAVE, @@ -3951,7 +3961,7 @@ wpi_limit_dwell(struct wpi_softc *sc, ui { struct ieee80211com *ic = &sc->sc_ic; struct ieee80211vap *vap = TAILQ_FIRST(&ic->ic_vaps); - int bintval = 0; + uint16_t bintval = 0; /* bintval is in TU (1.024mS) */ if (vap != NULL) @@ -4015,9 +4025,9 @@ wpi_scan(struct wpi_softc *sc, struct ie struct wpi_scan_chan *chan; struct ieee80211_frame *wh; struct ieee80211_rateset *rs; - uint16_t dwell_active, dwell_passive; - uint8_t *buf, *frm; - int bgscan, bintval, buflen, error, i, nssid; + uint16_t bintval, buflen, dwell_active, dwell_passive; + uint8_t *buf, *frm, i, nssid; + int bgscan, error; DPRINTF(sc, WPI_DEBUG_TRACE, TRACE_STR_BEGIN, __func__); @@ -4809,7 +4819,7 @@ wpi_post_alive(struct wpi_softc *sc) * the NIC internal memory (no DMA transfer). */ static int -wpi_load_bootcode(struct wpi_softc *sc, const uint8_t *ucode, int size) +wpi_load_bootcode(struct wpi_softc *sc, const uint8_t *ucode, uint32_t size) { int error, ntries; @@ -5159,7 +5169,8 @@ wpi_nic_config(struct wpi_softc *sc) static int wpi_hw_init(struct wpi_softc *sc) { - int chnl, ntries, error; + uint8_t chnl; + int ntries, error; DPRINTF(sc, WPI_DEBUG_TRACE, TRACE_STR_BEGIN, __func__); @@ -5274,7 +5285,8 @@ wpi_hw_init(struct wpi_softc *sc) static void wpi_hw_stop(struct wpi_softc *sc) { - int chnl, qid, ntries; + uint8_t chnl, qid; + int ntries; DPRINTF(sc, WPI_DEBUG_TRACE, TRACE_STR_DOING, __func__); Modified: head/sys/dev/wpi/if_wpireg.h ============================================================================== --- head/sys/dev/wpi/if_wpireg.h Sat Oct 10 23:31:47 2015 (r289123) +++ head/sys/dev/wpi/if_wpireg.h Sun Oct 11 01:31:18 2015 (r289124) @@ -978,7 +978,7 @@ static const struct wpi_pmgt { uint32_t rxtimeout; uint32_t txtimeout; uint32_t intval[5]; - int skip_dtim; + uint8_t skip_dtim; } wpi_pmgt[WPI_NDTIMRANGES][WPI_NPOWERLEVELS] = { /* DTIM <= 10 */ { Modified: head/sys/dev/wpi/if_wpivar.h ============================================================================== --- head/sys/dev/wpi/if_wpivar.h Sat Oct 10 23:31:47 2015 (r289123) +++ head/sys/dev/wpi/if_wpivar.h Sun Oct 11 01:31:18 2015 (r289124) @@ -72,10 +72,10 @@ struct wpi_tx_ring { struct wpi_tx_cmd *cmd; struct wpi_tx_data data[WPI_TX_RING_COUNT]; bus_dma_tag_t data_dmat; - int qid; - int queued; - int cur; - int update; + uint8_t qid; + uint8_t cur; + int16_t queued; + int update:1; }; struct wpi_rx_data { @@ -88,7 +88,7 @@ struct wpi_rx_ring { uint32_t *desc; struct wpi_rx_data data[WPI_RX_RING_COUNT]; bus_dma_tag_t data_dmat; - int cur; + uint16_t cur; int update; }; @@ -116,8 +116,8 @@ struct wpi_buf { struct ieee80211_node *ni; struct mbuf *m; size_t size; - int code; - int ac; + uint8_t code; + uint16_t ac; }; struct wpi_vap { @@ -126,7 +126,7 @@ struct wpi_vap { struct wpi_buf wv_bcbuf; struct mtx wv_mtx; - uint32_t wv_gtk; + uint8_t wv_gtk; #define WPI_VAP_KEY(kid) (1 << kid) int (*wv_newstate)(struct ieee80211vap *, From owner-svn-src-all@freebsd.org Sun Oct 11 01:50:55 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 86E40A0F841; Sun, 11 Oct 2015 01:50:55 +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 3940AE8C; Sun, 11 Oct 2015 01:50:55 +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 t9B1osxe027250; Sun, 11 Oct 2015 01:50:54 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9B1osRr027249; Sun, 11 Oct 2015 01:50:54 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201510110150.t9B1osRr027249@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Sun, 11 Oct 2015 01:50:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289125 - head/sys/dev/wpi X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 11 Oct 2015 01:50:55 -0000 Author: adrian Date: Sun Oct 11 01:50:54 2015 New Revision: 289125 URL: https://svnweb.freebsd.org/changeset/base/289125 Log: wpi(4): do not override iv_recv_mgmt() in non-adhoc modes. Tested: * Tested with Intel 3945BG, IBSS and STA modes Submitted by: Differential Revision: https://reviews.freebsd.org/D3764 Modified: head/sys/dev/wpi/if_wpi.c Modified: head/sys/dev/wpi/if_wpi.c ============================================================================== --- head/sys/dev/wpi/if_wpi.c Sun Oct 11 01:31:18 2015 (r289124) +++ head/sys/dev/wpi/if_wpi.c Sun Oct 11 01:50:54 2015 (r289125) @@ -176,7 +176,7 @@ static int wpi_read_eeprom_group(struct static struct ieee80211_node *wpi_node_alloc(struct ieee80211vap *, const uint8_t mac[IEEE80211_ADDR_LEN]); static void wpi_node_free(struct ieee80211_node *); -static void wpi_recv_mgmt(struct ieee80211_node *, struct mbuf *, int, +static void wpi_ibss_recv_mgmt(struct ieee80211_node *, struct mbuf *, int, const struct ieee80211_rx_stats *, int, int); static void wpi_restore_node(void *, struct ieee80211_node *); @@ -640,8 +640,10 @@ wpi_vap_create(struct ieee80211com *ic, /* Override with driver methods. */ vap->iv_key_set = wpi_key_set; vap->iv_key_delete = wpi_key_delete; - wvp->wv_recv_mgmt = vap->iv_recv_mgmt; - vap->iv_recv_mgmt = wpi_recv_mgmt; + if (opmode == IEEE80211_M_IBSS) { + wvp->wv_recv_mgmt = vap->iv_recv_mgmt; + vap->iv_recv_mgmt = wpi_ibss_recv_mgmt; + } wvp->wv_newstate = vap->iv_newstate; vap->iv_newstate = wpi_newstate; vap->iv_update_beacon = wpi_update_beacon; @@ -1664,7 +1666,7 @@ wpi_check_bss_filter(struct wpi_softc *s } static void -wpi_recv_mgmt(struct ieee80211_node *ni, struct mbuf *m, int subtype, +wpi_ibss_recv_mgmt(struct ieee80211_node *ni, struct mbuf *m, int subtype, const struct ieee80211_rx_stats *rxs, int rssi, int nf) { @@ -1675,8 +1677,7 @@ wpi_recv_mgmt(struct ieee80211_node *ni, wvp->wv_recv_mgmt(ni, m, subtype, rxs, rssi, nf); - if (vap->iv_opmode == IEEE80211_M_IBSS && - vap->iv_state == IEEE80211_S_RUN && + if (vap->iv_state == IEEE80211_S_RUN && (subtype == IEEE80211_FC0_SUBTYPE_BEACON || subtype == IEEE80211_FC0_SUBTYPE_PROBE_RESP)) { ni_tstamp = le64toh(ni->ni_tstamp.tsf); From owner-svn-src-all@freebsd.org Sun Oct 11 01:53:53 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 22A8DA0F955; Sun, 11 Oct 2015 01:53:53 +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 C472B11A6; Sun, 11 Oct 2015 01:53:52 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t9B1rpiX029911; Sun, 11 Oct 2015 01:53:51 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9B1rpDi029909; Sun, 11 Oct 2015 01:53:51 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201510110153.t9B1rpDi029909@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Sun, 11 Oct 2015 01:53:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289126 - head/sys/dev/wpi X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 11 Oct 2015 01:53:53 -0000 Author: adrian Date: Sun Oct 11 01:53:51 2015 New Revision: 289126 URL: https://svnweb.freebsd.org/changeset/base/289126 Log: wpi(4): do not allocate space for unused rings. Tested: * Tested with Intel 3945BG, STA mode Submitted by: Differential Revision: https://reviews.freebsd.org/D3765 Modified: head/sys/dev/wpi/if_wpi.c head/sys/dev/wpi/if_wpivar.h Modified: head/sys/dev/wpi/if_wpi.c ============================================================================== --- head/sys/dev/wpi/if_wpi.c Sun Oct 11 01:50:54 2015 (r289125) +++ head/sys/dev/wpi/if_wpi.c Sun Oct 11 01:53:51 2015 (r289126) @@ -425,7 +425,7 @@ wpi_attach(device_t dev) } /* Allocate TX rings - 4 for QoS purposes, 1 for commands. */ - for (i = 0; i < WPI_NTXQUEUES; i++) { + for (i = 0; i < WPI_DRV_NTXQUEUES; i++) { if ((error = wpi_alloc_tx_ring(sc, &sc->txq[i], i)) != 0) { device_printf(dev, "could not allocate TX ring %d, error %d\n", i, @@ -713,7 +713,7 @@ wpi_detach(device_t dev) if (sc->txq[0].data_dmat) { /* Free DMA resources. */ - for (qid = 0; qid < WPI_NTXQUEUES; qid++) + for (qid = 0; qid < WPI_DRV_NTXQUEUES; qid++) wpi_free_tx_ring(sc, &sc->txq[qid]); wpi_free_rx_ring(sc); @@ -1186,16 +1186,6 @@ wpi_alloc_tx_ring(struct wpi_softc *sc, bus_dmamap_sync(sc->shared_dma.tag, sc->shared_dma.map, BUS_DMASYNC_PREWRITE); - /* - * We only use rings 0 through 4 (4 EDCA + cmd) so there is no need - * to allocate commands space for other rings. - * XXX Do we really need to allocate descriptors for other rings? - */ - if (qid > WPI_CMD_QUEUE_NUM) { - DPRINTF(sc, WPI_DEBUG_TRACE, TRACE_STR_END, __func__); - return 0; - } - size = WPI_TX_RING_COUNT * sizeof (struct wpi_tx_cmd); error = wpi_dma_contig_alloc(sc, &ring->cmd_dma, (void **)&ring->cmd, size, 4); @@ -5326,7 +5316,7 @@ wpi_hw_stop(struct wpi_softc *sc) wpi_reset_rx_ring(sc); /* Reset all TX rings. */ - for (qid = 0; qid < WPI_NTXQUEUES; qid++) + for (qid = 0; qid < WPI_DRV_NTXQUEUES; qid++) wpi_reset_tx_ring(sc, &sc->txq[qid]); if (wpi_nic_lock(sc) == 0) { Modified: head/sys/dev/wpi/if_wpivar.h ============================================================================== --- head/sys/dev/wpi/if_wpivar.h Sun Oct 11 01:50:54 2015 (r289125) +++ head/sys/dev/wpi/if_wpivar.h Sun Oct 11 01:53:51 2015 (r289126) @@ -176,7 +176,7 @@ struct wpi_softc { struct wpi_dma_info shared_dma; struct wpi_shared *shared; - struct wpi_tx_ring txq[WPI_NTXQUEUES]; + struct wpi_tx_ring txq[WPI_DRV_NTXQUEUES]; struct mtx txq_mtx; struct mtx txq_state_mtx; From owner-svn-src-all@freebsd.org Sun Oct 11 01:56:47 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E9D11A0FA5D; Sun, 11 Oct 2015 01:56:47 +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 B4D53134E; Sun, 11 Oct 2015 01:56:47 +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 t9B1ukq7030056; Sun, 11 Oct 2015 01:56:46 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9B1ukAV030055; Sun, 11 Oct 2015 01:56:46 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201510110156.t9B1ukAV030055@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Sun, 11 Oct 2015 01:56:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289127 - head/sys/dev/wpi X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 11 Oct 2015 01:56:48 -0000 Author: adrian Date: Sun Oct 11 01:56:46 2015 New Revision: 289127 URL: https://svnweb.freebsd.org/changeset/base/289127 Log: wpi(4): fix possible race between TX/RX threads. Tested: * Tested with Intel 3945BG, STA mode Submitted by: Differential Revision: https://reviews.freebsd.org/D3766 Modified: head/sys/dev/wpi/if_wpi.c Modified: head/sys/dev/wpi/if_wpi.c ============================================================================== --- head/sys/dev/wpi/if_wpi.c Sun Oct 11 01:53:51 2015 (r289126) +++ head/sys/dev/wpi/if_wpi.c Sun Oct 11 01:56:46 2015 (r289127) @@ -1093,6 +1093,7 @@ wpi_update_rx_ring_ps(struct wpi_softc * return; } + WPI_TXQ_LOCK(sc); WPI_SETBITS(sc, WPI_GP_CNTRL, WPI_GP_CNTRL_MAC_ACCESS_REQ); if (WPI_READ(sc, WPI_GP_CNTRL) & WPI_GP_CNTRL_SLEEP) { DPRINTF(sc, WPI_DEBUG_PWRSAVE, "%s: wakeup request\n", @@ -1102,6 +1103,7 @@ wpi_update_rx_ring_ps(struct wpi_softc * wpi_update_rx_ring(sc); WPI_CLRBITS(sc, WPI_GP_CNTRL, WPI_GP_CNTRL_MAC_ACCESS_REQ); } + WPI_TXQ_UNLOCK(sc); } static void From owner-svn-src-all@freebsd.org Sun Oct 11 01:58:52 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5401BA0FB31; Sun, 11 Oct 2015 01:58:52 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 10FEC1542; Sun, 11 Oct 2015 01:58:51 +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 t9B1wpwx030165; Sun, 11 Oct 2015 01:58:51 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9B1wpjd030164; Sun, 11 Oct 2015 01:58:51 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201510110158.t9B1wpjd030164@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Sun, 11 Oct 2015 01:58:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289128 - head/sys/dev/wpi X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 11 Oct 2015 01:58:52 -0000 Author: adrian Date: Sun Oct 11 01:58:50 2015 New Revision: 289128 URL: https://svnweb.freebsd.org/changeset/base/289128 Log: wpi(4): move error handling upper (wpi_tx_data()/wpi_cmd2() -> wpi_raw_xmit()/wpi_transmit()). Tested: * Tested with Intel 3945BG, STA mode Submitted by: Differential Revision: https://reviews.freebsd.org/D3767 Modified: head/sys/dev/wpi/if_wpi.c Modified: head/sys/dev/wpi/if_wpi.c ============================================================================== --- head/sys/dev/wpi/if_wpi.c Sun Oct 11 01:56:46 2015 (r289127) +++ head/sys/dev/wpi/if_wpi.c Sun Oct 11 01:58:50 2015 (r289128) @@ -2595,7 +2595,7 @@ wpi_cmd2(struct wpi_softc *sc, struct wp if (__predict_false(sc->sc_running == 0)) { /* wpi_stop() was called */ error = ENETDOWN; - goto fail; + goto end; } wh = mtod(buf->m, struct ieee80211_frame *); @@ -2604,7 +2604,7 @@ wpi_cmd2(struct wpi_softc *sc, struct wp if (__predict_false(totlen < sizeof(struct ieee80211_frame_min))) { error = EINVAL; - goto fail; + goto end; } if (hdrlen & 3) { @@ -2635,7 +2635,7 @@ wpi_cmd2(struct wpi_softc *sc, struct wp if (error != 0 && error != EFBIG) { device_printf(sc->sc_dev, "%s: can't map mbuf (error %d)\n", __func__, error); - goto fail; + goto end; } if (error != 0) { /* Too many DMA segments, linearize mbuf. */ @@ -2644,17 +2644,29 @@ wpi_cmd2(struct wpi_softc *sc, struct wp device_printf(sc->sc_dev, "%s: could not defrag mbuf\n", __func__); error = ENOBUFS; - goto fail; + goto end; } buf->m = m1; error = bus_dmamap_load_mbuf_sg(ring->data_dmat, data->map, buf->m, segs, &nsegs, BUS_DMA_NOWAIT); if (__predict_false(error != 0)) { + /* XXX fix this (applicable to the iwn(4) too) */ + /* + * NB: Do not return error; + * original mbuf does not exist anymore. + */ device_printf(sc->sc_dev, "%s: can't map mbuf (error %d)\n", __func__, error); - goto fail; + if (ring->qid < WPI_CMD_QUEUE_NUM) { + if_inc_counter(buf->ni->ni_vap->iv_ifp, + IFCOUNTER_OERRORS, 1); + ieee80211_free_node(buf->ni); + } + m_freem(buf->m); + error = 0; + goto end; } } @@ -2698,19 +2710,12 @@ wpi_cmd2(struct wpi_softc *sc, struct wp WPI_TXQ_STATE_UNLOCK(sc); } - DPRINTF(sc, WPI_DEBUG_TRACE, TRACE_STR_END, __func__); - - WPI_TXQ_UNLOCK(sc); - - return 0; - -fail: m_freem(buf->m); - - DPRINTF(sc, WPI_DEBUG_TRACE, TRACE_STR_END_ERR, __func__); +end: DPRINTF(sc, WPI_DEBUG_TRACE, error ? TRACE_STR_END_ERR : TRACE_STR_END, + __func__); WPI_TXQ_UNLOCK(sc); - return error; + return (error); } /* @@ -2731,7 +2736,7 @@ wpi_tx_data(struct wpi_softc *sc, struct uint32_t flags; uint16_t ac, qos; uint8_t tid, type, rate; - int error, swcrypt, ismcast, totlen; + int swcrypt, ismcast, totlen; wh = mtod(m, struct ieee80211_frame *); type = wh->i_fc[0] & IEEE80211_FC0_TYPE_MASK; @@ -2771,10 +2776,9 @@ wpi_tx_data(struct wpi_softc *sc, struct if (wh->i_fc[1] & IEEE80211_FC1_PROTECTED) { /* Retrieve key for TX. */ k = ieee80211_crypto_encap(ni, m); - if (k == NULL) { - error = ENOBUFS; - goto fail; - } + if (k == NULL) + return (ENOBUFS); + swcrypt = k->wk_flags & IEEE80211_KEY_SWCRYPT; /* 802.11 header may have moved. */ @@ -2843,8 +2847,7 @@ wpi_tx_data(struct wpi_softc *sc, struct if (wn->id == WPI_ID_UNDEFINED) { device_printf(sc->sc_dev, "%s: undefined node id\n", __func__); - error = EINVAL; - goto fail; + return (EINVAL); } tx->id = wn->id; @@ -2880,9 +2883,6 @@ wpi_tx_data(struct wpi_softc *sc, struct tx_data.ac = ac; return wpi_cmd2(sc, &tx_data); - -fail: m_freem(m); - return error; } static int @@ -2923,10 +2923,9 @@ wpi_tx_data_raw(struct wpi_softc *sc, st if (params->ibp_flags & IEEE80211_BPF_CRYPTO) { /* Retrieve key for TX. */ k = ieee80211_crypto_encap(ni, m); - if (k == NULL) { - m_freem(m); - return ENOBUFS; - } + if (k == NULL) + return (ENOBUFS); + swcrypt = k->wk_flags & IEEE80211_KEY_SWCRYPT; /* 802.11 header may have moved. */ @@ -3026,7 +3025,6 @@ wpi_raw_xmit(struct ieee80211_node *ni, WPI_TX_LOCK(sc); if (sc->sc_running == 0 || wpi_tx_ring_is_full(sc, ac)) { - m_freem(m); error = sc->sc_running ? ENOBUFS : ENETDOWN; goto unlock; } @@ -3049,6 +3047,7 @@ unlock: WPI_TX_UNLOCK(sc); if (error != 0) { wpi_handle_tx_failure(ni); + m_freem(m); DPRINTF(sc, WPI_DEBUG_TRACE, TRACE_STR_END_ERR, __func__); return error; @@ -3087,6 +3086,7 @@ wpi_transmit(struct ieee80211com *ic, st ni = (struct ieee80211_node *)m->m_pkthdr.rcvif; if (wpi_tx_data(sc, m, ni) != 0) { wpi_handle_tx_failure(ni); + m_freem(m); } DPRINTF(sc, WPI_DEBUG_XMIT, "%s: done\n", __func__); @@ -4300,6 +4300,7 @@ wpi_config_beacon(struct wpi_vap *wvp) device_printf(sc->sc_dev, "%s: could not update beacon frame, error %d", __func__, error); + m_freem(bcn->m); } /* Restore mbuf. */ From owner-svn-src-all@freebsd.org Sun Oct 11 02:00:09 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 56C9BA0FBC4; Sun, 11 Oct 2015 02:00:09 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2320E17ED; Sun, 11 Oct 2015 02:00:09 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t9B208eW030283; Sun, 11 Oct 2015 02:00:08 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9B208nm030282; Sun, 11 Oct 2015 02:00:08 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201510110200.t9B208nm030282@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Sun, 11 Oct 2015 02:00:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289129 - head/sys/dev/wpi X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 11 Oct 2015 02:00:09 -0000 Author: adrian Date: Sun Oct 11 02:00:08 2015 New Revision: 289129 URL: https://svnweb.freebsd.org/changeset/base/289129 Log: wpi(4): do not count failures twice for ic_raw_xmit(). Tested: * Tested with Intel 3945BG, STA mode Submitted by: Differential Revision: https://reviews.freebsd.org/D3768 Modified: head/sys/dev/wpi/if_wpi.c Modified: head/sys/dev/wpi/if_wpi.c ============================================================================== --- head/sys/dev/wpi/if_wpi.c Sun Oct 11 01:58:50 2015 (r289128) +++ head/sys/dev/wpi/if_wpi.c Sun Oct 11 02:00:08 2015 (r289129) @@ -3001,14 +3001,6 @@ wpi_tx_ring_is_full(struct wpi_softc *sc return retval; } -static __inline void -wpi_handle_tx_failure(struct ieee80211_node *ni) -{ - /* NB: m is reclaimed on tx failure */ - if_inc_counter(ni->ni_vap->iv_ifp, IFCOUNTER_OERRORS, 1); - ieee80211_free_node(ni); -} - static int wpi_raw_xmit(struct ieee80211_node *ni, struct mbuf *m, const struct ieee80211_bpf_params *params) @@ -3046,8 +3038,8 @@ wpi_raw_xmit(struct ieee80211_node *ni, unlock: WPI_TX_UNLOCK(sc); if (error != 0) { - wpi_handle_tx_failure(ni); m_freem(m); + ieee80211_free_node(ni); DPRINTF(sc, WPI_DEBUG_TRACE, TRACE_STR_END_ERR, __func__); return error; @@ -3085,7 +3077,8 @@ wpi_transmit(struct ieee80211com *ic, st error = 0; ni = (struct ieee80211_node *)m->m_pkthdr.rcvif; if (wpi_tx_data(sc, m, ni) != 0) { - wpi_handle_tx_failure(ni); + if_inc_counter(ni->ni_vap->iv_ifp, IFCOUNTER_OERRORS, 1); + ieee80211_free_node(ni); m_freem(m); } From owner-svn-src-all@freebsd.org Sun Oct 11 03:31:13 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0CA0EA0FE60; Sun, 11 Oct 2015 03:31:13 +0000 (UTC) (envelope-from sbruno@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id CD44D1E8E; Sun, 11 Oct 2015 03:31:12 +0000 (UTC) (envelope-from sbruno@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t9B3VBAi058155; Sun, 11 Oct 2015 03:31:11 GMT (envelope-from sbruno@FreeBSD.org) Received: (from sbruno@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9B3VBZ2058154; Sun, 11 Oct 2015 03:31:11 GMT (envelope-from sbruno@FreeBSD.org) Message-Id: <201510110331.t9B3VBZ2058154@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: sbruno set sender to sbruno@FreeBSD.org using -f From: Sean Bruno Date: Sun, 11 Oct 2015 03:31:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289130 - head/sys/mips/conf X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 11 Oct 2015 03:31:13 -0000 Author: sbruno Date: Sun Oct 11 03:31:11 2015 New Revision: 289130 URL: https://svnweb.freebsd.org/changeset/base/289130 Log: Use machine specific values cleaned from openwrt for the mac address location on the TP link mr3020 Modified: head/sys/mips/conf/TP-MR3020.hints Modified: head/sys/mips/conf/TP-MR3020.hints ============================================================================== --- head/sys/mips/conf/TP-MR3020.hints Sun Oct 11 02:00:08 2015 (r289129) +++ head/sys/mips/conf/TP-MR3020.hints Sun Oct 11 03:31:11 2015 (r289130) @@ -34,8 +34,10 @@ hint.arge.1.fduplex=1 # Where the ART is - last 64k in the flash # 0x9fff1000 ? -hint.ath.0.eepromaddr=0x1fff0000 +hint.ath.0.eepromaddr=0x1fff1000 hint.ath.0.eepromsize=16384 + +hint.ar71xx.0.eeprom_mac_addr=0x1f01fc00 # The board 16MiB flash layout in uboot env: # From owner-svn-src-all@freebsd.org Sun Oct 11 04:58:20 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 55688A118BB; Sun, 11 Oct 2015 04:58:20 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: from mail-ig0-x230.google.com (mail-ig0-x230.google.com [IPv6:2607:f8b0:4001:c05::230]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 166EB1C8F; Sun, 11 Oct 2015 04:58:20 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: by igcpe7 with SMTP id pe7so61430923igc.0; Sat, 10 Oct 2015 21:58:19 -0700 (PDT) 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=DHvib2mK5fTyhzaUVs5PJXVRoV1ny8e/achOei8FLXA=; b=GAi2oIkBNirUCGUum794BqXGNAcH4Aqc9MfPOpElXt2qF7yWtEOXNIzya4dxFJBLTb 4+lne+t0VHqROTysue2eV0+JpcXPn7Rz1HC9CKSg7M+BU5F0XhbHJ+pHz26d5TRf3Ldj TMFMVDSYmDNIVgns7ikAdMH+QrJtWYgUb4ljnh0ahiGJk/Xq4pm/muT6JhBXRgL/JG8Q /eJrshshN/FgHJl5bMD+L9SvZx3eFPDQ6PFZV6+tZ/rwx50HuMqFOKTtoV8Bg/3bHD56 wN7mNzmgYf5OIMpflpjfBKtPdL2vrYMU4eE5VjDMWa7jMMhoee6ZOHduFOoCBzUeLmCx tszw== MIME-Version: 1.0 X-Received: by 10.50.61.137 with SMTP id p9mr6473466igr.37.1444539499476; Sat, 10 Oct 2015 21:58:19 -0700 (PDT) Received: by 10.36.2.10 with HTTP; Sat, 10 Oct 2015 21:58:19 -0700 (PDT) In-Reply-To: <201510110331.t9B3VBZ2058154@repo.freebsd.org> References: <201510110331.t9B3VBZ2058154@repo.freebsd.org> Date: Sat, 10 Oct 2015 21:58:19 -0700 Message-ID: Subject: Re: svn commit: r289130 - head/sys/mips/conf From: Adrian Chadd To: Sean Bruno 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 " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 11 Oct 2015 04:58:20 -0000 Hm, its an AR9300, right? It should be getting ART from 0x1fff0000 like the rest of the boards and the AR9300 HAL will add 0x1000 for you. Don't ask me why. What's the MAC address of the wlan0 interface you created? Does it actually all work? :) -a On 10 October 2015 at 20:31, Sean Bruno wrote: > Author: sbruno > Date: Sun Oct 11 03:31:11 2015 > New Revision: 289130 > URL: https://svnweb.freebsd.org/changeset/base/289130 > > Log: > Use machine specific values cleaned from openwrt for the mac address > location on the TP link mr3020 > > Modified: > head/sys/mips/conf/TP-MR3020.hints > > Modified: head/sys/mips/conf/TP-MR3020.hints > ============================================================================== > --- head/sys/mips/conf/TP-MR3020.hints Sun Oct 11 02:00:08 2015 (r289129) > +++ head/sys/mips/conf/TP-MR3020.hints Sun Oct 11 03:31:11 2015 (r289130) > @@ -34,8 +34,10 @@ hint.arge.1.fduplex=1 > > # Where the ART is - last 64k in the flash > # 0x9fff1000 ? > -hint.ath.0.eepromaddr=0x1fff0000 > +hint.ath.0.eepromaddr=0x1fff1000 > hint.ath.0.eepromsize=16384 > + > +hint.ar71xx.0.eeprom_mac_addr=0x1f01fc00 > > # The board 16MiB flash layout in uboot env: > # > From owner-svn-src-all@freebsd.org Sun Oct 11 07:08:59 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0CDACA11818; Sun, 11 Oct 2015 07:08:59 +0000 (UTC) (envelope-from fidaj@ukr.net) Received: from frv25.fwdcdn.com (frv25.fwdcdn.com [212.42.77.25]) by mx1.freebsd.org (Postfix) with ESMTP id B22078E0; Sun, 11 Oct 2015 07:08:58 +0000 (UTC) (envelope-from fidaj@ukr.net) Received: from frv152.fwdcdn.com ([212.42.77.152]) by frv25.fwdcdn.com QID:1ZlAVi-0003Gx-Vi/RC:4; Sun, 11 Oct 2015 09:53:34 +0300 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=ukr.net; s=fsm; h=Content-Transfer-Encoding:Content-Type:MIME-Version:References:In-Reply-To:Message-ID:Subject:Cc:To:From:Date; bh=mW62U303Hsm4x043SDDLDM0Hb+ls757/Fo78TB/Dekg=; b=MhdkvAzc2mMV8Z8SBXxvMYS/BZUVk6e4ND9iKiwz5e9yQElk20h9kQX4BZUzVg3yPdS35FXwKBcG7VnhdUQ+T+anTcQmOpjPdvrI8Vh+hgSOn75FMfpimhMKCmFUUz7VG/4XlxcFIG3ykR8sEsWE9ox3gqReKGUVy+lXIz2g8KU=; Received: from [178.137.225.202] (helo=nonamehost.local) by frv152.fwdcdn.com with esmtpsa ID 1ZlAVa-00033N-61 ; Sun, 11 Oct 2015 09:53:26 +0300 Date: Sun, 11 Oct 2015 09:53:25 +0300 From: Ivan Klymenko To: Dimitry Andric Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r283526 - in head: . contrib/llvm/include/llvm/Target contrib/llvm/lib/Analysis contrib/llvm/lib/CodeGen contrib/llvm/lib/CodeGen/SelectionDAG contrib/llvm/lib/ExecutionEngine/RuntimeDy... Message-ID: <20151011095325.66715721@nonamehost.local> In-Reply-To: <314FDE61-A3F7-4DB7-98BF-16BDCA77D307@FreeBSD.org> References: <201505251343.t4PDh3wR037780@svn.freebsd.org> <20151011003222.0944214d@nonamehost.local> <314FDE61-A3F7-4DB7-98BF-16BDCA77D307@FreeBSD.org> X-Mailer: Claws Mail 3.12.0 (GTK+ 2.24.28; amd64-portbld-freebsd11.0) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Authentication-Result: IP=178.137.225.202; mail.from=fidaj@ukr.net; dkim=pass; header.d=ukr.net X-Ukrnet-Yellow: 0 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 11 Oct 2015 07:08:59 -0000 On Sun, 11 Oct 2015 01:40:46 +0200 Dimitry Andric wrote: > On 10 Oct 2015, at 23:32, Ivan Klymenko wrote: > > On Mon, 25 May 2015 13:43:03 +0000 (UTC) > > Dimitry Andric wrote: > > > >> Author: dim > >> Date: Mon May 25 13:43:03 2015 > >> New Revision: 283526 > >> URL: https://svnweb.freebsd.org/changeset/base/283526 > >> > >> Log: > >> Upgrade our copy of clang and llvm to 3.6.1 release. > > This is some time ago already, you probably meant the upgrade to > 3.7.0? :-) > Oops. Yes :) sorry. > > > Cannot emit physreg copy instruction > > UNREACHABLE executed > > at /usr/src/lib/clang/libllvmx86codegen/../../../contrib/llvm/lib/Target/X86/X86InstrInfo.cpp:3935! > > cc: error: unable to execute command: Abort trap cc: error: clang > > frontend command failed due to signal (use -v to see invocation) > > FreeBSD clang version 3.7.0 (tags/RELEASE_370/final 246257) > > 20150906 Target: x86_64-unknown-freebsd11.0 Thread model: posix > > cc: note: diagnostic msg: PLEASE submit a bug report to > > https://bugs.freebsd.org/submit/ and include the crash backtrace, > > preprocessed source, and associated run script. cc: note: > > diagnostic msg: ******************** > > > > PLEASE ATTACH THE FOLLOWING FILES TO THE BUG REPORT: > > Preprocessed source(s) and associated run script(s) are located at: > > cc: note: diagnostic msg: /tmp/ieee802_11_common-974cbf.c > > cc: note: diagnostic msg: /tmp/ieee802_11_common-974cbf.sh > > Yes, this error has already been reported; please see the thread > starting here: > > https://lists.freebsd.org/pipermail/freebsd-current/2015-October/057701.html > Thanks! > It has been submitted as an upstream bug, and a fix is being worked > on. For now, you can work around it by unsetting CPUTYPE. > > -Dimitry > From owner-svn-src-all@freebsd.org Sun Oct 11 08:28:51 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4D8BFA11789; Sun, 11 Oct 2015 08:28:51 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 184329D2; Sun, 11 Oct 2015 08:28:51 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t9B8Sop4044587; Sun, 11 Oct 2015 08:28:50 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9B8SoeH044586; Sun, 11 Oct 2015 08:28:50 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201510110828.t9B8SoeH044586@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Sun, 11 Oct 2015 08:28:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289136 - head/sys/cam/ctl X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 11 Oct 2015 08:28:51 -0000 Author: mav Date: Sun Oct 11 08:28:49 2015 New Revision: 289136 URL: https://svnweb.freebsd.org/changeset/base/289136 Log: Remove lock upgrade attempt from ctl_be_block_open_file(). I am not sure what for it was done. Now open routine should automatically fall back to read-only if open for writing is impossible. In such case attempt to upgrade to write sounds strange. MFC after: 1 week Modified: head/sys/cam/ctl/ctl_backend_block.c Modified: head/sys/cam/ctl/ctl_backend_block.c ============================================================================== --- head/sys/cam/ctl/ctl_backend_block.c Sun Oct 11 08:28:36 2015 (r289135) +++ head/sys/cam/ctl/ctl_backend_block.c Sun Oct 11 08:28:49 2015 (r289136) @@ -1840,21 +1840,6 @@ ctl_be_block_open_file(struct ctl_be_blo return (error); } - /* - * Verify that we have the ability to upgrade to exclusive - * access on this file so we can trap errors at open instead - * of reporting them during first access. - */ - if (VOP_ISLOCKED(be_lun->vn) != LK_EXCLUSIVE) { - vn_lock(be_lun->vn, LK_UPGRADE | LK_RETRY); - if (be_lun->vn->v_iflag & VI_DOOMED) { - error = EBADF; - snprintf(req->error_str, sizeof(req->error_str), - "error locking file %s", be_lun->dev_path); - return (error); - } - } - file_data->cred = crhold(curthread->td_ucred); if (params->lun_size_bytes != 0) be_lun->size_bytes = params->lun_size_bytes; From owner-svn-src-all@freebsd.org Sun Oct 11 13:01:55 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3B414A0F2A1; Sun, 11 Oct 2015 13:01:55 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id F2A2C2EC; Sun, 11 Oct 2015 13:01:54 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t9BD1sXi035591; Sun, 11 Oct 2015 13:01:54 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9BD1poi035565; Sun, 11 Oct 2015 13:01:51 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201510111301.t9BD1poi035565@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Sun, 11 Oct 2015 13:01:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289137 - in head: . sbin/geom/class/raid share/man/man4 sys/amd64/conf sys/arm/conf sys/cam sys/cam/ata sys/conf sys/geom sys/geom/raid sys/i386/conf sys/mips/conf sys/pc98/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 " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 11 Oct 2015 13:01:55 -0000 Author: mav Date: Sun Oct 11 13:01:51 2015 New Revision: 289137 URL: https://svnweb.freebsd.org/changeset/base/289137 Log: Remove compatibility shims for legacy ATA device names. We got new ATA stack in FreeBSD 8.x, switched to it at 9.x, completely removed old stack at 10.x, so at 11.x it is time to remove compat shims. Modified: head/UPDATING head/sbin/geom/class/raid/graid.8 head/share/man/man4/ada.4 head/sys/amd64/conf/GENERIC head/sys/arm/conf/A20 head/sys/arm/conf/ALPINE head/sys/arm/conf/CRB head/sys/arm/conf/CUBIEBOARD head/sys/arm/conf/EFIKA_MX head/sys/arm/conf/EP80219 head/sys/arm/conf/IMX53 head/sys/arm/conf/IQ31244 head/sys/cam/ata/ata_da.c head/sys/cam/cam_xpt.c head/sys/cam/cam_xpt.h head/sys/conf/NOTES head/sys/geom/geom_dev.c head/sys/geom/raid/g_raid.c head/sys/i386/conf/GENERIC head/sys/i386/conf/XBOX head/sys/mips/conf/OCTEON1 head/sys/mips/conf/std.SWARM head/sys/pc98/conf/GENERIC Modified: head/UPDATING ============================================================================== --- head/UPDATING Sun Oct 11 08:28:49 2015 (r289136) +++ head/UPDATING Sun Oct 11 13:01:51 2015 (r289137) @@ -31,6 +31,12 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 11 disable the most expensive debugging functionality run "ln -s 'abort:false,junk:false' /etc/malloc.conf".) +20151011: + Compatibility shims for legacy ATA device names have been removed. + It includes ATA_STATIC_ID kernel option, kern.cam.ada.legacy_aliases + and kern.geom.raid.legacy_aliases loader tunables, kern.devalias.* + environment variables, /dev/ad* and /dev/ar* symbolic links. + 20151006: Clang, llvm, lldb, compiler-rt and libc++ have been upgraded to 3.7.0. Please see the 20141231 entry below for information about prerequisites Modified: head/sbin/geom/class/raid/graid.8 ============================================================================== --- head/sbin/geom/class/raid/graid.8 Sun Oct 11 08:28:49 2015 (r289136) +++ head/sbin/geom/class/raid/graid.8 Sun Oct 11 13:01:51 2015 (r289137) @@ -304,9 +304,6 @@ Write errors are always considered as di Time to wait for missing array components on startup. .It Va kern.geom.raid. Ns Ar X Ns Va .enable : No 1 Enable taste for specific metadata or transformation module. -.It Va kern.geom.raid.legacy_aliases : No 0 -Enable geom raid emulation of legacy /dev/ar%d devices. -This should aid the upgrade of systems from legacy to modern releases. .El .Sh EXIT STATUS Exit status is 0 on success, and non-zero if the command fails. Modified: head/share/man/man4/ada.4 ============================================================================== --- head/share/man/man4/ada.4 Sun Oct 11 08:28:49 2015 (r289136) +++ head/share/man/man4/ada.4 Sun Oct 11 13:01:51 2015 (r289137) @@ -146,16 +146,6 @@ instead of .Pa /etc/sysctl.conf . The global default is currently 1. The per-device default is to leave it as-is (follow global setting). -.It Va kern.cam.ada.legacy_aliases -.Pp -This variable determines whether -.Pa /dev/ad Ns Ar Y -symbolic links are created, -which tries to mimic old -.Xr ata 4 -numbering. -Set to 1 to enable legacy aliases symlinks, 0 to disable. -The default is currently enabled. .El .Sh FILES .Bl -tag -width ".Pa /dev/ada*" -compact Modified: head/sys/amd64/conf/GENERIC ============================================================================== --- head/sys/amd64/conf/GENERIC Sun Oct 11 08:28:49 2015 (r289136) +++ head/sys/amd64/conf/GENERIC Sun Oct 11 13:01:51 2015 (r289137) @@ -109,7 +109,6 @@ device fdc # ATA controllers device ahci # AHCI-compatible SATA controllers device ata # Legacy ATA/SATA controllers -options ATA_STATIC_ID # Static device numbering device mvs # Marvell 88SX50XX/88SX60XX/88SX70XX/SoC SATA device siis # SiliconImage SiI3124/SiI3132/SiI3531 SATA Modified: head/sys/arm/conf/A20 ============================================================================== --- head/sys/arm/conf/A20 Sun Oct 11 08:28:49 2015 (r289136) +++ head/sys/arm/conf/A20 Sun Oct 11 13:01:51 2015 (r289137) @@ -62,7 +62,6 @@ device mmcsd # mmc/sd flash cards # ATA controllers device ahci # AHCI-compatible SATA controllers #device ata # Legacy ATA/SATA controllers -#options ATA_STATIC_ID # Static device numbering # Console and misc device uart Modified: head/sys/arm/conf/ALPINE ============================================================================== --- head/sys/arm/conf/ALPINE Sun Oct 11 08:28:49 2015 (r289136) +++ head/sys/arm/conf/ALPINE Sun Oct 11 13:01:51 2015 (r289137) @@ -48,7 +48,6 @@ device gpio # ATA controllers device ahci # AHCI-compatible SATA controllers device ata # Legacy ATA/SATA controllers -options ATA_STATIC_ID # Static device numbering # ATA/SCSI peripherals device scbus # SCSI bus (required for ATA/SCSI) Modified: head/sys/arm/conf/CRB ============================================================================== --- head/sys/arm/conf/CRB Sun Oct 11 08:28:49 2015 (r289136) +++ head/sys/arm/conf/CRB Sun Oct 11 13:01:51 2015 (r289137) @@ -76,7 +76,6 @@ device uart device pci device ata -options ATA_STATIC_ID # Static device numbering device scbus # SCSI bus (required for ATA/SCSI) device cd # CD Modified: head/sys/arm/conf/CUBIEBOARD ============================================================================== --- head/sys/arm/conf/CUBIEBOARD Sun Oct 11 08:28:49 2015 (r289136) +++ head/sys/arm/conf/CUBIEBOARD Sun Oct 11 13:01:51 2015 (r289137) @@ -59,7 +59,6 @@ device mmcsd # mmc/sd flash cards # ATA controllers device ahci # AHCI-compatible SATA controllers #device ata # Legacy ATA/SATA controllers -#options ATA_STATIC_ID # Static device numbering # Console and misc device uart Modified: head/sys/arm/conf/EFIKA_MX ============================================================================== --- head/sys/arm/conf/EFIKA_MX Sun Oct 11 08:28:49 2015 (r289136) +++ head/sys/arm/conf/EFIKA_MX Sun Oct 11 13:01:51 2015 (r289137) @@ -91,7 +91,6 @@ options ALT_BREAK_TO_DEBUGGER device ata device atapci # Only for helper functions device imxata -options ATA_STATIC_ID # Static device numbering device gpio device gpioled Modified: head/sys/arm/conf/EP80219 ============================================================================== --- head/sys/arm/conf/EP80219 Sun Oct 11 08:28:49 2015 (r289136) +++ head/sys/arm/conf/EP80219 Sun Oct 11 13:01:51 2015 (r289137) @@ -76,7 +76,6 @@ device uart device pci device ata -options ATA_STATIC_ID # Static device numbering device scbus # SCSI bus (required for ATA/SCSI) device cd # CD Modified: head/sys/arm/conf/IMX53 ============================================================================== --- head/sys/arm/conf/IMX53 Sun Oct 11 08:28:49 2015 (r289136) +++ head/sys/arm/conf/IMX53 Sun Oct 11 13:01:51 2015 (r289137) @@ -80,7 +80,6 @@ options ALT_BREAK_TO_DEBUGGER device ata device atapci # Only for helper functions device imxata -options ATA_STATIC_ID # Static device numbering device gpio device gpioled Modified: head/sys/arm/conf/IQ31244 ============================================================================== --- head/sys/arm/conf/IQ31244 Sun Oct 11 08:28:49 2015 (r289136) +++ head/sys/arm/conf/IQ31244 Sun Oct 11 13:01:51 2015 (r289137) @@ -75,7 +75,6 @@ device uart device pci device ata -options ATA_STATIC_ID # Static device numbering device scbus # SCSI bus (required for ATA/SCSI) device cd # CD Modified: head/sys/cam/ata/ata_da.c ============================================================================== --- head/sys/cam/ata/ata_da.c Sun Oct 11 08:28:49 2015 (r289136) +++ head/sys/cam/ata/ata_da.c Sun Oct 11 13:01:51 2015 (r289137) @@ -582,7 +582,6 @@ static void adaresume(void *arg); #define ata_disk_firmware_geom_adjust(disk) #endif -static int ada_legacy_aliases = ADA_DEFAULT_LEGACY_ALIASES; static int ada_retry_count = ADA_DEFAULT_RETRY; static int ada_default_timeout = ADA_DEFAULT_TIMEOUT; static int ada_send_ordered = ADA_DEFAULT_SEND_ORDERED; @@ -593,8 +592,6 @@ static int ada_write_cache = ADA_DEFAULT static SYSCTL_NODE(_kern_cam, OID_AUTO, ada, CTLFLAG_RD, 0, "CAM Direct Access Disk driver"); -SYSCTL_INT(_kern_cam_ada, OID_AUTO, legacy_aliases, CTLFLAG_RWTUN, - &ada_legacy_aliases, 0, "Create legacy-like device aliases"); SYSCTL_INT(_kern_cam_ada, OID_AUTO, retry_count, CTLFLAG_RWTUN, &ada_retry_count, 0, "Normal I/O retry count"); SYSCTL_INT(_kern_cam_ada, OID_AUTO, default_timeout, CTLFLAG_RWTUN, @@ -1164,11 +1161,11 @@ adaregister(struct cam_periph *periph, v struct ada_softc *softc; struct ccb_pathinq cpi; struct ccb_getdev *cgd; - char announce_buf[80], buf1[32]; + char announce_buf[80]; struct disk_params *dp; caddr_t match; u_int maxio; - int legacy_id, quirks; + int quirks; cgd = (struct ccb_getdev *)arg; if (cgd == NULL) { @@ -1331,22 +1328,6 @@ adaregister(struct cam_periph *periph, v softc->disk->d_fwheads = softc->params.heads; ata_disk_firmware_geom_adjust(softc->disk); - if (ada_legacy_aliases) { -#ifdef ATA_STATIC_ID - legacy_id = xpt_path_legacy_ata_id(periph->path); -#else - legacy_id = softc->disk->d_unit; -#endif - if (legacy_id >= 0) { - snprintf(announce_buf, sizeof(announce_buf), - "kern.devalias.%s%d", - softc->disk->d_name, softc->disk->d_unit); - snprintf(buf1, sizeof(buf1), - "ad%d", legacy_id); - kern_setenv(announce_buf, buf1); - } - } else - legacy_id = -1; /* * Acquire a reference to the periph before we register with GEOM. * We'll release this reference once GEOM calls us back (via @@ -1372,9 +1353,6 @@ adaregister(struct cam_periph *periph, v dp->secs_per_track, dp->cylinders); xpt_announce_periph(periph, announce_buf); xpt_announce_quirks(periph, softc->quirks, ADA_Q_BIT_STRING); - if (legacy_id >= 0) - printf("%s%d: Previously was known as ad%d\n", - periph->periph_name, periph->unit_number, legacy_id); /* * Create our sysctl variables, now that we know Modified: head/sys/cam/cam_xpt.c ============================================================================== --- head/sys/cam/cam_xpt.c Sun Oct 11 08:28:49 2015 (r289136) +++ head/sys/cam/cam_xpt.c Sun Oct 11 13:01:51 2015 (r289137) @@ -3756,45 +3756,6 @@ xpt_path_periph(struct cam_path *path) return (path->periph); } -int -xpt_path_legacy_ata_id(struct cam_path *path) -{ - struct cam_eb *bus; - int bus_id; - - if ((strcmp(path->bus->sim->sim_name, "ata") != 0) && - strcmp(path->bus->sim->sim_name, "ahcich") != 0 && - strcmp(path->bus->sim->sim_name, "mvsch") != 0 && - strcmp(path->bus->sim->sim_name, "siisch") != 0) - return (-1); - - if (strcmp(path->bus->sim->sim_name, "ata") == 0 && - path->bus->sim->unit_number < 2) { - bus_id = path->bus->sim->unit_number; - } else { - bus_id = 2; - xpt_lock_buses(); - TAILQ_FOREACH(bus, &xsoftc.xpt_busses, links) { - if (bus == path->bus) - break; - if ((strcmp(bus->sim->sim_name, "ata") == 0 && - bus->sim->unit_number >= 2) || - strcmp(bus->sim->sim_name, "ahcich") == 0 || - strcmp(bus->sim->sim_name, "mvsch") == 0 || - strcmp(bus->sim->sim_name, "siisch") == 0) - bus_id++; - } - xpt_unlock_buses(); - } - if (path->target != NULL) { - if (path->target->target_id < 2) - return (bus_id * 2 + path->target->target_id); - else - return (-1); - } else - return (bus_id * 2); -} - /* * Release a CAM control block for the caller. Remit the cost of the structure * to the device referenced by the path. If the this device had no 'credits' Modified: head/sys/cam/cam_xpt.h ============================================================================== --- head/sys/cam/cam_xpt.h Sun Oct 11 08:28:49 2015 (r289136) +++ head/sys/cam/cam_xpt.h Sun Oct 11 13:01:51 2015 (r289137) @@ -101,7 +101,6 @@ int xpt_path_string(struct cam_path *p path_id_t xpt_path_path_id(struct cam_path *path); target_id_t xpt_path_target_id(struct cam_path *path); lun_id_t xpt_path_lun_id(struct cam_path *path); -int xpt_path_legacy_ata_id(struct cam_path *path); struct cam_sim *xpt_path_sim(struct cam_path *path); struct cam_periph *xpt_path_periph(struct cam_path *path); void xpt_async(u_int32_t async_code, struct cam_path *path, Modified: head/sys/conf/NOTES ============================================================================== --- head/sys/conf/NOTES Sun Oct 11 08:28:49 2015 (r289136) +++ head/sys/conf/NOTES Sun Oct 11 13:01:51 2015 (r289137) @@ -1759,12 +1759,9 @@ hint.ata.1.irq="15" # # The following options are valid on the ATA driver: # -# ATA_STATIC_ID: controller numbering is static ie depends on location -# else the device numbers are dynamically allocated. # ATA_REQUEST_TIMEOUT: the number of seconds to wait for an ATA request # before timing out. -options ATA_STATIC_ID #options ATA_REQUEST_TIMEOUT=10 # Modified: head/sys/geom/geom_dev.c ============================================================================== --- head/sys/geom/geom_dev.c Sun Oct 11 08:28:49 2015 (r289136) +++ head/sys/geom/geom_dev.c Sun Oct 11 13:01:51 2015 (r289137) @@ -280,9 +280,9 @@ g_dev_taste(struct g_class *mp, struct g struct g_geom *gp; struct g_consumer *cp; struct g_dev_softc *sc; - int error, len; - struct cdev *dev, *adev; - char buf[SPECNAMELEN + 6], *val; + int error; + struct cdev *dev; + char buf[SPECNAMELEN + 6]; g_trace(G_T_TOPOLOGY, "dev_taste(%s,%s)", mp->name, pp->name); g_topology_assert(); @@ -310,33 +310,9 @@ g_dev_taste(struct g_class *mp, struct g dev->si_flags |= SI_UNMAPPED; sc->sc_dev = dev; - /* Search for device alias name and create it if found. */ - adev = NULL; - for (len = MIN(strlen(gp->name), sizeof(buf) - 15); len > 0; len--) { - snprintf(buf, sizeof(buf), "kern.devalias.%s", gp->name); - buf[14 + len] = 0; - val = kern_getenv(buf); - if (val != NULL) { - snprintf(buf, sizeof(buf), "%s%s", - val, gp->name + len); - freeenv(val); - if ((make_dev_alias_p(MAKEDEV_CHECKNAME|MAKEDEV_WAITOK, - &adev, dev, "%s", buf)) != 0) - printf("Warning: unable to create device " - "alias %s\n", buf); - break; - } - } - dev->si_iosize_max = MAXPHYS; dev->si_drv2 = cp; init_dumpdev(dev); - if (adev != NULL) { - adev->si_iosize_max = MAXPHYS; - adev->si_drv2 = cp; - adev->si_flags |= SI_UNMAPPED; - init_dumpdev(adev); - } g_dev_attrchanged(cp, "GEOM::physpath"); snprintf(buf, sizeof(buf), "cdev=%s", gp->name); Modified: head/sys/geom/raid/g_raid.c ============================================================================== --- head/sys/geom/raid/g_raid.c Sun Oct 11 08:28:49 2015 (r289136) +++ head/sys/geom/raid/g_raid.c Sun Oct 11 13:01:51 2015 (r289137) @@ -82,10 +82,6 @@ static u_int g_raid_idle_threshold = 100 SYSCTL_UINT(_kern_geom_raid, OID_AUTO, idle_threshold, CTLFLAG_RWTUN, &g_raid_idle_threshold, 1000000, "Time in microseconds to consider a volume idle."); -static u_int ar_legacy_aliases = 1; -SYSCTL_INT(_kern_geom_raid, OID_AUTO, legacy_aliases, CTLFLAG_RWTUN, - &ar_legacy_aliases, 0, "Create aliases named as the legacy ataraid style."); - #define MSLEEP(rv, ident, mtx, priority, wmesg, timeout) do { \ G_RAID_DEBUG(4, "%s: Sleeping %p.", __func__, (ident)); \ @@ -1628,7 +1624,6 @@ g_raid_launch_provider(struct g_raid_vol struct g_raid_softc *sc; struct g_provider *pp; char name[G_RAID_MAX_VOLUMENAME]; - char announce_buf[80], buf1[32]; off_t off; int i; @@ -1644,21 +1639,6 @@ g_raid_launch_provider(struct g_raid_vol snprintf(name, sizeof(name), "raid/r%d", vol->v_global_id); } - /* - * Create a /dev/ar%d that the old ataraid(4) stack once - * created as an alias for /dev/raid/r%d if requested. - * This helps going from stable/7 ataraid devices to newer - * FreeBSD releases. sbruno 07 MAY 2013 - */ - - if (ar_legacy_aliases) { - snprintf(announce_buf, sizeof(announce_buf), - "kern.devalias.%s", name); - snprintf(buf1, sizeof(buf1), - "ar%d", vol->v_global_id); - kern_setenv(announce_buf, buf1); - } - pp = g_new_providerf(sc->sc_geom, "%s", name); pp->flags |= G_PF_DIRECT_RECEIVE; if (vol->v_tr->tro_class->trc_accept_unmapped) { Modified: head/sys/i386/conf/GENERIC ============================================================================== --- head/sys/i386/conf/GENERIC Sun Oct 11 08:28:49 2015 (r289136) +++ head/sys/i386/conf/GENERIC Sun Oct 11 13:01:51 2015 (r289137) @@ -109,7 +109,6 @@ device fdc # ATA controllers device ahci # AHCI-compatible SATA controllers device ata # Legacy ATA/SATA controllers -options ATA_STATIC_ID # Static device numbering device mvs # Marvell 88SX50XX/88SX60XX/88SX70XX/SoC SATA device siis # SiliconImage SiI3124/SiI3132/SiI3531 SATA Modified: head/sys/i386/conf/XBOX ============================================================================== --- head/sys/i386/conf/XBOX Sun Oct 11 08:28:49 2015 (r289136) +++ head/sys/i386/conf/XBOX Sun Oct 11 13:01:51 2015 (r289137) @@ -51,7 +51,6 @@ device pci # ATA and ATAPI devices device ata -options ATA_STATIC_ID # Static device numbering # ATA/SCSI peripherals device scbus # SCSI bus (required for ATA/SCSI) Modified: head/sys/mips/conf/OCTEON1 ============================================================================== --- head/sys/mips/conf/OCTEON1 Sun Oct 11 08:28:49 2015 (r289136) +++ head/sys/mips/conf/OCTEON1 Sun Oct 11 13:01:51 2015 (r289137) @@ -108,7 +108,6 @@ device pci # ATA controllers device ahci # AHCI-compatible SATA controllers device ata # Legacy ATA/SATA controllers -options ATA_STATIC_ID # Static device numbering device mvs # Marvell 88SX50XX/88SX60XX/88SX70XX/SoC SATA device siis # SiliconImage SiI3124/SiI3132/SiI3531 SATA Modified: head/sys/mips/conf/std.SWARM ============================================================================== --- head/sys/mips/conf/std.SWARM Sun Oct 11 08:28:49 2015 (r289136) +++ head/sys/mips/conf/std.SWARM Sun Oct 11 13:01:51 2015 (r289137) @@ -57,4 +57,3 @@ device da device pass device ata -options ATA_STATIC_ID # Static device numbering Modified: head/sys/pc98/conf/GENERIC ============================================================================== --- head/sys/pc98/conf/GENERIC Sun Oct 11 08:28:49 2015 (r289136) +++ head/sys/pc98/conf/GENERIC Sun Oct 11 13:01:51 2015 (r289137) @@ -93,7 +93,6 @@ device fdc # ATA controllers device ahci # AHCI-compatible SATA controllers device ata # Legacy ATA/SATA controllers -options ATA_STATIC_ID # Static device numbering device mvs # Marvell 88SX50XX/88SX60XX/88SX70XX/SoC SATA device siis # SiliconImage SiI3124/SiI3132/SiI3531 SATA From owner-svn-src-all@freebsd.org Sun Oct 11 13:48:22 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5F8F2A1101A; Sun, 11 Oct 2015 13:48:22 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1EE2587B; Sun, 11 Oct 2015 13:48:22 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t9BDmLXO050203; Sun, 11 Oct 2015 13:48:21 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9BDmLWJ050199; Sun, 11 Oct 2015 13:48:21 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201510111348.t9BDmLWJ050199@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Sun, 11 Oct 2015 13:48:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289138 - in head/sys/cam: ata scsi X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 11 Oct 2015 13:48:22 -0000 Author: mav Date: Sun Oct 11 13:48:20 2015 New Revision: 289138 URL: https://svnweb.freebsd.org/changeset/base/289138 Log: Remove legacy CHS geometry from dmesg and unify capacity outputs. Modified: head/sys/cam/ata/ata_da.c head/sys/cam/scsi/scsi_cd.c head/sys/cam/scsi/scsi_da.c Modified: head/sys/cam/ata/ata_da.c ============================================================================== --- head/sys/cam/ata/ata_da.c Sun Oct 11 13:01:51 2015 (r289137) +++ head/sys/cam/ata/ata_da.c Sun Oct 11 13:48:20 2015 (r289138) @@ -1345,12 +1345,9 @@ adaregister(struct cam_periph *periph, v dp = &softc->params; snprintf(announce_buf, sizeof(announce_buf), - "%juMB (%ju %u byte sectors: %dH %dS/T %dC)", - (uintmax_t)(((uintmax_t)dp->secsize * - dp->sectors) / (1024*1024)), - (uintmax_t)dp->sectors, - dp->secsize, dp->heads, - dp->secs_per_track, dp->cylinders); + "%juMB (%ju %u byte sectors)", + ((uintmax_t)dp->secsize * dp->sectors) / (1024 * 1024), + (uintmax_t)dp->sectors, dp->secsize); xpt_announce_periph(periph, announce_buf); xpt_announce_quirks(periph, softc->quirks, ADA_Q_BIT_STRING); Modified: head/sys/cam/scsi/scsi_cd.c ============================================================================== --- head/sys/cam/scsi/scsi_cd.c Sun Oct 11 13:01:51 2015 (r289137) +++ head/sys/cam/scsi/scsi_cd.c Sun Oct 11 13:48:20 2015 (r289138) @@ -1081,11 +1081,11 @@ cddone(struct cam_periph *periph, union if ((csio->ccb_h.status & CAM_STATUS_MASK) == CAM_REQ_CMP || (error = cderror(done_ccb, CAM_RETRY_SELTO, SF_RETRY_UA | SF_NO_PRINT)) == 0) { - snprintf(announce_buf, sizeof(announce_buf), - "cd present [%lu x %lu byte records]", - cdp->disksize, (u_long)cdp->blksize); - + "%juMB (%ju %u byte sectors)", + ((uintmax_t)cdp->disksize * cdp->blksize) / + (1024 * 1024), + (uintmax_t)cdp->disksize, cdp->blksize); } else { if (error == ERESTART) { /* Modified: head/sys/cam/scsi/scsi_da.c ============================================================================== --- head/sys/cam/scsi/scsi_da.c Sun Oct 11 13:01:51 2015 (r289137) +++ head/sys/cam/scsi/scsi_da.c Sun Oct 11 13:48:20 2015 (r289138) @@ -3149,13 +3149,10 @@ dadone(struct cam_periph *periph, union lbp = (lalba & SRC16_LBPME_A); dp = &softc->params; snprintf(announce_buf, sizeof(announce_buf), - "%juMB (%ju %u byte sectors: %dH %dS/T " - "%dC)", (uintmax_t) - (((uintmax_t)dp->secsize * - dp->sectors) / (1024*1024)), - (uintmax_t)dp->sectors, - dp->secsize, dp->heads, - dp->secs_per_track, dp->cylinders); + "%juMB (%ju %u byte sectors)", + ((uintmax_t)dp->secsize * dp->sectors) / + (1024 * 1024), + (uintmax_t)dp->sectors, dp->secsize); } } else { int error; From owner-svn-src-all@freebsd.org Sun Oct 11 17:45:22 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0F8E3A11317; Sun, 11 Oct 2015 17:45:22 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: from mail-pa0-x22b.google.com (mail-pa0-x22b.google.com [IPv6:2607:f8b0:400e:c03::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 D58AC1357; Sun, 11 Oct 2015 17:45:21 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: by pabve7 with SMTP id ve7so74640409pab.2; Sun, 11 Oct 2015 10:45:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=content-type:mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=IDgmP7pkjvuRvxFECKxdxIKrAGFw5iHn7CXux4GZ7Jw=; b=IiT4EeuEqyluQcx3K5eiOPGPTWYSarBLN9U7lVN2DsyEHx5O4GtH2jUbC2s2gv2ymz KWxpDb+sQlhx74j5URa4ARtB265NyHoahGee3Y1+HXhRrPCPZU5ZvCtTrQHHyLzB9XTa SDFa9D528/pyKl+mWzWwEyq+/nGLnyUXF/LKNqysIb6gFkfX/pNIHxrc9mHvXHPgQmMJ 8U+ogoonpbgK2S2uZdezEI/Om9NbxfGzZnlv73lXybq6oj+5Bgw9NhmAMrFMbtXSQmhT Zz8Us7eiwAqyeGpHNfykSeAiTb6PqydHEszL2sWhXA68jZuYulzK7PlJpBmOWdq6/rbH XKjw== X-Received: by 10.66.190.6 with SMTP id gm6mr29285863pac.27.1444585521403; Sun, 11 Oct 2015 10:45:21 -0700 (PDT) Received: from ?IPv6:2601:601:800:126d:95a9:d549:1e19:96f3? ([2601:601:800:126d:95a9:d549:1e19:96f3]) by smtp.gmail.com with ESMTPSA id si10sm13835759pab.15.2015.10.11.10.45.20 (version=TLSv1/SSLv3 cipher=OTHER); Sun, 11 Oct 2015 10:45:20 -0700 (PDT) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (1.0) Subject: Re: svn commit: r289137 - in head: . sbin/geom/class/raid share/man/man4 sys/amd64/conf sys/arm/conf sys/cam sys/cam/ata sys/conf sys/geom sys/geom/raid sys/i386/conf sys/mips/conf sys/pc98/conf From: Garrett Cooper X-Mailer: iPhone Mail (13A452) In-Reply-To: <201510111301.t9BD1poi035565@repo.freebsd.org> Date: Sun, 11 Oct 2015 10:45:19 -0700 Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Transfer-Encoding: 7bit Message-Id: References: <201510111301.t9BD1poi035565@repo.freebsd.org> To: Alexander Motin X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 11 Oct 2015 17:45:22 -0000 > On Oct 11, 2015, at 06:01, Alexander Motin wrote: > > Author: mav > Date: Sun Oct 11 13:01:51 2015 > New Revision: 289137 > URL: https://svnweb.freebsd.org/changeset/base/289137 > > Log: > Remove compatibility shims for legacy ATA device names. > > We got new ATA stack in FreeBSD 8.x, switched to it at 9.x, completely > removed old stack at 10.x, so at 11.x it is time to remove compat shims. Relnotes: yes! From owner-svn-src-all@freebsd.org Sun Oct 11 17:45:22 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9F008A1131B; Sun, 11 Oct 2015 17:45:22 +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 514DC1359; Sun, 11 Oct 2015 17:45:22 +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 t9BHjKHs030540; Sun, 11 Oct 2015 17:45:20 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9BHjKtj030537; Sun, 11 Oct 2015 17:45:20 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201510111745.t9BHjKtj030537@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Sun, 11 Oct 2015 17:45:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289144 - head/contrib/dma X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 11 Oct 2015 17:45:22 -0000 Author: bapt Date: Sun Oct 11 17:45:20 2015 New Revision: 289144 URL: https://svnweb.freebsd.org/changeset/base/289144 Log: Fix build with gcc 4.2 Modified: head/contrib/dma/conf.c head/contrib/dma/dma.c head/contrib/dma/mail.c Modified: head/contrib/dma/conf.c ============================================================================== --- head/contrib/dma/conf.c Sun Oct 11 17:37:21 2015 (r289143) +++ head/contrib/dma/conf.c Sun Oct 11 17:45:20 2015 (r289144) @@ -121,7 +121,7 @@ parse_authfile(const char *path) au = calloc(1, sizeof(*au)); if (au == NULL) - errlog(EX_OSERR, NULL); + errlog(EX_OSERR, "calloc()"); data = strdup(line); au->login = strsep(&data, "|"); Modified: head/contrib/dma/dma.c ============================================================================== --- head/contrib/dma/dma.c Sun Oct 11 17:37:21 2015 (r289143) +++ head/contrib/dma/dma.c Sun Oct 11 17:45:20 2015 (r289144) @@ -596,7 +596,7 @@ skipopts: errlog(EX_SOFTWARE, "could not parse aliases file `%s'", config.aliases); if ((sender = set_from(&queue, sender)) == NULL) - errlog(EX_SOFTWARE, NULL); + errlog(EX_SOFTWARE, "set_from()"); if (newspoolf(&queue) != 0) errlog(EX_CANTCREAT, "can not create temp file in `%s'", config.spooldir); Modified: head/contrib/dma/mail.c ============================================================================== --- head/contrib/dma/mail.c Sun Oct 11 17:37:21 2015 (r289143) +++ head/contrib/dma/mail.c Sun Oct 11 17:45:20 2015 (r289144) @@ -333,7 +333,7 @@ newaddr: ps->pos = 0; addr = strdup(ps->addr); if (addr == NULL) - errlog(EX_SOFTWARE, NULL); + errlog(EX_SOFTWARE, "strdup"); if (add_recp(queue, addr, EXPAND_WILDCARD) != 0) errlogx(EX_DATAERR, "invalid recipient `%s'", addr); From owner-svn-src-all@freebsd.org Sun Oct 11 17:59:21 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B3343A11602; Sun, 11 Oct 2015 17:59:21 +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 7A44A1CE6; Sun, 11 Oct 2015 17:59:21 +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 t9BHxKgW033837; Sun, 11 Oct 2015 17:59:20 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9BHxKLF033836; Sun, 11 Oct 2015 17:59:20 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201510111759.t9BHxKLF033836@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Sun, 11 Oct 2015 17:59: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: r289145 - stable/10 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 " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 11 Oct 2015 17:59:21 -0000 Author: ian Date: Sun Oct 11 17:59:20 2015 New Revision: 289145 URL: https://svnweb.freebsd.org/changeset/base/289145 Log: MFC 288829 The latest version of lex requires the latest m4 to build, add a dependency when running the build-tools stage. The requirement is due to the -P flag used when running m4 from usr.bin/lex Makefile to generate skel.c. With the old m4 that fails and the failure is ignored, resulting in an empty(-ish) skel.c, which leads to later build failures when the misconfigured new lex tool is run. This enables building -current (and 10-stable after MFC) on a stable-8 system again. Modified: stable/10/Makefile.inc1 Directory Properties: stable/10/ (props changed) Modified: stable/10/Makefile.inc1 ============================================================================== --- stable/10/Makefile.inc1 Sun Oct 11 17:45:20 2015 (r289144) +++ stable/10/Makefile.inc1 Sun Oct 11 17:59:20 2015 (r289145) @@ -1283,6 +1283,8 @@ _cat= bin/cat .if ${BOOTSTRAPPING} < 1000033 _lex= usr.bin/lex + +${_bt}-usr.bin/lex: ${_bt}-usr.bin/m4 .endif .if ${BOOTSTRAPPING} >= 900040 && ${BOOTSTRAPPING} < 900041 From owner-svn-src-all@freebsd.org Sun Oct 11 18:26:07 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id DB5BEA11CE4; Sun, 11 Oct 2015 18:26:07 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B2CABC74; Sun, 11 Oct 2015 18:26:07 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t9BIQ6KM042787; Sun, 11 Oct 2015 18:26:06 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9BIQ6qI042785; Sun, 11 Oct 2015 18:26:06 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201510111826.t9BIQ6qI042785@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Sun, 11 Oct 2015 18:26:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289146 - in head: share/man/man4 sys/cam/scsi X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 11 Oct 2015 18:26:08 -0000 Author: mav Date: Sun Oct 11 18:26:06 2015 New Revision: 289146 URL: https://svnweb.freebsd.org/changeset/base/289146 Log: Make delete method set via kern.cam.da.X.delete_method persistent. This allows to set delete method via tunable, before device capabilities are known. Also allow ZERO method for devices not reporting LBP, if user explicitly requests it -- it may be useful if storage supports compression and WRITE SAME, but does not support UNMAP. MFC after: 2 weeks Modified: head/share/man/man4/da.4 head/sys/cam/scsi/scsi_da.c Modified: head/share/man/man4/da.4 ============================================================================== --- head/share/man/man4/da.4 Sun Oct 11 17:59:20 2015 (r289145) +++ head/share/man/man4/da.4 Sun Oct 11 18:26:06 2015 (r289146) @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd October 22, 2014 +.Dd October 11, 2015 .Dt DA 4 .Os .Sh NAME @@ -133,8 +133,7 @@ variables and .Xr loader 8 tunables: .Bl -tag -width 12 -.It kern.cam.da.retry_count -.Pp +.It Va kern.cam.da.retry_count This variable determines how many times the .Nm driver will retry a READ or WRITE command. @@ -143,8 +142,7 @@ the .Nm driver dump routine. This value currently defaults to 4. -.It kern.cam.da.default_timeout -.Pp +.It Va kern.cam.da.default_timeout This variable determines how long the .Nm driver will wait before timing out an outstanding command. @@ -152,20 +150,31 @@ The units for this value are seconds, an seconds. .It Va kern.cam.sort_io_queue .It Va kern.cam.da. Ns Ar X Ns Va .sort_io_queue -.Pp These variables determine whether request queue should be sorted trying to optimize head seeks. Set to 1 to enable sorting, 0 to disable, -1 to leave it as-is. The default is sorting enabled for HDDs and disabled for SSDs. -.It kern.cam.da.%d.minimum_cmd_size -.Pp +.It Va kern.cam.da. Ns Ar X Ns Va .delete_method +This variable specifies method to handle BIO_DELETE requests: +.Bl -tag +.It ATA_TRIM +ATA TRIM via ATA COMMAND PASS THROUGH command, +.It UNMAP +UNMAP command, +.It WS16 +WRITE SAME(16) command with UNMAP flag, +.It WS10 +WRITE SAME(10) command with UNMAP flag, +.It ZERO +WRITE SAME(10) command without UNMAP flag, +.It DISABLE +disable BIO_DELETE support. +.El +.It Va kern.cam.da. Ns Ar X Ns Va .minimum_cmd_size This variable determines what the minimum READ/WRITE CDB size is for a given .Nm unit. -(The %d above denotes the unit number of the -.Nm -driver instance, e.g.\& 1, 2, 4, 8, etc.) Valid minimum command size values are 6, 10, 12 and 16 bytes. The default is 6 bytes. .Pp Modified: head/sys/cam/scsi/scsi_da.c ============================================================================== --- head/sys/cam/scsi/scsi_da.c Sun Oct 11 17:59:20 2015 (r289145) +++ head/sys/cam/scsi/scsi_da.c Sun Oct 11 18:26:06 2015 (r289146) @@ -219,6 +219,7 @@ struct da_softc { uint32_t unmap_max_ranges; uint32_t unmap_max_lba; /* Max LBAs in UNMAP req */ uint64_t ws_max_blks; + da_delete_methods delete_method_pref; da_delete_methods delete_method; da_delete_func_t *delete_func; struct disk_params params; @@ -1801,7 +1802,7 @@ dasysctlinit(void *context, int pending) * the fly. */ SYSCTL_ADD_PROC(&softc->sysctl_ctx, SYSCTL_CHILDREN(softc->sysctl_tree), - OID_AUTO, "delete_method", CTLTYPE_STRING | CTLFLAG_RW, + OID_AUTO, "delete_method", CTLTYPE_STRING | CTLFLAG_RWTUN, softc, 0, dadeletemethodsysctl, "A", "BIO_DELETE execution method"); SYSCTL_ADD_PROC(&softc->sysctl_ctx, SYSCTL_CHILDREN(softc->sysctl_tree), @@ -1912,7 +1913,6 @@ static void dadeletemethodset(struct da_softc *softc, da_delete_methods delete_method) { - softc->delete_method = delete_method; softc->disk->d_delmaxsize = dadeletemaxsize(softc, delete_method); softc->delete_func = da_delete_functions[delete_method]; @@ -1965,25 +1965,17 @@ daprobedone(struct cam_periph *periph, u snprintf(buf, sizeof(buf), "Delete methods: <"); sep = 0; - for (i = DA_DELETE_MIN; i <= DA_DELETE_MAX; i++) { - if (softc->delete_available & (1 << i)) { - if (sep) { - strlcat(buf, ",", sizeof(buf)); - } else { - sep = 1; - } - strlcat(buf, da_delete_method_names[i], - sizeof(buf)); - if (i == softc->delete_method) { - strlcat(buf, "(*)", sizeof(buf)); - } - } - } - if (sep == 0) { - if (softc->delete_method == DA_DELETE_NONE) - strlcat(buf, "NONE(*)", sizeof(buf)); - else - strlcat(buf, "DISABLED(*)", sizeof(buf)); + for (i = 0; i <= DA_DELETE_MAX; i++) { + if ((softc->delete_available & (1 << i)) == 0 && + i != softc->delete_method) + continue; + if (sep) + strlcat(buf, ",", sizeof(buf)); + strlcat(buf, da_delete_method_names[i], + sizeof(buf)); + if (i == softc->delete_method) + strlcat(buf, "(*)", sizeof(buf)); + sep = 1; } strlcat(buf, ">", sizeof(buf)); printf("%s%d: %s\n", periph->periph_name, @@ -2013,21 +2005,28 @@ daprobedone(struct cam_periph *periph, u static void dadeletemethodchoose(struct da_softc *softc, da_delete_methods default_method) { - int i, delete_method; + int i, methods; - delete_method = default_method; + /* If available, prefer the method requested by user. */ + i = softc->delete_method_pref; + methods = softc->delete_available | (1 << DA_DELETE_DISABLE); + if (methods & (1 << i)) { + dadeletemethodset(softc, i); + return; + } - /* - * Use the pre-defined order to choose the best - * performing delete. - */ + /* Use the pre-defined order to choose the best performing delete. */ for (i = DA_DELETE_MIN; i <= DA_DELETE_MAX; i++) { + if (i == DA_DELETE_ZERO) + continue; if (softc->delete_available & (1 << i)) { dadeletemethodset(softc, i); return; } } - dadeletemethodset(softc, delete_method); + + /* Fallback to default. */ + dadeletemethodset(softc, default_method); } static int @@ -2051,13 +2050,14 @@ dadeletemethodsysctl(SYSCTL_HANDLER_ARGS return (error); methods = softc->delete_available | (1 << DA_DELETE_DISABLE); for (i = 0; i <= DA_DELETE_MAX; i++) { - if (!(methods & (1 << i)) || - strcmp(buf, da_delete_method_names[i]) != 0) - continue; - dadeletemethodset(softc, i); - return (0); + if (strcmp(buf, da_delete_method_names[i]) == 0) + break; } - return (EINVAL); + if (i > DA_DELETE_MAX) + return (EINVAL); + softc->delete_method_pref = i; + dadeletemethodchoose(softc, DA_DELETE_NONE); + return (0); } static cam_status @@ -3288,6 +3288,7 @@ dadone(struct cam_periph *periph, union /* Ensure re-probe doesn't see old delete. */ softc->delete_available = 0; + dadeleteflag(softc, DA_DELETE_ZERO, 1); if (lbp && (softc->quirks & DA_Q_NO_UNMAP) == 0) { /* * Based on older SBC-3 spec revisions @@ -3304,7 +3305,6 @@ dadone(struct cam_periph *periph, union */ dadeleteflag(softc, DA_DELETE_WS16, 1); dadeleteflag(softc, DA_DELETE_WS10, 1); - dadeleteflag(softc, DA_DELETE_ZERO, 1); dadeleteflag(softc, DA_DELETE_UNMAP, 1); xpt_release_ccb(done_ccb); @@ -3333,8 +3333,6 @@ dadone(struct cam_periph *periph, union (lbp->flags & SVPD_LBP_WS16)); dadeleteflag(softc, DA_DELETE_WS10, (lbp->flags & SVPD_LBP_WS10)); - dadeleteflag(softc, DA_DELETE_ZERO, - (lbp->flags & SVPD_LBP_WS10)); dadeleteflag(softc, DA_DELETE_UNMAP, (lbp->flags & SVPD_LBP_UNMAP)); } else { From owner-svn-src-all@freebsd.org Sun Oct 11 18:37:31 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 125E8A11EFC; Sun, 11 Oct 2015 18:37:31 +0000 (UTC) (envelope-from sbruno@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B578E106C; Sun, 11 Oct 2015 18:37:30 +0000 (UTC) (envelope-from sbruno@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t9BIbTQ0045740; Sun, 11 Oct 2015 18:37:29 GMT (envelope-from sbruno@FreeBSD.org) Received: (from sbruno@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9BIbTPQ045739; Sun, 11 Oct 2015 18:37:29 GMT (envelope-from sbruno@FreeBSD.org) Message-Id: <201510111837.t9BIbTPQ045739@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: sbruno set sender to sbruno@FreeBSD.org using -f From: Sean Bruno Date: Sun, 11 Oct 2015 18:37:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289147 - head/sys/mips/conf X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 11 Oct 2015 18:37:31 -0000 Author: sbruno Date: Sun Oct 11 18:37:29 2015 New Revision: 289147 URL: https://svnweb.freebsd.org/changeset/base/289147 Log: Correct flash layout (this is a 4M flash unit). Remove "rootfs" entry and assign the 800K or so to the kernel partition as this unit boots from usb mass storage. Modified: head/sys/mips/conf/TP-MR3020.hints Modified: head/sys/mips/conf/TP-MR3020.hints ============================================================================== --- head/sys/mips/conf/TP-MR3020.hints Sun Oct 11 18:26:06 2015 (r289146) +++ head/sys/mips/conf/TP-MR3020.hints Sun Oct 11 18:37:29 2015 (r289147) @@ -8,7 +8,7 @@ hint.argemdio.0.at="nexus0" hint.argemdio.0.maddr=0x1a000000 hint.argemdio.0.msize=0x1000 hint.argemdio.0.order=0 - + # There's no need to set the ar933x GMAC configuration bits. # This just creates a switch instance and correctly uses it. @@ -39,7 +39,7 @@ hint.ath.0.eepromsize=16384 hint.ar71xx.0.eeprom_mac_addr=0x1f01fc00 -# The board 16MiB flash layout in uboot env: +# The board 4MiB flash layout in uboot env: # # 256k(u-boot),64k(u-boot-env),2752k(rootfs),896k(uImage),64k(NVRAM),64k(ART) @@ -58,35 +58,28 @@ hint.map.1.at="flash/spi0" hint.map.1.start=0x00040000 hint.map.1.end=0x00050000 hint.map.1.name="uboot-env" -hint.map.1.readonly=0 +hint.map.1.readonly=1 -# 2752KB +# 3648KB hint.map.2.at="flash/spi0" hint.map.2.start=0x00050000 -hint.map.2.end="search:0x00100000:0x10000:.!/bin/sh" +hint.map.2.end=0x003e0000 hint.map.2.name="kernel" -hint.map.2.readonly=0 +hint.map.2.readonly=1 -# 896KB +# 64K NVRAM hint.map.3.at="flash/spi0" -hint.map.3.start="search:0x00100000:0x10000:.!/bin/sh" -hint.map.3.end=0x003e0000 -hint.map.3.name="rootfs" +hint.map.3.start=0x003e0000 +hint.map.3.end=0x003f0000 +hint.map.3.name="cfg" hint.map.3.readonly=0 -# 64K NVRAM -hint.map.4.at="flash/spi0" -hint.map.4.start=0x003e0000 -hint.map.4.end=0x003f0000 -hint.map.4.name="cfg" -hint.map.4.readonly=0 - # 64K ART -hint.map.5.at="flash/spi0" -hint.map.5.start=0x003f0000 -hint.map.5.end=0x00400000 -hint.map.5.name="art" -hint.map.5.readonly=1 +hint.map.4.at="flash/spi0" +hint.map.4.start=0x003f0000 +hint.map.4.end=0x00400000 +hint.map.4.name="art" +hint.map.4.readonly=1 # GPIO specific configuration block From owner-svn-src-all@freebsd.org Sun Oct 11 19:18:42 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id F0E4DA11633 for ; Sun, 11 Oct 2015 19:18:42 +0000 (UTC) (envelope-from jbeich@vfemail.net) Received: from vfemail.net (ninezero.vfemail.net [96.30.253.190]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id AEE0E164 for ; Sun, 11 Oct 2015 19:18:42 +0000 (UTC) (envelope-from jbeich@vfemail.net) Received: (qmail 82717 invoked by uid 89); 11 Oct 2015 19:18:35 -0000 Received: from localhost (HELO freequeue.vfemail.net) (127.0.0.1) by localhost with (DHE-RSA-AES256-SHA encrypted) SMTP; 11 Oct 2015 19:18:35 -0000 Received: (qmail 82657 invoked by uid 89); 11 Oct 2015 19:18:17 -0000 Received: by simscan 1.3.1 ppid: 82648, pid: 82652, t: 0.0038s scanners:none Received: from unknown (HELO smtp102-2.vfemail.net) (172.16.100.62) by FreeQueue with SMTP; 11 Oct 2015 19:18:17 -0000 Received: (qmail 32076 invoked by uid 89); 11 Oct 2015 19:18:17 -0000 Received: by simscan 1.4.0 ppid: 32043, pid: 32072, t: 0.8285s scanners:none Received: from unknown (HELO nil) (amJlaWNoQHZmZW1haWwubmV0@172.16.100.27) by 172.16.100.62 with ESMTPA; 11 Oct 2015 19:18:16 -0000 From: Jan Beich To: Baptiste Daroussin Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r289114 - in head: libexec/dma/dmagent share/mk usr.sbin/ppp In-Reply-To: <201510101048.t9AAm9UN054460@repo.freebsd.org> (Baptiste Daroussin's message of "Sat, 10 Oct 2015 10:48:09 +0000 (UTC)") References: <201510101048.t9AAm9UN054460@repo.freebsd.org> Date: Sun, 11 Oct 2015 21:17:57 +0200 Message-ID: MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha512; 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 " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 11 Oct 2015 19:18:43 -0000 --=-=-= Content-Type: text/plain Content-Transfer-Encoding: quoted-printable Baptiste Daroussin writes: > Modified: head/share/mk/bsd.own.mk > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D > --- head/share/mk/bsd.own.mk Sat Oct 10 09:37:31 2015 (r289113) > +++ head/share/mk/bsd.own.mk Sat Oct 10 10:48:09 2015 (r289114) > @@ -213,7 +213,7 @@ NLSGRP?=3D ${SHAREGRP} > NLSMODE?=3D ${NOBINMODE} >=20=20 > INCLUDEDIR?=3D /usr/include > -ETCDIR?=3D /etc > +CONFIGDIR?=3D /etc >=20=20 > # > # install(1) parameters. Why do you need CONFIGDIR when there's CONFDIR? Also, the former lacks description in the header of the file. --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQF8BAEBCgBmBQJWGrXlXxSAAAAAAC4AKGlzc3Vlci1mcHJAbm90YXRpb25zLm9w ZW5wZ3AuZmlmdGhob3JzZW1hbi5uZXREQjQ0MzY3NEM3RDIzNTc4NkUxNDkyQ0VF NEM3Nzg4MzQ3OURCRERCAAoJEOTHeINHnb3b1hUH/1v7+boQoSK9hb3aZ5QD0sUk yxhRgSW09smqPM+Yim1UymmpnMQVQuL0ZJ39RaFBpXBgfY29TbtvVVob7QzIZX0U 5lD4NXKJ9ZrrZa1ZP1of1UtyRfxomCxikDWiDSnaoCaP14CdFlrYi3dapuQkQ4tY KaPdf2nXEIGPziVodXRQUEjw/EXwcYeHYF3QfKVRNzGhLrmuYmhaM2tzhB4H3Yzu EHWeSUKEXfVkufuFVGM1aaIvHmsMI+3Fk9JUpT9u9axDMGQR7NxjHH6gIaK8bu+d D0Zqz4gpzAKfec/Jb9JcbNyGytb0RCrkiqQKujA7DaaajujaaKVnJtbTH/oig2M= =/ZXS -----END PGP SIGNATURE----- --=-=-=-- From owner-svn-src-all@freebsd.org Sun Oct 11 19:25:41 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1249CA11817; Sun, 11 Oct 2015 19:25:41 +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 B63FF80D; Sun, 11 Oct 2015 19:25:40 +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 t9BJPdUx060404; Sun, 11 Oct 2015 19:25:39 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9BJPd9d060401; Sun, 11 Oct 2015 19:25:39 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201510111925.t9BJPd9d060401@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Sun, 11 Oct 2015 19:25:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289148 - in head: libexec/dma/dmagent share/mk usr.sbin/ppp X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 11 Oct 2015 19:25:41 -0000 Author: bapt Date: Sun Oct 11 19:25:39 2015 New Revision: 289148 URL: https://svnweb.freebsd.org/changeset/base/289148 Log: Use existing CONFDIR instead of adding a new CONFIGDIR Reported by: jbeich Modified: head/libexec/dma/dmagent/Makefile head/share/mk/bsd.own.mk head/usr.sbin/ppp/Makefile Modified: head/libexec/dma/dmagent/Makefile ============================================================================== --- head/libexec/dma/dmagent/Makefile Sun Oct 11 18:37:29 2015 (r289147) +++ head/libexec/dma/dmagent/Makefile Sun Oct 11 19:25:39 2015 (r289148) @@ -17,7 +17,7 @@ SRCS= aliases_parse.y \ util.c MAN8= dma.8 CONFS= dma.conf -CONFSDIR= ${CONFIGDIR}/dma +CONFSDIR= ${CONFDIR}/dma YFLAGS+= -i CLEANFILES= aliases_parse.i FILES= mailer.conf Modified: head/share/mk/bsd.own.mk ============================================================================== --- head/share/mk/bsd.own.mk Sun Oct 11 18:37:29 2015 (r289147) +++ head/share/mk/bsd.own.mk Sun Oct 11 19:25:39 2015 (r289148) @@ -213,7 +213,6 @@ NLSGRP?= ${SHAREGRP} NLSMODE?= ${NOBINMODE} INCLUDEDIR?= /usr/include -CONFIGDIR?= /etc # # install(1) parameters. Modified: head/usr.sbin/ppp/Makefile ============================================================================== --- head/usr.sbin/ppp/Makefile Sun Oct 11 18:37:29 2015 (r289147) +++ head/usr.sbin/ppp/Makefile Sun Oct 11 19:25:39 2015 (r289148) @@ -22,7 +22,7 @@ PPP_NO_RADIUS= PPP_NO_SUID= .endif CONFS= ppp.conf -CONFSDIR= ${CONFIGDIR}/ppp +CONFSDIR= ${CONFDIR}/ppp CONFSMODE= 600 .if ${MK_ATM} == "no" From owner-svn-src-all@freebsd.org Sun Oct 11 19:26:16 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A30F1A1189A; Sun, 11 Oct 2015 19:26:16 +0000 (UTC) (envelope-from baptiste.daroussin@gmail.com) Received: from mail-wi0-x234.google.com (mail-wi0-x234.google.com [IPv6:2a00:1450:400c:c05::234]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 39CC096C; Sun, 11 Oct 2015 19:26:16 +0000 (UTC) (envelope-from baptiste.daroussin@gmail.com) Received: by wicgb1 with SMTP id gb1so27665031wic.1; Sun, 11 Oct 2015 12:26:13 -0700 (PDT) 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=yr6/+6jmmUFwP+IA1HOVHJZdBdJyjdM1bWkUUF2xXaI=; b=Y1LvSBmy5dexE5JYYaBgHXJVz2RDWh0TqygzfeGAV1zJzfJ30B++KZGPvKdhowhXbZ OcgzhNOsTc/ZqRBg60idG6kuF4Rj4FE2/vNPJLVY0rko1GiXyZEnHJHSN5DoouQAwwua pdZK5RjvAKklw9APPSpBvRdn+OC/pYO2qPb2NwPEZGg8Mf4Xk5mib17DyqJ07Up1nvkb Ly6C1Clzypc/t7JZmAkN4JtiO1pPhaxwBzyh0w1OkRFg9OwQTWcO9VaRmPqK4DuH3FsK JhKNRAy/kvWobzEE5eiEom8JCsPgXWYbRCtBGkY9YpskxGMvtXWCN7saMy0fIKXvhPKd TZNw== X-Received: by 10.180.10.170 with SMTP id j10mr5598547wib.48.1444591573845; Sun, 11 Oct 2015 12:26:13 -0700 (PDT) Received: from ivaldir.etoilebsd.net ([2001:41d0:8:db4c::1]) by smtp.gmail.com with ESMTPSA id bh5sm15380504wjb.42.2015.10.11.12.26.12 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 11 Oct 2015 12:26:13 -0700 (PDT) Sender: Baptiste Daroussin Date: Sun, 11 Oct 2015 21:26:11 +0200 From: Baptiste Daroussin To: Jan Beich Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r289114 - in head: libexec/dma/dmagent share/mk usr.sbin/ppp Message-ID: <20151011192610.GR91729@ivaldir.etoilebsd.net> References: <201510101048.t9AAm9UN054460@repo.freebsd.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="VmyrZ50r30oK77nV" Content-Disposition: inline In-Reply-To: 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 " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 11 Oct 2015 19:26:16 -0000 --VmyrZ50r30oK77nV Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sun, Oct 11, 2015 at 09:17:57PM +0200, Jan Beich wrote: > Baptiste Daroussin writes: >=20 > > Modified: head/share/mk/bsd.own.mk > > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D > > --- head/share/mk/bsd.own.mk Sat Oct 10 09:37:31 2015 (r289113) > > +++ head/share/mk/bsd.own.mk Sat Oct 10 10:48:09 2015 (r289114) > > @@ -213,7 +213,7 @@ NLSGRP?=3D ${SHAREGRP} > > NLSMODE?=3D ${NOBINMODE} > > =20 > > INCLUDEDIR?=3D /usr/include > > -ETCDIR?=3D /etc > > +CONFIGDIR?=3D /etc > > =20 > > # > > # install(1) parameters. >=20 > Why do you need CONFIGDIR when there's CONFDIR? Also, the former lacks > description in the header of the file. Because I missed it, fixed now. Best regards, Bapt --VmyrZ50r30oK77nV Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iEYEARECAAYFAlYat9IACgkQ8kTtMUmk6ExH9ACgnPEQ+CZpGHbZrgH31kPVwzHv uD0AoJuFeiRkPcx8JDReGM477n+42dod =z0hP -----END PGP SIGNATURE----- --VmyrZ50r30oK77nV-- From owner-svn-src-all@freebsd.org Sun Oct 11 19:58:58 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9C32DA11FA8; Sun, 11 Oct 2015 19:58:58 +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 662E41645; Sun, 11 Oct 2015 19:58:58 +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 t9BJwvPl069444; Sun, 11 Oct 2015 19:58:57 GMT (envelope-from pfg@FreeBSD.org) Received: (from pfg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9BJwvuI069443; Sun, 11 Oct 2015 19:58:57 GMT (envelope-from pfg@FreeBSD.org) Message-Id: <201510111958.t9BJwvuI069443@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: pfg set sender to pfg@FreeBSD.org using -f From: "Pedro F. Giffuni" Date: Sun, 11 Oct 2015 19:58:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289150 - head/contrib/gcc/cp X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 11 Oct 2015 19:58:58 -0000 Author: pfg Date: Sun Oct 11 19:58:57 2015 New Revision: 289150 URL: https://svnweb.freebsd.org/changeset/base/289150 Log: Correct handling of enum attributes with g++ From OpenBSD's commit log: This was responsible for memory corruption with recent versions of Mesa where c and c++ code share a header with a packed enum type. Reference: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=39219 Obtained from: OpenBSD (CVS rev. 1.2) MFC after: 1 week Modified: head/contrib/gcc/cp/parser.c Modified: head/contrib/gcc/cp/parser.c ============================================================================== --- head/contrib/gcc/cp/parser.c Sun Oct 11 19:30:09 2015 (r289149) +++ head/contrib/gcc/cp/parser.c Sun Oct 11 19:58:57 2015 (r289150) @@ -10906,6 +10906,7 @@ cp_parser_enum_specifier (cp_parser* par if (cp_parser_allow_gnu_extensions_p (parser)) { tree trailing_attr = cp_parser_attributes_opt (parser); + trailing_attr = chainon (trailing_attr, attributes); cplus_decl_attributes (&type, trailing_attr, (int) ATTR_FLAG_TYPE_IN_PLACE); From owner-svn-src-all@freebsd.org Sun Oct 11 20:02:12 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1DA6EA11127; Sun, 11 Oct 2015 20:02:12 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8C13F1B07; Sun, 11 Oct 2015 20:02:11 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t9BK2AKc072157; Sun, 11 Oct 2015 20:02:10 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9BK2Aob072156; Sun, 11 Oct 2015 20:02:10 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201510112002.t9BK2Aob072156@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Sun, 11 Oct 2015 20:02:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289151 - 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 " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 11 Oct 2015 20:02:12 -0000 Author: ngie Date: Sun Oct 11 20:02:10 2015 New Revision: 289151 URL: https://svnweb.freebsd.org/changeset/base/289151 Log: Simplify netbsd-tests.test.mk - projects/bmake and subsequent commits provide SRCTOP; there's no need to manually specify it now. - Compute a sane default for OBJTOP based on .OBJDIR and RELDIR. Manually specifying this is probably no longer needed, but it persists just in case (supporting commits will need to be made to move it out of some of the meta .mk files). - Compute a sane default for TESTSRC. Error out if the path cannot be found. MFC after: 2 weeks Sponsored by: EMC / Isilon Storage Division Modified: head/share/mk/netbsd-tests.test.mk Directory Properties: head/ (props changed) Modified: head/share/mk/netbsd-tests.test.mk ============================================================================== --- head/share/mk/netbsd-tests.test.mk Sun Oct 11 19:58:57 2015 (r289150) +++ head/share/mk/netbsd-tests.test.mk Sun Oct 11 20:02:10 2015 (r289151) @@ -3,16 +3,12 @@ .if !target(__netbsd_tests.test.mk__) __netbsd_tests.test.mk__: -.if !defined(OBJTOP) -.error "Please define OBJTOP to the absolute path of the top of the object tree" -.endif +OBJTOP?= ${.OBJDIR:S/${RELDIR}//} -.if !defined(SRCTOP) -.error "Please define SRCTOP to the absolute path of the top of the source tree" -.endif +TESTSRC?= ${SRCTOP}/contrib/netbsd-tests/${RELDIR:H} -.if !defined(TESTSRC) -.error "Please define TESTSRC to the absolute path of the test sources, e.g. contrib/netbsd-tests/lib/libc/stdio" +.if !exists(${TESTSRC}/) +.error "Please define TESTSRC to the absolute path of the test sources, e.g. $${SRCTOP}/contrib/netbsd-tests/lib/libc/stdio" .endif .PATH: ${TESTSRC} From owner-svn-src-all@freebsd.org Sun Oct 11 20:41:48 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id F305CA1190F for ; Sun, 11 Oct 2015 20:41:47 +0000 (UTC) (envelope-from jbeich@vfemail.net) Received: from vfemail.net (ninezero.vfemail.net [96.30.253.190]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A2A99A66 for ; Sun, 11 Oct 2015 20:41:47 +0000 (UTC) (envelope-from jbeich@vfemail.net) Received: (qmail 11405 invoked by uid 89); 11 Oct 2015 20:41:45 -0000 Received: from localhost (HELO freequeue.vfemail.net) (127.0.0.1) by localhost with (DHE-RSA-AES256-SHA encrypted) SMTP; 11 Oct 2015 20:41:45 -0000 Received: (qmail 11353 invoked by uid 89); 11 Oct 2015 20:41:28 -0000 Received: by simscan 1.3.1 ppid: 11345, pid: 11349, t: 0.0046s scanners:none Received: from unknown (HELO smtp102-2.vfemail.net) (172.16.100.62) by FreeQueue with SMTP; 11 Oct 2015 20:41:28 -0000 Received: (qmail 16801 invoked by uid 89); 11 Oct 2015 20:41:28 -0000 Received: by simscan 1.4.0 ppid: 16773, pid: 16797, t: 1.0702s scanners:none Received: from unknown (HELO nil) (amJlaWNoQHZmZW1haWwubmV0@172.16.100.27) by 172.16.100.62 with ESMTPA; 11 Oct 2015 20:41:27 -0000 From: Jan Beich To: Baptiste Daroussin Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r289085 - head/share/mk References: <201510092157.t99Lvgfu022041@repo.freebsd.org> Date: Sun, 11 Oct 2015 22:41:09 +0200 In-Reply-To: <201510092157.t99Lvgfu022041@repo.freebsd.org> (Baptiste Daroussin's message of "Fri, 9 Oct 2015 21:57:42 +0000 (UTC)") Message-ID: MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha512; 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 " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 11 Oct 2015 20:41:48 -0000 --=-=-= Content-Type: text/plain Content-Transfer-Encoding: quoted-printable Baptiste Daroussin writes: > +++ head/share/mk/bsd.confs.mk Fri Oct 9 21:57:42 2015 (r289085) [...] > +CONFGROUPS?=3D CONFS [...] > +.error bsd.conf.mk cannot be included directly. > +.for group in ${CONFSGROUPS} Typo: plural vs. singular [...] > +${group}OWN?=3D ${SHAREOWN} > +${group}GRP?=3D ${SHAREGRP} > +${group}MODE?=3D ${SHAREMODE} > +${group}DIR?=3D ${ETCDIR}/ Have you considered patching bsd.files.mk instead of copying it just to modify a few defaults? For one, bsd.confs.mk lacks r257095, r267276, r284345, r287185 - anything from a few years ago. Here's a quick attempt to merge changes back. Due to .mk files being out of sync I may have missed some. $ svn patch /path/to/below.diff $ rm -f /usr/share/mk/bsd.files.mk $ make -s install -C share/mk $ make -sj2 all -C libexec/dma/dmagent $ make -j2 install -C libexec/dma/dmagent =2D-- _proginstall --- =2D-- _FILESINS --- =2D-- _proginstall --- install -s -o root -g mail -m 2555 dma /usr/libexec/dma =2D-- _FILESINS --- install -o root -g wheel -m 444 mailer.conf /usr/share/examples/dma =2D-- _CONFSINS --- install -o root -g wheel -m 644 dma.conf /etc/dma =2D-- _maninstall --- install -o root -g wheel -m 444 dma.8.gz /usr/share/man/man8 Index: share/mk/bsd.prog.mk =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D =2D-- share/mk/bsd.prog.mk (revision 289150) +++ share/mk/bsd.prog.mk (working copy) @@ -249,7 +249,6 @@ _SCRIPTSINS_${script:T}: ${script} NLSNAME?=3D ${PROG} .include =20 =2D.include .include .include .include Index: share/mk/bsd.files.mk =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D =2D-- share/mk/bsd.files.mk (revision 289150) +++ share/mk/bsd.files.mk (working copy) @@ -7,7 +7,8 @@ .if !target(____) ____: =20 =2DFILESGROUPS?=3D FILES +FILESGROUPS?=3D FILES CONFS +FILESVARPREFIX?=3DFILES.SHARE CONFS.CONF =20 .for group in ${FILESGROUPS} # Add in foo.yes and remove duplicates from all the groups @@ -22,10 +23,10 @@ all: buildfiles .if defined(${group}) && !empty(${group}) installfiles: installfiles-${group} =20 =2D${group}OWN?=3D ${SHAREOWN} =2D${group}GRP?=3D ${SHAREGRP} =2D${group}MODE?=3D ${SHAREMODE} =2D${group}DIR?=3D ${BINDIR} +${group}OWN?=3D ${${FILESVARPREFIX:M${group}.*:E}OWN} +${group}GRP?=3D ${${FILESVARPREFIX:M${group}.*:E}GRP} +${group}MODE?=3D ${${FILESVARPREFIX:M${group}.*:E}MODE} +${group}DIR?=3D ${${FILESVARPREFIX:M${group}.*:E}DIR} .if !make(buildincludes) STAGE_SETS+=3D ${group} .endif @@ -56,7 +57,7 @@ stage_as.${file:T}: ${file} =20 installfiles-${group}: _${group}INS_${file:T} _${group}INS_${file:T}: ${file} =2D ${INSTALL} -o ${${group}OWN_${.ALLSRC:T}} \ + ${INSTALL} -C -o ${${group}OWN_${.ALLSRC:T}} \ -g ${${group}GRP_${.ALLSRC:T}} -m ${${group}MODE_${.ALLSRC:T}} \ ${.ALLSRC} \ ${DESTDIR}${${group}DIR_${.ALLSRC:T}}/${${group}NAME_${.ALLSRC:T}} @@ -70,11 +71,11 @@ stage_files.${group}: ${_${group}FILES} installfiles-${group}: _${group}INS _${group}INS: ${_${group}FILES} .if defined(${group}NAME) =2D ${INSTALL} -o ${${group}OWN} -g ${${group}GRP} \ + ${INSTALL} -C -o ${${group}OWN} -g ${${group}GRP} \ -m ${${group}MODE} ${.ALLSRC} \ ${DESTDIR}${${group}DIR}/${${group}NAME} .else =2D ${INSTALL} -o ${${group}OWN} -g ${${group}GRP} \ + ${INSTALL} -C -o ${${group}OWN} -g ${${group}GRP} \ -m ${${group}MODE} ${.ALLSRC} ${DESTDIR}${${group}DIR} .endif .endif Index: share/mk/bsd.lib.mk =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D =2D-- share/mk/bsd.lib.mk (revision 289150) +++ share/mk/bsd.lib.mk (working copy) @@ -390,7 +390,6 @@ _libinstall: .include .include .include =2D.include .endif =20 .include --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQF8BAEBCgBmBQJWGsllXxSAAAAAAC4AKGlzc3Vlci1mcHJAbm90YXRpb25zLm9w ZW5wZ3AuZmlmdGhob3JzZW1hbi5uZXREQjQ0MzY3NEM3RDIzNTc4NkUxNDkyQ0VF NEM3Nzg4MzQ3OURCRERCAAoJEOTHeINHnb3by8QIAKAFCbGff/58uAEi6PEVHOHq /IhHycYn8v1k/DEaIidxRzOYIHrscKXpjqJGnck3h+c8R6t648XxXBwE4jjJkq1C 2sVZtpW6Nu4Zed6V703SWx51YOIr64MdqzB/DPpeta0kUCVLWQM0rdyoOVOpPgPP uai4HQ43oCebHkAF7kvykucG4RSVsrjX5LDDoEsRjTjL3AMMZsxxVaHjUKDm8hja pe1d2xYi+ZtismCXICR9mI/J5Yel+1zlnd176EWEuY0pLZTgujHBll4n07NoIGHY tAIcW1+BIKiWO3nYR+GszG0BPlTqRvOOdKsfFCMAFb/t/TrMsgL01NKPqv3woVQ= =Qv1I -----END PGP SIGNATURE----- --=-=-=-- From owner-svn-src-all@freebsd.org Sun Oct 11 20:57:10 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id DB66AA11CD2; Sun, 11 Oct 2015 20:57:10 +0000 (UTC) (envelope-from cem@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A367DFF0; Sun, 11 Oct 2015 20:57:10 +0000 (UTC) (envelope-from cem@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t9BKv9BH086847; Sun, 11 Oct 2015 20:57:09 GMT (envelope-from cem@FreeBSD.org) Received: (from cem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9BKv90D086846; Sun, 11 Oct 2015 20:57:09 GMT (envelope-from cem@FreeBSD.org) Message-Id: <201510112057.t9BKv90D086846@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cem set sender to cem@FreeBSD.org using -f From: "Conrad E. Meyer" Date: Sun, 11 Oct 2015 20:57:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289152 - head/sys/dev/ntb/if_ntb X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 11 Oct 2015 20:57:11 -0000 Author: cem Date: Sun Oct 11 20:57:09 2015 New Revision: 289152 URL: https://svnweb.freebsd.org/changeset/base/289152 Log: NTB: MFV cc0f868d: fix pointer math issues ->remote_rx_info and ->rx_info are struct ntb_rx_info pointers. If we add sizeof(struct ntb_rx_info) then it goes too far. Authored by: Dan Carpenter Obtained from: Linux Sponsored by: EMC / Isilon Storage Division Modified: head/sys/dev/ntb/if_ntb/if_ntb.c Modified: head/sys/dev/ntb/if_ntb/if_ntb.c ============================================================================== --- head/sys/dev/ntb/if_ntb/if_ntb.c Sun Oct 11 20:02:10 2015 (r289151) +++ head/sys/dev/ntb/if_ntb/if_ntb.c Sun Oct 11 20:57:09 2015 (r289152) @@ -548,7 +548,7 @@ ntb_transport_init_queue(struct ntb_netd (qp_num / NTB_NUM_MW * tx_size)); tx_size -= sizeof(struct ntb_rx_info); - qp->tx_mw = qp->rx_info + sizeof(struct ntb_rx_info); + qp->tx_mw = qp->rx_info + 1; qp->tx_max_frame = min(transport_mtu + sizeof(struct ntb_payload_header), tx_size); qp->tx_max_entry = tx_size / qp->tx_max_frame; @@ -1148,7 +1148,7 @@ ntb_transport_setup_qp_mw(struct ntb_net (qp_num / NTB_NUM_MW * rx_size)); rx_size -= sizeof(struct ntb_rx_info); - qp->rx_buff = qp->remote_rx_info + sizeof(struct ntb_rx_info); + qp->rx_buff = qp->remote_rx_info + 1; qp->rx_max_frame = min(transport_mtu + sizeof(struct ntb_payload_header), rx_size); qp->rx_max_entry = rx_size / qp->rx_max_frame; From owner-svn-src-all@freebsd.org Sun Oct 11 20:58:01 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A699FA11D63; Sun, 11 Oct 2015 20:58:01 +0000 (UTC) (envelope-from cem@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 659851198; Sun, 11 Oct 2015 20:58:01 +0000 (UTC) (envelope-from cem@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t9BKw0tp086917; Sun, 11 Oct 2015 20:58:00 GMT (envelope-from cem@FreeBSD.org) Received: (from cem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9BKw0N0086915; Sun, 11 Oct 2015 20:58:00 GMT (envelope-from cem@FreeBSD.org) Message-Id: <201510112058.t9BKw0N0086915@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cem set sender to cem@FreeBSD.org using -f From: "Conrad E. Meyer" Date: Sun, 11 Oct 2015 20:58:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289153 - head/sys/dev/ntb/if_ntb X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 11 Oct 2015 20:58:01 -0000 Author: cem Date: Sun Oct 11 20:58:00 2015 New Revision: 289153 URL: https://svnweb.freebsd.org/changeset/base/289153 Log: NTB: MFV 113fc505: Handle 64bit BAR sizes 64bit BAR sizes are permissible with an NTB device. To support them various modifications and clean-ups were required, most significantly using 2 32bit scratch pad registers for each BAR. Also, modify the driver to allow more than 2 Memory Windows. Authored by: Jon Mason Obtained from: Linux Sponsored by: EMC / Isilon Storage Division Modified: head/sys/dev/ntb/if_ntb/if_ntb.c Modified: head/sys/dev/ntb/if_ntb/if_ntb.c ============================================================================== --- head/sys/dev/ntb/if_ntb/if_ntb.c Sun Oct 11 20:57:09 2015 (r289152) +++ head/sys/dev/ntb/if_ntb/if_ntb.c Sun Oct 11 20:58:00 2015 (r289153) @@ -194,11 +194,22 @@ struct ntb_payload_header { }; enum { + /* + * The order of this enum is part of the if_ntb remote protocol. Do + * not reorder without bumping protocol version (and it's probably best + * to keep the protocol in lock-step with the Linux NTB driver. + */ IF_NTB_VERSION = 0, - IF_NTB_MW0_SZ, - IF_NTB_MW1_SZ, - IF_NTB_NUM_QPS, IF_NTB_QP_LINKS, + IF_NTB_NUM_QPS, + IF_NTB_NUM_MWS, + /* + * N.B.: transport_link_work assumes MW1 enums = MW0 + 2. + */ + IF_NTB_MW0_SZ_HIGH, + IF_NTB_MW0_SZ_LOW, + IF_NTB_MW1_SZ_HIGH, + IF_NTB_MW1_SZ_LOW, IF_NTB_MAX_SPAD, }; @@ -242,6 +253,7 @@ static void ntb_rx_completion_task(void static void ntb_transport_event_callback(void *data, enum ntb_hw_event event); static void ntb_transport_link_work(void *arg); static int ntb_set_mw(struct ntb_netdev *nt, int num_mw, unsigned int size); +static void ntb_free_mw(struct ntb_netdev *nt, int num_mw); static void ntb_transport_setup_qp_mw(struct ntb_netdev *nt, unsigned int qp_num); static void ntb_qp_link_work(void *arg); @@ -514,9 +526,7 @@ ntb_transport_free(void *transport) ntb_unregister_event_callback(ntb); for (i = 0; i < NTB_NUM_MW; i++) - if (nt->mw[i].virt_addr != NULL) - contigfree(nt->mw[i].virt_addr, nt->mw[i].size, - M_NTB_IF); + ntb_free_mw(nt, i); free(nt->qps, M_NTB_IF); ntb_unregister_transport(ntb); @@ -1019,19 +1029,24 @@ ntb_transport_link_work(void *arg) struct ntb_netdev *nt = arg; struct ntb_softc *ntb = nt->ntb; struct ntb_transport_qp *qp; + uint64_t val64; uint32_t val; int rc, i; - /* send the local info */ - rc = ntb_write_remote_spad(ntb, IF_NTB_VERSION, NTB_TRANSPORT_VERSION); - if (rc != 0) - goto out; - - rc = ntb_write_remote_spad(ntb, IF_NTB_MW0_SZ, ntb_get_mw_size(ntb, 0)); - if (rc != 0) - goto out; + /* send the local info, in the opposite order of the way we read it */ + for (i = 0; i < NTB_NUM_MW; i++) { + rc = ntb_write_remote_spad(ntb, IF_NTB_MW0_SZ_HIGH + (i * 2), + ntb_get_mw_size(ntb, i) >> 32); + if (rc != 0) + goto out; + + rc = ntb_write_remote_spad(ntb, IF_NTB_MW0_SZ_LOW + (i * 2), + (uint32_t)ntb_get_mw_size(ntb, i)); + if (rc != 0) + goto out; + } - rc = ntb_write_remote_spad(ntb, IF_NTB_MW1_SZ, ntb_get_mw_size(ntb, 1)); + rc = ntb_write_remote_spad(ntb, IF_NTB_NUM_MWS, NTB_NUM_MW); if (rc != 0) goto out; @@ -1039,11 +1054,7 @@ ntb_transport_link_work(void *arg) if (rc != 0) goto out; - rc = ntb_read_remote_spad(ntb, IF_NTB_QP_LINKS, &val); - if (rc != 0) - goto out; - - rc = ntb_write_remote_spad(ntb, IF_NTB_QP_LINKS, val); + rc = ntb_write_remote_spad(ntb, IF_NTB_VERSION, NTB_TRANSPORT_VERSION); if (rc != 0) goto out; @@ -1062,27 +1073,32 @@ ntb_transport_link_work(void *arg) if (val != nt->max_qps) goto out; - rc = ntb_read_local_spad(ntb, IF_NTB_MW0_SZ, &val); - if (rc != 0) - goto out; - - if (val == 0) - goto out; - - rc = ntb_set_mw(nt, 0, val); - if (rc != 0) - return; - - rc = ntb_read_local_spad(ntb, IF_NTB_MW1_SZ, &val); + rc = ntb_read_local_spad(ntb, IF_NTB_NUM_MWS, &val); if (rc != 0) goto out; - if (val == 0) + if (val != NTB_NUM_MW) goto out; - rc = ntb_set_mw(nt, 1, val); - if (rc != 0) - return; + for (i = 0; i < NTB_NUM_MW; i++) { + rc = ntb_read_local_spad(ntb, IF_NTB_MW0_SZ_HIGH + (i * 2), + &val); + if (rc != 0) + goto free_mws; + + val64 = (uint64_t)val << 32; + + rc = ntb_read_local_spad(ntb, IF_NTB_MW0_SZ_LOW + (i * 2), + &val); + if (rc != 0) + goto free_mws; + + val64 |= val; + + rc = ntb_set_mw(nt, i, val64); + if (rc != 0) + goto free_mws; + } nt->transport_link = NTB_LINK_UP; if (bootverbose) @@ -1099,10 +1115,13 @@ ntb_transport_link_work(void *arg) return; +free_mws: + for (i = 0; i < NTB_NUM_MW; i++) + ntb_free_mw(nt, i); out: if (ntb_query_link_status(ntb)) callout_reset(&nt->link_work, - NTB_LINK_DOWN_TIMEOUT * hz / 1000, ntb_transport_link_work, nt); + NTB_LINK_DOWN_TIMEOUT * hz / 1000, ntb_transport_link_work, nt); } static int @@ -1130,6 +1149,18 @@ ntb_set_mw(struct ntb_netdev *nt, int nu } static void +ntb_free_mw(struct ntb_netdev *nt, int num_mw) +{ + struct ntb_transport_mw *mw = &nt->mw[num_mw]; + + if (mw->virt_addr == NULL) + return; + + contigfree(mw->virt_addr, mw->size, M_NTB_IF); + mw->virt_addr = NULL; +} + +static void ntb_transport_setup_qp_mw(struct ntb_netdev *nt, unsigned int qp_num) { struct ntb_transport_qp *qp = &nt->qps[qp_num]; From owner-svn-src-all@freebsd.org Sun Oct 11 20:59:03 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 857E0A11DC0; Sun, 11 Oct 2015 20:59:03 +0000 (UTC) (envelope-from cem@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4D5EF12F7; Sun, 11 Oct 2015 20:59:03 +0000 (UTC) (envelope-from cem@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t9BKx2Vp086990; Sun, 11 Oct 2015 20:59:02 GMT (envelope-from cem@FreeBSD.org) Received: (from cem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9BKx2Z1086989; Sun, 11 Oct 2015 20:59:02 GMT (envelope-from cem@FreeBSD.org) Message-Id: <201510112059.t9BKx2Z1086989@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cem set sender to cem@FreeBSD.org using -f From: "Conrad E. Meyer" Date: Sun, 11 Oct 2015 20:59:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289154 - head/sys/dev/ntb/if_ntb X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 11 Oct 2015 20:59:03 -0000 Author: cem Date: Sun Oct 11 20:59:02 2015 New Revision: 289154 URL: https://svnweb.freebsd.org/changeset/base/289154 Log: NTB: MFV b77b2637: Link toggle memory leak Each link-up will allocate a new NTB receive buffer when the NTB properties are negotiated with the remote system. These allocations did not check for existing buffers and thus did not free them. Now, the driver will check for an existing buffer and free it if not of the correct size, before trying to alloc a new one. Authored by: Jon Mason Obtained from: Linux Sponsored by: EMC / Isilon Storage Division Modified: head/sys/dev/ntb/if_ntb/if_ntb.c Modified: head/sys/dev/ntb/if_ntb/if_ntb.c ============================================================================== --- head/sys/dev/ntb/if_ntb/if_ntb.c Sun Oct 11 20:58:00 2015 (r289153) +++ head/sys/dev/ntb/if_ntb/if_ntb.c Sun Oct 11 20:59:02 2015 (r289154) @@ -1129,12 +1129,20 @@ ntb_set_mw(struct ntb_netdev *nt, int nu { struct ntb_transport_mw *mw = &nt->mw[num_mw]; + /* No need to re-setup */ + if (mw->size == size) + return (0); + + if (mw->size != 0) + ntb_free_mw(nt, num_mw); + /* Alloc memory for receiving data. Must be 4k aligned */ mw->size = size; mw->virt_addr = contigmalloc(mw->size, M_NTB_IF, M_ZERO, 0, BUS_SPACE_MAXADDR, mw->size, 0); if (mw->virt_addr == NULL) { + mw->size = 0; printf("ntb: Unable to allocate MW buffer of size %d\n", (int)mw->size); return (ENOMEM); From owner-svn-src-all@freebsd.org Sun Oct 11 20:59:41 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 80265A11E00; Sun, 11 Oct 2015 20:59:41 +0000 (UTC) (envelope-from cem@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4BA4F1499; Sun, 11 Oct 2015 20:59:41 +0000 (UTC) (envelope-from cem@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t9BKxex4087049; Sun, 11 Oct 2015 20:59:40 GMT (envelope-from cem@FreeBSD.org) Received: (from cem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9BKxeS9087048; Sun, 11 Oct 2015 20:59:40 GMT (envelope-from cem@FreeBSD.org) Message-Id: <201510112059.t9BKxeS9087048@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cem set sender to cem@FreeBSD.org using -f From: "Conrad E. Meyer" Date: Sun, 11 Oct 2015 20:59:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289155 - head/sys/dev/ntb/if_ntb X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 11 Oct 2015 20:59:41 -0000 Author: cem Date: Sun Oct 11 20:59:40 2015 New Revision: 289155 URL: https://svnweb.freebsd.org/changeset/base/289155 Log: NTB: MFV 90f9e934: reset tx_index on link toggle If the NTB link toggles, the driver could stop receiving due to the tx_index not being set to 0 on the transmitting size on a link-up event. This is due to the driver expecting the incoming data to start at the beginning of the receive buffer and not at a random place. Authored by: Jon Mason Obtained from: Linux Sponsored by: EMC / Isilon Storage Division Modified: head/sys/dev/ntb/if_ntb/if_ntb.c Modified: head/sys/dev/ntb/if_ntb/if_ntb.c ============================================================================== --- head/sys/dev/ntb/if_ntb/if_ntb.c Sun Oct 11 20:59:02 2015 (r289154) +++ head/sys/dev/ntb/if_ntb/if_ntb.c Sun Oct 11 20:59:40 2015 (r289155) @@ -562,7 +562,6 @@ ntb_transport_init_queue(struct ntb_netd qp->tx_max_frame = min(transport_mtu + sizeof(struct ntb_payload_header), tx_size); qp->tx_max_entry = tx_size / qp->tx_max_frame; - qp->tx_index = 0; callout_init(&qp->link_work, 0); callout_init(&qp->queue_full, 1); @@ -1192,7 +1191,6 @@ ntb_transport_setup_qp_mw(struct ntb_net rx_size); qp->rx_max_entry = rx_size / qp->rx_max_frame; qp->rx_index = 0; - qp->tx_index = 0; qp->remote_rx_info->entry = qp->rx_max_entry; @@ -1206,6 +1204,7 @@ ntb_transport_setup_qp_mw(struct ntb_net qp->rx_pkts = 0; qp->tx_pkts = 0; + qp->tx_index = 0; } static void From owner-svn-src-all@freebsd.org Sun Oct 11 21:00:20 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6B6499B101B; Sun, 11 Oct 2015 21:00:20 +0000 (UTC) (envelope-from cem@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3718118DE; Sun, 11 Oct 2015 21:00:20 +0000 (UTC) (envelope-from cem@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t9BL0J11087760; Sun, 11 Oct 2015 21:00:19 GMT (envelope-from cem@FreeBSD.org) Received: (from cem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9BL0JPt087759; Sun, 11 Oct 2015 21:00:19 GMT (envelope-from cem@FreeBSD.org) Message-Id: <201510112100.t9BL0JPt087759@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cem set sender to cem@FreeBSD.org using -f From: "Conrad E. Meyer" Date: Sun, 11 Oct 2015 21:00:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289156 - head/sys/dev/ntb/if_ntb X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 11 Oct 2015 21:00:20 -0000 Author: cem Date: Sun Oct 11 21:00:19 2015 New Revision: 289156 URL: https://svnweb.freebsd.org/changeset/base/289156 Log: NTB: MFV c9d534c8: Correctly handle receive buffers of the minimal size The ring logic of the NTB receive buffer/transmit memory window requires there to be at least 2 payload sized allotments. For the minimal size case, split the buffer into two and set the transport_mtu to the appropriate size. Authored by: Jon Mason Obtained from: Linux Sponsored by: EMC / Isilon Storage Division Modified: head/sys/dev/ntb/if_ntb/if_ntb.c Modified: head/sys/dev/ntb/if_ntb/if_ntb.c ============================================================================== --- head/sys/dev/ntb/if_ntb/if_ntb.c Sun Oct 11 20:59:40 2015 (r289155) +++ head/sys/dev/ntb/if_ntb/if_ntb.c Sun Oct 11 21:00:19 2015 (r289156) @@ -559,8 +559,9 @@ ntb_transport_init_queue(struct ntb_netd tx_size -= sizeof(struct ntb_rx_info); qp->tx_mw = qp->rx_info + 1; + /* Due to house-keeping, there must be at least 2 buffs */ qp->tx_max_frame = min(transport_mtu + sizeof(struct ntb_payload_header), - tx_size); + tx_size / 2); qp->tx_max_entry = tx_size / qp->tx_max_frame; callout_init(&qp->link_work, 0); @@ -1187,12 +1188,13 @@ ntb_transport_setup_qp_mw(struct ntb_net rx_size -= sizeof(struct ntb_rx_info); qp->rx_buff = qp->remote_rx_info + 1; + /* Due to house-keeping, there must be at least 2 buffs */ qp->rx_max_frame = min(transport_mtu + sizeof(struct ntb_payload_header), - rx_size); + rx_size / 2); qp->rx_max_entry = rx_size / qp->rx_max_frame; qp->rx_index = 0; - qp->remote_rx_info->entry = qp->rx_max_entry; + qp->remote_rx_info->entry = qp->rx_max_entry - 1; /* setup the hdr offsets with 0's */ for (i = 0; i < qp->rx_max_entry; i++) { From owner-svn-src-all@freebsd.org Sun Oct 11 21:01:16 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1AF999B1284; Sun, 11 Oct 2015 21:01:16 +0000 (UTC) (envelope-from cem@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D9A911F05; Sun, 11 Oct 2015 21:01:15 +0000 (UTC) (envelope-from cem@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t9BL1Edf087833; Sun, 11 Oct 2015 21:01:14 GMT (envelope-from cem@FreeBSD.org) Received: (from cem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9BL1EER087832; Sun, 11 Oct 2015 21:01:14 GMT (envelope-from cem@FreeBSD.org) Message-Id: <201510112101.t9BL1EER087832@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cem set sender to cem@FreeBSD.org using -f From: "Conrad E. Meyer" Date: Sun, 11 Oct 2015 21:01:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289157 - head/sys/dev/ntb/if_ntb X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 11 Oct 2015 21:01:16 -0000 Author: cem Date: Sun Oct 11 21:01:14 2015 New Revision: 289157 URL: https://svnweb.freebsd.org/changeset/base/289157 Log: NTB: MFV c336acd3: memcpy lockup workaround The system will appear to lockup for long periods of time due to the NTB driver spending too much time in memcpy. Avoid this by reducing the number of packets that can be serviced on a given interrupt. Authored by: Jon Mason Obtained from: Linux Sponsored by: EMC / Isilon Storage Division Modified: head/sys/dev/ntb/if_ntb/if_ntb.c Modified: head/sys/dev/ntb/if_ntb/if_ntb.c ============================================================================== --- head/sys/dev/ntb/if_ntb/if_ntb.c Sun Oct 11 21:00:19 2015 (r289156) +++ head/sys/dev/ntb/if_ntb/if_ntb.c Sun Oct 11 21:01:14 2015 (r289157) @@ -853,7 +853,8 @@ ntb_rx_pendq_full(void *arg) static void ntb_transport_rx(struct ntb_transport_qp *qp) { - int rc, i; + uint64_t i; + int rc; /* * Limit the number of packets processed in a single interrupt to @@ -861,7 +862,7 @@ ntb_transport_rx(struct ntb_transport_qp */ mtx_lock(&qp->transport->rx_lock); CTR0(KTR_NTB, "RX: transport_rx"); - for (i = 0; i < NTB_RX_MAX_PKTS; i++) { + for (i = 0; i < qp->rx_max_entry; i++) { rc = ntb_process_rxc(qp); if (rc != 0) { CTR0(KTR_NTB, "RX: process_rxc failed"); From owner-svn-src-all@freebsd.org Sun Oct 11 21:29:25 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A948D9B1890; Sun, 11 Oct 2015 21:29:25 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 58871D77; Sun, 11 Oct 2015 21:29:25 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t9BLTO4w096058; Sun, 11 Oct 2015 21:29:24 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9BLTONF096056; Sun, 11 Oct 2015 21:29:24 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201510112129.t9BLTONF096056@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Sun, 11 Oct 2015 21:29:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289158 - 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 " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 11 Oct 2015 21:29:25 -0000 Author: ngie Date: Sun Oct 11 21:29:24 2015 New Revision: 289158 URL: https://svnweb.freebsd.org/changeset/base/289158 Log: Default TESTSDIR to /usr/tests/${RELDIR:H} When run from bin/ls/tests, for example, the value of TESTSDIR would be ${TESTSBASE}/${RELDIR:H} -> /usr/tests/bin/ls/tests/.. -> /usr/tests/bin/ls Document the new behavior in bsd.README. While here, also document TESTSBASE Relnotes: yes Differential Revision: D1022 MFC after: 2 weeks Sponsored by: EMC / Isilon Storage Division Modified: head/share/mk/bsd.README head/share/mk/bsd.test.mk Directory Properties: head/ (props changed) Modified: head/share/mk/bsd.README ============================================================================== --- head/share/mk/bsd.README Sun Oct 11 21:01:14 2015 (r289157) +++ head/share/mk/bsd.README Sun Oct 11 21:29:24 2015 (r289158) @@ -474,10 +474,16 @@ It has seven targets: It sets/uses the following variables, among many others: -TESTDIR Path to the installed tests. Must be a subdirectory of +TESTSBASE Installation prefix for tests. Defaults to /usr/tests + +TESTSDIR Path to the installed tests. Must be a subdirectory of TESTSBASE and the subpath should match the relative location of the tests within the src tree. + The value of TESTSDIR defaults to + ${TESTSBASE}/${RELDIR:H} , e.g. /usr/tests/bin/ls when + included from bin/ls/tests . + KYUAFILE If 'auto' (the default), generate a Kyuafile out of the test programs defined in the Makefile. If 'yes', then a manually-crafted Kyuafile must be supplied with the Modified: head/share/mk/bsd.test.mk ============================================================================== --- head/share/mk/bsd.test.mk Sun Oct 11 21:01:14 2015 (r289157) +++ head/share/mk/bsd.test.mk Sun Oct 11 21:29:24 2015 (r289158) @@ -10,9 +10,8 @@ ____: -.ifndef TESTSDIR -.error "Please define TESTSDIR when including bsd.test.mk" -.endif +# Tests install directory +TESTSDIR?= ${TESTSBASE}/${RELDIR:H} # List of subdirectories containing tests into which to recurse. This has the # same semantics as SUBDIR at build-time. However, the directories listed here From owner-svn-src-all@freebsd.org Sun Oct 11 21:31:13 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 68BFE9B1946; Sun, 11 Oct 2015 21:31:13 +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 301931068; Sun, 11 Oct 2015 21:31:12 +0000 (UTC) (envelope-from cse.cem@gmail.com) Received: by ykba192 with SMTP id a192so116878262ykb.3; Sun, 11 Oct 2015 14:31:06 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=mime-version:reply-to:in-reply-to:references:date:message-id :subject:from:to:cc:content-type; bh=4pxCxxnqbhD1uODS1O4ngZ2gmhGV+72uzDDF6BR+p/s=; b=mhqWTS7z9nw4aFMJHdSuV7VO4cS9L4G3XW1Qf+CHAcovuG4o1JEoEaN67VTSpEWOVL h/XHMPcSD+aV+tY0zC9A2xTu9trgmulTCezg6wgiP6Cq4/BR+CmNTnP34fobg85Xz3Qz Eb51AzQ/keqEZ6BSSQrWnVq5qj82QCRtpDMu+1Xiv4lh0CIoIbFLiMA8d3t+vVfqagbT gq1/qvcWIvBjd1L+TiY+CFKTiYKAPFI69VmgxDqHlyWDAwUfoi8H3U8Uk4OeiPLkkANC whdPoqOjk8jCoutn7j86JmdjmajxER1BuPUc6oBRJ9dXMHZtbsXSo8lFncxWyouYG+NS iinA== X-Received: by 10.129.81.131 with SMTP id f125mr17605843ywb.271.1444597433244; Sun, 11 Oct 2015 14:03:53 -0700 (PDT) Received: from mail-yk0-f180.google.com (mail-yk0-f180.google.com. [209.85.160.180]) by smtp.gmail.com with ESMTPSA id c79sm9738392ywb.17.2015.10.11.14.03.52 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 11 Oct 2015 14:03:53 -0700 (PDT) Received: by ykec126 with SMTP id c126so83222544yke.2; Sun, 11 Oct 2015 14:03:52 -0700 (PDT) MIME-Version: 1.0 X-Received: by 10.129.70.139 with SMTP id t133mr17652548ywa.115.1444597432842; Sun, 11 Oct 2015 14:03:52 -0700 (PDT) Reply-To: cem@FreeBSD.org Received: by 10.37.60.198 with HTTP; Sun, 11 Oct 2015 14:03:52 -0700 (PDT) In-Reply-To: <201510112101.t9BL1EER087832@repo.freebsd.org> References: <201510112101.t9BL1EER087832@repo.freebsd.org> Date: Sun, 11 Oct 2015 14:03:52 -0700 Message-ID: Subject: Re: svn commit: r289157 - head/sys/dev/ntb/if_ntb From: Conrad Meyer To: svn-src-all@freebsd.org Cc: src-committers@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 " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 11 Oct 2015 21:31:13 -0000 On Sun, Oct 11, 2015 at 2:01 PM, Conrad E. Meyer wrote: > Author: cem > Date: Sun Oct 11 21:01:14 2015 > New Revision: 289157 > URL: https://svnweb.freebsd.org/changeset/base/289157 > > Log: > NTB: MFV c336acd3: memcpy lockup workaround This catches us up to the dual-licensed (BSD/GPL) Linux driver as of May 15, 2013. Best, Conrad From owner-svn-src-all@freebsd.org Sun Oct 11 21:49:10 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3F5B69B1E72; Sun, 11 Oct 2015 21:49:10 +0000 (UTC) (envelope-from baptiste.daroussin@gmail.com) Received: from mail-wi0-x22f.google.com (mail-wi0-x22f.google.com [IPv6:2a00:1450: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 DCF8D19D8; Sun, 11 Oct 2015 21:49:09 +0000 (UTC) (envelope-from baptiste.daroussin@gmail.com) Received: by wiclk2 with SMTP id lk2so130554124wic.1; Sun, 11 Oct 2015 14:49:08 -0700 (PDT) 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=hBZE3K4j3ugHOam1q84Ng75EvA0B60u8K2/5tBLnNOw=; b=mz20VLdQdG3JkywJXiltTNnVqTJs8UeRY5lkGvbvf5sJSQr58zbzXDy2OYXqTsl4O4 Xg5o/oiToq/naeSMXz7WxknEulv0LMqhB1Mbf7ADTnIkO9xR2+nnjXf+ENdzfiRHZOMc KoTYASZ0ZllBkwqw365iyZZ2RLBGL3a0M5mjyRAFLe7o1UzXST8+FKtY//vTwwuZs2DY mALdychIrtg3x3K5RVXDdkbl00IOLgpiT8k1rhmaUgLSpO4b/2Kp6IuNAogzjgIWvNGW 3gqgC3UrtxVVq+HRDgGn3phBKwXkenhdvdodfmCLQX06hrE1PmDXn/iNlFk9y7xIJaqo W35g== X-Received: by 10.180.90.229 with SMTP id bz5mr11617246wib.46.1444600148442; Sun, 11 Oct 2015 14:49:08 -0700 (PDT) Received: from ivaldir.etoilebsd.net ([2001:41d0:8:db4c::1]) by smtp.gmail.com with ESMTPSA id gl4sm3226299wjd.49.2015.10.11.14.49.07 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 11 Oct 2015 14:49:07 -0700 (PDT) Sender: Baptiste Daroussin Date: Sun, 11 Oct 2015 23:49:06 +0200 From: Baptiste Daroussin To: Jan Beich Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r289085 - head/share/mk Message-ID: <20151011214903.GS91729@ivaldir.etoilebsd.net> References: <201510092157.t99Lvgfu022041@repo.freebsd.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="96icqjDFsSi85SgI" Content-Disposition: inline In-Reply-To: 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 " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 11 Oct 2015 21:49:10 -0000 --96icqjDFsSi85SgI Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sun, Oct 11, 2015 at 10:41:09PM +0200, Jan Beich wrote: > Baptiste Daroussin writes: >=20 > > +++ head/share/mk/bsd.confs.mk Fri Oct 9 21:57:42 2015 (r289085) > [...] > > +CONFGROUPS?=3D CONFS > [...] > > +.error bsd.conf.mk cannot be included directly. > > +.for group in ${CONFSGROUPS} >=20 > Typo: plural vs. singular >=20 > [...] > > +${group}OWN?=3D ${SHAREOWN} > > +${group}GRP?=3D ${SHAREGRP} > > +${group}MODE?=3D ${SHAREMODE} > > +${group}DIR?=3D ${ETCDIR}/ >=20 > Have you considered patching bsd.files.mk instead of copying it just to > modify a few defaults? For one, bsd.confs.mk lacks r257095, r267276, > r284345, r287185 - anything from a few years ago. Yes I planned to merge, bsd.confs.mk was temporary to quickly unlock me on = my work on packaging base. >=20 > Here's a quick attempt to merge changes back. Due to .mk files being > out of sync I may have missed some. >=20 > $ svn patch /path/to/below.diff > $ rm -f /usr/share/mk/bsd.files.mk > $ make -s install -C share/mk > $ make -sj2 all -C libexec/dma/dmagent > $ make -j2 install -C libexec/dma/dmagent That misses the point, the goal here is explicitly not to install the configuration files during make install, but only when one call make installconfig which I have hoocked to make distribution (in Makefile.inc1) = to allow mergemaster/etcupdate to continue being able to merge them after installing them into a temporary destdir. Best regards, Bapt --96icqjDFsSi85SgI Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iEYEARECAAYFAlYa2U8ACgkQ8kTtMUmk6Ey/pgCeNE7kKAC+m4pybN4RGpcjUxCi N/8An2LtL/BnYj9Jetb+wWwuRVDOmuCg =3Zef -----END PGP SIGNATURE----- --96icqjDFsSi85SgI-- From owner-svn-src-all@freebsd.org Sun Oct 11 21:33:02 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 696649B1AA4; Sun, 11 Oct 2015 21:33:02 +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 26F68124B; Sun, 11 Oct 2015 21:33:02 +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 t9BLX1cl098814; Sun, 11 Oct 2015 21:33:01 GMT (envelope-from jilles@FreeBSD.org) Received: (from jilles@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9BLX067098808; Sun, 11 Oct 2015 21:33:00 GMT (envelope-from jilles@FreeBSD.org) Message-Id: <201510112133.t9BLX067098808@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jilles set sender to jilles@FreeBSD.org using -f From: Jilles Tjoelker Date: Sun, 11 Oct 2015 21:33:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289159 - head/bin/sh X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Mailman-Approved-At: Sun, 11 Oct 2015 22:11:24 +0000 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 11 Oct 2015 21:33:02 -0000 Author: jilles Date: Sun Oct 11 21:33:00 2015 New Revision: 289159 URL: https://svnweb.freebsd.org/changeset/base/289159 Log: sh: Make struct arglist an array instead of a linked list. This simplifies the code (e.g. allowing use of qsort(3) instead of a hand-rolled mergesort) and should have better cache properties. The waste of unused args arrays after resizes is approximately the same as the savings from getting rid of the next pointers. At the same time, remove a piece of global state and move some duplicated code into a function. Modified: head/bin/sh/eval.c head/bin/sh/eval.h head/bin/sh/expand.c head/bin/sh/expand.h head/bin/sh/var.c head/bin/sh/var.h Modified: head/bin/sh/eval.c ============================================================================== --- head/bin/sh/eval.c Sun Oct 11 21:29:24 2015 (r289158) +++ head/bin/sh/eval.c Sun Oct 11 21:33:00 2015 (r289159) @@ -82,7 +82,7 @@ static int builtin_flags; /* evalcommand char *commandname; -struct strlist *cmdenviron; +struct arglist *cmdenviron; int exitstatus; /* exit status of last command */ int oexitstatus; /* saved exit status */ @@ -352,20 +352,19 @@ evalfor(union node *n, int flags) { struct arglist arglist; union node *argp; - struct strlist *sp; + int i; int status; - arglist.lastp = &arglist.list; + emptyarglist(&arglist); for (argp = n->nfor.args ; argp ; argp = argp->narg.next) { oexitstatus = exitstatus; expandarg(argp, &arglist, EXP_FULL | EXP_TILDE); } - *arglist.lastp = NULL; loopnest++; status = 0; - for (sp = arglist.list ; sp ; sp = sp->next) { - setvar(n->nfor.var, sp->text, 0); + for (i = 0; i < arglist.count; i++) { + setvar(n->nfor.var, arglist.args[i], 0); evaltree(n->nfor.body, flags); status = exitstatus; if (evalskip) { @@ -396,12 +395,12 @@ evalcase(union node *n) union node *patp; struct arglist arglist; - arglist.lastp = &arglist.list; + emptyarglist(&arglist); oexitstatus = exitstatus; expandarg(n->ncase.expr, &arglist, EXP_TILDE); for (cp = n->ncase.cases ; cp ; cp = cp->nclist.next) { for (patp = cp->nclist.pattern ; patp ; patp = patp->narg.next) { - if (casematch(patp, arglist.list->text)) { + if (casematch(patp, arglist.args[0])) { while (cp->nclist.next && cp->type == NCLISTFALLTHRU && cp->nclist.body == NULL) @@ -508,7 +507,7 @@ exphere(union node *redir, struct arglis else { handler = &jmploc; expandarg(redir->nhere.doc, fn, 0); - redir->nhere.expdoc = fn->list->text; + redir->nhere.expdoc = fn->args[0]; INTOFF; } handler = savehandler; @@ -532,7 +531,7 @@ expredir(union node *n) for (redir = n ; redir ; redir = redir->nfile.next) { struct arglist fn; - fn.lastp = &fn.list; + emptyarglist(&fn); switch (redir->type) { case NFROM: case NTO: @@ -540,13 +539,13 @@ expredir(union node *n) case NAPPEND: case NCLOBBER: expandarg(redir->nfile.fname, &fn, EXP_TILDE); - redir->nfile.expfname = fn.list->text; + redir->nfile.expfname = fn.args[0]; break; case NFROMFD: case NTOFD: if (redir->ndup.vname) { expandarg(redir->ndup.vname, &fn, EXP_TILDE); - fixredir(redir, fn.list->text, 1); + fixredir(redir, fn.args[0], 1); } break; case NXHERE: @@ -753,28 +752,30 @@ isdeclarationcmd(struct narg *arg) static void xtracecommand(struct arglist *varlist, struct arglist *arglist) { - struct strlist *sp; char sep = 0; - const char *p, *ps4; + const char *text, *p, *ps4; + int i; ps4 = expandstr(ps4val()); out2str(ps4 != NULL ? ps4 : ps4val()); - for (sp = varlist->list ; sp ; sp = sp->next) { + for (i = 0; i < varlist->count; i++) { + text = varlist->args[i]; if (sep != 0) out2c(' '); - p = strchr(sp->text, '='); + p = strchr(text, '='); if (p != NULL) { p++; - outbin(sp->text, p - sp->text, out2); + outbin(text, p - text, out2); out2qstr(p); } else - out2qstr(sp->text); + out2qstr(text); sep = ' '; } - for (sp = arglist->list ; sp ; sp = sp->next) { + for (i = 0; i < arglist->count; i++) { + text = arglist->args[i]; if (sep != 0) out2c(' '); - out2qstr(sp->text); + out2qstr(text); sep = ' '; } out2c('\n'); @@ -822,7 +823,6 @@ evalcommand(union node *cmd, int flags, int argc; char **envp; int varflag; - struct strlist *sp; int mode; int pip[2]; struct cmdentry cmdentry; @@ -838,11 +838,12 @@ evalcommand(union node *cmd, int flags, int realstatus; int do_clearcmdentry; const char *path = pathval(); + int i; /* First expand the arguments. */ TRACE(("evalcommand(%p, %d) called\n", (void *)cmd, flags)); - arglist.lastp = &arglist.list; - varlist.lastp = &varlist.list; + emptyarglist(&arglist); + emptyarglist(&varlist); varflag = 1; jp = NULL; do_clearcmdentry = 0; @@ -857,25 +858,17 @@ evalcommand(union node *cmd, int flags, varflag = isdeclarationcmd(&argp->narg) ? 2 : 0; expandarg(argp, &arglist, EXP_FULL | EXP_TILDE); } - *arglist.lastp = NULL; - *varlist.lastp = NULL; expredir(cmd->ncmd.redirect); - argc = 0; - for (sp = arglist.list ; sp ; sp = sp->next) - argc++; + argc = arglist.count; /* Add one slot at the beginning for tryexec(). */ argv = stalloc(sizeof (char *) * (argc + 2)); argv++; - for (sp = arglist.list ; sp ; sp = sp->next) { - TRACE(("evalcommand arg: %s\n", sp->text)); - *argv++ = sp->text; - } - *argv = NULL; + memcpy(argv, arglist.args, sizeof(*argv) * argc); + argv[argc] = NULL; lastarg = NULL; if (iflag && funcnest == 0 && argc > 0) - lastarg = argv[-1]; - argv -= argc; + lastarg = argv[argc - 1]; /* Print the command if xflag is set. */ if (xflag) @@ -895,9 +888,9 @@ evalcommand(union node *cmd, int flags, * Modify the command lookup path, if a PATH= assignment * is present */ - for (sp = varlist.list ; sp ; sp = sp->next) - if (strncmp(sp->text, PATH, sizeof(PATH) - 1) == 0) { - path = sp->text + sizeof(PATH) - 1; + for (i = 0; i < varlist.count; i++) + if (strncmp(varlist.args[i], PATH, sizeof(PATH) - 1) == 0) { + path = varlist.args[i] + sizeof(PATH) - 1; /* * On `PATH=... command`, we need to make * sure that the command isn't using the @@ -999,7 +992,7 @@ evalcommand(union node *cmd, int flags, } if (cmdentry.cmdtype == CMDNORMAL && cmd->ncmd.redirect == NULL && - varlist.list == NULL && + varlist.count == 0 && (mode == FORK_FG || mode == FORK_NOJOB) && !disvforkset() && !iflag && !mflag) { vforkexecshell(jp, argv, environment(), path, @@ -1053,8 +1046,8 @@ evalcommand(union node *cmd, int flags, funcnest++; redirect(cmd->ncmd.redirect, REDIR_PUSH); INTON; - for (sp = varlist.list ; sp ; sp = sp->next) - mklocal(sp->text); + for (i = 0; i < varlist.count; i++) + mklocal(varlist.args[i]); exitstatus = oexitstatus; evaltree(getfuncnode(cmdentry.u.func), flags & (EV_TESTED | EV_EXIT)); @@ -1087,7 +1080,7 @@ evalcommand(union node *cmd, int flags, } savecmdname = commandname; savetopfile = getcurrentfile(); - cmdenviron = varlist.list; + cmdenviron = &varlist; e = -1; savehandler = handler; if (setjmp(jmploc.loc)) { @@ -1152,8 +1145,8 @@ cmddone: trputs("normal command: "); trargs(argv); #endif redirect(cmd->ncmd.redirect, 0); - for (sp = varlist.list ; sp ; sp = sp->next) - setvareq(sp->text, VEXPORT|VSTACK); + for (i = 0; i < varlist.count; i++) + setvareq(varlist.args[i], VEXPORT|VSTACK); envp = environment(); shellexec(argv, envp, path, cmdentry.u.index); /*NOTREACHED*/ @@ -1336,6 +1329,8 @@ truecmd(int argc __unused, char **argv _ int execcmd(int argc, char **argv) { + int i; + /* * Because we have historically not supported any options, * only treat "--" specially. @@ -1343,13 +1338,11 @@ execcmd(int argc, char **argv) if (argc > 1 && strcmp(argv[1], "--") == 0) argc--, argv++; if (argc > 1) { - struct strlist *sp; - iflag = 0; /* exit on error */ mflag = 0; optschanged(); - for (sp = cmdenviron; sp ; sp = sp->next) - setvareq(sp->text, VEXPORT|VSTACK); + for (i = 0; i < cmdenviron->count; i++) + setvareq(cmdenviron->args[i], VEXPORT|VSTACK); shellexec(argv + 1, environment(), pathval(), 0); } Modified: head/bin/sh/eval.h ============================================================================== --- head/bin/sh/eval.h Sun Oct 11 21:29:24 2015 (r289158) +++ head/bin/sh/eval.h Sun Oct 11 21:33:00 2015 (r289159) @@ -36,7 +36,7 @@ extern char *commandname; /* currently executing command */ extern int exitstatus; /* exit status of last command */ extern int oexitstatus; /* saved exit status */ -extern struct strlist *cmdenviron; /* environment for builtin command */ +extern struct arglist *cmdenviron; /* environment for builtin command */ struct backcmd { /* result of evalbackcmd */ Modified: head/bin/sh/expand.c ============================================================================== --- head/bin/sh/expand.c Sun Oct 11 21:29:24 2015 (r289158) +++ head/bin/sh/expand.c Sun Oct 11 21:33:00 2015 (r289159) @@ -96,7 +96,6 @@ static char *expdest; /* output of cur static struct nodelist *argbackq; /* list of back quote expressions */ static struct ifsregion ifsfirst; /* first struct in list of ifs regions */ static struct ifsregion *ifslastp; /* last struct in list */ -static struct arglist exparg; /* holds expanded arg list */ static char *argstr(char *, int); static char *exptilde(char *, int); @@ -110,15 +109,43 @@ static void varvalue(const char *, int, static void recordregion(int, int, int); static void removerecordregions(int); static void ifsbreakup(char *, struct arglist *); -static void expandmeta(struct strlist *); -static void expmeta(char *, char *); -static void addfname(char *); -static struct strlist *expsort(struct strlist *); -static struct strlist *msort(struct strlist *, int); +static void expandmeta(struct arglist *, struct arglist *); +static void expmeta(char *, char *, struct arglist *); +static int expsortcmp(const void *, const void *); static int patmatch(const char *, const char *, int); static char *cvtnum(int, char *); +static void appendarglist(struct arglist *, char *); static int collate_range_cmp(wchar_t, wchar_t); +void +emptyarglist(struct arglist *list) +{ + + list->args = list->smallarg; + list->count = 0; + list->capacity = sizeof(list->smallarg) / sizeof(list->smallarg[0]); +} + +static void +appendarglist(struct arglist *list, char *str) +{ + char **newargs; + int newcapacity; + + if (list->count >= list->capacity) { + newcapacity = list->capacity * 2; + if (newcapacity < 16) + newcapacity = 16; + if (newcapacity > INT_MAX / (int)sizeof(newargs[0])) + error("Too many entries in arglist"); + newargs = stalloc(newcapacity * sizeof(newargs[0])); + memcpy(newargs, list->args, list->count * sizeof(newargs[0])); + list->args = newargs; + list->capacity = newcapacity; + } + list->args[list->count++] = str; +} + static int collate_range_cmp(wchar_t c1, wchar_t c2) { @@ -157,7 +184,7 @@ stputs_quotes(const char *data, const ch void expandarg(union node *arg, struct arglist *arglist, int flag) { - struct strlist *sp; + struct arglist exparg; char *p; argbackq = arg->narg.backquote; @@ -171,18 +198,12 @@ expandarg(union node *arg, struct arglis } STPUTC('\0', expdest); p = grabstackstr(expdest); - exparg.lastp = &exparg.list; + emptyarglist(&exparg); if (flag & EXP_FULL) { ifsbreakup(p, &exparg); - *exparg.lastp = NULL; - exparg.lastp = &exparg.list; - expandmeta(exparg.list); - } else { - sp = (struct strlist *)stalloc(sizeof (struct strlist)); - sp->text = p; - *exparg.lastp = sp; - exparg.lastp = &sp->next; - } + expandmeta(&exparg, arglist); + } else + appendarglist(arglist, p); while (ifsfirst.next != NULL) { struct ifsregion *ifsp; INTOFF; @@ -191,11 +212,6 @@ expandarg(union node *arg, struct arglis ifsfirst.next = ifsp; INTON; } - *exparg.lastp = NULL; - if (exparg.list) { - *arglist->lastp = exparg.list; - arglist->lastp = exparg.lastp; - } } @@ -984,7 +1000,6 @@ static void ifsbreakup(char *string, struct arglist *arglist) { struct ifsregion *ifsp; - struct strlist *sp; char *start; char *p; char *q; @@ -996,10 +1011,7 @@ ifsbreakup(char *string, struct arglist if (ifslastp == NULL) { /* Return entire argument, IFS doesn't apply to any of it */ - sp = (struct strlist *)stalloc(sizeof *sp); - sp->text = start; - *arglist->lastp = sp; - arglist->lastp = &sp->next; + appendarglist(arglist, start); return; } @@ -1038,10 +1050,7 @@ ifsbreakup(char *string, struct arglist /* Save this argument... */ *q = '\0'; - sp = (struct strlist *)stalloc(sizeof *sp); - sp->text = start; - *arglist->lastp = sp; - arglist->lastp = &sp->next; + appendarglist(arglist, start); p++; if (ifsspc != NULL) { @@ -1071,12 +1080,8 @@ ifsbreakup(char *string, struct arglist * Some recent clarification of the Posix spec say that it * should only generate one.... */ - if (had_param_ch || *start != 0) { - sp = (struct strlist *)stalloc(sizeof *sp); - sp->text = start; - *arglist->lastp = sp; - arglist->lastp = &sp->next; - } + if (had_param_ch || *start != 0) + appendarglist(arglist, start); } @@ -1086,45 +1091,42 @@ static char expdir[PATH_MAX]; /* * Perform pathname generation and remove control characters. * At this point, the only control characters should be CTLESC and CTLQUOTEMARK. - * The results are stored in the list exparg. + * The results are stored in the list dstlist. */ static void -expandmeta(struct strlist *str) +expandmeta(struct arglist *srclist, struct arglist *dstlist) { char *p; - struct strlist **savelastp; - struct strlist *sp; + int firstmatch; + int i; char c; - while (str) { - savelastp = exparg.lastp; + for (i = 0; i < srclist->count; i++) { + firstmatch = dstlist->count; if (!fflag) { - p = str->text; + p = srclist->args[i]; for (; (c = *p) != '\0'; p++) { /* fast check for meta chars */ if (c == '*' || c == '?' || c == '[') { INTOFF; - expmeta(expdir, str->text); + expmeta(expdir, srclist->args[i], + dstlist); INTON; break; } } } - if (exparg.lastp == savelastp) { + if (dstlist->count == firstmatch) { /* * no matches */ - *exparg.lastp = str; - rmescapes(str->text); - exparg.lastp = &str->next; + rmescapes(srclist->args[i]); + appendarglist(dstlist, srclist->args[i]); } else { - *exparg.lastp = NULL; - *savelastp = sp = expsort(*savelastp); - while (sp->next != NULL) - sp = sp->next; - exparg.lastp = &sp->next; + qsort(&dstlist->args[firstmatch], + dstlist->count - firstmatch, + sizeof(dstlist->args[0]), expsortcmp); } - str = str->next; } } @@ -1134,7 +1136,7 @@ expandmeta(struct strlist *str) */ static void -expmeta(char *enddir, char *name) +expmeta(char *enddir, char *name, struct arglist *arglist) { const char *p; const char *q; @@ -1199,7 +1201,7 @@ expmeta(char *enddir, char *name) return; } if (metaflag == 0 || lstat(expdir, &statb) >= 0) - addfname(expdir); + appendarglist(arglist, stsavestr(expdir)); return; } endname = name + (p - name); @@ -1251,7 +1253,7 @@ expmeta(char *enddir, char *name) continue; memcpy(enddir, dp->d_name, namlen + 1); if (atend) - addfname(expdir); + appendarglist(arglist, stsavestr(expdir)); else { if (dp->d_type != DT_UNKNOWN && dp->d_type != DT_DIR && @@ -1261,7 +1263,7 @@ expmeta(char *enddir, char *name) continue; enddir[namlen] = '/'; enddir[namlen + 1] = '\0'; - expmeta(enddir + namlen + 1, endname); + expmeta(enddir + namlen + 1, endname, arglist); } } } @@ -1271,81 +1273,13 @@ expmeta(char *enddir, char *name) } -/* - * Add a file name to the list. - */ - -static void -addfname(char *name) -{ - char *p; - struct strlist *sp; - - p = stsavestr(name); - sp = (struct strlist *)stalloc(sizeof *sp); - sp->text = p; - *exparg.lastp = sp; - exparg.lastp = &sp->next; -} - - -/* - * Sort the results of file name expansion. It calculates the number of - * strings to sort and then calls msort (short for merge sort) to do the - * work. - */ - -static struct strlist * -expsort(struct strlist *str) +static int +expsortcmp(const void *p1, const void *p2) { - int len; - struct strlist *sp; + const char *s1 = *(const char * const *)p1; + const char *s2 = *(const char * const *)p2; - len = 0; - for (sp = str ; sp ; sp = sp->next) - len++; - return msort(str, len); -} - - -static struct strlist * -msort(struct strlist *list, int len) -{ - struct strlist *p, *q = NULL; - struct strlist **lpp; - int half; - int n; - - if (len <= 1) - return list; - half = len >> 1; - p = list; - for (n = half ; --n >= 0 ; ) { - q = p; - p = p->next; - } - q->next = NULL; /* terminate first half of list */ - q = msort(list, half); /* sort first half of list */ - p = msort(p, len - half); /* sort second half */ - lpp = &list; - for (;;) { - if (strcmp(p->text, q->text) < 0) { - *lpp = p; - lpp = &p->next; - if ((p = *lpp) == NULL) { - *lpp = q; - break; - } - } else { - *lpp = q; - lpp = &q->next; - if ((q = *lpp) == NULL) { - *lpp = p; - break; - } - } - } - return list; + return (strcmp(s1, s2)); } @@ -1666,11 +1600,11 @@ freebsd_wordexpcmd(int argc __unused, ch { struct arglist arglist; union node *args, *n; - struct strlist *sp; - size_t count, len; + size_t len; int ch; int protected = 0; int fd = -1; + int i; while ((ch = nextopt("f:p")) != '\0') { switch (ch) { @@ -1699,14 +1633,13 @@ freebsd_wordexpcmd(int argc __unused, ch } } outcslow(' ', out1); - arglist.lastp = &arglist.list; + emptyarglist(&arglist); for (n = args; n != NULL; n = n->narg.next) expandarg(n, &arglist, EXP_FULL | EXP_TILDE); - *arglist.lastp = NULL; - for (sp = arglist.list, count = len = 0; sp; sp = sp->next) - count++, len += strlen(sp->text); - out1fmt("%016zx %016zx", count, len); - for (sp = arglist.list; sp; sp = sp->next) - outbin(sp->text, strlen(sp->text) + 1, out1); + for (i = 0, len = 0; i < arglist.count; i++) + len += strlen(arglist.args[i]); + out1fmt("%016x %016zx", arglist.count, len); + for (i = 0; i < arglist.count; i++) + outbin(arglist.args[i], strlen(arglist.args[i]) + 1, out1); return (0); } Modified: head/bin/sh/expand.h ============================================================================== --- head/bin/sh/expand.h Sun Oct 11 21:29:24 2015 (r289158) +++ head/bin/sh/expand.h Sun Oct 11 21:33:00 2015 (r289159) @@ -33,15 +33,11 @@ * $FreeBSD$ */ -struct strlist { - struct strlist *next; - char *text; -}; - - struct arglist { - struct strlist *list; - struct strlist **lastp; + char **args; + int count; + int capacity; + char *smallarg[1]; }; /* @@ -55,6 +51,7 @@ struct arglist { #define EXP_LIT_QUOTED 0x40 /* for EXP_SPLIT_LIT, start off quoted */ +void emptyarglist(struct arglist *); union node; void expandarg(union node *, struct arglist *, int); void rmescapes(char *); Modified: head/bin/sh/var.c ============================================================================== --- head/bin/sh/var.c Sun Oct 11 21:29:24 2015 (r289158) +++ head/bin/sh/var.c Sun Oct 11 21:33:00 2015 (r289159) @@ -403,14 +403,13 @@ setvareq_const(const char *s, int flags) */ void -listsetvar(struct strlist *list, int flags) +listsetvar(struct arglist *list, int flags) { - struct strlist *lp; + int i; INTOFF; - for (lp = list ; lp ; lp = lp->next) { - setvareq(savestr(lp->text), flags); - } + for (i = 0; i < list->count; i++) + setvareq(savestr(list->args[i]), flags); INTON; } @@ -442,14 +441,14 @@ lookupvar(const char *name) char * bltinlookup(const char *name, int doall) { - struct strlist *sp; struct var *v; char *result; + int i; result = NULL; - for (sp = cmdenviron ; sp ; sp = sp->next) { - if (varequal(sp->text, name)) - result = strchr(sp->text, '=') + 1; + if (cmdenviron) for (i = 0; i < cmdenviron->count; i++) { + if (varequal(cmdenviron->args[i], name)) + result = strchr(cmdenviron->args[i], '=') + 1; } if (result != NULL) return result; @@ -468,13 +467,12 @@ bltinlookup(const char *name, int doall) void bltinsetlocale(void) { - struct strlist *lp; int act = 0; char *loc, *locdef; int i; - for (lp = cmdenviron ; lp ; lp = lp->next) { - if (localevar(lp->text)) { + if (cmdenviron) for (i = 0; i < cmdenviron->count; i++) { + if (localevar(cmdenviron->args[i])) { act = 1; break; } @@ -507,11 +505,11 @@ bltinsetlocale(void) void bltinunsetlocale(void) { - struct strlist *lp; + int i; INTOFF; - for (lp = cmdenviron ; lp ; lp = lp->next) { - if (localevar(lp->text)) { + if (cmdenviron) for (i = 0; i < cmdenviron->count; i++) { + if (localevar(cmdenviron->args[i])) { setlocale(LC_ALL, ""); updatecharset(); return; Modified: head/bin/sh/var.h ============================================================================== --- head/bin/sh/var.h Sun Oct 11 21:29:24 2015 (r289158) +++ head/bin/sh/var.h Sun Oct 11 21:33:00 2015 (r289159) @@ -114,8 +114,8 @@ extern int initial_localeisutf8; void initvar(void); void setvar(const char *, const char *, int); void setvareq(char *, int); -struct strlist; -void listsetvar(struct strlist *, int); +struct arglist; +void listsetvar(struct arglist *, int); char *lookupvar(const char *); char *bltinlookup(const char *, int); void bltinsetlocale(void); From owner-svn-src-all@freebsd.org Mon Oct 12 00:20:04 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8BE5FA1052C; Mon, 12 Oct 2015 00:20:04 +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 5184C855; Mon, 12 Oct 2015 00:20:04 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: by igkz10 with SMTP id z10so36762036igk.1; Sun, 11 Oct 2015 17:20:03 -0700 (PDT) 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=6V2h8NqBJ6lH+Sz3l6olBb0TbZ68uWZ0HquqoF65khA=; b=cGGx7fjeJN6SDEM4annhWPzzxhJDdhZyqKItSKi8f9/+b54XySEBTbHYGR4K9YmLjz /vhU4y8Je2NQqflYUDHxF3XVwGKk+ERLot48RxCCnG3i4WS1UGkXXNRIEA2rOp6aF+wJ ZK3erRTDg39o4380zHulrdVyqNKl2jcXMA4P7pZXSpWzIYMupecSEl3HEn/F0H5zNA58 kaQKHn04NqqRi9B3H69yAEL5lVlW4RBwP6Tv2O4BTPJR0uCKIJ0qZflZG+Ft+RnKR5yj M/6c3a9MOpctb0/8YITu6p+Yg59yXawf0C9XaZEEZ7vJLRilhm+EXiaUas0r4FwfT/Pj EXoQ== MIME-Version: 1.0 X-Received: by 10.50.61.243 with SMTP id t19mr9031568igr.22.1444609203724; Sun, 11 Oct 2015 17:20:03 -0700 (PDT) Received: by 10.36.2.10 with HTTP; Sun, 11 Oct 2015 17:20:03 -0700 (PDT) In-Reply-To: <201510111958.t9BJwvuI069443@repo.freebsd.org> References: <201510111958.t9BJwvuI069443@repo.freebsd.org> Date: Sun, 11 Oct 2015 17:20:03 -0700 Message-ID: Subject: Re: svn commit: r289150 - head/contrib/gcc/cp From: Adrian Chadd To: "Pedro F. Giffuni" 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 " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Oct 2015 00:20:04 -0000 Heya! How'd you test this? Sean is reporting (on irc) there's some weirdness after this commit. -a On 11 October 2015 at 12:58, Pedro F. Giffuni wrote: > Author: pfg > Date: Sun Oct 11 19:58:57 2015 > New Revision: 289150 > URL: https://svnweb.freebsd.org/changeset/base/289150 > > Log: > Correct handling of enum attributes with g++ > > From OpenBSD's commit log: > > This was responsible for memory corruption with recent versions > of Mesa where c and c++ code share a header with a packed enum type. > > Reference: > https://gcc.gnu.org/bugzilla/show_bug.cgi?id=39219 > > Obtained from: OpenBSD (CVS rev. 1.2) > MFC after: 1 week > > Modified: > head/contrib/gcc/cp/parser.c > > Modified: head/contrib/gcc/cp/parser.c > ============================================================================== > --- head/contrib/gcc/cp/parser.c Sun Oct 11 19:30:09 2015 (r289149) > +++ head/contrib/gcc/cp/parser.c Sun Oct 11 19:58:57 2015 (r289150) > @@ -10906,6 +10906,7 @@ cp_parser_enum_specifier (cp_parser* par > if (cp_parser_allow_gnu_extensions_p (parser)) > { > tree trailing_attr = cp_parser_attributes_opt (parser); > + trailing_attr = chainon (trailing_attr, attributes); > cplus_decl_attributes (&type, > trailing_attr, > (int) ATTR_FLAG_TYPE_IN_PLACE); > From owner-svn-src-all@freebsd.org Mon Oct 12 01:55:47 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D23719D2948 for ; Mon, 12 Oct 2015 01:55:47 +0000 (UTC) (envelope-from pfg@FreeBSD.org) Received: from nm6.bullet.mail.bf1.yahoo.com (nm6.bullet.mail.bf1.yahoo.com [98.139.212.165]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 846811D33 for ; Mon, 12 Oct 2015 01:55:47 +0000 (UTC) (envelope-from pfg@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1444614940; bh=sN6053TII39oyuqyLwk9d2CwMGdii2+uErht5nr7Aks=; h=Subject:To:References:Cc:From:Date:In-Reply-To:From:Subject; b=Q/4TcS7lyr2iDj0f3SOUKg6WRJXrhJkUDVCGKZP7ZNDQESJLs642+PVkqnY5I8mICh8W50qYFvx0O4ceDbnYpEHlfrWHMV1vOOdgzly7kGy2LzBl821cjrXtyE4P+uivCXj9T1r6roJX7dRgSnZDElYpnGHePO5p3wW/A2XuTxUu4sPI78htXx2wkyMIpJxff0llxfS86tVNmue/uadZnM70CmIOUkjMjXivZCCEUEDnobzget4SkPHZx6xDrVrmKHxJGZbgi5/aWwK4FCU8YsojJQKFo7leGpQ5R/+BUHzOsA10hieg97a80lgt20mGF3eOH1lF8BYcQVvqDPVlWQ== Received: from [66.196.81.172] by nm6.bullet.mail.bf1.yahoo.com with NNFMP; 12 Oct 2015 01:55:40 -0000 Received: from [98.139.211.196] by tm18.bullet.mail.bf1.yahoo.com with NNFMP; 12 Oct 2015 01:55:40 -0000 Received: from [127.0.0.1] by smtp205.mail.bf1.yahoo.com with NNFMP; 12 Oct 2015 01:55:40 -0000 X-Yahoo-Newman-Id: 253285.65294.bm@smtp205.mail.bf1.yahoo.com X-Yahoo-Newman-Property: ymail-3 X-YMail-OSG: yUklFI4VM1k92yFzUMuv4w3AFj4ntsfed2fliYX3hute.9k _4pzQdrIcy6tiS_asXKQTR.s0z3ZG_dg_oO8ytTskHSLKXc8Ro9BeDppOr3x BqsyZ9mXHb1IkjsC0NXgf6SmTUpExC7MybAxpFvPoTad_2Y1KtV_5S7Inocq 7J66PKyLuq7DhLdae260d_1Qqps.PHhbMd4YdAmFeVPkMX.1jOHhc_npPbdQ hhSuG.D4DrXFUZ7ggN.TZeV_9heqE3UjAGP8ZwZFU4ESSZHzIG3MKD.71OD4 gTKvsQoqXCf3JIAVrwyTCpSaDiDIz5RC5rg9aclfWVo.yGu5XYoq8NvVQo74 uWZ32_aX7Jf0atDc_jJFruv9nVM80ub0IJHf5HljA_sCws1h5jOOsH56QW91 bbLwGax5Mi2ta6zRZTbEhchoHbvgme0IO_KFJzcnLEactFJKw4q3Oxpehv7Q Z5gbKsRQwwJsi8j6sT2uzqZngQ1Nn5UCDmiwChli2wZ3u1BXqHVppqe8FqRW ZqXHQSxhZGMUqQtPnJHaR1VVEmfGBvnBP X-Yahoo-SMTP: xcjD0guswBAZaPPIbxpWwLcp9Unf Subject: Re: svn commit: r289150 - head/contrib/gcc/cp To: Adrian Chadd References: <201510111958.t9BJwvuI069443@repo.freebsd.org> Cc: "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" From: Pedro Giffuni Organization: FreeBSD Project Message-ID: <561B1314.4070106@FreeBSD.org> Date: Sun, 11 Oct 2015 20:55:32 -0500 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0 MIME-Version: 1.0 In-Reply-To: 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 " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Oct 2015 01:55:48 -0000 On 11/10/2015 07:20 p.m., Adrian Chadd wrote: > Heya! > > How'd you test this? Sean is reporting (on irc) there's some weirdness > after this commit. Hmm... I only rebuilt it and ran minimal tests in my box. It only looked imporant for mesa. I will revert to investigate, thanks for the report. Pedro. > > -a > > > On 11 October 2015 at 12:58, Pedro F. Giffuni wrote: >> Author: pfg >> Date: Sun Oct 11 19:58:57 2015 >> New Revision: 289150 >> URL: https://svnweb.freebsd.org/changeset/base/289150 >> >> Log: >> Correct handling of enum attributes with g++ >> >> From OpenBSD's commit log: >> >> This was responsible for memory corruption with recent versions >> of Mesa where c and c++ code share a header with a packed enum type. >> >> Reference: >> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=39219 >> >> Obtained from: OpenBSD (CVS rev. 1.2) >> MFC after: 1 week >> >> Modified: >> head/contrib/gcc/cp/parser.c >> >> Modified: head/contrib/gcc/cp/parser.c >> ============================================================================== >> --- head/contrib/gcc/cp/parser.c Sun Oct 11 19:30:09 2015 (r289149) >> +++ head/contrib/gcc/cp/parser.c Sun Oct 11 19:58:57 2015 (r289150) >> @@ -10906,6 +10906,7 @@ cp_parser_enum_specifier (cp_parser* par >> if (cp_parser_allow_gnu_extensions_p (parser)) >> { >> tree trailing_attr = cp_parser_attributes_opt (parser); >> + trailing_attr = chainon (trailing_attr, attributes); >> cplus_decl_attributes (&type, >> trailing_attr, >> (int) ATTR_FLAG_TYPE_IN_PLACE); >> From owner-svn-src-all@freebsd.org Mon Oct 12 02:05:26 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 59E7D9D2BBE; Mon, 12 Oct 2015 02:05:26 +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 2330C1AC; Mon, 12 Oct 2015 02:05:26 +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 t9C25PYL077783; Mon, 12 Oct 2015 02:05:25 GMT (envelope-from pfg@FreeBSD.org) Received: (from pfg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9C25PuZ077782; Mon, 12 Oct 2015 02:05:25 GMT (envelope-from pfg@FreeBSD.org) Message-Id: <201510120205.t9C25PuZ077782@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: pfg set sender to pfg@FreeBSD.org using -f From: "Pedro F. Giffuni" Date: Mon, 12 Oct 2015 02:05:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289160 - head/contrib/gcc/cp X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Oct 2015 02:05:26 -0000 Author: pfg Date: Mon Oct 12 02:05:25 2015 New Revision: 289160 URL: https://svnweb.freebsd.org/changeset/base/289160 Log: Revert r289150: Correct handling of enum attributes with g++ It is causing issues on some platforms. Reported by: sbruno (through adrian) Modified: head/contrib/gcc/cp/parser.c Modified: head/contrib/gcc/cp/parser.c ============================================================================== --- head/contrib/gcc/cp/parser.c Sun Oct 11 21:33:00 2015 (r289159) +++ head/contrib/gcc/cp/parser.c Mon Oct 12 02:05:25 2015 (r289160) @@ -10906,7 +10906,6 @@ cp_parser_enum_specifier (cp_parser* par if (cp_parser_allow_gnu_extensions_p (parser)) { tree trailing_attr = cp_parser_attributes_opt (parser); - trailing_attr = chainon (trailing_attr, attributes); cplus_decl_attributes (&type, trailing_attr, (int) ATTR_FLAG_TYPE_IN_PLACE); From owner-svn-src-all@freebsd.org Mon Oct 12 03:21:45 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id EE9FFA11FC9; Mon, 12 Oct 2015 03:21:45 +0000 (UTC) (envelope-from kevlo@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A253D1F54; Mon, 12 Oct 2015 03:21:45 +0000 (UTC) (envelope-from kevlo@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t9C3Litl001457; Mon, 12 Oct 2015 03:21:44 GMT (envelope-from kevlo@FreeBSD.org) Received: (from kevlo@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9C3Liji001456; Mon, 12 Oct 2015 03:21:44 GMT (envelope-from kevlo@FreeBSD.org) Message-Id: <201510120321.t9C3Liji001456@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kevlo set sender to kevlo@FreeBSD.org using -f From: Kevin Lo Date: Mon, 12 Oct 2015 03:21: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: r289161 - stable/10/sys/dev/usb/controller 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 " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Oct 2015 03:21:46 -0000 Author: kevlo Date: Mon Oct 12 03:21:44 2015 New Revision: 289161 URL: https://svnweb.freebsd.org/changeset/base/289161 Log: MFC r289030: Add support for Fresco Logic USB 3.0 host controller. Fresco Logic hosts advertise MSI, but fail to actually generate MSI interrupts. We have to disable MSI use. Reviewed by: hselasky Modified: stable/10/sys/dev/usb/controller/xhci_pci.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/usb/controller/xhci_pci.c ============================================================================== --- stable/10/sys/dev/usb/controller/xhci_pci.c Mon Oct 12 02:05:25 2015 (r289160) +++ stable/10/sys/dev/usb/controller/xhci_pci.c Mon Oct 12 03:21:44 2015 (r289161) @@ -99,11 +99,14 @@ xhci_pci_match(device_t self) case 0x01941033: return ("NEC uPD720200 USB 3.0 controller"); + case 0x10001b73: + return ("Fresco Logic FL1000G USB 3.0 controller"); + case 0x10421b21: return ("ASMedia ASM1042 USB 3.0 controller"); case 0x0f358086: - return ("Intel Intel BayTrail USB 3.0 controller"); + return ("Intel BayTrail USB 3.0 controller"); case 0x9c318086: case 0x1e318086: return ("Intel Panther Point USB 3.0 controller"); @@ -183,7 +186,8 @@ xhci_pci_attach(device_t self) { struct xhci_softc *sc = device_get_softc(self); int count, err, rid; - uint8_t usedma32; + uint8_t usemsi = 1; + uint8_t usedma32 = 0; rid = PCI_XHCI_CBMEM; sc->sc_io_res = bus_alloc_resource_any(self, SYS_RES_MEMORY, &rid, @@ -201,8 +205,9 @@ xhci_pci_attach(device_t self) case 0x01941033: /* NEC uPD720200 USB 3.0 controller */ usedma32 = 1; break; - default: - usedma32 = 0; + case 0x10001b73: /* FL1000G */ + /* Fresco Logic host doesn't support MSI. */ + usemsi = 0; break; } @@ -218,7 +223,7 @@ xhci_pci_attach(device_t self) usb_callout_init_mtx(&sc->sc_callout, &sc->sc_bus.bus_mtx, 0); rid = 0; - if (xhci_use_msi) { + if (xhci_use_msi && usemsi) { count = 1; if (pci_alloc_msi(self, &count) == 0) { if (bootverbose) From owner-svn-src-all@freebsd.org Mon Oct 12 03:27:11 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id ED46AA1109C; Mon, 12 Oct 2015 03:27:10 +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 A960418A; Mon, 12 Oct 2015 03:27:10 +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 t9C3R9Gx001761; Mon, 12 Oct 2015 03:27:09 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9C3R9rk001752; Mon, 12 Oct 2015 03:27:09 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201510120327.t9C3R9rk001752@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Mon, 12 Oct 2015 03:27:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289162 - in head/sys: dev/ath dev/usb/wlan net80211 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Oct 2015 03:27:11 -0000 Author: adrian Date: Mon Oct 12 03:27:08 2015 New Revision: 289162 URL: https://svnweb.freebsd.org/changeset/base/289162 Log: net80211: separate mbuf cleanup from ieee80211_fragment() * Create ieee80211_free_mbuf() which frees a list of mbufs. * Use it in the fragment transmit path and ath / uath transmit paths. * Call it in xmit_pkt() if the transmission fails; otherwise fragments may be leaked. This should be a big no-op. Submitted by: Differential Revision: https://reviews.freebsd.org/D3769 Modified: head/sys/dev/ath/if_ath.c head/sys/dev/ath/if_ath_tx.c head/sys/dev/ath/if_ath_tx.h head/sys/dev/usb/wlan/if_uath.c head/sys/net80211/ieee80211_freebsd.c head/sys/net80211/ieee80211_output.c head/sys/net80211/ieee80211_proto.h Modified: head/sys/dev/ath/if_ath.c ============================================================================== --- head/sys/dev/ath/if_ath.c Mon Oct 12 03:21:44 2015 (r289161) +++ head/sys/dev/ath/if_ath.c Mon Oct 12 03:27:08 2015 (r289162) @@ -3262,7 +3262,7 @@ ath_transmit(struct ieee80211com *ic, st * XXXGL: is mbuf valid after ath_txfrag_setup? If yes, * we shouldn't free it but return back. */ - ath_freetx(m); + ieee80211_free_mbuf(m); m = NULL; goto bad; } @@ -3356,7 +3356,7 @@ reclaim: __func__, ieee80211_state_name[ni->ni_vap->iv_state]); /* XXX dmamap */ - ath_freetx(next); + ieee80211_free_mbuf(next); goto reclaim; } m = next; Modified: head/sys/dev/ath/if_ath_tx.c ============================================================================== --- head/sys/dev/ath/if_ath_tx.c Mon Oct 12 03:21:44 2015 (r289161) +++ head/sys/dev/ath/if_ath_tx.c Mon Oct 12 03:27:08 2015 (r289162) @@ -283,22 +283,6 @@ ath_txfrag_setup(struct ath_softc *sc, a return !TAILQ_EMPTY(frags); } -/* - * Reclaim mbuf resources. For fragmented frames we - * need to claim each frag chained with m_nextpkt. - */ -void -ath_freetx(struct mbuf *m) -{ - struct mbuf *next; - - do { - next = m->m_nextpkt; - m->m_nextpkt = NULL; - m_freem(m); - } while ((m = next) != NULL); -} - static int ath_tx_dmasetup(struct ath_softc *sc, struct ath_buf *bf, struct mbuf *m0) { @@ -317,7 +301,7 @@ ath_tx_dmasetup(struct ath_softc *sc, st bf->bf_nseg = ATH_MAX_SCATTER + 1; } else if (error != 0) { sc->sc_stats.ast_tx_busdma++; - ath_freetx(m0); + ieee80211_free_mbuf(m0); return error; } /* @@ -329,7 +313,7 @@ ath_tx_dmasetup(struct ath_softc *sc, st sc->sc_stats.ast_tx_linear++; m = m_collapse(m0, M_NOWAIT, ATH_MAX_SCATTER); if (m == NULL) { - ath_freetx(m0); + ieee80211_free_mbuf(m0); sc->sc_stats.ast_tx_nombuf++; return ENOMEM; } @@ -339,14 +323,14 @@ ath_tx_dmasetup(struct ath_softc *sc, st BUS_DMA_NOWAIT); if (error != 0) { sc->sc_stats.ast_tx_busdma++; - ath_freetx(m0); + ieee80211_free_mbuf(m0); return error; } KASSERT(bf->bf_nseg <= ATH_MAX_SCATTER, ("too many segments after defrag; nseg %u", bf->bf_nseg)); } else if (bf->bf_nseg == 0) { /* null packet, discard */ sc->sc_stats.ast_tx_nodata++; - ath_freetx(m0); + ieee80211_free_mbuf(m0); return EIO; } DPRINTF(sc, ATH_DEBUG_XMIT, "%s: m %p len %u\n", @@ -1581,7 +1565,7 @@ ath_tx_normal_setup(struct ath_softc *sc /* Handle encryption twiddling if needed */ if (! ath_tx_tag_crypto(sc, ni, m0, iswep, isfrag, &hdrlen, &pktlen, &keyix)) { - ath_freetx(m0); + ieee80211_free_mbuf(m0); return EIO; } @@ -1693,7 +1677,7 @@ ath_tx_normal_setup(struct ath_softc *sc wh->i_fc[0] & IEEE80211_FC0_TYPE_MASK, __func__); /* XXX statistic */ /* XXX free tx dmamap */ - ath_freetx(m0); + ieee80211_free_mbuf(m0); return EIO; } @@ -1749,7 +1733,7 @@ ath_tx_normal_setup(struct ath_softc *sc "%s: discard frame, ACK required w/ TDMA\n", __func__); sc->sc_stats.ast_tdma_ack++; /* XXX free tx dmamap */ - ath_freetx(m0); + ieee80211_free_mbuf(m0); return EIO; } #endif @@ -2133,7 +2117,7 @@ ath_tx_raw_start(struct ath_softc *sc, s if (! ath_tx_tag_crypto(sc, ni, m0, params->ibp_flags & IEEE80211_BPF_CRYPTO, 0, &hdrlen, &pktlen, &keyix)) { - ath_freetx(m0); + ieee80211_free_mbuf(m0); return EIO; } /* packet header may have moved, reset our local pointer */ Modified: head/sys/dev/ath/if_ath_tx.h ============================================================================== --- head/sys/dev/ath/if_ath_tx.h Mon Oct 12 03:21:44 2015 (r289161) +++ head/sys/dev/ath/if_ath_tx.h Mon Oct 12 03:27:08 2015 (r289162) @@ -85,7 +85,6 @@ */ #define ATH_AGGR_MAXSIZE 65530 -extern void ath_freetx(struct mbuf *m); extern void ath_tx_node_flush(struct ath_softc *sc, struct ath_node *an); extern void ath_tx_txq_drain(struct ath_softc *sc, struct ath_txq *txq); extern void ath_txfrag_cleanup(struct ath_softc *sc, ath_bufhead *frags, Modified: head/sys/dev/usb/wlan/if_uath.c ============================================================================== --- head/sys/dev/usb/wlan/if_uath.c Mon Oct 12 03:21:44 2015 (r289161) +++ head/sys/dev/usb/wlan/if_uath.c Mon Oct 12 03:27:08 2015 (r289162) @@ -1663,22 +1663,6 @@ uath_txfrag_setup(struct uath_softc *sc, return !STAILQ_EMPTY(frags); } -/* - * Reclaim mbuf resources. For fragmented frames we need to claim each frag - * chained with m_nextpkt. - */ -static void -uath_freetx(struct mbuf *m) -{ - struct mbuf *next; - - do { - next = m->m_nextpkt; - m->m_nextpkt = NULL; - m_freem(m); - } while ((m = next) != NULL); -} - static int uath_transmit(struct ieee80211com *ic, struct mbuf *m) { @@ -1735,7 +1719,7 @@ uath_start(struct uath_softc *sc) !uath_txfrag_setup(sc, &frags, m, ni)) { DPRINTF(sc, UATH_DEBUG_XMIT, "%s: out of txfrag buffers\n", __func__); - uath_freetx(m); + ieee80211_free_mbuf(m); goto bad; } sc->sc_seqnum = 0; @@ -1770,7 +1754,7 @@ uath_start(struct uath_softc *sc) "%s: flush fragmented packet, state %s\n", __func__, ieee80211_state_name[ni->ni_vap->iv_state]); - uath_freetx(next); + ieee80211_free_mbuf(next); goto reclaim; } m = next; Modified: head/sys/net80211/ieee80211_freebsd.c ============================================================================== --- head/sys/net80211/ieee80211_freebsd.c Mon Oct 12 03:21:44 2015 (r289161) +++ head/sys/net80211/ieee80211_freebsd.c Mon Oct 12 03:27:08 2015 (r289162) @@ -545,7 +545,7 @@ ieee80211_parent_xmitpkt(struct ieee8021 IEEE80211_TX_LOCK_ASSERT(ic); error = ic->ic_transmit(ic, m); if (error) - m_freem(m); + ieee80211_free_mbuf(m); return (error); } Modified: head/sys/net80211/ieee80211_output.c ============================================================================== --- head/sys/net80211/ieee80211_output.c Mon Oct 12 03:21:44 2015 (r289161) +++ head/sys/net80211/ieee80211_output.c Mon Oct 12 03:27:08 2015 (r289162) @@ -1583,6 +1583,21 @@ bad: #undef MC01 } +void +ieee80211_free_mbuf(struct mbuf *m) +{ + struct mbuf *next; + + if (m == NULL) + return; + + do { + next = m->m_nextpkt; + m->m_nextpkt = NULL; + m_freem(m); + } while ((m = next) != NULL); +} + /* * Fragment the frame according to the specified mtu. * The size of the 802.11 header (w/o padding) is provided @@ -1597,7 +1612,7 @@ ieee80211_fragment(struct ieee80211vap * { struct ieee80211com *ic = vap->iv_ic; struct ieee80211_frame *wh, *whf; - struct mbuf *m, *prev, *next; + struct mbuf *m, *prev; u_int totalhdrsize, fragno, fragsize, off, remainder, payload; u_int hdrspace; @@ -1692,11 +1707,7 @@ ieee80211_fragment(struct ieee80211vap * return 1; bad: /* reclaim fragments but leave original frame for caller to free */ - for (m = m0->m_nextpkt; m != NULL; m = next) { - next = m->m_nextpkt; - m->m_nextpkt = NULL; /* XXX paranoid */ - m_freem(m); - } + ieee80211_free_mbuf(m0->m_nextpkt); m0->m_nextpkt = NULL; return 0; } Modified: head/sys/net80211/ieee80211_proto.h ============================================================================== --- head/sys/net80211/ieee80211_proto.h Mon Oct 12 03:21:44 2015 (r289161) +++ head/sys/net80211/ieee80211_proto.h Mon Oct 12 03:27:08 2015 (r289162) @@ -93,6 +93,7 @@ struct mbuf *ieee80211_mbuf_adjust(struc struct ieee80211_key *, struct mbuf *); struct mbuf *ieee80211_encap(struct ieee80211vap *, struct ieee80211_node *, struct mbuf *); +void ieee80211_free_mbuf(struct mbuf *); int ieee80211_send_mgmt(struct ieee80211_node *, int, int); struct ieee80211_appie; int ieee80211_send_probereq(struct ieee80211_node *ni, From owner-svn-src-all@freebsd.org Mon Oct 12 04:05:14 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 29383A11958; Mon, 12 Oct 2015 04:05:14 +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 00DE11347; Mon, 12 Oct 2015 04:05:13 +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 t9C45DEv013246; Mon, 12 Oct 2015 04:05:13 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9C45Cev013242; Mon, 12 Oct 2015 04:05:12 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201510120405.t9C45Cev013242@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Mon, 12 Oct 2015 04:05:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289163 - head/sys/dev/wpi X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Oct 2015 04:05:14 -0000 Author: adrian Date: Mon Oct 12 04:05:12 2015 New Revision: 289163 URL: https://svnweb.freebsd.org/changeset/base/289163 Log: wpi(4): add support for TX fragmentation. Tested: * Tested with Intel 3945BG, HOSTAP and STA modes Differential Revision: https://reviews.freebsd.org/D3770 Modified: head/sys/dev/wpi/if_wpi.c head/sys/dev/wpi/if_wpireg.h head/sys/dev/wpi/if_wpivar.h Modified: head/sys/dev/wpi/if_wpi.c ============================================================================== --- head/sys/dev/wpi/if_wpi.c Mon Oct 12 03:27:08 2015 (r289162) +++ head/sys/dev/wpi/if_wpi.c Mon Oct 12 04:05:12 2015 (r289163) @@ -196,6 +196,7 @@ static void wpi_debug_registers(struct w #endif static void wpi_fatal_intr(struct wpi_softc *); static void wpi_intr(void *); +static void wpi_free_txfrags(struct wpi_softc *, uint16_t); static int wpi_cmd2(struct wpi_softc *, struct wpi_buf *); static int wpi_tx_data(struct wpi_softc *, struct mbuf *, struct ieee80211_node *); @@ -458,6 +459,7 @@ wpi_attach(device_t dev) | IEEE80211_C_MONITOR /* monitor mode supported */ | IEEE80211_C_AHDEMO /* adhoc demo mode */ | IEEE80211_C_BGSCAN /* capable of bg scanning */ + | IEEE80211_C_TXFRAG /* handle tx frags */ | IEEE80211_C_TXPMGT /* tx power management */ | IEEE80211_C_SHSLOT /* short slot time supported */ | IEEE80211_C_WPA /* 802.11i */ @@ -1168,6 +1170,7 @@ wpi_alloc_tx_ring(struct wpi_softc *sc, ring->qid = qid; ring->queued = 0; ring->cur = 0; + ring->pending = 0; ring->update = 0; DPRINTF(sc, WPI_DEBUG_TRACE, TRACE_STR_BEGIN, __func__); @@ -1288,6 +1291,7 @@ wpi_reset_tx_ring(struct wpi_softc *sc, BUS_DMASYNC_PREWRITE); ring->queued = 0; ring->cur = 0; + ring->pending = 0; ring->update = 0; } @@ -2572,6 +2576,34 @@ done: end: WPI_UNLOCK(sc); } +static void +wpi_free_txfrags(struct wpi_softc *sc, uint16_t ac) +{ + struct wpi_tx_ring *ring; + struct wpi_tx_data *data; + uint8_t cur; + + WPI_TXQ_LOCK(sc); + ring = &sc->txq[ac]; + + while (ring->pending != 0) { + ring->pending--; + cur = (ring->cur + ring->pending) % WPI_TX_RING_COUNT; + data = &ring->data[cur]; + + bus_dmamap_sync(ring->data_dmat, data->map, + BUS_DMASYNC_POSTWRITE); + bus_dmamap_unload(ring->data_dmat, data->map); + m_freem(data->m); + data->m = NULL; + + ieee80211_node_decref(data->ni); + data->ni = NULL; + } + + WPI_TXQ_UNLOCK(sc); +} + static int wpi_cmd2(struct wpi_softc *sc, struct wpi_buf *buf) { @@ -2582,9 +2614,9 @@ wpi_cmd2(struct wpi_softc *sc, struct wp struct wpi_tx_ring *ring; struct mbuf *m1; bus_dma_segment_t *seg, segs[WPI_MAX_SCATTER]; - uint8_t pad; + uint8_t cur, pad; uint16_t hdrlen; - int error, i, nsegs, totlen; + int error, i, nsegs, totlen, frag; WPI_TXQ_LOCK(sc); @@ -2601,6 +2633,7 @@ wpi_cmd2(struct wpi_softc *sc, struct wp wh = mtod(buf->m, struct ieee80211_frame *); hdrlen = ieee80211_anyhdrsize(wh); totlen = buf->m->m_pkthdr.len; + frag = ((buf->m->m_flags & (M_FRAG | M_LASTFRAG)) == M_FRAG); if (__predict_false(totlen < sizeof(struct ieee80211_frame_min))) { error = EINVAL; @@ -2614,15 +2647,16 @@ wpi_cmd2(struct wpi_softc *sc, struct wp pad = 0; ring = &sc->txq[buf->ac]; - desc = &ring->desc[ring->cur]; - data = &ring->data[ring->cur]; + cur = (ring->cur + ring->pending) % WPI_TX_RING_COUNT; + desc = &ring->desc[cur]; + data = &ring->data[cur]; /* Prepare TX firmware command. */ - cmd = &ring->cmd[ring->cur]; + cmd = &ring->cmd[cur]; cmd->code = buf->code; cmd->flags = 0; cmd->qid = ring->qid; - cmd->idx = ring->cur; + cmd->idx = cur; memcpy(cmd->data, buf->data, buf->size); @@ -2662,7 +2696,8 @@ wpi_cmd2(struct wpi_softc *sc, struct wp if (ring->qid < WPI_CMD_QUEUE_NUM) { if_inc_counter(buf->ni->ni_vap->iv_ifp, IFCOUNTER_OERRORS, 1); - ieee80211_free_node(buf->ni); + if (!frag) + ieee80211_free_node(buf->ni); } m_freem(buf->m); error = 0; @@ -2678,7 +2713,7 @@ wpi_cmd2(struct wpi_softc *sc, struct wp data->ni = buf->ni; DPRINTF(sc, WPI_DEBUG_XMIT, "%s: qid %d idx %d len %d nsegs %d\n", - __func__, ring->qid, ring->cur, totlen, nsegs); + __func__, ring->qid, cur, totlen, nsegs); /* Fill TX descriptor. */ desc->nsegs = WPI_PAD32(totlen + pad) << 4 | (1 + nsegs); @@ -2699,16 +2734,23 @@ wpi_cmd2(struct wpi_softc *sc, struct wp bus_dmamap_sync(ring->desc_dma.tag, ring->desc_dma.map, BUS_DMASYNC_PREWRITE); - /* Kick TX ring. */ - ring->cur = (ring->cur + 1) % WPI_TX_RING_COUNT; - sc->sc_update_tx_ring(sc, ring); + ring->pending += 1; - if (ring->qid < WPI_CMD_QUEUE_NUM) { - WPI_TXQ_STATE_LOCK(sc); - ring->queued++; - callout_reset(&sc->tx_timeout, 5*hz, wpi_tx_timeout, sc); - WPI_TXQ_STATE_UNLOCK(sc); - } + if (!frag) { + if (ring->qid < WPI_CMD_QUEUE_NUM) { + WPI_TXQ_STATE_LOCK(sc); + ring->queued += ring->pending; + callout_reset(&sc->tx_timeout, 5*hz, wpi_tx_timeout, + sc); + WPI_TXQ_STATE_UNLOCK(sc); + } + + /* Kick TX ring. */ + ring->cur = (ring->cur + ring->pending) % WPI_TX_RING_COUNT; + ring->pending = 0; + sc->sc_update_tx_ring(sc, ring); + } else + ieee80211_node_incref(data->ni); end: DPRINTF(sc, WPI_DEBUG_TRACE, error ? TRACE_STR_END_ERR : TRACE_STR_END, __func__); @@ -2793,6 +2835,8 @@ wpi_tx_data(struct wpi_softc *sc, struct tap->wt_rate = rate; if (k != NULL) tap->wt_flags |= IEEE80211_RADIOTAP_F_WEP; + if (wh->i_fc[1] & IEEE80211_FC1_MORE_FRAG) + tap->wt_flags |= IEEE80211_RADIOTAP_F_FRAG; ieee80211_radiotap_tx(vap, m); } @@ -2808,7 +2852,7 @@ wpi_tx_data(struct wpi_softc *sc, struct if (!IEEE80211_QOS_HAS_SEQ(wh)) flags |= WPI_TX_AUTO_SEQ; if (wh->i_fc[1] & IEEE80211_FC1_MORE_FRAG) - flags |= WPI_TX_MORE_FRAG; /* Cannot happen yet. */ + flags |= WPI_TX_MORE_FRAG; /* Check if frame must be protected using RTS/CTS or CTS-to-self. */ if (!ismcast) { @@ -2866,6 +2910,15 @@ wpi_tx_data(struct wpi_softc *sc, struct memcpy(tx->key, k->wk_key, k->wk_keylen); } + if (wh->i_fc[1] & IEEE80211_FC1_MORE_FRAG) { + struct mbuf *next = m->m_nextpkt; + + tx->lnext = htole16(next->m_pkthdr.len); + tx->fnext = htole32(tx->security | + (flags & WPI_TX_NEED_ACK) | + WPI_NEXT_STA_ID(tx->id)); + } + tx->len = htole16(totlen); tx->flags = htole32(flags); tx->plcp = rate2plcp(rate); @@ -2989,13 +3042,13 @@ wpi_tx_data_raw(struct wpi_softc *sc, st } static __inline int -wpi_tx_ring_is_full(struct wpi_softc *sc, uint16_t ac) +wpi_tx_ring_free_space(struct wpi_softc *sc, uint16_t ac) { struct wpi_tx_ring *ring = &sc->txq[ac]; int retval; WPI_TXQ_STATE_LOCK(sc); - retval = (ring->queued > WPI_TX_RING_HIMARK); + retval = WPI_TX_RING_HIMARK - ring->queued; WPI_TXQ_STATE_UNLOCK(sc); return retval; @@ -3016,7 +3069,8 @@ wpi_raw_xmit(struct ieee80211_node *ni, WPI_TX_LOCK(sc); - if (sc->sc_running == 0 || wpi_tx_ring_is_full(sc, ac)) { + /* NB: no fragments here */ + if (sc->sc_running == 0 || wpi_tx_ring_free_space(sc, ac) < 1) { error = sc->sc_running ? ENOBUFS : ENETDOWN; goto unlock; } @@ -3055,8 +3109,9 @@ wpi_transmit(struct ieee80211com *ic, st { struct wpi_softc *sc = ic->ic_softc; struct ieee80211_node *ni; + struct mbuf *mnext; uint16_t ac; - int error; + int error, nmbufs; WPI_TX_LOCK(sc); DPRINTF(sc, WPI_DEBUG_XMIT, "%s: called\n", __func__); @@ -3067,20 +3122,30 @@ wpi_transmit(struct ieee80211com *ic, st goto unlock; } + nmbufs = 1; + for (mnext = m->m_nextpkt; mnext != NULL; mnext = mnext->m_nextpkt) + nmbufs++; + /* Check for available space. */ ac = M_WME_GETAC(m); - if (wpi_tx_ring_is_full(sc, ac)) { + if (wpi_tx_ring_free_space(sc, ac) < nmbufs) { error = ENOBUFS; goto unlock; } error = 0; ni = (struct ieee80211_node *)m->m_pkthdr.rcvif; - if (wpi_tx_data(sc, m, ni) != 0) { - if_inc_counter(ni->ni_vap->iv_ifp, IFCOUNTER_OERRORS, 1); - ieee80211_free_node(ni); - m_freem(m); - } + do { + mnext = m->m_nextpkt; + if (wpi_tx_data(sc, m, ni) != 0) { + if_inc_counter(ni->ni_vap->iv_ifp, IFCOUNTER_OERRORS, + nmbufs); + wpi_free_txfrags(sc, ac); + ieee80211_free_mbuf(m); + ieee80211_free_node(ni); + break; + } + } while((m = mnext) != NULL); DPRINTF(sc, WPI_DEBUG_XMIT, "%s: done\n", __func__); Modified: head/sys/dev/wpi/if_wpireg.h ============================================================================== --- head/sys/dev/wpi/if_wpireg.h Mon Oct 12 03:27:08 2015 (r289162) +++ head/sys/dev/wpi/if_wpireg.h Mon Oct 12 04:05:12 2015 (r289163) @@ -520,6 +520,8 @@ struct wpi_cmd_data { uint8_t key[IEEE80211_KEYBUF_SIZE]; uint8_t tkip[IEEE80211_WEP_MICLEN]; uint32_t fnext; +#define WPI_NEXT_STA_ID(id) ((id) << 8) + uint32_t lifetime; #define WPI_LIFETIME_INFINITE 0xffffffff Modified: head/sys/dev/wpi/if_wpivar.h ============================================================================== --- head/sys/dev/wpi/if_wpivar.h Mon Oct 12 03:27:08 2015 (r289162) +++ head/sys/dev/wpi/if_wpivar.h Mon Oct 12 04:05:12 2015 (r289163) @@ -74,6 +74,7 @@ struct wpi_tx_ring { bus_dma_tag_t data_dmat; uint8_t qid; uint8_t cur; + uint8_t pending; int16_t queued; int update:1; }; From owner-svn-src-all@freebsd.org Mon Oct 12 04:30:41 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 04112A11F10; Mon, 12 Oct 2015 04:30:41 +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 C6C6D1D14; Mon, 12 Oct 2015 04:30:40 +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 t9C4UdlR021353; Mon, 12 Oct 2015 04:30:39 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9C4Udjr021345; Mon, 12 Oct 2015 04:30:39 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201510120430.t9C4Udjr021345@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Mon, 12 Oct 2015 04:30:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289164 - in head/sys: dev/iwn net80211 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Oct 2015 04:30:41 -0000 Author: adrian Date: Mon Oct 12 04:30:38 2015 New Revision: 289164 URL: https://svnweb.freebsd.org/changeset/base/289164 Log: net80211: free node reference in the ieee80211_parent_xmitpkt() when error happened. Move error handling into ieee80211_parent_xmitpkt() instead of spreading it between functions. Submitted by: Differential Revision: https://reviews.freebsd.org/D3772 Modified: head/sys/dev/iwn/if_iwn.c head/sys/net80211/ieee80211_freebsd.c head/sys/net80211/ieee80211_hostap.c head/sys/net80211/ieee80211_mesh.c head/sys/net80211/ieee80211_output.c head/sys/net80211/ieee80211_power.c head/sys/net80211/ieee80211_superg.c head/sys/net80211/ieee80211_wds.c Modified: head/sys/dev/iwn/if_iwn.c ============================================================================== --- head/sys/dev/iwn/if_iwn.c Mon Oct 12 04:05:12 2015 (r289163) +++ head/sys/dev/iwn/if_iwn.c Mon Oct 12 04:30:38 2015 (r289164) @@ -4950,9 +4950,7 @@ iwn_transmit(struct ieee80211com *ic, st } error = iwn_tx_data(sc, m, ni); - if (error) { - if_inc_counter(ni->ni_vap->iv_ifp, IFCOUNTER_OERRORS, 1); - } else + if (!error) sc->sc_tx_timer = 5; IWN_UNLOCK(sc); return (error); Modified: head/sys/net80211/ieee80211_freebsd.c ============================================================================== --- head/sys/net80211/ieee80211_freebsd.c Mon Oct 12 04:05:12 2015 (r289163) +++ head/sys/net80211/ieee80211_freebsd.c Mon Oct 12 04:30:38 2015 (r289164) @@ -529,9 +529,6 @@ ieee80211_get_rx_params(struct mbuf *m, /* * Transmit a frame to the parent interface. - * - * TODO: if the transmission fails, make sure the parent node is freed - * (the callers will first need modifying.) */ int ieee80211_parent_xmitpkt(struct ieee80211com *ic, struct mbuf *m) @@ -544,8 +541,16 @@ ieee80211_parent_xmitpkt(struct ieee8021 */ IEEE80211_TX_LOCK_ASSERT(ic); error = ic->ic_transmit(ic, m); - if (error) + if (error) { + struct ieee80211_node *ni; + + ni = (struct ieee80211_node *)m->m_pkthdr.rcvif; + + /* XXX number of fragments */ + if_inc_counter(ni->ni_vap->iv_ifp, IFCOUNTER_OERRORS, 1); + ieee80211_free_node(ni); ieee80211_free_mbuf(m); + } return (error); } Modified: head/sys/net80211/ieee80211_hostap.c ============================================================================== --- head/sys/net80211/ieee80211_hostap.c Mon Oct 12 04:05:12 2015 (r289163) +++ head/sys/net80211/ieee80211_hostap.c Mon Oct 12 04:30:38 2015 (r289164) @@ -2327,12 +2327,11 @@ ieee80211_recv_pspoll(struct ieee80211_n /* * Do the right thing; if it's an encap'ed frame then - * call ieee80211_parent_xmitpkt() (and free the ref) else + * call ieee80211_parent_xmitpkt() else * call ieee80211_vap_xmitpkt(). */ if (m->m_flags & M_ENCAP) { - if (ieee80211_parent_xmitpkt(ic, m) != 0) - ieee80211_free_node(ni); + (void) ieee80211_parent_xmitpkt(ic, m); } else { (void) ieee80211_vap_xmitpkt(vap, m); } Modified: head/sys/net80211/ieee80211_mesh.c ============================================================================== --- head/sys/net80211/ieee80211_mesh.c Mon Oct 12 04:05:12 2015 (r289163) +++ head/sys/net80211/ieee80211_mesh.c Mon Oct 12 04:30:38 2015 (r289164) @@ -1239,12 +1239,8 @@ mesh_forward(struct ieee80211vap *vap, s IEEE80211_TX_LOCK(ic); err = ieee80211_parent_xmitpkt(ic, mcopy); IEEE80211_TX_UNLOCK(ic); - if (err != 0) { - /* NB: IFQ_HANDOFF reclaims mbuf */ - ieee80211_free_node(ni); - } else { + if (!err) if_inc_counter(ifp, IFCOUNTER_OPACKETS, 1); - } } static struct mbuf * Modified: head/sys/net80211/ieee80211_output.c ============================================================================== --- head/sys/net80211/ieee80211_output.c Mon Oct 12 04:05:12 2015 (r289163) +++ head/sys/net80211/ieee80211_output.c Mon Oct 12 04:30:38 2015 (r289164) @@ -132,7 +132,7 @@ ieee80211_vap_pkt_send_dest(struct ieee8 { struct ieee80211com *ic = vap->iv_ic; struct ifnet *ifp = vap->iv_ifp; - int error, len, mcast; + int len, mcast; if ((ni->ni_flags & IEEE80211_NODE_PWR_MGT) && (m->m_flags & M_PWR_SAV) == 0) { @@ -264,18 +264,13 @@ ieee80211_vap_pkt_send_dest(struct ieee8 return (ENOBUFS); } } - error = ieee80211_parent_xmitpkt(ic, m); + (void) ieee80211_parent_xmitpkt(ic, m); /* * Unlock at this point - no need to hold it across * ieee80211_free_node() (ie, the comlock) */ IEEE80211_TX_UNLOCK(ic); - if (error != 0) { - /* NB: IFQ_HANDOFF reclaims mbuf */ - ieee80211_free_node(ni); - if_inc_counter(ifp, IFCOUNTER_OERRORS, 1); - } ic->ic_lastdata = ticks; return (0); Modified: head/sys/net80211/ieee80211_power.c ============================================================================== --- head/sys/net80211/ieee80211_power.c Mon Oct 12 04:05:12 2015 (r289163) +++ head/sys/net80211/ieee80211_power.c Mon Oct 12 04:30:38 2015 (r289164) @@ -457,12 +457,7 @@ pwrsave_flushq(struct ieee80211_node *ni KASSERT((m->m_flags & M_ENCAP), ("%s: parentq with non-M_ENCAP frame!\n", __func__)); - /* - * For encaped frames, we need to free the node - * reference upon failure. - */ - if (ieee80211_parent_xmitpkt(ic, m) != 0) - ieee80211_free_node(ni); + (void) ieee80211_parent_xmitpkt(ic, m); } /* VAP frames, aren't encapsulated */ Modified: head/sys/net80211/ieee80211_superg.c ============================================================================== --- head/sys/net80211/ieee80211_superg.c Mon Oct 12 04:05:12 2015 (r289163) +++ head/sys/net80211/ieee80211_superg.c Mon Oct 12 04:30:38 2015 (r289164) @@ -475,13 +475,9 @@ ff_transmit(struct ieee80211_node *ni, s if (m != NULL) { struct ifnet *ifp = vap->iv_ifp; - error = ieee80211_parent_xmitpkt(ic, m);; - if (error != 0) { - /* NB: IFQ_HANDOFF reclaims mbuf */ - ieee80211_free_node(ni); - } else { + error = ieee80211_parent_xmitpkt(ic, m); + if (!error) if_inc_counter(ifp, IFCOUNTER_OPACKETS, 1); - } } else ieee80211_free_node(ni); } Modified: head/sys/net80211/ieee80211_wds.c ============================================================================== --- head/sys/net80211/ieee80211_wds.c Mon Oct 12 04:05:12 2015 (r289163) +++ head/sys/net80211/ieee80211_wds.c Mon Oct 12 04:30:38 2015 (r289164) @@ -298,11 +298,7 @@ ieee80211_dwds_mcast(struct ieee80211vap mcopy->m_pkthdr.rcvif = (void *) ni; err = ieee80211_parent_xmitpkt(ic, mcopy); - if (err) { - /* NB: IFQ_HANDOFF reclaims mbuf */ - if_inc_counter(ifp, IFCOUNTER_OERRORS, 1); - ieee80211_free_node(ni); - } else { + if (!err) { if_inc_counter(ifp, IFCOUNTER_OPACKETS, 1); if_inc_counter(ifp, IFCOUNTER_OMCASTS, 1); if_inc_counter(ifp, IFCOUNTER_OBYTES, From owner-svn-src-all@freebsd.org Mon Oct 12 04:55:24 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3C6E4A115A7; Mon, 12 Oct 2015 04:55:24 +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 023D5B08; Mon, 12 Oct 2015 04:55:23 +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 t9C4tNvM028312; Mon, 12 Oct 2015 04:55:23 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9C4tKsQ028287; Mon, 12 Oct 2015 04:55:20 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201510120455.t9C4tKsQ028287@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Mon, 12 Oct 2015 04:55:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289165 - in head/sys: dev/ath dev/bwi dev/bwn dev/iwm dev/iwn dev/malo dev/mwl dev/otus dev/ral dev/usb/wlan dev/wi dev/wpi net80211 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Oct 2015 04:55:24 -0000 Author: adrian Date: Mon Oct 12 04:55:20 2015 New Revision: 289165 URL: https://svnweb.freebsd.org/changeset/base/289165 Log: net80211: move ieee80211_free_node() call on error from ic_raw_xmit() to ieee80211_raw_output(). This doesn't free the mbuf upon error; the driver ic_raw_xmit method is still doing that. Submitted by: Differential Revision: https://reviews.freebsd.org/D3774 Modified: head/sys/dev/ath/if_ath_tx.c head/sys/dev/bwi/if_bwi.c head/sys/dev/bwn/if_bwn.c head/sys/dev/iwm/if_iwm.c head/sys/dev/iwn/if_iwn.c head/sys/dev/malo/if_malo.c head/sys/dev/mwl/if_mwl.c head/sys/dev/otus/if_otus.c head/sys/dev/ral/rt2560.c head/sys/dev/ral/rt2661.c head/sys/dev/ral/rt2860.c head/sys/dev/usb/wlan/if_rsu.c head/sys/dev/usb/wlan/if_rum.c head/sys/dev/usb/wlan/if_run.c head/sys/dev/usb/wlan/if_uath.c head/sys/dev/usb/wlan/if_upgt.c head/sys/dev/usb/wlan/if_ural.c head/sys/dev/usb/wlan/if_urtw.c head/sys/dev/usb/wlan/if_urtwn.c head/sys/dev/usb/wlan/if_zyd.c head/sys/dev/wi/if_wi.c head/sys/dev/wpi/if_wpi.c head/sys/net80211/ieee80211_output.c Modified: head/sys/dev/ath/if_ath_tx.c ============================================================================== --- head/sys/dev/ath/if_ath_tx.c Mon Oct 12 04:30:38 2015 (r289164) +++ head/sys/dev/ath/if_ath_tx.c Mon Oct 12 04:55:20 2015 (r289165) @@ -2452,7 +2452,6 @@ badbad: ATH_KTR(sc, ATH_KTR_TX, 2, "ath_raw_xmit: bad0: m=%p, params=%p", m, params); sc->sc_stats.ast_tx_raw_fail++; - ieee80211_free_node(ni); return error; } Modified: head/sys/dev/bwi/if_bwi.c ============================================================================== --- head/sys/dev/bwi/if_bwi.c Mon Oct 12 04:30:38 2015 (r289164) +++ head/sys/dev/bwi/if_bwi.c Mon Oct 12 04:55:20 2015 (r289165) @@ -1399,7 +1399,6 @@ bwi_raw_xmit(struct ieee80211_node *ni, int idx, error; if ((sc->sc_flags & BWI_F_RUNNING) == 0) { - ieee80211_free_node(ni); m_freem(m); return ENETDOWN; } @@ -1424,9 +1423,7 @@ bwi_raw_xmit(struct ieee80211_node *ni, tbd->tbd_used++; tbd->tbd_idx = (idx + 1) % BWI_TX_NDESC; sc->sc_tx_timer = 5; - } else - /* NB: m is reclaimed on encap failure */ - ieee80211_free_node(ni); + } BWI_UNLOCK(sc); return error; } Modified: head/sys/dev/bwn/if_bwn.c ============================================================================== --- head/sys/dev/bwn/if_bwn.c Mon Oct 12 04:30:38 2015 (r289164) +++ head/sys/dev/bwn/if_bwn.c Mon Oct 12 04:55:20 2015 (r289165) @@ -2684,29 +2684,26 @@ bwn_raw_xmit(struct ieee80211_node *ni, struct ieee80211com *ic = ni->ni_ic; struct bwn_softc *sc = ic->ic_softc; struct bwn_mac *mac = sc->sc_curmac; + int error; if ((sc->sc_flags & BWN_FLAG_RUNNING) == 0 || mac->mac_status < BWN_MAC_STATUS_STARTED) { - ieee80211_free_node(ni); m_freem(m); return (ENETDOWN); } BWN_LOCK(sc); if (bwn_tx_isfull(sc, m)) { - ieee80211_free_node(ni); m_freem(m); BWN_UNLOCK(sc); return (ENOBUFS); } - if (bwn_tx_start(sc, ni, m) != 0) { - if (ni != NULL) - ieee80211_free_node(ni); - } - sc->sc_watchdog_timer = 5; + error = bwn_tx_start(sc, ni, m); + if (error == 0) + sc->sc_watchdog_timer = 5; BWN_UNLOCK(sc); - return (0); + return (error); } /* Modified: head/sys/dev/iwm/if_iwm.c ============================================================================== --- head/sys/dev/iwm/if_iwm.c Mon Oct 12 04:30:38 2015 (r289164) +++ head/sys/dev/iwm/if_iwm.c Mon Oct 12 04:55:20 2015 (r289165) @@ -2877,7 +2877,6 @@ iwm_raw_xmit(struct ieee80211_node *ni, "->%s begin\n", __func__); if ((sc->sc_flags & IWM_FLAG_HW_INITED) == 0) { - ieee80211_free_node(ni); m_freem(m); IWM_DPRINTF(sc, IWM_DEBUG_XMIT, "<-%s not RUNNING\n", __func__); @@ -2891,10 +2890,6 @@ iwm_raw_xmit(struct ieee80211_node *ni, } else { error = iwm_tx(sc, m, ni, 0); } - if (error != 0) { - /* NB: m is reclaimed on tx failure */ - ieee80211_free_node(ni); - } sc->sc_tx_timer = 5; IWM_UNLOCK(sc); Modified: head/sys/dev/iwn/if_iwn.c ============================================================================== --- head/sys/dev/iwn/if_iwn.c Mon Oct 12 04:30:38 2015 (r289164) +++ head/sys/dev/iwn/if_iwn.c Mon Oct 12 04:55:20 2015 (r289165) @@ -4875,7 +4875,6 @@ iwn_raw_xmit(struct ieee80211_node *ni, DPRINTF(sc, IWN_DEBUG_XMIT | IWN_DEBUG_TRACE, "->%s begin\n", __func__); if ((sc->sc_flags & IWN_FLAG_RUNNING) == 0) { - ieee80211_free_node(ni); m_freem(m); return ENETDOWN; } @@ -4889,9 +4888,6 @@ iwn_raw_xmit(struct ieee80211_node *ni, if (sc->sc_beacon_wait) { if (iwn_xmit_queue_enqueue(sc, m) != 0) { m_freem(m); - if_inc_counter(ni->ni_vap->iv_ifp, - IFCOUNTER_OERRORS, 1); - ieee80211_free_node(ni); IWN_UNLOCK(sc); return (ENOBUFS); } @@ -4913,10 +4909,7 @@ iwn_raw_xmit(struct ieee80211_node *ni, */ error = iwn_tx_data_raw(sc, m, ni, params); } - if (error != 0) { - /* NB: m is reclaimed on tx failure */ - ieee80211_free_node(ni); - } else + if (error == 0) sc->sc_tx_timer = 5; IWN_UNLOCK(sc); Modified: head/sys/dev/malo/if_malo.c ============================================================================== --- head/sys/dev/malo/if_malo.c Mon Oct 12 04:30:38 2015 (r289164) +++ head/sys/dev/malo/if_malo.c Mon Oct 12 04:55:20 2015 (r289165) @@ -1786,7 +1786,6 @@ malo_raw_xmit(struct ieee80211_node *ni, struct malo_txq *txq; if (!sc->malo_running || sc->malo_invalid) { - ieee80211_free_node(ni); m_freem(m); return ENETDOWN; } @@ -1800,7 +1799,6 @@ malo_raw_xmit(struct ieee80211_node *ni, txq = &sc->malo_txq[0]; bf = malo_getbuf(sc, txq); if (bf == NULL) { - ieee80211_free_node(ni); m_freem(m); return ENOBUFS; } @@ -1816,7 +1814,6 @@ malo_raw_xmit(struct ieee80211_node *ni, txq->nfree++; MALO_TXQ_UNLOCK(txq); - ieee80211_free_node(ni); return EIO; /* XXX */ } Modified: head/sys/dev/mwl/if_mwl.c ============================================================================== --- head/sys/dev/mwl/if_mwl.c Mon Oct 12 04:30:38 2015 (r289164) +++ head/sys/dev/mwl/if_mwl.c Mon Oct 12 04:55:20 2015 (r289165) @@ -1422,7 +1422,6 @@ mwl_raw_xmit(struct ieee80211_node *ni, struct mwl_txq *txq; if (!sc->sc_running || sc->sc_invalid) { - ieee80211_free_node(ni); m_freem(m); return ENETDOWN; } @@ -1438,7 +1437,6 @@ mwl_raw_xmit(struct ieee80211_node *ni, bf = mwl_gettxbuf(sc, txq); if (bf == NULL) { sc->sc_stats.mst_tx_qstop++; - ieee80211_free_node(ni); m_freem(m); return ENOBUFS; } @@ -1448,7 +1446,6 @@ mwl_raw_xmit(struct ieee80211_node *ni, if (mwl_tx_start(sc, ni, bf, m)) { mwl_puttxbuf_head(txq, bf); - ieee80211_free_node(ni); return EIO; /* XXX */ } /* Modified: head/sys/dev/otus/if_otus.c ============================================================================== --- head/sys/dev/otus/if_otus.c Mon Oct 12 04:30:38 2015 (r289164) +++ head/sys/dev/otus/if_otus.c Mon Oct 12 04:55:20 2015 (r289165) @@ -567,7 +567,6 @@ error: if (bf) otus_freebuf(sc, bf); OTUS_UNLOCK(sc); - ieee80211_free_node(ni); m_freem(m); return (ENXIO); } Modified: head/sys/dev/ral/rt2560.c ============================================================================== --- head/sys/dev/ral/rt2560.c Mon Oct 12 04:30:38 2015 (r289164) +++ head/sys/dev/ral/rt2560.c Mon Oct 12 04:55:20 2015 (r289165) @@ -2711,13 +2711,11 @@ rt2560_raw_xmit(struct ieee80211_node *n if (!(sc->sc_flags & RT2560_F_RUNNING)) { RAL_UNLOCK(sc); m_freem(m); - ieee80211_free_node(ni); return ENETDOWN; } if (sc->prioq.queued >= RT2560_PRIO_RING_COUNT) { RAL_UNLOCK(sc); m_freem(m); - ieee80211_free_node(ni); return ENOBUFS; /* XXX */ } @@ -2742,7 +2740,6 @@ rt2560_raw_xmit(struct ieee80211_node *n return 0; bad: - ieee80211_free_node(ni); RAL_UNLOCK(sc); return EIO; /* XXX */ } Modified: head/sys/dev/ral/rt2661.c ============================================================================== --- head/sys/dev/ral/rt2661.c Mon Oct 12 04:30:38 2015 (r289164) +++ head/sys/dev/ral/rt2661.c Mon Oct 12 04:55:20 2015 (r289165) @@ -1636,13 +1636,11 @@ rt2661_raw_xmit(struct ieee80211_node *n if (!(sc->sc_flags & RAL_RUNNING)) { RAL_UNLOCK(sc); m_freem(m); - ieee80211_free_node(ni); return ENETDOWN; } if (sc->mgtq.queued >= RT2661_MGT_RING_COUNT) { RAL_UNLOCK(sc); m_freem(m); - ieee80211_free_node(ni); return ENOBUFS; /* XXX */ } @@ -1659,7 +1657,6 @@ rt2661_raw_xmit(struct ieee80211_node *n return 0; bad: - ieee80211_free_node(ni); RAL_UNLOCK(sc); return EIO; /* XXX */ } Modified: head/sys/dev/ral/rt2860.c ============================================================================== --- head/sys/dev/ral/rt2860.c Mon Oct 12 04:30:38 2015 (r289164) +++ head/sys/dev/ral/rt2860.c Mon Oct 12 04:55:20 2015 (r289165) @@ -1702,7 +1702,6 @@ rt2860_raw_xmit(struct ieee80211_node *n if (!(sc->sc_flags & RT2860_RUNNNING)) { RAL_UNLOCK(sc); m_freem(m); - ieee80211_free_node(ni); return ENETDOWN; } if (params == NULL) { @@ -1718,10 +1717,6 @@ rt2860_raw_xmit(struct ieee80211_node *n */ error = rt2860_tx_raw(sc, m, ni, params); } - if (error != 0) { - /* NB: m is reclaimed on tx failure */ - ieee80211_free_node(ni); - } sc->sc_tx_timer = 5; RAL_UNLOCK(sc); return error; Modified: head/sys/dev/usb/wlan/if_rsu.c ============================================================================== --- head/sys/dev/usb/wlan/if_rsu.c Mon Oct 12 04:30:38 2015 (r289164) +++ head/sys/dev/usb/wlan/if_rsu.c Mon Oct 12 04:55:20 2015 (r289165) @@ -2793,19 +2793,16 @@ rsu_raw_xmit(struct ieee80211_node *ni, /* prevent management frames from being sent if we're not ready */ if (!sc->sc_running) { m_freem(m); - ieee80211_free_node(ni); return (ENETDOWN); } RSU_LOCK(sc); bf = rsu_getbuf(sc); if (bf == NULL) { - ieee80211_free_node(ni); m_freem(m); RSU_UNLOCK(sc); return (ENOBUFS); } if (rsu_tx_start(sc, ni, m, bf) != 0) { - ieee80211_free_node(ni); m_freem(m); rsu_freebuf(sc, bf); RSU_UNLOCK(sc); Modified: head/sys/dev/usb/wlan/if_rum.c ============================================================================== --- head/sys/dev/usb/wlan/if_rum.c Mon Oct 12 04:30:38 2015 (r289164) +++ head/sys/dev/usb/wlan/if_rum.c Mon Oct 12 04:55:20 2015 (r289165) @@ -2850,7 +2850,6 @@ rum_raw_xmit(struct ieee80211_node *ni, bad: RUM_UNLOCK(sc); m_freem(m); - ieee80211_free_node(ni); return ret; } Modified: head/sys/dev/usb/wlan/if_run.c ============================================================================== --- head/sys/dev/usb/wlan/if_run.c Mon Oct 12 04:30:38 2015 (r289164) +++ head/sys/dev/usb/wlan/if_run.c Mon Oct 12 04:55:20 2015 (r289165) @@ -3707,7 +3707,6 @@ done: if (error != 0) { if(m != NULL) m_freem(m); - ieee80211_free_node(ni); } return (error); Modified: head/sys/dev/usb/wlan/if_uath.c ============================================================================== --- head/sys/dev/usb/wlan/if_uath.c Mon Oct 12 04:30:38 2015 (r289164) +++ head/sys/dev/usb/wlan/if_uath.c Mon Oct 12 04:55:20 2015 (r289165) @@ -1781,7 +1781,6 @@ uath_raw_xmit(struct ieee80211_node *ni, if ((sc->sc_flags & UATH_FLAG_INVALID) || !(sc->sc_flags & UATH_FLAG_INITDONE)) { m_freem(m); - ieee80211_free_node(ni); UATH_UNLOCK(sc); return (ENETDOWN); } @@ -1789,7 +1788,6 @@ uath_raw_xmit(struct ieee80211_node *ni, /* grab a TX buffer */ bf = uath_getbuf(sc); if (bf == NULL) { - ieee80211_free_node(ni); m_freem(m); UATH_UNLOCK(sc); return (ENOBUFS); @@ -1797,7 +1795,6 @@ uath_raw_xmit(struct ieee80211_node *ni, sc->sc_seqnum = 0; if (uath_tx_start(sc, m, ni, bf) != 0) { - ieee80211_free_node(ni); STAILQ_INSERT_HEAD(&sc->sc_tx_inactive, bf, next); UATH_STAT_INC(sc, st_tx_inactive); UATH_UNLOCK(sc); Modified: head/sys/dev/usb/wlan/if_upgt.c ============================================================================== --- head/sys/dev/usb/wlan/if_upgt.c Mon Oct 12 04:30:38 2015 (r289164) +++ head/sys/dev/usb/wlan/if_upgt.c Mon Oct 12 04:55:20 2015 (r289165) @@ -798,14 +798,12 @@ upgt_raw_xmit(struct ieee80211_node *ni, /* prevent management frames from being sent if we're not ready */ if (!(sc->sc_flags & UPGT_FLAG_INITDONE)) { m_freem(m); - ieee80211_free_node(ni); UPGT_UNLOCK(sc); return ENETDOWN; } data_tx = upgt_gettxbuf(sc); if (data_tx == NULL) { - ieee80211_free_node(ni); m_freem(m); UPGT_UNLOCK(sc); return (ENOBUFS); @@ -814,7 +812,6 @@ upgt_raw_xmit(struct ieee80211_node *ni, if (upgt_tx_start(sc, m, ni, data_tx) != 0) { STAILQ_INSERT_HEAD(&sc->sc_tx_inactive, data_tx, next); UPGT_STAT_INC(sc, st_tx_inactive); - ieee80211_free_node(ni); UPGT_UNLOCK(sc); return (EIO); } Modified: head/sys/dev/usb/wlan/if_ural.c ============================================================================== --- head/sys/dev/usb/wlan/if_ural.c Mon Oct 12 04:30:38 2015 (r289164) +++ head/sys/dev/usb/wlan/if_ural.c Mon Oct 12 04:55:20 2015 (r289165) @@ -2123,13 +2123,11 @@ ural_raw_xmit(struct ieee80211_node *ni, if (!sc->sc_running) { RAL_UNLOCK(sc); m_freem(m); - ieee80211_free_node(ni); return ENETDOWN; } if (sc->tx_nfree < RAL_TX_MINFREE) { RAL_UNLOCK(sc); m_freem(m); - ieee80211_free_node(ni); return EIO; } @@ -2152,7 +2150,6 @@ ural_raw_xmit(struct ieee80211_node *ni, return 0; bad: RAL_UNLOCK(sc); - ieee80211_free_node(ni); return EIO; /* XXX */ } Modified: head/sys/dev/usb/wlan/if_urtw.c ============================================================================== --- head/sys/dev/usb/wlan/if_urtw.c Mon Oct 12 04:30:38 2015 (r289164) +++ head/sys/dev/usb/wlan/if_urtw.c Mon Oct 12 04:55:20 2015 (r289165) @@ -1527,20 +1527,17 @@ urtw_raw_xmit(struct ieee80211_node *ni, /* prevent management frames from being sent if we're not ready */ if (!(sc->sc_flags & URTW_RUNNING)) { m_freem(m); - ieee80211_free_node(ni); return ENETDOWN; } URTW_LOCK(sc); bf = urtw_getbuf(sc); if (bf == NULL) { - ieee80211_free_node(ni); m_freem(m); URTW_UNLOCK(sc); return (ENOBUFS); /* XXX */ } if (urtw_tx_start(sc, ni, m, bf, URTW_PRIORITY_LOW) != 0) { - ieee80211_free_node(ni); STAILQ_INSERT_HEAD(&sc->sc_tx_inactive, bf, next); URTW_UNLOCK(sc); return (EIO); Modified: head/sys/dev/usb/wlan/if_urtwn.c ============================================================================== --- head/sys/dev/usb/wlan/if_urtwn.c Mon Oct 12 04:30:38 2015 (r289164) +++ head/sys/dev/usb/wlan/if_urtwn.c Mon Oct 12 04:55:20 2015 (r289165) @@ -3460,13 +3460,11 @@ urtwn_raw_xmit(struct ieee80211_node *ni /* prevent management frames from being sent if we're not ready */ if (!(sc->sc_flags & URTWN_RUNNING)) { m_freem(m); - ieee80211_free_node(ni); return (ENETDOWN); } URTWN_LOCK(sc); bf = urtwn_getbuf(sc); if (bf == NULL) { - ieee80211_free_node(ni); m_freem(m); URTWN_UNLOCK(sc); return (ENOBUFS); @@ -3474,7 +3472,6 @@ urtwn_raw_xmit(struct ieee80211_node *ni if (urtwn_tx_start(sc, ni, m, bf) != 0) { m_freem(m); - ieee80211_free_node(ni); STAILQ_INSERT_HEAD(&sc->sc_tx_inactive, bf, next); URTWN_UNLOCK(sc); return (EIO); Modified: head/sys/dev/usb/wlan/if_zyd.c ============================================================================== --- head/sys/dev/usb/wlan/if_zyd.c Mon Oct 12 04:30:38 2015 (r289164) +++ head/sys/dev/usb/wlan/if_zyd.c Mon Oct 12 04:55:20 2015 (r289165) @@ -2590,13 +2590,11 @@ zyd_raw_xmit(struct ieee80211_node *ni, if (!(sc->sc_flags & ZYD_FLAG_RUNNING)) { ZYD_UNLOCK(sc); m_freem(m); - ieee80211_free_node(ni); return (ENETDOWN); } if (sc->tx_nfree == 0) { ZYD_UNLOCK(sc); m_freem(m); - ieee80211_free_node(ni); return (ENOBUFS); /* XXX */ } @@ -2607,7 +2605,6 @@ zyd_raw_xmit(struct ieee80211_node *ni, */ if (zyd_tx_start(sc, m, ni) != 0) { ZYD_UNLOCK(sc); - ieee80211_free_node(ni); m_freem(m); return (EIO); } Modified: head/sys/dev/wi/if_wi.c ============================================================================== --- head/sys/dev/wi/if_wi.c Mon Oct 12 04:30:38 2015 (r289164) +++ head/sys/dev/wi/if_wi.c Mon Oct 12 04:55:20 2015 (r289165) @@ -1077,6 +1077,7 @@ wi_raw_xmit(struct ieee80211_node *ni, s goto out; } m0 = NULL; + ieee80211_free_node(ni); sc->sc_txnext = cur = (cur + 1) % sc->sc_ntxbuf; out: @@ -1084,7 +1085,6 @@ out: if (m0 != NULL) m_freem(m0); - ieee80211_free_node(ni); return rc; } Modified: head/sys/dev/wpi/if_wpi.c ============================================================================== --- head/sys/dev/wpi/if_wpi.c Mon Oct 12 04:30:38 2015 (r289164) +++ head/sys/dev/wpi/if_wpi.c Mon Oct 12 04:55:20 2015 (r289165) @@ -3093,7 +3093,6 @@ unlock: WPI_TX_UNLOCK(sc); if (error != 0) { m_freem(m); - ieee80211_free_node(ni); DPRINTF(sc, WPI_DEBUG_TRACE, TRACE_STR_END_ERR, __func__); return error; Modified: head/sys/net80211/ieee80211_output.c ============================================================================== --- head/sys/net80211/ieee80211_output.c Mon Oct 12 04:30:38 2015 (r289164) +++ head/sys/net80211/ieee80211_output.c Mon Oct 12 04:55:20 2015 (r289165) @@ -531,8 +531,10 @@ ieee80211_raw_output(struct ieee80211vap (void) ieee80211_add_xmit_params(m, params); error = ic->ic_raw_xmit(ni, m, params); - if (error) + if (error) { if_inc_counter(vap->iv_ifp, IFCOUNTER_OERRORS, 1); + ieee80211_free_node(ni); + } return (error); } From owner-svn-src-all@freebsd.org Mon Oct 12 04:57:40 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 519F1A1163F; Mon, 12 Oct 2015 04:57:40 +0000 (UTC) (envelope-from peter@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 09B47C97; Mon, 12 Oct 2015 04:57:39 +0000 (UTC) (envelope-from peter@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t9C4vdnm028455; Mon, 12 Oct 2015 04:57:39 GMT (envelope-from peter@FreeBSD.org) Received: (from peter@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9C4vavI028429; Mon, 12 Oct 2015 04:57:36 GMT (envelope-from peter@FreeBSD.org) Message-Id: <201510120457.t9C4vavI028429@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: peter set sender to peter@FreeBSD.org using -f From: Peter Wemm Date: Mon, 12 Oct 2015 04:57:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r289166 - in stable/10: contrib/apr contrib/apr-util contrib/apr-util/crypto contrib/apr-util/dbd contrib/apr-util/dbm contrib/apr-util/include contrib/apr-util/test contrib/apr/encodin... 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 " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Oct 2015 04:57:40 -0000 Author: peter Date: Mon Oct 12 04:57:36 2015 New Revision: 289166 URL: https://svnweb.freebsd.org/changeset/base/289166 Log: MFC: r269851,r272076,r274884,r282328,r285644,r286503,r286504,r286505, r286506,r286510,r286561,r286562,r287034 Update svnlite from 1.8.10 to 1.8.14, and the support components: serf->1.3.8, apr->1.5.2, apr-util->1.5.4, sqlite3->3.8.11.1 This includes syncing the developer templates with head. Modified: stable/10/contrib/apr-util/CHANGES stable/10/contrib/apr-util/NOTICE stable/10/contrib/apr-util/apr-util.spec stable/10/contrib/apr-util/configure stable/10/contrib/apr-util/crypto/apr_crypto.c stable/10/contrib/apr-util/crypto/apr_passwd.c stable/10/contrib/apr-util/dbd/apr_dbd_mysql.c stable/10/contrib/apr-util/dbd/apr_dbd_odbc.c stable/10/contrib/apr-util/dbm/NWGNUmakefile stable/10/contrib/apr-util/include/apu_version.h stable/10/contrib/apr-util/test/Makefile.win stable/10/contrib/apr/CHANGES stable/10/contrib/apr/CMakeLists.txt stable/10/contrib/apr/Makefile.in stable/10/contrib/apr/NOTICE stable/10/contrib/apr/NWGNUmakefile stable/10/contrib/apr/apr.dsp stable/10/contrib/apr/apr.spec stable/10/contrib/apr/build-outputs.mk stable/10/contrib/apr/configure stable/10/contrib/apr/configure.in stable/10/contrib/apr/encoding/apr_escape.c stable/10/contrib/apr/include/apr_skiplist.h stable/10/contrib/apr/include/apr_version.h stable/10/contrib/apr/libapr.dsp stable/10/contrib/apr/locks/unix/proc_mutex.c stable/10/contrib/apr/memory/unix/apr_pools.c stable/10/contrib/apr/misc/unix/errorcodes.c stable/10/contrib/apr/network_io/unix/sockaddr.c stable/10/contrib/apr/network_io/unix/sockets.c stable/10/contrib/apr/poll/unix/epoll.c stable/10/contrib/apr/poll/unix/kqueue.c stable/10/contrib/apr/poll/unix/poll.c stable/10/contrib/apr/poll/unix/pollcb.c stable/10/contrib/apr/poll/unix/port.c stable/10/contrib/apr/poll/unix/z_asio.c stable/10/contrib/apr/tables/apr_skiplist.c stable/10/contrib/serf/CHANGES stable/10/contrib/serf/auth/auth_spnego_sspi.c stable/10/contrib/serf/buckets/deflate_buckets.c stable/10/contrib/serf/buckets/ssl_buckets.c stable/10/contrib/serf/serf.h stable/10/contrib/sqlite3/INSTALL stable/10/contrib/sqlite3/Makefile.am stable/10/contrib/sqlite3/Makefile.in stable/10/contrib/sqlite3/aclocal.m4 stable/10/contrib/sqlite3/config.guess stable/10/contrib/sqlite3/config.sub stable/10/contrib/sqlite3/configure stable/10/contrib/sqlite3/configure.ac stable/10/contrib/sqlite3/depcomp stable/10/contrib/sqlite3/install-sh stable/10/contrib/sqlite3/ltmain.sh stable/10/contrib/sqlite3/missing stable/10/contrib/sqlite3/shell.c stable/10/contrib/sqlite3/sqlite3.1 stable/10/contrib/sqlite3/sqlite3.c stable/10/contrib/sqlite3/sqlite3.h stable/10/contrib/sqlite3/sqlite3ext.h stable/10/contrib/subversion/CHANGES stable/10/contrib/subversion/Makefile.in stable/10/contrib/subversion/NOTICE stable/10/contrib/subversion/autogen.sh stable/10/contrib/subversion/build-outputs.mk stable/10/contrib/subversion/build.conf stable/10/contrib/subversion/configure stable/10/contrib/subversion/configure.ac stable/10/contrib/subversion/get-deps.sh stable/10/contrib/subversion/subversion/include/private/svn_diff_private.h stable/10/contrib/subversion/subversion/include/private/svn_mergeinfo_private.h stable/10/contrib/subversion/subversion/include/private/svn_repos_private.h stable/10/contrib/subversion/subversion/include/private/svn_sqlite.h stable/10/contrib/subversion/subversion/include/svn_io.h stable/10/contrib/subversion/subversion/include/svn_version.h stable/10/contrib/subversion/subversion/libsvn_auth_gnome_keyring/gnome_keyring.c stable/10/contrib/subversion/subversion/libsvn_client/copy.c stable/10/contrib/subversion/subversion/libsvn_client/externals.c stable/10/contrib/subversion/subversion/libsvn_client/log.c stable/10/contrib/subversion/subversion/libsvn_client/merge.c stable/10/contrib/subversion/subversion/libsvn_client/patch.c stable/10/contrib/subversion/subversion/libsvn_client/upgrade.c stable/10/contrib/subversion/subversion/libsvn_delta/svndiff.c stable/10/contrib/subversion/subversion/libsvn_diff/parse-diff.c stable/10/contrib/subversion/subversion/libsvn_diff/util.c stable/10/contrib/subversion/subversion/libsvn_fs_fs/caching.c stable/10/contrib/subversion/subversion/libsvn_fs_fs/fs_fs.c stable/10/contrib/subversion/subversion/libsvn_fs_fs/rep-cache-db.h stable/10/contrib/subversion/subversion/libsvn_fs_fs/tree.c stable/10/contrib/subversion/subversion/libsvn_ra_serf/commit.c stable/10/contrib/subversion/subversion/libsvn_ra_serf/options.c stable/10/contrib/subversion/subversion/libsvn_repos/commit.c stable/10/contrib/subversion/subversion/libsvn_repos/load-fs-vtable.c stable/10/contrib/subversion/subversion/libsvn_repos/rev_hunt.c stable/10/contrib/subversion/subversion/libsvn_subr/cache-membuffer.c stable/10/contrib/subversion/subversion/libsvn_subr/config.c stable/10/contrib/subversion/subversion/libsvn_subr/dso.c stable/10/contrib/subversion/subversion/libsvn_subr/error.c stable/10/contrib/subversion/subversion/libsvn_subr/gpg_agent.c stable/10/contrib/subversion/subversion/libsvn_subr/internal_statements.h stable/10/contrib/subversion/subversion/libsvn_subr/io.c stable/10/contrib/subversion/subversion/libsvn_subr/mergeinfo.c stable/10/contrib/subversion/subversion/libsvn_subr/sqlite3wrapper.c stable/10/contrib/subversion/subversion/libsvn_subr/string.c stable/10/contrib/subversion/subversion/libsvn_subr/version.c stable/10/contrib/subversion/subversion/libsvn_wc/adm_ops.c stable/10/contrib/subversion/subversion/libsvn_wc/cleanup.c stable/10/contrib/subversion/subversion/libsvn_wc/conflicts.c stable/10/contrib/subversion/subversion/libsvn_wc/copy.c stable/10/contrib/subversion/subversion/libsvn_wc/diff.h stable/10/contrib/subversion/subversion/libsvn_wc/diff_editor.c stable/10/contrib/subversion/subversion/libsvn_wc/diff_local.c stable/10/contrib/subversion/subversion/libsvn_wc/entries.c stable/10/contrib/subversion/subversion/libsvn_wc/externals.c stable/10/contrib/subversion/subversion/libsvn_wc/update_editor.c stable/10/contrib/subversion/subversion/libsvn_wc/wc-checks.h stable/10/contrib/subversion/subversion/libsvn_wc/wc-metadata.h stable/10/contrib/subversion/subversion/libsvn_wc/wc-metadata.sql stable/10/contrib/subversion/subversion/libsvn_wc/wc-queries.h stable/10/contrib/subversion/subversion/libsvn_wc/wc-queries.sql stable/10/contrib/subversion/subversion/libsvn_wc/wc.h stable/10/contrib/subversion/subversion/libsvn_wc/wc_db.c stable/10/contrib/subversion/subversion/libsvn_wc/wc_db.h stable/10/contrib/subversion/subversion/libsvn_wc/wc_db_private.h stable/10/contrib/subversion/subversion/libsvn_wc/wc_db_wcroot.c stable/10/contrib/subversion/subversion/svn/conflict-callbacks.c stable/10/contrib/subversion/subversion/svn/list-cmd.c stable/10/contrib/subversion/subversion/svn/svn.c stable/10/contrib/subversion/subversion/svn/util.c stable/10/contrib/subversion/subversion/svn_private_config.h.in stable/10/contrib/subversion/subversion/svnadmin/svnadmin.c stable/10/contrib/subversion/subversion/svndumpfilter/svndumpfilter.c stable/10/contrib/subversion/subversion/svnrdump/load_editor.c stable/10/contrib/subversion/subversion/svnserve/serve.c stable/10/contrib/subversion/subversion/svnsync/sync.c stable/10/contrib/subversion/win-tests.py stable/10/usr.bin/svn/lib/libapr/apr.h stable/10/usr.bin/svn/lib/libapr/apr_private.h stable/10/usr.bin/svn/lib/libapr_util/apu.h stable/10/usr.bin/svn/lib/libapr_util/apu_config.h stable/10/usr.bin/svn/lib/libsqlite3/Makefile stable/10/usr.bin/svn/svn_private_config.h stable/10/usr.bin/svn/svnadmin/Makefile stable/10/usr.bin/svn/svndumpfilter/Makefile stable/10/usr.bin/svn/svnlook/Makefile stable/10/usr.bin/svn/svnversion/Makefile Directory Properties: stable/10/ (props changed) Modified: stable/10/contrib/apr-util/CHANGES ============================================================================== --- stable/10/contrib/apr-util/CHANGES Mon Oct 12 04:55:20 2015 (r289165) +++ stable/10/contrib/apr-util/CHANGES Mon Oct 12 04:57:36 2015 (r289166) @@ -1,4 +1,30 @@ -*- coding: utf-8 -*- +Changes with APR-util 1.5.4 + + *) MySQL driver: Fix incorrect handling of bad parameter in the + driver support for apr_dbd_transaction_end(). PR 56330. + [Weiqiang Li ] + + *) apr_crypto_get_driver(): Fix invalid storage reference on error path. + [Philip Martin ] + + *) Fix compile failure for Android. PR 56627. [Fredrik Fornwall + , Jeff Trawick] + + *) Fix to let ODBC driver build with MSVC6, which does not have intptr_t + [Tom Donovan] + + *) Windows cmake build: Fix incompatiblities with Visual Studio + generators with all cmake versions, and the NMake Makefile generator + with cmake 2.8.12 and later. PR 56616 and other bugs. [Jeff Trawick, + Bert Huijben] + + *) Fix detection of Berkeley DB 6.0. PR 55277. + [Lars Wendler ] + + *) Improve platform detection for bundled expat by updating + config.guess and config.sub. [Rainer Jung] + Changes with APR-util 1.5.3 *) Cygwin: Use correct file extension when loading APR DSOs. PR 55587. Modified: stable/10/contrib/apr-util/NOTICE ============================================================================== --- stable/10/contrib/apr-util/NOTICE Mon Oct 12 04:55:20 2015 (r289165) +++ stable/10/contrib/apr-util/NOTICE Mon Oct 12 04:57:36 2015 (r289166) @@ -1,7 +1,7 @@ Apache Portable Runtime Utility Library -Copyright (c) 2011 The Apache Software Foundation. +Copyright (c) 2000-2014 The Apache Software Foundation. -This product includes software developed by +This product includes software developed at The Apache Software Foundation (http://www.apache.org/). Portions of this software were developed at the National Center Modified: stable/10/contrib/apr-util/apr-util.spec ============================================================================== --- stable/10/contrib/apr-util/apr-util.spec Mon Oct 12 04:55:20 2015 (r289165) +++ stable/10/contrib/apr-util/apr-util.spec Mon Oct 12 04:57:36 2015 (r289166) @@ -3,7 +3,7 @@ Summary: Apache Portable Runtime Utility library Name: apr-util -Version: 1.5.3 +Version: 1.5.4 Release: 1 License: Apache Software License Group: System Environment/Libraries Modified: stable/10/contrib/apr-util/configure ============================================================================== --- stable/10/contrib/apr-util/configure Mon Oct 12 04:55:20 2015 (r289165) +++ stable/10/contrib/apr-util/configure Mon Oct 12 04:57:36 2015 (r289166) @@ -11608,19 +11608,34 @@ fi apu_db_version=0 # Maximum supported version announced in help string. - # Although we search for all versions up to 5.9, + # Although we search for all versions up to 6.9, # we should only include existing versions in our # help string. - db_max_version=53 - db_min_version=41 dbm_list="sdbm, gdbm, ndbm, db, db1, db185, db2, db3, db4" + db_max_version=48 + db_min_version=41 + db_version="$db_min_version" + while [ $db_version -le $db_max_version ] + do + dbm_list="$dbm_list, db$db_version" + db_version=`expr $db_version + 1` + done + db_max_version=53 + db_min_version=50 + db_version="$db_min_version" + while [ $db_version -le $db_max_version ] + do + dbm_list="$dbm_list, db$db_version" + db_version=`expr $db_version + 1` + done + db_max_version=60 + db_min_version=60 db_version="$db_min_version" while [ $db_version -le $db_max_version ] do dbm_list="$dbm_list, db$db_version" db_version=`expr $db_version + 1` done - dbm_list="$dbm_list, db60" # Check whether --with-dbm was given. @@ -12093,8 +12108,8 @@ if test "${with_berkeley_db+set}" = set; all_places="$check_places" - # Start version search at version 5.9 - db_version=59 + # Start version search at version 6.9 + db_version=69 while [ $db_version -ge 40 ] do db_major=`echo $db_version | sed -e 's/.$//'` @@ -12178,7 +12193,7 @@ $as_echo "" >&6; } ac_fn_c_check_header_mongrel "$LINENO" "$bdb_header" "$as_ac_Header" "$ac_includes_default" if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : - if test ""${db_major}"" = "3" -o ""${db_major}"" = "4" -o ""${db_major}"" = "5"; then + if test ""${db_major}"" = "3" -o ""${db_major}"" = "4" -o ""${db_major}"" = "5" -o ""${db_major}"" = "6"; then # We generate a separate cache variable for each prefix and libname # we search under. That way, we avoid caching information that # changes if the user runs `configure' with a different set of @@ -12580,7 +12595,7 @@ $as_echo "" >&6; } ac_fn_c_check_header_mongrel "$LINENO" "$bdb_header" "$as_ac_Header" "$ac_includes_default" if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : - if test "3" = "3" -o "3" = "4" -o "3" = "5"; then + if test "3" = "3" -o "3" = "4" -o "3" = "5" -o "3" = "6"; then # We generate a separate cache variable for each prefix and libname # we search under. That way, we avoid caching information that # changes if the user runs `configure' with a different set of @@ -12978,7 +12993,7 @@ $as_echo "" >&6; } ac_fn_c_check_header_mongrel "$LINENO" "$bdb_header" "$as_ac_Header" "$ac_includes_default" if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : - if test "2" = "3" -o "2" = "4" -o "2" = "5"; then + if test "2" = "3" -o "2" = "4" -o "2" = "5" -o "2" = "6"; then # We generate a separate cache variable for each prefix and libname # we search under. That way, we avoid caching information that # changes if the user runs `configure' with a different set of @@ -13376,7 +13391,7 @@ $as_echo "" >&6; } ac_fn_c_check_header_mongrel "$LINENO" "$bdb_header" "$as_ac_Header" "$ac_includes_default" if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : - if test "1" = "3" -o "1" = "4" -o "1" = "5"; then + if test "1" = "3" -o "1" = "4" -o "1" = "5" -o "1" = "6"; then # We generate a separate cache variable for each prefix and libname # we search under. That way, we avoid caching information that # changes if the user runs `configure' with a different set of @@ -13774,7 +13789,7 @@ $as_echo "" >&6; } ac_fn_c_check_header_mongrel "$LINENO" "$bdb_header" "$as_ac_Header" "$ac_includes_default" if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : - if test "1" = "3" -o "1" = "4" -o "1" = "5"; then + if test "1" = "3" -o "1" = "4" -o "1" = "5" -o "1" = "6"; then # We generate a separate cache variable for each prefix and libname # we search under. That way, we avoid caching information that # changes if the user runs `configure' with a different set of @@ -14186,7 +14201,7 @@ $as_echo "" >&6; } ac_fn_c_check_header_mongrel "$LINENO" "$bdb_header" "$as_ac_Header" "$ac_includes_default" if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : - if test "1" = "3" -o "1" = "4" -o "1" = "5"; then + if test "1" = "3" -o "1" = "4" -o "1" = "5" -o "1" = "6"; then # We generate a separate cache variable for each prefix and libname # we search under. That way, we avoid caching information that # changes if the user runs `configure' with a different set of @@ -14587,7 +14602,7 @@ $as_echo "" >&6; } ac_fn_c_check_header_mongrel "$LINENO" "$bdb_header" "$as_ac_Header" "$ac_includes_default" if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : - if test "1" = "3" -o "1" = "4" -o "1" = "5"; then + if test "1" = "3" -o "1" = "4" -o "1" = "5" -o "1" = "6"; then # We generate a separate cache variable for each prefix and libname # we search under. That way, we avoid caching information that # changes if the user runs `configure' with a different set of @@ -14988,7 +15003,7 @@ $as_echo "" >&6; } ac_fn_c_check_header_mongrel "$LINENO" "$bdb_header" "$as_ac_Header" "$ac_includes_default" if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : - if test "2" = "3" -o "2" = "4" -o "2" = "5"; then + if test "2" = "3" -o "2" = "4" -o "2" = "5" -o "2" = "6"; then # We generate a separate cache variable for each prefix and libname # we search under. That way, we avoid caching information that # changes if the user runs `configure' with a different set of @@ -15389,7 +15404,7 @@ $as_echo "" >&6; } ac_fn_c_check_header_mongrel "$LINENO" "$bdb_header" "$as_ac_Header" "$ac_includes_default" if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : - if test "3" = "3" -o "3" = "4" -o "3" = "5"; then + if test "3" = "3" -o "3" = "4" -o "3" = "5" -o "3" = "6"; then # We generate a separate cache variable for each prefix and libname # we search under. That way, we avoid caching information that # changes if the user runs `configure' with a different set of @@ -15794,7 +15809,7 @@ $as_echo "" >&6; } ac_fn_c_check_header_mongrel "$LINENO" "$bdb_header" "$as_ac_Header" "$ac_includes_default" if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : - if test ""${db_major}"" = "3" -o ""${db_major}"" = "4" -o ""${db_major}"" = "5"; then + if test ""${db_major}"" = "3" -o ""${db_major}"" = "4" -o ""${db_major}"" = "5" -o ""${db_major}"" = "6"; then # We generate a separate cache variable for each prefix and libname # we search under. That way, we avoid caching information that # changes if the user runs `configure' with a different set of @@ -16202,7 +16217,7 @@ $as_echo "" >&6; } ac_fn_c_check_header_mongrel "$LINENO" "$bdb_header" "$as_ac_Header" "$ac_includes_default" if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : - if test ""${db_major}"" = "3" -o ""${db_major}"" = "4" -o ""${db_major}"" = "5"; then + if test ""${db_major}"" = "3" -o ""${db_major}"" = "4" -o ""${db_major}"" = "5" -o ""${db_major}"" = "6"; then # We generate a separate cache variable for each prefix and libname # we search under. That way, we avoid caching information that # changes if the user runs `configure' with a different set of @@ -16534,8 +16549,8 @@ fi all_places="$check_places" - # Start version search at version 5.9 - db_version=59 + # Start version search at version 6.9 + db_version=69 while [ $db_version -ge 40 ] do db_major=`echo $db_version | sed -e 's/.$//'` @@ -16619,7 +16634,7 @@ $as_echo "" >&6; } ac_fn_c_check_header_mongrel "$LINENO" "$bdb_header" "$as_ac_Header" "$ac_includes_default" if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : - if test ""${db_major}"" = "3" -o ""${db_major}"" = "4" -o ""${db_major}"" = "5"; then + if test ""${db_major}"" = "3" -o ""${db_major}"" = "4" -o ""${db_major}"" = "5" -o ""${db_major}"" = "6"; then # We generate a separate cache variable for each prefix and libname # we search under. That way, we avoid caching information that # changes if the user runs `configure' with a different set of @@ -17021,7 +17036,7 @@ $as_echo "" >&6; } ac_fn_c_check_header_mongrel "$LINENO" "$bdb_header" "$as_ac_Header" "$ac_includes_default" if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : - if test "3" = "3" -o "3" = "4" -o "3" = "5"; then + if test "3" = "3" -o "3" = "4" -o "3" = "5" -o "3" = "6"; then # We generate a separate cache variable for each prefix and libname # we search under. That way, we avoid caching information that # changes if the user runs `configure' with a different set of @@ -17419,7 +17434,7 @@ $as_echo "" >&6; } ac_fn_c_check_header_mongrel "$LINENO" "$bdb_header" "$as_ac_Header" "$ac_includes_default" if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : - if test "2" = "3" -o "2" = "4" -o "2" = "5"; then + if test "2" = "3" -o "2" = "4" -o "2" = "5" -o "2" = "6"; then # We generate a separate cache variable for each prefix and libname # we search under. That way, we avoid caching information that # changes if the user runs `configure' with a different set of @@ -17817,7 +17832,7 @@ $as_echo "" >&6; } ac_fn_c_check_header_mongrel "$LINENO" "$bdb_header" "$as_ac_Header" "$ac_includes_default" if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : - if test "1" = "3" -o "1" = "4" -o "1" = "5"; then + if test "1" = "3" -o "1" = "4" -o "1" = "5" -o "1" = "6"; then # We generate a separate cache variable for each prefix and libname # we search under. That way, we avoid caching information that # changes if the user runs `configure' with a different set of @@ -18215,7 +18230,7 @@ $as_echo "" >&6; } ac_fn_c_check_header_mongrel "$LINENO" "$bdb_header" "$as_ac_Header" "$ac_includes_default" if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : - if test "1" = "3" -o "1" = "4" -o "1" = "5"; then + if test "1" = "3" -o "1" = "4" -o "1" = "5" -o "1" = "6"; then # We generate a separate cache variable for each prefix and libname # we search under. That way, we avoid caching information that # changes if the user runs `configure' with a different set of Modified: stable/10/contrib/apr-util/crypto/apr_crypto.c ============================================================================== --- stable/10/contrib/apr-util/crypto/apr_crypto.c Mon Oct 12 04:55:20 2015 (r289165) +++ stable/10/contrib/apr-util/crypto/apr_crypto.c Mon Oct 12 04:57:36 2015 (r289166) @@ -204,7 +204,7 @@ APU_DECLARE(apr_status_t) apr_crypto_get if (err && buffer) { apr_dso_error(dso, buffer, ERROR_SIZE - 1); err->msg = buffer; - err->reason = modname; + err->reason = apr_pstrdup(pool, modname); *result = err; } } Modified: stable/10/contrib/apr-util/crypto/apr_passwd.c ============================================================================== --- stable/10/contrib/apr-util/crypto/apr_passwd.c Mon Oct 12 04:55:20 2015 (r289165) +++ stable/10/contrib/apr-util/crypto/apr_passwd.c Mon Oct 12 04:57:36 2015 (r289166) @@ -66,6 +66,12 @@ static void crypt_mutex_unlock(void) #endif #endif +#if defined(WIN32) || defined(BEOS) || defined(NETWARE) || defined(__ANDROID__) +#define CRYPT_MISSING 1 +#else +#define CRYPT_MISSING 0 +#endif + /* * Validate a plaintext password against a smashed one. Uses either * crypt() (if available) or apr_md5_encode() or apr_sha1_base64(), depending @@ -77,7 +83,7 @@ APU_DECLARE(apr_status_t) apr_password_v const char *hash) { char sample[200]; -#if !defined(WIN32) && !defined(BEOS) && !defined(NETWARE) +#if !CRYPT_MISSING char *crypt_pw; #endif if (hash[0] == '$' @@ -100,7 +106,7 @@ APU_DECLARE(apr_status_t) apr_password_v /* * It's not our algorithm, so feed it to crypt() if possible. */ -#if defined(WIN32) || defined(BEOS) || defined(NETWARE) +#if CRYPT_MISSING return (strcmp(passwd, hash) == 0) ? APR_SUCCESS : APR_EMISMATCH; #elif defined(CRYPT_R_CRYPTD) apr_status_t rv; Modified: stable/10/contrib/apr-util/dbd/apr_dbd_mysql.c ============================================================================== --- stable/10/contrib/apr-util/dbd/apr_dbd_mysql.c Mon Oct 12 04:55:20 2015 (r289165) +++ stable/10/contrib/apr-util/dbd/apr_dbd_mysql.c Mon Oct 12 04:57:36 2015 (r289166) @@ -1050,9 +1050,9 @@ static int dbd_mysql_end_transaction(apr else { ret = mysql_commit(trans->handle->conn); } + ret |= mysql_autocommit(trans->handle->conn, 1); + trans->handle->trans = NULL; } - ret |= mysql_autocommit(trans->handle->conn, 1); - trans->handle->trans = NULL; return ret; } /* Whether or not transactions work depends on whether the Modified: stable/10/contrib/apr-util/dbd/apr_dbd_odbc.c ============================================================================== --- stable/10/contrib/apr-util/dbd/apr_dbd_odbc.c Mon Oct 12 04:55:20 2015 (r289165) +++ stable/10/contrib/apr-util/dbd/apr_dbd_odbc.c Mon Oct 12 04:57:36 2015 (r289166) @@ -47,6 +47,21 @@ #include #endif +/* +* MSVC6 does not support intptr_t (C99) +* APR does not have a signed inptr type until 2.0 (r1557720) +*/ +#if defined(_MSC_VER) && _MSC_VER < 1400 +#if APR_SIZEOF_VOIDP == 8 +#define ODBC_INTPTR_T apr_int64_t +#else +#define ODBC_INTPTR_T apr_int32_t +#endif +#else +#define ODBC_INTPTR_T intptr_t +#endif + + /* Driver name is "odbc" and the entry point is 'apr_dbd_odbc_driver' * unless ODBC_DRIVER_NAME is defined and it is linked with another db library which * is ODBC source-compatible. e.g. DB2, Informix, TimesTen, mysql. @@ -114,9 +129,9 @@ struct apr_dbd_t char lastError[MAX_ERROR_STRING]; int defaultBufferSize; /* used for CLOBs in text mode, * and when fld size is indeterminate */ - intptr_t transaction_mode; - intptr_t dboptions; /* driver options re SQLGetData */ - intptr_t default_transaction_mode; + ODBC_INTPTR_T transaction_mode; + ODBC_INTPTR_T dboptions; /* driver options re SQLGetData */ + ODBC_INTPTR_T default_transaction_mode; int can_commit; /* controls end_trans behavior */ }; @@ -359,7 +374,7 @@ static SQLRETURN odbc_set_result_column( SQLHANDLE stmt) { SQLRETURN rc; - intptr_t maxsize, textsize, realsize, type, isunsigned = 1; + ODBC_INTPTR_T maxsize, textsize, realsize, type, isunsigned = 1; /* discover the sql type */ rc = SQLColAttribute(stmt, icol + 1, SQL_DESC_UNSIGNED, NULL, 0, NULL, @@ -747,7 +762,7 @@ static void *odbc_get(const apr_dbd_row_ SQLRETURN rc; SQLLEN indicator; int state = row->res->colstate[col]; - intptr_t options = row->res->apr_dbd->dboptions; + ODBC_INTPTR_T options = row->res->apr_dbd->dboptions; switch (state) { case (COL_UNAVAIL): @@ -817,13 +832,13 @@ static apr_status_t odbc_parse_params(ap int *connect, SQLCHAR **datasource, SQLCHAR **user, SQLCHAR **password, int *defaultBufferSize, int *nattrs, - int **attrs, intptr_t **attrvals) + int **attrs, ODBC_INTPTR_T **attrvals) { char *seps, *last, *next, *name[MAX_PARAMS], *val[MAX_PARAMS]; int nparams = 0, i, j; *attrs = apr_pcalloc(pool, MAX_PARAMS * sizeof(char *)); - *attrvals = apr_pcalloc(pool, MAX_PARAMS * sizeof(intptr_t)); + *attrvals = apr_pcalloc(pool, MAX_PARAMS * sizeof(ODBC_INTPTR_T)); *nattrs = 0; seps = DEFAULTSEPS; name[nparams] = apr_strtok(apr_pstrdup(pool, params), seps, &last); @@ -1063,7 +1078,7 @@ static apr_dbd_t *odbc_open(apr_pool_t * SQLCHAR *datasource = (SQLCHAR *)"", *user = (SQLCHAR *)"", *password = (SQLCHAR *)""; int nattrs = 0, *attrs = NULL, connect = 0; - intptr_t *attrvals = NULL; + ODBC_INTPTR_T *attrvals = NULL; err_step = "SQLAllocHandle (SQL_HANDLE_DBC)"; err_htype = SQL_HANDLE_ENV; @@ -1117,10 +1132,10 @@ static apr_dbd_t *odbc_open(apr_pool_t * handle->default_transaction_mode = 0; handle->can_commit = APR_DBD_TRANSACTION_IGNORE_ERRORS; SQLGetInfo(hdbc, SQL_DEFAULT_TXN_ISOLATION, - &(handle->default_transaction_mode), sizeof(intptr_t), NULL); + &(handle->default_transaction_mode), sizeof(ODBC_INTPTR_T), NULL); handle->transaction_mode = handle->default_transaction_mode; SQLGetInfo(hdbc, SQL_GETDATA_EXTENSIONS ,&(handle->dboptions), - sizeof(intptr_t), NULL); + sizeof(ODBC_INTPTR_T), NULL); apr_pool_cleanup_register(pool, handle, odbc_close_cleanup, apr_pool_cleanup_null); return handle; } Modified: stable/10/contrib/apr-util/dbm/NWGNUmakefile ============================================================================== --- stable/10/contrib/apr-util/dbm/NWGNUmakefile Mon Oct 12 04:55:20 2015 (r289165) +++ stable/10/contrib/apr-util/dbm/NWGNUmakefile Mon Oct 12 04:57:36 2015 (r289166) @@ -235,7 +235,7 @@ nlms :: libs $(TARGET_nlm) # correct place. (See $(AP_WORK)\build\NWGNUhead.inc for examples) # install :: nlms $(INSTDIRS) FORCE - copy $(OBJDIR)\*.nlm $(INSTALLBASE) + $(call COPY,$(OBJDIR)/*.nlm,$(INSTALLBASE)) # # Any specialized rules here Modified: stable/10/contrib/apr-util/include/apu_version.h ============================================================================== --- stable/10/contrib/apr-util/include/apu_version.h Mon Oct 12 04:55:20 2015 (r289165) +++ stable/10/contrib/apr-util/include/apu_version.h Mon Oct 12 04:57:36 2015 (r289166) @@ -38,7 +38,7 @@ */ -#define APU_COPYRIGHT "Copyright (c) 2013 The Apache Software " \ +#define APU_COPYRIGHT "Copyright (c) 2000-2014 The Apache Software " \ "Foundation or its licensors, as applicable." /* The numeric compile-time version constants. These constants are the @@ -62,7 +62,7 @@ * The Patch Level never includes API changes, simply bug fixes. * Reset to 0 when upgrading APR_MINOR_VERSION */ -#define APU_PATCH_VERSION 3 +#define APU_PATCH_VERSION 4 /** * The symbol APU_IS_DEV_VERSION is only defined for internal, Modified: stable/10/contrib/apr-util/test/Makefile.win ============================================================================== --- stable/10/contrib/apr-util/test/Makefile.win Mon Oct 12 04:55:20 2015 (r289165) +++ stable/10/contrib/apr-util/test/Makefile.win Mon Oct 12 04:57:36 2015 (r289166) @@ -88,6 +88,8 @@ APROUTDIR=$(OUTDIR) !IF "$(MODEL)" == "static" PROGRAM_DEPENDENCIES = \ $(APR_PATH)\$(APROUTDIR)\apr-1.lib \ + $(API_PATH)\$(OUTDIR)\apriconv-1.lib \ + ..\xml\expat\lib\$(OUTDIR)\xml.lib \ ..\$(OUTDIR)\aprutil-1.lib STATIC_CFLAGS = /D APR_DECLARE_STATIC /D APU_DECLARE_STATIC STATIC_LIBS = odbc32.lib odbccp32.lib wldap32.lib Modified: stable/10/contrib/apr/CHANGES ============================================================================== --- stable/10/contrib/apr/CHANGES Mon Oct 12 04:55:20 2015 (r289165) +++ stable/10/contrib/apr/CHANGES Mon Oct 12 04:57:36 2015 (r289166) @@ -1,4 +1,63 @@ -*- coding: utf-8 -*- +Changes for APR 1.5.2 + + *) SECURITY: CVE-2015-1829 (cve.mitre.org) + APR applications using APR named pipe support on Windows can be + vulnerable to a pipe squatting attack from a local process; the extent + of the vulnerability, when present, depends on the application. + Initial analysis and report was provided by John Hernandez of Casaba + Security via HP SSRT Security Alert. [Yann Ylavic] + + *) apr_atomic: Fix errors when building on Visual Studio 2013 while + maintaining the ability to build on Visual Studio 6 with Windows + Server 2003 R2 SDK. PR 57191. [Gregg Smith] + + *) Switch to generic atomics for early/unpatched Solaris 10 not exporting + some atomic functions. PR 55418. [Yann Ylavic] + + *) apr_file_mktemp() on HP-UX: Remove limitation of 26 temporary files + per process. PR 57677. [Jeff Trawick] + + *) apr_escape: Correctly calculate the size of the returned string in + apr_escape_path and set the correct return value in case we actually + escape the string. [] PR 57230. + + *) pollcb on Windows: Handle calls with no file/socket descriptors. + Follow up to PR 49882. [Jeff Trawick, Yann Ylavic] + + *) apr_poll(cb): fix error paths returned values and leaks. [Yann Ylavic] + + *) apr_thread_cond_*wait() on BeOS: Fix broken logic. PR 45800. + [Jochen Voss (no e-mail)] + + *) apr_skiplist: Optimize the number of allocations by reusing pooled or + malloc()ed nodes for the lifetime of the skiplist. [Yann Ylavic] + + *) apr_skiplist: Fix possible multiple-free() on the same value in + apr_skiplist_remove_all(). [Yann Ylavic] + + *) apr_pollset: On z/OS, threadsafe apr_pollset_poll() may return + "EDC8102I Operation would block" under load. + [Pat Odonnell ] + + *) On z/OS, apr_sockaddr_info_get() with family == APR_UNSPEC was not + returning IPv4 addresses if any IPv6 addresses were returned. + [Eric Covener] + + *) Windows cmake build: Fix an incompatibility with cmake 2.8.12 and + later. [Jeff Trawick] + + *) apr_global_mutex/apr_proc_mutex: Resolve failures with the + POSIX sem implementation in environments which receive signals. + [Jeff Trawick] + + *) apr_skiplist: Fix potential corruption of skiplists leading to + results or crashes. [Takashi Sato , Eric Covener] + PR 56654. + + *) Improve platform detection by updating config.guess and config.sub. + [Rainer Jung] + Changes for APR 1.5.1 *) apr_os_proc_mutex_get() on Unix: Avoid segfault for cross- @@ -37,8 +96,8 @@ Changes for APR 1.5.1 *) Correct a regression in 1.5.0 which affected out-of-tree builds on Unix. [Rainer Jung] - *) Improve platform detection for bundled expat by updating - config.guess and config.sub. [Rainer Jung] + *) Improve platform detection by updating config.guess and config.sub. + [Rainer Jung] Changes for APR 1.5.0 Modified: stable/10/contrib/apr/CMakeLists.txt ============================================================================== --- stable/10/contrib/apr/CMakeLists.txt Mon Oct 12 04:55:20 2015 (r289165) +++ stable/10/contrib/apr/CMakeLists.txt Mon Oct 12 04:57:36 2015 (r289166) @@ -234,6 +234,7 @@ SET(APR_TEST_SOURCES test/testprocmutex.c test/testrand.c test/testshm.c + test/testskiplist.c test/testsleep.c test/testsock.c test/testsockets.c @@ -252,7 +253,6 @@ SET(APR_TEST_SOURCES SET(install_targets) SET(install_bin_pdb) -SET(install_lib_pdb) # libapr-1 is shared, apr-1 is static ADD_LIBRARY(libapr-1 SHARED ${APR_SOURCES} ${APR_PUBLIC_HEADERS_GENERATED} libapr.rc) @@ -264,7 +264,6 @@ ADD_DEPENDENCIES(libapr-1 test_char_head ADD_LIBRARY(apr-1 STATIC ${APR_SOURCES} ${APR_PUBLIC_HEADERS_GENERATED}) SET(install_targets ${install_targets} apr-1) -SET(install_lib_pdb ${install_lib_pdb} ${PROJECT_BINARY_DIR}/apr-1.pdb) TARGET_LINK_LIBRARIES(apr-1 ${APR_SYSTEM_LIBS}) SET_TARGET_PROPERTIES(apr-1 PROPERTIES COMPILE_DEFINITIONS "APR_DECLARE_STATIC;WINNT") ADD_DEPENDENCIES(apr-1 test_char_header) @@ -272,12 +271,10 @@ ADD_DEPENDENCIES(apr-1 test_char_header) # libaprapp-1 and aprapp-1 are static ADD_LIBRARY(libaprapp-1 STATIC misc/win32/apr_app.c misc/win32/internal.c ${APR_PUBLIC_HEADERS_GENERATED}) SET(install_targets ${install_targets} libaprapp-1) -SET(install_lib_pdb ${install_lib_pdb} ${PROJECT_BINARY_DIR}/libaprapp-1.pdb) SET_TARGET_PROPERTIES(libaprapp-1 PROPERTIES COMPILE_DEFINITIONS "APR_APP;WINNT") ADD_LIBRARY(aprapp-1 STATIC misc/win32/apr_app.c misc/win32/internal.c ${APR_PUBLIC_HEADERS_GENERATED}) SET(install_targets ${install_targets} aprapp-1) -SET(install_lib_pdb ${install_lib_pdb} ${PROJECT_BINARY_DIR}/aprapp-1.pdb) SET_TARGET_PROPERTIES(aprapp-1 PROPERTIES COMPILE_DEFINITIONS "APR_DECLARE_STATIC;APR_APP;WINNT") IF(APR_BUILD_TESTAPR) @@ -394,10 +391,6 @@ IF(INSTALL_PDB) INSTALL(FILES ${install_bin_pdb} DESTINATION bin CONFIGURATIONS RelWithDebInfo Debug) - - INSTALL(FILES ${install_lib_pdb} - DESTINATION lib - CONFIGURATIONS RelWithDebInfo Debug) ENDIF() INSTALL(FILES ${APR_PUBLIC_HEADERS_STATIC} ${APR_PUBLIC_HEADERS_GENERATED} DESTINATION include) Modified: stable/10/contrib/apr/Makefile.in ============================================================================== --- stable/10/contrib/apr/Makefile.in Mon Oct 12 04:55:20 2015 (r289165) +++ stable/10/contrib/apr/Makefile.in Mon Oct 12 04:57:36 2015 (r289166) @@ -129,11 +129,11 @@ check: $(TARGET_LIB) etags: etags `find . -name '*.[ch]'` -make_tools_dir: +OBJECTS_gen_test_char = tools/gen_test_char.lo $(LOCAL_LIBS) +tools/gen_test_char.lo: tools/gen_test_char.c $(APR_MKDIR) tools + $(LT_COMPILE) -OBJECTS_gen_test_char = tools/gen_test_char.lo $(LOCAL_LIBS) -tools/gen_test_char.lo: make_tools_dir tools/gen_test_char@EXEEXT@: $(OBJECTS_gen_test_char) $(LINK_PROG) $(OBJECTS_gen_test_char) $(ALL_LIBS) Modified: stable/10/contrib/apr/NOTICE ============================================================================== --- stable/10/contrib/apr/NOTICE Mon Oct 12 04:55:20 2015 (r289165) +++ stable/10/contrib/apr/NOTICE Mon Oct 12 04:57:36 2015 (r289166) @@ -1,5 +1,5 @@ Apache Portable Runtime -Copyright (c) 2000-2014 The Apache Software Foundation. +Copyright (c) 2000-2015 The Apache Software Foundation. This product includes software developed at The Apache Software Foundation (http://www.apache.org/). Modified: stable/10/contrib/apr/NWGNUmakefile ============================================================================== --- stable/10/contrib/apr/NWGNUmakefile Mon Oct 12 04:55:20 2015 (r289165) +++ stable/10/contrib/apr/NWGNUmakefile Mon Oct 12 04:57:36 2015 (r289166) @@ -50,6 +50,7 @@ include $(APR_WORK)/build/NWGNUhead.inc # XINCDIRS += \ $(APR)/include \ + $(APR)/include/private \ $(APR)/include/arch/NetWare \ $(APR)/include/arch/unix \ $(APR)/memory/unix \ @@ -293,11 +294,13 @@ FILES_nlm_exports = \ FILES_lib_objs = \ $(OBJDIR)/apr_atomic.o \ $(OBJDIR)/apr_cpystrn.o \ + $(OBJDIR)/apr_escape.o \ $(OBJDIR)/apr_fnmatch.o \ $(OBJDIR)/apr_getpass.o \ $(OBJDIR)/apr_hash.o \ $(OBJDIR)/apr_pools.o \ $(OBJDIR)/apr_random.o \ + $(OBJDIR)/apr_skiplist.o \ $(OBJDIR)/apr_snprintf.o \ $(OBJDIR)/apr_strings.o \ $(OBJDIR)/apr_strnatcmp.o \ @@ -407,7 +410,7 @@ endif vpath %.c atomic/netware:strings:tables:passwd:lib:time/unix vpath %.c file_io/unix:locks/netware:misc/netware:misc/unix:threadproc/netware vpath %.c poll/unix:shmem/unix:support/unix:random/unix -vpath %.c dso/netware:memory/unix:mmap/unix:user/netware +vpath %.c dso/netware:memory/unix:mmap/unix:user/netware:encoding # Use the win32 network_io if Winsock is being used ifndef USE_STDSOCKETS Modified: stable/10/contrib/apr/apr.dsp ============================================================================== --- stable/10/contrib/apr/apr.dsp Mon Oct 12 04:55:20 2015 (r289165) +++ stable/10/contrib/apr/apr.dsp Mon Oct 12 04:57:36 2015 (r289166) @@ -907,69 +907,6 @@ SOURCE=.\include\apr_version.h # Begin Source File SOURCE=.\include\apr_want.h - -!IF "$(CFG)" == "apr - Win32 Release" - -# Begin Custom Build -InputPath=.\include\apr_want.h - -".\LibR\gen_test_char.exe" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" - type .\include\apr.hw > .\include\apr.h - -# End Custom Build - -!ELSEIF "$(CFG)" == "apr - Win32 Debug" - -# Begin Custom Build -InputPath=.\include\apr_want.h - -".\LibD\gen_test_char.exe" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" - type .\include\apr.hw > .\include\apr.h - -# End Custom Build - -!ELSEIF "$(CFG)" == "apr - Win32 Release9x" - -# Begin Custom Build -InputPath=.\include\apr_want.h - -".\9x\LibR\gen_test_char.exe" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" - type .\include\apr.hw > .\include\apr.h - -# End Custom Build - -!ELSEIF "$(CFG)" == "apr - Win32 Debug9x" - -# Begin Custom Build -InputPath=.\include\apr_want.h - -".\9x\LibD\gen_test_char.exe" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" - type .\include\apr.hw > .\include\apr.h - -# End Custom Build - -!ELSEIF "$(CFG)" == "apr - x64 Release" - -# Begin Custom Build -InputPath=.\include\apr_want.h - -".\x64\LibR\gen_test_char.exe" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" - type .\include\apr.hw > .\include\apr.h - -# End Custom Build - -!ELSEIF "$(CFG)" == "apr - x64 Debug" - -# Begin Custom Build -InputPath=.\include\apr_want.h - -".\x64\LibD\gen_test_char.exe" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" - type .\include\apr.hw > .\include\apr.h - -# End Custom Build - -!ENDIF - # End Source File # End Group # End Target Modified: stable/10/contrib/apr/apr.spec ============================================================================== --- stable/10/contrib/apr/apr.spec Mon Oct 12 04:55:20 2015 (r289165) +++ stable/10/contrib/apr/apr.spec Mon Oct 12 04:57:36 2015 (r289166) @@ -3,7 +3,7 @@ Summary: Apache Portable Runtime library Name: apr -Version: 1.5.1 +Version: 1.5.2 Release: 1 License: Apache Software License Group: System Environment/Libraries @@ -76,7 +76,7 @@ rm -rf $RPM_BUILD_ROOT %defattr(-,root,root,-) %doc docs/APRDesign.html docs/canonical_filenames.html %doc docs/incomplete_types docs/non_apr_programs -%doc --parents html +%doc html %{_bindir}/apr*config %{_libdir}/libapr-%{aprver}.*a %{_libdir}/libapr-%{aprver}.so Modified: stable/10/contrib/apr/build-outputs.mk ============================================================================== --- stable/10/contrib/apr/build-outputs.mk Mon Oct 12 04:55:20 2015 (r289165) +++ stable/10/contrib/apr/build-outputs.mk Mon Oct 12 04:57:36 2015 (r289166) @@ -251,7 +251,7 @@ file_io/win32/filestat.lo: file_io/win32 file_io/win32/filesys.lo: file_io/win32/filesys.c .make.dirs include/apr_allocator.h include/apr_errno.h include/apr_general.h include/apr_pools.h include/apr_strings.h include/apr_thread_mutex.h include/apr_want.h file_io/win32/flock.lo: file_io/win32/flock.c .make.dirs file_io/win32/open.lo: file_io/win32/open.c .make.dirs include/apr_allocator.h include/apr_dso.h include/apr_errno.h include/apr_file_info.h include/apr_file_io.h include/apr_general.h include/apr_global_mutex.h include/apr_inherit.h include/apr_network_io.h include/apr_pools.h include/apr_portable.h include/apr_proc_mutex.h include/apr_shm.h include/apr_strings.h include/apr_tables.h include/apr_thread_mutex.h include/apr_thread_proc.h include/apr_time.h include/apr_user.h include/apr_want.h -file_io/win32/pipe.lo: file_io/win32/pipe.c .make.dirs include/apr_allocator.h include/apr_errno.h include/apr_file_info.h include/apr_file_io.h include/apr_general.h include/apr_inherit.h include/apr_pools.h include/apr_strings.h include/apr_tables.h include/apr_thread_mutex.h include/apr_time.h include/apr_user.h include/apr_want.h +file_io/win32/pipe.lo: file_io/win32/pipe.c .make.dirs include/apr_allocator.h include/apr_errno.h include/apr_escape.h include/apr_file_info.h include/apr_file_io.h include/apr_general.h include/apr_inherit.h include/apr_pools.h include/apr_strings.h include/apr_tables.h include/apr_thread_mutex.h include/apr_time.h include/apr_user.h include/apr_want.h file_io/win32/readwrite.lo: file_io/win32/readwrite.c .make.dirs include/apr_allocator.h include/apr_errno.h include/apr_file_info.h include/apr_file_io.h include/apr_general.h include/apr_inherit.h include/apr_lib.h include/apr_pools.h include/apr_strings.h include/apr_tables.h include/apr_thread_mutex.h include/apr_time.h include/apr_user.h include/apr_want.h file_io/win32/seek.lo: file_io/win32/seek.c .make.dirs include/apr_allocator.h include/apr_errno.h include/apr_file_info.h include/apr_file_io.h include/apr_general.h include/apr_inherit.h include/apr_pools.h include/apr_tables.h include/apr_thread_mutex.h include/apr_time.h include/apr_user.h include/apr_want.h Modified: stable/10/contrib/apr/configure ============================================================================== --- stable/10/contrib/apr/configure Mon Oct 12 04:55:20 2015 (r289165) +++ stable/10/contrib/apr/configure Mon Oct 12 04:57:36 2015 (r289166) @@ -6802,10 +6802,10 @@ if test "x$apr_preload_done" != "xyes" ; *-apple-darwin*) if test "x$CPPFLAGS" = "x"; then - test "x$silent" != "xyes" && echo " setting CPPFLAGS to \"-DDARWIN -DSIGPROCMASK_SETS_THREAD_MASK -no-cpp-precomp\"" - CPPFLAGS="-DDARWIN -DSIGPROCMASK_SETS_THREAD_MASK -no-cpp-precomp" + test "x$silent" != "xyes" && echo " setting CPPFLAGS to \"-DDARWIN -DSIGPROCMASK_SETS_THREAD_MASK\"" + CPPFLAGS="-DDARWIN -DSIGPROCMASK_SETS_THREAD_MASK" else - apr_addto_bugger="-DDARWIN -DSIGPROCMASK_SETS_THREAD_MASK -no-cpp-precomp" + apr_addto_bugger="-DDARWIN -DSIGPROCMASK_SETS_THREAD_MASK" for i in $apr_addto_bugger; do apr_addto_duplicate="0" for j in $CPPFLAGS; do @@ -18794,7 +18794,34 @@ if test "${enable_nonportable_atomics+se else case $host_cpu in i[456]86) force_generic_atomics=yes ;; - *) force_generic_atomics=no ;; + *) force_generic_atomics=no + case $host in + *solaris2.10*) + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +int +main () +{ +void *ptr = NULL; atomic_cas_ptr(&ptr, NULL, NULL); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + +else + force_generic_atomics=yes + +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + if test $force_generic_atomics = yes; then + { $as_echo "$as_me:${as_lineno-$LINENO}: nonportable atomic support disabled, system needs Patch-ID 118884 or 118885" >&5 +$as_echo "$as_me: nonportable atomic support disabled, system needs Patch-ID 118884 or 118885" >&6;} + fi + ;; + esac + ;; esac fi @@ -22292,7 +22319,7 @@ else fi done -for ac_func in getpass getpassphrase gmtime_r localtime_r mkstemp +for ac_func in getpass getpassphrase gmtime_r localtime_r do : as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" @@ -22304,6 +22331,23 @@ _ACEOF fi done +case $host in + *-hp-hpux*) + ;; + *) + for ac_func in mkstemp +do : + ac_fn_c_check_func "$LINENO" "mkstemp" "ac_cv_func_mkstemp" +if test "x$ac_cv_func_mkstemp" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_MKSTEMP 1 +_ACEOF + +fi +done + + ;; +esac @@ -23902,7 +23946,7 @@ _ACEOF if test "${ac_cv_sizeof_off_t}${apr_cv_use_lfs64}" = "4yes"; then # Enable LFS aprlfs=1 - for ac_func in mmap64 sendfile64 sendfilev64 mkstemp64 readdir64_r + for ac_func in mmap64 sendfile64 sendfilev64 readdir64_r do : as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" @@ -23914,6 +23958,23 @@ _ACEOF fi done + case $host in + *-hp-hpux*) + ;; + *) + for ac_func in mkstemp64 +do : + ac_fn_c_check_func "$LINENO" "mkstemp64" "ac_cv_func_mkstemp64" +if test "x$ac_cv_func_mkstemp64" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_MKSTEMP64 1 +_ACEOF + +fi +done + + ;; + esac elif test "${ac_cv_sizeof_off_t}" != "${ac_cv_sizeof_size_t}"; then # unsure of using -gt above is as portable, can can't forsee where # off_t can legitimately be smaller than size_t Modified: stable/10/contrib/apr/configure.in ============================================================================== --- stable/10/contrib/apr/configure.in Mon Oct 12 04:55:20 2015 (r289165) +++ stable/10/contrib/apr/configure.in Mon Oct 12 04:57:36 2015 (r289166) @@ -640,7 +640,20 @@ AC_ARG_ENABLE(nonportable-atomics, ], [case $host_cpu in i[[456]]86) force_generic_atomics=yes ;; - *) force_generic_atomics=no ;; + *) force_generic_atomics=no + case $host in + *solaris2.10*) + AC_TRY_COMPILE( + [#include ], + [void *ptr = NULL; atomic_cas_ptr(&ptr, NULL, NULL);],, + [force_generic_atomics=yes] + ) + if test $force_generic_atomics = yes; then + AC_MSG_NOTICE([nonportable atomic support disabled, system needs Patch-ID 118884 or 118885]) + fi + ;; + esac + ;; esac ]) @@ -1400,7 +1413,15 @@ if test "$native_mmap_emul" = "1"; then mmap="1" fi AC_CHECK_FUNCS(memmove, [ have_memmove="1" ], [have_memmove="0" ]) -AC_CHECK_FUNCS([getpass getpassphrase gmtime_r localtime_r mkstemp]) +AC_CHECK_FUNCS([getpass getpassphrase gmtime_r localtime_r]) +case $host in + *-hp-hpux*) + dnl mkstemp is limited to 26 temporary files (a-z); use APR replacement + ;; + *) + AC_CHECK_FUNCS(mkstemp) + ;; +esac AC_SUBST(fork) AC_SUBST(have_inet_addr) @@ -1801,7 +1822,15 @@ APR_CHECK_SIZEOF_EXTENDED([#include 0 indicates placement + * before this node. * */ typedef int (*apr_skiplist_compare) (void *, void *); @@ -171,7 +173,8 @@ APR_DECLARE(void *) apr_skiplist_next(ap APR_DECLARE(void *) apr_skiplist_previous(apr_skiplist *sl, apr_skiplistnode **iter); /** - * Insert an element into the skip list using the specified comparison function. + * Insert an element into the skip list using the specified comparison function + * if it does not already exist. * @param sl The skip list * @param data The element to insert * @param comp The comparison function to use for placement into the skip list @@ -180,7 +183,8 @@ APR_DECLARE(apr_skiplistnode *) apr_skip void *data, apr_skiplist_compare comp); /** - * Insert an element into the skip list using the existing comparison function. + * Insert an element into the skip list using the existing comparison function + * if it does not already exist (as determined by the comparison function) * @param sl The skip list * @param data The element to insert * @remark If no comparison function has been set for the skip list, the element @@ -190,7 +194,7 @@ APR_DECLARE(apr_skiplistnode *) apr_skip /** * Remove an element from the skip list using the specified comparison function for - * locating the element. + * locating the element. In the case of duplicates, the 1st entry will be removed. * @param sl The skip list * @param data The element to remove * @param myfree A function to be called for each removed element @@ -203,7 +207,7 @@ APR_DECLARE(int) apr_skiplist_remove_com /** * Remove an element from the skip list using the existing comparison function for - * locating the element. + * locating the element. In the case of duplicates, the 1st entry will be removed. * @param sl The skip list * @param data The element to remove * @param myfree A function to be called for each removed element @@ -229,7 +233,7 @@ APR_DECLARE(void) apr_skiplist_remove_al APR_DECLARE(void) apr_skiplist_destroy(apr_skiplist *sl, apr_skiplist_freefunc myfree); /** - * Return the first element in the skip list, leaving the element in the skip list. + * Return the first element in the skip list, removing the element from the skip list. * @param sl The skip list * @param myfree A function to be called for the removed element * @remark NULL will be returned if there are no elements Modified: stable/10/contrib/apr/include/apr_version.h ============================================================================== --- stable/10/contrib/apr/include/apr_version.h Mon Oct 12 04:55:20 2015 (r289165) +++ stable/10/contrib/apr/include/apr_version.h Mon Oct 12 04:57:36 2015 (r289166) @@ -38,7 +38,7 @@ */ -#define APR_COPYRIGHT "Copyright (c) 2000-2014 The Apache Software " \ +#define APR_COPYRIGHT "Copyright (c) 2000-2015 The Apache Software " \ *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@freebsd.org Mon Oct 12 05:14:50 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id BE5ACA11953; Mon, 12 Oct 2015 05:14:50 +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 98A5A2F2; Mon, 12 Oct 2015 05:14:50 +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 t9C5En21034594; Mon, 12 Oct 2015 05:14:49 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9C5EnZr034590; Mon, 12 Oct 2015 05:14:49 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201510120514.t9C5EnZr034590@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Mon, 12 Oct 2015 05:14:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289167 - in head/sys: dev/usb/wlan modules/usb/urtwn X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Oct 2015 05:14:50 -0000 Author: adrian Date: Mon Oct 12 05:14:49 2015 New Revision: 289167 URL: https://svnweb.freebsd.org/changeset/base/289167 Log: urtwn(4): split *reg and *var parts (no functional change). Submitted by: Differential Revision: https://reviews.freebsd.org/D3775 Added: head/sys/dev/usb/wlan/if_urtwnvar.h (contents, props changed) Modified: head/sys/dev/usb/wlan/if_urtwn.c head/sys/dev/usb/wlan/if_urtwnreg.h head/sys/modules/usb/urtwn/Makefile Modified: head/sys/dev/usb/wlan/if_urtwn.c ============================================================================== --- head/sys/dev/usb/wlan/if_urtwn.c Mon Oct 12 04:57:36 2015 (r289166) +++ head/sys/dev/usb/wlan/if_urtwn.c Mon Oct 12 05:14:49 2015 (r289167) @@ -76,6 +76,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #ifdef USB_DEBUG static int urtwn_debug = 0; Modified: head/sys/dev/usb/wlan/if_urtwnreg.h ============================================================================== --- head/sys/dev/usb/wlan/if_urtwnreg.h Mon Oct 12 04:57:36 2015 (r289166) +++ head/sys/dev/usb/wlan/if_urtwnreg.h Mon Oct 12 05:14:49 2015 (r289167) @@ -1061,197 +1061,6 @@ struct r92c_tx_desc { /* - * Driver definitions. - */ -#define URTWN_RX_LIST_COUNT 1 -#define URTWN_TX_LIST_COUNT 8 -#define URTWN_HOST_CMD_RING_COUNT 32 - -#define URTWN_RXBUFSZ (16 * 1024) -#define URTWN_TXBUFSZ (sizeof(struct r92c_tx_desc) + IEEE80211_MAX_LEN) -#define URTWN_RX_DESC_SIZE (sizeof(struct r92c_rx_stat)) -#define URTWN_TX_DESC_SIZE (sizeof(struct r92c_tx_desc)) - -#define URTWN_RIDX_COUNT 28 - -#define URTWN_TX_TIMEOUT 5000 /* ms */ - -#define URTWN_LED_LINK 0 -#define URTWN_LED_DATA 1 - -struct urtwn_rx_radiotap_header { - struct ieee80211_radiotap_header wr_ihdr; - uint8_t wr_flags; - uint8_t wr_rate; - uint16_t wr_chan_freq; - uint16_t wr_chan_flags; - uint8_t wr_dbm_antsignal; -} __packed __aligned(8); - -#define URTWN_RX_RADIOTAP_PRESENT \ - (1 << IEEE80211_RADIOTAP_FLAGS | \ - 1 << IEEE80211_RADIOTAP_RATE | \ - 1 << IEEE80211_RADIOTAP_CHANNEL | \ - 1 << IEEE80211_RADIOTAP_DBM_ANTSIGNAL) - -struct urtwn_tx_radiotap_header { - struct ieee80211_radiotap_header wt_ihdr; - uint8_t wt_flags; - uint16_t wt_chan_freq; - uint16_t wt_chan_flags; -} __packed __aligned(8); - -#define URTWN_TX_RADIOTAP_PRESENT \ - (1 << IEEE80211_RADIOTAP_FLAGS | \ - 1 << IEEE80211_RADIOTAP_CHANNEL) - -struct urtwn_softc; - -struct urtwn_data { - struct urtwn_softc *sc; - uint8_t *buf; - uint16_t buflen; - struct mbuf *m; - struct ieee80211_node *ni; - STAILQ_ENTRY(urtwn_data) next; -}; -typedef STAILQ_HEAD(, urtwn_data) urtwn_datahead; - -struct urtwn_cmdq { - void *arg0; - void *arg1; - void (*func)(void *); - struct ieee80211_key *k; - struct ieee80211_key key; - uint8_t mac[IEEE80211_ADDR_LEN]; - uint8_t wcid; -}; - -struct urtwn_fw_info { - const uint8_t *data; - size_t size; -}; - -struct urtwn_vap { - struct ieee80211vap vap; - - int (*newstate)(struct ieee80211vap *, - enum ieee80211_state, int); -}; -#define URTWN_VAP(vap) ((struct urtwn_vap *)(vap)) - -struct urtwn_host_cmd { - void (*cb)(struct urtwn_softc *, void *); - uint8_t data[256]; -}; - -struct urtwn_cmd_newstate { - enum ieee80211_state state; - int arg; -}; - -struct urtwn_cmd_key { - struct ieee80211_key key; - uint16_t associd; -}; - -enum { - URTWN_BULK_RX, - URTWN_BULK_TX_BE, /* = WME_AC_BE */ - URTWN_BULK_TX_BK, /* = WME_AC_BK */ - URTWN_BULK_TX_VI, /* = WME_AC_VI */ - URTWN_BULK_TX_VO, /* = WME_AC_VI */ - URTWN_N_TRANSFER = 5, -}; - -#define URTWN_EP_QUEUES URTWN_BULK_RX - -struct urtwn_softc { - struct ieee80211com sc_ic; - struct mbufq sc_snd; - device_t sc_dev; - struct usb_device *sc_udev; - - int ac2idx[WME_NUM_AC]; - u_int sc_flags; -#define URTWN_FLAG_CCK_HIPWR 0x01 -#define URTWN_DETACHED 0x02 -#define URTWN_RUNNING 0x04 - - u_int chip; -#define URTWN_CHIP_92C 0x01 -#define URTWN_CHIP_92C_1T2R 0x02 -#define URTWN_CHIP_UMC 0x04 -#define URTWN_CHIP_UMC_A_CUT 0x08 -#define URTWN_CHIP_88E 0x10 - - void (*sc_rf_write)(struct urtwn_softc *, - int, uint8_t, uint32_t); - int (*sc_power_on)(struct urtwn_softc *); - int (*sc_dma_init)(struct urtwn_softc *); - - uint8_t board_type; - uint8_t regulatory; - uint8_t pa_setting; - int avg_pwdb; - int thcal_state; - int thcal_lctemp; - int ntxchains; - int nrxchains; - int ledlink; - int sc_txtimer; - - int fwcur; - struct urtwn_data sc_rx[URTWN_RX_LIST_COUNT]; - urtwn_datahead sc_rx_active; - urtwn_datahead sc_rx_inactive; - struct urtwn_data sc_tx[URTWN_TX_LIST_COUNT]; - urtwn_datahead sc_tx_active; - urtwn_datahead sc_tx_inactive; - urtwn_datahead sc_tx_pending; - - const char *fwname; - const struct firmware *fw_fp; - struct urtwn_fw_info fw; - void *fw_virtaddr; - - struct r92c_rom rom; - uint8_t r88e_rom[512]; - uint8_t cck_tx_pwr[6]; - uint8_t ht40_tx_pwr[5]; - int8_t bw20_tx_pwr_diff; - int8_t ofdm_tx_pwr_diff; - - struct callout sc_watchdog_ch; - struct mtx sc_mtx; - -/* need to be power of 2, otherwise URTWN_CMDQ_GET fails */ -#define URTWN_CMDQ_MAX 16 -#define URTWN_CMDQ_MASQ (URTWN_CMDQ_MAX - 1) - struct urtwn_cmdq cmdq[URTWN_CMDQ_MAX]; - struct task cmdq_task; - uint32_t cmdq_store; - uint8_t cmdq_exec; - uint8_t cmdq_run; - uint8_t cmdq_key_set; -#define URTWN_CMDQ_ABORT 0 -#define URTWN_CMDQ_GO 1 - - uint32_t rf_chnlbw[R92C_MAX_CHAINS]; - struct usb_xfer *sc_xfer[URTWN_N_TRANSFER]; - - struct urtwn_rx_radiotap_header sc_rxtap; - int sc_rxtap_len; - - struct urtwn_tx_radiotap_header sc_txtap; - int sc_txtap_len; -}; - -#define URTWN_LOCK(sc) mtx_lock(&(sc)->sc_mtx) -#define URTWN_UNLOCK(sc) mtx_unlock(&(sc)->sc_mtx) -#define URTWN_ASSERT_LOCKED(sc) mtx_assert(&(sc)->sc_mtx, MA_OWNED) - -/* * MAC initialization values. */ static const struct { Added: head/sys/dev/usb/wlan/if_urtwnvar.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/dev/usb/wlan/if_urtwnvar.h Mon Oct 12 05:14:49 2015 (r289167) @@ -0,0 +1,206 @@ +/*- + * Copyright (c) 2010 Damien Bergamini + * + * Permission to use, copy, modify, and distribute this software for any + * purpose with or without fee is hereby granted, provided that the above + * copyright notice and this permission notice appear in all copies. + * + * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES + * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR + * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN + * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF + * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + * + * $OpenBSD: if_urtwnreg.h,v 1.3 2010/11/16 18:02:59 damien Exp $ + * $FreeBSD$ + */ + +#define URTWN_RX_LIST_COUNT 1 +#define URTWN_TX_LIST_COUNT 8 +#define URTWN_HOST_CMD_RING_COUNT 32 + +#define URTWN_RXBUFSZ (16 * 1024) +#define URTWN_TXBUFSZ (sizeof(struct r92c_tx_desc) + IEEE80211_MAX_LEN) +#define URTWN_RX_DESC_SIZE (sizeof(struct r92c_rx_stat)) +#define URTWN_TX_DESC_SIZE (sizeof(struct r92c_tx_desc)) + +#define URTWN_RIDX_COUNT 28 + +#define URTWN_TX_TIMEOUT 5000 /* ms */ + +#define URTWN_LED_LINK 0 +#define URTWN_LED_DATA 1 + +struct urtwn_rx_radiotap_header { + struct ieee80211_radiotap_header wr_ihdr; + uint8_t wr_flags; + uint8_t wr_rate; + uint16_t wr_chan_freq; + uint16_t wr_chan_flags; + uint8_t wr_dbm_antsignal; +} __packed __aligned(8); + +#define URTWN_RX_RADIOTAP_PRESENT \ + (1 << IEEE80211_RADIOTAP_FLAGS | \ + 1 << IEEE80211_RADIOTAP_RATE | \ + 1 << IEEE80211_RADIOTAP_CHANNEL | \ + 1 << IEEE80211_RADIOTAP_DBM_ANTSIGNAL) + +struct urtwn_tx_radiotap_header { + struct ieee80211_radiotap_header wt_ihdr; + uint8_t wt_flags; + uint16_t wt_chan_freq; + uint16_t wt_chan_flags; +} __packed __aligned(8); + +#define URTWN_TX_RADIOTAP_PRESENT \ + (1 << IEEE80211_RADIOTAP_FLAGS | \ + 1 << IEEE80211_RADIOTAP_CHANNEL) + +struct urtwn_softc; + +struct urtwn_data { + struct urtwn_softc *sc; + uint8_t *buf; + uint16_t buflen; + struct mbuf *m; + struct ieee80211_node *ni; + STAILQ_ENTRY(urtwn_data) next; +}; +typedef STAILQ_HEAD(, urtwn_data) urtwn_datahead; + +struct urtwn_cmdq { + void *arg0; + void *arg1; + void (*func)(void *); + struct ieee80211_key *k; + struct ieee80211_key key; + uint8_t mac[IEEE80211_ADDR_LEN]; + uint8_t wcid; +}; + +struct urtwn_fw_info { + const uint8_t *data; + size_t size; +}; + +struct urtwn_vap { + struct ieee80211vap vap; + + int (*newstate)(struct ieee80211vap *, + enum ieee80211_state, int); +}; +#define URTWN_VAP(vap) ((struct urtwn_vap *)(vap)) + +struct urtwn_host_cmd { + void (*cb)(struct urtwn_softc *, void *); + uint8_t data[256]; +}; + +struct urtwn_cmd_newstate { + enum ieee80211_state state; + int arg; +}; + +struct urtwn_cmd_key { + struct ieee80211_key key; + uint16_t associd; +}; + +enum { + URTWN_BULK_RX, + URTWN_BULK_TX_BE, /* = WME_AC_BE */ + URTWN_BULK_TX_BK, /* = WME_AC_BK */ + URTWN_BULK_TX_VI, /* = WME_AC_VI */ + URTWN_BULK_TX_VO, /* = WME_AC_VI */ + URTWN_N_TRANSFER = 5, +}; + +#define URTWN_EP_QUEUES URTWN_BULK_RX + +struct urtwn_softc { + struct ieee80211com sc_ic; + struct mbufq sc_snd; + device_t sc_dev; + struct usb_device *sc_udev; + + int ac2idx[WME_NUM_AC]; + u_int sc_flags; +#define URTWN_FLAG_CCK_HIPWR 0x01 +#define URTWN_DETACHED 0x02 +#define URTWN_RUNNING 0x04 + + u_int chip; +#define URTWN_CHIP_92C 0x01 +#define URTWN_CHIP_92C_1T2R 0x02 +#define URTWN_CHIP_UMC 0x04 +#define URTWN_CHIP_UMC_A_CUT 0x08 +#define URTWN_CHIP_88E 0x10 + + void (*sc_rf_write)(struct urtwn_softc *, + int, uint8_t, uint32_t); + int (*sc_power_on)(struct urtwn_softc *); + int (*sc_dma_init)(struct urtwn_softc *); + + uint8_t board_type; + uint8_t regulatory; + uint8_t pa_setting; + int avg_pwdb; + int thcal_state; + int thcal_lctemp; + int ntxchains; + int nrxchains; + int ledlink; + int sc_txtimer; + + int fwcur; + struct urtwn_data sc_rx[URTWN_RX_LIST_COUNT]; + urtwn_datahead sc_rx_active; + urtwn_datahead sc_rx_inactive; + struct urtwn_data sc_tx[URTWN_TX_LIST_COUNT]; + urtwn_datahead sc_tx_active; + urtwn_datahead sc_tx_inactive; + urtwn_datahead sc_tx_pending; + + const char *fwname; + const struct firmware *fw_fp; + struct urtwn_fw_info fw; + void *fw_virtaddr; + + struct r92c_rom rom; + uint8_t r88e_rom[512]; + uint8_t cck_tx_pwr[6]; + uint8_t ht40_tx_pwr[5]; + int8_t bw20_tx_pwr_diff; + int8_t ofdm_tx_pwr_diff; + + struct callout sc_watchdog_ch; + struct mtx sc_mtx; + +/* need to be power of 2, otherwise URTWN_CMDQ_GET fails */ +#define URTWN_CMDQ_MAX 16 +#define URTWN_CMDQ_MASQ (URTWN_CMDQ_MAX - 1) + struct urtwn_cmdq cmdq[URTWN_CMDQ_MAX]; + struct task cmdq_task; + uint32_t cmdq_store; + uint8_t cmdq_exec; + uint8_t cmdq_run; + uint8_t cmdq_key_set; +#define URTWN_CMDQ_ABORT 0 +#define URTWN_CMDQ_GO 1 + + uint32_t rf_chnlbw[R92C_MAX_CHAINS]; + struct usb_xfer *sc_xfer[URTWN_N_TRANSFER]; + + struct urtwn_rx_radiotap_header sc_rxtap; + int sc_rxtap_len; + + struct urtwn_tx_radiotap_header sc_txtap; + int sc_txtap_len; +}; + +#define URTWN_LOCK(sc) mtx_lock(&(sc)->sc_mtx) +#define URTWN_UNLOCK(sc) mtx_unlock(&(sc)->sc_mtx) +#define URTWN_ASSERT_LOCKED(sc) mtx_assert(&(sc)->sc_mtx, MA_OWNED) \ No newline at end of file Modified: head/sys/modules/usb/urtwn/Makefile ============================================================================== --- head/sys/modules/usb/urtwn/Makefile Mon Oct 12 04:57:36 2015 (r289166) +++ head/sys/modules/usb/urtwn/Makefile Mon Oct 12 05:14:49 2015 (r289167) @@ -3,7 +3,7 @@ .PATH: ${.CURDIR}/../../../dev/usb/wlan KMOD = if_urtwn -SRCS = if_urtwn.c if_urtwnreg.h \ +SRCS = if_urtwn.c if_urtwnreg.h if_urtwnvar.h \ bus_if.h device_if.h \ opt_bus.h opt_usb.h opt_wlan.h usb_if.h usbdevs.h From owner-svn-src-all@freebsd.org Mon Oct 12 05:21:54 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id ACB31A11BAE; Mon, 12 Oct 2015 05:21:54 +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 6965A960; Mon, 12 Oct 2015 05:21:54 +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 t9C5LrYj037982; Mon, 12 Oct 2015 05:21:53 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9C5LquJ037967; Mon, 12 Oct 2015 05:21:52 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201510120521.t9C5LquJ037967@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Mon, 12 Oct 2015 05:21:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289168 - in head/sys/dev: iwm otus ral 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 " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Oct 2015 05:21:54 -0000 Author: adrian Date: Mon Oct 12 05:21:51 2015 New Revision: 289168 URL: https://svnweb.freebsd.org/changeset/base/289168 Log: net80211 drivers: eliminate any references to sc_rxtap_len/sc_txtap_len (never used here) Submitted by: Differential Revision: https://reviews.freebsd.org/D3776 Modified: head/sys/dev/iwm/if_iwmvar.h head/sys/dev/otus/if_otus.c head/sys/dev/otus/if_otusreg.h head/sys/dev/ral/rt2560var.h head/sys/dev/ral/rt2661var.h head/sys/dev/ral/rt2860var.h head/sys/dev/usb/wlan/if_rsureg.h head/sys/dev/usb/wlan/if_runvar.h head/sys/dev/usb/wlan/if_uathvar.h head/sys/dev/usb/wlan/if_upgtvar.h head/sys/dev/usb/wlan/if_uralvar.h head/sys/dev/usb/wlan/if_urtwnvar.h head/sys/dev/usb/wlan/if_urtwvar.h head/sys/dev/usb/wlan/if_zydreg.h Modified: head/sys/dev/iwm/if_iwmvar.h ============================================================================== --- head/sys/dev/iwm/if_iwmvar.h Mon Oct 12 05:14:49 2015 (r289167) +++ head/sys/dev/iwm/if_iwmvar.h Mon Oct 12 05:21:51 2015 (r289168) @@ -496,14 +496,12 @@ struct iwm_softc { uint8_t pad[IEEE80211_RADIOTAP_HDRLEN]; } sc_rxtapu; #define sc_rxtap sc_rxtapu.th - int sc_rxtap_len; union { struct iwm_tx_radiotap_header th; uint8_t pad[IEEE80211_RADIOTAP_HDRLEN]; } sc_txtapu; #define sc_txtap sc_txtapu.th - int sc_txtap_len; int sc_max_rssi; }; Modified: head/sys/dev/otus/if_otus.c ============================================================================== --- head/sys/dev/otus/if_otus.c Mon Oct 12 05:14:49 2015 (r289167) +++ head/sys/dev/otus/if_otus.c Mon Oct 12 05:21:51 2015 (r289168) @@ -1712,7 +1712,6 @@ otus_sub_rxeof(struct otus_softc *sc, ui break; } mb.m_data = (caddr_t)tap; - mb.m_len = sc->sc_rxtap_len; mb.m_next = m; mb.m_nextpkt = NULL; mb.m_type = 0; Modified: head/sys/dev/otus/if_otusreg.h ============================================================================== --- head/sys/dev/otus/if_otusreg.h Mon Oct 12 05:14:49 2015 (r289167) +++ head/sys/dev/otus/if_otusreg.h Mon Oct 12 05:21:51 2015 (r289168) @@ -1017,14 +1017,12 @@ struct otus_softc { uint8_t pad[64]; } sc_rxtapu; #define sc_rxtap sc_rxtapu.th - int sc_rxtap_len; union { struct otus_tx_radiotap_header th; uint8_t pad[64]; } sc_txtapu; #define sc_txtap sc_txtapu.th - int sc_txtap_len; }; #endif /* __IF_OTUSREG_H__ */ Modified: head/sys/dev/ral/rt2560var.h ============================================================================== --- head/sys/dev/ral/rt2560var.h Mon Oct 12 05:14:49 2015 (r289167) +++ head/sys/dev/ral/rt2560var.h Mon Oct 12 05:21:51 2015 (r289168) @@ -146,10 +146,8 @@ struct rt2560_softc { int nb_ant; struct rt2560_rx_radiotap_header sc_rxtap; - int sc_rxtap_len; - struct rt2560_tx_radiotap_header sc_txtap; - int sc_txtap_len; + #define RT2560_F_INPUT_RUNNING 0x1 #define RT2560_F_RUNNING 0x2 int sc_flags; Modified: head/sys/dev/ral/rt2661var.h ============================================================================== --- head/sys/dev/ral/rt2661var.h Mon Oct 12 05:14:49 2015 (r289167) +++ head/sys/dev/ral/rt2661var.h Mon Oct 12 05:21:51 2015 (r289168) @@ -157,9 +157,7 @@ struct rt2661_softc { int dwelltime; struct rt2661_rx_radiotap_header sc_rxtap; - int sc_rxtap_len; struct rt2661_tx_radiotap_header sc_txtap; - int sc_txtap_len; }; int rt2661_attach(device_t, int); Modified: head/sys/dev/ral/rt2860var.h ============================================================================== --- head/sys/dev/ral/rt2860var.h Mon Oct 12 05:14:49 2015 (r289167) +++ head/sys/dev/ral/rt2860var.h Mon Oct 12 05:21:51 2015 (r289168) @@ -194,9 +194,7 @@ struct rt2860_softc { uint32_t txpow40mhz_5ghz[5]; struct rt2860_rx_radiotap_header sc_rxtap; - int sc_rxtap_len; struct rt2860_tx_radiotap_header sc_txtap; - int sc_txtap_len; }; int rt2860_attach(device_t, int); Modified: head/sys/dev/usb/wlan/if_rsureg.h ============================================================================== --- head/sys/dev/usb/wlan/if_rsureg.h Mon Oct 12 05:14:49 2015 (r289167) +++ head/sys/dev/usb/wlan/if_rsureg.h Mon Oct 12 05:21:51 2015 (r289168) @@ -793,12 +793,10 @@ struct rsu_softc { uint8_t pad[64]; } sc_rxtapu; #define sc_rxtap sc_rxtapu.th - int sc_rxtap_len; union { struct rsu_tx_radiotap_header th; uint8_t pad[64]; } sc_txtapu; #define sc_txtap sc_txtapu.th - int sc_txtap_len; }; Modified: head/sys/dev/usb/wlan/if_runvar.h ============================================================================== --- head/sys/dev/usb/wlan/if_runvar.h Mon Oct 12 05:14:49 2015 (r289167) +++ head/sys/dev/usb/wlan/if_runvar.h Mon Oct 12 05:21:51 2015 (r289168) @@ -253,14 +253,12 @@ struct run_softc { uint8_t pad[64]; } sc_rxtapu; #define sc_rxtap sc_rxtapu.th - int sc_rxtap_len; union { struct run_tx_radiotap_header th; uint8_t pad[64]; } sc_txtapu; #define sc_txtap sc_txtapu.th - int sc_txtap_len; }; #define RUN_LOCK(sc) mtx_lock(&(sc)->sc_mtx) Modified: head/sys/dev/usb/wlan/if_uathvar.h ============================================================================== --- head/sys/dev/usb/wlan/if_uathvar.h Mon Oct 12 05:14:49 2015 (r289167) +++ head/sys/dev/usb/wlan/if_uathvar.h Mon Oct 12 05:21:51 2015 (r289168) @@ -230,9 +230,7 @@ struct uath_softc { #define UATH_FLAG_INITDONE (1 << 2) struct uath_rx_radiotap_header sc_rxtap; - int sc_rxtap_len; struct uath_tx_radiotap_header sc_txtap; - int sc_txtap_len; }; #define UATH_LOCK(sc) mtx_lock(&(sc)->sc_mtx) Modified: head/sys/dev/usb/wlan/if_upgtvar.h ============================================================================== --- head/sys/dev/usb/wlan/if_upgtvar.h Mon Oct 12 05:14:49 2015 (r289167) +++ head/sys/dev/usb/wlan/if_upgtvar.h Mon Oct 12 05:21:51 2015 (r289168) @@ -472,9 +472,7 @@ struct upgt_softc { /* BPF */ struct upgt_rx_radiotap_header sc_rxtap; - int sc_rxtap_len; struct upgt_tx_radiotap_header sc_txtap; - int sc_txtap_len; }; #define UPGT_LOCK(sc) mtx_lock(&(sc)->sc_mtx) Modified: head/sys/dev/usb/wlan/if_uralvar.h ============================================================================== --- head/sys/dev/usb/wlan/if_uralvar.h Mon Oct 12 05:14:49 2015 (r289167) +++ head/sys/dev/usb/wlan/if_uralvar.h Mon Oct 12 05:21:51 2015 (r289168) @@ -125,10 +125,7 @@ struct ural_softc { int nb_ant; struct ural_rx_radiotap_header sc_rxtap; - int sc_rxtap_len; - struct ural_tx_radiotap_header sc_txtap; - int sc_txtap_len; }; #define RAL_LOCK(sc) mtx_lock(&(sc)->sc_mtx) Modified: head/sys/dev/usb/wlan/if_urtwnvar.h ============================================================================== --- head/sys/dev/usb/wlan/if_urtwnvar.h Mon Oct 12 05:14:49 2015 (r289167) +++ head/sys/dev/usb/wlan/if_urtwnvar.h Mon Oct 12 05:21:51 2015 (r289168) @@ -195,12 +195,9 @@ struct urtwn_softc { struct usb_xfer *sc_xfer[URTWN_N_TRANSFER]; struct urtwn_rx_radiotap_header sc_rxtap; - int sc_rxtap_len; - struct urtwn_tx_radiotap_header sc_txtap; - int sc_txtap_len; }; #define URTWN_LOCK(sc) mtx_lock(&(sc)->sc_mtx) #define URTWN_UNLOCK(sc) mtx_unlock(&(sc)->sc_mtx) -#define URTWN_ASSERT_LOCKED(sc) mtx_assert(&(sc)->sc_mtx, MA_OWNED) \ No newline at end of file +#define URTWN_ASSERT_LOCKED(sc) mtx_assert(&(sc)->sc_mtx, MA_OWNED) Modified: head/sys/dev/usb/wlan/if_urtwvar.h ============================================================================== --- head/sys/dev/usb/wlan/if_urtwvar.h Mon Oct 12 05:14:49 2015 (r289167) +++ head/sys/dev/usb/wlan/if_urtwvar.h Mon Oct 12 05:21:51 2015 (r289168) @@ -178,9 +178,7 @@ struct urtw_softc { struct urtw_stats sc_stats; struct urtw_rx_radiotap_header sc_rxtap; - int sc_rxtap_len; struct urtw_tx_radiotap_header sc_txtap; - int sc_txtap_len; }; #define URTW_LOCK(sc) mtx_lock(&(sc)->sc_mtx) Modified: head/sys/dev/usb/wlan/if_zydreg.h ============================================================================== --- head/sys/dev/usb/wlan/if_zydreg.h Mon Oct 12 05:14:49 2015 (r289167) +++ head/sys/dev/usb/wlan/if_zydreg.h Mon Oct 12 05:21:51 2015 (r289168) @@ -1304,9 +1304,7 @@ struct zyd_softc { struct zyd_cmd sc_ibuf; struct zyd_rx_radiotap_header sc_rxtap; - int sc_rxtap_len; struct zyd_tx_radiotap_header sc_txtap; - int sc_txtap_len; }; #define ZYD_LOCK(sc) mtx_lock(&(sc)->sc_mtx) From owner-svn-src-all@freebsd.org Mon Oct 12 07:49:08 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6E4B8A11DB4; Mon, 12 Oct 2015 07:49:08 +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 3593D88; Mon, 12 Oct 2015 07:49:08 +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 t9C7n7wT090597; Mon, 12 Oct 2015 07:49:07 GMT (envelope-from ae@FreeBSD.org) Received: (from ae@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9C7n7L5090596; Mon, 12 Oct 2015 07:49:07 GMT (envelope-from ae@FreeBSD.org) Message-Id: <201510120749.t9C7n7L5090596@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ae set sender to ae@FreeBSD.org using -f From: "Andrey V. Elsukov" Date: Mon, 12 Oct 2015 07:49: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: r289169 - 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 " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Oct 2015 07:49:08 -0000 Author: ae Date: Mon Oct 12 07:49:07 2015 New Revision: 289169 URL: https://svnweb.freebsd.org/changeset/base/289169 Log: MFC r288529: Always detach encap handler when reconfiguring tunnel. Modified: stable/10/sys/net/if_gre.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/net/if_gre.c ============================================================================== --- stable/10/sys/net/if_gre.c Mon Oct 12 05:21:51 2015 (r289168) +++ stable/10/sys/net/if_gre.c Mon Oct 12 07:49:07 2015 (r289169) @@ -624,7 +624,7 @@ gre_set_tunnel(struct ifnet *ifp, struct default: return (EAFNOSUPPORT); } - if (sc->gre_family != src->sa_family) + if (sc->gre_family != 0) gre_detach(sc); GRE_WLOCK(sc); if (sc->gre_family != 0) From owner-svn-src-all@freebsd.org Mon Oct 12 07:50:28 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id BD95DA11E51; Mon, 12 Oct 2015 07:50:28 +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 88B4022C; Mon, 12 Oct 2015 07:50:28 +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 t9C7oRbS090807; Mon, 12 Oct 2015 07:50:27 GMT (envelope-from ae@FreeBSD.org) Received: (from ae@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9C7oRWW090806; Mon, 12 Oct 2015 07:50:27 GMT (envelope-from ae@FreeBSD.org) Message-Id: <201510120750.t9C7oRWW090806@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ae set sender to ae@FreeBSD.org using -f From: "Andrey V. Elsukov" Date: Mon, 12 Oct 2015 07:50:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r289170 - stable/10/sbin/ipfw 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 " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Oct 2015 07:50:28 -0000 Author: ae Date: Mon Oct 12 07:50:27 2015 New Revision: 289170 URL: https://svnweb.freebsd.org/changeset/base/289170 Log: MFC r288528: Fix possible segmentation fault. PR: 203494 Modified: stable/10/sbin/ipfw/ipfw2.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sbin/ipfw/ipfw2.c ============================================================================== --- stable/10/sbin/ipfw/ipfw2.c Mon Oct 12 07:49:07 2015 (r289169) +++ stable/10/sbin/ipfw/ipfw2.c Mon Oct 12 07:50:27 2015 (r289170) @@ -2990,7 +2990,7 @@ ipfw_add(char *av[]) action->opcode = O_NAT; action->len = F_INSN_SIZE(ipfw_insn_nat); CHECK_ACTLEN; - if (_substrcmp(*av, "global") == 0) { + if (*av != NULL && _substrcmp(*av, "global") == 0) { action->arg1 = 0; av++; break; From owner-svn-src-all@freebsd.org Mon Oct 12 07:53:05 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6FEBAA11017; Mon, 12 Oct 2015 07:53: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 39578874; Mon, 12 Oct 2015 07:53: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 t9C7r4D8093690; Mon, 12 Oct 2015 07:53:04 GMT (envelope-from ae@FreeBSD.org) Received: (from ae@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9C7r41v093689; Mon, 12 Oct 2015 07:53:04 GMT (envelope-from ae@FreeBSD.org) Message-Id: <201510120753.t9C7r41v093689@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ae set sender to ae@FreeBSD.org using -f From: "Andrey V. Elsukov" Date: Mon, 12 Oct 2015 07:53:04 +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: r289171 - stable/9/sbin/ipfw 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 " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Oct 2015 07:53:05 -0000 Author: ae Date: Mon Oct 12 07:53:04 2015 New Revision: 289171 URL: https://svnweb.freebsd.org/changeset/base/289171 Log: MFC r288528: Fix possible segmentation fault. PR: 203494 Modified: stable/9/sbin/ipfw/ipfw2.c Directory Properties: stable/9/sbin/ipfw/ (props changed) Modified: stable/9/sbin/ipfw/ipfw2.c ============================================================================== --- stable/9/sbin/ipfw/ipfw2.c Mon Oct 12 07:50:27 2015 (r289170) +++ stable/9/sbin/ipfw/ipfw2.c Mon Oct 12 07:53:04 2015 (r289171) @@ -2979,7 +2979,7 @@ ipfw_add(char *av[]) action->opcode = O_NAT; action->len = F_INSN_SIZE(ipfw_insn_nat); CHECK_ACTLEN; - if (_substrcmp(*av, "global") == 0) { + if (*av != NULL && _substrcmp(*av, "global") == 0) { action->arg1 = 0; av++; break; From owner-svn-src-all@freebsd.org Mon Oct 12 08:16:13 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D9F57A11A84; Mon, 12 Oct 2015 08:16:12 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 67B18155A; Mon, 12 Oct 2015 08:16:12 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t9C8GBYl001615; Mon, 12 Oct 2015 08:16:11 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9C8G3DZ001516; Mon, 12 Oct 2015 08:16:03 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201510120816.t9C8G3DZ001516@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Mon, 12 Oct 2015 08:16:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289172 - in head: bin/cat/tests bin/date/tests bin/expr/tests bin/ls/tests bin/mv/tests bin/pax/tests bin/pkill/tests bin/sh/tests bin/sleep/tests bin/test/tests bin/tests cddl/lib/tes... X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Oct 2015 08:16:13 -0000 Author: ngie Date: Mon Oct 12 08:16:03 2015 New Revision: 289172 URL: https://svnweb.freebsd.org/changeset/base/289172 Log: Refactor the test/ Makefiles after recent changes to bsd.test.mk (r289158) and netbsd-tests.test.mk (r289151) - Eliminate explicit OBJTOP/SRCTOP setting - Convert all ad hoc NetBSD test integration over to netbsd-tests.test.mk - Remove unnecessary TESTSDIR setting - Use SRCTOP where possible for clarity MFC after: 2 weeks Sponsored by: EMC / Isilon Storage Divison Modified: head/bin/cat/tests/Makefile head/bin/date/tests/Makefile head/bin/expr/tests/Makefile head/bin/ls/tests/Makefile head/bin/mv/tests/Makefile head/bin/pax/tests/Makefile head/bin/pkill/tests/Makefile head/bin/sh/tests/Makefile head/bin/sleep/tests/Makefile head/bin/test/tests/Makefile head/bin/tests/Makefile head/cddl/lib/tests/Makefile head/cddl/sbin/tests/Makefile head/cddl/tests/Makefile head/cddl/usr.bin/tests/Makefile head/cddl/usr.sbin/dtrace/tests/Makefile head/cddl/usr.sbin/tests/Makefile head/gnu/lib/tests/Makefile head/gnu/tests/Makefile head/gnu/usr.bin/diff/tests/Makefile head/gnu/usr.bin/tests/Makefile head/lib/atf/libatf-c++/tests/Makefile head/lib/atf/libatf-c++/tests/detail/Makefile head/lib/atf/libatf-c/tests/Makefile head/lib/atf/libatf-c/tests/detail/Makefile head/lib/atf/tests/Makefile head/lib/atf/tests/test-programs/Makefile head/lib/libc/tests/Makefile head/lib/libc/tests/Makefile.netbsd-tests head/lib/libc/tests/c063/Makefile head/lib/libc/tests/db/Makefile head/lib/libc/tests/gen/Makefile head/lib/libc/tests/gen/execve/Makefile head/lib/libc/tests/gen/posix_spawn/Makefile head/lib/libc/tests/hash/Makefile head/lib/libc/tests/inet/Makefile head/lib/libc/tests/locale/Makefile head/lib/libc/tests/net/Makefile head/lib/libc/tests/net/getaddrinfo/Makefile head/lib/libc/tests/regex/Makefile head/lib/libc/tests/rpc/Makefile head/lib/libc/tests/setjmp/Makefile head/lib/libc/tests/ssp/Makefile head/lib/libc/tests/stdio/Makefile head/lib/libc/tests/stdlib/Makefile head/lib/libc/tests/string/Makefile head/lib/libc/tests/sys/Makefile head/lib/libc/tests/termios/Makefile head/lib/libc/tests/time/Makefile head/lib/libc/tests/tls/Makefile head/lib/libc/tests/tls/dso/Makefile head/lib/libc/tests/tls_dso/Makefile head/lib/libc/tests/ttyio/Makefile head/lib/libcrypt/tests/Makefile head/lib/libmp/tests/Makefile head/lib/libnv/tests/Makefile head/lib/libpam/libpam/tests/Makefile head/lib/libproc/tests/Makefile head/lib/librt/tests/Makefile head/lib/libthr/tests/Makefile head/lib/libthr/tests/dlopen/Makefile head/lib/libthr/tests/dlopen/dso/Makefile head/lib/libutil/tests/Makefile head/lib/msun/tests/Makefile head/lib/tests/Makefile head/libexec/atf/atf-check/tests/Makefile head/libexec/atf/atf-sh/tests/Makefile head/libexec/atf/tests/Makefile head/libexec/rtld-elf/tests/Makefile head/libexec/tests/Makefile head/sbin/devd/tests/Makefile head/sbin/dhclient/tests/Makefile head/sbin/growfs/tests/Makefile head/sbin/ifconfig/tests/Makefile head/sbin/mdconfig/tests/Makefile head/sbin/tests/Makefile head/secure/lib/tests/Makefile head/secure/libexec/tests/Makefile head/secure/tests/Makefile head/secure/usr.bin/tests/Makefile head/secure/usr.sbin/tests/Makefile head/share/examples/tests/Makefile head/share/tests/Makefile head/tests/etc/Makefile head/tests/sys/mqueue/Makefile head/tests/sys/pjdfstest/tests/Makefile head/usr.bin/apply/tests/Makefile head/usr.bin/basename/tests/Makefile head/usr.bin/calendar/tests/Makefile head/usr.bin/cmp/tests/Makefile head/usr.bin/col/tests/Makefile head/usr.bin/comm/tests/Makefile head/usr.bin/cut/tests/Makefile head/usr.bin/dirname/tests/Makefile head/usr.bin/file2c/tests/Makefile head/usr.bin/grep/tests/Makefile head/usr.bin/gzip/tests/Makefile head/usr.bin/ident/tests/Makefile head/usr.bin/join/tests/Makefile head/usr.bin/jot/tests/Makefile head/usr.bin/lastcomm/tests/Makefile head/usr.bin/m4/tests/Makefile head/usr.bin/mkimg/tests/Makefile head/usr.bin/ncal/tests/Makefile head/usr.bin/printf/tests/Makefile head/usr.bin/sed/tests/Makefile head/usr.bin/soelim/tests/Makefile head/usr.bin/tests/Makefile head/usr.bin/truncate/tests/Makefile head/usr.bin/units/tests/Makefile head/usr.bin/uudecode/tests/Makefile head/usr.bin/uuencode/tests/Makefile head/usr.bin/xargs/tests/Makefile head/usr.bin/yacc/tests/Makefile head/usr.sbin/etcupdate/tests/Makefile head/usr.sbin/fstyp/tests/Makefile head/usr.sbin/newsyslog/tests/Makefile head/usr.sbin/nmtree/tests/Makefile head/usr.sbin/pw/tests/Makefile head/usr.sbin/sa/tests/Makefile head/usr.sbin/tests/Makefile Directory Properties: head/ (props changed) Modified: head/bin/cat/tests/Makefile ============================================================================== --- head/bin/cat/tests/Makefile Mon Oct 12 07:53:04 2015 (r289171) +++ head/bin/cat/tests/Makefile Mon Oct 12 08:16:03 2015 (r289172) @@ -1,11 +1,5 @@ # $FreeBSD$ -OBJTOP= ${.OBJDIR}/../../.. -SRCTOP= ${.CURDIR}/../../.. -TESTSRC= ${SRCTOP}/contrib/netbsd-tests/bin/cat - -TESTSDIR= ${TESTSBASE}/bin/cat - NETBSD_ATF_TESTS_SH= cat_test FILESDIR= ${TESTSDIR} Modified: head/bin/date/tests/Makefile ============================================================================== --- head/bin/date/tests/Makefile Mon Oct 12 07:53:04 2015 (r289171) +++ head/bin/date/tests/Makefile Mon Oct 12 08:16:03 2015 (r289172) @@ -2,8 +2,6 @@ .include -TESTSDIR= ${TESTSBASE}/bin/date - ATF_TESTS_SH= format_string_test .include Modified: head/bin/expr/tests/Makefile ============================================================================== --- head/bin/expr/tests/Makefile Mon Oct 12 07:53:04 2015 (r289171) +++ head/bin/expr/tests/Makefile Mon Oct 12 08:16:03 2015 (r289172) @@ -1,11 +1,5 @@ # $FreeBSD$ -OBJTOP= ${.OBJDIR}/../../.. -SRCTOP= ${.CURDIR}/../../.. -TESTSRC= ${SRCTOP}/contrib/netbsd-tests/bin/expr - -TESTSDIR= ${TESTSBASE}/bin/expr - NETBSD_ATF_TESTS_SH= expr_test ATF_TESTS_SH_SED_expr_test+= -e 's/eval expr/eval expr --/g' Modified: head/bin/ls/tests/Makefile ============================================================================== --- head/bin/ls/tests/Makefile Mon Oct 12 07:53:04 2015 (r289171) +++ head/bin/ls/tests/Makefile Mon Oct 12 08:16:03 2015 (r289172) @@ -1,7 +1,5 @@ # $FreeBSD$ -TESTSDIR= ${TESTSBASE}/bin/ls - ATF_TESTS_SH+= ls_tests # This seems like overkill, but the idea in mind is that all of the testcases # should be runnable as !root Modified: head/bin/mv/tests/Makefile ============================================================================== --- head/bin/mv/tests/Makefile Mon Oct 12 07:53:04 2015 (r289171) +++ head/bin/mv/tests/Makefile Mon Oct 12 08:16:03 2015 (r289172) @@ -2,8 +2,6 @@ .include -TESTSDIR= ${TESTSBASE}/bin/mv - TAP_TESTS_SH= legacy_test .include Modified: head/bin/pax/tests/Makefile ============================================================================== --- head/bin/pax/tests/Makefile Mon Oct 12 07:53:04 2015 (r289171) +++ head/bin/pax/tests/Makefile Mon Oct 12 08:16:03 2015 (r289172) @@ -2,8 +2,6 @@ .include -TESTSDIR= ${TESTSBASE}/bin/pax - TAP_TESTS_PERL= legacy_test .include Modified: head/bin/pkill/tests/Makefile ============================================================================== --- head/bin/pkill/tests/Makefile Mon Oct 12 07:53:04 2015 (r289171) +++ head/bin/pkill/tests/Makefile Mon Oct 12 08:16:03 2015 (r289172) @@ -2,8 +2,6 @@ .include -TESTSDIR= ${TESTSBASE}/bin/pkill - TAP_TESTS_SH= pgrep-F_test TAP_TESTS_SH+= pgrep-LF_test TAP_TESTS_SH+= pgrep-P_test Modified: head/bin/sh/tests/Makefile ============================================================================== --- head/bin/sh/tests/Makefile Mon Oct 12 07:53:04 2015 (r289171) +++ head/bin/sh/tests/Makefile Mon Oct 12 08:16:03 2015 (r289172) @@ -2,8 +2,6 @@ .include -TESTSDIR= ${TESTSBASE}/bin/sh - TESTS_SUBDIRS+= builtins TESTS_SUBDIRS+= errors TESTS_SUBDIRS+= execution Modified: head/bin/sleep/tests/Makefile ============================================================================== --- head/bin/sleep/tests/Makefile Mon Oct 12 07:53:04 2015 (r289171) +++ head/bin/sleep/tests/Makefile Mon Oct 12 08:16:03 2015 (r289172) @@ -1,12 +1,7 @@ # $FreeBSD$ -TESTSRC= ${.CURDIR}/../../../contrib/netbsd-tests/bin/sleep -.PATH: ${TESTSRC} - .include -TESTSDIR= ${TESTSBASE}/bin/sleep -ATF_TESTS_SH= sleep_test -ATF_TESTS_SH_SRC_sleep_test= t_sleep.sh +NETBSD_ATF_TESTS_SH= sleep_test .include Modified: head/bin/test/tests/Makefile ============================================================================== --- head/bin/test/tests/Makefile Mon Oct 12 07:53:04 2015 (r289171) +++ head/bin/test/tests/Makefile Mon Oct 12 08:16:03 2015 (r289172) @@ -2,8 +2,6 @@ .include -TESTSDIR= ${TESTSBASE}/bin/test - TAP_TESTS_SH= legacy_test # Some tests in here are silently not run when the tests are executed as # root. Explicitly tell Kyua to drop privileges. Modified: head/bin/tests/Makefile ============================================================================== --- head/bin/tests/Makefile Mon Oct 12 07:53:04 2015 (r289171) +++ head/bin/tests/Makefile Mon Oct 12 08:16:03 2015 (r289172) @@ -2,9 +2,7 @@ .include -TESTSDIR= ${TESTSBASE}/bin - -.PATH: ${.CURDIR:H:H}/tests +.PATH: ${SRCTOP}/tests KYUAFILE= yes .include Modified: head/cddl/lib/tests/Makefile ============================================================================== --- head/cddl/lib/tests/Makefile Mon Oct 12 07:53:04 2015 (r289171) +++ head/cddl/lib/tests/Makefile Mon Oct 12 08:16:03 2015 (r289172) @@ -2,9 +2,7 @@ .include -TESTSDIR= ${TESTSBASE}/cddl/lib - -.PATH: ${.CURDIR:H:H:H}/tests +.PATH: ${SRCTOP}/tests KYUAFILE= yes .include Modified: head/cddl/sbin/tests/Makefile ============================================================================== --- head/cddl/sbin/tests/Makefile Mon Oct 12 07:53:04 2015 (r289171) +++ head/cddl/sbin/tests/Makefile Mon Oct 12 08:16:03 2015 (r289172) @@ -2,9 +2,7 @@ .include -TESTSDIR= ${TESTSBASE}/cddl/sbin - -.PATH: ${.CURDIR:H:H:H}/tests +.PATH: ${SRCTOP}/tests KYUAFILE= yes .include Modified: head/cddl/tests/Makefile ============================================================================== --- head/cddl/tests/Makefile Mon Oct 12 07:53:04 2015 (r289171) +++ head/cddl/tests/Makefile Mon Oct 12 08:16:03 2015 (r289172) @@ -2,9 +2,7 @@ .include -TESTSDIR= ${TESTSBASE}/cddl - -.PATH: ${.CURDIR:H:H}/tests +.PATH: ${SRCTOP}/tests KYUAFILE= yes .include Modified: head/cddl/usr.bin/tests/Makefile ============================================================================== --- head/cddl/usr.bin/tests/Makefile Mon Oct 12 07:53:04 2015 (r289171) +++ head/cddl/usr.bin/tests/Makefile Mon Oct 12 08:16:03 2015 (r289172) @@ -2,9 +2,7 @@ .include -TESTSDIR= ${TESTSBASE}/cddl/usr.bin - -.PATH: ${.CURDIR:H:H:H}/tests +.PATH: ${SRCTOP}/tests KYUAFILE= yes .include Modified: head/cddl/usr.sbin/dtrace/tests/Makefile ============================================================================== --- head/cddl/usr.sbin/dtrace/tests/Makefile Mon Oct 12 07:53:04 2015 (r289171) +++ head/cddl/usr.sbin/dtrace/tests/Makefile Mon Oct 12 08:16:03 2015 (r289172) @@ -2,10 +2,9 @@ .include -TESTSDIR= ${TESTSBASE}/cddl/usr.sbin/dtrace TESTS_SUBDIRS+= common -.PATH: ${.CURDIR:H:H:H:H}/tests +.PATH: ${SRCTOP}/tests KYUAFILE= YES .PATH: ${.CURDIR}/tools Modified: head/cddl/usr.sbin/tests/Makefile ============================================================================== --- head/cddl/usr.sbin/tests/Makefile Mon Oct 12 07:53:04 2015 (r289171) +++ head/cddl/usr.sbin/tests/Makefile Mon Oct 12 08:16:03 2015 (r289172) @@ -2,9 +2,7 @@ .include -TESTSDIR= ${TESTSBASE}/cddl/usr.sbin - -.PATH: ${.CURDIR:H:H:H}/tests +.PATH: ${SRCTOP}/tests KYUAFILE= yes .include Modified: head/gnu/lib/tests/Makefile ============================================================================== --- head/gnu/lib/tests/Makefile Mon Oct 12 07:53:04 2015 (r289171) +++ head/gnu/lib/tests/Makefile Mon Oct 12 08:16:03 2015 (r289172) @@ -2,9 +2,7 @@ .include -TESTSDIR= ${TESTSBASE}/gnu/lib - -.PATH: ${.CURDIR:H:H:H}/tests +.PATH: ${SRCTOP}/tests KYUAFILE= yes .include Modified: head/gnu/tests/Makefile ============================================================================== --- head/gnu/tests/Makefile Mon Oct 12 07:53:04 2015 (r289171) +++ head/gnu/tests/Makefile Mon Oct 12 08:16:03 2015 (r289172) @@ -2,9 +2,7 @@ .include -TESTSDIR= ${TESTSBASE}/gnu - -.PATH: ${.CURDIR:H:H}/tests +.PATH: ${SRCTOP}/tests KYUAFILE= yes .include Modified: head/gnu/usr.bin/diff/tests/Makefile ============================================================================== --- head/gnu/usr.bin/diff/tests/Makefile Mon Oct 12 07:53:04 2015 (r289171) +++ head/gnu/usr.bin/diff/tests/Makefile Mon Oct 12 08:16:03 2015 (r289172) @@ -1,17 +1,14 @@ # $FreeBSD$ -TESTSRC= ${.CURDIR}/../../../../contrib/netbsd-tests/usr.bin/diff -.PATH: ${TESTSRC} +TESTSRC= ${SRCTOP}/contrib/netbsd-tests/usr.bin/diff -.include - -TESTSDIR= ${TESTSBASE}/gnu/usr.bin/diff -ATF_TESTS_SH= diff_test +NETBSD_ATF_TESTS_SH= diff_test ATF_TESTS_SH_SED_diff_test= -e 's/t_diff/`basename $$0`/g' -ATF_TESTS_SH_SRC_diff_test= t_diff.sh FILESDIR= ${TESTSDIR} FILES+= d_mallocv1.in FILES+= d_mallocv2.in +.include + .include Modified: head/gnu/usr.bin/tests/Makefile ============================================================================== --- head/gnu/usr.bin/tests/Makefile Mon Oct 12 07:53:04 2015 (r289171) +++ head/gnu/usr.bin/tests/Makefile Mon Oct 12 08:16:03 2015 (r289172) @@ -2,9 +2,7 @@ .include -TESTSDIR= ${TESTSBASE}/gnu/usr.bin - -.PATH: ${.CURDIR:H:H:H}/tests +.PATH: ${SRCTOP}/tests KYUAFILE= yes .include Modified: head/lib/atf/libatf-c++/tests/Makefile ============================================================================== --- head/lib/atf/libatf-c++/tests/Makefile Mon Oct 12 07:53:04 2015 (r289171) +++ head/lib/atf/libatf-c++/tests/Makefile Mon Oct 12 08:16:03 2015 (r289172) @@ -2,10 +2,9 @@ .include -TESTSDIR= ${TESTSBASE}/lib/atf/libatf-c++ TESTS_SUBDIRS= detail -ATF= ${.CURDIR:H:H:H:H}/contrib/atf +ATF= ${SRCTOP}/contrib/atf .PATH: ${ATF}/atf-c++ .PATH: ${ATF}/atf-c++/detail Modified: head/lib/atf/libatf-c++/tests/detail/Makefile ============================================================================== --- head/lib/atf/libatf-c++/tests/detail/Makefile Mon Oct 12 07:53:04 2015 (r289171) +++ head/lib/atf/libatf-c++/tests/detail/Makefile Mon Oct 12 08:16:03 2015 (r289172) @@ -4,7 +4,7 @@ TESTSDIR= ${TESTSBASE}/lib/atf/libatf-c++/detail -ATF= ${.CURDIR:H:H:H:H:H}/contrib/atf +ATF= ${SRCTOP}/contrib/atf .PATH: ${ATF}/atf-c++/detail CFLAGS+= -DATF_C_TESTS_BASE='"${TESTSBASE}/lib/atf/libatf-c"' Modified: head/lib/atf/libatf-c/tests/Makefile ============================================================================== --- head/lib/atf/libatf-c/tests/Makefile Mon Oct 12 07:53:04 2015 (r289171) +++ head/lib/atf/libatf-c/tests/Makefile Mon Oct 12 08:16:03 2015 (r289172) @@ -2,10 +2,9 @@ .include -TESTSDIR= ${TESTSBASE}/lib/atf/libatf-c TESTS_SUBDIRS= detail -ATF= ${.CURDIR:H:H:H:H}/contrib/atf +ATF= ${SRCTOP}/contrib/atf .PATH: ${ATF}/atf-c .PATH: ${ATF}/atf-c/detail Modified: head/lib/atf/libatf-c/tests/detail/Makefile ============================================================================== --- head/lib/atf/libatf-c/tests/detail/Makefile Mon Oct 12 07:53:04 2015 (r289171) +++ head/lib/atf/libatf-c/tests/detail/Makefile Mon Oct 12 08:16:03 2015 (r289172) @@ -4,7 +4,7 @@ TESTSDIR= ${TESTSBASE}/lib/atf/libatf-c/detail -ATF= ${.CURDIR:H:H:H:H:H}/contrib/atf +ATF= ${SRCTOP}/contrib/atf .PATH: ${ATF}/atf-c/detail CFLAGS+= -DATF_INCLUDEDIR='"${INCLUDEDIR}"' Modified: head/lib/atf/tests/Makefile ============================================================================== --- head/lib/atf/tests/Makefile Mon Oct 12 07:53:04 2015 (r289171) +++ head/lib/atf/tests/Makefile Mon Oct 12 08:16:03 2015 (r289172) @@ -4,7 +4,7 @@ TESTSDIR= ${TESTSBASE}/lib/atf -.PATH: ${.CURDIR:H:H:H}/tests +.PATH: ${SRCTOP}/tests KYUAFILE= yes SUBDIR= test-programs Modified: head/lib/atf/tests/test-programs/Makefile ============================================================================== --- head/lib/atf/tests/test-programs/Makefile Mon Oct 12 07:53:04 2015 (r289171) +++ head/lib/atf/tests/test-programs/Makefile Mon Oct 12 08:16:03 2015 (r289172) @@ -5,7 +5,7 @@ TESTSDIR= ${TESTSBASE}/lib/atf/test-programs KYUAFILE= yes -ATF= ${.CURDIR:H:H:H:H}/contrib/atf +ATF= ${SRCTOP}/contrib/atf .PATH: ${ATF}/test-programs CFLAGS+= -I${ATF} Modified: head/lib/libc/tests/Makefile ============================================================================== --- head/lib/libc/tests/Makefile Mon Oct 12 07:53:04 2015 (r289171) +++ head/lib/libc/tests/Makefile Mon Oct 12 08:16:03 2015 (r289172) @@ -2,8 +2,6 @@ .include -TESTSDIR= ${TESTSBASE}/lib/libc - SUBDIR= tls_dso TESTS_SUBDIRS= c063 Modified: head/lib/libc/tests/Makefile.netbsd-tests ============================================================================== --- head/lib/libc/tests/Makefile.netbsd-tests Mon Oct 12 07:53:04 2015 (r289171) +++ head/lib/libc/tests/Makefile.netbsd-tests Mon Oct 12 08:16:03 2015 (r289172) @@ -1,7 +1,7 @@ # $FreeBSD$ -OBJTOP?= ${.OBJDIR:H:H:H:H} -SRCTOP?= ${.CURDIR:H:H:H:H} -TESTSRC?= ${SRCTOP}/contrib/netbsd-tests/lib/libc/${.CURDIR:T} +TESTSRC:= ${SRCTOP}/contrib/netbsd-tests/${RELDIR:C/libc\/tests/libc/} + +TESTSDIR:= ${TESTSBASE}/${RELDIR:C/libc\/tests/libc/} .include Modified: head/lib/libc/tests/c063/Makefile ============================================================================== --- head/lib/libc/tests/c063/Makefile Mon Oct 12 07:53:04 2015 (r289171) +++ head/lib/libc/tests/c063/Makefile Mon Oct 12 08:16:03 2015 (r289172) @@ -1,7 +1,5 @@ # $FreeBSD$ -TESTSDIR= ${TESTSBASE}/lib/libc/c063 - #TODO: t_o_search NETBSD_ATF_TESTS_C= faccessat Modified: head/lib/libc/tests/db/Makefile ============================================================================== --- head/lib/libc/tests/db/Makefile Mon Oct 12 07:53:04 2015 (r289171) +++ head/lib/libc/tests/db/Makefile Mon Oct 12 08:16:03 2015 (r289172) @@ -1,7 +1,5 @@ # $FreeBSD$ -TESTSDIR= ${TESTSBASE}/lib/libc/db - BINDIR= ${TESTSDIR} PROGS= h_db Modified: head/lib/libc/tests/gen/Makefile ============================================================================== --- head/lib/libc/tests/gen/Makefile Mon Oct 12 07:53:04 2015 (r289171) +++ head/lib/libc/tests/gen/Makefile Mon Oct 12 08:16:03 2015 (r289172) @@ -2,8 +2,6 @@ .include -TESTSDIR= ${TESTSBASE}/lib/libc/gen - ATF_TESTS_C= arc4random_test ATF_TESTS_C+= fpclassify2_test Modified: head/lib/libc/tests/gen/execve/Makefile ============================================================================== --- head/lib/libc/tests/gen/execve/Makefile Mon Oct 12 07:53:04 2015 (r289171) +++ head/lib/libc/tests/gen/execve/Makefile Mon Oct 12 08:16:03 2015 (r289172) @@ -1,13 +1,7 @@ # $FreeBSD$ -OBJTOP= ${.OBJDIR:H:H:H:H:H} -SRCTOP= ${.CURDIR:H:H:H:H:H} -TESTSRC= ${SRCTOP}/contrib/netbsd-tests/lib/libc/gen/${.CURDIR:T} - .include -TESTSDIR= ${TESTSBASE}/lib/libc/gen/execve - NETBSD_ATF_TESTS_C= execve_test .include "../../Makefile.netbsd-tests" Modified: head/lib/libc/tests/gen/posix_spawn/Makefile ============================================================================== --- head/lib/libc/tests/gen/posix_spawn/Makefile Mon Oct 12 07:53:04 2015 (r289171) +++ head/lib/libc/tests/gen/posix_spawn/Makefile Mon Oct 12 08:16:03 2015 (r289172) @@ -1,13 +1,7 @@ # $FreeBSD$ -OBJTOP= ${.OBJDIR:H:H:H:H:H} -SRCTOP= ${.CURDIR:H:H:H:H:H} -TESTSRC= ${SRCTOP}/contrib/netbsd-tests/lib/libc/gen/${.CURDIR:T} - .include -TESTSDIR= ${TESTSBASE}/lib/libc/gen/posix_spawn - BINDIR= ${TESTSDIR} NETBSD_ATF_TESTS_C= fileactions_test Modified: head/lib/libc/tests/hash/Makefile ============================================================================== --- head/lib/libc/tests/hash/Makefile Mon Oct 12 07:53:04 2015 (r289171) +++ head/lib/libc/tests/hash/Makefile Mon Oct 12 08:16:03 2015 (r289172) @@ -2,8 +2,6 @@ .include -TESTSDIR= ${TESTSBASE}/lib/libc/hash - NETBSD_ATF_TESTS_C= .if ${MK_OPENSSL} != "no" @@ -29,8 +27,8 @@ LDADD+= -lmd DPADD.sha2_test+= ${LIBCRYPTO} LDADD.sha2_test+= -lcrypto -CFLAGS.sha2_test+= -I${.CURDIR}/../../../../crypto/openssh/openbsd-compat -CFLAGS.sha2_test+= -I${.CURDIR}/../../../../crypto/openssh +CFLAGS.sha2_test+= -I${SRCTOP}/crypto/openssh/openbsd-compat +CFLAGS.sha2_test+= -I${SRCTOP}/crypto/openssh .include "../Makefile.netbsd-tests" Modified: head/lib/libc/tests/inet/Makefile ============================================================================== --- head/lib/libc/tests/inet/Makefile Mon Oct 12 07:53:04 2015 (r289171) +++ head/lib/libc/tests/inet/Makefile Mon Oct 12 08:16:03 2015 (r289172) @@ -2,8 +2,6 @@ .include -TESTSDIR= ${TESTSBASE}/lib/libc/inet - NETBSD_ATF_TESTS_C= inet_network_test .include "../Makefile.netbsd-tests" Modified: head/lib/libc/tests/locale/Makefile ============================================================================== --- head/lib/libc/tests/locale/Makefile Mon Oct 12 07:53:04 2015 (r289171) +++ head/lib/libc/tests/locale/Makefile Mon Oct 12 08:16:03 2015 (r289172) @@ -2,8 +2,6 @@ .include -TESTSDIR= ${TESTSBASE}/lib/libc/locale - NETBSD_ATF_TESTS_C= io_test NETBSD_ATF_TESTS_C+= mbrtowc_test NETBSD_ATF_TESTS_C+= mbstowcs_test Modified: head/lib/libc/tests/net/Makefile ============================================================================== --- head/lib/libc/tests/net/Makefile Mon Oct 12 07:53:04 2015 (r289171) +++ head/lib/libc/tests/net/Makefile Mon Oct 12 08:16:03 2015 (r289172) @@ -2,8 +2,6 @@ .include -TESTSDIR= ${TESTSBASE}/lib/libc/net - BINDIR= ${TESTSDIR} NETBSD_ATF_TESTS_C= getprotoent_test Modified: head/lib/libc/tests/net/getaddrinfo/Makefile ============================================================================== --- head/lib/libc/tests/net/getaddrinfo/Makefile Mon Oct 12 07:53:04 2015 (r289171) +++ head/lib/libc/tests/net/getaddrinfo/Makefile Mon Oct 12 08:16:03 2015 (r289172) @@ -1,13 +1,9 @@ # $FreeBSD$ -OBJTOP= ${.OBJDIR:H:H:H:H:H} -SRCTOP= ${.CURDIR:H:H:H:H:H} TESTSRC= ${SRCTOP}/contrib/netbsd-tests/lib/libc/net/${.CURDIR:T} .include -TESTSDIR= ${TESTSBASE}/lib/libc/net/getaddrinfo - BINDIR= ${TESTSDIR} .error "This testcase needs to be ported to FreeBSD (the output from getaddrinfo_test differs from NetBSD)" Modified: head/lib/libc/tests/regex/Makefile ============================================================================== --- head/lib/libc/tests/regex/Makefile Mon Oct 12 07:53:04 2015 (r289171) +++ head/lib/libc/tests/regex/Makefile Mon Oct 12 08:16:03 2015 (r289172) @@ -4,8 +4,6 @@ BINDIR= ${TESTSDIR} -TESTSDIR= ${TESTSBASE}/lib/libc/regex - IMPLEMENTATION?= -DREGEX_SPENCER CFLAGS.h_regex+=-I${TESTSRC} -I${.CURDIR:H:H}/regex Modified: head/lib/libc/tests/rpc/Makefile ============================================================================== --- head/lib/libc/tests/rpc/Makefile Mon Oct 12 07:53:04 2015 (r289171) +++ head/lib/libc/tests/rpc/Makefile Mon Oct 12 08:16:03 2015 (r289172) @@ -1,6 +1,5 @@ # $FreeBSD$ -TESTSDIR= ${TESTSBASE}/lib/libc/rpc SRCS.xdr_test= ${RPCSRC:.x=_xdr.c} t_xdr.c ${RPCSRC:.x=.h} NETBSD_ATF_TESTS_C= rpc_test Modified: head/lib/libc/tests/setjmp/Makefile ============================================================================== --- head/lib/libc/tests/setjmp/Makefile Mon Oct 12 07:53:04 2015 (r289171) +++ head/lib/libc/tests/setjmp/Makefile Mon Oct 12 08:16:03 2015 (r289172) @@ -1,7 +1,5 @@ # $FreeBSD$ -TESTSDIR= ${TESTSBASE}/lib/libc/setjmp - NETBSD_ATF_TESTS_C= t_setjmp NETBSD_ATF_TESTS_C+= t_threadjmp @@ -10,4 +8,6 @@ LDADD.t_threadjmp+= -lpthread WARNS?= 4 +.include "../Makefile.netbsd-tests" + .include Modified: head/lib/libc/tests/ssp/Makefile ============================================================================== --- head/lib/libc/tests/ssp/Makefile Mon Oct 12 07:53:04 2015 (r289171) +++ head/lib/libc/tests/ssp/Makefile Mon Oct 12 08:16:03 2015 (r289172) @@ -2,8 +2,6 @@ .include -TESTSDIR= ${TESTSBASE}/lib/libc/ssp - NO_WERROR= WARNS?= 2 Modified: head/lib/libc/tests/stdio/Makefile ============================================================================== --- head/lib/libc/tests/stdio/Makefile Mon Oct 12 07:53:04 2015 (r289171) +++ head/lib/libc/tests/stdio/Makefile Mon Oct 12 08:16:03 2015 (r289172) @@ -1,7 +1,5 @@ # $FreeBSD$ -TESTSDIR= ${TESTSBASE}/lib/libc/stdio - ATF_TESTS_C= fmemopen2_test NETBSD_ATF_TESTS_C= clearerr_test Modified: head/lib/libc/tests/stdlib/Makefile ============================================================================== --- head/lib/libc/tests/stdlib/Makefile Mon Oct 12 07:53:04 2015 (r289171) +++ head/lib/libc/tests/stdlib/Makefile Mon Oct 12 08:16:03 2015 (r289172) @@ -2,8 +2,6 @@ .include -TESTSDIR= ${TESTSBASE}/lib/libc/stdlib - # TODO: t_getenv_thread, t_mi_vector_hash NETBSD_ATF_TESTS_C= abs_test NETBSD_ATF_TESTS_C+= atoi_test Modified: head/lib/libc/tests/string/Makefile ============================================================================== --- head/lib/libc/tests/string/Makefile Mon Oct 12 07:53:04 2015 (r289171) +++ head/lib/libc/tests/string/Makefile Mon Oct 12 08:16:03 2015 (r289172) @@ -2,8 +2,6 @@ .include -TESTSDIR= ${TESTSBASE}/lib/libc/string - # TODO: popcount, stresep NETBSD_ATF_TESTS_C+= memchr Modified: head/lib/libc/tests/sys/Makefile ============================================================================== --- head/lib/libc/tests/sys/Makefile Mon Oct 12 07:53:04 2015 (r289171) +++ head/lib/libc/tests/sys/Makefile Mon Oct 12 08:16:03 2015 (r289172) @@ -2,8 +2,6 @@ .include -TESTSDIR= ${TESTSBASE}/lib/libc/sys - # TODO: clone, lwp_create, lwp_ctl, posix_fadvise, recvmmsg, # swapcontext NETBSD_ATF_TESTS_C+= access_test Modified: head/lib/libc/tests/termios/Makefile ============================================================================== --- head/lib/libc/tests/termios/Makefile Mon Oct 12 07:53:04 2015 (r289171) +++ head/lib/libc/tests/termios/Makefile Mon Oct 12 08:16:03 2015 (r289172) @@ -2,8 +2,6 @@ .include -TESTSDIR= ${TESTSBASE}/lib/libc/termios - NETBSD_ATF_TESTS_C= tcsetpgrp_test .include "../Makefile.netbsd-tests" Modified: head/lib/libc/tests/time/Makefile ============================================================================== --- head/lib/libc/tests/time/Makefile Mon Oct 12 07:53:04 2015 (r289171) +++ head/lib/libc/tests/time/Makefile Mon Oct 12 08:16:03 2015 (r289172) @@ -2,8 +2,6 @@ .include -TESTSDIR= ${TESTSBASE}/lib/libc/time - NETBSD_ATF_TESTS_C= mktime_test NETBSD_ATF_TESTS_C+= strptime_test Modified: head/lib/libc/tests/tls/Makefile ============================================================================== --- head/lib/libc/tests/tls/Makefile Mon Oct 12 07:53:04 2015 (r289171) +++ head/lib/libc/tests/tls/Makefile Mon Oct 12 08:16:03 2015 (r289172) @@ -2,7 +2,6 @@ .include -TESTSDIR= ${TESTSBASE}/lib/libc/tls .if !defined(NO_PIC) SUBDIR+= dso .endif Modified: head/lib/libc/tests/tls/dso/Makefile ============================================================================== --- head/lib/libc/tests/tls/dso/Makefile Mon Oct 12 07:53:04 2015 (r289171) +++ head/lib/libc/tests/tls/dso/Makefile Mon Oct 12 08:16:03 2015 (r289172) @@ -1,7 +1,6 @@ # $FreeBSD$ OBJTOP= ${.OBJDIR:H:H:H:H:H} -SRCTOP= ${.CURDIR:H:H:H:H:H} TESTSRC= ${SRCTOP}/contrib/netbsd-tests/lib/libc/tls/${.CURDIR:T} LIB= h_tls_dlopen Modified: head/lib/libc/tests/tls_dso/Makefile ============================================================================== --- head/lib/libc/tests/tls_dso/Makefile Mon Oct 12 07:53:04 2015 (r289171) +++ head/lib/libc/tests/tls_dso/Makefile Mon Oct 12 08:16:03 2015 (r289172) @@ -1,5 +1,7 @@ # $FreeBSD$ +SRCDIR= ${SRCTOP}/contrib/netbsd/ + .include LIB= h_tls_dynamic Modified: head/lib/libc/tests/ttyio/Makefile ============================================================================== --- head/lib/libc/tests/ttyio/Makefile Mon Oct 12 07:53:04 2015 (r289171) +++ head/lib/libc/tests/ttyio/Makefile Mon Oct 12 08:16:03 2015 (r289172) @@ -2,8 +2,6 @@ .include -TESTSDIR= ${TESTSBASE}/lib/libc/ttyio - # TODO: ptm_test NETBSD_ATF_TESTS_C= ttyio_test Modified: head/lib/libcrypt/tests/Makefile ============================================================================== --- head/lib/libcrypt/tests/Makefile Mon Oct 12 07:53:04 2015 (r289171) +++ head/lib/libcrypt/tests/Makefile Mon Oct 12 08:16:03 2015 (r289172) @@ -2,8 +2,6 @@ # exercise libcrypt -TESTSDIR= ${TESTSBASE}/lib/libcrypt - ATF_TESTS_C= crypt_tests CFLAGS+= -I${.CURDIR:H} Modified: head/lib/libmp/tests/Makefile ============================================================================== --- head/lib/libmp/tests/Makefile Mon Oct 12 07:53:04 2015 (r289171) +++ head/lib/libmp/tests/Makefile Mon Oct 12 08:16:03 2015 (r289172) @@ -1,7 +1,5 @@ # $FreeBSD$ -TESTSDIR= ${TESTSBASE}/lib/libmp - TAP_TESTS_C+= legacy_test LIBADD+= mp Modified: head/lib/libnv/tests/Makefile ============================================================================== --- head/lib/libnv/tests/Makefile Mon Oct 12 07:53:04 2015 (r289171) +++ head/lib/libnv/tests/Makefile Mon Oct 12 08:16:03 2015 (r289172) @@ -1,7 +1,5 @@ # $FreeBSD$ -TESTSDIR= ${TESTSBASE}/lib/libnv - ATF_TESTS_CXX= \ dnv_tests \ nv_array_tests \ Modified: head/lib/libpam/libpam/tests/Makefile ============================================================================== --- head/lib/libpam/libpam/tests/Makefile Mon Oct 12 07:53:04 2015 (r289171) +++ head/lib/libpam/libpam/tests/Makefile Mon Oct 12 08:16:03 2015 (r289172) @@ -1,6 +1,6 @@ # $FreeBSD$ -OPENPAM = ${.CURDIR}/../../../../contrib/openpam +OPENPAM= ${SRCTOP}/contrib/openpam .PATH: ${OPENPAM}/t TESTSDIR = ${TESTSBASE}/lib/libpam Modified: head/lib/libproc/tests/Makefile ============================================================================== --- head/lib/libproc/tests/Makefile Mon Oct 12 07:53:04 2015 (r289171) +++ head/lib/libproc/tests/Makefile Mon Oct 12 08:16:03 2015 (r289172) @@ -1,7 +1,5 @@ # $FreeBSD$ -TESTSDIR= ${TESTSBASE}/lib/libproc - ATF_TESTS_C+= proc_test PROGS= target_prog @@ -15,7 +13,6 @@ DPADD+= ${LIBELF} ${LIBPROC} ${LIBRTLD_D # for testing symbol lookup. STRIP= -MAN= WARNS?= 6 .include Modified: head/lib/librt/tests/Makefile ============================================================================== --- head/lib/librt/tests/Makefile Mon Oct 12 07:53:04 2015 (r289171) +++ head/lib/librt/tests/Makefile Mon Oct 12 08:16:03 2015 (r289172) @@ -1,11 +1,5 @@ # $FreeBSD$ -OBJTOP= ${.OBJDIR:H:H:H} -SRCTOP= ${.CURDIR:H:H:H} -TESTSRC= ${SRCTOP}/contrib/netbsd-tests/lib/librt - -TESTSDIR= ${TESTSBASE}/lib/librt - LIBADD= rt NETBSD_ATF_TESTS_C= sched_test Modified: head/lib/libthr/tests/Makefile ============================================================================== --- head/lib/libthr/tests/Makefile Mon Oct 12 07:53:04 2015 (r289171) +++ head/lib/libthr/tests/Makefile Mon Oct 12 08:16:03 2015 (r289172) @@ -1,11 +1,7 @@ # $FreeBSD$ -OBJTOP= ${.OBJDIR:H:H:H} -SRCTOP= ${.CURDIR:H:H:H} TESTSRC= ${SRCTOP}/contrib/netbsd-tests/lib/libpthread -TESTSDIR= ${TESTSBASE}/lib/libthr - # TODO: t_name (missing pthread_getname_np support in FreeBSD) NETBSD_ATF_TESTS_C= barrier_test NETBSD_ATF_TESTS_C+= cond_test Modified: head/lib/libthr/tests/dlopen/Makefile ============================================================================== --- head/lib/libthr/tests/dlopen/Makefile Mon Oct 12 07:53:04 2015 (r289171) +++ head/lib/libthr/tests/dlopen/Makefile Mon Oct 12 08:16:03 2015 (r289172) @@ -1,7 +1,5 @@ # $FreeBSD$ -OBJTOP= ${.OBJDIR:H:H:H:H} -SRCTOP= ${.CURDIR:H:H:H:H} TESTSRC= ${SRCTOP}/contrib/netbsd-tests/lib/libpthread/dlopen .include Modified: head/lib/libthr/tests/dlopen/dso/Makefile ============================================================================== --- head/lib/libthr/tests/dlopen/dso/Makefile Mon Oct 12 07:53:04 2015 (r289171) +++ head/lib/libthr/tests/dlopen/dso/Makefile Mon Oct 12 08:16:03 2015 (r289172) @@ -1,7 +1,6 @@ # $FreeBSD$ OBJTOP= ${.OBJDIR:H:H:H:H:H} -SRCTOP= ${.CURDIR:H:H:H:H:H} TESTSRC= ${SRCTOP}/contrib/netbsd-tests/lib/libpthread/dlopen/dso SHLIB= h_pthread_dlopen Modified: head/lib/libutil/tests/Makefile ============================================================================== --- head/lib/libutil/tests/Makefile Mon Oct 12 07:53:04 2015 (r289171) +++ head/lib/libutil/tests/Makefile Mon Oct 12 08:16:03 2015 (r289172) @@ -1,7 +1,5 @@ # $FreeBSD$ -TESTSDIR= ${TESTSBASE}/lib/libutil - TAP_TESTS_C+= flopen_test TAP_TESTS_C+= grp_test TAP_TESTS_C+= humanize_number_test Modified: head/lib/msun/tests/Makefile ============================================================================== --- head/lib/msun/tests/Makefile Mon Oct 12 07:53:04 2015 (r289171) +++ head/lib/msun/tests/Makefile Mon Oct 12 08:16:03 2015 (r289172) @@ -1,11 +1,7 @@ # $FreeBSD$ -OBJTOP= ${.OBJDIR:H:H:H} -SRCTOP= ${.CURDIR:H:H:H} TESTSRC= ${SRCTOP}/contrib/netbsd-tests/lib/libm -TESTSDIR= ${TESTSBASE}/lib/msun - # All architectures on FreeBSD have fenv.h CFLAGS+= -DHAVE_FENV_H Modified: head/lib/tests/Makefile ============================================================================== --- head/lib/tests/Makefile Mon Oct 12 07:53:04 2015 (r289171) +++ head/lib/tests/Makefile Mon Oct 12 08:16:03 2015 (r289172) @@ -2,9 +2,7 @@ .include -TESTSDIR= ${TESTSBASE}/lib - -.PATH: ${.CURDIR:H:H}/tests +.PATH: ${SRCTOP}/tests KYUAFILE= yes .include Modified: head/libexec/atf/atf-check/tests/Makefile ============================================================================== --- head/libexec/atf/atf-check/tests/Makefile Mon Oct 12 07:53:04 2015 (r289171) +++ head/libexec/atf/atf-check/tests/Makefile Mon Oct 12 08:16:03 2015 (r289172) @@ -2,9 +2,7 @@ .include -TESTSDIR= ${TESTSBASE}/libexec/atf/atf-check - -ATF= ${.CURDIR:H:H:H:H}/contrib/atf +ATF= ${SRCTOP}/contrib/atf .PATH: ${ATF}/atf-sh ATF_TESTS_SH= atf-check_test Modified: head/libexec/atf/atf-sh/tests/Makefile ============================================================================== --- head/libexec/atf/atf-sh/tests/Makefile Mon Oct 12 07:53:04 2015 (r289171) +++ head/libexec/atf/atf-sh/tests/Makefile Mon Oct 12 08:16:03 2015 (r289172) @@ -2,9 +2,7 @@ .include -TESTSDIR= ${TESTSBASE}/libexec/atf/atf-sh - -ATF= ${.CURDIR:H:H:H:H}/contrib/atf +ATF= ${SRCTOP}/contrib/atf .PATH: ${ATF}/atf-sh ATF_TESTS_SH+= atf_check_test Modified: head/libexec/atf/tests/Makefile ============================================================================== --- head/libexec/atf/tests/Makefile Mon Oct 12 07:53:04 2015 (r289171) +++ head/libexec/atf/tests/Makefile Mon Oct 12 08:16:03 2015 (r289172) @@ -2,9 +2,7 @@ .include -TESTSDIR= ${TESTSBASE}/libexec/atf - -.PATH: ${.CURDIR:H:H:H}/tests +.PATH: ${SRCTOP}/tests KYUAFILE= yes .include Modified: head/libexec/rtld-elf/tests/Makefile ============================================================================== --- head/libexec/rtld-elf/tests/Makefile Mon Oct 12 07:53:04 2015 (r289171) +++ head/libexec/rtld-elf/tests/Makefile Mon Oct 12 08:16:03 2015 (r289172) @@ -2,7 +2,6 @@ .include -TESTSDIR= ${TESTSBASE}/libexec/rtld-elf SUBDIR+= libpythagoras target ATF_TESTS_C= ld_library_pathfds Modified: head/libexec/tests/Makefile ============================================================================== --- head/libexec/tests/Makefile Mon Oct 12 07:53:04 2015 (r289171) +++ head/libexec/tests/Makefile Mon Oct 12 08:16:03 2015 (r289172) @@ -2,9 +2,7 @@ .include -TESTSDIR= ${TESTSBASE}/libexec - -.PATH: ${.CURDIR:H:H}/tests +.PATH: ${SRCTOP}/tests KYUAFILE= yes .include Modified: head/sbin/devd/tests/Makefile ============================================================================== --- head/sbin/devd/tests/Makefile Mon Oct 12 07:53:04 2015 (r289171) +++ head/sbin/devd/tests/Makefile Mon Oct 12 08:16:03 2015 (r289172) @@ -1,7 +1,5 @@ # $FreeBSD$ -TESTSDIR= ${TESTSBASE}/sbin/devd - ATF_TESTS_C= client_test TEST_METADATA.client_test= required_programs="devd" TEST_METADATA.client_test+= required_user="root" Modified: head/sbin/dhclient/tests/Makefile ============================================================================== --- head/sbin/dhclient/tests/Makefile Mon Oct 12 07:53:04 2015 (r289171) +++ head/sbin/dhclient/tests/Makefile Mon Oct 12 08:16:03 2015 (r289172) @@ -1,7 +1,5 @@ # $FreeBSD$ -TESTSDIR= ${TESTSBASE}/sbin/dhclient - .PATH: ${.CURDIR}/.. PLAIN_TESTS_C= option-domain-search_test Modified: head/sbin/growfs/tests/Makefile ============================================================================== --- head/sbin/growfs/tests/Makefile Mon Oct 12 07:53:04 2015 (r289171) +++ head/sbin/growfs/tests/Makefile Mon Oct 12 08:16:03 2015 (r289172) @@ -1,7 +1,5 @@ # $FreeBSD$ -TESTSDIR= ${TESTSBASE}/sbin/growfs - TAP_TESTS_PERL= legacy_test .include Modified: head/sbin/ifconfig/tests/Makefile ============================================================================== --- head/sbin/ifconfig/tests/Makefile Mon Oct 12 07:53:04 2015 (r289171) +++ head/sbin/ifconfig/tests/Makefile Mon Oct 12 08:16:03 2015 (r289172) @@ -1,11 +1,5 @@ # $FreeBSD$ -OBJTOP= ${.OBJDIR}/../../.. -SRCTOP= ${.CURDIR}/../../.. -TESTSRC= ${SRCTOP}/contrib/netbsd-tests/sbin/ifconfig - -TESTSDIR= ${TESTSBASE}/sbin/ifconfig - NETBSD_ATF_TESTS_SH= nonexistent_test .include Modified: head/sbin/mdconfig/tests/Makefile ============================================================================== --- head/sbin/mdconfig/tests/Makefile Mon Oct 12 07:53:04 2015 (r289171) +++ head/sbin/mdconfig/tests/Makefile Mon Oct 12 08:16:03 2015 (r289172) @@ -1,10 +1,7 @@ # $FreeBSD$ -TESTSDIR= ${TESTSBASE}/sbin/mdconfig - ATF_TESTS_SH= mdconfig_test - TEST_METADATA.mdconfig_test+= required_user="root" .include Modified: head/sbin/tests/Makefile ============================================================================== --- head/sbin/tests/Makefile Mon Oct 12 07:53:04 2015 (r289171) +++ head/sbin/tests/Makefile Mon Oct 12 08:16:03 2015 (r289172) @@ -2,9 +2,7 @@ .include -TESTSDIR= ${TESTSBASE}/sbin - -.PATH: ${.CURDIR:H:H}/tests +.PATH: ${SRCTOP}/tests KYUAFILE= yes .include Modified: head/secure/lib/tests/Makefile ============================================================================== --- head/secure/lib/tests/Makefile Mon Oct 12 07:53:04 2015 (r289171) +++ head/secure/lib/tests/Makefile Mon Oct 12 08:16:03 2015 (r289172) @@ -2,9 +2,7 @@ .include -TESTSDIR= ${TESTSBASE}/secure/lib - -.PATH: ${.CURDIR:H:H:H}/tests +.PATH: ${SRCTOP}/tests KYUAFILE= yes .include Modified: head/secure/libexec/tests/Makefile ============================================================================== --- head/secure/libexec/tests/Makefile Mon Oct 12 07:53:04 2015 (r289171) +++ head/secure/libexec/tests/Makefile Mon Oct 12 08:16:03 2015 (r289172) @@ -2,9 +2,7 @@ .include -TESTSDIR= ${TESTSBASE}/secure/libexec - -.PATH: ${.CURDIR:H:H:H}/tests +.PATH: ${SRCTOP}/tests KYUAFILE= yes .include Modified: head/secure/tests/Makefile ============================================================================== --- head/secure/tests/Makefile Mon Oct 12 07:53:04 2015 (r289171) +++ head/secure/tests/Makefile Mon Oct 12 08:16:03 2015 (r289172) @@ -2,9 +2,7 @@ .include -TESTSDIR= ${TESTSBASE}/secure - -.PATH: ${.CURDIR:H:H}/tests +.PATH: ${SRCTOP}/tests KYUAFILE= yes .include Modified: head/secure/usr.bin/tests/Makefile ============================================================================== --- head/secure/usr.bin/tests/Makefile Mon Oct 12 07:53:04 2015 (r289171) +++ head/secure/usr.bin/tests/Makefile Mon Oct 12 08:16:03 2015 (r289172) @@ -2,9 +2,7 @@ .include -TESTSDIR= ${TESTSBASE}/secure/usr.bin - -.PATH: ${.CURDIR:H:H:H}/tests +.PATH: ${SRCTOP}/tests KYUAFILE= yes .include Modified: head/secure/usr.sbin/tests/Makefile ============================================================================== --- head/secure/usr.sbin/tests/Makefile Mon Oct 12 07:53:04 2015 (r289171) +++ head/secure/usr.sbin/tests/Makefile Mon Oct 12 08:16:03 2015 (r289172) @@ -2,9 +2,7 @@ .include -TESTSDIR= ${TESTSBASE}/secure/usr.sbin - -.PATH: ${.CURDIR:H:H:H}/tests +.PATH: ${SRCTOP}/tests KYUAFILE= yes .include *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@freebsd.org Mon Oct 12 08:17:22 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B3A37A11AD5; Mon, 12 Oct 2015 08:17:22 +0000 (UTC) (envelope-from kevlo@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7B1A217E1; Mon, 12 Oct 2015 08:17:22 +0000 (UTC) (envelope-from kevlo@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t9C8HLGq001794; Mon, 12 Oct 2015 08:17:21 GMT (envelope-from kevlo@FreeBSD.org) Received: (from kevlo@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9C8HLAF001793; Mon, 12 Oct 2015 08:17:21 GMT (envelope-from kevlo@FreeBSD.org) Message-Id: <201510120817.t9C8HLAF001793@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kevlo set sender to kevlo@FreeBSD.org using -f From: Kevin Lo Date: Mon, 12 Oct 2015 08:17:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289173 - 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 " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Oct 2015 08:17:22 -0000 Author: kevlo Date: Mon Oct 12 08:17:21 2015 New Revision: 289173 URL: https://svnweb.freebsd.org/changeset/base/289173 Log: Accept any correct frames from any source when MONITOR mode is used. Submitted by: Andriy Voskoboinyk Differential Revision: https://reviews.freebsd.org/D3812 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 Mon Oct 12 08:16:03 2015 (r289172) +++ head/sys/dev/usb/wlan/if_urtwn.c Mon Oct 12 08:17:21 2015 (r289173) @@ -1632,6 +1632,19 @@ urtwn_newstate(struct ieee80211vap *vap, /* Enable Rx of data frames. */ urtwn_write_2(sc, R92C_RXFLTMAP2, 0xffff); + /* Enable Rx of ctrl frames. */ + urtwn_write_2(sc, R92C_RXFLTMAP1, 0xffff); + + /* + * Accept data/control/management frames + * from any BSSID. + */ + urtwn_write_4(sc, R92C_RCR, + (urtwn_read_4(sc, R92C_RCR) & ~(R92C_RCR_APM | + R92C_RCR_CBSSID_DATA | R92C_RCR_CBSSID_BCN)) | + R92C_RCR_ADF | R92C_RCR_ACF | R92C_RCR_AMF | + R92C_RCR_AAP); + /* Turn link LED on. */ urtwn_set_led(sc, URTWN_LED_LINK, 1); break; From owner-svn-src-all@freebsd.org Mon Oct 12 08:54:51 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E78379D26B0; Mon, 12 Oct 2015 08:54:51 +0000 (UTC) (envelope-from peter@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 649561AB2; Mon, 12 Oct 2015 08:54:51 +0000 (UTC) (envelope-from peter@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t9C8so5U016378; Mon, 12 Oct 2015 08:54:50 GMT (envelope-from peter@FreeBSD.org) Received: (from peter@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9C8soWg016373; Mon, 12 Oct 2015 08:54:50 GMT (envelope-from peter@FreeBSD.org) Message-Id: <201510120854.t9C8soWg016373@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: peter set sender to peter@FreeBSD.org using -f From: Peter Wemm Date: Mon, 12 Oct 2015 08:54:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r289177 - in vendor/subversion/dist: . doc/programmer doc/user subversion subversion/include subversion/include/private subversion/libsvn_auth_gnome_keyring subversion/libsvn_auth_kwall... 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 " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Oct 2015 08:54:52 -0000 Author: peter Date: Mon Oct 12 08:54:49 2015 New Revision: 289177 URL: https://svnweb.freebsd.org/changeset/base/289177 Log: Vendor import of subversion-1.9.2 Added: vendor/subversion/dist/.ycm_extra_conf.py (contents, props changed) vendor/subversion/dist/doc/programmer/gtest-guide.txt (contents, props changed) vendor/subversion/dist/subversion/include/private/svn_client_mtcc.h (contents, props changed) vendor/subversion/dist/subversion/include/private/svn_fs_fs_private.h (contents, props changed) vendor/subversion/dist/subversion/include/private/svn_object_pool.h (contents, props changed) vendor/subversion/dist/subversion/include/private/svn_packed_data.h (contents, props changed) vendor/subversion/dist/subversion/include/private/svn_sorts_private.h (contents, props changed) vendor/subversion/dist/subversion/include/svn_x509.h (contents, props changed) vendor/subversion/dist/subversion/libsvn_auth_gnome_keyring/libsvn_auth_gnome_keyring.pc.in (contents, props changed) vendor/subversion/dist/subversion/libsvn_auth_kwallet/libsvn_auth_kwallet.pc.in (contents, props changed) vendor/subversion/dist/subversion/libsvn_client/libsvn_client.pc.in (contents, props changed) vendor/subversion/dist/subversion/libsvn_client/mtcc.c (contents, props changed) vendor/subversion/dist/subversion/libsvn_delta/libsvn_delta.pc.in (contents, props changed) vendor/subversion/dist/subversion/libsvn_diff/binary_diff.c (contents, props changed) vendor/subversion/dist/subversion/libsvn_diff/libsvn_diff.pc.in (contents, props changed) vendor/subversion/dist/subversion/libsvn_fs/deprecated.c (contents, props changed) vendor/subversion/dist/subversion/libsvn_fs/libsvn_fs.pc.in (contents, props changed) vendor/subversion/dist/subversion/libsvn_fs_base/libsvn_fs_base.pc.in (contents, props changed) vendor/subversion/dist/subversion/libsvn_fs_fs/cached_data.c (contents, props changed) vendor/subversion/dist/subversion/libsvn_fs_fs/cached_data.h (contents, props changed) vendor/subversion/dist/subversion/libsvn_fs_fs/dump-index.c (contents, props changed) vendor/subversion/dist/subversion/libsvn_fs_fs/hotcopy.c (contents, props changed) vendor/subversion/dist/subversion/libsvn_fs_fs/hotcopy.h (contents, props changed) vendor/subversion/dist/subversion/libsvn_fs_fs/index.c (contents, props changed) vendor/subversion/dist/subversion/libsvn_fs_fs/index.h (contents, props changed) vendor/subversion/dist/subversion/libsvn_fs_fs/libsvn_fs_fs.pc.in (contents, props changed) vendor/subversion/dist/subversion/libsvn_fs_fs/load-index.c (contents, props changed) vendor/subversion/dist/subversion/libsvn_fs_fs/low_level.c (contents, props changed) vendor/subversion/dist/subversion/libsvn_fs_fs/low_level.h (contents, props changed) vendor/subversion/dist/subversion/libsvn_fs_fs/pack.c (contents, props changed) vendor/subversion/dist/subversion/libsvn_fs_fs/pack.h (contents, props changed) vendor/subversion/dist/subversion/libsvn_fs_fs/recovery.c (contents, props changed) vendor/subversion/dist/subversion/libsvn_fs_fs/recovery.h (contents, props changed) vendor/subversion/dist/subversion/libsvn_fs_fs/rev_file.c (contents, props changed) vendor/subversion/dist/subversion/libsvn_fs_fs/rev_file.h (contents, props changed) vendor/subversion/dist/subversion/libsvn_fs_fs/revprops.c (contents, props changed) vendor/subversion/dist/subversion/libsvn_fs_fs/revprops.h (contents, props changed) vendor/subversion/dist/subversion/libsvn_fs_fs/stats.c (contents, props changed) vendor/subversion/dist/subversion/libsvn_fs_fs/structure-indexes vendor/subversion/dist/subversion/libsvn_fs_fs/transaction.c (contents, props changed) vendor/subversion/dist/subversion/libsvn_fs_fs/transaction.h (contents, props changed) vendor/subversion/dist/subversion/libsvn_fs_fs/util.c (contents, props changed) vendor/subversion/dist/subversion/libsvn_fs_fs/util.h (contents, props changed) vendor/subversion/dist/subversion/libsvn_fs_fs/verify.c (contents, props changed) vendor/subversion/dist/subversion/libsvn_fs_fs/verify.h (contents, props changed) vendor/subversion/dist/subversion/libsvn_fs_util/libsvn_fs_util.pc.in (contents, props changed) vendor/subversion/dist/subversion/libsvn_fs_x/ vendor/subversion/dist/subversion/libsvn_fs_x/TODO vendor/subversion/dist/subversion/libsvn_fs_x/cached_data.c (contents, props changed) vendor/subversion/dist/subversion/libsvn_fs_x/cached_data.h (contents, props changed) vendor/subversion/dist/subversion/libsvn_fs_x/caching.c (contents, props changed) vendor/subversion/dist/subversion/libsvn_fs_x/changes.c (contents, props changed) vendor/subversion/dist/subversion/libsvn_fs_x/changes.h (contents, props changed) vendor/subversion/dist/subversion/libsvn_fs_x/dag.c (contents, props changed) vendor/subversion/dist/subversion/libsvn_fs_x/dag.h (contents, props changed) vendor/subversion/dist/subversion/libsvn_fs_x/fs.c (contents, props changed) vendor/subversion/dist/subversion/libsvn_fs_x/fs.h (contents, props changed) vendor/subversion/dist/subversion/libsvn_fs_x/fs_id.c (contents, props changed) vendor/subversion/dist/subversion/libsvn_fs_x/fs_id.h (contents, props changed) vendor/subversion/dist/subversion/libsvn_fs_x/fs_x.c (contents, props changed) vendor/subversion/dist/subversion/libsvn_fs_x/fs_x.h (contents, props changed) vendor/subversion/dist/subversion/libsvn_fs_x/hotcopy.c (contents, props changed) vendor/subversion/dist/subversion/libsvn_fs_x/hotcopy.h (contents, props changed) vendor/subversion/dist/subversion/libsvn_fs_x/id.c (contents, props changed) vendor/subversion/dist/subversion/libsvn_fs_x/id.h (contents, props changed) vendor/subversion/dist/subversion/libsvn_fs_x/index.c (contents, props changed) vendor/subversion/dist/subversion/libsvn_fs_x/index.h (contents, props changed) vendor/subversion/dist/subversion/libsvn_fs_x/libsvn_fs_x.pc.in (contents, props changed) vendor/subversion/dist/subversion/libsvn_fs_x/lock.c (contents, props changed) vendor/subversion/dist/subversion/libsvn_fs_x/lock.h (contents, props changed) vendor/subversion/dist/subversion/libsvn_fs_x/low_level.c (contents, props changed) vendor/subversion/dist/subversion/libsvn_fs_x/low_level.h (contents, props changed) vendor/subversion/dist/subversion/libsvn_fs_x/noderevs.c (contents, props changed) vendor/subversion/dist/subversion/libsvn_fs_x/noderevs.h (contents, props changed) vendor/subversion/dist/subversion/libsvn_fs_x/pack.c (contents, props changed) vendor/subversion/dist/subversion/libsvn_fs_x/pack.h (contents, props changed) vendor/subversion/dist/subversion/libsvn_fs_x/recovery.c (contents, props changed) vendor/subversion/dist/subversion/libsvn_fs_x/recovery.h (contents, props changed) vendor/subversion/dist/subversion/libsvn_fs_x/rep-cache-db.h (contents, props changed) vendor/subversion/dist/subversion/libsvn_fs_x/rep-cache-db.sql vendor/subversion/dist/subversion/libsvn_fs_x/rep-cache.c (contents, props changed) vendor/subversion/dist/subversion/libsvn_fs_x/rep-cache.h (contents, props changed) vendor/subversion/dist/subversion/libsvn_fs_x/reps.c (contents, props changed) vendor/subversion/dist/subversion/libsvn_fs_x/reps.h (contents, props changed) vendor/subversion/dist/subversion/libsvn_fs_x/rev_file.c (contents, props changed) vendor/subversion/dist/subversion/libsvn_fs_x/rev_file.h (contents, props changed) vendor/subversion/dist/subversion/libsvn_fs_x/revprops.c (contents, props changed) vendor/subversion/dist/subversion/libsvn_fs_x/revprops.h (contents, props changed) vendor/subversion/dist/subversion/libsvn_fs_x/string_table.c (contents, props changed) vendor/subversion/dist/subversion/libsvn_fs_x/string_table.h (contents, props changed) vendor/subversion/dist/subversion/libsvn_fs_x/structure vendor/subversion/dist/subversion/libsvn_fs_x/temp_serializer.c (contents, props changed) vendor/subversion/dist/subversion/libsvn_fs_x/temp_serializer.h (contents, props changed) vendor/subversion/dist/subversion/libsvn_fs_x/transaction.c (contents, props changed) vendor/subversion/dist/subversion/libsvn_fs_x/transaction.h (contents, props changed) vendor/subversion/dist/subversion/libsvn_fs_x/tree.c (contents, props changed) vendor/subversion/dist/subversion/libsvn_fs_x/tree.h (contents, props changed) vendor/subversion/dist/subversion/libsvn_fs_x/util.c (contents, props changed) vendor/subversion/dist/subversion/libsvn_fs_x/util.h (contents, props changed) vendor/subversion/dist/subversion/libsvn_fs_x/verify.c (contents, props changed) vendor/subversion/dist/subversion/libsvn_fs_x/verify.h (contents, props changed) vendor/subversion/dist/subversion/libsvn_ra/libsvn_ra.pc.in (contents, props changed) vendor/subversion/dist/subversion/libsvn_ra_local/libsvn_ra_local.pc.in (contents, props changed) vendor/subversion/dist/subversion/libsvn_ra_serf/eagain_bucket.c (contents, props changed) vendor/subversion/dist/subversion/libsvn_ra_serf/get_file.c (contents, props changed) vendor/subversion/dist/subversion/libsvn_ra_serf/get_lock.c (contents, props changed) vendor/subversion/dist/subversion/libsvn_ra_serf/libsvn_ra_serf.pc.in (contents, props changed) vendor/subversion/dist/subversion/libsvn_ra_serf/lock.c (contents, props changed) vendor/subversion/dist/subversion/libsvn_ra_serf/multistatus.c (contents, props changed) vendor/subversion/dist/subversion/libsvn_ra_serf/stat.c (contents, props changed) vendor/subversion/dist/subversion/libsvn_ra_svn/libsvn_ra_svn.pc.in (contents, props changed) vendor/subversion/dist/subversion/libsvn_repos/authz_pool.c (contents, props changed) vendor/subversion/dist/subversion/libsvn_repos/config_pool.c (contents, props changed) vendor/subversion/dist/subversion/libsvn_repos/libsvn_repos.pc.in (contents, props changed) vendor/subversion/dist/subversion/libsvn_subr/bit_array.c (contents, props changed) vendor/subversion/dist/subversion/libsvn_subr/checksum.h (contents, props changed) vendor/subversion/dist/subversion/libsvn_subr/compress.c (contents, props changed) vendor/subversion/dist/subversion/libsvn_subr/config_keys.inc (contents, props changed) vendor/subversion/dist/subversion/libsvn_subr/errorcode.inc (contents, props changed) vendor/subversion/dist/subversion/libsvn_subr/fnv1a.c (contents, props changed) vendor/subversion/dist/subversion/libsvn_subr/fnv1a.h (contents, props changed) vendor/subversion/dist/subversion/libsvn_subr/libsvn_subr.pc.in (contents, props changed) vendor/subversion/dist/subversion/libsvn_subr/object_pool.c (contents, props changed) vendor/subversion/dist/subversion/libsvn_subr/packed_data.c (contents, props changed) vendor/subversion/dist/subversion/libsvn_subr/prefix_string.c (contents, props changed) vendor/subversion/dist/subversion/libsvn_subr/root_pools.c (contents, props changed) vendor/subversion/dist/subversion/libsvn_subr/utf8proc/ vendor/subversion/dist/subversion/libsvn_subr/utf8proc.c (contents, props changed) vendor/subversion/dist/subversion/libsvn_subr/utf8proc/LICENSE vendor/subversion/dist/subversion/libsvn_subr/utf8proc/README vendor/subversion/dist/subversion/libsvn_subr/utf8proc/utf8proc.c (contents, props changed) vendor/subversion/dist/subversion/libsvn_subr/utf8proc/utf8proc.h (contents, props changed) vendor/subversion/dist/subversion/libsvn_subr/utf8proc/utf8proc_data.c (contents, props changed) vendor/subversion/dist/subversion/libsvn_subr/x509.h (contents, props changed) vendor/subversion/dist/subversion/libsvn_subr/x509info.c (contents, props changed) vendor/subversion/dist/subversion/libsvn_subr/x509parse.c (contents, props changed) vendor/subversion/dist/subversion/libsvn_wc/libsvn_wc.pc.in (contents, props changed) vendor/subversion/dist/subversion/svn/auth-cmd.c (contents, props changed) vendor/subversion/dist/subversion/svn/cl-log.h (contents, props changed) vendor/subversion/dist/subversion/svn/similarity.c (contents, props changed) vendor/subversion/dist/subversion/svnbench/ vendor/subversion/dist/subversion/svnbench/cl.h (contents, props changed) vendor/subversion/dist/subversion/svnbench/help-cmd.c (contents, props changed) vendor/subversion/dist/subversion/svnbench/notify.c (contents, props changed) vendor/subversion/dist/subversion/svnbench/null-blame-cmd.c (contents, props changed) vendor/subversion/dist/subversion/svnbench/null-export-cmd.c (contents, props changed) vendor/subversion/dist/subversion/svnbench/null-info-cmd.c (contents, props changed) vendor/subversion/dist/subversion/svnbench/null-list-cmd.c (contents, props changed) vendor/subversion/dist/subversion/svnbench/null-log-cmd.c (contents, props changed) vendor/subversion/dist/subversion/svnbench/svnbench.c (contents, props changed) vendor/subversion/dist/subversion/svnbench/util.c (contents, props changed) vendor/subversion/dist/subversion/svnfsfs/ vendor/subversion/dist/subversion/svnfsfs/dump-index-cmd.c (contents, props changed) vendor/subversion/dist/subversion/svnfsfs/load-index-cmd.c (contents, props changed) vendor/subversion/dist/subversion/svnfsfs/stats-cmd.c (contents, props changed) vendor/subversion/dist/subversion/svnfsfs/svnfsfs.c (contents, props changed) vendor/subversion/dist/subversion/svnfsfs/svnfsfs.h (contents, props changed) vendor/subversion/dist/subversion/svnserve/logger.c (contents, props changed) vendor/subversion/dist/subversion/svnserve/logger.h (contents, props changed) Deleted: vendor/subversion/dist/subversion/include/private/svn_named_atomic.h vendor/subversion/dist/subversion/include/private/svn_pseudo_md5.h vendor/subversion/dist/subversion/libsvn_fs_fs/key-gen.c vendor/subversion/dist/subversion/libsvn_fs_fs/key-gen.h vendor/subversion/dist/subversion/libsvn_ra_serf/locks.c vendor/subversion/dist/subversion/libsvn_subr/md5.h vendor/subversion/dist/subversion/libsvn_subr/named_atomic.c vendor/subversion/dist/subversion/libsvn_subr/pseudo_md5.c vendor/subversion/dist/subversion/libsvn_subr/sha1.c vendor/subversion/dist/subversion/libsvn_subr/sha1.h vendor/subversion/dist/subversion/svn/client_errors.h Modified: vendor/subversion/dist/CHANGES vendor/subversion/dist/COMMITTERS vendor/subversion/dist/INSTALL vendor/subversion/dist/LICENSE vendor/subversion/dist/Makefile.in vendor/subversion/dist/NOTICE vendor/subversion/dist/autogen.sh vendor/subversion/dist/build-outputs.mk vendor/subversion/dist/build.conf vendor/subversion/dist/configure vendor/subversion/dist/configure.ac vendor/subversion/dist/doc/user/svn-best-practices.html vendor/subversion/dist/gen-make.py vendor/subversion/dist/get-deps.sh vendor/subversion/dist/subversion/include/mod_dav_svn.h vendor/subversion/dist/subversion/include/private/svn_atomic.h vendor/subversion/dist/subversion/include/private/svn_auth_private.h vendor/subversion/dist/subversion/include/private/svn_cache.h vendor/subversion/dist/subversion/include/private/svn_client_private.h vendor/subversion/dist/subversion/include/private/svn_cmdline_private.h vendor/subversion/dist/subversion/include/private/svn_delta_private.h vendor/subversion/dist/subversion/include/private/svn_dep_compat.h vendor/subversion/dist/subversion/include/private/svn_diff_private.h vendor/subversion/dist/subversion/include/private/svn_diff_tree.h vendor/subversion/dist/subversion/include/private/svn_editor.h vendor/subversion/dist/subversion/include/private/svn_error_private.h vendor/subversion/dist/subversion/include/private/svn_fs_private.h vendor/subversion/dist/subversion/include/private/svn_fs_util.h vendor/subversion/dist/subversion/include/private/svn_io_private.h vendor/subversion/dist/subversion/include/private/svn_log.h vendor/subversion/dist/subversion/include/private/svn_magic.h vendor/subversion/dist/subversion/include/private/svn_mergeinfo_private.h vendor/subversion/dist/subversion/include/private/svn_mutex.h vendor/subversion/dist/subversion/include/private/svn_opt_private.h vendor/subversion/dist/subversion/include/private/svn_ra_private.h vendor/subversion/dist/subversion/include/private/svn_ra_svn_private.h vendor/subversion/dist/subversion/include/private/svn_repos_private.h vendor/subversion/dist/subversion/include/private/svn_sqlite.h vendor/subversion/dist/subversion/include/private/svn_string_private.h vendor/subversion/dist/subversion/include/private/svn_subr_private.h vendor/subversion/dist/subversion/include/private/svn_temp_serializer.h vendor/subversion/dist/subversion/include/private/svn_utf_private.h vendor/subversion/dist/subversion/include/private/svn_wc_private.h vendor/subversion/dist/subversion/include/svn_auth.h vendor/subversion/dist/subversion/include/svn_cache_config.h vendor/subversion/dist/subversion/include/svn_checksum.h vendor/subversion/dist/subversion/include/svn_client.h vendor/subversion/dist/subversion/include/svn_cmdline.h vendor/subversion/dist/subversion/include/svn_compat.h vendor/subversion/dist/subversion/include/svn_config.h vendor/subversion/dist/subversion/include/svn_delta.h vendor/subversion/dist/subversion/include/svn_diff.h vendor/subversion/dist/subversion/include/svn_dirent_uri.h vendor/subversion/dist/subversion/include/svn_error.h vendor/subversion/dist/subversion/include/svn_error_codes.h vendor/subversion/dist/subversion/include/svn_fs.h vendor/subversion/dist/subversion/include/svn_hash.h vendor/subversion/dist/subversion/include/svn_io.h vendor/subversion/dist/subversion/include/svn_iter.h vendor/subversion/dist/subversion/include/svn_mergeinfo.h vendor/subversion/dist/subversion/include/svn_opt.h vendor/subversion/dist/subversion/include/svn_path.h vendor/subversion/dist/subversion/include/svn_props.h vendor/subversion/dist/subversion/include/svn_ra.h vendor/subversion/dist/subversion/include/svn_ra_svn.h vendor/subversion/dist/subversion/include/svn_repos.h vendor/subversion/dist/subversion/include/svn_sorts.h vendor/subversion/dist/subversion/include/svn_string.h vendor/subversion/dist/subversion/include/svn_types.h vendor/subversion/dist/subversion/include/svn_version.h vendor/subversion/dist/subversion/include/svn_wc.h vendor/subversion/dist/subversion/include/svn_xml.h vendor/subversion/dist/subversion/libsvn_auth_kwallet/kwallet.cpp vendor/subversion/dist/subversion/libsvn_client/add.c vendor/subversion/dist/subversion/libsvn_client/blame.c vendor/subversion/dist/subversion/libsvn_client/cat.c vendor/subversion/dist/subversion/libsvn_client/checkout.c vendor/subversion/dist/subversion/libsvn_client/cleanup.c vendor/subversion/dist/subversion/libsvn_client/client.h vendor/subversion/dist/subversion/libsvn_client/cmdline.c vendor/subversion/dist/subversion/libsvn_client/commit.c vendor/subversion/dist/subversion/libsvn_client/commit_util.c vendor/subversion/dist/subversion/libsvn_client/compat_providers.c vendor/subversion/dist/subversion/libsvn_client/copy.c vendor/subversion/dist/subversion/libsvn_client/copy_foreign.c vendor/subversion/dist/subversion/libsvn_client/ctx.c vendor/subversion/dist/subversion/libsvn_client/delete.c vendor/subversion/dist/subversion/libsvn_client/deprecated.c vendor/subversion/dist/subversion/libsvn_client/diff.c vendor/subversion/dist/subversion/libsvn_client/diff_local.c vendor/subversion/dist/subversion/libsvn_client/diff_summarize.c vendor/subversion/dist/subversion/libsvn_client/export.c vendor/subversion/dist/subversion/libsvn_client/externals.c vendor/subversion/dist/subversion/libsvn_client/import.c vendor/subversion/dist/subversion/libsvn_client/info.c vendor/subversion/dist/subversion/libsvn_client/iprops.c vendor/subversion/dist/subversion/libsvn_client/list.c vendor/subversion/dist/subversion/libsvn_client/locking_commands.c vendor/subversion/dist/subversion/libsvn_client/log.c vendor/subversion/dist/subversion/libsvn_client/merge.c vendor/subversion/dist/subversion/libsvn_client/mergeinfo.c vendor/subversion/dist/subversion/libsvn_client/mergeinfo.h vendor/subversion/dist/subversion/libsvn_client/patch.c vendor/subversion/dist/subversion/libsvn_client/prop_commands.c vendor/subversion/dist/subversion/libsvn_client/ra.c vendor/subversion/dist/subversion/libsvn_client/relocate.c vendor/subversion/dist/subversion/libsvn_client/repos_diff.c vendor/subversion/dist/subversion/libsvn_client/resolved.c vendor/subversion/dist/subversion/libsvn_client/revert.c vendor/subversion/dist/subversion/libsvn_client/revisions.c vendor/subversion/dist/subversion/libsvn_client/status.c vendor/subversion/dist/subversion/libsvn_client/switch.c vendor/subversion/dist/subversion/libsvn_client/update.c vendor/subversion/dist/subversion/libsvn_client/upgrade.c vendor/subversion/dist/subversion/libsvn_client/util.c vendor/subversion/dist/subversion/libsvn_delta/compat.c vendor/subversion/dist/subversion/libsvn_delta/compose_delta.c vendor/subversion/dist/subversion/libsvn_delta/debug_editor.c vendor/subversion/dist/subversion/libsvn_delta/debug_editor.h vendor/subversion/dist/subversion/libsvn_delta/editor.c vendor/subversion/dist/subversion/libsvn_delta/path_driver.c vendor/subversion/dist/subversion/libsvn_delta/svndiff.c vendor/subversion/dist/subversion/libsvn_delta/text_delta.c vendor/subversion/dist/subversion/libsvn_delta/xdelta.c vendor/subversion/dist/subversion/libsvn_diff/deprecated.c vendor/subversion/dist/subversion/libsvn_diff/diff4.c vendor/subversion/dist/subversion/libsvn_diff/diff_file.c vendor/subversion/dist/subversion/libsvn_diff/diff_memory.c vendor/subversion/dist/subversion/libsvn_diff/lcs.c vendor/subversion/dist/subversion/libsvn_diff/parse-diff.c vendor/subversion/dist/subversion/libsvn_diff/util.c vendor/subversion/dist/subversion/libsvn_fs/access.c vendor/subversion/dist/subversion/libsvn_fs/editor.c vendor/subversion/dist/subversion/libsvn_fs/fs-loader.c vendor/subversion/dist/subversion/libsvn_fs/fs-loader.h vendor/subversion/dist/subversion/libsvn_fs_base/bdb/changes-table.c vendor/subversion/dist/subversion/libsvn_fs_base/bdb/locks-table.c vendor/subversion/dist/subversion/libsvn_fs_base/bdb/strings-table.c vendor/subversion/dist/subversion/libsvn_fs_base/dag.c vendor/subversion/dist/subversion/libsvn_fs_base/dag.h vendor/subversion/dist/subversion/libsvn_fs_base/fs.c vendor/subversion/dist/subversion/libsvn_fs_base/fs.h vendor/subversion/dist/subversion/libsvn_fs_base/id.c vendor/subversion/dist/subversion/libsvn_fs_base/id.h vendor/subversion/dist/subversion/libsvn_fs_base/key-gen.c vendor/subversion/dist/subversion/libsvn_fs_base/key-gen.h vendor/subversion/dist/subversion/libsvn_fs_base/lock.c vendor/subversion/dist/subversion/libsvn_fs_base/lock.h vendor/subversion/dist/subversion/libsvn_fs_base/reps-strings.c vendor/subversion/dist/subversion/libsvn_fs_base/revs-txns.c vendor/subversion/dist/subversion/libsvn_fs_base/tree.c vendor/subversion/dist/subversion/libsvn_fs_fs/caching.c vendor/subversion/dist/subversion/libsvn_fs_fs/dag.c vendor/subversion/dist/subversion/libsvn_fs_fs/dag.h vendor/subversion/dist/subversion/libsvn_fs_fs/fs.c vendor/subversion/dist/subversion/libsvn_fs_fs/fs.h vendor/subversion/dist/subversion/libsvn_fs_fs/fs_fs.c vendor/subversion/dist/subversion/libsvn_fs_fs/fs_fs.h vendor/subversion/dist/subversion/libsvn_fs_fs/id.c vendor/subversion/dist/subversion/libsvn_fs_fs/id.h vendor/subversion/dist/subversion/libsvn_fs_fs/lock.c vendor/subversion/dist/subversion/libsvn_fs_fs/lock.h vendor/subversion/dist/subversion/libsvn_fs_fs/rep-cache-db.h vendor/subversion/dist/subversion/libsvn_fs_fs/rep-cache-db.sql vendor/subversion/dist/subversion/libsvn_fs_fs/rep-cache.c vendor/subversion/dist/subversion/libsvn_fs_fs/rep-cache.h vendor/subversion/dist/subversion/libsvn_fs_fs/structure vendor/subversion/dist/subversion/libsvn_fs_fs/temp_serializer.c vendor/subversion/dist/subversion/libsvn_fs_fs/temp_serializer.h vendor/subversion/dist/subversion/libsvn_fs_fs/tree.c vendor/subversion/dist/subversion/libsvn_fs_fs/tree.h vendor/subversion/dist/subversion/libsvn_fs_util/fs-util.c vendor/subversion/dist/subversion/libsvn_ra/compat.c vendor/subversion/dist/subversion/libsvn_ra/ra_loader.c vendor/subversion/dist/subversion/libsvn_ra/ra_loader.h vendor/subversion/dist/subversion/libsvn_ra/wrapper_template.h vendor/subversion/dist/subversion/libsvn_ra_local/ra_local.h vendor/subversion/dist/subversion/libsvn_ra_local/ra_plugin.c vendor/subversion/dist/subversion/libsvn_ra_local/split_url.c vendor/subversion/dist/subversion/libsvn_ra_serf/README vendor/subversion/dist/subversion/libsvn_ra_serf/blame.c vendor/subversion/dist/subversion/libsvn_ra_serf/blncache.c vendor/subversion/dist/subversion/libsvn_ra_serf/blncache.h vendor/subversion/dist/subversion/libsvn_ra_serf/commit.c vendor/subversion/dist/subversion/libsvn_ra_serf/get_deleted_rev.c vendor/subversion/dist/subversion/libsvn_ra_serf/getdate.c vendor/subversion/dist/subversion/libsvn_ra_serf/getlocations.c vendor/subversion/dist/subversion/libsvn_ra_serf/getlocationsegments.c vendor/subversion/dist/subversion/libsvn_ra_serf/getlocks.c vendor/subversion/dist/subversion/libsvn_ra_serf/inherited_props.c vendor/subversion/dist/subversion/libsvn_ra_serf/log.c vendor/subversion/dist/subversion/libsvn_ra_serf/merge.c vendor/subversion/dist/subversion/libsvn_ra_serf/mergeinfo.c vendor/subversion/dist/subversion/libsvn_ra_serf/options.c vendor/subversion/dist/subversion/libsvn_ra_serf/property.c vendor/subversion/dist/subversion/libsvn_ra_serf/ra_serf.h vendor/subversion/dist/subversion/libsvn_ra_serf/replay.c vendor/subversion/dist/subversion/libsvn_ra_serf/serf.c vendor/subversion/dist/subversion/libsvn_ra_serf/update.c vendor/subversion/dist/subversion/libsvn_ra_serf/util.c vendor/subversion/dist/subversion/libsvn_ra_serf/util_error.c vendor/subversion/dist/subversion/libsvn_ra_serf/xml.c vendor/subversion/dist/subversion/libsvn_ra_svn/client.c vendor/subversion/dist/subversion/libsvn_ra_svn/cram.c vendor/subversion/dist/subversion/libsvn_ra_svn/cyrus_auth.c vendor/subversion/dist/subversion/libsvn_ra_svn/deprecated.c vendor/subversion/dist/subversion/libsvn_ra_svn/editorp.c vendor/subversion/dist/subversion/libsvn_ra_svn/internal_auth.c vendor/subversion/dist/subversion/libsvn_ra_svn/marshal.c vendor/subversion/dist/subversion/libsvn_ra_svn/protocol vendor/subversion/dist/subversion/libsvn_ra_svn/ra_svn.h vendor/subversion/dist/subversion/libsvn_ra_svn/streams.c vendor/subversion/dist/subversion/libsvn_repos/authz.c vendor/subversion/dist/subversion/libsvn_repos/commit.c vendor/subversion/dist/subversion/libsvn_repos/delta.c vendor/subversion/dist/subversion/libsvn_repos/deprecated.c vendor/subversion/dist/subversion/libsvn_repos/dump.c vendor/subversion/dist/subversion/libsvn_repos/fs-wrap.c vendor/subversion/dist/subversion/libsvn_repos/hooks.c vendor/subversion/dist/subversion/libsvn_repos/load-fs-vtable.c vendor/subversion/dist/subversion/libsvn_repos/load.c vendor/subversion/dist/subversion/libsvn_repos/log.c vendor/subversion/dist/subversion/libsvn_repos/replay.c vendor/subversion/dist/subversion/libsvn_repos/reporter.c vendor/subversion/dist/subversion/libsvn_repos/repos.c vendor/subversion/dist/subversion/libsvn_repos/repos.h vendor/subversion/dist/subversion/libsvn_repos/rev_hunt.c vendor/subversion/dist/subversion/libsvn_subr/adler32.c vendor/subversion/dist/subversion/libsvn_subr/auth.c vendor/subversion/dist/subversion/libsvn_subr/auth.h vendor/subversion/dist/subversion/libsvn_subr/cache-inprocess.c vendor/subversion/dist/subversion/libsvn_subr/cache-membuffer.c vendor/subversion/dist/subversion/libsvn_subr/cache-memcache.c vendor/subversion/dist/subversion/libsvn_subr/cache.c vendor/subversion/dist/subversion/libsvn_subr/cache.h vendor/subversion/dist/subversion/libsvn_subr/cache_config.c vendor/subversion/dist/subversion/libsvn_subr/checksum.c vendor/subversion/dist/subversion/libsvn_subr/cmdline.c vendor/subversion/dist/subversion/libsvn_subr/compat.c vendor/subversion/dist/subversion/libsvn_subr/config.c vendor/subversion/dist/subversion/libsvn_subr/config_auth.c vendor/subversion/dist/subversion/libsvn_subr/config_file.c vendor/subversion/dist/subversion/libsvn_subr/config_impl.h vendor/subversion/dist/subversion/libsvn_subr/config_win.c vendor/subversion/dist/subversion/libsvn_subr/ctype.c vendor/subversion/dist/subversion/libsvn_subr/debug.c vendor/subversion/dist/subversion/libsvn_subr/deprecated.c vendor/subversion/dist/subversion/libsvn_subr/dirent_uri.c vendor/subversion/dist/subversion/libsvn_subr/dso.c vendor/subversion/dist/subversion/libsvn_subr/eol.c vendor/subversion/dist/subversion/libsvn_subr/error.c vendor/subversion/dist/subversion/libsvn_subr/gpg_agent.c vendor/subversion/dist/subversion/libsvn_subr/hash.c vendor/subversion/dist/subversion/libsvn_subr/internal_statements.h vendor/subversion/dist/subversion/libsvn_subr/io.c vendor/subversion/dist/subversion/libsvn_subr/iter.c vendor/subversion/dist/subversion/libsvn_subr/log.c vendor/subversion/dist/subversion/libsvn_subr/macos_keychain.c vendor/subversion/dist/subversion/libsvn_subr/magic.c vendor/subversion/dist/subversion/libsvn_subr/md5.c vendor/subversion/dist/subversion/libsvn_subr/mergeinfo.c vendor/subversion/dist/subversion/libsvn_subr/mutex.c vendor/subversion/dist/subversion/libsvn_subr/nls.c vendor/subversion/dist/subversion/libsvn_subr/opt.c vendor/subversion/dist/subversion/libsvn_subr/path.c vendor/subversion/dist/subversion/libsvn_subr/pool.c vendor/subversion/dist/subversion/libsvn_subr/prompt.c vendor/subversion/dist/subversion/libsvn_subr/simple_providers.c vendor/subversion/dist/subversion/libsvn_subr/sorts.c vendor/subversion/dist/subversion/libsvn_subr/spillbuf.c vendor/subversion/dist/subversion/libsvn_subr/sqlite.c vendor/subversion/dist/subversion/libsvn_subr/sqlite3wrapper.c vendor/subversion/dist/subversion/libsvn_subr/ssl_client_cert_providers.c vendor/subversion/dist/subversion/libsvn_subr/ssl_client_cert_pw_providers.c vendor/subversion/dist/subversion/libsvn_subr/ssl_server_trust_providers.c vendor/subversion/dist/subversion/libsvn_subr/stream.c vendor/subversion/dist/subversion/libsvn_subr/string.c vendor/subversion/dist/subversion/libsvn_subr/subst.c vendor/subversion/dist/subversion/libsvn_subr/sysinfo.c vendor/subversion/dist/subversion/libsvn_subr/sysinfo.h vendor/subversion/dist/subversion/libsvn_subr/temp_serializer.c vendor/subversion/dist/subversion/libsvn_subr/time.c vendor/subversion/dist/subversion/libsvn_subr/types.c vendor/subversion/dist/subversion/libsvn_subr/username_providers.c vendor/subversion/dist/subversion/libsvn_subr/utf.c vendor/subversion/dist/subversion/libsvn_subr/utf_validate.c vendor/subversion/dist/subversion/libsvn_subr/utf_width.c vendor/subversion/dist/subversion/libsvn_subr/version.c vendor/subversion/dist/subversion/libsvn_subr/win32_crashrpt.c vendor/subversion/dist/subversion/libsvn_subr/win32_crypto.c vendor/subversion/dist/subversion/libsvn_subr/win32_xlate.c vendor/subversion/dist/subversion/libsvn_subr/win32_xlate.h vendor/subversion/dist/subversion/libsvn_subr/xml.c vendor/subversion/dist/subversion/libsvn_wc/adm_crawler.c vendor/subversion/dist/subversion/libsvn_wc/adm_files.c vendor/subversion/dist/subversion/libsvn_wc/adm_files.h vendor/subversion/dist/subversion/libsvn_wc/adm_ops.c vendor/subversion/dist/subversion/libsvn_wc/cleanup.c vendor/subversion/dist/subversion/libsvn_wc/conflicts.c vendor/subversion/dist/subversion/libsvn_wc/conflicts.h vendor/subversion/dist/subversion/libsvn_wc/copy.c vendor/subversion/dist/subversion/libsvn_wc/crop.c vendor/subversion/dist/subversion/libsvn_wc/delete.c vendor/subversion/dist/subversion/libsvn_wc/deprecated.c vendor/subversion/dist/subversion/libsvn_wc/diff.h vendor/subversion/dist/subversion/libsvn_wc/diff_editor.c vendor/subversion/dist/subversion/libsvn_wc/diff_local.c vendor/subversion/dist/subversion/libsvn_wc/entries.c vendor/subversion/dist/subversion/libsvn_wc/externals.c vendor/subversion/dist/subversion/libsvn_wc/info.c vendor/subversion/dist/subversion/libsvn_wc/lock.c vendor/subversion/dist/subversion/libsvn_wc/merge.c vendor/subversion/dist/subversion/libsvn_wc/node.c vendor/subversion/dist/subversion/libsvn_wc/old-and-busted.c vendor/subversion/dist/subversion/libsvn_wc/props.c vendor/subversion/dist/subversion/libsvn_wc/props.h vendor/subversion/dist/subversion/libsvn_wc/questions.c vendor/subversion/dist/subversion/libsvn_wc/relocate.c vendor/subversion/dist/subversion/libsvn_wc/revert.c vendor/subversion/dist/subversion/libsvn_wc/revision_status.c vendor/subversion/dist/subversion/libsvn_wc/status.c vendor/subversion/dist/subversion/libsvn_wc/token-map.h vendor/subversion/dist/subversion/libsvn_wc/translate.c vendor/subversion/dist/subversion/libsvn_wc/tree_conflicts.c vendor/subversion/dist/subversion/libsvn_wc/update_editor.c vendor/subversion/dist/subversion/libsvn_wc/upgrade.c vendor/subversion/dist/subversion/libsvn_wc/util.c vendor/subversion/dist/subversion/libsvn_wc/wc-checks.h vendor/subversion/dist/subversion/libsvn_wc/wc-checks.sql vendor/subversion/dist/subversion/libsvn_wc/wc-metadata.h vendor/subversion/dist/subversion/libsvn_wc/wc-metadata.sql vendor/subversion/dist/subversion/libsvn_wc/wc-queries.h vendor/subversion/dist/subversion/libsvn_wc/wc-queries.sql vendor/subversion/dist/subversion/libsvn_wc/wc.h vendor/subversion/dist/subversion/libsvn_wc/wc_db.c vendor/subversion/dist/subversion/libsvn_wc/wc_db.h vendor/subversion/dist/subversion/libsvn_wc/wc_db_pristine.c vendor/subversion/dist/subversion/libsvn_wc/wc_db_private.h vendor/subversion/dist/subversion/libsvn_wc/wc_db_update_move.c vendor/subversion/dist/subversion/libsvn_wc/wc_db_util.c vendor/subversion/dist/subversion/libsvn_wc/wc_db_wcroot.c vendor/subversion/dist/subversion/libsvn_wc/workqueue.c vendor/subversion/dist/subversion/libsvn_wc/workqueue.h vendor/subversion/dist/subversion/svn/add-cmd.c vendor/subversion/dist/subversion/svn/blame-cmd.c vendor/subversion/dist/subversion/svn/cat-cmd.c vendor/subversion/dist/subversion/svn/changelist-cmd.c vendor/subversion/dist/subversion/svn/checkout-cmd.c vendor/subversion/dist/subversion/svn/cl-conflicts.c vendor/subversion/dist/subversion/svn/cl-conflicts.h vendor/subversion/dist/subversion/svn/cl.h vendor/subversion/dist/subversion/svn/cleanup-cmd.c vendor/subversion/dist/subversion/svn/commit-cmd.c vendor/subversion/dist/subversion/svn/conflict-callbacks.c vendor/subversion/dist/subversion/svn/copy-cmd.c vendor/subversion/dist/subversion/svn/diff-cmd.c vendor/subversion/dist/subversion/svn/export-cmd.c vendor/subversion/dist/subversion/svn/file-merge.c vendor/subversion/dist/subversion/svn/help-cmd.c vendor/subversion/dist/subversion/svn/info-cmd.c vendor/subversion/dist/subversion/svn/list-cmd.c vendor/subversion/dist/subversion/svn/log-cmd.c vendor/subversion/dist/subversion/svn/merge-cmd.c vendor/subversion/dist/subversion/svn/mergeinfo-cmd.c vendor/subversion/dist/subversion/svn/notify.c vendor/subversion/dist/subversion/svn/propget-cmd.c vendor/subversion/dist/subversion/svn/proplist-cmd.c vendor/subversion/dist/subversion/svn/props.c vendor/subversion/dist/subversion/svn/resolve-cmd.c vendor/subversion/dist/subversion/svn/revert-cmd.c vendor/subversion/dist/subversion/svn/status-cmd.c vendor/subversion/dist/subversion/svn/status.c vendor/subversion/dist/subversion/svn/svn.c vendor/subversion/dist/subversion/svn/util.c vendor/subversion/dist/subversion/svn_private_config.h.in vendor/subversion/dist/subversion/svn_private_config.hw vendor/subversion/dist/subversion/svnadmin/svnadmin.c vendor/subversion/dist/subversion/svndumpfilter/svndumpfilter.c vendor/subversion/dist/subversion/svnlook/svnlook.c vendor/subversion/dist/subversion/svnmucc/svnmucc.c vendor/subversion/dist/subversion/svnrdump/dump_editor.c vendor/subversion/dist/subversion/svnrdump/load_editor.c vendor/subversion/dist/subversion/svnrdump/svnrdump.c vendor/subversion/dist/subversion/svnrdump/svnrdump.h vendor/subversion/dist/subversion/svnrdump/util.c vendor/subversion/dist/subversion/svnserve/cyrus_auth.c vendor/subversion/dist/subversion/svnserve/serve.c vendor/subversion/dist/subversion/svnserve/server.h vendor/subversion/dist/subversion/svnserve/svnserve.c vendor/subversion/dist/subversion/svnsync/svnsync.c vendor/subversion/dist/subversion/svnsync/sync.c vendor/subversion/dist/subversion/svnversion/svnversion.c vendor/subversion/dist/win-tests.py Added: vendor/subversion/dist/.ycm_extra_conf.py ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/subversion/dist/.ycm_extra_conf.py Mon Oct 12 08:54:49 2015 (r289177) @@ -0,0 +1,88 @@ +# Configuration file for YouCompleteMe vim plugin to allow the plugin +# to determine the compile flags. This file is based on: +# https://github.com/Valloric/YouCompleteMe/blob/master/cpp/ycm/.ycm_extra_conf.py +# +# This is free and unencumbered software released into the public domain. +# +# Anyone is free to copy, modify, publish, use, compile, sell, or +# distribute this software, either in source code form or as a compiled +# binary, for any purpose, commercial or non-commercial, and by any +# means. +# +# In jurisdictions that recognize copyright laws, the author or authors +# of this software dedicate any and all copyright interest in the +# software to the public domain. We make this dedication for the benefit +# of the public at large and to the detriment of our heirs and +# successors. We intend this dedication to be an overt act of +# relinquishment in perpetuity of all present and future rights to this +# software under copyright law. +# +# 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 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. +# +# For more information, please refer to + +import os +import ycm_core +from clang_helpers import PrepareClangFlags + +compilation_database_folder = os.path.dirname(os.path.realpath(__file__)) + +if compilation_database_folder: + database = ycm_core.CompilationDatabase( compilation_database_folder ) +else: + database = None + +def MakeRelativePathsInFlagsAbsolute( flags, working_directory ): + if not working_directory: + return flags + new_flags = [] + make_next_absolute = False + path_flags = [ '-isystem', '-I', '-iquote', '--sysroot=' ] + for flag in flags: + new_flag = flag + + if make_next_absolute: + make_next_absolute = False + if not flag.startswith( '/' ): + new_flag = os.path.join( working_directory, flag ) + + for path_flag in path_flags: + if flag == path_flag: + make_next_absolute = True + break + + if flag.startswith( path_flag ): + path = flag[ len( path_flag ): ] + new_flag = path_flag + os.path.join( working_directory, path ) + break + + if new_flag: + new_flags.append( new_flag ) + return new_flags + + +def FlagsForFile( filename ): + if database: + # Bear in mind that compilation_info.compiler_flags_ does NOT return a + # python list, but a "list-like" StringVec object + compilation_info = database.GetCompilationInfoForFile( filename ) + final_flags = PrepareClangFlags( + MakeRelativePathsInFlagsAbsolute( + compilation_info.compiler_flags_, + compilation_info.compiler_working_dir_ ), + filename ) + do_cache = True + else: + final_flags = [ ] + do_cache = False + + return { + 'flags': final_flags, + 'do_cache': do_cache + } Modified: vendor/subversion/dist/CHANGES ============================================================================== --- vendor/subversion/dist/CHANGES Mon Oct 12 08:47:46 2015 (r289176) +++ vendor/subversion/dist/CHANGES Mon Oct 12 08:54:49 2015 (r289177) @@ -1,3 +1,799 @@ +Version 1.9.2 +(30 Sep 2015, from /branches/1.9.x) +http://svn.apache.org/repos/asf/subversion/tags/1.9.2 + + User-visible changes: + - Client-side bugfixes: + * svn: fix crash when saving credentials in kwallet (r1700740, r1700951) + * checkout/update: fix "access denied" error on Windows (r1701064 et al) + * update: fix crash when updating a conflicted tree (r1702198, r1702200) + * commit: fix possible crash (r1702231) + * ra_serf: do not crash on unexpected 'X-SVN-VR-Base' headers (r1702288) + * merge: fix crash when merging to a local add (r1702299 et al) + * svnmucc: fix error during propset+put for existing file (r1702467 et al) + * update: fix crash without .svn/tmp folder (r1701838, r1702203) + * checkout: remove unnecessary I/O operation (r1701638) + * merge: fix possible crash (r1701997) + * update: fix crash with some of the incoming deletes (r1702247) + * upgrade: fix crash for pre-1.3 wc with externals (r1702218 et al) + * revert: fix crash when reverting the root of a move (r1702237 et al) + * svn: do not crash upon specific database corruptions (r1702974, r1702991) + * svn: show utf8proc version in svn --version --verbose (r1702533, r1702891) + + - Server-side bugfixes: + * fix reporting for empty representations in svnfsfs stats (r1698312 et al) + + Developer-visible changes: + - General: + * fix svnfsfs_tests.py in fsfs-v4 and fsfs-v6 modes (r1700215 et al) + + - API changes: + * disable unsupported operations for standard streams (r1701633 et al) + + +Version 1.9.1 +(02 Sep 2015, from /branches/1.9.x) +http://svn.apache.org/repos/asf/subversion/tags/1.9.1 + + User-visible changes: + - Client-side bugfixes: + * Fix crash with GPG-agent with non-canonical $HOME (r1691928, issue #4584) + * Fix checkout errors with svn+ssh:// on Windows (r1696222, r1696225) + * svn: expose expat and zlib versions in svn --version --verbose (r1696387, r1697664) + * svn: improve help text for 'svn info --show-item' (r1698106) + + - Server-side bugfixes: + * svnserve: fixed minor typo in help text (r1694023) + * Enable caching with memcached on Windows (1674626, r1674785) + * Fix an error leak in FSFS verification (r1693886) + * Fix incomplete membuffer cache initialization (r1695022) + * svnfsfs: fix some bugs and inconsistencies in load-index (r1697381 et al.) + + - Client-side and server-side bugfixes: + * Fix alignment fault in ra_svn on 32 bit SPARC machines (r1697914) + + - Bindings bugfixes: + * Fix memory corruption in copy source SWIG bindings (r1694929) + + Developer-visible changes: + * Better configure-time detection of httpd version and authz fix (r1687304 et al.) + * Correct a parameter name in svn_repos_get_fs_build_parser5 (r1694194) + * Resolve circular library reference in libsvn_fs_x (r1696695) + * Fix Unix build on systems without GPG agent (r1694481, r1697824) + +Version 1.9.0 +(5 Aug 2015, from /branches/1.9.x) +http://svn.apache.org/repos/asf/subversion/tags/1.9.0 + + User-visible changes: + - General: + * make all commands provide brief description in help output (r1522518) + * flush stdout before exiting to avoid information being lost (r1543868) + + - Major new features: + * fsfs: new format 7 with more efficient on-disk layout (r1547045 et al) + * blame: support showing prospective as well as previous changes + * info: support printing of individual values with --show-item (r1662620) + * svn auth: new subcommand to manage cached credentials and certs + * svnserve: cache config and authz to lower resource usage and be able to + serve large numbers of connections with a limited number of threads + * membuffer: quadruple the maximum cacheable directory size (r1545948 et al) + * new filesystem fsx (faster, smaller); experimental - see release notes + + - Minor new features and improvements: + * new 'diff-ignore-content-type' runtime configuration option + * new option for 'svnadmin verify': --check-normalization + * new option for 'svnadmin verify': --keep-going + * svnadmin info: new subcommand to print info about a repository + * print summary of conflicts before/after interactive conflict resolution + * import: reduce number of connections to the server needed (r1482962) + * membuffer: rework cache eviction heuristics (r1476664 et at) + * membuffer: improved cache usage statistics (r1489883) + * mergeinfo: new '--log' option (r1492168) + * svnadmin upgrade: progress and cancellation support (r1495545, r1495566) + * cleanup: add '--remove-unversioned' and '--remove-ignored' (issue #3549) + * cleanup: add '--include-externals' option (issue #2325) + * cleanup: add '--quiet' option (r1498661) + * svnadmin load: speedup by setting revprops in one call (r1504079) + * svnadmin load: set svn:date revprop in the initial commit (r1504951) + * reimplement UTF-8 fuzzy conversion using utf8proc (r1511676) + * svnadmin verify: speed up for repos with large directories (r1520419) + * svn merge: interactive conflict resolver tries external tools (r1524145) + * minor speed up in string to time conversion (r1533387) + * windows: speed up console output (r1533994) + * update: optimize wc db usage when obtaining children (r1537065 et al) + * decreased overhead for case-sensitive configuration access (r1538068) + * avoid re-opening repo for in-repo authz if already open (r1538120) + * svnserve: output errors in a more standard way (r1544250) + * faster parsing of config file comments (r1544716) + * avoid trying to open the hooks-env file when it doesn't exist (r1544721) + * svnserve: provide the same logging detail in "run once" mode as provided + in the log file (r1544731) + * svnserve: reduce connection latency (r1544732) + * wc: reduce the number of locks and transactions required (r1545127 et al) + * cat: add '--ignore-keywords' option (r1547517) + * merge and mergeinfo: use fewer RA sessions (r1552265) + * fsfs: limit delta chains from crossing too many shards (r1554942) + * fsfs: option to configure compression level in deltas (r1559748) + * fsfs: enable dir and prop deltas by default for formats that support + it (r1555286) + * fsfs: avoid out of date errors from files in a directory changing when + you change a property on the directory (r1558224) + * fsfs: temporary transaction properties are preserved when commit is + interrupted (r1549907 et al) + * fsfs: speed up transaction creation (r1544719) + * fsfs: avoid trying to open lock digest files that don't exist (r1544721) + * fsfs: reduce internal overhead by using sorted array instead of hash for + directory representation (r1554711) + * fsfs: skip decoding txdelta windows that are already cached (r1555284) + * fsfs: avoid constructing fulltext when delta we need is stored (r1555297) + * fsfs: improvements to format 6 reading/writing (r1517479) + * fsfs: reduce overhead of parsing noderev structures (r1544717) + * fsfs: speed up node relation comparison (r1554807) + * fsfs: speed up critical open_path() call (r1483301 et al) + * fsfs: speed up node verification (r1520421 et al) + * fsfs: speed up serialization into cache buffer format (r1505056) + * fsfs: avoid caching intermediate fulltexts (r1565100) + * fsfs: reduce lock contention on txn-list-lock (r1569549) + * svnadmin: don't display warnings as errors (r1556297) + * ra_serf: avoid caching properties in the update editor (r1557538) + * ra_serf: decrease latency of requests to get directory contents by + pipelining requests, speeds up 'svn ls --include externals' and + some cases of multi-url diff, including merge (r1557548) + * ra_serf: spool small update reports in memory to avoid making temp files + for small requests (r1557599) + * ra_serf: allow the reuse of serf connections after an error (r1553341) + * ra_serf: improve many error messages (r1551910 et al) + * ra_serf: pipeline lock/unlock requests (r1551918, r1551993, r1552008) + * ra_serf: pipeline requests for inherited properties against old servers + that don't support the faster REPORT (r1552455, r1552475) + * ra_serf: allow reuse of sessions after a canceled request (r1557686) + * ra_serf: reduce memory usage when retrieving revision props (r1557689) + * mod_dav_svn: make out of date error message consistent with generic repos + logic (r1558247) + * allow SQLite to optimize functions that are deterministic (r1559352) + * speed up delta calculations on non-deltifyable sections (r1559767) + * ra_serf: improve memory usage in commit processing (r1520028) + * report progress as cumulative across all sessions (issue #3260) + * ra_serf: don't send DAV headers with GET requests (r1517472) + * mod_dav_svn: SVNCacheTextDeltas defaults to on (r1517479) + * fs: improve scalability of fs_open and similar functions (r1523450 et al) + * svnserve: improve performance and scalability (r1523465 et al) + * svnadmin verify: output progress messages to stdout (r1471095) + * svnadmin crashtest: make output less misleading (r1486046) + * mod_dav_svn: discover copy to src earlier in some cases (r1537440) + * speed up mergeinfo parsing (r1483292, r1483309 et al) + * optimize hash lookups used in mergeinfo and caching (r1483434 et al) + * log: optimize string handling in repos layer (r1483570, r1483572) + * ask disk hardware to sync instead of only syncing to hardware buffers + when OS supports it (r1484439, r1484445) + * optimize diff code to avoid unneeded comparisons (r1485488) + * optimize check if relpaths are canonical (r1485496, r1489828) + * ra_svn: reduce protocol implementation overhead (r1485499, r1485504 et al) + * optimize file translation without keyword substitution (r1486058) + * optimize config file parsing by using unbuffered I/O (r1486897) + * patch: apply ignore settings when deciding to delete dirs (r1490378) + * use a cheaper RA operation for common client calculation (r1496468 et al) + * ra_svn: avoid unnecessary work when doing a blame (r1503046) + * optimize reading files into memory if size is known (r1505068) + * copy: do not error on properties when doing a foreign copy (r1563361) + * membuffer: reduce memory usage by using shorter lived pools (r1564217) + * svnadmin load: add '--ignore-dates' option (r1564789) + * update: reduce sessions used with '--parents' option (r1565920) + * diff: report properties on deleted nodes (r1569320, r1570055) + * diff: switch to diff processor APIs instead of old style callbacks, step + towards resolving long standing bugs and feature requests (r1569551 et al) + * diff: use the proper revision in headers for addition and deletion + of files (r1570053) + * svnadmin lslocks: add cancellation (r1571992) + * svn --version: list available authentication credential caches (r1572106) + * fs: improved detection of changes between two nodes, this should reduce + the number of out of date errors clients see (r1572336) + * allow the use of libmagic to be configured via subversion configuration + file or SVN_CONFIG_OPTION_ENABLE_MAGIC_FILE env variable (r1572916) + * new '--pin-externals' option for svn copy (issue #1258) + * the '--strict' option was renamed '--no-newline' (r1662224) + * merge/update: switch to three-way text conflict markers + (r1591951, r1595522) + * patch: handle renames in git formatted patches (r1594636) + * svnfsfs: new expert tool (r1594860) + * mod_dav_svn: allow server admin to GET the FSFS global cache stats + (r1595160) + * diff: support git-like binary file diffs with '--git' (r1599552) + * diff: support arbitrary context size for internal diff tool with + '-U' option (r1603847, 1603871) + * commit: print progress notification between client finishing + transmitting text deltas and asking server to commit (r1604179) + * fsfs: optimize log commands for repos on Windows by not + using a locale specific function to parse ids (r1605123) + * fsfs: reduce memory usage of reading/writing changed paths caches + (r1605188 et al) + * mod_dav_svn: log post-commit errors to httpd error log as well + as returning them to client (r1606004) + * make server config groups work with svn:// URLs (issue #4512) + * svnadmin hotcopy: report progress when copying revisions and packed + shards for FSFS repositories (r1613339) + * info: show revisions for missing tree conflicts (r1617932) + * fsfs: avoid shared data clashes due to multiple distinct repositories + having identical UUIDs (r1618138 et al) + * status: ignore thumbs.db files by default (r1620955) + * fsfs: harden parsers against data corruption (r1622931, r1622937, + r1622942) + * diff: respect svn:keywords and svn:eol-style when doing arbitrary + diffs (r1623820) + * ra_serf: reduce size of XML generated for reports (r1627333) + * replace generic --trust-server-cert with more specific options to + override specific certificate failures (r1630117 et al) + * commit: improve speed of commits with many files (r1630312 et al) + * svnadmin setrevprop: add '--transaction' option (r1631435) + * svnadmin delrevprop: new subcommand (1592723) + * svnadmin verify: validate the index data against checksums (r1631598) + * svnadmin verify: new option '--metadata-only' (r1593753) + * cp: improve performance of local copies (r1632284, et al) + * fsfs: speed up operations that use revision properties (r1634875, + r1634879) + * checkout/update: use fewer RA sessions (r1635753 et al) + * log: do less work when '--with-no-revprops' is used (r1642231) + * patch: improve command to be more capable as compared to GNU patch + (issue #4533) + * limit server caches to avoid running out of memory if server admin + configured caches larger than supported by the platform (r1645572) + * mod_authz_svn: log implicit read access failures with INFO log level; + Explicit read access failures are still logged with ERROR log level + (r1653032) + * ra_serf: reduce memory usage by removing some extra intermediary state + (r1654681, r1654690) + * revert: improve performance on large working copies without changes + (r1657083) + * ra_svn: improve efficiency of editor processing (r1658194 et al) + * merge: provide different conflict reasons for local additions and + unversioned obstructions (r1659381) + * windows: improve checkout performance on windows by using sqlite truncate + journal mode rather than delete (r1659426) + * status: now accept '-r' argument (r1671164, 1672578, 1673228) + * ls: improve performance of '-v' on tag directories (r1673153) + * resolve: improve conflict prompts for binary files (r1667228 et al) + * fsfs: improve error messages for parsing errors (r1678147, r1678149) + * warn when the '--config-option' FILE:SECTION:OPTION combination may + be invalid. (r1674301 et al) + * ensure full key matching in membuffer cache (r1678950 et al) + * mod_dav_svn: expose cache statistics via HTTP (r1595160) + + - Client-side bugfixes: + * export: fix problem exporting symlinks on windows (r1476093) + * fix non-ascii character handling of command line options (r1476461) + * log: strip EOL marker only after converting to UTF-8 (r1476608) + * ra_serf: avoid dropping errors when making a lock request (r1489526) + * ra_serf: fix an error leak in update logic (r1499686) + * windows: fix issues with wcs in symlinked folders (r1501251) + * fix regression that broke parallel nested checkouts (issue #4390) + * svnmucc: ignore leading r in revision number arguments to -r (r1502636) + * mkdir: use absolute paths to avoid Windows path length limits (r1516816) + * avoid encoding support code when C runtime doesn't support it (r1530582) + * ra_svn: add check against dirents with path separators (r1533812) + * properly delete temporary files when atomic write fails (r1537466) + * wc: fix corner cases in move-update tree conflicts (r1538639 et al) + * windows: fix crash report indentation for x64 reports (r1543589) + * mergeinfo: allow to work on a moved target (issue #4301) + * windows: avoid delay when no homedir is available (r1546814) + * status: report externals in a deterministic way (r1550200) + * copy: avoid an unneeded extra RA session for wc to repo case (r1551564) + * ra_serf: show pre-revprop-change failure on revprop delete (issue #3086) + * svnsync: avoid extra request at end of every revision sync (r1553370) + * ra_serf: fix replace + propset of locked file failures (issue #3674) + * ra_serf: prevent overwriting directory during copy (issue #3314) + * commit: limit number of temporary files open at same time (issue #4172) + * ra_serf: verify incoming integers are really integers (r1557709 et al) + * log: -g --xml doesn't differentiate between forward and reverse merges + (issue #4463) + * windows: improve update and checkout speed (issue #4450) + * log: reduce performance penalties of using -g (r1559912) + * blame: reduce performance penalties of using -g (r1560112) + * ra_local: set svn:txn-user-agent for consistency (r1498608) + * ra_svn: use the stream API properly for communications (r1562072) + * update: provide error when none of targets are wcs (r1565388) + * wc: reduce dependence on unspecified SQLite behavior (r1567080 et al) + * diff: fix diffing directory without permissions to read parent (r1569265, + r1569290) + * diff: improve resolving peg revisions (r1570205 et al) + * diff: fix bug in calculating header paths (r1570584) + * ra_serf: add SSL certificate issuers common name to output (r1573728) + * updates keywords in files not modified during 'svn switch' (issue #1975) + * svnmucc: Normalize line endings with '-F' and '-m' options + (r1592148, r1592150) + * fix problems with read-only authentication caches (issue #4504) + * commit: don't bump just locked files (r1603617) + * log: reduce memory with '-v' (r1604569 et al) + * diff: fix diffing locally deleted nodes under copied directories + (r1605832) + * diff: fix missing node error when diffing a replaced node (r1605866) + * propget: forbid using 'show-inherited-properties' with 'strict' (r1611698) + * windows: avoid delay when user profile isn't writable (r1617926) + * merge: display the correct node kinds for tree conflicts (r1618024, + r1619418, r1619717) + * diff: show the correct revisions in the header (r1619452) + * diff: fix missing header for files with only property changes (r1619476) + * update: raise a tree conflict rather than an obstruction when an + incoming server-excluded node conflicts with a locally added node + (r1619495) + * update: improve tree conflict reason and action descriptions (r1619777) + * ra_serf: fix stalls during checkout/update over http/https (r1621596) + * svnmucc: don't crash when '--version' is used with other arguments + (r1625496) + * checkout: report svn:externals failures via the exit code as other + commands already do (r1628398) + * svn & svnlook: use the right error code when fputs() fails (r1630369) + * export: reject peg specifiers on local destination path (r1635085) + * don't reject command-line arguments in the form of ".@abc", where + "abc" is a peg specifier that may be empty (r1635118) + * fix directory externals not following history (issue #4529) + * remove 'df' and 'm' options from the interactive conflict resolver for + binary files (r1645578) + * mergeinfo parsing: allow source path to be empty (issue #4537) + * mkdir: when using '--parents' don't add entire contents recursively if + target already exists (r1649951) + * resolve errors with move of a nested delete (r1651980, r1651997) + * update: prevent breaking a working copy when a directory is replaced + with an external to a foreign repository (issue #4550) + * update: prevent an invalid wc state when applying a move (r1652184 et al) + * resolve: fix a segfault when breaking a move inside a delete (issue #4491) + * ra_serf: don't handle a commit that didn't produce a new revision as + a successful commit (r1653532) + * export: fix the lack of notifications when starting to handle externals + (issue #4527) + * update: fix a case where we reported an error rather than a tree conflict + (r1655017) + * info: Use local platform style paths in all cases (r1659283) + * handle lack of a configuration file properly (r1660369) + * update: resolve issues with tree conflicts caused by an incoming + delete removing a mixed revision tree (r1660742) + * don't hold onto locks of deleted paths in the client on commit (r1661363) + * info: fix url calculation for a few statuses (r1661476) + * update: when using '--set-depth' avoid removing local changes (r1661585) + * update: fix tree conflict detection on unversioned nodes that exist where + there used to be a deleted node (r1661664) + * status: display tree conflicts even if the node with the tree conflict is + shadowed by a file (r1662331) + * pre-1.6 wc compatibility: fix with obstructed working copies (r1662412) + * resolve: allow directly resolving tree conflicts (r1658435) + * copy: when copying from a wc to a url show all the changes (r1655729) + * info: provide results in a stable order (r1662030) + * revert: allow depth limited reverts of nodes that only have not-present + and/or excluded child nodes (r1662091) + * wc: fix calculating repo path after commits of nodes that shadow a + switched (not-present) node (r1663991, r1666258, r1674032) + * update: resolve assertion on bad update report involving incomplete + status (r1663671, r1666832) + * update: allow a real file to replace a file external (r1664035) + * merge: raise a tree conflict on root of obstructing dir (r1666690) + * cp: fix 'svn cp ^/A/D/H@1 ^/A' to properly create A (r1674455, r1674456) + * status: fix incorrect output with file externals (issue #4580) + * merge: fix part of issue #4582 (r1686175, r1687029, r1688258) + + - Server-side bugfixes: + * svnserve: don't ignore socket initialization errors (r1544253) + * svnserve: don't hide fatal errors in inetd and tunnel modes (r1544256) + * fsfs: log repo path in local style for cache init failure (r1494314) + * fsfs: fix potential transaction corruption (r1519624) + * svnserve: fix logging in multi-threaded servers (r1523502) + * fsfs: don't report out of date errors due to FS corruption (r1527084) + * svnadmin verify: detect inconsistencies that prevent loading (r1536854) + * mod_dav_svn: use 404 status for errors caused by invalid URIs (r1542063) + * mod_dav_svn: use 404 when the repository doesn't exist (r1544259) + * mod_dav_svn: use 'dav_svn:' prefix for filename instead of 'svn:' + (r1544711) + * mod_dav_svn: XML escape lock tokens (r1547427) + * hotcopy: don't create config files when copying pre-1.5 repos (r1547454) + * hotcopy: preserve the rep-cache.db permissions when hotcopying (r1547877) + * mod_dav_svn: fix SVNCacheTextDeltas and SVNAdvertisV2Protocol directive + merging (r1548124) + * mod_dav_svn: always produce an error text even when text specifies + the default message to make diagnosing issues easier (r1553441) + * mod_dav_svn: fix some pool lifetime issues with error messages (r1553868) + * mod_dav_svn: avoid setting option headers multiple times (r1557103) + * fsfs: prevent some commits that could cause future corruption (r1560673) + * cache: fix premature eviction due to 64-bit underflows (r1567996 et al) + * svnserve: fix potential integer overflow in Cyrus SASL support (r1570434) + * bdb: fix potential integer overflow and underflow (r1570701) + * bdb: prevent silent propogation of some corruption (r1570778) + * svnadmin hotcopy: do not corrupt db/current contents when copying old + FSFS repos (r1603485) + * svnadmin hotcopy: don't produce broken copies when a concurrent pack + happens (r1605633) + * log: reduce memory consumption of '-v' (r1605195) + * mod_dav_svn: fix performance issue on Windows with named atomics + (r1611379) + * log: fix a segfault in handling changed paths (r1615364) + * mod_dav_svn: properly forward post-lock/post-unlock failures (r1622235) + * diff: fix handling of depth empty in added directories (r1622024) + * fix a segfault with corrupted changed path lists that try to add root + nodes (r1622944) + * svnadmin verify: report errors nicely rather than possibly aborting + (r1622955) + * svnlook propget: report transaction name rather than revision number in + errors if run with '-t' option (r1623317) + * svnadmin verify: prevent stack overflow conditions in corrupted + repositories (r1623398) + * fsfs upgrade: fix an issue that could block an upgraded format 1 or 2 + repository from being committed to (r1624011) + * fs backends: fix memory lifetime issue (r1632646) + * bdb: output correct checksum in error message about corruption (r1640707) + * fsfs: fix a pool lifetime error related to transaction local caches + (r1643139, 1643233) + * fsfs: avoid "random DAG walks" during checkout over ra_serf (r1645567) + * fsfs/bdb: reduce memory use during tree deletions (r1647820, r1655022) + * mod_authz_svn: fix unbounded memory use when SVNPathAuthz short_circuit + is used (r1647887) + * fsfs: reduce memory use when walking back in history (r1648230) + * dump: remove incorrect kind header on replaced nodes (issue #4553) + * dump: remove duplicate headers for replace-with-copy (issue #4552) + * mod_dav_svn: don't send XML-unsafe characters in svn:author + (issue #4415) + * dump: don't write broken dump files in some ambiguously encoded fsfs + repositories (issue #4554) + * mod_dav_svn: provide a more intuitive error message to the client when + trying to create a directory that already exists (issue #2295) + * fsfs: fix uninitialized memory use in lock/unlock code (r1657525) + * fix a segfault executing a pre-commit hook with legacy locks (r1657893) + * mod_dav_svn: do not ignore skel parsing errors (r1658168) + * fsfs: fix multiple reporting of the same lock (r1658482) + * fsfs: fix pool lifetime issue in lock handling (r1659314) + * mod_dav_svn: properly log assertions and malfuctions (r1660480) + * svnadmin load/dump: preserve deletion of svn:date from r0 (issue #4563) + * svnrdump: don't provide HEAD+1 as base revision when loading deletes + (r1664684) + * mod_dav_svn: improve error message sent with a 405 status code + (r1665195, r1666096, r1666379) + * make detection of invalid base revision on commit behave the same on + all RA layers (r1664664, r1664672, r1664674) + * mod_dav_svn: emit the first few log items as soon as they are available + (r1666965, r1667120) + * mod_dav_svn: prevent a tree walk on copy sources (issue #4351) + * fsfs: fix 'EOF found' error when reading repo (issue #4577) + * svnadmin freeze: unlock rep-cache.db as part of unfreezing + (r1679169, r1679287) + * fsfs: improve stability in the presence of power or network + disk failures during 'svnadmin pack' (r1683378) + * detect invalid svndiff data earlier (r1684077) + + - Client-side and server-side bugfixes: + * use less memory when retrieving extension from filename (r1548480) + * use more optimal code path with old txdelta v1 data (r1485480) + * windows: allow opening SQLite databases on long paths (r1564338) + * fix an out-of-bounds read in the delta combiner (r1569415) + * fix a number of cases of undefined behavior when passing invalid + arguments to memcpy() (r1632530, et al) + * windows: avoid a 12 second delay due to a retry loop in some error + conditions when opening a file (r1657583) + + - Other tool improvements and bugfixes: + * windows: add build-svn-deps-win.pl tool to build dependencies (r1467715) + * svnpubsub: add support for revprop changes (r1486463) + * svnpubsub: do not pass svn commands through shell (r148466, r1486467) + * svnpubsub: hooks exit with an error if they fail (r1486500, r1486597) + * svnpubsub: hooks use "--" to signal end of arguments (r1486513) + * mailer: properly encode mail headers per RFC2047 (r1487532) + * svnwcsub: add a pre-update hook, which can deny update (r1494542 et al) + * fsfs-stats: count file nodes that are added without history (r1519283) + * fsfs-stats: replaced by 'svnfsfs stats' (r1594860) + * fsfs-access-map: count empty reads and unnecessary seeks (r1523441) + * fsfs-access-map: generate scaled/rectangular heatmaps (r1505065) + * fsfs-access-map: deal with strace format issues (r1505065) + * fsfs-access-map: update to know about index files (r1505065) + * svnbench: renamed from svn-bench (r1659226) + * svnbench: add null-info command (r1532196) + * svnlook.py: made usable as a library by adding getter methods (r1541558) + * svnbench, svnraisetreeconflict, svnauthz, svn-rep-sharing-stats: More + consistent error reporting, following pattern of core command-line + programs (r1544194) + * which-error.py: allow which-error.py to be run from symlink (r1547977) + * bash_completion: add svnlook filesize command and options to svn cat, + info, and mergeinfo commands (r1569021) + * new '--conflict-style' option to standalone diff3 tool (r1591750) + * update standalone diff3 tool so it can be used with --diff-cmd + directly (r1591871, r1591876) + * bash_completion: support for auth command (r1596841) + * diff: support '-U' option (r1618618) + * svn-rep-sharing-stats: replaced by 'svnfsfs stats' (r1618861) + * add svn-vendor.py as an alternative to svn_load_dirs.pl that can + auto-detect renames and copies (r1623660) + * svnpredumpfilter.py: fix a scalability problem that made run time + increase greatly on large repositories (r1625674 et al) + * svnpredumpfilter.py: detect copies of copies and handle properly + (r1626182) + * bash_completion: add svnadmin delrevprop (r1631473) + * showchange.pl: removed, obsoleted by 'svn log --diff' (r1631686) + * bash_completion: add new trust options (r1660373) + * bash_completion: add '--pin-externals' (r1662250) + * bash_completion: stop offering deprecated options (r1662291) + * bash_completion: add '--show-item' and '--no-newline' (r1662622) + * svnbench: add null-blame command (r1673785, r1673803, r1674015) + * svnbench: install with default 'make install' (r1685085) + + Developer-visible changes: + - General: + * require Python 2.7+ for development and testing (r1691712, r1691713, r1692448) + * include symbolic names for error codes in maintainer mode (r1467643) + * include symbolic names for warning codes in maintainer mode (r1469855) + * support YouCompleteMe vim plugin (r1476374 et al) + * cache: add pretend_empty mode for maintainers (r1461689, et al) + * allow tests to be run with exclusive wc locks (r1496475) + * fix check for Microsoft C/C++ compiler (r1503148) + * improve windows build to use pre-built dependencies + * optimize ramdrive usage in the windows test runner (r1504511) + * SVN_CMDLINE_DISABLE_CRASH_HANDLER env var added for Windows (r1506507) + * gen-make.py: support Visual Studio 2013 by --vsnet-version=2013 (r1533907) + * windows: don't require APR source when building (r1534037, et al) + * don't compile SQLite amalgamation twice (r1536364) + * make C tests use same temp path as Python tests (r1536700) + * davautocheck: access log logs the r->filename now (r1538048) + * added test to detect duplicate SQL queries (r1538962) + * windows test runner: copy additional apr dlls (r1539300) + * support for debug logging that should be available in serf 1.4.0 (r1541561) + * OS X: fix build when Gnome is installed (r1541698) + * properly detect if expat is libexpat.lib or xml.lib on windows (r1541981) + * doc-clean target works properly with separate build dir (r1542303) + * don't break entire test run if cleaning temp directory failed but return + an error anyway (r1542817) + * windows tests: find java.exe via the sdk if not found via PATH (r1543876) + * fix davautocheck with httpd 2.3.x+ and worker/prefork MPMs (r1544302-3) + * add parallel mode for C tests (r1545334 et al) + * use --bin path for svnrdump when running Python tests (r1548706) + * remove unused --with-openssl option from configure (r1548714) + * tests: stop rewriting shared authz file for every sandbox (r1552064 et al) + * fix unnecessary aborts in maintainer mode on sqlite errors (r1536325) + * new --sqlite-logging option for C tests (r1560409) + * allow building with APR-2 (r1560586) + * remove support for ASM Zlib from Windows build system (r1560864) + * gen-make.py: new -D option (r1567046) + * improve how we fetch the version of Windows (r1568798, 1568806) + * move common code in python tests to library files to avoid side effects of + having tests depending on each other (r1570654) + * disable compiling on platforms where int is shorter than 32-bits and add + the SVN_ALLOW_SHORT_INTS compile definition to override (r1570882) + * disable building *.sbr files with Visual C++ 2010 or later (r1571020) + * require serf 1.3.4 (r1572261) + * require APR and APR-Util 1.3.x (r1572261) + * add mod_dontdothat to davautocheck.sh (r1572312) + * require Apache httpd 2.2.x (r1572339) + * support pkg-config for serf when using a prefix (r1572762) + * don't depend on stdbool.h and inttypes.h for utf8proc (r1573069 et al) + * avoid non-portable find extensions so the build works on Solaris (r1573780) + * Allow PARALLEL value to specify the number of threads to run tests with, + PARALLEL=1 means to use the default (r1573320) + * pkg-config support for libsvn_* libraries (issue #4435) + * binaries built on Mac OS X 10.6+ will not run on older versions (r1651549) + * fix random failure of Makefile-based parallel builds on Unix + when the amalgamated SQLite is being used (r1658357) + * C tests only run with ra_local to avoid duplicate testing (r1609477) + * allow skipping the C tests for any RA method (r1609489) + * new tools for benchmarking on Windows (r1610264) + * svnbench: no longer part of tools but main subversion (r1618860) + * improve detection for libtool (r1627276) + * check the runtime version of the fs_util library in the fs backends + (r1651567) + * properly initialize the src_kind value to avoid problems for other API + users during a copy (r1655723) + * try to improve reliability of applications that do not call + svn_dso_initialize2() right after apr_initialize() (r1659604) + * add svn-wc-db-tester tool for testing working copies (r1660874) + * fix bugs and performance issues using svn_wc_walk_entries3() (r1661110) + * support using Python 3 for building (r1661247) + * don't add -lstdc++ on FreeBSD 10 (r1662329) + * add build support for Visual Studio 2015 (r1663183, r1663184, r1689721 et al.) + * fix test failures when running from a directory whose name contains + characters that must be escaped when used in a URL. (r1664997) + * fix breakage of the serf ra session with svn_ra_get_dir2() and + svn_ra_get_log2(). (r1665213, r1665259, r1665609) + * resolve a race condition in some test suite cleanup code (r1683303) + * fix some tests on non-US default locale on Windows (r1684034) + * document the meaning of "XFAIL" for users building from source (r1683071) + + - API changes: + * new RA callbacks for managing ra_svn tunnels: + svn_ra_callbacks2_t::check_tunnel_func, + svn_ra_callbacks2_t::open_tunnel_func and + svn_ra_callbacks2_t::close_tunnel_func + * new API for retrieving info about a file system: svn_fs_info() + * new API svn_io_file_flush() that wraps apr_file_flush() + * new API svn_io_write_atomic(), that writes, sync and renames a file + * new API svn_compat_log_revprops_out_string() + * deprecate unused datatype svn_ra_get_latest_revnum_func_t + * new API svn_client_cleanup2() (r1496954 et al) + * new API svn_stringbuf_create_wrap() (r1502248) + * new API svn_io_file_aligned_seek() (r1502539) + * ra_svn: fix svn_ra_get_log*() to apply limit when server can't (r1503043) + * svn_client_commit6: notify which path prevents a mv commit (r1503662) + * new APIs svn_io_file_create_empty() and svn_io_file_create_bytes() + (r1505006) + * new API svn_ver_check_list2() (r1502267) + * new API svn_stringbuf_from_stream() (r1532193) + * svn_auth_get_platform_specific_client_providers() now includes ssl + providers (r1534153) + * change dav_svn_split_uri() repos_path argument (r1537812) + * new API svn_repos_fs_type() returns filesystem type (r1538585) + * svn_client__get_inheritable_props() clears wcroot_iprops when revision is + not valid (r1538602) + * SVN_VA_NULL: New macro which is null-pointer constant (r1536307) + * SVN_NEEDS_SENTINEL_NULL: New macro to mark functions that require final + NULL sentinel value, so compilers can warn when missing (r1543394) + * platform specific svn_auth_get_* functions are deprecated, use the + svn_auth_get_platform_specific_provider() function instead (r1543992) + * SVN_INT_ERR macro is deprecated; use svn_handle_error2() or + svn_cmdline_handle_exit_error() instead (r1544142) + * new API svn_client_cat3() allow disabling keyword expansion and retrieving + props (r1544182) + * svn_auth_first_credentials(): provides an error rather than crashing if + auth_baton is NULL (r1544320) + * svn_auth_set_parameter(): Do nothing if auth_baton is NULL (r1544320) + * new API svn_relpath_prefix which returns a relpath with a maximum number + of path components (r1545123, r1673282) + * svn_fs_initialize() is now threadsafe (r1546409) + * svn_checksum_kind_t has two new FNV-1a checksums (r1546699) + * svn_fs_lock: control characters are not allowed in lock tokens (r1547445) + * new API svn_wc_cleanup4() makes some functionality optional and adds + notifications (r1548075 et al) + * new API svn_client_info4() supports walking externals (r1550206 et al) + * new flag for svn_fs_begin_txn2() SVN_FS_TXN_CLIENT_DATE to allow client + to set the final svn:date (r1550228) + * new APIs for easier RA commits svn_client_mtcc_* (r1550758 et al) + * new API svn_ra_session_dup() (r1552324 et al) + * svn_ra_stat() now handles compatibility with 1.0-1.1 svnserve (r1552441) + * new error code SVN_ERR_COMPOSED_ERROR added to allow detection of + composed errors by API consumers (r1553266) + * new error code SVN_ERR_RA_DAV_PRECONDITION_FAILED (r1553668) + * new error code SVN_ERR_RA_CANNOT_CREATE_SESSION (r1554027) + * new API svn_fs_node_relation() (r1554800) + * SVN_EXPERIMENTAL to mark functions that might change in future (r1526012) + * fix bug in svn_client_get_merging_summary() with some params (r1532396) + * new error code SVN_ERR_XML_UNEXPECTED_ELEMENT (r1498938) + * extend stream API to also support incomplete reads (r1561688 et al) + * new API svn_wc_add_from_disk3() (r1563361) + * new API svn_client_revert3() to allow clearing changelists and to have + a metadata_only flag (r1568635, r1657026) + * svn_rangelist_inheritable2(): don't change inheritabilty of remaining + ranges (r1569731) + * svn_rangelist_inheritable2() and svn_mergeinfo_inheritable2(): fix a + pool lifetime issue (r1569764) + * new APIs to support cancelation during unified diff output and + allow the context size to be specified (r1570149 et al) + * APIs related to retrieving logs are now documented to be unlimited when + a negative value is passed for the limit (r1570330, 1570335) + * new APIs: svn_fs_props_different() and svn_fs_contents_different() + (r1572363, r1573111) + * expose SVN_CONFIG_AUTHN_* macros in public API (r1572640) + * add SVN_CONFIG_OPTION_SQLITE_TIMEOUT to allow SQLite busy timeout + to be configured by clients (r1592093) + * add new notification between transmitting deltas and finalizing + commit as svn_wc_notify_commit_finalizing (r1603388) + * svn_client_cat3() API no longer returns entry or WC props (r1603501) + * properly handle canonical paths in svn_io_start_cmd3() (r1604761) + * add SVN_FS_CONFIG_FSFS_BLOCK_READ to control FSFS format 7 block + read feature (r1604933) + * new API svn_cstring_skip_prefix() (r1612823) + * new API svn_diff_mem_string_output_merge3() (r1618599) + * extend svn_wc_info_t with conflicts2 (r1618643) + * new API svn_diff_mem_string_output_unified3() (r1618839) + * new API svn_diff_file_output_merge3() (r1618857) + * svn_fs_props_changed() and svn_fs_contents_changed() no longer return + false positives (r1618880) + * new API svn_wc_conflict_description2_dup() (r1618883) + * extend svn_wc_conflict_description2_t with prop_reject_abspath field + (r1619096) + * extend svn_wc_conflict_description2_t with property values as + svn_string_t's (r1619122) + * fix svn_client_import5() to use absolute paths (r1623974) + * fix a few cases of invalid filling of svn_client_commit_item3_t (r1623981) + * add SVN_FS_CONFIG_FSFS_SHARD_SIZE to allow creation of repositories with + a custom shard size (r1624512) + * new API svn_cmdline_create_auth_baton2 (r1630117) + * make svn_string_*() and svn_stringbuf_*() functions handle C strings + of NULL with 0 length (r1632530, et al) + * fix svn_stream_compressed() for streams without partial read support + (r1639626) + * do not segfault on svn_stream_read_full() or svn_stream_skip() are called + for a no-op stream created via svn_stream_create() (r1639637) + * add SVN_FS_CONFIG_FSFS_LOG_ADDRESSING to control logical addressing + feature of fsfs format 7 (r1640915) + * rename the 'parent_directory' parameter of + svn_wc_parse_externals_description3() to 'defining_directory' and improve + the documentation (r1642690) + * new API svn_repos_get_fs_build_parser5() (r1647563) + * SVN_VERSION_BODY changed so that it is embedded into libraries, ultimately + allowing SVN_VER_TAG constant to be modified by patches (r1651565) + * rename repos_url to repos_url_deocded argument to + svn_repos_get_commit_editor5() to clairfy usage (r1653609) + * make svn_io_set_file_read_only() and svn_io_remove_dir2() ignore + ENOTDIR when ignore_enoent argument is set so the behavior is consistent + across platforms (r1653680) + * make svn_ra_open4() return the documented error when a repository + should be opened in a different location (r1655648) + * no longer return an error when using svn_ra_get_lock() and the path does + not exist (r1656875) + * svn_string_dup() will accept a NULL pointer and return a NULL (r1657254) + * svn_ra_get_file_revs2() now handles SVN_INVALID_REVNUM as HEAD (r1660463) + * new API svn_error_quick_wrapf() (r1662668) + * new API svn_fs_node_has_props() (r1673170, r1673172, r1673692, r1673746) + * new API svn_repos_verify_fs3() (r1492651 ... r1687769) + + - Bindings: + * javahl: add support for the RA layer (r1494650 et al) + * javahl: add ignore-keywords knob to ISVNCLient.doExport (r1494936) + * javahl: improve performance of rev_range_vector_to_apr_array (r1496243) + * javahl: provide whole stack of errors from native exceptions (r1496353) + * javahl: new framework for manipulating in-memory config data (r1497746) + * javahl: add methods to set config change handler callback (r1497753) + * javahl: add inheritance info to JavaHL's RevisionRange type (r1499308) + * swig-rb: fixes to building on Windows (1505406 et al) + * libsvn_swig_*libraries now work as proper shared librares (r1506520 et al) + * swig-py: 'import svn.core.*' imports libsvn_subr public symbols (r1507860) + * javahl: expose the svn_rangelist operations (r1509025) + * javahl: new utility class SVNUtil (r1512354) + * javahl: serialize init of native library (r1519803) + * javahl: fix value truncation checks (r1519913) + * javahl: add ISVNClient.info which exposes svn_client_info4 (r1603481) + * javahl: include name of exception class in error messages (r1532117) + * javahl: simplify JNI environment handling (r1533804) + * javahl: Revsion.UNSPECIFIED added as alias to Revision.START (r1533928) + * javahl: do not require JUnit to build javahl; only to test (r1535603) + * javahl: update Action enum with new entries added in 1.9 (r1536319) + * javahl: expose node property validation utility (r1538133) + * javahl: new style JNI wrapper (r1539114 et al) + * javahl: new utility API to parse/unparse svn:externals (r1539130 et al) + * javahl: allow tests to be run from a RAM disk (r1539215 et al) + * javahl: expose and use the url member of svn_wc_notify_t (r1539601) + * javahl: expose a utility API to resolve relative externals (r1540921) + * javahl: new utility API for file content translation (r1542401) + * javahl: throw NullPointerException when sources is empty (r1543328) + * swig-pl: fix compilation against perl 5.18 on Windows (r1543980) + * javahl: implement streamed file contents translation (r1543985) + * javahl: enable warnings with javac (r1544163, r1544169) + * javahl: cleanup warnings (r1544578 et al) + * javahl: add common utilities for new-style map iterations (r1545925) + * javahl: add an API to get runtime version of native libs (r1545945) + * javahl: use default cache size instead of no cache (r1547248) + * swig-py: add typemap for hunks field of svn_patch_t (r1548379) + * javahl: don't ignore difference between NULL and empty changelist in + ISVNClient.getChangelists (r1553254) + * swig-pl: fix pool issues with setting dates as revisions (r1553822) + * swig-pl: make svn_auth_set_parameter() usable (r1553823) + * javahl: expose inheritiable property names (r1560338) + * javahl: fix bug in parsing single revision merginfo data (r1563140) + * javahl: create JVM crashlogs from svn malfunctions (r1563927, r1564252) + * javahl: avoid problems when building without NLS support (r1566578 et al) + * javahl: expose --alow-mixed-revisions merge option (r1567602) + * javahl: support incomplete reads from streams (r1569631) + * javahl: allow revert API to take a set of paths (r1571461) + * javahl: improve authentication callback (r1597758 et al) + * javahl: load (most) classes on demand (r1602822) + * javahl: expose confg file keys in JavaHL (r1604448) + * javahl: update ISVNClient.info, ISVnClient.cleanup and add + ISvnClient.vacuum (r1604449) + * javahl: update ISVNRepos.hotcopy (r1618894) + * swig-py: Add close to the core.Stream class (r1619077) + * javahl: add example clients that use the authn API (r1640533) + * swig-py: implement dump stream parser (r1642813) + * swig-pl: remove some unneded cleanup code that triggered a cleanup + failure on windows (r1643072) + * swig-pl: make cancel_func, cancel_baton parameter pairs work (r1648852) + * javahl: expose whitespace diff parameters to blame method (issue #4475) + * javahl: update ConflictDescriptor (r1655842) + * javahl: update FileRevision to provide textDelta (r1656911) + * swig-pl: install into prefix (r1658459) + * javahl: expose the metadataOnly option to copy support (r1661451) + * swig-py: add support for svn_fs_lock_many(), svn_fs_unlock_many(), + svn_repos_fs_lock_many() and svn_repos_fs_unlock_many() (r1662867) + * swig-py: fix support for svn_ra_lock() and svn_ra_unlock() (r1662891) + * javahl: allow java callbacks to throw errors back to the svn code + (r1664938, r1664939, r1664940, r1664978, r1664984) + * swig-pl: fix some stack memory problems (r1668618, 1671388) + * swig: warn on using SWIG 3.x as we have compatibility problems + with newer versions of SWIG (1675149) + * javahl: requires Java 1.6 (r1677003) + * javahl: on OS X use /usr/libexec/java_home to find the JDK (r1675774) + * javahl: allow compiling with a C++11 compiler (r1684412) + + Version 1.8.14 (5 Aug 2015, from /branches/1.8.x) http://svn.apache.org/repos/asf/subversion/tags/1.8.14 @@ -13,6 +809,9 @@ http://svn.apache.org/repos/asf/subversi of user and revision after 'svn up' (r1680242) - Server-side bugfixes: + * mod_authz_svn: do not leak information in mixed anonymous/authenticated + httpd (dav) configurations (CVE-2015-3184) + * do not leak paths that were hidden by path-based authz (CVE-2015-3187) * mod_dav_svn: do not ignore skel parsing errors (r1658168) * detect invalid svndiff data earlier (r1684077) * prevent possible repository corruption on power/disk failures (r1680819) @@ -863,10 +1662,17 @@ http://svn.apache.org/repos/asf/subversi * add missing API functions to JavaHL bindings (issue #4326) * fix some reference counting bugs in swig-py bindings (r1464899, r1466524) +Version 1.7.22 +(12 Aug 2015, from /branches/1.7.x) +http://svn.apache.org/repos/asf/subversion/tags/1.7.22 + + Developer-visible changes: + - General: + * fix the regression test suite which was broken in 1.7.21 (r1694012) Version 1.7.21 (5 Aug 2015, from /branches/1.7.x) -http://svn.apache.org/repos/asf/subversion/tags/1.8.21 +http://svn.apache.org/repos/asf/subversion/tags/1.7.21 User-visible changes: - Client-side bugfixes: @@ -875,6 +1681,9 @@ http://svn.apache.org/repos/asf/subversi non-deltas dumpfile (r1652182 et al.) - Server-side bugfixes: + * mod_authz_svn: do not leak information in mixed anonymous/authenticated + httpd (dav) configurations (CVE-2015-3184) + * do not leak paths that were hidden by path-based authz (CVE-2015-3187) * fix 'svnadmin recover' for pre-1.4 FSFS repositories (r1561419) Developer-visible changes: Modified: vendor/subversion/dist/COMMITTERS ============================================================================== --- vendor/subversion/dist/COMMITTERS Mon Oct 12 08:47:46 2015 (r289176) +++ vendor/subversion/dist/COMMITTERS Mon Oct 12 08:54:49 2015 (r289177) @@ -1,4 +1,4 @@ -The following people have commit access to the Subversion sources. +The following people have commit access to the Subversion sources. Note that this is not a full list of Subversion's authors, however -- for that, you'd need to look over the log messages to see all the patch contributors. @@ -58,6 +58,7 @@ Blanket commit access: stefan2 Stefan Fuhrmann jcorvel Johan Corveleyn trent Trent Nelson + kotkov Evgeny Kotkov [[END ACTIVE FULL COMMITTERS. LEAVE THIS LINE HERE; SCRIPTS LOOK FOR IT.]] @@ -96,6 +97,9 @@ Commit access for specific areas: jrvernooij Jelmer Vernooij (Python bindings) sage Sage LaTorra (Ctypes-Python b.) vmpn Vladimir Berezniker (JavaHL bindings) + rschupp Roderich Schupp (Swig bindings) + stilor Alexey Neyman (Python bindings, + svn-vendor.py) Packages: @@ -157,8 +161,10 @@ Commit access for specific areas: artagnon Ramkumar Ramachandra (svnrdump, svntest) arwin Arwin Arni (svn-bisect) joes Joe Schaefer (svnpubsub) - prabhugs Prabhu Gnana Sundar (verify-keep-going) - + humbedooh Daniel Gruno (svnpubsub) + prabhugs Prabhu Gnana Sundar (verify-keep-going) + schabi Markus Schaber (testsuite) + gbg Gabriela Gibson (gtest) Translation of message files: @@ -186,6 +192,7 @@ giorgio_valoti Giorgio Valoti (po: fr) marcelg Marcel Gosselin (po: fr) + mattiase Mattias Engdegård (po: sv) Experimental branches: Modified: vendor/subversion/dist/INSTALL ============================================================================== --- vendor/subversion/dist/INSTALL Mon Oct 12 08:47:46 2015 (r289176) +++ vendor/subversion/dist/INSTALL Mon Oct 12 08:54:49 2015 (r289177) @@ -3,7 +3,7 @@ A Quick Guide ====================================== -$LastChangedDate: 2013-09-27 06:57:44 +0000 (Fri, 27 Sep 2013) $ +$LastChangedDate: 2015-07-26 23:03:10 +0000 (Sun, 26 Jul 2015) $ Contents: @@ -15,7 +15,7 @@ Contents: D. Documentation II. INSTALLATION - A. Building from a Tarball or RPM + A. Building from a Tarball B. Building the Latest Source under Unix C. Building under Unix in Different Directories D. Installing from a Zip or Installer File under Windows @@ -123,7 +123,8 @@ I. INTRODUCTION *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@freebsd.org Mon Oct 12 08:55:55 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B0A569D2796; Mon, 12 Oct 2015 08:55:55 +0000 (UTC) (envelope-from peter@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5E78E1C81; Mon, 12 Oct 2015 08:55:55 +0000 (UTC) (envelope-from peter@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t9C8tsTo016552; Mon, 12 Oct 2015 08:55:54 GMT (envelope-from peter@FreeBSD.org) Received: (from peter@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9C8tsJp016551; Mon, 12 Oct 2015 08:55:54 GMT (envelope-from peter@FreeBSD.org) Message-Id: <201510120855.t9C8tsJp016551@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: peter set sender to peter@FreeBSD.org using -f From: Peter Wemm Date: Mon, 12 Oct 2015 08:55:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r289178 - vendor/subversion/subversion-1.9.2 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 " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Oct 2015 08:55:55 -0000 Author: peter Date: Mon Oct 12 08:55:54 2015 New Revision: 289178 URL: https://svnweb.freebsd.org/changeset/base/289178 Log: Tag subversion-1.9.2 import. Added: vendor/subversion/subversion-1.9.2/ - copied from r289177, vendor/subversion/dist/ From owner-svn-src-all@freebsd.org Mon Oct 12 09:53:57 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D8334A11E68; Mon, 12 Oct 2015 09:53:57 +0000 (UTC) (envelope-from peter@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3D09119CB; Mon, 12 Oct 2015 09:53:57 +0000 (UTC) (envelope-from peter@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t9C9rubY039109; Mon, 12 Oct 2015 09:53:56 GMT (envelope-from peter@FreeBSD.org) Received: (from peter@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9C9ruX4039104; Mon, 12 Oct 2015 09:53:56 GMT (envelope-from peter@FreeBSD.org) Message-Id: <201510120953.t9C9ruX4039104@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: peter set sender to peter@FreeBSD.org using -f From: Peter Wemm Date: Mon, 12 Oct 2015 09:53:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289180 - in head: contrib/subversion contrib/subversion/doc/programmer contrib/subversion/doc/user contrib/subversion/subversion contrib/subversion/subversion/include contrib/subversio... X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Oct 2015 09:53:57 -0000 Author: peter Date: Mon Oct 12 09:53:55 2015 New Revision: 289180 URL: https://svnweb.freebsd.org/changeset/base/289180 Log: Update from svn-1.8.14 to 1.9.2. Formal release notes are available: https://subversion.apache.org/docs/release-notes/1.9.html Of particular note, the client checkout format has *not* changed so upgrades should *not* be required. When reading a repository (file:// or running as a local server), an improved fsfs version 7 is available with significant performance improvements. An optional upgrade is possible to use the new features. Without the upgrade, this is fully read/write compatible with the version 6 fsfs as in svn-1.8. Relnotes: yes Added: head/contrib/subversion/.ycm_extra_conf.py - copied unchanged from r289178, vendor/subversion/dist/.ycm_extra_conf.py head/contrib/subversion/doc/programmer/gtest-guide.txt - copied unchanged from r289178, vendor/subversion/dist/doc/programmer/gtest-guide.txt head/contrib/subversion/subversion/include/private/svn_client_mtcc.h - copied unchanged from r289178, vendor/subversion/dist/subversion/include/private/svn_client_mtcc.h head/contrib/subversion/subversion/include/private/svn_fs_fs_private.h - copied unchanged from r289178, vendor/subversion/dist/subversion/include/private/svn_fs_fs_private.h head/contrib/subversion/subversion/include/private/svn_object_pool.h - copied unchanged from r289178, vendor/subversion/dist/subversion/include/private/svn_object_pool.h head/contrib/subversion/subversion/include/private/svn_packed_data.h - copied unchanged from r289178, vendor/subversion/dist/subversion/include/private/svn_packed_data.h head/contrib/subversion/subversion/include/private/svn_sorts_private.h - copied unchanged from r289178, vendor/subversion/dist/subversion/include/private/svn_sorts_private.h head/contrib/subversion/subversion/include/svn_x509.h - copied unchanged from r289178, vendor/subversion/dist/subversion/include/svn_x509.h head/contrib/subversion/subversion/libsvn_auth_gnome_keyring/libsvn_auth_gnome_keyring.pc.in - copied unchanged from r289178, vendor/subversion/dist/subversion/libsvn_auth_gnome_keyring/libsvn_auth_gnome_keyring.pc.in head/contrib/subversion/subversion/libsvn_auth_kwallet/libsvn_auth_kwallet.pc.in - copied unchanged from r289178, vendor/subversion/dist/subversion/libsvn_auth_kwallet/libsvn_auth_kwallet.pc.in head/contrib/subversion/subversion/libsvn_client/libsvn_client.pc.in - copied unchanged from r289178, vendor/subversion/dist/subversion/libsvn_client/libsvn_client.pc.in head/contrib/subversion/subversion/libsvn_client/mtcc.c - copied unchanged from r289178, vendor/subversion/dist/subversion/libsvn_client/mtcc.c head/contrib/subversion/subversion/libsvn_delta/libsvn_delta.pc.in - copied unchanged from r289178, vendor/subversion/dist/subversion/libsvn_delta/libsvn_delta.pc.in head/contrib/subversion/subversion/libsvn_diff/binary_diff.c - copied unchanged from r289178, vendor/subversion/dist/subversion/libsvn_diff/binary_diff.c head/contrib/subversion/subversion/libsvn_diff/libsvn_diff.pc.in - copied unchanged from r289178, vendor/subversion/dist/subversion/libsvn_diff/libsvn_diff.pc.in head/contrib/subversion/subversion/libsvn_fs/deprecated.c - copied unchanged from r289178, vendor/subversion/dist/subversion/libsvn_fs/deprecated.c head/contrib/subversion/subversion/libsvn_fs/libsvn_fs.pc.in - copied unchanged from r289178, vendor/subversion/dist/subversion/libsvn_fs/libsvn_fs.pc.in head/contrib/subversion/subversion/libsvn_fs_base/libsvn_fs_base.pc.in - copied unchanged from r289178, vendor/subversion/dist/subversion/libsvn_fs_base/libsvn_fs_base.pc.in head/contrib/subversion/subversion/libsvn_fs_fs/cached_data.c - copied unchanged from r289178, vendor/subversion/dist/subversion/libsvn_fs_fs/cached_data.c head/contrib/subversion/subversion/libsvn_fs_fs/cached_data.h - copied unchanged from r289178, vendor/subversion/dist/subversion/libsvn_fs_fs/cached_data.h head/contrib/subversion/subversion/libsvn_fs_fs/dump-index.c - copied unchanged from r289178, vendor/subversion/dist/subversion/libsvn_fs_fs/dump-index.c head/contrib/subversion/subversion/libsvn_fs_fs/hotcopy.c - copied unchanged from r289178, vendor/subversion/dist/subversion/libsvn_fs_fs/hotcopy.c head/contrib/subversion/subversion/libsvn_fs_fs/hotcopy.h - copied unchanged from r289178, vendor/subversion/dist/subversion/libsvn_fs_fs/hotcopy.h head/contrib/subversion/subversion/libsvn_fs_fs/index.c - copied unchanged from r289178, vendor/subversion/dist/subversion/libsvn_fs_fs/index.c head/contrib/subversion/subversion/libsvn_fs_fs/index.h - copied unchanged from r289178, vendor/subversion/dist/subversion/libsvn_fs_fs/index.h head/contrib/subversion/subversion/libsvn_fs_fs/libsvn_fs_fs.pc.in - copied unchanged from r289178, vendor/subversion/dist/subversion/libsvn_fs_fs/libsvn_fs_fs.pc.in head/contrib/subversion/subversion/libsvn_fs_fs/load-index.c - copied unchanged from r289178, vendor/subversion/dist/subversion/libsvn_fs_fs/load-index.c head/contrib/subversion/subversion/libsvn_fs_fs/low_level.c - copied unchanged from r289178, vendor/subversion/dist/subversion/libsvn_fs_fs/low_level.c head/contrib/subversion/subversion/libsvn_fs_fs/low_level.h - copied unchanged from r289178, vendor/subversion/dist/subversion/libsvn_fs_fs/low_level.h head/contrib/subversion/subversion/libsvn_fs_fs/pack.c - copied unchanged from r289178, vendor/subversion/dist/subversion/libsvn_fs_fs/pack.c head/contrib/subversion/subversion/libsvn_fs_fs/pack.h - copied unchanged from r289178, vendor/subversion/dist/subversion/libsvn_fs_fs/pack.h head/contrib/subversion/subversion/libsvn_fs_fs/recovery.c - copied unchanged from r289178, vendor/subversion/dist/subversion/libsvn_fs_fs/recovery.c head/contrib/subversion/subversion/libsvn_fs_fs/recovery.h - copied unchanged from r289178, vendor/subversion/dist/subversion/libsvn_fs_fs/recovery.h head/contrib/subversion/subversion/libsvn_fs_fs/rev_file.c - copied unchanged from r289178, vendor/subversion/dist/subversion/libsvn_fs_fs/rev_file.c head/contrib/subversion/subversion/libsvn_fs_fs/rev_file.h - copied unchanged from r289178, vendor/subversion/dist/subversion/libsvn_fs_fs/rev_file.h head/contrib/subversion/subversion/libsvn_fs_fs/revprops.c - copied unchanged from r289178, vendor/subversion/dist/subversion/libsvn_fs_fs/revprops.c head/contrib/subversion/subversion/libsvn_fs_fs/revprops.h - copied unchanged from r289178, vendor/subversion/dist/subversion/libsvn_fs_fs/revprops.h head/contrib/subversion/subversion/libsvn_fs_fs/stats.c - copied unchanged from r289178, vendor/subversion/dist/subversion/libsvn_fs_fs/stats.c head/contrib/subversion/subversion/libsvn_fs_fs/structure-indexes - copied unchanged from r289178, vendor/subversion/dist/subversion/libsvn_fs_fs/structure-indexes head/contrib/subversion/subversion/libsvn_fs_fs/transaction.c - copied unchanged from r289178, vendor/subversion/dist/subversion/libsvn_fs_fs/transaction.c head/contrib/subversion/subversion/libsvn_fs_fs/transaction.h - copied unchanged from r289178, vendor/subversion/dist/subversion/libsvn_fs_fs/transaction.h head/contrib/subversion/subversion/libsvn_fs_fs/util.c - copied unchanged from r289178, vendor/subversion/dist/subversion/libsvn_fs_fs/util.c head/contrib/subversion/subversion/libsvn_fs_fs/util.h - copied unchanged from r289178, vendor/subversion/dist/subversion/libsvn_fs_fs/util.h head/contrib/subversion/subversion/libsvn_fs_fs/verify.c - copied unchanged from r289178, vendor/subversion/dist/subversion/libsvn_fs_fs/verify.c head/contrib/subversion/subversion/libsvn_fs_fs/verify.h - copied unchanged from r289178, vendor/subversion/dist/subversion/libsvn_fs_fs/verify.h head/contrib/subversion/subversion/libsvn_fs_util/libsvn_fs_util.pc.in - copied unchanged from r289178, vendor/subversion/dist/subversion/libsvn_fs_util/libsvn_fs_util.pc.in head/contrib/subversion/subversion/libsvn_fs_x/ - copied from r289178, vendor/subversion/dist/subversion/libsvn_fs_x/ head/contrib/subversion/subversion/libsvn_ra/libsvn_ra.pc.in - copied unchanged from r289178, vendor/subversion/dist/subversion/libsvn_ra/libsvn_ra.pc.in head/contrib/subversion/subversion/libsvn_ra_local/libsvn_ra_local.pc.in - copied unchanged from r289178, vendor/subversion/dist/subversion/libsvn_ra_local/libsvn_ra_local.pc.in head/contrib/subversion/subversion/libsvn_ra_serf/eagain_bucket.c - copied unchanged from r289178, vendor/subversion/dist/subversion/libsvn_ra_serf/eagain_bucket.c head/contrib/subversion/subversion/libsvn_ra_serf/get_file.c - copied unchanged from r289178, vendor/subversion/dist/subversion/libsvn_ra_serf/get_file.c head/contrib/subversion/subversion/libsvn_ra_serf/get_lock.c - copied unchanged from r289178, vendor/subversion/dist/subversion/libsvn_ra_serf/get_lock.c head/contrib/subversion/subversion/libsvn_ra_serf/libsvn_ra_serf.pc.in - copied unchanged from r289178, vendor/subversion/dist/subversion/libsvn_ra_serf/libsvn_ra_serf.pc.in head/contrib/subversion/subversion/libsvn_ra_serf/lock.c - copied unchanged from r289178, vendor/subversion/dist/subversion/libsvn_ra_serf/lock.c head/contrib/subversion/subversion/libsvn_ra_serf/multistatus.c - copied unchanged from r289178, vendor/subversion/dist/subversion/libsvn_ra_serf/multistatus.c head/contrib/subversion/subversion/libsvn_ra_serf/stat.c - copied unchanged from r289178, vendor/subversion/dist/subversion/libsvn_ra_serf/stat.c head/contrib/subversion/subversion/libsvn_ra_svn/libsvn_ra_svn.pc.in - copied unchanged from r289178, vendor/subversion/dist/subversion/libsvn_ra_svn/libsvn_ra_svn.pc.in head/contrib/subversion/subversion/libsvn_repos/authz_pool.c - copied unchanged from r289178, vendor/subversion/dist/subversion/libsvn_repos/authz_pool.c head/contrib/subversion/subversion/libsvn_repos/config_pool.c - copied unchanged from r289178, vendor/subversion/dist/subversion/libsvn_repos/config_pool.c head/contrib/subversion/subversion/libsvn_repos/libsvn_repos.pc.in - copied unchanged from r289178, vendor/subversion/dist/subversion/libsvn_repos/libsvn_repos.pc.in head/contrib/subversion/subversion/libsvn_subr/bit_array.c - copied unchanged from r289178, vendor/subversion/dist/subversion/libsvn_subr/bit_array.c head/contrib/subversion/subversion/libsvn_subr/checksum.h - copied unchanged from r289178, vendor/subversion/dist/subversion/libsvn_subr/checksum.h head/contrib/subversion/subversion/libsvn_subr/compress.c - copied unchanged from r289178, vendor/subversion/dist/subversion/libsvn_subr/compress.c head/contrib/subversion/subversion/libsvn_subr/config_keys.inc - copied unchanged from r289178, vendor/subversion/dist/subversion/libsvn_subr/config_keys.inc head/contrib/subversion/subversion/libsvn_subr/errorcode.inc - copied unchanged from r289178, vendor/subversion/dist/subversion/libsvn_subr/errorcode.inc head/contrib/subversion/subversion/libsvn_subr/fnv1a.c - copied unchanged from r289178, vendor/subversion/dist/subversion/libsvn_subr/fnv1a.c head/contrib/subversion/subversion/libsvn_subr/fnv1a.h - copied unchanged from r289178, vendor/subversion/dist/subversion/libsvn_subr/fnv1a.h head/contrib/subversion/subversion/libsvn_subr/libsvn_subr.pc.in - copied unchanged from r289178, vendor/subversion/dist/subversion/libsvn_subr/libsvn_subr.pc.in head/contrib/subversion/subversion/libsvn_subr/object_pool.c - copied unchanged from r289178, vendor/subversion/dist/subversion/libsvn_subr/object_pool.c head/contrib/subversion/subversion/libsvn_subr/packed_data.c - copied unchanged from r289178, vendor/subversion/dist/subversion/libsvn_subr/packed_data.c head/contrib/subversion/subversion/libsvn_subr/prefix_string.c - copied unchanged from r289178, vendor/subversion/dist/subversion/libsvn_subr/prefix_string.c head/contrib/subversion/subversion/libsvn_subr/root_pools.c - copied unchanged from r289178, vendor/subversion/dist/subversion/libsvn_subr/root_pools.c head/contrib/subversion/subversion/libsvn_subr/utf8proc/ - copied from r289178, vendor/subversion/dist/subversion/libsvn_subr/utf8proc/ head/contrib/subversion/subversion/libsvn_subr/utf8proc.c - copied unchanged from r289178, vendor/subversion/dist/subversion/libsvn_subr/utf8proc.c head/contrib/subversion/subversion/libsvn_subr/x509.h - copied unchanged from r289178, vendor/subversion/dist/subversion/libsvn_subr/x509.h head/contrib/subversion/subversion/libsvn_subr/x509info.c - copied unchanged from r289178, vendor/subversion/dist/subversion/libsvn_subr/x509info.c head/contrib/subversion/subversion/libsvn_subr/x509parse.c - copied unchanged from r289178, vendor/subversion/dist/subversion/libsvn_subr/x509parse.c head/contrib/subversion/subversion/libsvn_wc/libsvn_wc.pc.in - copied unchanged from r289178, vendor/subversion/dist/subversion/libsvn_wc/libsvn_wc.pc.in head/contrib/subversion/subversion/svn/auth-cmd.c - copied unchanged from r289178, vendor/subversion/dist/subversion/svn/auth-cmd.c head/contrib/subversion/subversion/svn/cl-log.h - copied unchanged from r289178, vendor/subversion/dist/subversion/svn/cl-log.h head/contrib/subversion/subversion/svn/similarity.c - copied unchanged from r289178, vendor/subversion/dist/subversion/svn/similarity.c head/contrib/subversion/subversion/svnbench/ - copied from r289178, vendor/subversion/dist/subversion/svnbench/ head/contrib/subversion/subversion/svnfsfs/ - copied from r289178, vendor/subversion/dist/subversion/svnfsfs/ head/contrib/subversion/subversion/svnserve/logger.c - copied unchanged from r289178, vendor/subversion/dist/subversion/svnserve/logger.c head/contrib/subversion/subversion/svnserve/logger.h - copied unchanged from r289178, vendor/subversion/dist/subversion/svnserve/logger.h head/usr.bin/svn/lib/libsvn_fs_x/ - copied from r289178, head/usr.bin/svn/lib/libsvn_fs_fs/ head/usr.bin/svn/svnbench/ - copied from r289178, head/usr.bin/svn/svn/ head/usr.bin/svn/svnfsfs/ - copied from r289178, head/usr.bin/svn/svnadmin/ Deleted: head/contrib/subversion/subversion/include/private/svn_named_atomic.h head/contrib/subversion/subversion/include/private/svn_pseudo_md5.h head/contrib/subversion/subversion/libsvn_fs_fs/key-gen.c head/contrib/subversion/subversion/libsvn_fs_fs/key-gen.h head/contrib/subversion/subversion/libsvn_ra_serf/locks.c head/contrib/subversion/subversion/libsvn_subr/md5.h head/contrib/subversion/subversion/libsvn_subr/named_atomic.c head/contrib/subversion/subversion/libsvn_subr/pseudo_md5.c head/contrib/subversion/subversion/libsvn_subr/sha1.c head/contrib/subversion/subversion/libsvn_subr/sha1.h head/contrib/subversion/subversion/svn/client_errors.h Modified: head/contrib/subversion/CHANGES head/contrib/subversion/COMMITTERS head/contrib/subversion/INSTALL head/contrib/subversion/LICENSE head/contrib/subversion/Makefile.in head/contrib/subversion/NOTICE head/contrib/subversion/autogen.sh head/contrib/subversion/build-outputs.mk head/contrib/subversion/build.conf head/contrib/subversion/configure head/contrib/subversion/configure.ac head/contrib/subversion/doc/user/svn-best-practices.html head/contrib/subversion/gen-make.py head/contrib/subversion/get-deps.sh head/contrib/subversion/subversion/include/mod_dav_svn.h head/contrib/subversion/subversion/include/private/svn_atomic.h head/contrib/subversion/subversion/include/private/svn_auth_private.h head/contrib/subversion/subversion/include/private/svn_cache.h head/contrib/subversion/subversion/include/private/svn_client_private.h head/contrib/subversion/subversion/include/private/svn_cmdline_private.h head/contrib/subversion/subversion/include/private/svn_delta_private.h head/contrib/subversion/subversion/include/private/svn_dep_compat.h head/contrib/subversion/subversion/include/private/svn_diff_private.h head/contrib/subversion/subversion/include/private/svn_diff_tree.h head/contrib/subversion/subversion/include/private/svn_editor.h head/contrib/subversion/subversion/include/private/svn_error_private.h head/contrib/subversion/subversion/include/private/svn_fs_private.h head/contrib/subversion/subversion/include/private/svn_fs_util.h head/contrib/subversion/subversion/include/private/svn_io_private.h head/contrib/subversion/subversion/include/private/svn_log.h head/contrib/subversion/subversion/include/private/svn_magic.h head/contrib/subversion/subversion/include/private/svn_mergeinfo_private.h head/contrib/subversion/subversion/include/private/svn_mutex.h head/contrib/subversion/subversion/include/private/svn_opt_private.h head/contrib/subversion/subversion/include/private/svn_ra_private.h head/contrib/subversion/subversion/include/private/svn_ra_svn_private.h head/contrib/subversion/subversion/include/private/svn_repos_private.h head/contrib/subversion/subversion/include/private/svn_sqlite.h head/contrib/subversion/subversion/include/private/svn_string_private.h head/contrib/subversion/subversion/include/private/svn_subr_private.h head/contrib/subversion/subversion/include/private/svn_temp_serializer.h head/contrib/subversion/subversion/include/private/svn_utf_private.h head/contrib/subversion/subversion/include/private/svn_wc_private.h head/contrib/subversion/subversion/include/svn_auth.h head/contrib/subversion/subversion/include/svn_cache_config.h head/contrib/subversion/subversion/include/svn_checksum.h head/contrib/subversion/subversion/include/svn_client.h head/contrib/subversion/subversion/include/svn_cmdline.h head/contrib/subversion/subversion/include/svn_compat.h head/contrib/subversion/subversion/include/svn_config.h head/contrib/subversion/subversion/include/svn_delta.h head/contrib/subversion/subversion/include/svn_diff.h head/contrib/subversion/subversion/include/svn_dirent_uri.h head/contrib/subversion/subversion/include/svn_error.h head/contrib/subversion/subversion/include/svn_error_codes.h head/contrib/subversion/subversion/include/svn_fs.h head/contrib/subversion/subversion/include/svn_hash.h head/contrib/subversion/subversion/include/svn_io.h head/contrib/subversion/subversion/include/svn_iter.h head/contrib/subversion/subversion/include/svn_mergeinfo.h head/contrib/subversion/subversion/include/svn_opt.h head/contrib/subversion/subversion/include/svn_path.h head/contrib/subversion/subversion/include/svn_props.h head/contrib/subversion/subversion/include/svn_ra.h head/contrib/subversion/subversion/include/svn_ra_svn.h head/contrib/subversion/subversion/include/svn_repos.h head/contrib/subversion/subversion/include/svn_sorts.h head/contrib/subversion/subversion/include/svn_string.h head/contrib/subversion/subversion/include/svn_types.h head/contrib/subversion/subversion/include/svn_version.h head/contrib/subversion/subversion/include/svn_wc.h head/contrib/subversion/subversion/include/svn_xml.h head/contrib/subversion/subversion/libsvn_auth_kwallet/kwallet.cpp head/contrib/subversion/subversion/libsvn_client/add.c head/contrib/subversion/subversion/libsvn_client/blame.c head/contrib/subversion/subversion/libsvn_client/cat.c head/contrib/subversion/subversion/libsvn_client/checkout.c head/contrib/subversion/subversion/libsvn_client/cleanup.c head/contrib/subversion/subversion/libsvn_client/client.h head/contrib/subversion/subversion/libsvn_client/cmdline.c head/contrib/subversion/subversion/libsvn_client/commit.c head/contrib/subversion/subversion/libsvn_client/commit_util.c head/contrib/subversion/subversion/libsvn_client/compat_providers.c head/contrib/subversion/subversion/libsvn_client/copy.c head/contrib/subversion/subversion/libsvn_client/copy_foreign.c head/contrib/subversion/subversion/libsvn_client/ctx.c head/contrib/subversion/subversion/libsvn_client/delete.c head/contrib/subversion/subversion/libsvn_client/deprecated.c head/contrib/subversion/subversion/libsvn_client/diff.c head/contrib/subversion/subversion/libsvn_client/diff_local.c head/contrib/subversion/subversion/libsvn_client/diff_summarize.c head/contrib/subversion/subversion/libsvn_client/export.c head/contrib/subversion/subversion/libsvn_client/externals.c head/contrib/subversion/subversion/libsvn_client/import.c head/contrib/subversion/subversion/libsvn_client/info.c head/contrib/subversion/subversion/libsvn_client/iprops.c head/contrib/subversion/subversion/libsvn_client/list.c head/contrib/subversion/subversion/libsvn_client/locking_commands.c head/contrib/subversion/subversion/libsvn_client/log.c head/contrib/subversion/subversion/libsvn_client/merge.c head/contrib/subversion/subversion/libsvn_client/mergeinfo.c head/contrib/subversion/subversion/libsvn_client/mergeinfo.h head/contrib/subversion/subversion/libsvn_client/patch.c head/contrib/subversion/subversion/libsvn_client/prop_commands.c head/contrib/subversion/subversion/libsvn_client/ra.c head/contrib/subversion/subversion/libsvn_client/relocate.c head/contrib/subversion/subversion/libsvn_client/repos_diff.c head/contrib/subversion/subversion/libsvn_client/resolved.c head/contrib/subversion/subversion/libsvn_client/revert.c head/contrib/subversion/subversion/libsvn_client/revisions.c head/contrib/subversion/subversion/libsvn_client/status.c head/contrib/subversion/subversion/libsvn_client/switch.c head/contrib/subversion/subversion/libsvn_client/update.c head/contrib/subversion/subversion/libsvn_client/upgrade.c head/contrib/subversion/subversion/libsvn_client/util.c head/contrib/subversion/subversion/libsvn_delta/compat.c head/contrib/subversion/subversion/libsvn_delta/compose_delta.c head/contrib/subversion/subversion/libsvn_delta/debug_editor.c head/contrib/subversion/subversion/libsvn_delta/debug_editor.h head/contrib/subversion/subversion/libsvn_delta/editor.c head/contrib/subversion/subversion/libsvn_delta/path_driver.c head/contrib/subversion/subversion/libsvn_delta/svndiff.c head/contrib/subversion/subversion/libsvn_delta/text_delta.c head/contrib/subversion/subversion/libsvn_delta/xdelta.c head/contrib/subversion/subversion/libsvn_diff/deprecated.c head/contrib/subversion/subversion/libsvn_diff/diff4.c head/contrib/subversion/subversion/libsvn_diff/diff_file.c head/contrib/subversion/subversion/libsvn_diff/diff_memory.c head/contrib/subversion/subversion/libsvn_diff/lcs.c head/contrib/subversion/subversion/libsvn_diff/parse-diff.c head/contrib/subversion/subversion/libsvn_diff/util.c head/contrib/subversion/subversion/libsvn_fs/access.c head/contrib/subversion/subversion/libsvn_fs/editor.c head/contrib/subversion/subversion/libsvn_fs/fs-loader.c head/contrib/subversion/subversion/libsvn_fs/fs-loader.h head/contrib/subversion/subversion/libsvn_fs_base/bdb/changes-table.c head/contrib/subversion/subversion/libsvn_fs_base/bdb/locks-table.c head/contrib/subversion/subversion/libsvn_fs_base/bdb/strings-table.c head/contrib/subversion/subversion/libsvn_fs_base/dag.c head/contrib/subversion/subversion/libsvn_fs_base/dag.h head/contrib/subversion/subversion/libsvn_fs_base/fs.c head/contrib/subversion/subversion/libsvn_fs_base/fs.h head/contrib/subversion/subversion/libsvn_fs_base/id.c head/contrib/subversion/subversion/libsvn_fs_base/id.h head/contrib/subversion/subversion/libsvn_fs_base/key-gen.c head/contrib/subversion/subversion/libsvn_fs_base/key-gen.h head/contrib/subversion/subversion/libsvn_fs_base/lock.c head/contrib/subversion/subversion/libsvn_fs_base/lock.h head/contrib/subversion/subversion/libsvn_fs_base/reps-strings.c head/contrib/subversion/subversion/libsvn_fs_base/revs-txns.c head/contrib/subversion/subversion/libsvn_fs_base/tree.c head/contrib/subversion/subversion/libsvn_fs_fs/caching.c head/contrib/subversion/subversion/libsvn_fs_fs/dag.c head/contrib/subversion/subversion/libsvn_fs_fs/dag.h head/contrib/subversion/subversion/libsvn_fs_fs/fs.c head/contrib/subversion/subversion/libsvn_fs_fs/fs.h head/contrib/subversion/subversion/libsvn_fs_fs/fs_fs.c head/contrib/subversion/subversion/libsvn_fs_fs/fs_fs.h head/contrib/subversion/subversion/libsvn_fs_fs/id.c head/contrib/subversion/subversion/libsvn_fs_fs/id.h head/contrib/subversion/subversion/libsvn_fs_fs/lock.c head/contrib/subversion/subversion/libsvn_fs_fs/lock.h head/contrib/subversion/subversion/libsvn_fs_fs/rep-cache-db.h head/contrib/subversion/subversion/libsvn_fs_fs/rep-cache-db.sql head/contrib/subversion/subversion/libsvn_fs_fs/rep-cache.c head/contrib/subversion/subversion/libsvn_fs_fs/rep-cache.h head/contrib/subversion/subversion/libsvn_fs_fs/structure head/contrib/subversion/subversion/libsvn_fs_fs/temp_serializer.c head/contrib/subversion/subversion/libsvn_fs_fs/temp_serializer.h head/contrib/subversion/subversion/libsvn_fs_fs/tree.c head/contrib/subversion/subversion/libsvn_fs_fs/tree.h head/contrib/subversion/subversion/libsvn_fs_util/fs-util.c head/contrib/subversion/subversion/libsvn_ra/compat.c head/contrib/subversion/subversion/libsvn_ra/ra_loader.c head/contrib/subversion/subversion/libsvn_ra/ra_loader.h head/contrib/subversion/subversion/libsvn_ra/wrapper_template.h head/contrib/subversion/subversion/libsvn_ra_local/ra_local.h head/contrib/subversion/subversion/libsvn_ra_local/ra_plugin.c head/contrib/subversion/subversion/libsvn_ra_local/split_url.c head/contrib/subversion/subversion/libsvn_ra_serf/README head/contrib/subversion/subversion/libsvn_ra_serf/blame.c head/contrib/subversion/subversion/libsvn_ra_serf/blncache.c head/contrib/subversion/subversion/libsvn_ra_serf/blncache.h head/contrib/subversion/subversion/libsvn_ra_serf/commit.c head/contrib/subversion/subversion/libsvn_ra_serf/get_deleted_rev.c head/contrib/subversion/subversion/libsvn_ra_serf/getdate.c head/contrib/subversion/subversion/libsvn_ra_serf/getlocations.c head/contrib/subversion/subversion/libsvn_ra_serf/getlocationsegments.c head/contrib/subversion/subversion/libsvn_ra_serf/getlocks.c head/contrib/subversion/subversion/libsvn_ra_serf/inherited_props.c head/contrib/subversion/subversion/libsvn_ra_serf/log.c head/contrib/subversion/subversion/libsvn_ra_serf/merge.c head/contrib/subversion/subversion/libsvn_ra_serf/mergeinfo.c head/contrib/subversion/subversion/libsvn_ra_serf/options.c head/contrib/subversion/subversion/libsvn_ra_serf/property.c head/contrib/subversion/subversion/libsvn_ra_serf/ra_serf.h head/contrib/subversion/subversion/libsvn_ra_serf/replay.c head/contrib/subversion/subversion/libsvn_ra_serf/serf.c head/contrib/subversion/subversion/libsvn_ra_serf/update.c head/contrib/subversion/subversion/libsvn_ra_serf/util.c head/contrib/subversion/subversion/libsvn_ra_serf/util_error.c head/contrib/subversion/subversion/libsvn_ra_serf/xml.c head/contrib/subversion/subversion/libsvn_ra_svn/client.c head/contrib/subversion/subversion/libsvn_ra_svn/cram.c head/contrib/subversion/subversion/libsvn_ra_svn/cyrus_auth.c head/contrib/subversion/subversion/libsvn_ra_svn/deprecated.c head/contrib/subversion/subversion/libsvn_ra_svn/editorp.c head/contrib/subversion/subversion/libsvn_ra_svn/internal_auth.c head/contrib/subversion/subversion/libsvn_ra_svn/marshal.c head/contrib/subversion/subversion/libsvn_ra_svn/protocol head/contrib/subversion/subversion/libsvn_ra_svn/ra_svn.h head/contrib/subversion/subversion/libsvn_ra_svn/streams.c head/contrib/subversion/subversion/libsvn_repos/authz.c head/contrib/subversion/subversion/libsvn_repos/commit.c head/contrib/subversion/subversion/libsvn_repos/delta.c head/contrib/subversion/subversion/libsvn_repos/deprecated.c head/contrib/subversion/subversion/libsvn_repos/dump.c head/contrib/subversion/subversion/libsvn_repos/fs-wrap.c head/contrib/subversion/subversion/libsvn_repos/hooks.c head/contrib/subversion/subversion/libsvn_repos/load-fs-vtable.c head/contrib/subversion/subversion/libsvn_repos/load.c head/contrib/subversion/subversion/libsvn_repos/log.c head/contrib/subversion/subversion/libsvn_repos/replay.c head/contrib/subversion/subversion/libsvn_repos/reporter.c head/contrib/subversion/subversion/libsvn_repos/repos.c head/contrib/subversion/subversion/libsvn_repos/repos.h head/contrib/subversion/subversion/libsvn_repos/rev_hunt.c head/contrib/subversion/subversion/libsvn_subr/adler32.c head/contrib/subversion/subversion/libsvn_subr/auth.c head/contrib/subversion/subversion/libsvn_subr/auth.h head/contrib/subversion/subversion/libsvn_subr/cache-inprocess.c head/contrib/subversion/subversion/libsvn_subr/cache-membuffer.c head/contrib/subversion/subversion/libsvn_subr/cache-memcache.c head/contrib/subversion/subversion/libsvn_subr/cache.c head/contrib/subversion/subversion/libsvn_subr/cache.h head/contrib/subversion/subversion/libsvn_subr/cache_config.c head/contrib/subversion/subversion/libsvn_subr/checksum.c head/contrib/subversion/subversion/libsvn_subr/cmdline.c head/contrib/subversion/subversion/libsvn_subr/compat.c head/contrib/subversion/subversion/libsvn_subr/config.c head/contrib/subversion/subversion/libsvn_subr/config_auth.c head/contrib/subversion/subversion/libsvn_subr/config_file.c head/contrib/subversion/subversion/libsvn_subr/config_impl.h head/contrib/subversion/subversion/libsvn_subr/config_win.c head/contrib/subversion/subversion/libsvn_subr/ctype.c head/contrib/subversion/subversion/libsvn_subr/debug.c head/contrib/subversion/subversion/libsvn_subr/deprecated.c head/contrib/subversion/subversion/libsvn_subr/dirent_uri.c head/contrib/subversion/subversion/libsvn_subr/dso.c head/contrib/subversion/subversion/libsvn_subr/eol.c head/contrib/subversion/subversion/libsvn_subr/error.c head/contrib/subversion/subversion/libsvn_subr/gpg_agent.c head/contrib/subversion/subversion/libsvn_subr/hash.c head/contrib/subversion/subversion/libsvn_subr/internal_statements.h head/contrib/subversion/subversion/libsvn_subr/io.c head/contrib/subversion/subversion/libsvn_subr/iter.c head/contrib/subversion/subversion/libsvn_subr/log.c head/contrib/subversion/subversion/libsvn_subr/macos_keychain.c head/contrib/subversion/subversion/libsvn_subr/magic.c head/contrib/subversion/subversion/libsvn_subr/md5.c head/contrib/subversion/subversion/libsvn_subr/mergeinfo.c head/contrib/subversion/subversion/libsvn_subr/mutex.c head/contrib/subversion/subversion/libsvn_subr/nls.c head/contrib/subversion/subversion/libsvn_subr/opt.c head/contrib/subversion/subversion/libsvn_subr/path.c head/contrib/subversion/subversion/libsvn_subr/pool.c head/contrib/subversion/subversion/libsvn_subr/prompt.c head/contrib/subversion/subversion/libsvn_subr/simple_providers.c head/contrib/subversion/subversion/libsvn_subr/sorts.c head/contrib/subversion/subversion/libsvn_subr/spillbuf.c head/contrib/subversion/subversion/libsvn_subr/sqlite.c head/contrib/subversion/subversion/libsvn_subr/sqlite3wrapper.c head/contrib/subversion/subversion/libsvn_subr/ssl_client_cert_providers.c head/contrib/subversion/subversion/libsvn_subr/ssl_client_cert_pw_providers.c head/contrib/subversion/subversion/libsvn_subr/ssl_server_trust_providers.c head/contrib/subversion/subversion/libsvn_subr/stream.c head/contrib/subversion/subversion/libsvn_subr/string.c head/contrib/subversion/subversion/libsvn_subr/subst.c head/contrib/subversion/subversion/libsvn_subr/sysinfo.c head/contrib/subversion/subversion/libsvn_subr/sysinfo.h head/contrib/subversion/subversion/libsvn_subr/temp_serializer.c head/contrib/subversion/subversion/libsvn_subr/time.c head/contrib/subversion/subversion/libsvn_subr/types.c head/contrib/subversion/subversion/libsvn_subr/username_providers.c head/contrib/subversion/subversion/libsvn_subr/utf.c head/contrib/subversion/subversion/libsvn_subr/utf_validate.c head/contrib/subversion/subversion/libsvn_subr/utf_width.c head/contrib/subversion/subversion/libsvn_subr/version.c head/contrib/subversion/subversion/libsvn_subr/win32_crashrpt.c head/contrib/subversion/subversion/libsvn_subr/win32_crypto.c head/contrib/subversion/subversion/libsvn_subr/win32_xlate.c head/contrib/subversion/subversion/libsvn_subr/win32_xlate.h head/contrib/subversion/subversion/libsvn_subr/xml.c head/contrib/subversion/subversion/libsvn_wc/adm_crawler.c head/contrib/subversion/subversion/libsvn_wc/adm_files.c head/contrib/subversion/subversion/libsvn_wc/adm_files.h head/contrib/subversion/subversion/libsvn_wc/adm_ops.c head/contrib/subversion/subversion/libsvn_wc/cleanup.c head/contrib/subversion/subversion/libsvn_wc/conflicts.c head/contrib/subversion/subversion/libsvn_wc/conflicts.h head/contrib/subversion/subversion/libsvn_wc/copy.c head/contrib/subversion/subversion/libsvn_wc/crop.c head/contrib/subversion/subversion/libsvn_wc/delete.c head/contrib/subversion/subversion/libsvn_wc/deprecated.c head/contrib/subversion/subversion/libsvn_wc/diff.h head/contrib/subversion/subversion/libsvn_wc/diff_editor.c head/contrib/subversion/subversion/libsvn_wc/diff_local.c head/contrib/subversion/subversion/libsvn_wc/entries.c head/contrib/subversion/subversion/libsvn_wc/externals.c head/contrib/subversion/subversion/libsvn_wc/info.c head/contrib/subversion/subversion/libsvn_wc/lock.c head/contrib/subversion/subversion/libsvn_wc/merge.c head/contrib/subversion/subversion/libsvn_wc/node.c head/contrib/subversion/subversion/libsvn_wc/old-and-busted.c head/contrib/subversion/subversion/libsvn_wc/props.c head/contrib/subversion/subversion/libsvn_wc/props.h head/contrib/subversion/subversion/libsvn_wc/questions.c head/contrib/subversion/subversion/libsvn_wc/relocate.c head/contrib/subversion/subversion/libsvn_wc/revert.c head/contrib/subversion/subversion/libsvn_wc/revision_status.c head/contrib/subversion/subversion/libsvn_wc/status.c head/contrib/subversion/subversion/libsvn_wc/token-map.h head/contrib/subversion/subversion/libsvn_wc/translate.c head/contrib/subversion/subversion/libsvn_wc/tree_conflicts.c head/contrib/subversion/subversion/libsvn_wc/update_editor.c head/contrib/subversion/subversion/libsvn_wc/upgrade.c head/contrib/subversion/subversion/libsvn_wc/util.c head/contrib/subversion/subversion/libsvn_wc/wc-checks.h head/contrib/subversion/subversion/libsvn_wc/wc-checks.sql head/contrib/subversion/subversion/libsvn_wc/wc-metadata.h head/contrib/subversion/subversion/libsvn_wc/wc-metadata.sql head/contrib/subversion/subversion/libsvn_wc/wc-queries.h head/contrib/subversion/subversion/libsvn_wc/wc-queries.sql head/contrib/subversion/subversion/libsvn_wc/wc.h head/contrib/subversion/subversion/libsvn_wc/wc_db.c head/contrib/subversion/subversion/libsvn_wc/wc_db.h head/contrib/subversion/subversion/libsvn_wc/wc_db_pristine.c head/contrib/subversion/subversion/libsvn_wc/wc_db_private.h head/contrib/subversion/subversion/libsvn_wc/wc_db_update_move.c head/contrib/subversion/subversion/libsvn_wc/wc_db_util.c head/contrib/subversion/subversion/libsvn_wc/wc_db_wcroot.c head/contrib/subversion/subversion/libsvn_wc/workqueue.c head/contrib/subversion/subversion/libsvn_wc/workqueue.h head/contrib/subversion/subversion/svn/add-cmd.c head/contrib/subversion/subversion/svn/blame-cmd.c head/contrib/subversion/subversion/svn/cat-cmd.c head/contrib/subversion/subversion/svn/changelist-cmd.c head/contrib/subversion/subversion/svn/checkout-cmd.c head/contrib/subversion/subversion/svn/cl-conflicts.c head/contrib/subversion/subversion/svn/cl-conflicts.h head/contrib/subversion/subversion/svn/cl.h head/contrib/subversion/subversion/svn/cleanup-cmd.c head/contrib/subversion/subversion/svn/commit-cmd.c head/contrib/subversion/subversion/svn/conflict-callbacks.c head/contrib/subversion/subversion/svn/copy-cmd.c head/contrib/subversion/subversion/svn/diff-cmd.c head/contrib/subversion/subversion/svn/export-cmd.c head/contrib/subversion/subversion/svn/file-merge.c head/contrib/subversion/subversion/svn/help-cmd.c head/contrib/subversion/subversion/svn/info-cmd.c head/contrib/subversion/subversion/svn/list-cmd.c head/contrib/subversion/subversion/svn/log-cmd.c head/contrib/subversion/subversion/svn/merge-cmd.c head/contrib/subversion/subversion/svn/mergeinfo-cmd.c head/contrib/subversion/subversion/svn/notify.c head/contrib/subversion/subversion/svn/propget-cmd.c head/contrib/subversion/subversion/svn/proplist-cmd.c head/contrib/subversion/subversion/svn/props.c head/contrib/subversion/subversion/svn/resolve-cmd.c head/contrib/subversion/subversion/svn/revert-cmd.c head/contrib/subversion/subversion/svn/status-cmd.c head/contrib/subversion/subversion/svn/status.c head/contrib/subversion/subversion/svn/svn.c head/contrib/subversion/subversion/svn/util.c head/contrib/subversion/subversion/svn_private_config.h.in head/contrib/subversion/subversion/svn_private_config.hw head/contrib/subversion/subversion/svnadmin/svnadmin.c head/contrib/subversion/subversion/svndumpfilter/svndumpfilter.c head/contrib/subversion/subversion/svnlook/svnlook.c head/contrib/subversion/subversion/svnmucc/svnmucc.c head/contrib/subversion/subversion/svnrdump/dump_editor.c head/contrib/subversion/subversion/svnrdump/load_editor.c head/contrib/subversion/subversion/svnrdump/svnrdump.c head/contrib/subversion/subversion/svnrdump/svnrdump.h head/contrib/subversion/subversion/svnrdump/util.c head/contrib/subversion/subversion/svnserve/cyrus_auth.c head/contrib/subversion/subversion/svnserve/serve.c head/contrib/subversion/subversion/svnserve/server.h head/contrib/subversion/subversion/svnserve/svnserve.c head/contrib/subversion/subversion/svnsync/svnsync.c head/contrib/subversion/subversion/svnsync/sync.c head/contrib/subversion/subversion/svnversion/svnversion.c head/contrib/subversion/win-tests.py head/usr.bin/svn/Makefile head/usr.bin/svn/Makefile.inc head/usr.bin/svn/lib/Makefile head/usr.bin/svn/lib/libsvn_client/Makefile head/usr.bin/svn/lib/libsvn_diff/Makefile head/usr.bin/svn/lib/libsvn_fs/Makefile head/usr.bin/svn/lib/libsvn_fs_fs/Makefile head/usr.bin/svn/lib/libsvn_fs_x/Makefile head/usr.bin/svn/lib/libsvn_ra_serf/Makefile head/usr.bin/svn/lib/libsvn_repos/Makefile head/usr.bin/svn/lib/libsvn_subr/Makefile head/usr.bin/svn/svn/Makefile head/usr.bin/svn/svn_private_config.h head/usr.bin/svn/svnadmin/Makefile head/usr.bin/svn/svnbench/Makefile head/usr.bin/svn/svndumpfilter/Makefile head/usr.bin/svn/svnfsfs/Makefile head/usr.bin/svn/svnlook/Makefile head/usr.bin/svn/svnmucc/Makefile head/usr.bin/svn/svnrdump/Makefile head/usr.bin/svn/svnserve/Makefile head/usr.bin/svn/svnsync/Makefile Directory Properties: head/contrib/subversion/ (props changed) Copied: head/contrib/subversion/.ycm_extra_conf.py (from r289178, vendor/subversion/dist/.ycm_extra_conf.py) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/contrib/subversion/.ycm_extra_conf.py Mon Oct 12 09:53:55 2015 (r289180, copy of r289178, vendor/subversion/dist/.ycm_extra_conf.py) @@ -0,0 +1,88 @@ +# Configuration file for YouCompleteMe vim plugin to allow the plugin +# to determine the compile flags. This file is based on: +# https://github.com/Valloric/YouCompleteMe/blob/master/cpp/ycm/.ycm_extra_conf.py +# +# This is free and unencumbered software released into the public domain. +# +# Anyone is free to copy, modify, publish, use, compile, sell, or +# distribute this software, either in source code form or as a compiled +# binary, for any purpose, commercial or non-commercial, and by any +# means. +# +# In jurisdictions that recognize copyright laws, the author or authors +# of this software dedicate any and all copyright interest in the +# software to the public domain. We make this dedication for the benefit +# of the public at large and to the detriment of our heirs and +# successors. We intend this dedication to be an overt act of +# relinquishment in perpetuity of all present and future rights to this +# software under copyright law. +# +# 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 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. +# +# For more information, please refer to + +import os +import ycm_core +from clang_helpers import PrepareClangFlags + +compilation_database_folder = os.path.dirname(os.path.realpath(__file__)) + +if compilation_database_folder: + database = ycm_core.CompilationDatabase( compilation_database_folder ) +else: + database = None + +def MakeRelativePathsInFlagsAbsolute( flags, working_directory ): + if not working_directory: + return flags + new_flags = [] + make_next_absolute = False + path_flags = [ '-isystem', '-I', '-iquote', '--sysroot=' ] + for flag in flags: + new_flag = flag + + if make_next_absolute: + make_next_absolute = False + if not flag.startswith( '/' ): + new_flag = os.path.join( working_directory, flag ) + + for path_flag in path_flags: + if flag == path_flag: + make_next_absolute = True + break + + if flag.startswith( path_flag ): + path = flag[ len( path_flag ): ] + new_flag = path_flag + os.path.join( working_directory, path ) + break + + if new_flag: + new_flags.append( new_flag ) + return new_flags + + +def FlagsForFile( filename ): + if database: + # Bear in mind that compilation_info.compiler_flags_ does NOT return a + # python list, but a "list-like" StringVec object + compilation_info = database.GetCompilationInfoForFile( filename ) + final_flags = PrepareClangFlags( + MakeRelativePathsInFlagsAbsolute( + compilation_info.compiler_flags_, + compilation_info.compiler_working_dir_ ), + filename ) + do_cache = True + else: + final_flags = [ ] + do_cache = False + + return { + 'flags': final_flags, + 'do_cache': do_cache + } Modified: head/contrib/subversion/CHANGES ============================================================================== --- head/contrib/subversion/CHANGES Mon Oct 12 09:13:47 2015 (r289179) +++ head/contrib/subversion/CHANGES Mon Oct 12 09:53:55 2015 (r289180) @@ -1,3 +1,799 @@ +Version 1.9.2 +(30 Sep 2015, from /branches/1.9.x) +http://svn.apache.org/repos/asf/subversion/tags/1.9.2 + + User-visible changes: + - Client-side bugfixes: + * svn: fix crash when saving credentials in kwallet (r1700740, r1700951) + * checkout/update: fix "access denied" error on Windows (r1701064 et al) + * update: fix crash when updating a conflicted tree (r1702198, r1702200) + * commit: fix possible crash (r1702231) + * ra_serf: do not crash on unexpected 'X-SVN-VR-Base' headers (r1702288) + * merge: fix crash when merging to a local add (r1702299 et al) + * svnmucc: fix error during propset+put for existing file (r1702467 et al) + * update: fix crash without .svn/tmp folder (r1701838, r1702203) + * checkout: remove unnecessary I/O operation (r1701638) + * merge: fix possible crash (r1701997) + * update: fix crash with some of the incoming deletes (r1702247) + * upgrade: fix crash for pre-1.3 wc with externals (r1702218 et al) + * revert: fix crash when reverting the root of a move (r1702237 et al) + * svn: do not crash upon specific database corruptions (r1702974, r1702991) + * svn: show utf8proc version in svn --version --verbose (r1702533, r1702891) + + - Server-side bugfixes: + * fix reporting for empty representations in svnfsfs stats (r1698312 et al) + + Developer-visible changes: + - General: + * fix svnfsfs_tests.py in fsfs-v4 and fsfs-v6 modes (r1700215 et al) + + - API changes: + * disable unsupported operations for standard streams (r1701633 et al) + + +Version 1.9.1 +(02 Sep 2015, from /branches/1.9.x) +http://svn.apache.org/repos/asf/subversion/tags/1.9.1 + + User-visible changes: + - Client-side bugfixes: + * Fix crash with GPG-agent with non-canonical $HOME (r1691928, issue #4584) + * Fix checkout errors with svn+ssh:// on Windows (r1696222, r1696225) + * svn: expose expat and zlib versions in svn --version --verbose (r1696387, r1697664) + * svn: improve help text for 'svn info --show-item' (r1698106) + + - Server-side bugfixes: + * svnserve: fixed minor typo in help text (r1694023) + * Enable caching with memcached on Windows (1674626, r1674785) + * Fix an error leak in FSFS verification (r1693886) + * Fix incomplete membuffer cache initialization (r1695022) + * svnfsfs: fix some bugs and inconsistencies in load-index (r1697381 et al.) + + - Client-side and server-side bugfixes: + * Fix alignment fault in ra_svn on 32 bit SPARC machines (r1697914) + + - Bindings bugfixes: + * Fix memory corruption in copy source SWIG bindings (r1694929) + + Developer-visible changes: + * Better configure-time detection of httpd version and authz fix (r1687304 et al.) + * Correct a parameter name in svn_repos_get_fs_build_parser5 (r1694194) + * Resolve circular library reference in libsvn_fs_x (r1696695) + * Fix Unix build on systems without GPG agent (r1694481, r1697824) + +Version 1.9.0 +(5 Aug 2015, from /branches/1.9.x) +http://svn.apache.org/repos/asf/subversion/tags/1.9.0 + + User-visible changes: + - General: + * make all commands provide brief description in help output (r1522518) + * flush stdout before exiting to avoid information being lost (r1543868) + + - Major new features: + * fsfs: new format 7 with more efficient on-disk layout (r1547045 et al) + * blame: support showing prospective as well as previous changes + * info: support printing of individual values with --show-item (r1662620) + * svn auth: new subcommand to manage cached credentials and certs + * svnserve: cache config and authz to lower resource usage and be able to + serve large numbers of connections with a limited number of threads + * membuffer: quadruple the maximum cacheable directory size (r1545948 et al) + * new filesystem fsx (faster, smaller); experimental - see release notes + + - Minor new features and improvements: + * new 'diff-ignore-content-type' runtime configuration option + * new option for 'svnadmin verify': --check-normalization + * new option for 'svnadmin verify': --keep-going + * svnadmin info: new subcommand to print info about a repository + * print summary of conflicts before/after interactive conflict resolution + * import: reduce number of connections to the server needed (r1482962) + * membuffer: rework cache eviction heuristics (r1476664 et at) + * membuffer: improved cache usage statistics (r1489883) + * mergeinfo: new '--log' option (r1492168) + * svnadmin upgrade: progress and cancellation support (r1495545, r1495566) + * cleanup: add '--remove-unversioned' and '--remove-ignored' (issue #3549) + * cleanup: add '--include-externals' option (issue #2325) + * cleanup: add '--quiet' option (r1498661) + * svnadmin load: speedup by setting revprops in one call (r1504079) + * svnadmin load: set svn:date revprop in the initial commit (r1504951) + * reimplement UTF-8 fuzzy conversion using utf8proc (r1511676) + * svnadmin verify: speed up for repos with large directories (r1520419) + * svn merge: interactive conflict resolver tries external tools (r1524145) + * minor speed up in string to time conversion (r1533387) + * windows: speed up console output (r1533994) + * update: optimize wc db usage when obtaining children (r1537065 et al) + * decreased overhead for case-sensitive configuration access (r1538068) + * avoid re-opening repo for in-repo authz if already open (r1538120) + * svnserve: output errors in a more standard way (r1544250) + * faster parsing of config file comments (r1544716) + * avoid trying to open the hooks-env file when it doesn't exist (r1544721) + * svnserve: provide the same logging detail in "run once" mode as provided + in the log file (r1544731) + * svnserve: reduce connection latency (r1544732) + * wc: reduce the number of locks and transactions required (r1545127 et al) + * cat: add '--ignore-keywords' option (r1547517) + * merge and mergeinfo: use fewer RA sessions (r1552265) + * fsfs: limit delta chains from crossing too many shards (r1554942) + * fsfs: option to configure compression level in deltas (r1559748) + * fsfs: enable dir and prop deltas by default for formats that support + it (r1555286) + * fsfs: avoid out of date errors from files in a directory changing when + you change a property on the directory (r1558224) + * fsfs: temporary transaction properties are preserved when commit is + interrupted (r1549907 et al) + * fsfs: speed up transaction creation (r1544719) + * fsfs: avoid trying to open lock digest files that don't exist (r1544721) + * fsfs: reduce internal overhead by using sorted array instead of hash for + directory representation (r1554711) + * fsfs: skip decoding txdelta windows that are already cached (r1555284) + * fsfs: avoid constructing fulltext when delta we need is stored (r1555297) + * fsfs: improvements to format 6 reading/writing (r1517479) + * fsfs: reduce overhead of parsing noderev structures (r1544717) + * fsfs: speed up node relation comparison (r1554807) + * fsfs: speed up critical open_path() call (r1483301 et al) + * fsfs: speed up node verification (r1520421 et al) + * fsfs: speed up serialization into cache buffer format (r1505056) + * fsfs: avoid caching intermediate fulltexts (r1565100) + * fsfs: reduce lock contention on txn-list-lock (r1569549) + * svnadmin: don't display warnings as errors (r1556297) + * ra_serf: avoid caching properties in the update editor (r1557538) + * ra_serf: decrease latency of requests to get directory contents by + pipelining requests, speeds up 'svn ls --include externals' and + some cases of multi-url diff, including merge (r1557548) + * ra_serf: spool small update reports in memory to avoid making temp files + for small requests (r1557599) + * ra_serf: allow the reuse of serf connections after an error (r1553341) + * ra_serf: improve many error messages (r1551910 et al) + * ra_serf: pipeline lock/unlock requests (r1551918, r1551993, r1552008) + * ra_serf: pipeline requests for inherited properties against old servers + that don't support the faster REPORT (r1552455, r1552475) + * ra_serf: allow reuse of sessions after a canceled request (r1557686) + * ra_serf: reduce memory usage when retrieving revision props (r1557689) + * mod_dav_svn: make out of date error message consistent with generic repos + logic (r1558247) + * allow SQLite to optimize functions that are deterministic (r1559352) + * speed up delta calculations on non-deltifyable sections (r1559767) + * ra_serf: improve memory usage in commit processing (r1520028) + * report progress as cumulative across all sessions (issue #3260) + * ra_serf: don't send DAV headers with GET requests (r1517472) + * mod_dav_svn: SVNCacheTextDeltas defaults to on (r1517479) + * fs: improve scalability of fs_open and similar functions (r1523450 et al) + * svnserve: improve performance and scalability (r1523465 et al) + * svnadmin verify: output progress messages to stdout (r1471095) + * svnadmin crashtest: make output less misleading (r1486046) + * mod_dav_svn: discover copy to src earlier in some cases (r1537440) + * speed up mergeinfo parsing (r1483292, r1483309 et al) + * optimize hash lookups used in mergeinfo and caching (r1483434 et al) + * log: optimize string handling in repos layer (r1483570, r1483572) + * ask disk hardware to sync instead of only syncing to hardware buffers + when OS supports it (r1484439, r1484445) + * optimize diff code to avoid unneeded comparisons (r1485488) + * optimize check if relpaths are canonical (r1485496, r1489828) + * ra_svn: reduce protocol implementation overhead (r1485499, r1485504 et al) + * optimize file translation without keyword substitution (r1486058) + * optimize config file parsing by using unbuffered I/O (r1486897) + * patch: apply ignore settings when deciding to delete dirs (r1490378) + * use a cheaper RA operation for common client calculation (r1496468 et al) + * ra_svn: avoid unnecessary work when doing a blame (r1503046) + * optimize reading files into memory if size is known (r1505068) + * copy: do not error on properties when doing a foreign copy (r1563361) + * membuffer: reduce memory usage by using shorter lived pools (r1564217) + * svnadmin load: add '--ignore-dates' option (r1564789) + * update: reduce sessions used with '--parents' option (r1565920) + * diff: report properties on deleted nodes (r1569320, r1570055) + * diff: switch to diff processor APIs instead of old style callbacks, step + towards resolving long standing bugs and feature requests (r1569551 et al) + * diff: use the proper revision in headers for addition and deletion + of files (r1570053) + * svnadmin lslocks: add cancellation (r1571992) + * svn --version: list available authentication credential caches (r1572106) + * fs: improved detection of changes between two nodes, this should reduce + the number of out of date errors clients see (r1572336) + * allow the use of libmagic to be configured via subversion configuration + file or SVN_CONFIG_OPTION_ENABLE_MAGIC_FILE env variable (r1572916) + * new '--pin-externals' option for svn copy (issue #1258) + * the '--strict' option was renamed '--no-newline' (r1662224) + * merge/update: switch to three-way text conflict markers + (r1591951, r1595522) + * patch: handle renames in git formatted patches (r1594636) + * svnfsfs: new expert tool (r1594860) + * mod_dav_svn: allow server admin to GET the FSFS global cache stats + (r1595160) + * diff: support git-like binary file diffs with '--git' (r1599552) + * diff: support arbitrary context size for internal diff tool with + '-U' option (r1603847, 1603871) + * commit: print progress notification between client finishing + transmitting text deltas and asking server to commit (r1604179) + * fsfs: optimize log commands for repos on Windows by not + using a locale specific function to parse ids (r1605123) + * fsfs: reduce memory usage of reading/writing changed paths caches + (r1605188 et al) + * mod_dav_svn: log post-commit errors to httpd error log as well + as returning them to client (r1606004) + * make server config groups work with svn:// URLs (issue #4512) + * svnadmin hotcopy: report progress when copying revisions and packed + shards for FSFS repositories (r1613339) + * info: show revisions for missing tree conflicts (r1617932) + * fsfs: avoid shared data clashes due to multiple distinct repositories + having identical UUIDs (r1618138 et al) + * status: ignore thumbs.db files by default (r1620955) + * fsfs: harden parsers against data corruption (r1622931, r1622937, + r1622942) + * diff: respect svn:keywords and svn:eol-style when doing arbitrary + diffs (r1623820) + * ra_serf: reduce size of XML generated for reports (r1627333) + * replace generic --trust-server-cert with more specific options to + override specific certificate failures (r1630117 et al) + * commit: improve speed of commits with many files (r1630312 et al) + * svnadmin setrevprop: add '--transaction' option (r1631435) + * svnadmin delrevprop: new subcommand (1592723) + * svnadmin verify: validate the index data against checksums (r1631598) + * svnadmin verify: new option '--metadata-only' (r1593753) + * cp: improve performance of local copies (r1632284, et al) + * fsfs: speed up operations that use revision properties (r1634875, + r1634879) + * checkout/update: use fewer RA sessions (r1635753 et al) + * log: do less work when '--with-no-revprops' is used (r1642231) + * patch: improve command to be more capable as compared to GNU patch + (issue #4533) + * limit server caches to avoid running out of memory if server admin + configured caches larger than supported by the platform (r1645572) + * mod_authz_svn: log implicit read access failures with INFO log level; + Explicit read access failures are still logged with ERROR log level + (r1653032) + * ra_serf: reduce memory usage by removing some extra intermediary state + (r1654681, r1654690) + * revert: improve performance on large working copies without changes + (r1657083) + * ra_svn: improve efficiency of editor processing (r1658194 et al) + * merge: provide different conflict reasons for local additions and + unversioned obstructions (r1659381) + * windows: improve checkout performance on windows by using sqlite truncate + journal mode rather than delete (r1659426) + * status: now accept '-r' argument (r1671164, 1672578, 1673228) + * ls: improve performance of '-v' on tag directories (r1673153) + * resolve: improve conflict prompts for binary files (r1667228 et al) + * fsfs: improve error messages for parsing errors (r1678147, r1678149) + * warn when the '--config-option' FILE:SECTION:OPTION combination may + be invalid. (r1674301 et al) + * ensure full key matching in membuffer cache (r1678950 et al) + * mod_dav_svn: expose cache statistics via HTTP (r1595160) + + - Client-side bugfixes: + * export: fix problem exporting symlinks on windows (r1476093) + * fix non-ascii character handling of command line options (r1476461) + * log: strip EOL marker only after converting to UTF-8 (r1476608) + * ra_serf: avoid dropping errors when making a lock request (r1489526) + * ra_serf: fix an error leak in update logic (r1499686) + * windows: fix issues with wcs in symlinked folders (r1501251) + * fix regression that broke parallel nested checkouts (issue #4390) + * svnmucc: ignore leading r in revision number arguments to -r (r1502636) + * mkdir: use absolute paths to avoid Windows path length limits (r1516816) + * avoid encoding support code when C runtime doesn't support it (r1530582) + * ra_svn: add check against dirents with path separators (r1533812) + * properly delete temporary files when atomic write fails (r1537466) + * wc: fix corner cases in move-update tree conflicts (r1538639 et al) + * windows: fix crash report indentation for x64 reports (r1543589) + * mergeinfo: allow to work on a moved target (issue #4301) + * windows: avoid delay when no homedir is available (r1546814) + * status: report externals in a deterministic way (r1550200) + * copy: avoid an unneeded extra RA session for wc to repo case (r1551564) + * ra_serf: show pre-revprop-change failure on revprop delete (issue #3086) + * svnsync: avoid extra request at end of every revision sync (r1553370) + * ra_serf: fix replace + propset of locked file failures (issue #3674) + * ra_serf: prevent overwriting directory during copy (issue #3314) + * commit: limit number of temporary files open at same time (issue #4172) + * ra_serf: verify incoming integers are really integers (r1557709 et al) + * log: -g --xml doesn't differentiate between forward and reverse merges + (issue #4463) + * windows: improve update and checkout speed (issue #4450) + * log: reduce performance penalties of using -g (r1559912) + * blame: reduce performance penalties of using -g (r1560112) + * ra_local: set svn:txn-user-agent for consistency (r1498608) + * ra_svn: use the stream API properly for communications (r1562072) + * update: provide error when none of targets are wcs (r1565388) + * wc: reduce dependence on unspecified SQLite behavior (r1567080 et al) + * diff: fix diffing directory without permissions to read parent (r1569265, + r1569290) + * diff: improve resolving peg revisions (r1570205 et al) + * diff: fix bug in calculating header paths (r1570584) + * ra_serf: add SSL certificate issuers common name to output (r1573728) + * updates keywords in files not modified during 'svn switch' (issue #1975) + * svnmucc: Normalize line endings with '-F' and '-m' options + (r1592148, r1592150) + * fix problems with read-only authentication caches (issue #4504) + * commit: don't bump just locked files (r1603617) + * log: reduce memory with '-v' (r1604569 et al) + * diff: fix diffing locally deleted nodes under copied directories + (r1605832) + * diff: fix missing node error when diffing a replaced node (r1605866) + * propget: forbid using 'show-inherited-properties' with 'strict' (r1611698) + * windows: avoid delay when user profile isn't writable (r1617926) + * merge: display the correct node kinds for tree conflicts (r1618024, + r1619418, r1619717) + * diff: show the correct revisions in the header (r1619452) + * diff: fix missing header for files with only property changes (r1619476) + * update: raise a tree conflict rather than an obstruction when an + incoming server-excluded node conflicts with a locally added node + (r1619495) + * update: improve tree conflict reason and action descriptions (r1619777) + * ra_serf: fix stalls during checkout/update over http/https (r1621596) + * svnmucc: don't crash when '--version' is used with other arguments + (r1625496) + * checkout: report svn:externals failures via the exit code as other + commands already do (r1628398) + * svn & svnlook: use the right error code when fputs() fails (r1630369) + * export: reject peg specifiers on local destination path (r1635085) + * don't reject command-line arguments in the form of ".@abc", where + "abc" is a peg specifier that may be empty (r1635118) + * fix directory externals not following history (issue #4529) + * remove 'df' and 'm' options from the interactive conflict resolver for + binary files (r1645578) + * mergeinfo parsing: allow source path to be empty (issue #4537) + * mkdir: when using '--parents' don't add entire contents recursively if + target already exists (r1649951) + * resolve errors with move of a nested delete (r1651980, r1651997) + * update: prevent breaking a working copy when a directory is replaced + with an external to a foreign repository (issue #4550) + * update: prevent an invalid wc state when applying a move (r1652184 et al) + * resolve: fix a segfault when breaking a move inside a delete (issue #4491) + * ra_serf: don't handle a commit that didn't produce a new revision as + a successful commit (r1653532) + * export: fix the lack of notifications when starting to handle externals + (issue #4527) + * update: fix a case where we reported an error rather than a tree conflict + (r1655017) + * info: Use local platform style paths in all cases (r1659283) + * handle lack of a configuration file properly (r1660369) + * update: resolve issues with tree conflicts caused by an incoming + delete removing a mixed revision tree (r1660742) + * don't hold onto locks of deleted paths in the client on commit (r1661363) + * info: fix url calculation for a few statuses (r1661476) + * update: when using '--set-depth' avoid removing local changes (r1661585) + * update: fix tree conflict detection on unversioned nodes that exist where + there used to be a deleted node (r1661664) + * status: display tree conflicts even if the node with the tree conflict is + shadowed by a file (r1662331) + * pre-1.6 wc compatibility: fix with obstructed working copies (r1662412) + * resolve: allow directly resolving tree conflicts (r1658435) + * copy: when copying from a wc to a url show all the changes (r1655729) + * info: provide results in a stable order (r1662030) + * revert: allow depth limited reverts of nodes that only have not-present + and/or excluded child nodes (r1662091) + * wc: fix calculating repo path after commits of nodes that shadow a + switched (not-present) node (r1663991, r1666258, r1674032) + * update: resolve assertion on bad update report involving incomplete + status (r1663671, r1666832) + * update: allow a real file to replace a file external (r1664035) + * merge: raise a tree conflict on root of obstructing dir (r1666690) + * cp: fix 'svn cp ^/A/D/H@1 ^/A' to properly create A (r1674455, r1674456) + * status: fix incorrect output with file externals (issue #4580) + * merge: fix part of issue #4582 (r1686175, r1687029, r1688258) + + - Server-side bugfixes: + * svnserve: don't ignore socket initialization errors (r1544253) + * svnserve: don't hide fatal errors in inetd and tunnel modes (r1544256) + * fsfs: log repo path in local style for cache init failure (r1494314) + * fsfs: fix potential transaction corruption (r1519624) + * svnserve: fix logging in multi-threaded servers (r1523502) + * fsfs: don't report out of date errors due to FS corruption (r1527084) + * svnadmin verify: detect inconsistencies that prevent loading (r1536854) + * mod_dav_svn: use 404 status for errors caused by invalid URIs (r1542063) + * mod_dav_svn: use 404 when the repository doesn't exist (r1544259) + * mod_dav_svn: use 'dav_svn:' prefix for filename instead of 'svn:' + (r1544711) + * mod_dav_svn: XML escape lock tokens (r1547427) + * hotcopy: don't create config files when copying pre-1.5 repos (r1547454) + * hotcopy: preserve the rep-cache.db permissions when hotcopying (r1547877) + * mod_dav_svn: fix SVNCacheTextDeltas and SVNAdvertisV2Protocol directive + merging (r1548124) + * mod_dav_svn: always produce an error text even when text specifies + the default message to make diagnosing issues easier (r1553441) + * mod_dav_svn: fix some pool lifetime issues with error messages (r1553868) + * mod_dav_svn: avoid setting option headers multiple times (r1557103) + * fsfs: prevent some commits that could cause future corruption (r1560673) + * cache: fix premature eviction due to 64-bit underflows (r1567996 et al) + * svnserve: fix potential integer overflow in Cyrus SASL support (r1570434) + * bdb: fix potential integer overflow and underflow (r1570701) + * bdb: prevent silent propogation of some corruption (r1570778) + * svnadmin hotcopy: do not corrupt db/current contents when copying old + FSFS repos (r1603485) + * svnadmin hotcopy: don't produce broken copies when a concurrent pack + happens (r1605633) + * log: reduce memory consumption of '-v' (r1605195) + * mod_dav_svn: fix performance issue on Windows with named atomics + (r1611379) + * log: fix a segfault in handling changed paths (r1615364) + * mod_dav_svn: properly forward post-lock/post-unlock failures (r1622235) + * diff: fix handling of depth empty in added directories (r1622024) + * fix a segfault with corrupted changed path lists that try to add root + nodes (r1622944) + * svnadmin verify: report errors nicely rather than possibly aborting + (r1622955) + * svnlook propget: report transaction name rather than revision number in + errors if run with '-t' option (r1623317) + * svnadmin verify: prevent stack overflow conditions in corrupted + repositories (r1623398) + * fsfs upgrade: fix an issue that could block an upgraded format 1 or 2 + repository from being committed to (r1624011) + * fs backends: fix memory lifetime issue (r1632646) + * bdb: output correct checksum in error message about corruption (r1640707) + * fsfs: fix a pool lifetime error related to transaction local caches + (r1643139, 1643233) + * fsfs: avoid "random DAG walks" during checkout over ra_serf (r1645567) + * fsfs/bdb: reduce memory use during tree deletions (r1647820, r1655022) + * mod_authz_svn: fix unbounded memory use when SVNPathAuthz short_circuit + is used (r1647887) + * fsfs: reduce memory use when walking back in history (r1648230) + * dump: remove incorrect kind header on replaced nodes (issue #4553) + * dump: remove duplicate headers for replace-with-copy (issue #4552) + * mod_dav_svn: don't send XML-unsafe characters in svn:author + (issue #4415) + * dump: don't write broken dump files in some ambiguously encoded fsfs + repositories (issue #4554) + * mod_dav_svn: provide a more intuitive error message to the client when + trying to create a directory that already exists (issue #2295) + * fsfs: fix uninitialized memory use in lock/unlock code (r1657525) + * fix a segfault executing a pre-commit hook with legacy locks (r1657893) + * mod_dav_svn: do not ignore skel parsing errors (r1658168) + * fsfs: fix multiple reporting of the same lock (r1658482) + * fsfs: fix pool lifetime issue in lock handling (r1659314) + * mod_dav_svn: properly log assertions and malfuctions (r1660480) + * svnadmin load/dump: preserve deletion of svn:date from r0 (issue #4563) + * svnrdump: don't provide HEAD+1 as base revision when loading deletes + (r1664684) + * mod_dav_svn: improve error message sent with a 405 status code + (r1665195, r1666096, r1666379) + * make detection of invalid base revision on commit behave the same on + all RA layers (r1664664, r1664672, r1664674) + * mod_dav_svn: emit the first few log items as soon as they are available + (r1666965, r1667120) + * mod_dav_svn: prevent a tree walk on copy sources (issue #4351) + * fsfs: fix 'EOF found' error when reading repo (issue #4577) + * svnadmin freeze: unlock rep-cache.db as part of unfreezing + (r1679169, r1679287) + * fsfs: improve stability in the presence of power or network + disk failures during 'svnadmin pack' (r1683378) + * detect invalid svndiff data earlier (r1684077) + + - Client-side and server-side bugfixes: + * use less memory when retrieving extension from filename (r1548480) + * use more optimal code path with old txdelta v1 data (r1485480) + * windows: allow opening SQLite databases on long paths (r1564338) + * fix an out-of-bounds read in the delta combiner (r1569415) + * fix a number of cases of undefined behavior when passing invalid + arguments to memcpy() (r1632530, et al) + * windows: avoid a 12 second delay due to a retry loop in some error + conditions when opening a file (r1657583) + + - Other tool improvements and bugfixes: + * windows: add build-svn-deps-win.pl tool to build dependencies (r1467715) + * svnpubsub: add support for revprop changes (r1486463) + * svnpubsub: do not pass svn commands through shell (r148466, r1486467) + * svnpubsub: hooks exit with an error if they fail (r1486500, r1486597) + * svnpubsub: hooks use "--" to signal end of arguments (r1486513) + * mailer: properly encode mail headers per RFC2047 (r1487532) + * svnwcsub: add a pre-update hook, which can deny update (r1494542 et al) + * fsfs-stats: count file nodes that are added without history (r1519283) + * fsfs-stats: replaced by 'svnfsfs stats' (r1594860) + * fsfs-access-map: count empty reads and unnecessary seeks (r1523441) + * fsfs-access-map: generate scaled/rectangular heatmaps (r1505065) + * fsfs-access-map: deal with strace format issues (r1505065) + * fsfs-access-map: update to know about index files (r1505065) + * svnbench: renamed from svn-bench (r1659226) + * svnbench: add null-info command (r1532196) + * svnlook.py: made usable as a library by adding getter methods (r1541558) + * svnbench, svnraisetreeconflict, svnauthz, svn-rep-sharing-stats: More + consistent error reporting, following pattern of core command-line + programs (r1544194) + * which-error.py: allow which-error.py to be run from symlink (r1547977) + * bash_completion: add svnlook filesize command and options to svn cat, + info, and mergeinfo commands (r1569021) + * new '--conflict-style' option to standalone diff3 tool (r1591750) + * update standalone diff3 tool so it can be used with --diff-cmd + directly (r1591871, r1591876) + * bash_completion: support for auth command (r1596841) + * diff: support '-U' option (r1618618) + * svn-rep-sharing-stats: replaced by 'svnfsfs stats' (r1618861) + * add svn-vendor.py as an alternative to svn_load_dirs.pl that can + auto-detect renames and copies (r1623660) + * svnpredumpfilter.py: fix a scalability problem that made run time + increase greatly on large repositories (r1625674 et al) + * svnpredumpfilter.py: detect copies of copies and handle properly + (r1626182) + * bash_completion: add svnadmin delrevprop (r1631473) + * showchange.pl: removed, obsoleted by 'svn log --diff' (r1631686) + * bash_completion: add new trust options (r1660373) + * bash_completion: add '--pin-externals' (r1662250) + * bash_completion: stop offering deprecated options (r1662291) + * bash_completion: add '--show-item' and '--no-newline' (r1662622) + * svnbench: add null-blame command (r1673785, r1673803, r1674015) + * svnbench: install with default 'make install' (r1685085) + + Developer-visible changes: + - General: + * require Python 2.7+ for development and testing (r1691712, r1691713, r1692448) + * include symbolic names for error codes in maintainer mode (r1467643) + * include symbolic names for warning codes in maintainer mode (r1469855) + * support YouCompleteMe vim plugin (r1476374 et al) + * cache: add pretend_empty mode for maintainers (r1461689, et al) + * allow tests to be run with exclusive wc locks (r1496475) + * fix check for Microsoft C/C++ compiler (r1503148) + * improve windows build to use pre-built dependencies + * optimize ramdrive usage in the windows test runner (r1504511) + * SVN_CMDLINE_DISABLE_CRASH_HANDLER env var added for Windows (r1506507) + * gen-make.py: support Visual Studio 2013 by --vsnet-version=2013 (r1533907) + * windows: don't require APR source when building (r1534037, et al) + * don't compile SQLite amalgamation twice (r1536364) + * make C tests use same temp path as Python tests (r1536700) + * davautocheck: access log logs the r->filename now (r1538048) + * added test to detect duplicate SQL queries (r1538962) + * windows test runner: copy additional apr dlls (r1539300) + * support for debug logging that should be available in serf 1.4.0 (r1541561) + * OS X: fix build when Gnome is installed (r1541698) + * properly detect if expat is libexpat.lib or xml.lib on windows (r1541981) + * doc-clean target works properly with separate build dir (r1542303) + * don't break entire test run if cleaning temp directory failed but return + an error anyway (r1542817) + * windows tests: find java.exe via the sdk if not found via PATH (r1543876) + * fix davautocheck with httpd 2.3.x+ and worker/prefork MPMs (r1544302-3) + * add parallel mode for C tests (r1545334 et al) + * use --bin path for svnrdump when running Python tests (r1548706) + * remove unused --with-openssl option from configure (r1548714) + * tests: stop rewriting shared authz file for every sandbox (r1552064 et al) + * fix unnecessary aborts in maintainer mode on sqlite errors (r1536325) + * new --sqlite-logging option for C tests (r1560409) + * allow building with APR-2 (r1560586) + * remove support for ASM Zlib from Windows build system (r1560864) + * gen-make.py: new -D option (r1567046) + * improve how we fetch the version of Windows (r1568798, 1568806) + * move common code in python tests to library files to avoid side effects of + having tests depending on each other (r1570654) + * disable compiling on platforms where int is shorter than 32-bits and add + the SVN_ALLOW_SHORT_INTS compile definition to override (r1570882) + * disable building *.sbr files with Visual C++ 2010 or later (r1571020) + * require serf 1.3.4 (r1572261) + * require APR and APR-Util 1.3.x (r1572261) + * add mod_dontdothat to davautocheck.sh (r1572312) + * require Apache httpd 2.2.x (r1572339) + * support pkg-config for serf when using a prefix (r1572762) + * don't depend on stdbool.h and inttypes.h for utf8proc (r1573069 et al) + * avoid non-portable find extensions so the build works on Solaris (r1573780) + * Allow PARALLEL value to specify the number of threads to run tests with, + PARALLEL=1 means to use the default (r1573320) + * pkg-config support for libsvn_* libraries (issue #4435) + * binaries built on Mac OS X 10.6+ will not run on older versions (r1651549) + * fix random failure of Makefile-based parallel builds on Unix + when the amalgamated SQLite is being used (r1658357) + * C tests only run with ra_local to avoid duplicate testing (r1609477) + * allow skipping the C tests for any RA method (r1609489) + * new tools for benchmarking on Windows (r1610264) + * svnbench: no longer part of tools but main subversion (r1618860) + * improve detection for libtool (r1627276) + * check the runtime version of the fs_util library in the fs backends + (r1651567) + * properly initialize the src_kind value to avoid problems for other API + users during a copy (r1655723) + * try to improve reliability of applications that do not call + svn_dso_initialize2() right after apr_initialize() (r1659604) + * add svn-wc-db-tester tool for testing working copies (r1660874) + * fix bugs and performance issues using svn_wc_walk_entries3() (r1661110) + * support using Python 3 for building (r1661247) + * don't add -lstdc++ on FreeBSD 10 (r1662329) + * add build support for Visual Studio 2015 (r1663183, r1663184, r1689721 et al.) + * fix test failures when running from a directory whose name contains + characters that must be escaped when used in a URL. (r1664997) + * fix breakage of the serf ra session with svn_ra_get_dir2() and + svn_ra_get_log2(). (r1665213, r1665259, r1665609) + * resolve a race condition in some test suite cleanup code (r1683303) + * fix some tests on non-US default locale on Windows (r1684034) + * document the meaning of "XFAIL" for users building from source (r1683071) + + - API changes: + * new RA callbacks for managing ra_svn tunnels: + svn_ra_callbacks2_t::check_tunnel_func, + svn_ra_callbacks2_t::open_tunnel_func and + svn_ra_callbacks2_t::close_tunnel_func + * new API for retrieving info about a file system: svn_fs_info() + * new API svn_io_file_flush() that wraps apr_file_flush() + * new API svn_io_write_atomic(), that writes, sync and renames a file + * new API svn_compat_log_revprops_out_string() + * deprecate unused datatype svn_ra_get_latest_revnum_func_t + * new API svn_client_cleanup2() (r1496954 et al) + * new API svn_stringbuf_create_wrap() (r1502248) + * new API svn_io_file_aligned_seek() (r1502539) + * ra_svn: fix svn_ra_get_log*() to apply limit when server can't (r1503043) + * svn_client_commit6: notify which path prevents a mv commit (r1503662) + * new APIs svn_io_file_create_empty() and svn_io_file_create_bytes() + (r1505006) + * new API svn_ver_check_list2() (r1502267) + * new API svn_stringbuf_from_stream() (r1532193) + * svn_auth_get_platform_specific_client_providers() now includes ssl + providers (r1534153) + * change dav_svn_split_uri() repos_path argument (r1537812) + * new API svn_repos_fs_type() returns filesystem type (r1538585) + * svn_client__get_inheritable_props() clears wcroot_iprops when revision is + not valid (r1538602) + * SVN_VA_NULL: New macro which is null-pointer constant (r1536307) + * SVN_NEEDS_SENTINEL_NULL: New macro to mark functions that require final + NULL sentinel value, so compilers can warn when missing (r1543394) + * platform specific svn_auth_get_* functions are deprecated, use the + svn_auth_get_platform_specific_provider() function instead (r1543992) + * SVN_INT_ERR macro is deprecated; use svn_handle_error2() or + svn_cmdline_handle_exit_error() instead (r1544142) + * new API svn_client_cat3() allow disabling keyword expansion and retrieving + props (r1544182) + * svn_auth_first_credentials(): provides an error rather than crashing if + auth_baton is NULL (r1544320) + * svn_auth_set_parameter(): Do nothing if auth_baton is NULL (r1544320) + * new API svn_relpath_prefix which returns a relpath with a maximum number + of path components (r1545123, r1673282) + * svn_fs_initialize() is now threadsafe (r1546409) + * svn_checksum_kind_t has two new FNV-1a checksums (r1546699) + * svn_fs_lock: control characters are not allowed in lock tokens (r1547445) + * new API svn_wc_cleanup4() makes some functionality optional and adds + notifications (r1548075 et al) + * new API svn_client_info4() supports walking externals (r1550206 et al) + * new flag for svn_fs_begin_txn2() SVN_FS_TXN_CLIENT_DATE to allow client + to set the final svn:date (r1550228) + * new APIs for easier RA commits svn_client_mtcc_* (r1550758 et al) + * new API svn_ra_session_dup() (r1552324 et al) + * svn_ra_stat() now handles compatibility with 1.0-1.1 svnserve (r1552441) + * new error code SVN_ERR_COMPOSED_ERROR added to allow detection of + composed errors by API consumers (r1553266) + * new error code SVN_ERR_RA_DAV_PRECONDITION_FAILED (r1553668) + * new error code SVN_ERR_RA_CANNOT_CREATE_SESSION (r1554027) + * new API svn_fs_node_relation() (r1554800) + * SVN_EXPERIMENTAL to mark functions that might change in future (r1526012) + * fix bug in svn_client_get_merging_summary() with some params (r1532396) + * new error code SVN_ERR_XML_UNEXPECTED_ELEMENT (r1498938) + * extend stream API to also support incomplete reads (r1561688 et al) + * new API svn_wc_add_from_disk3() (r1563361) + * new API svn_client_revert3() to allow clearing changelists and to have + a metadata_only flag (r1568635, r1657026) + * svn_rangelist_inheritable2(): don't change inheritabilty of remaining + ranges (r1569731) + * svn_rangelist_inheritable2() and svn_mergeinfo_inheritable2(): fix a + pool lifetime issue (r1569764) + * new APIs to support cancelation during unified diff output and + allow the context size to be specified (r1570149 et al) + * APIs related to retrieving logs are now documented to be unlimited when + a negative value is passed for the limit (r1570330, 1570335) + * new APIs: svn_fs_props_different() and svn_fs_contents_different() + (r1572363, r1573111) + * expose SVN_CONFIG_AUTHN_* macros in public API (r1572640) + * add SVN_CONFIG_OPTION_SQLITE_TIMEOUT to allow SQLite busy timeout + to be configured by clients (r1592093) + * add new notification between transmitting deltas and finalizing + commit as svn_wc_notify_commit_finalizing (r1603388) + * svn_client_cat3() API no longer returns entry or WC props (r1603501) + * properly handle canonical paths in svn_io_start_cmd3() (r1604761) + * add SVN_FS_CONFIG_FSFS_BLOCK_READ to control FSFS format 7 block + read feature (r1604933) + * new API svn_cstring_skip_prefix() (r1612823) + * new API svn_diff_mem_string_output_merge3() (r1618599) + * extend svn_wc_info_t with conflicts2 (r1618643) + * new API svn_diff_mem_string_output_unified3() (r1618839) + * new API svn_diff_file_output_merge3() (r1618857) + * svn_fs_props_changed() and svn_fs_contents_changed() no longer return + false positives (r1618880) + * new API svn_wc_conflict_description2_dup() (r1618883) + * extend svn_wc_conflict_description2_t with prop_reject_abspath field + (r1619096) + * extend svn_wc_conflict_description2_t with property values as + svn_string_t's (r1619122) + * fix svn_client_import5() to use absolute paths (r1623974) + * fix a few cases of invalid filling of svn_client_commit_item3_t (r1623981) + * add SVN_FS_CONFIG_FSFS_SHARD_SIZE to allow creation of repositories with + a custom shard size (r1624512) + * new API svn_cmdline_create_auth_baton2 (r1630117) + * make svn_string_*() and svn_stringbuf_*() functions handle C strings + of NULL with 0 length (r1632530, et al) + * fix svn_stream_compressed() for streams without partial read support + (r1639626) + * do not segfault on svn_stream_read_full() or svn_stream_skip() are called + for a no-op stream created via svn_stream_create() (r1639637) + * add SVN_FS_CONFIG_FSFS_LOG_ADDRESSING to control logical addressing + feature of fsfs format 7 (r1640915) + * rename the 'parent_directory' parameter of + svn_wc_parse_externals_description3() to 'defining_directory' and improve + the documentation (r1642690) + * new API svn_repos_get_fs_build_parser5() (r1647563) + * SVN_VERSION_BODY changed so that it is embedded into libraries, ultimately + allowing SVN_VER_TAG constant to be modified by patches (r1651565) + * rename repos_url to repos_url_deocded argument to + svn_repos_get_commit_editor5() to clairfy usage (r1653609) + * make svn_io_set_file_read_only() and svn_io_remove_dir2() ignore + ENOTDIR when ignore_enoent argument is set so the behavior is consistent + across platforms (r1653680) + * make svn_ra_open4() return the documented error when a repository + should be opened in a different location (r1655648) + * no longer return an error when using svn_ra_get_lock() and the path does + not exist (r1656875) + * svn_string_dup() will accept a NULL pointer and return a NULL (r1657254) + * svn_ra_get_file_revs2() now handles SVN_INVALID_REVNUM as HEAD (r1660463) + * new API svn_error_quick_wrapf() (r1662668) + * new API svn_fs_node_has_props() (r1673170, r1673172, r1673692, r1673746) + * new API svn_repos_verify_fs3() (r1492651 ... r1687769) + + - Bindings: + * javahl: add support for the RA layer (r1494650 et al) + * javahl: add ignore-keywords knob to ISVNCLient.doExport (r1494936) + * javahl: improve performance of rev_range_vector_to_apr_array (r1496243) + * javahl: provide whole stack of errors from native exceptions (r1496353) + * javahl: new framework for manipulating in-memory config data (r1497746) + * javahl: add methods to set config change handler callback (r1497753) + * javahl: add inheritance info to JavaHL's RevisionRange type (r1499308) + * swig-rb: fixes to building on Windows (1505406 et al) + * libsvn_swig_*libraries now work as proper shared librares (r1506520 et al) + * swig-py: 'import svn.core.*' imports libsvn_subr public symbols (r1507860) + * javahl: expose the svn_rangelist operations (r1509025) + * javahl: new utility class SVNUtil (r1512354) + * javahl: serialize init of native library (r1519803) + * javahl: fix value truncation checks (r1519913) + * javahl: add ISVNClient.info which exposes svn_client_info4 (r1603481) + * javahl: include name of exception class in error messages (r1532117) + * javahl: simplify JNI environment handling (r1533804) + * javahl: Revsion.UNSPECIFIED added as alias to Revision.START (r1533928) + * javahl: do not require JUnit to build javahl; only to test (r1535603) + * javahl: update Action enum with new entries added in 1.9 (r1536319) + * javahl: expose node property validation utility (r1538133) + * javahl: new style JNI wrapper (r1539114 et al) + * javahl: new utility API to parse/unparse svn:externals (r1539130 et al) + * javahl: allow tests to be run from a RAM disk (r1539215 et al) + * javahl: expose and use the url member of svn_wc_notify_t (r1539601) + * javahl: expose a utility API to resolve relative externals (r1540921) + * javahl: new utility API for file content translation (r1542401) + * javahl: throw NullPointerException when sources is empty (r1543328) + * swig-pl: fix compilation against perl 5.18 on Windows (r1543980) + * javahl: implement streamed file contents translation (r1543985) + * javahl: enable warnings with javac (r1544163, r1544169) + * javahl: cleanup warnings (r1544578 et al) + * javahl: add common utilities for new-style map iterations (r1545925) + * javahl: add an API to get runtime version of native libs (r1545945) + * javahl: use default cache size instead of no cache (r1547248) + * swig-py: add typemap for hunks field of svn_patch_t (r1548379) + * javahl: don't ignore difference between NULL and empty changelist in + ISVNClient.getChangelists (r1553254) + * swig-pl: fix pool issues with setting dates as revisions (r1553822) + * swig-pl: make svn_auth_set_parameter() usable (r1553823) + * javahl: expose inheritiable property names (r1560338) + * javahl: fix bug in parsing single revision merginfo data (r1563140) + * javahl: create JVM crashlogs from svn malfunctions (r1563927, r1564252) + * javahl: avoid problems when building without NLS support (r1566578 et al) + * javahl: expose --alow-mixed-revisions merge option (r1567602) + * javahl: support incomplete reads from streams (r1569631) + * javahl: allow revert API to take a set of paths (r1571461) + * javahl: improve authentication callback (r1597758 et al) + * javahl: load (most) classes on demand (r1602822) + * javahl: expose confg file keys in JavaHL (r1604448) + * javahl: update ISVNClient.info, ISVnClient.cleanup and add + ISvnClient.vacuum (r1604449) + * javahl: update ISVNRepos.hotcopy (r1618894) + * swig-py: Add close to the core.Stream class (r1619077) + * javahl: add example clients that use the authn API (r1640533) + * swig-py: implement dump stream parser (r1642813) + * swig-pl: remove some unneded cleanup code that triggered a cleanup + failure on windows (r1643072) + * swig-pl: make cancel_func, cancel_baton parameter pairs work (r1648852) + * javahl: expose whitespace diff parameters to blame method (issue #4475) + * javahl: update ConflictDescriptor (r1655842) + * javahl: update FileRevision to provide textDelta (r1656911) + * swig-pl: install into prefix (r1658459) + * javahl: expose the metadataOnly option to copy support (r1661451) + * swig-py: add support for svn_fs_lock_many(), svn_fs_unlock_many(), + svn_repos_fs_lock_many() and svn_repos_fs_unlock_many() (r1662867) + * swig-py: fix support for svn_ra_lock() and svn_ra_unlock() (r1662891) + * javahl: allow java callbacks to throw errors back to the svn code + (r1664938, r1664939, r1664940, r1664978, r1664984) + * swig-pl: fix some stack memory problems (r1668618, 1671388) + * swig: warn on using SWIG 3.x as we have compatibility problems + with newer versions of SWIG (1675149) + * javahl: requires Java 1.6 (r1677003) + * javahl: on OS X use /usr/libexec/java_home to find the JDK (r1675774) + * javahl: allow compiling with a C++11 compiler (r1684412) + + Version 1.8.14 (5 Aug 2015, from /branches/1.8.x) http://svn.apache.org/repos/asf/subversion/tags/1.8.14 @@ -13,6 +809,9 @@ http://svn.apache.org/repos/asf/subversi of user and revision after 'svn up' (r1680242) - Server-side bugfixes: + * mod_authz_svn: do not leak information in mixed anonymous/authenticated + httpd (dav) configurations (CVE-2015-3184) + * do not leak paths that were hidden by path-based authz (CVE-2015-3187) * mod_dav_svn: do not ignore skel parsing errors (r1658168) * detect invalid svndiff data earlier (r1684077) * prevent possible repository corruption on power/disk failures (r1680819) @@ -863,10 +1662,17 @@ http://svn.apache.org/repos/asf/subversi * add missing API functions to JavaHL bindings (issue #4326) * fix some reference counting bugs in swig-py bindings (r1464899, r1466524) +Version 1.7.22 +(12 Aug 2015, from /branches/1.7.x) +http://svn.apache.org/repos/asf/subversion/tags/1.7.22 + + Developer-visible changes: + - General: + * fix the regression test suite which was broken in 1.7.21 (r1694012) Version 1.7.21 (5 Aug 2015, from /branches/1.7.x) -http://svn.apache.org/repos/asf/subversion/tags/1.8.21 +http://svn.apache.org/repos/asf/subversion/tags/1.7.21 User-visible changes: - Client-side bugfixes: @@ -875,6 +1681,9 @@ http://svn.apache.org/repos/asf/subversi non-deltas dumpfile (r1652182 et al.) - Server-side bugfixes: + * mod_authz_svn: do not leak information in mixed anonymous/authenticated + httpd (dav) configurations (CVE-2015-3184) + * do not leak paths that were hidden by path-based authz (CVE-2015-3187) * fix 'svnadmin recover' for pre-1.4 FSFS repositories (r1561419) Developer-visible changes: Modified: head/contrib/subversion/COMMITTERS ============================================================================== --- head/contrib/subversion/COMMITTERS Mon Oct 12 09:13:47 2015 (r289179) +++ head/contrib/subversion/COMMITTERS Mon Oct 12 09:53:55 2015 (r289180) @@ -1,4 +1,4 @@ -The following people have commit access to the Subversion sources. +The following people have commit access to the Subversion sources. Note that this is not a full list of Subversion's authors, however -- for that, you'd need to look over the log messages to see all the patch contributors. @@ -58,6 +58,7 @@ Blanket commit access: stefan2 Stefan Fuhrmann jcorvel Johan Corveleyn trent Trent Nelson + kotkov Evgeny Kotkov [[END ACTIVE FULL COMMITTERS. LEAVE THIS LINE HERE; SCRIPTS LOOK FOR IT.]] @@ -96,6 +97,9 @@ Commit access for specific areas: jrvernooij Jelmer Vernooij (Python bindings) sage Sage LaTorra (Ctypes-Python b.) vmpn Vladimir Berezniker (JavaHL bindings) + rschupp Roderich Schupp (Swig bindings) + stilor Alexey Neyman (Python bindings, + svn-vendor.py) Packages: @@ -157,8 +161,10 @@ Commit access for specific areas: artagnon Ramkumar Ramachandra (svnrdump, svntest) arwin Arwin Arni (svn-bisect) joes Joe Schaefer (svnpubsub) - prabhugs Prabhu Gnana Sundar (verify-keep-going) - + humbedooh Daniel Gruno (svnpubsub) + prabhugs Prabhu Gnana Sundar (verify-keep-going) + schabi Markus Schaber (testsuite) + gbg Gabriela Gibson (gtest) Translation of message files: @@ -186,6 +192,7 @@ giorgio_valoti Giorgio Valoti (po: fr) marcelg Marcel Gosselin (po: fr) + mattiase Mattias Engdegård (po: sv) Experimental branches: Modified: head/contrib/subversion/INSTALL ============================================================================== --- head/contrib/subversion/INSTALL Mon Oct 12 09:13:47 2015 (r289179) +++ head/contrib/subversion/INSTALL Mon Oct 12 09:53:55 2015 (r289180) @@ -3,7 +3,7 @@ A Quick Guide ====================================== -$LastChangedDate: 2013-09-27 06:57:44 +0000 (Fri, 27 Sep 2013) $ +$LastChangedDate: 2015-07-26 23:03:10 +0000 (Sun, 26 Jul 2015) $ Contents: @@ -15,7 +15,7 @@ Contents: D. Documentation II. INSTALLATION - A. Building from a Tarball or RPM + A. Building from a Tarball B. Building the Latest Source under Unix C. Building under Unix in Different Directories D. Installing from a Zip or Installer File under Windows @@ -123,7 +123,8 @@ I. INTRODUCTION *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@freebsd.org Mon Oct 12 10:29:09 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B0EF9A1185B; Mon, 12 Oct 2015 10:29:09 +0000 (UTC) (envelope-from peter@wemm.org) Received: from smtp2.wemm.org (smtp2.wemm.org [192.203.228.78]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "smtp2.wemm.org", Issuer "StartCom Class 1 Primary Intermediate Server CA" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 6ACDDAA5; Mon, 12 Oct 2015 10:29:09 +0000 (UTC) (envelope-from peter@wemm.org) Received: from overcee.wemm.org (canning.wemm.org [192.203.228.65]) by smtp2.wemm.org (Postfix) with ESMTP id 00FEB41A; Mon, 12 Oct 2015 03:29:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=wemm.org; s=m20140428; t=1444645743; bh=8SQGFsmiOxXAazf3z4QBRoMk1skBSsmew3bQGdC22bE=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=EG7Nj8bcYsCn37eQefPQDOCIZLTNCGLyNtxpUwtihYI1Tfx/UJoHvAGFT1uODoOrp H/kaJVgh79Vh3Q5ZNzl4A7MZoxK+PpVKnNRLKEqNY+PRXeAhESjddruD1/AmzRe5iH x9NRo0YtZOdikVDtPdnbYS0Nf2mJp3kt3u/0Jt/U= From: Peter Wemm To: svn-src-head@freebsd.org Cc: Baptiste Daroussin , Adrian Chadd , "svn-src-all@freebsd.org" , "src-committers@freebsd.org" Subject: Re: svn commit: r289087 - in head: etc etc/dma libexec libexec/dma libexec/dma-mbox-create libexec/dma/dma libexec/dma/dma-mbox-create share/examples share/examples/dma Date: Mon, 12 Oct 2015 03:28:58 -0700 Message-ID: <18764496.s6PQvKbF0B@overcee.wemm.org> User-Agent: KMail/4.14.3 (FreeBSD/11.0-CURRENT; KDE/4.14.3; amd64; ; ) In-Reply-To: <20151010144422.GN91729@ivaldir.etoilebsd.net> References: <201510092209.t99M9iPx025401@repo.freebsd.org> <20151010144422.GN91729@ivaldir.etoilebsd.net> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="nextPart1484551.rXRBjzgciD"; micalg="pgp-sha256"; 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 " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Oct 2015 10:29:09 -0000 --nextPart1484551.rXRBjzgciD Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="us-ascii" On Saturday, October 10, 2015 04:44:23 PM Baptiste Daroussin wrote: > On Fri, Oct 09, 2015 at 08:15:57PM -0700, Adrian Chadd wrote: > > I think this broke being able to do installworld as non-root > >=20 > > 21:03 <@adrian> =3D=3D=3D> libexec/dma/dmagent (installconfig) > > 21:03 <@adrian> install: > > /home/adrian/work/freebsd/head-embedded/src/../root/mips_ap/etc/dma= /dma.co > > nf: chown/chgrp: Operation not permitted > > 21:03 <@adrian> *** Error code 71 >=20 > Fixed in r289115 >=20 > Bapt You've broken etcupdate with this, and also the freebsd cluster. # etcupdate status Warnings: Non-empty directory remains: /etc/dma You also made it delete ppp.conf: D /etc/ppp/ppp.conf D /etc/ppp Deleting people's config files is not good. =2D-=20 Peter Wemm - peter@wemm.org; peter@FreeBSD.org; peter@yahoo-inc.com; KI= 6FJV UTF-8: for when a ' or ... just won\342\200\231t do\342\200\246 --nextPart1484551.rXRBjzgciD Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part. Content-Transfer-Encoding: 7Bit -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQEcBAABCAAGBQJWG4tqAAoJEDXWlwnsgJ4EsB0H/jVwW2O7RTrNEs82A+OlJQLb Bz+aIfdeoVF/0f3RamzBe7ap8sVSer0odNWwpvk1l0FOwfd/ejreLjvNBoLpBMTA zb4cyxb4GooR/iE9DgAt3S7KJtlzi4zxLbLioIm1YQb7qYJdMMXGlsXjEBRJwG9t whSxp7wS3p2OB1h2Xpx+LbGKL/ps7v9A6BpS2/ce7KtlilxM09w09/f7Pl2MLjjv +MEYbmXitreRIAOaQ5Av8wbdZ7rlTHXvqTZ7jt20cnJOHASUzJfjURa+SQE1pHjS 5LJ2MBmxOlfzDBUtYse5tzHY/izKiWMqNSZNCGfbE8xCIX2Qj+1jt722bjwlIhY= =n/XD -----END PGP SIGNATURE----- --nextPart1484551.rXRBjzgciD-- From owner-svn-src-all@freebsd.org Mon Oct 12 10:42:54 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 66FB5A11C55; Mon, 12 Oct 2015 10:42:54 +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 18EA21379; Mon, 12 Oct 2015 10:42:54 +0000 (UTC) (envelope-from slw@zxy.spb.ru) Received: from slw by zxy.spb.ru with local (Exim 4.84 (FreeBSD)) (envelope-from ) id 1ZlaZ1-000EFZ-HJ; Mon, 12 Oct 2015 13:42:43 +0300 Date: Mon, 12 Oct 2015 13:42:43 +0300 From: Slawa Olhovchenkov To: Peter Wemm Cc: svn-src-head@freebsd.org, Adrian Chadd , Baptiste Daroussin , "src-committers@freebsd.org" , "svn-src-all@freebsd.org" Subject: Re: svn commit: r289087 - in head: etc etc/dma libexec libexec/dma libexec/dma-mbox-create libexec/dma/dma libexec/dma/dma-mbox-create share/examples share/examples/dma Message-ID: <20151012104243.GC42243@zxy.spb.ru> References: <201510092209.t99M9iPx025401@repo.freebsd.org> <20151010144422.GN91729@ivaldir.etoilebsd.net> <18764496.s6PQvKbF0B@overcee.wemm.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <18764496.s6PQvKbF0B@overcee.wemm.org> User-Agent: Mutt/1.5.23 (2014-03-12) X-SA-Exim-Connect-IP: X-SA-Exim-Mail-From: slw@zxy.spb.ru X-SA-Exim-Scanned: No (on zxy.spb.ru); SAEximRunCond expanded to false X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Oct 2015 10:42:54 -0000 On Mon, Oct 12, 2015 at 03:28:58AM -0700, Peter Wemm wrote: > On Saturday, October 10, 2015 04:44:23 PM Baptiste Daroussin wrote: > > On Fri, Oct 09, 2015 at 08:15:57PM -0700, Adrian Chadd wrote: > > > I think this broke being able to do installworld as non-root > > > > > > 21:03 <@adrian> ===> libexec/dma/dmagent (installconfig) > > > 21:03 <@adrian> install: > > > /home/adrian/work/freebsd/head-embedded/src/../root/mips_ap/etc/dma/dma.co > > > nf: chown/chgrp: Operation not permitted > > > 21:03 <@adrian> *** Error code 71 > > > > Fixed in r289115 > > > > Bapt > > You've broken etcupdate with this, and also the freebsd cluster. > > # etcupdate status > Warnings: > Non-empty directory remains: /etc/dma > > You also made it delete ppp.conf: > D /etc/ppp/ppp.conf > D /etc/ppp > > Deleting people's config files is not good. About etcupdate: # ls -l /var/db/etcupdate/current total 17 -r--r--r-- 1 root wheel 6197 Aug 27 10:20 COPYRIGHT drwxr-xr-x 2 root wheel 3 Aug 27 10:20 boot drwxr-xr-x 17 root wheel 89 Aug 27 10:20 etc drwxr-xr-x 2 root wheel 6 Aug 27 10:20 root lrwxr-xr-x 1 root wheel 11 Dec 8 2014 sys -> usr/src/sys drwxr-xr-x 3 root wheel 3 Dec 8 2014 usr drwxr-xr-x 3 root wheel 3 Dec 8 2014 var I think symlink 'sys' is unnecessary. As `usr/share` too: # ls -l /var/db/etcupdate/current/usr/share total 5 drwxr-xr-x 4 root wheel 5 Dec 8 2014 man drwxr-xr-x 2 root wheel 4 Dec 8 2014 nls drwxr-xr-x 3 root wheel 3 Dec 8 2014 openssl From owner-svn-src-all@freebsd.org Mon Oct 12 12:02:44 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 61111A11089; Mon, 12 Oct 2015 12:02:44 +0000 (UTC) (envelope-from baptiste.daroussin@gmail.com) Received: from mail-wi0-x232.google.com (mail-wi0-x232.google.com [IPv6:2a00:1450:400c:c05::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 05698B5; Mon, 12 Oct 2015 12:02:44 +0000 (UTC) (envelope-from baptiste.daroussin@gmail.com) Received: by wijq8 with SMTP id q8so54437182wij.0; Mon, 12 Oct 2015 05:02:42 -0700 (PDT) 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=ZwiI3jt5YWs1bAApnVFvKH8mQStc+nf/ADUlHSfUwTc=; b=ibAaEfKC/+t9Qz2/zN+KhTj+/0jFRH00RtdUGuwww/h+twaWC67Qgn3t53xKEv1TOv G2UU+5pLg1uyKsAuMN4k6XJEkNpHdxzWMozWrRKUu54FDgWwg+bW04AoIBqLO9WE5lVI iacrMxSa1PwY7S2ADAepbk7O2fHBiuWR60pPBXL2ZAeizrYHMenXNz6GfrxeMYICKKWO 56/zDf4zrPlI5N/fIfA2f+Z51ywqOg2wfg51g226LrolHYBmINwbVL3gJuQqkNZlQRx1 C3CTE16Rtr1e5S1XiNQCMTa+wYDWxKleWhrEzF7DP1ztxhmLQgjyt/4mx6pasEJFtE8l ItiA== X-Received: by 10.180.87.6 with SMTP id t6mr13358032wiz.20.1444651362250; Mon, 12 Oct 2015 05:02:42 -0700 (PDT) Received: from ivaldir.etoilebsd.net ([2001:41d0:8:db4c::1]) by smtp.gmail.com with ESMTPSA id jj8sm10651181wid.2.2015.10.12.05.02.41 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 12 Oct 2015 05:02:41 -0700 (PDT) Sender: Baptiste Daroussin Date: Mon, 12 Oct 2015 14:02:39 +0200 From: Baptiste Daroussin To: Peter Wemm Cc: svn-src-head@freebsd.org, Adrian Chadd , "src-committers@freebsd.org" , "svn-src-all@freebsd.org" Subject: Re: svn commit: r289087 - in head: etc etc/dma libexec libexec/dma libexec/dma-mbox-create libexec/dma/dma libexec/dma/dma-mbox-create share/examples share/examples/dma Message-ID: <20151012120239.GT91729@ivaldir.etoilebsd.net> References: <201510092209.t99M9iPx025401@repo.freebsd.org> <20151010144422.GN91729@ivaldir.etoilebsd.net> <18764496.s6PQvKbF0B@overcee.wemm.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="15k5Fuw+yLfT1d9X" Content-Disposition: inline In-Reply-To: <18764496.s6PQvKbF0B@overcee.wemm.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 " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Oct 2015 12:02:44 -0000 --15k5Fuw+yLfT1d9X Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Oct 12, 2015 at 03:28:58AM -0700, Peter Wemm wrote: > On Saturday, October 10, 2015 04:44:23 PM Baptiste Daroussin wrote: > > On Fri, Oct 09, 2015 at 08:15:57PM -0700, Adrian Chadd wrote: > > > I think this broke being able to do installworld as non-root > > >=20 > > > 21:03 <@adrian> =3D=3D=3D> libexec/dma/dmagent (installconfig) > > > 21:03 <@adrian> install: > > > /home/adrian/work/freebsd/head-embedded/src/../root/mips_ap/etc/dma/d= ma.co > > > nf: chown/chgrp: Operation not permitted > > > 21:03 <@adrian> *** Error code 71 > >=20 > > Fixed in r289115 > >=20 > > Bapt >=20 > You've broken etcupdate with this, and also the freebsd cluster. >=20 > # etcupdate status > Warnings: > Non-empty directory remains: /etc/dma >=20 > You also made it delete ppp.conf: > D /etc/ppp/ppp.conf > D /etc/ppp >=20 > Deleting people's config files is not good. Hu, make installconfig is hooked to make distribution, etcupdate is calling= make distribution to retrive the list of configurations files so it should get t= he config for ppp. Let me look into the etcupdate to see what is wrong with it. Best regards, Bapt --15k5Fuw+yLfT1d9X Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iEYEARECAAYFAlYboV4ACgkQ8kTtMUmk6EzzhgCeJfyqgqkeaD2xvYgDOctpT0Zy mRoAoLotbZFazDJ2fTVMPCYo8unRn2xd =N7BL -----END PGP SIGNATURE----- --15k5Fuw+yLfT1d9X-- From owner-svn-src-all@freebsd.org Mon Oct 12 12:24:57 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A7D32A1172A; Mon, 12 Oct 2015 12:24:57 +0000 (UTC) (envelope-from baptiste.daroussin@gmail.com) Received: from mail-wi0-x236.google.com (mail-wi0-x236.google.com [IPv6:2a00:1450:400c:c05::236]) (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 3C3CBFFC; Mon, 12 Oct 2015 12:24:57 +0000 (UTC) (envelope-from baptiste.daroussin@gmail.com) Received: by wijq8 with SMTP id q8so55341369wij.0; Mon, 12 Oct 2015 05:24:55 -0700 (PDT) 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=kekcuCkFqsHXAgARLZRbtfcxyJ6LDthAjM3vi9oq6eg=; b=AuPOX8+dF9AKtL3hBkokvkubXN5cAwNM7KTYPzVyUj02gTncNW7g75+XTHyibDBIFD q4LKd6R73w5b/pkwV6CMYxIIShiYesJAI6PMAXURmjH+yqyg/PK1ll1APfHumYAbdLSQ /e6exPcoRV3037+Yp844GnZ23E18jk0JGzkq4QSVK9Ktm2vrnyawYh0BSm8sn/sR/F5T A2HVwTNqmuSC9uEFWp5m8sfyWGskonenPB6LJ/bT2ZadUgNT9Ch0paYAmBJE3N6dSsZk NlHwyehnA3wurQcVG2njaUjlpxmyjgXJGAlKpE8pHMwNjhrsmeXC6ij8wWp8dFJPjoPY JcIA== X-Received: by 10.180.21.137 with SMTP id v9mr13759936wie.8.1444652695314; Mon, 12 Oct 2015 05:24:55 -0700 (PDT) Received: from ivaldir.etoilebsd.net ([2001:41d0:8:db4c::1]) by smtp.gmail.com with ESMTPSA id ds10sm3224517wib.24.2015.10.12.05.24.54 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 12 Oct 2015 05:24:54 -0700 (PDT) Sender: Baptiste Daroussin Date: Mon, 12 Oct 2015 14:24:52 +0200 From: Baptiste Daroussin To: Peter Wemm Cc: svn-src-head@freebsd.org, Adrian Chadd , "svn-src-all@freebsd.org" , "src-committers@freebsd.org" Subject: Re: svn commit: r289087 - in head: etc etc/dma libexec libexec/dma libexec/dma-mbox-create libexec/dma/dma libexec/dma/dma-mbox-create share/examples share/examples/dma Message-ID: <20151012122452.GU91729@ivaldir.etoilebsd.net> References: <201510092209.t99M9iPx025401@repo.freebsd.org> <20151010144422.GN91729@ivaldir.etoilebsd.net> <18764496.s6PQvKbF0B@overcee.wemm.org> <20151012120239.GT91729@ivaldir.etoilebsd.net> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="lIC76ItX9S6XOZ/S" Content-Disposition: inline In-Reply-To: <20151012120239.GT91729@ivaldir.etoilebsd.net> 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 " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Oct 2015 12:24:57 -0000 --lIC76ItX9S6XOZ/S Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Oct 12, 2015 at 02:02:39PM +0200, Baptiste Daroussin wrote: > On Mon, Oct 12, 2015 at 03:28:58AM -0700, Peter Wemm wrote: > > On Saturday, October 10, 2015 04:44:23 PM Baptiste Daroussin wrote: > > > On Fri, Oct 09, 2015 at 08:15:57PM -0700, Adrian Chadd wrote: > > > > I think this broke being able to do installworld as non-root > > > >=20 > > > > 21:03 <@adrian> =3D=3D=3D> libexec/dma/dmagent (installconfig) > > > > 21:03 <@adrian> install: > > > > /home/adrian/work/freebsd/head-embedded/src/../root/mips_ap/etc/dma= /dma.co > > > > nf: chown/chgrp: Operation not permitted > > > > 21:03 <@adrian> *** Error code 71 > > >=20 > > > Fixed in r289115 > > >=20 > > > Bapt > >=20 > > You've broken etcupdate with this, and also the freebsd cluster. > >=20 > > # etcupdate status > > Warnings: > > Non-empty directory remains: /etc/dma > >=20 > > You also made it delete ppp.conf: > > D /etc/ppp/ppp.conf > > D /etc/ppp > >=20 > > Deleting people's config files is not good. >=20 > Hu, make installconfig is hooked to make distribution, etcupdate is calli= ng make > distribution to retrive the list of configurations files so it should get= the > config for ppp. >=20 > Let me look into the etcupdate to see what is wrong with it. >=20 > Best regards, > Bapt After checking I can confirm that etcupdate properly get the config: etcupdate build something.tar tar tvf something.tar | grep ppp.conf -rw------- 0 root wheel 1144 Oct 12 14:23 ./etc/ppp/ppp.conf Am I missing something? Best regards, Bapt --lIC76ItX9S6XOZ/S Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iEYEARECAAYFAlYbppQACgkQ8kTtMUmk6EwtNACdGkTWqqtHwY91zetwKK2o1i/j I4sAnAkCZo7/8yXfgFT8STJM0LIvgRz4 =E9j+ -----END PGP SIGNATURE----- --lIC76ItX9S6XOZ/S-- From owner-svn-src-all@freebsd.org Mon Oct 12 12:39:48 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B757AA11AAD; Mon, 12 Oct 2015 12:39:48 +0000 (UTC) (envelope-from baptiste.daroussin@gmail.com) Received: from mail-wi0-x235.google.com (mail-wi0-x235.google.com [IPv6:2a00:1450:400c: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 437FA18B2; Mon, 12 Oct 2015 12:39:48 +0000 (UTC) (envelope-from baptiste.daroussin@gmail.com) Received: by wicgb1 with SMTP id gb1so147363248wic.1; Mon, 12 Oct 2015 05:39:46 -0700 (PDT) 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=CtOGobR8yu8XwqMzcOiSsLn0aCIfOrHxkaUt3iKxotI=; b=LIij0eG3NYw5uBOzBREiKSaris8cPhEev97952qpzk/1/4+yb2QNnZLpC+wwcUEuI0 QZ33oH/27FJvsGemYhYib38+QzhmvmHuur51cEO8ZH2IsnzQ0D5WCrCzmNgbeJgT8oBf vguqx8ZzubKH0yvCLiH3NwQPJxP5IqoNekf2upMzdlQtIwPgHQigk1hSN9WvLUQ1nhq2 hoTi3YmEJKuBuD7MjkkkMTzZmjcN9haNYguFkVsBBwzplVqlw3l+Aa2+m7etHWrK+Pf5 Rh0bfJSLw7oYQ/VYPrH/4ZmQIAVKx7bLMT7+0JtaUm/rMjLwKJ+Ss6Oj9ilBSMzLG+Rp R9NQ== X-Received: by 10.194.171.69 with SMTP id as5mr30231828wjc.137.1444653586716; Mon, 12 Oct 2015 05:39:46 -0700 (PDT) Received: from ivaldir.etoilebsd.net ([2001:41d0:8:db4c::1]) by smtp.gmail.com with ESMTPSA id i3sm10744010wij.9.2015.10.12.05.39.46 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 12 Oct 2015 05:39:46 -0700 (PDT) Sender: Baptiste Daroussin Date: Mon, 12 Oct 2015 14:39:44 +0200 From: Baptiste Daroussin To: Peter Wemm Cc: svn-src-head@freebsd.org, Adrian Chadd , "svn-src-all@freebsd.org" , "src-committers@freebsd.org" Subject: Re: svn commit: r289087 - in head: etc etc/dma libexec libexec/dma libexec/dma-mbox-create libexec/dma/dma libexec/dma/dma-mbox-create share/examples share/examples/dma Message-ID: <20151012123944.GA55137@ivaldir.etoilebsd.net> References: <201510092209.t99M9iPx025401@repo.freebsd.org> <20151010144422.GN91729@ivaldir.etoilebsd.net> <18764496.s6PQvKbF0B@overcee.wemm.org> <20151012120239.GT91729@ivaldir.etoilebsd.net> <20151012122452.GU91729@ivaldir.etoilebsd.net> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="XsQoSWH+UP9D9v3l" Content-Disposition: inline In-Reply-To: <20151012122452.GU91729@ivaldir.etoilebsd.net> 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 " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Oct 2015 12:39:48 -0000 --XsQoSWH+UP9D9v3l Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Oct 12, 2015 at 02:24:52PM +0200, Baptiste Daroussin wrote: > On Mon, Oct 12, 2015 at 02:02:39PM +0200, Baptiste Daroussin wrote: > > On Mon, Oct 12, 2015 at 03:28:58AM -0700, Peter Wemm wrote: > > > On Saturday, October 10, 2015 04:44:23 PM Baptiste Daroussin wrote: > > > > On Fri, Oct 09, 2015 at 08:15:57PM -0700, Adrian Chadd wrote: > > > > > I think this broke being able to do installworld as non-root > > > > >=20 > > > > > 21:03 <@adrian> =3D=3D=3D> libexec/dma/dmagent (installconfig) > > > > > 21:03 <@adrian> install: > > > > > /home/adrian/work/freebsd/head-embedded/src/../root/mips_ap/etc/d= ma/dma.co > > > > > nf: chown/chgrp: Operation not permitted > > > > > 21:03 <@adrian> *** Error code 71 > > > >=20 > > > > Fixed in r289115 > > > >=20 > > > > Bapt > > >=20 > > > You've broken etcupdate with this, and also the freebsd cluster. > > >=20 > > > # etcupdate status > > > Warnings: > > > Non-empty directory remains: /etc/dma > > >=20 > > > You also made it delete ppp.conf: > > > D /etc/ppp/ppp.conf > > > D /etc/ppp > > >=20 > > > Deleting people's config files is not good. > >=20 > > Hu, make installconfig is hooked to make distribution, etcupdate is cal= ling make > > distribution to retrive the list of configurations files so it should g= et the > > config for ppp. > >=20 > > Let me look into the etcupdate to see what is wrong with it. > >=20 > > Best regards, > > Bapt >=20 >=20 >=20 > After checking I can confirm that etcupdate properly get the config: >=20 > etcupdate build something.tar > tar tvf something.tar | grep ppp.conf > -rw------- 0 root wheel 1144 Oct 12 14:23 ./etc/ppp/ppp.conf >=20 >=20 > Am I missing something? I compared the tarball from before and after my change and there is no differences. I Compared: r289000 and r289183 Bapt --XsQoSWH+UP9D9v3l Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iEYEARECAAYFAlYbqhAACgkQ8kTtMUmk6ExlSgCfSop+6xqEczs8A6j/8gFsfOAQ zD8AnRmFJ8s2zOdzTHYZHHFWYxY71TON =6Wb7 -----END PGP SIGNATURE----- --XsQoSWH+UP9D9v3l-- From owner-svn-src-all@freebsd.org Mon Oct 12 13:20:18 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8CDDAA11478; Mon, 12 Oct 2015 13:20:18 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3B16CF9A; Mon, 12 Oct 2015 13:20:18 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t9CDKHK2098740; Mon, 12 Oct 2015 13:20:17 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9CDKHqt098739; Mon, 12 Oct 2015 13:20:17 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <201510121320.t9CDKHqt098739@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Mon, 12 Oct 2015 13:20:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r289184 - stable/10/sys/arm/mv 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 " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Oct 2015 13:20:18 -0000 Author: andrew Date: Mon Oct 12 13:20:17 2015 New Revision: 289184 URL: https://svnweb.freebsd.org/changeset/base/289184 Log: MFC of r288447. Only the Marvell driver has been updated as there is no support for Raspbetty Pi 2 in stable/10. An IPI must be cleared before it is handled otherwise next IPI could be missed. In other words, if a new request for an IPI is sent while the previous request is being handled but the IPI is not cleared yet, the clearing of the previous IPI request also clears the new one and the handling is missed. There are only three MP interrupt controllers in ARM now. Two of them are fixed by this change, the third one is correct, probably only just by accident. The fix is minimalistic as new interrupt framework is awaited. It was debugged on RPi2 where missing IPI handling together with SCHED_ULE led to situation in which tdq_ipipending was not cleared and so IPI_PREEMPT was stopped to be sent. Various odditys were found related to slow system response time like various events timed out, and slow console response. Modified: stable/10/sys/arm/mv/mpic.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/arm/mv/mpic.c ============================================================================== --- stable/10/sys/arm/mv/mpic.c Mon Oct 12 10:44:20 2015 (r289183) +++ stable/10/sys/arm/mv/mpic.c Mon Oct 12 13:20:17 2015 (r289184) @@ -378,10 +378,14 @@ int pic_ipi_get(int i __unused) { uint32_t val; + int ipi; val = MPIC_CPU_READ(mv_mpic_sc, MPIC_IN_DRBL); - if (val) - return (ffs(val) - 1); + if (val) { + ipi = ffs(val) - 1; + MPIC_CPU_WRITE(mv_mpic_sc, MPIC_IN_DRBL, ~(1 << ipi)); + return (ipi); + } return (0x3ff); } @@ -389,10 +393,6 @@ pic_ipi_get(int i __unused) void pic_ipi_clear(int ipi) { - uint32_t val; - - val = ~(1 << ipi); - MPIC_CPU_WRITE(mv_mpic_sc, MPIC_IN_DRBL, val); } #endif From owner-svn-src-all@freebsd.org Mon Oct 12 14:23:01 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8F32DA11842; Mon, 12 Oct 2015 14:23:01 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 640F71B1F; Mon, 12 Oct 2015 14:23:01 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t9CEN09M019800; Mon, 12 Oct 2015 14:23:00 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9CEN0Pq019799; Mon, 12 Oct 2015 14:23:00 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201510121423.t9CEN0Pq019799@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Mon, 12 Oct 2015 14:23:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r289185 - vendor-sys/illumos/dist/uts/common/fs/zfs X-SVN-Group: vendor-sys MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Oct 2015 14:23:01 -0000 Author: mav Date: Mon Oct 12 14:23:00 2015 New Revision: 289185 URL: https://svnweb.freebsd.org/changeset/base/289185 Log: 6250 zvol_dump_init() can hold txg open Reviewed by: Matthew Ahrens Reviewed by: Prakash Surya Reviewed by: Albert Lee Reviewed by: Xin Li Approved by: Garrett D'Amore Author: George Wilson illumos/illumos-gate@b10bba72460aeaa53119c76ff5e647fd5585bece Modified: vendor-sys/illumos/dist/uts/common/fs/zfs/zvol.c Modified: vendor-sys/illumos/dist/uts/common/fs/zfs/zvol.c ============================================================================== --- vendor-sys/illumos/dist/uts/common/fs/zfs/zvol.c Mon Oct 12 13:20:17 2015 (r289184) +++ vendor-sys/illumos/dist/uts/common/fs/zfs/zvol.c Mon Oct 12 14:23:00 2015 (r289185) @@ -1893,13 +1893,15 @@ zvol_dump_init(zvol_state_t *zv, boolean vdev_t *vd = spa->spa_root_vdev; nvlist_t *nv = NULL; uint64_t version = spa_version(spa); - enum zio_checksum checksum; + uint64_t checksum, compress, refresrv, vbs, dedup; ASSERT(MUTEX_HELD(&zfsdev_state_lock)); ASSERT(vd->vdev_ops == &vdev_root_ops); error = dmu_free_long_range(zv->zv_objset, ZVOL_OBJ, 0, DMU_OBJECT_END); + if (error != 0) + return (error); /* wait for dmu_free_long_range to actually free the blocks */ txg_wait_synced(dmu_objset_pool(zv->zv_objset), 0); @@ -1923,24 +1925,42 @@ zvol_dump_init(zvol_state_t *zv, boolean 2, ZFS_SPACE_CHECK_RESERVED); } + if (!resize) { + error = dsl_prop_get_integer(zv->zv_name, + zfs_prop_to_name(ZFS_PROP_COMPRESSION), &compress, NULL); + if (error == 0) { + error = dsl_prop_get_integer(zv->zv_name, + zfs_prop_to_name(ZFS_PROP_CHECKSUM), &checksum, + NULL); + } + if (error == 0) { + error = dsl_prop_get_integer(zv->zv_name, + zfs_prop_to_name(ZFS_PROP_REFRESERVATION), + &refresrv, NULL); + } + if (error == 0) { + error = dsl_prop_get_integer(zv->zv_name, + zfs_prop_to_name(ZFS_PROP_VOLBLOCKSIZE), &vbs, + NULL); + } + if (version >= SPA_VERSION_DEDUP && error == 0) { + error = dsl_prop_get_integer(zv->zv_name, + zfs_prop_to_name(ZFS_PROP_DEDUP), &dedup, NULL); + } + } + if (error != 0) + return (error); + tx = dmu_tx_create(os); dmu_tx_hold_zap(tx, ZVOL_ZAP_OBJ, TRUE, NULL); dmu_tx_hold_bonus(tx, ZVOL_OBJ); error = dmu_tx_assign(tx, TXG_WAIT); - if (error) { + if (error != 0) { dmu_tx_abort(tx); return (error); } /* - * If MULTI_VDEV_CRASH_DUMP is active, use the NOPARITY checksum - * function. Otherwise, use the old default -- OFF. - */ - checksum = spa_feature_is_active(spa, - SPA_FEATURE_MULTI_VDEV_CRASH_DUMP) ? ZIO_CHECKSUM_NOPARITY : - ZIO_CHECKSUM_OFF; - - /* * If we are resizing the dump device then we only need to * update the refreservation to match the newly updated * zvolsize. Otherwise, we save off the original state of the @@ -1951,37 +1971,30 @@ zvol_dump_init(zvol_state_t *zv, boolean zfs_prop_to_name(ZFS_PROP_REFRESERVATION), 8, 1, &zv->zv_volsize, tx); } else { - uint64_t checksum, compress, refresrv, vbs, dedup; - - error = dsl_prop_get_integer(zv->zv_name, - zfs_prop_to_name(ZFS_PROP_COMPRESSION), &compress, NULL); - error = error ? error : dsl_prop_get_integer(zv->zv_name, - zfs_prop_to_name(ZFS_PROP_CHECKSUM), &checksum, NULL); - error = error ? error : dsl_prop_get_integer(zv->zv_name, - zfs_prop_to_name(ZFS_PROP_REFRESERVATION), &refresrv, NULL); - error = error ? error : dsl_prop_get_integer(zv->zv_name, - zfs_prop_to_name(ZFS_PROP_VOLBLOCKSIZE), &vbs, NULL); - if (version >= SPA_VERSION_DEDUP) { - error = error ? error : - dsl_prop_get_integer(zv->zv_name, - zfs_prop_to_name(ZFS_PROP_DEDUP), &dedup, NULL); - } - - error = error ? error : zap_update(os, ZVOL_ZAP_OBJ, + error = zap_update(os, ZVOL_ZAP_OBJ, zfs_prop_to_name(ZFS_PROP_COMPRESSION), 8, 1, &compress, tx); - error = error ? error : zap_update(os, ZVOL_ZAP_OBJ, - zfs_prop_to_name(ZFS_PROP_CHECKSUM), 8, 1, &checksum, tx); - error = error ? error : zap_update(os, ZVOL_ZAP_OBJ, - zfs_prop_to_name(ZFS_PROP_REFRESERVATION), 8, 1, - &refresrv, tx); - error = error ? error : zap_update(os, ZVOL_ZAP_OBJ, - zfs_prop_to_name(ZFS_PROP_VOLBLOCKSIZE), 8, 1, - &vbs, tx); - error = error ? error : dmu_object_set_blocksize( - os, ZVOL_OBJ, SPA_OLD_MAXBLOCKSIZE, 0, tx); - if (version >= SPA_VERSION_DEDUP) { - error = error ? error : zap_update(os, ZVOL_ZAP_OBJ, + if (error == 0) { + error = zap_update(os, ZVOL_ZAP_OBJ, + zfs_prop_to_name(ZFS_PROP_CHECKSUM), 8, 1, + &checksum, tx); + } + if (error == 0) { + error = zap_update(os, ZVOL_ZAP_OBJ, + zfs_prop_to_name(ZFS_PROP_REFRESERVATION), 8, 1, + &refresrv, tx); + } + if (error == 0) { + error = zap_update(os, ZVOL_ZAP_OBJ, + zfs_prop_to_name(ZFS_PROP_VOLBLOCKSIZE), 8, 1, + &vbs, tx); + } + if (error == 0) { + error = dmu_object_set_blocksize( + os, ZVOL_OBJ, SPA_OLD_MAXBLOCKSIZE, 0, tx); + } + if (version >= SPA_VERSION_DEDUP && error == 0) { + error = zap_update(os, ZVOL_ZAP_OBJ, zfs_prop_to_name(ZFS_PROP_DEDUP), 8, 1, &dedup, tx); } @@ -1994,7 +2007,15 @@ zvol_dump_init(zvol_state_t *zv, boolean * We only need update the zvol's property if we are initializing * the dump area for the first time. */ - if (!resize) { + if (error == 0 && !resize) { + /* + * If MULTI_VDEV_CRASH_DUMP is active, use the NOPARITY checksum + * function. Otherwise, use the old default -- OFF. + */ + checksum = spa_feature_is_active(spa, + SPA_FEATURE_MULTI_VDEV_CRASH_DUMP) ? ZIO_CHECKSUM_NOPARITY : + ZIO_CHECKSUM_OFF; + VERIFY(nvlist_alloc(&nv, NV_UNIQUE_NAME, KM_SLEEP) == 0); VERIFY(nvlist_add_uint64(nv, zfs_prop_to_name(ZFS_PROP_REFRESERVATION), 0) == 0); @@ -2013,13 +2034,11 @@ zvol_dump_init(zvol_state_t *zv, boolean error = zfs_set_prop_nvlist(zv->zv_name, ZPROP_SRC_LOCAL, nv, NULL); nvlist_free(nv); - - if (error) - return (error); } /* Allocate the space for the dump */ - error = zvol_prealloc(zv); + if (error == 0) + error = zvol_prealloc(zv); return (error); } From owner-svn-src-all@freebsd.org Mon Oct 12 14:23:11 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id DC6ABA11875; Mon, 12 Oct 2015 14:23:11 +0000 (UTC) (envelope-from vangyzen@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A701B1C69; Mon, 12 Oct 2015 14:23:11 +0000 (UTC) (envelope-from vangyzen@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t9CENA66019852; Mon, 12 Oct 2015 14:23:10 GMT (envelope-from vangyzen@FreeBSD.org) Received: (from vangyzen@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9CENAmE019851; Mon, 12 Oct 2015 14:23:10 GMT (envelope-from vangyzen@FreeBSD.org) Message-Id: <201510121423.t9CENAmE019851@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: vangyzen set sender to vangyzen@FreeBSD.org using -f From: Eric van Gyzen Date: Mon, 12 Oct 2015 14:23:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289186 - head/etc/rc.d X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Oct 2015 14:23:12 -0000 Author: vangyzen Date: Mon Oct 12 14:23:10 2015 New Revision: 289186 URL: https://svnweb.freebsd.org/changeset/base/289186 Log: Fix indentation in etc/rc.d/fsck. MFC after: 3 days Sponsored by: Dell Inc. Modified: head/etc/rc.d/fsck Modified: head/etc/rc.d/fsck ============================================================================== --- head/etc/rc.d/fsck Mon Oct 12 14:23:00 2015 (r289185) +++ head/etc/rc.d/fsck Mon Oct 12 14:23:10 2015 (r289186) @@ -20,7 +20,7 @@ fsck_start() elif [ ! -r /etc/fstab ]; then echo "Warning! No /etc/fstab: skipping disk checks." elif [ "$autoboot" = yes ]; then - # During fsck ignore SIGQUIT + # During fsck ignore SIGQUIT trap : 3 check_startmsgs && echo "Starting file system checks:" From owner-svn-src-all@freebsd.org Mon Oct 12 14:24:13 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 43DB8A1192E; Mon, 12 Oct 2015 14:24:13 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E5ED61F26; Mon, 12 Oct 2015 14:24:12 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t9CEOBFZ020072; Mon, 12 Oct 2015 14:24:11 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9CEOBYv020071; Mon, 12 Oct 2015 14:24:11 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201510121424.t9CEOBYv020071@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Mon, 12 Oct 2015 14:24:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r289187 - vendor-sys/illumos/dist/uts/common/fs/zfs X-SVN-Group: vendor-sys MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Oct 2015 14:24:13 -0000 Author: mav Date: Mon Oct 12 14:24:11 2015 New Revision: 289187 URL: https://svnweb.freebsd.org/changeset/base/289187 Log: 6251 add tunable to disable free_bpobj processing Reviewed by: Matthew Ahrens Reviewed by: Prakash Surya Reviewed by: Simon Klinkert Reviewed by: Richard Elling Reviewed by: Albert Lee Reviewed by: Xin Li Approved by: Garrett D'Amore Author: George Wilson illumos/illumos-gate@139510fb6efa97dbe5f5479594b308d940cab8d1 Modified: vendor-sys/illumos/dist/uts/common/fs/zfs/dsl_scan.c Modified: vendor-sys/illumos/dist/uts/common/fs/zfs/dsl_scan.c ============================================================================== --- vendor-sys/illumos/dist/uts/common/fs/zfs/dsl_scan.c Mon Oct 12 14:23:10 2015 (r289186) +++ vendor-sys/illumos/dist/uts/common/fs/zfs/dsl_scan.c Mon Oct 12 14:24:11 2015 (r289187) @@ -20,7 +20,7 @@ */ /* * Copyright (c) 2008, 2010, Oracle and/or its affiliates. All rights reserved. - * Copyright (c) 2011, 2014 by Delphix. All rights reserved. + * Copyright (c) 2011, 2015 by Delphix. All rights reserved. */ #include @@ -78,6 +78,11 @@ uint64_t zfs_free_max_blocks = UINT64_MA extern int zfs_txg_timeout; +/* + * Enable/disable the processing of the free_bpobj object. + */ +boolean_t zfs_free_bpobj_enabled = B_TRUE; + /* the order has to match pool_scan_type */ static scan_cb_t *scan_funcs[POOL_SCAN_FUNCS] = { NULL, @@ -1426,7 +1431,8 @@ dsl_scan_sync(dsl_pool_t *dp, dmu_tx_t * * have to worry about traversing it. It is also faster to free the * blocks than to scrub them. */ - if (spa_version(dp->dp_spa) >= SPA_VERSION_DEADLISTS) { + if (zfs_free_bpobj_enabled && + spa_version(dp->dp_spa) >= SPA_VERSION_DEADLISTS) { scn->scn_is_bptree = B_FALSE; scn->scn_zio_root = zio_root(dp->dp_spa, NULL, NULL, ZIO_FLAG_MUSTSUCCEED); From owner-svn-src-all@freebsd.org Mon Oct 12 14:27:28 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B49B3A11A66; Mon, 12 Oct 2015 14:27:28 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 671AB687; Mon, 12 Oct 2015 14:27:28 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t9CERRoG020403; Mon, 12 Oct 2015 14:27:27 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9CERRqi020401; Mon, 12 Oct 2015 14:27:27 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201510121427.t9CERRqi020401@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Mon, 12 Oct 2015 14:27:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r289188 - vendor-sys/illumos/dist/uts/common/fs/zfs X-SVN-Group: vendor-sys MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Oct 2015 14:27:28 -0000 Author: mav Date: Mon Oct 12 14:27:27 2015 New Revision: 289188 URL: https://svnweb.freebsd.org/changeset/base/289188 Log: 6281 prefetching should apply to 1MB reads Reviewed by: Matthew Ahrens Reviewed by: Paul Dagnelie Reviewed by: Alexander Motin Reviewed by: Dan McDonald Reviewed by: Justin Gibbs Reviewed by: Xin Li Approved by: Gordon Ross Author: George Wilson illumos/illumos-gate@632802744ef6d17e06d6980a95f631615c3b060f Modified: vendor-sys/illumos/dist/uts/common/fs/zfs/dmu.c vendor-sys/illumos/dist/uts/common/fs/zfs/dmu_zfetch.c Modified: vendor-sys/illumos/dist/uts/common/fs/zfs/dmu.c ============================================================================== --- vendor-sys/illumos/dist/uts/common/fs/zfs/dmu.c Mon Oct 12 14:24:11 2015 (r289187) +++ vendor-sys/illumos/dist/uts/common/fs/zfs/dmu.c Mon Oct 12 14:27:27 2015 (r289188) @@ -442,7 +442,7 @@ dmu_buf_hold_array_by_dnode(dnode_t *dn, } if ((flags & DMU_READ_NO_PREFETCH) == 0 && read && - length < zfetch_array_rd_sz) { + length <= zfetch_array_rd_sz) { dmu_zfetch(&dn->dn_zfetch, blkid, nblks); } rw_exit(&dn->dn_struct_rwlock); Modified: vendor-sys/illumos/dist/uts/common/fs/zfs/dmu_zfetch.c ============================================================================== --- vendor-sys/illumos/dist/uts/common/fs/zfs/dmu_zfetch.c Mon Oct 12 14:24:11 2015 (r289187) +++ vendor-sys/illumos/dist/uts/common/fs/zfs/dmu_zfetch.c Mon Oct 12 14:27:27 2015 (r289188) @@ -24,7 +24,7 @@ */ /* - * Copyright (c) 2013, 2014 by Delphix. All rights reserved. + * Copyright (c) 2013, 2015 by Delphix. All rights reserved. */ #include @@ -49,7 +49,7 @@ uint32_t zfetch_max_streams = 8; uint32_t zfetch_min_sec_reap = 2; /* max bytes to prefetch per stream (default 8MB) */ uint32_t zfetch_max_distance = 8 * 1024 * 1024; -/* number of bytes in a array_read at which we stop prefetching (1MB) */ +/* max number of bytes in an array_read in which we allow prefetching (1MB) */ uint64_t zfetch_array_rd_sz = 1024 * 1024; typedef struct zfetch_stats { From owner-svn-src-all@freebsd.org Mon Oct 12 15:35:35 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id EC793A11E2E; Mon, 12 Oct 2015 15:35:35 +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 9C198D8A; Mon, 12 Oct 2015 15:35:35 +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 t9CFZYtd041428; Mon, 12 Oct 2015 15:35:34 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9CFZY6m041427; Mon, 12 Oct 2015 15:35:34 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201510121535.t9CFZY6m041427@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Mon, 12 Oct 2015 15:35:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289189 - head/contrib/elftoolchain/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 " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Oct 2015 15:35:36 -0000 Author: emaste Date: Mon Oct 12 15:35:34 2015 New Revision: 289189 URL: https://svnweb.freebsd.org/changeset/base/289189 Log: Add missing commas Pointy hat to: kan Obtained from: ELF Tool Chain r3253 Modified: head/contrib/elftoolchain/common/elfdefinitions.h Modified: head/contrib/elftoolchain/common/elfdefinitions.h ============================================================================== --- head/contrib/elftoolchain/common/elfdefinitions.h Mon Oct 12 14:27:27 2015 (r289188) +++ head/contrib/elftoolchain/common/elfdefinitions.h Mon Oct 12 15:35:34 2015 (r289189) @@ -1678,19 +1678,19 @@ _ELF_DEFINE_RELOC(R_MIPS_GOTHI16, 21) \ _ELF_DEFINE_RELOC(R_MIPS_GOTLO16, 22) \ _ELF_DEFINE_RELOC(R_MIPS_CALLHI16, 30) \ _ELF_DEFINE_RELOC(R_MIPS_CALLLO16, 31) \ -_ELF_DEFINE_RELOC(R_MIPS_TLS_DTPMOD32 38) \ -_ELF_DEFINE_RELOC(R_MIPS_TLS_DTPREL32 39) \ -_ELF_DEFINE_RELOC(R_MIPS_TLS_DTPMOD64 40) \ -_ELF_DEFINE_RELOC(R_MIPS_TLS_DTPREL64 41) \ -_ELF_DEFINE_RELOC(R_MIPS_TLS_GD 42) \ -_ELF_DEFINE_RELOC(R_MIPS_TLS_LDM 43) \ -_ELF_DEFINE_RELOC(R_MIPS_TLS_DTPREL_HI16 44) \ -_ELF_DEFINE_RELOC(R_MIPS_TLS_DTPREL_LO16 45) \ -_ELF_DEFINE_RELOC(R_MIPS_TLS_GOTTPREL 46) \ -_ELF_DEFINE_RELOC(R_MIPS_TLS_TPREL32 47) \ -_ELF_DEFINE_RELOC(R_MIPS_TLS_TPREL64 48) \ -_ELF_DEFINE_RELOC(R_MIPS_TLS_TPREL_HI16 49) \ -_ELF_DEFINE_RELOC(R_MIPS_TLS_TPREL_LO16 50) +_ELF_DEFINE_RELOC(R_MIPS_TLS_DTPMOD32, 38) \ +_ELF_DEFINE_RELOC(R_MIPS_TLS_DTPREL32, 39) \ +_ELF_DEFINE_RELOC(R_MIPS_TLS_DTPMOD64, 40) \ +_ELF_DEFINE_RELOC(R_MIPS_TLS_DTPREL64, 41) \ +_ELF_DEFINE_RELOC(R_MIPS_TLS_GD, 42) \ +_ELF_DEFINE_RELOC(R_MIPS_TLS_LDM, 43) \ +_ELF_DEFINE_RELOC(R_MIPS_TLS_DTPREL_HI16, 44) \ +_ELF_DEFINE_RELOC(R_MIPS_TLS_DTPREL_LO16, 45) \ +_ELF_DEFINE_RELOC(R_MIPS_TLS_GOTTPREL, 46) \ +_ELF_DEFINE_RELOC(R_MIPS_TLS_TPREL32, 47) \ +_ELF_DEFINE_RELOC(R_MIPS_TLS_TPREL64, 48) \ +_ELF_DEFINE_RELOC(R_MIPS_TLS_TPREL_HI16, 49) \ +_ELF_DEFINE_RELOC(R_MIPS_TLS_TPREL_LO16, 50) #define _ELF_DEFINE_PPC32_RELOCATIONS() \ _ELF_DEFINE_RELOC(R_PPC_NONE, 0) \ From owner-svn-src-all@freebsd.org Mon Oct 12 15:39:04 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C8544A11F48; Mon, 12 Oct 2015 15:39:04 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 39868F86; Mon, 12 Oct 2015 15:39:04 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t9CFd3V5041573; Mon, 12 Oct 2015 15:39:03 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9CFd35j041572; Mon, 12 Oct 2015 15:39:03 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201510121539.t9CFd35j041572@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Mon, 12 Oct 2015 15:39:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289190 - 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 " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Oct 2015 15:39:05 -0000 Author: mav Date: Mon Oct 12 15:39:03 2015 New Revision: 289190 URL: https://svnweb.freebsd.org/changeset/base/289190 Log: MFV r289185: 6250 zvol_dump_init() can hold txg open Reviewed by: Matthew Ahrens Reviewed by: Prakash Surya Reviewed by: Albert Lee Reviewed by: Xin Li Approved by: Garrett D'Amore Author: George Wilson illumos/illumos-gate@b10bba72460aeaa53119c76ff5e647fd5585bece Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zvol.c Directory Properties: head/sys/cddl/contrib/opensolaris/ (props changed) Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zvol.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zvol.c Mon Oct 12 15:35:34 2015 (r289189) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zvol.c Mon Oct 12 15:39:03 2015 (r289190) @@ -2335,13 +2335,15 @@ zvol_dump_init(zvol_state_t *zv, boolean vdev_t *vd = spa->spa_root_vdev; nvlist_t *nv = NULL; uint64_t version = spa_version(spa); - enum zio_checksum checksum; + uint64_t checksum, compress, refresrv, vbs, dedup; ASSERT(MUTEX_HELD(&zfsdev_state_lock)); ASSERT(vd->vdev_ops == &vdev_root_ops); error = dmu_free_long_range(zv->zv_objset, ZVOL_OBJ, 0, DMU_OBJECT_END); + if (error != 0) + return (error); /* wait for dmu_free_long_range to actually free the blocks */ txg_wait_synced(dmu_objset_pool(zv->zv_objset), 0); @@ -2365,24 +2367,42 @@ zvol_dump_init(zvol_state_t *zv, boolean 2, ZFS_SPACE_CHECK_RESERVED); } + if (!resize) { + error = dsl_prop_get_integer(zv->zv_name, + zfs_prop_to_name(ZFS_PROP_COMPRESSION), &compress, NULL); + if (error == 0) { + error = dsl_prop_get_integer(zv->zv_name, + zfs_prop_to_name(ZFS_PROP_CHECKSUM), &checksum, + NULL); + } + if (error == 0) { + error = dsl_prop_get_integer(zv->zv_name, + zfs_prop_to_name(ZFS_PROP_REFRESERVATION), + &refresrv, NULL); + } + if (error == 0) { + error = dsl_prop_get_integer(zv->zv_name, + zfs_prop_to_name(ZFS_PROP_VOLBLOCKSIZE), &vbs, + NULL); + } + if (version >= SPA_VERSION_DEDUP && error == 0) { + error = dsl_prop_get_integer(zv->zv_name, + zfs_prop_to_name(ZFS_PROP_DEDUP), &dedup, NULL); + } + } + if (error != 0) + return (error); + tx = dmu_tx_create(os); dmu_tx_hold_zap(tx, ZVOL_ZAP_OBJ, TRUE, NULL); dmu_tx_hold_bonus(tx, ZVOL_OBJ); error = dmu_tx_assign(tx, TXG_WAIT); - if (error) { + if (error != 0) { dmu_tx_abort(tx); return (error); } /* - * If MULTI_VDEV_CRASH_DUMP is active, use the NOPARITY checksum - * function. Otherwise, use the old default -- OFF. - */ - checksum = spa_feature_is_active(spa, - SPA_FEATURE_MULTI_VDEV_CRASH_DUMP) ? ZIO_CHECKSUM_NOPARITY : - ZIO_CHECKSUM_OFF; - - /* * If we are resizing the dump device then we only need to * update the refreservation to match the newly updated * zvolsize. Otherwise, we save off the original state of the @@ -2393,37 +2413,30 @@ zvol_dump_init(zvol_state_t *zv, boolean zfs_prop_to_name(ZFS_PROP_REFRESERVATION), 8, 1, &zv->zv_volsize, tx); } else { - uint64_t checksum, compress, refresrv, vbs, dedup; - - error = dsl_prop_get_integer(zv->zv_name, - zfs_prop_to_name(ZFS_PROP_COMPRESSION), &compress, NULL); - error = error ? error : dsl_prop_get_integer(zv->zv_name, - zfs_prop_to_name(ZFS_PROP_CHECKSUM), &checksum, NULL); - error = error ? error : dsl_prop_get_integer(zv->zv_name, - zfs_prop_to_name(ZFS_PROP_REFRESERVATION), &refresrv, NULL); - error = error ? error : dsl_prop_get_integer(zv->zv_name, - zfs_prop_to_name(ZFS_PROP_VOLBLOCKSIZE), &vbs, NULL); - if (version >= SPA_VERSION_DEDUP) { - error = error ? error : - dsl_prop_get_integer(zv->zv_name, - zfs_prop_to_name(ZFS_PROP_DEDUP), &dedup, NULL); - } - - error = error ? error : zap_update(os, ZVOL_ZAP_OBJ, + error = zap_update(os, ZVOL_ZAP_OBJ, zfs_prop_to_name(ZFS_PROP_COMPRESSION), 8, 1, &compress, tx); - error = error ? error : zap_update(os, ZVOL_ZAP_OBJ, - zfs_prop_to_name(ZFS_PROP_CHECKSUM), 8, 1, &checksum, tx); - error = error ? error : zap_update(os, ZVOL_ZAP_OBJ, - zfs_prop_to_name(ZFS_PROP_REFRESERVATION), 8, 1, - &refresrv, tx); - error = error ? error : zap_update(os, ZVOL_ZAP_OBJ, - zfs_prop_to_name(ZFS_PROP_VOLBLOCKSIZE), 8, 1, - &vbs, tx); - error = error ? error : dmu_object_set_blocksize( - os, ZVOL_OBJ, SPA_OLD_MAXBLOCKSIZE, 0, tx); - if (version >= SPA_VERSION_DEDUP) { - error = error ? error : zap_update(os, ZVOL_ZAP_OBJ, + if (error == 0) { + error = zap_update(os, ZVOL_ZAP_OBJ, + zfs_prop_to_name(ZFS_PROP_CHECKSUM), 8, 1, + &checksum, tx); + } + if (error == 0) { + error = zap_update(os, ZVOL_ZAP_OBJ, + zfs_prop_to_name(ZFS_PROP_REFRESERVATION), 8, 1, + &refresrv, tx); + } + if (error == 0) { + error = zap_update(os, ZVOL_ZAP_OBJ, + zfs_prop_to_name(ZFS_PROP_VOLBLOCKSIZE), 8, 1, + &vbs, tx); + } + if (error == 0) { + error = dmu_object_set_blocksize( + os, ZVOL_OBJ, SPA_OLD_MAXBLOCKSIZE, 0, tx); + } + if (version >= SPA_VERSION_DEDUP && error == 0) { + error = zap_update(os, ZVOL_ZAP_OBJ, zfs_prop_to_name(ZFS_PROP_DEDUP), 8, 1, &dedup, tx); } @@ -2436,7 +2449,15 @@ zvol_dump_init(zvol_state_t *zv, boolean * We only need update the zvol's property if we are initializing * the dump area for the first time. */ - if (!resize) { + if (error == 0 && !resize) { + /* + * If MULTI_VDEV_CRASH_DUMP is active, use the NOPARITY checksum + * function. Otherwise, use the old default -- OFF. + */ + checksum = spa_feature_is_active(spa, + SPA_FEATURE_MULTI_VDEV_CRASH_DUMP) ? ZIO_CHECKSUM_NOPARITY : + ZIO_CHECKSUM_OFF; + VERIFY(nvlist_alloc(&nv, NV_UNIQUE_NAME, KM_SLEEP) == 0); VERIFY(nvlist_add_uint64(nv, zfs_prop_to_name(ZFS_PROP_REFRESERVATION), 0) == 0); @@ -2455,13 +2476,11 @@ zvol_dump_init(zvol_state_t *zv, boolean error = zfs_set_prop_nvlist(zv->zv_name, ZPROP_SRC_LOCAL, nv, NULL); nvlist_free(nv); - - if (error) - return (error); } /* Allocate the space for the dump */ - error = zvol_prealloc(zv); + if (error == 0) + error = zvol_prealloc(zv); return (error); } From owner-svn-src-all@freebsd.org Mon Oct 12 15:44:45 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9613AA1116B; Mon, 12 Oct 2015 15:44:45 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 43A1D138F; Mon, 12 Oct 2015 15:44:45 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t9CFii0t044352; Mon, 12 Oct 2015 15:44:44 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9CFiiC9044351; Mon, 12 Oct 2015 15:44:44 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201510121544.t9CFiiC9044351@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Mon, 12 Oct 2015 15:44:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289191 - 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 " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Oct 2015 15:44:45 -0000 Author: mav Date: Mon Oct 12 15:44:44 2015 New Revision: 289191 URL: https://svnweb.freebsd.org/changeset/base/289191 Log: MFV r289187: 6251 add tunable to disable free_bpobj processing Reviewed by: Matthew Ahrens Reviewed by: Prakash Surya Reviewed by: Simon Klinkert Reviewed by: Richard Elling Reviewed by: Albert Lee Reviewed by: Xin Li Approved by: Garrett D'Amore Author: George Wilson illumos/illumos-gate@139510fb6efa97dbe5f5479594b308d940cab8d1 Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_scan.c Directory Properties: head/sys/cddl/contrib/opensolaris/ (props changed) Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_scan.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_scan.c Mon Oct 12 15:39:03 2015 (r289190) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_scan.c Mon Oct 12 15:44:44 2015 (r289191) @@ -20,7 +20,7 @@ */ /* * Copyright (c) 2008, 2010, Oracle and/or its affiliates. All rights reserved. - * Copyright (c) 2011, 2014 by Delphix. All rights reserved. + * Copyright (c) 2011, 2015 by Delphix. All rights reserved. */ #include @@ -102,6 +102,11 @@ SYSCTL_UQUAD(_vfs_zfs, OID_AUTO, free_ma extern int zfs_txg_timeout; +/* + * Enable/disable the processing of the free_bpobj object. + */ +boolean_t zfs_free_bpobj_enabled = B_TRUE; + /* the order has to match pool_scan_type */ static scan_cb_t *scan_funcs[POOL_SCAN_FUNCS] = { NULL, @@ -1451,7 +1456,8 @@ dsl_scan_sync(dsl_pool_t *dp, dmu_tx_t * * have to worry about traversing it. It is also faster to free the * blocks than to scrub them. */ - if (spa_version(dp->dp_spa) >= SPA_VERSION_DEADLISTS) { + if (zfs_free_bpobj_enabled && + spa_version(dp->dp_spa) >= SPA_VERSION_DEADLISTS) { scn->scn_is_bptree = B_FALSE; scn->scn_zio_root = zio_root(dp->dp_spa, NULL, NULL, ZIO_FLAG_MUSTSUCCEED); From owner-svn-src-all@freebsd.org Mon Oct 12 15:48:46 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A7341A1122E; Mon, 12 Oct 2015 15:48:46 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7067D15B9; Mon, 12 Oct 2015 15:48:46 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t9CFmjQK044529; Mon, 12 Oct 2015 15:48:45 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9CFmjqt044528; Mon, 12 Oct 2015 15:48:45 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201510121548.t9CFmjqt044528@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Mon, 12 Oct 2015 15:48:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289192 - 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 " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Oct 2015 15:48:46 -0000 Author: mav Date: Mon Oct 12 15:48:45 2015 New Revision: 289192 URL: https://svnweb.freebsd.org/changeset/base/289192 Log: MFV r289188: 6281 prefetching should apply to 1MB reads Reviewed by: Matthew Ahrens Reviewed by: Paul Dagnelie Reviewed by: Alexander Motin Reviewed by: Dan McDonald Reviewed by: Justin Gibbs Reviewed by: Xin Li Approved by: Gordon Ross Author: George Wilson illumos/illumos-gate@632802744ef6d17e06d6980a95f631615c3b060f Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_zfetch.c Directory Properties: head/sys/cddl/contrib/opensolaris/ (props changed) Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_zfetch.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_zfetch.c Mon Oct 12 15:44:44 2015 (r289191) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_zfetch.c Mon Oct 12 15:48:45 2015 (r289192) @@ -24,7 +24,7 @@ */ /* - * Copyright (c) 2013, 2014 by Delphix. All rights reserved. + * Copyright (c) 2013, 2015 by Delphix. All rights reserved. */ #include @@ -49,7 +49,7 @@ uint32_t zfetch_max_streams = 8; uint32_t zfetch_min_sec_reap = 2; /* max bytes to prefetch per stream (default 8MB) */ uint32_t zfetch_max_distance = 8 * 1024 * 1024; -/* number of bytes in a array_read at which we stop prefetching (1MB) */ +/* max number of bytes in an array_read in which we allow prefetching (1MB) */ uint64_t zfetch_array_rd_sz = 1024 * 1024; SYSCTL_DECL(_vfs_zfs); From owner-svn-src-all@freebsd.org Mon Oct 12 16:02:11 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 67783A1170A; Mon, 12 Oct 2015 16:02:11 +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 22DCD1F6C; Mon, 12 Oct 2015 16:02:11 +0000 (UTC) (envelope-from slw@zxy.spb.ru) Received: from slw by zxy.spb.ru with local (Exim 4.84 (FreeBSD)) (envelope-from ) id 1ZlfY7-000KsK-Dl; Mon, 12 Oct 2015 19:02:07 +0300 Date: Mon, 12 Oct 2015 19:02:07 +0300 From: Slawa Olhovchenkov To: Alexander Motin Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r289191 - head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs Message-ID: <20151012160207.GD42243@zxy.spb.ru> References: <201510121544.t9CFiiC9044351@repo.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201510121544.t9CFiiC9044351@repo.freebsd.org> User-Agent: Mutt/1.5.23 (2014-03-12) X-SA-Exim-Connect-IP: X-SA-Exim-Mail-From: slw@zxy.spb.ru X-SA-Exim-Scanned: No (on zxy.spb.ru); SAEximRunCond expanded to false X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Oct 2015 16:02:11 -0000 On Mon, Oct 12, 2015 at 03:44:44PM +0000, Alexander Motin wrote: > Author: mav > Date: Mon Oct 12 15:44:44 2015 > New Revision: 289191 > URL: https://svnweb.freebsd.org/changeset/base/289191 > > Log: > MFV r289187: 6251 add tunable to disable free_bpobj processing Still need FreeBSD-specific code to control this tunable? > Reviewed by: Matthew Ahrens > Reviewed by: Prakash Surya > Reviewed by: Simon Klinkert > Reviewed by: Richard Elling > Reviewed by: Albert Lee > Reviewed by: Xin Li > Approved by: Garrett D'Amore > Author: George Wilson > > illumos/illumos-gate@139510fb6efa97dbe5f5479594b308d940cab8d1 > > Modified: > head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_scan.c > Directory Properties: > head/sys/cddl/contrib/opensolaris/ (props changed) > > Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_scan.c > ============================================================================== > --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_scan.c Mon Oct 12 15:39:03 2015 (r289190) > +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_scan.c Mon Oct 12 15:44:44 2015 (r289191) > @@ -20,7 +20,7 @@ > */ > /* > * Copyright (c) 2008, 2010, Oracle and/or its affiliates. All rights reserved. > - * Copyright (c) 2011, 2014 by Delphix. All rights reserved. > + * Copyright (c) 2011, 2015 by Delphix. All rights reserved. > */ > > #include > @@ -102,6 +102,11 @@ SYSCTL_UQUAD(_vfs_zfs, OID_AUTO, free_ma > > extern int zfs_txg_timeout; > > +/* > + * Enable/disable the processing of the free_bpobj object. > + */ > +boolean_t zfs_free_bpobj_enabled = B_TRUE; > + > /* the order has to match pool_scan_type */ > static scan_cb_t *scan_funcs[POOL_SCAN_FUNCS] = { > NULL, > @@ -1451,7 +1456,8 @@ dsl_scan_sync(dsl_pool_t *dp, dmu_tx_t * > * have to worry about traversing it. It is also faster to free the > * blocks than to scrub them. > */ > - if (spa_version(dp->dp_spa) >= SPA_VERSION_DEADLISTS) { > + if (zfs_free_bpobj_enabled && > + spa_version(dp->dp_spa) >= SPA_VERSION_DEADLISTS) { > scn->scn_is_bptree = B_FALSE; > scn->scn_zio_root = zio_root(dp->dp_spa, NULL, > NULL, ZIO_FLAG_MUSTSUCCEED); > _______________________________________________ > svn-src-all@freebsd.org mailing list > https://lists.freebsd.org/mailman/listinfo/svn-src-all > To unsubscribe, send any mail to "svn-src-all-unsubscribe@freebsd.org" From owner-svn-src-all@freebsd.org Mon Oct 12 18:15:26 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 87BFDA118C8; Mon, 12 Oct 2015 18:15:26 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4DFE01DC; Mon, 12 Oct 2015 18:15:26 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t9CIFPlm088070; Mon, 12 Oct 2015 18:15:25 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9CIFPj0088069; Mon, 12 Oct 2015 18:15:25 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201510121815.t9CIFPj0088069@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Mon, 12 Oct 2015 18:15:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289194 - 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 " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Oct 2015 18:15:26 -0000 Author: mav Date: Mon Oct 12 18:15:25 2015 New Revision: 289194 URL: https://svnweb.freebsd.org/changeset/base/289194 Log: FreeBSD-specific addition to r289191. Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_scan.c Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_scan.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_scan.c Mon Oct 12 17:53:08 2015 (r289193) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_scan.c Mon Oct 12 18:15:25 2015 (r289194) @@ -107,6 +107,9 @@ extern int zfs_txg_timeout; */ boolean_t zfs_free_bpobj_enabled = B_TRUE; +SYSCTL_INT(_vfs_zfs, OID_AUTO, free_bpobj_enabled, CTLFLAG_RWTUN, + &zfs_free_bpobj_enabled, 0, "Enable free_bpobj processing"); + /* the order has to match pool_scan_type */ static scan_cb_t *scan_funcs[POOL_SCAN_FUNCS] = { NULL, From owner-svn-src-all@freebsd.org Mon Oct 12 18:31:23 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 09BA7A11C89; Mon, 12 Oct 2015 18:31: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 D143FDB9; Mon, 12 Oct 2015 18:31:22 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t9CIVL8F093787; Mon, 12 Oct 2015 18:31:21 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9CIVLUJ093780; Mon, 12 Oct 2015 18:31:21 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201510121831.t9CIVLUJ093780@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Mon, 12 Oct 2015 18:31:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289195 - in head: etc/mtree lib/libarchive lib/libarchive/test lib/libarchive/tests usr.bin/cpio usr.bin/cpio/test usr.bin/cpio/tests usr.bin/tar usr.bin/tar/test usr.bin/tar/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 " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Oct 2015 18:31:23 -0000 Author: ngie Date: Mon Oct 12 18:31:21 2015 New Revision: 289195 URL: https://svnweb.freebsd.org/changeset/base/289195 Log: Integrate the tests from lib/libarchive, usr.bin/cpio, and usr.bin/tar in to the FreeBSD test suite functional_test.sh was ported from bin/sh/tests/functional_test.sh, as a small wrapper around libarchive_test, bsdcpio_test, and bsdtar_test provided by upstream. A handful of testcases in lib/libarchive/tests have been disabled as they were failing when run with kyua test (see BROKEN_TESTS in lib/libarchive/tests/Makefile) As a sidenote: this removes the check/test targets from the Makefiles as they don't match the pattern used in the rest of the FreeBSD test suite. MFC after: 2 weeks Sponsored by: EMC / Isilon Storage Division Added: head/lib/libarchive/tests/ - copied from r289179, user/ngie/more-tests2/lib/libarchive/tests/ head/usr.bin/cpio/tests/ - copied from r289179, user/ngie/more-tests2/usr.bin/cpio/tests/ head/usr.bin/tar/tests/ - copied from r289179, user/ngie/more-tests2/usr.bin/tar/tests/ Deleted: head/lib/libarchive/test/ head/usr.bin/cpio/test/ head/usr.bin/tar/test/ Modified: head/etc/mtree/BSD.tests.dist head/lib/libarchive/Makefile head/lib/libarchive/tests/Makefile head/usr.bin/cpio/Makefile head/usr.bin/cpio/tests/Makefile head/usr.bin/tar/Makefile head/usr.bin/tar/tests/Makefile Directory Properties: head/ (props changed) Modified: head/etc/mtree/BSD.tests.dist ============================================================================== --- head/etc/mtree/BSD.tests.dist Mon Oct 12 18:15:25 2015 (r289194) +++ head/etc/mtree/BSD.tests.dist Mon Oct 12 18:31:21 2015 (r289195) @@ -242,6 +242,8 @@ test-programs .. .. + libarchive + .. libc c063 .. @@ -518,6 +520,8 @@ .. cmp .. + cpio + .. col .. comm @@ -556,6 +560,8 @@ .. soelim .. + tar + .. timeout .. tr Modified: head/lib/libarchive/Makefile ============================================================================== --- head/lib/libarchive/Makefile Mon Oct 12 18:15:25 2015 (r289194) +++ head/lib/libarchive/Makefile Mon Oct 12 18:31:21 2015 (r289195) @@ -398,11 +398,8 @@ MLINKS+= archive_write_set_options.3 arc MLINKS+= archive_write_set_options.3 archive_write_set_option.3 MLINKS+= libarchive.3 archive.3 -.PHONY: check test clean-test -check test: - cd ${.CURDIR}/test && make obj && make test - -clean-test: - cd ${.CURDIR}/test && make clean +.if ${MK_TESTS} != "no" +SUBDIR+= tests +.endif .include Modified: head/lib/libarchive/tests/Makefile ============================================================================== --- user/ngie/more-tests2/lib/libarchive/tests/Makefile Mon Oct 12 09:13:47 2015 (r289179) +++ head/lib/libarchive/tests/Makefile Mon Oct 12 18:31:21 2015 (r289195) @@ -12,10 +12,6 @@ CFLAGS+= -I${.CURDIR:H} -I${.OBJDIR} CFLAGS+= -I${LIBARCHIVEDIR}/libarchive -I${LIBARCHIVEDIR}/test_utils CFLAGS+= -DHAVE_LIBLZMA=1 -DHAVE_LZMA_H=1 -DEBUG_CFLAGS+= -g - -LIBADD.libarchive_test= archive - # Uncomment to link against dmalloc #LDADD+= -L/usr/local/lib -ldmalloc #CFLAGS+= -I/usr/local/include -DUSE_DMALLOC @@ -253,6 +249,8 @@ SRCS.libarchive_test= \ DPSRCS.libarchive_test= \ list.h +LIBADD.libarchive_test= archive + .PATH: ${LIBARCHIVEDIR}/test_utils SRCS.libarchive_test+= test_utils.c @@ -263,6 +261,8 @@ list.h: ${TESTS_SRCS} Makefile egrep -v '${BROKEN_TESTS:tW:C/ /|/g}') > ${.TARGET}.tmp @mv ${.TARGET}.tmp ${.TARGET} +CLEANFILES+= list.h list.h.tmp + FILES+= README FILES+= test_acl_pax.tar.uu FILES+= test_archive_string_conversion.txt.Z.uu @@ -452,6 +452,4 @@ FILES+= test_write_disk_hfs_compression. FILES+= test_write_disk_mac_metadata.tar.gz.uu FILES+= test_write_disk_no_hfs_compression.tgz.uu -CLEANFILES+= list.h list.h.tmp - .include Modified: head/usr.bin/cpio/Makefile ============================================================================== --- head/usr.bin/cpio/Makefile Mon Oct 12 18:15:25 2015 (r289194) +++ head/usr.bin/cpio/Makefile Mon Oct 12 18:31:21 2015 (r289195) @@ -32,12 +32,8 @@ CFLAGS+= -DHAVE_ICONV=1 -DHAVE_ICONV_H=1 SYMLINKS=bsdcpio ${BINDIR}/cpio MLINKS= bsdcpio.1 cpio.1 -.PHONY: check test clean-test - -check test: $(PROG) bsdcpio.1.gz - cd ${.CURDIR}/test && make obj && make test - -clean-test: - cd ${.CURDIR}/test && make clean +.if ${MK_TESTS} != "no" +SUBDIR+= tests +.endif .include Modified: head/usr.bin/cpio/tests/Makefile ============================================================================== --- user/ngie/more-tests2/usr.bin/cpio/tests/Makefile Mon Oct 12 09:13:47 2015 (r289179) +++ head/usr.bin/cpio/tests/Makefile Mon Oct 12 18:31:21 2015 (r289195) @@ -4,9 +4,20 @@ LIBARCHIVEDIR= ${SRCTOP}/contrib/libarch ATF_TESTS_SH+= functional_test +BINDIR= ${TESTSDIR} + PROGS+= bsdcpio_test -BINDIR= ${TESTSDIR} +CFLAGS+= -DPLATFORM_CONFIG_H=\"${SRCTOP}/lib/libarchive/config_freebsd.h\" +CFLAGS+= -I${SRCTOP}/lib/libarchive -I${.OBJDIR} + +CFLAGS+= -I${.OBJDIR} +CFLAGS+= -I${LIBARCHIVEDIR}/cpio -I${LIBARCHIVEDIR}/libarchive_fe +CFLAGS+= -I${LIBARCHIVEDIR}/test_utils + +# Uncomment to link against dmalloc +#LDADD+= -L/usr/local/lib -ldmalloc +#CFLAGS+= -I/usr/local/include -DUSE_DMALLOC .PATH: ${LIBARCHIVEDIR}/cpio CPIO_SRCS= cmdline.c @@ -59,35 +70,26 @@ TESTS_SRCS= \ test_passthrough_dotdot.c \ test_passthrough_reverse.c -# Build the test program SRCS.bsdcpio_test= list.h \ ${CPIO_SRCS} \ ${TESTS_SRCS} \ main.c +DPSRCS.bsdcpio_test= \ + list.h + .PATH: ${LIBARCHIVEDIR}/test_utils SRCS.bsdcpio_test+= test_utils.c -CLEANFILES+= list.h - -CFLAGS+= -DPLATFORM_CONFIG_H=\"${SRCTOP}/lib/libarchive/config_freebsd.h\" -CFLAGS+= -I${SRCTOP}/lib/libarchive -I${.OBJDIR} -LIBADD= archive - -DEBUG_FLAGS+= -g -CFLAGS+= -I${.OBJDIR} -CFLAGS+= -I${LIBARCHIVEDIR}/cpio -I${LIBARCHIVEDIR}/libarchive_fe -CFLAGS+= -I${LIBARCHIVEDIR}/test_utils - -# Uncomment to link against dmalloc -#LDADD+= -L/usr/local/lib -ldmalloc -#CFLAGS+= -I/usr/local/include -DUSE_DMALLOC +LIBADD.bsdcpio_test= archive list.h: ${TESTS_SRCS} Makefile @(cd ${LIBARCHIVEDIR}/tar/test && \ grep -h DEFINE_TEST ${.ALLSRC:N*Makefile}) > ${.TARGET}.tmp @mv ${.TARGET}.tmp ${.TARGET} +CLEANFILES+= list.h list.h.tmp + FILES+= test_extract.cpio.Z.uu FILES+= test_extract.cpio.bz2.uu FILES+= test_extract.cpio.grz.uu Modified: head/usr.bin/tar/Makefile ============================================================================== --- head/usr.bin/tar/Makefile Mon Oct 12 18:15:25 2015 (r289194) +++ head/usr.bin/tar/Makefile Mon Oct 12 18:31:21 2015 (r289195) @@ -32,11 +32,8 @@ CFLAGS+= -I${LIBARCHIVEDIR}/libarchive_f SYMLINKS= bsdtar ${BINDIR}/tar MLINKS= bsdtar.1 tar.1 -.PHONY: check test clean-test -check test: $(PROG) bsdtar.1.gz - cd ${.CURDIR}/test && make obj && make test - -clean-test: - cd ${.CURDIR}/test && make clean +.if ${MK_TESTS} != "no" +SUBDIR+= tests +.endif .include Modified: head/usr.bin/tar/tests/Makefile ============================================================================== --- user/ngie/more-tests2/usr.bin/tar/tests/Makefile Mon Oct 12 09:13:47 2015 (r289179) +++ head/usr.bin/tar/tests/Makefile Mon Oct 12 18:31:21 2015 (r289195) @@ -6,6 +6,15 @@ ATF_TESTS_SH+= functional_test BINDIR= ${TESTSDIR} +CFLAGS+= -DPLATFORM_CONFIG_H=\"${SRCTOP}/lib/libarchive/config_freebsd.h\" +CFLAGS+= -static +CFLAGS+= -I${SRCTOP}/lib/libarchive -I${.OBJDIR} +CFLAGS+= -I${LIBARCHIVEDIR}/tar -I${LIBARCHIVEDIR}/test_utils + +# Uncomment to link against dmalloc +#LDADD+= -L/usr/local/lib -ldmalloc +#CFLAGS+= -I/usr/local/include -DUSE_DMALLOC + PROGS+= bsdtar_test .PATH: ${LIBARCHIVEDIR}/tar/test @@ -61,33 +70,17 @@ TESTS_SRCS= \ test_symlink_dir.c \ test_version.c -# Build the test program SRCS.bsdtar_test= \ ${TESTS_SRCS} \ list.h \ main.c -BROKEN_TESTS= - DPSRCS.bsdtar_test+= list.h .PATH: ${LIBARCHIVEDIR}/test_utils SRCS.bsdtar_test+= test_utils.c -CLEANFILES+= list.h - -LIBADD+= archive - -DEBUG_FLAGS+= -g -CFLAGS+= -DPLATFORM_CONFIG_H=\"${SRCTOP}/lib/libarchive/config_freebsd.h\" -CFLAGS+= -static -Wall - -CFLAGS+= -I${SRCTOP}/lib/libarchive -I${.OBJDIR} -CFLAGS+= -I${LIBARCHIVEDIR}/tar -I${LIBARCHIVEDIR}/test_utils - -# Uncomment to link against dmalloc -#LDADD+= -L/usr/local/lib -ldmalloc -#CFLAGS+= -I/usr/local/include -DUSE_DMALLOC +LIBADD.bsdtar_test= archive list.h: ${TESTS_SRCS} Makefile @(cd ${LIBARCHIVEDIR}/tar/test && \ From owner-svn-src-all@freebsd.org Mon Oct 12 20:21:18 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7A2DCA116F7; Mon, 12 Oct 2015 20:21:18 +0000 (UTC) (envelope-from davidcs@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4629518E7; Mon, 12 Oct 2015 20:21:18 +0000 (UTC) (envelope-from davidcs@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t9CKLHjF026521; Mon, 12 Oct 2015 20:21:17 GMT (envelope-from davidcs@FreeBSD.org) Received: (from davidcs@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9CKLHwi026520; Mon, 12 Oct 2015 20:21:17 GMT (envelope-from davidcs@FreeBSD.org) Message-Id: <201510122021.t9CKLHwi026520@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: davidcs set sender to davidcs@FreeBSD.org using -f From: David C Somayajulu Date: Mon, 12 Oct 2015 20:21:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289199 - head/sys/dev/bxe X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Oct 2015 20:21:18 -0000 Author: davidcs Date: Mon Oct 12 20:21:17 2015 New Revision: 289199 URL: https://svnweb.freebsd.org/changeset/base/289199 Log: Add support for reading device temperature MFC after:5 days Modified: head/sys/dev/bxe/bxe.c Modified: head/sys/dev/bxe/bxe.c ============================================================================== --- head/sys/dev/bxe/bxe.c Mon Oct 12 18:53:37 2015 (r289198) +++ head/sys/dev/bxe/bxe.c Mon Oct 12 20:21:17 2015 (r289199) @@ -16122,9 +16122,12 @@ bxe_sysctl_state(SYSCTL_HANDLER_ARGS) } if (result == 1) { + uint32_t temp; sc = (struct bxe_softc *)arg1; + BLOGI(sc, "... dumping driver state ...\n"); - /* XXX */ + temp = SHMEM2_RD(sc, temperature_in_half_celsius); + BLOGI(sc, "\t Device Temperature = %d Celsius\n", (temp/2)); } return (error); From owner-svn-src-all@freebsd.org Mon Oct 12 21:02:38 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3D836A123EE; Mon, 12 Oct 2015 21:02:38 +0000 (UTC) (envelope-from peter@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id F213D17CF; Mon, 12 Oct 2015 21:02:37 +0000 (UTC) (envelope-from peter@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t9CL2bV9038089; Mon, 12 Oct 2015 21:02:37 GMT (envelope-from peter@FreeBSD.org) Received: (from peter@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9CL2aHq038087; Mon, 12 Oct 2015 21:02:36 GMT (envelope-from peter@FreeBSD.org) Message-Id: <201510122102.t9CL2aHq038087@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: peter set sender to peter@FreeBSD.org using -f From: Peter Wemm Date: Mon, 12 Oct 2015 21:02:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289200 - in head: . etc/sendmail X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Oct 2015 21:02:38 -0000 Author: peter Date: Mon Oct 12 21:02:36 2015 New Revision: 289200 URL: https://svnweb.freebsd.org/changeset/base/289200 Log: If world is built with a custom sendmail.cf, use it for the distribution target. This is the feeder for mergemaster / etcupdate. This change makes installworld/mergemaster/etcupdate behave the same regardless of whether SENDMAIL_MC or SENDMAIL_CF is used. If you use a custom SENDMAIL_MC/CF in make.conf and excluded it from mergemaster.rc/etcupdate.conf to work around the conflicts, you may wish to revert that or change it from 'ignore' to 'always install'. If you do not use a custom SENDMAIL_MC/CF, there should be no change in behavior. Modified: head/UPDATING head/etc/sendmail/Makefile Modified: head/UPDATING ============================================================================== --- head/UPDATING Mon Oct 12 20:21:17 2015 (r289199) +++ head/UPDATING Mon Oct 12 21:02:36 2015 (r289200) @@ -31,6 +31,16 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 11 disable the most expensive debugging functionality run "ln -s 'abort:false,junk:false' /etc/malloc.conf".) +20151012: + If you specify SENDMAIL_MC or SENDMAIL_CF in make.conf, mergemaster + and etcupdate will now use this file. A custom sendmail.cf is now + updated via this mechanism rather than via installworld. If you had + excluded sendmail.cf in mergemaster.rc or etcupdate.conf, you may + want to remove the exclusion or change it to "always install". + /etc/mail/sendmail.cf is now managed the same way regardless of + whether SENDMAIL_MC/SENDMAIL_CF is used. If you are not using + SENDMAIL_MC/SENDMAIL_CF there should be no change in behavior. + 20151011: Compatibility shims for legacy ATA device names have been removed. It includes ATA_STATIC_ID kernel option, kern.cam.ada.legacy_aliases Modified: head/etc/sendmail/Makefile ============================================================================== --- head/etc/sendmail/Makefile Mon Oct 12 20:21:17 2015 (r289199) +++ head/etc/sendmail/Makefile Mon Oct 12 21:02:36 2015 (r289200) @@ -72,24 +72,25 @@ distribution: ${SMDIR}/helpfile ${DESTDIR}/etc/mail ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 640 \ /dev/null ${DESTDIR}/var/log/sendmail.st - ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 \ - freebsd.cf ${DEST_CF} - ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 444 \ - freebsd.submit.cf ${DEST_SUBMIT_CF} - -install: -.if defined(INSTALL_CF) && ${INSTALL_CF} != ${DEST_CF} +.if defined(INSTALL_CF) ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 \ ${INSTALL_CF} ${DEST_CF} +.else + ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 \ + freebsd.cf ${DEST_CF} .endif .if defined(SENDMAIL_ADDITIONAL_CF) ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 \ ${SENDMAIL_ADDITIONAL_CF} ${DESTDIR}/etc/mail .endif -.if !defined(SENDMAIL_SET_USER_ID) && \ - defined(INSTALL_SUBMIT_CF) && ${INSTALL_SUBMIT_CF} != ${DEST_SUBMIT_CF} - ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 \ +.if !defined(SENDMAIL_SET_USER_ID) +.if defined(INSTALL_SUBMIT_CF) + ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 444 \ ${INSTALL_SUBMIT_CF} ${DEST_SUBMIT_CF} +.else + ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 444 \ + freebsd.submit.cf ${DEST_SUBMIT_CF} +.endif .endif .include From owner-svn-src-all@freebsd.org Tue Oct 13 01:04:40 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 31E1F344E; Tue, 13 Oct 2015 01:04:40 +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 D7832A48; Tue, 13 Oct 2015 01:04:39 +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 t9D14cG7008476; Tue, 13 Oct 2015 01:04:38 GMT (envelope-from np@FreeBSD.org) Received: (from np@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9D14cfM008475; Tue, 13 Oct 2015 01:04:38 GMT (envelope-from np@FreeBSD.org) Message-Id: <201510130104.t9D14cfM008475@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: np set sender to np@FreeBSD.org using -f From: Navdeep Parhar Date: Tue, 13 Oct 2015 01:04:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289201 - 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 " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Oct 2015 01:04:40 -0000 Author: np Date: Tue Oct 13 01:04:38 2015 New Revision: 289201 URL: https://svnweb.freebsd.org/changeset/base/289201 Log: iw_cxgbe: MPA v2 is always available. Submitted by: Krishnamraju Eraparaju at chelsio dot com Reviewed by: Steve Wise at opengridcomputing dot com 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 Mon Oct 12 21:02:36 2015 (r289200) +++ head/sys/dev/cxgbe/iw_cxgbe/cm.c Tue Oct 13 01:04:38 2015 (r289201) @@ -808,13 +808,8 @@ SYSCTL_INT(_hw_iw_cxgbe, OID_AUTO, ep_ti "CM Endpoint operation timeout in seconds (default = 60)"); static int mpa_rev = 1; -#ifdef IW_CM_MPAV2 SYSCTL_INT(_hw_iw_cxgbe, OID_AUTO, mpa_rev, CTLFLAG_RWTUN, &mpa_rev, 0, "MPA Revision, 0 supports amso1100, 1 is RFC0544 spec compliant, 2 is IETF MPA Peer Connect Draft compliant (default = 1)"); -#else -SYSCTL_INT(_hw_iw_cxgbe, OID_AUTO, mpa_rev, CTLFLAG_RWTUN, &mpa_rev, 0, - "MPA Revision, 0 supports amso1100, 1 is RFC0544 spec compliant (default = 1)"); -#endif static int markers_enabled; SYSCTL_INT(_hw_iw_cxgbe, OID_AUTO, markers_enabled, CTLFLAG_RWTUN, &markers_enabled, 0, @@ -1335,10 +1330,8 @@ static int connect_request_upcall(struct if (!ep->tried_with_mpa_v1) { /* this means MPA_v2 is used */ -#ifdef IW_CM_MPAV2 event.ord = ep->ord; event.ird = ep->ird; -#endif event.private_data_len = ep->plen - sizeof(struct mpa_v2_conn_params); event.private_data = ep->mpa_pkt + sizeof(struct mpa_message) + @@ -1346,10 +1339,8 @@ static int connect_request_upcall(struct } else { /* this means MPA_v1 is used. Send max supported */ -#ifdef IW_CM_MPAV2 event.ord = c4iw_max_read_depth; event.ird = c4iw_max_read_depth; -#endif event.private_data_len = ep->plen; event.private_data = ep->mpa_pkt + sizeof(struct mpa_message); } @@ -1372,10 +1363,9 @@ static void established_upcall(struct c4 CTR2(KTR_IW_CXGBE, "%s:euB %p", __func__, ep); memset(&event, 0, sizeof(event)); event.event = IW_CM_EVENT_ESTABLISHED; -#ifdef IW_CM_MPAV2 event.ird = ep->ird; event.ord = ep->ord; -#endif + if (ep->com.cm_id) { CTR2(KTR_IW_CXGBE, "%s:eu1 %p", __func__, ep); From owner-svn-src-all@freebsd.org Tue Oct 13 02:17:57 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5B2999D2A49; Tue, 13 Oct 2015 02:17:57 +0000 (UTC) (envelope-from jah@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2728DA67; Tue, 13 Oct 2015 02:17:57 +0000 (UTC) (envelope-from jah@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t9D2Huod028700; Tue, 13 Oct 2015 02:17:56 GMT (envelope-from jah@FreeBSD.org) Received: (from jah@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9D2HuHT028699; Tue, 13 Oct 2015 02:17:56 GMT (envelope-from jah@FreeBSD.org) Message-Id: <201510130217.t9D2HuHT028699@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jah set sender to jah@FreeBSD.org using -f From: "Jason A. Harmening" Date: Tue, 13 Oct 2015 02:17:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289202 - head/sys/x86/x86 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Oct 2015 02:17:57 -0000 Author: jah Date: Tue Oct 13 02:17:56 2015 New Revision: 289202 URL: https://svnweb.freebsd.org/changeset/base/289202 Log: Ensure the client regions for unmapped bounce buffers created through bus_dmamap_load_phys() do not span multiple pages. This is already done for mapped buffers. While here, stop casting bus_addr_t to vm_offset_t. Modified: head/sys/x86/x86/busdma_bounce.c Modified: head/sys/x86/x86/busdma_bounce.c ============================================================================== --- head/sys/x86/x86/busdma_bounce.c Tue Oct 13 01:04:38 2015 (r289201) +++ head/sys/x86/x86/busdma_bounce.c Tue Oct 13 02:17:56 2015 (r289202) @@ -476,7 +476,8 @@ _bus_dmamap_count_phys(bus_dma_tag_t dma while (buflen != 0) { sgsize = MIN(buflen, dmat->common.maxsegsz); if (bus_dma_run_filter(&dmat->common, curaddr)) { - sgsize = MIN(sgsize, PAGE_SIZE); + sgsize = MIN(sgsize, + PAGE_SIZE - (curaddr & PAGE_MASK)); map->pagesneeded++; } curaddr += sgsize; @@ -630,7 +631,7 @@ bounce_bus_dmamap_load_phys(bus_dma_tag_ if (((dmat->bounce_flags & BUS_DMA_COULD_BOUNCE) != 0) && map->pagesneeded != 0 && bus_dma_run_filter(&dmat->common, curaddr)) { - sgsize = MIN(sgsize, PAGE_SIZE); + sgsize = MIN(sgsize, PAGE_SIZE - (curaddr & PAGE_MASK)); curaddr = add_bounce_page(dmat, map, 0, curaddr, sgsize); } @@ -694,7 +695,7 @@ bounce_bus_dmamap_load_buffer(bus_dma_ta * Compute the segment size, and adjust counts. */ max_sgsize = MIN(buflen, dmat->common.maxsegsz); - sgsize = PAGE_SIZE - ((vm_offset_t)curaddr & PAGE_MASK); + sgsize = PAGE_SIZE - (curaddr & PAGE_MASK); if (((dmat->bounce_flags & BUS_DMA_COULD_BOUNCE) != 0) && map->pagesneeded != 0 && bus_dma_run_filter(&dmat->common, curaddr)) { From owner-svn-src-all@freebsd.org Tue Oct 13 02:32:16 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B2BF89D2FBC; Tue, 13 Oct 2015 02:32:16 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7419312FD; Tue, 13 Oct 2015 02:32:16 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t9D2WF85034268; Tue, 13 Oct 2015 02:32:15 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9D2WFo2034264; Tue, 13 Oct 2015 02:32:15 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201510130232.t9D2WFo2034264@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Tue, 13 Oct 2015 02:32:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289203 - head/usr.sbin/makefs X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Oct 2015 02:32:16 -0000 Author: adrian Date: Tue Oct 13 02:32:15 2015 New Revision: 289203 URL: https://svnweb.freebsd.org/changeset/base/289203 Log: makefs: introduce a new option to specify what to round the resulting image up to. From ticket: While trying to run FreeBSD/mips on some device having very small flash media, one is forced to compress file system with mkulzma(8) utility. It is desirable to specify small UFS block/fragment sizes like 4096/512 bytes for makefs(8) and big compression block size like 65535 bytes to mkulzma at the same time. Then one obtains very good comression ratios (like 75% and more) but faces the following problem. geom_uncompress kernel module reports GEOM provider size rounded up to its compression block size. Generally, this changes original media size and now it fails to match the size of embedded UFS file system that leads to other problems, f.e. geom_label kernel module does not like this and skips the file system while tasting the GEOM and looking for UFS label. This makes it impossible to refer to the file system using known UFS label instead of something like /dev/map/rootfs.uncompress. The following patch introduces new command line option "-r roundup" for makefs that makes it round up the image to specified block size. Hence, geom_uncompress does not change GEOM media size for images rounded that way and geom_label accepts such GEOMs just fine. With the patch applied, one can use following commands: $ makefs -t ffs -r 65536 -o bsize=4096,fsize=512,label=flash optimization=space fs.img fs $ mkulzma -s 65536 -o fs.img.ulzma fs.img PR: bin/203707 Submitted by: Modified: head/usr.sbin/makefs/ffs.c head/usr.sbin/makefs/makefs.8 head/usr.sbin/makefs/makefs.c head/usr.sbin/makefs/makefs.h Modified: head/usr.sbin/makefs/ffs.c ============================================================================== --- head/usr.sbin/makefs/ffs.c Tue Oct 13 02:17:56 2015 (r289202) +++ head/usr.sbin/makefs/ffs.c Tue Oct 13 02:32:15 2015 (r289203) @@ -418,6 +418,10 @@ ffs_validate(const char *dir, fsnode *ro /* round up to the next block */ fsopts->size = roundup(fsopts->size, ffs_opts->bsize); + /* round up to requested block size, if any */ + if (fsopts->roundup > 0) + fsopts->size = roundup(fsopts->size, fsopts->roundup); + /* calculate density if necessary */ if (ffs_opts->density == -1) ffs_opts->density = fsopts->size / fsopts->inodes + 1; Modified: head/usr.sbin/makefs/makefs.8 ============================================================================== --- head/usr.sbin/makefs/makefs.8 Tue Oct 13 02:17:56 2015 (r289202) +++ head/usr.sbin/makefs/makefs.8 Tue Oct 13 02:32:15 2015 (r289203) @@ -53,6 +53,7 @@ .Op Fl m Ar maximum-size .Op Fl N Ar userdb-dir .Op Fl o Ar fs-options +.Op Fl r Ar roundup .Op Fl S Ar sector-size .Op Fl s Ar image-size .Op Fl t Ar fs-type @@ -195,6 +196,9 @@ Deprecated. See the .Fl Z flag. +.It Fl r Ar roundup +Round the image up to specified block size that should be multiple +of block size. .It Fl S Ar sector-size Set the file system sector size to .Ar sector-size . Modified: head/usr.sbin/makefs/makefs.c ============================================================================== --- head/usr.sbin/makefs/makefs.c Tue Oct 13 02:17:56 2015 (r289202) +++ head/usr.sbin/makefs/makefs.c Tue Oct 13 02:32:15 2015 (r289203) @@ -113,7 +113,7 @@ main(int argc, char *argv[]) start_time.tv_sec = start.tv_sec; start_time.tv_nsec = start.tv_usec * 1000; - while ((ch = getopt(argc, argv, "B:b:Dd:f:F:M:m:N:o:ps:S:t:xZ")) != -1) { + while ((ch = getopt(argc, argv, "B:b:Dd:f:F:M:m:N:o:pr:s:S:t:xZ")) != -1) { switch (ch) { case 'B': @@ -209,6 +209,12 @@ main(int argc, char *argv[]) fsoptions.sparse = 1; break; + case 'r': + /* Round image size up to specified block size */ + fsoptions.roundup = + strsuftoll("roundup", optarg, 0, LLONG_MAX); + break; + case 's': fsoptions.minsize = fsoptions.maxsize = strsuftoll("size", optarg, 1LL, LLONG_MAX); @@ -359,9 +365,9 @@ usage(void) prog = getprogname(); fprintf(stderr, "usage: %s [-t fs-type] [-o fs-options] [-d debug-mask] [-B endian]\n" -"\t[-S sector-size] [-M minimum-size] [-m maximum-size] [-s image-size]\n" -"\t[-b free-blocks] [-f free-files] [-F mtree-specfile] [-xZ]\n" -"\t[-N userdb-dir] image-file directory | manifest [extra-directory ...]\n", +"\t[-S sector-size] [-M minimum-size] [-m maximum-size] [-r roundup ]\n" +"\t[-s image-size] [-b free-blocks] [-f free-files] [-F mtree-specfile]\n" +"\t[-xZ] [-N userdb-dir] image-file directory | manifest [extra-directory ...]\n", prog); exit(1); } Modified: head/usr.sbin/makefs/makefs.h ============================================================================== --- head/usr.sbin/makefs/makefs.h Tue Oct 13 02:17:56 2015 (r289202) +++ head/usr.sbin/makefs/makefs.h Tue Oct 13 02:32:15 2015 (r289203) @@ -130,6 +130,7 @@ typedef struct { int needswap; /* non-zero if byte swapping needed */ int sectorsize; /* sector size */ int sparse; /* sparse image, don't fill it with zeros */ + off_t roundup; /* round image size up to this value */ void *fs_specific; /* File system specific additions. */ } fsinfo_t; From owner-svn-src-all@freebsd.org Tue Oct 13 02:34:43 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 31339A1010A; Tue, 13 Oct 2015 02:34:43 +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 E077C152D; Tue, 13 Oct 2015 02:34:42 +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 t9D2Yfwm034411; Tue, 13 Oct 2015 02:34:41 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9D2Yf1a034409; Tue, 13 Oct 2015 02:34:41 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201510130234.t9D2Yf1a034409@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Tue, 13 Oct 2015 02:34:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289204 - head/sbin/casperd X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Oct 2015 02:34:43 -0000 Author: adrian Date: Tue Oct 13 02:34:41 2015 New Revision: 289204 URL: https://svnweb.freebsd.org/changeset/base/289204 Log: casperd: bump default socket queue length to SOMAXCONN; make length configurable. The current default listen queue for casperd is too small (8) and hard-coded. This patch increases the default to SOMAXCONN, and introduces a command line flag that can used to further increase or decrease the queue length. PR: bin/202147 Submitted by: Modified: head/sbin/casperd/casperd.8 head/sbin/casperd/casperd.c Modified: head/sbin/casperd/casperd.8 ============================================================================== --- head/sbin/casperd/casperd.8 Tue Oct 13 02:32:15 2015 (r289203) +++ head/sbin/casperd/casperd.8 Tue Oct 13 02:34:41 2015 (r289204) @@ -35,8 +35,8 @@ .Nd "Capability Services friendly daemon" .Sh SYNOPSIS .Nm -[-Fhv] [-D servconfdir] [-P pidfile] [-S sockpath] .Op Fl Fhv +.Op Fl l Ar listenqueue .Op Fl D Ar servconfdir .Op Fl P Ar pidfile .Op Fl S Ar sockpath @@ -74,6 +74,12 @@ starts in the background. Print the .Nm usage message. +.It Fl l Ar listenqueue +Specify depth of socket listen queue for the +.Nm +daemon. +The default queue length is +.Pa SOMAXCONN . .It Fl P Ar pidfile Specify alternative location of a file where main process PID will be stored. Modified: head/sbin/casperd/casperd.c ============================================================================== --- head/sbin/casperd/casperd.c Tue Oct 13 02:32:15 2015 (r289203) +++ head/sbin/casperd/casperd.c Tue Oct 13 02:34:41 2015 (r289204) @@ -534,7 +534,7 @@ casper_accept(int lsock) } static void -main_loop(const char *sockpath, struct pidfh *pfh) +main_loop(int lqlen, const char *sockpath, struct pidfh *pfh) { fd_set fds; struct sockaddr_un sun; @@ -559,7 +559,7 @@ main_loop(const char *sockpath, struct p if (bind(lsock, (struct sockaddr *)&sun, sizeof(sun)) == -1) pjdlog_exit(1, "Unable to bind to %s", sockpath); (void)umask(oldumask); - if (listen(lsock, 8) == -1) + if (listen(lsock, lqlen) == -1) pjdlog_exit(1, "Unable to listen on %s", sockpath); for (;;) { @@ -627,18 +627,19 @@ main(int argc, char *argv[]) struct pidfh *pfh; const char *pidfile, *servconfdir, *sockpath; pid_t otherpid; - int ch, debug; + int ch, debug, lqlen; bool foreground; pjdlog_init(PJDLOG_MODE_STD); debug = 0; foreground = false; + lqlen = SOMAXCONN; pidfile = CASPERD_PIDFILE; servconfdir = CASPERD_SERVCONFDIR; sockpath = CASPERD_SOCKPATH; - while ((ch = getopt(argc, argv, "D:FhP:S:v")) != -1) { + while ((ch = getopt(argc, argv, "D:Fhl:P:S:v")) != -1) { switch (ch) { case 'D': servconfdir = optarg; @@ -646,6 +647,11 @@ main(int argc, char *argv[]) case 'F': foreground = true; break; + case 'l': + lqlen = strtol(optarg, NULL, 0); + if (lqlen < 1) + lqlen = SOMAXCONN; + break; case 'P': pidfile = optarg; break; @@ -711,5 +717,5 @@ main(int argc, char *argv[]) /* * Wait for connections. */ - main_loop(sockpath, pfh); + main_loop(lqlen, sockpath, pfh); } From owner-svn-src-all@freebsd.org Tue Oct 13 03:10:05 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C1AB9A10C66; Tue, 13 Oct 2015 03:10:05 +0000 (UTC) (envelope-from cem@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 87DF39A9; Tue, 13 Oct 2015 03:10:05 +0000 (UTC) (envelope-from cem@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t9D3A4hZ043787; Tue, 13 Oct 2015 03:10:04 GMT (envelope-from cem@FreeBSD.org) Received: (from cem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9D3A4Uq043786; Tue, 13 Oct 2015 03:10:04 GMT (envelope-from cem@FreeBSD.org) Message-Id: <201510130310.t9D3A4Uq043786@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cem set sender to cem@FreeBSD.org using -f From: "Conrad E. Meyer" Date: Tue, 13 Oct 2015 03:10:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289205 - head/sys/dev/ntb/ntb_hw X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Oct 2015 03:10:05 -0000 Author: cem Date: Tue Oct 13 03:10:04 2015 New Revision: 289205 URL: https://svnweb.freebsd.org/changeset/base/289205 Log: NTB: MFV 87034511: Correct Number of Scratch Pad Registers The NTB Xeon hardware has 16 scratch pad registers and 16 back-to-back scratch pad registers. Correct the #define to represent this and update the variable names to reflect their usage. Authored by: Jon Mason Obtained from: Linux Sponsored by: EMC / Isilon Storage Division Modified: head/sys/dev/ntb/ntb_hw/ntb_regs.h Modified: head/sys/dev/ntb/ntb_hw/ntb_regs.h ============================================================================== --- head/sys/dev/ntb/ntb_hw/ntb_regs.h Tue Oct 13 02:34:41 2015 (r289204) +++ head/sys/dev/ntb/ntb_hw/ntb_regs.h Tue Oct 13 03:10:04 2015 (r289205) @@ -37,7 +37,7 @@ #define XEON_MSIX_CNT 4 #define XEON_MAX_SPADS 16 -#define XEON_MAX_COMPAT_SPADS 8 +#define XEON_MAX_COMPAT_SPADS 16 /* Reserve the uppermost bit for link interrupt */ #define XEON_MAX_DB_BITS 15 #define XEON_DB_BITS_PER_VEC 5 From owner-svn-src-all@freebsd.org Tue Oct 13 03:10:38 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5DEBDA10CD6; Tue, 13 Oct 2015 03:10:38 +0000 (UTC) (envelope-from cem@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2503EB78; Tue, 13 Oct 2015 03:10:38 +0000 (UTC) (envelope-from cem@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t9D3Ab1o045757; Tue, 13 Oct 2015 03:10:37 GMT (envelope-from cem@FreeBSD.org) Received: (from cem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9D3Abtc045756; Tue, 13 Oct 2015 03:10:37 GMT (envelope-from cem@FreeBSD.org) Message-Id: <201510130310.t9D3Abtc045756@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cem set sender to cem@FreeBSD.org using -f From: "Conrad E. Meyer" Date: Tue, 13 Oct 2015 03:10:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289206 - head/sys/dev/ntb/ntb_hw X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Oct 2015 03:10:38 -0000 Author: cem Date: Tue Oct 13 03:10:36 2015 New Revision: 289206 URL: https://svnweb.freebsd.org/changeset/base/289206 Log: NTB: MFV b6750cfe: Correct USD/DSD Identification Due to ambiguous documentation, the USD/DSD identification is backward when compared to the setting in BIOS. Correct the bits to match the BIOS setting. Authored by: Jon Mason Obtained from: Linux Sponsored by: EMC / Isilon Storage Division Modified: head/sys/dev/ntb/ntb_hw/ntb_hw.c Modified: head/sys/dev/ntb/ntb_hw/ntb_hw.c ============================================================================== --- head/sys/dev/ntb/ntb_hw/ntb_hw.c Tue Oct 13 03:10:04 2015 (r289205) +++ head/sys/dev/ntb/ntb_hw/ntb_hw.c Tue Oct 13 03:10:36 2015 (r289206) @@ -690,9 +690,9 @@ ntb_setup_xeon(struct ntb_softc *ntb) } if ((val & XEON_PPD_DEV_TYPE) != 0) - ntb->dev_type = NTB_DEV_DSD; - else ntb->dev_type = NTB_DEV_USD; + else + ntb->dev_type = NTB_DEV_DSD; ntb->reg_ofs.pdb = XEON_PDOORBELL_OFFSET; ntb->reg_ofs.pdb_mask = XEON_PDBMSK_OFFSET; From owner-svn-src-all@freebsd.org Tue Oct 13 03:11:22 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A889BA10D3E; Tue, 13 Oct 2015 03:11:22 +0000 (UTC) (envelope-from cem@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 58800D6E; Tue, 13 Oct 2015 03:11:22 +0000 (UTC) (envelope-from cem@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t9D3BLuc045848; Tue, 13 Oct 2015 03:11:21 GMT (envelope-from cem@FreeBSD.org) Received: (from cem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9D3BL9p045845; Tue, 13 Oct 2015 03:11:21 GMT (envelope-from cem@FreeBSD.org) Message-Id: <201510130311.t9D3BL9p045845@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cem set sender to cem@FreeBSD.org using -f From: "Conrad E. Meyer" Date: Tue, 13 Oct 2015 03:11:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289207 - in head/sys/dev/ntb: if_ntb ntb_hw X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Oct 2015 03:11:22 -0000 Author: cem Date: Tue Oct 13 03:11:21 2015 New Revision: 289207 URL: https://svnweb.freebsd.org/changeset/base/289207 Log: NTB: Add hw.ntb sysctl node Modified: head/sys/dev/ntb/if_ntb/if_ntb.c head/sys/dev/ntb/ntb_hw/ntb_hw.c head/sys/dev/ntb/ntb_hw/ntb_hw.h Modified: head/sys/dev/ntb/if_ntb/if_ntb.c ============================================================================== --- head/sys/dev/ntb/if_ntb/if_ntb.c Tue Oct 13 03:10:36 2015 (r289206) +++ head/sys/dev/ntb/if_ntb/if_ntb.c Tue Oct 13 03:11:21 2015 (r289207) @@ -39,6 +39,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include Modified: head/sys/dev/ntb/ntb_hw/ntb_hw.c ============================================================================== --- head/sys/dev/ntb/ntb_hw/ntb_hw.c Tue Oct 13 03:10:36 2015 (r289206) +++ head/sys/dev/ntb/ntb_hw/ntb_hw.c Tue Oct 13 03:11:21 2015 (r289207) @@ -35,6 +35,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -232,6 +233,8 @@ static devclass_t ntb_devclass; DRIVER_MODULE(ntb_hw, pci, ntb_pci_driver, ntb_devclass, NULL, NULL); MODULE_VERSION(ntb_hw, 1); +SYSCTL_NODE(_hw, OID_AUTO, ntb, CTLFLAG_RW, 0, "NTB sysctls"); + /* * OS <-> Driver linkage functions */ Modified: head/sys/dev/ntb/ntb_hw/ntb_hw.h ============================================================================== --- head/sys/dev/ntb/ntb_hw/ntb_hw.h Tue Oct 13 03:10:36 2015 (r289206) +++ head/sys/dev/ntb/ntb_hw/ntb_hw.h Tue Oct 13 03:11:21 2015 (r289207) @@ -44,6 +44,8 @@ enum ntb_hw_event { NTB_EVENT_HW_LINK_DOWN, }; +SYSCTL_DECL(_hw_ntb); + typedef void (*ntb_db_callback)(void *data, int db_num); typedef void (*ntb_event_callback)(void *data, enum ntb_hw_event event); From owner-svn-src-all@freebsd.org Tue Oct 13 03:12:13 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9B20DA10E61; Tue, 13 Oct 2015 03:12:13 +0000 (UTC) (envelope-from cem@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 70066FF4; Tue, 13 Oct 2015 03:12:13 +0000 (UTC) (envelope-from cem@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t9D3CCrJ046617; Tue, 13 Oct 2015 03:12:12 GMT (envelope-from cem@FreeBSD.org) Received: (from cem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9D3CCm2046612; Tue, 13 Oct 2015 03:12:12 GMT (envelope-from cem@FreeBSD.org) Message-Id: <201510130312.t9D3CCm2046612@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cem set sender to cem@FreeBSD.org using -f From: "Conrad E. Meyer" Date: Tue, 13 Oct 2015 03:12:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289208 - in head/sys/dev/ntb: if_ntb ntb_hw X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Oct 2015 03:12:13 -0000 Author: cem Date: Tue Oct 13 03:12:11 2015 New Revision: 289208 URL: https://svnweb.freebsd.org/changeset/base/289208 Log: NTB: MFV 948d3a65: Xeon Errata Workaround There is a Xeon hardware errata related to writes to SDOORBELL or B2BDOORBELL in conjunction with inbound access to NTB MMIO Space, which may hang the system. To workaround this issue, use one of the memory windows to access the interrupt and scratch pad registers on the remote system. This bypasses the issue, but removes one of the memory windows from use by the transport. This reduction of MWs necessitates adding some logic to determine the number of available MWs. Since some NTB usage methodologies may have unidirectional traffic, the ability to disable the workaround via modparm has been added. See BF113 in http://www.intel.com/content/dam/www/public/us/en/documents/specification-updates/xeon-c5500-c3500-spec-update.pdf See BT119 in http://www.intel.com/content/dam/www/public/us/en/documents/specification-updates/xeon-e5-family-spec-update.pdf Authored by: Jon Mason Obtained from: Linux Sponsored by: EMC / Isilon Storage Division Modified: head/sys/dev/ntb/if_ntb/if_ntb.c head/sys/dev/ntb/ntb_hw/ntb_hw.c head/sys/dev/ntb/ntb_hw/ntb_hw.h head/sys/dev/ntb/ntb_hw/ntb_regs.h Modified: head/sys/dev/ntb/if_ntb/if_ntb.c ============================================================================== --- head/sys/dev/ntb/if_ntb/if_ntb.c Tue Oct 13 03:11:21 2015 (r289207) +++ head/sys/dev/ntb/if_ntb/if_ntb.c Tue Oct 13 03:12:11 2015 (r289208) @@ -78,6 +78,11 @@ __FBSDID("$FreeBSD$"); #define NTB_RXQ_SIZE 300 static unsigned int transport_mtu = 0x4000 + ETHER_HDR_LEN + ETHER_CRC_LEN; + +/* + * This is an oversimplification to work around Xeon Errata. The second client + * may be usable for unidirectional traffic. + */ static unsigned int max_num_clients = 1; STAILQ_HEAD(ntb_queue_list, ntb_queue_entry); @@ -1032,11 +1037,16 @@ ntb_transport_link_work(void *arg) struct ntb_softc *ntb = nt->ntb; struct ntb_transport_qp *qp; uint64_t val64; - uint32_t val; - int rc, i; + uint32_t val, i, num_mw; + int rc; + + if (ntb_has_feature(ntb, NTB_REGS_THRU_MW)) + num_mw = NTB_NUM_MW - 1; + else + num_mw = NTB_NUM_MW; /* send the local info, in the opposite order of the way we read it */ - for (i = 0; i < NTB_NUM_MW; i++) { + for (i = 0; i < num_mw; i++) { rc = ntb_write_remote_spad(ntb, IF_NTB_MW0_SZ_HIGH + (i * 2), ntb_get_mw_size(ntb, i) >> 32); if (rc != 0) @@ -1048,7 +1058,7 @@ ntb_transport_link_work(void *arg) goto out; } - rc = ntb_write_remote_spad(ntb, IF_NTB_NUM_MWS, NTB_NUM_MW); + rc = ntb_write_remote_spad(ntb, IF_NTB_NUM_MWS, num_mw); if (rc != 0) goto out; @@ -1079,10 +1089,10 @@ ntb_transport_link_work(void *arg) if (rc != 0) goto out; - if (val != NTB_NUM_MW) + if (val != num_mw) goto out; - for (i = 0; i < NTB_NUM_MW; i++) { + for (i = 0; i < num_mw; i++) { rc = ntb_read_local_spad(ntb, IF_NTB_MW0_SZ_HIGH + (i * 2), &val); if (rc != 0) Modified: head/sys/dev/ntb/ntb_hw/ntb_hw.c ============================================================================== --- head/sys/dev/ntb/ntb_hw/ntb_hw.c Tue Oct 13 03:11:21 2015 (r289207) +++ head/sys/dev/ntb/ntb_hw/ntb_hw.c Tue Oct 13 03:12:11 2015 (r289208) @@ -81,9 +81,6 @@ enum ntb_device_type { #define HAS_FEATURE(feature) \ ((ntb->features & (feature)) != 0) -#define NTB_BAR_SIZE_4K (1 << 0) -#define NTB_REGS_THRU_MW (1 << 1) - struct ntb_hw_info { uint32_t device_id; const char *desc; @@ -131,9 +128,9 @@ struct ntb_softc { struct ntb_db_cb *db_cb; struct { - uint32_t max_spads; - uint32_t max_db_bits; - uint32_t msix_cnt; + uint8_t max_spads; + uint8_t max_db_bits; + uint8_t msix_cnt; } limits; struct { uint32_t pdb; @@ -706,6 +703,28 @@ ntb_setup_xeon(struct ntb_softc *ntb) ntb->reg_ofs.spad_local = XEON_SPAD_OFFSET; ntb->reg_ofs.spci_cmd = XEON_PCICMD_OFFSET; + /* + * There is a Xeon hardware errata related to writes to SDOORBELL or + * B2BDOORBELL in conjunction with inbound access to NTB MMIO space, + * which may hang the system. To workaround this use the second memory + * window to access the interrupt and scratch pad registers on the + * remote system. + */ + if (HAS_FEATURE(NTB_REGS_THRU_MW)) + /* + * Set the Limit register to 4k, the minimum size, to prevent + * an illegal access. + */ + ntb_reg_write(8, XEON_PBAR4LMT_OFFSET, + ntb_get_mw_size(ntb, 1) + 0x1000); + else + /* + * Disable the limit register, just in case it is set to + * something silly. + */ + ntb_reg_write(8, XEON_PBAR4LMT_OFFSET, 0); + + if (ntb->conn_type == NTB_CONN_B2B) { ntb->reg_ofs.sdb = XEON_B2B_DOORBELL_OFFSET; ntb->reg_ofs.spad_remote = XEON_B2B_SPAD_OFFSET; @@ -825,9 +844,18 @@ configure_xeon_secondary_side_bars(struc if (HAS_FEATURE(NTB_REGS_THRU_MW)) ntb_reg_write(8, XEON_PBAR4XLAT_OFFSET, MBAR01_DSD_ADDR); - else + else { ntb_reg_write(8, XEON_PBAR4XLAT_OFFSET, PBAR4XLAT_USD_ADDR); + /* + * B2B_XLAT_OFFSET is a 64-bit register but can only be + * written 32 bits at a time. + */ + ntb_reg_write(4, XEON_B2B_XLAT_OFFSETL, + MBAR01_DSD_ADDR & 0xffffffff); + ntb_reg_write(4, XEON_B2B_XLAT_OFFSETU, + MBAR01_DSD_ADDR >> 32); + } ntb_reg_write(8, XEON_SBAR0BASE_OFFSET, MBAR01_USD_ADDR); ntb_reg_write(8, XEON_SBAR2BASE_OFFSET, MBAR23_USD_ADDR); ntb_reg_write(8, XEON_SBAR4BASE_OFFSET, MBAR45_USD_ADDR); @@ -836,9 +864,18 @@ configure_xeon_secondary_side_bars(struc if (HAS_FEATURE(NTB_REGS_THRU_MW)) ntb_reg_write(8, XEON_PBAR4XLAT_OFFSET, MBAR01_USD_ADDR); - else + else { ntb_reg_write(8, XEON_PBAR4XLAT_OFFSET, PBAR4XLAT_DSD_ADDR); + /* + * B2B_XLAT_OFFSET is a 64-bit register but can only be + * written 32 bits at a time. + */ + ntb_reg_write(4, XEON_B2B_XLAT_OFFSETL, + MBAR01_USD_ADDR & 0xffffffff); + ntb_reg_write(4, XEON_B2B_XLAT_OFFSETU, + MBAR01_USD_ADDR >> 32); + } ntb_reg_write(8, XEON_SBAR0BASE_OFFSET, MBAR01_DSD_ADDR); ntb_reg_write(8, XEON_SBAR2BASE_OFFSET, MBAR23_DSD_ADDR); ntb_reg_write(8, XEON_SBAR4BASE_OFFSET, MBAR45_DSD_ADDR); @@ -1171,7 +1208,7 @@ ntb_unregister_transport(struct ntb_soft * * RETURNS: total number of scratch pad registers available */ -int +uint8_t ntb_get_max_spads(struct ntb_softc *ntb) { @@ -1415,3 +1452,11 @@ device_t ntb_get_device(struct ntb_softc return (ntb->device); } + +/* Export HW-specific errata information. */ +bool +ntb_has_feature(struct ntb_softc *ntb, uint64_t feature) +{ + + return (HAS_FEATURE(feature)); +} Modified: head/sys/dev/ntb/ntb_hw/ntb_hw.h ============================================================================== --- head/sys/dev/ntb/ntb_hw/ntb_hw.h Tue Oct 13 03:11:21 2015 (r289207) +++ head/sys/dev/ntb/ntb_hw/ntb_hw.h Tue Oct 13 03:12:11 2015 (r289208) @@ -58,7 +58,7 @@ void *ntb_find_transport(struct ntb_soft struct ntb_softc *ntb_register_transport(struct ntb_softc *ntb, void *transport); void ntb_unregister_transport(struct ntb_softc *ntb); -int ntb_get_max_spads(struct ntb_softc *ntb); +uint8_t ntb_get_max_spads(struct ntb_softc *ntb); int ntb_write_local_spad(struct ntb_softc *ntb, unsigned int idx, uint32_t val); int ntb_read_local_spad(struct ntb_softc *ntb, unsigned int idx, uint32_t *val); int ntb_write_remote_spad(struct ntb_softc *ntb, unsigned int idx, @@ -73,4 +73,8 @@ void ntb_ring_sdb(struct ntb_softc *ntb, bool ntb_query_link_status(struct ntb_softc *ntb); device_t ntb_get_device(struct ntb_softc *ntb); +#define NTB_BAR_SIZE_4K (1 << 0) +#define NTB_REGS_THRU_MW (1 << 1) +bool ntb_has_feature(struct ntb_softc *, uint64_t); + #endif /* _NTB_HW_H_ */ Modified: head/sys/dev/ntb/ntb_hw/ntb_regs.h ============================================================================== --- head/sys/dev/ntb/ntb_hw/ntb_regs.h Tue Oct 13 03:11:21 2015 (r289207) +++ head/sys/dev/ntb/ntb_hw/ntb_regs.h Tue Oct 13 03:12:11 2015 (r289208) @@ -71,7 +71,8 @@ #define XEON_WCCNTRL_OFFSET 0x00e0 #define XEON_B2B_SPAD_OFFSET 0x0100 #define XEON_B2B_DOORBELL_OFFSET 0x0140 -#define XEON_B2B_XLAT_OFFSET 0x0144 +#define XEON_B2B_XLAT_OFFSETL 0x0144 +#define XEON_B2B_XLAT_OFFSETU 0x0148 #define SOC_MSIX_CNT 34 #define SOC_MAX_SPADS 16 @@ -136,16 +137,16 @@ #define NTB_DEV_DSD 1 #define NTB_DEV_USD 0 -#define PBAR2XLAT_USD_ADDR 0x0000004000000000 -#define PBAR4XLAT_USD_ADDR 0x0000008000000000 -#define MBAR01_USD_ADDR 0x000000210000000c -#define MBAR23_USD_ADDR 0x000000410000000c -#define MBAR45_USD_ADDR 0x000000810000000c -#define PBAR2XLAT_DSD_ADDR 0x0000004100000000 -#define PBAR4XLAT_DSD_ADDR 0x0000008100000000 -#define MBAR01_DSD_ADDR 0x000000200000000c -#define MBAR23_DSD_ADDR 0x000000400000000c -#define MBAR45_DSD_ADDR 0x000000800000000c +#define PBAR2XLAT_USD_ADDR 0x0000004000000000ull +#define PBAR4XLAT_USD_ADDR 0x0000008000000000ull +#define MBAR01_USD_ADDR 0x000000210000000cull +#define MBAR23_USD_ADDR 0x000000410000000cull +#define MBAR45_USD_ADDR 0x000000810000000cull +#define PBAR2XLAT_DSD_ADDR 0x0000004100000000ull +#define PBAR4XLAT_DSD_ADDR 0x0000008100000000ull +#define MBAR01_DSD_ADDR 0x000000200000000cull +#define MBAR23_DSD_ADDR 0x000000400000000cull +#define MBAR45_DSD_ADDR 0x000000800000000cull /* XEON Shadowed MMIO Space */ #define XEON_SHADOW_PDOORBELL_OFFSET 0x60 From owner-svn-src-all@freebsd.org Tue Oct 13 03:12:56 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id EF39BA10F13; Tue, 13 Oct 2015 03:12:56 +0000 (UTC) (envelope-from cem@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id BA3DB1181; Tue, 13 Oct 2015 03:12:56 +0000 (UTC) (envelope-from cem@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t9D3CucI046679; Tue, 13 Oct 2015 03:12:56 GMT (envelope-from cem@FreeBSD.org) Received: (from cem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9D3CtKo046677; Tue, 13 Oct 2015 03:12:55 GMT (envelope-from cem@FreeBSD.org) Message-Id: <201510130312.t9D3CtKo046677@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cem set sender to cem@FreeBSD.org using -f From: "Conrad E. Meyer" Date: Tue, 13 Oct 2015 03:12:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289209 - in head/sys/dev/ntb: if_ntb ntb_hw X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Oct 2015 03:12:57 -0000 Author: cem Date: Tue Oct 13 03:12:55 2015 New Revision: 289209 URL: https://svnweb.freebsd.org/changeset/base/289209 Log: NTB: Style(9) cleanups Modified: head/sys/dev/ntb/if_ntb/if_ntb.c head/sys/dev/ntb/ntb_hw/ntb_hw.c Modified: head/sys/dev/ntb/if_ntb/if_ntb.c ============================================================================== --- head/sys/dev/ntb/if_ntb/if_ntb.c Tue Oct 13 03:12:11 2015 (r289208) +++ head/sys/dev/ntb/if_ntb/if_ntb.c Tue Oct 13 03:12:55 2015 (r289209) @@ -307,7 +307,7 @@ DECLARE_MODULE(if_ntb, if_ntb_mod, SI_SU MODULE_DEPEND(if_ntb, ntb_hw, 1, 1, 1); static int -ntb_setup_interface() +ntb_setup_interface(void) { struct ifnet *ifp; struct ntb_queue_handlers handlers = { ntb_net_rx_handler, @@ -350,7 +350,7 @@ ntb_setup_interface() } static int -ntb_teardown_interface() +ntb_teardown_interface(void) { if (net_softc.qp != NULL) @@ -528,7 +528,6 @@ ntb_transport_free(void *transport) if (!test_bit(i, &nt->qp_bitmap)) ntb_transport_free_queue(&nt->qps[i]); - ntb_unregister_event_callback(ntb); for (i = 0; i < NTB_NUM_MW; i++) Modified: head/sys/dev/ntb/ntb_hw/ntb_hw.c ============================================================================== --- head/sys/dev/ntb/ntb_hw/ntb_hw.c Tue Oct 13 03:12:11 2015 (r289208) +++ head/sys/dev/ntb/ntb_hw/ntb_hw.c Tue Oct 13 03:12:55 2015 (r289209) @@ -238,29 +238,26 @@ SYSCTL_NODE(_hw, OID_AUTO, ntb, CTLFLAG_ static int ntb_probe(device_t device) { - struct ntb_hw_info *p = ntb_get_device_info(pci_get_devid(device)); + struct ntb_hw_info *p; - if (p != NULL) { - device_set_desc(device, p->desc); - return (0); - } else + p = ntb_get_device_info(pci_get_devid(device)); + if (p == NULL) return (ENXIO); -} -#define DETACH_ON_ERROR(func) \ - error = func; \ - if (error < 0) { \ - ntb_detach(device); \ - return (error); \ - } + device_set_desc(device, p->desc); + return (0); +} static int ntb_attach(device_t device) { - struct ntb_softc *ntb = DEVICE2SOFTC(device); - struct ntb_hw_info *p = ntb_get_device_info(pci_get_devid(device)); + struct ntb_softc *ntb; + struct ntb_hw_info *p; int error; + ntb = DEVICE2SOFTC(device); + p = ntb_get_device_info(pci_get_devid(device)); + ntb->device = device; ntb->type = p->type; ntb->features = p->features; @@ -269,20 +266,30 @@ ntb_attach(device_t device) callout_init(&ntb->heartbeat_timer, 1); callout_init(&ntb->lr_timer, 1); - DETACH_ON_ERROR(ntb_map_pci_bars(ntb)); - DETACH_ON_ERROR(ntb_initialize_hw(ntb)); - DETACH_ON_ERROR(ntb_setup_interrupts(ntb)); + error = ntb_map_pci_bars(ntb); + if (error) + goto out; + error = ntb_initialize_hw(ntb); + if (error) + goto out; + error = ntb_setup_interrupts(ntb); + if (error) + goto out; pci_enable_busmaster(ntb->device); +out: + if (error != 0) + ntb_detach(device); return (error); } static int ntb_detach(device_t device) { - struct ntb_softc *ntb = DEVICE2SOFTC(device); + struct ntb_softc *ntb; + ntb = DEVICE2SOFTC(device); callout_drain(&ntb->heartbeat_timer); callout_drain(&ntb->lr_timer); ntb_teardown_interrupts(ntb); @@ -299,25 +306,22 @@ ntb_map_pci_bars(struct ntb_softc *ntb) ntb->bar_info[NTB_CONFIG_BAR].pci_resource_id = PCIR_BAR(0); rc = map_pci_bar(ntb, map_mmr_bar, &ntb->bar_info[NTB_CONFIG_BAR]); if (rc != 0) - return rc; + return (rc); - ntb->bar_info[NTB_B2B_BAR_1].pci_resource_id = PCIR_BAR(2); + ntb->bar_info[NTB_B2B_BAR_1].pci_resource_id = PCIR_BAR(2); rc = map_pci_bar(ntb, map_memory_window_bar, &ntb->bar_info[NTB_B2B_BAR_1]); if (rc != 0) - return rc; + return (rc); - ntb->bar_info[NTB_B2B_BAR_2].pci_resource_id = PCIR_BAR(4); + ntb->bar_info[NTB_B2B_BAR_2].pci_resource_id = PCIR_BAR(4); if (HAS_FEATURE(NTB_REGS_THRU_MW)) rc = map_pci_bar(ntb, map_mmr_bar, &ntb->bar_info[NTB_B2B_BAR_2]); else rc = map_pci_bar(ntb, map_memory_window_bar, &ntb->bar_info[NTB_B2B_BAR_2]); - if (rc != 0) - return rc; - - return (0); + return (rc); } static int @@ -327,15 +331,13 @@ map_pci_bar(struct ntb_softc *ntb, bar_m int rc; rc = strategy(ntb, bar); - if (rc != 0) { + if (rc != 0) device_printf(ntb->device, "unable to allocate pci resource\n"); - } else { + else device_printf(ntb->device, "Bar size = %lx, v %p, p %p\n", - bar->size, bar->vbase, - (void *)(bar->pbase)); - } + bar->size, bar->vbase, (void *)(bar->pbase)); return (rc); } @@ -344,14 +346,12 @@ map_mmr_bar(struct ntb_softc *ntb, struc { bar->pci_resource = bus_alloc_resource_any(ntb->device, SYS_RES_MEMORY, - &bar->pci_resource_id, RF_ACTIVE); - + &bar->pci_resource_id, RF_ACTIVE); if (bar->pci_resource == NULL) return (ENXIO); - else { - save_bar_parameters(bar); - return (0); - } + + save_bar_parameters(bar); + return (0); } static int @@ -360,55 +360,56 @@ map_memory_window_bar(struct ntb_softc * int rc; uint8_t bar_size_bits = 0; - bar->pci_resource = bus_alloc_resource_any(ntb->device, - SYS_RES_MEMORY, &bar->pci_resource_id, RF_ACTIVE); + bar->pci_resource = bus_alloc_resource_any(ntb->device, SYS_RES_MEMORY, + &bar->pci_resource_id, RF_ACTIVE); if (bar->pci_resource == NULL) return (ENXIO); - else { - save_bar_parameters(bar); - /* - * Ivytown NTB BAR sizes are misreported by the hardware due to - * a hardware issue. To work around this, query the size it - * should be configured to by the device and modify the resource - * to correspond to this new size. The BIOS on systems with this - * problem is required to provide enough address space to allow - * the driver to make this change safely. - * - * Ideally I could have just specified the size when I allocated - * the resource like: - * bus_alloc_resource(ntb->device, - * SYS_RES_MEMORY, &bar->pci_resource_id, 0ul, ~0ul, - * 1ul << bar_size_bits, RF_ACTIVE); - * but the PCI driver does not honor the size in this call, so - * we have to modify it after the fact. - */ - if (HAS_FEATURE(NTB_BAR_SIZE_4K)) { - if (bar->pci_resource_id == PCIR_BAR(2)) - bar_size_bits = pci_read_config(ntb->device, - XEON_PBAR23SZ_OFFSET, 1); - else - bar_size_bits = pci_read_config(ntb->device, - XEON_PBAR45SZ_OFFSET, 1); - rc = bus_adjust_resource(ntb->device, SYS_RES_MEMORY, - bar->pci_resource, bar->pbase, - bar->pbase + (1ul << bar_size_bits) - 1); - if (rc != 0 ) { - device_printf(ntb->device, - "unable to resize bar\n"); - return (rc); - } else - save_bar_parameters(bar); - } - /* Mark bar region as write combining to improve performance. */ - rc = pmap_change_attr((vm_offset_t)bar->vbase, bar->size, - VM_MEMATTR_WRITE_COMBINING); + save_bar_parameters(bar); + /* + * Ivytown NTB BAR sizes are misreported by the hardware due to a + * hardware issue. To work around this, query the size it should be + * configured to by the device and modify the resource to correspond to + * this new size. The BIOS on systems with this problem is required to + * provide enough address space to allow the driver to make this change + * safely. + * + * Ideally I could have just specified the size when I allocated the + * resource like: + * bus_alloc_resource(ntb->device, + * SYS_RES_MEMORY, &bar->pci_resource_id, 0ul, ~0ul, + * 1ul << bar_size_bits, RF_ACTIVE); + * but the PCI driver does not honor the size in this call, so we have + * to modify it after the fact. + */ + if (HAS_FEATURE(NTB_BAR_SIZE_4K)) { + if (bar->pci_resource_id == PCIR_BAR(2)) + bar_size_bits = pci_read_config(ntb->device, + XEON_PBAR23SZ_OFFSET, 1); + else + bar_size_bits = pci_read_config(ntb->device, + XEON_PBAR45SZ_OFFSET, 1); + + rc = bus_adjust_resource(ntb->device, SYS_RES_MEMORY, + bar->pci_resource, bar->pbase, + bar->pbase + (1ul << bar_size_bits) - 1); if (rc != 0) { - device_printf(ntb->device, "unable to mark bar as" - " WRITE_COMBINING\n"); + device_printf(ntb->device, + "unable to resize bar\n"); return (rc); } + + save_bar_parameters(bar); + } + + /* Mark bar region as write combining to improve performance. */ + rc = pmap_change_attr((vm_offset_t)bar->vbase, bar->size, + VM_MEMATTR_WRITE_COMBINING); + if (rc != 0) { + device_printf(ntb->device, + "unable to mark bar as WRITE_COMBINING\n"); + return (rc); } return (0); } @@ -433,7 +434,7 @@ ntb_setup_interrupts(struct ntb_softc *n { void (*interrupt_handler)(void *); void *int_arg; - bool use_msix = 0; + bool use_msix = false; uint32_t num_vectors; int i; @@ -453,11 +454,11 @@ ntb_setup_interrupts(struct ntb_softc *n if (num_vectors >= 1) { pci_alloc_msix(ntb->device, &num_vectors); if (num_vectors >= 4) - use_msix = TRUE; + use_msix = true; } ntb_create_callbacks(ntb, num_vectors); - if (use_msix == TRUE) { + if (use_msix == true) { for (i = 0; i < num_vectors; i++) { ntb->int_info[i].rid = i + 1; ntb->int_info[i].res = bus_alloc_resource_any( @@ -466,7 +467,7 @@ ntb_setup_interrupts(struct ntb_softc *n if (ntb->int_info[i].res == NULL) { device_printf(ntb->device, "bus_alloc_resource failed\n"); - return (-1); + return (ENOMEM); } ntb->int_info[i].tag = NULL; ntb->allocated_interrupts++; @@ -493,8 +494,7 @@ ntb_setup_interrupts(struct ntb_softc *n return (ENXIO); } } - } - else { + } else { ntb->int_info[0].rid = 0; ntb->int_info[0].res = bus_alloc_resource_any(ntb->device, SYS_RES_IRQ, &ntb->int_info[0].rid, RF_SHAREABLE|RF_ACTIVE); @@ -502,7 +502,7 @@ ntb_setup_interrupts(struct ntb_softc *n if (ntb->int_info[0].res == NULL) { device_printf(ntb->device, "bus_alloc_resource failed\n"); - return (-1); + return (ENOMEM); } ntb->int_info[0].tag = NULL; ntb->allocated_interrupts = 1; @@ -525,7 +525,7 @@ ntb_teardown_interrupts(struct ntb_softc struct ntb_int_info *current_int; int i; - for (i=0; iallocated_interrupts; i++) { + for (i = 0; i < ntb->allocated_interrupts; i++) { current_int = &ntb->int_info[i]; if (current_int->tag != NULL) bus_teardown_intr(ntb->device, current_int->res, @@ -625,7 +625,7 @@ ntb_create_callbacks(struct ntb_softc *n { int i; - ntb->db_cb = malloc(num_vectors * sizeof(struct ntb_db_cb), M_NTB, + ntb->db_cb = malloc(num_vectors * sizeof(*ntb->db_cb), M_NTB, M_ZERO | M_WAITOK); for (i = 0; i < num_vectors; i++) { ntb->db_cb[i].db_num = i; @@ -740,6 +740,7 @@ ntb_setup_xeon(struct ntb_softc *ntb) ntb->bits_per_vector = XEON_DB_BITS_PER_VEC; configure_xeon_secondary_side_bars(ntb); + /* Enable Bus Master and Memory Space on the secondary side */ ntb_reg_write(2, ntb->reg_ofs.spci_cmd, PCIM_CMD_MEMEN | PCIM_CMD_BUSMASTEREN); @@ -813,6 +814,7 @@ ntb_setup_soc(struct ntb_softc *ntb) /* Enable Bus Master and Memory Space on the secondary side */ ntb_reg_write(2, ntb->reg_ofs.spci_cmd, PCIM_CMD_MEMEN | PCIM_CMD_BUSMASTEREN); + callout_reset(&ntb->heartbeat_timer, 0, ntb_handle_heartbeat, ntb); return (0); @@ -888,8 +890,9 @@ ntb_handle_heartbeat(void *arg) { struct ntb_softc *ntb = arg; uint32_t status32; - int rc = ntb_check_link_status(ntb); + int rc; + rc = ntb_check_link_status(ntb); if (rc != 0) device_printf(ntb->device, "Error determining link status\n"); @@ -1053,7 +1056,7 @@ ntb_check_link_status(struct ntb_softc * * This function registers a callback for any HW driver events such as link * up/down, power management notices and etc. * - * RETURNS: An appropriate -ERRNO error value on error, or zero for success. + * RETURNS: An appropriate ERRNO error value on error, or zero for success. */ int ntb_register_event_callback(struct ntb_softc *ntb, ntb_event_callback func) @@ -1090,7 +1093,7 @@ ntb_unregister_event_callback(struct ntb * on the primary side. The function will unmask the doorbell as well to * allow interrupt. * - * RETURNS: An appropriate -ERRNO error value on error, or zero for success. + * RETURNS: An appropriate ERRNO error value on error, or zero for success. */ int ntb_register_db_callback(struct ntb_softc *ntb, unsigned int idx, void *data, @@ -1224,7 +1227,7 @@ ntb_get_max_spads(struct ntb_softc *ntb) * This function allows writing of a 32bit value to the indexed scratchpad * register. The register resides on the secondary (external) side. * - * RETURNS: An appropriate -ERRNO error value on error, or zero for success. + * RETURNS: An appropriate ERRNO error value on error, or zero for success. */ int ntb_write_local_spad(struct ntb_softc *ntb, unsigned int idx, uint32_t val) @@ -1247,7 +1250,7 @@ ntb_write_local_spad(struct ntb_softc *n * This function allows reading of the 32bit scratchpad register on * the primary (internal) side. * - * RETURNS: An appropriate -ERRNO error value on error, or zero for success. + * RETURNS: An appropriate ERRNO error value on error, or zero for success. */ int ntb_read_local_spad(struct ntb_softc *ntb, unsigned int idx, uint32_t *val) @@ -1270,7 +1273,7 @@ ntb_read_local_spad(struct ntb_softc *nt * This function allows writing of a 32bit value to the indexed scratchpad * register. The register resides on the secondary (external) side. * - * RETURNS: An appropriate -ERRNO error value on error, or zero for success. + * RETURNS: An appropriate ERRNO error value on error, or zero for success. */ int ntb_write_remote_spad(struct ntb_softc *ntb, unsigned int idx, uint32_t val) @@ -1296,7 +1299,7 @@ ntb_write_remote_spad(struct ntb_softc * * This function allows reading of the 32bit scratchpad register on * the primary (internal) side. * - * RETURNS: An appropriate -ERRNO error value on error, or zero for success. + * RETURNS: An appropriate ERRNO error value on error, or zero for success. */ int ntb_read_remote_spad(struct ntb_softc *ntb, unsigned int idx, uint32_t *val) @@ -1397,7 +1400,7 @@ ntb_set_mw_addr(struct ntb_softc *ntb, u * This function allows triggering of a doorbell on the secondary/external * side that will initiate an interrupt on the remote host * - * RETURNS: An appropriate -ERRNO error value on error, or zero for success. + * RETURNS: An appropriate ERRNO error value on error, or zero for success. */ void ntb_ring_sdb(struct ntb_softc *ntb, unsigned int db) @@ -1405,7 +1408,7 @@ ntb_ring_sdb(struct ntb_softc *ntb, unsi if (ntb->type == NTB_SOC) ntb_reg_write(8, ntb->reg_ofs.sdb, (uint64_t) 1 << db); - else + else { if (HAS_FEATURE(NTB_REGS_THRU_MW)) ntb_mw_write(2, XEON_SHADOW_PDOORBELL_OFFSET, ((1 << ntb->bits_per_vector) - 1) << @@ -1414,6 +1417,7 @@ ntb_ring_sdb(struct ntb_softc *ntb, unsi ntb_reg_write(2, ntb->reg_ofs.sdb, ((1 << ntb->bits_per_vector) - 1) << (db * ntb->bits_per_vector)); + } } /** @@ -1434,20 +1438,16 @@ ntb_query_link_status(struct ntb_softc * static void save_bar_parameters(struct ntb_pci_bar_info *bar) { - bar->pci_bus_tag = - rman_get_bustag(bar->pci_resource); - bar->pci_bus_handle = - rman_get_bushandle(bar->pci_resource); - bar->pbase = - rman_get_start(bar->pci_resource); - bar->size = - rman_get_size(bar->pci_resource); - bar->vbase = - rman_get_virtual(bar->pci_resource); + bar->pci_bus_tag = rman_get_bustag(bar->pci_resource); + bar->pci_bus_handle = rman_get_bushandle(bar->pci_resource); + bar->pbase = rman_get_start(bar->pci_resource); + bar->size = rman_get_size(bar->pci_resource); + bar->vbase = rman_get_virtual(bar->pci_resource); } -device_t ntb_get_device(struct ntb_softc *ntb) +device_t +ntb_get_device(struct ntb_softc *ntb) { return (ntb->device); From owner-svn-src-all@freebsd.org Tue Oct 13 03:49:18 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 711BEA119D9; Tue, 13 Oct 2015 03:49:18 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: from mail-oi0-x233.google.com (mail-oi0-x233.google.com [IPv6:2607:f8b0:4003: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 3422332F; Tue, 13 Oct 2015 03:49:18 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: by oiao187 with SMTP id o187so2916040oia.2; Mon, 12 Oct 2015 20:49:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=content-type:mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=SUpLrAlEJkBo/3/9g4sumKv9fdfIzX5vPlC5lAc9SuU=; b=ZU6+U5qtLaOunMpO/5MiLIDGnI6axPGKSYThexHKvNVj9JUb5vPIDan+vjFiBn4wQn 7RxUSSk1Q9CM5m0EDhLidEz9WcCd3hXoSXPc8MLwLqWXiFyy2HoTIs+lcCbSObuR8QPN aq6Btsmi5b23tnkA0u94x5dPY21JLenIQROdh59iqiEkq/8AFlzYj7I5k34aBtn/cABl JorP1cp1cDco0pDf+LMPdV0Hjj0hQxerc8Pf2PiflRG3yN1hXMsxGUeFMjzemMgN/5p4 5l+5qtcEXdOSxduYHKC4+uabrn61FGKV4TDXsTMfcEpjrU77N38THGwB0ACG98IPHxcB nfEg== X-Received: by 10.202.69.5 with SMTP id s5mr17276656oia.123.1444708157417; Mon, 12 Oct 2015 20:49:17 -0700 (PDT) Received: from [22.218.173.19] (m9b5636d0.tmodns.net. [208.54.86.155]) by smtp.gmail.com with ESMTPSA id pp2sm594414oeb.1.2015.10.12.20.49.16 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 12 Oct 2015 20:49:16 -0700 (PDT) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (1.0) Subject: Re: svn commit: r289208 - in head/sys/dev/ntb: if_ntb ntb_hw From: Garrett Cooper X-Mailer: iPhone Mail (13A452) In-Reply-To: <201510130312.t9D3CCm2046612@repo.freebsd.org> Date: Mon, 12 Oct 2015 20:49:15 -0700 Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Transfer-Encoding: 7bit Message-Id: References: <201510130312.t9D3CCm2046612@repo.freebsd.org> To: "Conrad E. Meyer" X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Oct 2015 03:49:18 -0000 > On Oct 12, 2015, at 20:12, Conrad E. Meyer wrote: > > Author: cem > Date: Tue Oct 13 03:12:11 2015 > New Revision: 289208 > URL: https://svnweb.freebsd.org/changeset/base/289208 > > Log: > NTB: MFV 948d3a65: Xeon Errata Workaround NTB? From owner-svn-src-all@freebsd.org Tue Oct 13 04:00:15 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 85394A11F85; Tue, 13 Oct 2015 04:00:15 +0000 (UTC) (envelope-from gjb@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 72BCDE5E; Tue, 13 Oct 2015 04:00:15 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from FreeBSD.org (freefall.freebsd.org [IPv6:2001:1900:2254:206c::16:87]) by freefall.freebsd.org (Postfix) with ESMTP id BB576170A; Tue, 13 Oct 2015 04:00:14 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Date: Tue, 13 Oct 2015 04:00:12 +0000 From: Glen Barber To: Garrett Cooper Cc: "Conrad E. Meyer" , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r289208 - in head/sys/dev/ntb: if_ntb ntb_hw Message-ID: <20151013040012.GC99315@FreeBSD.org> References: <201510130312.t9D3CCm2046612@repo.freebsd.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="GyRA7555PLgSTuth" Content-Disposition: inline In-Reply-To: X-Operating-System: FreeBSD 11.0-CURRENT amd64 X-SCUD-Definition: Sudden Completely Unexpected Dataloss X-SULE-Definition: Sudden Unexpected Learning Event X-PEKBAC-Definition: Problem Exists, Keyboard Between Admin/Computer 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 " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Oct 2015 04:00:15 -0000 --GyRA7555PLgSTuth Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Oct 12, 2015 at 08:49:15PM -0700, Garrett Cooper wrote: >=20 > > On Oct 12, 2015, at 20:12, Conrad E. Meyer wrote: > >=20 > > Author: cem > > Date: Tue Oct 13 03:12:11 2015 > > New Revision: 289208 > > URL: https://svnweb.freebsd.org/changeset/base/289208 > >=20 > > Log: > > NTB: MFV 948d3a65: Xeon Errata Workaround >=20 > NTB? >=20 The driver name? Glen --GyRA7555PLgSTuth Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQIcBAEBCAAGBQJWHIHHAAoJEAMUWKVHj+KTo7UP/3f4ZQZB7w6ujxXtVzNHpEFi O+WblDksHV9ETNVsmVLxRnFLzllIh7j/NCPYP/hkIztj6wmrabLyPncg4qrh0g5c N733wQennpkA0s6huwIA1nNcHl/Mmy00X8CpRJ+VfK5/ifH++RCXL/2hu7tLnnEt qX9p3m+q33Hw0Rvt/bxkjXEwrLYVXhGUIjpHCaP7L4f6FsO5+dL83SShGmtGwE+2 8ofmsjqgVTFOU9TBQmxaGHERmkPPip/FTU04MF5M+TbEhmuhEp+cWSA0OvPRLn/U 2Yoa6oRNs8r6ZGFsvyhGBe1nFohmfK4uwYckEzdF0NYX94vhmXSsLCZgwQ0WdeTz q7WxbWP4t6ITfok7ty+G46TR6SlF64SI1df1D8MYKAoZaSgOX0Qpylli64oppOC0 ieccMS9Wr5zt+uicVU+tH/co5FSOCKCVGTkQu/tS+VQ1+yWN17hwwbQCtvCHjUK/ 1xGZO7D99eMtKs7Hx2XjCVaroFQD7Po598Kcb1/Av+i+F8J9ehoa/c9SvWaYx5VL AZp0l4S8aKJKPJk8VUAbFWycmJhpy2mzJVYvbfR/R1bdf+YzVT5fRBTuEf3lupgc R2BZwmeWX1cVo/rErQD4OYw8IRdkSOquFflRX95c2+ZiV5h9hqPdWAq3zf8YCnT6 XKyy25f2dmi/mbXmsR7A =CtLx -----END PGP SIGNATURE----- --GyRA7555PLgSTuth-- From owner-svn-src-all@freebsd.org Tue Oct 13 04:19:51 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 17957A12452; Tue, 13 Oct 2015 04:19:51 +0000 (UTC) (envelope-from cy@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D860E156A; Tue, 13 Oct 2015 04:19:50 +0000 (UTC) (envelope-from cy@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t9D4JnMf064527; Tue, 13 Oct 2015 04:19:49 GMT (envelope-from cy@FreeBSD.org) Received: (from cy@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9D4Jnpa064526; Tue, 13 Oct 2015 04:19:49 GMT (envelope-from cy@FreeBSD.org) Message-Id: <201510130419.t9D4Jnpa064526@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cy set sender to cy@FreeBSD.org using -f From: Cy Schubert Date: Tue, 13 Oct 2015 04:19: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: r289210 - stable/10/sys/contrib/ipfilter/netinet X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Oct 2015 04:19:51 -0000 Author: cy Date: Tue Oct 13 04:19:49 2015 New Revision: 289210 URL: https://svnweb.freebsd.org/changeset/base/289210 Log: MFC r288910: On some interfaces, ipfilter drops UDP packets with zero checkum. This commit fixes that. PR: 166372 Submitted by: mk@neon1.net Reviewed by: Darren Reed Modified: stable/10/sys/contrib/ipfilter/netinet/ip_fil_freebsd.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/contrib/ipfilter/netinet/ip_fil_freebsd.c ============================================================================== --- stable/10/sys/contrib/ipfilter/netinet/ip_fil_freebsd.c Tue Oct 13 03:12:55 2015 (r289209) +++ stable/10/sys/contrib/ipfilter/netinet/ip_fil_freebsd.c Tue Oct 13 04:19:49 2015 (r289210) @@ -1134,6 +1134,22 @@ ipf_checkv4sum(fin) return -1; } if (m->m_pkthdr.csum_flags & CSUM_DATA_VALID) { + /* Depending on the driver, UDP may have zero checksum */ + if (fin->fin_p == IPPROTO_UDP && (fin->fin_flx & + (FI_FRAG|FI_SHORT|FI_BAD)) == 0) { + udphdr_t *udp = fin->fin_dp; + if (udp->uh_sum == 0) { + /* + * we're good no matter what the hardware + * checksum flags and csum_data say (handling + * of csum_data for zero UDP checksum is not + * consistent across all drivers) + */ + fin->fin_cksum = 1; + return 0; + } + } + if (m->m_pkthdr.csum_flags & CSUM_PSEUDO_HDR) sum = m->m_pkthdr.csum_data; else From owner-svn-src-all@freebsd.org Tue Oct 13 04:23:23 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3F793A125C0; Tue, 13 Oct 2015 04:23:23 +0000 (UTC) (envelope-from cy@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 086EA1A2F; Tue, 13 Oct 2015 04:23:22 +0000 (UTC) (envelope-from cy@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t9D4NM3P067232; Tue, 13 Oct 2015 04:23:22 GMT (envelope-from cy@FreeBSD.org) Received: (from cy@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9D4NMWx067231; Tue, 13 Oct 2015 04:23:22 GMT (envelope-from cy@FreeBSD.org) Message-Id: <201510130423.t9D4NMWx067231@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cy set sender to cy@FreeBSD.org using -f From: Cy Schubert Date: Tue, 13 Oct 2015 04:23: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: r289211 - stable/9/sys/contrib/ipfilter/netinet 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 " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Oct 2015 04:23:23 -0000 Author: cy Date: Tue Oct 13 04:23:21 2015 New Revision: 289211 URL: https://svnweb.freebsd.org/changeset/base/289211 Log: MFC r288910: On some interfaces, ipfilter drops UDP packets with zero checkum. This commit fixes that. PR: 166372 Submitted by: mk@neon1.net Reviewed by: Darren Reed Modified: stable/9/sys/contrib/ipfilter/netinet/ip_fil_freebsd.c Directory Properties: stable/9/ (props changed) stable/9/sys/ (props changed) Modified: stable/9/sys/contrib/ipfilter/netinet/ip_fil_freebsd.c ============================================================================== --- stable/9/sys/contrib/ipfilter/netinet/ip_fil_freebsd.c Tue Oct 13 04:19:49 2015 (r289210) +++ stable/9/sys/contrib/ipfilter/netinet/ip_fil_freebsd.c Tue Oct 13 04:23:21 2015 (r289211) @@ -1361,6 +1361,22 @@ fr_info_t *fin; ip = fin->fin_ip; if (m->m_pkthdr.csum_flags & CSUM_DATA_VALID) { + /* Depending on the driver, UDP may have zero checksum */ + if (fin->fin_p == IPPROTO_UDP && (fin->fin_flx & + (FI_FRAG|FI_SHORT|FI_BAD)) == 0) { + udphdr_t *udp = fin->fin_dp; + if (udp->uh_sum == 0) { + /* + * we're good no matter what the hardware + * checksum flags and csum_data say (handling + * of csum_data for zero UDP checksum is not + * consistent across all drivers) + */ + fin->fin_cksum = 1; + return; + } + } + if (m->m_pkthdr.csum_flags & CSUM_PSEUDO_HDR) sum = m->m_pkthdr.csum_data; else From owner-svn-src-all@freebsd.org Tue Oct 13 04:47:12 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 53D11A12989; Tue, 13 Oct 2015 04:47:12 +0000 (UTC) (envelope-from cse.cem@gmail.com) Received: from mail-yk0-f175.google.com (mail-yk0-f175.google.com [209.85.160.175]) (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 1A736198; Tue, 13 Oct 2015 04:47:11 +0000 (UTC) (envelope-from cse.cem@gmail.com) Received: by ykey125 with SMTP id y125so6028256yke.3; Mon, 12 Oct 2015 21:47:04 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=mime-version:reply-to:in-reply-to:references:date:message-id :subject:from:to:cc:content-type; bh=vOrZj4TAOSLelshJj7MMsuA+uh7YriCJrZytYS7aJ9E=; b=TE/f+T5e4ERHIBDOmPeOiryRD5OpfFMb2tFpuiieauJkZIdXZHW1m1t8GcuNQU5FJ+ VR9ACivJycJzz8F9/Xi3rdJheL3afUXQoQAGJ911EelI6OnaD6eL2vGCBmiBPq9QDH4n O7LASJT7k3fuqWek1Vc9Y1Dl38sAcFYRMzJdpETpJkjXhmBXhhlG61gq5Kf0i0HLIfCe VrMg0+ifSJicGVDJualR2LPVqG0Z4xoBQEbeIcFSFGhEe3B9nocVPvZznRuLzv+sYJIc 4v4oaoRGH3G1Nhsf+GWiT4gYsn87wJ7Xumh3BgH+/ULHcjYZoDzh3wU4cmYvsV+MuMCP kjPg== X-Received: by 10.13.226.196 with SMTP id l187mr25373770ywe.231.1444711624788; Mon, 12 Oct 2015 21:47:04 -0700 (PDT) Received: from mail-yk0-f172.google.com (mail-yk0-f172.google.com. [209.85.160.172]) by smtp.gmail.com with ESMTPSA id q4sm900104ywf.32.2015.10.12.21.47.04 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 12 Oct 2015 21:47:04 -0700 (PDT) Received: by ykec126 with SMTP id c126so6083020yke.2; Mon, 12 Oct 2015 21:47:04 -0700 (PDT) MIME-Version: 1.0 X-Received: by 10.129.49.70 with SMTP id x67mr24944046ywx.262.1444711624328; Mon, 12 Oct 2015 21:47:04 -0700 (PDT) Reply-To: cem@FreeBSD.org Received: by 10.37.203.75 with HTTP; Mon, 12 Oct 2015 21:47:04 -0700 (PDT) In-Reply-To: <20151013040012.GC99315@FreeBSD.org> References: <201510130312.t9D3CCm2046612@repo.freebsd.org> <20151013040012.GC99315@FreeBSD.org> Date: Mon, 12 Oct 2015 21:47:04 -0700 Message-ID: Subject: Re: svn commit: r289208 - in head/sys/dev/ntb: if_ntb ntb_hw From: Conrad Meyer To: Glen Barber 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 " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Oct 2015 04:47:12 -0000 On Mon, Oct 12, 2015 at 9:00 PM, Glen Barber wrote: > On Mon, Oct 12, 2015 at 08:49:15PM -0700, Garrett Cooper wrote: >> NTB? >> > > The driver name? Yep. From owner-svn-src-all@freebsd.org Tue Oct 13 08:09:18 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1F395A11197; Tue, 13 Oct 2015 08:09:18 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E12EE1E99; Tue, 13 Oct 2015 08:09:17 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t9D89HBt034583; Tue, 13 Oct 2015 08:09:17 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9D89H5Y034582; Tue, 13 Oct 2015 08:09:17 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201510130809.t9D89H5Y034582@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Tue, 13 Oct 2015 08:09:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r289213 - stable/10/share/man/man4 X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Oct 2015 08:09:18 -0000 Author: hselasky Date: Tue Oct 13 08:09:16 2015 New Revision: 289213 URL: https://svnweb.freebsd.org/changeset/base/289213 Log: MFC r288273: Fix spelling. PR: 203249 Modified: stable/10/share/man/man4/usb_quirk.4 Directory Properties: stable/10/ (props changed) Modified: stable/10/share/man/man4/usb_quirk.4 ============================================================================== --- stable/10/share/man/man4/usb_quirk.4 Tue Oct 13 06:14:03 2015 (r289212) +++ stable/10/share/man/man4/usb_quirk.4 Tue Oct 13 08:09:16 2015 (r289213) @@ -16,7 +16,7 @@ .\" .\" $FreeBSD$ .\" -.Dd September 24, 2015 +.Dd September 26, 2015 .Dt USB_QUIRK 4 .Os .Sh NAME @@ -193,9 +193,10 @@ The value is a string whose format is: Installs the quirks .Ic UQ_QUIRK,... for all USB devices matching -.Ic VendorId , +.Ic VendorId +and .Ic ProductId -and has a hardware revision between and including +which have a hardware revision between and including .Ic LowRevision and .Ic HighRevision . From owner-svn-src-all@freebsd.org Tue Oct 13 08:10:22 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id AED91A11228; Tue, 13 Oct 2015 08:10:22 +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 7D22896; Tue, 13 Oct 2015 08:10:22 +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 t9D8ALPo034704; Tue, 13 Oct 2015 08:10:21 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9D8ALqJ034703; Tue, 13 Oct 2015 08:10:21 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201510130810.t9D8ALqJ034703@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Tue, 13 Oct 2015 08:10:21 +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: r289214 - stable/9/share/man/man4 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 " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Oct 2015 08:10:22 -0000 Author: hselasky Date: Tue Oct 13 08:10:21 2015 New Revision: 289214 URL: https://svnweb.freebsd.org/changeset/base/289214 Log: MFC r288273: Fix spelling. PR: 203249 Modified: stable/9/share/man/man4/usb_quirk.4 Directory Properties: stable/9/share/ (props changed) stable/9/share/man/ (props changed) stable/9/share/man/man4/ (props changed) Modified: stable/9/share/man/man4/usb_quirk.4 ============================================================================== --- stable/9/share/man/man4/usb_quirk.4 Tue Oct 13 08:09:16 2015 (r289213) +++ stable/9/share/man/man4/usb_quirk.4 Tue Oct 13 08:10:21 2015 (r289214) @@ -16,7 +16,7 @@ .\" .\" $FreeBSD$ .\" -.Dd September 24, 2015 +.Dd September 26, 2015 .Dt USB_QUIRK 4 .Os .Sh NAME @@ -193,9 +193,10 @@ The value is a string whose format is: Installs the quirks .Ic UQ_QUIRK,... for all USB devices matching -.Ic VendorId , +.Ic VendorId +and .Ic ProductId -and has a hardware revision between and including +which have a hardware revision between and including .Ic LowRevision and .Ic HighRevision . From owner-svn-src-all@freebsd.org Tue Oct 13 08:14:37 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A9A37A1159B; Tue, 13 Oct 2015 08:14:37 +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 6FE607F2; Tue, 13 Oct 2015 08:14:37 +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 t9D8EaYr037436; Tue, 13 Oct 2015 08:14:36 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9D8Easq037434; Tue, 13 Oct 2015 08:14:36 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201510130814.t9D8Easq037434@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Tue, 13 Oct 2015 08:14:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r289215 - in stable/10/sys/dev/usb: . serial 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 " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Oct 2015 08:14:37 -0000 Author: hselasky Date: Tue Oct 13 08:14:36 2015 New Revision: 289215 URL: https://svnweb.freebsd.org/changeset/base/289215 Log: MFC r287592 and r287616: Add new USB ID. PR: 202968 Modified: stable/10/sys/dev/usb/serial/u3g.c stable/10/sys/dev/usb/usbdevs Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/usb/serial/u3g.c ============================================================================== --- stable/10/sys/dev/usb/serial/u3g.c Tue Oct 13 08:10:21 2015 (r289214) +++ stable/10/sys/dev/usb/serial/u3g.c Tue Oct 13 08:14:36 2015 (r289215) @@ -316,6 +316,7 @@ static const STRUCT_USB_HOST_ID u3g_devs U3G_DEV(HUAWEI, E220, U3GINIT_HUAWEI), U3G_DEV(HUAWEI, E220BIS, U3GINIT_HUAWEI), U3G_DEV(HUAWEI, E392, U3GINIT_HUAWEISCSI), + U3G_DEV(HUAWEI, ME909U, U3GINIT_HUAWEISCSI2), U3G_DEV(HUAWEI, MOBILE, U3GINIT_HUAWEI), U3G_DEV(HUAWEI, E1752, U3GINIT_HUAWEISCSI), U3G_DEV(HUAWEI, E1820, U3GINIT_HUAWEISCSI), Modified: stable/10/sys/dev/usb/usbdevs ============================================================================== --- stable/10/sys/dev/usb/usbdevs Tue Oct 13 08:10:21 2015 (r289214) +++ stable/10/sys/dev/usb/usbdevs Tue Oct 13 08:14:36 2015 (r289215) @@ -2365,6 +2365,7 @@ product HUAWEI K3765_INIT 0x1520 K3765 I product HUAWEI K4505_INIT 0x1521 K4505 Initial product HUAWEI K3772_INIT 0x1526 K3772 Initial product HUAWEI E3272_INIT 0x155b LTE modem initial +product HUAWEI ME909U 0x1573 LTE modem product HUAWEI R215_INIT 0x1582 LTE modem initial product HUAWEI R215 0x1588 LTE modem product HUAWEI ETS2055 0x1803 CDMA modem From owner-svn-src-all@freebsd.org Tue Oct 13 08:16:19 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0BF87A11692; Tue, 13 Oct 2015 08:16:19 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C72B495B; Tue, 13 Oct 2015 08:16:18 +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 t9D8GHOd037568; Tue, 13 Oct 2015 08:16:17 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9D8GHnv037566; Tue, 13 Oct 2015 08:16:17 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201510130816.t9D8GHnv037566@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Tue, 13 Oct 2015 08:16:17 +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: r289216 - in stable/9/sys/dev/usb: . serial 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 " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Oct 2015 08:16:19 -0000 Author: hselasky Date: Tue Oct 13 08:16:17 2015 New Revision: 289216 URL: https://svnweb.freebsd.org/changeset/base/289216 Log: MFC r287592 and r287616: Add new USB ID. PR: 202968 Modified: stable/9/sys/dev/usb/serial/u3g.c stable/9/sys/dev/usb/usbdevs Directory Properties: stable/9/sys/ (props changed) stable/9/sys/dev/ (props changed) Modified: stable/9/sys/dev/usb/serial/u3g.c ============================================================================== --- stable/9/sys/dev/usb/serial/u3g.c Tue Oct 13 08:14:36 2015 (r289215) +++ stable/9/sys/dev/usb/serial/u3g.c Tue Oct 13 08:16:17 2015 (r289216) @@ -316,6 +316,7 @@ static const STRUCT_USB_HOST_ID u3g_devs U3G_DEV(HUAWEI, E220, U3GINIT_HUAWEI), U3G_DEV(HUAWEI, E220BIS, U3GINIT_HUAWEI), U3G_DEV(HUAWEI, E392, U3GINIT_HUAWEISCSI), + U3G_DEV(HUAWEI, ME909U, U3GINIT_HUAWEISCSI2), U3G_DEV(HUAWEI, MOBILE, U3GINIT_HUAWEI), U3G_DEV(HUAWEI, E1752, U3GINIT_HUAWEISCSI), U3G_DEV(HUAWEI, E1820, U3GINIT_HUAWEISCSI), Modified: stable/9/sys/dev/usb/usbdevs ============================================================================== --- stable/9/sys/dev/usb/usbdevs Tue Oct 13 08:14:36 2015 (r289215) +++ stable/9/sys/dev/usb/usbdevs Tue Oct 13 08:16:17 2015 (r289216) @@ -2365,6 +2365,7 @@ product HUAWEI K3765_INIT 0x1520 K3765 I product HUAWEI K4505_INIT 0x1521 K4505 Initial product HUAWEI K3772_INIT 0x1526 K3772 Initial product HUAWEI E3272_INIT 0x155b LTE modem initial +product HUAWEI ME909U 0x1573 LTE modem product HUAWEI R215_INIT 0x1582 LTE modem initial product HUAWEI R215 0x1588 LTE modem product HUAWEI ETS2055 0x1803 CDMA modem From owner-svn-src-all@freebsd.org Tue Oct 13 08:19:23 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 479DFA117C1; Tue, 13 Oct 2015 08:19:23 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 13733C40; Tue, 13 Oct 2015 08:19:23 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t9D8JMVM037753; Tue, 13 Oct 2015 08:19:22 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9D8JMTq037752; Tue, 13 Oct 2015 08:19:22 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201510130819.t9D8JMTq037752@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Tue, 13 Oct 2015 08:19: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: r289217 - stable/9/usr.bin/usbhidaction 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 " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Oct 2015 08:19:23 -0000 Author: hselasky Date: Tue Oct 13 08:19:21 2015 New Revision: 289217 URL: https://svnweb.freebsd.org/changeset/base/289217 Log: MFC r288335: Store PID after becoming a daemon() and not before to ensure the correct PID gets written to the PID file. PR: 203252 Modified: stable/9/usr.bin/usbhidaction/usbhidaction.c Directory Properties: stable/9/usr.bin/ (props changed) stable/9/usr.bin/usbhidaction/ (props changed) Modified: stable/9/usr.bin/usbhidaction/usbhidaction.c ============================================================================== --- stable/9/usr.bin/usbhidaction/usbhidaction.c Tue Oct 13 08:16:17 2015 (r289216) +++ stable/9/usr.bin/usbhidaction/usbhidaction.c Tue Oct 13 08:19:21 2015 (r289217) @@ -166,17 +166,15 @@ main(int argc, char **argv) if (demon) { fp = open(pidfile, O_WRONLY|O_CREAT, S_IRUSR|S_IRGRP|S_IROTH); - if (fp >= 0) { - sz1 = snprintf(buf, sizeof buf, "%ld\n", - (long)getpid()); - if (sz1 > sizeof buf) - sz1 = sizeof buf; - write(fp, buf, sz1); - close(fp); - } else + if (fp < 0) err(1, "%s", pidfile); if (daemon(0, 0) < 0) err(1, "daemon()"); + snprintf(buf, sizeof(buf), "%ld\n", (long)getpid()); + sz1 = strlen(buf); + if (write(fp, buf, sz1) < 0) + err(1, "%s", pidfile); + close(fp); isdemon = 1; } From owner-svn-src-all@freebsd.org Tue Oct 13 08:21:16 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id ACCA7A118CC; Tue, 13 Oct 2015 08:21:16 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 73934E6C; Tue, 13 Oct 2015 08:21:16 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t9D8LFaN037922; Tue, 13 Oct 2015 08:21:15 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9D8LFJn037921; Tue, 13 Oct 2015 08:21:15 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201510130821.t9D8LFJn037921@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Tue, 13 Oct 2015 08:21: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: r289218 - stable/10/usr.bin/usbhidaction 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 " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Oct 2015 08:21:16 -0000 Author: hselasky Date: Tue Oct 13 08:21:15 2015 New Revision: 289218 URL: https://svnweb.freebsd.org/changeset/base/289218 Log: MFC r288335: Store PID after becoming a daemon() and not before to ensure the correct PID gets written to the PID file. PR: 203252 Modified: stable/10/usr.bin/usbhidaction/usbhidaction.c Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.bin/usbhidaction/usbhidaction.c ============================================================================== --- stable/10/usr.bin/usbhidaction/usbhidaction.c Tue Oct 13 08:19:21 2015 (r289217) +++ stable/10/usr.bin/usbhidaction/usbhidaction.c Tue Oct 13 08:21:15 2015 (r289218) @@ -166,17 +166,15 @@ main(int argc, char **argv) if (demon) { fp = open(pidfile, O_WRONLY|O_CREAT, S_IRUSR|S_IRGRP|S_IROTH); - if (fp >= 0) { - sz1 = snprintf(buf, sizeof buf, "%ld\n", - (long)getpid()); - if (sz1 > sizeof buf) - sz1 = sizeof buf; - write(fp, buf, sz1); - close(fp); - } else + if (fp < 0) err(1, "%s", pidfile); if (daemon(0, 0) < 0) err(1, "daemon()"); + snprintf(buf, sizeof(buf), "%ld\n", (long)getpid()); + sz1 = strlen(buf); + if (write(fp, buf, sz1) < 0) + err(1, "%s", pidfile); + close(fp); isdemon = 1; } From owner-svn-src-all@freebsd.org Tue Oct 13 11:02:57 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7C1F5A127F1; Tue, 13 Oct 2015 11:02:57 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3AA021491; Tue, 13 Oct 2015 11:02:57 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t9DB2unR086968; Tue, 13 Oct 2015 11:02:56 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9DB2unU086966; Tue, 13 Oct 2015 11:02:56 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201510131102.t9DB2unU086966@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Tue, 13 Oct 2015 11:02:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289219 - head/sys/dev/isp X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Oct 2015 11:02:57 -0000 Author: mav Date: Tue Oct 13 11:02:56 2015 New Revision: 289219 URL: https://svnweb.freebsd.org/changeset/base/289219 Log: Export bunch of state variables as sysctls. Modified: head/sys/dev/isp/isp_freebsd.c head/sys/dev/isp/ispvar.h Modified: head/sys/dev/isp/isp_freebsd.c ============================================================================== --- head/sys/dev/isp/isp_freebsd.c Tue Oct 13 08:21:15 2015 (r289218) +++ head/sys/dev/isp/isp_freebsd.c Tue Oct 13 11:02:56 2015 (r289219) @@ -205,30 +205,55 @@ isp_attach_chan(ispsoftc_t *isp, struct cam_sim_free(fc->sim, FALSE); return (ENOMEM); } - ISP_FC_PC(isp, chan)->num_threads += 1; + fc->num_threads += 1; #ifdef ISP_INTERNAL_TARGET ISP_SET_PC(isp, chan, proc_active, 1); if (THREAD_CREATE(isp_target_thread_fc, fc, &fc->target_proc, 0, 0, "%s: isp_test_tgt%d", device_get_nameunit(isp->isp_osinfo.dev), chan)) { ISP_SET_PC(isp, chan, proc_active, 0); isp_prt(isp, ISP_LOGERR, "cannot create test target thread"); } - ISP_FC_PC(isp, chan)->num_threads += 1; + fc->num_threads += 1; #endif if (chan > 0) { snprintf(name, sizeof(name), "chan%d", chan); tree = SYSCTL_ADD_NODE(ctx, SYSCTL_CHILDREN(tree), OID_AUTO, name, CTLFLAG_RW, 0, "Virtual channel"); } - SYSCTL_ADD_QUAD(ctx, SYSCTL_CHILDREN(tree), OID_AUTO, "wwnn", CTLFLAG_RD, &FCPARAM(isp, chan)->isp_wwnn, "World Wide Node Name"); - SYSCTL_ADD_QUAD(ctx, SYSCTL_CHILDREN(tree), OID_AUTO, "wwpn", CTLFLAG_RD, &FCPARAM(isp, chan)->isp_wwpn, "World Wide Port Name"); - SYSCTL_ADD_UINT(ctx, SYSCTL_CHILDREN(tree), OID_AUTO, "loop_down_limit", CTLFLAG_RW, &ISP_FC_PC(isp, chan)->loop_down_limit, 0, "Loop Down Limit"); - SYSCTL_ADD_UINT(ctx, SYSCTL_CHILDREN(tree), OID_AUTO, "gone_device_time", CTLFLAG_RW, &ISP_FC_PC(isp, chan)->gone_device_time, 0, "Gone Device Time"); + SYSCTL_ADD_QUAD(ctx, SYSCTL_CHILDREN(tree), OID_AUTO, + "wwnn", CTLFLAG_RD, &fcp->isp_wwnn, + "World Wide Node Name"); + SYSCTL_ADD_QUAD(ctx, SYSCTL_CHILDREN(tree), OID_AUTO, + "wwpn", CTLFLAG_RD, &fcp->isp_wwpn, + "World Wide Port Name"); + SYSCTL_ADD_UINT(ctx, SYSCTL_CHILDREN(tree), OID_AUTO, + "loop_down_limit", CTLFLAG_RW, &fc->loop_down_limit, 0, + "Loop Down Limit"); + SYSCTL_ADD_UINT(ctx, SYSCTL_CHILDREN(tree), OID_AUTO, + "gone_device_time", CTLFLAG_RW, &fc->gone_device_time, 0, + "Gone Device Time"); #if defined(ISP_TARGET_MODE) && defined(DEBUG) - SYSCTL_ADD_UINT(ctx, SYSCTL_CHILDREN(tree), OID_AUTO, "inject_lost_data_frame", CTLFLAG_RW, &ISP_FC_PC(isp, chan)->inject_lost_data_frame, 0, "Cause a Lost Frame on a Read"); + SYSCTL_ADD_UINT(ctx, SYSCTL_CHILDREN(tree), OID_AUTO, + "inject_lost_data_frame", CTLFLAG_RW, &fc->inject_lost_data_frame, 0, + "Cause a Lost Frame on a Read"); #endif SYSCTL_ADD_PROC(ctx, SYSCTL_CHILDREN(tree), OID_AUTO, "role", CTLTYPE_INT | CTLFLAG_RW, isp, chan, isp_role_sysctl, "I", "Current role"); + SYSCTL_ADD_UINT(ctx, SYSCTL_CHILDREN(tree), OID_AUTO, + "speed", CTLFLAG_RD, &fcp->isp_gbspeed, 0, + "Connection speed in gigabits"); + SYSCTL_ADD_UINT(ctx, SYSCTL_CHILDREN(tree), OID_AUTO, + "linkstate", CTLFLAG_RD, &fcp->isp_linkstate, 0, + "Link state"); + SYSCTL_ADD_UINT(ctx, SYSCTL_CHILDREN(tree), OID_AUTO, + "fwstate", CTLFLAG_RD, &fcp->isp_fwstate, 0, + "Firmware state"); + SYSCTL_ADD_UINT(ctx, SYSCTL_CHILDREN(tree), OID_AUTO, + "loopstate", CTLFLAG_RD, &fcp->isp_loopstate, 0, + "Loop state"); + SYSCTL_ADD_UINT(ctx, SYSCTL_CHILDREN(tree), OID_AUTO, + "topo", CTLFLAG_RD, &fcp->isp_topo, 0, + "Connection topology"); } return (0); } @@ -5694,7 +5719,7 @@ isp_async(ispsoftc_t *isp, ispasync_t cm bus = va_arg(ap, int); va_end(ap); - FCPARAM(isp, bus)->link_active = 0; + FCPARAM(isp, bus)->isp_linkstate = 0; fc = ISP_FC_PC(isp, bus); if (cmd == ISPASYNC_LOOP_DOWN && fc->ready) { @@ -5727,7 +5752,7 @@ isp_async(ispsoftc_t *isp, ispasync_t cm * Change Notify before activating the FC cleanup * thread to look at the state of the loop again. */ - FCPARAM(isp, bus)->link_active = 1; + FCPARAM(isp, bus)->isp_linkstate = 1; fc->loop_dead = 0; fc->loop_down_time = 0; isp_prt(isp, ISP_LOGINFO, "Chan %d Loop UP", bus); Modified: head/sys/dev/isp/ispvar.h ============================================================================== --- head/sys/dev/isp/ispvar.h Tue Oct 13 08:21:15 2015 (r289218) +++ head/sys/dev/isp/ispvar.h Tue Oct 13 11:02:56 2015 (r289219) @@ -436,21 +436,19 @@ typedef struct { */ typedef struct { - uint32_t + int isp_gbspeed; /* Connection speed */ + int isp_linkstate; /* Link state */ + int isp_fwstate; /* ISP F/W state */ + int isp_loopstate; /* Loop State */ + int isp_topo; /* Connection Type */ + + uint32_t : 3, fctape_enabled : 1, - link_active : 1, sendmarker : 1, + loop_seen_once : 1, role : 2, - isp_gbspeed : 4, - isp_loopstate : 4, /* Current Loop State */ - isp_fwstate : 4, /* ISP F/W state */ - isp_topo : 3, /* Connection Type */ - loop_seen_once : 1; - - uint32_t : 8, isp_portid : 24; /* S_ID */ - uint16_t isp_fwoptions; uint16_t isp_xfwoptions; uint16_t isp_zfwoptions; From owner-svn-src-all@freebsd.org Tue Oct 13 12:51:45 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 800F8A12F49; Tue, 13 Oct 2015 12:51: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 4E0D810C2; Tue, 13 Oct 2015 12:51:45 +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 t9DCpiMp017213; Tue, 13 Oct 2015 12:51:44 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9DCpinA017212; Tue, 13 Oct 2015 12:51:44 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201510131251.t9DCpinA017212@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Tue, 13 Oct 2015 12:51:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289220 - 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 " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Oct 2015 12:51:45 -0000 Author: emaste Date: Tue Oct 13 12:51:44 2015 New Revision: 289220 URL: https://svnweb.freebsd.org/changeset/base/289220 Log: Rewrap UPDATING entry from r265422 to 80 columns Modified: head/UPDATING Modified: head/UPDATING ============================================================================== --- head/UPDATING Tue Oct 13 11:02:56 2015 (r289219) +++ head/UPDATING Tue Oct 13 12:51:44 2015 (r289220) @@ -13,8 +13,8 @@ Items affecting the ports and packages s NOTE: FreeBSD has switched from gcc to clang. If you have trouble bootstrapping from older versions of FreeBSD, try WITHOUT_CLANG and WITH_GCC to bootstrap to -the tip of head, and then rebuild without this option. The bootstrap process from -older version of current across the gcc/clang cutover is a bit fragile. +the tip of head, and then rebuild without this option. The bootstrap process +from older version of current across the gcc/clang cutover is a bit fragile. NOTE TO PEOPLE WHO THINK THAT FreeBSD 11.x IS SLOW: FreeBSD 11.x has many debugging features turned on, in both the kernel From owner-svn-src-all@freebsd.org Tue Oct 13 16:24:24 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 183C5A12B8F; Tue, 13 Oct 2015 16:24: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 C772C15B6; Tue, 13 Oct 2015 16:24: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 t9DGOM7n082159; Tue, 13 Oct 2015 16:24:22 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9DGOMw5082157; Tue, 13 Oct 2015 16:24:22 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201510131624.t9DGOMw5082157@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Tue, 13 Oct 2015 16:24:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289221 - head/contrib/llvm/lib/Target/X86 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Oct 2015 16:24:24 -0000 Author: dim Date: Tue Oct 13 16:24:22 2015 New Revision: 289221 URL: https://svnweb.freebsd.org/changeset/base/289221 Log: Pull in r250085 from upstream llvm trunk (by Andrea Di Biagio): [x86] Fix wrong lowering of vsetcc nodes (PR25080). Function LowerVSETCC (in X86ISelLowering.cpp) worked under the wrong assumption that for non-AVX512 targets, the source type and destination type of a type-legalized setcc node were always the same type. This assumption was unfortunately incorrect; the type legalizer is not always able to promote the return type of a setcc to the same type as the first operand of a setcc. In the case of a vsetcc node, the legalizer firstly checks if the first input operand has a legal type. If so, then it promotes the return type of the vsetcc to that same type. Otherwise, the return type is promoted to the 'next legal type', which, for vectors of MVT::i1 is always a 128-bit integer vector type. Example (-mattr=+avx): %0 = trunc <8 x i32> %a to <8 x i23> %1 = icmp eq <8 x i23> %0, zeroinitializer The initial selection dag for the code above is: v8i1 = setcc t5, t7, seteq:ch t5: v8i23 = truncate t2 t2: v8i32,ch = CopyFromReg t0, Register:v8i32 %vreg1 t7: v8i32 = build_vector of all zeroes. The type legalizer would firstly check if 't5' has a legal type. If so, then it would reuse that same type to promote the return type of the setcc node. Unfortunately 't5' is of illegal type v8i23, and therefore it cannot be used to promote the return type of the setcc node. Consequently, the setcc return type is promoted to v8i16. Later on, 't5' is promoted to v8i32 thus leading to the following dag node: v8i16 = setcc t32, t25, seteq:ch where t32 and t25 are now values of type v8i32. Before this patch, function LowerVSETCC would have wrongly expanded the setcc to a single X86ISD::PCMPEQ. Surprisingly, ISel was still able to match an instruction. In our case, ISel would have matched a VPCMPEQWrr: t37: v8i16 = X86ISD::VPCMPEQWrr t36, t25 However, t36 and t25 are both VR256, while the result type is instead of class VR128. This inconsistency ended up causing the insertion of COPY instructions like this: %vreg7 = COPY %vreg3; VR128:%vreg7 VR256:%vreg3 Which is an invalid full copy (not a sub register copy). Eventually, the backend would have hit an UNREACHABLE "Cannot emit physreg copy instruction" in the attempt to expand the malformed pseudo COPY instructions. This patch fixes the problem adding the missing logic in LowerVSETCC to handle the corner case of a setcc with 128-bit return type and 256-bit operand type. This problem was originally reported by Dimitry as PR25080. It has been latent for a very long time. I have added the minimal reproducible from that bugzilla as test setcc-lowering.ll. Differential Revision: http://reviews.llvm.org/D13660 This should fix the "Cannot emit physreg copy instruction" errors when compiling contrib/wpa/src/common/ieee802_11_common.c, and CPUTYPE is set to a CPU supporting AVX (e.g. sandybridge, ivybridge). Modified: head/contrib/llvm/lib/Target/X86/X86ISelLowering.cpp Modified: head/contrib/llvm/lib/Target/X86/X86ISelLowering.cpp ============================================================================== --- head/contrib/llvm/lib/Target/X86/X86ISelLowering.cpp Tue Oct 13 12:51:44 2015 (r289220) +++ head/contrib/llvm/lib/Target/X86/X86ISelLowering.cpp Tue Oct 13 16:24:22 2015 (r289221) @@ -13573,6 +13573,35 @@ static SDValue LowerVSETCC(SDValue Op, c DAG.getConstant(SSECC, dl, MVT::i8)); } + MVT VTOp0 = Op0.getSimpleValueType(); + assert(VTOp0 == Op1.getSimpleValueType() && + "Expected operands with same type!"); + assert(VT.getVectorNumElements() == VTOp0.getVectorNumElements() && + "Invalid number of packed elements for source and destination!"); + + if (VT.is128BitVector() && VTOp0.is256BitVector()) { + // On non-AVX512 targets, a vector of MVT::i1 is promoted by the type + // legalizer to a wider vector type. In the case of 'vsetcc' nodes, the + // legalizer firstly checks if the first operand in input to the setcc has + // a legal type. If so, then it promotes the return type to that same type. + // Otherwise, the return type is promoted to the 'next legal type' which, + // for a vector of MVT::i1 is always a 128-bit integer vector type. + // + // We reach this code only if the following two conditions are met: + // 1. Both return type and operand type have been promoted to wider types + // by the type legalizer. + // 2. The original operand type has been promoted to a 256-bit vector. + // + // Note that condition 2. only applies for AVX targets. + SDValue NewOp = DAG.getSetCC(dl, VTOp0, Op0, Op1, SetCCOpcode); + return DAG.getZExtOrTrunc(NewOp, dl, VT); + } + + // The non-AVX512 code below works under the assumption that source and + // destination types are the same. + assert((Subtarget->hasAVX512() || (VT == VTOp0)) && + "Value types for source and destination must be the same!"); + // Break 256-bit integer vector compare into smaller ones. if (VT.is256BitVector() && !Subtarget->hasInt256()) return Lower256IntVSETCC(Op, DAG); From owner-svn-src-all@freebsd.org Tue Oct 13 16:25:03 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C9B3BA12BE0; Tue, 13 Oct 2015 16:25:03 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A4320182E; Tue, 13 Oct 2015 16:25:03 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t9DGP28M082235; Tue, 13 Oct 2015 16:25:02 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9DGP23u082234; Tue, 13 Oct 2015 16:25:02 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201510131625.t9DGP23u082234@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Tue, 13 Oct 2015 16:25:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289222 - head/contrib/llvm/patches X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Oct 2015 16:25:03 -0000 Author: dim Date: Tue Oct 13 16:25:02 2015 New Revision: 289222 URL: https://svnweb.freebsd.org/changeset/base/289222 Log: Add llvm patch corresponding to r289221. Added: head/contrib/llvm/patches/patch-08-llvm-r250085-fix-avx-crash.diff Added: head/contrib/llvm/patches/patch-08-llvm-r250085-fix-avx-crash.diff ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/contrib/llvm/patches/patch-08-llvm-r250085-fix-avx-crash.diff Tue Oct 13 16:25:02 2015 (r289222) @@ -0,0 +1,142 @@ +Pull in r250085 from upstream llvm trunk (by Andrea Di Biagio): + + [x86] Fix wrong lowering of vsetcc nodes (PR25080). + + Function LowerVSETCC (in X86ISelLowering.cpp) worked under the wrong + assumption that for non-AVX512 targets, the source type and destination type + of a type-legalized setcc node were always the same type. + + This assumption was unfortunately incorrect; the type legalizer is not always + able to promote the return type of a setcc to the same type as the first + operand of a setcc. + + In the case of a vsetcc node, the legalizer firstly checks if the first input + operand has a legal type. If so, then it promotes the return type of the vsetcc + to that same type. Otherwise, the return type is promoted to the 'next legal + type', which, for vectors of MVT::i1 is always a 128-bit integer vector type. + + Example (-mattr=+avx): + + %0 = trunc <8 x i32> %a to <8 x i23> + %1 = icmp eq <8 x i23> %0, zeroinitializer + + The initial selection dag for the code above is: + + v8i1 = setcc t5, t7, seteq:ch + t5: v8i23 = truncate t2 + t2: v8i32,ch = CopyFromReg t0, Register:v8i32 %vreg1 + t7: v8i32 = build_vector of all zeroes. + + The type legalizer would firstly check if 't5' has a legal type. If so, then it + would reuse that same type to promote the return type of the setcc node. + Unfortunately 't5' is of illegal type v8i23, and therefore it cannot be used to + promote the return type of the setcc node. Consequently, the setcc return type + is promoted to v8i16. Later on, 't5' is promoted to v8i32 thus leading to the + following dag node: + v8i16 = setcc t32, t25, seteq:ch + + where t32 and t25 are now values of type v8i32. + + Before this patch, function LowerVSETCC would have wrongly expanded the setcc + to a single X86ISD::PCMPEQ. Surprisingly, ISel was still able to match an + instruction. In our case, ISel would have matched a VPCMPEQWrr: + t37: v8i16 = X86ISD::VPCMPEQWrr t36, t25 + + However, t36 and t25 are both VR256, while the result type is instead of class + VR128. This inconsistency ended up causing the insertion of COPY instructions + like this: + %vreg7 = COPY %vreg3; VR128:%vreg7 VR256:%vreg3 + + Which is an invalid full copy (not a sub register copy). + Eventually, the backend would have hit an UNREACHABLE "Cannot emit physreg copy + instruction" in the attempt to expand the malformed pseudo COPY instructions. + + This patch fixes the problem adding the missing logic in LowerVSETCC to handle + the corner case of a setcc with 128-bit return type and 256-bit operand type. + + This problem was originally reported by Dimitry as PR25080. It has been latent + for a very long time. I have added the minimal reproducible from that bugzilla + as test setcc-lowering.ll. + + Differential Revision: http://reviews.llvm.org/D13660 + +This should fix the "Cannot emit physreg copy instruction" errors when +compiling contrib/wpa/src/common/ieee802_11_common.c, and CPUTYPE is set +to a CPU supporting AVX (e.g. sandybridge, ivybridge). + +Introduced here: http://svnweb.freebsd.org/changeset/base/289221 + +Index: lib/Target/X86/X86ISelLowering.cpp +=================================================================== +--- lib/Target/X86/X86ISelLowering.cpp ++++ lib/Target/X86/X86ISelLowering.cpp +@@ -13573,6 +13573,35 @@ static SDValue LowerVSETCC(SDValue Op, const X86Su + DAG.getConstant(SSECC, dl, MVT::i8)); + } + ++ MVT VTOp0 = Op0.getSimpleValueType(); ++ assert(VTOp0 == Op1.getSimpleValueType() && ++ "Expected operands with same type!"); ++ assert(VT.getVectorNumElements() == VTOp0.getVectorNumElements() && ++ "Invalid number of packed elements for source and destination!"); ++ ++ if (VT.is128BitVector() && VTOp0.is256BitVector()) { ++ // On non-AVX512 targets, a vector of MVT::i1 is promoted by the type ++ // legalizer to a wider vector type. In the case of 'vsetcc' nodes, the ++ // legalizer firstly checks if the first operand in input to the setcc has ++ // a legal type. If so, then it promotes the return type to that same type. ++ // Otherwise, the return type is promoted to the 'next legal type' which, ++ // for a vector of MVT::i1 is always a 128-bit integer vector type. ++ // ++ // We reach this code only if the following two conditions are met: ++ // 1. Both return type and operand type have been promoted to wider types ++ // by the type legalizer. ++ // 2. The original operand type has been promoted to a 256-bit vector. ++ // ++ // Note that condition 2. only applies for AVX targets. ++ SDValue NewOp = DAG.getSetCC(dl, VTOp0, Op0, Op1, SetCCOpcode); ++ return DAG.getZExtOrTrunc(NewOp, dl, VT); ++ } ++ ++ // The non-AVX512 code below works under the assumption that source and ++ // destination types are the same. ++ assert((Subtarget->hasAVX512() || (VT == VTOp0)) && ++ "Value types for source and destination must be the same!"); ++ + // Break 256-bit integer vector compare into smaller ones. + if (VT.is256BitVector() && !Subtarget->hasInt256()) + return Lower256IntVSETCC(Op, DAG); +Index: test/CodeGen/X86/setcc-lowering.ll +=================================================================== +--- test/CodeGen/X86/setcc-lowering.ll ++++ test/CodeGen/X86/setcc-lowering.ll +@@ -0,0 +1,29 @@ ++; RUN: llc -mtriple=x86_64-unknown-unknown -mattr=+avx < %s | FileCheck %s ++ ++; Verify that we don't crash during codegen due to a wrong lowering ++; of a setcc node with illegal operand types and return type. ++ ++define <8 x i16> @pr25080(<8 x i32> %a) { ++; CHECK-LABEL: pr25080: ++; CHECK: # BB#0: # %entry ++; CHECK-NEXT: vandps {{.*}}(%rip), %ymm0, %ymm0 ++; CHECK-NEXT: vextractf128 $1, %ymm0, %xmm1 ++; CHECK-NEXT: vpxor %xmm2, %xmm2, %xmm2 ++; CHECK-NEXT: vpcmpeqd %xmm2, %xmm1, %xmm1 ++; CHECK-NEXT: vmovdqa {{.*#+}} xmm3 = [0,1,4,5,8,9,12,13,8,9,12,13,12,13,14,15] ++; CHECK-NEXT: vpshufb %xmm3, %xmm1, %xmm1 ++; CHECK-NEXT: vpcmpeqd %xmm2, %xmm0, %xmm0 ++; CHECK-NEXT: vpshufb %xmm3, %xmm0, %xmm0 ++; CHECK-NEXT: vpunpcklqdq {{.*#+}} xmm0 = xmm0[0],xmm1[0] ++; CHECK-NEXT: vpor {{.*}}(%rip), %xmm0, %xmm0 ++; CHECK-NEXT: vpsllw $15, %xmm0, %xmm0 ++; CHECK-NEXT: vpsraw $15, %xmm0, %xmm0 ++; CHECK-NEXT: vzeroupper ++; CHECK-NEXT: retq ++entry: ++ %0 = trunc <8 x i32> %a to <8 x i23> ++ %1 = icmp eq <8 x i23> %0, zeroinitializer ++ %2 = or <8 x i1> %1, ++ %3 = sext <8 x i1> %2 to <8 x i16> ++ ret <8 x i16> %3 ++} From owner-svn-src-all@freebsd.org Tue Oct 13 17:00:16 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9E97AA12C56; Tue, 13 Oct 2015 17:00:16 +0000 (UTC) (envelope-from sbruno@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 65F98F37; Tue, 13 Oct 2015 17:00:16 +0000 (UTC) (envelope-from sbruno@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t9DH0E5I091746; Tue, 13 Oct 2015 17:00:14 GMT (envelope-from sbruno@FreeBSD.org) Received: (from sbruno@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9DH0ENf091745; Tue, 13 Oct 2015 17:00:14 GMT (envelope-from sbruno@FreeBSD.org) Message-Id: <201510131700.t9DH0ENf091745@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: sbruno set sender to sbruno@FreeBSD.org using -f From: Sean Bruno Date: Tue, 13 Oct 2015 17:00:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289225 - head/usr.sbin/makefs/ffs X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Oct 2015 17:00:16 -0000 Author: sbruno Date: Tue Oct 13 17:00:14 2015 New Revision: 289225 URL: https://svnweb.freebsd.org/changeset/base/289225 Log: makefs(8) leaves sblock.fs_providersize uninitialized (zero) that can be easily checked with dumpfs(8). This may lead to other problems, f.e. geom_label kernel module sanity checks do not like zero fs_old_size value and skips such UFS1 file system while tasting (fs_old_size derives from sblock.fs_providersize). PR: 203704 Submitted by: eugen@grosbein.net Reviewed by: marcel Modified: head/usr.sbin/makefs/ffs/mkfs.c Modified: head/usr.sbin/makefs/ffs/mkfs.c ============================================================================== --- head/usr.sbin/makefs/ffs/mkfs.c Tue Oct 13 16:51:12 2015 (r289224) +++ head/usr.sbin/makefs/ffs/mkfs.c Tue Oct 13 17:00:14 2015 (r289225) @@ -248,7 +248,8 @@ ffs_mkfs(const char *fsys, const fsinfo_ exit(21); } sblock.fs_fsbtodb = ilog2(sblock.fs_fsize / sectorsize); - sblock.fs_size = fssize = dbtofsb(&sblock, fssize); + sblock.fs_size = sblock.fs_providersize = fssize = + dbtofsb(&sblock, fssize); if (Oflag <= 1) { sblock.fs_magic = FS_UFS1_MAGIC; From owner-svn-src-all@freebsd.org Tue Oct 13 17:14:29 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 38FF0A12077; Tue, 13 Oct 2015 17:14: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 015601AEE; Tue, 13 Oct 2015 17:14:28 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t9DHERh4096899; Tue, 13 Oct 2015 17:14:27 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9DHERms096897; Tue, 13 Oct 2015 17:14:27 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201510131714.t9DHERms096897@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Tue, 13 Oct 2015 17:14:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289229 - in head: sbin/mount share/man/man5 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Oct 2015 17:14:29 -0000 Author: ngie Date: Tue Oct 13 17:14:27 2015 New Revision: 289229 URL: https://svnweb.freebsd.org/changeset/base/289229 Log: Replace references to /dev/acd0 with /dev/cd0 atapicd(4) was replaced by cd(4) with the atacam work done by mav@ and then removed in r249083 X-MFC to: stable/10 MFC after: 2 weeks Modified: head/sbin/mount/mount.8 head/share/man/man5/devfs.conf.5 Directory Properties: head/ (props changed) Modified: head/sbin/mount/mount.8 ============================================================================== --- head/sbin/mount/mount.8 Tue Oct 13 17:09:07 2015 (r289228) +++ head/sbin/mount/mount.8 Tue Oct 13 17:14:27 2015 (r289229) @@ -28,7 +28,7 @@ .\" @(#)mount.8 8.8 (Berkeley) 6/16/94 .\" $FreeBSD$ .\" -.Dd December 3, 2014 +.Dd October 13, 2015 .Dt MOUNT 8 .Os .Sh NAME @@ -189,7 +189,7 @@ to use the specified program to mount th directly. For example: .Bd -literal -mount -t foofs -o mountprog=/mydir/fooprog /dev/acd0 /mnt +mount -t foofs -o mountprog=/mydir/fooprog /dev/cd0 /mnt .Ed .It Cm multilabel Enable multi-label Mandatory Access Control, or MAC, on the specified file Modified: head/share/man/man5/devfs.conf.5 ============================================================================== --- head/share/man/man5/devfs.conf.5 Tue Oct 13 17:09:07 2015 (r289228) +++ head/share/man/man5/devfs.conf.5 Tue Oct 13 17:14:27 2015 (r289229) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd May 17, 2005 +.Dd October 13, 2015 .Dt DEVFS.CONF 5 .Os .Sh NAME @@ -109,9 +109,9 @@ link cd0 cdrom .Pp Similarly, to link .Pa /dev/cdrom -to the first ATAPI CD-ROM device, the following action may be used: +to the first SCSI CD-ROM device, the following action may be used: .Bd -literal -offset indent -link acd0 cdrom +link cd0 cdrom .Ed .Pp To set the owner of a device, the From owner-svn-src-all@freebsd.org Tue Oct 13 17:20:07 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2240EA12171; Tue, 13 Oct 2015 17:20:07 +0000 (UTC) (envelope-from sbruno@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E11931FA3; Tue, 13 Oct 2015 17:20:06 +0000 (UTC) (envelope-from sbruno@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t9DHK5Wg097217; Tue, 13 Oct 2015 17:20:05 GMT (envelope-from sbruno@FreeBSD.org) Received: (from sbruno@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9DHK5XJ097216; Tue, 13 Oct 2015 17:20:05 GMT (envelope-from sbruno@FreeBSD.org) Message-Id: <201510131720.t9DHK5XJ097216@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: sbruno set sender to sbruno@FreeBSD.org using -f From: Sean Bruno Date: Tue, 13 Oct 2015 17:20:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289231 - head/sys/dev/ixl X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Oct 2015 17:20:07 -0000 Author: sbruno Date: Tue Oct 13 17:20:05 2015 New Revision: 289231 URL: https://svnweb.freebsd.org/changeset/base/289231 Log: ixl(4): Remove compile warning for unused function. sys/dev/ixl/if_ixl.c:4377:1: warning: unused function 'ixl_debug_info' [-Wunused-function] ixl_debug_info(SYSCTL_HANDLER_ARGS) Differential Revision: https://reviews.freebsd.org/D3718 Submitted by: bz Modified: head/sys/dev/ixl/if_ixl.c Modified: head/sys/dev/ixl/if_ixl.c ============================================================================== --- head/sys/dev/ixl/if_ixl.c Tue Oct 13 17:18:26 2015 (r289230) +++ head/sys/dev/ixl/if_ixl.c Tue Oct 13 17:20:05 2015 (r289231) @@ -160,8 +160,10 @@ static void ixl_free_mac_filters(struct /* Sysctl debug interface */ +#ifdef IXL_DEBUG_SYSCTL static int ixl_debug_info(SYSCTL_HANDLER_ARGS); static void ixl_print_debug_info(struct ixl_pf *); +#endif /* The MSI/X Interrupt handlers */ static void ixl_intr(void *); @@ -4373,6 +4375,7 @@ ixl_do_adminq(void *context, int pending IXL_PF_UNLOCK(pf); } +#ifdef IXL_DEBUG_SYSCTL static int ixl_debug_info(SYSCTL_HANDLER_ARGS) { @@ -4437,6 +4440,7 @@ ixl_print_debug_info(struct ixl_pf *pf) reg = rd32(hw, I40E_GLPRT_MLFC(hw->port)); printf("mac local fault = %x\n", reg); } +#endif /** * Update VSI-specific ethernet statistics counters. From owner-svn-src-all@freebsd.org Tue Oct 13 17:20:49 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 02D35A121ED; Tue, 13 Oct 2015 17:20:49 +0000 (UTC) (envelope-from cem@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A22451D8; Tue, 13 Oct 2015 17:20:48 +0000 (UTC) (envelope-from cem@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t9DHKlPe099190; Tue, 13 Oct 2015 17:20:47 GMT (envelope-from cem@FreeBSD.org) Received: (from cem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9DHKlP3099189; Tue, 13 Oct 2015 17:20:47 GMT (envelope-from cem@FreeBSD.org) Message-Id: <201510131720.t9DHKlP3099189@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cem set sender to cem@FreeBSD.org using -f From: "Conrad E. Meyer" Date: Tue, 13 Oct 2015 17:20:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289232 - head/sys/dev/ntb/ntb_hw X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Oct 2015 17:20:49 -0000 Author: cem Date: Tue Oct 13 17:20:47 2015 New Revision: 289232 URL: https://svnweb.freebsd.org/changeset/base/289232 Log: NTB: MFV 113bf1c9: BWD Link Recovery The BWD NTB device will drop the link if an error is encountered on the point-to-point PCI bridge. The link will stay down until all errors are cleared and the link is re-established. On link down, check to see if the error is detected, if so do the necessary housekeeping to try and recover from the error and reestablish the link. There is a potential race between the 2 NTB devices recovering at the same time. If the times are synchronized, the link will not recover and the driver will be stuck in this loop forever. Add a random interval to the recovery time to prevent this race. Authored by: Jon Mason Obtained from: Linux Sponsored by: EMC / Isilon Storage Division Modified: head/sys/dev/ntb/ntb_hw/ntb_hw.c Modified: head/sys/dev/ntb/ntb_hw/ntb_hw.c ============================================================================== --- head/sys/dev/ntb/ntb_hw/ntb_hw.c Tue Oct 13 17:20:05 2015 (r289231) +++ head/sys/dev/ntb/ntb_hw/ntb_hw.c Tue Oct 13 17:20:47 2015 (r289232) @@ -896,6 +896,7 @@ ntb_handle_heartbeat(void *arg) if (rc != 0) device_printf(ntb->device, "Error determining link status\n"); + /* Check to see if a link error is the cause of the link down */ if (ntb->link_status == NTB_LINK_DOWN) { status32 = ntb_reg_read(4, SOC_LTSSMSTATEJMP_OFFSET); @@ -995,7 +996,15 @@ recover_soc_link(void *arg) uint16_t status16; soc_perform_link_restart(ntb); - pause("Link", SOC_LINK_RECOVERY_TIME * hz / 1000); + + /* + * There is a potential race between the 2 NTB devices recovering at + * the same time. If the times are the same, the link will not recover + * and the driver will be stuck in this loop forever. Add a random + * interval to the recovery time to prevent this race. + */ + status32 = arc4random() % SOC_LINK_RECOVERY_TIME; + pause("Link", (SOC_LINK_RECOVERY_TIME + status32) * hz / 1000); status32 = ntb_reg_read(4, SOC_LTSSMSTATEJMP_OFFSET); if ((status32 & SOC_LTSSMSTATEJMP_FORCEDETECT) != 0) @@ -1005,12 +1014,17 @@ recover_soc_link(void *arg) if ((status32 & SOC_IBIST_ERR_OFLOW) != 0) goto retry; + status32 = ntb_reg_read(4, ntb->reg_ofs.lnk_cntl); + if ((status32 & SOC_CNTL_LINK_DOWN) != 0) + goto out; + status16 = ntb_reg_read(2, ntb->reg_ofs.lnk_stat); width = (status16 & NTB_LINK_WIDTH_MASK) >> 4; speed = (status16 & NTB_LINK_SPEED_MASK); if (ntb->link_width != width || ntb->link_speed != speed) goto retry; +out: callout_reset(&ntb->heartbeat_timer, NTB_HB_TIMEOUT * hz, ntb_handle_heartbeat, ntb); return; From owner-svn-src-all@freebsd.org Tue Oct 13 17:21:40 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 62D50A12338; Tue, 13 Oct 2015 17:21:40 +0000 (UTC) (envelope-from cem@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1283562A; Tue, 13 Oct 2015 17:21:39 +0000 (UTC) (envelope-from cem@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t9DHLd9q099867; Tue, 13 Oct 2015 17:21:39 GMT (envelope-from cem@FreeBSD.org) Received: (from cem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9DHLdF4099865; Tue, 13 Oct 2015 17:21:39 GMT (envelope-from cem@FreeBSD.org) Message-Id: <201510131721.t9DHLdF4099865@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cem set sender to cem@FreeBSD.org using -f From: "Conrad E. Meyer" Date: Tue, 13 Oct 2015 17:21:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289233 - head/sys/dev/ntb/ntb_hw X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Oct 2015 17:21:40 -0000 Author: cem Date: Tue Oct 13 17:21:38 2015 New Revision: 289233 URL: https://svnweb.freebsd.org/changeset/base/289233 Log: NTB: Update pci ids Add JSF, HSX, BDX ids; add two additional Xeon errata flags while we're here. Obtained from: Linux Sponsored by: EMC / Isilon Storage Division Modified: head/sys/dev/ntb/ntb_hw/ntb_hw.c head/sys/dev/ntb/ntb_hw/ntb_hw.h Modified: head/sys/dev/ntb/ntb_hw/ntb_hw.c ============================================================================== --- head/sys/dev/ntb/ntb_hw/ntb_hw.c Tue Oct 13 17:20:47 2015 (r289232) +++ head/sys/dev/ntb/ntb_hw/ntb_hw.c Tue Oct 13 17:21:38 2015 (r289233) @@ -199,11 +199,23 @@ static int ntb_check_link_status(struct static void save_bar_parameters(struct ntb_pci_bar_info *bar); static struct ntb_hw_info pci_ids[] = { - { 0x3C0D8086, "Xeon E5/Core i7 Non-Transparent Bridge B2B", NTB_XEON, - NTB_REGS_THRU_MW }, { 0x0C4E8086, "Atom Processor S1200 NTB Primary B2B", NTB_SOC, 0 }, - { 0x0E0D8086, "Xeon E5 V2 Non-Transparent Bridge B2B", NTB_XEON, - NTB_REGS_THRU_MW | NTB_BAR_SIZE_4K }, + + /* XXX: PS/SS IDs left out until they are supported. */ + { 0x37258086, "JSF Xeon C35xx/C55xx Non-Transparent Bridge B2B", + NTB_XEON, NTB_REGS_THRU_MW | NTB_B2BDOORBELL_BIT14 }, + { 0x3C0D8086, "SNB Xeon E5/Core i7 Non-Transparent Bridge B2B", + NTB_XEON, NTB_REGS_THRU_MW | NTB_B2BDOORBELL_BIT14 }, + { 0x0E0D8086, "IVT Xeon E5 V2 Non-Transparent Bridge B2B", NTB_XEON, + NTB_REGS_THRU_MW | NTB_B2BDOORBELL_BIT14 | NTB_SB01BASE_LOCKUP + | NTB_BAR_SIZE_4K }, + { 0x2F0D8086, "HSX Xeon E5 V3 Non-Transparent Bridge B2B", NTB_XEON, + NTB_REGS_THRU_MW | NTB_B2BDOORBELL_BIT14 | NTB_SB01BASE_LOCKUP + }, + { 0x6F0D8086, "BDX Xeon E5 V4 Non-Transparent Bridge B2B", NTB_XEON, + NTB_REGS_THRU_MW | NTB_B2BDOORBELL_BIT14 | NTB_SB01BASE_LOCKUP + }, + { 0x00000000, NULL, NTB_SOC, 0 } }; Modified: head/sys/dev/ntb/ntb_hw/ntb_hw.h ============================================================================== --- head/sys/dev/ntb/ntb_hw/ntb_hw.h Tue Oct 13 17:20:47 2015 (r289232) +++ head/sys/dev/ntb/ntb_hw/ntb_hw.h Tue Oct 13 17:21:38 2015 (r289233) @@ -74,7 +74,10 @@ bool ntb_query_link_status(struct ntb_so device_t ntb_get_device(struct ntb_softc *ntb); #define NTB_BAR_SIZE_4K (1 << 0) +/* REGS_THRU_MW is the equivalent of Linux's NTB_HWERR_SDOORBELL_LOCKUP */ #define NTB_REGS_THRU_MW (1 << 1) +#define NTB_SB01BASE_LOCKUP (1 << 2) +#define NTB_B2BDOORBELL_BIT14 (1 << 3) bool ntb_has_feature(struct ntb_softc *, uint64_t); #endif /* _NTB_HW_H_ */ From owner-svn-src-all@freebsd.org Tue Oct 13 17:22:25 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 58E6BA1238A; Tue, 13 Oct 2015 17:22:25 +0000 (UTC) (envelope-from cem@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2722B91E; Tue, 13 Oct 2015 17:22:25 +0000 (UTC) (envelope-from cem@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t9DHMOT9099954; Tue, 13 Oct 2015 17:22:24 GMT (envelope-from cem@FreeBSD.org) Received: (from cem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9DHMOWa099952; Tue, 13 Oct 2015 17:22:24 GMT (envelope-from cem@FreeBSD.org) Message-Id: <201510131722.t9DHMOWa099952@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cem set sender to cem@FreeBSD.org using -f From: "Conrad E. Meyer" Date: Tue, 13 Oct 2015 17:22:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289234 - in head/sys: conf dev/ntb/ntb_hw X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Oct 2015 17:22:25 -0000 Author: cem Date: Tue Oct 13 17:22:23 2015 New Revision: 289234 URL: https://svnweb.freebsd.org/changeset/base/289234 Log: NTB: Enable 32-bit support Sponsored by: EMC / Isilon Storage Division Modified: head/sys/conf/files.i386 head/sys/dev/ntb/ntb_hw/ntb_hw.c Modified: head/sys/conf/files.i386 ============================================================================== --- head/sys/conf/files.i386 Tue Oct 13 17:21:38 2015 (r289233) +++ head/sys/conf/files.i386 Tue Oct 13 17:22:23 2015 (r289234) @@ -269,6 +269,8 @@ dev/le/if_le_isa.c optional le isa dev/mse/mse.c optional mse dev/mse/mse_isa.c optional mse isa dev/nfe/if_nfe.c optional nfe pci +dev/ntb/if_ntb/if_ntb.c optional if_ntb +dev/ntb/ntb_hw/ntb_hw.c optional if_ntb | ntb_hw dev/nvd/nvd.c optional nvd nvme dev/nvme/nvme.c optional nvme dev/nvme/nvme_ctrlr.c optional nvme Modified: head/sys/dev/ntb/ntb_hw/ntb_hw.c ============================================================================== --- head/sys/dev/ntb/ntb_hw/ntb_hw.c Tue Oct 13 17:21:38 2015 (r289233) +++ head/sys/dev/ntb/ntb_hw/ntb_hw.c Tue Oct 13 17:22:23 2015 (r289234) @@ -152,6 +152,26 @@ struct ntb_softc { uint8_t link_speed; }; +#ifdef __i386__ +static __inline uint64_t +bus_space_read_8(bus_space_tag_t tag, bus_space_handle_t handle, + bus_size_t offset) +{ + + return (bus_space_read_4(tag, handle, offset) | + ((uint64_t)bus_space_read_4(tag, handle, offset + 4)) << 32); +} + +static __inline void +bus_space_write_8(bus_space_tag_t tag, bus_space_handle_t handle, + bus_size_t offset, uint64_t val) +{ + + bus_space_write_4(tag, handle, offset, val); + bus_space_write_4(tag, handle, offset + 4, val >> 32); +} +#endif + #define ntb_bar_read(SIZE, bar, offset) \ bus_space_read_ ## SIZE (ntb->bar_info[(bar)].pci_bus_tag, \ ntb->bar_info[(bar)].pci_bus_handle, (offset)) From owner-svn-src-all@freebsd.org Tue Oct 13 17:34:20 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0596BA12744; Tue, 13 Oct 2015 17:34:20 +0000 (UTC) (envelope-from sbruno@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id CE7C310DB; Tue, 13 Oct 2015 17:34:19 +0000 (UTC) (envelope-from sbruno@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t9DHYInm003245; Tue, 13 Oct 2015 17:34:18 GMT (envelope-from sbruno@FreeBSD.org) Received: (from sbruno@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9DHYI4e003241; Tue, 13 Oct 2015 17:34:18 GMT (envelope-from sbruno@FreeBSD.org) Message-Id: <201510131734.t9DHYI4e003241@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: sbruno set sender to sbruno@FreeBSD.org using -f From: Sean Bruno Date: Tue, 13 Oct 2015 17:34:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289238 - head/sys/dev/ixgbe X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Oct 2015 17:34:20 -0000 Author: sbruno Date: Tue Oct 13 17:34:18 2015 New Revision: 289238 URL: https://svnweb.freebsd.org/changeset/base/289238 Log: Add support for sysctl knobs to live tune the per interrupt rx/tx packet processing limits in ixgbe(4) Differential Revision: https://reviews.freebsd.org/D3719 Submitted by: jason wolfe (j-nitrology.com) MFC after: 2 weeks Modified: head/sys/dev/ixgbe/if_ix.c head/sys/dev/ixgbe/if_ixv.c head/sys/dev/ixgbe/ix_txrx.c head/sys/dev/ixgbe/ixgbe.h Modified: head/sys/dev/ixgbe/if_ix.c ============================================================================== --- head/sys/dev/ixgbe/if_ix.c Tue Oct 13 17:31:11 2015 (r289237) +++ head/sys/dev/ixgbe/if_ix.c Tue Oct 13 17:34:18 2015 (r289238) @@ -170,6 +170,8 @@ static void ixgbe_add_device_sysctls(str static void ixgbe_add_hw_stats(struct adapter *); /* Sysctl handlers */ +static void ixgbe_set_sysctl_value(struct adapter *, const char *, + const char *, int *, int); static int ixgbe_set_flowcntl(SYSCTL_HANDLER_ARGS); static int ixgbe_set_advertise(SYSCTL_HANDLER_ARGS); static int ixgbe_sysctl_thermal_test(SYSCTL_HANDLER_ARGS); @@ -461,6 +463,15 @@ ixgbe_attach(device_t dev) goto err_out; } + /* Sysctls for limiting the amount of work done in the taskqueues */ + ixgbe_set_sysctl_value(adapter, "rx_processing_limit", + "max number of rx packets to process", + &adapter->rx_process_limit, ixgbe_rx_process_limit); + + ixgbe_set_sysctl_value(adapter, "tx_processing_limit", + "max number of tx packets to process", + &adapter->tx_process_limit, ixgbe_tx_process_limit); + /* Do descriptor calc and sanity checks */ if (((ixgbe_txd * sizeof(union ixgbe_adv_tx_desc)) % DBA_ALIGN) != 0 || ixgbe_txd < MIN_TXD || ixgbe_txd > MAX_TXD) { @@ -2877,9 +2888,6 @@ ixgbe_initialize_transmit_units(struct a /* Cache the tail address */ txr->tail = IXGBE_TDT(j); - /* Set the processing limit */ - txr->process_limit = ixgbe_tx_process_limit; - /* Disable Head Writeback */ switch (hw->mac.type) { case ixgbe_mac_82598EB: @@ -3136,9 +3144,6 @@ ixgbe_initialize_receive_units(struct ad IXGBE_WRITE_REG(hw, IXGBE_RDH(j), 0); IXGBE_WRITE_REG(hw, IXGBE_RDT(j), 0); - /* Set the processing limit */ - rxr->process_limit = ixgbe_rx_process_limit; - /* Set the driver rx tail address */ rxr->tail = IXGBE_RDT(rxr->me); } @@ -4458,6 +4463,16 @@ ixgbe_add_hw_stats(struct adapter *adapt "1024-1522 byte frames transmitted"); } +static void +ixgbe_set_sysctl_value(struct adapter *adapter, const char *name, + const char *description, int *limit, int value) +{ + *limit = value; + SYSCTL_ADD_INT(device_get_sysctl_ctx(adapter->dev), + SYSCTL_CHILDREN(device_get_sysctl_tree(adapter->dev)), + OID_AUTO, name, CTLFLAG_RW, limit, value, description); +} + /* ** Set flow control using sysctl: ** Flow control values: Modified: head/sys/dev/ixgbe/if_ixv.c ============================================================================== --- head/sys/dev/ixgbe/if_ixv.c Tue Oct 13 17:31:11 2015 (r289237) +++ head/sys/dev/ixgbe/if_ixv.c Tue Oct 13 17:34:18 2015 (r289238) @@ -115,6 +115,8 @@ static void ixv_save_stats(struct adapte static void ixv_init_stats(struct adapter *); static void ixv_update_stats(struct adapter *); static void ixv_add_stats_sysctls(struct adapter *); +static void ixv_set_sysctl_value(struct adapter *, const char *, + const char *, int *, int); /* The MSI/X Interrupt handlers */ static void ixv_msix_que(void *); @@ -325,6 +327,15 @@ ixv_attach(device_t dev) goto err_out; } + /* Sysctls for limiting the amount of work done in the taskqueues */ + ixv_set_sysctl_value(adapter, "rx_processing_limit", + "max number of rx packets to process", + &adapter->rx_process_limit, ixv_rx_process_limit); + + ixv_set_sysctl_value(adapter, "tx_processing_limit", + "max number of tx packets to process", + &adapter->tx_process_limit, ixv_tx_process_limit); + /* Do descriptor calc and sanity checks */ if (((ixv_txd * sizeof(union ixgbe_adv_tx_desc)) % DBA_ALIGN) != 0 || ixv_txd < MIN_TXD || ixv_txd > MAX_TXD) { @@ -1600,9 +1611,6 @@ ixv_initialize_transmit_units(struct ada /* Set Tx Tail register */ txr->tail = IXGBE_VFTDT(i); - /* Set the processing limit */ - txr->process_limit = ixv_tx_process_limit; - /* Set Ring parameters */ IXGBE_WRITE_REG(hw, IXGBE_VFTDBAL(i), (tdba & 0x00000000ffffffffULL)); @@ -1691,9 +1699,6 @@ ixv_initialize_receive_units(struct adap reg |= IXGBE_SRRCTL_DESCTYPE_ADV_ONEBUF; IXGBE_WRITE_REG(hw, IXGBE_VFSRRCTL(i), reg); - /* Set the processing limit */ - rxr->process_limit = ixv_rx_process_limit; - /* Capture Rx Tail index */ rxr->tail = IXGBE_VFRDT(rxr->me); @@ -2122,6 +2127,16 @@ ixv_add_stats_sysctls(struct adapter *ad "# of times not enough descriptors were available during TX"); } +static void +ixv_set_sysctl_value(struct adapter *adapter, const char *name, + const char *description, int *limit, int value) +{ + *limit = value; + SYSCTL_ADD_INT(device_get_sysctl_ctx(adapter->dev), + SYSCTL_CHILDREN(device_get_sysctl_tree(adapter->dev)), + OID_AUTO, name, CTLFLAG_RW, limit, value, description); +} + /********************************************************************** * * This routine is called only when em_display_debug_stats is enabled. Modified: head/sys/dev/ixgbe/ix_txrx.c ============================================================================== --- head/sys/dev/ixgbe/ix_txrx.c Tue Oct 13 17:31:11 2015 (r289237) +++ head/sys/dev/ixgbe/ix_txrx.c Tue Oct 13 17:34:18 2015 (r289238) @@ -986,12 +986,12 @@ ixgbe_tso_setup(struct tx_ring *txr, str void ixgbe_txeof(struct tx_ring *txr) { -#ifdef DEV_NETMAP struct adapter *adapter = txr->adapter; +#ifdef DEV_NETMAP struct ifnet *ifp = adapter->ifp; #endif u32 work, processed = 0; - u16 limit = txr->process_limit; + u32 limit = adapter->tx_process_limit; struct ixgbe_tx_buf *buf; union ixgbe_adv_tx_desc *txd; @@ -1747,7 +1747,7 @@ ixgbe_rxeof(struct ix_queue *que) struct lro_entry *queued; int i, nextp, processed = 0; u32 staterr = 0; - u16 count = rxr->process_limit; + u32 count = adapter->rx_process_limit; union ixgbe_adv_rx_desc *cur; struct ixgbe_rx_buf *rbuf, *nbuf; u16 pkt_info; Modified: head/sys/dev/ixgbe/ixgbe.h ============================================================================== --- head/sys/dev/ixgbe/ixgbe.h Tue Oct 13 17:31:11 2015 (r289237) +++ head/sys/dev/ixgbe/ixgbe.h Tue Oct 13 17:34:18 2015 (r289238) @@ -365,7 +365,6 @@ struct tx_ring { volatile u16 tx_avail; u16 next_avail_desc; u16 next_to_clean; - u16 process_limit; u16 num_desc; u32 txd_cmd; bus_dma_tag_t txtag; @@ -407,7 +406,6 @@ struct rx_ring { u16 next_to_check; u16 num_desc; u16 mbuf_sz; - u16 process_limit; char mtx_name[16]; struct ixgbe_rx_buf *rx_buffers; bus_dma_tag_t ptag; @@ -539,6 +537,7 @@ struct adapter { */ struct tx_ring *tx_rings; u32 num_tx_desc; + u32 tx_process_limit; /* * Receive rings: @@ -547,6 +546,7 @@ struct adapter { struct rx_ring *rx_rings; u64 active_queues; u32 num_rx_desc; + u32 rx_process_limit; /* Multicast array memory */ struct ixgbe_mc_addr *mta; From owner-svn-src-all@freebsd.org Tue Oct 13 18:23:54 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 58290A1263D; Tue, 13 Oct 2015 18:23:54 +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 1DB0B11BC; Tue, 13 Oct 2015 18:23:54 +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 t9DINr20018663; Tue, 13 Oct 2015 18:23:53 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9DINpQg018647; Tue, 13 Oct 2015 18:23:51 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201510131823.t9DINpQg018647@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Tue, 13 Oct 2015 18:23:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289239 - head/usr.bin/truss X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Oct 2015 18:23:54 -0000 Author: bdrewery Date: Tue Oct 13 18:23:51 2015 New Revision: 289239 URL: https://svnweb.freebsd.org/changeset/base/289239 Log: Simplify syscall generation and ABI source file handling for the build. This is to make the Makefile more easily extendable for new ABIs. This also makes several other subtle changes: - The build now is given a list of ABIs to use based on the MACHINE_ARCH or MACHINE_CPUARCH. These ABIs have a related path in sys/ that is used to generate their syscalls. For each ABI to build check for a ABI.c, MACHINE_ARCH-ABI.c, or a MACHINE_CPUARCH-ABI.c. This matches the old behavior needed for archs such as powerpc* and mips*. - The ABI source file selection allows for simpler assignment of common ABIs such as "fbsd32" from sys/compat/freebsd32, or cloudabi64. - Expand 'fbsd' to 'freebsd' everywhere for consistency. - Split out the powerpc-fbsd.c file into a powerpc64-freebsd32.c to be more like the amd64-freebsd32.c file and to more easily allow the auto-generation of ABI handling to work. - Rename 'syscalls.h' to 'fbsd_syscalls.h' to lessen the ambiguity and avoid confusion with syscall.h (such as in r288997). - For non-native syscall header files, they are now renamed to be ABI_syscalls.h, where ABI is what ABI the Makefile is building. - Remove all of the makesyscalls config files. The "native" one being name i386.conf was a long outstanding bug. They were all the same except for the data they generated, so now it is just auto-generated as a build artifact. - The syscalls array is now fixed to be static in the syscalls header to remove the compiler warning about non-extern. This was worked around in the aarch64-fbsd.c file but not the others. - All syscall table names are now just 'syscallnames' since they don't need to be different as they are all static in their own ABI files. The alternative is to name them ABI_syscallnames which does not seem necessary. Reviewed by: ed, jhb MFC after: 3 weeks Differential Revision: https://reviews.freebsd.org/D3851 Added: head/usr.bin/truss/aarch64-freebsd.c - copied, changed from r289238, head/usr.bin/truss/aarch64-fbsd.c head/usr.bin/truss/amd64-freebsd.c - copied, changed from r289057, head/usr.bin/truss/amd64-fbsd.c head/usr.bin/truss/amd64-freebsd32.c - copied, changed from r289057, head/usr.bin/truss/amd64-fbsd32.c head/usr.bin/truss/arm-freebsd.c - copied, changed from r289057, head/usr.bin/truss/arm-fbsd.c head/usr.bin/truss/i386-freebsd.c - copied, changed from r289057, head/usr.bin/truss/i386-fbsd.c head/usr.bin/truss/makesyscallsconf.sh (contents, props changed) head/usr.bin/truss/mips-freebsd.c - copied, changed from r289057, head/usr.bin/truss/mips-fbsd.c head/usr.bin/truss/powerpc-freebsd.c - copied, changed from r289057, head/usr.bin/truss/powerpc-fbsd.c head/usr.bin/truss/powerpc64-freebsd.c - copied, changed from r289057, head/usr.bin/truss/powerpc64-fbsd.c head/usr.bin/truss/powerpc64-freebsd32.c - copied, changed from r289057, head/usr.bin/truss/powerpc-fbsd.c head/usr.bin/truss/sparc64-freebsd.c - copied, changed from r289057, head/usr.bin/truss/sparc64-fbsd.c Deleted: head/usr.bin/truss/aarch64-fbsd.c head/usr.bin/truss/amd64-fbsd.c head/usr.bin/truss/amd64-fbsd32.c head/usr.bin/truss/amd64cloudabi64.conf head/usr.bin/truss/amd64linux32.conf head/usr.bin/truss/arm-fbsd.c head/usr.bin/truss/fbsd32.conf head/usr.bin/truss/i386-fbsd.c head/usr.bin/truss/i386.conf head/usr.bin/truss/i386linux.conf head/usr.bin/truss/mips-fbsd.c head/usr.bin/truss/powerpc-fbsd.c head/usr.bin/truss/powerpc64-fbsd.c head/usr.bin/truss/sparc64-fbsd.c Modified: head/usr.bin/truss/Makefile head/usr.bin/truss/Makefile.depend.amd64 head/usr.bin/truss/amd64-cloudabi64.c head/usr.bin/truss/amd64-linux32.c head/usr.bin/truss/i386-linux.c Modified: head/usr.bin/truss/Makefile ============================================================================== --- head/usr.bin/truss/Makefile Tue Oct 13 17:34:18 2015 (r289238) +++ head/usr.bin/truss/Makefile Tue Oct 13 18:23:51 2015 (r289239) @@ -2,87 +2,64 @@ NO_WERROR= PROG= truss -SRCS= main.c setup.c syscalls.c syscalls.h ioctl.c - -.if exists(${.CURDIR}/${MACHINE_ARCH}-fbsd.c) -SRCS+= ${MACHINE_ARCH}-fbsd.c -.else -SRCS+= ${MACHINE_CPUARCH}-fbsd.c -.endif +SRCS= main.c setup.c syscalls.c ioctl.c .PATH: ${.CURDIR:H}/kdump SRCS+= utrace.c CFLAGS+= -I${.CURDIR} -I. -I${.CURDIR}/../../sys -CLEANFILES= syscalls.master syscalls.h ioctl.c - -.SUFFIXES: .master - -syscalls.master: ${.CURDIR}/../../sys/kern/syscalls.master - cat ${.ALLSRC} > syscalls.master - -syscalls.h: syscalls.master - /bin/sh ${.CURDIR}/../../sys/kern/makesyscalls.sh syscalls.master \ - ${.CURDIR}/i386.conf +CLEANFILES= ioctl.c ioctl.c: ${.CURDIR}/../kdump/mkioctls env MACHINE=${MACHINE} CPP="${CPP}" \ /bin/sh ${.CURDIR}/../kdump/mkioctls return ${DESTDIR}${INCLUDEDIR} > ${.TARGET} +# Define where to generate syscalls for each ABI. +ABI_SYSPATH.freebsd= sys/kern +ABI_SYSPATH.freebsd32= sys/compat/freebsd32 +ABI_SYSPATH.cloudabi64= sys/compat/cloudabi64 +ABI_SYSPATH.i386-linux= sys/i386/linux +ABI_SYSPATH.amd64-linux32= sys/amd64/linux32 + +ABIS+= freebsd +# Each ABI is expected to have an ABI.c, MACHINE_ARCH-ABI.c or +# MACHINE_CPUARCH-ABI.c file that will be used to map the syscall arguments. .if ${MACHINE_CPUARCH} == "i386" -SRCS+= i386-linux.c linux_syscalls.h -CLEANFILES+=i386l-syscalls.master linux_syscalls.h - -i386l-syscalls.master: ${.CURDIR}/../../sys/i386/linux/syscalls.master - cat ${.ALLSRC} > ${.TARGET} - -linux_syscalls.h: i386l-syscalls.master - /bin/sh ${.CURDIR}/../../sys/kern/makesyscalls.sh ${.ALLSRC} \ - ${.CURDIR}/i386linux.conf +ABIS+= i386-linux .endif - .if ${MACHINE_CPUARCH} == "amd64" -SRCS+= amd64-linux32.c linux32_syscalls.h -CLEANFILES+=amd64l32-syscalls.master linux32_syscalls.h - -amd64l32-syscalls.master: ${.CURDIR}/../../sys/amd64/linux32/syscalls.master - cat ${.ALLSRC} > ${.TARGET} - -linux32_syscalls.h: amd64l32-syscalls.master - /bin/sh ${.CURDIR}/../../sys/kern/makesyscalls.sh ${.ALLSRC} \ - ${.CURDIR}/amd64linux32.conf - -SRCS+= amd64-fbsd32.c freebsd32_syscalls.h -CLEANFILES+=fbsd32-syscalls.master freebsd32_syscalls.h - -fbsd32-syscalls.master: ${.CURDIR}/../../sys/compat/freebsd32/syscalls.master - cat ${.ALLSRC} > ${.TARGET} - -freebsd32_syscalls.h: fbsd32-syscalls.master - /bin/sh ${.CURDIR}/../../sys/kern/makesyscalls.sh ${.ALLSRC} \ - ${.CURDIR}/fbsd32.conf - -SRCS+= amd64-cloudabi64.c cloudabi64_syscalls.h -CLEANFILES+=amd64cloudabi64-syscalls.master cloudabi64_syscalls.h - -amd64cloudabi64-syscalls.master: ${.CURDIR}/../../sys/compat/cloudabi64/syscalls.master - cat ${.ALLSRC} > ${.TARGET} - -cloudabi64_syscalls.h: amd64cloudabi64-syscalls.master - /bin/sh ${.CURDIR}/../../sys/kern/makesyscalls.sh ${.ALLSRC} \ - ${.CURDIR}/amd64cloudabi64.conf +ABIS+= amd64-linux32 +ABIS+= freebsd32 +ABIS+= cloudabi64 .endif - .if ${MACHINE_ARCH} == "powerpc64" -SRCS+= powerpc-fbsd.c freebsd32_syscalls.h -CLEANFILES+=fbsd32-syscalls.master freebsd32_syscalls.h - -fbsd32-syscalls.master: ${.CURDIR}/../../sys/compat/freebsd32/syscalls.master - cat ${.ALLSRC} > ${.TARGET} +ABIS+= freebsd32 +.endif -freebsd32_syscalls.h: fbsd32-syscalls.master - /bin/sh ${.CURDIR}/../../sys/kern/makesyscalls.sh ${.ALLSRC} \ - ${.CURDIR}/fbsd32.conf +.for abi in ${ABIS} +# Find the right file to handle this ABI. +abi_src= +ABI_SRCS= ${abi}.c ${MACHINE_ARCH}-${abi}.c ${MACHINE_CPUARCH}-${abi}.c +.for f in ${ABI_SRCS} +.if exists(${.CURDIR}/${f}) && empty(abi_src) +abi_src= ${f} .endif +.endfor +SRCS:= ${SRCS} ${abi_src} ${abi}_syscalls.h +CLEANFILES+= ${abi}_syscalls.conf ${abi}_syscalls.master ${abi}_syscalls.h +${abi}_syscalls.conf: ${.CURDIR}/makesyscallsconf.sh + /bin/sh ${.CURDIR}/makesyscallsconf.sh ${abi} ${.TARGET} + +${abi}_syscalls.master: ${.CURDIR:H:H}/${ABI_SYSPATH.${abi}}/syscalls.master + cp -f ${.ALLSRC} ${.TARGET} + +${abi}_syscalls.h: ${abi}_syscalls.master ${abi}_syscalls.conf \ + ${.CURDIR:H:H}/sys/kern/makesyscalls.sh + /bin/sh ${.CURDIR:H:H}/sys/kern/makesyscalls.sh \ + ${abi}_syscalls.master ${abi}_syscalls.conf +# Eliminate compiler warning about non-static global. + sed -i '' '/^const char \*/s/^/static /' ${.TARGET}.tmp + mv ${.TARGET}.tmp ${.TARGET} +.endfor .include Modified: head/usr.bin/truss/Makefile.depend.amd64 ============================================================================== --- head/usr.bin/truss/Makefile.depend.amd64 Tue Oct 13 17:34:18 2015 (r289238) +++ head/usr.bin/truss/Makefile.depend.amd64 Tue Oct 13 18:23:51 2015 (r289239) @@ -19,12 +19,12 @@ DIRDEPS = \ # local dependencies - needed for -jN in clean tree amd64-cloudabi64.o: cloudabi64_syscalls.h amd64-cloudabi64.po: cloudabi64_syscalls.h -amd64-fbsd.o: syscalls.h -amd64-fbsd.po: syscalls.h -amd64-fbsd32.o: freebsd32_syscalls.h -amd64-fbsd32.po: freebsd32_syscalls.h -amd64-linux32.o: linux32_syscalls.h -amd64-linux32.po: linux32_syscalls.h +amd64-freebsd.o: freebsd_syscalls.h +amd64-freebsd.po: freebsd_syscalls.h +amd64-freebsd32.o: freebsd32_syscalls.h +amd64-freebsd32.po: freebsd32_syscalls.h +amd64-linux32.o: amd64-linux32_syscalls.h +amd64-linux32.po: amd64-linux32_syscalls.h ioctl.o: ioctl.c ioctl.po: ioctl.c .endif Copied and modified: head/usr.bin/truss/aarch64-freebsd.c (from r289238, head/usr.bin/truss/aarch64-fbsd.c) ============================================================================== --- head/usr.bin/truss/aarch64-fbsd.c Tue Oct 13 17:34:18 2015 (r289238, copy source) +++ head/usr.bin/truss/aarch64-freebsd.c Tue Oct 13 18:23:51 2015 (r289239) @@ -42,8 +42,7 @@ __FBSDID("$FreeBSD$"); #include "truss.h" -extern const char *syscallnames[]; /* silence compiler */ -#include "syscalls.h" +#include "freebsd_syscalls.h" static int aarch64_fetch_args(struct trussinfo *trussinfo, u_int narg) @@ -99,7 +98,7 @@ aarch64_fetch_retval(struct trussinfo *t return (0); } -static struct procabi aarch64_fbsd = { +static struct procabi aarch64_freebsd = { "FreeBSD ELF64", syscallnames, nitems(syscallnames), @@ -107,4 +106,4 @@ static struct procabi aarch64_fbsd = { aarch64_fetch_retval }; -PROCABI(aarch64_fbsd); +PROCABI(aarch64_freebsd); Modified: head/usr.bin/truss/amd64-cloudabi64.c ============================================================================== --- head/usr.bin/truss/amd64-cloudabi64.c Tue Oct 13 17:34:18 2015 (r289238) +++ head/usr.bin/truss/amd64-cloudabi64.c Tue Oct 13 18:23:51 2015 (r289239) @@ -171,8 +171,8 @@ amd64_cloudabi64_fetch_retval(struct tru static struct procabi amd64_cloudabi64 = { "CloudABI ELF64", - cloudabi64_syscallnames, - nitems(cloudabi64_syscallnames), + syscallnames, + nitems(syscallnames), amd64_cloudabi64_fetch_args, amd64_cloudabi64_fetch_retval }; Copied and modified: head/usr.bin/truss/amd64-freebsd.c (from r289057, head/usr.bin/truss/amd64-fbsd.c) ============================================================================== --- head/usr.bin/truss/amd64-fbsd.c Thu Oct 8 21:52:20 2015 (r289057, copy source) +++ head/usr.bin/truss/amd64-freebsd.c Tue Oct 13 18:23:51 2015 (r289239) @@ -44,7 +44,7 @@ __FBSDID("$FreeBSD$"); #include "truss.h" -#include "syscalls.h" +#include "freebsd_syscalls.h" static int amd64_fetch_args(struct trussinfo *trussinfo, u_int narg) @@ -120,7 +120,7 @@ amd64_fetch_retval(struct trussinfo *tru return (0); } -static struct procabi amd64_fbsd = { +static struct procabi amd64_freebsd = { "FreeBSD ELF64", syscallnames, nitems(syscallnames), @@ -128,4 +128,4 @@ static struct procabi amd64_fbsd = { amd64_fetch_retval }; -PROCABI(amd64_fbsd); +PROCABI(amd64_freebsd); Copied and modified: head/usr.bin/truss/amd64-freebsd32.c (from r289057, head/usr.bin/truss/amd64-fbsd32.c) ============================================================================== --- head/usr.bin/truss/amd64-fbsd32.c Thu Oct 8 21:52:20 2015 (r289057, copy source) +++ head/usr.bin/truss/amd64-freebsd32.c Tue Oct 13 18:23:51 2015 (r289239) @@ -32,7 +32,7 @@ #include __FBSDID("$FreeBSD$"); -/* FreeBSD/i386-specific system call handling. */ +/* FreeBSD/amd64-freebsd32-specific system call handling. */ #include #include @@ -48,7 +48,7 @@ __FBSDID("$FreeBSD$"); #include "freebsd32_syscalls.h" static int -amd64_fbsd32_fetch_args(struct trussinfo *trussinfo, u_int narg) +amd64_freebsd32_fetch_args(struct trussinfo *trussinfo, u_int narg) { struct ptrace_io_desc iorequest; struct reg regs; @@ -98,7 +98,7 @@ amd64_fbsd32_fetch_args(struct trussinfo } static int -amd64_fbsd32_fetch_retval(struct trussinfo *trussinfo, long *retval, +amd64_freebsd32_fetch_retval(struct trussinfo *trussinfo, long *retval, int *errorp) { struct reg regs; @@ -116,22 +116,22 @@ amd64_fbsd32_fetch_retval(struct trussin return (0); } -static struct procabi amd64_fbsd32 = { +static struct procabi amd64_freebsd32 = { "FreeBSD ELF32", - freebsd32_syscallnames, - nitems(freebsd32_syscallnames), - amd64_fbsd32_fetch_args, - amd64_fbsd32_fetch_retval + syscallnames, + nitems(syscallnames), + amd64_freebsd32_fetch_args, + amd64_freebsd32_fetch_retval }; -PROCABI(amd64_fbsd32); +PROCABI(amd64_freebsd32); -static struct procabi amd64_fbsd32_aout = { +static struct procabi amd64_freebsd32_aout = { "FreeBSD a.out", - freebsd32_syscallnames, - nitems(freebsd32_syscallnames), - amd64_fbsd32_fetch_args, - amd64_fbsd32_fetch_retval + syscallnames, + nitems(syscallnames), + amd64_freebsd32_fetch_args, + amd64_freebsd32_fetch_retval }; -PROCABI(amd64_fbsd32_aout); +PROCABI(amd64_freebsd32_aout); Modified: head/usr.bin/truss/amd64-linux32.c ============================================================================== --- head/usr.bin/truss/amd64-linux32.c Tue Oct 13 17:34:18 2015 (r289238) +++ head/usr.bin/truss/amd64-linux32.c Tue Oct 13 18:23:51 2015 (r289239) @@ -43,7 +43,7 @@ __FBSDID("$FreeBSD$"); #include "truss.h" -#include "linux32_syscalls.h" +#include "amd64-linux32_syscalls.h" static int amd64_linux32_fetch_args(struct trussinfo *trussinfo, u_int narg) @@ -132,8 +132,8 @@ amd64_linux32_fetch_retval(struct trussi static struct procabi amd64_linux32 = { "Linux ELF32", - linux32_syscallnames, - nitems(linux32_syscallnames), + syscallnames, + nitems(syscallnames), amd64_linux32_fetch_args, amd64_linux32_fetch_retval }; Copied and modified: head/usr.bin/truss/arm-freebsd.c (from r289057, head/usr.bin/truss/arm-fbsd.c) ============================================================================== --- head/usr.bin/truss/arm-fbsd.c Thu Oct 8 21:52:20 2015 (r289057, copy source) +++ head/usr.bin/truss/arm-freebsd.c Tue Oct 13 18:23:51 2015 (r289239) @@ -45,7 +45,7 @@ __FBSDID("$FreeBSD$"); #include "truss.h" -#include "syscalls.h" +#include "freebsd_syscalls.h" static int arm_fetch_args(struct trussinfo *trussinfo, u_int narg) @@ -127,7 +127,7 @@ arm_fetch_retval(struct trussinfo *truss return (0); } -static struct procabi arm_fbsd = { +static struct procabi arm_freebsd = { "FreeBSD ELF32", syscallnames, nitems(syscallnames), @@ -135,4 +135,4 @@ static struct procabi arm_fbsd = { arm_fetch_retval }; -PROCABI(arm_fbsd); +PROCABI(arm_freebsd); Copied and modified: head/usr.bin/truss/i386-freebsd.c (from r289057, head/usr.bin/truss/i386-fbsd.c) ============================================================================== --- head/usr.bin/truss/i386-fbsd.c Thu Oct 8 21:52:20 2015 (r289057, copy source) +++ head/usr.bin/truss/i386-freebsd.c Tue Oct 13 18:23:51 2015 (r289239) @@ -44,7 +44,7 @@ __FBSDID("$FreeBSD$"); #include "truss.h" -#include "syscalls.h" +#include "freebsd_syscalls.h" static int i386_fetch_args(struct trussinfo *trussinfo, u_int narg) @@ -109,7 +109,7 @@ i386_fetch_retval(struct trussinfo *trus return (0); } -static struct procabi i386_fbsd = { +static struct procabi i386_freebsd = { "FreeBSD ELF32", syscallnames, nitems(syscallnames), @@ -117,9 +117,9 @@ static struct procabi i386_fbsd = { i386_fetch_retval }; -PROCABI(i386_fbsd); +PROCABI(i386_freebsd); -static struct procabi i386_fbsd_aout = { +static struct procabi i386_freebsd_aout = { "FreeBSD a.out", syscallnames, nitems(syscallnames), @@ -127,5 +127,5 @@ static struct procabi i386_fbsd_aout = { i386_fetch_retval }; -PROCABI(i386_fbsd_aout); +PROCABI(i386_freebsd_aout); Modified: head/usr.bin/truss/i386-linux.c ============================================================================== --- head/usr.bin/truss/i386-linux.c Tue Oct 13 17:34:18 2015 (r289238) +++ head/usr.bin/truss/i386-linux.c Tue Oct 13 18:23:51 2015 (r289239) @@ -43,7 +43,7 @@ __FBSDID("$FreeBSD$"); #include "truss.h" -#include "linux_syscalls.h" +#include "i386-linux_syscalls.h" static int i386_linux_fetch_args(struct trussinfo *trussinfo, u_int narg) @@ -131,8 +131,8 @@ i386_linux_fetch_retval(struct trussinfo static struct procabi i386_linux = { "Linux ELF32", - linux_syscallnames, - nitems(linux_syscallnames), + syscallnames, + nitems(syscallnames), i386_linux_fetch_args, i386_linux_fetch_retval }; Added: head/usr.bin/truss/makesyscallsconf.sh ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/usr.bin/truss/makesyscallsconf.sh Tue Oct 13 18:23:51 2015 (r289239) @@ -0,0 +1,21 @@ +#! /bin/sh +# $FreeBSD$ + +ABI="$1" +CONF="$2" + +header="${ABI}_syscalls.h" + +cat > "${CONF}" << EOF +sysnames="${header}.tmp" +sysproto="/dev/null" +sysproto_h="/dev/null" +syshdr="/dev/null" +sysmk="/dev/null" +syssw="/dev/null" +syshide="/dev/null" +syscallprefix="SYS_" +switchname="sysent" +namesname="syscallnames" +systrace="/dev/null" +EOF Copied and modified: head/usr.bin/truss/mips-freebsd.c (from r289057, head/usr.bin/truss/mips-fbsd.c) ============================================================================== --- head/usr.bin/truss/mips-fbsd.c Thu Oct 8 21:52:20 2015 (r289057, copy source) +++ head/usr.bin/truss/mips-freebsd.c Tue Oct 13 18:23:51 2015 (r289239) @@ -44,7 +44,7 @@ __FBSDID("$FreeBSD$"); #include "truss.h" -#include "syscalls.h" +#include "freebsd_syscalls.h" static int mips_fetch_args(struct trussinfo *trussinfo, u_int narg) @@ -126,7 +126,7 @@ mips_fetch_retval(struct trussinfo *trus } -static struct procabi mips_fbsd = { +static struct procabi mips_freebsd = { #ifdef __mips_n64 "FreeBSD ELF64", #else @@ -138,4 +138,4 @@ static struct procabi mips_fbsd = { mips_fetch_retval }; -PROCABI(mips_fbsd); +PROCABI(mips_freebsd); Copied and modified: head/usr.bin/truss/powerpc-freebsd.c (from r289057, head/usr.bin/truss/powerpc-fbsd.c) ============================================================================== --- head/usr.bin/truss/powerpc-fbsd.c Thu Oct 8 21:52:20 2015 (r289057, copy source) +++ head/usr.bin/truss/powerpc-freebsd.c Tue Oct 13 18:23:51 2015 (r289239) @@ -40,12 +40,7 @@ __FBSDID("$FreeBSD$"); #include "truss.h" -#ifdef __powerpc64__ /* 32-bit compatibility */ -#include "freebsd32_syscalls.h" -#define syscallnames freebsd32_syscallnames -#else /* native 32-bit */ -#include "syscalls.h" -#endif +#include "freebsd_syscalls.h" static int powerpc_fetch_args(struct trussinfo *trussinfo, u_int narg) @@ -82,34 +77,16 @@ powerpc_fetch_args(struct trussinfo *tru } for (i = 0; i < narg && reg < NARGREG; i++, reg++) { -#ifdef __powerpc64__ - cs->args[i] = regs.fixreg[FIRSTARG + reg] & 0xffffffff; -#else cs->args[i] = regs.fixreg[FIRSTARG + reg]; -#endif } if (narg > i) { -#ifdef __powerpc64__ - uint32_t args32[narg - i]; - u_int j; - -#endif iorequest.piod_op = PIOD_READ_D; iorequest.piod_offs = (void *)(regs.fixreg[1] + 8); -#ifdef __powerpc64__ - iorequest.piod_addr = args32; - iorequest.piod_len = sizeof(args32); -#else iorequest.piod_addr = &cs->args[i]; iorequest.piod_len = (narg - i) * sizeof(cs->args[0]); -#endif ptrace(PT_IO, tid, (caddr_t)&iorequest, 0); if (iorequest.piod_len == 0) return (-1); -#ifdef __powerpc64__ - for (j = 0; j < narg - i; j++) - cs->args[i + j] = args32[j]; -#endif } return (0); @@ -128,18 +105,13 @@ powerpc_fetch_retval(struct trussinfo *t } /* XXX: Does not have fixup for __syscall(). */ -#ifdef __powerpc64__ - retval[0] = regs.fixreg[3] & 0xffffffff; - retval[1] = regs.fixreg[4] & 0xffffffff; -#else retval[0] = regs.fixreg[3]; retval[1] = regs.fixreg[4]; -#endif *errorp = !!(regs.cr & 0x10000000); return (0); } -static struct procabi powerpc_fbsd = { +static struct procabi powerpc_freebsd = { "FreeBSD ELF32", syscallnames, nitems(syscallnames), @@ -147,4 +119,4 @@ static struct procabi powerpc_fbsd = { powerpc_fetch_retval }; -PROCABI(powerpc_fbsd); +PROCABI(powerpc_freebsd); Copied and modified: head/usr.bin/truss/powerpc64-freebsd.c (from r289057, head/usr.bin/truss/powerpc64-fbsd.c) ============================================================================== --- head/usr.bin/truss/powerpc64-fbsd.c Thu Oct 8 21:52:20 2015 (r289057, copy source) +++ head/usr.bin/truss/powerpc64-freebsd.c Tue Oct 13 18:23:51 2015 (r289239) @@ -40,7 +40,7 @@ __FBSDID("$FreeBSD$"); #include "truss.h" -#include "syscalls.h" +#include "freebsd_syscalls.h" static int powerpc64_fetch_args(struct trussinfo *trussinfo, u_int narg) @@ -107,7 +107,7 @@ powerpc64_fetch_retval(struct trussinfo return (0); } -static struct procabi powerpc64_fbsd = { +static struct procabi powerpc64_freebsd = { "FreeBSD ELF64", syscallnames, nitems(syscallnames), @@ -115,4 +115,4 @@ static struct procabi powerpc64_fbsd = { powerpc64_fetch_retval }; -PROCABI(powerpc64_fbsd); +PROCABI(powerpc64_freebsd); Copied and modified: head/usr.bin/truss/powerpc64-freebsd32.c (from r289057, head/usr.bin/truss/powerpc-fbsd.c) ============================================================================== --- head/usr.bin/truss/powerpc-fbsd.c Thu Oct 8 21:52:20 2015 (r289057, copy source) +++ head/usr.bin/truss/powerpc64-freebsd32.c Tue Oct 13 18:23:51 2015 (r289239) @@ -28,7 +28,7 @@ #include __FBSDID("$FreeBSD$"); -/* FreeBSD/powerpc-specific system call handling. */ +/* FreeBSD/powerpc64-freebsd32-specific system call handling. */ #include #include @@ -40,15 +40,10 @@ __FBSDID("$FreeBSD$"); #include "truss.h" -#ifdef __powerpc64__ /* 32-bit compatibility */ #include "freebsd32_syscalls.h" -#define syscallnames freebsd32_syscallnames -#else /* native 32-bit */ -#include "syscalls.h" -#endif static int -powerpc_fetch_args(struct trussinfo *trussinfo, u_int narg) +powerpc64_freebsd32_fetch_args(struct trussinfo *trussinfo, u_int narg) { struct ptrace_io_desc iorequest; struct reg regs; @@ -82,41 +77,28 @@ powerpc_fetch_args(struct trussinfo *tru } for (i = 0; i < narg && reg < NARGREG; i++, reg++) { -#ifdef __powerpc64__ cs->args[i] = regs.fixreg[FIRSTARG + reg] & 0xffffffff; -#else - cs->args[i] = regs.fixreg[FIRSTARG + reg]; -#endif } if (narg > i) { -#ifdef __powerpc64__ uint32_t args32[narg - i]; u_int j; -#endif iorequest.piod_op = PIOD_READ_D; iorequest.piod_offs = (void *)(regs.fixreg[1] + 8); -#ifdef __powerpc64__ iorequest.piod_addr = args32; iorequest.piod_len = sizeof(args32); -#else - iorequest.piod_addr = &cs->args[i]; - iorequest.piod_len = (narg - i) * sizeof(cs->args[0]); -#endif ptrace(PT_IO, tid, (caddr_t)&iorequest, 0); if (iorequest.piod_len == 0) return (-1); -#ifdef __powerpc64__ for (j = 0; j < narg - i; j++) cs->args[i + j] = args32[j]; -#endif } return (0); } static int -powerpc_fetch_retval(struct trussinfo *trussinfo, long *retval, int *errorp) +powerpc64_freebsd32_fetch_retval(struct trussinfo *trussinfo, long *retval, int *errorp) { struct reg regs; lwpid_t tid; @@ -128,23 +110,18 @@ powerpc_fetch_retval(struct trussinfo *t } /* XXX: Does not have fixup for __syscall(). */ -#ifdef __powerpc64__ retval[0] = regs.fixreg[3] & 0xffffffff; retval[1] = regs.fixreg[4] & 0xffffffff; -#else - retval[0] = regs.fixreg[3]; - retval[1] = regs.fixreg[4]; -#endif *errorp = !!(regs.cr & 0x10000000); return (0); } -static struct procabi powerpc_fbsd = { +static struct procabi powerpc64_freebsd32 = { "FreeBSD ELF32", syscallnames, nitems(syscallnames), - powerpc_fetch_args, - powerpc_fetch_retval + powerpc64_freebsd32_fetch_args, + powerpc64_freebsd32_fetch_retval }; -PROCABI(powerpc_fbsd); +PROCABI(powerpc64_freebsd32); Copied and modified: head/usr.bin/truss/sparc64-freebsd.c (from r289057, head/usr.bin/truss/sparc64-fbsd.c) ============================================================================== --- head/usr.bin/truss/sparc64-fbsd.c Thu Oct 8 21:52:20 2015 (r289057, copy source) +++ head/usr.bin/truss/sparc64-freebsd.c Tue Oct 13 18:23:51 2015 (r289239) @@ -46,7 +46,7 @@ __FBSDID("$FreeBSD$"); #include "truss.h" -#include "syscalls.h" +#include "freebsd_syscalls.h" static int sparc64_fetch_args(struct trussinfo *trussinfo, u_int narg) @@ -114,7 +114,7 @@ sparc64_fetch_retval(struct trussinfo *t return (0); } -static struct procabi sparc64_fbsd = { +static struct procabi sparc64_freebsd = { "FreeBSD ELF64", syscallnames, nitems(syscallnames), @@ -122,4 +122,4 @@ static struct procabi sparc64_fbsd = { sparc64_fetch_retval }; -PROCABI(sparc64_fbsd); +PROCABI(sparc64_freebsd); From owner-svn-src-all@freebsd.org Tue Oct 13 18:27:56 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9CEA4A1272A; Tue, 13 Oct 2015 18:27:56 +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 6745A137F; Tue, 13 Oct 2015 18:27:56 +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 t9DIRt4N018846; Tue, 13 Oct 2015 18:27:55 GMT (envelope-from tuexen@FreeBSD.org) Received: (from tuexen@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9DIRtbG018845; Tue, 13 Oct 2015 18:27:55 GMT (envelope-from tuexen@FreeBSD.org) Message-Id: <201510131827.t9DIRtbG018845@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: tuexen set sender to tuexen@FreeBSD.org using -f From: Michael Tuexen Date: Tue, 13 Oct 2015 18:27:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289240 - 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 " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Oct 2015 18:27:56 -0000 Author: tuexen Date: Tue Oct 13 18:27:55 2015 New Revision: 289240 URL: https://svnweb.freebsd.org/changeset/base/289240 Log: Fix the timeout for INIT retransmissions in the case where RTO_MIN is smaller than RTO_INITIAL. MFC after: 1 week Modified: head/sys/netinet/sctp_timer.c Modified: head/sys/netinet/sctp_timer.c ============================================================================== --- head/sys/netinet/sctp_timer.c Tue Oct 13 18:23:51 2015 (r289239) +++ head/sys/netinet/sctp_timer.c Tue Oct 13 18:27:55 2015 (r289240) @@ -408,7 +408,11 @@ sctp_backoff_on_timeout(struct sctp_tcb int num_marked, int num_abandoned) { if (net->RTO == 0) { - net->RTO = stcb->asoc.minrto; + if (net->RTO_measured) { + net->RTO = stcb->asoc.minrto; + } else { + net->RTO = stcb->asoc.initial_rto; + } } net->RTO <<= 1; if (net->RTO > stcb->asoc.maxrto) { From owner-svn-src-all@freebsd.org Tue Oct 13 18:31:25 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6630FA12996; Tue, 13 Oct 2015 18:31:25 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3D7881868; Tue, 13 Oct 2015 18:31:25 +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 t9DIVO31019752; Tue, 13 Oct 2015 18:31:24 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9DIVNuJ019746; Tue, 13 Oct 2015 18:31:23 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201510131831.t9DIVNuJ019746@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Tue, 13 Oct 2015 18:31: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: r289241 - stable/10/gnu/usr.bin/binutils/ld 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 " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Oct 2015 18:31:25 -0000 Author: bdrewery Date: Tue Oct 13 18:31:23 2015 New Revision: 289241 URL: https://svnweb.freebsd.org/changeset/base/289241 Log: MFC r288230,r288233: r288230: Fix emulation ldscripts not being installed since r131832. r288233: Fix subdir -j build after r287983 by adding missing dependencies. Modified: stable/10/gnu/usr.bin/binutils/ld/Makefile stable/10/gnu/usr.bin/binutils/ld/Makefile.amd64 stable/10/gnu/usr.bin/binutils/ld/Makefile.mips stable/10/gnu/usr.bin/binutils/ld/Makefile.powerpc64 stable/10/gnu/usr.bin/binutils/ld/Makefile.sparc64 Directory Properties: stable/10/ (props changed) Modified: stable/10/gnu/usr.bin/binutils/ld/Makefile ============================================================================== --- stable/10/gnu/usr.bin/binutils/ld/Makefile Tue Oct 13 18:27:55 2015 (r289240) +++ stable/10/gnu/usr.bin/binutils/ld/Makefile Tue Oct 13 18:31:23 2015 (r289241) @@ -1,5 +1,6 @@ # $FreeBSD$ +ELF_SCR_EXT= x xbn xc xd xdc xdw xn xr xs xsc xsw xu xw .include "../Makefile.inc0" .include @@ -51,9 +52,9 @@ CLEANFILES+= ldemul-list.h stringify.sed HOST= ${TARGET_TUPLE} LIBSEARCHPATH= \"${TOOLS_PREFIX}/lib\":\"${TOOLS_PREFIX}/usr/lib\" -ELF_SCR_EXT= x xbn xc xd xdc xdw xn xr xs xsc xsw xu xw .for ext in ${ELF_SCR_EXT} LDSCRIPTS+= ${NATIVE_EMULATION}.${ext} +ldscripts/${NATIVE_EMULATION}.${ext}: e${NATIVE_EMULATION}.c .endfor EMXFR= Modified: stable/10/gnu/usr.bin/binutils/ld/Makefile.amd64 ============================================================================== --- stable/10/gnu/usr.bin/binutils/ld/Makefile.amd64 Tue Oct 13 18:27:55 2015 (r289240) +++ stable/10/gnu/usr.bin/binutils/ld/Makefile.amd64 Tue Oct 13 18:31:23 2015 (r289241) @@ -16,6 +16,7 @@ _i386_path= \"${TOOLS_PREFIX}/usr/lib32\ EMS+= ${X86_EMULATION} .for ext in ${ELF_SCR_EXT} LDSCRIPTS+= ${X86_EMULATION}.${ext} +ldscripts/${X86_EMULATION}.${ext}: e${X86_EMULATION}.c .endfor SRCS+= e${X86_EMULATION}.c Modified: stable/10/gnu/usr.bin/binutils/ld/Makefile.mips ============================================================================== --- stable/10/gnu/usr.bin/binutils/ld/Makefile.mips Tue Oct 13 18:27:55 2015 (r289240) +++ stable/10/gnu/usr.bin/binutils/ld/Makefile.mips Tue Oct 13 18:31:23 2015 (r289241) @@ -22,6 +22,7 @@ EMS+= ${abi} #.endif .for ext in ${ELF_SCR_EXT} LDSCRIPTS+= ${abi}.${ext} +ldscripts/${abi}.${ext}: e${abi}.c .endfor SRCS+= e${abi}.c CLEANFILES+= e${abi}.c Modified: stable/10/gnu/usr.bin/binutils/ld/Makefile.powerpc64 ============================================================================== --- stable/10/gnu/usr.bin/binutils/ld/Makefile.powerpc64 Tue Oct 13 18:27:55 2015 (r289240) +++ stable/10/gnu/usr.bin/binutils/ld/Makefile.powerpc64 Tue Oct 13 18:31:23 2015 (r289241) @@ -16,6 +16,7 @@ _ppc32_path= \"${TOOLS_PREFIX}/usr/lib32 EMS+= ${PPC32_EMULATION} .for ext in ${ELF_SCR_EXT} LDSCRIPTS+= ${PPC32_EMULATION}.${ext} +ldscripts/${PPC32_EMULATION}.${ext}: e${PPC32_EMULATION}.c .endfor SRCS+= e${PPC32_EMULATION}.c Modified: stable/10/gnu/usr.bin/binutils/ld/Makefile.sparc64 ============================================================================== --- stable/10/gnu/usr.bin/binutils/ld/Makefile.sparc64 Tue Oct 13 18:27:55 2015 (r289240) +++ stable/10/gnu/usr.bin/binutils/ld/Makefile.sparc64 Tue Oct 13 18:31:23 2015 (r289241) @@ -17,6 +17,7 @@ e${NATIVE_EMULATION}.c: emulparams/${NAT EMS+= elf${BITS}_sparc .for ext in ${ELF_SCR_EXT} LDSCRIPTS+= elf${BITS}_sparc.${ext} +ldscripts/elf${BITS}_sparc.${ext}: eelf${BITS}_sparc.c .endfor SRCS+= eelf${BITS}_sparc.c From owner-svn-src-all@freebsd.org Tue Oct 13 18:32:49 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3882DA129F6; Tue, 13 Oct 2015 18:32:49 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 058221AEF; Tue, 13 Oct 2015 18:32:48 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t9DIWmZk021754; Tue, 13 Oct 2015 18:32:48 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9DIWmLg021753; Tue, 13 Oct 2015 18:32:48 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201510131832.t9DIWmLg021753@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Tue, 13 Oct 2015 18:32:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r289242 - stable/10/gnu/usr.bin/binutils/ld 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 " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Oct 2015 18:32:49 -0000 Author: bdrewery Date: Tue Oct 13 18:32:47 2015 New Revision: 289242 URL: https://svnweb.freebsd.org/changeset/base/289242 Log: MFC r287983,r288075: r287983: Replace afterinstall: hack with FILES mechanism. r288075: Use SHAREOWN/SHAREMODE/SHAREGRP rather than LIB* as these are plain ASCII scripts that the linker can load rather than binary library objects. Modified: stable/10/gnu/usr.bin/binutils/ld/Makefile Directory Properties: stable/10/ (props changed) Modified: stable/10/gnu/usr.bin/binutils/ld/Makefile ============================================================================== --- stable/10/gnu/usr.bin/binutils/ld/Makefile Tue Oct 13 18:31:23 2015 (r289241) +++ stable/10/gnu/usr.bin/binutils/ld/Makefile Tue Oct 13 18:32:47 2015 (r289242) @@ -50,6 +50,9 @@ LDADD= ${DPADD} CLEANDIRS+= ldscripts CLEANFILES+= ldemul-list.h stringify.sed +FILES= ${LDSCRIPTS:S|^|ldscripts/|} +FILESDIR= ${SCRIPTDIR} + HOST= ${TARGET_TUPLE} LIBSEARCHPATH= \"${TOOLS_PREFIX}/lib\":\"${TOOLS_PREFIX}/usr/lib\" .for ext in ${ELF_SCR_EXT} @@ -71,8 +74,4 @@ ldemul-list.h: stringify.sed: ln -sf ${SRCDIR}/ld/emultempl/astring.sed ${.TARGET} -afterinstall: - ${INSTALL} -o ${LIBOWN} -g ${LIBGRP} -m ${LIBMODE} \ - ${LDSCRIPTS:S|^|ldscripts/|} ${DESTDIR}${SCRIPTDIR} - .include From owner-svn-src-all@freebsd.org Tue Oct 13 18:34:24 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 09D94A12A70; Tue, 13 Oct 2015 18:34:24 +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 D4F011C97; Tue, 13 Oct 2015 18:34:23 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t9DIYMQJ021871; Tue, 13 Oct 2015 18:34:22 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9DIYMeR021866; Tue, 13 Oct 2015 18:34:22 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201510131834.t9DIYMeR021866@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Tue, 13 Oct 2015 18:34: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: r289243 - stable/9/gnu/usr.bin/binutils/ld 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 " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Oct 2015 18:34:24 -0000 Author: bdrewery Date: Tue Oct 13 18:34:22 2015 New Revision: 289243 URL: https://svnweb.freebsd.org/changeset/base/289243 Log: MFC r288230,r288233: r288230: Fix emulation ldscripts not being installed since r131832. r288233: Fix subdir -j build after r287983 by adding missing dependencies. Modified: stable/9/gnu/usr.bin/binutils/ld/Makefile stable/9/gnu/usr.bin/binutils/ld/Makefile.amd64 stable/9/gnu/usr.bin/binutils/ld/Makefile.mips stable/9/gnu/usr.bin/binutils/ld/Makefile.powerpc64 stable/9/gnu/usr.bin/binutils/ld/Makefile.sparc64 Directory Properties: stable/9/gnu/usr.bin/binutils/ (props changed) Modified: stable/9/gnu/usr.bin/binutils/ld/Makefile ============================================================================== --- stable/9/gnu/usr.bin/binutils/ld/Makefile Tue Oct 13 18:32:47 2015 (r289242) +++ stable/9/gnu/usr.bin/binutils/ld/Makefile Tue Oct 13 18:34:22 2015 (r289243) @@ -1,5 +1,6 @@ # $FreeBSD$ +ELF_SCR_EXT= x xbn xc xd xdc xdw xn xr xs xsc xsw xu xw .include "../Makefile.inc0" .include @@ -46,9 +47,9 @@ CLEANFILES+= ldemul-list.h stringify.sed HOST= ${TARGET_TUPLE} LIBSEARCHPATH= \"${TOOLS_PREFIX}/lib\":\"${TOOLS_PREFIX}/usr/lib\" -ELF_SCR_EXT= x xbn xc xd xdc xdw xn xr xs xsc xsw xu xw .for ext in ${ELF_SCR_EXT} LDSCRIPTS+= ${NATIVE_EMULATION}.${ext} +ldscripts/${NATIVE_EMULATION}.${ext}: e${NATIVE_EMULATION}.c .endfor EMXFR= Modified: stable/9/gnu/usr.bin/binutils/ld/Makefile.amd64 ============================================================================== --- stable/9/gnu/usr.bin/binutils/ld/Makefile.amd64 Tue Oct 13 18:32:47 2015 (r289242) +++ stable/9/gnu/usr.bin/binutils/ld/Makefile.amd64 Tue Oct 13 18:34:22 2015 (r289243) @@ -16,6 +16,7 @@ _i386_path= \"${TOOLS_PREFIX}/usr/lib32\ EMS+= ${X86_EMULATION} .for ext in ${ELF_SCR_EXT} LDSCRIPTS+= ${X86_EMULATION}.${ext} +ldscripts/${X86_EMULATION}.${ext}: e${X86_EMULATION}.c .endfor SRCS+= e${X86_EMULATION}.c Modified: stable/9/gnu/usr.bin/binutils/ld/Makefile.mips ============================================================================== --- stable/9/gnu/usr.bin/binutils/ld/Makefile.mips Tue Oct 13 18:32:47 2015 (r289242) +++ stable/9/gnu/usr.bin/binutils/ld/Makefile.mips Tue Oct 13 18:34:22 2015 (r289243) @@ -22,6 +22,7 @@ EMS+= ${abi} #.endif .for ext in ${ELF_SCR_EXT} LDSCRIPTS+= ${abi}.${ext} +ldscripts/${abi}.${ext}: e${abi}.c .endfor SRCS+= e${abi}.c CLEANFILES+= e${abi}.c Modified: stable/9/gnu/usr.bin/binutils/ld/Makefile.powerpc64 ============================================================================== --- stable/9/gnu/usr.bin/binutils/ld/Makefile.powerpc64 Tue Oct 13 18:32:47 2015 (r289242) +++ stable/9/gnu/usr.bin/binutils/ld/Makefile.powerpc64 Tue Oct 13 18:34:22 2015 (r289243) @@ -16,6 +16,7 @@ _ppc32_path= \"${TOOLS_PREFIX}/usr/lib32 EMS+= ${PPC32_EMULATION} .for ext in ${ELF_SCR_EXT} LDSCRIPTS+= ${PPC32_EMULATION}.${ext} +ldscripts/${PPC32_EMULATION}.${ext}: e${PPC32_EMULATION}.c .endfor SRCS+= e${PPC32_EMULATION}.c Modified: stable/9/gnu/usr.bin/binutils/ld/Makefile.sparc64 ============================================================================== --- stable/9/gnu/usr.bin/binutils/ld/Makefile.sparc64 Tue Oct 13 18:32:47 2015 (r289242) +++ stable/9/gnu/usr.bin/binutils/ld/Makefile.sparc64 Tue Oct 13 18:34:22 2015 (r289243) @@ -17,6 +17,7 @@ e${NATIVE_EMULATION}.c: emulparams/${NAT EMS+= elf${BITS}_sparc .for ext in ${ELF_SCR_EXT} LDSCRIPTS+= elf${BITS}_sparc.${ext} +ldscripts/elf${BITS}_sparc.${ext}: eelf${BITS}_sparc.c .endfor SRCS+= eelf${BITS}_sparc.c From owner-svn-src-all@freebsd.org Tue Oct 13 18:35:00 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1A732A12AC9; Tue, 13 Oct 2015 18:35:00 +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 C9D611F78; Tue, 13 Oct 2015 18:34: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 t9DIYwBw021938; Tue, 13 Oct 2015 18:34:58 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9DIYwTB021937; Tue, 13 Oct 2015 18:34:58 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201510131834.t9DIYwTB021937@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Tue, 13 Oct 2015 18:34:58 +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: r289244 - stable/9/gnu/usr.bin/binutils/ld 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 " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Oct 2015 18:35:00 -0000 Author: bdrewery Date: Tue Oct 13 18:34:58 2015 New Revision: 289244 URL: https://svnweb.freebsd.org/changeset/base/289244 Log: MFC r287983,r288075: r287983: Replace afterinstall: hack with FILES mechanism. r288075: Use SHAREOWN/SHAREMODE/SHAREGRP rather than LIB* as these are plain ASCII scripts that the linker can load rather than binary library objects. Modified: stable/9/gnu/usr.bin/binutils/ld/Makefile Directory Properties: stable/9/gnu/usr.bin/binutils/ (props changed) Modified: stable/9/gnu/usr.bin/binutils/ld/Makefile ============================================================================== --- stable/9/gnu/usr.bin/binutils/ld/Makefile Tue Oct 13 18:34:22 2015 (r289243) +++ stable/9/gnu/usr.bin/binutils/ld/Makefile Tue Oct 13 18:34:58 2015 (r289244) @@ -45,6 +45,9 @@ LDADD= ${DPADD} CLEANDIRS+= ldscripts CLEANFILES+= ldemul-list.h stringify.sed +FILES= ${LDSCRIPTS:S|^|ldscripts/|} +FILESDIR= ${SCRIPTDIR} + HOST= ${TARGET_TUPLE} LIBSEARCHPATH= \"${TOOLS_PREFIX}/lib\":\"${TOOLS_PREFIX}/usr/lib\" .for ext in ${ELF_SCR_EXT} @@ -66,8 +69,4 @@ ldemul-list.h: stringify.sed: ln -sf ${SRCDIR}/ld/emultempl/astring.sed ${.TARGET} -afterinstall: - ${INSTALL} -o ${LIBOWN} -g ${LIBGRP} -m ${LIBMODE} \ - ${LDSCRIPTS:S|^|ldscripts/|} ${DESTDIR}${SCRIPTDIR} - .include From owner-svn-src-all@freebsd.org Tue Oct 13 18:40:47 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id ADF5DA12D6E; Tue, 13 Oct 2015 18:40:47 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 251AA65A; Tue, 13 Oct 2015 18:40:47 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t9DIekfL022361; Tue, 13 Oct 2015 18:40:46 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9DIekO8022360; Tue, 13 Oct 2015 18:40:46 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201510131840.t9DIekO8022360@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Tue, 13 Oct 2015 18:40:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r289245 - in stable/10/sbin/ipf: . iptest rules 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 " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Oct 2015 18:40:47 -0000 Author: bdrewery Date: Tue Oct 13 18:40:46 2015 New Revision: 289245 URL: https://svnweb.freebsd.org/changeset/base/289245 Log: MFC r288248: Remove disconnected directories. Deleted: stable/10/sbin/ipf/iptest/ stable/10/sbin/ipf/rules/ Modified: stable/10/sbin/ipf/Makefile Directory Properties: stable/10/ (props changed) Modified: stable/10/sbin/ipf/Makefile ============================================================================== --- stable/10/sbin/ipf/Makefile Tue Oct 13 18:34:58 2015 (r289244) +++ stable/10/sbin/ipf/Makefile Tue Oct 13 18:40:46 2015 (r289245) @@ -1,8 +1,6 @@ # $FreeBSD$ -#.WAIT SUBDIR= libipf SUBDIR+= ipf ipfs ipfstat ipftest ipmon ipnat ippool ipresend -#SUBDIR+= ipsend iptest rules .include From owner-svn-src-all@freebsd.org Tue Oct 13 18:42:45 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7A608A12E37; Tue, 13 Oct 2015 18:42:45 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 41263AE7; Tue, 13 Oct 2015 18:42:45 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t9DIgiAU025137; Tue, 13 Oct 2015 18:42:44 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9DIgiPC025136; Tue, 13 Oct 2015 18:42:44 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201510131842.t9DIgiPC025136@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Tue, 13 Oct 2015 18:42: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: r289246 - in stable/9/sbin/ipf: . iptest rules 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 " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Oct 2015 18:42:45 -0000 Author: bdrewery Date: Tue Oct 13 18:42:44 2015 New Revision: 289246 URL: https://svnweb.freebsd.org/changeset/base/289246 Log: MFC r288248: Remove disconnected directories. Deleted: stable/9/sbin/ipf/iptest/ stable/9/sbin/ipf/rules/ Modified: stable/9/sbin/ipf/Makefile Directory Properties: stable/9/sbin/ipf/ (props changed) Modified: stable/9/sbin/ipf/Makefile ============================================================================== --- stable/9/sbin/ipf/Makefile Tue Oct 13 18:40:46 2015 (r289245) +++ stable/9/sbin/ipf/Makefile Tue Oct 13 18:42:44 2015 (r289246) @@ -1,8 +1,6 @@ # $FreeBSD$ -#.WAIT SUBDIR= libipf SUBDIR+= ipf ipfs ipfstat ipftest ipmon ipnat ippool ipresend -#SUBDIR+= ipsend iptest rules .include From owner-svn-src-all@freebsd.org Tue Oct 13 18:43:51 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3D018A12E96; Tue, 13 Oct 2015 18:43:51 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 088DDC47; Tue, 13 Oct 2015 18:43:50 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t9DIhoWT025217; Tue, 13 Oct 2015 18:43:50 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9DIhob4025216; Tue, 13 Oct 2015 18:43:50 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201510131843.t9DIhob4025216@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Tue, 13 Oct 2015 18:43: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: r289247 - stable/10/sbin/ipf 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 " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Oct 2015 18:43:51 -0000 Author: bdrewery Date: Tue Oct 13 18:43:49 2015 New Revision: 289247 URL: https://svnweb.freebsd.org/changeset/base/289247 Log: MFC r288249: Add SUBDIR_PARALLEL. Modified: stable/10/sbin/ipf/Makefile Directory Properties: stable/10/ (props changed) Modified: stable/10/sbin/ipf/Makefile ============================================================================== --- stable/10/sbin/ipf/Makefile Tue Oct 13 18:42:44 2015 (r289246) +++ stable/10/sbin/ipf/Makefile Tue Oct 13 18:43:49 2015 (r289247) @@ -1,6 +1,7 @@ # $FreeBSD$ -SUBDIR= libipf +SUBDIR= libipf .WAIT SUBDIR+= ipf ipfs ipfstat ipftest ipmon ipnat ippool ipresend +SUBDIR_PARALLEL= .include From owner-svn-src-all@freebsd.org Tue Oct 13 18:44:56 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A8D8EA12EF5; Tue, 13 Oct 2015 18:44: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 767ADDA6; Tue, 13 Oct 2015 18:44: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 t9DIit8H025312; Tue, 13 Oct 2015 18:44:55 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9DIit8E025311; Tue, 13 Oct 2015 18:44:55 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201510131844.t9DIit8E025311@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Tue, 13 Oct 2015 18:44: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: r289248 - stable/10 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 " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Oct 2015 18:44:56 -0000 Author: bdrewery Date: Tue Oct 13 18:44:55 2015 New Revision: 289248 URL: https://svnweb.freebsd.org/changeset/base/289248 Log: MFC r288391: Fix the .MAKE added in r251750 to properly support the historical -n -n. Modified: stable/10/Makefile Directory Properties: stable/10/ (props changed) Modified: stable/10/Makefile ============================================================================== --- stable/10/Makefile Tue Oct 13 18:43:49 2015 (r289247) +++ stable/10/Makefile Tue Oct 13 18:44:55 2015 (r289248) @@ -245,9 +245,9 @@ cleanworld: # Handle the user-driven targets, using the source relative mk files. # -.if empty(.MAKEFLAGS:M-n) +.if !(!empty(.MAKEFLAGS:M-n) && ${.MAKEFLAGS:M-n} == "-n") # skip this for -n to avoid changing previous behavior of -# 'make -n buildworld' etc. +# 'make -n buildworld' etc. Using -n -n will run it. ${TGTS}: .MAKE tinderbox toolchains kernel-toolchains: .MAKE .endif From owner-svn-src-all@freebsd.org Tue Oct 13 18:46:13 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 27C3FA12FA1; Tue, 13 Oct 2015 18:46:13 +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 E10AEF02; Tue, 13 Oct 2015 18:46:12 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t9DIkBLL025404; Tue, 13 Oct 2015 18:46:11 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9DIkB1U025403; Tue, 13 Oct 2015 18:46:11 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201510131846.t9DIkB1U025403@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Tue, 13 Oct 2015 18:46: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: r289249 - stable/10/etc/rc.d X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Oct 2015 18:46:13 -0000 Author: bdrewery Date: Tue Oct 13 18:46:11 2015 New Revision: 289249 URL: https://svnweb.freebsd.org/changeset/base/289249 Log: MFC r288390: When stopping ugidfw, it is not enough to just try unloading the module. If the module is built-in to the kernel then the kldunload will fail. Rather than do this just check if there are rules and then remove them all. Relnotes: yes Modified: stable/10/etc/rc.d/ugidfw Directory Properties: stable/10/ (props changed) Modified: stable/10/etc/rc.d/ugidfw ============================================================================== --- stable/10/etc/rc.d/ugidfw Tue Oct 13 18:44:55 2015 (r289248) +++ stable/10/etc/rc.d/ugidfw Tue Oct 13 18:46:11 2015 (r289249) @@ -3,6 +3,7 @@ # $FreeBSD$ # PROVIDE: ugidfw +# REQUIRE: FILESYSTEMS # BEFORE: LOGIN # KEYWORD: nojail shutdown @@ -33,9 +34,17 @@ ugidfw_start() ugidfw_stop() { + local rulecount + # Disable the policy # - kldunload mac_bsdextended + # Check for the existence of rules and flush them if needed. + rulecount=$(sysctl -in security.mac.bsdextended.rule_count) + if [ ${rulecount:-0} -gt 0 ]; then + ugidfw list | sed -n '2,$p' | cut -d ' ' -f 1 | sort -r -n | + xargs -n 1 ugidfw remove + echo "MAC bsdextended rules flushed." + fi } load_rc_config $name From owner-svn-src-all@freebsd.org Tue Oct 13 18:47:06 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D994BA12069; Tue, 13 Oct 2015 18:47:06 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A4E0E10F6; Tue, 13 Oct 2015 18:47:06 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t9DIl5pi025480; Tue, 13 Oct 2015 18:47:05 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9DIl5aI025479; Tue, 13 Oct 2015 18:47:05 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201510131847.t9DIl5aI025479@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Tue, 13 Oct 2015 18:47:05 +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: r289250 - stable/9/etc/rc.d 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 " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Oct 2015 18:47:07 -0000 Author: bdrewery Date: Tue Oct 13 18:47:05 2015 New Revision: 289250 URL: https://svnweb.freebsd.org/changeset/base/289250 Log: MFC r288390: When stopping ugidfw, it is not enough to just try unloading the module. If the module is built-in to the kernel then the kldunload will fail. Rather than do this just check if there are rules and then remove them all. Relnotes: yes Modified: stable/9/etc/rc.d/ugidfw Directory Properties: stable/9/etc/ (props changed) stable/9/etc/rc.d/ (props changed) Modified: stable/9/etc/rc.d/ugidfw ============================================================================== --- stable/9/etc/rc.d/ugidfw Tue Oct 13 18:46:11 2015 (r289249) +++ stable/9/etc/rc.d/ugidfw Tue Oct 13 18:47:05 2015 (r289250) @@ -3,6 +3,7 @@ # $FreeBSD$ # PROVIDE: ugidfw +# REQUIRE: FILESYSTEMS # BEFORE: LOGIN # KEYWORD: nojail shutdown @@ -33,9 +34,17 @@ ugidfw_start() ugidfw_stop() { + local rulecount + # Disable the policy # - kldunload mac_bsdextended + # Check for the existence of rules and flush them if needed. + rulecount=$(sysctl -in security.mac.bsdextended.rule_count) + if [ ${rulecount:-0} -gt 0 ]; then + ugidfw list | sed -n '2,$p' | cut -d ' ' -f 1 | sort -r -n | + xargs -n 1 ugidfw remove + echo "MAC bsdextended rules flushed." + fi } load_rc_config $name From owner-svn-src-all@freebsd.org Tue Oct 13 18:52:57 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B75B2A122D4; Tue, 13 Oct 2015 18:52:57 +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 7A8131785; Tue, 13 Oct 2015 18:52:57 +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 t9DIquMb028239; Tue, 13 Oct 2015 18:52:56 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9DIquZc028238; Tue, 13 Oct 2015 18:52:56 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201510131852.t9DIquZc028238@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Tue, 13 Oct 2015 18:52:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289251 - head/kerberos5/lib X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Oct 2015 18:52:57 -0000 Author: bdrewery Date: Tue Oct 13 18:52:56 2015 New Revision: 289251 URL: https://svnweb.freebsd.org/changeset/base/289251 Log: Partially revert r288266: Remove SUBDIR_PARALLEL from kerberos5/lib. I intended to remove this before committing r288266. It works but is clearly wrong and working by accident due to the dependencies listed in the root Makefile.inc1 file. Modified: head/kerberos5/lib/Makefile Modified: head/kerberos5/lib/Makefile ============================================================================== --- head/kerberos5/lib/Makefile Tue Oct 13 18:47:05 2015 (r289250) +++ head/kerberos5/lib/Makefile Tue Oct 13 18:52:56 2015 (r289251) @@ -7,6 +7,5 @@ SUBDIR= libasn1 libgssapi_krb5 libgssapi SUBDIR+= libkafs5 # requires krb_err.h from libkrb5 SUBDIR_DEPEND_libkafs5= libkrb5 -SUBDIR_PARALLEL= .include From owner-svn-src-all@freebsd.org Tue Oct 13 18:56:53 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3CEFFA123E5; Tue, 13 Oct 2015 18:56:53 +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 EB4AB1986; Tue, 13 Oct 2015 18:56:52 +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 t9DIupSH028432; Tue, 13 Oct 2015 18:56:51 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9DIuoM3028418; Tue, 13 Oct 2015 18:56:50 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201510131856.t9DIuoM3028418@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Tue, 13 Oct 2015 18: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: r289252 - in stable/10: kerberos5 kerberos5/lib kerberos5/libexec kerberos5/tools kerberos5/usr.bin kerberos5/usr.sbin usr.bin/svn usr.sbin/amd usr.sbin/bsdinstall usr.sbin/fifolog usr.... 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 " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Oct 2015 18:56:53 -0000 Author: bdrewery Date: Tue Oct 13 18:56:50 2015 New Revision: 289252 URL: https://svnweb.freebsd.org/changeset/base/289252 Log: MFC r288266: Add more SUBDIR_PARALLEL. Modified: stable/10/kerberos5/Makefile stable/10/kerberos5/lib/Makefile stable/10/kerberos5/libexec/Makefile stable/10/kerberos5/tools/Makefile stable/10/kerberos5/usr.bin/Makefile stable/10/kerberos5/usr.sbin/Makefile stable/10/usr.bin/svn/Makefile stable/10/usr.sbin/amd/Makefile stable/10/usr.sbin/bsdinstall/Makefile stable/10/usr.sbin/fifolog/Makefile stable/10/usr.sbin/lpr/Makefile stable/10/usr.sbin/pc-sysinstall/Makefile stable/10/usr.sbin/unbound/Makefile stable/10/usr.sbin/wpa/Makefile Directory Properties: stable/10/ (props changed) Modified: stable/10/kerberos5/Makefile ============================================================================== --- stable/10/kerberos5/Makefile Tue Oct 13 18:52:56 2015 (r289251) +++ stable/10/kerberos5/Makefile Tue Oct 13 18:56:50 2015 (r289252) @@ -1,6 +1,8 @@ # $FreeBSD$ -SUBDIR= doc lib libexec tools usr.bin usr.sbin +SUBDIR= lib .WAIT \ + doc libexec tools usr.bin usr.sbin +SUBDIR_PARALLEL= # These are the programs which depend on Kerberos. KPROGS= lib/libpam \ Modified: stable/10/kerberos5/lib/Makefile ============================================================================== --- stable/10/kerberos5/lib/Makefile Tue Oct 13 18:52:56 2015 (r289251) +++ stable/10/kerberos5/lib/Makefile Tue Oct 13 18:56:50 2015 (r289252) @@ -5,4 +5,6 @@ SUBDIR= libasn1 libgssapi_krb5 libgssapi libheimntlm libhx509 libkadm5clnt libkadm5srv libkafs5 libkrb5 \ libroken libsl libvers libkdc libwind libheimsqlite libheimbase libheimipcc libheimipcs +SUBDIR_DEPEND_libkafs5= libkrb5 + .include Modified: stable/10/kerberos5/libexec/Makefile ============================================================================== --- stable/10/kerberos5/libexec/Makefile Tue Oct 13 18:52:56 2015 (r289251) +++ stable/10/kerberos5/libexec/Makefile Tue Oct 13 18:56:50 2015 (r289252) @@ -2,5 +2,6 @@ SUBDIR= digest-service ipropd-master ipropd-slave hprop hpropd kadmind kdc \ kdigest kfd kimpersonate kpasswdd kcm +SUBDIR_PARALLEL= .include Modified: stable/10/kerberos5/tools/Makefile ============================================================================== --- stable/10/kerberos5/tools/Makefile Tue Oct 13 18:52:56 2015 (r289251) +++ stable/10/kerberos5/tools/Makefile Tue Oct 13 18:56:50 2015 (r289252) @@ -1,5 +1,6 @@ # $FreeBSD$ SUBDIR= make-roken asn1_compile slc +SUBDIR_PARALLEL= .include Modified: stable/10/kerberos5/usr.bin/Makefile ============================================================================== --- stable/10/kerberos5/usr.bin/Makefile Tue Oct 13 18:52:56 2015 (r289251) +++ stable/10/kerberos5/usr.bin/Makefile Tue Oct 13 18:56:50 2015 (r289252) @@ -2,5 +2,6 @@ SUBDIR= hxtool kadmin kcc kdestroy kgetcred kf kinit kpasswd krb5-config ksu \ string2key verify_krb5_conf +SUBDIR_PARALLEL= .include Modified: stable/10/kerberos5/usr.sbin/Makefile ============================================================================== --- stable/10/kerberos5/usr.sbin/Makefile Tue Oct 13 18:52:56 2015 (r289251) +++ stable/10/kerberos5/usr.sbin/Makefile Tue Oct 13 18:56:50 2015 (r289252) @@ -1,5 +1,6 @@ # $FreeBSD$ SUBDIR= iprop-log kstash ktutil +SUBDIR_PARALLEL= .include Modified: stable/10/usr.bin/svn/Makefile ============================================================================== --- stable/10/usr.bin/svn/Makefile Tue Oct 13 18:52:56 2015 (r289251) +++ stable/10/usr.bin/svn/Makefile Tue Oct 13 18:56:50 2015 (r289252) @@ -1,5 +1,8 @@ # $FreeBSD$ -SUBDIR = lib svn svnadmin svndumpfilter svnlook svnserve svnsync svnversion svnmucc svnrdump +SUBDIR = lib .WAIT \ + svn svnadmin svndumpfilter svnlook svnserve svnsync svnversion \ + svnmucc svnrdump +SUBDIR_PARALLEL= .include Modified: stable/10/usr.sbin/amd/Makefile ============================================================================== --- stable/10/usr.sbin/amd/Makefile Tue Oct 13 18:52:56 2015 (r289251) +++ stable/10/usr.sbin/amd/Makefile Tue Oct 13 18:56:50 2015 (r289252) @@ -5,7 +5,9 @@ # # $FreeBSD$ -SUBDIR= include libamu amd amq doc fixmount fsinfo hlfsd mk-amd-map pawd \ +SUBDIR= include libamu .WAIT \ + amd amq doc fixmount fsinfo hlfsd mk-amd-map pawd \ scripts wire-test +SUBDIR_PARALLEL= .include Modified: stable/10/usr.sbin/bsdinstall/Makefile ============================================================================== --- stable/10/usr.sbin/bsdinstall/Makefile Tue Oct 13 18:52:56 2015 (r289251) +++ stable/10/usr.sbin/bsdinstall/Makefile Tue Oct 13 18:56:50 2015 (r289252) @@ -1,6 +1,7 @@ # $FreeBSD$ SUBDIR= distextract distfetch partedit scripts +SUBDIR_PARALLEL= SCRIPTS= bsdinstall MAN= bsdinstall.8 Modified: stable/10/usr.sbin/fifolog/Makefile ============================================================================== --- stable/10/usr.sbin/fifolog/Makefile Tue Oct 13 18:52:56 2015 (r289251) +++ stable/10/usr.sbin/fifolog/Makefile Tue Oct 13 18:56:50 2015 (r289252) @@ -1,5 +1,7 @@ # $FreeBSD$ -SUBDIR= lib fifolog_create fifolog_writer fifolog_reader +SUBDIR= lib .WAIT \ + fifolog_create fifolog_writer fifolog_reader +SUBDIR_PARALLEL= .include Modified: stable/10/usr.sbin/lpr/Makefile ============================================================================== --- stable/10/usr.sbin/lpr/Makefile Tue Oct 13 18:52:56 2015 (r289251) +++ stable/10/usr.sbin/lpr/Makefile Tue Oct 13 18:56:50 2015 (r289252) @@ -1,7 +1,9 @@ # $FreeBSD$ -SUBDIR= common_source chkprintcap lp lpc lpd lpq lpr lprm lptest pac \ +SUBDIR= common_source .WAIT \ + chkprintcap lp lpc lpd lpq lpr lprm lptest pac \ filters filters.ru +SUBDIR_PARALLEL= # Questions/ideas for lpr & friends could also be sent to: # freebsd-print@bostonradio.org Modified: stable/10/usr.sbin/pc-sysinstall/Makefile ============================================================================== --- stable/10/usr.sbin/pc-sysinstall/Makefile Tue Oct 13 18:52:56 2015 (r289251) +++ stable/10/usr.sbin/pc-sysinstall/Makefile Tue Oct 13 18:56:50 2015 (r289252) @@ -1,5 +1,6 @@ # $FreeBSD$ SUBDIR=backend backend-partmanager backend-query conf doc examples SUBDIR+=pc-sysinstall +SUBDIR_PARALLEL= .include Modified: stable/10/usr.sbin/unbound/Makefile ============================================================================== --- stable/10/usr.sbin/unbound/Makefile Tue Oct 13 18:52:56 2015 (r289251) +++ stable/10/usr.sbin/unbound/Makefile Tue Oct 13 18:56:50 2015 (r289252) @@ -2,5 +2,6 @@ SUBDIR= daemon anchor checkconf control SUBDIR+= local-setup +SUBDIR_PARALLEL= .include Modified: stable/10/usr.sbin/wpa/Makefile ============================================================================== --- stable/10/usr.sbin/wpa/Makefile Tue Oct 13 18:52:56 2015 (r289251) +++ stable/10/usr.sbin/wpa/Makefile Tue Oct 13 18:56:50 2015 (r289252) @@ -3,5 +3,6 @@ SUBDIR= wpa_supplicant wpa_cli wpa_passphrase SUBDIR+= hostapd hostapd_cli SUBDIR+= ndis_events +SUBDIR_PARALLEL= .include From owner-svn-src-all@freebsd.org Tue Oct 13 19:11:23 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 909DDA12A0C; Tue, 13 Oct 2015 19:11:23 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 56A0C33D; Tue, 13 Oct 2015 19:11:23 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t9DJBMiH034026; Tue, 13 Oct 2015 19:11:22 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9DJBMTc034025; Tue, 13 Oct 2015 19:11:22 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201510131911.t9DJBMTc034025@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Tue, 13 Oct 2015 19:11:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289253 - 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 " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Oct 2015 19:11:23 -0000 Author: bdrewery Date: Tue Oct 13 19:11:22 2015 New Revision: 289253 URL: https://svnweb.freebsd.org/changeset/base/289253 Log: bsd.subdir.mk: Handle cleanobj. Before this, the target was unknown. Now it will recurse on subdirs and run the target in the current directory. It is required to recurse as there may be subdirs that have objs in their directory or in the object directory, so it is not enough to just delete the objdir of the subdir parent. MFC after: 2 weeks 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 Oct 13 18:56:50 2015 (r289252) +++ head/share/mk/bsd.subdir.mk Tue Oct 13 19:11:22 2015 (r289253) @@ -86,7 +86,7 @@ ${SUBDIR:N.WAIT}: .PHONY .MAKE # Work around parsing of .if nested in .for by putting .WAIT string into a var. __wait= .WAIT .for __target in all all-man checkdpadd clean cleandepend cleandir \ - cleanilinks depend distribute lint maninstall manlint obj objlink \ + cleanilinks cleanobj depend distribute lint maninstall manlint obj objlink \ realinstall regress tags ${SUBDIR_TARGETS} .ifdef SUBDIR_PARALLEL __subdir_targets= From owner-svn-src-all@freebsd.org Tue Oct 13 19:42:59 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1FCADA1238D; Tue, 13 Oct 2015 19:42: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 BAE1F189B; Tue, 13 Oct 2015 19:42:58 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t9DJgvBd043007; Tue, 13 Oct 2015 19:42:57 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9DJgvZY043006; Tue, 13 Oct 2015 19:42:57 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201510131942.t9DJgvZY043006@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Tue, 13 Oct 2015 19:42:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289254 - 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 " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Oct 2015 19:42:59 -0000 Author: bdrewery Date: Tue Oct 13 19:42:57 2015 New Revision: 289254 URL: https://svnweb.freebsd.org/changeset/base/289254 Log: bsd.subdir.mk: Move all of the targets into ALL_SUBDIR_TARGETS. Also improve documentation. The SUBDIR_TARGETS variable should really be named LOCAL_SUBDIR_TARGETS, but renaming it may be a surprise for downstream vendors who use this variable. MFC after: 2 weeks 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 Oct 13 19:11:22 2015 (r289253) +++ head/share/mk/bsd.subdir.mk Tue Oct 13 19:42:57 2015 (r289254) @@ -25,14 +25,17 @@ # This is a variant of install, which will # put the stuff into the right "distribution". # -# afterinstall, all, all-man, beforeinstall, checkdpadd, clean, -# cleandepend, cleandir, cleanilinks depend, install, lint, -# maninstall, manlint, obj, objlink, realinstall, regress, tags +# See ALL_SUBDIR_TARGETS for list of targets that will recurse. +# Custom targets can be added to SUBDIR_TARGETS in src.conf. # .if !target(____) ____: +ALL_SUBDIR_TARGETS= all all-man checkdpadd clean cleandepend cleandir \ + cleanilinks cleanobj depend distribute lint maninstall manlint obj \ + objlink realinstall regress tags ${SUBDIR_TARGETS} + .include .if !defined(NEED_SUBDIR) @@ -85,9 +88,7 @@ ${SUBDIR:N.WAIT}: .PHONY .MAKE # Work around parsing of .if nested in .for by putting .WAIT string into a var. __wait= .WAIT -.for __target in all all-man checkdpadd clean cleandepend cleandir \ - cleanilinks cleanobj depend distribute lint maninstall manlint obj objlink \ - realinstall regress tags ${SUBDIR_TARGETS} +.for __target in ${ALL_SUBDIR_TARGETS} .ifdef SUBDIR_PARALLEL __subdir_targets= .for __dir in ${SUBDIR} From owner-svn-src-all@freebsd.org Tue Oct 13 19:44:26 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C9F50A12425; Tue, 13 Oct 2015 19:44:26 +0000 (UTC) (envelope-from cem@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A2A101C26; Tue, 13 Oct 2015 19:44:26 +0000 (UTC) (envelope-from cem@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t9DJiPdn043130; Tue, 13 Oct 2015 19:44:25 GMT (envelope-from cem@FreeBSD.org) Received: (from cem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9DJiP3o043127; Tue, 13 Oct 2015 19:44:25 GMT (envelope-from cem@FreeBSD.org) Message-Id: <201510131944.t9DJiP3o043127@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cem set sender to cem@FreeBSD.org using -f From: "Conrad E. Meyer" Date: Tue, 13 Oct 2015 19:44:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289255 - in head/sys/dev/ntb: if_ntb ntb_hw X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Oct 2015 19:44:26 -0000 Author: cem Date: Tue Oct 13 19:44:25 2015 New Revision: 289255 URL: https://svnweb.freebsd.org/changeset/base/289255 Log: NTB: MFV 49793889: Rename Variables for NTB-RP Many variable names in the NTB driver refer to the primary or secondary side. However, these variables will be used to access the reverse case when in NTB-RP mode. Make these names more generic in anticipation of NTB-RP support. Authored by: Jon Mason Obtained from: Linux Sponsored by: EMC / Isilon Storage Division Modified: head/sys/dev/ntb/if_ntb/if_ntb.c head/sys/dev/ntb/ntb_hw/ntb_hw.c head/sys/dev/ntb/ntb_hw/ntb_hw.h Modified: head/sys/dev/ntb/if_ntb/if_ntb.c ============================================================================== --- head/sys/dev/ntb/if_ntb/if_ntb.c Tue Oct 13 19:42:57 2015 (r289254) +++ head/sys/dev/ntb/if_ntb/if_ntb.c Tue Oct 13 19:44:25 2015 (r289255) @@ -809,7 +809,7 @@ ntb_tx_copy_task(struct ntb_transport_qp /* TODO: replace with bus_space_write */ hdr->flags = entry->flags | IF_NTB_DESC_DONE_FLAG; - ntb_ring_sdb(qp->ntb, qp->qp_num); + ntb_ring_doorbell(qp->ntb, qp->qp_num); /* * The entry length can only be zero if the packet is intended to be a Modified: head/sys/dev/ntb/ntb_hw/ntb_hw.c ============================================================================== --- head/sys/dev/ntb/ntb_hw/ntb_hw.c Tue Oct 13 19:42:57 2015 (r289254) +++ head/sys/dev/ntb/ntb_hw/ntb_hw.c Tue Oct 13 19:44:25 2015 (r289255) @@ -133,11 +133,11 @@ struct ntb_softc { uint8_t msix_cnt; } limits; struct { - uint32_t pdb; - uint32_t pdb_mask; - uint32_t sdb; - uint32_t sbar2_xlat; - uint32_t sbar4_xlat; + uint32_t ldb; + uint32_t ldb_mask; + uint32_t rdb; + uint32_t bar2_xlat; + uint32_t bar4_xlat; uint32_t spad_remote; uint32_t spad_local; uint32_t lnk_cntl; @@ -476,9 +476,9 @@ ntb_setup_interrupts(struct ntb_softc *n * Interrupt. The rest will be unmasked as callbacks are registered. */ if (ntb->type == NTB_SOC) - ntb_reg_write(8, ntb->reg_ofs.pdb_mask, ~0); + ntb_reg_write(8, ntb->reg_ofs.ldb_mask, ~0); else - ntb_reg_write(2, ntb->reg_ofs.pdb_mask, + ntb_reg_write(2, ntb->reg_ofs.ldb_mask, ~(1 << ntb->limits.max_db_bits)); num_vectors = MIN(pci_msix_count(ntb->device), @@ -578,7 +578,7 @@ handle_soc_irq(void *arg) struct ntb_db_cb *db_cb = arg; struct ntb_softc *ntb = db_cb->ntb; - ntb_reg_write(8, ntb->reg_ofs.pdb, (uint64_t) 1 << db_cb->db_num); + ntb_reg_write(8, ntb->reg_ofs.ldb, (uint64_t) 1 << db_cb->db_num); if (db_cb->callback != NULL) db_cb->callback(db_cb->data, db_cb->db_num); @@ -596,7 +596,7 @@ handle_xeon_irq(void *arg) * vectors, with the 4th having a single bit for link * interrupts. */ - ntb_reg_write(2, ntb->reg_ofs.pdb, + ntb_reg_write(2, ntb->reg_ofs.ldb, ((1 << ntb->bits_per_vector) - 1) << (db_cb->db_num * ntb->bits_per_vector)); @@ -616,7 +616,7 @@ handle_xeon_event_irq(void *arg) device_printf(ntb->device, "Error determining link status\n"); /* bit 15 is always the link bit */ - ntb_reg_write(2, ntb->reg_ofs.pdb, 1 << ntb->limits.max_db_bits); + ntb_reg_write(2, ntb->reg_ofs.ldb, 1 << ntb->limits.max_db_bits); } static void @@ -624,28 +624,28 @@ ntb_handle_legacy_interrupt(void *arg) { struct ntb_softc *ntb = arg; unsigned int i = 0; - uint64_t pdb64; - uint16_t pdb16; + uint64_t ldb64; + uint16_t ldb16; if (ntb->type == NTB_SOC) { - pdb64 = ntb_reg_read(8, ntb->reg_ofs.pdb); + ldb64 = ntb_reg_read(8, ntb->reg_ofs.ldb); - while (pdb64) { - i = ffs(pdb64); - pdb64 &= pdb64 - 1; + while (ldb64) { + i = ffs(ldb64); + ldb64 &= ldb64 - 1; handle_soc_irq(&ntb->db_cb[i]); } } else { - pdb16 = ntb_reg_read(2, ntb->reg_ofs.pdb); + ldb16 = ntb_reg_read(2, ntb->reg_ofs.ldb); - if ((pdb16 & XEON_DB_HW_LINK) != 0) { + if ((ldb16 & XEON_DB_HW_LINK) != 0) { handle_xeon_event_irq(ntb); - pdb16 &= ~XEON_DB_HW_LINK; + ldb16 &= ~XEON_DB_HW_LINK; } - while (pdb16 != 0) { - i = ffs(pdb16); - pdb16 &= pdb16 - 1; + while (ldb16 != 0) { + i = ffs(ldb16); + ldb16 &= ldb16 - 1; handle_xeon_irq(&ntb->db_cb[i]); } } @@ -726,10 +726,10 @@ ntb_setup_xeon(struct ntb_softc *ntb) else ntb->dev_type = NTB_DEV_DSD; - ntb->reg_ofs.pdb = XEON_PDOORBELL_OFFSET; - ntb->reg_ofs.pdb_mask = XEON_PDBMSK_OFFSET; - ntb->reg_ofs.sbar2_xlat = XEON_SBAR2XLAT_OFFSET; - ntb->reg_ofs.sbar4_xlat = XEON_SBAR4XLAT_OFFSET; + ntb->reg_ofs.ldb = XEON_PDOORBELL_OFFSET; + ntb->reg_ofs.ldb_mask = XEON_PDBMSK_OFFSET; + ntb->reg_ofs.bar2_xlat = XEON_SBAR2XLAT_OFFSET; + ntb->reg_ofs.bar4_xlat = XEON_SBAR4XLAT_OFFSET; ntb->reg_ofs.lnk_cntl = XEON_NTBCNTL_OFFSET; ntb->reg_ofs.lnk_stat = XEON_LINK_STATUS_OFFSET; ntb->reg_ofs.spad_local = XEON_SPAD_OFFSET; @@ -758,16 +758,16 @@ ntb_setup_xeon(struct ntb_softc *ntb) if (ntb->conn_type == NTB_CONN_B2B) { - ntb->reg_ofs.sdb = XEON_B2B_DOORBELL_OFFSET; + ntb->reg_ofs.rdb = XEON_B2B_DOORBELL_OFFSET; ntb->reg_ofs.spad_remote = XEON_B2B_SPAD_OFFSET; ntb->limits.max_spads = XEON_MAX_SPADS; } else { - ntb->reg_ofs.sdb = XEON_SDOORBELL_OFFSET; + ntb->reg_ofs.rdb = XEON_SDOORBELL_OFFSET; ntb->reg_ofs.spad_remote = XEON_SPAD_OFFSET; ntb->limits.max_spads = XEON_MAX_COMPAT_SPADS; } - ntb->limits.max_db_bits = XEON_MAX_DB_BITS; + ntb->limits.max_db_bits = XEON_MAX_DB_BITS; ntb->limits.msix_cnt = XEON_MSIX_CNT; ntb->bits_per_vector = XEON_DB_BITS_PER_VEC; @@ -812,26 +812,26 @@ ntb_setup_soc(struct ntb_softc *ntb) pci_write_config(ntb->device, NTB_PPD_OFFSET, val | SOC_PPD_INIT_LINK, 4); - ntb->reg_ofs.pdb = SOC_PDOORBELL_OFFSET; - ntb->reg_ofs.pdb_mask = SOC_PDBMSK_OFFSET; - ntb->reg_ofs.sbar2_xlat = SOC_SBAR2XLAT_OFFSET; - ntb->reg_ofs.sbar4_xlat = SOC_SBAR4XLAT_OFFSET; + ntb->reg_ofs.ldb = SOC_PDOORBELL_OFFSET; + ntb->reg_ofs.ldb_mask = SOC_PDBMSK_OFFSET; + ntb->reg_ofs.bar2_xlat = SOC_SBAR2XLAT_OFFSET; + ntb->reg_ofs.bar4_xlat = SOC_SBAR4XLAT_OFFSET; ntb->reg_ofs.lnk_cntl = SOC_NTBCNTL_OFFSET; ntb->reg_ofs.lnk_stat = SOC_LINK_STATUS_OFFSET; ntb->reg_ofs.spad_local = SOC_SPAD_OFFSET; ntb->reg_ofs.spci_cmd = SOC_PCICMD_OFFSET; if (ntb->conn_type == NTB_CONN_B2B) { - ntb->reg_ofs.sdb = SOC_B2B_DOORBELL_OFFSET; + ntb->reg_ofs.rdb = SOC_B2B_DOORBELL_OFFSET; ntb->reg_ofs.spad_remote = SOC_B2B_SPAD_OFFSET; ntb->limits.max_spads = SOC_MAX_SPADS; } else { - ntb->reg_ofs.sdb = SOC_PDOORBELL_OFFSET; + ntb->reg_ofs.rdb = SOC_PDOORBELL_OFFSET; ntb->reg_ofs.spad_remote = SOC_SPAD_OFFSET; ntb->limits.max_spads = SOC_MAX_COMPAT_SPADS; } - ntb->limits.max_db_bits = SOC_MAX_DB_BITS; + ntb->limits.max_db_bits = SOC_MAX_DB_BITS; ntb->limits.msix_cnt = SOC_MSIX_CNT; ntb->bits_per_vector = SOC_DB_BITS_PER_VEC; @@ -1156,9 +1156,9 @@ ntb_register_db_callback(struct ntb_soft ntb->db_cb[idx].data = data; /* unmask interrupt */ - mask = ntb_reg_read(2, ntb->reg_ofs.pdb_mask); + mask = ntb_reg_read(2, ntb->reg_ofs.ldb_mask); mask &= ~(1 << (idx * ntb->bits_per_vector)); - ntb_reg_write(2, ntb->reg_ofs.pdb_mask, mask); + ntb_reg_write(2, ntb->reg_ofs.ldb_mask, mask); return (0); } @@ -1179,9 +1179,9 @@ ntb_unregister_db_callback(struct ntb_so if (idx >= ntb->allocated_interrupts || !ntb->db_cb[idx].callback) return; - mask = ntb_reg_read(2, ntb->reg_ofs.pdb_mask); + mask = ntb_reg_read(2, ntb->reg_ofs.ldb_mask); mask |= 1 << (idx * ntb->bits_per_vector); - ntb_reg_write(2, ntb->reg_ofs.pdb_mask, mask); + ntb_reg_write(2, ntb->reg_ofs.ldb_mask, mask); ntb->db_cb[idx].callback = NULL; } @@ -1430,16 +1430,16 @@ ntb_set_mw_addr(struct ntb_softc *ntb, u switch (NTB_MW_TO_BAR(mw)) { case NTB_B2B_BAR_1: - ntb_reg_write(8, ntb->reg_ofs.sbar2_xlat, addr); + ntb_reg_write(8, ntb->reg_ofs.bar2_xlat, addr); break; case NTB_B2B_BAR_2: - ntb_reg_write(8, ntb->reg_ofs.sbar4_xlat, addr); + ntb_reg_write(8, ntb->reg_ofs.bar4_xlat, addr); break; } } /** - * ntb_ring_sdb() - Set the doorbell on the secondary/external side + * ntb_ring_doorbell() - Set the doorbell on the secondary/external side * @ntb: pointer to ntb_softc instance * @db: doorbell to ring * @@ -1449,18 +1449,18 @@ ntb_set_mw_addr(struct ntb_softc *ntb, u * RETURNS: An appropriate ERRNO error value on error, or zero for success. */ void -ntb_ring_sdb(struct ntb_softc *ntb, unsigned int db) +ntb_ring_doorbell(struct ntb_softc *ntb, unsigned int db) { if (ntb->type == NTB_SOC) - ntb_reg_write(8, ntb->reg_ofs.sdb, (uint64_t) 1 << db); + ntb_reg_write(8, ntb->reg_ofs.rdb, (uint64_t) 1 << db); else { if (HAS_FEATURE(NTB_REGS_THRU_MW)) ntb_mw_write(2, XEON_SHADOW_PDOORBELL_OFFSET, ((1 << ntb->bits_per_vector) - 1) << (db * ntb->bits_per_vector)); else - ntb_reg_write(2, ntb->reg_ofs.sdb, + ntb_reg_write(2, ntb->reg_ofs.rdb, ((1 << ntb->bits_per_vector) - 1) << (db * ntb->bits_per_vector)); } Modified: head/sys/dev/ntb/ntb_hw/ntb_hw.h ============================================================================== --- head/sys/dev/ntb/ntb_hw/ntb_hw.h Tue Oct 13 19:42:57 2015 (r289254) +++ head/sys/dev/ntb/ntb_hw/ntb_hw.h Tue Oct 13 19:44:25 2015 (r289255) @@ -69,7 +69,7 @@ void *ntb_get_mw_vbase(struct ntb_softc vm_paddr_t ntb_get_mw_pbase(struct ntb_softc *ntb, unsigned int mw); u_long ntb_get_mw_size(struct ntb_softc *ntb, unsigned int mw); void ntb_set_mw_addr(struct ntb_softc *ntb, unsigned int mw, uint64_t addr); -void ntb_ring_sdb(struct ntb_softc *ntb, unsigned int db); +void ntb_ring_doorbell(struct ntb_softc *ntb, unsigned int db); bool ntb_query_link_status(struct ntb_softc *ntb); device_t ntb_get_device(struct ntb_softc *ntb); From owner-svn-src-all@freebsd.org Tue Oct 13 19:45:30 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B9A61A124B4; Tue, 13 Oct 2015 19:45:30 +0000 (UTC) (envelope-from cem@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 955E81EC3; Tue, 13 Oct 2015 19:45:30 +0000 (UTC) (envelope-from cem@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t9DJjTEe043237; Tue, 13 Oct 2015 19:45:29 GMT (envelope-from cem@FreeBSD.org) Received: (from cem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9DJjTIl043235; Tue, 13 Oct 2015 19:45:29 GMT (envelope-from cem@FreeBSD.org) Message-Id: <201510131945.t9DJjTIl043235@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cem set sender to cem@FreeBSD.org using -f From: "Conrad E. Meyer" Date: Tue, 13 Oct 2015 19:45:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289257 - head/sys/dev/ntb/ntb_hw X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Oct 2015 19:45:30 -0000 Author: cem Date: Tue Oct 13 19:45:29 2015 New Revision: 289257 URL: https://svnweb.freebsd.org/changeset/base/289257 Log: NTB: (partial) MFV ed6c24ed: NTB-RP support This commit does not actually add NTB-RP support. Mostly it serves to shuffle code around to match the Linux driver. Original Linux commit log follows: Add support for Non-Transparent Bridge connected to a PCI-E Root Port on the remote system (also known as NTB-RP mode). This allows for a NTB enabled system to be connected to a non-NTB enabled system/slot. Modifications to the registers and BARs/MWs on the Secondary side by the remote system are reflected into registers on the Primary side for the local system. Similarly, modifications of registers and BARs/MWs on Primary side by the local system are reflected into registers on the Secondary side for the Remote System. This allows communication between the 2 sides via these registers and BARs/MWs. Note: there is not a fix for the Xeon Errata (that was already worked around in NTB-B2B mode) for NTB-RP mode. Due to this limitation, NTB-RP will not work on the Secondary side with the Xeon Errata workaround enabled. To get around this, disable the workaround via the xeon_errata_workaround=0 modparm. However, this can cause the hang described in the errata. Authored by: Jon Mason Obtained from: Linux Sponsored by: EMC / Isilon Storage Division Modified: head/sys/dev/ntb/ntb_hw/ntb_hw.c head/sys/dev/ntb/ntb_hw/ntb_regs.h Modified: head/sys/dev/ntb/ntb_hw/ntb_hw.c ============================================================================== --- head/sys/dev/ntb/ntb_hw/ntb_hw.c Tue Oct 13 19:44:36 2015 (r289256) +++ head/sys/dev/ntb/ntb_hw/ntb_hw.c Tue Oct 13 19:45:29 2015 (r289257) @@ -709,17 +709,6 @@ ntb_setup_xeon(struct ntb_softc *ntb) val = pci_read_config(ntb->device, NTB_PPD_OFFSET, 1); connection_type = val & XEON_PPD_CONN_TYPE; - switch (connection_type) { - case NTB_CONN_B2B: - ntb->conn_type = NTB_CONN_B2B; - break; - case NTB_CONN_CLASSIC: - case NTB_CONN_RP: - default: - device_printf(ntb->device, "Connection type %d not supported\n", - connection_type); - return (ENXIO); - } if ((val & XEON_PPD_DEV_TYPE) != 0) ntb->dev_type = NTB_DEV_USD; @@ -728,12 +717,42 @@ ntb_setup_xeon(struct ntb_softc *ntb) ntb->reg_ofs.ldb = XEON_PDOORBELL_OFFSET; ntb->reg_ofs.ldb_mask = XEON_PDBMSK_OFFSET; + ntb->reg_ofs.spad_local = XEON_SPAD_OFFSET; ntb->reg_ofs.bar2_xlat = XEON_SBAR2XLAT_OFFSET; ntb->reg_ofs.bar4_xlat = XEON_SBAR4XLAT_OFFSET; - ntb->reg_ofs.lnk_cntl = XEON_NTBCNTL_OFFSET; - ntb->reg_ofs.lnk_stat = XEON_LINK_STATUS_OFFSET; - ntb->reg_ofs.spad_local = XEON_SPAD_OFFSET; - ntb->reg_ofs.spci_cmd = XEON_PCICMD_OFFSET; + + switch (connection_type) { + case NTB_CONN_B2B: + ntb->conn_type = NTB_CONN_B2B; + + /* + * reg_ofs.rdb and reg_ofs.spad_remote are effectively ignored + * with the NTB_REGS_THRU_MW errata mode enabled. (See + * ntb_ring_doorbell() and ntb_read/write_remote_spad().) + */ + ntb->reg_ofs.rdb = XEON_B2B_DOORBELL_OFFSET; + ntb->reg_ofs.spad_remote = XEON_B2B_SPAD_OFFSET; + + ntb->limits.max_spads = XEON_MAX_SPADS; + break; + + case NTB_CONN_RP: + /* + * Every Xeon today needs NTB_REGS_THRU_MW, so punt on RP for + * now. + */ + KASSERT(HAS_FEATURE(NTB_REGS_THRU_MW), + ("Xeon without MW errata unimplemented")); + device_printf(ntb->device, + "NTB-RP disabled to due hardware errata.\n"); + return (ENXIO); + + case NTB_CONN_TRANSPARENT: + default: + device_printf(ntb->device, "Connection type %d not supported\n", + connection_type); + return (ENXIO); + } /* * There is a Xeon hardware errata related to writes to SDOORBELL or @@ -757,15 +776,9 @@ ntb_setup_xeon(struct ntb_softc *ntb) ntb_reg_write(8, XEON_PBAR4LMT_OFFSET, 0); - if (ntb->conn_type == NTB_CONN_B2B) { - ntb->reg_ofs.rdb = XEON_B2B_DOORBELL_OFFSET; - ntb->reg_ofs.spad_remote = XEON_B2B_SPAD_OFFSET; - ntb->limits.max_spads = XEON_MAX_SPADS; - } else { - ntb->reg_ofs.rdb = XEON_SDOORBELL_OFFSET; - ntb->reg_ofs.spad_remote = XEON_SPAD_OFFSET; - ntb->limits.max_spads = XEON_MAX_COMPAT_SPADS; - } + ntb->reg_ofs.lnk_cntl = XEON_NTBCNTL_OFFSET; + ntb->reg_ofs.lnk_stat = XEON_LINK_STATUS_OFFSET; + ntb->reg_ofs.spci_cmd = XEON_PCICMD_OFFSET; ntb->limits.max_db_bits = XEON_MAX_DB_BITS; ntb->limits.msix_cnt = XEON_MSIX_CNT; @@ -774,8 +787,9 @@ ntb_setup_xeon(struct ntb_softc *ntb) configure_xeon_secondary_side_bars(ntb); /* Enable Bus Master and Memory Space on the secondary side */ - ntb_reg_write(2, ntb->reg_ofs.spci_cmd, - PCIM_CMD_MEMEN | PCIM_CMD_BUSMASTEREN); + if (ntb->conn_type == NTB_CONN_B2B) + ntb_reg_write(2, ntb->reg_ofs.spci_cmd, + PCIM_CMD_MEMEN | PCIM_CMD_BUSMASTEREN); /* Enable link training */ ntb_reg_write(4, ntb->reg_ofs.lnk_cntl, @@ -996,7 +1010,8 @@ ntb_handle_link_event(struct ntb_softc * ntb->link_status = NTB_LINK_UP; event = NTB_EVENT_HW_LINK_UP; - if (ntb->type == NTB_SOC) + if (ntb->type == NTB_SOC || + ntb->conn_type == NTB_CONN_TRANSPARENT) status = ntb_reg_read(2, ntb->reg_ofs.lnk_stat); else status = pci_read_config(ntb->device, Modified: head/sys/dev/ntb/ntb_hw/ntb_regs.h ============================================================================== --- head/sys/dev/ntb/ntb_hw/ntb_regs.h Tue Oct 13 19:44:36 2015 (r289256) +++ head/sys/dev/ntb/ntb_hw/ntb_regs.h Tue Oct 13 19:45:29 2015 (r289257) @@ -29,8 +29,6 @@ #ifndef _NTB_REGS_H_ #define _NTB_REGS_H_ -#define NTB_LINK_ENABLE 0x0000 -#define NTB_LINK_DISABLE 0x0002 #define NTB_LINK_STATUS_ACTIVE 0x2000 #define NTB_LINK_SPEED_MASK 0x000f #define NTB_LINK_WIDTH_MASK 0x03f0 @@ -47,6 +45,7 @@ #define XEON_PCICMD_OFFSET 0x0504 #define XEON_DEVCTRL_OFFSET 0x0598 #define XEON_LINK_STATUS_OFFSET 0x01a2 +#define XEON_SLINK_STATUS_OFFSET 0x05a2 #define XEON_PBAR2LMT_OFFSET 0x0000 #define XEON_PBAR4LMT_OFFSET 0x0008 @@ -117,6 +116,8 @@ #define SOC_LTSSMSTATEJMP_FORCEDETECT (1 << 2) #define SOC_IBIST_ERR_OFLOW 0x7fff7fff +#define NTB_CNTL_CFG_LOCK (1 << 0) +#define NTB_CNTL_LINK_DISABLE (1 << 1) #define NTB_CNTL_BAR23_SNOOP (1 << 2) #define NTB_CNTL_BAR45_SNOOP (1 << 6) #define SOC_CNTL_LINK_DOWN (1 << 16) @@ -130,7 +131,7 @@ #define SOC_PPD_CONN_TYPE 0x0300 #define SOC_PPD_DEV_TYPE 0x1000 -#define NTB_CONN_CLASSIC 0 +#define NTB_CONN_TRANSPARENT 0 #define NTB_CONN_B2B 1 #define NTB_CONN_RP 2 From owner-svn-src-all@freebsd.org Tue Oct 13 19:46:13 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A88D1A1256F; Tue, 13 Oct 2015 19:46:13 +0000 (UTC) (envelope-from cem@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 777A389; Tue, 13 Oct 2015 19:46:13 +0000 (UTC) (envelope-from cem@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t9DJkCsZ043320; Tue, 13 Oct 2015 19:46:12 GMT (envelope-from cem@FreeBSD.org) Received: (from cem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9DJkCtS043319; Tue, 13 Oct 2015 19:46:12 GMT (envelope-from cem@FreeBSD.org) Message-Id: <201510131946.t9DJkCtS043319@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cem set sender to cem@FreeBSD.org using -f From: "Conrad E. Meyer" Date: Tue, 13 Oct 2015 19:46:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289258 - head/sys/dev/ioat X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Oct 2015 19:46:13 -0000 Author: cem Date: Tue Oct 13 19:46:12 2015 New Revision: 289258 URL: https://svnweb.freebsd.org/changeset/base/289258 Log: ioat: Use correct macro, fix build on i386 Sponsored by: EMC / Isilon Storage Division Modified: head/sys/dev/ioat/ioat_internal.h Modified: head/sys/dev/ioat/ioat_internal.h ============================================================================== --- head/sys/dev/ioat/ioat_internal.h Tue Oct 13 19:45:29 2015 (r289257) +++ head/sys/dev/ioat/ioat_internal.h Tue Oct 13 19:46:12 2015 (r289258) @@ -65,7 +65,7 @@ ioat_bus_space_write_8_lower_first(bus_s bus_space_write_4(tag, handle, offset + 4, val >> 32); } -#ifdef i386 +#ifdef __i386__ #define ioat_bus_space_read_8 ioat_bus_space_read_8_lower_first #define ioat_bus_space_write_8 ioat_bus_space_write_8_lower_first #else From owner-svn-src-all@freebsd.org Tue Oct 13 19:46:56 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4B7CDA125C5; Tue, 13 Oct 2015 19:46:56 +0000 (UTC) (envelope-from cem@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id EE91C1EC; Tue, 13 Oct 2015 19:46:55 +0000 (UTC) (envelope-from cem@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t9DJksFx043383; Tue, 13 Oct 2015 19:46:54 GMT (envelope-from cem@FreeBSD.org) Received: (from cem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9DJkslc043382; Tue, 13 Oct 2015 19:46:54 GMT (envelope-from cem@FreeBSD.org) Message-Id: <201510131946.t9DJkslc043382@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cem set sender to cem@FreeBSD.org using -f From: "Conrad E. Meyer" Date: Tue, 13 Oct 2015 19:46:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289259 - head/sys/dev/ntb/if_ntb X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Oct 2015 19:46:56 -0000 Author: cem Date: Tue Oct 13 19:46:54 2015 New Revision: 289259 URL: https://svnweb.freebsd.org/changeset/base/289259 Log: if_ntb: Fix build on i386 Sponsored by: EMC / Isilon Storage Division Modified: head/sys/dev/ntb/if_ntb/if_ntb.c Modified: head/sys/dev/ntb/if_ntb/if_ntb.c ============================================================================== --- head/sys/dev/ntb/if_ntb/if_ntb.c Tue Oct 13 19:46:12 2015 (r289258) +++ head/sys/dev/ntb/if_ntb/if_ntb.c Tue Oct 13 19:46:54 2015 (r289259) @@ -1047,7 +1047,7 @@ ntb_transport_link_work(void *arg) /* send the local info, in the opposite order of the way we read it */ for (i = 0; i < num_mw; i++) { rc = ntb_write_remote_spad(ntb, IF_NTB_MW0_SZ_HIGH + (i * 2), - ntb_get_mw_size(ntb, i) >> 32); + (uint64_t)ntb_get_mw_size(ntb, i) >> 32); if (rc != 0) goto out; From owner-svn-src-all@freebsd.org Tue Oct 13 20:25:04 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 760D8A122B4; Tue, 13 Oct 2015 20:25:04 +0000 (UTC) (envelope-from rpaulo@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4211F10B7; Tue, 13 Oct 2015 20:25:04 +0000 (UTC) (envelope-from rpaulo@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t9DKP3Ca055515; Tue, 13 Oct 2015 20:25:03 GMT (envelope-from rpaulo@FreeBSD.org) Received: (from rpaulo@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9DKP3CT055514; Tue, 13 Oct 2015 20:25:03 GMT (envelope-from rpaulo@FreeBSD.org) Message-Id: <201510132025.t9DKP3CT055514@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: rpaulo set sender to rpaulo@FreeBSD.org using -f From: Rui Paulo Date: Tue, 13 Oct 2015 20:25:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289262 - head/usr.sbin/config X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Oct 2015 20:25:04 -0000 Author: rpaulo Date: Tue Oct 13 20:25:03 2015 New Revision: 289262 URL: https://svnweb.freebsd.org/changeset/base/289262 Log: Fix two memory leaks in config(8). PR: 202145 Submitted by: Kurt Lidl Modified: head/usr.sbin/config/mkmakefile.c Modified: head/usr.sbin/config/mkmakefile.c ============================================================================== --- head/usr.sbin/config/mkmakefile.c Tue Oct 13 20:24:57 2015 (r289261) +++ head/usr.sbin/config/mkmakefile.c Tue Oct 13 20:25:03 2015 (r289262) @@ -623,6 +623,7 @@ do_xxfiles(char *tag, FILE *fp) slen = strlen(suff); fprintf(fp, "%sFILES=", SUFF); + free(SUFF); lpos = 8; STAILQ_FOREACH(tp, &ftab, f_next) if (tp->f_type != NODEPEND) { @@ -641,6 +642,7 @@ do_xxfiles(char *tag, FILE *fp) fprintf(fp, "%s ", tp->f_fn); lpos += len + 1; } + free(suff); if (lpos != 8) putc('\n', fp); } From owner-svn-src-all@freebsd.org Tue Oct 13 20:37:03 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 92236A126E9; Tue, 13 Oct 2015 20:37:03 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: from mail-pa0-x22e.google.com (mail-pa0-x22e.google.com [IPv6:2607:f8b0:400e:c03::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 655B01B6C; Tue, 13 Oct 2015 20:37:03 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: by padcn9 with SMTP id cn9so120720pad.2; Tue, 13 Oct 2015 13:37:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=content-type:mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=yY+hMz1dqoXJRmEJifzrav1Qg916jtCFGAhXkGL6CG4=; b=DeJWE2APZ66nZSJiSTK78c70AnrZNKNELdsfEEy5hBjTl+Lf68wYF//f3OBpXvj8St ibbRPsDN941Sa/dhPFZTtv6gFxXhme21pQsFcRvpPmTcmDFDT6P3Km5MDq//1XUNYxpK zoTzz+5BaajwBNx34kfCbBOKrsFWiRu/Blyb0YSFrsopD1agVqWmBPRCX6ZX9Q4SSXeO lxO9MBT474b+UtqRwzL/jv6i24xvoAlXb8whd8uBJBtOjNIi73sjKzsHOxxg2/xBdbr7 0/u/CFAh7mdBHheZdblDUSOt1AYgw92YgnUoE1U1Ci4X0X7/DxI3/Y5q5at9ldBb+/CF 0bBg== X-Received: by 10.66.254.7 with SMTP id ae7mr8778770pad.107.1444768622881; Tue, 13 Oct 2015 13:37:02 -0700 (PDT) Received: from [22.163.255.154] ([172.56.38.60]) by smtp.gmail.com with ESMTPSA id u3sm5487838pbs.33.2015.10.13.13.37.02 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 13 Oct 2015 13:37:02 -0700 (PDT) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (1.0) Subject: Re: svn commit: r289253 - head/share/mk From: Garrett Cooper X-Mailer: iPhone Mail (13A452) In-Reply-To: <201510131911.t9DJBMTc034025@repo.freebsd.org> Date: Tue, 13 Oct 2015 13:37:01 -0700 Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Transfer-Encoding: quoted-printable Message-Id: References: <201510131911.t9DJBMTc034025@repo.freebsd.org> To: Bryan Drewery X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Oct 2015 20:37:03 -0000 > On Oct 13, 2015, at 12:11, Bryan Drewery wrote: >=20 > Author: bdrewery > Date: Tue Oct 13 19:11:22 2015 > New Revision: 289253 > URL: https://svnweb.freebsd.org/changeset/base/289253 >=20 > Log: > bsd.subdir.mk: Handle cleanobj. >=20 > Before this, the target was unknown. Now it will recurse on subdirs and r= un > the target in the current directory. It is required to recurse as there > may be subdirs that have objs in their directory or in the object directo= ry, > so it is not enough to just delete the objdir of the subdir parent. >=20 > MFC after: 2 weeks > Sponsored by: EMC / Isilon Storage Division >=20 > Modified: > head/share/mk/bsd.subdir.mk >=20 > Modified: head/share/mk/bsd.subdir.mk > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D > --- head/share/mk/bsd.subdir.mk Tue Oct 13 18:56:50 2015 (r289252) > +++ head/share/mk/bsd.subdir.mk Tue Oct 13 19:11:22 2015 (r289253) > @@ -86,7 +86,7 @@ ${SUBDIR:N.WAIT}: .PHONY .MAKE > # Work around parsing of .if nested in .for by putting .WAIT string into a= var. > __wait=3D .WAIT > .for __target in all all-man checkdpadd clean cleandepend cleandir \ > - cleanilinks depend distribute lint maninstall manlint obj objlink \ > + cleanilinks cleanobj depend distribute lint maninstall manlint obj ob= jlink \ > realinstall regress tags ${SUBDIR_TARGETS} > .ifdef SUBDIR_PARALLEL > __subdir_targets=3D >=20 From owner-svn-src-all@freebsd.org Tue Oct 13 20:54:40 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4D1BAA12D21; Tue, 13 Oct 2015 20:54:40 +0000 (UTC) (envelope-from cem@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id EEA819D8; Tue, 13 Oct 2015 20:54:39 +0000 (UTC) (envelope-from cem@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t9DKscII064618; Tue, 13 Oct 2015 20:54:38 GMT (envelope-from cem@FreeBSD.org) Received: (from cem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9DKsc3Z064616; Tue, 13 Oct 2015 20:54:38 GMT (envelope-from cem@FreeBSD.org) Message-Id: <201510132054.t9DKsc3Z064616@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cem set sender to cem@FreeBSD.org using -f From: "Conrad E. Meyer" Date: Tue, 13 Oct 2015 20:54:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289265 - head/sys/dev/ntb/ntb_hw X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Oct 2015 20:54:40 -0000 Author: cem Date: Tue Oct 13 20:54:38 2015 New Revision: 289265 URL: https://svnweb.freebsd.org/changeset/base/289265 Log: NTB: MFV b1ef0043: Remove References of non-B2B BWD HW NTB-RP is not a supported configuration on BWD hardware. Remove the code attempting to set it up. Authored by: Jon Mason Obtained from: Linux (dual BSD/GPL driver) Sponsored by: EMC / Isilon Storage Division Modified: head/sys/dev/ntb/ntb_hw/ntb_hw.c head/sys/dev/ntb/ntb_hw/ntb_regs.h Modified: head/sys/dev/ntb/ntb_hw/ntb_hw.c ============================================================================== --- head/sys/dev/ntb/ntb_hw/ntb_hw.c Tue Oct 13 20:45:29 2015 (r289264) +++ head/sys/dev/ntb/ntb_hw/ntb_hw.c Tue Oct 13 20:54:38 2015 (r289265) @@ -810,10 +810,9 @@ ntb_setup_soc(struct ntb_softc *ntb) case NTB_CONN_B2B: ntb->conn_type = NTB_CONN_B2B; break; - case NTB_CONN_RP: default: - device_printf(ntb->device, "Connection type %d not supported\n", - connection_type); + device_printf(ntb->device, + "Unsupported NTB configuration (%d)\n", connection_type); return (ENXIO); } @@ -828,23 +827,16 @@ ntb_setup_soc(struct ntb_softc *ntb) ntb->reg_ofs.ldb = SOC_PDOORBELL_OFFSET; ntb->reg_ofs.ldb_mask = SOC_PDBMSK_OFFSET; + ntb->reg_ofs.rdb = SOC_B2B_DOORBELL_OFFSET; ntb->reg_ofs.bar2_xlat = SOC_SBAR2XLAT_OFFSET; ntb->reg_ofs.bar4_xlat = SOC_SBAR4XLAT_OFFSET; ntb->reg_ofs.lnk_cntl = SOC_NTBCNTL_OFFSET; ntb->reg_ofs.lnk_stat = SOC_LINK_STATUS_OFFSET; ntb->reg_ofs.spad_local = SOC_SPAD_OFFSET; + ntb->reg_ofs.spad_remote = SOC_B2B_SPAD_OFFSET; ntb->reg_ofs.spci_cmd = SOC_PCICMD_OFFSET; - if (ntb->conn_type == NTB_CONN_B2B) { - ntb->reg_ofs.rdb = SOC_B2B_DOORBELL_OFFSET; - ntb->reg_ofs.spad_remote = SOC_B2B_SPAD_OFFSET; - ntb->limits.max_spads = SOC_MAX_SPADS; - } else { - ntb->reg_ofs.rdb = SOC_PDOORBELL_OFFSET; - ntb->reg_ofs.spad_remote = SOC_SPAD_OFFSET; - ntb->limits.max_spads = SOC_MAX_COMPAT_SPADS; - } - + ntb->limits.max_spads = SOC_MAX_SPADS; ntb->limits.max_db_bits = SOC_MAX_DB_BITS; ntb->limits.msix_cnt = SOC_MSIX_CNT; ntb->bits_per_vector = SOC_DB_BITS_PER_VEC; Modified: head/sys/dev/ntb/ntb_hw/ntb_regs.h ============================================================================== --- head/sys/dev/ntb/ntb_hw/ntb_regs.h Tue Oct 13 20:45:29 2015 (r289264) +++ head/sys/dev/ntb/ntb_hw/ntb_regs.h Tue Oct 13 20:54:38 2015 (r289265) @@ -75,7 +75,6 @@ #define SOC_MSIX_CNT 34 #define SOC_MAX_SPADS 16 -#define SOC_MAX_COMPAT_SPADS 16 #define SOC_MAX_DB_BITS 34 #define SOC_DB_BITS_PER_VEC 1 From owner-svn-src-all@freebsd.org Tue Oct 13 20:55:22 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A57E5A12D88; Tue, 13 Oct 2015 20:55:22 +0000 (UTC) (envelope-from cem@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5768DB6C; Tue, 13 Oct 2015 20:55:22 +0000 (UTC) (envelope-from cem@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t9DKtLRb064706; Tue, 13 Oct 2015 20:55:21 GMT (envelope-from cem@FreeBSD.org) Received: (from cem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9DKtLW4064704; Tue, 13 Oct 2015 20:55:21 GMT (envelope-from cem@FreeBSD.org) Message-Id: <201510132055.t9DKtLW4064704@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cem set sender to cem@FreeBSD.org using -f From: "Conrad E. Meyer" Date: Tue, 13 Oct 2015 20:55:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289266 - in head/sys/dev/ntb: if_ntb ntb_hw X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Oct 2015 20:55:22 -0000 Author: cem Date: Tue Oct 13 20:55:21 2015 New Revision: 289266 URL: https://svnweb.freebsd.org/changeset/base/289266 Log: NTB: MFV f9a2cf89: Comment Fix Add "data" ntb_register_db_callback parameter description comment and correct poor speling. Authored by: Jon Mason Obtained from: Linux (Dual BSD/GPL driver) Sponsored by: EMC / Isilon Storage Division Modified: head/sys/dev/ntb/if_ntb/if_ntb.c head/sys/dev/ntb/ntb_hw/ntb_hw.c Modified: head/sys/dev/ntb/if_ntb/if_ntb.c ============================================================================== --- head/sys/dev/ntb/if_ntb/if_ntb.c Tue Oct 13 20:54:38 2015 (r289265) +++ head/sys/dev/ntb/if_ntb/if_ntb.c Tue Oct 13 20:55:21 2015 (r289266) @@ -715,7 +715,7 @@ ntb_transport_link_up(struct ntb_transpo * @len: length of the data buffer * * Enqueue a new transmit buffer onto the transport queue from which a NTB - * payload will be transmitted. This assumes that a lock is behing held to + * payload will be transmitted. This assumes that a lock is being held to * serialize access to the qp. * * RETURNS: An appropriate ERRNO error value on error, or zero for success. @@ -1311,7 +1311,7 @@ ntb_qp_link_cleanup(struct ntb_transport * * Notify NTB transport layer of client's desire to no longer receive data on * transport queue specified. It is the client's responsibility to ensure all - * entries on queue are purged or otherwise handled appropraitely. + * entries on queue are purged or otherwise handled appropriately. */ static void ntb_transport_link_down(struct ntb_transport_qp *qp) Modified: head/sys/dev/ntb/ntb_hw/ntb_hw.c ============================================================================== --- head/sys/dev/ntb/ntb_hw/ntb_hw.c Tue Oct 13 20:54:38 2015 (r289265) +++ head/sys/dev/ntb/ntb_hw/ntb_hw.c Tue Oct 13 20:55:21 2015 (r289266) @@ -1140,6 +1140,7 @@ ntb_unregister_event_callback(struct ntb * ntb_register_db_callback() - register a callback for doorbell interrupt * @ntb: pointer to ntb_softc instance * @idx: doorbell index to register callback, zero based + * @data: pointer to be returned to caller with every callback * @func: callback function to register * * This function registers a callback function for the doorbell interrupt From owner-svn-src-all@freebsd.org Tue Oct 13 20:59:34 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2F7E0A12FCE; Tue, 13 Oct 2015 20:59:34 +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 EA8D4FFF; Tue, 13 Oct 2015 20:59:33 +0000 (UTC) (envelope-from cse.cem@gmail.com) Received: by ykfy204 with SMTP id y204so6603881ykf.1; Tue, 13 Oct 2015 13:59:27 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=mime-version:reply-to:in-reply-to:references:date:message-id :subject:from:to:cc:content-type; bh=+XNlchMqb+x4Oq2DxkfC9VbsYI5WwTOPNaTDbBLv9fQ=; b=ciJKTSWodMbG8J9zg1ahNcVFfoTwKji10t1E9LFQzpWIScpAX8SGvufKvcmXuQQplg wcvzwcRzrPIJCELEzN7GPac612S5oLVFgAvC1NDkjjGeapIE8IeEvmdR5zQfBZNCT1iR LmANJkJ8IbM7OX5li6vXmOWG+m25Y8WYiFoIPHwR3J0gs8TaW7Z+L9pwtallu7zxQoJ9 WKpEiHO6k7MW/SW0R73crwRZTQk34ruzfvacf4kf60nUBcj+vZLZkEjastEOEoacRko5 ZgiUDURKjiCOJEHpvYoyoB3zN0E00bzwe4mrJjGSRR3EjwTyJCbBJq/ob9hT2yYvnKLD GNnQ== X-Received: by 10.13.238.135 with SMTP id x129mr25654397ywe.245.1444769967097; Tue, 13 Oct 2015 13:59:27 -0700 (PDT) Received: from mail-yk0-f181.google.com (mail-yk0-f181.google.com. [209.85.160.181]) by smtp.gmail.com with ESMTPSA id q133sm3274548ywb.30.2015.10.13.13.59.26 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 13 Oct 2015 13:59:27 -0700 (PDT) Received: by ykey125 with SMTP id y125so29436694yke.3; Tue, 13 Oct 2015 13:59:26 -0700 (PDT) MIME-Version: 1.0 X-Received: by 10.13.217.85 with SMTP id b82mr25480688ywe.338.1444769966712; Tue, 13 Oct 2015 13:59:26 -0700 (PDT) Reply-To: cem@FreeBSD.org Received: by 10.37.203.75 with HTTP; Tue, 13 Oct 2015 13:59:26 -0700 (PDT) In-Reply-To: <201510132055.t9DKtLW4064704@repo.freebsd.org> References: <201510132055.t9DKtLW4064704@repo.freebsd.org> Date: Tue, 13 Oct 2015 13:59:26 -0700 Message-ID: Subject: Re: svn commit: r289266 - in head/sys/dev/ntb: if_ntb ntb_hw From: Conrad Meyer To: svn-src-head@freebsd.org Cc: src-committers@freebsd.org, svn-src-all@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 " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Oct 2015 20:59:34 -0000 On Tue, Oct 13, 2015 at 1:55 PM, Conrad E. Meyer wrote: > Author: cem > Date: Tue Oct 13 20:55:21 2015 > New Revision: 289266 > URL: https://svnweb.freebsd.org/changeset/base/289266 > > Log: > NTB: MFV f9a2cf89: Comment Fix This catches us up to the dual-licensed BSD/GPL Linux driver as of Nov 14, 2013 (minus support for some Xeon configurations and minus I/OAT DMA offload for if_ntb). Best, Conrad From owner-svn-src-all@freebsd.org Tue Oct 13 21:19:10 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8ED2DA125F8; Tue, 13 Oct 2015 21:19:10 +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 73DDA1BCC; Tue, 13 Oct 2015 21:19:10 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from mail.xzibition.com (localhost [IPv6:::1]) by freefall.freebsd.org (Postfix) with ESMTP id 60D671EAE; Tue, 13 Oct 2015 21:19:10 +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 13C9413D64; Tue, 13 Oct 2015 21:19:10 +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 3-JpSX7qb4MU; Tue, 13 Oct 2015 21:19:06 +0000 (UTC) Subject: Re: svn commit: r289253 - head/share/mk DKIM-Filter: OpenDKIM Filter v2.9.2 mail.xzibition.com 92EA513D5E To: Garrett Cooper References: <201510131911.t9DJBMTc034025@repo.freebsd.org> Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org From: Bryan Drewery Openpgp: id=F9173CB2C3AAEA7A5C8A1F0935D771BB6E4697CF; url=http://www.shatow.net/bryan/bryan2.asc Organization: FreeBSD Message-ID: <561D7549.2070202@FreeBSD.org> Date: Tue, 13 Oct 2015 14:19:05 -0700 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0 MIME-Version: 1.0 In-Reply-To: Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="aNOTExnjkilwpO94OQeb2MwT9LDUfrgN5" X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Oct 2015 21:19:10 -0000 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --aNOTExnjkilwpO94OQeb2MwT9LDUfrgN5 Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: quoted-printable On 10/13/2015 1:37 PM, Garrett Cooper wrote: >=20 >=20 >> On Oct 13, 2015, at 12:11, Bryan Drewery wrote:= >> >> Author: bdrewery >> Date: Tue Oct 13 19:11:22 2015 >> New Revision: 289253 >> URL: https://svnweb.freebsd.org/changeset/base/289253 >> >> Log: >> bsd.subdir.mk: Handle cleanobj. >> >> Before this, the target was unknown. Now it will recurse on subdirs = and run >> the target in the current directory. It is required to recurse as th= ere >> may be subdirs that have objs in their directory or in the object dir= ectory, >> so it is not enough to just delete the objdir of the subdir parent. >> >> MFC after: 2 weeks >> Sponsored by: EMC / Isilon Storage Division >> >> Modified: >> head/share/mk/bsd.subdir.mk >> >> Modified: head/share/mk/bsd.subdir.mk >> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D >> --- head/share/mk/bsd.subdir.mk Tue Oct 13 18:56:50 2015 (r28925= 2) >> +++ head/share/mk/bsd.subdir.mk Tue Oct 13 19:11:22 2015 (r28925= 3) >> @@ -86,7 +86,7 @@ ${SUBDIR:N.WAIT}: .PHONY .MAKE >> # Work around parsing of .if nested in .for by putting .WAIT string in= to a var. >> __wait=3D .WAIT >> .for __target in all all-man checkdpadd clean cleandepend cleandir \ >> - cleanilinks depend distribute lint maninstall manlint obj objlink= \ >> + cleanilinks cleanobj depend distribute lint maninstall manlint ob= j objlink \ >> realinstall regress tags ${SUBDIR_TARGETS} >> .ifdef SUBDIR_PARALLEL >> __subdir_targets=3D >> >=20 You sent no text... --=20 Regards, Bryan Drewery --aNOTExnjkilwpO94OQeb2MwT9LDUfrgN5 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 iQEcBAEBAgAGBQJWHXVKAAoJEDXXcbtuRpfPkDEIALhc11YcraqXOe5qEE8bj3S4 4+wXcjmTWjKg35czshDrY6EeiZynoT1Z9kfj/3toyb0Qnh55saNFEa+1Mizqj1hm Y0JTjwmzJ3RcdltgwG0QA48g6vgjnSsYeaVK0xVZbSdhlY/5kGyDtXCKSq1egEar fAFmMvr0j2DFiGFv2aC7OLkYl6ZaPH93C6NtqauKFFAYNRoxubG2v256J6NpTefu sQtz3ckLwU10L1/TsLLD5KCgWA5GKbPsy0+Q1uqdVQTgVtRZnv+nVHM85vsnha7v 3Y51HtPLsOwv42G4le/Kyg7a+zJkdnsSK8iMFTxaP1buvOMFe2S+8Ntyvc4lGF0= =LnoD -----END PGP SIGNATURE----- --aNOTExnjkilwpO94OQeb2MwT9LDUfrgN5-- From owner-svn-src-all@freebsd.org Tue Oct 13 22:51:14 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9B7C8A13C77; Tue, 13 Oct 2015 22:51:14 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: from mail-qg0-x229.google.com (mail-qg0-x229.google.com [IPv6:2607:f8b0:400d:c04::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 59AEF160E; Tue, 13 Oct 2015 22:51:14 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: by qgez77 with SMTP id z77so28740577qge.1; Tue, 13 Oct 2015 15:51:13 -0700 (PDT) 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=re9DXwHdZIKd6sDTfDDk/IYFrtd+bFG9mPJ+ERmISrc=; b=Xd7XsI55+HJymK47EZ8cE1tCOLFEKspsw+vJ41dlHGbQF1BDNRuGZlBs4PLALUc/jr 3zJOcF6/dIzlhMz6GPW8WSxZEtEPMFfCY1AEG+35G3xwh9b+2EGhE19tQMWXAKwssNkc 3ewhRwe+QYNu1UcbNOsVqunvAEA9sKj85gh98A0qDFVnO9iTP/GveOUoM1fcePvs8APw VXwTT8Pe1WNfWVCf8lZfCRdn6z828Qp5AO2OfTVoOcOvrqU9yEpszHoFaSo5tR2VvD8s JwsVnBCRnmduyMXQgL0yc1ovMbIHNrGOu+AL1DpETp5rZ7cMlWm7MnK2Es6fH0GgV5tI pvvw== MIME-Version: 1.0 X-Received: by 10.140.93.139 with SMTP id d11mr43398174qge.83.1444776673404; Tue, 13 Oct 2015 15:51:13 -0700 (PDT) Received: by 10.140.88.180 with HTTP; Tue, 13 Oct 2015 15:51:13 -0700 (PDT) In-Reply-To: <561D7549.2070202@FreeBSD.org> References: <201510131911.t9DJBMTc034025@repo.freebsd.org> <561D7549.2070202@FreeBSD.org> Date: Tue, 13 Oct 2015 15:51:13 -0700 Message-ID: Subject: Re: svn commit: r289253 - head/share/mk From: NGie Cooper To: Bryan Drewery Cc: "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Content-Type: text/plain; charset=UTF-8 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Oct 2015 22:51:14 -0000 On Tue, Oct 13, 2015 at 2:19 PM, Bryan Drewery wrote: ... >>> On Oct 13, 2015, at 12:11, Bryan Drewery wrote: >>> >>> Author: bdrewery >>> Date: Tue Oct 13 19:11:22 2015 >>> New Revision: 289253 >>> URL: https://svnweb.freebsd.org/changeset/base/289253 >>> >>> Log: >>> bsd.subdir.mk: Handle cleanobj. >>> >>> Before this, the target was unknown. Now it will recurse on subdirs and run >>> the target in the current directory. It is required to recurse as there >>> may be subdirs that have objs in their directory or in the object directory, >>> so it is not enough to just delete the objdir of the subdir parent. ... > You sent no text... Hit send on my phone by accident. make cleanobj appears broken with bsd.progs.mk (maybe related to that makefile snippet). Generally speaking you could "access" cleanobj via the cleandir target. Thanks, -NGie From owner-svn-src-all@freebsd.org Tue Oct 13 22:52:43 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 03913A13D06; Tue, 13 Oct 2015 22:52:43 +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 DDF5319D6; Tue, 13 Oct 2015 22:52:42 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from mail.xzibition.com (localhost [IPv6:::1]) by freefall.freebsd.org (Postfix) with ESMTP id D67291BB6; Tue, 13 Oct 2015 22:52:42 +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 90BA5144B5; Tue, 13 Oct 2015 22:52:42 +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 LOsEHKDQn4W7; Tue, 13 Oct 2015 22:52:40 +0000 (UTC) Subject: Re: svn commit: r289253 - head/share/mk DKIM-Filter: OpenDKIM Filter v2.9.2 mail.xzibition.com 8AF90144AF To: NGie Cooper References: <201510131911.t9DJBMTc034025@repo.freebsd.org> <561D7549.2070202@FreeBSD.org> Cc: "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" From: Bryan Drewery Openpgp: id=F9173CB2C3AAEA7A5C8A1F0935D771BB6E4697CF; url=http://www.shatow.net/bryan/bryan2.asc Organization: FreeBSD Message-ID: <561D8B38.7030202@FreeBSD.org> Date: Tue, 13 Oct 2015 15:52:40 -0700 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0 MIME-Version: 1.0 In-Reply-To: Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="bKiA6M3bwWlGC3GIM8fHTVeTLixgLLIiV" X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Oct 2015 22:52:43 -0000 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --bKiA6M3bwWlGC3GIM8fHTVeTLixgLLIiV Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 10/13/2015 3:51 PM, NGie Cooper wrote: > On Tue, Oct 13, 2015 at 2:19 PM, Bryan Drewery w= rote: > ... >>>> On Oct 13, 2015, at 12:11, Bryan Drewery wrot= e: >>>> >>>> Author: bdrewery >>>> Date: Tue Oct 13 19:11:22 2015 >>>> New Revision: 289253 >>>> URL: https://svnweb.freebsd.org/changeset/base/289253 >>>> >>>> Log: >>>> bsd.subdir.mk: Handle cleanobj. >>>> >>>> Before this, the target was unknown. Now it will recurse on subdir= s and run >>>> the target in the current directory. It is required to recurse as = there >>>> may be subdirs that have objs in their directory or in the object d= irectory, >>>> so it is not enough to just delete the objdir of the subdir parent.= >=20 > ... >=20 >> You sent no text... >=20 > Hit send on my phone by accident. >=20 > make cleanobj appears broken with bsd.progs.mk (maybe related to that > makefile snippet). Can you elaborate? It seems fine to me. --=20 Regards, Bryan Drewery --bKiA6M3bwWlGC3GIM8fHTVeTLixgLLIiV 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 iQEcBAEBAgAGBQJWHYs4AAoJEDXXcbtuRpfPWVIIAIiGV4oEdSwAJR5hFqSd83fz RdNywJ6+ke1VoqjpHQV0Sq3wI81QsfNi5dzuytc4jpej/35nPpAko69q97DQVQFn 0vrw7HtNMuZM9r4YnRPl+TGcOaNAgaiZB8T6RxkO638fMOLIKGOsxGoZKaadRXoF oZXyQT0LiPe7cnXFOTD/OympQwco1kMUqSv7AYR3LfQaebPmcb2zXLFYcWEe5Zcj vyX9X0t/wz2EN/GHEAED+6ucx4XOSwqYLPCNFsk4ZThkU6SY/M/4f7gX76d440rD oe0+EBbfJb5Xe4g55CfdwYUiX9LbtSYfg/N9KHD7tvj/kCzXxg9YlFUe5V3WrLg= =eYV4 -----END PGP SIGNATURE----- --bKiA6M3bwWlGC3GIM8fHTVeTLixgLLIiV-- From owner-svn-src-all@freebsd.org Tue Oct 13 22:55:18 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id AB159A12130; Tue, 13 Oct 2015 22:55:18 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5A6991C64; Tue, 13 Oct 2015 22:55:18 +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 t9DMtHcE000698; Tue, 13 Oct 2015 22:55:17 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9DMtHpe000697; Tue, 13 Oct 2015 22:55:17 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <201510132255.t9DMtHpe000697@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Tue, 13 Oct 2015 22:55:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289269 - head/usr.sbin/tzsetup X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Oct 2015 22:55:18 -0000 Author: delphij Date: Tue Oct 13 22:55:17 2015 New Revision: 289269 URL: https://svnweb.freebsd.org/changeset/base/289269 Log: Use chroot(2) instead of using prefixes for files. Previously, the code prefixes the chroot path to actual file paths to simulate the effect. This, however, will not work for tzset(3) which expects the current system have a working set of timezone data files, and that is not always the case. This changeset simplifies the handling of paths and use an actual chroot(2) call to implement the effect. PR: bin/197313 MFC after: 2 weeks Modified: head/usr.sbin/tzsetup/tzsetup.c Modified: head/usr.sbin/tzsetup/tzsetup.c ============================================================================== --- head/usr.sbin/tzsetup/tzsetup.c Tue Oct 13 21:34:54 2015 (r289268) +++ head/usr.sbin/tzsetup/tzsetup.c Tue Oct 13 22:55:17 2015 (r289269) @@ -40,6 +40,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include @@ -944,23 +945,18 @@ main(int argc, char **argv) if (argc - optind > 1) usage(); - if (chrootenv == NULL) { - strcpy(path_zonetab, _PATH_ZONETAB); - strcpy(path_iso3166, _PATH_ISO3166); - strcpy(path_zoneinfo, _PATH_ZONEINFO); - strcpy(path_localtime, _PATH_LOCALTIME); - strcpy(path_db, _PATH_DB); - strcpy(path_wall_cmos_clock, _PATH_WALL_CMOS_CLOCK); - } else { - sprintf(path_zonetab, "%s/%s", chrootenv, _PATH_ZONETAB); - sprintf(path_iso3166, "%s/%s", chrootenv, _PATH_ISO3166); - sprintf(path_zoneinfo, "%s/%s", chrootenv, _PATH_ZONEINFO); - sprintf(path_localtime, "%s/%s", chrootenv, _PATH_LOCALTIME); - sprintf(path_db, "%s/%s", chrootenv, _PATH_DB); - sprintf(path_wall_cmos_clock, "%s/%s", chrootenv, - _PATH_WALL_CMOS_CLOCK); + if (chrootenv != NULL) { + rv = chroot(chrootenv); + if (rv != 0) + err(EX_OSERR, "chroot to %s", chrootenv); } + strcpy(path_zonetab, _PATH_ZONETAB); + strcpy(path_iso3166, _PATH_ISO3166); + strcpy(path_zoneinfo, _PATH_ZONEINFO); + strcpy(path_localtime, _PATH_LOCALTIME); + strcpy(path_db, _PATH_DB); + strcpy(path_wall_cmos_clock, _PATH_WALL_CMOS_CLOCK); /* Override the user-supplied umask. */ (void)umask(S_IWGRP | S_IWOTH); From owner-svn-src-all@freebsd.org Tue Oct 13 23:30:33 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8B773A12BEB; Tue, 13 Oct 2015 23:30:33 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: from mail-qg0-x232.google.com (mail-qg0-x232.google.com [IPv6:2607:f8b0:400d:c04::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 49092FBC; Tue, 13 Oct 2015 23:30:33 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: by qgt47 with SMTP id 47so29209179qgt.2; Tue, 13 Oct 2015 16:30:32 -0700 (PDT) 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=Cc73Z4+pNuvRikEDBA7vsZYDJeB0CAYPOyanv6252V8=; b=uLzhm6y4qOK25FoTG/QwGDWxF4NSNSlyTCZzVmTaQAaPj7fnJQ/xRfjYKd3mbUSoZ8 TMPgtQzsXWUu7r/a2Nzl2QqGIcShaLo8+rWV3cNmhbmHi49MFVhLDMstTFYUcToxjBRG neTnG38gq3vhAT+LOdoFa48FuPmw3fPEv7n/UHYZLV812WQ0JwKP9hBYXXdXMkT5GUIa RRCaDZyDzti19X1jYc+Eh2+J9Vgn+wjHoPYcpWTOmU+txaBQ6wVqrY7uf/bYKLNDCA7h DmRU9zXXSQMLpRfVkqmW4hm1CtB9VopRarVGnRBCfcI+jtUtw9vQzI3qnuwATwF8r+Fj +/RQ== MIME-Version: 1.0 X-Received: by 10.140.144.8 with SMTP id 8mr118186qhq.54.1444779032278; Tue, 13 Oct 2015 16:30:32 -0700 (PDT) Received: by 10.140.88.180 with HTTP; Tue, 13 Oct 2015 16:30:32 -0700 (PDT) In-Reply-To: <561D8B38.7030202@FreeBSD.org> References: <201510131911.t9DJBMTc034025@repo.freebsd.org> <561D7549.2070202@FreeBSD.org> <561D8B38.7030202@FreeBSD.org> Date: Tue, 13 Oct 2015 16:30:32 -0700 Message-ID: Subject: Re: svn commit: r289253 - head/share/mk From: NGie Cooper To: Bryan Drewery Cc: "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Content-Type: text/plain; charset=UTF-8 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Oct 2015 23:30:33 -0000 On Tue, Oct 13, 2015 at 3:52 PM, Bryan Drewery wrote: > On 10/13/2015 3:51 PM, NGie Cooper wrote: >> On Tue, Oct 13, 2015 at 2:19 PM, Bryan Drewery wrote: >> ... >>>>> On Oct 13, 2015, at 12:11, Bryan Drewery wrote: >>>>> >>>>> Author: bdrewery >>>>> Date: Tue Oct 13 19:11:22 2015 >>>>> New Revision: 289253 >>>>> URL: https://svnweb.freebsd.org/changeset/base/289253 >>>>> >>>>> Log: >>>>> bsd.subdir.mk: Handle cleanobj. >>>>> >>>>> Before this, the target was unknown. Now it will recurse on subdirs and run >>>>> the target in the current directory. It is required to recurse as there >>>>> may be subdirs that have objs in their directory or in the object directory, >>>>> so it is not enough to just delete the objdir of the subdir parent. >> >> ... >> >>> You sent no text... >> >> Hit send on my phone by accident. >> >> make cleanobj appears broken with bsd.progs.mk (maybe related to that >> makefile snippet). > > Can you elaborate? It seems fine to me. (cd tests; make cleandir) # does not seem to clean up everything that was created, like before From owner-svn-src-all@freebsd.org Tue Oct 13 23:30:56 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1345DA12C7F for ; Tue, 13 Oct 2015 23:30:56 +0000 (UTC) (envelope-from peter@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id BBDAF1150; Tue, 13 Oct 2015 23:30:55 +0000 (UTC) (envelope-from peter@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t9DNUsXu011473; Tue, 13 Oct 2015 23:30:54 GMT (envelope-from peter@FreeBSD.org) Received: (from peter@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9DNUs2t011472; Tue, 13 Oct 2015 23:30:54 GMT (envelope-from peter@FreeBSD.org) Message-Id: <201510132330.t9DNUs2t011472@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: peter set sender to peter@FreeBSD.org using -f From: Peter Wemm Date: Tue, 13 Oct 2015 23:30:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org Subject: svn commit: r289270 - X-SVN-Group: defaults MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Oct 2015 23:30:56 -0000 Author: peter Date: Tue Oct 13 23:30:54 2015 New Revision: 289270 URL: https://svnweb.freebsd.org/changeset/base/289270 Log: Add *.po to auto-props Submitted by: wblock Modified: Directory Properties: / (props changed) From owner-svn-src-all@freebsd.org Tue Oct 13 23:37:10 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 43384A12E08; Tue, 13 Oct 2015 23:37:10 +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 2816814AA; Tue, 13 Oct 2015 23:37:10 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from mail.xzibition.com (localhost [IPv6:::1]) by freefall.freebsd.org (Postfix) with ESMTP id 209471908; Tue, 13 Oct 2015 23:37:10 +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 CB5AB14557; Tue, 13 Oct 2015 23:37:09 +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 J5zAv_BRS8Li; Tue, 13 Oct 2015 23:37:02 +0000 (UTC) Subject: Re: svn commit: r289253 - head/share/mk DKIM-Filter: OpenDKIM Filter v2.9.2 mail.xzibition.com 194B71454F To: NGie Cooper References: <201510131911.t9DJBMTc034025@repo.freebsd.org> <561D7549.2070202@FreeBSD.org> <561D8B38.7030202@FreeBSD.org> Cc: "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" From: Bryan Drewery Openpgp: id=F9173CB2C3AAEA7A5C8A1F0935D771BB6E4697CF; url=http://www.shatow.net/bryan/bryan2.asc Organization: FreeBSD Message-ID: <561D959E.4010902@FreeBSD.org> Date: Tue, 13 Oct 2015 16:37:02 -0700 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0 MIME-Version: 1.0 In-Reply-To: Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="T97H2wWPoDwBKNEaGKimr8RDH9ijtBCTb" X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Oct 2015 23:37:10 -0000 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --T97H2wWPoDwBKNEaGKimr8RDH9ijtBCTb Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 10/13/2015 4:30 PM, NGie Cooper wrote: > On Tue, Oct 13, 2015 at 3:52 PM, Bryan Drewery w= rote: >> On 10/13/2015 3:51 PM, NGie Cooper wrote: >>> On Tue, Oct 13, 2015 at 2:19 PM, Bryan Drewery = wrote: >>> ... >>>>>> On Oct 13, 2015, at 12:11, Bryan Drewery wr= ote: >>>>>> >>>>>> Author: bdrewery >>>>>> Date: Tue Oct 13 19:11:22 2015 >>>>>> New Revision: 289253 >>>>>> URL: https://svnweb.freebsd.org/changeset/base/289253 >>>>>> >>>>>> Log: >>>>>> bsd.subdir.mk: Handle cleanobj. >>>>>> >>>>>> Before this, the target was unknown. Now it will recurse on subd= irs and run >>>>>> the target in the current directory. It is required to recurse a= s there >>>>>> may be subdirs that have objs in their directory or in the object= directory, >>>>>> so it is not enough to just delete the objdir of the subdir paren= t. >>> >>> ... >>> >>>> You sent no text... >>> >>> Hit send on my phone by accident. >>> >>> make cleanobj appears broken with bsd.progs.mk (maybe related to that= >>> makefile snippet). >> >> Can you elaborate? It seems fine to me. >=20 > (cd tests; make cleandir) # does not seem to clean up everything that > was created, like before >=20 Specifically what is not cleaned? --=20 Regards, Bryan Drewery --T97H2wWPoDwBKNEaGKimr8RDH9ijtBCTb 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 iQEcBAEBAgAGBQJWHZWeAAoJEDXXcbtuRpfPyPQH/1UQ9F+2sgrO72qXcfyNGMZu UAD1h1J3NpvfK5Tx6ajNhvvANb+Fe4wxIrrL3iY8u9gMZ6sB507L9jPNne5sAb/0 UB7sTyskNC2R2X40U/D3ICKwMxXmJ3m6+9IYfQs9PYhl1sTVutsE8rvNyrGv0XlW CUmV2kxvX1sdA1Jtm4g3GUcQq7ve9vL9wqe8P9TfbAOZthyu+o02zcnAbmTSnjVA eGGkWBTJpT06R6vjkyG1uqoGCWXPtAwxA4qJx/Rn50ASu/Oml94bsnUKCRLGiDvc Zy+LQRJr+7yD3NSqfxHcxZj64uYHU2p+L/Gz8HHaapfxUcEMfgLmi+kBlMlcknQ= =+tY9 -----END PGP SIGNATURE----- --T97H2wWPoDwBKNEaGKimr8RDH9ijtBCTb-- From owner-svn-src-all@freebsd.org Tue Oct 13 23:41:08 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 17AA6A13066; Tue, 13 Oct 2015 23:41:08 +0000 (UTC) (envelope-from cem@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C8C6619B1; Tue, 13 Oct 2015 23:41:07 +0000 (UTC) (envelope-from cem@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t9DNf6lF014384; Tue, 13 Oct 2015 23:41:06 GMT (envelope-from cem@FreeBSD.org) Received: (from cem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9DNf6nq014382; Tue, 13 Oct 2015 23:41:06 GMT (envelope-from cem@FreeBSD.org) Message-Id: <201510132341.t9DNf6nq014382@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cem set sender to cem@FreeBSD.org using -f From: "Conrad E. Meyer" Date: Tue, 13 Oct 2015 23:41:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289271 - head/sys/dev/ntb/ntb_hw X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Oct 2015 23:41:08 -0000 Author: cem Date: Tue Oct 13 23:41:06 2015 New Revision: 289271 URL: https://svnweb.freebsd.org/changeset/base/289271 Log: NTB: MFV c529aa30: Xeon Doorbell errata workaround Modifications to the 14th bit of the B2BDOORBELL register will not be mirrored to the remote system due to a hardware issue. To get around the issue, shrink the number of available doorbell bits by 1. The max number of doorbells was being used as a way to referencing the Link Doorbell bit. Since this would no longer work, the driver must now explicitly reference that bit. This does not affect the xeon_errata_workaround case, as it is not using the b2bdoorbell register. Authored by: Jon Mason Obtained from: Linux (Dual BSD/GPL driver) Sponsored by: EMC / Isilon Storage Division Modified: head/sys/dev/ntb/ntb_hw/ntb_hw.c head/sys/dev/ntb/ntb_hw/ntb_regs.h Modified: head/sys/dev/ntb/ntb_hw/ntb_hw.c ============================================================================== --- head/sys/dev/ntb/ntb_hw/ntb_hw.c Tue Oct 13 23:30:54 2015 (r289270) +++ head/sys/dev/ntb/ntb_hw/ntb_hw.c Tue Oct 13 23:41:06 2015 (r289271) @@ -479,7 +479,7 @@ ntb_setup_interrupts(struct ntb_softc *n ntb_reg_write(8, ntb->reg_ofs.ldb_mask, ~0); else ntb_reg_write(2, ntb->reg_ofs.ldb_mask, - ~(1 << ntb->limits.max_db_bits)); + (uint16_t) ~(1 << XEON_LINK_DB)); num_vectors = MIN(pci_msix_count(ntb->device), ntb->limits.max_db_bits); @@ -616,7 +616,7 @@ handle_xeon_event_irq(void *arg) device_printf(ntb->device, "Error determining link status\n"); /* bit 15 is always the link bit */ - ntb_reg_write(2, ntb->reg_ofs.ldb, 1 << ntb->limits.max_db_bits); + ntb_reg_write(2, ntb->reg_ofs.ldb, 1 << XEON_LINK_DB); } static void @@ -784,6 +784,19 @@ ntb_setup_xeon(struct ntb_softc *ntb) ntb->limits.msix_cnt = XEON_MSIX_CNT; ntb->bits_per_vector = XEON_DB_BITS_PER_VEC; + /* + * HW Errata on bit 14 of b2bdoorbell register. Writes will not be + * mirrored to the remote system. Shrink the number of bits by one, + * since bit 14 is the last bit. + * + * On REGS_THRU_MW errata mode, we don't use the b2bdoorbell register + * anyway. Nor for non-B2B connection types. + */ + if (HAS_FEATURE(NTB_B2BDOORBELL_BIT14) && + !HAS_FEATURE(NTB_REGS_THRU_MW) && + connection_type == NTB_CONN_B2B) + ntb->limits.max_db_bits = XEON_MAX_DB_BITS - 1; + configure_xeon_secondary_side_bars(ntb); /* Enable Bus Master and Memory Space on the secondary side */ Modified: head/sys/dev/ntb/ntb_hw/ntb_regs.h ============================================================================== --- head/sys/dev/ntb/ntb_hw/ntb_regs.h Tue Oct 13 23:30:54 2015 (r289270) +++ head/sys/dev/ntb/ntb_hw/ntb_regs.h Tue Oct 13 23:41:06 2015 (r289271) @@ -38,6 +38,7 @@ #define XEON_MAX_COMPAT_SPADS 16 /* Reserve the uppermost bit for link interrupt */ #define XEON_MAX_DB_BITS 15 +#define XEON_LINK_DB 15 #define XEON_DB_BITS_PER_VEC 5 #define XEON_DB_HW_LINK 0x8000 From owner-svn-src-all@freebsd.org Tue Oct 13 23:41:41 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A0521A130B0; Tue, 13 Oct 2015 23:41:41 +0000 (UTC) (envelope-from cem@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 79D3D1B7D; Tue, 13 Oct 2015 23:41:41 +0000 (UTC) (envelope-from cem@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t9DNfe89015048; Tue, 13 Oct 2015 23:41:40 GMT (envelope-from cem@FreeBSD.org) Received: (from cem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9DNfeGr015047; Tue, 13 Oct 2015 23:41:40 GMT (envelope-from cem@FreeBSD.org) Message-Id: <201510132341.t9DNfeGr015047@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cem set sender to cem@FreeBSD.org using -f From: "Conrad E. Meyer" Date: Tue, 13 Oct 2015 23:41:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289272 - head/sys/dev/ntb/ntb_hw X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Oct 2015 23:41:41 -0000 Author: cem Date: Tue Oct 13 23:41:40 2015 New Revision: 289272 URL: https://svnweb.freebsd.org/changeset/base/289272 Log: NTB: MFV 9fec60c4: Fix NTB-RP Link Up The Xeon NTB-RP setup, the transparent side does not get a link up/down interrupt. Since the presence of a NTB device on the transparent side means that we have a NTB link up, we can work around the lack of an interrupt by simply calling the link up function to notify the upper layers. Authored by: Jon Mason Obtained from: Linux (Dual BSD/GPL driver) Sponsored by: EMC / Isilon Storage Division Modified: head/sys/dev/ntb/ntb_hw/ntb_hw.c Modified: head/sys/dev/ntb/ntb_hw/ntb_hw.c ============================================================================== --- head/sys/dev/ntb/ntb_hw/ntb_hw.c Tue Oct 13 23:41:06 2015 (r289271) +++ head/sys/dev/ntb/ntb_hw/ntb_hw.c Tue Oct 13 23:41:40 2015 (r289272) @@ -207,13 +207,15 @@ static void ntb_handle_legacy_interrupt( static int ntb_create_callbacks(struct ntb_softc *ntb, int num_vectors); static void ntb_free_callbacks(struct ntb_softc *ntb); static struct ntb_hw_info *ntb_get_device_info(uint32_t device_id); -static int ntb_initialize_hw(struct ntb_softc *ntb); static int ntb_setup_xeon(struct ntb_softc *ntb); static int ntb_setup_soc(struct ntb_softc *ntb); +static void ntb_teardown_xeon(struct ntb_softc *ntb); static void configure_soc_secondary_side_bars(struct ntb_softc *ntb); static void configure_xeon_secondary_side_bars(struct ntb_softc *ntb); static void ntb_handle_heartbeat(void *arg); static void ntb_handle_link_event(struct ntb_softc *ntb, int link_state); +static void ntb_hw_link_down(struct ntb_softc *ntb); +static void ntb_hw_link_up(struct ntb_softc *ntb); static void recover_soc_link(void *arg); static int ntb_check_link_status(struct ntb_softc *ntb); static void save_bar_parameters(struct ntb_pci_bar_info *bar); @@ -301,7 +303,10 @@ ntb_attach(device_t device) error = ntb_map_pci_bars(ntb); if (error) goto out; - error = ntb_initialize_hw(ntb); + if (ntb->type == NTB_SOC) + error = ntb_setup_soc(ntb); + else + error = ntb_setup_xeon(ntb); if (error) goto out; error = ntb_setup_interrupts(ntb); @@ -324,6 +329,8 @@ ntb_detach(device_t device) ntb = DEVICE2SOFTC(device); callout_drain(&ntb->heartbeat_timer); callout_drain(&ntb->lr_timer); + if (ntb->type == NTB_XEON) + ntb_teardown_xeon(ntb); ntb_teardown_interrupts(ntb); ntb_unmap_pci_bar(ntb); @@ -691,14 +698,11 @@ ntb_get_device_info(uint32_t device_id) return (NULL); } -static int -ntb_initialize_hw(struct ntb_softc *ntb) +static void +ntb_teardown_xeon(struct ntb_softc *ntb) { - if (ntb->type == NTB_SOC) - return (ntb_setup_soc(ntb)); - else - return (ntb_setup_xeon(ntb)); + ntb_hw_link_down(ntb); } static int @@ -805,8 +809,7 @@ ntb_setup_xeon(struct ntb_softc *ntb) PCIM_CMD_MEMEN | PCIM_CMD_BUSMASTEREN); /* Enable link training */ - ntb_reg_write(4, ntb->reg_ofs.lnk_cntl, - NTB_CNTL_BAR23_SNOOP | NTB_CNTL_BAR45_SNOOP); + ntb_hw_link_up(ntb); return (0); } @@ -1040,6 +1043,33 @@ ntb_handle_link_event(struct ntb_softc * } static void +ntb_hw_link_up(struct ntb_softc *ntb) +{ + + if (ntb->conn_type == NTB_CONN_TRANSPARENT) + ntb_handle_link_event(ntb, NTB_LINK_UP); + else + ntb_reg_write(4, ntb->reg_ofs.lnk_cntl, + NTB_CNTL_BAR23_SNOOP | NTB_CNTL_BAR45_SNOOP); +} + +static void +ntb_hw_link_down(struct ntb_softc *ntb) +{ + uint32_t cntl; + + if (ntb->conn_type == NTB_CONN_TRANSPARENT) { + ntb_handle_link_event(ntb, NTB_LINK_DOWN); + return; + } + + cntl = ntb_reg_read(4, ntb->reg_ofs.lnk_cntl); + cntl &= ~(NTB_CNTL_BAR23_SNOOP | NTB_CNTL_BAR45_SNOOP); + cntl |= NTB_CNTL_LINK_DISABLE; + ntb_reg_write(4, ntb->reg_ofs.lnk_cntl, cntl); +} + +static void recover_soc_link(void *arg) { struct ntb_softc *ntb = arg; From owner-svn-src-all@freebsd.org Tue Oct 13 23:42:04 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E450DA130F6; Tue, 13 Oct 2015 23:42:04 +0000 (UTC) (envelope-from yaneurabeya@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 A0B0E1D5C; Tue, 13 Oct 2015 23:42:04 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: by qgeb31 with SMTP id b31so29337027qge.0; Tue, 13 Oct 2015 16:42:03 -0700 (PDT) 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=iBRBAJJAceWGHd/9iZphtIoDYJmc3FGKjbYfuy2bmuk=; b=RwaTqENWSHaIiKKDV/TVRCx97a9Hp0pYASBIbFxEPowh8MDGr1bqVbx/fIjVZJzYEU d7nIBZgIr+KRZoHI5q4Owl5WtPMiN7v72WCOiFb6JvtFSeZuNfwcC2S3QPVfp5OkCfpJ UD+5AMMAQRVYUB+vcbw/Ul4uS4bgBUpER/HNuJcSy3YzyTlvwj89+mF8fX4TDLKzlRs2 EqgcNxpO/5gsa+AoJS03EzfQiJ1pGW/XC64ZAQismWKyU0nqbGI2ZMwEtGCBp5ulDksm m2vuNcKonb5p3gaqLh6H7lKle7TrzuPkhRzl93/p6FsGi5NiUAMasHMBEjC6doU6Q9i7 kqQQ== MIME-Version: 1.0 X-Received: by 10.140.217.70 with SMTP id n67mr152189qhb.96.1444779723667; Tue, 13 Oct 2015 16:42:03 -0700 (PDT) Received: by 10.140.88.180 with HTTP; Tue, 13 Oct 2015 16:42:03 -0700 (PDT) In-Reply-To: <561D959E.4010902@FreeBSD.org> References: <201510131911.t9DJBMTc034025@repo.freebsd.org> <561D7549.2070202@FreeBSD.org> <561D8B38.7030202@FreeBSD.org> <561D959E.4010902@FreeBSD.org> Date: Tue, 13 Oct 2015 16:42:03 -0700 Message-ID: Subject: Re: svn commit: r289253 - head/share/mk From: NGie Cooper To: Bryan Drewery Cc: "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Content-Type: text/plain; charset=UTF-8 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Oct 2015 23:42:05 -0000 On Tue, Oct 13, 2015 at 4:37 PM, Bryan Drewery wrote: ... > Specifically what is not cleaned? Generated files. I might come up with something more concrete in the next week or so. If not, feel free to ignore this email. From owner-svn-src-all@freebsd.org Tue Oct 13 23:42:14 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id F19A2A13121; Tue, 13 Oct 2015 23:42:14 +0000 (UTC) (envelope-from cem@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id BCEA01EA0; Tue, 13 Oct 2015 23:42:14 +0000 (UTC) (envelope-from cem@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t9DNgDe3015111; Tue, 13 Oct 2015 23:42:13 GMT (envelope-from cem@FreeBSD.org) Received: (from cem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9DNgDR4015110; Tue, 13 Oct 2015 23:42:13 GMT (envelope-from cem@FreeBSD.org) Message-Id: <201510132342.t9DNgDR4015110@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cem set sender to cem@FreeBSD.org using -f From: "Conrad E. Meyer" Date: Tue, 13 Oct 2015 23:42:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289273 - head/sys/dev/ntb/if_ntb X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Oct 2015 23:42:15 -0000 Author: cem Date: Tue Oct 13 23:42:13 2015 New Revision: 289273 URL: https://svnweb.freebsd.org/changeset/base/289273 Log: NTB: MFV fca4d518: Fix ntb_transport link down race A WARN_ON is being hit in ntb_qp_link_work due to the NTB transport link being down while the ntb qp link is still active. This is caused by the transport link being brought down prior to the qp link worker thread being terminated. To correct this, shutdown the qp's prior to bringing the transport link down. Also, only call the qp worker thread if it is in interrupt context, otherwise call the function directly. Authored by: Jon Mason Obtained from: Linux (Dual BSD/GPL driver) Sponsored by: EMC / Isilon Storage Division Modified: head/sys/dev/ntb/if_ntb/if_ntb.c Modified: head/sys/dev/ntb/if_ntb/if_ntb.c ============================================================================== --- head/sys/dev/ntb/if_ntb/if_ntb.c Tue Oct 13 23:41:40 2015 (r289272) +++ head/sys/dev/ntb/if_ntb/if_ntb.c Tue Oct 13 23:42:13 2015 (r289273) @@ -519,7 +519,7 @@ ntb_transport_free(void *transport) struct ntb_softc *ntb = nt->ntb; int i; - nt->transport_link = NTB_LINK_DOWN; + ntb_transport_link_cleanup(nt); callout_drain(&nt->link_work); @@ -1257,16 +1257,16 @@ ntb_transport_link_cleanup(struct ntb_ne { int i; - if (nt->transport_link == NTB_LINK_DOWN) - callout_drain(&nt->link_work); - else - nt->transport_link = NTB_LINK_DOWN; - /* Pass along the info to any clients */ for (i = 0; i < nt->max_qps; i++) if (!test_bit(i, &nt->qp_bitmap)) ntb_qp_link_down(&nt->qps[i]); + if (nt->transport_link == NTB_LINK_DOWN) + callout_drain(&nt->link_work); + else + nt->transport_link = NTB_LINK_DOWN; + /* * The scratchpad registers keep the values if the remote side * goes down, blast them now to give them a sane value the next From owner-svn-src-all@freebsd.org Tue Oct 13 23:43:04 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 17BD6A13188; Tue, 13 Oct 2015 23:43:04 +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 F04ED51; Tue, 13 Oct 2015 23:43:03 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from mail.xzibition.com (localhost [IPv6:::1]) by freefall.freebsd.org (Postfix) with ESMTP id E9C461FA1; Tue, 13 Oct 2015 23:43: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 BECE81459A; Tue, 13 Oct 2015 23:43:03 +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 0CBnPrd08wSg; Tue, 13 Oct 2015 23:43:01 +0000 (UTC) Subject: Re: svn commit: r289253 - head/share/mk DKIM-Filter: OpenDKIM Filter v2.9.2 mail.xzibition.com 750B214593 To: NGie Cooper References: <201510131911.t9DJBMTc034025@repo.freebsd.org> <561D7549.2070202@FreeBSD.org> <561D8B38.7030202@FreeBSD.org> <561D959E.4010902@FreeBSD.org> Cc: "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" From: Bryan Drewery Openpgp: id=F9173CB2C3AAEA7A5C8A1F0935D771BB6E4697CF; url=http://www.shatow.net/bryan/bryan2.asc Organization: FreeBSD Message-ID: <561D9707.7000103@FreeBSD.org> Date: Tue, 13 Oct 2015 16:43:03 -0700 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0 MIME-Version: 1.0 In-Reply-To: Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="F17VFkIENMmSxAoPS6F66PEPbuOL5U2an" X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Oct 2015 23:43:04 -0000 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --F17VFkIENMmSxAoPS6F66PEPbuOL5U2an Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 10/13/2015 4:42 PM, NGie Cooper wrote: > On Tue, Oct 13, 2015 at 4:37 PM, Bryan Drewery w= rote: > ... >> Specifically what is not cleaned? >=20 > Generated files. >=20 > I might come up with something more concrete in the next week or so. > If not, feel free to ignore this email. >=20 You're telling me a commit I made a few hours ago broke something and you can't be specific for a week? --=20 Regards, Bryan Drewery --F17VFkIENMmSxAoPS6F66PEPbuOL5U2an 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 iQEcBAEBAgAGBQJWHZcHAAoJEDXXcbtuRpfP1ggH/jACmC53Q1nwhx+ED4Uqevs0 IP7AZqa1bIe8yqgdcntr0sqcIIoIZpCwaNbDlaSkjVazrOocANfH3ITFv8WWBA6c kuEXHzrlawgp7gPmRRXefDT+TOGUYea0eKor0kg5dY6+wgQtXZY8i8LPYLxRb5GQ VuJ+Hp/ktvnt32Ua+n2o77Ee5JDZgnU6k9dZhQx5ekVxH2e1coQ9beAkXjbqywDy 5l6s+UWtWN3MBkXqr7b5BGVdyt0MUR6hNd9UU9BtrrWLHOTVLfDzK6wAsHkq9aTy 7EGtEVOKsCkGqWb+PKdzOg+/h1c4WqX2YR7eIC6J3yYrvG7IWNWidQeipEVJc0c= =6yZh -----END PGP SIGNATURE----- --F17VFkIENMmSxAoPS6F66PEPbuOL5U2an-- From owner-svn-src-all@freebsd.org Tue Oct 13 23:43:07 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 99EEEA131B3; Tue, 13 Oct 2015 23:43:07 +0000 (UTC) (envelope-from cem@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5C8DC77; Tue, 13 Oct 2015 23:43:07 +0000 (UTC) (envelope-from cem@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t9DNh6uv015181; Tue, 13 Oct 2015 23:43:06 GMT (envelope-from cem@FreeBSD.org) Received: (from cem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9DNh63e015180; Tue, 13 Oct 2015 23:43:06 GMT (envelope-from cem@FreeBSD.org) Message-Id: <201510132343.t9DNh63e015180@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cem set sender to cem@FreeBSD.org using -f From: "Conrad E. Meyer" Date: Tue, 13 Oct 2015 23:43:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289274 - head/sys/dev/ntb/ntb_hw X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Oct 2015 23:43:07 -0000 Author: cem Date: Tue Oct 13 23:43:06 2015 New Revision: 289274 URL: https://svnweb.freebsd.org/changeset/base/289274 Log: NTB: MFV 58b88920: Document HW errata Add a comment describing the necessary ordering of modifications to the NTB Limit and Base registers. Authored by: Jon Mason Obtained from: Linux (Dual BSD/GPL driver) Sponsored by: EMC / Isilon Storage Division Modified: head/sys/dev/ntb/ntb_hw/ntb_hw.c Modified: head/sys/dev/ntb/ntb_hw/ntb_hw.c ============================================================================== --- head/sys/dev/ntb/ntb_hw/ntb_hw.c Tue Oct 13 23:42:13 2015 (r289273) +++ head/sys/dev/ntb/ntb_hw/ntb_hw.c Tue Oct 13 23:43:06 2015 (r289274) @@ -764,6 +764,11 @@ ntb_setup_xeon(struct ntb_softc *ntb) * which may hang the system. To workaround this use the second memory * window to access the interrupt and scratch pad registers on the * remote system. + * + * There is another HW errata on the limit registers -- they can only + * be written when the base register is (?)4GB aligned and < 32-bit. + * This should already be the case based on the driver defaults, but + * write the limit registers first just in case. */ if (HAS_FEATURE(NTB_REGS_THRU_MW)) /* From owner-svn-src-all@freebsd.org Wed Oct 14 00:23:33 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3BF65A13BB3; Wed, 14 Oct 2015 00:23:33 +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 03D47156A; Wed, 14 Oct 2015 00:23:32 +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 t9E0NWDC026992; Wed, 14 Oct 2015 00:23:32 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9E0NWHd026991; Wed, 14 Oct 2015 00:23:32 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201510140023.t9E0NWHd026991@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Wed, 14 Oct 2015 00:23:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289275 - head/tools/build/options X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Oct 2015 00:23:33 -0000 Author: emaste Date: Wed Oct 14 00:23:31 2015 New Revision: 289275 URL: https://svnweb.freebsd.org/changeset/base/289275 Log: Add WITHOUT_LLDB for src.conf(5) It will be enabled by default on certain architectures. Added: head/tools/build/options/WITHOUT_LLDB (contents, props changed) Added: head/tools/build/options/WITHOUT_LLDB ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/build/options/WITHOUT_LLDB Wed Oct 14 00:23:31 2015 (r289275) @@ -0,0 +1,2 @@ +.\" $FreeBSD$ +Set to not build the LLDB debugger. From owner-svn-src-all@freebsd.org Wed Oct 14 00:35:39 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 74A09A142A8; Wed, 14 Oct 2015 00:35:39 +0000 (UTC) (envelope-from hiren@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 413061C2C; Wed, 14 Oct 2015 00:35:39 +0000 (UTC) (envelope-from hiren@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t9E0Zcoq030107; Wed, 14 Oct 2015 00:35:38 GMT (envelope-from hiren@FreeBSD.org) Received: (from hiren@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9E0ZbXS030094; Wed, 14 Oct 2015 00:35:37 GMT (envelope-from hiren@FreeBSD.org) Message-Id: <201510140035.t9E0ZbXS030094@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hiren set sender to hiren@FreeBSD.org using -f From: Hiren Panchasara Date: Wed, 14 Oct 2015 00:35:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289276 - in head/sys: conf kern 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 " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Oct 2015 00:35:39 -0000 Author: hiren Date: Wed Oct 14 00:35:37 2015 New Revision: 289276 URL: https://svnweb.freebsd.org/changeset/base/289276 Log: There are times when it would be really nice to have a record of the last few packets and/or state transitions from each TCP socket. That would help with narrowing down certain problems we see in the field that are hard to reproduce without understanding the history of how we got into a certain state. This change provides just that. It saves copies of the last N packets in a list in the tcpcb. When the tcpcb is destroyed, the list is freed. I thought this was likely to be more performance-friendly than saving copies of the tcpcb. Plus, with the packets, you should be able to reverse-engineer what happened to the tcpcb. To enable the feature, you will need to compile a kernel with the TCPPCAP option. Even then, the feature defaults to being deactivated. You can activate it by setting a positive value for the number of captured packets. You can do that on either a global basis or on a per-socket basis (via a setsockopt call). There is no way to get the packets out of the kernel other than using kmem or getting a coredump. I thought that would help some of the legal/privacy concerns regarding such a feature. However, it should be possible to add a future effort to export them in PCAP format. I tested this at low scale, and found that there were no mbuf leaks and the peak mbuf usage appeared to be unchanged with and without the feature. The main performance concern I can envision is the number of mbufs that would be used on systems with a large number of sockets. If you save five packets per direction per socket and have 3,000 sockets, that will consume at least 30,000 mbufs just to keep these packets. I tried to reduce the concerns associated with this by limiting the number of clusters (not mbufs) that could be used for this feature. Again, in my testing, that appears to work correctly. Differential Revision: D3100 Submitted by: Jonathan Looney Reviewed by: gnn, hiren Added: head/sys/netinet/tcp_pcap.c (contents, props changed) head/sys/netinet/tcp_pcap.h (contents, props changed) Modified: head/sys/conf/NOTES head/sys/conf/files head/sys/conf/options head/sys/kern/uipc_mbuf.c head/sys/netinet/tcp.h head/sys/netinet/tcp_input.c head/sys/netinet/tcp_output.c head/sys/netinet/tcp_subr.c head/sys/netinet/tcp_usrreq.c head/sys/netinet/tcp_var.h head/sys/sys/mbuf.h Modified: head/sys/conf/NOTES ============================================================================== --- head/sys/conf/NOTES Wed Oct 14 00:23:31 2015 (r289275) +++ head/sys/conf/NOTES Wed Oct 14 00:35:37 2015 (r289276) @@ -960,6 +960,9 @@ device lagg # for sockets with the SO_DEBUG option set, which can then be examined # using the trpt(8) utility. # +# TCPPCAP enables code which keeps the last n packets sent and received +# on a TCP socket. +# # RADIX_MPATH provides support for equal-cost multi-path routing. # options MROUTING # Multicast routing @@ -976,6 +979,7 @@ options IPFILTER_DEFAULT_BLOCK #block a options IPSTEALTH #support for stealth forwarding options PF_DEFAULT_TO_DROP #drop everything by default options TCPDEBUG +options TCPPCAP options RADIX_MPATH # The MBUF_STRESS_TEST option enables options which create Modified: head/sys/conf/files ============================================================================== --- head/sys/conf/files Wed Oct 14 00:23:31 2015 (r289275) +++ head/sys/conf/files Wed Oct 14 00:35:37 2015 (r289276) @@ -3682,6 +3682,7 @@ netinet/tcp_input.c optional inet | ine netinet/tcp_lro.c optional inet | inet6 netinet/tcp_output.c optional inet | inet6 netinet/tcp_offload.c optional tcp_offload inet | tcp_offload inet6 +netinet/tcp_pcap.c optional tcppcap netinet/tcp_reass.c optional inet | inet6 netinet/tcp_sack.c optional inet | inet6 netinet/tcp_subr.c optional inet | inet6 Modified: head/sys/conf/options ============================================================================== --- head/sys/conf/options Wed Oct 14 00:23:31 2015 (r289275) +++ head/sys/conf/options Wed Oct 14 00:35:37 2015 (r289276) @@ -436,6 +436,7 @@ ROUTETABLES opt_route.h RSS opt_rss.h SLIP_IFF_OPTS opt_slip.h TCPDEBUG +TCPPCAP opt_global.h SIFTR TCP_OFFLOAD opt_inet.h # Enable code to dispatch TCP offloading TCP_SIGNATURE opt_inet.h Modified: head/sys/kern/uipc_mbuf.c ============================================================================== --- head/sys/kern/uipc_mbuf.c Wed Oct 14 00:23:31 2015 (r289275) +++ head/sys/kern/uipc_mbuf.c Wed Oct 14 00:35:37 2015 (r289276) @@ -395,7 +395,7 @@ mb_free_ext(struct mbuf *m) * Attach the cluster from *m to *n, set up m_ext in *n * and bump the refcount of the cluster. */ -static void +void mb_dupcl(struct mbuf *n, const struct mbuf *m) { Modified: head/sys/netinet/tcp.h ============================================================================== --- head/sys/netinet/tcp.h Wed Oct 14 00:23:31 2015 (r289275) +++ head/sys/netinet/tcp.h Wed Oct 14 00:35:37 2015 (r289276) @@ -165,6 +165,8 @@ struct tcphdr { #define TCP_KEEPIDLE 256 /* L,N,X start keeplives after this period */ #define TCP_KEEPINTVL 512 /* L,N interval between keepalives */ #define TCP_KEEPCNT 1024 /* L,N number of keepalives before close */ +#define TCP_PCAP_OUT 2048 /* number of output packets to keep */ +#define TCP_PCAP_IN 4096 /* number of input packets to keep */ /* Start of reserved space for third-party user-settable options. */ #define TCP_VENDOR SO_VENDOR Modified: head/sys/netinet/tcp_input.c ============================================================================== --- head/sys/netinet/tcp_input.c Wed Oct 14 00:23:31 2015 (r289275) +++ head/sys/netinet/tcp_input.c Wed Oct 14 00:35:37 2015 (r289276) @@ -104,6 +104,9 @@ __FBSDID("$FreeBSD$"); #include #include #include +#ifdef TCPPCAP +#include +#endif #include #ifdef TCPDEBUG #include @@ -1524,6 +1527,11 @@ tcp_do_segment(struct mbuf *m, struct tc KASSERT(tp->t_state != TCPS_TIME_WAIT, ("%s: TCPS_TIME_WAIT", __func__)); +#ifdef TCPPCAP + /* Save segment, if requested. */ + tcp_pcap_add(th, m, &(tp->t_inpkts)); +#endif + /* * Segment received on connection. * Reset idle time and keep-alive timer. Modified: head/sys/netinet/tcp_output.c ============================================================================== --- head/sys/netinet/tcp_output.c Wed Oct 14 00:23:31 2015 (r289275) +++ head/sys/netinet/tcp_output.c Wed Oct 14 00:35:37 2015 (r289276) @@ -74,6 +74,9 @@ __FBSDID("$FreeBSD$"); #include #include #include +#ifdef TCPPCAP +#include +#endif #ifdef TCPDEBUG #include #endif @@ -1305,6 +1308,11 @@ send: TCP_PROBE5(send, NULL, tp, ip6, tp, th); +#ifdef TCPPCAP + /* Save packet, if requested. */ + tcp_pcap_add(th, m, &(tp->t_outpkts)); +#endif + /* TODO: IPv6 IP6TOS_ECT bit on */ error = ip6_output(m, tp->t_inpcb->in6p_outputopts, &ro, ((so->so_options & SO_DONTROUTE) ? IP_ROUTETOIF : 0), @@ -1348,6 +1356,11 @@ send: TCP_PROBE5(send, NULL, tp, ip, tp, th); +#ifdef TCPPCAP + /* Save packet, if requested. */ + tcp_pcap_add(th, m, &(tp->t_outpkts)); +#endif + error = ip_output(m, tp->t_inpcb->inp_options, &ro, ((so->so_options & SO_DONTROUTE) ? IP_ROUTETOIF : 0), 0, tp->t_inpcb); Added: head/sys/netinet/tcp_pcap.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/netinet/tcp_pcap.c Wed Oct 14 00:35:37 2015 (r289276) @@ -0,0 +1,437 @@ +/*- + * Copyright (c) 2015 + * Jonathan Looney. 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 +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#define M_LEADINGSPACE_NOWRITE(m) \ + ((m)->m_data - M_START(m)) + +static int tcp_pcap_clusters_referenced_cur = 0; +static int tcp_pcap_clusters_referenced_max = 0; + +SYSCTL_INT(_net_inet_tcp, OID_AUTO, tcp_pcap_clusters_referenced_cur, + CTLFLAG_RD, &tcp_pcap_clusters_referenced_cur, 0, + "Number of clusters currently referenced on TCP PCAP queues"); +SYSCTL_INT(_net_inet_tcp, OID_AUTO, tcp_pcap_clusters_referenced_max, + CTLFLAG_RW, &tcp_pcap_clusters_referenced_max, 0, + "Maximum number of clusters allowed to be referenced on TCP PCAP " + "queues"); + +static int tcp_pcap_alloc_reuse_ext = 0; +static int tcp_pcap_alloc_reuse_mbuf = 0; +static int tcp_pcap_alloc_new_mbuf = 0; +SYSCTL_INT(_net_inet_tcp, OID_AUTO, tcp_pcap_alloc_reuse_ext, + CTLFLAG_RD, &tcp_pcap_alloc_reuse_ext, 0, + "Number of mbufs with external storage reused for the TCP PCAP " + "functionality"); +SYSCTL_INT(_net_inet_tcp, OID_AUTO, tcp_pcap_alloc_reuse_mbuf, + CTLFLAG_RD, &tcp_pcap_alloc_reuse_mbuf, 0, + "Number of mbufs with internal storage reused for the TCP PCAP " + "functionality"); +SYSCTL_INT(_net_inet_tcp, OID_AUTO, tcp_pcap_alloc_new_mbuf, + CTLFLAG_RD, &tcp_pcap_alloc_new_mbuf, 0, + "Number of new mbufs allocated for the TCP PCAP functionality"); + +VNET_DEFINE(int, tcp_pcap_packets) = 0; +#define V_tcp_pcap_packets VNET(tcp_pcap_packets) +SYSCTL_INT(_net_inet_tcp, OID_AUTO, tcp_pcap_packets, CTLFLAG_RW, + &V_tcp_pcap_packets, 0, "Default number of packets saved per direction " + "per TCPCB"); + +/* Initialize the values. */ +static void +tcp_pcap_max_set() { + tcp_pcap_clusters_referenced_max = nmbclusters / 4; +} + +void +tcp_pcap_init() { + tcp_pcap_max_set(); + EVENTHANDLER_REGISTER(nmbclusters_change, tcp_pcap_max_set, + NULL, EVENTHANDLER_PRI_ANY); +} + +/* + * If we are below the maximum allowed cluster references, + * increment the reference count and return TRUE. Otherwise, + * leave the reference count alone and return FALSE. + */ +static __inline bool +tcp_pcap_take_cluster_reference(void) +{ + if (atomic_fetchadd_int(&tcp_pcap_clusters_referenced_cur, 1) >= + tcp_pcap_clusters_referenced_max) { + atomic_add_int(&tcp_pcap_clusters_referenced_cur, -1); + return FALSE; + } + return TRUE; +} + +/* + * For all the external entries in m, apply the given adjustment. + * This can be used to adjust the counter when an mbuf chain is + * copied or freed. + */ +static __inline void +tcp_pcap_adj_cluster_reference(struct mbuf *m, int adj) +{ + while (m) { + if (m->m_flags & M_EXT) + atomic_add_int(&tcp_pcap_clusters_referenced_cur, adj); + + m = m->m_next; + } +} + +/* + * Free all mbufs in a chain, decrementing the reference count as + * necessary. + * + * Functions in this file should use this instead of m_freem() when + * they are freeing mbuf chains that may contain clusters that were + * already included in tcp_pcap_clusters_referenced_cur. + */ +static void +tcp_pcap_m_freem(struct mbuf *mb) +{ + while (mb != NULL) { + if (mb->m_flags & M_EXT) + atomic_subtract_int(&tcp_pcap_clusters_referenced_cur, + 1); + mb = m_free(mb); + } +} + +/* + * Copy data from m to n, where n cannot fit all the data we might + * want from m. + * + * Prioritize data like this: + * 1. TCP header + * 2. IP header + * 3. Data + */ +static void +tcp_pcap_copy_bestfit(struct tcphdr *th, struct mbuf *m, struct mbuf *n) +{ + struct mbuf *m_cur = m; + int bytes_to_copy=0, trailing_data, skip=0, tcp_off; + + /* Below, we assume these will be non-NULL. */ + KASSERT(th, ("%s: called with th == NULL", __func__)); + KASSERT(m, ("%s: called with m == NULL", __func__)); + KASSERT(n, ("%s: called with n == NULL", __func__)); + + /* We assume this initialization occurred elsewhere. */ + KASSERT(n->m_len == 0, ("%s: called with n->m_len=%d (expected 0)", + __func__, n->m_len)); + KASSERT(n->m_data == M_START(n), + ("%s: called with n->m_data != M_START(n)", __func__)); + + /* + * Calculate the size of the TCP header. We use this often + * enough that it is worth just calculating at the start. + */ + tcp_off = th->th_off << 2; + + /* Trim off leading empty mbufs. */ + while (m && m->m_len == 0) + m = m->m_next; + + if (m) { + m_cur = m; + } + else { + /* + * No data? Highly unusual. We would expect to at + * least see a TCP header in the mbuf. + * As we have a pointer to the TCP header, I guess + * we should just copy that. (???) + */ +fallback: + bytes_to_copy = tcp_off; + if (bytes_to_copy > M_SIZE(n)) + bytes_to_copy = M_SIZE(n); + bcopy(th, n->m_data, bytes_to_copy); + n->m_len = bytes_to_copy; + return; + } + + /* + * Find TCP header. Record the total number of bytes up to, + * and including, the TCP header. + */ + while (m_cur) { + if ((caddr_t) th >= (caddr_t) m_cur->m_data && + (caddr_t) th < (caddr_t) (m_cur->m_data + m_cur->m_len)) + break; + bytes_to_copy += m_cur->m_len; + m_cur = m_cur->m_next; + } + if (m_cur) + bytes_to_copy += (caddr_t) th - (caddr_t) m_cur->m_data; + else + goto fallback; + bytes_to_copy += tcp_off; + + /* + * If we already want to copy more bytes than we can hold + * in the destination mbuf, skip leading bytes and copy + * what we can. + * + * Otherwise, consider trailing data. + */ + if (bytes_to_copy > M_SIZE(n)) { + skip = bytes_to_copy - M_SIZE(n); + bytes_to_copy = M_SIZE(n); + } + else { + /* + * Determine how much trailing data is in the chain. + * We start with the length of this mbuf (the one + * containing th) and subtract the size of the TCP + * header (tcp_off) and the size of the data prior + * to th (th - m_cur->m_data). + * + * This *should not* be negative, as the TCP code + * should put the whole TCP header in a single + * mbuf. But, it isn't a problem if it is. We will + * simple work off our negative balance as we look + * at subsequent mbufs. + */ + trailing_data = m_cur->m_len - tcp_off; + trailing_data -= (caddr_t) th - (caddr_t) m_cur->m_data; + m_cur = m_cur->m_next; + while (m_cur) { + trailing_data += m_cur->m_len; + m_cur = m_cur->m_next; + } + if ((bytes_to_copy + trailing_data) > M_SIZE(n)) + bytes_to_copy = M_SIZE(n); + else + bytes_to_copy += trailing_data; + } + + m_copydata(m, skip, bytes_to_copy, n->m_data); + n->m_len = bytes_to_copy; +} + +void +tcp_pcap_add(struct tcphdr *th, struct mbuf *m, struct mbufq *queue) +{ + struct mbuf *n = NULL, *mhead; + + KASSERT(th, ("%s: called with th == NULL", __func__)); + KASSERT(m, ("%s: called with m == NULL", __func__)); + KASSERT(queue, ("%s: called with queue == NULL", __func__)); + + /* We only care about data packets. */ + while (m && m->m_type != MT_DATA) + m = m->m_next; + + /* We only need to do something if we still have an mbuf. */ + if (!m) + return; + + /* If we are not saving mbufs, return now. */ + if (queue->mq_maxlen == 0) + return; + + /* + * Check to see if we will need to recycle mbufs. + * + * If we need to get rid of mbufs to stay below + * our packet count, try to reuse the mbuf. Once + * we already have a new mbuf (n), then we can + * simply free subsequent mbufs. + * + * Note that most of the logic in here is to deal + * with the reuse. If we are fine with constant + * mbuf allocs/deallocs, we could ditch this logic. + * But, it only seems to make sense to reuse + * mbufs we already have. + */ + while (mbufq_full(queue)) { + mhead = mbufq_dequeue(queue); + + if (n) { + tcp_pcap_m_freem(mhead); + } + else { + /* + * If this held an external cluster, try to + * detach the cluster. But, if we held the + * last reference, go through the normal + * free-ing process. + */ + if (mhead->m_flags & M_EXT) { + switch (mhead->m_ext.ext_type) { + case EXT_SFBUF: + /* Don't mess around with these. */ + tcp_pcap_m_freem(mhead); + continue; + default: + if (atomic_fetchadd_int( + mhead->m_ext.ext_cnt, -1) == 1) + { + /* + * We held the last reference + * on this cluster. Restore + * the reference count and put + * it back in the pool. + */ + *(mhead->m_ext.ext_cnt) = 1; + tcp_pcap_m_freem(mhead); + continue; + } + /* + * We were able to cleanly free the + * reference. + */ + atomic_subtract_int( + &tcp_pcap_clusters_referenced_cur, + 1); + tcp_pcap_alloc_reuse_ext++; + break; + } + } + else { + tcp_pcap_alloc_reuse_mbuf++; + } + + n = mhead; + tcp_pcap_m_freem(n->m_next); + m_init(n, NULL, 0, M_NOWAIT, MT_DATA, 0); + } + } + + /* Check to see if we need to get a new mbuf. */ + if (!n) { + if (!(n = m_get(M_NOWAIT, MT_DATA))) + return; + tcp_pcap_alloc_new_mbuf++; + } + + /* + * What are we dealing with? If a cluster, attach it. Otherwise, + * try to copy the data from the beginning of the mbuf to the + * end of data. (There may be data between the start of the data + * area and the current data pointer. We want to get this, because + * it may contain header information that is useful.) + * In cases where that isn't possible, settle for what we can + * get. + */ + if ((m->m_flags & M_EXT) && tcp_pcap_take_cluster_reference()) { + n->m_data = m->m_data; + n->m_len = m->m_len; + mb_dupcl(n, m); + } + else if (((m->m_data + m->m_len) - M_START(m)) <= M_SIZE(n)) { + /* + * At this point, n is guaranteed to be a normal mbuf + * with no cluster and no packet header. Because the + * logic in this code block requires this, the assert + * is here to catch any instances where someone + * changes the logic to invalidate that assumption. + */ + KASSERT((n->m_flags & (M_EXT | M_PKTHDR)) == 0, + ("%s: Unexpected flags (%#x) for mbuf", + __func__, n->m_flags)); + n->m_data = n->m_dat + M_LEADINGSPACE_NOWRITE(m); + n->m_len = m->m_len; + bcopy(M_START(m), n->m_dat, + m->m_len + M_LEADINGSPACE_NOWRITE(m)); + } + else { + /* + * This is the case where we need to "settle for what + * we can get". The most probable way to this code + * path is that we've already taken references to the + * maximum number of mbuf clusters we can, and the data + * is too long to fit in an mbuf's internal storage. + * Try for a "best fit". + */ + tcp_pcap_copy_bestfit(th, m, n); + + /* Don't try to get additional data. */ + goto add_to_queue; + } + + if (m->m_next) { + n->m_next = m_copym(m->m_next, 0, M_COPYALL, M_NOWAIT); + tcp_pcap_adj_cluster_reference(n->m_next, 1); + } + +add_to_queue: + /* Add the new mbuf to the list. */ + if (mbufq_enqueue(queue, n)) { + /* This shouldn't happen. If INVARIANTS is defined, panic. */ + KASSERT(0, ("%s: mbufq was unexpectedly full!", __func__)); + tcp_pcap_m_freem(n); + } +} + +void +tcp_pcap_drain(struct mbufq *queue) +{ + struct mbuf *m; + while ((m = mbufq_dequeue(queue))) + tcp_pcap_m_freem(m); +} + +void +tcp_pcap_tcpcb_init(struct tcpcb *tp) +{ + mbufq_init(&(tp->t_inpkts), V_tcp_pcap_packets); + mbufq_init(&(tp->t_outpkts), V_tcp_pcap_packets); +} + +void +tcp_pcap_set_sock_max(struct mbufq *queue, int newval) +{ + queue->mq_maxlen = newval; + while (queue->mq_len > queue->mq_maxlen) + tcp_pcap_m_freem(mbufq_dequeue(queue)); +} + +int +tcp_pcap_get_sock_max(struct mbufq *queue) +{ + return queue->mq_maxlen; +} Added: head/sys/netinet/tcp_pcap.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/netinet/tcp_pcap.h Wed Oct 14 00:35:37 2015 (r289276) @@ -0,0 +1,39 @@ +/*- + * Copyright (c) 2015 + * Jonathan Looney. 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 _NETINET_TCP_PCAP_H_ +#define _NETINET_TCP_PCAP_H_ + +void tcp_pcap_init(void); +void tcp_pcap_add(struct tcphdr *th, struct mbuf *m, struct mbufq *queue); +void tcp_pcap_drain(struct mbufq *queue); +void tcp_pcap_tcpcb_init(struct tcpcb *tp); +void tcp_pcap_set_sock_max(struct mbufq *queue, int newval); +int tcp_pcap_get_sock_max(struct mbufq *queue); + +#endif /* _NETINET_TCP_PCAP_H_ */ Modified: head/sys/netinet/tcp_subr.c ============================================================================== --- head/sys/netinet/tcp_subr.c Wed Oct 14 00:23:31 2015 (r289275) +++ head/sys/netinet/tcp_subr.c Wed Oct 14 00:35:37 2015 (r289276) @@ -92,6 +92,9 @@ __FBSDID("$FreeBSD$"); #include #endif #include +#ifdef TCPPCAP +#include +#endif #ifdef TCPDEBUG #include #endif @@ -427,6 +430,9 @@ tcp_init(void) SHUTDOWN_PRI_DEFAULT); EVENTHANDLER_REGISTER(maxsockets_change, tcp_zone_change, NULL, EVENTHANDLER_PRI_ANY); +#ifdef TCPPCAP + tcp_pcap_init(); +#endif } #ifdef VIMAGE @@ -832,6 +838,12 @@ tcp_newtcpcb(struct inpcb *inp) */ inp->inp_ip_ttl = V_ip_defttl; inp->inp_ppcb = tp; +#ifdef TCPPCAP + /* + * Init the TCP PCAP queues. + */ + tcp_pcap_tcpcb_init(tp); +#endif return (tp); /* XXX */ } @@ -1016,6 +1028,12 @@ tcp_discardcb(struct tcpcb *tp) tcp_free_sackholes(tp); +#ifdef TCPPCAP + /* Free the TCP PCAP queues. */ + tcp_pcap_drain(&(tp->t_inpkts)); + tcp_pcap_drain(&(tp->t_outpkts)); +#endif + /* Allow the CC algorithm to clean up after itself. */ if (CC_ALGO(tp)->cb_destroy != NULL) CC_ALGO(tp)->cb_destroy(tp->ccv); Modified: head/sys/netinet/tcp_usrreq.c ============================================================================== --- head/sys/netinet/tcp_usrreq.c Wed Oct 14 00:23:31 2015 (r289275) +++ head/sys/netinet/tcp_usrreq.c Wed Oct 14 00:35:37 2015 (r289276) @@ -86,6 +86,9 @@ __FBSDID("$FreeBSD$"); #include #include #include +#ifdef TCPPCAP +#include +#endif #ifdef TCPDEBUG #include #endif @@ -1577,6 +1580,25 @@ unlock_and_done: TP_MAXIDLE(tp)); goto unlock_and_done; +#ifdef TCPPCAP + case TCP_PCAP_OUT: + case TCP_PCAP_IN: + INP_WUNLOCK(inp); + error = sooptcopyin(sopt, &optval, sizeof optval, + sizeof optval); + if (error) + return (error); + + INP_WLOCK_RECHECK(inp); + if (optval >= 0) + tcp_pcap_set_sock_max(TCP_PCAP_OUT ? + &(tp->t_outpkts) : &(tp->t_inpkts), + optval); + else + error = EINVAL; + goto unlock_and_done; +#endif + default: INP_WUNLOCK(inp); error = ENOPROTOOPT; @@ -1647,6 +1669,15 @@ unlock_and_done: INP_WUNLOCK(inp); error = sooptcopyout(sopt, &ui, sizeof(ui)); break; +#ifdef TCPPCAP + case TCP_PCAP_OUT: + case TCP_PCAP_IN: + optval = tcp_pcap_get_sock_max(TCP_PCAP_OUT ? + &(tp->t_outpkts) : &(tp->t_inpkts)); + INP_WUNLOCK(inp); + error = sooptcopyout(sopt, &optval, sizeof optval); + break; +#endif default: INP_WUNLOCK(inp); error = ENOPROTOOPT; Modified: head/sys/netinet/tcp_var.h ============================================================================== --- head/sys/netinet/tcp_var.h Wed Oct 14 00:23:31 2015 (r289275) +++ head/sys/netinet/tcp_var.h Wed Oct 14 00:35:37 2015 (r289276) @@ -37,6 +37,7 @@ #ifdef _KERNEL #include +#include /* * Kernel variables for tcp. @@ -204,7 +205,17 @@ struct tcpcb { uint32_t t_ispare[8]; /* 5 UTO, 3 TBD */ void *t_pspare2[4]; /* 1 TCP_SIGNATURE, 3 TBD */ - uint64_t _pad[6]; /* 6 TBD (1-2 CC/RTT?) */ +#if defined(_KERNEL) && defined(TCPPCAP) + struct mbufq t_inpkts; /* List of saved input packets. */ + struct mbufq t_outpkts; /* List of saved output packets. */ +#ifdef _LP64 + uint64_t _pad[0]; /* all used! */ +#else + uint64_t _pad[2]; /* 2 are available */ +#endif /* _LP64 */ +#else + uint64_t _pad[6]; +#endif /* defined(_KERNEL) && defined(TCPPCAP) */ }; /* Modified: head/sys/sys/mbuf.h ============================================================================== --- head/sys/sys/mbuf.h Wed Oct 14 00:23:31 2015 (r289275) +++ head/sys/sys/mbuf.h Wed Oct 14 00:35:37 2015 (r289276) @@ -524,6 +524,7 @@ extern uma_zone_t zone_jumbo9; extern uma_zone_t zone_jumbo16; extern uma_zone_t zone_ext_refcnt; +void mb_dupcl(struct mbuf *, const struct mbuf *); void mb_free_ext(struct mbuf *); int m_pkthdr_init(struct mbuf *, int); From owner-svn-src-all@freebsd.org Wed Oct 14 00:36:35 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 17A3FA1105E; Wed, 14 Oct 2015 00:36:35 +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 D894C1D81; Wed, 14 Oct 2015 00:36:34 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t9E0aXVG030180; Wed, 14 Oct 2015 00:36:33 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9E0aXBG030179; Wed, 14 Oct 2015 00:36:33 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201510140036.t9E0aXBG030179@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Wed, 14 Oct 2015 00:36:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289277 - 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 " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Oct 2015 00:36:35 -0000 Author: bdrewery Date: Wed Oct 14 00:36:33 2015 New Revision: 289277 URL: https://svnweb.freebsd.org/changeset/base/289277 Log: Add a note about the mysterious files/includes/config block. This originated from r96668. Modified: head/share/mk/bsd.subdir.mk Modified: head/share/mk/bsd.subdir.mk ============================================================================== --- head/share/mk/bsd.subdir.mk Wed Oct 14 00:35:37 2015 (r289276) +++ head/share/mk/bsd.subdir.mk Wed Oct 14 00:36:33 2015 (r289277) @@ -123,6 +123,9 @@ _sub.${__target}: _SUBDIR .endif .endfor +# This is to support 'make includes' calling 'make buildincludes' and +# 'make installincludes' in the proper order, and to support these +# targets as SUBDIR_TARGETS. .for __target in files includes config .for __stage in build install ${__stage}${__target}: From owner-svn-src-all@freebsd.org Wed Oct 14 00:43:30 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 677C9A112AD; Wed, 14 Oct 2015 00:43:30 +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 34694123F; Wed, 14 Oct 2015 00:43:30 +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 t9E0hThW033106; Wed, 14 Oct 2015 00:43:29 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9E0hTKL033104; Wed, 14 Oct 2015 00:43:29 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201510140043.t9E0hTKL033104@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Wed, 14 Oct 2015 00:43:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289278 - 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 " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Oct 2015 00:43:30 -0000 Author: bdrewery Date: Wed Oct 14 00:43:29 2015 New Revision: 289278 URL: https://svnweb.freebsd.org/changeset/base/289278 Log: Correct a comment in bsd.incs.mk forgotten in r274662 and copied into bsd.confs.mk. The bsd.confs.mk may be wrong but for now fix it. Sponsored by: EMC / Isilon Storage Division Modified: head/share/mk/bsd.confs.mk head/share/mk/bsd.incs.mk Modified: head/share/mk/bsd.confs.mk ============================================================================== --- head/share/mk/bsd.confs.mk Wed Oct 14 00:36:33 2015 (r289277) +++ head/share/mk/bsd.confs.mk Wed Oct 14 00:43:29 2015 (r289278) @@ -84,4 +84,4 @@ STAGE_TARGETS+= stage_config .endif .endif -.endif # ${MK_TOOLCHAIN} != "no" +.endif # ${MK_INCLUDES} != "no" Modified: head/share/mk/bsd.incs.mk ============================================================================== --- head/share/mk/bsd.incs.mk Wed Oct 14 00:36:33 2015 (r289277) +++ head/share/mk/bsd.incs.mk Wed Oct 14 00:43:29 2015 (r289278) @@ -99,4 +99,4 @@ STAGE_SYMLINKS.INCS= ${INCSLINKS} .endif .endif -.endif # ${MK_TOOLCHAIN} != "no" +.endif # ${MK_INCLUDES} != "no" From owner-svn-src-all@freebsd.org Wed Oct 14 01:39:23 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id F3DA5A11FF3; Wed, 14 Oct 2015 01:39:22 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:1900:2254:206c::16:87]) by mx1.freebsd.org (Postfix) with ESMTP id D979A19DD; Wed, 14 Oct 2015 01:39:22 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from mail.xzibition.com (localhost [IPv6:::1]) by freefall.freebsd.org (Postfix) with ESMTP id D243319B8; Wed, 14 Oct 2015 01:39:22 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from mail.xzibition.com (localhost [172.31.3.2]) by mail.xzibition.com (Postfix) with ESMTP id 7F47C146FA; Wed, 14 Oct 2015 01:39:22 +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 lZBc17TAlw9F; Wed, 14 Oct 2015 01:39:20 +0000 (UTC) Subject: Re: svn commit: r289277 - head/share/mk DKIM-Filter: OpenDKIM Filter v2.9.2 mail.xzibition.com B7EFB146F4 To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201510140036.t9E0aXBG030179@repo.freebsd.org> From: Bryan Drewery Openpgp: id=F9173CB2C3AAEA7A5C8A1F0935D771BB6E4697CF; url=http://www.shatow.net/bryan/bryan2.asc Organization: FreeBSD Message-ID: <561DB247.7070904@FreeBSD.org> Date: Tue, 13 Oct 2015 18:39:19 -0700 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0 MIME-Version: 1.0 In-Reply-To: <201510140036.t9E0aXBG030179@repo.freebsd.org> Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="VlUgJfV3UX1CqB2XwceoE3mL3H2bGvxaE" X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Oct 2015 01:39:23 -0000 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --VlUgJfV3UX1CqB2XwceoE3mL3H2bGvxaE Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 10/13/2015 5:36 PM, Bryan Drewery wrote: > Author: bdrewery > Date: Wed Oct 14 00:36:33 2015 > New Revision: 289277 > URL: https://svnweb.freebsd.org/changeset/base/289277 >=20 > Log: > Add a note about the mysterious files/includes/config block. > =20 > This originated from r96668. >=20 I'm actually testing a removal of this now. --=20 Regards, Bryan Drewery --VlUgJfV3UX1CqB2XwceoE3mL3H2bGvxaE 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 iQEcBAEBAgAGBQJWHbJHAAoJEDXXcbtuRpfPfx4H/3MpTj4hGJoqImPC3aWnbUpQ 2SGKWoAiFHKARrf9MVAUWkIjP8hAvOGqMo+18BOpQorDObntchulC0cLMnL1vqYv Ws5zM3heJh2YUYJ7/F4ULiM4TbG79xFSksBKplW6AXi8iPJxHZy3kJdKLnNttHzK sd3YaPjeyb6QLPRwsV32S3gLl1IQIVnHhKQLyhjQAsum+90QDV4J/vqfoH0b0R5F 7NoCCmTbjeggQkSGuOOr+WkKkD+e5iw/T2ogUOKzOGQi1gtBts070QhmsJgbDdXg zzhq1EjNkV7VEHvEpcRSK++9FW+EW93c2aBo1mLtjsG9egSDMD2ZsdOiUm1K82U= =EO9e -----END PGP SIGNATURE----- --VlUgJfV3UX1CqB2XwceoE3mL3H2bGvxaE-- From owner-svn-src-all@freebsd.org Wed Oct 14 01:58:37 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2B40DA12469; Wed, 14 Oct 2015 01:58:37 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:1900:2254:206c::16:87]) by mx1.freebsd.org (Postfix) with ESMTP id 0F1E41386; Wed, 14 Oct 2015 01:58:37 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from mail.xzibition.com (localhost [IPv6:::1]) by freefall.freebsd.org (Postfix) with ESMTP id 07C361F21; Wed, 14 Oct 2015 01:58:37 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from mail.xzibition.com (localhost [172.31.3.2]) by mail.xzibition.com (Postfix) with ESMTP id A60B31478B; Wed, 14 Oct 2015 01:58:36 +0000 (UTC) X-Virus-Scanned: amavisd-new at mail.xzibition.com Received: from mail.xzibition.com ([172.31.3.2]) by mail.xzibition.com (mail.xzibition.com [172.31.3.2]) (amavisd-new, port 10026) with LMTP id IfHIpPjWOjLL; Wed, 14 Oct 2015 01:58:33 +0000 (UTC) Subject: Re: svn commit: r289276 - in head/sys: conf kern netinet sys DKIM-Filter: OpenDKIM Filter v2.9.2 mail.xzibition.com 4017E14786 To: Hiren Panchasara , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201510140035.t9E0ZbXS030094@repo.freebsd.org> From: Bryan Drewery Openpgp: id=F9173CB2C3AAEA7A5C8A1F0935D771BB6E4697CF; url=http://www.shatow.net/bryan/bryan2.asc Organization: FreeBSD Message-ID: <561DB6CB.8060208@FreeBSD.org> Date: Tue, 13 Oct 2015 18:58:35 -0700 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0 MIME-Version: 1.0 In-Reply-To: <201510140035.t9E0ZbXS030094@repo.freebsd.org> Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="0D5kKgEWArLKnGdWa4UEsafH2lo4Ff3Ag" X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Oct 2015 01:58:37 -0000 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --0D5kKgEWArLKnGdWa4UEsafH2lo4Ff3Ag Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 10/13/2015 5:35 PM, Hiren Panchasara wrote: > Author: hiren > Date: Wed Oct 14 00:35:37 2015 > New Revision: 289276 > URL: https://svnweb.freebsd.org/changeset/base/289276 >=20 > Log: > There are times when it would be really nice to have a record of the = last few > packets and/or state transitions from each TCP socket. That would hel= p with > narrowing down certain problems we see in the field that are hard to = reproduce > without understanding the history of how we got into a certain state.= This > change provides just that. > =20 > It saves copies of the last N packets in a list in the tcpcb. When th= e tcpcb is > destroyed, the list is freed. I thought this was likely to be more > performance-friendly than saving copies of the tcpcb. Plus, with the = packets, > you should be able to reverse-engineer what happened to the tcpcb. > =20 > To enable the feature, you will need to compile a kernel with the TCP= PCAP > option. Even then, the feature defaults to being deactivated. You can= activate > it by setting a positive value for the number of captured packets. Yo= u can do > that on either a global basis or on a per-socket basis (via a setsock= opt call). > =20 > There is no way to get the packets out of the kernel other than using= kmem or > getting a coredump. I thought that would help some of the legal/priva= cy concerns > regarding such a feature. However, it should be possible to add a fut= ure effort > to export them in PCAP format. > =20 > I tested this at low scale, and found that there were no mbuf leaks a= nd the peak > mbuf usage appeared to be unchanged with and without the feature. > =20 > The main performance concern I can envision is the number of mbufs th= at would be > used on systems with a large number of sockets. If you save five pack= ets per > direction per socket and have 3,000 sockets, that will consume at lea= st 30,000 > mbufs just to keep these packets. I tried to reduce the concerns asso= ciated with > this by limiting the number of clusters (not mbufs) that could be use= d for this > feature. Again, in my testing, that appears to work correctly. > =20 > Differential Revision: D3100 You're supposed to use the full URL here which will auto close the review= =2E I also replied to the review with style findings just now. > Submitted by: Jonathan Looney > Reviewed by: gnn, hiren --=20 Regards, Bryan Drewery --0D5kKgEWArLKnGdWa4UEsafH2lo4Ff3Ag 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 iQEcBAEBAgAGBQJWHbbLAAoJEDXXcbtuRpfPB/4H/3P1hZB1isrORq4mgN9YQAOQ TMM88kjMNpVs3od6IZsRDufOZKd5sXIK0x4ergVgk8UrGBYIKWxjd9u+svX+Wq5t JrxEyQLIdJXbpgD3LEPwDjTJyIOWcnIs80Kxnaa1+USQqMc75tKBr/lvjS78kLsy eSoUlYH67cWqiz8s+/6jtjiCqjzgy9JlqyZmlwF4rOfmUQizAnXWdQspfHaZMAUM KXEEc4+FjSDIlZHZAXwTxuns0JdgFsXT7N2DgY6sIaUa9feagDbK1tDOFt6x8vkS S+T1W+l40SoGhcZ10dR2Yv7PvWyCeRWhDDiuYCceuU7DNVGTu/HrelOf6Py15J4= =z4aT -----END PGP SIGNATURE----- --0D5kKgEWArLKnGdWa4UEsafH2lo4Ff3Ag-- From owner-svn-src-all@freebsd.org Wed Oct 14 02:10:08 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B0C8EA127F1; Wed, 14 Oct 2015 02:10:08 +0000 (UTC) (envelope-from jeff@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6EBD81AC2; Wed, 14 Oct 2015 02:10:08 +0000 (UTC) (envelope-from jeff@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t9E2A7dP056597; Wed, 14 Oct 2015 02:10:07 GMT (envelope-from jeff@FreeBSD.org) Received: (from jeff@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9E2A79H056595; Wed, 14 Oct 2015 02:10:07 GMT (envelope-from jeff@FreeBSD.org) Message-Id: <201510140210.t9E2A79H056595@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jeff set sender to jeff@FreeBSD.org using -f From: Jeff Roberson Date: Wed, 14 Oct 2015 02:10:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289279 - 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 " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Oct 2015 02:10:08 -0000 Author: jeff Date: Wed Oct 14 02:10:07 2015 New Revision: 289279 URL: https://svnweb.freebsd.org/changeset/base/289279 Log: Parallelize the buffer cache and rewrite getnewbuf(). This results in a 8x performance improvement in a micro benchmark on a 4 socket machine. - Get buffer headers from a per-cpu uma cache that sits in from of the free queue. - Use a per-cpu quantum cache in vmem to eliminate contention for kva. - Use multiple clean queues according to buffer cache size to eliminate clean queue lock contention. - Introduce a bufspace daemon that attempts to prevent getnewbuf() callers from blocking or doing direct recycling. - Close some bufspace allocation races that could lead to endless recycling. - Further the transition to a more modern style of small functions grouped by prefix in order to improve growing complexity. Sponsored by: EMC / Isilon Reviewed by: kib Tested by: pho Modified: head/sys/kern/vfs_bio.c head/sys/vm/vm_init.c Modified: head/sys/kern/vfs_bio.c ============================================================================== --- head/sys/kern/vfs_bio.c Wed Oct 14 00:43:29 2015 (r289278) +++ head/sys/kern/vfs_bio.c Wed Oct 14 02:10:07 2015 (r289279) @@ -63,6 +63,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -100,6 +101,7 @@ caddr_t unmapped_buf; /* Used below and for softdep flushing threads in ufs/ffs/ffs_softdep.c */ struct proc *bufdaemonproc; +struct proc *bufspacedaemonproc; static int inmem(struct vnode *vp, daddr_t blkno); static void vm_hold_free_pages(struct buf *bp, int newbsize); @@ -116,11 +118,18 @@ static void vfs_vmio_extend(struct buf * static int vfs_bio_clcheck(struct vnode *vp, int size, daddr_t lblkno, daddr_t blkno); static int buf_flush(struct vnode *vp, int); +static int buf_recycle(bool); +static int buf_scan(bool); static int flushbufqueues(struct vnode *, int, int); static void buf_daemon(void); static void bremfreel(struct buf *bp); static __inline void bd_wakeup(void); static int sysctl_runningspace(SYSCTL_HANDLER_ARGS); +static void bufkva_reclaim(vmem_t *, int); +static void bufkva_free(struct buf *); +static int buf_import(void *, void **, int, int); +static void buf_release(void *, void **, int); + #if defined(COMPAT_FREEBSD4) || defined(COMPAT_FREEBSD5) || \ defined(COMPAT_FREEBSD6) || defined(COMPAT_FREEBSD7) static int sysctl_bufspace(SYSCTL_HANDLER_ARGS); @@ -145,23 +154,23 @@ static long bufkvaspace; SYSCTL_LONG(_vfs, OID_AUTO, bufkvaspace, CTLFLAG_RD, &bufkvaspace, 0, "Kernel virtual memory used for buffers"); static long maxbufspace; -SYSCTL_LONG(_vfs, OID_AUTO, maxbufspace, CTLFLAG_RD, &maxbufspace, 0, - "Maximum allowed value of bufspace (including buf_daemon)"); +SYSCTL_LONG(_vfs, OID_AUTO, maxbufspace, CTLFLAG_RW, &maxbufspace, 0, + "Maximum allowed value of bufspace (including metadata)"); static long bufmallocspace; SYSCTL_LONG(_vfs, OID_AUTO, bufmallocspace, CTLFLAG_RD, &bufmallocspace, 0, "Amount of malloced memory for buffers"); static long maxbufmallocspace; -SYSCTL_LONG(_vfs, OID_AUTO, maxmallocbufspace, CTLFLAG_RW, &maxbufmallocspace, 0, - "Maximum amount of malloced memory for buffers"); +SYSCTL_LONG(_vfs, OID_AUTO, maxmallocbufspace, CTLFLAG_RW, &maxbufmallocspace, + 0, "Maximum amount of malloced memory for buffers"); static long lobufspace; -SYSCTL_LONG(_vfs, OID_AUTO, lobufspace, CTLFLAG_RD, &lobufspace, 0, +SYSCTL_LONG(_vfs, OID_AUTO, lobufspace, CTLFLAG_RW, &lobufspace, 0, "Minimum amount of buffers we want to have"); long hibufspace; -SYSCTL_LONG(_vfs, OID_AUTO, hibufspace, CTLFLAG_RD, &hibufspace, 0, - "Maximum allowed value of bufspace (excluding buf_daemon)"); -static int bufreusecnt; -SYSCTL_INT(_vfs, OID_AUTO, bufreusecnt, CTLFLAG_RW, &bufreusecnt, 0, - "Number of times we have reused a buffer"); +SYSCTL_LONG(_vfs, OID_AUTO, hibufspace, CTLFLAG_RW, &hibufspace, 0, + "Maximum allowed value of bufspace (excluding metadata)"); +long bufspacethresh; +SYSCTL_LONG(_vfs, OID_AUTO, bufspacethresh, CTLFLAG_RW, &bufspacethresh, + 0, "Bufspace consumed before waking the daemon to free some"); static int buffreekvacnt; SYSCTL_INT(_vfs, OID_AUTO, buffreekvacnt, CTLFLAG_RW, &buffreekvacnt, 0, "Number of times we have freed the KVA space from some buffer"); @@ -205,10 +214,10 @@ SYSCTL_INT(_vfs, OID_AUTO, numfreebuffer "Number of free buffers"); static int lofreebuffers; SYSCTL_INT(_vfs, OID_AUTO, lofreebuffers, CTLFLAG_RW, &lofreebuffers, 0, - "XXX Unused"); + "Target number of free buffers"); static int hifreebuffers; SYSCTL_INT(_vfs, OID_AUTO, hifreebuffers, CTLFLAG_RW, &hifreebuffers, 0, - "XXX Complicatedly unused"); + "Threshold for clean buffer recycling"); static int getnewbufcalls; SYSCTL_INT(_vfs, OID_AUTO, getnewbufcalls, CTLFLAG_RW, &getnewbufcalls, 0, "Number of calls to getnewbuf"); @@ -219,6 +228,9 @@ static int mappingrestarts; SYSCTL_INT(_vfs, OID_AUTO, mappingrestarts, CTLFLAG_RW, &mappingrestarts, 0, "Number of times getblk has had to restart a buffer mapping for " "unmapped buffer"); +static int numbufallocfails; +SYSCTL_INT(_vfs, OID_AUTO, numbufallocfails, CTLFLAG_RW, &numbufallocfails, 0, + "Number of times buffer allocations failed"); static int flushbufqtarget = 100; SYSCTL_INT(_vfs, OID_AUTO, flushbufqtarget, CTLFLAG_RW, &flushbufqtarget, 0, "Amount of work to do in flushbufqueues when helping bufdaemon"); @@ -233,16 +245,6 @@ SYSCTL_INT(_vfs, OID_AUTO, unmapped_buf_ "Permit the use of the unmapped i/o"); /* - * Lock for the non-dirty bufqueues - */ -static struct mtx_padalign bqclean; - -/* - * Lock for the dirty queue. - */ -static struct mtx_padalign bqdirty; - -/* * This lock synchronizes access to bd_request. */ static struct mtx_padalign bdlock; @@ -271,6 +273,11 @@ static struct mtx_padalign bdirtylock; static int bd_request; /* + * Request/wakeup point for the bufspace daemon. + */ +static int bufspace_request; + +/* * Request for the buf daemon to write more buffers than is indicated by * lodirtybuf. This may be necessary to push out excess dependencies or * defragment the address space where a simple count of the number of dirty @@ -298,7 +305,7 @@ static int runningbufreq; * Synchronization (sleep/wakeup) variable for buffer requests. * Can contain the VFS_BIO_NEED flags defined below; setting/clearing is done * by and/or. - * Used in numdirtywakeup(), bufspacewakeup(), bufcountadd(), bwillwrite(), + * Used in numdirtywakeup(), bufspace_wakeup(), bwillwrite(), * getnewbuf(), and getblk(). */ static volatile int needsbuffer; @@ -311,14 +318,21 @@ static int bdirtywait; /* * Definitions for the buffer free lists. */ -#define BUFFER_QUEUES 4 /* number of free buffer queues */ - #define QUEUE_NONE 0 /* on no queue */ -#define QUEUE_CLEAN 1 /* non-B_DELWRI buffers */ +#define QUEUE_EMPTY 1 /* empty buffer headers */ #define QUEUE_DIRTY 2 /* B_DELWRI buffers */ -#define QUEUE_EMPTY 3 /* empty buffer headers */ +#define QUEUE_CLEAN 3 /* non-B_DELWRI buffers */ #define QUEUE_SENTINEL 1024 /* not an queue index, but mark for sentinel */ +/* Maximum number of clean buffer queues. */ +#define CLEAN_QUEUES 16 + +/* Configured number of clean queues. */ +static int clean_queues; + +/* Maximum number of buffer queues. */ +#define BUFFER_QUEUES (QUEUE_CLEAN + CLEAN_QUEUES) + /* Queues for free buffers with various properties */ static TAILQ_HEAD(bqueues, buf) bufqueues[BUFFER_QUEUES] = { { 0 } }; #ifdef INVARIANTS @@ -326,15 +340,21 @@ static int bq_len[BUFFER_QUEUES]; #endif /* + * Lock for each bufqueue + */ +static struct mtx_padalign bqlocks[BUFFER_QUEUES]; + +/* + * per-cpu empty buffer cache. + */ +uma_zone_t buf_zone; + +/* * Single global constant for BUF_WMESG, to avoid getting multiple references. * buf_wmesg is referred from macros. */ const char *buf_wmesg = BUF_WMESG; -#define VFS_BIO_NEED_ANY 0x01 /* any freeable buffer */ -#define VFS_BIO_NEED_FREE 0x04 /* wait for free bufs, hi hysteresis */ -#define VFS_BIO_NEED_BUFSPACE 0x08 /* wait for buf space, lo hysteresis */ - static int sysctl_runningspace(SYSCTL_HANDLER_ARGS) { @@ -382,6 +402,21 @@ sysctl_bufspace(SYSCTL_HANDLER_ARGS) } #endif +static int +bqcleanq(void) +{ + static int nextq; + + return ((atomic_fetchadd_int(&nextq, 1) % clean_queues) + QUEUE_CLEAN); +} + +static int +bqisclean(int qindex) +{ + + return (qindex >= QUEUE_CLEAN && qindex < QUEUE_CLEAN + CLEAN_QUEUES); +} + /* * bqlock: * @@ -391,9 +426,7 @@ static inline struct mtx * bqlock(int qindex) { - if (qindex == QUEUE_DIRTY) - return (struct mtx *)(&bqdirty); - return (struct mtx *)(&bqclean); + return (struct mtx *)&bqlocks[qindex]; } /* @@ -447,62 +480,255 @@ bdirtyadd(void) } /* - * bufspacewakeup: + * bufspace_wakeup: * * Called when buffer space is potentially available for recovery. * getnewbuf() will block on this flag when it is unable to free * sufficient buffer space. Buffer space becomes recoverable when * bp's get placed back in the queues. */ -static __inline void -bufspacewakeup(void) +static void +bufspace_wakeup(void) { - int need_wakeup, on; /* - * If someone is waiting for bufspace, wake them up. Even - * though we may not have freed the kva space yet, the waiting - * process will be able to now. + * If someone is waiting for bufspace, wake them up. + * + * Since needsbuffer is set prior to doing an additional queue + * scan it is safe to check for the flag prior to acquiring the + * lock. The thread that is preparing to scan again before + * blocking would discover the buf we released. */ + if (needsbuffer) { + rw_rlock(&nblock); + if (atomic_cmpset_int(&needsbuffer, 1, 0) == 1) + wakeup(__DEVOLATILE(void *, &needsbuffer)); + rw_runlock(&nblock); + } +} + +/* + * bufspace_daemonwakeup: + * + * Wakeup the daemon responsible for freeing clean bufs. + */ +static void +bufspace_daemonwakeup(void) +{ rw_rlock(&nblock); - for (;;) { - need_wakeup = 0; - on = needsbuffer; - if ((on & VFS_BIO_NEED_BUFSPACE) == 0) - break; - need_wakeup = 1; - if (atomic_cmpset_rel_int(&needsbuffer, on, - on & ~VFS_BIO_NEED_BUFSPACE)) - break; + if (bufspace_request == 0) { + bufspace_request = 1; + wakeup(&bufspace_request); } - if (need_wakeup) - wakeup(__DEVOLATILE(void *, &needsbuffer)); rw_runlock(&nblock); } /* - * bufspaceadjust: + * bufspace_adjust: * * Adjust the reported bufspace for a KVA managed buffer, possibly * waking any waiters. */ static void -bufspaceadjust(struct buf *bp, int bufsize) +bufspace_adjust(struct buf *bp, int bufsize) { + long space; int diff; KASSERT((bp->b_flags & B_MALLOC) == 0, - ("bufspaceadjust: malloc buf %p", bp)); + ("bufspace_adjust: malloc buf %p", bp)); diff = bufsize - bp->b_bufsize; if (diff < 0) { atomic_subtract_long(&bufspace, -diff); - bufspacewakeup(); - } else - atomic_add_long(&bufspace, diff); + bufspace_wakeup(); + } else { + space = atomic_fetchadd_long(&bufspace, diff); + /* Wake up the daemon on the transition. */ + if (space < bufspacethresh && space + diff >= bufspacethresh) + bufspace_daemonwakeup(); + } bp->b_bufsize = bufsize; } /* + * bufspace_reserve: + * + * Reserve bufspace before calling allocbuf(). metadata has a + * different space limit than data. + */ +static int +bufspace_reserve(int size, bool metadata) +{ + long limit; + long space; + + if (metadata) + limit = maxbufspace; + else + limit = hibufspace; + do { + space = bufspace; + if (space + size > limit) + return (ENOSPC); + } while (atomic_cmpset_long(&bufspace, space, space + size) == 0); + + /* Wake up the daemon on the transition. */ + if (space < bufspacethresh && space + size >= bufspacethresh) + bufspace_daemonwakeup(); + + return (0); +} + +/* + * bufspace_release: + * + * Release reserved bufspace after bufspace_adjust() has consumed it. + */ +static void +bufspace_release(int size) +{ + atomic_subtract_long(&bufspace, size); + bufspace_wakeup(); +} + +/* + * bufspace_wait: + * + * Wait for bufspace, acting as the buf daemon if a locked vnode is + * supplied. needsbuffer must be set in a safe fashion prior to + * polling for space. The operation must be re-tried on return. + */ +static void +bufspace_wait(struct vnode *vp, int gbflags, int slpflag, int slptimeo) +{ + struct thread *td; + int error, fl, norunbuf; + + if ((gbflags & GB_NOWAIT_BD) != 0) + return; + + td = curthread; + rw_wlock(&nblock); + while (needsbuffer != 0) { + if (vp != NULL && vp->v_type != VCHR && + (td->td_pflags & TDP_BUFNEED) == 0) { + rw_wunlock(&nblock); + /* + * getblk() is called with a vnode locked, and + * some majority of the dirty buffers may as + * well belong to the vnode. Flushing the + * buffers there would make a progress that + * cannot be achieved by the buf_daemon, that + * cannot lock the vnode. + */ + norunbuf = ~(TDP_BUFNEED | TDP_NORUNNINGBUF) | + (td->td_pflags & TDP_NORUNNINGBUF); + + /* + * Play bufdaemon. The getnewbuf() function + * may be called while the thread owns lock + * for another dirty buffer for the same + * vnode, which makes it impossible to use + * VOP_FSYNC() there, due to the buffer lock + * recursion. + */ + td->td_pflags |= TDP_BUFNEED | TDP_NORUNNINGBUF; + fl = buf_flush(vp, flushbufqtarget); + td->td_pflags &= norunbuf; + rw_wlock(&nblock); + if (fl != 0) + continue; + if (needsbuffer == 0) + break; + } + error = rw_sleep(__DEVOLATILE(void *, &needsbuffer), &nblock, + (PRIBIO + 4) | slpflag, "newbuf", slptimeo); + if (error != 0) + break; + } + rw_wunlock(&nblock); +} + + +/* + * bufspace_daemon: + * + * buffer space management daemon. Tries to maintain some marginal + * amount of free buffer space so that requesting processes neither + * block nor work to reclaim buffers. + */ +static void +bufspace_daemon(void) +{ + for (;;) { + kproc_suspend_check(bufspacedaemonproc); + + /* + * Free buffers from the clean queue until we meet our + * targets. + * + * Theory of operation: The buffer cache is most efficient + * when some free buffer headers and space are always + * available to getnewbuf(). This daemon attempts to prevent + * the excessive blocking and synchronization associated + * with shortfall. It goes through three phases according + * demand: + * + * 1) The daemon wakes up voluntarily once per-second + * during idle periods when the counters are below + * the wakeup thresholds (bufspacethresh, lofreebuffers). + * + * 2) The daemon wakes up as we cross the thresholds + * ahead of any potential blocking. This may bounce + * slightly according to the rate of consumption and + * release. + * + * 3) The daemon and consumers are starved for working + * clean buffers. This is the 'bufspace' sleep below + * which will inefficiently trade bufs with bqrelse + * until we return to condition 2. + */ + while (bufspace > lobufspace || + numfreebuffers < hifreebuffers) { + if (buf_recycle(false) != 0) { + atomic_set_int(&needsbuffer, 1); + if (buf_recycle(false) != 0) { + rw_wlock(&nblock); + if (needsbuffer) + rw_sleep(__DEVOLATILE(void *, + &needsbuffer), &nblock, + PRIBIO|PDROP, "bufspace", + hz/10); + else + rw_wunlock(&nblock); + } + } + maybe_yield(); + } + + /* + * Re-check our limits under the exclusive nblock. + */ + rw_wlock(&nblock); + if (bufspace < bufspacethresh && + numfreebuffers > lofreebuffers) { + bufspace_request = 0; + rw_sleep(&bufspace_request, &nblock, PRIBIO|PDROP, + "-", hz); + } else + rw_wunlock(&nblock); + } +} + +static struct kproc_desc bufspace_kp = { + "bufspacedaemon", + bufspace_daemon, + &bufspacedaemonproc +}; +SYSINIT(bufspacedaemon, SI_SUB_KTHREAD_BUF, SI_ORDER_FIRST, kproc_start, + &bufspace_kp); + +/* * bufmallocadjust: * * Adjust the reported bufspace for a malloc managed buffer, possibly @@ -516,10 +742,9 @@ bufmallocadjust(struct buf *bp, int bufs KASSERT((bp->b_flags & B_MALLOC) != 0, ("bufmallocadjust: non-malloc buf %p", bp)); diff = bufsize - bp->b_bufsize; - if (diff < 0) { + if (diff < 0) atomic_subtract_long(&bufmallocspace, -diff); - bufspacewakeup(); - } else + else atomic_add_long(&bufmallocspace, diff); bp->b_bufsize = bufsize; } @@ -571,67 +796,6 @@ runningbufwakeup(struct buf *bp) } /* - * bufcountadd: - * - * Called when a buffer has been added to one of the free queues to - * account for the buffer and to wakeup anyone waiting for free buffers. - * This typically occurs when large amounts of metadata are being handled - * by the buffer cache ( else buffer space runs out first, usually ). - */ -static __inline void -bufcountadd(struct buf *bp) -{ - int mask, need_wakeup, old, on; - - KASSERT((bp->b_flags & B_INFREECNT) == 0, - ("buf %p already counted as free", bp)); - bp->b_flags |= B_INFREECNT; - old = atomic_fetchadd_int(&numfreebuffers, 1); - KASSERT(old >= 0 && old < nbuf, - ("numfreebuffers climbed to %d", old + 1)); - mask = VFS_BIO_NEED_ANY; - if (numfreebuffers >= hifreebuffers) - mask |= VFS_BIO_NEED_FREE; - rw_rlock(&nblock); - for (;;) { - need_wakeup = 0; - on = needsbuffer; - if (on == 0) - break; - need_wakeup = 1; - if (atomic_cmpset_rel_int(&needsbuffer, on, on & ~mask)) - break; - } - if (need_wakeup) - wakeup(__DEVOLATILE(void *, &needsbuffer)); - rw_runlock(&nblock); -} - -/* - * bufcountsub: - * - * Decrement the numfreebuffers count as needed. - */ -static void -bufcountsub(struct buf *bp) -{ - int old; - - /* - * Fixup numfreebuffers count. If the buffer is invalid or not - * delayed-write, the buffer was free and we must decrement - * numfreebuffers. - */ - if ((bp->b_flags & B_INVAL) || (bp->b_flags & B_DELWRI) == 0) { - KASSERT((bp->b_flags & B_INFREECNT) != 0, - ("buf %p not counted in numfreebuffers", bp)); - bp->b_flags &= ~B_INFREECNT; - old = atomic_fetchadd_int(&numfreebuffers, -1); - KASSERT(old > 0, ("numfreebuffers dropped to %d", old - 1)); - } -} - -/* * waitrunningbufspace() * * runningbufspace is a measure of the amount of I/O currently @@ -847,8 +1011,10 @@ bufinit(void) int i; CTASSERT(MAXBCACHEBUF >= MAXBSIZE); - mtx_init(&bqclean, "bufq clean lock", NULL, MTX_DEF); - mtx_init(&bqdirty, "bufq dirty lock", NULL, MTX_DEF); + mtx_init(&bqlocks[QUEUE_DIRTY], "bufq dirty lock", NULL, MTX_DEF); + mtx_init(&bqlocks[QUEUE_EMPTY], "bufq empty lock", NULL, MTX_DEF); + for (i = QUEUE_CLEAN; i < QUEUE_CLEAN + CLEAN_QUEUES; i++) + mtx_init(&bqlocks[i], "bufq clean lock", NULL, MTX_DEF); mtx_init(&rbreqlock, "runningbufspace lock", NULL, MTX_DEF); rw_init(&nblock, "needsbuffer lock"); mtx_init(&bdlock, "buffer daemon lock", NULL, MTX_DEF); @@ -864,7 +1030,7 @@ bufinit(void) for (i = 0; i < nbuf; i++) { bp = &buf[i]; bzero(bp, sizeof *bp); - bp->b_flags = B_INVAL | B_INFREECNT; + bp->b_flags = B_INVAL; bp->b_rcred = NOCRED; bp->b_wcred = NOCRED; bp->b_qindex = QUEUE_EMPTY; @@ -881,18 +1047,19 @@ bufinit(void) /* * maxbufspace is the absolute maximum amount of buffer space we are * allowed to reserve in KVM and in real terms. The absolute maximum - * is nominally used by buf_daemon. hibufspace is the nominal maximum - * used by most other processes. The differential is required to - * ensure that buf_daemon is able to run when other processes might - * be blocked waiting for buffer space. + * is nominally used by metadata. hibufspace is the nominal maximum + * used by most other requests. The differential is required to + * ensure that metadata deadlocks don't occur. * * maxbufspace is based on BKVASIZE. Allocating buffers larger then * this may result in KVM fragmentation which is not handled optimally - * by the system. + * by the system. XXX This is less true with vmem. We could use + * PAGE_SIZE. */ maxbufspace = (long)nbuf * BKVASIZE; hibufspace = lmax(3 * maxbufspace / 4, maxbufspace - MAXBCACHEBUF * 10); - lobufspace = hibufspace - MAXBCACHEBUF; + lobufspace = (hibufspace / 20) * 19; /* 95% */ + bufspacethresh = lobufspace + (hibufspace - lobufspace) / 2; /* * Note: The 16 MiB upper limit for hirunningspace was chosen @@ -906,44 +1073,61 @@ bufinit(void) 16 * 1024 * 1024), 1024 * 1024); lorunningspace = roundup((hirunningspace * 2) / 3, MAXBCACHEBUF); -/* - * Limit the amount of malloc memory since it is wired permanently into - * the kernel space. Even though this is accounted for in the buffer - * allocation, we don't want the malloced region to grow uncontrolled. - * The malloc scheme improves memory utilization significantly on average - * (small) directories. - */ + /* + * Limit the amount of malloc memory since it is wired permanently into + * the kernel space. Even though this is accounted for in the buffer + * allocation, we don't want the malloced region to grow uncontrolled. + * The malloc scheme improves memory utilization significantly on + * average (small) directories. + */ maxbufmallocspace = hibufspace / 20; -/* - * Reduce the chance of a deadlock occuring by limiting the number - * of delayed-write dirty buffers we allow to stack up. - */ + /* + * Reduce the chance of a deadlock occuring by limiting the number + * of delayed-write dirty buffers we allow to stack up. + */ hidirtybuffers = nbuf / 4 + 20; dirtybufthresh = hidirtybuffers * 9 / 10; numdirtybuffers = 0; -/* - * To support extreme low-memory systems, make sure hidirtybuffers cannot - * eat up all available buffer space. This occurs when our minimum cannot - * be met. We try to size hidirtybuffers to 3/4 our buffer space assuming - * BKVASIZE'd buffers. - */ + /* + * To support extreme low-memory systems, make sure hidirtybuffers + * cannot eat up all available buffer space. This occurs when our + * minimum cannot be met. We try to size hidirtybuffers to 3/4 our + * buffer space assuming BKVASIZE'd buffers. + */ while ((long)hidirtybuffers * BKVASIZE > 3 * hibufspace / 4) { hidirtybuffers >>= 1; } lodirtybuffers = hidirtybuffers / 2; -/* - * Try to keep the number of free buffers in the specified range, - * and give special processes (e.g. like buf_daemon) access to an - * emergency reserve. - */ - lofreebuffers = nbuf / 18 + 5; - hifreebuffers = 2 * lofreebuffers; + /* + * lofreebuffers should be sufficient to avoid stalling waiting on + * buf headers under heavy utilization. The bufs in per-cpu caches + * are counted as free but will be unavailable to threads executing + * on other cpus. + * + * hifreebuffers is the free target for the bufspace daemon. This + * should be set appropriately to limit work per-iteration. + */ + lofreebuffers = MIN((nbuf / 25) + (20 * mp_ncpus), 128 * mp_ncpus); + hifreebuffers = (3 * lofreebuffers) / 2; numfreebuffers = nbuf; bogus_page = vm_page_alloc(NULL, 0, VM_ALLOC_NOOBJ | VM_ALLOC_NORMAL | VM_ALLOC_WIRED); + + /* Setup the kva and free list allocators. */ + vmem_set_reclaim(buffer_arena, bufkva_reclaim); + buf_zone = uma_zcache_create("buf free cache", sizeof(struct buf), + NULL, NULL, NULL, NULL, buf_import, buf_release, NULL, 0); + + /* + * Size the clean queue according to the amount of buffer space. + * One queue per-256mb up to the max. More queues gives better + * concurrency but less accurate LRU. + */ + clean_queues = MIN(howmany(maxbufspace, 256*1024*1024), CLEAN_QUEUES); + } #ifdef INVARIANTS @@ -1129,10 +1313,25 @@ binsfree(struct buf *bp, int qindex) { struct mtx *olock, *nlock; - BUF_ASSERT_XLOCKED(bp); + if (qindex != QUEUE_EMPTY) { + BUF_ASSERT_XLOCKED(bp); + } + + /* + * Stick to the same clean queue for the lifetime of the buf to + * limit locking below. Otherwise pick ont sequentially. + */ + if (qindex == QUEUE_CLEAN) { + if (bqisclean(bp->b_qindex)) + qindex = bp->b_qindex; + else + qindex = bqcleanq(); + } + /* + * Handle delayed bremfree() processing. + */ nlock = bqlock(qindex); - /* Handle delayed bremfree() processing. */ if (bp->b_flags & B_REMFREE) { olock = bqlock(bp->b_qindex); mtx_lock(olock); @@ -1156,15 +1355,263 @@ binsfree(struct buf *bp, int qindex) bq_len[bp->b_qindex]++; #endif mtx_unlock(nlock); +} + +/* + * buf_free: + * + * Free a buffer to the buf zone once it no longer has valid contents. + */ +static void +buf_free(struct buf *bp) +{ + + if (bp->b_flags & B_REMFREE) + bremfreef(bp); + if (bp->b_vflags & BV_BKGRDINPROG) + panic("losing buffer 1"); + if (bp->b_rcred != NOCRED) { + crfree(bp->b_rcred); + bp->b_rcred = NOCRED; + } + if (bp->b_wcred != NOCRED) { + crfree(bp->b_wcred); + bp->b_wcred = NOCRED; + } + if (!LIST_EMPTY(&bp->b_dep)) + buf_deallocate(bp); + bufkva_free(bp); + BUF_UNLOCK(bp); + uma_zfree(buf_zone, bp); + atomic_add_int(&numfreebuffers, 1); + bufspace_wakeup(); +} + +/* + * buf_import: + * + * Import bufs into the uma cache from the buf list. The system still + * expects a static array of bufs and much of the synchronization + * around bufs assumes type stable storage. As a result, UMA is used + * only as a per-cpu cache of bufs still maintained on a global list. + */ +static int +buf_import(void *arg, void **store, int cnt, int flags) +{ + struct buf *bp; + int i; + + mtx_lock(&bqlocks[QUEUE_EMPTY]); + for (i = 0; i < cnt; i++) { + bp = TAILQ_FIRST(&bufqueues[QUEUE_EMPTY]); + if (bp == NULL) + break; + bremfreel(bp); + store[i] = bp; + } + mtx_unlock(&bqlocks[QUEUE_EMPTY]); + + return (i); +} + +/* + * buf_release: + * + * Release bufs from the uma cache back to the buffer queues. + */ +static void +buf_release(void *arg, void **store, int cnt) +{ + int i; + + for (i = 0; i < cnt; i++) + binsfree(store[i], QUEUE_EMPTY); +} + +/* + * buf_alloc: + * + * Allocate an empty buffer header. + */ +static struct buf * +buf_alloc(void) +{ + struct buf *bp; + + bp = uma_zalloc(buf_zone, M_NOWAIT); + if (bp == NULL) { + bufspace_daemonwakeup(); + atomic_add_int(&numbufallocfails, 1); + return (NULL); + } + + /* + * Wake-up the bufspace daemon on transition. + */ + if (atomic_fetchadd_int(&numfreebuffers, -1) == lofreebuffers) + bufspace_daemonwakeup(); + + if (BUF_LOCK(bp, LK_EXCLUSIVE | LK_NOWAIT, NULL) != 0) + panic("getnewbuf_empty: Locked buf %p on free queue.", bp); + + KASSERT(bp->b_vp == NULL, + ("bp: %p still has vnode %p.", bp, bp->b_vp)); + KASSERT((bp->b_flags & (B_DELWRI | B_NOREUSE)) == 0, + ("invalid buffer %p flags %#x", bp, bp->b_flags)); + KASSERT((bp->b_xflags & (BX_VNCLEAN|BX_VNDIRTY)) == 0, + ("bp: %p still on a buffer list. xflags %X", bp, bp->b_xflags)); + KASSERT(bp->b_npages == 0, + ("bp: %p still has %d vm pages\n", bp, bp->b_npages)); + KASSERT(bp->b_kvasize == 0, ("bp: %p still has kva\n", bp)); + KASSERT(bp->b_bufsize == 0, ("bp: %p still has bufspace\n", bp)); + + bp->b_flags = 0; + bp->b_ioflags = 0; + bp->b_xflags = 0; + bp->b_vflags = 0; + bp->b_vp = NULL; + bp->b_blkno = bp->b_lblkno = 0; + bp->b_offset = NOOFFSET; + bp->b_iodone = 0; + bp->b_error = 0; + bp->b_resid = 0; + bp->b_bcount = 0; + bp->b_npages = 0; + bp->b_dirtyoff = bp->b_dirtyend = 0; + bp->b_bufobj = NULL; + bp->b_pin_count = 0; + bp->b_data = bp->b_kvabase = unmapped_buf; + bp->b_fsprivate1 = NULL; + bp->b_fsprivate2 = NULL; + bp->b_fsprivate3 = NULL; + LIST_INIT(&bp->b_dep); + + return (bp); +} + +/* + * buf_qrecycle: + * + * Free a buffer from the given bufqueue. kva controls whether the + * freed buf must own some kva resources. This is used for + * defragmenting. + */ +static int +buf_qrecycle(int qindex, bool kva) +{ + struct buf *bp, *nbp; + + if (kva) + atomic_add_int(&bufdefragcnt, 1); + nbp = NULL; + mtx_lock(&bqlocks[qindex]); + nbp = TAILQ_FIRST(&bufqueues[qindex]); + + /* + * Run scan, possibly freeing data and/or kva mappings on the fly + * depending. + */ + while ((bp = nbp) != NULL) { + /* + * Calculate next bp (we can only use it if we do not + * release the bqlock). + */ + nbp = TAILQ_NEXT(bp, b_freelist); + + /* + * If we are defragging then we need a buffer with + * some kva to reclaim. + */ + if (kva && bp->b_kvasize == 0) + continue; + + if (BUF_LOCK(bp, LK_EXCLUSIVE | LK_NOWAIT, NULL) != 0) + continue; + + /* + * Skip buffers with background writes in progress. + */ + if ((bp->b_vflags & BV_BKGRDINPROG) != 0) { + BUF_UNLOCK(bp); + continue; + } + + KASSERT(bp->b_qindex == qindex, + ("getnewbuf: inconsistent queue %d bp %p", qindex, bp)); + /* + * NOTE: nbp is now entirely invalid. We can only restart + * the scan from this point on. + */ + bremfreel(bp); + mtx_unlock(&bqlocks[qindex]); + + /* + * Requeue the background write buffer with error and + * restart the scan. + */ + if ((bp->b_vflags & BV_BKGRDERR) != 0) { + bqrelse(bp); + mtx_lock(&bqlocks[qindex]); + nbp = TAILQ_FIRST(&bufqueues[qindex]); + continue; + } + bp->b_flags |= B_INVAL; + brelse(bp); + return (0); + } + mtx_unlock(&bqlocks[qindex]); + + return (ENOBUFS); +} + +/* + * buf_recycle: + * + * Iterate through all clean queues until we find a buf to recycle or + * exhaust the search. + */ +static int +buf_recycle(bool kva) +{ + int qindex, first_qindex; + + qindex = first_qindex = bqcleanq(); + do { + if (buf_qrecycle(qindex, kva) == 0) + return (0); + if (++qindex == QUEUE_CLEAN + clean_queues) + qindex = QUEUE_CLEAN; + } while (qindex != first_qindex); + + return (ENOBUFS); +} + +/* + * buf_scan: + * + * Scan the clean queues looking for a buffer to recycle. needsbuffer + * is set on failure so that the caller may optionally bufspace_wait() + * in a race-free fashion. + */ +static int +buf_scan(bool defrag) +{ + int error; /* - * Something we can maybe free or reuse. - */ - if (bp->b_bufsize && !(bp->b_flags & B_DELWRI)) - bufspacewakeup(); - - if ((bp->b_flags & B_INVAL) || !(bp->b_flags & B_DELWRI)) - bufcountadd(bp); + * To avoid heavy synchronization and wakeup races we set + * needsbuffer and re-poll before failing. This ensures that + * no frees can be missed between an unsuccessful poll and + * going to sleep in a synchronized fashion. + */ *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@freebsd.org Wed Oct 14 02:14:16 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id BBC89A12915; Wed, 14 Oct 2015 02:14:16 +0000 (UTC) (envelope-from cem@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6F9C7101D; Wed, 14 Oct 2015 02:14:16 +0000 (UTC) (envelope-from cem@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t9E2EFg7059303; Wed, 14 Oct 2015 02:14:15 GMT (envelope-from cem@FreeBSD.org) Received: (from cem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9E2EFYs059300; Wed, 14 Oct 2015 02:14:15 GMT (envelope-from cem@FreeBSD.org) Message-Id: <201510140214.t9E2EFYs059300@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cem set sender to cem@FreeBSD.org using -f From: "Conrad E. Meyer" Date: Wed, 14 Oct 2015 02:14:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289280 - head/sys/dev/ntb/ntb_hw X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Oct 2015 02:14:16 -0000 Author: cem Date: Wed Oct 14 02:14:15 2015 New Revision: 289280 URL: https://svnweb.freebsd.org/changeset/base/289280 Log: NTB: MFV 78958433: Enable Snoop on Primary Side Enable Snoop from Primary to Secondary side on BAR23 and BAR45 on all TLPs. Previously, Snoop was only enabled from Secondary to Primary side. This can have a performance improvement on some workloads. Also, make the code more obvious about how the link is being enabled. Authored by: Jon Mason Obtained from: Linux (Dual BSD/GPL driver) Sponsored by: EMC / Isilon Storage Division Modified: head/sys/dev/ntb/ntb_hw/ntb_hw.c head/sys/dev/ntb/ntb_hw/ntb_regs.h Modified: head/sys/dev/ntb/ntb_hw/ntb_hw.c ============================================================================== --- head/sys/dev/ntb/ntb_hw/ntb_hw.c Wed Oct 14 02:10:07 2015 (r289279) +++ head/sys/dev/ntb/ntb_hw/ntb_hw.c Wed Oct 14 02:14:15 2015 (r289280) @@ -1050,12 +1050,18 @@ ntb_handle_link_event(struct ntb_softc * static void ntb_hw_link_up(struct ntb_softc *ntb) { + uint32_t cntl; - if (ntb->conn_type == NTB_CONN_TRANSPARENT) + if (ntb->conn_type == NTB_CONN_TRANSPARENT) { ntb_handle_link_event(ntb, NTB_LINK_UP); - else - ntb_reg_write(4, ntb->reg_ofs.lnk_cntl, - NTB_CNTL_BAR23_SNOOP | NTB_CNTL_BAR45_SNOOP); + return; + } + + cntl = ntb_reg_read(4, ntb->reg_ofs.lnk_cntl); + cntl &= ~(NTB_CNTL_LINK_DISABLE | NTB_CNTL_CFG_LOCK); + cntl |= NTB_CNTL_P2S_BAR23_SNOOP | NTB_CNTL_S2P_BAR23_SNOOP; + cntl |= NTB_CNTL_P2S_BAR45_SNOOP | NTB_CNTL_S2P_BAR45_SNOOP; + ntb_reg_write(4, ntb->reg_ofs.lnk_cntl, cntl); } static void @@ -1069,8 +1075,9 @@ ntb_hw_link_down(struct ntb_softc *ntb) } cntl = ntb_reg_read(4, ntb->reg_ofs.lnk_cntl); - cntl &= ~(NTB_CNTL_BAR23_SNOOP | NTB_CNTL_BAR45_SNOOP); - cntl |= NTB_CNTL_LINK_DISABLE; + cntl &= ~(NTB_CNTL_P2S_BAR23_SNOOP | NTB_CNTL_S2P_BAR23_SNOOP); + cntl &= ~(NTB_CNTL_P2S_BAR45_SNOOP | NTB_CNTL_S2P_BAR45_SNOOP); + cntl |= NTB_CNTL_LINK_DISABLE | NTB_CNTL_CFG_LOCK; ntb_reg_write(4, ntb->reg_ofs.lnk_cntl, cntl); } Modified: head/sys/dev/ntb/ntb_hw/ntb_regs.h ============================================================================== --- head/sys/dev/ntb/ntb_hw/ntb_regs.h Wed Oct 14 02:10:07 2015 (r289279) +++ head/sys/dev/ntb/ntb_hw/ntb_regs.h Wed Oct 14 02:14:15 2015 (r289280) @@ -116,11 +116,13 @@ #define SOC_LTSSMSTATEJMP_FORCEDETECT (1 << 2) #define SOC_IBIST_ERR_OFLOW 0x7fff7fff -#define NTB_CNTL_CFG_LOCK (1 << 0) -#define NTB_CNTL_LINK_DISABLE (1 << 1) -#define NTB_CNTL_BAR23_SNOOP (1 << 2) -#define NTB_CNTL_BAR45_SNOOP (1 << 6) -#define SOC_CNTL_LINK_DOWN (1 << 16) +#define NTB_CNTL_CFG_LOCK (1 << 0) +#define NTB_CNTL_LINK_DISABLE (1 << 1) +#define NTB_CNTL_S2P_BAR23_SNOOP (1 << 2) +#define NTB_CNTL_P2S_BAR23_SNOOP (1 << 4) +#define NTB_CNTL_S2P_BAR45_SNOOP (1 << 6) +#define NTB_CNTL_P2S_BAR45_SNOOP (1 << 8) +#define SOC_CNTL_LINK_DOWN (1 << 16) #define XEON_PBAR23SZ_OFFSET 0x00d0 #define XEON_PBAR45SZ_OFFSET 0x00d1 From owner-svn-src-all@freebsd.org Wed Oct 14 02:14:47 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3EEDDA12956; Wed, 14 Oct 2015 02:14:47 +0000 (UTC) (envelope-from cem@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 143BD1174; Wed, 14 Oct 2015 02:14:46 +0000 (UTC) (envelope-from cem@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t9E2EklY059364; Wed, 14 Oct 2015 02:14:46 GMT (envelope-from cem@FreeBSD.org) Received: (from cem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9E2EjPe059361; Wed, 14 Oct 2015 02:14:45 GMT (envelope-from cem@FreeBSD.org) Message-Id: <201510140214.t9E2EjPe059361@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cem set sender to cem@FreeBSD.org using -f From: "Conrad E. Meyer" Date: Wed, 14 Oct 2015 02:14:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289281 - in head/sys/dev/ntb: if_ntb ntb_hw X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Oct 2015 02:14:47 -0000 Author: cem Date: Wed Oct 14 02:14:45 2015 New Revision: 289281 URL: https://svnweb.freebsd.org/changeset/base/289281 Log: NTB: MFV e8aeb60c: Disable interrupts and poll under high load Authored by: Jon Mason Obtained from: Linux (Dual BSD/GPL driver) Sponsored by: EMC / Isilon Storage Division Modified: head/sys/dev/ntb/if_ntb/if_ntb.c head/sys/dev/ntb/ntb_hw/ntb_hw.c head/sys/dev/ntb/ntb_hw/ntb_hw.h Modified: head/sys/dev/ntb/if_ntb/if_ntb.c ============================================================================== --- head/sys/dev/ntb/if_ntb/if_ntb.c Wed Oct 14 02:14:15 2015 (r289280) +++ head/sys/dev/ntb/if_ntb/if_ntb.c Wed Oct 14 02:14:45 2015 (r289281) @@ -32,6 +32,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -249,9 +250,8 @@ static int ntb_process_tx(struct ntb_tra static void ntb_tx_copy_task(struct ntb_transport_qp *qp, struct ntb_queue_entry *entry, void *offset); static void ntb_qp_full(void *arg); -static void ntb_transport_rxc_db(void *data, int db_num); +static int ntb_transport_rxc_db(void *arg, int dummy); static void ntb_rx_pendq_full(void *arg); -static void ntb_transport_rx(struct ntb_transport_qp *qp); static int ntb_process_rxc(struct ntb_transport_qp *qp); static void ntb_rx_copy_task(struct ntb_transport_qp *qp, struct ntb_queue_entry *entry, void *offset); @@ -840,24 +840,17 @@ ntb_qp_full(void *arg) /* Transport Rx */ static void -ntb_transport_rxc_db(void *data, int db_num) -{ - struct ntb_transport_qp *qp = data; - - ntb_transport_rx(qp); -} - -static void ntb_rx_pendq_full(void *arg) { CTR0(KTR_NTB, "RX: ntb_rx_pendq_full callout"); - ntb_transport_rx(arg); + ntb_transport_rxc_db(arg, 0); } -static void -ntb_transport_rx(struct ntb_transport_qp *qp) +static int +ntb_transport_rxc_db(void *arg, int dummy __unused) { + struct ntb_transport_qp *qp = arg; uint64_t i; int rc; @@ -867,7 +860,7 @@ ntb_transport_rx(struct ntb_transport_qp */ mtx_lock(&qp->transport->rx_lock); CTR0(KTR_NTB, "RX: transport_rx"); - for (i = 0; i < qp->rx_max_entry; i++) { + for (i = 0; i < MIN(qp->rx_max_entry, INT_MAX); i++) { rc = ntb_process_rxc(qp); if (rc != 0) { CTR0(KTR_NTB, "RX: process_rxc failed"); @@ -875,6 +868,8 @@ ntb_transport_rx(struct ntb_transport_qp } } mtx_unlock(&qp->transport->rx_lock); + + return ((int)i); } static int Modified: head/sys/dev/ntb/ntb_hw/ntb_hw.c ============================================================================== --- head/sys/dev/ntb/ntb_hw/ntb_hw.c Wed Oct 14 02:14:15 2015 (r289280) +++ head/sys/dev/ntb/ntb_hw/ntb_hw.c Wed Oct 14 02:14:45 2015 (r289281) @@ -109,6 +109,7 @@ struct ntb_db_cb { unsigned int db_num; void *data; struct ntb_softc *ntb; + struct callout irq_work; }; struct ntb_softc { @@ -204,6 +205,9 @@ static void handle_soc_irq(void *arg); static void handle_xeon_irq(void *arg); static void handle_xeon_event_irq(void *arg); static void ntb_handle_legacy_interrupt(void *arg); +static void ntb_irq_work(void *arg); +static void mask_ldb_interrupt(struct ntb_softc *ntb, unsigned int idx); +static void unmask_ldb_interrupt(struct ntb_softc *ntb, unsigned int idx); static int ntb_create_callbacks(struct ntb_softc *ntb, int num_vectors); static void ntb_free_callbacks(struct ntb_softc *ntb); static struct ntb_hw_info *ntb_get_device_info(uint32_t device_id); @@ -580,6 +584,26 @@ ntb_teardown_interrupts(struct ntb_softc } static void +mask_ldb_interrupt(struct ntb_softc *ntb, unsigned int idx) +{ + unsigned long mask; + + mask = ntb_reg_read(2, ntb->reg_ofs.ldb_mask); + mask |= 1 << (idx * ntb->bits_per_vector); + ntb_reg_write(2, ntb->reg_ofs.ldb_mask, mask); +} + +static void +unmask_ldb_interrupt(struct ntb_softc *ntb, unsigned int idx) +{ + unsigned long mask; + + mask = ntb_reg_read(2, ntb->reg_ofs.ldb_mask); + mask &= ~(1 << (idx * ntb->bits_per_vector)); + ntb_reg_write(2, ntb->reg_ofs.ldb_mask, mask); +} + +static void handle_soc_irq(void *arg) { struct ntb_db_cb *db_cb = arg; @@ -587,8 +611,10 @@ handle_soc_irq(void *arg) ntb_reg_write(8, ntb->reg_ofs.ldb, (uint64_t) 1 << db_cb->db_num); - if (db_cb->callback != NULL) - db_cb->callback(db_cb->data, db_cb->db_num); + if (db_cb->callback != NULL) { + mask_ldb_interrupt(ntb, db_cb->db_num); + callout_reset(&db_cb->irq_work, 0, ntb_irq_work, db_cb); + } } static void @@ -607,8 +633,10 @@ handle_xeon_irq(void *arg) ((1 << ntb->bits_per_vector) - 1) << (db_cb->db_num * ntb->bits_per_vector)); - if (db_cb->callback != NULL) - db_cb->callback(db_cb->data, db_cb->db_num); + if (db_cb->callback != NULL) { + mask_ldb_interrupt(ntb, db_cb->db_num); + callout_reset(&db_cb->irq_work, 0, ntb_irq_work, db_cb); + } } /* Since we do not have a HW doorbell in SOC, this is only used in JF/JT */ @@ -1191,6 +1219,25 @@ ntb_unregister_event_callback(struct ntb ntb->event_cb = NULL; } +static void +ntb_irq_work(void *arg) +{ + struct ntb_db_cb *db_cb = arg; + struct ntb_softc *ntb; + int rc; + + rc = db_cb->callback(db_cb->data, db_cb->db_num); + /* Poll if forward progress was made. */ + if (rc != 0) { + callout_reset(&db_cb->irq_work, 0, ntb_irq_work, db_cb); + return; + } + + /* Unmask interrupt if no progress was made. */ + ntb = db_cb->ntb; + unmask_ldb_interrupt(ntb, db_cb->db_num); +} + /** * ntb_register_db_callback() - register a callback for doorbell interrupt * @ntb: pointer to ntb_softc instance @@ -1208,7 +1255,6 @@ int ntb_register_db_callback(struct ntb_softc *ntb, unsigned int idx, void *data, ntb_db_callback func) { - uint16_t mask; if (idx >= ntb->allocated_interrupts || ntb->db_cb[idx].callback) { device_printf(ntb->device, "Invalid Index.\n"); @@ -1217,11 +1263,9 @@ ntb_register_db_callback(struct ntb_soft ntb->db_cb[idx].callback = func; ntb->db_cb[idx].data = data; + callout_init(&ntb->db_cb[idx].irq_work, 1); - /* unmask interrupt */ - mask = ntb_reg_read(2, ntb->reg_ofs.ldb_mask); - mask &= ~(1 << (idx * ntb->bits_per_vector)); - ntb_reg_write(2, ntb->reg_ofs.ldb_mask, mask); + unmask_ldb_interrupt(ntb, idx); return (0); } @@ -1237,15 +1281,13 @@ ntb_register_db_callback(struct ntb_soft void ntb_unregister_db_callback(struct ntb_softc *ntb, unsigned int idx) { - unsigned long mask; if (idx >= ntb->allocated_interrupts || !ntb->db_cb[idx].callback) return; - mask = ntb_reg_read(2, ntb->reg_ofs.ldb_mask); - mask |= 1 << (idx * ntb->bits_per_vector); - ntb_reg_write(2, ntb->reg_ofs.ldb_mask, mask); + mask_ldb_interrupt(ntb, idx); + callout_drain(&ntb->db_cb[idx].irq_work); ntb->db_cb[idx].callback = NULL; } Modified: head/sys/dev/ntb/ntb_hw/ntb_hw.h ============================================================================== --- head/sys/dev/ntb/ntb_hw/ntb_hw.h Wed Oct 14 02:14:15 2015 (r289280) +++ head/sys/dev/ntb/ntb_hw/ntb_hw.h Wed Oct 14 02:14:45 2015 (r289281) @@ -46,7 +46,7 @@ enum ntb_hw_event { SYSCTL_DECL(_hw_ntb); -typedef void (*ntb_db_callback)(void *data, int db_num); +typedef int (*ntb_db_callback)(void *data, int db_num); typedef void (*ntb_event_callback)(void *data, enum ntb_hw_event event); int ntb_register_event_callback(struct ntb_softc *ntb, ntb_event_callback func); From owner-svn-src-all@freebsd.org Wed Oct 14 02:16:18 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4CAB4A129F0; Wed, 14 Oct 2015 02:16:18 +0000 (UTC) (envelope-from cse.cem@gmail.com) Received: from mail-yk0-f171.google.com (mail-yk0-f171.google.com [209.85.160.171]) (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 1388212E9; Wed, 14 Oct 2015 02:16:17 +0000 (UTC) (envelope-from cse.cem@gmail.com) Received: by ykaz22 with SMTP id z22so9354688yka.2; Tue, 13 Oct 2015 19:16:11 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=mime-version:reply-to:in-reply-to:references:date:message-id :subject:from:to:cc:content-type; bh=zihBv6FayFsKpRg2MbCG0QagaDTdEe7qSKXr45a9gS8=; b=EZ2OWbDxTcbkpaQYjFFqNcz/bOYGwXYCXvEF/viI7QgB84Lq9FzbkmuUpHxHaribWG 8XKVV12mP25T0OQgFsBNjHhFS24kNLlZFeGEK1yZYT7MgNsAognYmbjcKMxWiaBjv5Y0 PCYDGTtGymHv5rZ/gbvgC4+jt9nCsjVbFIVlByGuCYrcoXAZzdWY1S0b4JWlncnF6dw1 UJiz9NJ4beY6GTCKzqNek9utLdBYjD1JQF0n30azsDLUxeghW7YFo3cVMpuYJDGgHkyk oBKd0iUpgoI0q/yRgJRut0tTyZTsFACWaX5OoYZSnEJX1AuSOjG8MmcDnjpdEkh9X1ms nziw== X-Received: by 10.129.95.195 with SMTP id t186mr399255ywb.204.1444788971633; Tue, 13 Oct 2015 19:16:11 -0700 (PDT) Received: from mail-yk0-f172.google.com (mail-yk0-f172.google.com. [209.85.160.172]) by smtp.gmail.com with ESMTPSA id z205sm4067974ywb.7.2015.10.13.19.16.11 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 13 Oct 2015 19:16:11 -0700 (PDT) Received: by ykoo7 with SMTP id o7so35210173yko.0; Tue, 13 Oct 2015 19:16:11 -0700 (PDT) MIME-Version: 1.0 X-Received: by 10.129.81.131 with SMTP id f125mr356539ywb.271.1444788971251; Tue, 13 Oct 2015 19:16:11 -0700 (PDT) Reply-To: cem@FreeBSD.org Received: by 10.37.203.75 with HTTP; Tue, 13 Oct 2015 19:16:11 -0700 (PDT) In-Reply-To: <201510140214.t9E2EjPe059361@repo.freebsd.org> References: <201510140214.t9E2EjPe059361@repo.freebsd.org> Date: Tue, 13 Oct 2015 19:16:11 -0700 Message-ID: Subject: Re: svn commit: r289281 - in head/sys/dev/ntb: if_ntb ntb_hw From: Conrad Meyer To: svn-src-head@freebsd.org Cc: src-committers@freebsd.org, svn-src-all@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 " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Oct 2015 02:16:18 -0000 This catches us up to Linux @ Nov 26, 2013, modulo earlier caveats. Best, Conrad On Tue, Oct 13, 2015 at 7:14 PM, Conrad E. Meyer wrote: > Author: cem > Date: Wed Oct 14 02:14:45 2015 > New Revision: 289281 > URL: https://svnweb.freebsd.org/changeset/base/289281 > > Log: > NTB: MFV e8aeb60c: Disable interrupts and poll under high load > > Authored by: Jon Mason > Obtained from: Linux (Dual BSD/GPL driver) > Sponsored by: EMC / Isilon Storage Division > > Modified: > head/sys/dev/ntb/if_ntb/if_ntb.c > head/sys/dev/ntb/ntb_hw/ntb_hw.c > head/sys/dev/ntb/ntb_hw/ntb_hw.h > > Modified: head/sys/dev/ntb/if_ntb/if_ntb.c > ============================================================================== > --- head/sys/dev/ntb/if_ntb/if_ntb.c Wed Oct 14 02:14:15 2015 (r289280) > +++ head/sys/dev/ntb/if_ntb/if_ntb.c Wed Oct 14 02:14:45 2015 (r289281) > @@ -32,6 +32,7 @@ __FBSDID("$FreeBSD$"); > #include > #include > #include > +#include > #include > #include > #include > @@ -249,9 +250,8 @@ static int ntb_process_tx(struct ntb_tra > static void ntb_tx_copy_task(struct ntb_transport_qp *qp, > struct ntb_queue_entry *entry, void *offset); > static void ntb_qp_full(void *arg); > -static void ntb_transport_rxc_db(void *data, int db_num); > +static int ntb_transport_rxc_db(void *arg, int dummy); > static void ntb_rx_pendq_full(void *arg); > -static void ntb_transport_rx(struct ntb_transport_qp *qp); > static int ntb_process_rxc(struct ntb_transport_qp *qp); > static void ntb_rx_copy_task(struct ntb_transport_qp *qp, > struct ntb_queue_entry *entry, void *offset); > @@ -840,24 +840,17 @@ ntb_qp_full(void *arg) > > /* Transport Rx */ > static void > -ntb_transport_rxc_db(void *data, int db_num) > -{ > - struct ntb_transport_qp *qp = data; > - > - ntb_transport_rx(qp); > -} > - > -static void > ntb_rx_pendq_full(void *arg) > { > > CTR0(KTR_NTB, "RX: ntb_rx_pendq_full callout"); > - ntb_transport_rx(arg); > + ntb_transport_rxc_db(arg, 0); > } > > -static void > -ntb_transport_rx(struct ntb_transport_qp *qp) > +static int > +ntb_transport_rxc_db(void *arg, int dummy __unused) > { > + struct ntb_transport_qp *qp = arg; > uint64_t i; > int rc; > > @@ -867,7 +860,7 @@ ntb_transport_rx(struct ntb_transport_qp > */ > mtx_lock(&qp->transport->rx_lock); > CTR0(KTR_NTB, "RX: transport_rx"); > - for (i = 0; i < qp->rx_max_entry; i++) { > + for (i = 0; i < MIN(qp->rx_max_entry, INT_MAX); i++) { > rc = ntb_process_rxc(qp); > if (rc != 0) { > CTR0(KTR_NTB, "RX: process_rxc failed"); > @@ -875,6 +868,8 @@ ntb_transport_rx(struct ntb_transport_qp > } > } > mtx_unlock(&qp->transport->rx_lock); > + > + return ((int)i); > } > > static int > > Modified: head/sys/dev/ntb/ntb_hw/ntb_hw.c > ============================================================================== > --- head/sys/dev/ntb/ntb_hw/ntb_hw.c Wed Oct 14 02:14:15 2015 (r289280) > +++ head/sys/dev/ntb/ntb_hw/ntb_hw.c Wed Oct 14 02:14:45 2015 (r289281) > @@ -109,6 +109,7 @@ struct ntb_db_cb { > unsigned int db_num; > void *data; > struct ntb_softc *ntb; > + struct callout irq_work; > }; > > struct ntb_softc { > @@ -204,6 +205,9 @@ static void handle_soc_irq(void *arg); > static void handle_xeon_irq(void *arg); > static void handle_xeon_event_irq(void *arg); > static void ntb_handle_legacy_interrupt(void *arg); > +static void ntb_irq_work(void *arg); > +static void mask_ldb_interrupt(struct ntb_softc *ntb, unsigned int idx); > +static void unmask_ldb_interrupt(struct ntb_softc *ntb, unsigned int idx); > static int ntb_create_callbacks(struct ntb_softc *ntb, int num_vectors); > static void ntb_free_callbacks(struct ntb_softc *ntb); > static struct ntb_hw_info *ntb_get_device_info(uint32_t device_id); > @@ -580,6 +584,26 @@ ntb_teardown_interrupts(struct ntb_softc > } > > static void > +mask_ldb_interrupt(struct ntb_softc *ntb, unsigned int idx) > +{ > + unsigned long mask; > + > + mask = ntb_reg_read(2, ntb->reg_ofs.ldb_mask); > + mask |= 1 << (idx * ntb->bits_per_vector); > + ntb_reg_write(2, ntb->reg_ofs.ldb_mask, mask); > +} > + > +static void > +unmask_ldb_interrupt(struct ntb_softc *ntb, unsigned int idx) > +{ > + unsigned long mask; > + > + mask = ntb_reg_read(2, ntb->reg_ofs.ldb_mask); > + mask &= ~(1 << (idx * ntb->bits_per_vector)); > + ntb_reg_write(2, ntb->reg_ofs.ldb_mask, mask); > +} > + > +static void > handle_soc_irq(void *arg) > { > struct ntb_db_cb *db_cb = arg; > @@ -587,8 +611,10 @@ handle_soc_irq(void *arg) > > ntb_reg_write(8, ntb->reg_ofs.ldb, (uint64_t) 1 << db_cb->db_num); > > - if (db_cb->callback != NULL) > - db_cb->callback(db_cb->data, db_cb->db_num); > + if (db_cb->callback != NULL) { > + mask_ldb_interrupt(ntb, db_cb->db_num); > + callout_reset(&db_cb->irq_work, 0, ntb_irq_work, db_cb); > + } > } > > static void > @@ -607,8 +633,10 @@ handle_xeon_irq(void *arg) > ((1 << ntb->bits_per_vector) - 1) << > (db_cb->db_num * ntb->bits_per_vector)); > > - if (db_cb->callback != NULL) > - db_cb->callback(db_cb->data, db_cb->db_num); > + if (db_cb->callback != NULL) { > + mask_ldb_interrupt(ntb, db_cb->db_num); > + callout_reset(&db_cb->irq_work, 0, ntb_irq_work, db_cb); > + } > } > > /* Since we do not have a HW doorbell in SOC, this is only used in JF/JT */ > @@ -1191,6 +1219,25 @@ ntb_unregister_event_callback(struct ntb > ntb->event_cb = NULL; > } > > +static void > +ntb_irq_work(void *arg) > +{ > + struct ntb_db_cb *db_cb = arg; > + struct ntb_softc *ntb; > + int rc; > + > + rc = db_cb->callback(db_cb->data, db_cb->db_num); > + /* Poll if forward progress was made. */ > + if (rc != 0) { > + callout_reset(&db_cb->irq_work, 0, ntb_irq_work, db_cb); > + return; > + } > + > + /* Unmask interrupt if no progress was made. */ > + ntb = db_cb->ntb; > + unmask_ldb_interrupt(ntb, db_cb->db_num); > +} > + > /** > * ntb_register_db_callback() - register a callback for doorbell interrupt > * @ntb: pointer to ntb_softc instance > @@ -1208,7 +1255,6 @@ int > ntb_register_db_callback(struct ntb_softc *ntb, unsigned int idx, void *data, > ntb_db_callback func) > { > - uint16_t mask; > > if (idx >= ntb->allocated_interrupts || ntb->db_cb[idx].callback) { > device_printf(ntb->device, "Invalid Index.\n"); > @@ -1217,11 +1263,9 @@ ntb_register_db_callback(struct ntb_soft > > ntb->db_cb[idx].callback = func; > ntb->db_cb[idx].data = data; > + callout_init(&ntb->db_cb[idx].irq_work, 1); > > - /* unmask interrupt */ > - mask = ntb_reg_read(2, ntb->reg_ofs.ldb_mask); > - mask &= ~(1 << (idx * ntb->bits_per_vector)); > - ntb_reg_write(2, ntb->reg_ofs.ldb_mask, mask); > + unmask_ldb_interrupt(ntb, idx); > > return (0); > } > @@ -1237,15 +1281,13 @@ ntb_register_db_callback(struct ntb_soft > void > ntb_unregister_db_callback(struct ntb_softc *ntb, unsigned int idx) > { > - unsigned long mask; > > if (idx >= ntb->allocated_interrupts || !ntb->db_cb[idx].callback) > return; > > - mask = ntb_reg_read(2, ntb->reg_ofs.ldb_mask); > - mask |= 1 << (idx * ntb->bits_per_vector); > - ntb_reg_write(2, ntb->reg_ofs.ldb_mask, mask); > + mask_ldb_interrupt(ntb, idx); > > + callout_drain(&ntb->db_cb[idx].irq_work); > ntb->db_cb[idx].callback = NULL; > } > > > Modified: head/sys/dev/ntb/ntb_hw/ntb_hw.h > ============================================================================== > --- head/sys/dev/ntb/ntb_hw/ntb_hw.h Wed Oct 14 02:14:15 2015 (r289280) > +++ head/sys/dev/ntb/ntb_hw/ntb_hw.h Wed Oct 14 02:14:45 2015 (r289281) > @@ -46,7 +46,7 @@ enum ntb_hw_event { > > SYSCTL_DECL(_hw_ntb); > > -typedef void (*ntb_db_callback)(void *data, int db_num); > +typedef int (*ntb_db_callback)(void *data, int db_num); > typedef void (*ntb_event_callback)(void *data, enum ntb_hw_event event); > > int ntb_register_event_callback(struct ntb_softc *ntb, ntb_event_callback func); > From owner-svn-src-all@freebsd.org Wed Oct 14 02:33:53 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B42EDA12E2A; Wed, 14 Oct 2015 02:33:53 +0000 (UTC) (envelope-from hiren@FreeBSD.org) Received: from mail.strugglingcoder.info (strugglingcoder.info [65.19.130.35]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mail.strugglingcoder.info", Issuer "mail.strugglingcoder.info" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 971161B37; Wed, 14 Oct 2015 02:33:53 +0000 (UTC) (envelope-from hiren@FreeBSD.org) Received: from localhost (unknown [10.1.1.3]) (Authenticated sender: hiren@strugglingcoder.info) by mail.strugglingcoder.info (Postfix) with ESMTPA id 4890A10962B; Tue, 13 Oct 2015 19:33:52 -0700 (PDT) Date: Tue, 13 Oct 2015 19:33:52 -0700 From: Hiren Panchasara To: Bryan Drewery , jlooney@juniper.net Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r289276 - in head/sys: conf kern netinet sys Message-ID: <20151014023352.GI87252@strugglingcoder.info> References: <201510140035.t9E0ZbXS030094@repo.freebsd.org> <561DB6CB.8060208@FreeBSD.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="mFHiwr52TKrxpkjc" Content-Disposition: inline In-Reply-To: <561DB6CB.8060208@FreeBSD.org> User-Agent: Mutt/1.5.23 (2014-03-12) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Oct 2015 02:33:53 -0000 --mFHiwr52TKrxpkjc Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On 10/13/15 at 06:58P, Bryan Drewery wrote: > On 10/13/2015 5:35 PM, Hiren Panchasara wrote: > > Author: hiren > > Date: Wed Oct 14 00:35:37 2015 > > New Revision: 289276 > > URL: https://svnweb.freebsd.org/changeset/base/289276 > >=20 > > Log: > > There are times when it would be really nice to have a record of the = last few > > packets and/or state transitions from each TCP socket. That would hel= p with > > narrowing down certain problems we see in the field that are hard to = reproduce > > without understanding the history of how we got into a certain state.= This > > change provides just that. > > =20 > > It saves copies of the last N packets in a list in the tcpcb. When th= e tcpcb is > > destroyed, the list is freed. I thought this was likely to be more > > performance-friendly than saving copies of the tcpcb. Plus, with the = packets, > > you should be able to reverse-engineer what happened to the tcpcb. > > =20 > > To enable the feature, you will need to compile a kernel with the TCP= PCAP > > option. Even then, the feature defaults to being deactivated. You can= activate > > it by setting a positive value for the number of captured packets. Yo= u can do > > that on either a global basis or on a per-socket basis (via a setsock= opt call). > > =20 > > There is no way to get the packets out of the kernel other than using= kmem or > > getting a coredump. I thought that would help some of the legal/priva= cy concerns > > regarding such a feature. However, it should be possible to add a fut= ure effort > > to export them in PCAP format. > > =20 > > I tested this at low scale, and found that there were no mbuf leaks a= nd the peak > > mbuf usage appeared to be unchanged with and without the feature. > > =20 > > The main performance concern I can envision is the number of mbufs th= at would be > > used on systems with a large number of sockets. If you save five pack= ets per > > direction per socket and have 3,000 sockets, that will consume at lea= st 30,000 > > mbufs just to keep these packets. I tried to reduce the concerns asso= ciated with > > this by limiting the number of clusters (not mbufs) that could be use= d for this > > feature. Again, in my testing, that appears to work correctly. > > =20 > > Differential Revision: D3100 >=20 > You're supposed to use the full URL here which will auto close the review. Okay. It did pick up the commit though. What more does it need to know?=20 >=20 > I also replied to the review with style findings just now. > I'll ask Jonathan to look at it. Cheers, Hiren --mFHiwr52TKrxpkjc Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQF8BAABCgBmBQJWHb8NXxSAAAAAAC4AKGlzc3Vlci1mcHJAbm90YXRpb25zLm9w ZW5wZ3AuZmlmdGhob3JzZW1hbi5uZXRBNEUyMEZBMUQ4Nzg4RjNGMTdFNjZGMDI4 QjkyNTBFMTU2M0VERkU1AAoJEIuSUOFWPt/lih8H/jdkLUaGUPTs35aJM2S+8vnJ c+3uR4qlWHNbaz3PMut+sODixhxo44j4HqDlU3cv1Yl+hvtCXLexjxMf5FbzZ+fy 1WMei/LT6pcLc81bZVNrLwF1leiqIXPk8JDHBZk5c8D3NuzPamBTJSp9LZZAMgZ0 aBCHl0UcFCVKAglsH2R1ybCpTJk5daOaadnPXb9pxDvnyPGSBFqkwqMz6VSqDg3R s7kJVwB7rGI0S66U90Mrkf2YLgrkOacaFBW2D+D4lTbtE7B4mEnv+ytzbm74t19M d37ep7/r0RY9wys70lXfwEBeTJD2NEuW+unkSkpe6I5uQ+rlie3093IEdfpGLHw= =E3F4 -----END PGP SIGNATURE----- --mFHiwr52TKrxpkjc-- From owner-svn-src-all@freebsd.org Wed Oct 14 02:37:32 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id DF643A12F0E; Wed, 14 Oct 2015 02:37:31 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B0E391CEC; Wed, 14 Oct 2015 02:37:31 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t9E2bUum065234; Wed, 14 Oct 2015 02:37:30 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9E2bUQR065230; Wed, 14 Oct 2015 02:37:30 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201510140237.t9E2bUQR065230@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Wed, 14 Oct 2015 02:37:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289282 - 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 " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Oct 2015 02:37:32 -0000 Author: bdrewery Date: Wed Oct 14 02:37:30 2015 New Revision: 289282 URL: https://svnweb.freebsd.org/changeset/base/289282 Log: Replace the out-of-place includes/files/config handling in bsd.subdir.mk with more typical ALL_SUBDIR_TARGETS entries and target hooks in bsd.incs.mk, bsd.files.mk and bsd.confs.mk. This allows the targets to be NOPs if unneeded and still work with the shortcut 'make includes' to build and then install in a parallel-safe manner. Sort and re-indent the ALL_SUBDIR_TARGETS with the new entries. Sponsored by: EMC / Isilon Storage Division Modified: head/share/mk/bsd.confs.mk head/share/mk/bsd.files.mk head/share/mk/bsd.incs.mk head/share/mk/bsd.subdir.mk Modified: head/share/mk/bsd.confs.mk ============================================================================== --- head/share/mk/bsd.confs.mk Wed Oct 14 02:14:45 2015 (r289281) +++ head/share/mk/bsd.confs.mk Wed Oct 14 02:37:30 2015 (r289282) @@ -84,4 +84,7 @@ STAGE_TARGETS+= stage_config .endif .endif +config: buildconfig installconfig +.ORDER: buildconfig installconfig + .endif # ${MK_INCLUDES} != "no" Modified: head/share/mk/bsd.files.mk ============================================================================== --- head/share/mk/bsd.files.mk Wed Oct 14 02:14:45 2015 (r289281) +++ head/share/mk/bsd.files.mk Wed Oct 14 02:37:30 2015 (r289282) @@ -94,4 +94,7 @@ buildfiles: stage_as .endif .endif +files: buildfiles installfiles +.ORDER: buildfiles installfiles + .endif # !target(____) Modified: head/share/mk/bsd.incs.mk ============================================================================== --- head/share/mk/bsd.incs.mk Wed Oct 14 02:14:45 2015 (r289281) +++ head/share/mk/bsd.incs.mk Wed Oct 14 02:37:30 2015 (r289282) @@ -99,4 +99,7 @@ STAGE_SYMLINKS.INCS= ${INCSLINKS} .endif .endif +includes: buildincludes installincludes +.ORDER: buildincludes installincludes + .endif # ${MK_INCLUDES} != "no" Modified: head/share/mk/bsd.subdir.mk ============================================================================== --- head/share/mk/bsd.subdir.mk Wed Oct 14 02:14:45 2015 (r289281) +++ head/share/mk/bsd.subdir.mk Wed Oct 14 02:37:30 2015 (r289282) @@ -32,9 +32,12 @@ .if !target(____) ____: -ALL_SUBDIR_TARGETS= all all-man checkdpadd clean cleandepend cleandir \ - cleanilinks cleanobj depend distribute lint maninstall manlint obj \ - objlink realinstall regress tags ${SUBDIR_TARGETS} +ALL_SUBDIR_TARGETS= all all-man buildconfig buildfiles buildincludes \ + checkdpadd clean cleandepend cleandir cleanilinks \ + cleanobj config depend distribute files includes \ + installconfig installfiles installincludes lint \ + maninstall manlint obj objlink realinstall regress tags \ + ${SUBDIR_TARGETS} .include @@ -123,23 +126,6 @@ _sub.${__target}: _SUBDIR .endif .endfor -# This is to support 'make includes' calling 'make buildincludes' and -# 'make installincludes' in the proper order, and to support these -# targets as SUBDIR_TARGETS. -.for __target in files includes config -.for __stage in build install -${__stage}${__target}: -.if make(${__stage}${__target}) -${__stage}${__target}: _sub.${__stage}${__target} -_sub.${__stage}${__target}: _SUBDIR -.endif -.endfor -.if !target(${__target}) -${__target}: .MAKE - ${_+_}cd ${.CURDIR}; ${MAKE} build${__target}; ${MAKE} install${__target} -.endif -.endfor - .endif .if !target(install) From owner-svn-src-all@freebsd.org Wed Oct 14 02:39:34 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 58188A12F91; Wed, 14 Oct 2015 02:39:34 +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 3ADC51E5E; Wed, 14 Oct 2015 02:39:34 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from mail.xzibition.com (localhost [IPv6:::1]) by freefall.freebsd.org (Postfix) with ESMTP id 2EAA81D8E; Wed, 14 Oct 2015 02:39:34 +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 DBCF21483D; Wed, 14 Oct 2015 02:39:33 +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 nPsZjxpwBbly; Wed, 14 Oct 2015 02:39:30 +0000 (UTC) Subject: Re: svn commit: r289276 - in head/sys: conf kern netinet sys DKIM-Filter: OpenDKIM Filter v2.9.2 mail.xzibition.com 70CF114837 To: Hiren Panchasara References: <201510140035.t9E0ZbXS030094@repo.freebsd.org> <561DB6CB.8060208@FreeBSD.org> <20151014023352.GI87252@strugglingcoder.info> Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org From: Bryan Drewery Openpgp: id=F9173CB2C3AAEA7A5C8A1F0935D771BB6E4697CF; url=http://www.shatow.net/bryan/bryan2.asc Organization: FreeBSD Message-ID: <561DC062.1010605@FreeBSD.org> Date: Tue, 13 Oct 2015 19:39:30 -0700 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0 MIME-Version: 1.0 In-Reply-To: <20151014023352.GI87252@strugglingcoder.info> Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="WgiWCgh4S1TTTJOruSowfNAAPqC6mCCAc" X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Oct 2015 02:39:34 -0000 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --WgiWCgh4S1TTTJOruSowfNAAPqC6mCCAc Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: quoted-printable On 10/13/2015 7:33 PM, Hiren Panchasara wrote: > On 10/13/15 at 06:58P, Bryan Drewery wrote: >> On 10/13/2015 5:35 PM, Hiren Panchasara wrote: >>> Author: hiren >>> Date: Wed Oct 14 00:35:37 2015 >>> New Revision: 289276 >>> URL: https://svnweb.freebsd.org/changeset/base/289276 >>> >>> Log: >>> There are times when it would be really nice to have a record of th= e last few >>> packets and/or state transitions from each TCP socket. That would h= elp with >>> narrowing down certain problems we see in the field that are hard t= o reproduce >>> without understanding the history of how we got into a certain stat= e. This >>> change provides just that. >>> =20 >>> It saves copies of the last N packets in a list in the tcpcb. When = the tcpcb is >>> destroyed, the list is freed. I thought this was likely to be more >>> performance-friendly than saving copies of the tcpcb. Plus, with th= e packets, >>> you should be able to reverse-engineer what happened to the tcpcb. >>> =20 >>> To enable the feature, you will need to compile a kernel with the T= CPPCAP >>> option. Even then, the feature defaults to being deactivated. You c= an activate >>> it by setting a positive value for the number of captured packets. = You can do >>> that on either a global basis or on a per-socket basis (via a setso= ckopt call). >>> =20 >>> There is no way to get the packets out of the kernel other than usi= ng kmem or >>> getting a coredump. I thought that would help some of the legal/pri= vacy concerns >>> regarding such a feature. However, it should be possible to add a f= uture effort >>> to export them in PCAP format. >>> =20 >>> I tested this at low scale, and found that there were no mbuf leaks= and the peak >>> mbuf usage appeared to be unchanged with and without the feature. >>> =20 >>> The main performance concern I can envision is the number of mbufs = that would be >>> used on systems with a large number of sockets. If you save five pa= ckets per >>> direction per socket and have 3,000 sockets, that will consume at l= east 30,000 >>> mbufs just to keep these packets. I tried to reduce the concerns as= sociated with >>> this by limiting the number of clusters (not mbufs) that could be u= sed for this >>> feature. Again, in my testing, that appears to work correctly. >>> =20 >>> Differential Revision: D3100 >> >> You're supposed to use the full URL here which will auto close the rev= iew. >=20 > Okay. It did pick up the commit though. What more does it need to know?= =20 >> Hm true. It seems that it will auto-close if you use the full URL only. I swear a decision was made on the "proper" way to relate these, but the fact that both methods touch the system and act different is odd. --=20 Regards, Bryan Drewery --WgiWCgh4S1TTTJOruSowfNAAPqC6mCCAc 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 iQEcBAEBAgAGBQJWHcBjAAoJEDXXcbtuRpfProEIANqhCrjWWMK90NLTZSh9Smas o0sPK7dx2diPuwh54eybUXIPVzg22MV5xE4VZfT7raOBjAs/AasOl9oYlHfViD3w zH+UvnbDvwi3gf2c0HFc8d27i7KfFZMI8Mlst32OULxAhUeCJqQRIhnHGlqdQSVI qLaTBjyxMffpiJ7wnHxeg0Yezb1kmMfiZ+3QDMgUODnJq6u8/a7WW3LnXPg2jR60 axlcC4qrIuSOhf+OLvVwldaJd61dYWW0HBm5c8sDZrIuOnMK2ZXIERIqEO8e0mJC CP2Na1BwoKP64KIWvr5qKsDLXC+0n41mIcZPvDb6iIkvKn9b9WjxmCHQqwoW8eE= =L+FE -----END PGP SIGNATURE----- --WgiWCgh4S1TTTJOruSowfNAAPqC6mCCAc-- From owner-svn-src-all@freebsd.org Wed Oct 14 02:43:06 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 38F1BA1217B; Wed, 14 Oct 2015 02:43:06 +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 03B1711FD; Wed, 14 Oct 2015 02:43:05 +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 t9E2h5Z4067993; Wed, 14 Oct 2015 02:43:05 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9E2h5X2067992; Wed, 14 Oct 2015 02:43:05 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201510140243.t9E2h5X2067992@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Wed, 14 Oct 2015 02:43:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289283 - 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 " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Oct 2015 02:43:06 -0000 Author: adrian Date: Wed Oct 14 02:43:04 2015 New Revision: 289283 URL: https://svnweb.freebsd.org/changeset/base/289283 Log: rsu(4) manpage updates: add me, add 802.11n support, update caveats. * Add that I indeed added 802.11n support. * Update caveats - we support 1x1, 1x2 and 2x2 operation now, but there's no transmit aggregation support. Modified: head/share/man/man4/rsu.4 Modified: head/share/man/man4/rsu.4 ============================================================================== --- head/share/man/man4/rsu.4 Wed Oct 14 02:37:30 2015 (r289282) +++ head/share/man/man4/rsu.4 Wed Oct 14 02:43:04 2015 (r289283) @@ -175,7 +175,10 @@ driver was written by .An Damien Bergamini Aq Mt damien@openbsd.org and ported by .An Rui Paulo Aq Mt rpaulo@freebsd.org . +The 802.11n support was added by +.An Adrian Chadd Aq Mt adrian@freebsd.org . .Sh CAVEATS The .Nm -driver only supports 1T1R 802.11n operation. +driver currently does not support 802.11n transmit aggregation, +either A-MSDU or A-MPDU. From owner-svn-src-all@freebsd.org Wed Oct 14 02:49:42 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D7083A12308; Wed, 14 Oct 2015 02:49:42 +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 C36E815F6; Wed, 14 Oct 2015 02:49:42 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from mail.xzibition.com (localhost [IPv6:::1]) by freefall.freebsd.org (Postfix) with ESMTP id BB5971257; Wed, 14 Oct 2015 02:49:42 +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 75C4E14861; Wed, 14 Oct 2015 02:49:42 +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 klshHrWf8mNJ; Wed, 14 Oct 2015 02:49:40 +0000 (UTC) Content-Type: text/plain; charset=us-ascii DKIM-Filter: OpenDKIM Filter v2.9.2 mail.xzibition.com CF65F1485D Mime-Version: 1.0 (1.0) Subject: Re: svn commit: r289283 - head/share/man/man4 From: Bryan Drewery X-Mailer: iPhone Mail (12H143) In-Reply-To: <201510140243.t9E2h5X2067992@repo.freebsd.org> Date: Tue, 13 Oct 2015 19:49:38 -0700 Cc: "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Content-Transfer-Encoding: quoted-printable Message-Id: References: <201510140243.t9E2h5X2067992@repo.freebsd.org> To: Adrian Chadd X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Oct 2015 02:49:42 -0000 > On Oct 13, 2015, at 19:43, Adrian Chadd wrote: >=20 > Author: adrian > Date: Wed Oct 14 02:43:04 2015 > New Revision: 289283 > URL: https://svnweb.freebsd.org/changeset/base/289283 >=20 > Log: > rsu(4) manpage updates: add me, add 802.11n support, update caveats. Forgot .Dd >=20 > * Add that I indeed added 802.11n support. > * Update caveats - we support 1x1, 1x2 and 2x2 operation now, but > there's no transmit aggregation support. >=20 > Modified: > head/share/man/man4/rsu.4 >=20 > Modified: head/share/man/man4/rsu.4 > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=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/share/man/man4/rsu.4 Wed Oct 14 02:37:30 2015 (r289282) > +++ head/share/man/man4/rsu.4 Wed Oct 14 02:43:04 2015 (r289283) > @@ -175,7 +175,10 @@ driver was written by > .An Damien Bergamini Aq Mt damien@openbsd.org > and ported by > .An Rui Paulo Aq Mt rpaulo@freebsd.org . > +The 802.11n support was added by > +.An Adrian Chadd Aq Mt adrian@freebsd.org . > .Sh CAVEATS > The > .Nm > -driver only supports 1T1R 802.11n operation. > +driver currently does not support 802.11n transmit aggregation, > +either A-MSDU or A-MPDU. >=20 From owner-svn-src-all@freebsd.org Wed Oct 14 04:30:19 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id CD499A121CB; Wed, 14 Oct 2015 04:30:19 +0000 (UTC) (envelope-from rpaulo@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 711C51B2C; Wed, 14 Oct 2015 04:30:19 +0000 (UTC) (envelope-from rpaulo@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t9E4UIZX000744; Wed, 14 Oct 2015 04:30:18 GMT (envelope-from rpaulo@FreeBSD.org) Received: (from rpaulo@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9E4UINX000738; Wed, 14 Oct 2015 04:30:18 GMT (envelope-from rpaulo@FreeBSD.org) Message-Id: <201510140430.t9E4UINX000738@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: rpaulo set sender to rpaulo@FreeBSD.org using -f From: Rui Paulo Date: Wed, 14 Oct 2015 04:30:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r289284 - in vendor/wpa/dist: hostapd hs20/client patches src src/ap src/common src/crypto src/drivers src/eap_common src/eap_peer src/eap_server src/eapol_auth src/eapol_supp src/fst s... 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 " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Oct 2015 04:30:19 -0000 Author: rpaulo Date: Wed Oct 14 04:30:17 2015 New Revision: 289284 URL: https://svnweb.freebsd.org/changeset/base/289284 Log: Import wpa_supplicant/hostapd 2.5. Major changes: bunch of CVEs fixed, tab completion for wpa_cli and misc bug fixes. Added: vendor/wpa/dist/patches/openssl-0.9.8zf-tls-extensions.patch vendor/wpa/dist/src/crypto/sha384-prf.c (contents, props changed) vendor/wpa/dist/src/fst/ vendor/wpa/dist/src/fst/Makefile (contents, props changed) vendor/wpa/dist/src/fst/fst.c (contents, props changed) vendor/wpa/dist/src/fst/fst.h (contents, props changed) vendor/wpa/dist/src/fst/fst_ctrl_aux.c (contents, props changed) vendor/wpa/dist/src/fst/fst_ctrl_aux.h (contents, props changed) vendor/wpa/dist/src/fst/fst_ctrl_defs.h (contents, props changed) vendor/wpa/dist/src/fst/fst_ctrl_iface.c (contents, props changed) vendor/wpa/dist/src/fst/fst_ctrl_iface.h (contents, props changed) vendor/wpa/dist/src/fst/fst_defs.h (contents, props changed) vendor/wpa/dist/src/fst/fst_group.c (contents, props changed) vendor/wpa/dist/src/fst/fst_group.h (contents, props changed) vendor/wpa/dist/src/fst/fst_iface.c (contents, props changed) vendor/wpa/dist/src/fst/fst_iface.h (contents, props changed) vendor/wpa/dist/src/fst/fst_internal.h (contents, props changed) vendor/wpa/dist/src/fst/fst_session.c (contents, props changed) vendor/wpa/dist/src/fst/fst_session.h (contents, props changed) vendor/wpa/dist/wpa_supplicant/eapol_test.py (contents, props changed) vendor/wpa/dist/wpa_supplicant/p2p_supplicant_sd.c (contents, props changed) Deleted: vendor/wpa/dist/src/crypto/crypto_cryptoapi.c vendor/wpa/dist/src/crypto/tls_schannel.c Modified: vendor/wpa/dist/hostapd/ChangeLog vendor/wpa/dist/hostapd/Makefile vendor/wpa/dist/hostapd/config_file.c vendor/wpa/dist/hostapd/config_file.h vendor/wpa/dist/hostapd/ctrl_iface.c vendor/wpa/dist/hostapd/defconfig vendor/wpa/dist/hostapd/hlr_auc_gw.c vendor/wpa/dist/hostapd/hlr_auc_gw.milenage_db vendor/wpa/dist/hostapd/hostapd.conf vendor/wpa/dist/hostapd/hostapd_cli.c vendor/wpa/dist/hostapd/main.c vendor/wpa/dist/hs20/client/Makefile vendor/wpa/dist/hs20/client/osu_client.c vendor/wpa/dist/hs20/client/spp_client.c vendor/wpa/dist/src/Makefile vendor/wpa/dist/src/ap/Makefile vendor/wpa/dist/src/ap/accounting.c vendor/wpa/dist/src/ap/acs.c vendor/wpa/dist/src/ap/ap_config.c vendor/wpa/dist/src/ap/ap_config.h vendor/wpa/dist/src/ap/ap_drv_ops.c vendor/wpa/dist/src/ap/ap_drv_ops.h vendor/wpa/dist/src/ap/ap_list.c vendor/wpa/dist/src/ap/ap_list.h vendor/wpa/dist/src/ap/authsrv.c vendor/wpa/dist/src/ap/beacon.c vendor/wpa/dist/src/ap/beacon.h vendor/wpa/dist/src/ap/ctrl_iface_ap.c vendor/wpa/dist/src/ap/dfs.c vendor/wpa/dist/src/ap/drv_callbacks.c vendor/wpa/dist/src/ap/eap_user_db.c vendor/wpa/dist/src/ap/hostapd.c vendor/wpa/dist/src/ap/hostapd.h vendor/wpa/dist/src/ap/hw_features.c vendor/wpa/dist/src/ap/hw_features.h vendor/wpa/dist/src/ap/ieee802_11.c vendor/wpa/dist/src/ap/ieee802_11.h vendor/wpa/dist/src/ap/ieee802_11_auth.c vendor/wpa/dist/src/ap/ieee802_11_auth.h vendor/wpa/dist/src/ap/ieee802_11_ht.c vendor/wpa/dist/src/ap/ieee802_11_vht.c vendor/wpa/dist/src/ap/ieee802_1x.c vendor/wpa/dist/src/ap/ieee802_1x.h vendor/wpa/dist/src/ap/ndisc_snoop.c vendor/wpa/dist/src/ap/sta_info.c vendor/wpa/dist/src/ap/sta_info.h vendor/wpa/dist/src/ap/utils.c vendor/wpa/dist/src/ap/vlan_init.c vendor/wpa/dist/src/ap/vlan_init.h vendor/wpa/dist/src/ap/vlan_util.c vendor/wpa/dist/src/ap/wmm.c vendor/wpa/dist/src/ap/wpa_auth.c vendor/wpa/dist/src/ap/wpa_auth.h vendor/wpa/dist/src/ap/wpa_auth_ft.c vendor/wpa/dist/src/ap/wpa_auth_glue.c vendor/wpa/dist/src/ap/wpa_auth_i.h vendor/wpa/dist/src/ap/wpa_auth_ie.c vendor/wpa/dist/src/ap/wps_hostapd.c vendor/wpa/dist/src/ap/x_snoop.c vendor/wpa/dist/src/common/Makefile vendor/wpa/dist/src/common/common_module_tests.c vendor/wpa/dist/src/common/defs.h vendor/wpa/dist/src/common/hw_features_common.c vendor/wpa/dist/src/common/hw_features_common.h vendor/wpa/dist/src/common/ieee802_11_common.c vendor/wpa/dist/src/common/ieee802_11_common.h vendor/wpa/dist/src/common/ieee802_11_defs.h vendor/wpa/dist/src/common/privsep_commands.h vendor/wpa/dist/src/common/qca-vendor.h vendor/wpa/dist/src/common/sae.c vendor/wpa/dist/src/common/sae.h vendor/wpa/dist/src/common/version.h vendor/wpa/dist/src/common/wpa_common.c vendor/wpa/dist/src/common/wpa_common.h vendor/wpa/dist/src/common/wpa_ctrl.c vendor/wpa/dist/src/common/wpa_ctrl.h vendor/wpa/dist/src/crypto/crypto.h vendor/wpa/dist/src/crypto/crypto_module_tests.c vendor/wpa/dist/src/crypto/crypto_openssl.c vendor/wpa/dist/src/crypto/dh_groups.c vendor/wpa/dist/src/crypto/fips_prf_openssl.c vendor/wpa/dist/src/crypto/ms_funcs.c vendor/wpa/dist/src/crypto/ms_funcs.h vendor/wpa/dist/src/crypto/random.c vendor/wpa/dist/src/crypto/sha1-tlsprf.c vendor/wpa/dist/src/crypto/sha1-tprf.c vendor/wpa/dist/src/crypto/sha256-kdf.c vendor/wpa/dist/src/crypto/sha384.h vendor/wpa/dist/src/crypto/tls.h vendor/wpa/dist/src/crypto/tls_gnutls.c vendor/wpa/dist/src/crypto/tls_internal.c vendor/wpa/dist/src/crypto/tls_none.c vendor/wpa/dist/src/crypto/tls_openssl.c vendor/wpa/dist/src/drivers/driver.h vendor/wpa/dist/src/drivers/driver_atheros.c vendor/wpa/dist/src/drivers/driver_bsd.c vendor/wpa/dist/src/drivers/driver_hostap.c vendor/wpa/dist/src/drivers/driver_hostap.h vendor/wpa/dist/src/drivers/driver_ndis.c vendor/wpa/dist/src/drivers/driver_nl80211.c vendor/wpa/dist/src/drivers/driver_nl80211.h vendor/wpa/dist/src/drivers/driver_nl80211_android.c vendor/wpa/dist/src/drivers/driver_nl80211_capa.c vendor/wpa/dist/src/drivers/driver_nl80211_event.c vendor/wpa/dist/src/drivers/driver_nl80211_scan.c vendor/wpa/dist/src/drivers/driver_privsep.c vendor/wpa/dist/src/drivers/driver_wext.c vendor/wpa/dist/src/drivers/drivers.c vendor/wpa/dist/src/drivers/drivers.mak vendor/wpa/dist/src/drivers/linux_ioctl.c vendor/wpa/dist/src/drivers/linux_ioctl.h vendor/wpa/dist/src/drivers/nl80211_copy.h vendor/wpa/dist/src/eap_common/Makefile vendor/wpa/dist/src/eap_common/eap_common.c vendor/wpa/dist/src/eap_common/eap_fast_common.c vendor/wpa/dist/src/eap_common/eap_pwd_common.c vendor/wpa/dist/src/eap_common/eap_pwd_common.h vendor/wpa/dist/src/eap_common/eap_sake_common.c vendor/wpa/dist/src/eap_common/ikev2_common.c vendor/wpa/dist/src/eap_peer/Makefile vendor/wpa/dist/src/eap_peer/eap.c vendor/wpa/dist/src/eap_peer/eap.h vendor/wpa/dist/src/eap_peer/eap_aka.c vendor/wpa/dist/src/eap_peer/eap_eke.c vendor/wpa/dist/src/eap_peer/eap_fast.c vendor/wpa/dist/src/eap_peer/eap_gpsk.c vendor/wpa/dist/src/eap_peer/eap_i.h vendor/wpa/dist/src/eap_peer/eap_mschapv2.c vendor/wpa/dist/src/eap_peer/eap_pax.c vendor/wpa/dist/src/eap_peer/eap_peap.c vendor/wpa/dist/src/eap_peer/eap_pwd.c vendor/wpa/dist/src/eap_peer/eap_sake.c vendor/wpa/dist/src/eap_peer/eap_sim.c vendor/wpa/dist/src/eap_peer/eap_tls.c vendor/wpa/dist/src/eap_peer/eap_tls_common.c vendor/wpa/dist/src/eap_peer/eap_tls_common.h vendor/wpa/dist/src/eap_peer/eap_ttls.c vendor/wpa/dist/src/eap_peer/eap_wsc.c vendor/wpa/dist/src/eap_server/Makefile vendor/wpa/dist/src/eap_server/eap.h vendor/wpa/dist/src/eap_server/eap_i.h vendor/wpa/dist/src/eap_server/eap_server.c vendor/wpa/dist/src/eap_server/eap_server_eke.c vendor/wpa/dist/src/eap_server/eap_server_fast.c vendor/wpa/dist/src/eap_server/eap_server_mschapv2.c vendor/wpa/dist/src/eap_server/eap_server_peap.c vendor/wpa/dist/src/eap_server/eap_server_pwd.c vendor/wpa/dist/src/eap_server/eap_server_tls.c vendor/wpa/dist/src/eap_server/eap_server_tls_common.c vendor/wpa/dist/src/eap_server/eap_server_ttls.c vendor/wpa/dist/src/eap_server/eap_tls_common.h vendor/wpa/dist/src/eapol_auth/Makefile vendor/wpa/dist/src/eapol_auth/eapol_auth_sm.c vendor/wpa/dist/src/eapol_auth/eapol_auth_sm.h vendor/wpa/dist/src/eapol_supp/Makefile vendor/wpa/dist/src/eapol_supp/eapol_supp_sm.c vendor/wpa/dist/src/l2_packet/Makefile vendor/wpa/dist/src/p2p/Makefile vendor/wpa/dist/src/p2p/p2p.c vendor/wpa/dist/src/p2p/p2p.h vendor/wpa/dist/src/p2p/p2p_build.c vendor/wpa/dist/src/p2p/p2p_dev_disc.c vendor/wpa/dist/src/p2p/p2p_go_neg.c vendor/wpa/dist/src/p2p/p2p_group.c vendor/wpa/dist/src/p2p/p2p_i.h vendor/wpa/dist/src/p2p/p2p_invitation.c vendor/wpa/dist/src/p2p/p2p_parse.c vendor/wpa/dist/src/p2p/p2p_pd.c vendor/wpa/dist/src/p2p/p2p_utils.c vendor/wpa/dist/src/radius/Makefile vendor/wpa/dist/src/radius/radius.c vendor/wpa/dist/src/radius/radius_das.c vendor/wpa/dist/src/radius/radius_server.c vendor/wpa/dist/src/radius/radius_server.h vendor/wpa/dist/src/rsn_supp/Makefile vendor/wpa/dist/src/rsn_supp/tdls.c vendor/wpa/dist/src/rsn_supp/wpa.c vendor/wpa/dist/src/rsn_supp/wpa_ft.c vendor/wpa/dist/src/rsn_supp/wpa_ie.c vendor/wpa/dist/src/rsn_supp/wpa_ie.h vendor/wpa/dist/src/tls/libtommath.c vendor/wpa/dist/src/tls/tlsv1_client.c vendor/wpa/dist/src/tls/tlsv1_client.h vendor/wpa/dist/src/tls/tlsv1_server.c vendor/wpa/dist/src/tls/tlsv1_server.h vendor/wpa/dist/src/tls/x509v3.c vendor/wpa/dist/src/utils/browser-wpadebug.c vendor/wpa/dist/src/utils/common.c vendor/wpa/dist/src/utils/common.h vendor/wpa/dist/src/utils/eloop.c vendor/wpa/dist/src/utils/http_curl.c vendor/wpa/dist/src/utils/includes.h vendor/wpa/dist/src/utils/os.h vendor/wpa/dist/src/utils/os_internal.c vendor/wpa/dist/src/utils/os_none.c vendor/wpa/dist/src/utils/os_unix.c vendor/wpa/dist/src/utils/os_win32.c vendor/wpa/dist/src/utils/radiotap.c vendor/wpa/dist/src/utils/utils_module_tests.c vendor/wpa/dist/src/utils/wpa_debug.c vendor/wpa/dist/src/utils/wpa_debug.h vendor/wpa/dist/src/utils/wpabuf.c vendor/wpa/dist/src/wps/Makefile vendor/wpa/dist/src/wps/http_client.c vendor/wpa/dist/src/wps/http_server.c vendor/wpa/dist/src/wps/httpread.c vendor/wpa/dist/src/wps/ndef.c vendor/wpa/dist/src/wps/wps.c vendor/wpa/dist/src/wps/wps.h vendor/wpa/dist/src/wps/wps_attr_parse.c vendor/wpa/dist/src/wps/wps_attr_parse.h vendor/wpa/dist/src/wps/wps_common.c vendor/wpa/dist/src/wps/wps_defs.h vendor/wpa/dist/src/wps/wps_enrollee.c vendor/wpa/dist/src/wps/wps_er.c vendor/wpa/dist/src/wps/wps_er_ssdp.c vendor/wpa/dist/src/wps/wps_module_tests.c vendor/wpa/dist/src/wps/wps_registrar.c vendor/wpa/dist/src/wps/wps_upnp.c vendor/wpa/dist/src/wps/wps_upnp_ap.c vendor/wpa/dist/src/wps/wps_upnp_event.c vendor/wpa/dist/src/wps/wps_upnp_ssdp.c vendor/wpa/dist/src/wps/wps_upnp_web.c vendor/wpa/dist/src/wps/wps_validate.c vendor/wpa/dist/wpa_supplicant/ChangeLog vendor/wpa/dist/wpa_supplicant/Makefile vendor/wpa/dist/wpa_supplicant/ap.c vendor/wpa/dist/wpa_supplicant/ap.h vendor/wpa/dist/wpa_supplicant/bss.c vendor/wpa/dist/wpa_supplicant/bss.h vendor/wpa/dist/wpa_supplicant/config.c vendor/wpa/dist/wpa_supplicant/config.h vendor/wpa/dist/wpa_supplicant/config_file.c vendor/wpa/dist/wpa_supplicant/config_ssid.h vendor/wpa/dist/wpa_supplicant/ctrl_iface.c vendor/wpa/dist/wpa_supplicant/ctrl_iface_named_pipe.c vendor/wpa/dist/wpa_supplicant/ctrl_iface_udp.c vendor/wpa/dist/wpa_supplicant/ctrl_iface_unix.c vendor/wpa/dist/wpa_supplicant/dbus/dbus_new.c vendor/wpa/dist/wpa_supplicant/dbus/dbus_new.h vendor/wpa/dist/wpa_supplicant/dbus/dbus_new_handlers.c vendor/wpa/dist/wpa_supplicant/dbus/dbus_new_handlers.h vendor/wpa/dist/wpa_supplicant/dbus/dbus_new_handlers_p2p.c vendor/wpa/dist/wpa_supplicant/dbus/dbus_new_handlers_p2p.h vendor/wpa/dist/wpa_supplicant/dbus/dbus_new_handlers_wps.c vendor/wpa/dist/wpa_supplicant/dbus/dbus_new_helpers.c vendor/wpa/dist/wpa_supplicant/dbus/dbus_new_introspect.c vendor/wpa/dist/wpa_supplicant/dbus/dbus_old.c vendor/wpa/dist/wpa_supplicant/dbus/dbus_old_handlers.c vendor/wpa/dist/wpa_supplicant/defconfig vendor/wpa/dist/wpa_supplicant/doc/docbook/eapol_test.8 vendor/wpa/dist/wpa_supplicant/doc/docbook/wpa_background.8 vendor/wpa/dist/wpa_supplicant/doc/docbook/wpa_cli.8 vendor/wpa/dist/wpa_supplicant/doc/docbook/wpa_gui.8 vendor/wpa/dist/wpa_supplicant/doc/docbook/wpa_gui.sgml vendor/wpa/dist/wpa_supplicant/doc/docbook/wpa_passphrase.8 vendor/wpa/dist/wpa_supplicant/doc/docbook/wpa_priv.8 vendor/wpa/dist/wpa_supplicant/doc/docbook/wpa_supplicant.8 vendor/wpa/dist/wpa_supplicant/doc/docbook/wpa_supplicant.conf.5 vendor/wpa/dist/wpa_supplicant/driver_i.h vendor/wpa/dist/wpa_supplicant/eapol_test.c vendor/wpa/dist/wpa_supplicant/events.c vendor/wpa/dist/wpa_supplicant/hs20_supplicant.c vendor/wpa/dist/wpa_supplicant/ibss_rsn.c vendor/wpa/dist/wpa_supplicant/interworking.c vendor/wpa/dist/wpa_supplicant/main.c vendor/wpa/dist/wpa_supplicant/mesh.c vendor/wpa/dist/wpa_supplicant/mesh_mpm.c vendor/wpa/dist/wpa_supplicant/mesh_rsn.c vendor/wpa/dist/wpa_supplicant/notify.c vendor/wpa/dist/wpa_supplicant/notify.h vendor/wpa/dist/wpa_supplicant/p2p_supplicant.c vendor/wpa/dist/wpa_supplicant/p2p_supplicant.h vendor/wpa/dist/wpa_supplicant/preauth_test.c vendor/wpa/dist/wpa_supplicant/scan.c vendor/wpa/dist/wpa_supplicant/sme.c vendor/wpa/dist/wpa_supplicant/wpa_cli.c vendor/wpa/dist/wpa_supplicant/wpa_priv.c vendor/wpa/dist/wpa_supplicant/wpa_supplicant.c vendor/wpa/dist/wpa_supplicant/wpa_supplicant.conf vendor/wpa/dist/wpa_supplicant/wpa_supplicant_i.h vendor/wpa/dist/wpa_supplicant/wpas_glue.c vendor/wpa/dist/wpa_supplicant/wpas_glue.h vendor/wpa/dist/wpa_supplicant/wps_supplicant.c vendor/wpa/dist/wpa_supplicant/wps_supplicant.h Modified: vendor/wpa/dist/hostapd/ChangeLog ============================================================================== --- vendor/wpa/dist/hostapd/ChangeLog Wed Oct 14 02:43:04 2015 (r289283) +++ vendor/wpa/dist/hostapd/ChangeLog Wed Oct 14 04:30:17 2015 (r289284) @@ -1,5 +1,41 @@ ChangeLog for hostapd +2015-09-27 - v2.5 + * fixed WPS UPnP vulnerability with HTTP chunked transfer encoding + [http://w1.fi/security/2015-2/] (CVE-2015-4141) + * fixed WMM Action frame parser + [http://w1.fi/security/2015-3/] (CVE-2015-4142) + * fixed EAP-pwd server missing payload length validation + [http://w1.fi/security/2015-4/] + (CVE-2015-4143, CVE-2015-4144, CVE-2015-4145) + * fixed validation of WPS and P2P NFC NDEF record payload length + [http://w1.fi/security/2015-5/] + * nl80211: + - fixed vendor command handling to check OUI properly + * fixed hlr_auc_gw build with OpenSSL + * hlr_auc_gw: allow Milenage RES length to be reduced + * disable HT for a station that does not support WMM/QoS + * added support for hashed password (NtHash) in EAP-pwd server + * fixed and extended dynamic VLAN cases + * added EAP-EKE server support for deriving Session-Id + * set Acct-Session-Id to a random value to make it more likely to be + unique even if the device does not have a proper clock + * added more 2.4 GHz channels for 20/40 MHz HT co-ex scan + * modified SAE routines to be more robust and PWE generation to be + stronger against timing attacks + * added support for Brainpool Elliptic Curves with SAE + * increases maximum value accepted for cwmin/cwmax + * added support for CCMP-256 and GCMP-256 as group ciphers with FT + * added Fast Session Transfer (FST) module + * removed optional fields from RSNE when using FT with PMF + (workaround for interoperability issues with iOS 8.4) + * added EAP server support for TLS session resumption + * fixed key derivation for Suite B 192-bit AKM (this breaks + compatibility with the earlier version) + * added mechanism to track unconnected stations and do minimal band + steering + * number of small fixes + 2015-03-15 - v2.4 * allow OpenSSL cipher configuration to be set for internal EAP server (openssl_ciphers parameter) Modified: vendor/wpa/dist/hostapd/Makefile ============================================================================== --- vendor/wpa/dist/hostapd/Makefile Wed Oct 14 02:43:04 2015 (r289283) +++ vendor/wpa/dist/hostapd/Makefile Wed Oct 14 04:30:17 2015 (r289284) @@ -107,7 +107,16 @@ LIBS_h += -lrt LIBS_n += -lrt endif +ifdef CONFIG_ELOOP_POLL +CFLAGS += -DCONFIG_ELOOP_POLL +endif + +ifdef CONFIG_ELOOP_EPOLL +CFLAGS += -DCONFIG_ELOOP_EPOLL +endif + OBJS += ../src/utils/common.o +OBJS_c += ../src/utils/common.o OBJS += ../src/utils/wpa_debug.o OBJS_c += ../src/utils/wpa_debug.o OBJS += ../src/utils/wpabuf.o @@ -227,6 +236,7 @@ CFLAGS += -DCONFIG_SAE OBJS += ../src/common/sae.o NEED_ECC=y NEED_DH_GROUPS=y +NEED_AP_MLME=y endif ifdef CONFIG_WNM @@ -531,8 +541,14 @@ HOBJS += ../src/crypto/crypto_openssl.o ifdef NEED_FIPS186_2_PRF OBJS += ../src/crypto/fips_prf_openssl.o endif +NEED_SHA256=y +NEED_TLS_PRF_SHA256=y LIBS += -lcrypto LIBS_h += -lcrypto +ifdef CONFIG_TLS_ADD_DL +LIBS += -ldl +LIBS_h += -ldl +endif endif ifeq ($(CONFIG_TLS), gnutls) @@ -553,17 +569,6 @@ CONFIG_INTERNAL_RC4=y CONFIG_INTERNAL_DH_GROUP5=y endif -ifeq ($(CONFIG_TLS), schannel) -ifdef TLS_FUNCS -OBJS += ../src/crypto/tls_schannel.o -endif -OBJS += ../src/crypto/crypto_cryptoapi.o -OBJS_p += ../src/crypto/crypto_cryptoapi.o -CONFIG_INTERNAL_SHA256=y -CONFIG_INTERNAL_RC4=y -CONFIG_INTERNAL_DH_GROUP5=y -endif - ifeq ($(CONFIG_TLS), internal) ifndef CONFIG_CRYPTO CONFIG_CRYPTO=internal @@ -694,8 +699,10 @@ endif endif ifdef NEED_AES_CBC NEED_AES_DEC=y +ifneq ($(CONFIG_TLS), openssl) AESOBJS += ../src/crypto/aes-cbc.o endif +endif ifdef NEED_AES_DEC ifdef CONFIG_INTERNAL_AES AESOBJS += ../src/crypto/aes-internal-dec.o @@ -754,11 +761,17 @@ OBJS += ../src/crypto/des-internal.o endif endif +ifdef CONFIG_NO_RC4 +CFLAGS += -DCONFIG_NO_RC4 +endif + ifdef NEED_RC4 ifdef CONFIG_INTERNAL_RC4 +ifndef CONFIG_NO_RC4 OBJS += ../src/crypto/rc4.o endif endif +endif ifdef NEED_SHA256 CFLAGS += -DCONFIG_SHA256 @@ -778,6 +791,7 @@ endif endif ifdef NEED_SHA384 CFLAGS += -DCONFIG_SHA384 +OBJS += ../src/crypto/sha384-prf.o endif ifdef NEED_DH_GROUPS @@ -803,8 +817,10 @@ OBJS += ../src/crypto/random.o HOBJS += ../src/crypto/random.o HOBJS += ../src/utils/eloop.o HOBJS += $(SHA1OBJS) +ifneq ($(CONFIG_TLS), openssl) HOBJS += ../src/crypto/md5.o endif +endif ifdef CONFIG_RADIUS_SERVER CFLAGS += -DRADIUS_SERVER @@ -903,6 +919,21 @@ LIBS += -lsqlite3 LIBS_h += -lsqlite3 endif +ifdef CONFIG_FST +CFLAGS += -DCONFIG_FST +OBJS += ../src/fst/fst.o +OBJS += ../src/fst/fst_group.o +OBJS += ../src/fst/fst_iface.o +OBJS += ../src/fst/fst_session.o +OBJS += ../src/fst/fst_ctrl_aux.o +ifdef CONFIG_FST_TEST +CFLAGS += -DCONFIG_FST_TEST +endif +ifndef CONFIG_NO_CTRL_IFACE +OBJS += ../src/fst/fst_ctrl_iface.o +endif +endif + ALL=hostapd hostapd_cli all: verify_config $(ALL) @@ -965,9 +996,11 @@ NOBJS = nt_password_hash.o ../src/crypto NOBJS += ../src/utils/common.o ifdef NEED_RC4 ifdef CONFIG_INTERNAL_RC4 +ifndef CONFIG_NO_RC4 NOBJS += ../src/crypto/rc4.o endif endif +endif ifdef CONFIG_INTERNAL_MD5 NOBJS += ../src/crypto/md5-internal.o endif Modified: vendor/wpa/dist/hostapd/config_file.c ============================================================================== --- vendor/wpa/dist/hostapd/config_file.c Wed Oct 14 02:43:04 2015 (r289283) +++ vendor/wpa/dist/hostapd/config_file.c Wed Oct 14 04:30:17 2015 (r289284) @@ -222,9 +222,15 @@ static int hostapd_config_read_eap_user( return 0; if (os_strncmp(fname, "sqlite:", 7) == 0) { +#ifdef CONFIG_SQLITE os_free(conf->eap_user_sqlite); conf->eap_user_sqlite = os_strdup(fname + 7); return 0; +#else /* CONFIG_SQLITE */ + wpa_printf(MSG_ERROR, + "EAP user file in SQLite DB, but CONFIG_SQLITE was not enabled in the build."); + return -1; +#endif /* CONFIG_SQLITE */ } f = fopen(fname, "r"); @@ -775,6 +781,24 @@ static int hostapd_config_read_wep(struc } +static int hostapd_parse_chanlist(struct hostapd_config *conf, char *val) +{ + char *pos; + + /* for backwards compatibility, translate ' ' in conf str to ',' */ + pos = val; + while (pos) { + pos = os_strchr(pos, ' '); + if (pos) + *pos++ = ','; + } + if (freq_range_list_parse(&conf->acs_ch_list, val)) + return -1; + + return 0; +} + + static int hostapd_parse_intlist(int **int_list, char *val) { int *list; @@ -875,7 +899,9 @@ static int hostapd_config_read_int10(con static int valid_cw(int cw) { return (cw == 1 || cw == 3 || cw == 7 || cw == 15 || cw == 31 || - cw == 63 || cw == 127 || cw == 255 || cw == 511 || cw == 1023); + cw == 63 || cw == 127 || cw == 255 || cw == 511 || cw == 1023 || + cw == 2047 || cw == 4095 || cw == 8191 || cw == 16383 || + cw == 32767); } @@ -886,11 +912,11 @@ enum { IEEE80211_TX_QUEUE_DATA3 = 3 /* used for EDCA AC_BK data */ }; -static int hostapd_config_tx_queue(struct hostapd_config *conf, char *name, - char *val) +static int hostapd_config_tx_queue(struct hostapd_config *conf, + const char *name, const char *val) { int num; - char *pos; + const char *pos; struct hostapd_tx_queue_params *queue; /* skip 'tx_queue_' prefix */ @@ -1134,13 +1160,23 @@ static int hostapd_config_vht_capab(stru if (os_strstr(capab, "[BF-ANTENNA-2]") && (conf->vht_capab & VHT_CAP_SU_BEAMFORMEE_CAPABLE)) conf->vht_capab |= (1 << VHT_CAP_BEAMFORMEE_STS_OFFSET); + if (os_strstr(capab, "[BF-ANTENNA-3]") && + (conf->vht_capab & VHT_CAP_SU_BEAMFORMEE_CAPABLE)) + conf->vht_capab |= (2 << VHT_CAP_BEAMFORMEE_STS_OFFSET); + if (os_strstr(capab, "[BF-ANTENNA-4]") && + (conf->vht_capab & VHT_CAP_SU_BEAMFORMEE_CAPABLE)) + conf->vht_capab |= (3 << VHT_CAP_BEAMFORMEE_STS_OFFSET); if (os_strstr(capab, "[SOUNDING-DIMENSION-2]") && (conf->vht_capab & VHT_CAP_SU_BEAMFORMER_CAPABLE)) conf->vht_capab |= (1 << VHT_CAP_SOUNDING_DIMENSION_OFFSET); + if (os_strstr(capab, "[SOUNDING-DIMENSION-3]") && + (conf->vht_capab & VHT_CAP_SU_BEAMFORMER_CAPABLE)) + conf->vht_capab |= (2 << VHT_CAP_SOUNDING_DIMENSION_OFFSET); + if (os_strstr(capab, "[SOUNDING-DIMENSION-4]") && + (conf->vht_capab & VHT_CAP_SU_BEAMFORMER_CAPABLE)) + conf->vht_capab |= (3 << VHT_CAP_SOUNDING_DIMENSION_OFFSET); if (os_strstr(capab, "[MU-BEAMFORMER]")) conf->vht_capab |= VHT_CAP_MU_BEAMFORMER_CAPABLE; - if (os_strstr(capab, "[MU-BEAMFORMEE]")) - conf->vht_capab |= VHT_CAP_MU_BEAMFORMEE_CAPABLE; if (os_strstr(capab, "[VHT-TXOP-PS]")) conf->vht_capab |= VHT_CAP_VHT_TXOP_PS; if (os_strstr(capab, "[HTC-VHT]")) @@ -1699,7 +1735,7 @@ static int hs20_parse_osu_ssid(struct ho char *str; str = wpa_config_parse_string(pos, &slen); - if (str == NULL || slen < 1 || slen > HOSTAPD_MAX_SSID_LEN) { + if (str == NULL || slen < 1 || slen > SSID_MAX_LEN) { wpa_printf(MSG_ERROR, "Line %d: Invalid SSID '%s'", line, pos); os_free(str); return -1; @@ -1900,7 +1936,7 @@ fail: static int hostapd_config_fill(struct hostapd_config *conf, struct hostapd_bss_config *bss, - char *buf, char *pos, int line) + const char *buf, char *pos, int line) { if (os_strcmp(buf, "interface") == 0) { os_strlcpy(conf->bss[0]->iface, pos, @@ -1946,7 +1982,7 @@ static int hostapd_config_fill(struct ho line); } else if (os_strcmp(buf, "ssid") == 0) { bss->ssid.ssid_len = os_strlen(pos); - if (bss->ssid.ssid_len > HOSTAPD_MAX_SSID_LEN || + if (bss->ssid.ssid_len > SSID_MAX_LEN || bss->ssid.ssid_len < 1) { wpa_printf(MSG_ERROR, "Line %d: invalid SSID '%s'", line, pos); @@ -1957,7 +1993,7 @@ static int hostapd_config_fill(struct ho } else if (os_strcmp(buf, "ssid2") == 0) { size_t slen; char *str = wpa_config_parse_string(pos, &slen); - if (str == NULL || slen < 1 || slen > HOSTAPD_MAX_SSID_LEN) { + if (str == NULL || slen < 1 || slen > SSID_MAX_LEN) { wpa_printf(MSG_ERROR, "Line %d: invalid SSID '%s'", line, pos); os_free(str); @@ -2043,6 +2079,8 @@ static int hostapd_config_fill(struct ho bss->private_key_passwd = os_strdup(pos); } else if (os_strcmp(buf, "check_crl") == 0) { bss->check_crl = atoi(pos); + } else if (os_strcmp(buf, "tls_session_lifetime") == 0) { + bss->tls_session_lifetime = atoi(pos); } else if (os_strcmp(buf, "ocsp_stapling_response") == 0) { os_free(bss->ocsp_stapling_response); bss->ocsp_stapling_response = os_strdup(pos); @@ -2515,13 +2553,17 @@ static int hostapd_config_fill(struct ho conf->hw_mode = HOSTAPD_MODE_IEEE80211G; else if (os_strcmp(pos, "ad") == 0) conf->hw_mode = HOSTAPD_MODE_IEEE80211AD; + else if (os_strcmp(pos, "any") == 0) + conf->hw_mode = HOSTAPD_MODE_IEEE80211ANY; else { wpa_printf(MSG_ERROR, "Line %d: unknown hw_mode '%s'", line, pos); return 1; } } else if (os_strcmp(buf, "wps_rf_bands") == 0) { - if (os_strcmp(pos, "a") == 0) + if (os_strcmp(pos, "ad") == 0) + bss->wps_rf_bands = WPS_RF_60GHZ; + else if (os_strcmp(pos, "a") == 0) bss->wps_rf_bands = WPS_RF_50GHZ; else if (os_strcmp(pos, "g") == 0 || os_strcmp(pos, "b") == 0) @@ -2542,12 +2584,15 @@ static int hostapd_config_fill(struct ho line); return 1; #else /* CONFIG_ACS */ + conf->acs = 1; conf->channel = 0; #endif /* CONFIG_ACS */ - } else + } else { conf->channel = atoi(pos); + conf->acs = conf->channel == 0; + } } else if (os_strcmp(buf, "chanlist") == 0) { - if (hostapd_parse_intlist(&conf->chanlist, pos)) { + if (hostapd_parse_chanlist(conf, pos)) { wpa_printf(MSG_ERROR, "Line %d: invalid channel list", line); return 1; @@ -2810,7 +2855,7 @@ static int hostapd_config_fill(struct ho os_free(bss->wps_pin_requests); bss->wps_pin_requests = os_strdup(pos); } else if (os_strcmp(buf, "device_name") == 0) { - if (os_strlen(pos) > 32) { + if (os_strlen(pos) > WPS_DEV_NAME_MAX_LEN) { wpa_printf(MSG_ERROR, "Line %d: Too long " "device_name", line); return 1; @@ -3111,6 +3156,8 @@ static int hostapd_config_fill(struct ho bss->disable_dgaf = atoi(pos); } else if (os_strcmp(buf, "proxy_arp") == 0) { bss->proxy_arp = atoi(pos); + } else if (os_strcmp(buf, "na_mcast_to_ucast") == 0) { + bss->na_mcast_to_ucast = atoi(pos); } else if (os_strcmp(buf, "osen") == 0) { bss->osen = atoi(pos); } else if (os_strcmp(buf, "anqp_domain_id") == 0) { @@ -3223,6 +3270,24 @@ static int hostapd_config_fill(struct ho bss->bss_load_test_set = 1; } else if (os_strcmp(buf, "radio_measurements") == 0) { bss->radio_measurements = atoi(pos); + } else if (os_strcmp(buf, "own_ie_override") == 0) { + struct wpabuf *tmp; + size_t len = os_strlen(pos) / 2; + + tmp = wpabuf_alloc(len); + if (!tmp) + return 1; + + if (hexstr2bin(pos, wpabuf_put(tmp, len), len)) { + wpabuf_free(tmp); + wpa_printf(MSG_ERROR, + "Line %d: Invalid own_ie_override '%s'", + line, pos); + return 1; + } + + wpabuf_free(bss->own_ie_override); + bss->own_ie_override = tmp; #endif /* CONFIG_TESTING_OPTIONS */ } else if (os_strcmp(buf, "vendor_elements") == 0) { struct wpabuf *elems; @@ -3276,6 +3341,74 @@ static int hostapd_config_fill(struct ho } else if (os_strcmp(buf, "wowlan_triggers") == 0) { os_free(bss->wowlan_triggers); bss->wowlan_triggers = os_strdup(pos); +#ifdef CONFIG_FST + } else if (os_strcmp(buf, "fst_group_id") == 0) { + size_t len = os_strlen(pos); + + if (!len || len >= sizeof(conf->fst_cfg.group_id)) { + wpa_printf(MSG_ERROR, + "Line %d: Invalid fst_group_id value '%s'", + line, pos); + return 1; + } + + if (conf->fst_cfg.group_id[0]) { + wpa_printf(MSG_ERROR, + "Line %d: Duplicate fst_group value '%s'", + line, pos); + return 1; + } + + os_strlcpy(conf->fst_cfg.group_id, pos, + sizeof(conf->fst_cfg.group_id)); + } else if (os_strcmp(buf, "fst_priority") == 0) { + char *endp; + long int val; + + if (!*pos) { + wpa_printf(MSG_ERROR, + "Line %d: fst_priority value not supplied (expected 1..%u)", + line, FST_MAX_PRIO_VALUE); + return -1; + } + + val = strtol(pos, &endp, 0); + if (*endp || val < 1 || val > FST_MAX_PRIO_VALUE) { + wpa_printf(MSG_ERROR, + "Line %d: Invalid fst_priority %ld (%s) (expected 1..%u)", + line, val, pos, FST_MAX_PRIO_VALUE); + return 1; + } + conf->fst_cfg.priority = (u8) val; + } else if (os_strcmp(buf, "fst_llt") == 0) { + char *endp; + long int val; + + if (!*pos) { + wpa_printf(MSG_ERROR, + "Line %d: fst_llt value not supplied (expected 1..%u)", + line, FST_MAX_LLT_MS); + return -1; + } + val = strtol(pos, &endp, 0); + if (*endp || val < 1 || val > FST_MAX_LLT_MS) { + wpa_printf(MSG_ERROR, + "Line %d: Invalid fst_llt %ld (%s) (expected 1..%u)", + line, val, pos, FST_MAX_LLT_MS); + return 1; + } + conf->fst_cfg.llt = (u32) val; +#endif /* CONFIG_FST */ + } else if (os_strcmp(buf, "track_sta_max_num") == 0) { + conf->track_sta_max_num = atoi(pos); + } else if (os_strcmp(buf, "track_sta_max_age") == 0) { + conf->track_sta_max_age = atoi(pos); + } else if (os_strcmp(buf, "no_probe_resp_if_seen_on") == 0) { + os_free(bss->no_probe_resp_if_seen_on); + bss->no_probe_resp_if_seen_on = os_strdup(pos); + } else if (os_strcmp(buf, "no_auth_if_seen_on") == 0) { + os_free(bss->no_auth_if_seen_on); + bss->no_auth_if_seen_on = os_strdup(pos); } else { wpa_printf(MSG_ERROR, "Line %d: unknown configuration item '%s'", @@ -3378,7 +3511,8 @@ struct hostapd_config * hostapd_config_r int hostapd_set_iface(struct hostapd_config *conf, - struct hostapd_bss_config *bss, char *field, char *value) + struct hostapd_bss_config *bss, const char *field, + char *value) { int errors; size_t i; Modified: vendor/wpa/dist/hostapd/config_file.h ============================================================================== --- vendor/wpa/dist/hostapd/config_file.h Wed Oct 14 02:43:04 2015 (r289283) +++ vendor/wpa/dist/hostapd/config_file.h Wed Oct 14 04:30:17 2015 (r289284) @@ -11,7 +11,7 @@ struct hostapd_config * hostapd_config_read(const char *fname); int hostapd_set_iface(struct hostapd_config *conf, - struct hostapd_bss_config *bss, char *field, + struct hostapd_bss_config *bss, const char *field, char *value); #endif /* CONFIG_FILE_H */ Modified: vendor/wpa/dist/hostapd/ctrl_iface.c ============================================================================== --- vendor/wpa/dist/hostapd/ctrl_iface.c Wed Oct 14 02:43:04 2015 (r289283) +++ vendor/wpa/dist/hostapd/ctrl_iface.c Wed Oct 14 04:30:17 2015 (r289284) @@ -25,6 +25,7 @@ #include "common/ieee802_11_defs.h" #include "crypto/tls.h" #include "drivers/driver.h" +#include "eapol_auth/eapol_auth_sm.h" #include "radius/radius_client.h" #include "radius/radius_server.h" #include "l2_packet/l2_packet.h" @@ -43,10 +44,13 @@ #include "ap/beacon.h" #include "wps/wps_defs.h" #include "wps/wps.h" +#include "fst/fst_ctrl_iface.h" #include "config_file.h" #include "ctrl_iface.h" +#define HOSTAPD_CLI_DUP_VALUE_MAX_LEN 256 + struct wpa_ctrl_dst { struct wpa_ctrl_dst *next; struct sockaddr_un addr; @@ -57,6 +61,7 @@ struct wpa_ctrl_dst { static void hostapd_ctrl_iface_send(struct hostapd_data *hapd, int level, + enum wpa_msg_type type, const char *buf, size_t len); @@ -1055,6 +1060,97 @@ static int hostapd_ctrl_iface_bss_tm_req #endif /* CONFIG_WNM */ +static int hostapd_ctrl_iface_get_key_mgmt(struct hostapd_data *hapd, + char *buf, size_t buflen) +{ + int ret = 0; + char *pos, *end; + + pos = buf; + end = buf + buflen; + + WPA_ASSERT(hapd->conf->wpa_key_mgmt); + + if (hapd->conf->wpa_key_mgmt & WPA_KEY_MGMT_PSK) { + ret = os_snprintf(pos, end - pos, "WPA-PSK "); + if (os_snprintf_error(end - pos, ret)) + return pos - buf; + pos += ret; + } + if (hapd->conf->wpa_key_mgmt & WPA_KEY_MGMT_IEEE8021X) { + ret = os_snprintf(pos, end - pos, "WPA-EAP "); + if (os_snprintf_error(end - pos, ret)) + return pos - buf; + pos += ret; + } +#ifdef CONFIG_IEEE80211R + if (hapd->conf->wpa_key_mgmt & WPA_KEY_MGMT_FT_PSK) { + ret = os_snprintf(pos, end - pos, "FT-PSK "); + if (os_snprintf_error(end - pos, ret)) + return pos - buf; + pos += ret; + } + if (hapd->conf->wpa_key_mgmt & WPA_KEY_MGMT_FT_IEEE8021X) { + ret = os_snprintf(pos, end - pos, "FT-EAP "); + if (os_snprintf_error(end - pos, ret)) + return pos - buf; + pos += ret; + } +#ifdef CONFIG_SAE + if (hapd->conf->wpa_key_mgmt & WPA_KEY_MGMT_FT_SAE) { + ret = os_snprintf(pos, end - pos, "FT-SAE "); + if (os_snprintf_error(end - pos, ret)) + return pos - buf; + pos += ret; + } +#endif /* CONFIG_SAE */ +#endif /* CONFIG_IEEE80211R */ +#ifdef CONFIG_IEEE80211W + if (hapd->conf->wpa_key_mgmt & WPA_KEY_MGMT_PSK_SHA256) { + ret = os_snprintf(pos, end - pos, "WPA-PSK-SHA256 "); + if (os_snprintf_error(end - pos, ret)) + return pos - buf; + pos += ret; + } + if (hapd->conf->wpa_key_mgmt & WPA_KEY_MGMT_IEEE8021X_SHA256) { + ret = os_snprintf(pos, end - pos, "WPA-EAP-SHA256 "); + if (os_snprintf_error(end - pos, ret)) + return pos - buf; + pos += ret; + } +#endif /* CONFIG_IEEE80211W */ +#ifdef CONFIG_SAE + if (hapd->conf->wpa_key_mgmt & WPA_KEY_MGMT_SAE) { + ret = os_snprintf(pos, end - pos, "SAE "); + if (os_snprintf_error(end - pos, ret)) + return pos - buf; + pos += ret; + } +#endif /* CONFIG_SAE */ + if (hapd->conf->wpa_key_mgmt & WPA_KEY_MGMT_IEEE8021X_SUITE_B) { + ret = os_snprintf(pos, end - pos, "WPA-EAP-SUITE-B "); + if (os_snprintf_error(end - pos, ret)) + return pos - buf; + pos += ret; + } + if (hapd->conf->wpa_key_mgmt & + WPA_KEY_MGMT_IEEE8021X_SUITE_B_192) { + ret = os_snprintf(pos, end - pos, + "WPA-EAP-SUITE-B-192 "); + if (os_snprintf_error(end - pos, ret)) + return pos - buf; + pos += ret; + } + + if (pos > buf && *(pos - 1) == ' ') { + *(pos - 1) = '\0'; + pos--; + } + + return pos - buf; +} + + static int hostapd_ctrl_iface_get_config(struct hostapd_data *hapd, char *buf, size_t buflen) { @@ -1104,82 +1200,20 @@ static int hostapd_ctrl_iface_get_config } #endif /* CONFIG_WPS */ + if (hapd->conf->wpa) { + ret = os_snprintf(pos, end - pos, "wpa=%d\n", hapd->conf->wpa); + if (os_snprintf_error(end - pos, ret)) + return pos - buf; + pos += ret; + } + if (hapd->conf->wpa && hapd->conf->wpa_key_mgmt) { ret = os_snprintf(pos, end - pos, "key_mgmt="); if (os_snprintf_error(end - pos, ret)) return pos - buf; pos += ret; - if (hapd->conf->wpa_key_mgmt & WPA_KEY_MGMT_PSK) { - ret = os_snprintf(pos, end - pos, "WPA-PSK "); - if (os_snprintf_error(end - pos, ret)) - return pos - buf; - pos += ret; - } - if (hapd->conf->wpa_key_mgmt & WPA_KEY_MGMT_IEEE8021X) { - ret = os_snprintf(pos, end - pos, "WPA-EAP "); - if (os_snprintf_error(end - pos, ret)) - return pos - buf; - pos += ret; - } -#ifdef CONFIG_IEEE80211R - if (hapd->conf->wpa_key_mgmt & WPA_KEY_MGMT_FT_PSK) { - ret = os_snprintf(pos, end - pos, "FT-PSK "); - if (os_snprintf_error(end - pos, ret)) - return pos - buf; - pos += ret; - } - if (hapd->conf->wpa_key_mgmt & WPA_KEY_MGMT_FT_IEEE8021X) { - ret = os_snprintf(pos, end - pos, "FT-EAP "); - if (os_snprintf_error(end - pos, ret)) - return pos - buf; - pos += ret; - } -#ifdef CONFIG_SAE - if (hapd->conf->wpa_key_mgmt & WPA_KEY_MGMT_FT_SAE) { - ret = os_snprintf(pos, end - pos, "FT-SAE "); - if (os_snprintf_error(end - pos, ret)) - return pos - buf; - pos += ret; - } -#endif /* CONFIG_SAE */ -#endif /* CONFIG_IEEE80211R */ -#ifdef CONFIG_IEEE80211W - if (hapd->conf->wpa_key_mgmt & WPA_KEY_MGMT_PSK_SHA256) { - ret = os_snprintf(pos, end - pos, "WPA-PSK-SHA256 "); - if (os_snprintf_error(end - pos, ret)) - return pos - buf; - pos += ret; - } - if (hapd->conf->wpa_key_mgmt & WPA_KEY_MGMT_IEEE8021X_SHA256) { - ret = os_snprintf(pos, end - pos, "WPA-EAP-SHA256 "); - if (os_snprintf_error(end - pos, ret)) - return pos - buf; - pos += ret; - } -#endif /* CONFIG_IEEE80211W */ -#ifdef CONFIG_SAE - if (hapd->conf->wpa_key_mgmt & WPA_KEY_MGMT_SAE) { - ret = os_snprintf(pos, end - pos, "SAE "); - if (os_snprintf_error(end - pos, ret)) - return pos - buf; - pos += ret; - } -#endif /* CONFIG_SAE */ - if (hapd->conf->wpa_key_mgmt & WPA_KEY_MGMT_IEEE8021X_SUITE_B) { - ret = os_snprintf(pos, end - pos, "WPA-EAP-SUITE-B "); - if (os_snprintf_error(end - pos, ret)) - return pos - buf; - pos += ret; - } - if (hapd->conf->wpa_key_mgmt & - WPA_KEY_MGMT_IEEE8021X_SUITE_B_192) { - ret = os_snprintf(pos, end - pos, - "WPA-EAP-SUITE-B-192 "); - if (os_snprintf_error(end - pos, ret)) - return pos - buf; - pos += ret; - } + pos += hostapd_ctrl_iface_get_key_mgmt(hapd, pos, end - pos); ret = os_snprintf(pos, end - pos, "\n"); if (os_snprintf_error(end - pos, ret)) @@ -1528,7 +1562,7 @@ void hostapd_data_test_rx(void *ctx, con { struct hostapd_data *hapd = ctx; const struct ether_header *eth; - const struct iphdr *ip; + struct iphdr ip; const u8 *pos; unsigned int i; @@ -1536,14 +1570,14 @@ void hostapd_data_test_rx(void *ctx, con return; eth = (const struct ether_header *) buf; - ip = (const struct iphdr *) (eth + 1); - pos = (const u8 *) (ip + 1); + os_memcpy(&ip, eth + 1, sizeof(ip)); + pos = &buf[sizeof(*eth) + sizeof(ip)]; - if (ip->ihl != 5 || ip->version != 4 || - ntohs(ip->tot_len) != HWSIM_IP_LEN) + if (ip.ihl != 5 || ip.version != 4 || + ntohs(ip.tot_len) != HWSIM_IP_LEN) return; - for (i = 0; i < HWSIM_IP_LEN - sizeof(*ip); i++) { + for (i = 0; i < HWSIM_IP_LEN - sizeof(ip); i++) { if (*pos != (u8) i) return; pos++; @@ -1599,7 +1633,7 @@ static int hostapd_ctrl_iface_data_test_ int used; long int val; u8 tos; - u8 buf[HWSIM_PACKETLEN]; + u8 buf[2 + HWSIM_PACKETLEN]; struct ether_header *eth; struct iphdr *ip; u8 *dpos; @@ -1627,7 +1661,7 @@ static int hostapd_ctrl_iface_data_test_ return -1; tos = val; - eth = (struct ether_header *) buf; + eth = (struct ether_header *) &buf[2]; os_memcpy(eth->ether_dhost, dst, ETH_ALEN); os_memcpy(eth->ether_shost, src, ETH_ALEN); eth->ether_type = htons(ETHERTYPE_IP); @@ -1639,14 +1673,14 @@ static int hostapd_ctrl_iface_data_test_ ip->tos = tos; ip->tot_len = htons(HWSIM_IP_LEN); ip->protocol = 1; - ip->saddr = htonl(192 << 24 | 168 << 16 | 1 << 8 | 1); - ip->daddr = htonl(192 << 24 | 168 << 16 | 1 << 8 | 2); + ip->saddr = htonl(192U << 24 | 168 << 16 | 1 << 8 | 1); + ip->daddr = htonl(192U << 24 | 168 << 16 | 1 << 8 | 2); ip->check = ipv4_hdr_checksum(ip, sizeof(*ip)); dpos = (u8 *) (ip + 1); for (i = 0; i < HWSIM_IP_LEN - sizeof(*ip); i++) *dpos++ = i; - if (l2_packet_send(hapd->l2_test, dst, ETHERTYPE_IP, buf, + if (l2_packet_send(hapd->l2_test, dst, ETHERTYPE_IP, &buf[2], HWSIM_PACKETLEN) < 0) return -1; @@ -1746,6 +1780,45 @@ static int hostapd_ctrl_get_alloc_fail(s #endif /* WPA_TRACE_BFD */ } + +static int hostapd_ctrl_test_fail(struct hostapd_data *hapd, char *cmd) +{ +#ifdef WPA_TRACE_BFD + extern char wpa_trace_test_fail_func[256]; + extern unsigned int wpa_trace_test_fail_after; + char *pos; + + wpa_trace_test_fail_after = atoi(cmd); + pos = os_strchr(cmd, ':'); + if (pos) { + pos++; + os_strlcpy(wpa_trace_test_fail_func, pos, + sizeof(wpa_trace_test_fail_func)); + } else { + wpa_trace_test_fail_after = 0; + } + + return 0; +#else /* WPA_TRACE_BFD */ + return -1; +#endif /* WPA_TRACE_BFD */ +} + + +static int hostapd_ctrl_get_fail(struct hostapd_data *hapd, + char *buf, size_t buflen) +{ +#ifdef WPA_TRACE_BFD + extern char wpa_trace_test_fail_func[256]; + extern unsigned int wpa_trace_test_fail_after; + + return os_snprintf(buf, buflen, "%u:%s", wpa_trace_test_fail_after, + wpa_trace_test_fail_func); +#else /* WPA_TRACE_BFD */ + return -1; +#endif /* WPA_TRACE_BFD */ +} + #endif /* CONFIG_TESTING_OPTIONS */ @@ -1847,41 +1920,134 @@ static int hostapd_ctrl_iface_vendor(str } -static void hostapd_ctrl_iface_receive(int sock, void *eloop_ctx, - void *sock_ctx) +static int hostapd_ctrl_iface_eapol_reauth(struct hostapd_data *hapd, + const char *cmd) { - struct hostapd_data *hapd = eloop_ctx; - char buf[4096]; - int res; - struct sockaddr_un from; - socklen_t fromlen = sizeof(from); - char *reply; - const int reply_size = 4096; - int reply_len; - int level = MSG_DEBUG; + u8 addr[ETH_ALEN]; + struct sta_info *sta; - res = recvfrom(sock, buf, sizeof(buf) - 1, 0, - (struct sockaddr *) &from, &fromlen); - if (res < 0) { - wpa_printf(MSG_ERROR, "recvfrom(ctrl_iface): %s", - strerror(errno)); - return; + if (hwaddr_aton(cmd, addr)) + return -1; + + sta = ap_get_sta(hapd, addr); + if (!sta || !sta->eapol_sm) + return -1; + + eapol_auth_reauthenticate(sta->eapol_sm); + return 0; +} + + +static int hostapd_ctrl_iface_eapol_set(struct hostapd_data *hapd, char *cmd) +{ + u8 addr[ETH_ALEN]; + struct sta_info *sta; + char *pos = cmd, *param; + + if (hwaddr_aton(pos, addr) || pos[17] != ' ') + return -1; + pos += 18; + param = pos; + pos = os_strchr(pos, ' '); + if (!pos) + return -1; + *pos++ = '\0'; + + sta = ap_get_sta(hapd, addr); + if (!sta || !sta->eapol_sm) + return -1; + + return eapol_auth_set_conf(sta->eapol_sm, param, pos); +} + + +static int hostapd_ctrl_iface_log_level(struct hostapd_data *hapd, char *cmd, + char *buf, size_t buflen) +{ + char *pos, *end, *stamp; + int ret; + + /* cmd: "LOG_LEVEL []" */ + if (*cmd == '\0') { + pos = buf; + end = buf + buflen; + ret = os_snprintf(pos, end - pos, "Current level: %s\n" + "Timestamp: %d\n", + debug_level_str(wpa_debug_level), + wpa_debug_timestamp); + if (os_snprintf_error(end - pos, ret)) + ret = 0; + + return ret; } - buf[res] = '\0'; - if (os_strcmp(buf, "PING") == 0) - level = MSG_EXCESSIVE; - wpa_hexdump_ascii(level, "RX ctrl_iface", (u8 *) buf, res); - reply = os_malloc(reply_size); - if (reply == NULL) { - if (sendto(sock, "FAIL\n", 5, 0, (struct sockaddr *) &from, - fromlen) < 0) { - wpa_printf(MSG_DEBUG, "CTRL: sendto failed: %s", - strerror(errno)); + while (*cmd == ' ') + cmd++; + + stamp = os_strchr(cmd, ' '); + if (stamp) { + *stamp++ = '\0'; + while (*stamp == ' ') { + stamp++; } - return; } + if (os_strlen(cmd)) { + int level = str_to_debug_level(cmd); + if (level < 0) + return -1; + wpa_debug_level = level; + } + + if (stamp && os_strlen(stamp)) + wpa_debug_timestamp = atoi(stamp); + + os_memcpy(buf, "OK\n", 3); + return 3; +} + + +#ifdef NEED_AP_MLME +static int hostapd_ctrl_iface_track_sta_list(struct hostapd_data *hapd, + char *buf, size_t buflen) +{ + struct hostapd_iface *iface = hapd->iface; + char *pos, *end; + struct hostapd_sta_info *info; + struct os_reltime now; + + sta_track_expire(iface, 0); + + pos = buf; + end = buf + buflen; + + os_get_reltime(&now); + dl_list_for_each_reverse(info, &iface->sta_seen, + struct hostapd_sta_info, list) { + struct os_reltime age; + int ret; + + os_reltime_sub(&now, &info->last_seen, &age); + ret = os_snprintf(pos, end - pos, MACSTR " %u\n", + MAC2STR(info->addr), (unsigned int) age.sec); + if (os_snprintf_error(end - pos, ret)) + break; + pos += ret; + } + + return pos - buf; +} +#endif /* NEED_AP_MLME */ + + +static int hostapd_ctrl_iface_receive_process(struct hostapd_data *hapd, + char *buf, char *reply, + int reply_size, + struct sockaddr_un *from, + socklen_t fromlen) +{ + int reply_len, res; + os_memcpy(reply, "OK\n", 3); reply_len = 3; @@ -1938,13 +2104,13 @@ static void hostapd_ctrl_iface_receive(i reply_len = hostapd_ctrl_iface_sta_next(hapd, buf + 9, reply, reply_size); *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@freebsd.org Wed Oct 14 04:32:57 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 22737A12379; Wed, 14 Oct 2015 04:32:57 +0000 (UTC) (envelope-from rpaulo@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C2EF31EC5; Wed, 14 Oct 2015 04:32:56 +0000 (UTC) (envelope-from rpaulo@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t9E4WtEw003455; Wed, 14 Oct 2015 04:32:55 GMT (envelope-from rpaulo@FreeBSD.org) Received: (from rpaulo@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9E4WtJA003454; Wed, 14 Oct 2015 04:32:55 GMT (envelope-from rpaulo@FreeBSD.org) Message-Id: <201510140432.t9E4WtJA003454@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: rpaulo set sender to rpaulo@FreeBSD.org using -f From: Rui Paulo Date: Wed, 14 Oct 2015 04:32:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r289285 - vendor/wpa/2.5 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 " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Oct 2015 04:32:57 -0000 Author: rpaulo Date: Wed Oct 14 04:32:55 2015 New Revision: 289285 URL: https://svnweb.freebsd.org/changeset/base/289285 Log: Tag wpa_supplicant/hostapd 2.5. Added: - copied from r289284, vendor/wpa/dist/ Directory Properties: vendor/wpa/2.5/ (props changed) From owner-svn-src-all@freebsd.org Wed Oct 14 04:42:07 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 10F10A12718; Wed, 14 Oct 2015 04:42:07 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B6BEE847; Wed, 14 Oct 2015 04:42:06 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t9E4g5wd006335; Wed, 14 Oct 2015 04:42:05 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9E4g52H006334; Wed, 14 Oct 2015 04:42:05 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201510140442.t9E4g52H006334@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Wed, 14 Oct 2015 04:42:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289286 - 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 " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Oct 2015 04:42:07 -0000 Author: bdrewery Date: Wed Oct 14 04:42:05 2015 New Revision: 289286 URL: https://svnweb.freebsd.org/changeset/base/289286 Log: Follow-up r288218 by ensuring common objects are built before recursing. Some example where this is a problem: lib/atf/libatf-c++/tests/Makefile:SRCS.${_T}= ${_T}.cpp test_helpers.cpp lib/atf/libatf-c++/tests/detail/Makefile:SRCS.${_T}= ${_T}.cpp test_helpers.cpp lib/atf/libatf-c/tests/Makefile:SRCS.${_T}= ${_T}.c test_helpers.c lib/atf/libatf-c/tests/detail/Makefile:SRCS.${_T}= ${_T}.c test_helpers.c lib/libpam/libpam/tests/Makefile:SRCS.${test} = ${test}.c ${COMMONSRC} A similar change may be needed for FILES, SCRIPTS, or INCS, but for now stay with just SRCS. Reported by: rodrigc MFC after: 3 weeks X-MFC-With: r288218 Sponsored by: EMC / Isilon Storage Division Modified: head/share/mk/bsd.progs.mk Modified: head/share/mk/bsd.progs.mk ============================================================================== --- head/share/mk/bsd.progs.mk Wed Oct 14 04:32:55 2015 (r289285) +++ head/share/mk/bsd.progs.mk Wed Oct 14 04:42:05 2015 (r289286) @@ -84,6 +84,25 @@ $v = # tell progs.mk we might want to install things PROGS_TARGETS+= checkdpadd clean cleandepend cleandir depend install +# Find common sources among the PROGS and depend on them before building +# anything. This allows parallelization without them each fighting over +# the same objects. +_PROGS_COMMON_SRCS= +_PROGS_ALL_SRCS= +.for p in ${PROGS} +.for s in ${SRCS.${p}} +.if ${_PROGS_ALL_SRCS:M${s}} && !${_PROGS_COMMON_SRCS:M${s}} +_PROGS_COMMON_SRCS+= ${s} +.else +_PROGS_ALL_SRCS+= ${s} +.endif +.endfor +.endfor +.if !empty(_PROGS_COMMON_SRCS) +_PROGS_COMMON_OBJS= ${_PROGS_COMMON_SRCS:N*.h:R:S/$/.o/g} +${PROGS}: ${_PROGS_COMMON_OBJS} +.endif + .for p in ${PROGS} .if defined(PROGS_CXX) && !empty(PROGS_CXX:M$p) # bsd.prog.mk may need to know this From owner-svn-src-all@freebsd.org Wed Oct 14 05:16:58 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 13415A1206D; Wed, 14 Oct 2015 05:16:58 +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 CE6C91477; Wed, 14 Oct 2015 05:16:57 +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 t9E5Gulr015193; Wed, 14 Oct 2015 05:16:56 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9E5Gues015192; Wed, 14 Oct 2015 05:16:56 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201510140516.t9E5Gues015192@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Wed, 14 Oct 2015 05:16:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289287 - 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 " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Oct 2015 05:16:58 -0000 Author: adrian Date: Wed Oct 14 05:16:56 2015 New Revision: 289287 URL: https://svnweb.freebsd.org/changeset/base/289287 Log: Fix date. Noticed by: bdrewery Modified: head/share/man/man4/rsu.4 Modified: head/share/man/man4/rsu.4 ============================================================================== --- head/share/man/man4/rsu.4 Wed Oct 14 04:42:05 2015 (r289286) +++ head/share/man/man4/rsu.4 Wed Oct 14 05:16:56 2015 (r289287) @@ -15,7 +15,7 @@ .\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF .\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. .\" -.Dd November 19, 2014 +.Dd October 13, 2015 .Dt RSU 4 .Os .Sh NAME From owner-svn-src-all@freebsd.org Wed Oct 14 05:29:34 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C6BF8A123A8; Wed, 14 Oct 2015 05:29:34 +0000 (UTC) (envelope-from hiren@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8EC241AF9; Wed, 14 Oct 2015 05:29:34 +0000 (UTC) (envelope-from hiren@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t9E5TXZn018174; Wed, 14 Oct 2015 05:29:33 GMT (envelope-from hiren@FreeBSD.org) Received: (from hiren@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9E5TXPY018173; Wed, 14 Oct 2015 05:29:33 GMT (envelope-from hiren@FreeBSD.org) Message-Id: <201510140529.t9E5TXPY018173@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hiren set sender to hiren@FreeBSD.org using -f From: Hiren Panchasara Date: Wed, 14 Oct 2015 05:29: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: r289288 - 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 " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Oct 2015 05:29:34 -0000 Author: hiren Date: Wed Oct 14 05:29:33 2015 New Revision: 289288 URL: https://svnweb.freebsd.org/changeset/base/289288 Log: MFC r288914 Add a comment specifying how we implement rfc3042. Modified: stable/10/sys/netinet/tcp_input.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/netinet/tcp_input.c ============================================================================== --- stable/10/sys/netinet/tcp_input.c Wed Oct 14 05:16:56 2015 (r289287) +++ stable/10/sys/netinet/tcp_input.c Wed Oct 14 05:29:33 2015 (r289288) @@ -2523,6 +2523,16 @@ tcp_do_segment(struct mbuf *m, struct tc tp->snd_nxt = onxt; goto drop; } else if (V_tcp_do_rfc3042) { + /* + * Process first and second duplicate + * ACKs. Each indicates a segment + * leaving the network, creating room + * for more. Make sure we can send a + * packet on reception of each duplicate + * ACK by increasing snd_cwnd by one + * segment. Restore the original + * snd_cwnd after packet transmission. + */ cc_ack_received(tp, th, CC_DUPACK); u_long oldcwnd = tp->snd_cwnd; tcp_seq oldsndmax = tp->snd_max; From owner-svn-src-all@freebsd.org Wed Oct 14 05:50:18 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1005AA1293D; Wed, 14 Oct 2015 05:50:18 +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 C69AB634; Wed, 14 Oct 2015 05:50: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 t9E5oGc3024154; Wed, 14 Oct 2015 05:50:16 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9E5oGIF024153; Wed, 14 Oct 2015 05:50:16 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201510140550.t9E5oGIF024153@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Wed, 14 Oct 2015 05:50:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289289 - 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 " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Oct 2015 05:50:18 -0000 Author: bdrewery Date: Wed Oct 14 05:50:16 2015 New Revision: 289289 URL: https://svnweb.freebsd.org/changeset/base/289289 Log: Fix support for building a PROG_CXX, and PROG, directly. For example in lib/atf/libatf-c++/tests/detail it is now possible to run 'make application_test'. This was intended to worked for PROGS, but lacked support for PROGS_CXX. Also fix redefining the main PROG target to recurse. This isn't needed since the main process is setting PROG/PROG_CXX to handle it directly via bsd.prog.mk. MFC after: 3 weeks Sponsored by: EMC / Isilon Storage Division Modified: head/share/mk/bsd.progs.mk Modified: head/share/mk/bsd.progs.mk ============================================================================== --- head/share/mk/bsd.progs.mk Wed Oct 14 05:29:33 2015 (r289288) +++ head/share/mk/bsd.progs.mk Wed Oct 14 05:50:16 2015 (r289289) @@ -31,6 +31,9 @@ UPDATE_DEPENDFILE_PROG = ${PROGS:[1]} # They may have asked us to build just one .for t in ${PROGS} .if make($t) +.if ${PROGS_CXX:M${t}} +PROG_CXX ?= $t +.endif PROG ?= $t .endif .endfor @@ -61,7 +64,7 @@ UPDATE_DEPENDFILE ?= yes UPDATE_DEPENDFILE ?= NO # prog.mk will do the rest -.else +.else # !defined(PROG) all: ${PROGS} # We cannot capture dependencies for meta mode here @@ -80,7 +83,7 @@ $v = # handle being called [bsd.]progs.mk .include -.if !empty(PROGS) && !defined(_RECURSING_PROGS) +.if !empty(PROGS) && !defined(_RECURSING_PROGS) && !defined(PROG) # tell progs.mk we might want to install things PROGS_TARGETS+= checkdpadd clean cleandepend cleandir depend install @@ -130,4 +133,4 @@ $p.$t: .PHONY .MAKE .for t in ${PROGS_TARGETS:O:u} $t: ${PROGS:%=%.$t} .endfor -.endif +.endif # !empty(PROGS) && !defined(_RECURSING_PROGS) && !defined(PROG) From owner-svn-src-all@freebsd.org Wed Oct 14 06:24:03 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 04EEEA1315C; Wed, 14 Oct 2015 06:24:03 +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 BFEDA1453; Wed, 14 Oct 2015 06:24:02 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t9E6O1GP035635; Wed, 14 Oct 2015 06:24:01 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9E6O1hj035634; Wed, 14 Oct 2015 06:24:01 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201510140624.t9E6O1hj035634@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Wed, 14 Oct 2015 06: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: r289290 - stable/10/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 " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Oct 2015 06:24:03 -0000 Author: bapt Date: Wed Oct 14 06:24:01 2015 New Revision: 289290 URL: https://svnweb.freebsd.org/changeset/base/289290 Log: Hook sesutil(8) to the build (forgotten in previous MFC) Modified: stable/10/usr.sbin/Makefile Modified: stable/10/usr.sbin/Makefile ============================================================================== --- stable/10/usr.sbin/Makefile Wed Oct 14 05:50:16 2015 (r289289) +++ stable/10/usr.sbin/Makefile Wed Oct 14 06:24:01 2015 (r289290) @@ -73,6 +73,7 @@ SUBDIR= adduser \ rtprio \ service \ services_mkdb \ + sesutil \ setfib \ setfmac \ setpmac \ From owner-svn-src-all@freebsd.org Wed Oct 14 06:26:56 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 795FAA13228; Wed, 14 Oct 2015 06:26:56 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 42B4A163F; Wed, 14 Oct 2015 06:26:56 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t9E6QtZP035777; Wed, 14 Oct 2015 06:26:55 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9E6QtgK035776; Wed, 14 Oct 2015 06:26:55 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201510140626.t9E6QtgK035776@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Wed, 14 Oct 2015 06:26: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: r289291 - stable/10/sbin/sysctl 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 " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Oct 2015 06:26:56 -0000 Author: bapt Date: Wed Oct 14 06:26:55 2015 New Revision: 289291 URL: https://svnweb.freebsd.org/changeset/base/289291 Log: Trim spaces at the end of the buffer before trying to convert it to an oid This allows to write entries in sysctl.conf with spaces before the '=' like kern.ipc.shmmax = 9663676416 Sponsored by: Gandi.net Modified: stable/10/sbin/sysctl/sysctl.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sbin/sysctl/sysctl.c ============================================================================== --- stable/10/sbin/sysctl/sysctl.c Wed Oct 14 06:24:01 2015 (r289290) +++ stable/10/sbin/sysctl/sysctl.c Wed Oct 14 06:26:55 2015 (r289291) @@ -233,6 +233,12 @@ parse(const char *string, int lineno) newval = cp; newsize = strlen(cp); } + /* Trim spaces */ + cp = bufp + strlen(bufp) - 1; + while (cp >= bufp && isspace((int)*cp)) { + *cp = '\0'; + cp--; + } len = name2oid(bufp, mib); if (len < 0) { From owner-svn-src-all@freebsd.org Wed Oct 14 06:31:51 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0904EA1340C; Wed, 14 Oct 2015 06:31:51 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id CA78D1B7F; Wed, 14 Oct 2015 06:31:50 +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 t9E6Vn8S038508; Wed, 14 Oct 2015 06:31:49 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9E6VnlY038507; Wed, 14 Oct 2015 06:31:49 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201510140631.t9E6VnlY038507@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Wed, 14 Oct 2015 06:31: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: r289292 - stable/10/sbin/sysctl 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 " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Oct 2015 06:31:51 -0000 Author: bapt Date: Wed Oct 14 06:31:49 2015 New Revision: 289292 URL: https://svnweb.freebsd.org/changeset/base/289292 Log: MFC: 288984 Only print the errno string in case sysctl(3) does not file with ENOENT This reduces the noise in error reporing from sysctl(8): Before: $ sysctl bla=something sysctl: unknown oid 'bla': No such file or directory After: $ sysctl bla=something sysctl: unknown oid 'bla' Sponsored by: Gandi.net Modified: stable/10/sbin/sysctl/sysctl.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sbin/sysctl/sysctl.c ============================================================================== --- stable/10/sbin/sysctl/sysctl.c Wed Oct 14 06:26:55 2015 (r289291) +++ stable/10/sbin/sysctl/sysctl.c Wed Oct 14 06:31:49 2015 (r289292) @@ -247,7 +247,11 @@ parse(const char *string, int lineno) if (qflag) return (1); else { - warn("unknown oid '%s'%s", bufp, line); + if (errno == ENOENT) { + warnx("unknown oid '%s'%s", bufp, line); + } else { + warn("unknown oid '%s'%s", bufp, line); + } return (1); } } From owner-svn-src-all@freebsd.org Wed Oct 14 06:57:29 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 978DDA1399A; Wed, 14 Oct 2015 06:57:29 +0000 (UTC) (envelope-from hiren@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4780F5E3; Wed, 14 Oct 2015 06:57:29 +0000 (UTC) (envelope-from hiren@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t9E6vSU7044451; Wed, 14 Oct 2015 06:57:28 GMT (envelope-from hiren@FreeBSD.org) Received: (from hiren@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9E6vS5N044450; Wed, 14 Oct 2015 06:57:28 GMT (envelope-from hiren@FreeBSD.org) Message-Id: <201510140657.t9E6vS5N044450@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hiren set sender to hiren@FreeBSD.org using -f From: Hiren Panchasara Date: Wed, 14 Oct 2015 06:57:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289293 - 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 " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Oct 2015 06:57:29 -0000 Author: hiren Date: Wed Oct 14 06:57:28 2015 New Revision: 289293 URL: https://svnweb.freebsd.org/changeset/base/289293 Log: Fix an unnecessarily aggressive behavior where mtu clamping begins on first retransmission timeout (rto) when blackhole detection is enabled. Make sure it only happens when the second attempt to send the same segment also fails with rto. Also make sure that each mtu probing stage (usually 1448 -> 1188 -> 524) follows the same pattern and gets 2 chances (rto) before further clamping down. Note: RFC4821 doesn't specify implementation details on how this situation should be handled. Differential Revision: https://reviews.freebsd.org/D3434 Reviewed by: sbruno, gnn (previous version) MFC after: 2 weeks Sponsored by: Limelight Networks Modified: head/sys/netinet/tcp_timer.c Modified: head/sys/netinet/tcp_timer.c ============================================================================== --- head/sys/netinet/tcp_timer.c Wed Oct 14 06:31:49 2015 (r289292) +++ head/sys/netinet/tcp_timer.c Wed Oct 14 06:57:28 2015 (r289293) @@ -664,9 +664,15 @@ tcp_timer_rexmt(void * xtp) int isipv6; #endif + /* + * Idea here is that at each stage of mtu probe (usually, 1448 + * -> 1188 -> 524) should be given 2 chances to recover before + * further clamping down. 'tp->t_rxtshift % 2 == 0' should + * take care of that. + */ if (((tp->t_flags2 & (TF2_PLPMTU_PMTUD|TF2_PLPMTU_MAXSEGSNT)) == (TF2_PLPMTU_PMTUD|TF2_PLPMTU_MAXSEGSNT)) && - (tp->t_rxtshift <= 2)) { + (tp->t_rxtshift >= 2 && tp->t_rxtshift % 2 == 0)) { /* * Enter Path MTU Black-hole Detection mechanism: * - Disable Path MTU Discovery (IP "DF" bit). @@ -734,9 +740,11 @@ tcp_timer_rexmt(void * xtp) * with a lowered MTU, maybe this isn't a blackhole and * we restore the previous MSS and blackhole detection * flags. + * The limit '6' is determined by giving each probe + * stage (1448, 1188, 524) 2 chances to recover. */ if ((tp->t_flags2 & TF2_PLPMTU_BLACKHOLE) && - (tp->t_rxtshift > 4)) { + (tp->t_rxtshift > 6)) { tp->t_flags2 |= TF2_PLPMTU_PMTUD; tp->t_flags2 &= ~TF2_PLPMTU_BLACKHOLE; optlen = tp->t_maxopd - tp->t_maxseg; From owner-svn-src-all@freebsd.org Wed Oct 14 07:28:37 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id CEC54A1231B; Wed, 14 Oct 2015 07:28:37 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 902FC11A1; Wed, 14 Oct 2015 07:28:37 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t9E7Safq053108; Wed, 14 Oct 2015 07:28:36 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9E7SaTF053107; Wed, 14 Oct 2015 07:28:36 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201510140728.t9E7SaTF053107@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Wed, 14 Oct 2015 07:28:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r289294 - vendor-sys/illumos/dist/uts/common/fs/zfs X-SVN-Group: vendor-sys MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Oct 2015 07:28:37 -0000 Author: mav Date: Wed Oct 14 07:28:36 2015 New Revision: 289294 URL: https://svnweb.freebsd.org/changeset/base/289294 Log: 5219 l2arc_write_buffers() may write beyond target_sz Reviewed by: Matthew Ahrens Reviewed by: Saso Kiselkov Reviewed by: George Wilson Reviewed by: Steven Hartland Reviewed by: Justin Gibbs Approved by: Matthew Ahrens Author: Andriy Gapon illumos/illumos-gate@d7d9a6d919f92d74ea0510a53f8441396048e800 Modified: vendor-sys/illumos/dist/uts/common/fs/zfs/arc.c Modified: vendor-sys/illumos/dist/uts/common/fs/zfs/arc.c ============================================================================== --- vendor-sys/illumos/dist/uts/common/fs/zfs/arc.c Wed Oct 14 06:57:28 2015 (r289293) +++ vendor-sys/illumos/dist/uts/common/fs/zfs/arc.c Wed Oct 14 07:28:36 2015 (r289294) @@ -5902,7 +5902,7 @@ l2arc_write_buffers(spa_t *spa, l2arc_de boolean_t *headroom_boost) { arc_buf_hdr_t *hdr, *hdr_prev, *head; - uint64_t write_asize, write_psize, write_sz, headroom, + uint64_t write_asize, write_sz, headroom, buf_compress_minsz; void *buf_data; boolean_t full; @@ -5917,7 +5917,7 @@ l2arc_write_buffers(spa_t *spa, l2arc_de *headroom_boost = B_FALSE; pio = NULL; - write_sz = write_asize = write_psize = 0; + write_sz = write_asize = 0; full = B_FALSE; head = kmem_cache_alloc(hdr_l2only_cache, KM_PUSHPAGE); head->b_flags |= ARC_FLAG_L2_WRITE_HEAD; @@ -5954,6 +5954,7 @@ l2arc_write_buffers(spa_t *spa, l2arc_de for (; hdr; hdr = hdr_prev) { kmutex_t *hash_lock; uint64_t buf_sz; + uint64_t buf_a_sz; if (arc_warm == B_FALSE) hdr_prev = multilist_sublist_next(mls, hdr); @@ -5982,7 +5983,15 @@ l2arc_write_buffers(spa_t *spa, l2arc_de continue; } - if ((write_sz + hdr->b_size) > target_sz) { + /* + * Assume that the buffer is not going to be compressed + * and could take more space on disk because of a larger + * disk block size. + */ + buf_sz = hdr->b_size; + buf_a_sz = vdev_psize_to_asize(dev->l2ad_vdev, buf_sz); + + if ((write_asize + buf_a_sz) > target_sz) { full = B_TRUE; mutex_exit(hash_lock); break; @@ -6046,7 +6055,6 @@ l2arc_write_buffers(spa_t *spa, l2arc_de */ hdr->b_l2hdr.b_daddr = L2ARC_ADDR_UNSET; - buf_sz = hdr->b_size; hdr->b_flags |= ARC_FLAG_HAS_L2HDR; mutex_enter(&dev->l2ad_mtx); @@ -6063,6 +6071,7 @@ l2arc_write_buffers(spa_t *spa, l2arc_de mutex_exit(hash_lock); write_sz += buf_sz; + write_asize += buf_a_sz; } multilist_sublist_unlock(mls); @@ -6082,6 +6091,19 @@ l2arc_write_buffers(spa_t *spa, l2arc_de mutex_enter(&dev->l2ad_mtx); /* + * Note that elsewhere in this file arcstat_l2_asize + * and the used space on l2ad_vdev are updated using b_asize, + * which is not necessarily rounded up to the device block size. + * Too keep accounting consistent we do the same here as well: + * stats_size accumulates the sum of b_asize of the written buffers, + * while write_asize accumulates the sum of b_asize rounded up + * to the device block size. + * The latter sum is used only to validate the corectness of the code. + */ + uint64_t stats_size = 0; + write_asize = 0; + + /* * Now start writing the buffers. We're starting at the write head * and work backwards, retracing the course of the buffer selector * loop above. @@ -6134,7 +6156,7 @@ l2arc_write_buffers(spa_t *spa, l2arc_de /* Compression may have squashed the buffer to zero length. */ if (buf_sz != 0) { - uint64_t buf_p_sz; + uint64_t buf_a_sz; wzio = zio_write_phys(pio, dev->l2ad_vdev, dev->l2ad_hand, buf_sz, buf_data, ZIO_CHECKSUM_OFF, @@ -6145,14 +6167,14 @@ l2arc_write_buffers(spa_t *spa, l2arc_de zio_t *, wzio); (void) zio_nowait(wzio); - write_asize += buf_sz; + stats_size += buf_sz; /* * Keep the clock hand suitably device-aligned. */ - buf_p_sz = vdev_psize_to_asize(dev->l2ad_vdev, buf_sz); - write_psize += buf_p_sz; - dev->l2ad_hand += buf_p_sz; + buf_a_sz = vdev_psize_to_asize(dev->l2ad_vdev, buf_sz); + write_asize += buf_a_sz; + dev->l2ad_hand += buf_a_sz; } } @@ -6162,8 +6184,8 @@ l2arc_write_buffers(spa_t *spa, l2arc_de ARCSTAT_BUMP(arcstat_l2_writes_sent); ARCSTAT_INCR(arcstat_l2_write_bytes, write_asize); ARCSTAT_INCR(arcstat_l2_size, write_sz); - ARCSTAT_INCR(arcstat_l2_asize, write_asize); - vdev_space_update(dev->l2ad_vdev, write_asize, 0, 0); + ARCSTAT_INCR(arcstat_l2_asize, stats_size); + vdev_space_update(dev->l2ad_vdev, stats_size, 0, 0); /* * Bump device hand to the device start if it is approaching the end. From owner-svn-src-all@freebsd.org Wed Oct 14 07:37:04 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 51457A1267A; Wed, 14 Oct 2015 07:37:04 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 18CC217CE; Wed, 14 Oct 2015 07:37:04 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t9E7b3H1055984; Wed, 14 Oct 2015 07:37:03 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9E7b3pc055983; Wed, 14 Oct 2015 07:37:03 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201510140737.t9E7b3pc055983@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Wed, 14 Oct 2015 07:37:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289295 - 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 " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Oct 2015 07:37:04 -0000 Author: mav Date: Wed Oct 14 07:37:02 2015 New Revision: 289295 URL: https://svnweb.freebsd.org/changeset/base/289295 Log: MFV r289294: 5219 l2arc_write_buffers() may write beyond target_sz Reviewed by: Matthew Ahrens Reviewed by: Saso Kiselkov Reviewed by: George Wilson Reviewed by: Steven Hartland Reviewed by: Justin Gibbs Approved by: Matthew Ahrens Author: Andriy Gapon illumos/illumos-gate@d7d9a6d919f92d74ea0510a53f8441396048e800 Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c Directory Properties: head/sys/cddl/contrib/opensolaris/ (props changed) Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c Wed Oct 14 07:28:36 2015 (r289294) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c Wed Oct 14 07:37:02 2015 (r289295) @@ -6243,7 +6243,8 @@ l2arc_write_buffers(spa_t *spa, l2arc_de boolean_t *headroom_boost) { arc_buf_hdr_t *hdr, *hdr_prev, *head; - uint64_t write_asize, write_sz, headroom, buf_compress_minsz; + uint64_t write_asize, write_sz, headroom, + buf_compress_minsz; void *buf_data; boolean_t full; l2arc_write_callback_t *cb; @@ -6405,6 +6406,7 @@ l2arc_write_buffers(spa_t *spa, l2arc_de * using it to denote the header's state change. */ hdr->b_l2hdr.b_daddr = L2ARC_ADDR_UNSET; + hdr->b_flags |= ARC_FLAG_HAS_L2HDR; mutex_enter(&dev->l2ad_mtx); From owner-svn-src-all@freebsd.org Wed Oct 14 07:44:21 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1B485A12DD8; Wed, 14 Oct 2015 07:44:21 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id CE2431D20; Wed, 14 Oct 2015 07:44:20 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t9E7iJ8L058834; Wed, 14 Oct 2015 07:44:19 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9E7iJfw058833; Wed, 14 Oct 2015 07:44:19 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201510140744.t9E7iJfw058833@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Wed, 14 Oct 2015 07:44:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r289296 - vendor-sys/illumos/dist/uts/common/fs/zfs X-SVN-Group: vendor-sys MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Oct 2015 07:44:21 -0000 Author: mav Date: Wed Oct 14 07:44:19 2015 New Revision: 289296 URL: https://svnweb.freebsd.org/changeset/base/289296 Log: 6288 dmu_buf_will_dirty could be faster Reviewed by: George Wilson Reviewed by: Paul Dagnelie Reviewed by: Justin Gibbs Reviewed by: Richard Elling Approved by: Robert Mustacchi Author: Matthew Ahrens illumos/illumos-gate@0f2e7d03b8f588387cb8dd8dd500cbe5ff4484e0 Modified: vendor-sys/illumos/dist/uts/common/fs/zfs/dbuf.c Modified: vendor-sys/illumos/dist/uts/common/fs/zfs/dbuf.c ============================================================================== --- vendor-sys/illumos/dist/uts/common/fs/zfs/dbuf.c Wed Oct 14 07:37:02 2015 (r289295) +++ vendor-sys/illumos/dist/uts/common/fs/zfs/dbuf.c Wed Oct 14 07:44:19 2015 (r289296) @@ -1115,6 +1115,32 @@ dbuf_release_bp(dmu_buf_impl_t *db) (void) arc_release(db->db_buf, db); } +/* + * We already have a dirty record for this TXG, and we are being + * dirtied again. + */ +static void +dbuf_redirty(dbuf_dirty_record_t *dr) +{ + dmu_buf_impl_t *db = dr->dr_dbuf; + + ASSERT(MUTEX_HELD(&db->db_mtx)); + + if (db->db_level == 0 && db->db_blkid != DMU_BONUS_BLKID) { + /* + * If this buffer has already been written out, + * we now need to reset its state. + */ + dbuf_unoverride(dr); + if (db->db.db_object != DMU_META_DNODE_OBJECT && + db->db_state != DB_NOFILL) { + /* Already released on initial dirty, so just thaw. */ + ASSERT(arc_released(db->db_buf)); + arc_buf_thaw(db->db_buf); + } + } +} + dbuf_dirty_record_t * dbuf_dirty(dmu_buf_impl_t *db, dmu_tx_t *tx) { @@ -1187,16 +1213,7 @@ dbuf_dirty(dmu_buf_impl_t *db, dmu_tx_t if (dr && dr->dr_txg == tx->tx_txg) { DB_DNODE_EXIT(db); - if (db->db_level == 0 && db->db_blkid != DMU_BONUS_BLKID) { - /* - * If this buffer has already been written out, - * we now need to reset its state. - */ - dbuf_unoverride(dr); - if (db->db.db_object != DMU_META_DNODE_OBJECT && - db->db_state != DB_NOFILL) - arc_buf_thaw(db->db_buf); - } + dbuf_redirty(dr); mutex_exit(&db->db_mtx); return (dr); } @@ -1500,6 +1517,30 @@ dmu_buf_will_dirty(dmu_buf_t *db_fake, d ASSERT(tx->tx_txg != 0); ASSERT(!refcount_is_zero(&db->db_holds)); + /* + * Quick check for dirtyness. For already dirty blocks, this + * reduces runtime of this function by >90%, and overall performance + * by 50% for some workloads (e.g. file deletion with indirect blocks + * cached). + */ + mutex_enter(&db->db_mtx); + dbuf_dirty_record_t *dr; + for (dr = db->db_last_dirty; + dr != NULL && dr->dr_txg >= tx->tx_txg; dr = dr->dr_next) { + /* + * It's possible that it is already dirty but not cached, + * because there are some calls to dbuf_dirty() that don't + * go through dmu_buf_will_dirty(). + */ + if (dr->dr_txg == tx->tx_txg && db->db_state == DB_CACHED) { + /* This dbuf is already dirty and cached. */ + dbuf_redirty(dr); + mutex_exit(&db->db_mtx); + return; + } + } + mutex_exit(&db->db_mtx); + DB_DNODE_ENTER(db); if (RW_WRITE_HELD(&DB_DNODE(db)->dn_struct_rwlock)) rf |= DB_RF_HAVESTRUCT; From owner-svn-src-all@freebsd.org Wed Oct 14 07:45:45 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8DB5BA12E7C; Wed, 14 Oct 2015 07:45:45 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6245E1E8E; Wed, 14 Oct 2015 07:45:45 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t9E7jieb058942; Wed, 14 Oct 2015 07:45:44 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9E7jiTL058941; Wed, 14 Oct 2015 07:45:44 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201510140745.t9E7jiTL058941@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Wed, 14 Oct 2015 07:45:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289297 - 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 " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Oct 2015 07:45:45 -0000 Author: mav Date: Wed Oct 14 07:45:44 2015 New Revision: 289297 URL: https://svnweb.freebsd.org/changeset/base/289297 Log: MFV r289296: 6288 dmu_buf_will_dirty could be faster Reviewed by: George Wilson Reviewed by: Paul Dagnelie Reviewed by: Justin Gibbs Reviewed by: Richard Elling Approved by: Robert Mustacchi Author: Matthew Ahrens illumos/illumos-gate@0f2e7d03b8f588387cb8dd8dd500cbe5ff4484e0 Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dbuf.c Directory Properties: head/sys/cddl/contrib/opensolaris/ (props changed) Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dbuf.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dbuf.c Wed Oct 14 07:44:19 2015 (r289296) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dbuf.c Wed Oct 14 07:45:44 2015 (r289297) @@ -1115,6 +1115,32 @@ dbuf_release_bp(dmu_buf_impl_t *db) (void) arc_release(db->db_buf, db); } +/* + * We already have a dirty record for this TXG, and we are being + * dirtied again. + */ +static void +dbuf_redirty(dbuf_dirty_record_t *dr) +{ + dmu_buf_impl_t *db = dr->dr_dbuf; + + ASSERT(MUTEX_HELD(&db->db_mtx)); + + if (db->db_level == 0 && db->db_blkid != DMU_BONUS_BLKID) { + /* + * If this buffer has already been written out, + * we now need to reset its state. + */ + dbuf_unoverride(dr); + if (db->db.db_object != DMU_META_DNODE_OBJECT && + db->db_state != DB_NOFILL) { + /* Already released on initial dirty, so just thaw. */ + ASSERT(arc_released(db->db_buf)); + arc_buf_thaw(db->db_buf); + } + } +} + dbuf_dirty_record_t * dbuf_dirty(dmu_buf_impl_t *db, dmu_tx_t *tx) { @@ -1187,16 +1213,7 @@ dbuf_dirty(dmu_buf_impl_t *db, dmu_tx_t if (dr && dr->dr_txg == tx->tx_txg) { DB_DNODE_EXIT(db); - if (db->db_level == 0 && db->db_blkid != DMU_BONUS_BLKID) { - /* - * If this buffer has already been written out, - * we now need to reset its state. - */ - dbuf_unoverride(dr); - if (db->db.db_object != DMU_META_DNODE_OBJECT && - db->db_state != DB_NOFILL) - arc_buf_thaw(db->db_buf); - } + dbuf_redirty(dr); mutex_exit(&db->db_mtx); return (dr); } @@ -1500,6 +1517,30 @@ dmu_buf_will_dirty(dmu_buf_t *db_fake, d ASSERT(tx->tx_txg != 0); ASSERT(!refcount_is_zero(&db->db_holds)); + /* + * Quick check for dirtyness. For already dirty blocks, this + * reduces runtime of this function by >90%, and overall performance + * by 50% for some workloads (e.g. file deletion with indirect blocks + * cached). + */ + mutex_enter(&db->db_mtx); + dbuf_dirty_record_t *dr; + for (dr = db->db_last_dirty; + dr != NULL && dr->dr_txg >= tx->tx_txg; dr = dr->dr_next) { + /* + * It's possible that it is already dirty but not cached, + * because there are some calls to dbuf_dirty() that don't + * go through dmu_buf_will_dirty(). + */ + if (dr->dr_txg == tx->tx_txg && db->db_state == DB_CACHED) { + /* This dbuf is already dirty and cached. */ + dbuf_redirty(dr); + mutex_exit(&db->db_mtx); + return; + } + } + mutex_exit(&db->db_mtx); + DB_DNODE_ENTER(db); if (RW_WRITE_HELD(&DB_DNODE(db)->dn_struct_rwlock)) rf |= DB_RF_HAVESTRUCT; From owner-svn-src-all@freebsd.org Wed Oct 14 07:48:41 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 39AD0A1322F; Wed, 14 Oct 2015 07:48:41 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 002812FB; Wed, 14 Oct 2015 07:48:40 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t9E7mdlC059078; Wed, 14 Oct 2015 07:48:39 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9E7mdOU059077; Wed, 14 Oct 2015 07:48:39 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201510140748.t9E7mdOU059077@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Wed, 14 Oct 2015 07:48:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r289298 - vendor-sys/illumos/dist/uts/common/fs/zfs X-SVN-Group: vendor-sys MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Oct 2015 07:48:41 -0000 Author: mav Date: Wed Oct 14 07:48:39 2015 New Revision: 289298 URL: https://svnweb.freebsd.org/changeset/base/289298 Log: 6286 ZFS internal error when set large block on bootfs Reviewed by: Paul Dagnelie Reviewed by: George Wilson Reviewed by: Andriy Gapon Approved by: Robert Mustacchi Author: Matthew Ahrens illumos/illumos-gate@6de9bb5603e65b16816b7ab29e39bac820e2da2b Modified: vendor-sys/illumos/dist/uts/common/fs/zfs/zfs_ioctl.c Modified: vendor-sys/illumos/dist/uts/common/fs/zfs/zfs_ioctl.c ============================================================================== --- vendor-sys/illumos/dist/uts/common/fs/zfs/zfs_ioctl.c Wed Oct 14 07:45:44 2015 (r289297) +++ vendor-sys/illumos/dist/uts/common/fs/zfs/zfs_ioctl.c Wed Oct 14 07:48:39 2015 (r289298) @@ -24,7 +24,7 @@ * Portions Copyright 2011 Martin Matuska * Copyright 2015 Nexenta Systems, Inc. All rights reserved. * Copyright (c) 2014, Joyent, Inc. All rights reserved. - * Copyright (c) 2011, 2014 by Delphix. All rights reserved. + * Copyright (c) 2011, 2015 by Delphix. All rights reserved. * Copyright (c) 2013 by Saso Kiselkov. All rights reserved. * Copyright (c) 2013 Steven Hartland. All rights reserved. */ @@ -3835,7 +3835,7 @@ zfs_check_settable(const char *dsname, n */ if (zfs_is_bootfs(dsname) && intval > SPA_OLD_MAXBLOCKSIZE) { - return (SET_ERROR(EDOM)); + return (SET_ERROR(ERANGE)); } /* @@ -3844,7 +3844,7 @@ zfs_check_settable(const char *dsname, n */ if (intval > zfs_max_recordsize || intval > SPA_MAXBLOCKSIZE) - return (SET_ERROR(EDOM)); + return (SET_ERROR(ERANGE)); if ((err = spa_open(dsname, &spa, FTAG)) != 0) return (err); From owner-svn-src-all@freebsd.org Wed Oct 14 07:50:09 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A1DFBA13435; Wed, 14 Oct 2015 07:50:09 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 50AC084C; Wed, 14 Oct 2015 07:50:09 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t9E7o88r059338; Wed, 14 Oct 2015 07:50:08 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9E7o8f4059337; Wed, 14 Oct 2015 07:50:08 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201510140750.t9E7o8f4059337@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Wed, 14 Oct 2015 07:50:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289299 - 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 " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Oct 2015 07:50:09 -0000 Author: mav Date: Wed Oct 14 07:50:08 2015 New Revision: 289299 URL: https://svnweb.freebsd.org/changeset/base/289299 Log: MFV r289298: 6286 ZFS internal error when set large block on bootfs Reviewed by: Paul Dagnelie Reviewed by: George Wilson Reviewed by: Andriy Gapon Approved by: Robert Mustacchi Author: Matthew Ahrens illumos/illumos-gate@6de9bb5603e65b16816b7ab29e39bac820e2da2b Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c Directory Properties: head/sys/cddl/contrib/opensolaris/ (props changed) 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 Wed Oct 14 07:48:39 2015 (r289298) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c Wed Oct 14 07:50:08 2015 (r289299) @@ -27,7 +27,7 @@ * Copyright 2014 Xin Li . All rights reserved. * Copyright 2015 Nexenta Systems, Inc. All rights reserved. * Copyright (c) 2014, Joyent, Inc. All rights reserved. - * Copyright (c) 2011, 2014 by Delphix. All rights reserved. + * Copyright (c) 2011, 2015 by Delphix. All rights reserved. * Copyright (c) 2013 by Saso Kiselkov. All rights reserved. * Copyright (c) 2013 Steven Hartland. All rights reserved. */ @@ -3921,7 +3921,7 @@ zfs_check_settable(const char *dsname, n */ if (zfs_is_bootfs(dsname) && intval > SPA_OLD_MAXBLOCKSIZE) { - return (SET_ERROR(EDOM)); + return (SET_ERROR(ERANGE)); } /* @@ -3930,7 +3930,7 @@ zfs_check_settable(const char *dsname, n */ if (intval > zfs_max_recordsize || intval > SPA_MAXBLOCKSIZE) - return (SET_ERROR(EDOM)); + return (SET_ERROR(ERANGE)); if ((err = spa_open(dsname, &spa, FTAG)) != 0) return (err); From owner-svn-src-all@freebsd.org Wed Oct 14 08:16:17 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2C98EA142B8; Wed, 14 Oct 2015 08:16:17 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D53B91453; Wed, 14 Oct 2015 08:16:16 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t9E8GG38067893; Wed, 14 Oct 2015 08:16:16 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9E8GFcO067890; Wed, 14 Oct 2015 08:16:15 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201510140816.t9E8GFcO067890@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Wed, 14 Oct 2015 08:16:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289300 - in head: etc/mtree tests/sys tests/sys/vfs tools/regression/vfs X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Oct 2015 08:16:17 -0000 Author: ngie Date: Wed Oct 14 08:16:15 2015 New Revision: 289300 URL: https://svnweb.freebsd.org/changeset/base/289300 Log: Integrate tools/regression/vfs into the FreeBSD test suite as tests/sys/vfs MFC after: 1 week Sponsored by: EMC / Isilon Storage Division Added: head/tests/sys/vfs/ - copied from r289224, user/ngie/more-tests2/tests/sys/vfs/ head/tests/sys/vfs/Makefile - copied unchanged from r289230, user/ngie/more-tests2/tests/sys/vfs/Makefile Deleted: head/tools/regression/vfs/ Modified: head/etc/mtree/BSD.tests.dist head/tests/sys/Makefile Directory Properties: head/ (props changed) Modified: head/etc/mtree/BSD.tests.dist ============================================================================== --- head/etc/mtree/BSD.tests.dist Wed Oct 14 07:50:08 2015 (r289299) +++ head/etc/mtree/BSD.tests.dist Wed Oct 14 08:16:15 2015 (r289300) @@ -410,6 +410,8 @@ unlink .. .. + vfs + .. vm .. .. Modified: head/tests/sys/Makefile ============================================================================== --- head/tests/sys/Makefile Wed Oct 14 07:50:08 2015 (r289299) +++ head/tests/sys/Makefile Wed Oct 14 08:16:15 2015 (r289300) @@ -12,6 +12,7 @@ TESTS_SUBDIRS+= kqueue TESTS_SUBDIRS+= mqueue TESTS_SUBDIRS+= netinet TESTS_SUBDIRS+= opencrypto +TESTS_SUBDIRS+= vfs TESTS_SUBDIRS+= vm # Items not integrated into kyua runs by default Copied: head/tests/sys/vfs/Makefile (from r289230, user/ngie/more-tests2/tests/sys/vfs/Makefile) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tests/sys/vfs/Makefile Wed Oct 14 08:16:15 2015 (r289300, copy of r289230, user/ngie/more-tests2/tests/sys/vfs/Makefile) @@ -0,0 +1,7 @@ +# $FreeBSD$ + +TESTSDIR= ${TESTSBASE}/sys/vfs + +PLAIN_TESTS_SH+= trailing_slash + +.include From owner-svn-src-all@freebsd.org Wed Oct 14 09:03:33 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5AD5DA0E442; Wed, 14 Oct 2015 09:03:33 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2892D1369; Wed, 14 Oct 2015 09:03:33 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t9E93WAk082439; Wed, 14 Oct 2015 09:03:32 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9E93WWU082438; Wed, 14 Oct 2015 09:03:32 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201510140903.t9E93WWU082438@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Wed, 14 Oct 2015 09:03:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289302 - head/sys/vm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Oct 2015 09:03:33 -0000 Author: kib Date: Wed Oct 14 09:03:32 2015 New Revision: 289302 URL: https://svnweb.freebsd.org/changeset/base/289302 Log: Invalid pages should not appear on the inactive queue. Change the check into an assertion. Reviewed by: alc Tested by: pho Sponsored by: The FreeBSD Foundation Modified: head/sys/vm/vm_pageout.c Modified: head/sys/vm/vm_pageout.c ============================================================================== --- head/sys/vm/vm_pageout.c Wed Oct 14 08:21:38 2015 (r289301) +++ head/sys/vm/vm_pageout.c Wed Oct 14 09:03:32 2015 (r289302) @@ -1174,11 +1174,12 @@ unlock_page: queues_locked = FALSE; /* - * Invalid pages can be easily freed. They cannot be - * mapped, vm_page_free() asserts this. + * Invalid pages cannot appear on a queue. If + * vm_pageout_fallback_object_lock() allowed a window + * where the page could be invalidated, it should + * detect this. */ - if (m->valid == 0) - goto free_page; + KASSERT(m->valid != 0, ("Invalid page %p on inact queue", m)); /* * If the page has been referenced and the object is not dead, @@ -1231,7 +1232,6 @@ unlock_page: /* * Clean pages can be freed. */ -free_page: vm_page_free(m); PCPU_INC(cnt.v_dfree); --page_shortage; From owner-svn-src-all@freebsd.org Wed Oct 14 10:21:22 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8078FA1228D; Wed, 14 Oct 2015 10:21:22 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 49AF015F6; Wed, 14 Oct 2015 10:21:22 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t9EALLLk005602; Wed, 14 Oct 2015 10:21:21 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9EALLCh005601; Wed, 14 Oct 2015 10:21:21 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201510141021.t9EALLCh005601@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Wed, 14 Oct 2015 10:21:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r289304 - vendor-sys/illumos/dist/uts/common/fs/zfs X-SVN-Group: vendor-sys MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Oct 2015 10:21:22 -0000 Author: mav Date: Wed Oct 14 10:21:21 2015 New Revision: 289304 URL: https://svnweb.freebsd.org/changeset/base/289304 Log: 6293 ztest failure: error == 28 (0xc == 0x1c) in ztest_tx_assign() Reviewed by: George Wilson Reviewed by: Prakash Surya Reviewed by: Richard Elling Approved by: Richard Lowe Author: Matthew Ahrens illumos/illumos-gate@8fe00bfb8790ad51653f67b01d5ac14256cbb404 Modified: vendor-sys/illumos/dist/uts/common/fs/zfs/arc.c Modified: vendor-sys/illumos/dist/uts/common/fs/zfs/arc.c ============================================================================== --- vendor-sys/illumos/dist/uts/common/fs/zfs/arc.c Wed Oct 14 10:01:08 2015 (r289303) +++ vendor-sys/illumos/dist/uts/common/fs/zfs/arc.c Wed Oct 14 10:21:21 2015 (r289304) @@ -5021,6 +5021,16 @@ arc_init(void) arc_c_max = MAX(allmem * 3 / 4, arc_c_max); /* + * In userland, there's only the memory pressure that we artificially + * create (see arc_available_memory()). Don't let arc_c get too + * small, because it can cause transactions to be larger than + * arc_c, causing arc_tempreserve_space() to fail. + */ +#ifndef _KERNEL + arc_c_min = arc_c_max / 2; +#endif + + /* * Allow the tunables to override our calculations if they are * reasonable (ie. over 64MB) */ From owner-svn-src-all@freebsd.org Wed Oct 14 10:28:30 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 532FFA12440; Wed, 14 Oct 2015 10:28:30 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 226181C50; Wed, 14 Oct 2015 10:28:30 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t9EASTuT005887; Wed, 14 Oct 2015 10:28:29 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9EASTM1005886; Wed, 14 Oct 2015 10:28:29 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201510141028.t9EASTM1005886@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Wed, 14 Oct 2015 10:28:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289305 - 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 " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Oct 2015 10:28:30 -0000 Author: mav Date: Wed Oct 14 10:28:29 2015 New Revision: 289305 URL: https://svnweb.freebsd.org/changeset/base/289305 Log: MFV r289304: 6293 ztest failure: error == 28 (0xc == 0x1c) in ztest_tx_assign() Reviewed by: George Wilson Reviewed by: Prakash Surya Reviewed by: Richard Elling Approved by: Richard Lowe Author: Matthew Ahrens illumos/illumos-gate@8fe00bfb8790ad51653f67b01d5ac14256cbb404 Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c Directory Properties: head/sys/cddl/contrib/opensolaris/ (props changed) Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c Wed Oct 14 10:21:21 2015 (r289304) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c Wed Oct 14 10:28:29 2015 (r289305) @@ -5295,6 +5295,16 @@ arc_init(void) arc_c_max = arc_c_min; arc_c_max = MAX(arc_c * 5, arc_c_max); + /* + * In userland, there's only the memory pressure that we artificially + * create (see arc_available_memory()). Don't let arc_c get too + * small, because it can cause transactions to be larger than + * arc_c, causing arc_tempreserve_space() to fail. + */ +#ifndef _KERNEL + arc_c_min = arc_c_max / 2; +#endif + #ifdef _KERNEL /* * Allow the tunables to override our calculations if they are From owner-svn-src-all@freebsd.org Wed Oct 14 10:30:26 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 705D7A12535; Wed, 14 Oct 2015 10:30:26 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1F7D01E20; Wed, 14 Oct 2015 10:30:26 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t9EAUPWH006007; Wed, 14 Oct 2015 10:30:25 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9EAUPPa006006; Wed, 14 Oct 2015 10:30:25 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201510141030.t9EAUPPa006006@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Wed, 14 Oct 2015 10:30:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r289306 - vendor-sys/illumos/dist/uts/common/fs/zfs X-SVN-Group: vendor-sys MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Oct 2015 10:30:26 -0000 Author: mav Date: Wed Oct 14 10:30:24 2015 New Revision: 289306 URL: https://svnweb.freebsd.org/changeset/base/289306 Log: 6295 metaslab_condense's dbgmsg should include vdev id Reviewed by: George Wilson Reviewed by: Matthew Ahrens Reviewed by: Andriy Gapon Reviewed by: Xin Li Reviewed by: Justin Gibbs Approved by: Richard Lowe Author: Joe Stein illumos/illumos-gate@daec38ecb4fb5e73e4ca9e99be84f6b8c50c02fa Modified: vendor-sys/illumos/dist/uts/common/fs/zfs/metaslab.c Modified: vendor-sys/illumos/dist/uts/common/fs/zfs/metaslab.c ============================================================================== --- vendor-sys/illumos/dist/uts/common/fs/zfs/metaslab.c Wed Oct 14 10:28:29 2015 (r289305) +++ vendor-sys/illumos/dist/uts/common/fs/zfs/metaslab.c Wed Oct 14 10:30:24 2015 (r289306) @@ -20,7 +20,7 @@ */ /* * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. - * Copyright (c) 2011, 2014 by Delphix. All rights reserved. + * Copyright (c) 2011, 2015 by Delphix. All rights reserved. * Copyright (c) 2013 by Saso Kiselkov. All rights reserved. */ @@ -1705,10 +1705,11 @@ metaslab_condense(metaslab_t *msp, uint6 ASSERT(msp->ms_loaded); - spa_dbgmsg(spa, "condensing: txg %llu, msp[%llu] %p, " - "smp size %llu, segments %lu, forcing condense=%s", txg, - msp->ms_id, msp, space_map_length(msp->ms_sm), - avl_numnodes(&msp->ms_tree->rt_root), + spa_dbgmsg(spa, "condensing: txg %llu, msp[%llu] %p, vdev id %llu, " + "spa %s, smp size %llu, segments %lu, forcing condense=%s", txg, + msp->ms_id, msp, msp->ms_group->mg_vd->vdev_id, + msp->ms_group->mg_vd->vdev_spa->spa_name, + space_map_length(msp->ms_sm), avl_numnodes(&msp->ms_tree->rt_root), msp->ms_condense_wanted ? "TRUE" : "FALSE"); msp->ms_condense_wanted = B_FALSE; From owner-svn-src-all@freebsd.org Wed Oct 14 10:31:52 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0A548A1271E; Wed, 14 Oct 2015 10:31:52 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id AFAC21076; Wed, 14 Oct 2015 10:31:51 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t9EAVoFx006711; Wed, 14 Oct 2015 10:31:50 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9EAVoOi006710; Wed, 14 Oct 2015 10:31:50 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201510141031.t9EAVoOi006710@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Wed, 14 Oct 2015 10:31:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289307 - 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 " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Oct 2015 10:31:52 -0000 Author: mav Date: Wed Oct 14 10:31:50 2015 New Revision: 289307 URL: https://svnweb.freebsd.org/changeset/base/289307 Log: MFV r289306: 6295 metaslab_condense's dbgmsg should include vdev id Reviewed by: George Wilson Reviewed by: Matthew Ahrens Reviewed by: Andriy Gapon Reviewed by: Xin Li Reviewed by: Justin Gibbs Approved by: Richard Lowe Author: Joe Stein illumos/illumos-gate@daec38ecb4fb5e73e4ca9e99be84f6b8c50c02fa Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/metaslab.c Directory Properties: head/sys/cddl/contrib/opensolaris/ (props changed) Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/metaslab.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/metaslab.c Wed Oct 14 10:30:24 2015 (r289306) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/metaslab.c Wed Oct 14 10:31:50 2015 (r289307) @@ -20,7 +20,7 @@ */ /* * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. - * Copyright (c) 2011, 2014 by Delphix. All rights reserved. + * Copyright (c) 2011, 2015 by Delphix. All rights reserved. * Copyright (c) 2013 by Saso Kiselkov. All rights reserved. */ @@ -1794,10 +1794,11 @@ metaslab_condense(metaslab_t *msp, uint6 ASSERT(msp->ms_loaded); - spa_dbgmsg(spa, "condensing: txg %llu, msp[%llu] %p, " - "smp size %llu, segments %lu, forcing condense=%s", txg, - msp->ms_id, msp, space_map_length(msp->ms_sm), - avl_numnodes(&msp->ms_tree->rt_root), + spa_dbgmsg(spa, "condensing: txg %llu, msp[%llu] %p, vdev id %llu, " + "spa %s, smp size %llu, segments %lu, forcing condense=%s", txg, + msp->ms_id, msp, msp->ms_group->mg_vd->vdev_id, + msp->ms_group->mg_vd->vdev_spa->spa_name, + space_map_length(msp->ms_sm), avl_numnodes(&msp->ms_tree->rt_root), msp->ms_condense_wanted ? "TRUE" : "FALSE"); msp->ms_condense_wanted = B_FALSE; From owner-svn-src-all@freebsd.org Wed Oct 14 10:36:45 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 55128A127F6; Wed, 14 Oct 2015 10:36:45 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 15F66134D; Wed, 14 Oct 2015 10:36:45 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t9EAaiJU008848; Wed, 14 Oct 2015 10:36:44 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9EAahSw008843; Wed, 14 Oct 2015 10:36:43 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201510141036.t9EAahSw008843@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Wed, 14 Oct 2015 10:36:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r289308 - in vendor-sys/illumos/dist/uts/common/fs/zfs: . sys X-SVN-Group: vendor-sys MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Oct 2015 10:36:45 -0000 Author: mav Date: Wed Oct 14 10:36:43 2015 New Revision: 289308 URL: https://svnweb.freebsd.org/changeset/base/289308 Log: 6267 dn_bonus evicted too early Reviewed by: Richard Yao Reviewed by: Xin LI Reviewed by: Matthew Ahrens Approved by: Richard Lowe Author: Justin T. Gibbs illumos/illumos-gate@d2058105c61ec61df3a2dd3f839fed8c3fe7bfd6 Modified: vendor-sys/illumos/dist/uts/common/fs/zfs/dbuf.c vendor-sys/illumos/dist/uts/common/fs/zfs/dmu_objset.c vendor-sys/illumos/dist/uts/common/fs/zfs/dnode_sync.c vendor-sys/illumos/dist/uts/common/fs/zfs/sys/dbuf.h vendor-sys/illumos/dist/uts/common/fs/zfs/sys/dmu_objset.h Modified: vendor-sys/illumos/dist/uts/common/fs/zfs/dbuf.c ============================================================================== --- vendor-sys/illumos/dist/uts/common/fs/zfs/dbuf.c Wed Oct 14 10:31:50 2015 (r289307) +++ vendor-sys/illumos/dist/uts/common/fs/zfs/dbuf.c Wed Oct 14 10:36:43 2015 (r289308) @@ -272,7 +272,7 @@ dbuf_verify_user(dmu_buf_impl_t *db, dbv */ ASSERT3U(holds, >=, db->db_dirtycnt); } else { - if (db->db_immediate_evict == TRUE) + if (db->db_user_immediate_evict == TRUE) ASSERT3U(holds, >=, db->db_dirtycnt); else ASSERT3U(holds, >, 0); @@ -1875,8 +1875,9 @@ dbuf_create(dnode_t *dn, uint8_t level, db->db_blkptr = blkptr; db->db_user = NULL; - db->db_immediate_evict = 0; - db->db_freed_in_flight = 0; + db->db_user_immediate_evict = FALSE; + db->db_freed_in_flight = FALSE; + db->db_pending_evict = FALSE; if (blkid == DMU_BONUS_BLKID) { ASSERT3P(parent, ==, dn->dn_dbuf); @@ -2432,12 +2433,13 @@ dbuf_rele_and_unlock(dmu_buf_impl_t *db, arc_buf_freeze(db->db_buf); if (holds == db->db_dirtycnt && - db->db_level == 0 && db->db_immediate_evict) + db->db_level == 0 && db->db_user_immediate_evict) dbuf_evict_user(db); if (holds == 0) { if (db->db_blkid == DMU_BONUS_BLKID) { dnode_t *dn; + boolean_t evict_dbuf = db->db_pending_evict; /* * If the dnode moves here, we cannot cross this @@ -2452,7 +2454,7 @@ dbuf_rele_and_unlock(dmu_buf_impl_t *db, * Decrementing the dbuf count means that the bonus * buffer's dnode hold is no longer discounted in * dnode_move(). The dnode cannot move until after - * the dnode_rele_and_unlock() below. + * the dnode_rele() below. */ DB_DNODE_EXIT(db); @@ -2462,35 +2464,10 @@ dbuf_rele_and_unlock(dmu_buf_impl_t *db, */ mutex_exit(&db->db_mtx); - /* - * If the dnode has been freed, evict the bonus - * buffer immediately. The data in the bonus - * buffer is no longer relevant and this prevents - * a stale bonus buffer from being associated - * with this dnode_t should the dnode_t be reused - * prior to being destroyed. - */ - mutex_enter(&dn->dn_mtx); - if (dn->dn_type == DMU_OT_NONE || - dn->dn_free_txg != 0) { - /* - * Drop dn_mtx. It is a leaf lock and - * cannot be held when dnode_evict_bonus() - * acquires other locks in order to - * perform the eviction. - * - * Freed dnodes cannot be reused until the - * last hold is released. Since this bonus - * buffer has a hold, the dnode will remain - * in the free state, even without dn_mtx - * held, until the dnode_rele_and_unlock() - * below. - */ - mutex_exit(&dn->dn_mtx); + if (evict_dbuf) dnode_evict_bonus(dn); - mutex_enter(&dn->dn_mtx); - } - dnode_rele_and_unlock(dn, db); + + dnode_rele(dn, db); } else if (db->db_buf == NULL) { /* * This is a special case: we never associated this @@ -2537,7 +2514,7 @@ dbuf_rele_and_unlock(dmu_buf_impl_t *db, } else { dbuf_clear(db); } - } else if (db->db_objset->os_evicting || + } else if (db->db_pending_evict || arc_buf_eviction_needed(db->db_buf)) { dbuf_clear(db); } else { @@ -2585,7 +2562,7 @@ dmu_buf_set_user_ie(dmu_buf_t *db_fake, { dmu_buf_impl_t *db = (dmu_buf_impl_t *)db_fake; - db->db_immediate_evict = TRUE; + db->db_user_immediate_evict = TRUE; return (dmu_buf_set_user(db_fake, user)); } Modified: vendor-sys/illumos/dist/uts/common/fs/zfs/dmu_objset.c ============================================================================== --- vendor-sys/illumos/dist/uts/common/fs/zfs/dmu_objset.c Wed Oct 14 10:31:50 2015 (r289307) +++ vendor-sys/illumos/dist/uts/common/fs/zfs/dmu_objset.c Wed Oct 14 10:36:43 2015 (r289308) @@ -686,7 +686,6 @@ dmu_objset_evict(objset_t *os) if (os->os_sa) sa_tear_down(os); - os->os_evicting = B_TRUE; dmu_objset_evict_dbufs(os); mutex_enter(&os->os_lock); Modified: vendor-sys/illumos/dist/uts/common/fs/zfs/dnode_sync.c ============================================================================== --- vendor-sys/illumos/dist/uts/common/fs/zfs/dnode_sync.c Wed Oct 14 10:31:50 2015 (r289307) +++ vendor-sys/illumos/dist/uts/common/fs/zfs/dnode_sync.c Wed Oct 14 10:36:43 2015 (r289308) @@ -424,6 +424,7 @@ dnode_evict_dbufs(dnode_t *dn) db_next = AVL_NEXT(&dn->dn_dbufs, &db_marker); avl_remove(&dn->dn_dbufs, &db_marker); } else { + db->db_pending_evict = TRUE; mutex_exit(&db->db_mtx); db_next = AVL_NEXT(&dn->dn_dbufs, db); } @@ -437,10 +438,14 @@ void dnode_evict_bonus(dnode_t *dn) { rw_enter(&dn->dn_struct_rwlock, RW_WRITER); - if (dn->dn_bonus && refcount_is_zero(&dn->dn_bonus->db_holds)) { - mutex_enter(&dn->dn_bonus->db_mtx); - dbuf_evict(dn->dn_bonus); - dn->dn_bonus = NULL; + if (dn->dn_bonus != NULL) { + if (refcount_is_zero(&dn->dn_bonus->db_holds)) { + mutex_enter(&dn->dn_bonus->db_mtx); + dbuf_evict(dn->dn_bonus); + dn->dn_bonus = NULL; + } else { + dn->dn_bonus->db_pending_evict = TRUE; + } } rw_exit(&dn->dn_struct_rwlock); } @@ -492,7 +497,6 @@ dnode_sync_free(dnode_t *dn, dmu_tx_t *t dnode_undirty_dbufs(&dn->dn_dirty_records[txgoff]); dnode_evict_dbufs(dn); - ASSERT(avl_is_empty(&dn->dn_dbufs)); /* * XXX - It would be nice to assert this, but we may still Modified: vendor-sys/illumos/dist/uts/common/fs/zfs/sys/dbuf.h ============================================================================== --- vendor-sys/illumos/dist/uts/common/fs/zfs/sys/dbuf.h Wed Oct 14 10:31:50 2015 (r289307) +++ vendor-sys/illumos/dist/uts/common/fs/zfs/sys/dbuf.h Wed Oct 14 10:36:43 2015 (r289308) @@ -230,9 +230,25 @@ typedef struct dmu_buf_impl { /* User callback information. */ dmu_buf_user_t *db_user; - uint8_t db_immediate_evict; + /* + * Evict user data as soon as the dirty and reference + * counts are equal. + */ + uint8_t db_user_immediate_evict; + + /* + * This block was freed while a read or write was + * active. + */ uint8_t db_freed_in_flight; + /* + * dnode_evict_dbufs() or dnode_evict_bonus() tried to + * evict this dbuf, but couldn't due to outstanding + * references. Evict once the refcount drops to 0. + */ + uint8_t db_pending_evict; + uint8_t db_dirtycnt; } dmu_buf_impl_t; Modified: vendor-sys/illumos/dist/uts/common/fs/zfs/sys/dmu_objset.h ============================================================================== --- vendor-sys/illumos/dist/uts/common/fs/zfs/sys/dmu_objset.h Wed Oct 14 10:31:50 2015 (r289307) +++ vendor-sys/illumos/dist/uts/common/fs/zfs/sys/dmu_objset.h Wed Oct 14 10:36:43 2015 (r289308) @@ -93,7 +93,6 @@ struct objset { uint8_t os_copies; enum zio_checksum os_dedup_checksum; boolean_t os_dedup_verify; - boolean_t os_evicting; zfs_logbias_op_t os_logbias; zfs_cache_type_t os_primary_cache; zfs_cache_type_t os_secondary_cache; From owner-svn-src-all@freebsd.org Wed Oct 14 10:38:07 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9B88EA12867; Wed, 14 Oct 2015 10:38:07 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5A9DC14E3; Wed, 14 Oct 2015 10:38:07 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t9EAc6w6008952; Wed, 14 Oct 2015 10:38:06 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9EAc6in008947; Wed, 14 Oct 2015 10:38:06 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201510141038.t9EAc6in008947@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Wed, 14 Oct 2015 10:38:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289309 - 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 " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Oct 2015 10:38:07 -0000 Author: mav Date: Wed Oct 14 10:38:05 2015 New Revision: 289309 URL: https://svnweb.freebsd.org/changeset/base/289309 Log: MFV r289308: 6267 dn_bonus evicted too early Reviewed by: Richard Yao Reviewed by: Xin LI Reviewed by: Matthew Ahrens Approved by: Richard Lowe Author: Justin T. Gibbs illumos/illumos-gate@d2058105c61ec61df3a2dd3f839fed8c3fe7bfd6 Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dbuf.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_objset.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dnode_sync.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dbuf.h head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dmu_objset.h Directory Properties: head/sys/cddl/contrib/opensolaris/ (props changed) Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dbuf.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dbuf.c Wed Oct 14 10:36:43 2015 (r289308) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dbuf.c Wed Oct 14 10:38:05 2015 (r289309) @@ -272,7 +272,7 @@ dbuf_verify_user(dmu_buf_impl_t *db, dbv */ ASSERT3U(holds, >=, db->db_dirtycnt); } else { - if (db->db_immediate_evict == TRUE) + if (db->db_user_immediate_evict == TRUE) ASSERT3U(holds, >=, db->db_dirtycnt); else ASSERT3U(holds, >, 0); @@ -1875,8 +1875,9 @@ dbuf_create(dnode_t *dn, uint8_t level, db->db_blkptr = blkptr; db->db_user = NULL; - db->db_immediate_evict = 0; - db->db_freed_in_flight = 0; + db->db_user_immediate_evict = FALSE; + db->db_freed_in_flight = FALSE; + db->db_pending_evict = FALSE; if (blkid == DMU_BONUS_BLKID) { ASSERT3P(parent, ==, dn->dn_dbuf); @@ -2432,12 +2433,13 @@ dbuf_rele_and_unlock(dmu_buf_impl_t *db, arc_buf_freeze(db->db_buf); if (holds == db->db_dirtycnt && - db->db_level == 0 && db->db_immediate_evict) + db->db_level == 0 && db->db_user_immediate_evict) dbuf_evict_user(db); if (holds == 0) { if (db->db_blkid == DMU_BONUS_BLKID) { dnode_t *dn; + boolean_t evict_dbuf = db->db_pending_evict; /* * If the dnode moves here, we cannot cross this @@ -2452,7 +2454,7 @@ dbuf_rele_and_unlock(dmu_buf_impl_t *db, * Decrementing the dbuf count means that the bonus * buffer's dnode hold is no longer discounted in * dnode_move(). The dnode cannot move until after - * the dnode_rele_and_unlock() below. + * the dnode_rele() below. */ DB_DNODE_EXIT(db); @@ -2462,35 +2464,10 @@ dbuf_rele_and_unlock(dmu_buf_impl_t *db, */ mutex_exit(&db->db_mtx); - /* - * If the dnode has been freed, evict the bonus - * buffer immediately. The data in the bonus - * buffer is no longer relevant and this prevents - * a stale bonus buffer from being associated - * with this dnode_t should the dnode_t be reused - * prior to being destroyed. - */ - mutex_enter(&dn->dn_mtx); - if (dn->dn_type == DMU_OT_NONE || - dn->dn_free_txg != 0) { - /* - * Drop dn_mtx. It is a leaf lock and - * cannot be held when dnode_evict_bonus() - * acquires other locks in order to - * perform the eviction. - * - * Freed dnodes cannot be reused until the - * last hold is released. Since this bonus - * buffer has a hold, the dnode will remain - * in the free state, even without dn_mtx - * held, until the dnode_rele_and_unlock() - * below. - */ - mutex_exit(&dn->dn_mtx); + if (evict_dbuf) dnode_evict_bonus(dn); - mutex_enter(&dn->dn_mtx); - } - dnode_rele_and_unlock(dn, db); + + dnode_rele(dn, db); } else if (db->db_buf == NULL) { /* * This is a special case: we never associated this @@ -2537,7 +2514,7 @@ dbuf_rele_and_unlock(dmu_buf_impl_t *db, } else { dbuf_clear(db); } - } else if (db->db_objset->os_evicting || + } else if (db->db_pending_evict || arc_buf_eviction_needed(db->db_buf)) { dbuf_clear(db); } else { @@ -2585,7 +2562,7 @@ dmu_buf_set_user_ie(dmu_buf_t *db_fake, { dmu_buf_impl_t *db = (dmu_buf_impl_t *)db_fake; - db->db_immediate_evict = TRUE; + db->db_user_immediate_evict = TRUE; return (dmu_buf_set_user(db_fake, user)); } Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_objset.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_objset.c Wed Oct 14 10:36:43 2015 (r289308) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_objset.c Wed Oct 14 10:38:05 2015 (r289309) @@ -686,7 +686,6 @@ dmu_objset_evict(objset_t *os) if (os->os_sa) sa_tear_down(os); - os->os_evicting = B_TRUE; dmu_objset_evict_dbufs(os); mutex_enter(&os->os_lock); Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dnode_sync.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dnode_sync.c Wed Oct 14 10:36:43 2015 (r289308) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dnode_sync.c Wed Oct 14 10:38:05 2015 (r289309) @@ -424,6 +424,7 @@ dnode_evict_dbufs(dnode_t *dn) db_next = AVL_NEXT(&dn->dn_dbufs, &db_marker); avl_remove(&dn->dn_dbufs, &db_marker); } else { + db->db_pending_evict = TRUE; mutex_exit(&db->db_mtx); db_next = AVL_NEXT(&dn->dn_dbufs, db); } @@ -437,10 +438,14 @@ void dnode_evict_bonus(dnode_t *dn) { rw_enter(&dn->dn_struct_rwlock, RW_WRITER); - if (dn->dn_bonus && refcount_is_zero(&dn->dn_bonus->db_holds)) { - mutex_enter(&dn->dn_bonus->db_mtx); - dbuf_evict(dn->dn_bonus); - dn->dn_bonus = NULL; + if (dn->dn_bonus != NULL) { + if (refcount_is_zero(&dn->dn_bonus->db_holds)) { + mutex_enter(&dn->dn_bonus->db_mtx); + dbuf_evict(dn->dn_bonus); + dn->dn_bonus = NULL; + } else { + dn->dn_bonus->db_pending_evict = TRUE; + } } rw_exit(&dn->dn_struct_rwlock); } @@ -492,7 +497,6 @@ dnode_sync_free(dnode_t *dn, dmu_tx_t *t dnode_undirty_dbufs(&dn->dn_dirty_records[txgoff]); dnode_evict_dbufs(dn); - ASSERT(avl_is_empty(&dn->dn_dbufs)); /* * XXX - It would be nice to assert this, but we may still Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dbuf.h ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dbuf.h Wed Oct 14 10:36:43 2015 (r289308) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dbuf.h Wed Oct 14 10:38:05 2015 (r289309) @@ -230,9 +230,25 @@ typedef struct dmu_buf_impl { /* User callback information. */ dmu_buf_user_t *db_user; - uint8_t db_immediate_evict; + /* + * Evict user data as soon as the dirty and reference + * counts are equal. + */ + uint8_t db_user_immediate_evict; + + /* + * This block was freed while a read or write was + * active. + */ uint8_t db_freed_in_flight; + /* + * dnode_evict_dbufs() or dnode_evict_bonus() tried to + * evict this dbuf, but couldn't due to outstanding + * references. Evict once the refcount drops to 0. + */ + uint8_t db_pending_evict; + uint8_t db_dirtycnt; } dmu_buf_impl_t; Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dmu_objset.h ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dmu_objset.h Wed Oct 14 10:36:43 2015 (r289308) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dmu_objset.h Wed Oct 14 10:38:05 2015 (r289309) @@ -93,7 +93,6 @@ struct objset { uint8_t os_copies; enum zio_checksum os_dedup_checksum; boolean_t os_dedup_verify; - boolean_t os_evicting; zfs_logbias_op_t os_logbias; zfs_cache_type_t os_primary_cache; zfs_cache_type_t os_secondary_cache; From owner-svn-src-all@freebsd.org Wed Oct 14 11:12:50 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5D263A12722; Wed, 14 Oct 2015 11:12:50 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1D340F83; Wed, 14 Oct 2015 11:12:50 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t9EBCnK4022236; Wed, 14 Oct 2015 11:12:49 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9EBCmFZ022230; Wed, 14 Oct 2015 11:12:48 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201510141112.t9EBCmFZ022230@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Wed, 14 Oct 2015 11:12:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r289310 - vendor-sys/illumos/dist/common/zfs vendor-sys/illumos/dist/uts/common vendor-sys/illumos/dist/uts/common/crypto vendor-sys/illumos/dist/uts/common/crypto/io vendor-sys/illumos... 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 " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Oct 2015 11:12:50 -0000 Author: mav Date: Wed Oct 14 11:12:47 2015 New Revision: 289310 URL: https://svnweb.freebsd.org/changeset/base/289310 Log: 4185 add new cryptographic checksums to ZFS: SHA-512, Skein, Edon-R Reviewed by: George Wilson Reviewed by: Prakash Surya Reviewed by: Saso Kiselkov Reviewed by: Richard Lowe Approved by: Garrett D'Amore Author: Matthew Ahrens illumos/illumos-gate@45818ee124adeaaf947698996b4f4c722afc6d1f Added: vendor/illumos/dist/common/crypto/ vendor/illumos/dist/common/crypto/edonr/ vendor/illumos/dist/common/crypto/edonr/edonr.c (contents, props changed) vendor/illumos/dist/common/crypto/edonr/edonr_byteorder.h (contents, props changed) vendor/illumos/dist/common/crypto/skein/ vendor/illumos/dist/common/crypto/skein/THIRDPARTYLICENSE (contents, props changed) vendor/illumos/dist/common/crypto/skein/THIRDPARTYLICENSE.descrip (contents, props changed) vendor/illumos/dist/common/crypto/skein/skein.c (contents, props changed) vendor/illumos/dist/common/crypto/skein/skein_block.c (contents, props changed) vendor/illumos/dist/common/crypto/skein/skein_impl.h (contents, props changed) vendor/illumos/dist/common/crypto/skein/skein_iv.c (contents, props changed) vendor/illumos/dist/common/crypto/skein/skein_port.h (contents, props changed) Modified: vendor/illumos/dist/lib/libzfs/common/libzfs_dataset.c vendor/illumos/dist/man/man5/zpool-features.5 Changes in other areas also in this revision: Added: vendor-sys/illumos/dist/uts/common/crypto/ vendor-sys/illumos/dist/uts/common/crypto/io/ vendor-sys/illumos/dist/uts/common/crypto/io/edonr_mod.c (contents, props changed) vendor-sys/illumos/dist/uts/common/crypto/io/skein_mod.c (contents, props changed) vendor-sys/illumos/dist/uts/common/fs/zfs/edonr_zfs.c (contents, props changed) vendor-sys/illumos/dist/uts/common/fs/zfs/skein_zfs.c (contents, props changed) vendor-sys/illumos/dist/uts/common/sys/edonr.h (contents, props changed) vendor-sys/illumos/dist/uts/common/sys/skein.h (contents, props changed) Modified: vendor-sys/illumos/dist/common/zfs/zfeature_common.c vendor-sys/illumos/dist/common/zfs/zfeature_common.h vendor-sys/illumos/dist/common/zfs/zfs_fletcher.c vendor-sys/illumos/dist/common/zfs/zfs_fletcher.h vendor-sys/illumos/dist/common/zfs/zfs_prop.c vendor-sys/illumos/dist/uts/common/Makefile.files vendor-sys/illumos/dist/uts/common/fs/zfs/arc.c vendor-sys/illumos/dist/uts/common/fs/zfs/ddt.c vendor-sys/illumos/dist/uts/common/fs/zfs/dmu.c vendor-sys/illumos/dist/uts/common/fs/zfs/dmu_send.c vendor-sys/illumos/dist/uts/common/fs/zfs/dsl_dataset.c vendor-sys/illumos/dist/uts/common/fs/zfs/sha256.c vendor-sys/illumos/dist/uts/common/fs/zfs/spa.c vendor-sys/illumos/dist/uts/common/fs/zfs/spa_misc.c vendor-sys/illumos/dist/uts/common/fs/zfs/sys/dmu.h vendor-sys/illumos/dist/uts/common/fs/zfs/sys/spa.h vendor-sys/illumos/dist/uts/common/fs/zfs/sys/spa_impl.h vendor-sys/illumos/dist/uts/common/fs/zfs/sys/zio.h vendor-sys/illumos/dist/uts/common/fs/zfs/sys/zio_checksum.h vendor-sys/illumos/dist/uts/common/fs/zfs/zfs_ioctl.c vendor-sys/illumos/dist/uts/common/fs/zfs/zio.c vendor-sys/illumos/dist/uts/common/fs/zfs/zio_checksum.c vendor-sys/illumos/dist/uts/common/sys/debug.h Added: vendor/illumos/dist/common/crypto/edonr/edonr.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/illumos/dist/common/crypto/edonr/edonr.c Wed Oct 14 11:12:47 2015 (r289310) @@ -0,0 +1,729 @@ +/* + * IDI,NTNU + * + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://opensource.org/licenses/CDDL-1.0. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + * + * Copyright (C) 2009, 2010, Jorn Amundsen + * Tweaked Edon-R implementation for SUPERCOP, based on NIST API. + * + * $Id: edonr.c 517 2013-02-17 20:34:39Z joern $ + */ +/* + * Portions copyright (c) 2013, Saso Kiselkov, All rights reserved + */ + +/* determine where we can get bcopy/bzero declarations */ +#ifdef _KERNEL +#include +#else +#include +#endif +#include +#include + +/* big endian support, provides no-op's if run on little endian hosts */ +#include "edonr_byteorder.h" + +#define hashState224(x) ((x)->pipe->p256) +#define hashState256(x) ((x)->pipe->p256) +#define hashState384(x) ((x)->pipe->p512) +#define hashState512(x) ((x)->pipe->p512) + +/* shift and rotate shortcuts */ +#define shl(x, n) ((x) << n) +#define shr(x, n) ((x) >> n) + +#define rotl32(x, n) (((x) << (n)) | ((x) >> (32 - (n)))) +#define rotr32(x, n) (((x) >> (n)) | ((x) << (32 - (n)))) + +#define rotl64(x, n) (((x) << (n)) | ((x) >> (64 - (n)))) +#define rotr64(x, n) (((x) >> (n)) | ((x) << (64 - (n)))) + +#if !defined(__C99_RESTRICT) +#define restrict /* restrict */ +#endif + +#define EDONR_VALID_HASHBITLEN(x) \ + ((x) == 512 || (x) == 384 || (x) == 256 || (x) == 224) + +/* EdonR224 initial double chaining pipe */ +static const uint32_t i224p2[16] = { + 0x00010203ul, 0x04050607ul, 0x08090a0bul, 0x0c0d0e0ful, + 0x10111213ul, 0x14151617ul, 0x18191a1bul, 0x1c1d1e1ful, + 0x20212223ul, 0x24252627ul, 0x28292a2bul, 0x2c2d2e2ful, + 0x30313233ul, 0x34353637ul, 0x38393a3bul, 0x3c3d3e3ful, +}; + +/* EdonR256 initial double chaining pipe */ +static const uint32_t i256p2[16] = { + 0x40414243ul, 0x44454647ul, 0x48494a4bul, 0x4c4d4e4ful, + 0x50515253ul, 0x54555657ul, 0x58595a5bul, 0x5c5d5e5ful, + 0x60616263ul, 0x64656667ul, 0x68696a6bul, 0x6c6d6e6ful, + 0x70717273ul, 0x74757677ul, 0x78797a7bul, 0x7c7d7e7ful, +}; + +/* EdonR384 initial double chaining pipe */ +static const uint64_t i384p2[16] = { + 0x0001020304050607ull, 0x08090a0b0c0d0e0full, + 0x1011121314151617ull, 0x18191a1b1c1d1e1full, + 0x2021222324252627ull, 0x28292a2b2c2d2e2full, + 0x3031323334353637ull, 0x38393a3b3c3d3e3full, + 0x4041424344454647ull, 0x48494a4b4c4d4e4full, + 0x5051525354555657ull, 0x58595a5b5c5d5e5full, + 0x6061626364656667ull, 0x68696a6b6c6d6e6full, + 0x7071727374757677ull, 0x78797a7b7c7d7e7full +}; + +/* EdonR512 initial double chaining pipe */ +static const uint64_t i512p2[16] = { + 0x8081828384858687ull, 0x88898a8b8c8d8e8full, + 0x9091929394959697ull, 0x98999a9b9c9d9e9full, + 0xa0a1a2a3a4a5a6a7ull, 0xa8a9aaabacadaeafull, + 0xb0b1b2b3b4b5b6b7ull, 0xb8b9babbbcbdbebfull, + 0xc0c1c2c3c4c5c6c7ull, 0xc8c9cacbcccdcecfull, + 0xd0d1d2d3d4d5d6d7ull, 0xd8d9dadbdcdddedfull, + 0xe0e1e2e3e4e5e6e7ull, 0xe8e9eaebecedeeefull, + 0xf0f1f2f3f4f5f6f7ull, 0xf8f9fafbfcfdfeffull +}; + +/* + * First Latin Square + * 0 7 1 3 2 4 6 5 + * 4 1 7 6 3 0 5 2 + * 7 0 4 2 5 3 1 6 + * 1 4 0 5 6 2 7 3 + * 2 3 6 7 1 5 0 4 + * 5 2 3 1 7 6 4 0 + * 3 6 5 0 4 7 2 1 + * 6 5 2 4 0 1 3 7 + */ +#define LS1_256(c, x0, x1, x2, x3, x4, x5, x6, x7) \ +{ \ + uint32_t x04, x17, x23, x56, x07, x26; \ + x04 = x0+x4, x17 = x1+x7, x07 = x04+x17; \ + s0 = c + x07 + x2; \ + s1 = rotl32(x07 + x3, 4); \ + s2 = rotl32(x07 + x6, 8); \ + x23 = x2 + x3; \ + s5 = rotl32(x04 + x23 + x5, 22); \ + x56 = x5 + x6; \ + s6 = rotl32(x17 + x56 + x0, 24); \ + x26 = x23+x56; \ + s3 = rotl32(x26 + x7, 13); \ + s4 = rotl32(x26 + x1, 17); \ + s7 = rotl32(x26 + x4, 29); \ +} + +#define LS1_512(c, x0, x1, x2, x3, x4, x5, x6, x7) \ +{ \ + uint64_t x04, x17, x23, x56, x07, x26; \ + x04 = x0+x4, x17 = x1+x7, x07 = x04+x17; \ + s0 = c + x07 + x2; \ + s1 = rotl64(x07 + x3, 5); \ + s2 = rotl64(x07 + x6, 15); \ + x23 = x2 + x3; \ + s5 = rotl64(x04 + x23 + x5, 40); \ + x56 = x5 + x6; \ + s6 = rotl64(x17 + x56 + x0, 50); \ + x26 = x23+x56; \ + s3 = rotl64(x26 + x7, 22); \ + s4 = rotl64(x26 + x1, 31); \ + s7 = rotl64(x26 + x4, 59); \ +} + +/* + * Second Orthogonal Latin Square + * 0 4 2 3 1 6 5 7 + * 7 6 3 2 5 4 1 0 + * 5 3 1 6 0 2 7 4 + * 1 0 5 4 3 7 2 6 + * 2 1 0 7 4 5 6 3 + * 3 5 7 0 6 1 4 2 + * 4 7 6 1 2 0 3 5 + * 6 2 4 5 7 3 0 1 + */ +#define LS2_256(c, y0, y1, y2, y3, y4, y5, y6, y7) \ +{ \ + uint32_t y01, y25, y34, y67, y04, y05, y27, y37; \ + y01 = y0+y1, y25 = y2+y5, y05 = y01+y25; \ + t0 = ~c + y05 + y7; \ + t2 = rotl32(y05 + y3, 9); \ + y34 = y3+y4, y04 = y01+y34; \ + t1 = rotl32(y04 + y6, 5); \ + t4 = rotl32(y04 + y5, 15); \ + y67 = y6+y7, y37 = y34+y67; \ + t3 = rotl32(y37 + y2, 11); \ + t7 = rotl32(y37 + y0, 27); \ + y27 = y25+y67; \ + t5 = rotl32(y27 + y4, 20); \ + t6 = rotl32(y27 + y1, 25); \ +} + +#define LS2_512(c, y0, y1, y2, y3, y4, y5, y6, y7) \ +{ \ + uint64_t y01, y25, y34, y67, y04, y05, y27, y37; \ + y01 = y0+y1, y25 = y2+y5, y05 = y01+y25; \ + t0 = ~c + y05 + y7; \ + t2 = rotl64(y05 + y3, 19); \ + y34 = y3+y4, y04 = y01+y34; \ + t1 = rotl64(y04 + y6, 10); \ + t4 = rotl64(y04 + y5, 36); \ + y67 = y6+y7, y37 = y34+y67; \ + t3 = rotl64(y37 + y2, 29); \ + t7 = rotl64(y37 + y0, 55); \ + y27 = y25+y67; \ + t5 = rotl64(y27 + y4, 44); \ + t6 = rotl64(y27 + y1, 48); \ +} + +#define quasi_exform256(r0, r1, r2, r3, r4, r5, r6, r7) \ +{ \ + uint32_t s04, s17, s23, s56, t01, t25, t34, t67; \ + s04 = s0 ^ s4, t01 = t0 ^ t1; \ + r0 = (s04 ^ s1) + (t01 ^ t5); \ + t67 = t6 ^ t7; \ + r1 = (s04 ^ s7) + (t2 ^ t67); \ + s23 = s2 ^ s3; \ + r7 = (s23 ^ s5) + (t4 ^ t67); \ + t34 = t3 ^ t4; \ + r3 = (s23 ^ s4) + (t0 ^ t34); \ + s56 = s5 ^ s6; \ + r5 = (s3 ^ s56) + (t34 ^ t6); \ + t25 = t2 ^ t5; \ + r6 = (s2 ^ s56) + (t25 ^ t7); \ + s17 = s1 ^ s7; \ + r4 = (s0 ^ s17) + (t1 ^ t25); \ + r2 = (s17 ^ s6) + (t01 ^ t3); \ +} + +#define quasi_exform512(r0, r1, r2, r3, r4, r5, r6, r7) \ +{ \ + uint64_t s04, s17, s23, s56, t01, t25, t34, t67; \ + s04 = s0 ^ s4, t01 = t0 ^ t1; \ + r0 = (s04 ^ s1) + (t01 ^ t5); \ + t67 = t6 ^ t7; \ + r1 = (s04 ^ s7) + (t2 ^ t67); \ + s23 = s2 ^ s3; \ + r7 = (s23 ^ s5) + (t4 ^ t67); \ + t34 = t3 ^ t4; \ + r3 = (s23 ^ s4) + (t0 ^ t34); \ + s56 = s5 ^ s6; \ + r5 = (s3 ^ s56) + (t34 ^ t6); \ + t25 = t2 ^ t5; \ + r6 = (s2 ^ s56) + (t25 ^ t7); \ + s17 = s1 ^ s7; \ + r4 = (s0 ^ s17) + (t1 ^ t25); \ + r2 = (s17 ^ s6) + (t01 ^ t3); \ +} + +static size_t +Q256(size_t bitlen, const uint32_t *data, uint32_t *restrict p) +{ + size_t bl; + + for (bl = bitlen; bl >= EdonR256_BLOCK_BITSIZE; + bl -= EdonR256_BLOCK_BITSIZE, data += 16) { + uint32_t s0, s1, s2, s3, s4, s5, s6, s7, t0, t1, t2, t3, t4, + t5, t6, t7; + uint32_t p0, p1, p2, p3, p4, p5, p6, p7, q0, q1, q2, q3, q4, + q5, q6, q7; + const uint32_t defix = 0xaaaaaaaa; +#if defined(MACHINE_IS_BIG_ENDIAN) + uint32_t swp0, swp1, swp2, swp3, swp4, swp5, swp6, swp7, swp8, + swp9, swp10, swp11, swp12, swp13, swp14, swp15; +#define d(j) swp ## j +#define s32(j) ld_swap32((uint32_t *)data + j, swp ## j) +#else +#define d(j) data[j] +#endif + + /* First row of quasigroup e-transformations */ +#if defined(MACHINE_IS_BIG_ENDIAN) + s32(8); + s32(9); + s32(10); + s32(11); + s32(12); + s32(13); + s32(14); + s32(15); +#endif + LS1_256(defix, d(15), d(14), d(13), d(12), d(11), d(10), d(9), + d(8)); +#if defined(MACHINE_IS_BIG_ENDIAN) + s32(0); + s32(1); + s32(2); + s32(3); + s32(4); + s32(5); + s32(6); + s32(7); +#undef s32 +#endif + LS2_256(defix, d(0), d(1), d(2), d(3), d(4), d(5), d(6), d(7)); + quasi_exform256(p0, p1, p2, p3, p4, p5, p6, p7); + + LS1_256(defix, p0, p1, p2, p3, p4, p5, p6, p7); + LS2_256(defix, d(8), d(9), d(10), d(11), d(12), d(13), d(14), + d(15)); + quasi_exform256(q0, q1, q2, q3, q4, q5, q6, q7); + + /* Second row of quasigroup e-transformations */ + LS1_256(defix, p[8], p[9], p[10], p[11], p[12], p[13], p[14], + p[15]); + LS2_256(defix, p0, p1, p2, p3, p4, p5, p6, p7); + quasi_exform256(p0, p1, p2, p3, p4, p5, p6, p7); + + LS1_256(defix, p0, p1, p2, p3, p4, p5, p6, p7); + LS2_256(defix, q0, q1, q2, q3, q4, q5, q6, q7); + quasi_exform256(q0, q1, q2, q3, q4, q5, q6, q7); + + /* Third row of quasigroup e-transformations */ + LS1_256(defix, p0, p1, p2, p3, p4, p5, p6, p7); + LS2_256(defix, p[0], p[1], p[2], p[3], p[4], p[5], p[6], p[7]); + quasi_exform256(p0, p1, p2, p3, p4, p5, p6, p7); + + LS1_256(defix, q0, q1, q2, q3, q4, q5, q6, q7); + LS2_256(defix, p0, p1, p2, p3, p4, p5, p6, p7); + quasi_exform256(q0, q1, q2, q3, q4, q5, q6, q7); + + /* Fourth row of quasigroup e-transformations */ + LS1_256(defix, d(7), d(6), d(5), d(4), d(3), d(2), d(1), d(0)); + LS2_256(defix, p0, p1, p2, p3, p4, p5, p6, p7); + quasi_exform256(p0, p1, p2, p3, p4, p5, p6, p7); + + LS1_256(defix, p0, p1, p2, p3, p4, p5, p6, p7); + LS2_256(defix, q0, q1, q2, q3, q4, q5, q6, q7); + quasi_exform256(q0, q1, q2, q3, q4, q5, q6, q7); + + /* Edon-R tweak on the original SHA-3 Edon-R submission. */ + p[0] ^= d(8) ^ p0; + p[1] ^= d(9) ^ p1; + p[2] ^= d(10) ^ p2; + p[3] ^= d(11) ^ p3; + p[4] ^= d(12) ^ p4; + p[5] ^= d(13) ^ p5; + p[6] ^= d(14) ^ p6; + p[7] ^= d(15) ^ p7; + p[8] ^= d(0) ^ q0; + p[9] ^= d(1) ^ q1; + p[10] ^= d(2) ^ q2; + p[11] ^= d(3) ^ q3; + p[12] ^= d(4) ^ q4; + p[13] ^= d(5) ^ q5; + p[14] ^= d(6) ^ q6; + p[15] ^= d(7) ^ q7; + } + +#undef d + return (bitlen - bl); +} + +#if defined(__IBMC__) && defined(_AIX) && defined(__64BIT__) +static inline size_t +#else +static size_t +#endif +Q512(size_t bitlen, const uint64_t *data, uint64_t *restrict p) +{ + size_t bl; + + for (bl = bitlen; bl >= EdonR512_BLOCK_BITSIZE; + bl -= EdonR512_BLOCK_BITSIZE, data += 16) { + uint64_t s0, s1, s2, s3, s4, s5, s6, s7, t0, t1, t2, t3, t4, + t5, t6, t7; + uint64_t p0, p1, p2, p3, p4, p5, p6, p7, q0, q1, q2, q3, q4, + q5, q6, q7; + const uint64_t defix = 0xaaaaaaaaaaaaaaaaull; +#if defined(MACHINE_IS_BIG_ENDIAN) + uint64_t swp0, swp1, swp2, swp3, swp4, swp5, swp6, swp7, swp8, + swp9, swp10, swp11, swp12, swp13, swp14, swp15; +#define d(j) swp##j +#define s64(j) ld_swap64((uint64_t *)data+j, swp##j) +#else +#define d(j) data[j] +#endif + + /* First row of quasigroup e-transformations */ +#if defined(MACHINE_IS_BIG_ENDIAN) + s64(8); + s64(9); + s64(10); + s64(11); + s64(12); + s64(13); + s64(14); + s64(15); +#endif + LS1_512(defix, d(15), d(14), d(13), d(12), d(11), d(10), d(9), + d(8)); +#if defined(MACHINE_IS_BIG_ENDIAN) + s64(0); + s64(1); + s64(2); + s64(3); + s64(4); + s64(5); + s64(6); + s64(7); +#undef s64 +#endif + LS2_512(defix, d(0), d(1), d(2), d(3), d(4), d(5), d(6), d(7)); + quasi_exform512(p0, p1, p2, p3, p4, p5, p6, p7); + + LS1_512(defix, p0, p1, p2, p3, p4, p5, p6, p7); + LS2_512(defix, d(8), d(9), d(10), d(11), d(12), d(13), d(14), + d(15)); + quasi_exform512(q0, q1, q2, q3, q4, q5, q6, q7); + + /* Second row of quasigroup e-transformations */ + LS1_512(defix, p[8], p[9], p[10], p[11], p[12], p[13], p[14], + p[15]); + LS2_512(defix, p0, p1, p2, p3, p4, p5, p6, p7); + quasi_exform512(p0, p1, p2, p3, p4, p5, p6, p7); + + LS1_512(defix, p0, p1, p2, p3, p4, p5, p6, p7); + LS2_512(defix, q0, q1, q2, q3, q4, q5, q6, q7); + quasi_exform512(q0, q1, q2, q3, q4, q5, q6, q7); + + /* Third row of quasigroup e-transformations */ + LS1_512(defix, p0, p1, p2, p3, p4, p5, p6, p7); + LS2_512(defix, p[0], p[1], p[2], p[3], p[4], p[5], p[6], p[7]); + quasi_exform512(p0, p1, p2, p3, p4, p5, p6, p7); + + LS1_512(defix, q0, q1, q2, q3, q4, q5, q6, q7); + LS2_512(defix, p0, p1, p2, p3, p4, p5, p6, p7); + quasi_exform512(q0, q1, q2, q3, q4, q5, q6, q7); + + /* Fourth row of quasigroup e-transformations */ + LS1_512(defix, d(7), d(6), d(5), d(4), d(3), d(2), d(1), d(0)); + LS2_512(defix, p0, p1, p2, p3, p4, p5, p6, p7); + quasi_exform512(p0, p1, p2, p3, p4, p5, p6, p7); + + LS1_512(defix, p0, p1, p2, p3, p4, p5, p6, p7); + LS2_512(defix, q0, q1, q2, q3, q4, q5, q6, q7); + quasi_exform512(q0, q1, q2, q3, q4, q5, q6, q7); + + /* Edon-R tweak on the original SHA-3 Edon-R submission. */ + p[0] ^= d(8) ^ p0; + p[1] ^= d(9) ^ p1; + p[2] ^= d(10) ^ p2; + p[3] ^= d(11) ^ p3; + p[4] ^= d(12) ^ p4; + p[5] ^= d(13) ^ p5; + p[6] ^= d(14) ^ p6; + p[7] ^= d(15) ^ p7; + p[8] ^= d(0) ^ q0; + p[9] ^= d(1) ^ q1; + p[10] ^= d(2) ^ q2; + p[11] ^= d(3) ^ q3; + p[12] ^= d(4) ^ q4; + p[13] ^= d(5) ^ q5; + p[14] ^= d(6) ^ q6; + p[15] ^= d(7) ^ q7; + } + +#undef d + return (bitlen - bl); +} + +void +EdonRInit(EdonRState *state, size_t hashbitlen) +{ + ASSERT(EDONR_VALID_HASHBITLEN(hashbitlen)); + switch (hashbitlen) { + case 224: + state->hashbitlen = 224; + state->bits_processed = 0; + state->unprocessed_bits = 0; + bcopy(i224p2, hashState224(state)->DoublePipe, + 16 * sizeof (uint32_t)); + break; + + case 256: + state->hashbitlen = 256; + state->bits_processed = 0; + state->unprocessed_bits = 0; + bcopy(i256p2, hashState256(state)->DoublePipe, + 16 * sizeof (uint32_t)); + break; + + case 384: + state->hashbitlen = 384; + state->bits_processed = 0; + state->unprocessed_bits = 0; + bcopy(i384p2, hashState384(state)->DoublePipe, + 16 * sizeof (uint64_t)); + break; + + case 512: + state->hashbitlen = 512; + state->bits_processed = 0; + state->unprocessed_bits = 0; + bcopy(i512p2, hashState224(state)->DoublePipe, + 16 * sizeof (uint64_t)); + break; + } +} + + +void +EdonRUpdate(EdonRState *state, const uint8_t *data, size_t databitlen) +{ + uint32_t *data32; + uint64_t *data64; + + size_t bits_processed; + + ASSERT(EDONR_VALID_HASHBITLEN(state->hashbitlen)); + switch (state->hashbitlen) { + case 224: + case 256: + if (state->unprocessed_bits > 0) { + /* LastBytes = databitlen / 8 */ + int LastBytes = (int)databitlen >> 3; + + ASSERT(state->unprocessed_bits + databitlen <= + EdonR256_BLOCK_SIZE * 8); + + bcopy(data, hashState256(state)->LastPart + + (state->unprocessed_bits >> 3), LastBytes); + state->unprocessed_bits += (int)databitlen; + databitlen = state->unprocessed_bits; + /* LINTED E_BAD_PTR_CAST_ALIGN */ + data32 = (uint32_t *)hashState256(state)->LastPart; + } else + /* LINTED E_BAD_PTR_CAST_ALIGN */ + data32 = (uint32_t *)data; + + bits_processed = Q256(databitlen, data32, + hashState256(state)->DoublePipe); + state->bits_processed += bits_processed; + databitlen -= bits_processed; + state->unprocessed_bits = (int)databitlen; + if (databitlen > 0) { + /* LastBytes = Ceil(databitlen / 8) */ + int LastBytes = + ((~(((-(int)databitlen) >> 3) & 0x01ff)) + + 1) & 0x01ff; + + data32 += bits_processed >> 5; /* byte size update */ + bcopy(data32, hashState256(state)->LastPart, LastBytes); + } + break; + + case 384: + case 512: + if (state->unprocessed_bits > 0) { + /* LastBytes = databitlen / 8 */ + int LastBytes = (int)databitlen >> 3; + + ASSERT(state->unprocessed_bits + databitlen <= + EdonR512_BLOCK_SIZE * 8); + + bcopy(data, hashState512(state)->LastPart + + (state->unprocessed_bits >> 3), LastBytes); + state->unprocessed_bits += (int)databitlen; + databitlen = state->unprocessed_bits; + /* LINTED E_BAD_PTR_CAST_ALIGN */ + data64 = (uint64_t *)hashState512(state)->LastPart; + } else + /* LINTED E_BAD_PTR_CAST_ALIGN */ + data64 = (uint64_t *)data; + + bits_processed = Q512(databitlen, data64, + hashState512(state)->DoublePipe); + state->bits_processed += bits_processed; + databitlen -= bits_processed; + state->unprocessed_bits = (int)databitlen; + if (databitlen > 0) { + /* LastBytes = Ceil(databitlen / 8) */ + int LastBytes = + ((~(((-(int)databitlen) >> 3) & 0x03ff)) + + 1) & 0x03ff; + + data64 += bits_processed >> 6; /* byte size update */ + bcopy(data64, hashState512(state)->LastPart, LastBytes); + } + break; + } +} + +void +EdonRFinal(EdonRState *state, uint8_t *hashval) +{ + uint32_t *data32; + uint64_t *data64, num_bits; + + size_t databitlen; + int LastByte, PadOnePosition; + + num_bits = state->bits_processed + state->unprocessed_bits; + ASSERT(EDONR_VALID_HASHBITLEN(state->hashbitlen)); + switch (state->hashbitlen) { + case 224: + case 256: + LastByte = (int)state->unprocessed_bits >> 3; + PadOnePosition = 7 - (state->unprocessed_bits & 0x07); + hashState256(state)->LastPart[LastByte] = + (hashState256(state)->LastPart[LastByte] + & (0xff << (PadOnePosition + 1))) ^ + (0x01 << PadOnePosition); + /* LINTED E_BAD_PTR_CAST_ALIGN */ + data64 = (uint64_t *)hashState256(state)->LastPart; + + if (state->unprocessed_bits < 448) { + (void) memset((hashState256(state)->LastPart) + + LastByte + 1, 0x00, + EdonR256_BLOCK_SIZE - LastByte - 9); + databitlen = EdonR256_BLOCK_SIZE * 8; +#if defined(MACHINE_IS_BIG_ENDIAN) + st_swap64(num_bits, data64 + 7); +#else + data64[7] = num_bits; +#endif + } else { + (void) memset((hashState256(state)->LastPart) + + LastByte + 1, 0x00, + EdonR256_BLOCK_SIZE * 2 - LastByte - 9); + databitlen = EdonR256_BLOCK_SIZE * 16; +#if defined(MACHINE_IS_BIG_ENDIAN) + st_swap64(num_bits, data64 + 15); +#else + data64[15] = num_bits; +#endif + } + + /* LINTED E_BAD_PTR_CAST_ALIGN */ + data32 = (uint32_t *)hashState256(state)->LastPart; + state->bits_processed += Q256(databitlen, data32, + hashState256(state)->DoublePipe); + break; + + case 384: + case 512: + LastByte = (int)state->unprocessed_bits >> 3; + PadOnePosition = 7 - (state->unprocessed_bits & 0x07); + hashState512(state)->LastPart[LastByte] = + (hashState512(state)->LastPart[LastByte] + & (0xff << (PadOnePosition + 1))) ^ + (0x01 << PadOnePosition); + /* LINTED E_BAD_PTR_CAST_ALIGN */ + data64 = (uint64_t *)hashState512(state)->LastPart; + + if (state->unprocessed_bits < 960) { + (void) memset((hashState512(state)->LastPart) + + LastByte + 1, 0x00, + EdonR512_BLOCK_SIZE - LastByte - 9); + databitlen = EdonR512_BLOCK_SIZE * 8; +#if defined(MACHINE_IS_BIG_ENDIAN) + st_swap64(num_bits, data64 + 15); +#else + data64[15] = num_bits; +#endif + } else { + (void) memset((hashState512(state)->LastPart) + + LastByte + 1, 0x00, + EdonR512_BLOCK_SIZE * 2 - LastByte - 9); + databitlen = EdonR512_BLOCK_SIZE * 16; +#if defined(MACHINE_IS_BIG_ENDIAN) + st_swap64(num_bits, data64 + 31); +#else + data64[31] = num_bits; +#endif + } + + state->bits_processed += Q512(databitlen, data64, + hashState512(state)->DoublePipe); + break; + } + + switch (state->hashbitlen) { + case 224: { +#if defined(MACHINE_IS_BIG_ENDIAN) + uint32_t *d32 = (uint32_t *)hashval; + uint32_t *s32 = hashState224(state)->DoublePipe + 9; + int j; + + for (j = 0; j < EdonR224_DIGEST_SIZE >> 2; j++) + st_swap32(s32[j], d32 + j); +#else + bcopy(hashState256(state)->DoublePipe + 9, hashval, + EdonR224_DIGEST_SIZE); +#endif + break; + } + case 256: { +#if defined(MACHINE_IS_BIG_ENDIAN) + uint32_t *d32 = (uint32_t *)hashval; + uint32_t *s32 = hashState224(state)->DoublePipe + 8; + int j; + + for (j = 0; j < EdonR256_DIGEST_SIZE >> 2; j++) + st_swap32(s32[j], d32 + j); +#else + bcopy(hashState256(state)->DoublePipe + 8, hashval, + EdonR256_DIGEST_SIZE); +#endif + break; + } + case 384: { +#if defined(MACHINE_IS_BIG_ENDIAN) + uint64_t *d64 = (uint64_t *)hashval; + uint64_t *s64 = hashState384(state)->DoublePipe + 10; + int j; + + for (j = 0; j < EdonR384_DIGEST_SIZE >> 3; j++) + st_swap64(s64[j], d64 + j); +#else + bcopy(hashState384(state)->DoublePipe + 10, hashval, + EdonR384_DIGEST_SIZE); +#endif + break; + } + case 512: { +#if defined(MACHINE_IS_BIG_ENDIAN) + uint64_t *d64 = (uint64_t *)hashval; + uint64_t *s64 = hashState512(state)->DoublePipe + 8; + int j; + + for (j = 0; j < EdonR512_DIGEST_SIZE >> 3; j++) + st_swap64(s64[j], d64 + j); +#else + bcopy(hashState512(state)->DoublePipe + 8, hashval, + EdonR512_DIGEST_SIZE); +#endif + break; + } + } +} + + +void +EdonRHash(size_t hashbitlen, const uint8_t *data, size_t databitlen, + uint8_t *hashval) +{ + EdonRState state; + + EdonRInit(&state, hashbitlen); + EdonRUpdate(&state, data, databitlen); + EdonRFinal(&state, hashval); +} Added: vendor/illumos/dist/common/crypto/edonr/edonr_byteorder.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/illumos/dist/common/crypto/edonr/edonr_byteorder.h Wed Oct 14 11:12:47 2015 (r289310) @@ -0,0 +1,219 @@ +/* + * IDI,NTNU + * + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://opensource.org/licenses/CDDL-1.0. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + * + * Copyright (C) 2009, 2010, Jorn Amundsen + * + * C header file to determine compile machine byte order. Take care when cross + * compiling. + * + * $Id: byteorder.h 517 2013-02-17 20:34:39Z joern $ + */ +/* + * Portions copyright (c) 2013, Saso Kiselkov, All rights reserved + */ + +#ifndef _CRYPTO_EDONR_BYTEORDER_H +#define _CRYPTO_EDONR_BYTEORDER_H + +#if defined(__linux) +#include +#else +#include +#endif + +#if defined(__BYTE_ORDER) +#if (__BYTE_ORDER == __BIG_ENDIAN) +#define MACHINE_IS_BIG_ENDIAN +#elif (__BYTE_ORDER == __LITTLE_ENDIAN) +#define MACHINE_IS_LITTLE_ENDIAN +#endif +#elif defined(BYTE_ORDER) +#if (BYTE_ORDER == BIG_ENDIAN) +#define MACHINE_IS_BIG_ENDIAN +#elif (BYTE_ORDER == LITTLE_ENDIAN) +#define MACHINE_IS_LITTLE_ENDIAN +#endif +#endif /* __BYTE_ORDER || BYTE_ORDER */ + +#if !defined(MACHINE_IS_BIG_ENDIAN) && !defined(MACHINE_IS_LITTLE_ENDIAN) +#if defined(_BIG_ENDIAN) || defined(_MIPSEB) +#define MACHINE_IS_BIG_ENDIAN +#endif +#if defined(_LITTLE_ENDIAN) || defined(_MIPSEL) +#define MACHINE_IS_LITTLE_ENDIAN +#endif +#endif /* !MACHINE_IS_BIG_ENDIAN && !MACHINE_IS_LITTLE_ENDIAN */ + +#if !defined(MACHINE_IS_BIG_ENDIAN) && !defined(MACHINE_IS_LITTLE_ENDIAN) +#error unknown machine byte sex +#endif + +#define BYTEORDER_INCLUDED + +#if defined(MACHINE_IS_BIG_ENDIAN) +/* + * Byte swapping macros for big endian architectures and compilers, + * add as appropriate for other architectures and/or compilers. + * + * ld_swap64(src,dst) : uint64_t dst = *(src) + * st_swap64(src,dst) : *(dst) = uint64_t src + */ + +#if defined(__PPC__) || defined(_ARCH_PPC) + +#if defined(__64BIT__) +#if defined(_ARCH_PWR7) +#define aix_ld_swap64(s64, d64)\ + __asm__("ldbrx %0,0,%1" : "=r"(d64) : "r"(s64)) +#define aix_st_swap64(s64, d64)\ + __asm__ volatile("stdbrx %1,0,%0" : : "r"(d64), "r"(s64)) +#else +#define aix_ld_swap64(s64, d64) \ +{ \ + uint64_t *s4, h; \ + \ + __asm__("addi %0,%3,4;lwbrx %1,0,%3;lwbrx %2,0,%0;rldimi %1,%2,32,0"\ + : "+r"(s4), "=r"(d64), "=r"(h) : "b"(s64)); \ +} + +#define aix_st_swap64(s64, d64) \ +{ \ + uint64_t *s4, h; \ + h = (s64) >> 32; \ + __asm__ volatile("addi %0,%3,4;stwbrx %1,0,%3;stwbrx %2,0,%0" \ + : "+r"(s4) : "r"(s64), "r"(h), "b"(d64)); \ +} +#endif /* 64BIT && PWR7 */ +#else +#define aix_ld_swap64(s64, d64) \ +{ \ + uint32_t *s4, h, l; \ + __asm__("addi %0,%3,4;lwbrx %1,0,%3;lwbrx %2,0,%0" \ + : "+r"(s4), "=r"(l), "=r"(h) : "b"(s64)); \ + d64 = ((uint64_t)h<<32) | l; \ +} + +#define aix_st_swap64(s64, d64) \ +{ \ + uint32_t *s4, h, l; \ + l = (s64) & 0xfffffffful, h = (s64) >> 32; \ + __asm__ volatile("addi %0,%3,4;stwbrx %1,0,%3;stwbrx %2,0,%0" \ + : "+r"(s4) : "r"(l), "r"(h), "b"(d64)); \ +} +#endif /* __64BIT__ */ +#define aix_ld_swap32(s32, d32)\ + __asm__("lwbrx %0,0,%1" : "=r"(d32) : "r"(s32)) +#define aix_st_swap32(s32, d32)\ + __asm__ volatile("stwbrx %1,0,%0" : : "r"(d32), "r"(s32)) +#define ld_swap32(s, d) aix_ld_swap32(s, d) +#define st_swap32(s, d) aix_st_swap32(s, d) +#define ld_swap64(s, d) aix_ld_swap64(s, d) +#define st_swap64(s, d) aix_st_swap64(s, d) +#endif /* __PPC__ || _ARCH_PPC */ + +#if defined(__sparc) +#if !defined(__arch64__) && !defined(__sparcv8) && defined(__sparcv9) +#define __arch64__ +#endif +#if defined(__GNUC__) || (defined(__SUNPRO_C) && __SUNPRO_C > 0x590) +/* need Sun Studio C 5.10 and above for GNU inline assembly */ +#if defined(__arch64__) +#define sparc_ld_swap64(s64, d64) \ + __asm__("ldxa [%1]0x88,%0" : "=r"(d64) : "r"(s64)) +#define sparc_st_swap64(s64, d64) \ + __asm__ volatile("stxa %0,[%1]0x88" : : "r"(s64), "r"(d64)) +#define st_swap64(s, d) sparc_st_swap64(s, d) +#else +#define sparc_ld_swap64(s64, d64) \ +{ \ + uint32_t *s4, h, l; \ + __asm__("add %3,4,%0\n\tlda [%3]0x88,%1\n\tlda [%0]0x88,%2" \ + : "+r"(s4), "=r"(l), "=r"(h) : "r"(s64)); \ + d64 = ((uint64_t)h<<32) | l; \ +} +#define sparc_st_swap64(s64, d64) \ +{ \ + uint32_t *s4, h, l; \ + l = (s64) & 0xfffffffful, h = (s64) >> 32; \ + __asm__ volatile("add %3,4,%0\n\tsta %1,[%3]0x88\n\tsta %2,[%0]0x88"\ + : "+r"(s4) : "r"(l), "r"(h), "r"(d64)); \ +} +#endif /* sparc64 */ +#define sparc_ld_swap32(s32, d32)\ + __asm__("lda [%1]0x88,%0" : "=r"(d32) : "r"(s32)) +#define sparc_st_swap32(s32, d32)\ + __asm__ volatile("sta %0,[%1]0x88" : : "r"(s32), "r"(d32)) +#define ld_swap32(s, d) sparc_ld_swap32(s, d) +#define st_swap32(s, d) sparc_st_swap32(s, d) +#define ld_swap64(s, d) sparc_ld_swap64(s, d) +#define st_swap64(s, d) sparc_st_swap64(s, d) +#endif /* GCC || Sun Studio C > 5.9 */ +#endif /* sparc */ + +/* GCC fallback */ +#if ((__GNUC__ >= 4) || defined(__PGIC__)) && !defined(ld_swap32) +#define ld_swap32(s, d) (d = __builtin_bswap32(*(s))) +#define st_swap32(s, d) (*(d) = __builtin_bswap32(s)) +#endif /* GCC4/PGIC && !swap32 */ +#if ((__GNUC__ >= 4) || defined(__PGIC__)) && !defined(ld_swap64) +#define ld_swap64(s, d) (d = __builtin_bswap64(*(s))) +#define st_swap64(s, d) (*(d) = __builtin_bswap64(s)) +#endif /* GCC4/PGIC && !swap64 */ + +/* generic fallback */ +#if !defined(ld_swap32) +#define ld_swap32(s, d) \ + (d = (*(s) >> 24) | (*(s) >> 8 & 0xff00) | \ + (*(s) << 8 & 0xff0000) | (*(s) << 24)) +#define st_swap32(s, d) \ + (*(d) = ((s) >> 24) | ((s) >> 8 & 0xff00) | \ + ((s) << 8 & 0xff0000) | ((s) << 24)) +#endif +#if !defined(ld_swap64) +#define ld_swap64(s, d) \ + (d = (*(s) >> 56) | (*(s) >> 40 & 0xff00) | \ + (*(s) >> 24 & 0xff0000) | (*(s) >> 8 & 0xff000000) | \ + (*(s) & 0xff000000) << 8 | (*(s) & 0xff0000) << 24 | \ + (*(s) & 0xff00) << 40 | *(s) << 56) +#define st_swap64(s, d) \ + (*(d) = ((s) >> 56) | ((s) >> 40 & 0xff00) | \ + ((s) >> 24 & 0xff0000) | ((s) >> 8 & 0xff000000) | \ + ((s) & 0xff000000) << 8 | ((s) & 0xff0000) << 24 | \ + ((s) & 0xff00) << 40 | (s) << 56) +#endif + +#endif /* MACHINE_IS_BIG_ENDIAN */ + + +#if defined(MACHINE_IS_LITTLE_ENDIAN) +/* replace swaps with simple assignments on little endian systems */ +#undef ld_swap32 +#undef st_swap32 +#define ld_swap32(s, d) (d = *(s)) +#define st_swap32(s, d) (*(d) = s) +#undef ld_swap64 +#undef st_swap64 +#define ld_swap64(s, d) (d = *(s)) +#define st_swap64(s, d) (*(d) = s) +#endif /* MACHINE_IS_LITTLE_ENDIAN */ + +#endif /* _CRYPTO_EDONR_BYTEORDER_H */ Added: vendor/illumos/dist/common/crypto/skein/THIRDPARTYLICENSE ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/illumos/dist/common/crypto/skein/THIRDPARTYLICENSE Wed Oct 14 11:12:47 2015 (r289310) @@ -0,0 +1,3 @@ +Implementation of the Skein hash function. +Source code author: Doug Whiting, 2008. +This algorithm and source code is released to the public domain. Added: vendor/illumos/dist/common/crypto/skein/THIRDPARTYLICENSE.descrip ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/illumos/dist/common/crypto/skein/THIRDPARTYLICENSE.descrip Wed Oct 14 11:12:47 2015 (r289310) @@ -0,0 +1 @@ +LICENSE TERMS OF SKEIN HASH ALGORITHM IMPLEMENTATION Added: vendor/illumos/dist/common/crypto/skein/skein.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/illumos/dist/common/crypto/skein/skein.c Wed Oct 14 11:12:47 2015 (r289310) @@ -0,0 +1,914 @@ +/* + * Implementation of the Skein hash function. + * Source code author: Doug Whiting, 2008. + * This algorithm and source code is released to the public domain. + */ +/* Copyright 2013 Doug Whiting. This code is released to the public domain. */ + +#define SKEIN_PORT_CODE /* instantiate any code in skein_port.h */ + +#include +#include +#include /* get the Skein API definitions */ +#include "skein_impl.h" /* get internal definitions */ + +/* External function to process blkCnt (nonzero) full block(s) of data. */ +void Skein_256_Process_Block(Skein_256_Ctxt_t *ctx, const uint8_t *blkPtr, + size_t blkCnt, size_t byteCntAdd); +void Skein_512_Process_Block(Skein_512_Ctxt_t *ctx, const uint8_t *blkPtr, + size_t blkCnt, size_t byteCntAdd); +void Skein1024_Process_Block(Skein1024_Ctxt_t *ctx, const uint8_t *blkPtr, + size_t blkCnt, size_t byteCntAdd); + +/* 256-bit Skein */ +/* init the context for a straight hashing operation */ +int +Skein_256_Init(Skein_256_Ctxt_t *ctx, size_t hashBitLen) +{ + union { + uint8_t b[SKEIN_256_STATE_BYTES]; + uint64_t w[SKEIN_256_STATE_WORDS]; + } cfg; /* config block */ + + Skein_Assert(hashBitLen > 0, SKEIN_BAD_HASHLEN); *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@freebsd.org Wed Oct 14 11:12:50 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 06C4FA1271F; Wed, 14 Oct 2015 11:12:50 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8F002F82; Wed, 14 Oct 2015 11:12:49 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t9EBCmaT022225; Wed, 14 Oct 2015 11:12:48 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9EBClT3022215; Wed, 14 Oct 2015 11:12:47 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201510141112.t9EBClT3022215@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Wed, 14 Oct 2015 11:12:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r289310 - vendor-sys/illumos/dist/common/zfs vendor-sys/illumos/dist/uts/common vendor-sys/illumos/dist/uts/common/crypto vendor-sys/illumos/dist/uts/common/crypto/io vendor-sys/illumos... X-SVN-Group: vendor-sys MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Oct 2015 11:12:50 -0000 Author: mav Date: Wed Oct 14 11:12:47 2015 New Revision: 289310 URL: https://svnweb.freebsd.org/changeset/base/289310 Log: 4185 add new cryptographic checksums to ZFS: SHA-512, Skein, Edon-R Reviewed by: George Wilson Reviewed by: Prakash Surya Reviewed by: Saso Kiselkov Reviewed by: Richard Lowe Approved by: Garrett D'Amore Author: Matthew Ahrens illumos/illumos-gate@45818ee124adeaaf947698996b4f4c722afc6d1f Added: vendor-sys/illumos/dist/uts/common/crypto/ vendor-sys/illumos/dist/uts/common/crypto/io/ vendor-sys/illumos/dist/uts/common/crypto/io/edonr_mod.c (contents, props changed) vendor-sys/illumos/dist/uts/common/crypto/io/skein_mod.c (contents, props changed) vendor-sys/illumos/dist/uts/common/fs/zfs/edonr_zfs.c (contents, props changed) vendor-sys/illumos/dist/uts/common/fs/zfs/skein_zfs.c (contents, props changed) vendor-sys/illumos/dist/uts/common/sys/edonr.h (contents, props changed) vendor-sys/illumos/dist/uts/common/sys/skein.h (contents, props changed) Modified: vendor-sys/illumos/dist/common/zfs/zfeature_common.c vendor-sys/illumos/dist/common/zfs/zfeature_common.h vendor-sys/illumos/dist/common/zfs/zfs_fletcher.c vendor-sys/illumos/dist/common/zfs/zfs_fletcher.h vendor-sys/illumos/dist/common/zfs/zfs_prop.c vendor-sys/illumos/dist/uts/common/Makefile.files vendor-sys/illumos/dist/uts/common/fs/zfs/arc.c vendor-sys/illumos/dist/uts/common/fs/zfs/ddt.c vendor-sys/illumos/dist/uts/common/fs/zfs/dmu.c vendor-sys/illumos/dist/uts/common/fs/zfs/dmu_send.c vendor-sys/illumos/dist/uts/common/fs/zfs/dsl_dataset.c vendor-sys/illumos/dist/uts/common/fs/zfs/sha256.c vendor-sys/illumos/dist/uts/common/fs/zfs/spa.c vendor-sys/illumos/dist/uts/common/fs/zfs/spa_misc.c vendor-sys/illumos/dist/uts/common/fs/zfs/sys/dmu.h vendor-sys/illumos/dist/uts/common/fs/zfs/sys/spa.h vendor-sys/illumos/dist/uts/common/fs/zfs/sys/spa_impl.h vendor-sys/illumos/dist/uts/common/fs/zfs/sys/zio.h vendor-sys/illumos/dist/uts/common/fs/zfs/sys/zio_checksum.h vendor-sys/illumos/dist/uts/common/fs/zfs/zfs_ioctl.c vendor-sys/illumos/dist/uts/common/fs/zfs/zio.c vendor-sys/illumos/dist/uts/common/fs/zfs/zio_checksum.c vendor-sys/illumos/dist/uts/common/sys/debug.h Changes in other areas also in this revision: Added: vendor/illumos/dist/common/crypto/ vendor/illumos/dist/common/crypto/edonr/ vendor/illumos/dist/common/crypto/edonr/edonr.c (contents, props changed) vendor/illumos/dist/common/crypto/edonr/edonr_byteorder.h (contents, props changed) vendor/illumos/dist/common/crypto/skein/ vendor/illumos/dist/common/crypto/skein/THIRDPARTYLICENSE (contents, props changed) vendor/illumos/dist/common/crypto/skein/THIRDPARTYLICENSE.descrip (contents, props changed) vendor/illumos/dist/common/crypto/skein/skein.c (contents, props changed) vendor/illumos/dist/common/crypto/skein/skein_block.c (contents, props changed) vendor/illumos/dist/common/crypto/skein/skein_impl.h (contents, props changed) vendor/illumos/dist/common/crypto/skein/skein_iv.c (contents, props changed) vendor/illumos/dist/common/crypto/skein/skein_port.h (contents, props changed) Modified: vendor/illumos/dist/lib/libzfs/common/libzfs_dataset.c vendor/illumos/dist/man/man5/zpool-features.5 Modified: vendor-sys/illumos/dist/common/zfs/zfeature_common.c ============================================================================== --- vendor-sys/illumos/dist/common/zfs/zfeature_common.c Wed Oct 14 10:38:05 2015 (r289309) +++ vendor-sys/illumos/dist/common/zfs/zfeature_common.c Wed Oct 14 11:12:47 2015 (r289310) @@ -231,4 +231,17 @@ zpool_feature_init(void) "org.open-zfs:large_blocks", "large_blocks", "Support for blocks larger than 128KB.", ZFEATURE_FLAG_PER_DATASET, large_blocks_deps); + + zfeature_register(SPA_FEATURE_SHA512, + "org.illumos:sha512", "sha512", + "SHA-512/256 hash algorithm.", + ZFEATURE_FLAG_PER_DATASET, NULL); + zfeature_register(SPA_FEATURE_SKEIN, + "org.illumos:skein", "skein", + "Skein hash algorithm.", + ZFEATURE_FLAG_PER_DATASET, NULL); + zfeature_register(SPA_FEATURE_EDONR, + "org.illumos:edonr", "edonr", + "Edon-R hash algorithm.", + ZFEATURE_FLAG_PER_DATASET, NULL); } Modified: vendor-sys/illumos/dist/common/zfs/zfeature_common.h ============================================================================== --- vendor-sys/illumos/dist/common/zfs/zfeature_common.h Wed Oct 14 10:38:05 2015 (r289309) +++ vendor-sys/illumos/dist/common/zfs/zfeature_common.h Wed Oct 14 11:12:47 2015 (r289310) @@ -52,6 +52,9 @@ typedef enum spa_feature { SPA_FEATURE_BOOKMARKS, SPA_FEATURE_FS_SS_LIMIT, SPA_FEATURE_LARGE_BLOCKS, + SPA_FEATURE_SHA512, + SPA_FEATURE_SKEIN, + SPA_FEATURE_EDONR, SPA_FEATURES } spa_feature_t; Modified: vendor-sys/illumos/dist/common/zfs/zfs_fletcher.c ============================================================================== --- vendor-sys/illumos/dist/common/zfs/zfs_fletcher.c Wed Oct 14 10:38:05 2015 (r289309) +++ vendor-sys/illumos/dist/common/zfs/zfs_fletcher.c Wed Oct 14 11:12:47 2015 (r289310) @@ -22,6 +22,9 @@ * Copyright 2009 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ +/* + * Copyright 2013 Saso Kiselkov. All rights reserved. + */ /* * Fletcher Checksums @@ -131,8 +134,10 @@ #include #include +/*ARGSUSED*/ void -fletcher_2_native(const void *buf, uint64_t size, zio_cksum_t *zcp) +fletcher_2_native(const void *buf, uint64_t size, + const void *ctx_template, zio_cksum_t *zcp) { const uint64_t *ip = buf; const uint64_t *ipend = ip + (size / sizeof (uint64_t)); @@ -148,8 +153,10 @@ fletcher_2_native(const void *buf, uint6 ZIO_SET_CHECKSUM(zcp, a0, a1, b0, b1); } +/*ARGSUSED*/ void -fletcher_2_byteswap(const void *buf, uint64_t size, zio_cksum_t *zcp) +fletcher_2_byteswap(const void *buf, uint64_t size, + const void *ctx_template, zio_cksum_t *zcp) { const uint64_t *ip = buf; const uint64_t *ipend = ip + (size / sizeof (uint64_t)); @@ -165,8 +172,10 @@ fletcher_2_byteswap(const void *buf, uin ZIO_SET_CHECKSUM(zcp, a0, a1, b0, b1); } +/*ARGSUSED*/ void -fletcher_4_native(const void *buf, uint64_t size, zio_cksum_t *zcp) +fletcher_4_native(const void *buf, uint64_t size, + const void *ctx_template, zio_cksum_t *zcp) { const uint32_t *ip = buf; const uint32_t *ipend = ip + (size / sizeof (uint32_t)); @@ -182,8 +191,10 @@ fletcher_4_native(const void *buf, uint6 ZIO_SET_CHECKSUM(zcp, a, b, c, d); } +/*ARGSUSED*/ void -fletcher_4_byteswap(const void *buf, uint64_t size, zio_cksum_t *zcp) +fletcher_4_byteswap(const void *buf, uint64_t size, + const void *ctx_template, zio_cksum_t *zcp) { const uint32_t *ip = buf; const uint32_t *ipend = ip + (size / sizeof (uint32_t)); Modified: vendor-sys/illumos/dist/common/zfs/zfs_fletcher.h ============================================================================== --- vendor-sys/illumos/dist/common/zfs/zfs_fletcher.h Wed Oct 14 10:38:05 2015 (r289309) +++ vendor-sys/illumos/dist/common/zfs/zfs_fletcher.h Wed Oct 14 11:12:47 2015 (r289310) @@ -22,6 +22,9 @@ * Copyright 2009 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ +/* + * Copyright 2013 Saso Kiselkov. All rights reserved. + */ #ifndef _ZFS_FLETCHER_H #define _ZFS_FLETCHER_H @@ -37,14 +40,12 @@ extern "C" { * fletcher checksum functions */ -void fletcher_2_native(const void *, uint64_t, zio_cksum_t *); -void fletcher_2_byteswap(const void *, uint64_t, zio_cksum_t *); -void fletcher_4_native(const void *, uint64_t, zio_cksum_t *); -void fletcher_4_byteswap(const void *, uint64_t, zio_cksum_t *); -void fletcher_4_incremental_native(const void *, uint64_t, - zio_cksum_t *); -void fletcher_4_incremental_byteswap(const void *, uint64_t, - zio_cksum_t *); +void fletcher_2_native(const void *, uint64_t, const void *, zio_cksum_t *); +void fletcher_2_byteswap(const void *, uint64_t, const void *, zio_cksum_t *); +void fletcher_4_native(const void *, uint64_t, const void *, zio_cksum_t *); +void fletcher_4_byteswap(const void *, uint64_t, const void *, zio_cksum_t *); +void fletcher_4_incremental_native(const void *, uint64_t, zio_cksum_t *); +void fletcher_4_incremental_byteswap(const void *, uint64_t, zio_cksum_t *); #ifdef __cplusplus } Modified: vendor-sys/illumos/dist/common/zfs/zfs_prop.c ============================================================================== --- vendor-sys/illumos/dist/common/zfs/zfs_prop.c Wed Oct 14 10:38:05 2015 (r289309) +++ vendor-sys/illumos/dist/common/zfs/zfs_prop.c Wed Oct 14 11:12:47 2015 (r289310) @@ -71,6 +71,9 @@ zfs_prop_init(void) { "fletcher4", ZIO_CHECKSUM_FLETCHER_4 }, { "sha256", ZIO_CHECKSUM_SHA256 }, { "noparity", ZIO_CHECKSUM_NOPARITY }, + { "sha512", ZIO_CHECKSUM_SHA512 }, + { "skein", ZIO_CHECKSUM_SKEIN }, + { "edonr", ZIO_CHECKSUM_EDONR }, { NULL } }; @@ -81,6 +84,14 @@ zfs_prop_init(void) { "sha256", ZIO_CHECKSUM_SHA256 }, { "sha256,verify", ZIO_CHECKSUM_SHA256 | ZIO_CHECKSUM_VERIFY }, + { "sha512", ZIO_CHECKSUM_SHA512 }, + { "sha512,verify", + ZIO_CHECKSUM_SHA512 | ZIO_CHECKSUM_VERIFY }, + { "skein", ZIO_CHECKSUM_SKEIN }, + { "skein,verify", + ZIO_CHECKSUM_SKEIN | ZIO_CHECKSUM_VERIFY }, + { "edonr,verify", + ZIO_CHECKSUM_EDONR | ZIO_CHECKSUM_VERIFY }, { NULL } }; @@ -217,12 +228,12 @@ zfs_prop_init(void) zprop_register_index(ZFS_PROP_CHECKSUM, "checksum", ZIO_CHECKSUM_DEFAULT, PROP_INHERIT, ZFS_TYPE_FILESYSTEM | ZFS_TYPE_VOLUME, - "on | off | fletcher2 | fletcher4 | sha256", "CHECKSUM", - checksum_table); + "on | off | fletcher2 | fletcher4 | sha256 | sha512 | " + "skein | edonr", "CHECKSUM", checksum_table); zprop_register_index(ZFS_PROP_DEDUP, "dedup", ZIO_CHECKSUM_OFF, PROP_INHERIT, ZFS_TYPE_FILESYSTEM | ZFS_TYPE_VOLUME, - "on | off | verify | sha256[,verify]", "DEDUP", - dedup_table); + "on | off | verify | sha256[,verify], sha512[,verify], " + "skein[,verify], edonr,verify", "DEDUP", dedup_table); zprop_register_index(ZFS_PROP_COMPRESSION, "compression", ZIO_COMPRESS_DEFAULT, PROP_INHERIT, ZFS_TYPE_FILESYSTEM | ZFS_TYPE_VOLUME, Modified: vendor-sys/illumos/dist/uts/common/Makefile.files ============================================================================== --- vendor-sys/illumos/dist/uts/common/Makefile.files Wed Oct 14 10:38:05 2015 (r289309) +++ vendor-sys/illumos/dist/uts/common/Makefile.files Wed Oct 14 11:12:47 2015 (r289310) @@ -509,6 +509,10 @@ SHA1_OBJS += sha1.o sha1_mod.o SHA2_OBJS += sha2.o sha2_mod.o +SKEIN_OBJS += skein.o skein_block.o skein_iv.o skein_mod.o + +EDONR_OBJS += edonr.o edonr_mod.o + IPGPC_OBJS += classifierddi.o classifier.o filters.o trie.o table.o \ ba_table.o @@ -1370,6 +1374,8 @@ ZFS_COMMON_OBJS += \ rrwlock.o \ sa.o \ sha256.o \ + edonr_zfs.o \ + skein_zfs.o \ spa.o \ spa_config.o \ spa_errlog.o \ Added: vendor-sys/illumos/dist/uts/common/crypto/io/edonr_mod.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor-sys/illumos/dist/uts/common/crypto/io/edonr_mod.c Wed Oct 14 11:12:47 2015 (r289310) @@ -0,0 +1,63 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://opensource.org/licenses/CDDL-1.0. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ + +/* + * Copyright 2013 Saso Kiselkov. All rights reserved. + */ + +#include +#include +#include +#include +#include +#include + +/* + * Unlike sha2 or skein, we won't expose edonr via the Kernel Cryptographic + * Framework (KCF), because Edon-R is *NOT* suitable for general-purpose + * cryptographic use. Users of Edon-R must interface directly to this module. + */ + +static struct modlmisc modlmisc = { + &mod_miscops, + "Edon-R Message-Digest Algorithm" +}; + +static struct modlinkage modlinkage = { + MODREV_1, &modlmisc, NULL +}; + +int +_init(void) +{ + int error; + + if ((error = mod_install(&modlinkage)) != 0) + return (error); + + return (0); +} + +int +_info(struct modinfo *modinfop) +{ + return (mod_info(&modlinkage, modinfop)); +} Added: vendor-sys/illumos/dist/uts/common/crypto/io/skein_mod.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor-sys/illumos/dist/uts/common/crypto/io/skein_mod.c Wed Oct 14 11:12:47 2015 (r289310) @@ -0,0 +1,830 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://opensource.org/licenses/CDDL-1.0. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ + +/* + * Copyright 2013 Saso Kiselkov. All rights reserved. + */ + +#include +#include +#include +#include +#include +#include +#define SKEIN_MODULE_IMPL +#include + +/* + * Like the sha2 module, we create the skein module with two modlinkages: + * - modlmisc to allow direct calls to Skein_* API functions. + * - modlcrypto to integrate well into the Kernel Crypto Framework (KCF). + */ +static struct modlmisc modlmisc = { + &mod_miscops, + "Skein Message-Digest Algorithm" +}; + +static struct modlcrypto modlcrypto = { + &mod_cryptoops, + "Skein Kernel SW Provider" +}; + +static struct modlinkage modlinkage = { + MODREV_1, &modlmisc, &modlcrypto, NULL +}; + +static crypto_mech_info_t skein_mech_info_tab[] = { + {CKM_SKEIN_256, SKEIN_256_MECH_INFO_TYPE, + CRYPTO_FG_DIGEST | CRYPTO_FG_DIGEST_ATOMIC, + 0, 0, CRYPTO_KEYSIZE_UNIT_IN_BITS}, + {CKM_SKEIN_256_MAC, SKEIN_256_MAC_MECH_INFO_TYPE, + CRYPTO_FG_MAC | CRYPTO_FG_MAC_ATOMIC, 1, INT_MAX, + CRYPTO_KEYSIZE_UNIT_IN_BYTES}, + {CKM_SKEIN_512, SKEIN_512_MECH_INFO_TYPE, + CRYPTO_FG_DIGEST | CRYPTO_FG_DIGEST_ATOMIC, + 0, 0, CRYPTO_KEYSIZE_UNIT_IN_BITS}, + {CKM_SKEIN_512_MAC, SKEIN_512_MAC_MECH_INFO_TYPE, + CRYPTO_FG_MAC | CRYPTO_FG_MAC_ATOMIC, 1, INT_MAX, + CRYPTO_KEYSIZE_UNIT_IN_BYTES}, + {CKM_SKEIN1024, SKEIN1024_MECH_INFO_TYPE, + CRYPTO_FG_DIGEST | CRYPTO_FG_DIGEST_ATOMIC, + 0, 0, CRYPTO_KEYSIZE_UNIT_IN_BITS}, + {CKM_SKEIN1024_MAC, SKEIN1024_MAC_MECH_INFO_TYPE, + CRYPTO_FG_MAC | CRYPTO_FG_MAC_ATOMIC, 1, INT_MAX, + CRYPTO_KEYSIZE_UNIT_IN_BYTES} +}; + +static void skein_provider_status(crypto_provider_handle_t, uint_t *); + +static crypto_control_ops_t skein_control_ops = { + skein_provider_status +}; + +static int skein_digest_init(crypto_ctx_t *, crypto_mechanism_t *, + crypto_req_handle_t); +static int skein_digest(crypto_ctx_t *, crypto_data_t *, crypto_data_t *, + crypto_req_handle_t); +static int skein_update(crypto_ctx_t *, crypto_data_t *, crypto_req_handle_t); +static int skein_final(crypto_ctx_t *, crypto_data_t *, crypto_req_handle_t); +static int skein_digest_atomic(crypto_provider_handle_t, crypto_session_id_t, + crypto_mechanism_t *, crypto_data_t *, crypto_data_t *, + crypto_req_handle_t); + +static crypto_digest_ops_t skein_digest_ops = { + skein_digest_init, + skein_digest, + skein_update, + NULL, + skein_final, + skein_digest_atomic +}; + +static int skein_mac_init(crypto_ctx_t *, crypto_mechanism_t *, crypto_key_t *, + crypto_spi_ctx_template_t, crypto_req_handle_t); +static int skein_mac_atomic(crypto_provider_handle_t, crypto_session_id_t, + crypto_mechanism_t *, crypto_key_t *, crypto_data_t *, crypto_data_t *, + crypto_spi_ctx_template_t, crypto_req_handle_t); + +static crypto_mac_ops_t skein_mac_ops = { + skein_mac_init, + NULL, + skein_update, /* using regular digest update is OK here */ + skein_final, /* using regular digest final is OK here */ + skein_mac_atomic, + NULL +}; + +static int skein_create_ctx_template(crypto_provider_handle_t, + crypto_mechanism_t *, crypto_key_t *, crypto_spi_ctx_template_t *, + size_t *, crypto_req_handle_t); +static int skein_free_context(crypto_ctx_t *); + +static crypto_ctx_ops_t skein_ctx_ops = { + skein_create_ctx_template, + skein_free_context +}; + +static crypto_ops_t skein_crypto_ops = { + &skein_control_ops, + &skein_digest_ops, + NULL, + &skein_mac_ops, + NULL, + NULL, + NULL, + NULL, + NULL, + NULL, + NULL, + NULL, + NULL, + &skein_ctx_ops, + NULL, + NULL, + NULL +}; + +static crypto_provider_info_t skein_prov_info = { + CRYPTO_SPI_VERSION_4, + "Skein Software Provider", + CRYPTO_SW_PROVIDER, + {&modlinkage}, + NULL, + &skein_crypto_ops, + sizeof (skein_mech_info_tab) / sizeof (crypto_mech_info_t), + skein_mech_info_tab +}; + +static crypto_kcf_provider_handle_t skein_prov_handle = NULL; + +typedef struct skein_ctx { + skein_mech_type_t sc_mech_type; + size_t sc_digest_bitlen; + /*LINTED(E_ANONYMOUS_UNION_DECL)*/ + union { + Skein_256_Ctxt_t sc_256; + Skein_512_Ctxt_t sc_512; + Skein1024_Ctxt_t sc_1024; + }; +} skein_ctx_t; +#define SKEIN_CTX(_ctx_) ((skein_ctx_t *)((_ctx_)->cc_provider_private)) +#define SKEIN_CTX_LVALUE(_ctx_) (_ctx_)->cc_provider_private +#define SKEIN_OP(_skein_ctx, _op, ...) \ + do { \ + skein_ctx_t *sc = (_skein_ctx); \ + switch (sc->sc_mech_type) { \ + case SKEIN_256_MECH_INFO_TYPE: \ + case SKEIN_256_MAC_MECH_INFO_TYPE: \ + (void) Skein_256_ ## _op(&sc->sc_256, __VA_ARGS__);\ + break; \ + case SKEIN_512_MECH_INFO_TYPE: \ + case SKEIN_512_MAC_MECH_INFO_TYPE: \ + (void) Skein_512_ ## _op(&sc->sc_512, __VA_ARGS__);\ + break; \ + case SKEIN1024_MECH_INFO_TYPE: \ + case SKEIN1024_MAC_MECH_INFO_TYPE: \ + (void) Skein1024_ ## _op(&sc->sc_1024, __VA_ARGS__);\ + break; \ + } \ + _NOTE(CONSTCOND) \ + } while (0) + +static int +skein_get_digest_bitlen(const crypto_mechanism_t *mechanism, size_t *result) +{ + if (mechanism->cm_param != NULL) { + /*LINTED(E_BAD_PTR_CAST_ALIGN)*/ + skein_param_t *param = (skein_param_t *)mechanism->cm_param; + + if (mechanism->cm_param_len != sizeof (*param) || + param->sp_digest_bitlen == 0) { + return (CRYPTO_MECHANISM_PARAM_INVALID); + } + *result = param->sp_digest_bitlen; + } else { + switch (mechanism->cm_type) { + case SKEIN_256_MECH_INFO_TYPE: + *result = 256; + break; + case SKEIN_512_MECH_INFO_TYPE: + *result = 512; + break; + case SKEIN1024_MECH_INFO_TYPE: + *result = 1024; + break; + default: + return (CRYPTO_MECHANISM_INVALID); + } + } + return (CRYPTO_SUCCESS); +} + +int +_init(void) +{ + int error; + + if ((error = mod_install(&modlinkage)) != 0) + return (error); + + /* + * Try to register with KCF - failure shouldn't unload us, since we + * still may want to continue providing misc/skein functionality. + */ + (void) crypto_register_provider(&skein_prov_info, &skein_prov_handle); + + return (0); +} + +int +_info(struct modinfo *modinfop) +{ + return (mod_info(&modlinkage, modinfop)); +} + +/* + * KCF software provider control entry points. + */ +/* ARGSUSED */ +static void +skein_provider_status(crypto_provider_handle_t provider, uint_t *status) +{ + *status = CRYPTO_PROVIDER_READY; +} + +/* + * General Skein hashing helper functions. + */ + +/* + * Performs an Update on a context with uio input data. + */ +static int +skein_digest_update_uio(skein_ctx_t *ctx, const crypto_data_t *data) +{ + off_t offset = data->cd_offset; + size_t length = data->cd_length; + uint_t vec_idx; + size_t cur_len; + const uio_t *uio = data->cd_uio; + + /* we support only kernel buffer */ + if (uio->uio_segflg != UIO_SYSSPACE) + return (CRYPTO_ARGUMENTS_BAD); + + /* + * Jump to the first iovec containing data to be + * digested. + */ + for (vec_idx = 0; vec_idx < uio->uio_iovcnt && + offset >= uio->uio_iov[vec_idx].iov_len; + offset -= uio->uio_iov[vec_idx++].iov_len) + ; + if (vec_idx == uio->uio_iovcnt) { + /* + * The caller specified an offset that is larger than the + * total size of the buffers it provided. + */ + return (CRYPTO_DATA_LEN_RANGE); + } + + /* + * Now do the digesting on the iovecs. + */ + while (vec_idx < uio->uio_iovcnt && length > 0) { + cur_len = MIN(uio->uio_iov[vec_idx].iov_len - offset, length); + SKEIN_OP(ctx, Update, (uint8_t *)uio->uio_iov[vec_idx].iov_base + + offset, cur_len); + length -= cur_len; + vec_idx++; + offset = 0; + } + + if (vec_idx == uio->uio_iovcnt && length > 0) { + /* + * The end of the specified iovec's was reached but + * the length requested could not be processed, i.e. + * The caller requested to digest more data than it provided. + */ + return (CRYPTO_DATA_LEN_RANGE); + } + + return (CRYPTO_SUCCESS); +} + +/* + * Performs a Final on a context and writes to a uio digest output. + */ +static int +skein_digest_final_uio(skein_ctx_t *ctx, crypto_data_t *digest, + crypto_req_handle_t req) +{ + off_t offset = digest->cd_offset; + uint_t vec_idx; + uio_t *uio = digest->cd_uio; + + /* we support only kernel buffer */ + if (uio->uio_segflg != UIO_SYSSPACE) + return (CRYPTO_ARGUMENTS_BAD); + + /* + * Jump to the first iovec containing ptr to the digest to be returned. + */ + for (vec_idx = 0; offset >= uio->uio_iov[vec_idx].iov_len && + vec_idx < uio->uio_iovcnt; + offset -= uio->uio_iov[vec_idx++].iov_len) + ; + if (vec_idx == uio->uio_iovcnt) { + /* + * The caller specified an offset that is larger than the + * total size of the buffers it provided. + */ + return (CRYPTO_DATA_LEN_RANGE); + } + if (offset + CRYPTO_BITS2BYTES(ctx->sc_digest_bitlen) <= + uio->uio_iov[vec_idx].iov_len) { + /* The computed digest will fit in the current iovec. */ + SKEIN_OP(ctx, Final, + (uchar_t *)uio->uio_iov[vec_idx].iov_base + offset); + } else { + uint8_t *digest_tmp; + off_t scratch_offset = 0; + size_t length = CRYPTO_BITS2BYTES(ctx->sc_digest_bitlen); + size_t cur_len; + + digest_tmp = kmem_alloc(CRYPTO_BITS2BYTES( + ctx->sc_digest_bitlen), crypto_kmflag(req)); + if (digest_tmp == NULL) + return (CRYPTO_HOST_MEMORY); + SKEIN_OP(ctx, Final, digest_tmp); + while (vec_idx < uio->uio_iovcnt && length > 0) { + cur_len = MIN(uio->uio_iov[vec_idx].iov_len - offset, + length); + bcopy(digest_tmp + scratch_offset, + uio->uio_iov[vec_idx].iov_base + offset, cur_len); + + length -= cur_len; + vec_idx++; + scratch_offset += cur_len; + offset = 0; + } + kmem_free(digest_tmp, CRYPTO_BITS2BYTES(ctx->sc_digest_bitlen)); + + if (vec_idx == uio->uio_iovcnt && length > 0) { + /* + * The end of the specified iovec's was reached but + * the length requested could not be processed, i.e. + * The caller requested to digest more data than it + * provided. + */ + return (CRYPTO_DATA_LEN_RANGE); + } + } + + return (CRYPTO_SUCCESS); +} + +/* + * Performs an Update on a context with mblk input data. + */ +static int +skein_digest_update_mblk(skein_ctx_t *ctx, crypto_data_t *data) +{ + off_t offset = data->cd_offset; + size_t length = data->cd_length; + mblk_t *mp; + size_t cur_len; + + /* Jump to the first mblk_t containing data to be digested. */ + for (mp = data->cd_mp; mp != NULL && offset >= MBLKL(mp); + offset -= MBLKL(mp), mp = mp->b_cont) + ; + if (mp == NULL) { + /* + * The caller specified an offset that is larger than the + * total size of the buffers it provided. + */ + return (CRYPTO_DATA_LEN_RANGE); + } + + /* Now do the digesting on the mblk chain. */ + while (mp != NULL && length > 0) { + cur_len = MIN(MBLKL(mp) - offset, length); + SKEIN_OP(ctx, Update, mp->b_rptr + offset, cur_len); + length -= cur_len; + offset = 0; + mp = mp->b_cont; + } + + if (mp == NULL && length > 0) { + /* + * The end of the mblk was reached but the length requested + * could not be processed, i.e. The caller requested + * to digest more data than it provided. + */ + return (CRYPTO_DATA_LEN_RANGE); + } + + return (CRYPTO_SUCCESS); +} + +/* + * Performs a Final on a context and writes to an mblk digest output. + */ +static int +skein_digest_final_mblk(skein_ctx_t *ctx, crypto_data_t *digest, + crypto_req_handle_t req) +{ + off_t offset = digest->cd_offset; + mblk_t *mp; + + /* Jump to the first mblk_t that will be used to store the digest. */ + for (mp = digest->cd_mp; mp != NULL && offset >= MBLKL(mp); + offset -= MBLKL(mp), mp = mp->b_cont) + ; + if (mp == NULL) { + /* caller specified offset is too large */ + return (CRYPTO_DATA_LEN_RANGE); + } + + if (offset + CRYPTO_BITS2BYTES(ctx->sc_digest_bitlen) <= MBLKL(mp)) { + /* The digest will fit in the current mblk. */ + SKEIN_OP(ctx, Final, mp->b_rptr + offset); + } else { + /* Split the digest up between the individual buffers. */ + uint8_t *digest_tmp; + off_t scratch_offset = 0; + size_t length = CRYPTO_BITS2BYTES(ctx->sc_digest_bitlen); + size_t cur_len; + + digest_tmp = kmem_alloc(CRYPTO_BITS2BYTES( + ctx->sc_digest_bitlen), crypto_kmflag(req)); + if (digest_tmp == NULL) + return (CRYPTO_HOST_MEMORY); + SKEIN_OP(ctx, Final, digest_tmp); + while (mp != NULL && length > 0) { + cur_len = MIN(MBLKL(mp) - offset, length); + bcopy(digest_tmp + scratch_offset, + mp->b_rptr + offset, cur_len); + length -= cur_len; + mp = mp->b_cont; + scratch_offset += cur_len; + offset = 0; + } + kmem_free(digest_tmp, CRYPTO_BITS2BYTES(ctx->sc_digest_bitlen)); + if (mp == NULL && length > 0) { + /* digest too long to fit in the mblk buffers */ + return (CRYPTO_DATA_LEN_RANGE); + } + } + + return (CRYPTO_SUCCESS); +} + +/* + * KCF software provider digest entry points. + */ + +/* + * Initializes a skein digest context to the configuration in `mechanism'. + * The mechanism cm_type must be one of SKEIN_*_MECH_INFO_TYPE. The cm_param + * field may contain a skein_param_t structure indicating the length of the + * digest the algorithm should produce. Otherwise the default output lengths + * are applied (32 bytes for Skein-256, 64 bytes for Skein-512 and 128 bytes + * for Skein-1024). + */ +static int +skein_digest_init(crypto_ctx_t *ctx, crypto_mechanism_t *mechanism, + crypto_req_handle_t req) +{ + int error = CRYPTO_SUCCESS; + + if (!VALID_SKEIN_DIGEST_MECH(mechanism->cm_type)) + return (CRYPTO_MECHANISM_INVALID); + + SKEIN_CTX_LVALUE(ctx) = kmem_alloc(sizeof (*SKEIN_CTX(ctx)), + crypto_kmflag(req)); + if (SKEIN_CTX(ctx) == NULL) + return (CRYPTO_HOST_MEMORY); + + SKEIN_CTX(ctx)->sc_mech_type = mechanism->cm_type; + error = skein_get_digest_bitlen(mechanism, + &SKEIN_CTX(ctx)->sc_digest_bitlen); + if (error != CRYPTO_SUCCESS) + goto errout; + SKEIN_OP(SKEIN_CTX(ctx), Init, SKEIN_CTX(ctx)->sc_digest_bitlen); + + return (CRYPTO_SUCCESS); +errout: + bzero(SKEIN_CTX(ctx), sizeof (*SKEIN_CTX(ctx))); + kmem_free(SKEIN_CTX(ctx), sizeof (*SKEIN_CTX(ctx))); + SKEIN_CTX_LVALUE(ctx) = NULL; + return (error); +} + +/* + * Executes a skein_update and skein_digest on a pre-initialized crypto + * context in a single step. See the documentation to these functions to + * see what to pass here. + */ +static int +skein_digest(crypto_ctx_t *ctx, crypto_data_t *data, crypto_data_t *digest, + crypto_req_handle_t req) +{ + int error = CRYPTO_SUCCESS; + + ASSERT(SKEIN_CTX(ctx) != NULL); + + if (digest->cd_length < + CRYPTO_BITS2BYTES(SKEIN_CTX(ctx)->sc_digest_bitlen)) { + digest->cd_length = + CRYPTO_BITS2BYTES(SKEIN_CTX(ctx)->sc_digest_bitlen); + return (CRYPTO_BUFFER_TOO_SMALL); + } + + error = skein_update(ctx, data, req); + if (error != CRYPTO_SUCCESS) { + bzero(SKEIN_CTX(ctx), sizeof (*SKEIN_CTX(ctx))); + kmem_free(SKEIN_CTX(ctx), sizeof (*SKEIN_CTX(ctx))); + SKEIN_CTX_LVALUE(ctx) = NULL; + digest->cd_length = 0; + return (error); + } + error = skein_final(ctx, digest, req); + + return (error); +} + +/* + * Performs a skein Update with the input message in `data' (successive calls + * can push more data). This is used both for digest and MAC operation. + * Supported input data formats are raw, uio and mblk. + */ +/*ARGSUSED*/ +static int +skein_update(crypto_ctx_t *ctx, crypto_data_t *data, crypto_req_handle_t req) +{ + int error = CRYPTO_SUCCESS; + + ASSERT(SKEIN_CTX(ctx) != NULL); + + switch (data->cd_format) { + case CRYPTO_DATA_RAW: + SKEIN_OP(SKEIN_CTX(ctx), Update, + (uint8_t *)data->cd_raw.iov_base + data->cd_offset, + data->cd_length); + break; + case CRYPTO_DATA_UIO: + error = skein_digest_update_uio(SKEIN_CTX(ctx), data); + break; + case CRYPTO_DATA_MBLK: + error = skein_digest_update_mblk(SKEIN_CTX(ctx), data); + break; + default: + error = CRYPTO_ARGUMENTS_BAD; + } + + return (error); +} + +/* + * Performs a skein Final, writing the output to `digest'. This is used both + * for digest and MAC operation. + * Supported output digest formats are raw, uio and mblk. + */ +/*ARGSUSED*/ +static int +skein_final(crypto_ctx_t *ctx, crypto_data_t *digest, crypto_req_handle_t req) +{ + int error = CRYPTO_SUCCESS; + + ASSERT(SKEIN_CTX(ctx) != NULL); + + if (digest->cd_length < + CRYPTO_BITS2BYTES(SKEIN_CTX(ctx)->sc_digest_bitlen)) { + digest->cd_length = + CRYPTO_BITS2BYTES(SKEIN_CTX(ctx)->sc_digest_bitlen); + return (CRYPTO_BUFFER_TOO_SMALL); + } + + switch (digest->cd_format) { + case CRYPTO_DATA_RAW: + SKEIN_OP(SKEIN_CTX(ctx), Final, + (uint8_t *)digest->cd_raw.iov_base + digest->cd_offset); + break; + case CRYPTO_DATA_UIO: + error = skein_digest_final_uio(SKEIN_CTX(ctx), digest, req); + break; + case CRYPTO_DATA_MBLK: + error = skein_digest_final_mblk(SKEIN_CTX(ctx), digest, req); + break; + default: + error = CRYPTO_ARGUMENTS_BAD; + } + + if (error == CRYPTO_SUCCESS) + digest->cd_length = + CRYPTO_BITS2BYTES(SKEIN_CTX(ctx)->sc_digest_bitlen); + else + digest->cd_length = 0; + + bzero(SKEIN_CTX(ctx), sizeof (*SKEIN_CTX(ctx))); + kmem_free(SKEIN_CTX(ctx), sizeof (*(SKEIN_CTX(ctx)))); + SKEIN_CTX_LVALUE(ctx) = NULL; + + return (error); +} + +/* + * Performs a full skein digest computation in a single call, configuring the + * algorithm according to `mechanism', reading the input to be digested from + * `data' and writing the output to `digest'. + * Supported input/output formats are raw, uio and mblk. + */ +/*ARGSUSED*/ +static int +skein_digest_atomic(crypto_provider_handle_t provider, + crypto_session_id_t session_id, crypto_mechanism_t *mechanism, + crypto_data_t *data, crypto_data_t *digest, crypto_req_handle_t req) +{ + int error; + skein_ctx_t skein_ctx; + crypto_ctx_t ctx; + SKEIN_CTX_LVALUE(&ctx) = &skein_ctx; + + /* Init */ + if (!VALID_SKEIN_DIGEST_MECH(mechanism->cm_type)) + return (CRYPTO_MECHANISM_INVALID); + skein_ctx.sc_mech_type = mechanism->cm_type; + error = skein_get_digest_bitlen(mechanism, &skein_ctx.sc_digest_bitlen); + if (error != CRYPTO_SUCCESS) + goto out; + SKEIN_OP(&skein_ctx, Init, skein_ctx.sc_digest_bitlen); + + if ((error = skein_update(&ctx, data, digest)) != CRYPTO_SUCCESS) + goto out; + if ((error = skein_final(&ctx, data, digest)) != CRYPTO_SUCCESS) + goto out; + +out: + if (error == CRYPTO_SUCCESS) + digest->cd_length = + CRYPTO_BITS2BYTES(skein_ctx.sc_digest_bitlen); + else + digest->cd_length = 0; + bzero(&skein_ctx, sizeof (skein_ctx)); + + return (error); +} + +/* + * Helper function that builds a Skein MAC context from the provided + * mechanism and key. + */ +static int +skein_mac_ctx_build(skein_ctx_t *ctx, crypto_mechanism_t *mechanism, + crypto_key_t *key) +{ + int error; + + if (!VALID_SKEIN_MAC_MECH(mechanism->cm_type)) + return (CRYPTO_MECHANISM_INVALID); + if (key->ck_format != CRYPTO_KEY_RAW) + return (CRYPTO_ARGUMENTS_BAD); + ctx->sc_mech_type = mechanism->cm_type; + error = skein_get_digest_bitlen(mechanism, &ctx->sc_digest_bitlen); + if (error != CRYPTO_SUCCESS) + return (error); + SKEIN_OP(ctx, InitExt, ctx->sc_digest_bitlen, 0, key->ck_data, + CRYPTO_BITS2BYTES(key->ck_length)); + + return (CRYPTO_SUCCESS); +} + +/* + * KCF software provide mac entry points. + */ +/* + * Initializes a skein MAC context. You may pass a ctx_template, in which + * case the template will be reused to make initialization more efficient. + * Otherwise a new context will be constructed. The mechanism cm_type must + * be one of SKEIN_*_MAC_MECH_INFO_TYPE. Same as in skein_digest_init, you + * may pass a skein_param_t in cm_param to configure the length of the + * digest. The key must be in raw format. + */ +static int +skein_mac_init(crypto_ctx_t *ctx, crypto_mechanism_t *mechanism, + crypto_key_t *key, crypto_spi_ctx_template_t ctx_template, + crypto_req_handle_t req) +{ + int error; + + SKEIN_CTX_LVALUE(ctx) = kmem_alloc(sizeof (*SKEIN_CTX(ctx)), + crypto_kmflag(req)); + if (SKEIN_CTX(ctx) == NULL) + return (CRYPTO_HOST_MEMORY); + + if (ctx_template != NULL) { + bcopy(ctx_template, SKEIN_CTX(ctx), + sizeof (*SKEIN_CTX(ctx))); + } else { + error = skein_mac_ctx_build(SKEIN_CTX(ctx), mechanism, key); + if (error != CRYPTO_SUCCESS) + goto errout; + } + + return (CRYPTO_SUCCESS); +errout: + bzero(SKEIN_CTX(ctx), sizeof (*SKEIN_CTX(ctx))); + kmem_free(SKEIN_CTX(ctx), sizeof (*SKEIN_CTX(ctx))); + return (error); +} + *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@freebsd.org Wed Oct 14 11:33:08 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A09CBA12CF7; Wed, 14 Oct 2015 11:33:08 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 77D2C1AF9; Wed, 14 Oct 2015 11:33:08 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t9EBX7l1028128; Wed, 14 Oct 2015 11:33:07 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9EBX7rq028126; Wed, 14 Oct 2015 11:33:07 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201510141133.t9EBX7rq028126@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Wed, 14 Oct 2015 11:33:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r289311 - in vendor/illumos/dist: lib/libzfs/common man/man1m 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 " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Oct 2015 11:33:08 -0000 Author: mav Date: Wed Oct 14 11:33:07 2015 New Revision: 289311 URL: https://svnweb.freebsd.org/changeset/base/289311 Log: 5764 "zfs send -nv" directs output to stderr Reviewed by: Matthew Ahrens Reviewed by: Paul Dagnelie Reviewed by: Basil Crow Reviewed by: Steven Hartland Reviewed by: Bayard Bell Approved by: Dan McDonald Author: Manoj Joseph illumos/illumos-gate@dc5f28a3c341db7c241bba77ddc109c141072f27 Modified: vendor/illumos/dist/lib/libzfs/common/libzfs_sendrecv.c vendor/illumos/dist/man/man1m/zfs.1m Modified: vendor/illumos/dist/lib/libzfs/common/libzfs_sendrecv.c ============================================================================== --- vendor/illumos/dist/lib/libzfs/common/libzfs_sendrecv.c Wed Oct 14 11:12:47 2015 (r289310) +++ vendor/illumos/dist/lib/libzfs/common/libzfs_sendrecv.c Wed Oct 14 11:33:07 2015 (r289311) @@ -809,7 +809,8 @@ typedef struct send_dump_data { char prevsnap[ZFS_MAXNAMELEN]; uint64_t prevsnap_obj; boolean_t seenfrom, seento, replicate, doall, fromorigin; - boolean_t verbose, dryrun, parsable, progress, embed_data, large_block; + boolean_t verbose, dryrun, parsable, progress, embed_data, std_out; + boolean_t large_block; int outfd; boolean_t err; nvlist_t *fss; @@ -1037,6 +1038,7 @@ dump_snapshot(zfs_handle_t *zhp, void *a int err; boolean_t isfromsnap, istosnap, fromorigin; boolean_t exclude = B_FALSE; + FILE *fout = sdd->std_out ? stdout : stderr; err = 0; thissnap = strchr(zhp->zfs_name, '@') + 1; @@ -1111,30 +1113,30 @@ dump_snapshot(zfs_handle_t *zhp, void *a if (sdd->parsable) { if (sdd->prevsnap[0] != '\0') { - (void) fprintf(stderr, "incremental\t%s\t%s", + (void) fprintf(fout, "incremental\t%s\t%s", sdd->prevsnap, zhp->zfs_name); } else { - (void) fprintf(stderr, "full\t%s", + (void) fprintf(fout, "full\t%s", zhp->zfs_name); } } else { - (void) fprintf(stderr, dgettext(TEXT_DOMAIN, + (void) fprintf(fout, dgettext(TEXT_DOMAIN, "send from @%s to %s"), sdd->prevsnap, zhp->zfs_name); } if (err == 0) { if (sdd->parsable) { - (void) fprintf(stderr, "\t%llu\n", + (void) fprintf(fout, "\t%llu\n", (longlong_t)size); } else { char buf[16]; zfs_nicenum(size, buf, sizeof (buf)); - (void) fprintf(stderr, dgettext(TEXT_DOMAIN, + (void) fprintf(fout, dgettext(TEXT_DOMAIN, " estimated size is %s\n"), buf); } sdd->size += size; } else { - (void) fprintf(stderr, "\n"); + (void) fprintf(fout, "\n"); } } @@ -1378,6 +1380,7 @@ zfs_send(zfs_handle_t *zhp, const char * int pipefd[2]; dedup_arg_t dda = { 0 }; int featureflags = 0; + FILE *fout; (void) snprintf(errbuf, sizeof (errbuf), dgettext(TEXT_DOMAIN, "cannot send '%s'"), zhp->zfs_name); @@ -1505,6 +1508,9 @@ zfs_send(zfs_handle_t *zhp, const char * sdd.filter_cb_arg = cb_arg; if (debugnvp) sdd.debugnv = *debugnvp; + if (sdd.verbose && sdd.dryrun) + sdd.std_out = B_TRUE; + fout = sdd.std_out ? stdout : stderr; /* * Some flags require that we place user holds on the datasets that are @@ -1544,12 +1550,12 @@ zfs_send(zfs_handle_t *zhp, const char * if (flags->verbose) { if (flags->parsable) { - (void) fprintf(stderr, "size\t%llu\n", + (void) fprintf(fout, "size\t%llu\n", (longlong_t)sdd.size); } else { char buf[16]; zfs_nicenum(sdd.size, buf, sizeof (buf)); - (void) fprintf(stderr, dgettext(TEXT_DOMAIN, + (void) fprintf(fout, dgettext(TEXT_DOMAIN, "total estimated size is %s\n"), buf); } } Modified: vendor/illumos/dist/man/man1m/zfs.1m ============================================================================== --- vendor/illumos/dist/man/man1m/zfs.1m Wed Oct 14 11:12:47 2015 (r289310) +++ vendor/illumos/dist/man/man1m/zfs.1m Wed Oct 14 11:33:07 2015 (r289311) @@ -3061,7 +3061,9 @@ Include the dataset's properties in the .RS 4n Do a dry-run ("No-op") send. Do not generate any actual send data. This is useful in conjunction with the \fB-v\fR or \fB-P\fR flags to determine what -data will be sent. +data will be sent. In this case, the verbose output will be written to +standard output (contrast with a non-dry-run, where the stream is written +to standard output and the verbose output goes to standard error). .RE .sp From owner-svn-src-all@freebsd.org Wed Oct 14 11:36:56 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A7E6CA12E6B; Wed, 14 Oct 2015 11:36:56 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6DC841DEF; Wed, 14 Oct 2015 11:36:56 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t9EBat03028404; Wed, 14 Oct 2015 11:36:55 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9EBatb8028399; Wed, 14 Oct 2015 11:36:55 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201510141136.t9EBatb8028399@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Wed, 14 Oct 2015 11:36:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r289312 - vendor-sys/illumos/dist/common/zfs vendor-sys/illumos/dist/uts/common/fs/zfs vendor-sys/illumos/dist/uts/common/fs/zfs/sys vendor-sys/illumos/dist/uts/common/sys/fs vendor/ill... X-SVN-Group: vendor-sys MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Oct 2015 11:36:56 -0000 Author: mav Date: Wed Oct 14 11:36:55 2015 New Revision: 289312 URL: https://svnweb.freebsd.org/changeset/base/289312 Log: 2605 want to resume interrupted zfs send Reviewed by: George Wilson Reviewed by: Paul Dagnelie Reviewed by: Richard Elling Reviewed by: Xin Li Reviewed by: Arne Jansen Approved by: Dan McDonald Author: Matthew Ahrens illumos/illumos-gate@9c3fd1216fa7fb02cfbc78a2518a686d54b48ab8 Modified: vendor-sys/illumos/dist/common/zfs/zfs_prop.c vendor-sys/illumos/dist/uts/common/fs/zfs/dmu_objset.c vendor-sys/illumos/dist/uts/common/fs/zfs/dmu_send.c vendor-sys/illumos/dist/uts/common/fs/zfs/dmu_traverse.c vendor-sys/illumos/dist/uts/common/fs/zfs/dsl_dataset.c vendor-sys/illumos/dist/uts/common/fs/zfs/dsl_destroy.c vendor-sys/illumos/dist/uts/common/fs/zfs/sys/dmu_impl.h vendor-sys/illumos/dist/uts/common/fs/zfs/sys/dmu_send.h vendor-sys/illumos/dist/uts/common/fs/zfs/sys/dmu_traverse.h vendor-sys/illumos/dist/uts/common/fs/zfs/sys/dsl_dataset.h vendor-sys/illumos/dist/uts/common/fs/zfs/sys/zfs_ioctl.h vendor-sys/illumos/dist/uts/common/fs/zfs/zfs_ioctl.c vendor-sys/illumos/dist/uts/common/sys/fs/zfs.h Changes in other areas also in this revision: Modified: vendor/illumos/dist/cmd/zfs/zfs_main.c vendor/illumos/dist/cmd/zstreamdump/zstreamdump.c vendor/illumos/dist/lib/libzfs/common/libzfs.h vendor/illumos/dist/lib/libzfs/common/libzfs_dataset.c vendor/illumos/dist/lib/libzfs/common/libzfs_mount.c vendor/illumos/dist/lib/libzfs/common/libzfs_sendrecv.c vendor/illumos/dist/lib/libzfs_core/common/libzfs_core.c vendor/illumos/dist/lib/libzfs_core/common/libzfs_core.h Modified: vendor-sys/illumos/dist/common/zfs/zfs_prop.c ============================================================================== --- vendor-sys/illumos/dist/common/zfs/zfs_prop.c Wed Oct 14 11:33:07 2015 (r289311) +++ vendor-sys/illumos/dist/common/zfs/zfs_prop.c Wed Oct 14 11:36:55 2015 (r289312) @@ -342,6 +342,10 @@ zfs_prop_init(void) zprop_register_string(ZFS_PROP_MLSLABEL, "mlslabel", ZFS_MLSLABEL_DEFAULT, PROP_INHERIT, ZFS_TYPE_DATASET, "", "MLSLABEL"); + zprop_register_string(ZFS_PROP_RECEIVE_RESUME_TOKEN, + "receive_resume_token", + NULL, PROP_READONLY, ZFS_TYPE_FILESYSTEM | ZFS_TYPE_VOLUME, + "", "RESUMETOK"); /* readonly number properties */ zprop_register_number(ZFS_PROP_USED, "used", 0, PROP_READONLY, Modified: vendor-sys/illumos/dist/uts/common/fs/zfs/dmu_objset.c ============================================================================== --- vendor-sys/illumos/dist/uts/common/fs/zfs/dmu_objset.c Wed Oct 14 11:33:07 2015 (r289311) +++ vendor-sys/illumos/dist/uts/common/fs/zfs/dmu_objset.c Wed Oct 14 11:36:55 2015 (r289312) @@ -362,6 +362,17 @@ dmu_objset_open_impl(spa_t *spa, dsl_dat * checksum/compression/copies. */ if (ds != NULL) { + boolean_t needlock = B_FALSE; + + /* + * Note: it's valid to open the objset if the dataset is + * long-held, in which case the pool_config lock will not + * be held. + */ + if (!dsl_pool_config_held(dmu_objset_pool(os))) { + needlock = B_TRUE; + dsl_pool_config_enter(dmu_objset_pool(os), FTAG); + } err = dsl_prop_register(ds, zfs_prop_to_name(ZFS_PROP_PRIMARYCACHE), primary_cache_changed_cb, os); @@ -413,6 +424,8 @@ dmu_objset_open_impl(spa_t *spa, dsl_dat recordsize_changed_cb, os); } } + if (needlock) + dsl_pool_config_exit(dmu_objset_pool(os), FTAG); if (err != 0) { VERIFY(arc_buf_remove_ref(os->os_phys_buf, &os->os_phys_buf)); @@ -469,6 +482,13 @@ dmu_objset_from_ds(dsl_dataset_t *ds, ob { int err = 0; + /* + * We shouldn't be doing anything with dsl_dataset_t's unless the + * pool_config lock is held, or the dataset is long-held. + */ + ASSERT(dsl_pool_config_held(ds->ds_dir->dd_pool) || + dsl_dataset_long_held(ds)); + mutex_enter(&ds->ds_opening_lock); if (ds->ds_objset == NULL) { objset_t *os; Modified: vendor-sys/illumos/dist/uts/common/fs/zfs/dmu_send.c ============================================================================== --- vendor-sys/illumos/dist/uts/common/fs/zfs/dmu_send.c Wed Oct 14 11:33:07 2015 (r289311) +++ vendor-sys/illumos/dist/uts/common/fs/zfs/dmu_send.c Wed Oct 14 11:36:55 2015 (r289312) @@ -60,12 +60,14 @@ int zfs_send_queue_length = 16 * 1024 * int zfs_recv_queue_length = 16 * 1024 * 1024; static char *dmu_recv_tag = "dmu_recv_tag"; -static const char *recv_clone_name = "%recv"; +const char *recv_clone_name = "%recv"; #define BP_SPAN(datablkszsec, indblkshift, level) \ (((uint64_t)datablkszsec) << (SPA_MINBLOCKSHIFT + \ (level) * (indblkshift - SPA_BLKPTRSHIFT))) +static void byteswap_record(dmu_replay_record_t *drr); + struct send_thread_arg { bqueue_t q; dsl_dataset_t *ds; /* Dataset to traverse */ @@ -73,6 +75,7 @@ struct send_thread_arg { int flags; /* flags to pass to traverse_dataset */ int error_code; boolean_t cancel; + zbookmark_phys_t resume; }; struct send_block_record { @@ -87,7 +90,7 @@ struct send_block_record { static int dump_bytes(dmu_sendarg_t *dsp, void *buf, int len) { - dsl_dataset_t *ds = dsp->dsa_os->os_dsl_dataset; + dsl_dataset_t *ds = dmu_objset_ds(dsp->dsa_os); ssize_t resid; /* have to get resid to get detailed errno */ ASSERT0(len % 8); @@ -145,7 +148,7 @@ dump_free(dmu_sendarg_t *dsp, uint64_t o * that the receiving system doesn't have any dbufs in the range * being freed. This is always true because there is a one-record * constraint: we only send one WRITE record for any given - * object+offset. We know that the one-record constraint is + * object,offset. We know that the one-record constraint is * true because we always send data in increasing order by * object,offset. * @@ -394,6 +397,19 @@ dump_dnode(dmu_sendarg_t *dsp, uint64_t { struct drr_object *drro = &(dsp->dsa_drr->drr_u.drr_object); + if (object < dsp->dsa_resume_object) { + /* + * Note: when resuming, we will visit all the dnodes in + * the block of dnodes that we are resuming from. In + * this case it's unnecessary to send the dnodes prior to + * the one we are resuming from. We should be at most one + * block's worth of dnodes behind the resume point. + */ + ASSERT3U(dsp->dsa_resume_object - object, <, + 1 << (DNODE_BLOCK_SHIFT - DNODE_SHIFT)); + return (0); + } + if (dnp == NULL || dnp->dn_type == DMU_OT_NONE) return (dump_freeobjects(dsp, object, 1)); @@ -474,6 +490,9 @@ send_cb(spa_t *spa, zilog_t *zilog, cons uint64_t record_size; int err = 0; + ASSERT(zb->zb_object == DMU_META_DNODE_OBJECT || + zb->zb_object >= sta->resume.zb_object); + if (sta->cancel) return (SET_ERROR(EINTR)); @@ -510,8 +529,10 @@ send_traverse_thread(void *arg) struct send_block_record *data; if (st_arg->ds != NULL) { - err = traverse_dataset(st_arg->ds, st_arg->fromtxg, - st_arg->flags, send_cb, arg); + err = traverse_dataset_resume(st_arg->ds, + st_arg->fromtxg, &st_arg->resume, + st_arg->flags, send_cb, st_arg); + if (err != EINTR) st_arg->error_code = err; } @@ -539,6 +560,9 @@ do_dump(dmu_sendarg_t *dsa, struct send_ ASSERT3U(zb->zb_level, >=, 0); + ASSERT(zb->zb_object == DMU_META_DNODE_OBJECT || + zb->zb_object >= dsa->dsa_resume_object); + if (zb->zb_object != DMU_META_DNODE_OBJECT && DMU_OBJECT_IS_SPECIAL(zb->zb_object)) { return (0); @@ -599,6 +623,10 @@ do_dump(dmu_sendarg_t *dsa, struct send_ uint64_t offset; ASSERT0(zb->zb_level); + ASSERT(zb->zb_object > dsa->dsa_resume_object || + (zb->zb_object == dsa->dsa_resume_object && + zb->zb_blkid * blksz >= dsa->dsa_resume_offset)); + if (arc_read(NULL, spa, bp, arc_getbuf_func, &abuf, ZIO_PRIORITY_ASYNC_READ, ZIO_FLAG_CANFAIL, &aflags, zb) != 0) { @@ -659,8 +687,10 @@ get_next_record(bqueue_t *bq, struct sen */ static int dmu_send_impl(void *tag, dsl_pool_t *dp, dsl_dataset_t *to_ds, - zfs_bookmark_phys_t *ancestor_zb, boolean_t is_clone, boolean_t embedok, - boolean_t large_block_ok, int outfd, vnode_t *vp, offset_t *off) + zfs_bookmark_phys_t *ancestor_zb, + boolean_t is_clone, boolean_t embedok, boolean_t large_block_ok, int outfd, + uint64_t resumeobj, uint64_t resumeoff, + vnode_t *vp, offset_t *off) { objset_t *os; dmu_replay_record_t *drr; @@ -668,7 +698,7 @@ dmu_send_impl(void *tag, dsl_pool_t *dp, int err; uint64_t fromtxg = 0; uint64_t featureflags = 0; - struct send_thread_arg to_arg; + struct send_thread_arg to_arg = { 0 }; err = dmu_objset_from_ds(to_ds, &os); if (err != 0) { @@ -705,6 +735,10 @@ dmu_send_impl(void *tag, dsl_pool_t *dp, featureflags |= DMU_BACKUP_FEATURE_EMBED_DATA_LZ4; } + if (resumeobj != 0 || resumeoff != 0) { + featureflags |= DMU_BACKUP_FEATURE_RESUMING; + } + DMU_SET_FEATUREFLAGS(drr->drr_u.drr_begin.drr_versioninfo, featureflags); @@ -740,6 +774,8 @@ dmu_send_impl(void *tag, dsl_pool_t *dp, dsp->dsa_pending_op = PENDING_NONE; dsp->dsa_incremental = (ancestor_zb != NULL); dsp->dsa_featureflags = featureflags; + dsp->dsa_resume_object = resumeobj; + dsp->dsa_resume_offset = resumeoff; mutex_enter(&to_ds->ds_sendstream_lock); list_insert_head(&to_ds->ds_sendstreams, dsp); @@ -748,7 +784,27 @@ dmu_send_impl(void *tag, dsl_pool_t *dp, dsl_dataset_long_hold(to_ds, FTAG); dsl_pool_rele(dp, tag); - if (dump_record(dsp, NULL, 0) != 0) { + void *payload = NULL; + size_t payload_len = 0; + if (resumeobj != 0 || resumeoff != 0) { + dmu_object_info_t to_doi; + err = dmu_object_info(os, resumeobj, &to_doi); + if (err != 0) + goto out; + SET_BOOKMARK(&to_arg.resume, to_ds->ds_object, resumeobj, 0, + resumeoff / to_doi.doi_data_block_size); + + nvlist_t *nvl = fnvlist_alloc(); + fnvlist_add_uint64(nvl, "resume_object", resumeobj); + fnvlist_add_uint64(nvl, "resume_offset", resumeoff); + payload = fnvlist_pack(nvl, &payload_len); + drr->drr_payloadlen = payload_len; + fnvlist_free(nvl); + } + + err = dump_record(dsp, payload, payload_len); + fnvlist_pack_free(payload, payload_len); + if (err != 0) { err = dsp->dsa_err; goto out; } @@ -859,19 +915,19 @@ dmu_send_obj(const char *pool, uint64_t is_clone = (fromds->ds_dir != ds->ds_dir); dsl_dataset_rele(fromds, FTAG); err = dmu_send_impl(FTAG, dp, ds, &zb, is_clone, - embedok, large_block_ok, outfd, vp, off); + embedok, large_block_ok, outfd, 0, 0, vp, off); } else { err = dmu_send_impl(FTAG, dp, ds, NULL, B_FALSE, - embedok, large_block_ok, outfd, vp, off); + embedok, large_block_ok, outfd, 0, 0, vp, off); } dsl_dataset_rele(ds, FTAG); return (err); } int -dmu_send(const char *tosnap, const char *fromsnap, - boolean_t embedok, boolean_t large_block_ok, - int outfd, vnode_t *vp, offset_t *off) +dmu_send(const char *tosnap, const char *fromsnap, boolean_t embedok, + boolean_t large_block_ok, int outfd, uint64_t resumeobj, uint64_t resumeoff, + vnode_t *vp, offset_t *off) { dsl_pool_t *dp; dsl_dataset_t *ds; @@ -938,10 +994,12 @@ dmu_send(const char *tosnap, const char return (err); } err = dmu_send_impl(FTAG, dp, ds, &zb, is_clone, - embedok, large_block_ok, outfd, vp, off); + embedok, large_block_ok, + outfd, resumeobj, resumeoff, vp, off); } else { err = dmu_send_impl(FTAG, dp, ds, NULL, B_FALSE, - embedok, large_block_ok, outfd, vp, off); + embedok, large_block_ok, + outfd, resumeobj, resumeoff, vp, off); } if (owned) dsl_dataset_disown(ds, FTAG); @@ -1184,6 +1242,7 @@ dmu_recv_begin_check(void *arg, dmu_tx_t /* already checked */ ASSERT3U(drrb->drr_magic, ==, DMU_BACKUP_MAGIC); + ASSERT(!(featureflags & DMU_BACKUP_FEATURE_RESUMING)); if (DMU_GET_STREAM_HDRTYPE(drrb->drr_versioninfo) == DMU_COMPOUNDSTREAM || @@ -1196,6 +1255,10 @@ dmu_recv_begin_check(void *arg, dmu_tx_t spa_version(dp->dp_spa) < SPA_VERSION_SA) return (SET_ERROR(ENOTSUP)); + if (drba->drba_cookie->drc_resumable && + !spa_feature_is_enabled(dp->dp_spa, SPA_FEATURE_EXTENSIBLE_DATASET)) + return (SET_ERROR(ENOTSUP)); + /* * The receiving code doesn't know how to translate a WRITE_EMBEDDED * record to a plan WRITE record, so the pool must have the @@ -1299,15 +1362,16 @@ dmu_recv_begin_sync(void *arg, dmu_tx_t { dmu_recv_begin_arg_t *drba = arg; dsl_pool_t *dp = dmu_tx_pool(tx); + objset_t *mos = dp->dp_meta_objset; struct drr_begin *drrb = drba->drba_cookie->drc_drrb; const char *tofs = drba->drba_cookie->drc_tofs; dsl_dataset_t *ds, *newds; uint64_t dsobj; int error; - uint64_t crflags; + uint64_t crflags = 0; - crflags = (drrb->drr_flags & DRR_FLAG_CI_DATA) ? - DS_FLAG_CI_DATASET : 0; + if (drrb->drr_flags & DRR_FLAG_CI_DATA) + crflags |= DS_FLAG_CI_DATASET; error = dsl_dataset_hold(dp, tofs, FTAG, &ds); if (error == 0) { @@ -1345,6 +1409,31 @@ dmu_recv_begin_sync(void *arg, dmu_tx_t } VERIFY0(dsl_dataset_own_obj(dp, dsobj, dmu_recv_tag, &newds)); + if (drba->drba_cookie->drc_resumable) { + dsl_dataset_zapify(newds, tx); + if (drrb->drr_fromguid != 0) { + VERIFY0(zap_add(mos, dsobj, DS_FIELD_RESUME_FROMGUID, + 8, 1, &drrb->drr_fromguid, tx)); + } + VERIFY0(zap_add(mos, dsobj, DS_FIELD_RESUME_TOGUID, + 8, 1, &drrb->drr_toguid, tx)); + VERIFY0(zap_add(mos, dsobj, DS_FIELD_RESUME_TONAME, + 1, strlen(drrb->drr_toname) + 1, drrb->drr_toname, tx)); + uint64_t one = 1; + uint64_t zero = 0; + VERIFY0(zap_add(mos, dsobj, DS_FIELD_RESUME_OBJECT, + 8, 1, &one, tx)); + VERIFY0(zap_add(mos, dsobj, DS_FIELD_RESUME_OFFSET, + 8, 1, &zero, tx)); + VERIFY0(zap_add(mos, dsobj, DS_FIELD_RESUME_BYTES, + 8, 1, &zero, tx)); + if (DMU_GET_FEATUREFLAGS(drrb->drr_versioninfo) & + DMU_BACKUP_FEATURE_EMBED_DATA) { + VERIFY0(zap_add(mos, dsobj, DS_FIELD_RESUME_EMBEDOK, + 8, 1, &one, tx)); + } + } + dmu_buf_will_dirty(newds->ds_dbuf, tx); dsl_dataset_phys(newds)->ds_flags |= DS_FLAG_INCONSISTENT; @@ -1362,56 +1451,192 @@ dmu_recv_begin_sync(void *arg, dmu_tx_t spa_history_log_internal_ds(newds, "receive", tx, ""); } +static int +dmu_recv_resume_begin_check(void *arg, dmu_tx_t *tx) +{ + dmu_recv_begin_arg_t *drba = arg; + dsl_pool_t *dp = dmu_tx_pool(tx); + struct drr_begin *drrb = drba->drba_cookie->drc_drrb; + int error; + uint64_t featureflags = DMU_GET_FEATUREFLAGS(drrb->drr_versioninfo); + dsl_dataset_t *ds; + const char *tofs = drba->drba_cookie->drc_tofs; + + /* already checked */ + ASSERT3U(drrb->drr_magic, ==, DMU_BACKUP_MAGIC); + ASSERT(featureflags & DMU_BACKUP_FEATURE_RESUMING); + + if (DMU_GET_STREAM_HDRTYPE(drrb->drr_versioninfo) == + DMU_COMPOUNDSTREAM || + drrb->drr_type >= DMU_OST_NUMTYPES) + return (SET_ERROR(EINVAL)); + + /* Verify pool version supports SA if SA_SPILL feature set */ + if ((featureflags & DMU_BACKUP_FEATURE_SA_SPILL) && + spa_version(dp->dp_spa) < SPA_VERSION_SA) + return (SET_ERROR(ENOTSUP)); + + /* + * The receiving code doesn't know how to translate a WRITE_EMBEDDED + * record to a plain WRITE record, so the pool must have the + * EMBEDDED_DATA feature enabled if the stream has WRITE_EMBEDDED + * records. Same with WRITE_EMBEDDED records that use LZ4 compression. + */ + if ((featureflags & DMU_BACKUP_FEATURE_EMBED_DATA) && + !spa_feature_is_enabled(dp->dp_spa, SPA_FEATURE_EMBEDDED_DATA)) + return (SET_ERROR(ENOTSUP)); + if ((featureflags & DMU_BACKUP_FEATURE_EMBED_DATA_LZ4) && + !spa_feature_is_enabled(dp->dp_spa, SPA_FEATURE_LZ4_COMPRESS)) + return (SET_ERROR(ENOTSUP)); + + char recvname[ZFS_MAXNAMELEN]; + + (void) snprintf(recvname, sizeof (recvname), "%s/%s", + tofs, recv_clone_name); + + if (dsl_dataset_hold(dp, recvname, FTAG, &ds) != 0) { + /* %recv does not exist; continue in tofs */ + error = dsl_dataset_hold(dp, tofs, FTAG, &ds); + if (error != 0) + return (error); + } + + /* check that ds is marked inconsistent */ + if (!DS_IS_INCONSISTENT(ds)) { + dsl_dataset_rele(ds, FTAG); + return (SET_ERROR(EINVAL)); + } + + /* check that there is resuming data, and that the toguid matches */ + if (!dsl_dataset_is_zapified(ds)) { + dsl_dataset_rele(ds, FTAG); + return (SET_ERROR(EINVAL)); + } + uint64_t val; + error = zap_lookup(dp->dp_meta_objset, ds->ds_object, + DS_FIELD_RESUME_TOGUID, sizeof (val), 1, &val); + if (error != 0 || drrb->drr_toguid != val) { + dsl_dataset_rele(ds, FTAG); + return (SET_ERROR(EINVAL)); + } + + /* + * Check if the receive is still running. If so, it will be owned. + * Note that nothing else can own the dataset (e.g. after the receive + * fails) because it will be marked inconsistent. + */ + if (dsl_dataset_has_owner(ds)) { + dsl_dataset_rele(ds, FTAG); + return (SET_ERROR(EBUSY)); + } + + /* There should not be any snapshots of this fs yet. */ + if (ds->ds_prev != NULL && ds->ds_prev->ds_dir == ds->ds_dir) { + dsl_dataset_rele(ds, FTAG); + return (SET_ERROR(EINVAL)); + } + + /* + * Note: resume point will be checked when we process the first WRITE + * record. + */ + + /* check that the origin matches */ + val = 0; + (void) zap_lookup(dp->dp_meta_objset, ds->ds_object, + DS_FIELD_RESUME_FROMGUID, sizeof (val), 1, &val); + if (drrb->drr_fromguid != val) { + dsl_dataset_rele(ds, FTAG); + return (SET_ERROR(EINVAL)); + } + + dsl_dataset_rele(ds, FTAG); + return (0); +} + +static void +dmu_recv_resume_begin_sync(void *arg, dmu_tx_t *tx) +{ + dmu_recv_begin_arg_t *drba = arg; + dsl_pool_t *dp = dmu_tx_pool(tx); + const char *tofs = drba->drba_cookie->drc_tofs; + dsl_dataset_t *ds; + uint64_t dsobj; + char recvname[ZFS_MAXNAMELEN]; + + (void) snprintf(recvname, sizeof (recvname), "%s/%s", + tofs, recv_clone_name); + + if (dsl_dataset_hold(dp, recvname, FTAG, &ds) != 0) { + /* %recv does not exist; continue in tofs */ + VERIFY0(dsl_dataset_hold(dp, tofs, FTAG, &ds)); + drba->drba_cookie->drc_newfs = B_TRUE; + } + + /* clear the inconsistent flag so that we can own it */ + ASSERT(DS_IS_INCONSISTENT(ds)); + dmu_buf_will_dirty(ds->ds_dbuf, tx); + dsl_dataset_phys(ds)->ds_flags &= ~DS_FLAG_INCONSISTENT; + dsobj = ds->ds_object; + dsl_dataset_rele(ds, FTAG); + + VERIFY0(dsl_dataset_own_obj(dp, dsobj, dmu_recv_tag, &ds)); + + dmu_buf_will_dirty(ds->ds_dbuf, tx); + dsl_dataset_phys(ds)->ds_flags |= DS_FLAG_INCONSISTENT; + + ASSERT(!BP_IS_HOLE(dsl_dataset_get_blkptr(ds))); + + drba->drba_cookie->drc_ds = ds; + + spa_history_log_internal_ds(ds, "resume receive", tx, ""); +} + /* * NB: callers *MUST* call dmu_recv_stream() if dmu_recv_begin() * succeeds; otherwise we will leak the holds on the datasets. */ int -dmu_recv_begin(char *tofs, char *tosnap, struct drr_begin *drrb, - boolean_t force, char *origin, dmu_recv_cookie_t *drc) +dmu_recv_begin(char *tofs, char *tosnap, dmu_replay_record_t *drr_begin, + boolean_t force, boolean_t resumable, char *origin, dmu_recv_cookie_t *drc) { dmu_recv_begin_arg_t drba = { 0 }; - dmu_replay_record_t *drr; bzero(drc, sizeof (dmu_recv_cookie_t)); - drc->drc_drrb = drrb; + drc->drc_drr_begin = drr_begin; + drc->drc_drrb = &drr_begin->drr_u.drr_begin; drc->drc_tosnap = tosnap; drc->drc_tofs = tofs; drc->drc_force = force; + drc->drc_resumable = resumable; drc->drc_cred = CRED(); - if (drrb->drr_magic == BSWAP_64(DMU_BACKUP_MAGIC)) + if (drc->drc_drrb->drr_magic == BSWAP_64(DMU_BACKUP_MAGIC)) { drc->drc_byteswap = B_TRUE; - else if (drrb->drr_magic != DMU_BACKUP_MAGIC) - return (SET_ERROR(EINVAL)); - - drr = kmem_zalloc(sizeof (dmu_replay_record_t), KM_SLEEP); - drr->drr_type = DRR_BEGIN; - drr->drr_u.drr_begin = *drc->drc_drrb; - if (drc->drc_byteswap) { - fletcher_4_incremental_byteswap(drr, + fletcher_4_incremental_byteswap(drr_begin, sizeof (dmu_replay_record_t), &drc->drc_cksum); - } else { - fletcher_4_incremental_native(drr, + byteswap_record(drr_begin); + } else if (drc->drc_drrb->drr_magic == DMU_BACKUP_MAGIC) { + fletcher_4_incremental_native(drr_begin, sizeof (dmu_replay_record_t), &drc->drc_cksum); - } - kmem_free(drr, sizeof (dmu_replay_record_t)); - - if (drc->drc_byteswap) { - drrb->drr_magic = BSWAP_64(drrb->drr_magic); - drrb->drr_versioninfo = BSWAP_64(drrb->drr_versioninfo); - drrb->drr_creation_time = BSWAP_64(drrb->drr_creation_time); - drrb->drr_type = BSWAP_32(drrb->drr_type); - drrb->drr_toguid = BSWAP_64(drrb->drr_toguid); - drrb->drr_fromguid = BSWAP_64(drrb->drr_fromguid); + } else { + return (SET_ERROR(EINVAL)); } drba.drba_origin = origin; drba.drba_cookie = drc; drba.drba_cred = CRED(); - return (dsl_sync_task(tofs, dmu_recv_begin_check, dmu_recv_begin_sync, - &drba, 5, ZFS_SPACE_CHECK_NORMAL)); + if (DMU_GET_FEATUREFLAGS(drc->drc_drrb->drr_versioninfo) & + DMU_BACKUP_FEATURE_RESUMING) { + return (dsl_sync_task(tofs, + dmu_recv_resume_begin_check, dmu_recv_resume_begin_sync, + &drba, 5, ZFS_SPACE_CHECK_NORMAL)); + } else { + return (dsl_sync_task(tofs, + dmu_recv_begin_check, dmu_recv_begin_sync, + &drba, 5, ZFS_SPACE_CHECK_NORMAL)); + } } struct receive_record_arg { @@ -1423,6 +1648,7 @@ struct receive_record_arg { */ arc_buf_t *write_buf; int payload_size; + uint64_t bytes_read; /* bytes read from stream when record created */ boolean_t eos_marker; /* Marks the end of the stream */ bqueue_node_t node; }; @@ -1431,6 +1657,7 @@ struct receive_writer_arg { objset_t *os; boolean_t byteswap; bqueue_t q; + /* * These three args are used to signal to the main thread that we're * done. @@ -1438,15 +1665,20 @@ struct receive_writer_arg { kmutex_t mutex; kcondvar_t cv; boolean_t done; + int err; /* A map from guid to dataset to help handle dedup'd streams. */ avl_tree_t *guid_to_ds_map; + boolean_t resumable; + uint64_t last_object, last_offset; + uint64_t bytes_read; /* bytes read when current record created */ }; struct receive_arg { objset_t *os; vnode_t *vp; /* The vnode to read the stream from */ uint64_t voff; /* The current offset in the stream */ + uint64_t bytes_read; /* * A record that has had its payload read in, but hasn't yet been handed * off to the worker thread. @@ -1518,14 +1750,21 @@ receive_read(struct receive_arg *ra, int ra->voff, UIO_SYSSPACE, FAPPEND, RLIM64_INFINITY, CRED(), &resid); - if (resid == len - done) - ra->err = SET_ERROR(EINVAL); + if (resid == len - done) { + /* + * Note: ECKSUM indicates that the receive + * was interrupted and can potentially be resumed. + */ + ra->err = SET_ERROR(ECKSUM); + } ra->voff += len - done - resid; done = len - resid; if (ra->err != 0) return (ra->err); } + ra->bytes_read += len; + ASSERT3U(done, ==, len); return (0); } @@ -1626,6 +1865,43 @@ deduce_nblkptr(dmu_object_type_t bonus_t } } +static void +save_resume_state(struct receive_writer_arg *rwa, + uint64_t object, uint64_t offset, dmu_tx_t *tx) +{ + int txgoff = dmu_tx_get_txg(tx) & TXG_MASK; + + if (!rwa->resumable) + return; + + /* + * We use ds_resume_bytes[] != 0 to indicate that we need to + * update this on disk, so it must not be 0. + */ + ASSERT(rwa->bytes_read != 0); + + /* + * We only resume from write records, which have a valid + * (non-meta-dnode) object number. + */ + ASSERT(object != 0); + + /* + * For resuming to work correctly, we must receive records in order, + * sorted by object,offset. This is checked by the callers, but + * assert it here for good measure. + */ + ASSERT3U(object, >=, rwa->os->os_dsl_dataset->ds_resume_object[txgoff]); + ASSERT(object != rwa->os->os_dsl_dataset->ds_resume_object[txgoff] || + offset >= rwa->os->os_dsl_dataset->ds_resume_offset[txgoff]); + ASSERT3U(rwa->bytes_read, >=, + rwa->os->os_dsl_dataset->ds_resume_bytes[txgoff]); + + rwa->os->os_dsl_dataset->ds_resume_object[txgoff] = object; + rwa->os->os_dsl_dataset->ds_resume_offset[txgoff] = offset; + rwa->os->os_dsl_dataset->ds_resume_bytes[txgoff] = rwa->bytes_read; +} + static int receive_object(struct receive_writer_arg *rwa, struct drr_object *drro, void *data) @@ -1722,6 +1998,7 @@ receive_object(struct receive_writer_arg dmu_buf_rele(db, FTAG); } dmu_tx_commit(tx); + return (0); } @@ -1747,6 +2024,7 @@ receive_freeobjects(struct receive_write if (err != 0) return (err); } + return (0); } @@ -1761,6 +2039,18 @@ receive_write(struct receive_writer_arg !DMU_OT_IS_VALID(drrw->drr_type)) return (SET_ERROR(EINVAL)); + /* + * For resuming to work, records must be in increasing order + * by (object, offset). + */ + if (drrw->drr_object < rwa->last_object || + (drrw->drr_object == rwa->last_object && + drrw->drr_offset < rwa->last_offset)) { + return (SET_ERROR(EINVAL)); + } + rwa->last_object = drrw->drr_object; + rwa->last_offset = drrw->drr_offset; + if (dmu_object_info(rwa->os, drrw->drr_object, NULL) != 0) return (SET_ERROR(EINVAL)); @@ -1784,8 +2074,17 @@ receive_write(struct receive_writer_arg if (dmu_bonus_hold(rwa->os, drrw->drr_object, FTAG, &bonus) != 0) return (SET_ERROR(EINVAL)); dmu_assign_arcbuf(bonus, drrw->drr_offset, abuf, tx); + + /* + * Note: If the receive fails, we want the resume stream to start + * with the same record that we last successfully received (as opposed + * to the next record), so that we can verify that we are + * resuming from the correct location. + */ + save_resume_state(rwa, drrw->drr_object, drrw->drr_offset, tx); dmu_tx_commit(tx); dmu_buf_rele(bonus, FTAG); + return (0); } @@ -1844,43 +2143,48 @@ receive_write_byref(struct receive_write dmu_write(rwa->os, drrwbr->drr_object, drrwbr->drr_offset, drrwbr->drr_length, dbp->db_data, tx); dmu_buf_rele(dbp, FTAG); + + /* See comment in restore_write. */ + save_resume_state(rwa, drrwbr->drr_object, drrwbr->drr_offset, tx); dmu_tx_commit(tx); return (0); } static int receive_write_embedded(struct receive_writer_arg *rwa, - struct drr_write_embedded *drrwnp, void *data) + struct drr_write_embedded *drrwe, void *data) { dmu_tx_t *tx; int err; - if (drrwnp->drr_offset + drrwnp->drr_length < drrwnp->drr_offset) + if (drrwe->drr_offset + drrwe->drr_length < drrwe->drr_offset) return (EINVAL); - if (drrwnp->drr_psize > BPE_PAYLOAD_SIZE) + if (drrwe->drr_psize > BPE_PAYLOAD_SIZE) return (EINVAL); - if (drrwnp->drr_etype >= NUM_BP_EMBEDDED_TYPES) + if (drrwe->drr_etype >= NUM_BP_EMBEDDED_TYPES) return (EINVAL); - if (drrwnp->drr_compression >= ZIO_COMPRESS_FUNCTIONS) + if (drrwe->drr_compression >= ZIO_COMPRESS_FUNCTIONS) return (EINVAL); tx = dmu_tx_create(rwa->os); - dmu_tx_hold_write(tx, drrwnp->drr_object, - drrwnp->drr_offset, drrwnp->drr_length); + dmu_tx_hold_write(tx, drrwe->drr_object, + drrwe->drr_offset, drrwe->drr_length); err = dmu_tx_assign(tx, TXG_WAIT); if (err != 0) { dmu_tx_abort(tx); return (err); } - dmu_write_embedded(rwa->os, drrwnp->drr_object, - drrwnp->drr_offset, data, drrwnp->drr_etype, - drrwnp->drr_compression, drrwnp->drr_lsize, drrwnp->drr_psize, + dmu_write_embedded(rwa->os, drrwe->drr_object, + drrwe->drr_offset, data, drrwe->drr_etype, + drrwe->drr_compression, drrwe->drr_lsize, drrwe->drr_psize, rwa->byteswap ^ ZFS_HOST_BYTEORDER, tx); + /* See comment in restore_write. */ + save_resume_state(rwa, drrwe->drr_object, drrwe->drr_offset, tx); dmu_tx_commit(tx); return (0); } @@ -1954,10 +2258,16 @@ receive_free(struct receive_writer_arg * static void dmu_recv_cleanup_ds(dmu_recv_cookie_t *drc) { - char name[MAXNAMELEN]; - dsl_dataset_name(drc->drc_ds, name); - dsl_dataset_disown(drc->drc_ds, dmu_recv_tag); - (void) dsl_destroy_head(name); + if (drc->drc_resumable) { + /* wait for our resume state to be written to disk */ + txg_wait_synced(drc->drc_ds->ds_dir->dd_pool, 0); + dsl_dataset_disown(drc->drc_ds, dmu_recv_tag); + } else { + char name[MAXNAMELEN]; + dsl_dataset_name(drc->drc_ds, name); + dsl_dataset_disown(drc->drc_ds, dmu_recv_tag); + (void) dsl_destroy_head(name); + } } static void @@ -1984,12 +2294,17 @@ receive_read_payload_and_next_header(str if (len != 0) { ASSERT3U(len, <=, SPA_MAXBLOCKSIZE); - ra->rrd->payload = buf; - ra->rrd->payload_size = len; - err = receive_read(ra, len, ra->rrd->payload); + err = receive_read(ra, len, buf); if (err != 0) return (err); - receive_cksum(ra, len, ra->rrd->payload); + receive_cksum(ra, len, buf); + + /* note: rrd is NULL when reading the begin record's payload */ + if (ra->rrd != NULL) { + ra->rrd->payload = buf; + ra->rrd->payload_size = len; + ra->rrd->bytes_read = ra->bytes_read; + } } ra->prev_cksum = ra->cksum; @@ -1997,6 +2312,7 @@ receive_read_payload_and_next_header(str ra->next_rrd = kmem_zalloc(sizeof (*ra->next_rrd), KM_SLEEP); err = receive_read(ra, sizeof (ra->next_rrd->header), &ra->next_rrd->header); + ra->next_rrd->bytes_read = ra->bytes_read; if (err != 0) { kmem_free(ra->next_rrd, sizeof (*ra->next_rrd)); ra->next_rrd = NULL; @@ -2176,7 +2492,7 @@ receive_read_record(struct receive_arg * { struct drr_end *drre = &ra->rrd->header.drr_u.drr_end; if (!ZIO_CHECKSUM_EQUAL(ra->prev_cksum, drre->drr_checksum)) - return (SET_ERROR(EINVAL)); + return (SET_ERROR(ECKSUM)); return (0); } case DRR_SPILL: @@ -2203,6 +2519,10 @@ receive_process_record(struct receive_wr { int err; + /* Processing in order, therefore bytes_read should be increasing. */ + ASSERT3U(rrd->bytes_read, >=, rwa->bytes_read); + rwa->bytes_read = rrd->bytes_read; + switch (rrd->header.drr_type) { case DRR_OBJECT: { @@ -2297,6 +2617,33 @@ receive_writer_thread(void *arg) mutex_exit(&rwa->mutex); } +static int +resume_check(struct receive_arg *ra, nvlist_t *begin_nvl) +{ + uint64_t val; + objset_t *mos = dmu_objset_pool(ra->os)->dp_meta_objset; + uint64_t dsobj = dmu_objset_id(ra->os); + uint64_t resume_obj, resume_off; + + if (nvlist_lookup_uint64(begin_nvl, + "resume_object", &resume_obj) != 0 || + nvlist_lookup_uint64(begin_nvl, + "resume_offset", &resume_off) != 0) { + return (SET_ERROR(EINVAL)); + } + VERIFY0(zap_lookup(mos, dsobj, + DS_FIELD_RESUME_OBJECT, sizeof (val), 1, &val)); + if (resume_obj != val) + return (SET_ERROR(EINVAL)); + VERIFY0(zap_lookup(mos, dsobj, + DS_FIELD_RESUME_OFFSET, sizeof (val), 1, &val)); + if (resume_off != val) + return (SET_ERROR(EINVAL)); + + return (0); +} + + /* * Read in the stream's records, one by one, and apply them to the pool. There * are two threads involved; the thread that calls this function will spin up a @@ -2317,11 +2664,19 @@ dmu_recv_stream(dmu_recv_cookie_t *drc, struct receive_arg ra = { 0 }; struct receive_writer_arg rwa = { 0 }; int featureflags; + nvlist_t *begin_nvl = NULL; ra.byteswap = drc->drc_byteswap; ra.cksum = drc->drc_cksum; ra.vp = vp; ra.voff = *voffp; + + if (dsl_dataset_is_zapified(drc->drc_ds)) { + (void) zap_lookup(drc->drc_ds->ds_dir->dd_pool->dp_meta_objset, + drc->drc_ds->ds_object, DS_FIELD_RESUME_BYTES, + sizeof (ra.bytes_read), 1, &ra.bytes_read); + } + list_create(&ra.ignore_obj_list, sizeof (struct receive_ign_obj_node), offsetof(struct receive_ign_obj_node, node)); @@ -2374,9 +2729,29 @@ dmu_recv_stream(dmu_recv_cookie_t *drc, drc->drc_guid_to_ds_map = rwa.guid_to_ds_map; } - err = receive_read_payload_and_next_header(&ra, 0, NULL); - if (err) + uint32_t payloadlen = drc->drc_drr_begin->drr_payloadlen; + void *payload = NULL; + if (payloadlen != 0) + payload = kmem_alloc(payloadlen, KM_SLEEP); + + err = receive_read_payload_and_next_header(&ra, payloadlen, payload); + if (err != 0) { + if (payloadlen != 0) + kmem_free(payload, payloadlen); goto out; + } + if (payloadlen != 0) { + err = nvlist_unpack(payload, payloadlen, &begin_nvl, KM_SLEEP); + kmem_free(payload, payloadlen); + if (err != 0) + goto out; + } + + if (featureflags & DMU_BACKUP_FEATURE_RESUMING) { + err = resume_check(&ra, begin_nvl); + if (err != 0) + goto out; + } (void) bqueue_init(&rwa.q, zfs_recv_queue_length, offsetof(struct receive_record_arg, node)); @@ -2384,6 +2759,7 @@ dmu_recv_stream(dmu_recv_cookie_t *drc, mutex_init(&rwa.mutex, NULL, MUTEX_DEFAULT, NULL); rwa.os = ra.os; rwa.byteswap = drc->drc_byteswap; + rwa.resumable = drc->drc_resumable; (void) thread_create(NULL, 0, receive_writer_thread, &rwa, 0, curproc, TS_RUN, minclsyspri); @@ -2442,13 +2818,15 @@ dmu_recv_stream(dmu_recv_cookie_t *drc, err = rwa.err; out: + nvlist_free(begin_nvl); if ((featureflags & DMU_BACKUP_FEATURE_DEDUP) && (cleanup_fd != -1)) zfs_onexit_fd_rele(cleanup_fd); if (err != 0) { /* - * destroy what we created, so we don't leave it in the - * inconsistent restoring state. + * Clean up references. If receive is not resumable, + * destroy what we created, so we don't leave it in + * the inconsistent state. */ dmu_recv_cleanup_ds(drc); } @@ -2608,6 +2986,20 @@ dmu_recv_end_sync(void *arg, dmu_tx_t *t dmu_buf_will_dirty(ds->ds_dbuf, tx); dsl_dataset_phys(ds)->ds_flags &= ~DS_FLAG_INCONSISTENT; + if (dsl_dataset_has_resume_receive_state(ds)) { + (void) zap_remove(dp->dp_meta_objset, ds->ds_object, + DS_FIELD_RESUME_FROMGUID, tx); + (void) zap_remove(dp->dp_meta_objset, ds->ds_object, + DS_FIELD_RESUME_OBJECT, tx); + (void) zap_remove(dp->dp_meta_objset, ds->ds_object, + DS_FIELD_RESUME_OFFSET, tx); + (void) zap_remove(dp->dp_meta_objset, ds->ds_object, + DS_FIELD_RESUME_BYTES, tx); + (void) zap_remove(dp->dp_meta_objset, ds->ds_object, + DS_FIELD_RESUME_TOGUID, tx); + (void) zap_remove(dp->dp_meta_objset, ds->ds_object, + DS_FIELD_RESUME_TONAME, tx); + } } drc->drc_newsnapobj = dsl_dataset_phys(drc->drc_ds)->ds_prev_snap_obj; /* Modified: vendor-sys/illumos/dist/uts/common/fs/zfs/dmu_traverse.c ============================================================================== --- vendor-sys/illumos/dist/uts/common/fs/zfs/dmu_traverse.c Wed Oct 14 11:33:07 2015 (r289311) +++ vendor-sys/illumos/dist/uts/common/fs/zfs/dmu_traverse.c Wed Oct 14 11:36:55 2015 (r289312) @@ -47,6 +47,7 @@ typedef struct prefetch_data { int pd_flags; boolean_t pd_cancel; boolean_t pd_exited; + zbookmark_phys_t pd_resume; } prefetch_data_t; typedef struct traverse_data { @@ -311,33 +312,30 @@ traverse_visitbp(traverse_data_t *td, co ZIO_PRIORITY_ASYNC_READ, ZIO_FLAG_CANFAIL, &flags, zb); if (err != 0) *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@freebsd.org Wed Oct 14 11:36:57 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5DA27A12E72; Wed, 14 Oct 2015 11:36:57 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 25EE21DF0; Wed, 14 Oct 2015 11:36:57 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t9EBauBp028417; Wed, 14 Oct 2015 11:36:56 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9EBat1O028409; Wed, 14 Oct 2015 11:36:55 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201510141136.t9EBat1O028409@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Wed, 14 Oct 2015 11:36:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r289312 - vendor-sys/illumos/dist/common/zfs vendor-sys/illumos/dist/uts/common/fs/zfs vendor-sys/illumos/dist/uts/common/fs/zfs/sys vendor-sys/illumos/dist/uts/common/sys/fs vendor/ill... 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 " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Oct 2015 11:36:57 -0000 Author: mav Date: Wed Oct 14 11:36:55 2015 New Revision: 289312 URL: https://svnweb.freebsd.org/changeset/base/289312 Log: 2605 want to resume interrupted zfs send Reviewed by: George Wilson Reviewed by: Paul Dagnelie Reviewed by: Richard Elling Reviewed by: Xin Li Reviewed by: Arne Jansen Approved by: Dan McDonald Author: Matthew Ahrens illumos/illumos-gate@9c3fd1216fa7fb02cfbc78a2518a686d54b48ab8 Modified: vendor/illumos/dist/cmd/zfs/zfs_main.c vendor/illumos/dist/cmd/zstreamdump/zstreamdump.c vendor/illumos/dist/lib/libzfs/common/libzfs.h vendor/illumos/dist/lib/libzfs/common/libzfs_dataset.c vendor/illumos/dist/lib/libzfs/common/libzfs_mount.c vendor/illumos/dist/lib/libzfs/common/libzfs_sendrecv.c vendor/illumos/dist/lib/libzfs_core/common/libzfs_core.c vendor/illumos/dist/lib/libzfs_core/common/libzfs_core.h Changes in other areas also in this revision: Modified: vendor-sys/illumos/dist/common/zfs/zfs_prop.c vendor-sys/illumos/dist/uts/common/fs/zfs/dmu_objset.c vendor-sys/illumos/dist/uts/common/fs/zfs/dmu_send.c vendor-sys/illumos/dist/uts/common/fs/zfs/dmu_traverse.c vendor-sys/illumos/dist/uts/common/fs/zfs/dsl_dataset.c vendor-sys/illumos/dist/uts/common/fs/zfs/dsl_destroy.c vendor-sys/illumos/dist/uts/common/fs/zfs/sys/dmu_impl.h vendor-sys/illumos/dist/uts/common/fs/zfs/sys/dmu_send.h vendor-sys/illumos/dist/uts/common/fs/zfs/sys/dmu_traverse.h vendor-sys/illumos/dist/uts/common/fs/zfs/sys/dsl_dataset.h vendor-sys/illumos/dist/uts/common/fs/zfs/sys/zfs_ioctl.h vendor-sys/illumos/dist/uts/common/fs/zfs/zfs_ioctl.c vendor-sys/illumos/dist/uts/common/sys/fs/zfs.h Modified: vendor/illumos/dist/cmd/zfs/zfs_main.c ============================================================================== --- vendor/illumos/dist/cmd/zfs/zfs_main.c Wed Oct 14 11:33:07 2015 (r289311) +++ vendor/illumos/dist/cmd/zfs/zfs_main.c Wed Oct 14 11:36:55 2015 (r289312) @@ -246,10 +246,11 @@ get_usage(zfs_help_t idx) case HELP_PROMOTE: return (gettext("\tpromote \n")); case HELP_RECEIVE: - return (gettext("\treceive [-vnFu] \n" - "\treceive [-vnFu] [-o origin=] [-d | -e] " - "\n")); + "\treceive [-vnsFu] [-o origin=] [-d | -e] " + "\n" + "\treceive -A \n")); case HELP_RENAME: return (gettext("\trename [-f] " "\n" @@ -261,7 +262,8 @@ get_usage(zfs_help_t idx) return (gettext("\tsend [-DnPpRvLe] [-[iI] snapshot] " "\n" "\tsend [-Le] [-i snapshot|bookmark] " - "\n")); + "\n" + "\tsend [-nvPe] -t \n")); case HELP_SET: return (gettext("\tset " " ...\n")); @@ -3640,6 +3642,7 @@ zfs_do_send(int argc, char **argv) { char *fromname = NULL; char *toname = NULL; + char *resume_token = NULL; char *cp; zfs_handle_t *zhp; sendflags_t flags = { 0 }; @@ -3648,7 +3651,7 @@ zfs_do_send(int argc, char **argv) boolean_t extraverbose = B_FALSE; /* check options */ - while ((c = getopt(argc, argv, ":i:I:RDpvnPLe")) != -1) { + while ((c = getopt(argc, argv, ":i:I:RDpvnPLet:")) != -1) { switch (c) { case 'i': if (fromname) @@ -3689,6 +3692,9 @@ zfs_do_send(int argc, char **argv) case 'e': flags.embed_data = B_TRUE; break; + case 't': + resume_token = optarg; + break; case ':': (void) fprintf(stderr, gettext("missing argument for " "'%c' option\n"), optopt); @@ -3704,14 +3710,28 @@ zfs_do_send(int argc, char **argv) argc -= optind; argv += optind; - /* check number of arguments */ - if (argc < 1) { - (void) fprintf(stderr, gettext("missing snapshot argument\n")); - usage(B_FALSE); - } - if (argc > 1) { - (void) fprintf(stderr, gettext("too many arguments\n")); - usage(B_FALSE); + if (resume_token != NULL) { + if (fromname != NULL || flags.replicate || flags.props || + flags.dedup) { + (void) fprintf(stderr, + gettext("invalid flags combined with -t\n")); + usage(B_FALSE); + } + if (argc != 0) { + (void) fprintf(stderr, gettext("no additional " + "arguments are permitted with -t\n")); + usage(B_FALSE); + } + } else { + if (argc < 1) { + (void) fprintf(stderr, + gettext("missing snapshot argument\n")); + usage(B_FALSE); + } + if (argc > 1) { + (void) fprintf(stderr, gettext("too many arguments\n")); + usage(B_FALSE); + } } if (!flags.dryrun && isatty(STDOUT_FILENO)) { @@ -3721,6 +3741,11 @@ zfs_do_send(int argc, char **argv) return (1); } + if (resume_token != NULL) { + return (zfs_send_resume(g_zfs, &flags, STDOUT_FILENO, + resume_token)); + } + /* * Special case sending a filesystem, or from a bookmark. */ @@ -3826,8 +3851,6 @@ zfs_do_send(int argc, char **argv) } /* - * zfs receive [-vnFu] [-d | -e] - * * Restore a backup stream from stdin. */ static int @@ -3835,6 +3858,8 @@ zfs_do_receive(int argc, char **argv) { int c, err; recvflags_t flags = { 0 }; + boolean_t abort_resumable = B_FALSE; + nvlist_t *props; nvpair_t *nvp = NULL; @@ -3842,7 +3867,7 @@ zfs_do_receive(int argc, char **argv) nomem(); /* check options */ - while ((c = getopt(argc, argv, ":o:denuvF")) != -1) { + while ((c = getopt(argc, argv, ":o:denuvFsA")) != -1) { switch (c) { case 'o': if (parseprop(props, optarg) != 0) @@ -3864,9 +3889,15 @@ zfs_do_receive(int argc, char **argv) case 'v': flags.verbose = B_TRUE; break; + case 's': + flags.resumable = B_TRUE; + break; case 'F': flags.force = B_TRUE; break; + case 'A': + abort_resumable = B_TRUE; + break; case ':': (void) fprintf(stderr, gettext("missing argument for " "'%c' option\n"), optopt); @@ -3899,6 +3930,44 @@ zfs_do_receive(int argc, char **argv) } } + if (abort_resumable) { + if (flags.isprefix || flags.istail || flags.dryrun || + flags.resumable || flags.nomount) { + (void) fprintf(stderr, gettext("invalid option")); + usage(B_FALSE); + } + + char namebuf[ZFS_MAXNAMELEN]; + (void) snprintf(namebuf, sizeof (namebuf), + "%s/%%recv", argv[0]); + + if (zfs_dataset_exists(g_zfs, namebuf, + ZFS_TYPE_FILESYSTEM | ZFS_TYPE_VOLUME)) { + zfs_handle_t *zhp = zfs_open(g_zfs, + namebuf, ZFS_TYPE_FILESYSTEM | ZFS_TYPE_VOLUME); + if (zhp == NULL) + return (1); + err = zfs_destroy(zhp, B_FALSE); + } else { + zfs_handle_t *zhp = zfs_open(g_zfs, + argv[0], ZFS_TYPE_FILESYSTEM | ZFS_TYPE_VOLUME); + if (zhp == NULL) + usage(B_FALSE); + if (!zfs_prop_get_int(zhp, ZFS_PROP_INCONSISTENT) || + zfs_prop_get(zhp, ZFS_PROP_RECEIVE_RESUME_TOKEN, + NULL, 0, NULL, NULL, 0, B_TRUE) == -1) { + (void) fprintf(stderr, + gettext("'%s' does not have any " + "resumable receive state to abort\n"), + argv[0]); + return (1); + } + err = zfs_destroy(zhp, B_FALSE); + } + + return (err != 0); + } + if (isatty(STDIN_FILENO)) { (void) fprintf(stderr, gettext("Error: Backup stream can not be read " @@ -3906,7 +3975,6 @@ zfs_do_receive(int argc, char **argv) "You must redirect standard input.\n")); return (1); } - err = zfs_receive(g_zfs, argv[0], props, &flags, STDIN_FILENO, NULL); return (err != 0); @@ -5728,6 +5796,24 @@ share_mount_one(zfs_handle_t *zhp, int o } /* + * If this filesystem is inconsistent and has a receive resume + * token, we can not mount it. + */ + if (zfs_prop_get_int(zhp, ZFS_PROP_INCONSISTENT) && + zfs_prop_get(zhp, ZFS_PROP_RECEIVE_RESUME_TOKEN, + NULL, 0, NULL, NULL, 0, B_TRUE) == 0) { + if (!explicit) + return (0); + + (void) fprintf(stderr, gettext("cannot %s '%s': " + "Contains partially-completed state from " + "\"zfs receive -r\", which can be resumed with " + "\"zfs send -t\"\n"), + cmdname, zfs_get_name(zhp)); + return (1); + } + + /* * At this point, we have verified that the mountpoint and/or * shareopts are appropriate for auto management. If the * filesystem is already mounted or shared, return (failing Modified: vendor/illumos/dist/cmd/zstreamdump/zstreamdump.c ============================================================================== --- vendor/illumos/dist/cmd/zstreamdump/zstreamdump.c Wed Oct 14 11:33:07 2015 (r289311) +++ vendor/illumos/dist/cmd/zstreamdump/zstreamdump.c Wed Oct 14 11:36:55 2015 (r289312) @@ -125,7 +125,7 @@ read_hdr(dmu_replay_record_t *drr, zio_c saved_cksum.zc_word[1], saved_cksum.zc_word[2], saved_cksum.zc_word[3]); - exit(1); + return (0); } return (sizeof (*drr)); } @@ -346,8 +346,7 @@ main(int argc, char *argv[]) if (verbose) (void) printf("\n"); - if ((DMU_GET_STREAM_HDRTYPE(drrb->drr_versioninfo) == - DMU_COMPOUNDSTREAM) && drr->drr_payloadlen != 0) { + if (drr->drr_payloadlen != 0) { nvlist_t *nv; int sz = drr->drr_payloadlen; Modified: vendor/illumos/dist/lib/libzfs/common/libzfs.h ============================================================================== --- vendor/illumos/dist/lib/libzfs/common/libzfs.h Wed Oct 14 11:33:07 2015 (r289311) +++ vendor/illumos/dist/lib/libzfs/common/libzfs.h Wed Oct 14 11:36:55 2015 (r289312) @@ -603,6 +603,10 @@ typedef boolean_t (snapfilter_cb_t)(zfs_ extern int zfs_send(zfs_handle_t *, const char *, const char *, sendflags_t *, int, snapfilter_cb_t, void *, nvlist_t **); extern int zfs_send_one(zfs_handle_t *, const char *, int, enum lzc_send_flags); +extern int zfs_send_resume(libzfs_handle_t *, sendflags_t *, int outfd, + const char *); +extern nvlist_t *zfs_send_resume_token_to_nvlist(libzfs_handle_t *hdl, + const char *token); extern int zfs_promote(zfs_handle_t *); extern int zfs_hold(zfs_handle_t *, const char *, const char *, @@ -643,6 +647,12 @@ typedef struct recvflags { /* set "canmount=off" on all modified filesystems */ boolean_t canmountoff; + /* + * Mark the file systems as "resumable" and do not destroy them if the + * receive is interrupted + */ + boolean_t resumable; + /* byteswap flag is used internally; callers need not specify */ boolean_t byteswap; Modified: vendor/illumos/dist/lib/libzfs/common/libzfs_dataset.c ============================================================================== --- vendor/illumos/dist/lib/libzfs/common/libzfs_dataset.c Wed Oct 14 11:33:07 2015 (r289311) +++ vendor/illumos/dist/lib/libzfs/common/libzfs_dataset.c Wed Oct 14 11:36:55 2015 (r289312) @@ -1735,22 +1735,21 @@ getprop_uint64(zfs_handle_t *zhp, zfs_pr return (value); } -static char * +static const char * getprop_string(zfs_handle_t *zhp, zfs_prop_t prop, char **source) { nvlist_t *nv; - char *value; + const char *value; *source = NULL; if (nvlist_lookup_nvlist(zhp->zfs_props, zfs_prop_to_name(prop), &nv) == 0) { - verify(nvlist_lookup_string(nv, ZPROP_VALUE, &value) == 0); + value = fnvlist_lookup_string(nv, ZPROP_VALUE); (void) nvlist_lookup_string(nv, ZPROP_SOURCE, source); } else { verify(!zhp->zfs_props_table || zhp->zfs_props_table[prop] == B_TRUE); - if ((value = (char *)zfs_prop_default_string(prop)) == NULL) - value = ""; + value = zfs_prop_default_string(prop); *source = ""; } @@ -2152,7 +2151,7 @@ zfs_prop_get(zfs_handle_t *zhp, zfs_prop { char *source = NULL; uint64_t val; - char *str; + const char *str; const char *strval; boolean_t received = zfs_is_recvd_props_mode(zhp); @@ -2257,14 +2256,10 @@ zfs_prop_get(zfs_handle_t *zhp, zfs_prop break; case ZFS_PROP_ORIGIN: - (void) strlcpy(propbuf, getprop_string(zhp, prop, &source), - proplen); - /* - * If there is no parent at all, return failure to indicate that - * it doesn't apply to this dataset. - */ - if (propbuf[0] == '\0') + str = getprop_string(zhp, prop, &source); + if (str == NULL) return (-1); + (void) strlcpy(propbuf, str, proplen); break; case ZFS_PROP_CLONES: @@ -2441,8 +2436,10 @@ zfs_prop_get(zfs_handle_t *zhp, zfs_prop break; case PROP_TYPE_STRING: - (void) strlcpy(propbuf, - getprop_string(zhp, prop, &source), proplen); + str = getprop_string(zhp, prop, &source); + if (str == NULL) + return (-1); + (void) strlcpy(propbuf, str, proplen); break; case PROP_TYPE_INDEX: Modified: vendor/illumos/dist/lib/libzfs/common/libzfs_mount.c ============================================================================== --- vendor/illumos/dist/lib/libzfs/common/libzfs_mount.c Wed Oct 14 11:33:07 2015 (r289311) +++ vendor/illumos/dist/lib/libzfs/common/libzfs_mount.c Wed Oct 14 11:36:55 2015 (r289312) @@ -1015,6 +1015,17 @@ mount_cb(zfs_handle_t *zhp, void *data) return (0); } + /* + * If this filesystem is inconsistent and has a receive resume + * token, we can not mount it. + */ + if (zfs_prop_get_int(zhp, ZFS_PROP_INCONSISTENT) && + zfs_prop_get(zhp, ZFS_PROP_RECEIVE_RESUME_TOKEN, + NULL, 0, NULL, NULL, 0, B_TRUE) == 0) { + zfs_close(zhp); + return (0); + } + libzfs_add_handle(cbp, zhp); if (zfs_iter_filesystems(zhp, mount_cb, cbp) != 0) { zfs_close(zhp); Modified: vendor/illumos/dist/lib/libzfs/common/libzfs_sendrecv.c ============================================================================== --- vendor/illumos/dist/lib/libzfs/common/libzfs_sendrecv.c Wed Oct 14 11:33:07 2015 (r289311) +++ vendor/illumos/dist/lib/libzfs/common/libzfs_sendrecv.c Wed Oct 14 11:36:55 2015 (r289312) @@ -21,7 +21,7 @@ /* * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. - * Copyright (c) 2011, 2014 by Delphix. All rights reserved. + * Copyright (c) 2011, 2015 by Delphix. All rights reserved. * Copyright (c) 2012, Joyent, Inc. All rights reserved. * Copyright (c) 2013 Steven Hartland. All rights reserved. */ @@ -48,6 +48,7 @@ #include "zfs_prop.h" #include "zfs_fletcher.h" #include "libzfs_impl.h" +#include #include #include #include @@ -58,6 +59,8 @@ extern void zfs_setprop_error(libzfs_han static int zfs_receive_impl(libzfs_handle_t *, const char *, const char *, recvflags_t *, int, const char *, nvlist_t *, avl_tree_t *, char **, int, uint64_t *); +static int guid_to_name(libzfs_handle_t *, const char *, + uint64_t, boolean_t, char *); static const zio_cksum_t zero_cksum = { 0 }; @@ -275,8 +278,7 @@ cksummer(void *arg) DMU_BACKUP_FEATURE_DEDUPPROPS); DMU_SET_FEATUREFLAGS(drrb->drr_versioninfo, fflags); - if (DMU_GET_STREAM_HDRTYPE(drrb->drr_versioninfo) == - DMU_COMPOUNDSTREAM && drr->drr_payloadlen != 0) { + if (drr->drr_payloadlen != 0) { sz = drr->drr_payloadlen; if (sz > SPA_MAXBLOCKSIZE) { @@ -985,17 +987,14 @@ static void * send_progress_thread(void *arg) { progress_arg_t *pa = arg; - zfs_cmd_t zc = { 0 }; zfs_handle_t *zhp = pa->pa_zhp; libzfs_handle_t *hdl = zhp->zfs_hdl; unsigned long long bytes; char buf[16]; - time_t t; struct tm *tm; - assert(zhp->zfs_type == ZFS_TYPE_SNAPSHOT); (void) strlcpy(zc.zc_name, zhp->zfs_name, sizeof (zc.zc_name)); if (!pa->pa_parsable) @@ -1028,6 +1027,51 @@ send_progress_thread(void *arg) } } +static void +send_print_verbose(FILE *fout, const char *tosnap, const char *fromsnap, + uint64_t size, boolean_t parsable) +{ + if (parsable) { + if (fromsnap != NULL) { + (void) fprintf(fout, "incremental\t%s\t%s", + fromsnap, tosnap); + } else { + (void) fprintf(fout, "full\t%s", + tosnap); + } + } else { + if (fromsnap != NULL) { + if (strchr(fromsnap, '@') == NULL && + strchr(fromsnap, '#') == NULL) { + (void) fprintf(fout, dgettext(TEXT_DOMAIN, + "send from @%s to %s"), + fromsnap, tosnap); + } else { + (void) fprintf(fout, dgettext(TEXT_DOMAIN, + "send from %s to %s"), + fromsnap, tosnap); + } + } else { + (void) fprintf(fout, dgettext(TEXT_DOMAIN, + "full send of %s"), + tosnap); + } + } + + if (size != 0) { + if (parsable) { + (void) fprintf(fout, "\t%llu", + (longlong_t)size); + } else { + char buf[16]; + zfs_nicenum(size, buf, sizeof (buf)); + (void) fprintf(fout, dgettext(TEXT_DOMAIN, + " estimated size is %s"), buf); + } + } + (void) fprintf(fout, "\n"); +} + static int dump_snapshot(zfs_handle_t *zhp, void *arg) { @@ -1107,37 +1151,14 @@ dump_snapshot(zfs_handle_t *zhp, void *a (sdd->fromorigin || sdd->replicate); if (sdd->verbose) { - uint64_t size; - err = estimate_ioctl(zhp, sdd->prevsnap_obj, + uint64_t size = 0; + (void) estimate_ioctl(zhp, sdd->prevsnap_obj, fromorigin, &size); - if (sdd->parsable) { - if (sdd->prevsnap[0] != '\0') { - (void) fprintf(fout, "incremental\t%s\t%s", - sdd->prevsnap, zhp->zfs_name); - } else { - (void) fprintf(fout, "full\t%s", - zhp->zfs_name); - } - } else { - (void) fprintf(fout, dgettext(TEXT_DOMAIN, - "send from @%s to %s"), - sdd->prevsnap, zhp->zfs_name); - } - if (err == 0) { - if (sdd->parsable) { - (void) fprintf(fout, "\t%llu\n", - (longlong_t)size); - } else { - char buf[16]; - zfs_nicenum(size, buf, sizeof (buf)); - (void) fprintf(fout, dgettext(TEXT_DOMAIN, - " estimated size is %s\n"), buf); - } - sdd->size += size; - } else { - (void) fprintf(fout, "\n"); - } + send_print_verbose(fout, zhp->zfs_name, + sdd->prevsnap[0] ? sdd->prevsnap : NULL, + size, sdd->parsable); + sdd->size += size; } if (!sdd->dryrun) { @@ -1348,6 +1369,231 @@ again: return (0); } +nvlist_t * +zfs_send_resume_token_to_nvlist(libzfs_handle_t *hdl, const char *token) +{ + unsigned int version; + int nread; + unsigned long long checksum, packed_len; + + /* + * Decode token header, which is: + * -- + * Note that the only supported token version is 1. + */ + nread = sscanf(token, "%u-%llx-%llx-", + &version, &checksum, &packed_len); + if (nread != 3) { + zfs_error_aux(hdl, dgettext(TEXT_DOMAIN, + "resume token is corrupt (invalid format)")); + return (NULL); + } + + if (version != ZFS_SEND_RESUME_TOKEN_VERSION) { + zfs_error_aux(hdl, dgettext(TEXT_DOMAIN, + "resume token is corrupt (invalid version %u)"), + version); + return (NULL); + } + + /* convert hexadecimal representation to binary */ + token = strrchr(token, '-') + 1; + int len = strlen(token) / 2; + unsigned char *compressed = zfs_alloc(hdl, len); + for (int i = 0; i < len; i++) { + nread = sscanf(token + i * 2, "%2hhx", compressed + i); + if (nread != 1) { + free(compressed); + zfs_error_aux(hdl, dgettext(TEXT_DOMAIN, + "resume token is corrupt " + "(payload is not hex-encoded)")); + return (NULL); + } + } + + /* verify checksum */ + zio_cksum_t cksum; + fletcher_4_native(compressed, len, NULL, &cksum); + if (cksum.zc_word[0] != checksum) { + free(compressed); + zfs_error_aux(hdl, dgettext(TEXT_DOMAIN, + "resume token is corrupt (incorrect checksum)")); + return (NULL); + } + + /* uncompress */ + void *packed = zfs_alloc(hdl, packed_len); + uLongf packed_len_long = packed_len; + if (uncompress(packed, &packed_len_long, compressed, len) != Z_OK || + packed_len_long != packed_len) { + free(packed); + free(compressed); + zfs_error_aux(hdl, dgettext(TEXT_DOMAIN, + "resume token is corrupt (decompression failed)")); + return (NULL); + } + + /* unpack nvlist */ + nvlist_t *nv; + int error = nvlist_unpack(packed, packed_len, &nv, KM_SLEEP); + free(packed); + free(compressed); + if (error != 0) { + zfs_error_aux(hdl, dgettext(TEXT_DOMAIN, + "resume token is corrupt (nvlist_unpack failed)")); + return (NULL); + } + return (nv); +} + +int +zfs_send_resume(libzfs_handle_t *hdl, sendflags_t *flags, int outfd, + const char *resume_token) +{ + char errbuf[1024]; + char *toname; + char *fromname = NULL; + uint64_t resumeobj, resumeoff, toguid, fromguid, bytes; + zfs_handle_t *zhp; + int error = 0; + char name[ZFS_MAXNAMELEN]; + enum lzc_send_flags lzc_flags = 0; + + (void) snprintf(errbuf, sizeof (errbuf), dgettext(TEXT_DOMAIN, + "cannot resume send")); + + nvlist_t *resume_nvl = + zfs_send_resume_token_to_nvlist(hdl, resume_token); + if (resume_nvl == NULL) { + /* + * zfs_error_aux has already been set by + * zfs_send_resume_token_to_nvlist + */ + return (zfs_error(hdl, EZFS_FAULT, errbuf)); + } + if (flags->verbose) { + (void) fprintf(stderr, dgettext(TEXT_DOMAIN, + "resume token contents:\n")); + nvlist_print(stderr, resume_nvl); + } + + if (nvlist_lookup_string(resume_nvl, "toname", &toname) != 0 || + nvlist_lookup_uint64(resume_nvl, "object", &resumeobj) != 0 || + nvlist_lookup_uint64(resume_nvl, "offset", &resumeoff) != 0 || + nvlist_lookup_uint64(resume_nvl, "bytes", &bytes) != 0 || + nvlist_lookup_uint64(resume_nvl, "toguid", &toguid) != 0) { + zfs_error_aux(hdl, dgettext(TEXT_DOMAIN, + "resume token is corrupt")); + return (zfs_error(hdl, EZFS_FAULT, errbuf)); + } + fromguid = 0; + (void) nvlist_lookup_uint64(resume_nvl, "fromguid", &fromguid); + + if (flags->embed_data || nvlist_exists(resume_nvl, "embedok")) + lzc_flags |= LZC_SEND_FLAG_EMBED_DATA; + + if (guid_to_name(hdl, toname, toguid, B_FALSE, name) != 0) { + if (zfs_dataset_exists(hdl, toname, ZFS_TYPE_DATASET)) { + zfs_error_aux(hdl, dgettext(TEXT_DOMAIN, + "'%s' is no longer the same snapshot used in " + "the initial send"), toname); + } else { + zfs_error_aux(hdl, dgettext(TEXT_DOMAIN, + "'%s' used in the initial send no longer exists"), + toname); + } + return (zfs_error(hdl, EZFS_BADPATH, errbuf)); + } + zhp = zfs_open(hdl, name, ZFS_TYPE_DATASET); + if (zhp == NULL) { + zfs_error_aux(hdl, dgettext(TEXT_DOMAIN, + "unable to access '%s'"), name); + return (zfs_error(hdl, EZFS_BADPATH, errbuf)); + } + + if (fromguid != 0) { + if (guid_to_name(hdl, toname, fromguid, B_TRUE, name) != 0) { + zfs_error_aux(hdl, dgettext(TEXT_DOMAIN, + "incremental source %#llx no longer exists"), + (longlong_t)fromguid); + return (zfs_error(hdl, EZFS_BADPATH, errbuf)); + } + fromname = name; + } + + if (flags->verbose) { + uint64_t size = 0; + error = lzc_send_space(zhp->zfs_name, fromname, &size); + if (error == 0) + size = MAX(0, (int64_t)(size - bytes)); + send_print_verbose(stderr, zhp->zfs_name, fromname, + size, flags->parsable); + } + + if (!flags->dryrun) { + progress_arg_t pa = { 0 }; + pthread_t tid; + /* + * If progress reporting is requested, spawn a new thread to + * poll ZFS_IOC_SEND_PROGRESS at a regular interval. + */ + if (flags->progress) { + pa.pa_zhp = zhp; + pa.pa_fd = outfd; + pa.pa_parsable = flags->parsable; + + error = pthread_create(&tid, NULL, + send_progress_thread, &pa); + if (error != 0) { + zfs_close(zhp); + return (error); + } + } + + error = lzc_send_resume(zhp->zfs_name, fromname, outfd, + lzc_flags, resumeobj, resumeoff); + + if (flags->progress) { + (void) pthread_cancel(tid); + (void) pthread_join(tid, NULL); + } + + char errbuf[1024]; + (void) snprintf(errbuf, sizeof (errbuf), dgettext(TEXT_DOMAIN, + "warning: cannot send '%s'"), zhp->zfs_name); + + zfs_close(zhp); + + switch (error) { + case 0: + return (0); + case EXDEV: + case ENOENT: + case EDQUOT: + case EFBIG: + case EIO: + case ENOLINK: + case ENOSPC: + case ENOSTR: + case ENXIO: + case EPIPE: + case ERANGE: + case EFAULT: + case EROFS: + zfs_error_aux(hdl, strerror(errno)); + return (zfs_error(hdl, EZFS_BADBACKUP, errbuf)); + + default: + return (zfs_standard_error(hdl, errno, errbuf)); + } + } + + + zfs_close(zhp); + + return (error); +} + /* * Generate a send stream for the dataset identified by the argument zhp. * @@ -1885,6 +2131,7 @@ recv_destroy(libzfs_handle_t *hdl, const typedef struct guid_to_name_data { uint64_t guid; + boolean_t bookmark_ok; char *name; char *skip; } guid_to_name_data_t; @@ -1893,20 +2140,25 @@ static int guid_to_name_cb(zfs_handle_t *zhp, void *arg) { guid_to_name_data_t *gtnd = arg; + const char *slash; int err; if (gtnd->skip != NULL && - strcmp(zhp->zfs_name, gtnd->skip) == 0) { + (slash = strrchr(zhp->zfs_name, '/')) != NULL && + strcmp(slash + 1, gtnd->skip) == 0) { + zfs_close(zhp); return (0); } - if (zhp->zfs_dmustats.dds_guid == gtnd->guid) { + if (zfs_prop_get_int(zhp, ZFS_PROP_GUID) == gtnd->guid) { (void) strcpy(gtnd->name, zhp->zfs_name); zfs_close(zhp); return (EEXIST); } err = zfs_iter_children(zhp, guid_to_name_cb, gtnd); + if (err != EEXIST && gtnd->bookmark_ok) + err = zfs_iter_bookmarks(zhp, guid_to_name_cb, gtnd); zfs_close(zhp); return (err); } @@ -1920,45 +2172,48 @@ guid_to_name_cb(zfs_handle_t *zhp, void */ static int guid_to_name(libzfs_handle_t *hdl, const char *parent, uint64_t guid, - char *name) + boolean_t bookmark_ok, char *name) { - /* exhaustive search all local snapshots */ char pname[ZFS_MAXNAMELEN]; guid_to_name_data_t gtnd; - int err = 0; - zfs_handle_t *zhp; - char *cp; gtnd.guid = guid; + gtnd.bookmark_ok = bookmark_ok; gtnd.name = name; gtnd.skip = NULL; - (void) strlcpy(pname, parent, sizeof (pname)); - /* - * Search progressively larger portions of the hierarchy. This will + * Search progressively larger portions of the hierarchy, starting + * with the filesystem specified by 'parent'. This will * select the "most local" version of the origin snapshot in the case * that there are multiple matching snapshots in the system. */ - while ((cp = strrchr(pname, '/')) != NULL) { - + (void) strlcpy(pname, parent, sizeof (pname)); + char *cp = strrchr(pname, '@'); + if (cp == NULL) + cp = strchr(pname, '\0'); + for (; cp != NULL; cp = strrchr(pname, '/')) { /* Chop off the last component and open the parent */ *cp = '\0'; - zhp = make_dataset_handle(hdl, pname); + zfs_handle_t *zhp = make_dataset_handle(hdl, pname); if (zhp == NULL) continue; - - err = zfs_iter_children(zhp, guid_to_name_cb, >nd); + int err = guid_to_name_cb(zfs_handle_dup(zhp), >nd); + if (err != EEXIST) + err = zfs_iter_children(zhp, guid_to_name_cb, >nd); + if (err != EEXIST && bookmark_ok) + err = zfs_iter_bookmarks(zhp, guid_to_name_cb, >nd); zfs_close(zhp); if (err == EEXIST) return (0); /* - * Remember the dataset that we already searched, so we - * skip it next time through. + * Remember the last portion of the dataset so we skip it next + * time through (as we've already searched that portion of the + * hierarchy). */ - gtnd.skip = pname; + gtnd.skip = strrchr(pname, '/') + 1; } return (ENOENT); @@ -2529,11 +2784,9 @@ recv_skip(libzfs_handle_t *hdl, int fd, switch (drr->drr_type) { case DRR_BEGIN: - /* NB: not to be used on v2 stream packages */ if (drr->drr_payloadlen != 0) { - zfs_error_aux(hdl, dgettext(TEXT_DOMAIN, - "invalid substream header")); - return (zfs_error(hdl, EZFS_BADSTREAM, errbuf)); + (void) recv_read(hdl, fd, buf, + drr->drr_payloadlen, B_FALSE, NULL); } break; @@ -2594,6 +2847,40 @@ recv_skip(libzfs_handle_t *hdl, int fd, return (-1); } +static void +recv_ecksum_set_aux(libzfs_handle_t *hdl, const char *target_snap, + boolean_t resumable) +{ + char target_fs[ZFS_MAXNAMELEN]; + + zfs_error_aux(hdl, dgettext(TEXT_DOMAIN, + "checksum mismatch or incomplete stream")); + + if (!resumable) + return; + (void) strlcpy(target_fs, target_snap, sizeof (target_fs)); + *strchr(target_fs, '@') = '\0'; + zfs_handle_t *zhp = zfs_open(hdl, target_fs, + ZFS_TYPE_FILESYSTEM | ZFS_TYPE_VOLUME); + if (zhp == NULL) + return; + + char token_buf[ZFS_MAXPROPLEN]; + int error = zfs_prop_get(zhp, ZFS_PROP_RECEIVE_RESUME_TOKEN, + token_buf, sizeof (token_buf), + NULL, NULL, 0, B_TRUE); + if (error == 0) { + zfs_error_aux(hdl, dgettext(TEXT_DOMAIN, + "checksum mismatch or incomplete stream.\n" + "Partially received snapshot is saved.\n" + "A resuming stream can be generated on the sending " + "system by running:\n" + " zfs send -t %s"), + token_buf); + } + zfs_close(zhp); +} + /* * Restores a backup of tosnap from the file descriptor specified by infd. */ @@ -2748,7 +3035,7 @@ zfs_receive_one(libzfs_handle_t *hdl, in */ if (drrb->drr_flags & DRR_FLAG_CLONE) { if (guid_to_name(hdl, zc.zc_value, - drrb->drr_fromguid, zc.zc_string) != 0) { + drrb->drr_fromguid, B_FALSE, zc.zc_string) != 0) { zcmd_free_nvlists(&zc); zfs_error_aux(hdl, dgettext(TEXT_DOMAIN, "local origin for clone %s does not exist"), @@ -2764,8 +3051,10 @@ zfs_receive_one(libzfs_handle_t *hdl, in zc.zc_string); } + boolean_t resuming = DMU_GET_FEATUREFLAGS(drrb->drr_versioninfo) & + DMU_BACKUP_FEATURE_RESUMING; stream_wantsnewfs = (drrb->drr_fromguid == NULL || - (drrb->drr_flags & DRR_FLAG_CLONE) || originsnap); + (drrb->drr_flags & DRR_FLAG_CLONE) || originsnap) && !resuming; if (stream_wantsnewfs) { /* @@ -2784,7 +3073,7 @@ zfs_receive_one(libzfs_handle_t *hdl, in char suffix[ZFS_MAXNAMELEN]; (void) strcpy(suffix, strrchr(zc.zc_value, '/')); if (guid_to_name(hdl, zc.zc_name, parent_snapguid, - zc.zc_value) == 0) { + B_FALSE, zc.zc_value) == 0) { *strchr(zc.zc_value, '@') = '\0'; (void) strcat(zc.zc_value, suffix); } @@ -2811,7 +3100,7 @@ zfs_receive_one(libzfs_handle_t *hdl, in char snap[ZFS_MAXNAMELEN]; (void) strcpy(snap, strchr(zc.zc_value, '@')); if (guid_to_name(hdl, zc.zc_name, drrb->drr_fromguid, - zc.zc_value) == 0) { + B_FALSE, zc.zc_value) == 0) { *strchr(zc.zc_value, '@') = '\0'; (void) strcat(zc.zc_value, snap); } @@ -2825,11 +3114,12 @@ zfs_receive_one(libzfs_handle_t *hdl, in zfs_handle_t *zhp; /* - * Destination fs exists. Therefore this should either - * be an incremental, or the stream specifies a new fs - * (full stream or clone) and they want us to blow it - * away (and have therefore specified -F and removed any - * snapshots). + * Destination fs exists. It must be one of these cases: + * - an incremental send stream + * - the stream specifies a new fs (full stream or clone) + * and they want us to blow away the existing fs (and + * have therefore specified -F and removed any snapshots) + * - we are resuming a failed receive. */ if (stream_wantsnewfs) { if (!flags->force) { @@ -2884,6 +3174,18 @@ zfs_receive_one(libzfs_handle_t *hdl, in return (-1); } } + + /* + * If we are resuming a newfs, set newfs here so that we will + * mount it if the recv succeeds this time. We can tell + * that it was a newfs on the first recv because the fs + * itself will be inconsistent (if the fs existed when we + * did the first recv, we would have received it into + * .../%recv). + */ + if (resuming && zfs_prop_get_int(zhp, ZFS_PROP_INCONSISTENT)) + newfs = B_TRUE; + zfs_close(zhp); } else { /* @@ -2916,9 +3218,10 @@ zfs_receive_one(libzfs_handle_t *hdl, in newfs = B_TRUE; } - zc.zc_begin_record = drr_noswap->drr_u.drr_begin; + zc.zc_begin_record = *drr_noswap; zc.zc_cookie = infd; zc.zc_guid = flags->force; + zc.zc_resumable = flags->resumable; if (flags->verbose) { (void) printf("%s %s stream of %s into %s\n", flags->dryrun ? "would receive" : "receiving", @@ -3055,8 +3358,7 @@ zfs_receive_one(libzfs_handle_t *hdl, in (void) zfs_error(hdl, EZFS_BADSTREAM, errbuf); break; case ECKSUM: - zfs_error_aux(hdl, dgettext(TEXT_DOMAIN, - "invalid stream (checksum mismatch)")); + recv_ecksum_set_aux(hdl, zc.zc_value, flags->resumable); (void) zfs_error(hdl, EZFS_BADSTREAM, errbuf); break; case ENOTSUP: @@ -3258,7 +3560,8 @@ zfs_receive_impl(libzfs_handle_t *hdl, c * Restores a backup of tosnap from the file descriptor specified by infd. *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@freebsd.org Wed Oct 14 11:53:00 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 272C8A12509; Wed, 14 Oct 2015 11:53:00 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D82A5C08; Wed, 14 Oct 2015 11:52:59 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t9EBqwJT034055; Wed, 14 Oct 2015 11:52:58 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9EBqwKv034053; Wed, 14 Oct 2015 11:52:58 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201510141152.t9EBqwKv034053@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Wed, 14 Oct 2015 11:52:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289313 - in head/cddl/contrib/opensolaris: cmd/zfs lib/libzfs/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 " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Oct 2015 11:53:00 -0000 Author: mav Date: Wed Oct 14 11:52:58 2015 New Revision: 289313 URL: https://svnweb.freebsd.org/changeset/base/289313 Log: MFV r289311: 5764 "zfs send -nv" directs output to stderr Reviewed by: Matthew Ahrens Reviewed by: Paul Dagnelie Reviewed by: Basil Crow Reviewed by: Steven Hartland Reviewed by: Bayard Bell Approved by: Dan McDonald Author: Manoj Joseph illumos/illumos-gate@dc5f28a3c341db7c241bba77ddc109c141072f27 Modified: head/cddl/contrib/opensolaris/cmd/zfs/zfs.8 head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_sendrecv.c Directory Properties: head/cddl/contrib/opensolaris/ (props changed) head/cddl/contrib/opensolaris/lib/libzfs/ (props changed) Modified: head/cddl/contrib/opensolaris/cmd/zfs/zfs.8 ============================================================================== --- head/cddl/contrib/opensolaris/cmd/zfs/zfs.8 Wed Oct 14 11:36:55 2015 (r289312) +++ head/cddl/contrib/opensolaris/cmd/zfs/zfs.8 Wed Oct 14 11:52:58 2015 (r289313) @@ -2630,6 +2630,9 @@ useful in conjunction with the or .Fl P flags to determine what data will be sent. +In this case, the verbose output will be written to +standard output (contrast with a non-dry-run, where the stream is written +to standard output and the verbose output goes to standard error). .It Fl P Print machine-parsable verbose information about the stream package generated. .It Fl v Modified: head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_sendrecv.c ============================================================================== --- head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_sendrecv.c Wed Oct 14 11:36:55 2015 (r289312) +++ head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_sendrecv.c Wed Oct 14 11:52:58 2015 (r289313) @@ -818,7 +818,8 @@ typedef struct send_dump_data { char prevsnap[ZFS_MAXNAMELEN]; uint64_t prevsnap_obj; boolean_t seenfrom, seento, replicate, doall, fromorigin; - boolean_t verbose, dryrun, parsable, progress, embed_data, large_block; + boolean_t verbose, dryrun, parsable, progress, embed_data, std_out; + boolean_t large_block; int outfd; boolean_t err; nvlist_t *fss; @@ -1047,6 +1048,7 @@ dump_snapshot(zfs_handle_t *zhp, void *a int err; boolean_t isfromsnap, istosnap, fromorigin; boolean_t exclude = B_FALSE; + FILE *fout = sdd->std_out ? stdout : stderr; err = 0; thissnap = strchr(zhp->zfs_name, '@') + 1; @@ -1121,30 +1123,30 @@ dump_snapshot(zfs_handle_t *zhp, void *a if (sdd->parsable) { if (sdd->prevsnap[0] != '\0') { - (void) fprintf(stderr, "incremental\t%s\t%s", + (void) fprintf(fout, "incremental\t%s\t%s", sdd->prevsnap, zhp->zfs_name); } else { - (void) fprintf(stderr, "full\t%s", + (void) fprintf(fout, "full\t%s", zhp->zfs_name); } } else { - (void) fprintf(stderr, dgettext(TEXT_DOMAIN, + (void) fprintf(fout, dgettext(TEXT_DOMAIN, "send from @%s to %s"), sdd->prevsnap, zhp->zfs_name); } if (err == 0) { if (sdd->parsable) { - (void) fprintf(stderr, "\t%llu\n", + (void) fprintf(fout, "\t%llu\n", (longlong_t)size); } else { char buf[16]; zfs_nicenum(size, buf, sizeof (buf)); - (void) fprintf(stderr, dgettext(TEXT_DOMAIN, + (void) fprintf(fout, dgettext(TEXT_DOMAIN, " estimated size is %s\n"), buf); } sdd->size += size; } else { - (void) fprintf(stderr, "\n"); + (void) fprintf(fout, "\n"); } } @@ -1388,6 +1390,7 @@ zfs_send(zfs_handle_t *zhp, const char * int pipefd[2]; dedup_arg_t dda = { 0 }; int featureflags = 0; + FILE *fout; (void) snprintf(errbuf, sizeof (errbuf), dgettext(TEXT_DOMAIN, "cannot send '%s'"), zhp->zfs_name); @@ -1515,6 +1518,9 @@ zfs_send(zfs_handle_t *zhp, const char * sdd.filter_cb_arg = cb_arg; if (debugnvp) sdd.debugnv = *debugnvp; + if (sdd.verbose && sdd.dryrun) + sdd.std_out = B_TRUE; + fout = sdd.std_out ? stdout : stderr; /* * Some flags require that we place user holds on the datasets that are @@ -1554,12 +1560,12 @@ zfs_send(zfs_handle_t *zhp, const char * if (flags->verbose) { if (flags->parsable) { - (void) fprintf(stderr, "size\t%llu\n", + (void) fprintf(fout, "size\t%llu\n", (longlong_t)sdd.size); } else { char buf[16]; zfs_nicenum(sdd.size, buf, sizeof (buf)); - (void) fprintf(stderr, dgettext(TEXT_DOMAIN, + (void) fprintf(fout, dgettext(TEXT_DOMAIN, "total estimated size is %s\n"), buf); } } From owner-svn-src-all@freebsd.org Wed Oct 14 14:26:46 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 28484A13514; Wed, 14 Oct 2015 14:26:46 +0000 (UTC) (envelope-from vangyzen@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id F336A19A5; Wed, 14 Oct 2015 14:26:45 +0000 (UTC) (envelope-from vangyzen@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t9EEQjA9079422; Wed, 14 Oct 2015 14:26:45 GMT (envelope-from vangyzen@FreeBSD.org) Received: (from vangyzen@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9EEQiWX079418; Wed, 14 Oct 2015 14:26:44 GMT (envelope-from vangyzen@FreeBSD.org) Message-Id: <201510141426.t9EEQiWX079418@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: vangyzen set sender to vangyzen@FreeBSD.org using -f From: Eric van Gyzen Date: Wed, 14 Oct 2015 14:26:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289315 - in head: include lib/libc/resolv share/man/man5 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Oct 2015 14:26:46 -0000 Author: vangyzen Date: Wed Oct 14 14:26:44 2015 New Revision: 289315 URL: https://svnweb.freebsd.org/changeset/base/289315 Log: resolver: automatically reload /etc/resolv.conf On each resolver query, use stat(2) to see if the modification time of /etc/resolv.conf has changed. If so, reload the file and reinitialize the resolver library. However, only call stat(2) if at least two seconds have passed since the last call to stat(2), since calling it on every query could kill performance. This new behavior is enabled by default. Add a "reload-period" option to disable it or change the period of the test. Document this behavior and option in resolv.conf(5). Polish the man page just enough to appease igor. https://lists.freebsd.org/pipermail/freebsd-arch/2015-October/017342.html Reviewed by: kp, wblock Discussed with: jilles, imp, alfred MFC after: 1 month Relnotes: yes Sponsored by: Dell Inc. Differential Revision: https://reviews.freebsd.org/D3867 Modified: head/include/resolv.h head/lib/libc/resolv/res_init.c head/lib/libc/resolv/res_state.c head/share/man/man5/resolver.5 Modified: head/include/resolv.h ============================================================================== --- head/include/resolv.h Wed Oct 14 12:46:05 2015 (r289314) +++ head/include/resolv.h Wed Oct 14 14:26:44 2015 (r289315) @@ -176,7 +176,8 @@ struct __res_state { int res_h_errno; /*%< last one set for this context */ int _vcsock; /*%< PRIVATE: for res_send VC i/o */ u_int _flags; /*%< PRIVATE: see below */ - u_int _pad; /*%< make _u 64 bit aligned */ + u_short reload_period; /*%< seconds between stat(resolv.conf)*/ + u_short _pad; /*%< make _u 64 bit aligned */ union { /* On an 32-bit arch this means 512b total. */ char pad[72 - 4*sizeof (int) - 3*sizeof (void *)]; @@ -188,6 +189,8 @@ struct __res_state { } _ext; } _u; u_char *_rnd; /*%< PRIVATE: random state */ + struct timespec conf_mtim; /*%< mod time of loaded resolv.conf */ + time_t conf_stat; /*%< time of last stat(resolv.conf) */ }; typedef struct __res_state *res_state; Modified: head/lib/libc/resolv/res_init.c ============================================================================== --- head/lib/libc/resolv/res_init.c Wed Oct 14 12:46:05 2015 (r289314) +++ head/lib/libc/resolv/res_init.c Wed Oct 14 14:26:44 2015 (r289315) @@ -78,6 +78,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include @@ -227,6 +228,7 @@ __res_vinit(res_state statp, int preinit statp->pfcode = 0; statp->_vcsock = -1; statp->_flags = 0; + statp->reload_period = 2; statp->qhook = NULL; statp->rhook = NULL; statp->_u._ext.nscount = 0; @@ -321,6 +323,22 @@ __res_vinit(res_state statp, int preinit nserv = 0; if ((fp = fopen(_PATH_RESCONF, "re")) != NULL) { + struct stat sb; + struct timespec now; + + if (_fstat(fileno(fp), &sb) == 0) { + statp->conf_mtim = sb.st_mtim; + if (clock_gettime(CLOCK_MONOTONIC_FAST, &now) == 0) { + statp->conf_stat = now.tv_sec; + } else { + statp->conf_stat = 0; + } + } else { + statp->conf_mtim.tv_sec = 0; + statp->conf_mtim.tv_nsec = 0; + statp->conf_stat = 0; + } + /* read the config file */ while (fgets(buf, sizeof(buf), fp) != NULL) { /* skip comments */ @@ -666,6 +684,10 @@ res_setoptions(res_state statp, const ch } else if (!strncmp(cp, "no-check-names", sizeof("no-check-names") - 1)) { statp->options |= RES_NOCHECKNAME; + } else if (!strncmp(cp, "reload-period:", + sizeof("reload-period:") - 1)) { + statp->reload_period = (u_short) + atoi(cp + sizeof("reload-period:") - 1); } #ifdef RES_USE_EDNS0 else if (!strncmp(cp, "edns0", sizeof("edns0") - 1)) { Modified: head/lib/libc/resolv/res_state.c ============================================================================== --- head/lib/libc/resolv/res_state.c Wed Oct 14 12:46:05 2015 (r289314) +++ head/lib/libc/resolv/res_state.c Wed Oct 14 14:26:44 2015 (r289315) @@ -26,6 +26,8 @@ */ #include +#include +#include #include #include #include @@ -59,13 +61,38 @@ res_keycreate(void) res_thr_keycreated = thr_keycreate(&res_key, free_res) == 0; } +static res_state +res_check_reload(res_state statp) +{ + struct timespec now; + struct stat sb; + + if ((statp->options & RES_INIT) == 0 || statp->reload_period == 0) { + return (statp); + } + + if (clock_gettime(CLOCK_MONOTONIC_FAST, &now) != 0 || + (now.tv_sec - statp->conf_stat) < statp->reload_period) { + return (statp); + } + + statp->conf_stat = now.tv_sec; + if (stat(_PATH_RESCONF, &sb) == 0 && + (sb.st_mtim.tv_sec != statp->conf_mtim.tv_sec || + sb.st_mtim.tv_nsec != statp->conf_mtim.tv_nsec)) { + statp->options &= ~RES_INIT; + } + + return (statp); +} + res_state __res_state(void) { res_state statp; if (thr_main() != 0) - return (&_res); + return res_check_reload(&_res); if (thr_once(&res_init_once, res_keycreate) != 0 || !res_thr_keycreated) @@ -73,7 +100,7 @@ __res_state(void) statp = thr_getspecific(res_key); if (statp != NULL) - return (statp); + return res_check_reload(statp); statp = calloc(1, sizeof(*statp)); if (statp == NULL) return (&_res); Modified: head/share/man/man5/resolver.5 ============================================================================== --- head/share/man/man5/resolver.5 Wed Oct 14 12:46:05 2015 (r289314) +++ head/share/man/man5/resolver.5 Wed Oct 14 14:26:44 2015 (r289315) @@ -28,7 +28,7 @@ .\" @(#)resolver.5 8.1 (Berkeley) 6/5/93 .\" $FreeBSD$ .\" -.Dd December 25, 2013 +.Dd October 12, 2015 .Dt RESOLVER 5 .Os .Sh NAME @@ -175,6 +175,19 @@ the resolver from obeying the standard and .Sy search rules with the given name. +.It Sy reload-period: Ns Ar n +The resolver checks the modification time of +.Pa /etc/resolv.conf +every +.Ar n +seconds. +If +.Pa /etc/resolv.conf +has changed, it is automatically reloaded. +The default for +.Ar n +is two seconds. +Setting it to zero disables the file check. .El .Pp Options may also be specified as a space or tab separated list using the @@ -191,8 +204,7 @@ If more than one instance of these keywo the last instance will override. .Pp The keyword and value must appear on a single line, and the keyword -(e.g.\& -.Sy nameserver ) +.Pq for example, Sy nameserver must start the line. The value follows the keyword, separated by white space. .Sh FILES From owner-svn-src-all@freebsd.org Wed Oct 14 15:55:44 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 99870A13D9B; Wed, 14 Oct 2015 15:55:44 +0000 (UTC) (envelope-from fidaj@ukr.net) Received: from frv157.fwdcdn.com (frv157.fwdcdn.com [212.42.77.157]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5C24E1359; Wed, 14 Oct 2015 15:55:43 +0000 (UTC) (envelope-from fidaj@ukr.net) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=ukr.net; s=fsm; h=Content-Transfer-Encoding:Content-Type:MIME-Version:References:In-Reply-To:Message-ID:Subject:Cc:To:From:Date; bh=RlBAop1RZzIPXslhrZe8AFimM1fpaEFO9PnsgwrqZSQ=; b=N1tNgQz4bg0CbaZTARoRsb0IBGpZzjxZmaiZpfnrwTQSy/XEQJVEwLyID/RD96tZb8zbsF4VZFAyz5X5DkPc8RViJ3Ce+0hlitdlUsS8YBwr8yk7cL6k1XE5xDrqNsieHePOJ2diFHnzXMwWQEW5vWtUjImxXZ3OhgLGPRMzebU=; Received: from [178.137.225.202] (helo=nonamehost.local) by frv157.fwdcdn.com with esmtpsa ID 1ZmOOt-000APM-JL ; Wed, 14 Oct 2015 18:55:35 +0300 Date: Wed, 14 Oct 2015 18:55:34 +0300 From: Ivan Klymenko To: Dimitry Andric Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r289221 - head/contrib/llvm/lib/Target/X86 Message-ID: <20151014185534.74e5cf21@nonamehost.local> In-Reply-To: <201510131624.t9DGOMw5082157@repo.freebsd.org> References: <201510131624.t9DGOMw5082157@repo.freebsd.org> X-Mailer: Claws Mail 3.12.0 (GTK+ 2.24.28; amd64-portbld-freebsd11.0) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Authentication-Result: IP=178.137.225.202; mail.from=fidaj@ukr.net; dkim=pass; header.d=ukr.net X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Oct 2015 15:55:44 -0000 On Tue, 13 Oct 2015 16:24:22 +0000 (UTC) Dimitry Andric wrote: > Author: dim > Date: Tue Oct 13 16:24:22 2015 > New Revision: 289221 > URL: https://svnweb.freebsd.org/changeset/base/289221 > > Log: > Pull in r250085 from upstream llvm trunk (by Andrea Di Biagio): > > [x86] Fix wrong lowering of vsetcc nodes (PR25080). > Thanks! From owner-svn-src-all@freebsd.org Wed Oct 14 16:21:43 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id DD02BA13CFD; Wed, 14 Oct 2015 16:21:42 +0000 (UTC) (envelope-from kp@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A6410830; Wed, 14 Oct 2015 16:21:42 +0000 (UTC) (envelope-from kp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t9EGLfDO015244; Wed, 14 Oct 2015 16:21:41 GMT (envelope-from kp@FreeBSD.org) Received: (from kp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9EGLfas015240; Wed, 14 Oct 2015 16:21:41 GMT (envelope-from kp@FreeBSD.org) Message-Id: <201510141621.t9EGLfas015240@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kp set sender to kp@FreeBSD.org using -f From: Kristof Provost Date: Wed, 14 Oct 2015 16:21:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289316 - in head/sys: net netpfil/pf X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Oct 2015 16:21:43 -0000 Author: kp Date: Wed Oct 14 16:21:41 2015 New Revision: 289316 URL: https://svnweb.freebsd.org/changeset/base/289316 Log: pf: Fix TSO issues In certain configurations (mostly but not exclusively as a VM on Xen) pf produced packets with an invalid TCP checksum. The problem was that pf could only handle packets with a full checksum. The FreeBSD IP stack produces TCP packets with a pseudo-header checksum (only addresses, length and protocol). Certain network interfaces expect to see the pseudo-header checksum, so they end up producing packets with invalid checksums. To fix this stop calculating the full checksum and teach pf to only update TCP checksums if TSO is disabled or the change affects the pseudo-header checksum. PR: 154428, 193579, 198868 Reviewed by: sbruno MFC after: 1 week Relnotes: yes Sponsored by: RootBSD Differential Revision: https://reviews.freebsd.org/D3779 Modified: head/sys/net/pfvar.h head/sys/netpfil/pf/pf.c head/sys/netpfil/pf/pf_ioctl.c head/sys/netpfil/pf/pf_norm.c Modified: head/sys/net/pfvar.h ============================================================================== --- head/sys/net/pfvar.h Wed Oct 14 14:26:44 2015 (r289315) +++ head/sys/net/pfvar.h Wed Oct 14 16:21:41 2015 (r289316) @@ -1552,6 +1552,8 @@ extern void pf_print_state(struct pf_ extern void pf_print_flags(u_int8_t); extern u_int16_t pf_cksum_fixup(u_int16_t, u_int16_t, u_int16_t, u_int8_t); +extern u_int16_t pf_proto_cksum_fixup(struct mbuf *, u_int16_t, + u_int16_t, u_int16_t, u_int8_t); VNET_DECLARE(struct ifnet *, sync_ifp); #define V_sync_ifp VNET(sync_ifp); @@ -1581,6 +1583,9 @@ u_int32_t pf_new_isn(struct pf_state *); void *pf_pull_hdr(struct mbuf *, int, void *, int, u_short *, u_short *, sa_family_t); void pf_change_a(void *, u_int16_t *, u_int32_t, u_int8_t); +void pf_change_proto_a(struct mbuf *, void *, u_int16_t *, u_int32_t, + u_int8_t); +void pf_change_tcp_a(struct mbuf *, void *, u_int16_t *, u_int32_t); void pf_send_deferred_syn(struct pf_state *); int pf_match_addr(u_int8_t, struct pf_addr *, struct pf_addr *, struct pf_addr *, sa_family_t); Modified: head/sys/netpfil/pf/pf.c ============================================================================== --- head/sys/netpfil/pf/pf.c Wed Oct 14 14:26:44 2015 (r289315) +++ head/sys/netpfil/pf/pf.c Wed Oct 14 16:21:41 2015 (r289316) @@ -202,7 +202,7 @@ static void pf_init_threshold(struct p static void pf_add_threshold(struct pf_threshold *); static int pf_check_threshold(struct pf_threshold *); -static void pf_change_ap(struct pf_addr *, u_int16_t *, +static void pf_change_ap(struct mbuf *, struct pf_addr *, u_int16_t *, u_int16_t *, u_int16_t *, struct pf_addr *, u_int16_t, u_int8_t, sa_family_t); static int pf_modulate_sack(struct mbuf *, int, struct pf_pdesc *, @@ -1991,6 +1991,22 @@ pf_addr_wrap_neq(struct pf_addr_wrap *aw } } +/** + * Checksum updates are a little complicated because the checksum in the TCP/UDP + * header isn't always a full checksum. In some cases (i.e. output) it's a + * pseudo-header checksum, which is a partial checksum over src/dst IP + * addresses, protocol number and length. + * + * That means we have the following cases: + * * Input or forwarding: we don't have TSO, the checksum fields are full + * checksums, we need to update the checksum whenever we change anything. + * * Output (i.e. the checksum is a pseudo-header checksum): + * x The field being updated is src/dst address or affects the length of + * the packet. We need to update the pseudo-header checksum (note that this + * checksum is not ones' complement). + * x Some other field is being modified (e.g. src/dst port numbers): We + * don't have to update anything. + **/ u_int16_t pf_cksum_fixup(u_int16_t cksum, u_int16_t old, u_int16_t new, u_int8_t udp) { @@ -2006,9 +2022,20 @@ pf_cksum_fixup(u_int16_t cksum, u_int16_ return (l); } +u_int16_t +pf_proto_cksum_fixup(struct mbuf *m, u_int16_t cksum, u_int16_t old, + u_int16_t new, u_int8_t udp) +{ + if (m->m_pkthdr.csum_flags & (CSUM_DELAY_DATA | CSUM_DELAY_DATA_IPV6)) + return (cksum); + + return (pf_cksum_fixup(cksum, old, new, udp)); +} + static void -pf_change_ap(struct pf_addr *a, u_int16_t *p, u_int16_t *ic, u_int16_t *pc, - struct pf_addr *an, u_int16_t pn, u_int8_t u, sa_family_t af) +pf_change_ap(struct mbuf *m, struct pf_addr *a, u_int16_t *p, u_int16_t *ic, + u_int16_t *pc, struct pf_addr *an, u_int16_t pn, u_int8_t u, + sa_family_t af) { struct pf_addr ao; u_int16_t po = *p; @@ -2016,6 +2043,9 @@ pf_change_ap(struct pf_addr *a, u_int16_ PF_ACPY(&ao, a, af); PF_ACPY(a, an, af); + if (m->m_pkthdr.csum_flags & (CSUM_DELAY_DATA | CSUM_DELAY_DATA_IPV6)) + *pc = ~*pc; + *p = pn; switch (af) { @@ -2025,17 +2055,19 @@ pf_change_ap(struct pf_addr *a, u_int16_ ao.addr16[0], an->addr16[0], 0), ao.addr16[1], an->addr16[1], 0); *p = pn; - *pc = pf_cksum_fixup(pf_cksum_fixup(pf_cksum_fixup(*pc, + + *pc = pf_cksum_fixup(pf_cksum_fixup(*pc, ao.addr16[0], an->addr16[0], u), - ao.addr16[1], an->addr16[1], u), - po, pn, u); + ao.addr16[1], an->addr16[1], u); + + *pc = pf_proto_cksum_fixup(m, *pc, po, pn, u); break; #endif /* INET */ #ifdef INET6 case AF_INET6: *pc = pf_cksum_fixup(pf_cksum_fixup(pf_cksum_fixup( pf_cksum_fixup(pf_cksum_fixup(pf_cksum_fixup( - pf_cksum_fixup(pf_cksum_fixup(pf_cksum_fixup(*pc, + pf_cksum_fixup(pf_cksum_fixup(*pc, ao.addr16[0], an->addr16[0], u), ao.addr16[1], an->addr16[1], u), ao.addr16[2], an->addr16[2], u), @@ -2043,13 +2075,20 @@ pf_change_ap(struct pf_addr *a, u_int16_ ao.addr16[4], an->addr16[4], u), ao.addr16[5], an->addr16[5], u), ao.addr16[6], an->addr16[6], u), - ao.addr16[7], an->addr16[7], u), - po, pn, u); + ao.addr16[7], an->addr16[7], u); + + *pc = pf_proto_cksum_fixup(m, *pc, po, pn, u); break; #endif /* INET6 */ } -} + if (m->m_pkthdr.csum_flags & (CSUM_DELAY_DATA | + CSUM_DELAY_DATA_IPV6)) { + *pc = ~*pc; + if (! *pc) + *pc = 0xffff; + } +} /* Changes a u_int32_t. Uses a void * so there are no align restrictions */ void @@ -2063,6 +2102,19 @@ pf_change_a(void *a, u_int16_t *c, u_int ao % 65536, an % 65536, u); } +void +pf_change_proto_a(struct mbuf *m, void *a, u_int16_t *c, u_int32_t an, u_int8_t udp) +{ + u_int32_t ao; + + memcpy(&ao, a, sizeof(ao)); + memcpy(a, &an, sizeof(u_int32_t)); + + *c = pf_proto_cksum_fixup(m, + pf_proto_cksum_fixup(m, *c, ao / 65536, an / 65536, udp), + ao % 65536, an % 65536, udp); +} + #ifdef INET6 static void pf_change_a6(struct pf_addr *a, u_int16_t *c, struct pf_addr *an, u_int8_t u) @@ -2208,12 +2260,10 @@ pf_modulate_sack(struct mbuf *m, int off for (i = 2; i + TCPOLEN_SACK <= olen; i += TCPOLEN_SACK) { memcpy(&sack, &opt[i], sizeof(sack)); - pf_change_a(&sack.start, &th->th_sum, - htonl(ntohl(sack.start) - - dst->seqdiff), 0); - pf_change_a(&sack.end, &th->th_sum, - htonl(ntohl(sack.end) - - dst->seqdiff), 0); + pf_change_proto_a(m, &sack.start, &th->th_sum, + htonl(ntohl(sack.start) - dst->seqdiff), 0); + pf_change_proto_a(m, &sack.end, &th->th_sum, + htonl(ntohl(sack.end) - dst->seqdiff), 0); memcpy(&opt[i], &sack, sizeof(sack)); } copyback = 1; @@ -3117,7 +3167,7 @@ pf_test_rule(struct pf_rule **rm, struct if (PF_ANEQ(saddr, &nk->addr[pd->sidx], af) || nk->port[pd->sidx] != sport) { - pf_change_ap(saddr, &th->th_sport, pd->ip_sum, + pf_change_ap(m, saddr, &th->th_sport, pd->ip_sum, &th->th_sum, &nk->addr[pd->sidx], nk->port[pd->sidx], 0, af); pd->sport = &th->th_sport; @@ -3126,7 +3176,7 @@ pf_test_rule(struct pf_rule **rm, struct if (PF_ANEQ(daddr, &nk->addr[pd->didx], af) || nk->port[pd->didx] != dport) { - pf_change_ap(daddr, &th->th_dport, pd->ip_sum, + pf_change_ap(m, daddr, &th->th_dport, pd->ip_sum, &th->th_sum, &nk->addr[pd->didx], nk->port[pd->didx], 0, af); dport = th->th_dport; @@ -3140,7 +3190,7 @@ pf_test_rule(struct pf_rule **rm, struct if (PF_ANEQ(saddr, &nk->addr[pd->sidx], af) || nk->port[pd->sidx] != sport) { - pf_change_ap(saddr, &pd->hdr.udp->uh_sport, + pf_change_ap(m, saddr, &pd->hdr.udp->uh_sport, pd->ip_sum, &pd->hdr.udp->uh_sum, &nk->addr[pd->sidx], nk->port[pd->sidx], 1, af); @@ -3150,7 +3200,7 @@ pf_test_rule(struct pf_rule **rm, struct if (PF_ANEQ(daddr, &nk->addr[pd->didx], af) || nk->port[pd->didx] != dport) { - pf_change_ap(daddr, &pd->hdr.udp->uh_dport, + pf_change_ap(m, daddr, &pd->hdr.udp->uh_dport, pd->ip_sum, &pd->hdr.udp->uh_sum, &nk->addr[pd->didx], nk->port[pd->didx], 1, af); @@ -3502,7 +3552,7 @@ pf_create_state(struct pf_rule *r, struc if ((s->src.seqdiff = pf_tcp_iss(pd) - s->src.seqlo) == 0) s->src.seqdiff = 1; - pf_change_a(&th->th_seq, &th->th_sum, + pf_change_proto_a(m, &th->th_seq, &th->th_sum, htonl(s->src.seqlo + s->src.seqdiff), 0); *rewrite = 1; } else @@ -3826,9 +3876,9 @@ pf_tcp_track_full(struct pf_state_peer * while ((src->seqdiff = arc4random() - seq) == 0) ; ack = ntohl(th->th_ack) - dst->seqdiff; - pf_change_a(&th->th_seq, &th->th_sum, htonl(seq + + pf_change_proto_a(m, &th->th_seq, &th->th_sum, htonl(seq + src->seqdiff), 0); - pf_change_a(&th->th_ack, &th->th_sum, htonl(ack), 0); + pf_change_proto_a(m, &th->th_ack, &th->th_sum, htonl(ack), 0); *copyback = 1; } else { ack = ntohl(th->th_ack); @@ -3878,9 +3928,9 @@ pf_tcp_track_full(struct pf_state_peer * ack = ntohl(th->th_ack) - dst->seqdiff; if (src->seqdiff) { /* Modulate sequence numbers */ - pf_change_a(&th->th_seq, &th->th_sum, htonl(seq + + pf_change_proto_a(m, &th->th_seq, &th->th_sum, htonl(seq + src->seqdiff), 0); - pf_change_a(&th->th_ack, &th->th_sum, htonl(ack), 0); + pf_change_proto_a(m, &th->th_ack, &th->th_sum, htonl(ack), 0); *copyback = 1; } end = seq + pd->p_len; @@ -4334,14 +4384,14 @@ pf_test_state_tcp(struct pf_state **stat if (PF_ANEQ(pd->src, &nk->addr[pd->sidx], pd->af) || nk->port[pd->sidx] != th->th_sport) - pf_change_ap(pd->src, &th->th_sport, pd->ip_sum, - &th->th_sum, &nk->addr[pd->sidx], + pf_change_ap(m, pd->src, &th->th_sport, + pd->ip_sum, &th->th_sum, &nk->addr[pd->sidx], nk->port[pd->sidx], 0, pd->af); if (PF_ANEQ(pd->dst, &nk->addr[pd->didx], pd->af) || nk->port[pd->didx] != th->th_dport) - pf_change_ap(pd->dst, &th->th_dport, pd->ip_sum, - &th->th_sum, &nk->addr[pd->didx], + pf_change_ap(m, pd->dst, &th->th_dport, + pd->ip_sum, &th->th_sum, &nk->addr[pd->didx], nk->port[pd->didx], 0, pd->af); copyback = 1; } @@ -4405,13 +4455,13 @@ pf_test_state_udp(struct pf_state **stat if (PF_ANEQ(pd->src, &nk->addr[pd->sidx], pd->af) || nk->port[pd->sidx] != uh->uh_sport) - pf_change_ap(pd->src, &uh->uh_sport, pd->ip_sum, + pf_change_ap(m, pd->src, &uh->uh_sport, pd->ip_sum, &uh->uh_sum, &nk->addr[pd->sidx], nk->port[pd->sidx], 1, pd->af); if (PF_ANEQ(pd->dst, &nk->addr[pd->didx], pd->af) || nk->port[pd->didx] != uh->uh_dport) - pf_change_ap(pd->dst, &uh->uh_dport, pd->ip_sum, + pf_change_ap(m, pd->dst, &uh->uh_dport, pd->ip_sum, &uh->uh_sum, &nk->addr[pd->didx], nk->port[pd->didx], 1, pd->af); m_copyback(m, off, sizeof(*uh), (caddr_t)uh); Modified: head/sys/netpfil/pf/pf_ioctl.c ============================================================================== --- head/sys/netpfil/pf/pf_ioctl.c Wed Oct 14 14:26:44 2015 (r289315) +++ head/sys/netpfil/pf/pf_ioctl.c Wed Oct 14 16:21:41 2015 (r289316) @@ -3566,12 +3566,6 @@ pf_check_out(void *arg, struct mbuf **m, { int chk; - /* We need a proper CSUM befor we start (s. OpenBSD ip_output) */ - if ((*m)->m_pkthdr.csum_flags & CSUM_DELAY_DATA) { - in_delayed_cksum(*m); - (*m)->m_pkthdr.csum_flags &= ~CSUM_DELAY_DATA; - } - chk = pf_test(PF_OUT, ifp, m, inp); if (chk && *m) { m_freem(*m); @@ -3610,13 +3604,6 @@ pf_check6_out(void *arg, struct mbuf **m { int chk; - /* We need a proper CSUM before we start (s. OpenBSD ip_output) */ - if ((*m)->m_pkthdr.csum_flags & CSUM_DELAY_DATA_IPV6) { - in6_delayed_cksum(*m, - (*m)->m_pkthdr.len - sizeof(struct ip6_hdr), - sizeof(struct ip6_hdr)); - (*m)->m_pkthdr.csum_flags &= ~CSUM_DELAY_DATA_IPV6; - } CURVNET_SET(ifp->if_vnet); chk = pf_test6(PF_OUT, ifp, m, inp); CURVNET_RESTORE(); Modified: head/sys/netpfil/pf/pf_norm.c ============================================================================== --- head/sys/netpfil/pf/pf_norm.c Wed Oct 14 14:26:44 2015 (r289315) +++ head/sys/netpfil/pf/pf_norm.c Wed Oct 14 16:21:41 2015 (r289316) @@ -1215,13 +1215,14 @@ pf_normalize_tcp(int dir, struct pfi_kif th->th_x2 = 0; nv = *(u_int16_t *)(&th->th_ack + 1); - th->th_sum = pf_cksum_fixup(th->th_sum, ov, nv, 0); + th->th_sum = pf_proto_cksum_fixup(m, th->th_sum, ov, nv, 0); rewrite = 1; } /* Remove urgent pointer, if TH_URG is not set */ if (!(flags & TH_URG) && th->th_urp) { - th->th_sum = pf_cksum_fixup(th->th_sum, th->th_urp, 0, 0); + th->th_sum = pf_proto_cksum_fixup(m, th->th_sum, th->th_urp, + 0, 0); th->th_urp = 0; rewrite = 1; } @@ -1422,7 +1423,7 @@ pf_normalize_tcp_stateful(struct mbuf *m (src->scrub->pfss_flags & PFSS_TIMESTAMP)) { tsval = ntohl(tsval); - pf_change_a(&opt[2], + pf_change_proto_a(m, &opt[2], &th->th_sum, htonl(tsval + src->scrub->pfss_ts_mod), @@ -1438,7 +1439,7 @@ pf_normalize_tcp_stateful(struct mbuf *m PFSS_TIMESTAMP)) { tsecr = ntohl(tsecr) - dst->scrub->pfss_ts_mod; - pf_change_a(&opt[6], + pf_change_proto_a(m, &opt[6], &th->th_sum, htonl(tsecr), 0); copyback = 1; @@ -1765,8 +1766,8 @@ pf_normalize_tcpopt(struct pf_rule *r, s case TCPOPT_MAXSEG: mss = (u_int16_t *)(optp + 2); if ((ntohs(*mss)) > r->max_mss) { - th->th_sum = pf_cksum_fixup(th->th_sum, - *mss, htons(r->max_mss), 0); + th->th_sum = pf_proto_cksum_fixup(m, + th->th_sum, *mss, htons(r->max_mss), 0); *mss = htons(r->max_mss); rewrite = 1; } From owner-svn-src-all@freebsd.org Wed Oct 14 16:30:48 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 45EFFA13166; Wed, 14 Oct 2015 16:30:48 +0000 (UTC) (envelope-from baptiste.daroussin@gmail.com) Received: from mail-wi0-x229.google.com (mail-wi0-x229.google.com [IPv6:2a00:1450:400c: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 DF5321016; Wed, 14 Oct 2015 16:30:47 +0000 (UTC) (envelope-from baptiste.daroussin@gmail.com) Received: by wijp11 with SMTP id p11so1888443wij.0; Wed, 14 Oct 2015 09:30:46 -0700 (PDT) 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=ylZ6AD7l0l4yzxKNujuqVk1Kl2mH6EmL0F0nEJmGaxc=; b=Cfv2VB3kuoyh+qJisQRV4bAlXFynrRhGZhLinE/vz/US+Ma0NyOB33OH3hn1S1+IPN xZSGzfc2I1hhkTf7NJTK8MGdjpMKjpUTa9fNEPv3L8d+dUmvG6lRPUfqt32CPwRGE/eR aNA17ssGviuHddobZOH/ggJloETeNPl8v424Xmyx2PqUI+ASWFDreNwfZuhLUTVJInvy U6M639JKUa3NVj+DYQW60w7IHTqTXQ6UM3ls3n6wrjm9S7O9KLACEMzYSVK1Kv6+Kn+I xBjfEmvQOIX574D25J84p3ZYD4mRkMA72K3yuiFN49n4w+LFCpJy/TaZ3jHL0B+1Thvf 3S6g== X-Received: by 10.194.242.167 with SMTP id wr7mr5210958wjc.27.1444840246342; Wed, 14 Oct 2015 09:30:46 -0700 (PDT) Received: from ivaldir.etoilebsd.net ([2001:41d0:8:db4c::1]) by smtp.gmail.com with ESMTPSA id ka10sm11006509wjc.30.2015.10.14.09.30.45 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 14 Oct 2015 09:30:45 -0700 (PDT) Sender: Baptiste Daroussin Date: Wed, 14 Oct 2015 18:30:43 +0200 From: Baptiste Daroussin To: Kristof Provost Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r289316 - in head/sys: net netpfil/pf Message-ID: <20151014163043.GJ55137@ivaldir.etoilebsd.net> References: <201510141621.t9EGLfas015240@repo.freebsd.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="enLffk0M6cffIOOh" Content-Disposition: inline In-Reply-To: <201510141621.t9EGLfas015240@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 " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Oct 2015 16:30:48 -0000 --enLffk0M6cffIOOh Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Oct 14, 2015 at 04:21:41PM +0000, Kristof Provost wrote: > Author: kp > Date: Wed Oct 14 16:21:41 2015 > New Revision: 289316 > URL: https://svnweb.freebsd.org/changeset/base/289316 >=20 > Log: > pf: Fix TSO issues > =20 > In certain configurations (mostly but not exclusively as a VM on Xen) pf > produced packets with an invalid TCP checksum. > =20 > The problem was that pf could only handle packets with a full checksum.= The > FreeBSD IP stack produces TCP packets with a pseudo-header checksum (on= ly > addresses, length and protocol). > Certain network interfaces expect to see the pseudo-header checksum, so= they > end up producing packets with invalid checksums. > =20 > To fix this stop calculating the full checksum and teach pf to only upd= ate TCP > checksums if TSO is disabled or the change affects the pseudo-header ch= ecksum. > =20 > PR: 154428, 193579, 198868 > Reviewed by: sbruno > MFC after: 1 week > Relnotes: yes > Sponsored by: RootBSD > Differential Revision: https://reviews.freebsd.org/D3779 >=20 Excellent! do you think it would be possible to get an errata on 10.2? that would be useful for every instance of freebsd running on cloudish stuff! Best regards, Bapt --enLffk0M6cffIOOh Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iEYEARECAAYFAlYegzMACgkQ8kTtMUmk6EzZnQCeNipmWR2fVd67kiuOI8/mAWWY TzEAn2K98Dm1KXczy2eSqDRY/ZuHRfiq =wyhp -----END PGP SIGNATURE----- --enLffk0M6cffIOOh-- From owner-svn-src-all@freebsd.org Wed Oct 14 16:32:08 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id DEA79A132B5; Wed, 14 Oct 2015 16:32:08 +0000 (UTC) (envelope-from kp@FreeBSD.org) Received: from venus.codepro.be (venus.codepro.be [IPv6:2a01:4f8:162:1127::2]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "*.codepro.be", Issuer "Gandi Standard SSL CA" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id A2E47125A; Wed, 14 Oct 2015 16:32:08 +0000 (UTC) (envelope-from kp@FreeBSD.org) Received: from [IPv6:2a02:1811:2419:4e02:6909:e79d:47a0:51af] (unknown [IPv6:2a02:1811:2419:4e02:6909:e79d:47a0:51af]) by venus.codepro.be (Postfix) with ESMTPSA id D3B3D2051C; Wed, 14 Oct 2015 18:32:04 +0200 (CEST) Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 9.0 \(3096.1\)) Subject: Re: svn commit: r289316 - in head/sys: net netpfil/pf From: Kristof Provost In-Reply-To: <20151014163043.GJ55137@ivaldir.etoilebsd.net> Date: Wed, 14 Oct 2015 18:32:03 +0200 Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Transfer-Encoding: quoted-printable Message-Id: <4AE49A6C-ECEF-449A-89A8-0F1A31AA4CF6@FreeBSD.org> References: <201510141621.t9EGLfas015240@repo.freebsd.org> <20151014163043.GJ55137@ivaldir.etoilebsd.net> To: Baptiste Daroussin X-Mailer: Apple Mail (2.3096.1) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Oct 2015 16:32:09 -0000 > On 14 Oct 2015, at 18:30, Baptiste Daroussin wrote: >=20 > On Wed, Oct 14, 2015 at 04:21:41PM +0000, Kristof Provost wrote: >> Author: kp >> Date: Wed Oct 14 16:21:41 2015 >> New Revision: 289316 >> URL: https://svnweb.freebsd.org/changeset/base/289316 >>=20 >> Log: >> pf: Fix TSO issues >>=20 > Excellent! do you think it would be possible to get an errata on 10.2? = that > would be useful for every instance of freebsd running on cloudish = stuff! I plan to look into that. It=E2=80=99ll first have to be merged back to = stable/10 of course (which I=E2=80=99ll do next week). Regards, Kristof= From owner-svn-src-all@freebsd.org Wed Oct 14 16:34:41 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E5889A1333B; Wed, 14 Oct 2015 16:34:41 +0000 (UTC) (envelope-from baptiste.daroussin@gmail.com) Received: from mail-wi0-x22b.google.com (mail-wi0-x22b.google.com [IPv6:2a00:1450:400c:c05::22b]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 715321446; Wed, 14 Oct 2015 16:34:41 +0000 (UTC) (envelope-from baptiste.daroussin@gmail.com) Received: by wicgb1 with SMTP id gb1so137029504wic.1; Wed, 14 Oct 2015 09:34:39 -0700 (PDT) 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=muLjLOTGjjIPRIga/3HZlRrPupa0cCB0VHcbDjDP/vk=; b=bWNvhfIWHaAb178qbLze78xR8eydNf5qAnOn9WjNSQksc0Wx0+tvJL7u3UsbMRkNrs 1X3PyEwYgo2agcPMk3tRz3oVL7MxoE7RZqtdNiiQUwgobFFvwaG24AuG2wk20ERLGmeH oZJDH7UlOKWN52NbnCF17UL2UB6QJRmfiblb+biqz/Dge+Zmj7JH1dUTMazyxVj4oXSM pTuH0PF33e0YpFa6ebi5BcN9oLwMyqTTP5TfmWZhpdfXhm9mGGkRj2pGD2NyRkn7mdkE kSzdHuY6hMvz6EYFV3hrlOjtJLPthF8cp8Z9Tjzo4WExv5SFrlsLOknhkBzs/S9wUuyF CR7g== X-Received: by 10.180.189.12 with SMTP id ge12mr15537939wic.73.1444840478680; Wed, 14 Oct 2015 09:34:38 -0700 (PDT) Received: from ivaldir.etoilebsd.net ([2001:41d0:8:db4c::1]) by smtp.gmail.com with ESMTPSA id xa5sm11019163wjc.20.2015.10.14.09.34.37 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 14 Oct 2015 09:34:37 -0700 (PDT) Sender: Baptiste Daroussin Date: Wed, 14 Oct 2015 18:34:36 +0200 From: Baptiste Daroussin To: Kristof Provost Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r289316 - in head/sys: net netpfil/pf Message-ID: <20151014163436.GK55137@ivaldir.etoilebsd.net> References: <201510141621.t9EGLfas015240@repo.freebsd.org> <20151014163043.GJ55137@ivaldir.etoilebsd.net> <4AE49A6C-ECEF-449A-89A8-0F1A31AA4CF6@FreeBSD.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="tBhgiDt8dP1efIIJ" Content-Disposition: inline In-Reply-To: <4AE49A6C-ECEF-449A-89A8-0F1A31AA4CF6@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 " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Oct 2015 16:34:42 -0000 --tBhgiDt8dP1efIIJ Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Oct 14, 2015 at 06:32:03PM +0200, Kristof Provost wrote: >=20 > > On 14 Oct 2015, at 18:30, Baptiste Daroussin wrote: > >=20 > > On Wed, Oct 14, 2015 at 04:21:41PM +0000, Kristof Provost wrote: > >> Author: kp > >> Date: Wed Oct 14 16:21:41 2015 > >> New Revision: 289316 > >> URL: https://svnweb.freebsd.org/changeset/base/289316 > >>=20 > >> Log: > >> pf: Fix TSO issues > >>=20 > > Excellent! do you think it would be possible to get an errata on 10.2? = that > > would be useful for every instance of freebsd running on cloudish stuff! >=20 > I plan to look into that. It=E2=80=99ll first have to be merged back to s= table/10 of course (which I=E2=80=99ll do next week). >=20 Sure! Thank you for working on that Bapt --tBhgiDt8dP1efIIJ Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iEYEARECAAYFAlYehBwACgkQ8kTtMUmk6Ex16gCeOCX+C6p1egy3mQj/AnmjePMk lG4AnAsYUcCc6II3860P0UYG8AquIuJ/ =p0aU -----END PGP SIGNATURE----- --tBhgiDt8dP1efIIJ-- From owner-svn-src-all@freebsd.org Wed Oct 14 16:56:26 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id DD839A13A37; Wed, 14 Oct 2015 16:56:26 +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 A8C61829; Wed, 14 Oct 2015 16:56:26 +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 t9EGuPan025534; Wed, 14 Oct 2015 16:56:25 GMT (envelope-from bz@FreeBSD.org) Received: (from bz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9EGuPYg025533; Wed, 14 Oct 2015 16:56:25 GMT (envelope-from bz@FreeBSD.org) Message-Id: <201510141656.t9EGuPYg025533@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bz set sender to bz@FreeBSD.org using -f From: "Bjoern A. Zeeb" Date: Wed, 14 Oct 2015 16:56:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289317 - head/lib/libpmc X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Oct 2015 16:56:27 -0000 Author: bz Date: Wed Oct 14 16:56:25 2015 New Revision: 289317 URL: https://svnweb.freebsd.org/changeset/base/289317 Log: For the Cortex-A8 use the a8 and not the a9 events table. MFC after: 2 weeks Sponsored by: DARPA/AFRL Differential Revision: https://reviews.freebsd.org/D3882 Modified: head/lib/libpmc/libpmc.c Modified: head/lib/libpmc/libpmc.c ============================================================================== --- head/lib/libpmc/libpmc.c Wed Oct 14 16:21:41 2015 (r289316) +++ head/lib/libpmc/libpmc.c Wed Oct 14 16:56:25 2015 (r289317) @@ -388,7 +388,7 @@ PMC_CLASS_TABLE_DESC(tsc, TSC, tsc, tsc) #if defined(__XSCALE__) PMC_CLASS_TABLE_DESC(xscale, XSCALE, xscale, xscale); #endif -PMC_CLASS_TABLE_DESC(cortex_a8, ARMV7, cortex_a9, armv7); +PMC_CLASS_TABLE_DESC(cortex_a8, ARMV7, cortex_a8, armv7); PMC_CLASS_TABLE_DESC(cortex_a9, ARMV7, cortex_a9, armv7); #endif #if defined(__aarch64__) From owner-svn-src-all@freebsd.org Wed Oct 14 17:00:36 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 504B4A13B34; Wed, 14 Oct 2015 17:00:36 +0000 (UTC) (envelope-from jgh@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1C3D1A5D; Wed, 14 Oct 2015 17:00:36 +0000 (UTC) (envelope-from jgh@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t9EH0ZYH025780; Wed, 14 Oct 2015 17:00:35 GMT (envelope-from jgh@FreeBSD.org) Received: (from jgh@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9EH0ZbD025779; Wed, 14 Oct 2015 17:00:35 GMT (envelope-from jgh@FreeBSD.org) Message-Id: <201510141700.t9EH0ZbD025779@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jgh set sender to jgh@FreeBSD.org using -f From: Jason Helfman Date: Wed, 14 Oct 2015 17:00: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: r289318 - stable/10/lib/libc/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 " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Oct 2015 17:00:36 -0000 Author: jgh (doc,ports committer) Date: Wed Oct 14 17:00:35 2015 New Revision: 289318 URL: https://svnweb.freebsd.org/changeset/base/289318 Log: MFC 288833: PR: 203440 (based on) Submitted by: ceratv@rpi.edu Approved by: wblock@ (mentor) Differential Revision: https://reviews.freebsd.org/D3813 - address grammar Modified: stable/10/lib/libc/net/getaddrinfo.3 Modified: stable/10/lib/libc/net/getaddrinfo.3 ============================================================================== --- stable/10/lib/libc/net/getaddrinfo.3 Wed Oct 14 16:56:25 2015 (r289317) +++ stable/10/lib/libc/net/getaddrinfo.3 Wed Oct 14 17:00:35 2015 (r289318) @@ -18,7 +18,7 @@ .\" .\" $FreeBSD$ .\" -.Dd February 14, 2013 +.Dd October 5, 2015 .Dt GETADDRINFO 3 .Os .Sh NAME @@ -236,15 +236,14 @@ The list can be traversed by following t pointer in each .Li addrinfo structure until a null pointer is encountered. -The three members +Each returned +.Li addrinfo +structure contains three members that are suitable for a call to +.Xr socket 2 : .Fa ai_family, .Fa ai_socktype, and -.Fa ai_protocol -in each returned -.Li addrinfo -structure are suitable for a call to -.Xr socket 2 . +.Fa ai_protocol . For each .Li addrinfo structure in the list, the From owner-svn-src-all@freebsd.org Wed Oct 14 17:07:25 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id AB053A13DD0; Wed, 14 Oct 2015 17:07:25 +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 76128F67; Wed, 14 Oct 2015 17:07:25 +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 t9EH7OUN028737; Wed, 14 Oct 2015 17:07:24 GMT (envelope-from bz@FreeBSD.org) Received: (from bz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9EH7O3Z028736; Wed, 14 Oct 2015 17:07:24 GMT (envelope-from bz@FreeBSD.org) Message-Id: <201510141707.t9EH7O3Z028736@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bz set sender to bz@FreeBSD.org using -f From: "Bjoern A. Zeeb" Date: Wed, 14 Oct 2015 17:07:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289319 - 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 " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Oct 2015 17:07:25 -0000 Author: bz Date: Wed Oct 14 17:07:24 2015 New Revision: 289319 URL: https://svnweb.freebsd.org/changeset/base/289319 Log: HWPMC depends on pmu.c even if device pmu is not specified. Would be great if we could just automatically enabled "device pmu" if we try to compile in HWPMC. MFC after: 2 weeks Sponsored by: DARPA/AFRL Reviewed by: andrew Differential Revision: https://reviews.freebsd.org/D3877 Modified: head/sys/conf/files.arm Modified: head/sys/conf/files.arm ============================================================================== --- head/sys/conf/files.arm Wed Oct 14 17:00:35 2015 (r289318) +++ head/sys/conf/files.arm Wed Oct 14 17:07:24 2015 (r289319) @@ -56,7 +56,7 @@ arm/arm/platform_if.m optional platform arm/arm/pmap.c optional !armv6 arm/arm/pmap-v6.c optional armv6 !arm_new_pmap arm/arm/pmap-v6-new.c optional armv6 arm_new_pmap -arm/arm/pmu.c optional pmu +arm/arm/pmu.c optional pmu | hwpmc arm/arm/sc_machdep.c optional sc arm/arm/setcpsr.S standard arm/arm/setstack.s standard From owner-svn-src-all@freebsd.org Wed Oct 14 17:20:20 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B45CAA1538B; Wed, 14 Oct 2015 17:20:20 +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 881C519C6; Wed, 14 Oct 2015 17:20:20 +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 t9EHKJJr032715; Wed, 14 Oct 2015 17:20:19 GMT (envelope-from bz@FreeBSD.org) Received: (from bz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9EHKJ8i032714; Wed, 14 Oct 2015 17:20:19 GMT (envelope-from bz@FreeBSD.org) Message-Id: <201510141720.t9EHKJ8i032714@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bz set sender to bz@FreeBSD.org using -f From: "Bjoern A. Zeeb" Date: Wed, 14 Oct 2015 17:20:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289320 - 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 " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Oct 2015 17:20:20 -0000 Author: bz Date: Wed Oct 14 17:20:19 2015 New Revision: 289320 URL: https://svnweb.freebsd.org/changeset/base/289320 Log: Now that we can detect the Cortex-A8 properly, fix the event list according to the Cortex-A8 TRM r3p2 section 3.2.49. The A8 list differs from the "ARM-v7 common" list, given the A8 was an earlier model. There is still more work to be done for other Cortex-Ax version as andrew points out, but I am just trying to fix A8 for now for teaching. MFC after: 2 weeks Sponsored by: DARPA/AFRL Obtained from: Cambridge/L41 Reviewed by: andrew Differential Revision: https://reviews.freebsd.org/D3876 Modified: head/sys/dev/hwpmc/pmc_events.h Modified: head/sys/dev/hwpmc/pmc_events.h ============================================================================== --- head/sys/dev/hwpmc/pmc_events.h Wed Oct 14 17:07:24 2015 (r289319) +++ head/sys/dev/hwpmc/pmc_events.h Wed Oct 14 17:20:19 2015 (r289320) @@ -5027,7 +5027,7 @@ __PMC_EV_ALIAS("IMPC_C0H_TRK_REQUEST.ALL #define PMC_EV_ARMV7_FIRST PMC_EV_ARMV7_EVENT_00H #define PMC_EV_ARMV7_LAST PMC_EV_ARMV7_EVENT_FFH -#define __PMC_EV_ALIAS_ARMV7_COMMON() \ +#define __PMC_EV_ALIAS_ARMV7_COMMON_A8() \ __PMC_EV_ALIAS("PMNC_SW_INCR", ARMV7_EVENT_00H) \ __PMC_EV_ALIAS("L1_ICACHE_REFILL", ARMV7_EVENT_01H) \ __PMC_EV_ALIAS("ITLB_REFILL", ARMV7_EVENT_02H) \ @@ -5046,7 +5046,10 @@ __PMC_EV_ALIAS("IMPC_C0H_TRK_REQUEST.ALL __PMC_EV_ALIAS("MEM_UNALIGNED_ACCESS", ARMV7_EVENT_0FH) \ __PMC_EV_ALIAS("PC_BRANCH_MIS_PRED", ARMV7_EVENT_10H) \ __PMC_EV_ALIAS("CLOCK_CYCLES", ARMV7_EVENT_11H) \ - __PMC_EV_ALIAS("PC_BRANCH_PRED", ARMV7_EVENT_12H) \ + __PMC_EV_ALIAS("PC_BRANCH_PRED", ARMV7_EVENT_12H) + +#define __PMC_EV_ALIAS_ARMV7_COMMON() \ + __PMC_EV_ALIAS_ARMV7_COMMON_A8() \ __PMC_EV_ALIAS("MEM_ACCESS", ARMV7_EVENT_13H) \ __PMC_EV_ALIAS("L1_ICACHE_ACCESS", ARMV7_EVENT_14H) \ __PMC_EV_ALIAS("L1_DCACHE_WB", ARMV7_EVENT_15H) \ @@ -5060,8 +5063,40 @@ __PMC_EV_ALIAS("IMPC_C0H_TRK_REQUEST.ALL __PMC_EV_ALIAS("BUS_CYCLES", ARMV7_EVENT_1DH) \ __PMC_EV_ALIAS("CPU_CYCLES", ARMV7_EVENT_FFH) -#define __PMC_EV_ALIAS_ARMV7_CORTEX_A8() \ - __PMC_EV_ALIAS_ARMV7_COMMON() +#define __PMC_EV_ALIAS_ARMV7_CORTEX_A8() \ + __PMC_EV_ALIAS_ARMV7_COMMON_A8() \ + __PMC_EV_ALIAS("WRITE_BUF_FULL", ARMV7_EVENT_40H) \ + __PMC_EV_ALIAS("L2_STORE_MERGED", ARMV7_EVENT_41H) \ + __PMC_EV_ALIAS("L2_STORE_BUFFERABLE", ARMV7_EVENT_42H) \ + __PMC_EV_ALIAS("L2_ACCESS", ARMV7_EVENT_43H) \ + __PMC_EV_ALIAS("L2_CACHE_MISS", ARMV7_EVENT_44H) \ + __PMC_EV_ALIAS("AXI_READ", ARMV7_EVENT_45H) \ + __PMC_EV_ALIAS("AXI_WRITE", ARMV7_EVENT_46H) \ + __PMC_EV_ALIAS("MEM_REPLAY_EVT", ARMV7_EVENT_47H) \ + __PMC_EV_ALIAS("MEM_UNALIGNED_ACCESS_REPLAY", ARMV7_EVENT_48H) \ + __PMC_EV_ALIAS("L1_DCACHE_HASH_MISS", ARMV7_EVENT_49H) \ + __PMC_EV_ALIAS("L1_ICACHE_HASH_MISS", ARMV7_EVENT_4AH) \ + __PMC_EV_ALIAS("L1_CACHE_PAGECOL_ALIAS", ARMV7_EVENT_4BH) \ + __PMC_EV_ALIAS("L1_DCACHE_NEON_ACCESS", ARMV7_EVENT_4CH) \ + __PMC_EV_ALIAS("L1_DCACHE_NEON_CACHEABLE", ARMV7_EVENT_4DH) \ + __PMC_EV_ALIAS("L2_CACHE_NEON_MEM_ACCESS", ARMV7_EVENT_4EH) \ + __PMC_EV_ALIAS("L2_CACHE_NEON_HIT", ARMV7_EVENT_4FH) \ + __PMC_EV_ALIAS("L1_CACHE_ACCESS_NOCP15", ARMV7_EVENT_50H) \ + __PMC_EV_ALIAS("RET_STACK_MISPREDICT", ARMV7_EVENT_51H) \ + __PMC_EV_ALIAS("BRANCH_DIR_MISPREDICT", ARMV7_EVENT_52H) \ + __PMC_EV_ALIAS("PRED_BRANCH_PRED_TAKEN", ARMV7_EVENT_53H) \ + __PMC_EV_ALIAS("PRED_BRANCH_EXEC_TAKEN", ARMV7_EVENT_54H) \ + __PMC_EV_ALIAS("OPS_ISSUED", ARMV7_EVENT_55H) \ + __PMC_EV_ALIAS("CYCLES_NO_INSTRUCTION", ARMV7_EVENT_56H) \ + __PMC_EV_ALIAS("INSTRUCTIONS_ISSUED_CYCLE", ARMV7_EVENT_57H) \ + __PMC_EV_ALIAS("CYCLES_STALLED_NEON_MRC", ARMV7_EVENT_58H) \ + __PMC_EV_ALIAS("CYCLES_STALLED_NEON_FULLQ", ARMV7_EVENT_59H) \ + __PMC_EV_ALIAS("CYCLES_NONIDLE_NEON_INT", ARMV7_EVENT_5AH) \ + __PMC_EV_ALIAS("PMUEXTIN0_EVT", ARMV7_EVENT_70H) \ + __PMC_EV_ALIAS("PMUEXTIN1_EVT", ARMV7_EVENT_71H) \ + __PMC_EV_ALIAS("PMUEXTIN_EVT", ARMV7_EVENT_72H) +#define PMC_EV_ARMV7_CORTEX_A8_FIRST PMC_EV_ARMV7_PMNC_SW_INCR +#define PMC_EV_ARMV7_CORTEX_A8_LAST PMC_EV_ARMV7_PMUEXTIN_EVT #define __PMC_EV_ALIAS_ARMV7_CORTEX_A9() \ __PMC_EV_ALIAS_ARMV7_COMMON() \ From owner-svn-src-all@freebsd.org Wed Oct 14 18:08:40 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3A31FA15ED1; Wed, 14 Oct 2015 18:08:40 +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 04627A43; Wed, 14 Oct 2015 18:08:39 +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 t9EI8d59046966; Wed, 14 Oct 2015 18:08:39 GMT (envelope-from des@FreeBSD.org) Received: (from des@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9EI8dnm046965; Wed, 14 Oct 2015 18:08:39 GMT (envelope-from des@FreeBSD.org) Message-Id: <201510141808.t9EI8dnm046965@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?= Date: Wed, 14 Oct 2015 18:08:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289321 - head/contrib/unbound/doc X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Oct 2015 18:08:40 -0000 Author: des Date: Wed Oct 14 18:08:38 2015 New Revision: 289321 URL: https://svnweb.freebsd.org/changeset/base/289321 Log: Apply r3505 (s/SIGQUIT/SIGTERM/ in man page) PR: 203580 Modified: head/contrib/unbound/doc/unbound.conf.5.in Modified: head/contrib/unbound/doc/unbound.conf.5.in ============================================================================== --- head/contrib/unbound/doc/unbound.conf.5.in Wed Oct 14 17:20:19 2015 (r289320) +++ head/contrib/unbound/doc/unbound.conf.5.in Wed Oct 14 18:08:38 2015 (r289321) @@ -481,7 +481,7 @@ kill \-HUP `cat @UNBOUND_PIDFILE@` .fi triggers a reload, .nf -kill \-QUIT `cat @UNBOUND_PIDFILE@` +kill \-TERM `cat @UNBOUND_PIDFILE@` .fi gracefully terminates. .TP From owner-svn-src-all@freebsd.org Wed Oct 14 18:27:37 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E3032A13510; Wed, 14 Oct 2015 18:27: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 9F5051802; Wed, 14 Oct 2015 18:27: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 t9EIRZ75053136; Wed, 14 Oct 2015 18:27:35 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9EIRZXv053135; Wed, 14 Oct 2015 18:27:35 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201510141827.t9EIRZXv053135@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Wed, 14 Oct 2015 18:27:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289322 - 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 " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Oct 2015 18:27:37 -0000 Author: kib Date: Wed Oct 14 18:27:35 2015 New Revision: 289322 URL: https://svnweb.freebsd.org/changeset/base/289322 Log: Allow PT_INTERP and PT_NOTES segments to be located anywhere in the executable image. Keep one page (arbitrary) limit on the max allowed size of the PT_NOTES. The ELF image activators still require that program headers of the executable are fully contained in the first page of the image file. Reviewed by: emaste, jhb Sponsored by: The FreeBSD Foundation MFC after: 2 weeks Differential revision: https://reviews.freebsd.org/D3871 Modified: head/sys/kern/imgact_elf.c Modified: head/sys/kern/imgact_elf.c ============================================================================== --- head/sys/kern/imgact_elf.c Wed Oct 14 18:08:38 2015 (r289321) +++ head/sys/kern/imgact_elf.c Wed Oct 14 18:27:35 2015 (r289322) @@ -721,21 +721,22 @@ fail: static int __CONCAT(exec_, __elfN(imgact))(struct image_params *imgp) { - const Elf_Ehdr *hdr = (const Elf_Ehdr *)imgp->image_header; + struct thread *td; + const Elf_Ehdr *hdr; const Elf_Phdr *phdr; Elf_Auxargs *elf_auxargs; struct vmspace *vmspace; - vm_prot_t prot; - u_long text_size = 0, data_size = 0, total_size = 0; - u_long text_addr = 0, data_addr = 0; - u_long seg_size, seg_addr; - u_long addr, baddr, et_dyn_addr, entry = 0, proghdr = 0; - int32_t osrel = 0; - int error = 0, i, n, interp_name_len = 0; - const char *err_str = NULL, *interp = NULL, *newinterp = NULL; + const char *err_str, *newinterp; + char *interp, *interp_buf, *path; Elf_Brandinfo *brand_info; - char *path; struct sysentvec *sv; + vm_prot_t prot; + u_long text_size, data_size, total_size, text_addr, data_addr; + u_long seg_size, seg_addr, addr, baddr, et_dyn_addr, entry, proghdr; + int32_t osrel; + int error, i, n, interp_name_len, have_interp; + + hdr = (const Elf_Ehdr *)imgp->image_header; /* * Do we have a valid ELF header ? @@ -763,8 +764,17 @@ __CONCAT(exec_, __elfN(imgact))(struct i uprintf("Unaligned program headers\n"); return (ENOEXEC); } - n = 0; + + n = error = 0; baddr = 0; + osrel = 0; + text_size = data_size = total_size = text_addr = data_addr = 0; + entry = proghdr = 0; + interp_name_len = 0; + err_str = newinterp = NULL; + interp = interp_buf = NULL; + td = curthread; + for (i = 0; i < hdr->e_phnum; i++) { switch (phdr[i].p_type) { case PT_LOAD: @@ -774,14 +784,32 @@ __CONCAT(exec_, __elfN(imgact))(struct i break; case PT_INTERP: /* Path to interpreter */ - if (phdr[i].p_filesz > MAXPATHLEN || - phdr[i].p_offset > PAGE_SIZE || - phdr[i].p_filesz > PAGE_SIZE - phdr[i].p_offset) { + if (phdr[i].p_filesz > MAXPATHLEN) { uprintf("Invalid PT_INTERP\n"); - return (ENOEXEC); + error = ENOEXEC; + goto ret; } - interp = imgp->image_header + phdr[i].p_offset; interp_name_len = phdr[i].p_filesz; + if (phdr[i].p_offset > PAGE_SIZE || + interp_name_len > PAGE_SIZE - phdr[i].p_offset) { + VOP_UNLOCK(imgp->vp, 0); + interp_buf = malloc(interp_name_len + 1, M_TEMP, + M_WAITOK); + vn_lock(imgp->vp, LK_EXCLUSIVE | LK_RETRY); + error = vn_rdwr(UIO_READ, imgp->vp, interp_buf, + interp_name_len, phdr[i].p_offset, + UIO_SYSSPACE, IO_NODELOCKED, td->td_ucred, + NOCRED, NULL, td); + if (error != 0) { + uprintf("i/o error PT_INTERP\n"); + goto ret; + } + interp_buf[interp_name_len] = '\0'; + interp = interp_buf; + } else { + interp = __DECONST(char *, imgp->image_header) + + phdr[i].p_offset; + } break; case PT_GNU_STACK: if (__elfN(nxstack)) @@ -797,12 +825,14 @@ __CONCAT(exec_, __elfN(imgact))(struct i if (brand_info == NULL) { uprintf("ELF binary type \"%u\" not known.\n", hdr->e_ident[EI_OSABI]); - return (ENOEXEC); + error = ENOEXEC; + goto ret; } if (hdr->e_type == ET_DYN) { if ((brand_info->flags & BI_CAN_EXEC_DYN) == 0) { uprintf("Cannot execute shared object\n"); - return (ENOEXEC); + error = ENOEXEC; + goto ret; } /* * Honour the base load address from the dso if it is @@ -835,8 +865,8 @@ __CONCAT(exec_, __elfN(imgact))(struct i imgp->proc->p_sysent = sv; vn_lock(imgp->vp, LK_EXCLUSIVE | LK_RETRY); - if (error) - return (error); + if (error != 0) + goto ret; for (i = 0; i < hdr->e_phnum; i++) { switch (phdr[i].p_type) { @@ -849,7 +879,7 @@ __CONCAT(exec_, __elfN(imgact))(struct i phdr[i].p_memsz, phdr[i].p_filesz, prot, sv->sv_pagesize); if (error != 0) - return (error); + goto ret; /* * If this segment contains the program headers, @@ -921,7 +951,8 @@ __CONCAT(exec_, __elfN(imgact))(struct i if (err_str != NULL) { PROC_UNLOCK(imgp->proc); uprintf("%s\n", err_str); - return (ENOMEM); + error = ENOMEM; + goto ret; } vmspace = imgp->proc->p_vmspace; @@ -936,14 +967,14 @@ __CONCAT(exec_, __elfN(imgact))(struct i * calculation is that it leaves room for the heap to grow to * its maximum allowed size. */ - addr = round_page((vm_offset_t)vmspace->vm_daddr + lim_max(curthread, + addr = round_page((vm_offset_t)vmspace->vm_daddr + lim_max(td, RLIMIT_DATA)); PROC_UNLOCK(imgp->proc); imgp->entry_addr = entry; if (interp != NULL) { - int have_interp = FALSE; + have_interp = FALSE; VOP_UNLOCK(imgp->vp, 0); if (brand_info->emul_path != NULL && brand_info->emul_path[0] != '\0') { @@ -969,7 +1000,7 @@ __CONCAT(exec_, __elfN(imgact))(struct i vn_lock(imgp->vp, LK_EXCLUSIVE | LK_RETRY); if (error != 0) { uprintf("ELF interpreter %s not found\n", interp); - return (error); + goto ret; } } else addr = et_dyn_addr; @@ -993,6 +1024,8 @@ __CONCAT(exec_, __elfN(imgact))(struct i imgp->reloc_base = addr; imgp->proc->p_osrel = osrel; + ret: + free(interp_buf, M_TEMP); return (error); } @@ -2122,19 +2155,42 @@ __elfN(parse_notes)(struct image_params { const Elf_Note *note, *note0, *note_end; const char *note_name; - int i; + char *buf; + int i, error; + boolean_t res; - if (pnote == NULL || pnote->p_offset > PAGE_SIZE || - pnote->p_filesz > PAGE_SIZE - pnote->p_offset) + /* We need some limit, might as well use PAGE_SIZE. */ + if (pnote == NULL || pnote->p_filesz > PAGE_SIZE) return (FALSE); - - note = note0 = (const Elf_Note *)(imgp->image_header + pnote->p_offset); - note_end = (const Elf_Note *)(imgp->image_header + - pnote->p_offset + pnote->p_filesz); + ASSERT_VOP_LOCKED(imgp->vp, "parse_notes"); + if (pnote->p_offset > PAGE_SIZE || + pnote->p_filesz > PAGE_SIZE - pnote->p_offset) { + VOP_UNLOCK(imgp->vp, 0); + buf = malloc(pnote->p_filesz, M_TEMP, M_WAITOK); + vn_lock(imgp->vp, LK_EXCLUSIVE | LK_RETRY); + error = vn_rdwr(UIO_READ, imgp->vp, buf, pnote->p_filesz, + pnote->p_offset, UIO_SYSSPACE, IO_NODELOCKED, + curthread->td_ucred, NOCRED, NULL, curthread); + if (error != 0) { + uprintf("i/o error PT_NOTE\n"); + res = FALSE; + goto ret; + } + note = note0 = (const Elf_Note *)buf; + note_end = (const Elf_Note *)(buf + pnote->p_filesz); + } else { + note = note0 = (const Elf_Note *)(imgp->image_header + + pnote->p_offset); + note_end = (const Elf_Note *)(imgp->image_header + + pnote->p_offset + pnote->p_filesz); + buf = NULL; + } for (i = 0; i < 100 && note >= note0 && note < note_end; i++) { if (!aligned(note, Elf32_Addr) || (const char *)note_end - - (const char *)note < sizeof(Elf_Note)) - return (FALSE); + (const char *)note < sizeof(Elf_Note)) { + res = FALSE; + goto ret; + } if (note->n_namesz != checknote->hdr.n_namesz || note->n_descsz != checknote->hdr.n_descsz || note->n_type != checknote->hdr.n_type) @@ -2150,17 +2206,21 @@ __elfN(parse_notes)(struct image_params * from the ELF OSABI-note if necessary. */ if ((checknote->flags & BN_TRANSLATE_OSREL) != 0 && - checknote->trans_osrel != NULL) - return (checknote->trans_osrel(note, osrel)); - return (TRUE); - + checknote->trans_osrel != NULL) { + res = checknote->trans_osrel(note, osrel); + goto ret; + } + res = TRUE; + goto ret; nextnote: note = (const Elf_Note *)((const char *)(note + 1) + roundup2(note->n_namesz, ELF_NOTE_ROUNDSIZE) + roundup2(note->n_descsz, ELF_NOTE_ROUNDSIZE)); } - - return (FALSE); + res = FALSE; +ret: + free(buf, M_TEMP); + return (res); } /* From owner-svn-src-all@freebsd.org Wed Oct 14 18:29:23 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 590EAA13579; Wed, 14 Oct 2015 18:29:23 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0A2031A6D; Wed, 14 Oct 2015 18:29:22 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t9EITM4V053297; Wed, 14 Oct 2015 18:29:22 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9EITMmv053296; Wed, 14 Oct 2015 18:29:22 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201510141829.t9EITMmv053296@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Wed, 14 Oct 2015 18:29:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289324 - 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 " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Oct 2015 18:29:23 -0000 Author: kib Date: Wed Oct 14 18:29:21 2015 New Revision: 289324 URL: https://svnweb.freebsd.org/changeset/base/289324 Log: Allow PT_NOTES segments to be located anywhere in the executable image. The dynamic linker still requires that program headers of the executable or dso are mapped by a PT_LOAD segment. Reviewed by: emaste, jhb Sponsored by: The FreeBSD Foundation MFC after: 2 weeks Differential revision: https://reviews.freebsd.org/D3871 Modified: head/libexec/rtld-elf/map_object.c Modified: head/libexec/rtld-elf/map_object.c ============================================================================== --- head/libexec/rtld-elf/map_object.c Wed Oct 14 18:29:00 2015 (r289323) +++ head/libexec/rtld-elf/map_object.c Wed Oct 14 18:29:21 2015 (r289324) @@ -88,6 +88,8 @@ map_object(int fd, const char *path, con size_t relro_size; Elf_Addr note_start; Elf_Addr note_end; + char *note_map; + size_t note_map_len; hdr = get_elf_header(fd, path); if (hdr == NULL) @@ -108,6 +110,7 @@ map_object(int fd, const char *path, con relro_size = 0; note_start = 0; note_end = 0; + note_map = NULL; segs = alloca(sizeof(segs[0]) * hdr->e_phnum); stack_flags = RTLD_DEFAULT_STACK_PF_EXEC | PF_R | PF_W; while (phdr < phlimit) { @@ -150,9 +153,20 @@ map_object(int fd, const char *path, con case PT_NOTE: if (phdr->p_offset > PAGE_SIZE || - phdr->p_offset + phdr->p_filesz > PAGE_SIZE) - break; - note_start = (Elf_Addr)(char *)hdr + phdr->p_offset; + phdr->p_offset + phdr->p_filesz > PAGE_SIZE) { + note_map_len = round_page(phdr->p_offset + + phdr->p_filesz) - trunc_page(phdr->p_offset); + note_map = mmap(NULL, note_map_len, PROT_READ, + MAP_PRIVATE, fd, trunc_page(phdr->p_offset)); + if (note_map == MAP_FAILED) { + _rtld_error("%s: error mapping PT_NOTE (%d)", path, errno); + goto error; + } + note_start = (Elf_Addr)(note_map + phdr->p_offset - + trunc_page(phdr->p_offset)); + } else { + note_start = (Elf_Addr)(char *)hdr + phdr->p_offset; + } note_end = note_start + phdr->p_filesz; break; } @@ -295,12 +309,16 @@ map_object(int fd, const char *path, con obj->relro_size = round_page(relro_size); if (note_start < note_end) digest_notes(obj, note_start, note_end); + if (note_map != NULL) + munmap(note_map, note_map_len); munmap(hdr, PAGE_SIZE); return (obj); error1: munmap(mapbase, mapsize); error: + if (note_map != NULL && note_map != MAP_FAILED) + munmap(note_map, note_map_len); munmap(hdr, PAGE_SIZE); return (NULL); } From owner-svn-src-all@freebsd.org Wed Oct 14 18:30:05 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A1B34A135DF; Wed, 14 Oct 2015 18:30:05 +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 6C1EC1CE5; Wed, 14 Oct 2015 18:30:05 +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 t9EIU4L7053428; Wed, 14 Oct 2015 18:30:04 GMT (envelope-from bz@FreeBSD.org) Received: (from bz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9EIU4Ec053427; Wed, 14 Oct 2015 18:30:04 GMT (envelope-from bz@FreeBSD.org) Message-Id: <201510141830.t9EIU4Ec053427@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bz set sender to bz@FreeBSD.org using -f From: "Bjoern A. Zeeb" Date: Wed, 14 Oct 2015 18:30:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289326 - 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 " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Oct 2015 18:30:05 -0000 Author: bz Date: Wed Oct 14 18:30:04 2015 New Revision: 289326 URL: https://svnweb.freebsd.org/changeset/base/289326 Log: Properly define functions withut argument and wrap for { for style purposes as followed in the rest of the file. This will hopefully make gcc more happy. Modified: head/sys/netinet/tcp_pcap.c Modified: head/sys/netinet/tcp_pcap.c ============================================================================== --- head/sys/netinet/tcp_pcap.c Wed Oct 14 18:29:53 2015 (r289325) +++ head/sys/netinet/tcp_pcap.c Wed Oct 14 18:30:04 2015 (r289326) @@ -76,12 +76,16 @@ SYSCTL_INT(_net_inet_tcp, OID_AUTO, tcp_ /* Initialize the values. */ static void -tcp_pcap_max_set() { +tcp_pcap_max_set(void) +{ + tcp_pcap_clusters_referenced_max = nmbclusters / 4; } void -tcp_pcap_init() { +tcp_pcap_init(void) +{ + tcp_pcap_max_set(); EVENTHANDLER_REGISTER(nmbclusters_change, tcp_pcap_max_set, NULL, EVENTHANDLER_PRI_ANY); From owner-svn-src-all@freebsd.org Wed Oct 14 18:32:08 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4C481A13755; Wed, 14 Oct 2015 18:32:08 +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 18B81E5; Wed, 14 Oct 2015 18:32:08 +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 t9EIW7oo056069; Wed, 14 Oct 2015 18:32:07 GMT (envelope-from bz@FreeBSD.org) Received: (from bz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9EIW7gM056068; Wed, 14 Oct 2015 18:32:07 GMT (envelope-from bz@FreeBSD.org) Message-Id: <201510141832.t9EIW7gM056068@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bz set sender to bz@FreeBSD.org using -f From: "Bjoern A. Zeeb" Date: Wed, 14 Oct 2015 18:32:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289327 - 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 " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Oct 2015 18:32:08 -0000 Author: bz Date: Wed Oct 14 18:32:06 2015 New Revision: 289327 URL: https://svnweb.freebsd.org/changeset/base/289327 Log: Fix the dependencies to be similar to TCP as without TCP, e.g., NOIP kernels this will otherwise fail. Modified: head/sys/conf/files Modified: head/sys/conf/files ============================================================================== --- head/sys/conf/files Wed Oct 14 18:30:04 2015 (r289326) +++ head/sys/conf/files Wed Oct 14 18:32:06 2015 (r289327) @@ -3682,7 +3682,7 @@ netinet/tcp_input.c optional inet | ine netinet/tcp_lro.c optional inet | inet6 netinet/tcp_output.c optional inet | inet6 netinet/tcp_offload.c optional tcp_offload inet | tcp_offload inet6 -netinet/tcp_pcap.c optional tcppcap +netinet/tcp_pcap.c optional inet tcppcap | inet6 tcppcap netinet/tcp_reass.c optional inet | inet6 netinet/tcp_sack.c optional inet | inet6 netinet/tcp_subr.c optional inet | inet6 From owner-svn-src-all@freebsd.org Wed Oct 14 18:53:35 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A25C4A1502C; Wed, 14 Oct 2015 18:53:35 +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 700EE1266; Wed, 14 Oct 2015 18:53:35 +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 t9EIrYvR062019; Wed, 14 Oct 2015 18:53:34 GMT (envelope-from bz@FreeBSD.org) Received: (from bz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9EIrYd2062018; Wed, 14 Oct 2015 18:53:34 GMT (envelope-from bz@FreeBSD.org) Message-Id: <201510141853.t9EIrYd2062018@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bz set sender to bz@FreeBSD.org using -f From: "Bjoern A. Zeeb" Date: Wed, 14 Oct 2015 18:53:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289328 - 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 " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Oct 2015 18:53:35 -0000 Author: bz Date: Wed Oct 14 18:53:34 2015 New Revision: 289328 URL: https://svnweb.freebsd.org/changeset/base/289328 Log: Revert r289319 as it seems some ARM kernels include HWPMC but no FDT. To me that seems broken as certain interrupts will never be handled properly. I'll re-open D3877 and we can seek a better solution and try again. For now go back to that state and avoid compile time errors. Modified: head/sys/conf/files.arm Modified: head/sys/conf/files.arm ============================================================================== --- head/sys/conf/files.arm Wed Oct 14 18:32:06 2015 (r289327) +++ head/sys/conf/files.arm Wed Oct 14 18:53:34 2015 (r289328) @@ -56,7 +56,7 @@ arm/arm/platform_if.m optional platform arm/arm/pmap.c optional !armv6 arm/arm/pmap-v6.c optional armv6 !arm_new_pmap arm/arm/pmap-v6-new.c optional armv6 arm_new_pmap -arm/arm/pmu.c optional pmu | hwpmc +arm/arm/pmu.c optional pmu arm/arm/sc_machdep.c optional sc arm/arm/setcpsr.S standard arm/arm/setstack.s standard From owner-svn-src-all@freebsd.org Wed Oct 14 19:04:55 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 18300A1543E; Wed, 14 Oct 2015 19:04:55 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: from mail-io0-x230.google.com (mail-io0-x230.google.com [IPv6:2607:f8b0:4001:c06::230]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id DA9401D84; Wed, 14 Oct 2015 19:04:54 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: by iofl186 with SMTP id l186so66182571iof.2; Wed, 14 Oct 2015 12:04:54 -0700 (PDT) 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=348Xkr9ZBv8ginMCv9JFct31+B96kRtHmMT47xQwj0M=; b=jqPb3yVMwWQTbo1I64luCEMs3k6eE1Y7uz0A0JyUC51JmY3R8NTHZQ3DyeTDBTPFBW nDtvV+9nZhg9sa474pGVCsY6nP9mls0bbBJqb9Z5dkbtcuhxngONQZUvmfTRtWjAj7UO nWHO5TMLPtyO+YoJmVVvAvIHYpeKLBEEGVk6GACSd5cWZYv4f5VpM/h5kgylgrTxWt5Z kJ5V6ZU0y7gjlvIfdMNoBhHCYKjUU0MNleSTgAOw0s0rc2u1mW2SdYqFS0WIgciRFkLP kQUWFsB0xmhgGdMvuWAnejZYY5YKyiAmguYDZ/8Hp1npasJq9hHUiwgKGbnLplUCKCq2 mDlw== MIME-Version: 1.0 X-Received: by 10.107.46.228 with SMTP id u97mr5622657iou.165.1444849494277; Wed, 14 Oct 2015 12:04:54 -0700 (PDT) Received: by 10.36.46.66 with HTTP; Wed, 14 Oct 2015 12:04:54 -0700 (PDT) In-Reply-To: <201510141853.t9EIrYd2062018@repo.freebsd.org> References: <201510141853.t9EIrYd2062018@repo.freebsd.org> Date: Wed, 14 Oct 2015 12:04:54 -0700 Message-ID: Subject: Re: svn commit: r289328 - head/sys/conf From: Adrian Chadd To: "Bjoern A. Zeeb" 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 " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Oct 2015 19:04:55 -0000 On 14 October 2015 at 11:53, Bjoern A. Zeeb wrote: > Author: bz > Date: Wed Oct 14 18:53:34 2015 > New Revision: 289328 > URL: https://svnweb.freebsd.org/changeset/base/289328 > > Log: > Revert r289319 as it seems some ARM kernels include HWPMC but no FDT. > To me that seems broken as certain interrupts will never be handled > properly. I'll re-open D3877 and we can seek a better solution and > try again. For now go back to that state and avoid compile time errors. > > Modified: > head/sys/conf/files.arm > > Modified: head/sys/conf/files.arm > ============================================================================== > --- head/sys/conf/files.arm Wed Oct 14 18:32:06 2015 (r289327) > +++ head/sys/conf/files.arm Wed Oct 14 18:53:34 2015 (r289328) > @@ -56,7 +56,7 @@ arm/arm/platform_if.m optional platform > arm/arm/pmap.c optional !armv6 > arm/arm/pmap-v6.c optional armv6 !arm_new_pmap > arm/arm/pmap-v6-new.c optional armv6 arm_new_pmap > -arm/arm/pmu.c optional pmu | hwpmc > +arm/arm/pmu.c optional pmu > arm/arm/sc_machdep.c optional sc > arm/arm/setcpsr.S standard > arm/arm/setstack.s standard > There are pre-FDT ARM boards still, right? Maybe add hwpmc_pmu as an option? -a From owner-svn-src-all@freebsd.org Wed Oct 14 19:14:07 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2BECCA156A2; Wed, 14 Oct 2015 19:14:07 +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 EA9072B2; Wed, 14 Oct 2015 19:14:06 +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 t9EJE6c5068265; Wed, 14 Oct 2015 19:14:06 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9EJE6Il068264; Wed, 14 Oct 2015 19:14:06 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201510141914.t9EJE6Il068264@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Wed, 14 Oct 2015 19:14:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289329 - head/etc/mtree X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Oct 2015 19:14:07 -0000 Author: emaste Date: Wed Oct 14 19:14:05 2015 New Revision: 289329 URL: https://svnweb.freebsd.org/changeset/base/289329 Log: Add mtree entry for casper .debug files This was missed in r258838. Sponsored by: The FreeBSD Foundation Modified: head/etc/mtree/BSD.debug.dist Modified: head/etc/mtree/BSD.debug.dist ============================================================================== --- head/etc/mtree/BSD.debug.dist Wed Oct 14 18:53:34 2015 (r289328) +++ head/etc/mtree/BSD.debug.dist Wed Oct 14 19:14:05 2015 (r289329) @@ -17,6 +17,8 @@ .. .. libexec + casper + .. .. sbin .. From owner-svn-src-all@freebsd.org Wed Oct 14 19:19:46 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1677DA1581F; Wed, 14 Oct 2015 19:19:46 +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 D118792D; Wed, 14 Oct 2015 19:19:45 +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 t9EJJiIu068662; Wed, 14 Oct 2015 19:19:44 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9EJJiHr068661; Wed, 14 Oct 2015 19:19:44 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201510141919.t9EJJiHr068661@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Wed, 14 Oct 2015 19:19:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289330 - 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 " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Oct 2015 19:19:46 -0000 Author: emaste Date: Wed Oct 14 19:19:44 2015 New Revision: 289330 URL: https://svnweb.freebsd.org/changeset/base/289330 Log: /libexec subdirs are part of the base system (for *.debug files) Sponsored by: The FreeBSD Foundation Modified: head/share/mk/bsd.prog.mk Modified: head/share/mk/bsd.prog.mk ============================================================================== --- head/share/mk/bsd.prog.mk Wed Oct 14 19:14:05 2015 (r289329) +++ head/share/mk/bsd.prog.mk Wed Oct 14 19:19:44 2015 (r289330) @@ -56,7 +56,7 @@ PROG_FULL=${PROG}.full # Use ${DEBUGDIR} for base system debug files, else .debug subdirectory .if defined(BINDIR) && (\ ${BINDIR} == "/bin" ||\ - ${BINDIR} == "/libexec" ||\ + ${BINDIR:C%/libexec(/.*)?%/libexec%} == "/libexec" ||\ ${BINDIR} == "/sbin" ||\ ${BINDIR:C%/usr/(bin|bsdinstall|libexec|lpr|sendmail|sm.bin|sbin)(/.*)?%/usr/bin%} == "/usr/bin"\ ) From owner-svn-src-all@freebsd.org Wed Oct 14 19:30:05 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D412FA15B15; Wed, 14 Oct 2015 19:30: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 931AE1068; Wed, 14 Oct 2015 19:30: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 t9EJU4ad071881; Wed, 14 Oct 2015 19:30:04 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9EJU4TM071877; Wed, 14 Oct 2015 19:30:04 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201510141930.t9EJU4TM071877@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Wed, 14 Oct 2015 19:30:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289331 - 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 " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Oct 2015 19:30:06 -0000 Author: bdrewery Date: Wed Oct 14 19:30:04 2015 New Revision: 289331 URL: https://svnweb.freebsd.org/changeset/base/289331 Log: Revert r289282 for now as the interaction with a directory containing bsd.files.mk and bsd.subdir.mk is recursing too many times. Modified: head/share/mk/bsd.confs.mk head/share/mk/bsd.files.mk head/share/mk/bsd.incs.mk head/share/mk/bsd.subdir.mk Modified: head/share/mk/bsd.confs.mk ============================================================================== --- head/share/mk/bsd.confs.mk Wed Oct 14 19:19:44 2015 (r289330) +++ head/share/mk/bsd.confs.mk Wed Oct 14 19:30:04 2015 (r289331) @@ -84,7 +84,4 @@ STAGE_TARGETS+= stage_config .endif .endif -config: buildconfig installconfig -.ORDER: buildconfig installconfig - .endif # ${MK_INCLUDES} != "no" Modified: head/share/mk/bsd.files.mk ============================================================================== --- head/share/mk/bsd.files.mk Wed Oct 14 19:19:44 2015 (r289330) +++ head/share/mk/bsd.files.mk Wed Oct 14 19:30:04 2015 (r289331) @@ -94,7 +94,4 @@ buildfiles: stage_as .endif .endif -files: buildfiles installfiles -.ORDER: buildfiles installfiles - .endif # !target(____) Modified: head/share/mk/bsd.incs.mk ============================================================================== --- head/share/mk/bsd.incs.mk Wed Oct 14 19:19:44 2015 (r289330) +++ head/share/mk/bsd.incs.mk Wed Oct 14 19:30:04 2015 (r289331) @@ -99,7 +99,4 @@ STAGE_SYMLINKS.INCS= ${INCSLINKS} .endif .endif -includes: buildincludes installincludes -.ORDER: buildincludes installincludes - .endif # ${MK_INCLUDES} != "no" Modified: head/share/mk/bsd.subdir.mk ============================================================================== --- head/share/mk/bsd.subdir.mk Wed Oct 14 19:19:44 2015 (r289330) +++ head/share/mk/bsd.subdir.mk Wed Oct 14 19:30:04 2015 (r289331) @@ -32,12 +32,9 @@ .if !target(____) ____: -ALL_SUBDIR_TARGETS= all all-man buildconfig buildfiles buildincludes \ - checkdpadd clean cleandepend cleandir cleanilinks \ - cleanobj config depend distribute files includes \ - installconfig installfiles installincludes lint \ - maninstall manlint obj objlink realinstall regress tags \ - ${SUBDIR_TARGETS} +ALL_SUBDIR_TARGETS= all all-man checkdpadd clean cleandepend cleandir \ + cleanilinks cleanobj depend distribute lint maninstall manlint obj \ + objlink realinstall regress tags ${SUBDIR_TARGETS} .include @@ -126,6 +123,23 @@ _sub.${__target}: _SUBDIR .endif .endfor +# This is to support 'make includes' calling 'make buildincludes' and +# 'make installincludes' in the proper order, and to support these +# targets as SUBDIR_TARGETS. +.for __target in files includes config +.for __stage in build install +${__stage}${__target}: +.if make(${__stage}${__target}) +${__stage}${__target}: _sub.${__stage}${__target} +_sub.${__stage}${__target}: _SUBDIR +.endif +.endfor +.if !target(${__target}) +${__target}: .MAKE + ${_+_}cd ${.CURDIR}; ${MAKE} build${__target}; ${MAKE} install${__target} +.endif +.endfor + .endif .if !target(install) From owner-svn-src-all@freebsd.org Wed Oct 14 20:16:23 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 84D17A13690; Wed, 14 Oct 2015 20:16:23 +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 692DAC9B; Wed, 14 Oct 2015 20:16:23 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from mail.xzibition.com (localhost [IPv6:::1]) by freefall.freebsd.org (Postfix) with ESMTP id 5DAC114C0; Wed, 14 Oct 2015 20:16:23 +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 E31BF9EBF; Wed, 14 Oct 2015 20:16:22 +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 w1Gae7OoB6r2; Wed, 14 Oct 2015 20:16:19 +0000 (UTC) Subject: Re: svn commit: r289253 - head/share/mk DKIM-Filter: OpenDKIM Filter v2.9.2 mail.xzibition.com 647619EB9 To: NGie Cooper References: <201510131911.t9DJBMTc034025@repo.freebsd.org> <561D7549.2070202@FreeBSD.org> <561D8B38.7030202@FreeBSD.org> Cc: "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" From: Bryan Drewery Openpgp: id=F9173CB2C3AAEA7A5C8A1F0935D771BB6E4697CF; url=http://www.shatow.net/bryan/bryan2.asc Organization: FreeBSD Message-ID: <561EB815.6050600@FreeBSD.org> Date: Wed, 14 Oct 2015 13:16:21 -0700 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0 MIME-Version: 1.0 In-Reply-To: Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="ae60GpdT2SquElEpUFkHeamoOPTR3bP2t" X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Oct 2015 20:16:23 -0000 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --ae60GpdT2SquElEpUFkHeamoOPTR3bP2t Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 10/13/2015 4:30 PM, NGie Cooper wrote: > On Tue, Oct 13, 2015 at 3:52 PM, Bryan Drewery w= rote: >> On 10/13/2015 3:51 PM, NGie Cooper wrote: >>> On Tue, Oct 13, 2015 at 2:19 PM, Bryan Drewery = wrote: >>> ... >>>>>> On Oct 13, 2015, at 12:11, Bryan Drewery wr= ote: >>>>>> >>>>>> Author: bdrewery >>>>>> Date: Tue Oct 13 19:11:22 2015 >>>>>> New Revision: 289253 >>>>>> URL: https://svnweb.freebsd.org/changeset/base/289253 >>>>>> >>>>>> Log: >>>>>> bsd.subdir.mk: Handle cleanobj. >>>>>> >>>>>> Before this, the target was unknown. Now it will recurse on subd= irs and run >>>>>> the target in the current directory. It is required to recurse a= s there >>>>>> may be subdirs that have objs in their directory or in the object= directory, >>>>>> so it is not enough to just delete the objdir of the subdir paren= t. >>> >>> ... >>> >>>> You sent no text... >>> >>> Hit send on my phone by accident. >>> >>> make cleanobj appears broken with bsd.progs.mk (maybe related to that= >>> makefile snippet). >> >> Can you elaborate? It seems fine to me. >=20 > (cd tests; make cleandir) # does not seem to clean up everything that > was created, like before >=20 I think what is being seen here is because I removed 'cleanobj' from bsd.progs.mk (in r288201) to let bsd.obj.mk handle it. It sometimes recurses clean when needed. If there's an obj dir 'cleanobj' will just remove that and avoid 'clean'. For example (without bsd.progs.mk) ~/svn/clean2/usr.bin/vi # make obj /usr/obj/root/svn/clean2/usr.bin/vi created for /root/svn/clean2/usr.bin/= vi =3D=3D=3D> catalog (obj) /usr/obj/root/svn/clean2/usr.bin/vi/catalog created for /root/svn/clean2/usr.bin/vi/catalog ~/svn/clean2/usr.bin/vi # make cleanobj =3D=3D=3D> catalog (cleanobj) rm -f dump dutch english french german polish ru_RU.KOI8-R spanish swedish uk_UA.KOI8-U zh_CN.GB2312 dutch.UTF-8 french.UTF-8 german.UTF-8 polish.UTF-8 spanish.UTF-8 swedish.UTF-8 zh_CN.UTF-8 ru_RU.UTF-8 uk_UA.UTF-8 english.base *.check __ck1 __ck2 Next call finds no obj dir and tries cleaning in local dirs: ~/svn/clean2/usr.bin/vi # make cleanobj rm -f nex nvi nvi.full nvi.debug cl_funcs.o cl_main.o cl_read.o cl_screen.o cl_term.o conv.o cut.o delete.o encoding.o exf.o key.o line.o log.o main.o mark.o msg.o options.o options_f.o put.o recover.o screen.o search.o seq.o util.o ex.o ex_abbrev.o ex_append.o ex_args.o ex_argv.o ex_at.o ex_bang.o ex_cd.o ex_cmd.o ex_cscope.o ex_delete.o ex_display.o ex_edit.o ex_equal.o ex_file.o ex_filter.o ex_global.o ex_init.o ex_join.o ex_map.o ex_mark.o ex_mkexrc.o ex_move.o ex_open.o ex_preserve.o ex_print.o ex_put.o ex_quit.o ex_read.o ex_screen.o ex_script.o ex_set.o ex_shell.o ex_shift.o ex_source.o ex_stop.o ex_subst.o ex_tag.o ex_txt.o ex_undo.o ex_usage.o ex_util.o ex_version.o ex_visual.o ex_write.o ex_yank.o ex_z.o getc.o v_at.o v_ch.o v_cmd.o v_delete.o v_ex.o v_increment.o v_init.o v_itxt.o v_left.o v_mark.o v_match.o v_paragraph.o v_put.o v_redraw.o v_replace.o v_right.o v_screen.o v_scroll.o v_search.o v_section.o v_sentence.o v_status.o v_txt.o v_ulcase.o v_undo.o v_util.o v_word.o v_xchar.o v_yank.o v_z.o v_zexit.o vi.o vs_line.o vs_msg.o vs_refresh.o vs_relative.o vs_smap.o vs_split.o regcomp.o regerror.o regexec.o regfree.o vi.1.gz vi.1.cat.gz =3D=3D=3D> catalog (clean) rm -f dump dutch english french german polish ru_RU.KOI8-R spanish swedish uk_UA.KOI8-U zh_CN.GB2312 dutch.UTF-8 french.UTF-8 german.UTF-8 polish.UTF-8 spanish.UTF-8 swedish.UTF-8 zh_CN.UTF-8 ru_RU.UTF-8 uk_UA.UTF-8 english.base *.check __ck1 __ck2 rm -f .depend tags =3D=3D=3D> catalog (cleandepend) =3D=3D=3D> catalog (cleanobj) rm -f dump dutch english french german polish ru_RU.KOI8-R spanish swedish uk_UA.KOI8-U zh_CN.GB2312 dutch.UTF-8 french.UTF-8 german.UTF-8 polish.UTF-8 spanish.UTF-8 swedish.UTF-8 zh_CN.UTF-8 ru_RU.UTF-8 uk_UA.UTF-8 english.base *.check __ck1 __ck2 Similar behavior will happen with bsd.progs.mk usage now. 'cleandir' also has this flip-flopping behavior. --=20 Regards, Bryan Drewery --ae60GpdT2SquElEpUFkHeamoOPTR3bP2t 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 iQEcBAEBAgAGBQJWHrgVAAoJEDXXcbtuRpfPlEEH/Asifp/AfYiGh1fG+MI8IaMT U0v0y0iL56TeFbsqaWx5BsY0HViJ1MHrfNw0pv4nAZT7RmiP+4m0OUZZvr3lx4Xi 8XezD7rNvcEDDH4ytMImC7mrhOiLSFPRHyeBagA3nvEv7Pz/4Z9OniBSNp2hLUkb fO0Nar2HeXLxtpCgiVtn/f9pvzdJ/grp/R+lzvoyaITOvH+y9b3ZISeBCm+X4BNi sin28dedrDVNxH0zFi0vRCQ2zKPAd2sigDLP8MD0mvfXgsVYp3l4Oc16Oh3jZtg+ lEefh9Fqw582xKkQ9ZBPOU+YV26I9+GweNcUYlt4QGedGE9MaDVFyJ0lkrvLOzQ= =i4fm -----END PGP SIGNATURE----- --ae60GpdT2SquElEpUFkHeamoOPTR3bP2t-- From owner-svn-src-all@freebsd.org Wed Oct 14 20:22:13 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E2FB3A1385C; Wed, 14 Oct 2015 20:22:13 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 95744110C; Wed, 14 Oct 2015 20:22:13 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t9EKMCVi088994; Wed, 14 Oct 2015 20:22:12 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9EKMC1C088993; Wed, 14 Oct 2015 20:22:12 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201510142022.t9EKMC1C088993@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Wed, 14 Oct 2015 20:22:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289332 - head/tools/regression/lib/msun X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Oct 2015 20:22:14 -0000 Author: ngie Date: Wed Oct 14 20:22:12 2015 New Revision: 289332 URL: https://svnweb.freebsd.org/changeset/base/289332 Log: Fix test-fenv:test_dfl_env when run on some amd64 CPUs Compare the fields that the AMD [1] and Intel [2] specs say will be set once fnstenv returns. Not all amd64 capable processors zero out the env.__x87.__other field (example: AMD Opteron 6308). The AMD64/x64 specs aren't explicit on what the env.__x87.__other field will contain after fnstenv is executed, so the values in env.__x87.__other could be filled with arbitrary data depending on how the CPU-specific implementation of fnstenv. 1. http://support.amd.com/TechDocs/26569_APM_v5.pdf 2. http://www.intel.com/Assets/en_US/PDF/manual/253666.pdf Discussed with: kib, Anton Rang Reviewed by: Daniel O'Connor (earlier patch; pre-generalization) MFC after: 1 week Sponsored by: EMC / Isilon Storage Division Reported by: Bill Morchin Modified: head/tools/regression/lib/msun/test-fenv.c Modified: head/tools/regression/lib/msun/test-fenv.c ============================================================================== --- head/tools/regression/lib/msun/test-fenv.c Wed Oct 14 19:30:04 2015 (r289331) +++ head/tools/regression/lib/msun/test-fenv.c Wed Oct 14 20:22:12 2015 (r289332) @@ -133,8 +133,35 @@ test_dfl_env(void) fenv_t env; fegetenv(&env); + +#ifdef __amd64__ + /* + * Compare the fields that the AMD [1] and Intel [2] specs say will be + * set once fnstenv returns. + * + * Not all amd64 capable processors implement the fnstenv instruction + * by zero'ing out the env.__x87.__other field (example: AMD Opteron + * 6308). The AMD64/x64 specs aren't explicit on what the + * env.__x87.__other field will contain after fnstenv is executed, so + * the values in env.__x87.__other could be filled with arbitrary + * data depending on how the CPU implements fnstenv. + * + * 1. http://support.amd.com/TechDocs/26569_APM_v5.pdf + * 2. http://www.intel.com/Assets/en_US/PDF/manual/253666.pdf + */ + assert(memcmp(&env.__mxcsr, &FE_DFL_ENV->__mxcsr, + sizeof(env.__mxcsr)) == 0); + assert(memcmp(&env.__x87.__control, &FE_DFL_ENV->__x87.__control, + sizeof(env.__x87.__control)) == 0); + assert(memcmp(&env.__x87.__status, &FE_DFL_ENV->__x87.__status, + sizeof(env.__x87.__status)) == 0); + assert(memcmp(&env.__x87.__tag, &FE_DFL_ENV->__x87.__tag, + sizeof(env.__x87.__tag)) == 0); +#else assert(memcmp(&env, FE_DFL_ENV, sizeof(env)) == 0); #endif + +#endif assert(fetestexcept(FE_ALL_EXCEPT) == 0); } From owner-svn-src-all@freebsd.org Wed Oct 14 20:28:16 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 85C57A139FA; Wed, 14 Oct 2015 20:28:16 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4D71415CB; Wed, 14 Oct 2015 20:28:16 +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 t9EKSFi4089231; Wed, 14 Oct 2015 20:28:15 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9EKSFAL089230; Wed, 14 Oct 2015 20:28:15 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201510142028.t9EKSFAL089230@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Wed, 14 Oct 2015 20:28:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289333 - 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 " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Oct 2015 20:28:16 -0000 Author: bdrewery Date: Wed Oct 14 20:28:15 2015 New Revision: 289333 URL: https://svnweb.freebsd.org/changeset/base/289333 Log: Re-indent the ALL_SUBDIR_TARGETS list Modified: head/share/mk/bsd.subdir.mk Modified: head/share/mk/bsd.subdir.mk ============================================================================== --- head/share/mk/bsd.subdir.mk Wed Oct 14 20:22:12 2015 (r289332) +++ head/share/mk/bsd.subdir.mk Wed Oct 14 20:28:15 2015 (r289333) @@ -33,8 +33,9 @@ ____: ALL_SUBDIR_TARGETS= all all-man checkdpadd clean cleandepend cleandir \ - cleanilinks cleanobj depend distribute lint maninstall manlint obj \ - objlink realinstall regress tags ${SUBDIR_TARGETS} + cleanilinks cleanobj depend distribute lint maninstall \ + manlint obj objlink realinstall regress tags \ + ${SUBDIR_TARGETS} .include From owner-svn-src-all@freebsd.org Wed Oct 14 20:30:33 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E141FA13A63; Wed, 14 Oct 2015 20:30:33 +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 AFC0718E0; Wed, 14 Oct 2015 20:30:33 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t9EKUWa1089356; Wed, 14 Oct 2015 20:30:32 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9EKUWNY089355; Wed, 14 Oct 2015 20:30:32 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201510142030.t9EKUWNY089355@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Wed, 14 Oct 2015 20:30:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289334 - 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 " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Oct 2015 20:30:34 -0000 Author: bdrewery Date: Wed Oct 14 20:30:32 2015 New Revision: 289334 URL: https://svnweb.freebsd.org/changeset/base/289334 Log: Recurse on 'buildconfig' and 'installconfig'. Remove the 'config' pseudo target. The 'config' target isn't really needed right now so just remove it to avoid any clashes with config(8) building. It's also likely misspelled and should be 'configs' if we decide to add it back. This was just a convenience target recently added. Sponsored by: EMC / Isilon Storage Division Modified: head/share/mk/bsd.subdir.mk Modified: head/share/mk/bsd.subdir.mk ============================================================================== --- head/share/mk/bsd.subdir.mk Wed Oct 14 20:28:15 2015 (r289333) +++ head/share/mk/bsd.subdir.mk Wed Oct 14 20:30:32 2015 (r289334) @@ -32,9 +32,10 @@ .if !target(____) ____: -ALL_SUBDIR_TARGETS= all all-man checkdpadd clean cleandepend cleandir \ - cleanilinks cleanobj depend distribute lint maninstall \ - manlint obj objlink realinstall regress tags \ +ALL_SUBDIR_TARGETS= all all-man buildconfig checkdpadd clean cleandepend \ + cleandir cleanilinks cleanobj depend distribute \ + installconfig lint maninstall manlint obj objlink \ + realinstall regress tags \ ${SUBDIR_TARGETS} .include @@ -127,7 +128,7 @@ _sub.${__target}: _SUBDIR # This is to support 'make includes' calling 'make buildincludes' and # 'make installincludes' in the proper order, and to support these # targets as SUBDIR_TARGETS. -.for __target in files includes config +.for __target in files includes .for __stage in build install ${__stage}${__target}: .if make(${__stage}${__target}) From owner-svn-src-all@freebsd.org Wed Oct 14 20:38:52 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id DAD46A142AD; Wed, 14 Oct 2015 20:38:52 +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 A4B101F3D; Wed, 14 Oct 2015 20:38:52 +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 t9EKcpXS092354; Wed, 14 Oct 2015 20:38:51 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9EKcpts092353; Wed, 14 Oct 2015 20:38:51 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201510142038.t9EKcpts092353@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Wed, 14 Oct 2015 20:38:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289335 - 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 " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Oct 2015 20:38:53 -0000 Author: bdrewery Date: Wed Oct 14 20:38:51 2015 New Revision: 289335 URL: https://svnweb.freebsd.org/changeset/base/289335 Log: Add missing targets to PHONY_NOTMAIN. - buildconfig, installconfig (missed in r289085) - files (missed in r241298) Sponsored by: EMC / Isilon Storage Division Modified: head/share/mk/bsd.sys.mk Modified: head/share/mk/bsd.sys.mk ============================================================================== --- head/share/mk/bsd.sys.mk Wed Oct 14 20:30:32 2015 (r289334) +++ head/share/mk/bsd.sys.mk Wed Oct 14 20:38:51 2015 (r289335) @@ -165,13 +165,13 @@ CXXFLAGS+= ${CXXFLAGS.${COMPILER_TYPE}} # Tell bmake not to mistake standard targets for things to be searched for # or expect to ever be up-to-date. PHONY_NOTMAIN = afterdepend afterinstall all beforedepend beforeinstall \ - beforelinking build build-tools buildfiles buildincludes \ - checkdpadd clean cleandepend cleandir cleanobj configure \ - depend dependall distclean distribute exe \ - html includes install installfiles installincludes lint \ - obj objlink objs objwarn realall realdepend \ - realinstall regress subdir-all subdir-depend subdir-install \ - tags whereobj + beforelinking build build-tools buildconfig buildfiles \ + buildincludes checkdpadd clean cleandepend cleandir cleanobj \ + configure depend dependall distclean distribute exe \ + files html includes install installconfig installfiles \ + installincludes lint obj objlink objs objwarn realall \ + realdepend realinstall regress subdir-all subdir-depend \ + subdir-install tags whereobj # we don't want ${PROG} to be PHONY .PHONY: ${PHONY_NOTMAIN:N${PROG:U}} From owner-svn-src-all@freebsd.org Wed Oct 14 21:10:07 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 34FF1A157EE; Wed, 14 Oct 2015 21:10:07 +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 0E3BF942; Wed, 14 Oct 2015 21:10:06 +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 t9ELA6Dn001918; Wed, 14 Oct 2015 21:10:06 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9ELA6wv001917; Wed, 14 Oct 2015 21:10:06 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201510142110.t9ELA6wv001917@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Wed, 14 Oct 2015 21:10:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289336 - head/sys/mips/conf X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Oct 2015 21:10:07 -0000 Author: emaste Date: Wed Oct 14 21:10:05 2015 New Revision: 289336 URL: https://svnweb.freebsd.org/changeset/base/289336 Log: Add Ubiquiti EdgeRouter Lite (ERL) kernel config file The ERL is a fairly cheap (~$100 USD) and readily available dual core MIPS64 device so it makes a useful MIPS reference platform. This is based in part on the kernel config generated by the mkerlimage script from http://rtfm.net/FreeBSD/ERL/. Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D3884 Added: head/sys/mips/conf/ERL (contents, props changed) Added: head/sys/mips/conf/ERL ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/mips/conf/ERL Wed Oct 14 21:10:05 2015 (r289336) @@ -0,0 +1,212 @@ +# +# ERL - EdgeRouter Lite kernel config +# Based on configuration from http://rtfm.net/FreeBSD/ERL +# +# For more information on this file, please read the config(5) manual page, +# and/or the handbook section on Kernel Configuration Files: +# +# http://www.FreeBSD.org/doc/en_US.ISO8859-1/books/handbook/kernelconfig-config.html +# +# The handbook is also available locally in /usr/share/doc/handbook +# if you've installed the doc distribution, otherwise always see the +# FreeBSD World Wide Web server (http://www.FreeBSD.org/) for the +# latest information. +# +# An exhaustive list of options and more detailed explanations of the +# device lines is also present in the ../../conf/NOTES and NOTES files. +# If you are in doubt as to the purpose or necessity of a line, check first +# in NOTES. +# +# $FreeBSD$ + +ident ERL + +makeoptions ARCH_FLAGS="-march=octeon -mabi=64" +makeoptions LDSCRIPT_NAME=ldscript.mips.octeon1 + +# Don't build any modules yet. +makeoptions MODULES_OVERRIDE="" +makeoptions KERNLOADADDR=0xffffffff80100000 + +# We don't need to build a trampolined version of the kernel. +makeoptions WITHOUT_KERNEL_TRAMPOLINE=1 + +include "../cavium/std.octeon1" + +hints "OCTEON1.hints" #Default places to look for devices. + +makeoptions DEBUG=-g #Build kernel with gdb(1) debug symbols + +# Board-specific support that cannot be auto-detected at runtime. +#options OCTEON_VENDOR_LANNER # Support for Lanner boards. +#options OCTEON_VENDOR_RADISYS # Support for Radisys boards. +options OCTEON_VENDOR_UBIQUITI # Support for Ubiquiti boards. +#options OCTEON_VENDOR_GEFES # Support for GE LANIC boards +#options OCTEON_BOARD_CAPK_0100ND # Support for CAPK-0100nd. + +# Compile for a specified Octeon model. If not specified, support for +# detection at runtime will be used instead, which may give inferior +# performance. +# +# See sys/contrib/octeon-sdk/octeon-model.h for possible values. +options OCTEON_MODEL=OCTEON_CN50XX_PASS1 + +options SCHED_ULE # ULE scheduler +options PREEMPTION # Enable kernel thread preemption +options INET # InterNETworking +options INET6 # IPv6 communications protocols +options SCTP # Stream Control Transmission Protocol +options FFS # Berkeley Fast Filesystem +options SOFTUPDATES # Enable FFS soft updates support +options UFS_ACL # Support for access control lists +options UFS_DIRHASH # Improve performance on big directories +options UFS_GJOURNAL # Enable gjournal-based UFS journaling +options MD_ROOT # MD is a potential root device +options NFSCL # Network Filesystem Client +options NFSD # Network Filesystem Server +options NFSLOCKD # Network Lock Manager +options NFS_ROOT # NFS usable as /, requires NFSCL +options MSDOSFS # MSDOS Filesystem +options CD9660 # ISO 9660 Filesystem +options PROCFS # Process filesystem (requires PSEUDOFS) +options PSEUDOFS # Pseudo-filesystem framework +options GEOM_PART_GPT # GUID Partition Tables. +options GEOM_LABEL # Provides labelization +options COMPAT_FREEBSD32 # Compatible with o32 binaries +options SCSI_DELAY=5000 # Delay (in ms) before probing SCSI +options KTRACE # ktrace(1) support +options STACK # stack(9) support +options SYSVSHM # SYSV-style shared memory +options SYSVMSG # SYSV-style message queues +options SYSVSEM # SYSV-style semaphores +options _KPOSIX_PRIORITY_SCHEDULING # POSIX P1003_1B real-time extensions +options PRINTF_BUFR_SIZE=128 # Prevent printf output being interspersed. +options HWPMC_HOOKS # Necessary kernel hooks for hwpmc(4) +options AUDIT # Security event auditing +options MAC # TrustedBSD MAC Framework +#options KDTRACE_FRAME # Ensure frames are compiled in +#options KDTRACE_HOOKS # Kernel DTrace hooks +options INCLUDE_CONFIG_FILE # Include this file in kernel +options NO_SWAPPING # Disable support for paging +options TMPFS # Temporary file system + +# Debugging for use in -current +#options KDB # Enable kernel debugger support. +#options DDB # Support DDB. +#options GDB # Support remote GDB. +#options DEADLKRES # Enable the deadlock resolver +#options INVARIANTS # Enable calls of extra sanity checking +#options INVARIANT_SUPPORT # Extra sanity checks of internal structures, required by INVARIANTS +#options WITNESS # Enable checks to detect deadlocks and cycles +#options WITNESS_SKIPSPIN # Don't run witness on spinlocks for speed +#options MALLOC_DEBUG_MAXZONES=8 # Separate malloc(9) zones + +# Make an SMP-capable kernel by default +options SMP # Symmetric MultiProcessor Kernel + +options ROOTDEVNAME=\"ufs:da0s2a\" # Default root filesystem. + +# ATA/SCSI peripherals +device scbus # SCSI bus (required for ATA/SCSI) +device ch # SCSI media changers +device da # Direct Access (disks) +device sa # Sequential Access (tape etc) +device cd # CD +device pass # Passthrough device (direct ATA/SCSI access) +device ses # Enclosure Services (SES and SAF-TE) + +# Serial (COM) ports +device uart # Generic UART driver + +# On-board Cavium Octeon Ethernet. +# NOTE: Be sure to keep the 'device miibus' line in order to use these NICs! +device octe + +# Cavium Octeon management Ethernet. +device octm + +# Switch PHY support for the octe driver. These currently present a VLAN per +# physical port, but may eventually provide support for DSA or similar instead. +#device mv88e61xxphy # Marvell 88E61XX + +# Wireless NIC cards +device wlan # 802.11 support +options IEEE80211_DEBUG # enable debug msgs +options IEEE80211_AMPDU_AGE # age frames in AMPDU reorder q's +options IEEE80211_SUPPORT_MESH # enable 802.11s draft support +device wlan_wep # 802.11 WEP support +device wlan_ccmp # 802.11 CCMP support +device wlan_tkip # 802.11 TKIP support +device wlan_amrr # AMRR transmit rate control algorithm +#device ath # Atheros NIC's +#device ath_pci # Atheros pci/cardbus glue +#device ath_hal # pci/cardbus chip support +#options AH_SUPPORT_AR5416 # enable AR5416 tx/rx descriptors +#device ath_rate_sample # SampleRate tx rate control for ath + +# Pseudo devices. +device loop # Network loopback +device random # Entropy device +device ether # Ethernet support +device vlan # 802.1Q VLAN support +device tun # Packet tunnel. +device md # Memory "disks" +device gif # IPv6 and IPv4 tunneling +device firmware # firmware assist module + +# The `bpf' device enables the Berkeley Packet Filter. +# Be aware of the administrative consequences of enabling this! +# Note that 'bpf' is required for DHCP. +device bpf # Berkeley packet filter + +# Hardware watchdog support. +#device octeon_wdog # Octeon hardware watchdog + +# USB support +options USB_DEBUG # enable debug msgs +device octusb # Cavium Octeon on-board USB interface (USB 2.0) +device uhci # UHCI PCI->USB interface +device ohci # OHCI PCI->USB interface +device ehci # EHCI PCI->USB interface (USB 2.0) +device usb # USB Bus (required) +#device udbp # USB Double Bulk Pipe devices +device uhid # "Human Interface Devices" +device ulpt # Printer +device umass # Disks/Mass storage - Requires scbus and da +device ums # Mouse +device urio # Diamond Rio 500 MP3 player +# USB Serial devices +device u3g # USB-based 3G modems (Option, Huawei, Sierra) +device uark # Technologies ARK3116 based serial adapters +device ubsa # Belkin F5U103 and compatible serial adapters +device uftdi # For FTDI usb serial adapters +device uipaq # Some WinCE based devices +device uplcom # Prolific PL-2303 serial adapters +device uslcom # SI Labs CP2101/CP2102 serial adapters +device uvisor # Visor and Palm devices +device uvscom # USB serial support for DDI pocket's PHS +# USB Ethernet, requires miibus +device miibus # MII bus support +device aue # ADMtek USB Ethernet +device axe # ASIX Electronics USB Ethernet +device cdce # Generic USB over Ethernet +device cue # CATC USB Ethernet +device kue # Kawasaki LSI USB Ethernet +device rue # RealTek RTL8150 USB Ethernet +device udav # Davicom DM9601E USB +# USB Wireless +device rum # Ralink Technology RT2501USB wireless NICs +device uath # Atheros AR5523 wireless NICs +device ural # Ralink Technology RT2500USB wireless NICs +device zyd # ZyDAS zd1211/zd1211b wireless NICs + +# crypto subsystem +device crypto # core crypto support +device cryptodev # /dev/crypto for access to h/w +device cryptocteon # Octeon coprocessor 2 crypto offload + +# GPIO support +#device gpio + +# PMC support +#device hwpmc From owner-svn-src-all@freebsd.org Wed Oct 14 22:09:57 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id AA6B0A124E9; Wed, 14 Oct 2015 22:09: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 8635E892; Wed, 14 Oct 2015 22:09:57 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from mail.xzibition.com (localhost [IPv6:::1]) by freefall.freebsd.org (Postfix) with ESMTP id 79EF31B78; Wed, 14 Oct 2015 22:09: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 2E5CEF1A5; Wed, 14 Oct 2015 22:09:57 +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 Eqg-SrH91vJD; Wed, 14 Oct 2015 22:09:54 +0000 (UTC) Subject: Re: svn commit: r289334 - head/share/mk DKIM-Filter: OpenDKIM Filter v2.9.2 mail.xzibition.com BE8FAF19F To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201510142030.t9EKUWNY089355@repo.freebsd.org> From: Bryan Drewery Openpgp: id=F9173CB2C3AAEA7A5C8A1F0935D771BB6E4697CF; url=http://www.shatow.net/bryan/bryan2.asc Organization: FreeBSD Message-ID: <561ED2B3.4030909@FreeBSD.org> Date: Wed, 14 Oct 2015 15:09:55 -0700 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0 MIME-Version: 1.0 In-Reply-To: <201510142030.t9EKUWNY089355@repo.freebsd.org> Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="0hsEibXHIorXP6jVuu9g7sgsWqkN8RRk1" X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Oct 2015 22:09:57 -0000 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --0hsEibXHIorXP6jVuu9g7sgsWqkN8RRk1 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 10/14/2015 1:30 PM, Bryan Drewery wrote: > Author: bdrewery > Date: Wed Oct 14 20:30:32 2015 > New Revision: 289334 > URL: https://svnweb.freebsd.org/changeset/base/289334 >=20 > Log: > Recurse on 'buildconfig' and 'installconfig'. Remove the 'config' ps= eudo target. > =20 > The 'config' target isn't really needed right now so just remove it t= o avoid > any clashes with config(8) building. It's also likely misspelled and= should > be 'configs' if we decide to add it back. This was just a convenienc= e > target recently added. > =20 > Sponsored by: EMC / Isilon Storage Division >=20 > Modified: > head/share/mk/bsd.subdir.mk >=20 > Modified: head/share/mk/bsd.subdir.mk > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D > --- head/share/mk/bsd.subdir.mk Wed Oct 14 20:28:15 2015 (r289333) > +++ head/share/mk/bsd.subdir.mk Wed Oct 14 20:30:32 2015 (r289334) > @@ -32,9 +32,10 @@ > .if !target(____) > ____: > =20 > -ALL_SUBDIR_TARGETS=3D all all-man checkdpadd clean cleandepend cleandi= r \ > - cleanilinks cleanobj depend distribute lint maninstall \ > - manlint obj objlink realinstall regress tags \ > +ALL_SUBDIR_TARGETS=3D all all-man buildconfig checkdpadd clean cleande= pend \ > + cleandir cleanilinks cleanobj depend distribute \ > + installconfig lint maninstall manlint obj objlink \ > + realinstall regress tags \ > ${SUBDIR_TARGETS} > =20 > .include > @@ -127,7 +128,7 @@ _sub.${__target}: _SUBDIR > # This is to support 'make includes' calling 'make buildincludes' and > # 'make installincludes' in the proper order, and to support these > # targets as SUBDIR_TARGETS. > -.for __target in files includes config > +.for __target in files includes > .for __stage in build install > ${__stage}${__target}: > .if make(${__stage}${__target}) >=20 So the reason I have been tinkering with this code is because it is so mysterious to me, given the lack of comments and seemingly out-of-place nature of it. It turns out that even moving 'buildconfig' as a recurse target creates a surprising situation that will break with parallel builds since 'buildconfig' is hooked into 'all', thus 'all' and 'buildconfig' both end up recursing when calling 'make all'. This explains the make() check here to avoid recursing if called with 'all' (even though it is checking the opposite, only calling 'buildconfig' directly to recurse). Comments are not a sin. --=20 Regards, Bryan Drewery --0hsEibXHIorXP6jVuu9g7sgsWqkN8RRk1 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 iQEcBAEBAgAGBQJWHtK0AAoJEDXXcbtuRpfPLwQH/2PmES4tpfH80FS1guIBBdn5 rChwywAaBCo4ZVYYsmdJdT6zrvuW7FgGj+H5MsFH7Mo0WbJRiJnwuwP3cGgqQN6j FU9e8ae+Vm0g51yM/qzi43r5xPBHTj65X++Ccfe9pgXmUl1GPql9bMQZAkQPgIQv CLwIuRSYcDl/0xBfPBx4rKm/UW1Uz/iesMBuGHDwcVoltx53LOFz5VZRV95vETou wfgWVEAqyTunA+c7bVivq+qAVJniZYo6P2DeZk3q9P+CN81VCwQR8ixwu3YNb3VR gcanYe7JMAB6Y5nDHRapmMK+rT5Yta5i7Q+LgXH1eaQD+UwPNa9QW9yHZE59/Jo= =iudd -----END PGP SIGNATURE----- --0hsEibXHIorXP6jVuu9g7sgsWqkN8RRk1-- From owner-svn-src-all@freebsd.org Wed Oct 14 22:33:13 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 56677A12B40; Wed, 14 Oct 2015 22:33:13 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E6630158C; Wed, 14 Oct 2015 22:33:12 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t9EMXBpw027568; Wed, 14 Oct 2015 22:33:11 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9EMXB4U027564; Wed, 14 Oct 2015 22:33:11 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201510142233.t9EMXB4U027564@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Wed, 14 Oct 2015 22:33:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289337 - head/release X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Oct 2015 22:33:13 -0000 Author: gjb Date: Wed Oct 14 22:33:11 2015 New Revision: 289337 URL: https://svnweb.freebsd.org/changeset/base/289337 Log: Deprecate MD5 checksum generation in favor of SHA512. This was discussed during the 10.2-RELEASE cycle, however since we were nearing the end of the cycle, we decided to defer this change until after 10.2-RELEASE. Reminded by: so (delphij), jmg MFC after: 5 days Sponsored by: The FreeBSD Foundation Modified: head/release/Makefile head/release/Makefile.mirrors head/release/Makefile.vm head/release/release.sh Modified: head/release/Makefile ============================================================================== --- head/release/Makefile Wed Oct 14 21:10:05 2015 (r289336) +++ head/release/Makefile Wed Oct 14 22:33:11 2015 (r289337) @@ -300,7 +300,7 @@ release-install: ${XZ_CMD} -k ${DESTDIR}/${OSRELEASE}-${I} . endif .endfor + cd ${DESTDIR} && sha512 ${OSRELEASE}* > ${DESTDIR}/CHECKSUM.SHA512 cd ${DESTDIR} && sha256 ${OSRELEASE}* > ${DESTDIR}/CHECKSUM.SHA256 - cd ${DESTDIR} && md5 ${OSRELEASE}* > ${DESTDIR}/CHECKSUM.MD5 .include "${.CURDIR}/Makefile.vm" Modified: head/release/Makefile.mirrors ============================================================================== --- head/release/Makefile.mirrors Wed Oct 14 21:10:05 2015 (r289336) +++ head/release/Makefile.mirrors Wed Oct 14 22:33:11 2015 (r289337) @@ -76,7 +76,7 @@ VM_DIR= ${TLD}/VM-IMAGES/${REVISION}-$ .endif CLEANFILES+= ${STAGE_TARGETS} -CHECKSUM_FILES?= SHA256 MD5 +CHECKSUM_FILES?= SHA512 SHA256 SNAP_SUFFIX!= echo ${_SNAP_SUFFIX:S,^-,,1} | tr -d ' ' ISO_DIR= ${TLD}/${TARGET}/${TARGET_ARCH}/ISO-IMAGES/${REVISION} FTP_DIR= ${TLD}/${TARGET}/${TARGET_ARCH}/${REVISION}-${BRANCH} Modified: head/release/Makefile.vm ============================================================================== --- head/release/Makefile.vm Wed Oct 14 21:10:05 2015 (r289336) +++ head/release/Makefile.vm Wed Oct 14 22:33:11 2015 (r289337) @@ -68,10 +68,10 @@ cw${_CW:tl}-install: mkdir -p ${DESTDIR}/${_CW:tl} cp -p ${${_CW}IMAGE} \ ${DESTDIR}/${_CW:tl}/${${_CW}_DISK} + cd ${DESTDIR}/${_CW:tl} && sha512 ${${_CW}_DISK}* > \ + ${DESTDIR}/${_CW:tl}/CHECKSUM.SHA512 cd ${DESTDIR}/${_CW:tl} && sha256 ${${_CW}_DISK}* > \ ${DESTDIR}/${_CW:tl}/CHECKSUM.SHA256 - cd ${DESTDIR}/${_CW:tl} && md5 ${${_CW}_DISK}* > \ - ${DESTDIR}/${_CW:tl}/CHECKSUM.MD5 cw${_CW:tl}-package: @# Special target to handle packaging cloud images in the formats @@ -140,10 +140,10 @@ vm-install: ${XZ_CMD} ${DESTDIR}/vmimages/${OSRELEASE}.${FORMAT} . endfor . endif + cd ${DESTDIR}/vmimages && sha512 ${OSRELEASE}* > \ + ${DESTDIR}/vmimages/CHECKSUM.SHA512 cd ${DESTDIR}/vmimages && sha256 ${OSRELEASE}* > \ ${DESTDIR}/vmimages/CHECKSUM.SHA256 - cd ${DESTDIR}/vmimages && md5 ${OSRELEASE}* > \ - ${DESTDIR}/vmimages/CHECKSUM.MD5 .endif vm-release: Modified: head/release/release.sh ============================================================================== --- head/release/release.sh Wed Oct 14 21:10:05 2015 (r289336) +++ head/release/release.sh Wed Oct 14 22:33:11 2015 (r289337) @@ -362,10 +362,10 @@ chroot_arm_armv6_build_release() { chroot ${CHROOTDIR} cp -p ${OBJDIR}/${OSRELEASE}-${KERNEL}.img \ /R/${OSRELEASE}-${KERNEL}.img chroot ${CHROOTDIR} xz -T ${XZ_THREADS} /R/${OSRELEASE}-${KERNEL}.img + cd ${CHROOTDIR}/R && sha512 ${OSRELEASE}* \ + > CHECKSUM.SHA512 cd ${CHROOTDIR}/R && sha256 ${OSRELEASE}* \ > CHECKSUM.SHA256 - cd ${CHROOTDIR}/R && md5 ${OSRELEASE}* \ - > CHECKSUM.MD5 return 0 } # chroot_arm_armv6_build_release() From owner-svn-src-all@freebsd.org Wed Oct 14 23:23:54 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6FDE4A155D5; Wed, 14 Oct 2015 23:23:54 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: from mail-qg0-x235.google.com (mail-qg0-x235.google.com [IPv6:2607:f8b0:400d:c04::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 2F363F25; Wed, 14 Oct 2015 23:23:54 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: by qgx61 with SMTP id 61so57358246qgx.3; Wed, 14 Oct 2015 16:23:53 -0700 (PDT) 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=l09dWZ9bFwmcNiN3Nd1jtJwrEq52yt7R75vYSqECsTw=; b=Tg7dTORStK8NwOynaQzPjQp0UckKdocPVE7+Uutw+AZj8zYNmzjrZT7RVUrut+2Gf9 kjEAl8C3h3hL1wk15Hkot334vubm3RIx58qRWP/zzCFCJeFkcqyxPJeTPgb+B7LyE4qq xpd0iwT+DImNlq62WpJs4x0+u7CFiqj/hgLcFoPvOkx2XoDcdi6BaxFTtjYXEk+1+kSv 2J+/vrf8SjslDDbEfLdOpbhozMkdhU9+K5W3OZAtXd8dphkHHMX+85prPpE4sITI/aEb KHZPpot5V4m2z3EDmRX2i9NBtJq1JO5gB4b2kI/eJbV8QokHhH6O8ggWiih2P8C2KoZh L1NA== MIME-Version: 1.0 X-Received: by 10.140.217.70 with SMTP id n67mr8012638qhb.96.1444865033223; Wed, 14 Oct 2015 16:23:53 -0700 (PDT) Received: by 10.140.88.180 with HTTP; Wed, 14 Oct 2015 16:23:53 -0700 (PDT) In-Reply-To: <561ED2B3.4030909@FreeBSD.org> References: <201510142030.t9EKUWNY089355@repo.freebsd.org> <561ED2B3.4030909@FreeBSD.org> Date: Wed, 14 Oct 2015 16:23:53 -0700 Message-ID: Subject: Re: svn commit: r289334 - head/share/mk From: NGie Cooper To: Bryan Drewery Cc: "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Content-Type: text/plain; charset=UTF-8 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Oct 2015 23:23:54 -0000 On Wed, Oct 14, 2015 at 3:09 PM, Bryan Drewery wrote: ... > So the reason I have been tinkering with this code is because it is so > mysterious to me, given the lack of comments and seemingly out-of-place > nature of it. > > It turns out that even moving 'buildconfig' as a recurse target creates > a surprising situation that will break with parallel builds since > 'buildconfig' is hooked into 'all', thus 'all' and 'buildconfig' both > end up recursing when calling 'make all'. This explains the make() check > here to avoid recursing if called with 'all' (even though it is checking > the opposite, only calling 'buildconfig' directly to recurse). Comments > are not a sin. Agreed. The original change was done over a decade ago: https://svnweb.freebsd.org/base/head/share/mk/bsd.subdir.mk?r1=96667&r2=96668&pathrev=289334& . It seems that the targets used to have different names and ru@ changed them. Succinct comments would probably be a good idea in the .mk files. I'm not sure what the performance is like if bmake needs to (re-)read/(re-)evaluate make snippets. Thanks! -NGie From owner-svn-src-all@freebsd.org Wed Oct 14 23:26:39 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1F3AEA1566A; Wed, 14 Oct 2015 23:26:39 +0000 (UTC) (envelope-from carpeddiem@gmail.com) Received: from mail-ig0-x230.google.com (mail-ig0-x230.google.com [IPv6:2607:f8b0:4001:c05::230]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id DFBA5125A; Wed, 14 Oct 2015 23:26:38 +0000 (UTC) (envelope-from carpeddiem@gmail.com) Received: by igbkq10 with SMTP id kq10so125059022igb.0; Wed, 14 Oct 2015 16:26:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:content-type; bh=rb8DW/eMz5DUHxdq1tNAMDOVoKeXXT1RtK955o4XSrE=; b=fc10RH2QSZr3eckFmr3SIwkRMSe7ztpb44Yn6/ESt/HBWRG40lGjG7FfD1cjMG6m0N kXu7hZkMlFnY1XhKrT5qIKe3U5oLB+asBoOhvL8KSiBkFADUJqvOZ3WYpRFkBfjEuKCz Yk8DuIHuIDJk5nb2GJIXOSytySglrpTpeWkTKOpwWVU0skdU4If0e8lR5YjpqW9XjMUk xa10cRYPql9w9VKun2JzPKh77J+Y9ei5fRYtCuambOhCuGxTvfSwCpaL9xCFuiSOhaaJ duvYAWKQgBrZdRGOkpf/TsDXzPxHxUUHNNMQk4xe7YQ+pGd+lEk+ojkMvGAUoIIKrTXC ggCw== X-Received: by 10.50.97.66 with SMTP id dy2mr27671446igb.33.1444865197947; Wed, 14 Oct 2015 16:26:37 -0700 (PDT) MIME-Version: 1.0 Sender: carpeddiem@gmail.com Received: by 10.107.158.75 with HTTP; Wed, 14 Oct 2015 16:26:18 -0700 (PDT) In-Reply-To: <201510142110.t9ELA6wv001917@repo.freebsd.org> References: <201510142110.t9ELA6wv001917@repo.freebsd.org> From: Ed Maste Date: Wed, 14 Oct 2015 23:26:18 +0000 X-Google-Sender-Auth: UqrpvpZsFKvd-Hq9Eh-cFU4RYac Message-ID: Subject: Re: svn commit: r289336 - head/sys/mips/conf To: "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Content-Type: text/plain; charset=UTF-8 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Oct 2015 23:26:39 -0000 On 14 October 2015 at 21:10, Ed Maste wrote: > Author: emaste > Date: Wed Oct 14 21:10:05 2015 > New Revision: 289336 > URL: https://svnweb.freebsd.org/changeset/base/289336 > > Log: > Add Ubiquiti EdgeRouter Lite (ERL) kernel config file Because I've received a couple of private followups on this commit I'll reply here to avoid the same discussion being spread across multiple threads. There's a suggestion to have this config include OCTEON1 (on which this is based) and then set a couple of ident/options. I didn't take that approach here because OCTEON1 includes a whole bunch of devices not relevant to the ERL, which has no PCI bus and doesn't support AHCI, RAID controllers, PCI NICs, etc. In my opinion the device is small enough that we don't want to bloat the kernel with devices that cannot be used. To do so while still including OCTEON1 we'd end up with a config file that's just about as long as this, full of nodevice / nooption lines. Perhaps it makes sense to pull some common parts out into a MIPS.common (e.g. options, USB devices, etc.) and include that from OCTEON1, ERL, and other MIPS configurations? From owner-svn-src-all@freebsd.org Wed Oct 14 23:29:21 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 027D9A156CE; Wed, 14 Oct 2015 23:29:21 +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 C18D713DC; Wed, 14 Oct 2015 23:29:20 +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 t9ENTJhh044063; Wed, 14 Oct 2015 23:29:19 GMT (envelope-from np@FreeBSD.org) Received: (from np@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9ENTJlH044062; Wed, 14 Oct 2015 23:29:19 GMT (envelope-from np@FreeBSD.org) Message-Id: <201510142329.t9ENTJlH044062@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: np set sender to np@FreeBSD.org using -f From: Navdeep Parhar Date: Wed, 14 Oct 2015 23:29:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289338 - 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 " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Oct 2015 23:29:21 -0000 Author: np Date: Wed Oct 14 23:29:19 2015 New Revision: 289338 URL: https://svnweb.freebsd.org/changeset/base/289338 Log: iw_cxgbe: use correct RFC number. 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 Oct 14 22:33:11 2015 (r289337) +++ head/sys/dev/cxgbe/iw_cxgbe/cm.c Wed Oct 14 23:29:19 2015 (r289338) @@ -809,7 +809,7 @@ SYSCTL_INT(_hw_iw_cxgbe, OID_AUTO, ep_ti static int mpa_rev = 1; SYSCTL_INT(_hw_iw_cxgbe, OID_AUTO, mpa_rev, CTLFLAG_RWTUN, &mpa_rev, 0, - "MPA Revision, 0 supports amso1100, 1 is RFC0544 spec compliant, 2 is IETF MPA Peer Connect Draft compliant (default = 1)"); + "MPA Revision, 0 supports amso1100, 1 is RFC5044 spec compliant, 2 is IETF MPA Peer Connect Draft compliant (default = 1)"); static int markers_enabled; SYSCTL_INT(_hw_iw_cxgbe, OID_AUTO, markers_enabled, CTLFLAG_RWTUN, &markers_enabled, 0, From owner-svn-src-all@freebsd.org Wed Oct 14 23:37:06 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C9831A158D5; Wed, 14 Oct 2015 23:37:06 +0000 (UTC) (envelope-from jlooney@juniper.net) Received: from na01-bn1-obe.outbound.protection.outlook.com (mail-bn1on0136.outbound.protection.outlook.com [157.56.110.136]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (Client CN "mail.protection.outlook.com", Issuer "MSIT Machine Auth CA 2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id DA53F1B06; Wed, 14 Oct 2015 23:37:05 +0000 (UTC) (envelope-from jlooney@juniper.net) Received: from BLUPR05MB1971.namprd05.prod.outlook.com (10.162.224.25) by BLUPR05MB1969.namprd05.prod.outlook.com (10.162.224.23) with Microsoft SMTP Server (TLS) id 15.1.300.14; Wed, 14 Oct 2015 23:22:33 +0000 Received: from BLUPR05MB1971.namprd05.prod.outlook.com ([10.162.224.25]) by BLUPR05MB1971.namprd05.prod.outlook.com ([10.162.224.25]) with mapi id 15.01.0300.010; Wed, 14 Oct 2015 23:22:33 +0000 From: Jonathan Looney To: Hiren Panchasara , Bryan Drewery CC: "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Subject: Re: svn commit: r289276 - in head/sys: conf kern netinet sys Thread-Topic: svn commit: r289276 - in head/sys: conf kern netinet sys Thread-Index: AQHRBijG2xtH3wfO1kqYjJDR3UuBVJ5rXwIA Date: Wed, 14 Oct 2015 23:22:33 +0000 Message-ID: References: <201510140035.t9E0ZbXS030094@repo.freebsd.org> <561DB6CB.8060208@FreeBSD.org> <20151014023352.GI87252@strugglingcoder.info> In-Reply-To: <20151014023352.GI87252@strugglingcoder.info> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: user-agent: Microsoft-MacOutlook/14.5.6.150930 authentication-results: spf=none (sender IP is ) smtp.mailfrom=jlooney@juniper.net; x-ms-exchange-messagesentrepresentingtype: 1 x-originating-ip: [66.129.241.13] x-microsoft-exchange-diagnostics: 1; BLUPR05MB1969; 5:lUC9SCYU9l4A71Z3cMAJdlvzMAlzD/1Fp7MP/TB+RkoA/90MDIe3V9VMNzLnacJs9PPSsENuTGIvrOwrMzZVVyr9Bfp7KRJ6+EejTYV69sGxzT3IP+q9KMqdDKak/NEPNZoaq+NMMDB+8eLV4iHzFQ==; 24:HjqLVqQ1ltoEkTMLttNCbWLO4T0KwHO30uH5p3aVqwKscd6dUAqKKTcYMgymB8SRPvUCq3u8WFDgbr1YEPyJbmbMGbTdGR08vxlUDw9n/bQ=; 20:Y++b5OXfQLaxD0TYKEGu/Ts0nCH3j3kBXugZnbphCFps4dgqS5YsquKV2Stki7XTee0M7qh4DuVQCBA6ApKSUA== x-microsoft-antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:BLUPR05MB1969; x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:; x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(601004)(2401047)(8121501046)(520078)(5005006)(3002001); SRVR:BLUPR05MB1969; BCL:0; PCL:0; RULEID:; SRVR:BLUPR05MB1969; x-forefront-prvs: 0729050452 x-forefront-antispam-report: SFV:NSPM; SFS:(10019020)(6009001)(199003)(51914003)(479174004)(24454002)(189002)(377454003)(105586002)(5001960100002)(92566002)(558084003)(5002640100001)(106356001)(106116001)(81156007)(99286002)(5001770100001)(2950100001)(10400500002)(46102003)(97736004)(4001350100001)(189998001)(5008740100001)(77096005)(450100001)(5007970100001)(83506001)(19580395003)(86362001)(76176999)(50986999)(19580405001)(11100500001)(54356999)(2900100001)(5004730100002)(101416001)(87936001)(40100003)(64706001)(36756003)(66066001)(102836002)(122556002); DIR:OUT; SFP:1102; SCL:1; SRVR:BLUPR05MB1969; H:BLUPR05MB1971.namprd05.prod.outlook.com; FPR:; SPF:None; PTR:InfoNoRecords; A:1; MX:1; LANG:en; received-spf: None (protection.outlook.com: juniper.net does not designate permitted sender hosts) spamdiagnosticoutput: 1:23 spamdiagnosticmetadata: NSPM Content-Type: text/plain; charset="us-ascii" Content-ID: <9DF4E84E6443E34B9977C9D9254E15D8@namprd05.prod.outlook.com> Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: juniper.net X-MS-Exchange-CrossTenant-originalarrivaltime: 14 Oct 2015 23:22:33.6792 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: bea78b3c-4cdb-4130-854a-1d193232e5f4 X-MS-Exchange-Transport-CrossTenantHeadersStamped: BLUPR05MB1969 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Oct 2015 23:37:07 -0000 On 10/13/15, 10:33 PM, "Hiren Panchasara" wrote: >>=20 >> I also replied to the review with style findings just now. >> >I'll ask Jonathan to look at it. Thanks for the comments. I'll prepare a cleanup patch which addresses this, and other comments which arrived after the commit. Jonathan From owner-svn-src-all@freebsd.org Wed Oct 14 23:41:42 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6C914A15A43; Wed, 14 Oct 2015 23:41:42 +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 2B0C91E84; Wed, 14 Oct 2015 23:41:42 +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 t9ENffle050024; Wed, 14 Oct 2015 23:41:41 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9ENffmn050023; Wed, 14 Oct 2015 23:41:41 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201510142341.t9ENffmn050023@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Wed, 14 Oct 2015 23:41: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: r289339 - stable/10/sys/dev/mmc 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 " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Oct 2015 23:41:42 -0000 Author: ian Date: Wed Oct 14 23:41:41 2015 New Revision: 289339 URL: https://svnweb.freebsd.org/changeset/base/289339 Log: MFC r261994, r275905, r275951, r276106, r283128, r285678: MMC driver fixes... If no compatible cards were found after probing the bus, say so. Don't deselect the card too soon. To set the block size or switch the function parameters, the card has to be in transfer state. If it is in the idle state, the commands are ignored. This caused us not to set the proper parameters that we later assume to be present, leading to downstream failures of the card / interface as our state machine mismatches the card's. Log mmc and sd command failures. Reporting of routine expected errors, such as timeouts while probing a bus or testing for a feature, is squelched. Also, error reporting is limited to 5 events per second, because when an sdcard goes bad on a low-end embedded board, flooding the console at high speed isn't helpful. Always select the card before we do the 4.x specific stuff and deselect it after setting the block size. This is a similar bug that was fixed elsewhere, but not here. This makes sure that we leave the card deselected at the end of the loop, and we don't send any commands to the card without it selected. Re-select the SD card before getting the SD status. On a couple Atmel boards, this prevents some error messages during enumeration and also gives us the correct erase block size. They appear to be harmless elsewhere. Deselect the sd card before re-selecting it when working around a problem with some cards that causes them to become deselected after probing for switch capabilities. The old workaround fixes the behavior with some cards, but causes problems with the cards the behave correctly and don't become deselected. Forcing a deselect then reselect appears to work correctly with all cards in initial testing. Modified: stable/10/sys/dev/mmc/mmc.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/mmc/mmc.c ============================================================================== --- stable/10/sys/dev/mmc/mmc.c Wed Oct 14 23:29:19 2015 (r289338) +++ stable/10/sys/dev/mmc/mmc.c Wed Oct 14 23:41:41 2015 (r289339) @@ -1379,6 +1379,21 @@ mmc_discover_cards(struct mmc_softc *sc) ivar->hs_tran_speed = SD_MAX_HS; } } + + /* + * We deselect then reselect the card here. Some cards + * become unselected and timeout with the above two + * commands, although the state tables / diagrams in the + * standard suggest they go back to the transfer state. + * Other cards don't become deselected, and if we + * atttempt to blindly re-select them, we get timeout + * errors from some controllers. So we deselect then + * reselect to handle all situations. The only thing we + * use from the sd_status is the erase sector size, but + * it is still nice to get that right. + */ + mmc_select_card(sc, 0); + mmc_select_card(sc, ivar->rca); mmc_app_sd_status(sc, ivar->rca, ivar->raw_sd_status); mmc_app_decode_sd_status(ivar->raw_sd_status, &ivar->sd_status); @@ -1386,7 +1401,6 @@ mmc_discover_cards(struct mmc_softc *sc) ivar->erase_sector = 16 << ivar->sd_status.au_size; } - mmc_select_card(sc, 0); /* Find max supported bus width. */ if ((mmcbr_get_caps(sc->dev) & MMC_CAP_4_BIT_DATA) && (ivar->scr.bus_widths & SD_SCR_BUS_WIDTH_4)) @@ -1414,6 +1428,7 @@ mmc_discover_cards(struct mmc_softc *sc) child = device_add_child(sc->dev, NULL, -1); device_set_ivars(child, ivar); } + mmc_select_card(sc, 0); return; } mmc_decode_cid_mmc(ivar->raw_cid, &ivar->cid); @@ -1446,10 +1461,10 @@ mmc_discover_cards(struct mmc_softc *sc) break; } + mmc_select_card(sc, ivar->rca); + /* Only MMC >= 4.x cards support EXT_CSD. */ if (ivar->csd.spec_vers >= 4) { - /* Card must be selected to fetch EXT_CSD. */ - mmc_select_card(sc, ivar->rca); mmc_send_ext_csd(sc, ivar->raw_ext_csd); /* Handle extended capacity from EXT_CSD */ sec_count = ivar->raw_ext_csd[EXT_CSD_SEC_CNT] + @@ -1472,7 +1487,6 @@ mmc_discover_cards(struct mmc_softc *sc) ivar->hs_tran_speed = ivar->tran_speed; /* Find max supported bus width. */ ivar->bus_width = mmc_test_bus_width(sc); - mmc_select_card(sc, 0); /* Handle HC erase sector size. */ if (ivar->raw_ext_csd[EXT_CSD_ERASE_GRP_SIZE] != 0) { ivar->erase_sector = 1024 * @@ -1506,6 +1520,7 @@ mmc_discover_cards(struct mmc_softc *sc) child = device_add_child(sc->dev, NULL, -1); device_set_ivars(child, ivar); } + mmc_select_card(sc, 0); } } From owner-svn-src-all@freebsd.org Wed Oct 14 23:44:43 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 80468A15B04; Wed, 14 Oct 2015 23:44:43 +0000 (UTC) (envelope-from cem@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 34783127; Wed, 14 Oct 2015 23:44:43 +0000 (UTC) (envelope-from cem@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t9ENigKW050281; Wed, 14 Oct 2015 23:44:42 GMT (envelope-from cem@FreeBSD.org) Received: (from cem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9ENigXn050279; Wed, 14 Oct 2015 23:44:42 GMT (envelope-from cem@FreeBSD.org) Message-Id: <201510142344.t9ENigXn050279@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cem set sender to cem@FreeBSD.org using -f From: "Conrad E. Meyer" Date: Wed, 14 Oct 2015 23:44:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289340 - in head/sys/dev/ntb: if_ntb ntb_hw X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Oct 2015 23:44:43 -0000 Author: cem Date: Wed Oct 14 23:44:42 2015 New Revision: 289340 URL: https://svnweb.freebsd.org/changeset/base/289340 Log: NTB: MFV 403c63cb: client event cleanup Provide a better event interface between the client and transport. Authored by: Jon Mason Obtained from: Linux (Dual BSD/GPL driver) Sponsored by: EMC / Isilon Storage Division Modified: head/sys/dev/ntb/if_ntb/if_ntb.c head/sys/dev/ntb/ntb_hw/ntb_hw.h Modified: head/sys/dev/ntb/if_ntb/if_ntb.c ============================================================================== --- head/sys/dev/ntb/if_ntb/if_ntb.c Wed Oct 14 23:41:41 2015 (r289339) +++ head/sys/dev/ntb/if_ntb/if_ntb.c Wed Oct 14 23:44:42 2015 (r289340) @@ -137,7 +137,7 @@ struct ntb_transport_qp { uint64_t rx_max_entry; uint64_t rx_max_frame; - void (*event_handler) (void *data, int status); + void (*event_handler) (void *data, enum ntb_link_event status); struct callout link_work; struct callout queue_full; struct callout rx_full; @@ -161,7 +161,7 @@ struct ntb_queue_handlers { void *data, int len); void (*tx_handler) (struct ntb_transport_qp *qp, void *qp_data, void *data, int len); - void (*event_handler) (void *data, int status); + void (*event_handler) (void *data, enum ntb_link_event status); }; @@ -234,7 +234,7 @@ static void ntb_net_tx_handler(struct nt void *data, int len); static void ntb_net_rx_handler(struct ntb_transport_qp *qp, void *qp_data, void *data, int len); -static void ntb_net_event_handler(void *data, int status); +static void ntb_net_event_handler(void *data, enum ntb_link_event status); static int ntb_transport_init(struct ntb_softc *ntb); static void ntb_transport_free(void *transport); static void ntb_transport_init_queue(struct ntb_netdev *nt, @@ -465,9 +465,23 @@ ntb_net_rx_handler(struct ntb_transport_ } static void -ntb_net_event_handler(void *data, int status) +ntb_net_event_handler(void *data, enum ntb_link_event status) { + struct ifnet *ifp; + + ifp = data; + (void)ifp; + /* XXX The Linux driver munges with the carrier status here. */ + + switch (status) { + case NTB_LINK_DOWN: + break; + case NTB_LINK_UP: + break; + default: + panic("Bogus ntb_link_event %u\n", status); + } } /* Transport Init and teardown */ Modified: head/sys/dev/ntb/ntb_hw/ntb_hw.h ============================================================================== --- head/sys/dev/ntb/ntb_hw/ntb_hw.h Wed Oct 14 23:41:41 2015 (r289339) +++ head/sys/dev/ntb/ntb_hw/ntb_hw.h Wed Oct 14 23:44:42 2015 (r289340) @@ -32,8 +32,11 @@ struct ntb_softc; #define NTB_NUM_MW 2 -#define NTB_LINK_DOWN 0 -#define NTB_LINK_UP 1 + +enum ntb_link_event { + NTB_LINK_DOWN = 0, + NTB_LINK_UP, +}; enum ntb_hw_event { NTB_EVENT_SW_EVENT0 = 0, From owner-svn-src-all@freebsd.org Wed Oct 14 23:45:36 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C09F3A15B56; Wed, 14 Oct 2015 23:45:36 +0000 (UTC) (envelope-from cem@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7175D289; Wed, 14 Oct 2015 23:45:36 +0000 (UTC) (envelope-from cem@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t9ENjZ2R050385; Wed, 14 Oct 2015 23:45:35 GMT (envelope-from cem@FreeBSD.org) Received: (from cem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9ENjZDY050384; Wed, 14 Oct 2015 23:45:35 GMT (envelope-from cem@FreeBSD.org) Message-Id: <201510142345.t9ENjZDY050384@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cem set sender to cem@FreeBSD.org using -f From: "Conrad E. Meyer" Date: Wed, 14 Oct 2015 23:45:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289341 - head/sys/dev/ntb/if_ntb X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Oct 2015 23:45:36 -0000 Author: cem Date: Wed Oct 14 23:45:35 2015 New Revision: 289341 URL: https://svnweb.freebsd.org/changeset/base/289341 Log: if_ntb: Cleanup style Modified: head/sys/dev/ntb/if_ntb/if_ntb.c Modified: head/sys/dev/ntb/if_ntb/if_ntb.c ============================================================================== --- head/sys/dev/ntb/if_ntb/if_ntb.c Wed Oct 14 23:44:42 2015 (r289340) +++ head/sys/dev/ntb/if_ntb/if_ntb.c Wed Oct 14 23:45:35 2015 (r289341) @@ -116,7 +116,7 @@ struct ntb_transport_qp { struct ntb_rx_info *rx_info; struct ntb_rx_info *remote_rx_info; - void (*tx_handler) (struct ntb_transport_qp *qp, void *qp_data, + void (*tx_handler)(struct ntb_transport_qp *qp, void *qp_data, void *data, int len); struct ntb_queue_list tx_free_q; struct mtx ntb_tx_free_q_lock; @@ -125,7 +125,7 @@ struct ntb_transport_qp { uint64_t tx_max_entry; uint64_t tx_max_frame; - void (*rx_handler) (struct ntb_transport_qp *qp, void *qp_data, + void (*rx_handler)(struct ntb_transport_qp *qp, void *qp_data, void *data, int len); struct ntb_queue_list rx_pend_q; struct ntb_queue_list rx_free_q; @@ -137,7 +137,7 @@ struct ntb_transport_qp { uint64_t rx_max_entry; uint64_t rx_max_frame; - void (*event_handler) (void *data, enum ntb_link_event status); + void (*event_handler)(void *data, enum ntb_link_event status); struct callout link_work; struct callout queue_full; struct callout rx_full; @@ -157,11 +157,11 @@ struct ntb_transport_qp { }; struct ntb_queue_handlers { - void (*rx_handler) (struct ntb_transport_qp *qp, void *qp_data, + void (*rx_handler)(struct ntb_transport_qp *qp, void *qp_data, void *data, int len); - void (*tx_handler) (struct ntb_transport_qp *qp, void *qp_data, + void (*tx_handler)(struct ntb_transport_qp *qp, void *qp_data, void *data, int len); - void (*event_handler) (void *data, enum ntb_link_event status); + void (*event_handler)(void *data, enum ntb_link_event status); }; @@ -825,7 +825,7 @@ ntb_tx_copy_task(struct ntb_transport_qp ntb_ring_doorbell(qp->ntb, qp->qp_num); - /* + /* * The entry length can only be zero if the packet is intended to be a * "link down" or similar. Since no payload is being sent in these * cases, there is nothing to add to the completion queue. @@ -868,7 +868,7 @@ ntb_transport_rxc_db(void *arg, int dumm uint64_t i; int rc; - /* + /* * Limit the number of packets processed in a single interrupt to * provide fairness to others */ @@ -1276,7 +1276,7 @@ ntb_transport_link_cleanup(struct ntb_ne else nt->transport_link = NTB_LINK_DOWN; - /* + /* * The scratchpad registers keep the values if the remote side * goes down, blast them now to give them a sane value the next * time they are accessed From owner-svn-src-all@freebsd.org Wed Oct 14 23:46:17 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2D3ECA15BD8; Wed, 14 Oct 2015 23:46:17 +0000 (UTC) (envelope-from cem@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id DCFE1638; Wed, 14 Oct 2015 23:46:16 +0000 (UTC) (envelope-from cem@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t9ENkF62050477; Wed, 14 Oct 2015 23:46:15 GMT (envelope-from cem@FreeBSD.org) Received: (from cem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9ENkFDP050476; Wed, 14 Oct 2015 23:46:15 GMT (envelope-from cem@FreeBSD.org) Message-Id: <201510142346.t9ENkFDP050476@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cem set sender to cem@FreeBSD.org using -f From: "Conrad E. Meyer" Date: Wed, 14 Oct 2015 23:46:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289342 - head/sys/dev/ntb/ntb_hw X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Oct 2015 23:46:17 -0000 Author: cem Date: Wed Oct 14 23:46:15 2015 New Revision: 289342 URL: https://svnweb.freebsd.org/changeset/base/289342 Log: NTB: MFV 53a788a7: Split ntb_setup_interrupts() into SOC, Xeon, and legacy routines The names don't line up 100% with Linux. Our routines are named ntb_setup_interrupts, ntb_setup_xeon_msix, ntb_setup_soc_msix, and ntb_setup_legacy_interrupt. Linux SNB = FreeBSD Xeon; Linux BWD = FreeBSD SOC. Original Linux commit log: This is an cleanup effort to make ntb_setup_msix() more readable - use ntb_setup_bwd_msix() to init MSI-Xs on BWD hardware and ntb_setup_snb_msix() - on SNB hardware. Function ntb_setup_snb_msix() also initializes MSI-Xs the way it should has been done - looping pci_enable_msix() until success or failure. Authored by: Alexander Gordeev Obtained from: Linux (Dual BSD/GPL driver) Sponsored by: EMC / Isilon Storage Division Modified: head/sys/dev/ntb/ntb_hw/ntb_hw.c Modified: head/sys/dev/ntb/ntb_hw/ntb_hw.c ============================================================================== --- head/sys/dev/ntb/ntb_hw/ntb_hw.c Wed Oct 14 23:45:35 2015 (r289341) +++ head/sys/dev/ntb/ntb_hw/ntb_hw.c Wed Oct 14 23:46:15 2015 (r289342) @@ -200,6 +200,9 @@ static int map_memory_window_bar(struct struct ntb_pci_bar_info *bar); static void ntb_unmap_pci_bar(struct ntb_softc *ntb); static int ntb_setup_interrupts(struct ntb_softc *ntb); +static int ntb_setup_legacy_interrupt(struct ntb_softc *ntb); +static int ntb_setup_xeon_msix(struct ntb_softc *ntb, uint32_t num_vectors); +static int ntb_setup_soc_msix(struct ntb_softc *ntb, uint32_t num_vectors); static void ntb_teardown_interrupts(struct ntb_softc *ntb); static void handle_soc_irq(void *arg); static void handle_xeon_irq(void *arg); @@ -208,7 +211,7 @@ static void ntb_handle_legacy_interrupt( static void ntb_irq_work(void *arg); static void mask_ldb_interrupt(struct ntb_softc *ntb, unsigned int idx); static void unmask_ldb_interrupt(struct ntb_softc *ntb, unsigned int idx); -static int ntb_create_callbacks(struct ntb_softc *ntb, int num_vectors); +static int ntb_create_callbacks(struct ntb_softc *ntb, uint32_t num_vectors); static void ntb_free_callbacks(struct ntb_softc *ntb); static struct ntb_hw_info *ntb_get_device_info(uint32_t device_id); static int ntb_setup_xeon(struct ntb_softc *ntb); @@ -473,13 +476,79 @@ ntb_unmap_pci_bar(struct ntb_softc *ntb) } static int -ntb_setup_interrupts(struct ntb_softc *ntb) +ntb_setup_xeon_msix(struct ntb_softc *ntb, uint32_t num_vectors) { void (*interrupt_handler)(void *); void *int_arg; - bool use_msix = false; + uint32_t i; + int rc; + + if (num_vectors < 4) + return (ENOSPC); + + for (i = 0; i < num_vectors; i++) { + ntb->int_info[i].rid = i + 1; + ntb->int_info[i].res = bus_alloc_resource_any(ntb->device, + SYS_RES_IRQ, &ntb->int_info[i].rid, RF_ACTIVE); + if (ntb->int_info[i].res == NULL) { + device_printf(ntb->device, + "bus_alloc_resource failed\n"); + return (ENOMEM); + } + ntb->int_info[i].tag = NULL; + ntb->allocated_interrupts++; + if (i == num_vectors - 1) { + interrupt_handler = handle_xeon_event_irq; + int_arg = ntb; + } else { + interrupt_handler = handle_xeon_irq; + int_arg = &ntb->db_cb[i]; + } + rc = bus_setup_intr(ntb->device, ntb->int_info[i].res, + INTR_MPSAFE | INTR_TYPE_MISC, NULL, interrupt_handler, + int_arg, &ntb->int_info[i].tag); + if (rc != 0) { + device_printf(ntb->device, + "bus_setup_intr failed\n"); + return (ENXIO); + } + } + return (0); +} + +static int +ntb_setup_soc_msix(struct ntb_softc *ntb, uint32_t num_vectors) +{ + uint32_t i; + int rc; + + for (i = 0; i < num_vectors; i++) { + ntb->int_info[i].rid = i + 1; + ntb->int_info[i].res = bus_alloc_resource_any(ntb->device, + SYS_RES_IRQ, &ntb->int_info[i].rid, RF_ACTIVE); + if (ntb->int_info[i].res == NULL) { + device_printf(ntb->device, + "bus_alloc_resource failed\n"); + return (ENOMEM); + } + ntb->int_info[i].tag = NULL; + ntb->allocated_interrupts++; + rc = bus_setup_intr(ntb->device, ntb->int_info[i].res, + INTR_MPSAFE | INTR_TYPE_MISC, NULL, handle_soc_irq, + &ntb->db_cb[i], &ntb->int_info[i].tag); + if (rc != 0) { + device_printf(ntb->device, "bus_setup_intr failed\n"); + return (ENXIO); + } + } + return (0); +} + +static int +ntb_setup_interrupts(struct ntb_softc *ntb) +{ uint32_t num_vectors; - int i; + int rc; ntb->allocated_interrupts = 0; /* @@ -494,69 +563,47 @@ ntb_setup_interrupts(struct ntb_softc *n num_vectors = MIN(pci_msix_count(ntb->device), ntb->limits.max_db_bits); - if (num_vectors >= 1) { + if (num_vectors >= 1) pci_alloc_msix(ntb->device, &num_vectors); - if (num_vectors >= 4) - use_msix = true; - } ntb_create_callbacks(ntb, num_vectors); - if (use_msix == true) { - for (i = 0; i < num_vectors; i++) { - ntb->int_info[i].rid = i + 1; - ntb->int_info[i].res = bus_alloc_resource_any( - ntb->device, SYS_RES_IRQ, &ntb->int_info[i].rid, - RF_ACTIVE); - if (ntb->int_info[i].res == NULL) { - device_printf(ntb->device, - "bus_alloc_resource failed\n"); - return (ENOMEM); - } - ntb->int_info[i].tag = NULL; - ntb->allocated_interrupts++; - if (ntb->type == NTB_SOC) { - interrupt_handler = handle_soc_irq; - int_arg = &ntb->db_cb[i]; - } else { - if (i == num_vectors - 1) { - interrupt_handler = - handle_xeon_event_irq; - int_arg = ntb; - } else { - interrupt_handler = - handle_xeon_irq; - int_arg = &ntb->db_cb[i]; - } - } - if (bus_setup_intr(ntb->device, ntb->int_info[i].res, - INTR_MPSAFE | INTR_TYPE_MISC, NULL, - interrupt_handler, int_arg, - &ntb->int_info[i].tag) != 0) { - device_printf(ntb->device, - "bus_setup_intr failed\n"); - return (ENXIO); - } - } - } else { - ntb->int_info[0].rid = 0; - ntb->int_info[0].res = bus_alloc_resource_any(ntb->device, - SYS_RES_IRQ, &ntb->int_info[0].rid, RF_SHAREABLE|RF_ACTIVE); - interrupt_handler = ntb_handle_legacy_interrupt; - if (ntb->int_info[0].res == NULL) { - device_printf(ntb->device, - "bus_alloc_resource failed\n"); - return (ENOMEM); - } - ntb->int_info[0].tag = NULL; - ntb->allocated_interrupts = 1; - if (bus_setup_intr(ntb->device, ntb->int_info[0].res, - INTR_MPSAFE | INTR_TYPE_MISC, NULL, - interrupt_handler, ntb, &ntb->int_info[0].tag) != 0) { + if (ntb->type == NTB_XEON) + rc = ntb_setup_xeon_msix(ntb, num_vectors); + else + rc = ntb_setup_soc_msix(ntb, num_vectors); + if (rc != 0) + device_printf(ntb->device, + "Error allocating MSI-X interrupts: %d\n", rc); + + if (ntb->type == NTB_XEON && rc == ENOSPC) + rc = ntb_setup_legacy_interrupt(ntb); - device_printf(ntb->device, "bus_setup_intr failed\n"); - return (ENXIO); - } + return (rc); +} + +static int +ntb_setup_legacy_interrupt(struct ntb_softc *ntb) +{ + int rc; + + ntb->int_info[0].rid = 0; + ntb->int_info[0].res = bus_alloc_resource_any(ntb->device, SYS_RES_IRQ, + &ntb->int_info[0].rid, RF_SHAREABLE|RF_ACTIVE); + if (ntb->int_info[0].res == NULL) { + device_printf(ntb->device, "bus_alloc_resource failed\n"); + return (ENOMEM); + } + + ntb->int_info[0].tag = NULL; + ntb->allocated_interrupts = 1; + + rc = bus_setup_intr(ntb->device, ntb->int_info[0].res, + INTR_MPSAFE | INTR_TYPE_MISC, NULL, ntb_handle_legacy_interrupt, + ntb, &ntb->int_info[0].tag); + if (rc != 0) { + device_printf(ntb->device, "bus_setup_intr failed\n"); + return (ENXIO); } return (0); @@ -688,9 +735,9 @@ ntb_handle_legacy_interrupt(void *arg) } static int -ntb_create_callbacks(struct ntb_softc *ntb, int num_vectors) +ntb_create_callbacks(struct ntb_softc *ntb, uint32_t num_vectors) { - int i; + uint32_t i; ntb->db_cb = malloc(num_vectors * sizeof(*ntb->db_cb), M_NTB, M_ZERO | M_WAITOK); @@ -705,7 +752,7 @@ ntb_create_callbacks(struct ntb_softc *n static void ntb_free_callbacks(struct ntb_softc *ntb) { - int i; + uint8_t i; for (i = 0; i < ntb->limits.max_db_bits; i++) ntb_unregister_db_callback(ntb, i); From owner-svn-src-all@freebsd.org Wed Oct 14 23:47:09 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 917EDA15C1D; Wed, 14 Oct 2015 23:47:09 +0000 (UTC) (envelope-from cem@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5EFA8834; Wed, 14 Oct 2015 23:47:09 +0000 (UTC) (envelope-from cem@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t9ENl8F5050579; Wed, 14 Oct 2015 23:47:08 GMT (envelope-from cem@FreeBSD.org) Received: (from cem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9ENl8Rv050578; Wed, 14 Oct 2015 23:47:08 GMT (envelope-from cem@FreeBSD.org) Message-Id: <201510142347.t9ENl8Rv050578@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cem set sender to cem@FreeBSD.org using -f From: "Conrad E. Meyer" Date: Wed, 14 Oct 2015 23:47:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289343 - head/sys/dev/ntb/ntb_hw X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Oct 2015 23:47:09 -0000 Author: cem Date: Wed Oct 14 23:47:08 2015 New Revision: 289343 URL: https://svnweb.freebsd.org/changeset/base/289343 Log: NTB: Reserve link event doorbell callback on Xeon Consumers that registered on this bit would never see a callback and it is likely a mistake. This does not affect if_ntb, which limits itself to a single doorbell callback. Modified: head/sys/dev/ntb/ntb_hw/ntb_hw.c Modified: head/sys/dev/ntb/ntb_hw/ntb_hw.c ============================================================================== --- head/sys/dev/ntb/ntb_hw/ntb_hw.c Wed Oct 14 23:46:15 2015 (r289342) +++ head/sys/dev/ntb/ntb_hw/ntb_hw.c Wed Oct 14 23:47:08 2015 (r289343) @@ -110,6 +110,7 @@ struct ntb_db_cb { void *data; struct ntb_softc *ntb; struct callout irq_work; + bool reserved; }; struct ntb_softc { @@ -513,6 +514,12 @@ ntb_setup_xeon_msix(struct ntb_softc *nt return (ENXIO); } } + + /* + * Prevent consumers from registering callbacks on the link event irq + * slot, from which they will never be called back. + */ + ntb->db_cb[num_vectors - 1].reserved = true; return (0); } @@ -1302,15 +1309,17 @@ int ntb_register_db_callback(struct ntb_softc *ntb, unsigned int idx, void *data, ntb_db_callback func) { + struct ntb_db_cb *db_cb = &ntb->db_cb[idx]; - if (idx >= ntb->allocated_interrupts || ntb->db_cb[idx].callback) { + if (idx >= ntb->allocated_interrupts || db_cb->callback || + db_cb->reserved) { device_printf(ntb->device, "Invalid Index.\n"); return (EINVAL); } - ntb->db_cb[idx].callback = func; - ntb->db_cb[idx].data = data; - callout_init(&ntb->db_cb[idx].irq_work, 1); + db_cb->callback = func; + db_cb->data = data; + callout_init(&db_cb->irq_work, 1); unmask_ldb_interrupt(ntb, idx); From owner-svn-src-all@freebsd.org Wed Oct 14 23:47:24 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id CCDCCA15C4B; Wed, 14 Oct 2015 23:47:24 +0000 (UTC) (envelope-from cem@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A39BA97D; Wed, 14 Oct 2015 23:47:24 +0000 (UTC) (envelope-from cem@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t9ENlNxh050638; Wed, 14 Oct 2015 23:47:23 GMT (envelope-from cem@FreeBSD.org) Received: (from cem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9ENlN9L050637; Wed, 14 Oct 2015 23:47:23 GMT (envelope-from cem@FreeBSD.org) Message-Id: <201510142347.t9ENlN9L050637@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cem set sender to cem@FreeBSD.org using -f From: "Conrad E. Meyer" Date: Wed, 14 Oct 2015 23:47:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289344 - head/sys/dev/ntb/ntb_hw X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Oct 2015 23:47:24 -0000 Author: cem Date: Wed Oct 14 23:47:23 2015 New Revision: 289344 URL: https://svnweb.freebsd.org/changeset/base/289344 Log: NTB: Remap MSI-X messages over available slots Remap MSI-X messages over available slots rather than falling back to legacy INTx when fewer MSI-X slots are available than were requested. N.B. the Linux driver does *not* do this. To aid in testing, a tunable 'hw.ntb.force_remap_mode' has been added. It defaults to off (0). When the tunable is enabled and sufficient slots were available, the driver restricts the number of slots by one and remaps the MSI-X messages over the remaining slots. In case this is actually not okay (as I don't yet have access to this hardware to test), a tunable 'hw.ntb.prefer_intx_to_remap' has been added. It defaults to off (0). When the tunable is enabled and fewer slots are available than requested, fall back to legacy INTx mode rather than attempting to remap MSI-X messages. Suggested by: jhb Reviewed by: jhb (earlier version) Sponsored by: EMC / Isilon Storage Division Modified: head/sys/dev/ntb/ntb_hw/ntb_hw.c Modified: head/sys/dev/ntb/ntb_hw/ntb_hw.c ============================================================================== --- head/sys/dev/ntb/ntb_hw/ntb_hw.c Wed Oct 14 23:47:08 2015 (r289343) +++ head/sys/dev/ntb/ntb_hw/ntb_hw.c Wed Oct 14 23:47:23 2015 (r289344) @@ -200,6 +200,7 @@ static int map_mmr_bar(struct ntb_softc static int map_memory_window_bar(struct ntb_softc *ntb, struct ntb_pci_bar_info *bar); static void ntb_unmap_pci_bar(struct ntb_softc *ntb); +static int ntb_remap_msix(device_t, uint32_t desired, uint32_t avail); static int ntb_setup_interrupts(struct ntb_softc *ntb); static int ntb_setup_legacy_interrupt(struct ntb_softc *ntb); static int ntb_setup_xeon_msix(struct ntb_softc *ntb, uint32_t num_vectors); @@ -551,10 +552,55 @@ ntb_setup_soc_msix(struct ntb_softc *ntb return (0); } +/* + * The Linux NTB driver drops from MSI-X to legacy INTx if a unique vector + * cannot be allocated for each MSI-X message. JHB seems to think remapping + * should be okay. This tunable should enable us to test that hypothesis + * when someone gets their hands on some Xeon hardware. + */ +static int ntb_force_remap_mode; +SYSCTL_INT(_hw_ntb, OID_AUTO, force_remap_mode, CTLFLAG_RDTUN, + &ntb_force_remap_mode, 0, "If enabled, force MSI-X messages to be remapped" + " to a smaller number of ithreads, even if the desired number are " + "available"); + +/* + * In case it is NOT ok, give consumers an abort button. + */ +static int ntb_prefer_intx; +SYSCTL_INT(_hw_ntb, OID_AUTO, prefer_intx_to_remap, CTLFLAG_RDTUN, + &ntb_prefer_intx, 0, "If enabled, prefer to use legacy INTx mode rather " + "than remapping MSI-X messages over available slots (match Linux driver " + "behavior)"); + +/* + * Remap the desired number of MSI-X messages to available ithreads in a simple + * round-robin fashion. + */ +static int +ntb_remap_msix(device_t dev, uint32_t desired, uint32_t avail) +{ + u_int *vectors; + uint32_t i; + int rc; + + if (ntb_prefer_intx != 0) + return (ENXIO); + + vectors = malloc(desired * sizeof(*vectors), M_NTB, M_ZERO | M_WAITOK); + + for (i = 0; i < desired; i++) + vectors[i] = (i % avail) + 1; + + rc = pci_remap_msix(dev, desired, vectors); + free(vectors, M_NTB); + return (rc); +} + static int ntb_setup_interrupts(struct ntb_softc *ntb) { - uint32_t num_vectors; + uint32_t desired_vectors, num_vectors; int rc; ntb->allocated_interrupts = 0; @@ -568,10 +614,27 @@ ntb_setup_interrupts(struct ntb_softc *n ntb_reg_write(2, ntb->reg_ofs.ldb_mask, (uint16_t) ~(1 << XEON_LINK_DB)); - num_vectors = MIN(pci_msix_count(ntb->device), + num_vectors = desired_vectors = MIN(pci_msix_count(ntb->device), ntb->limits.max_db_bits); - if (num_vectors >= 1) - pci_alloc_msix(ntb->device, &num_vectors); + if (desired_vectors >= 1) { + rc = pci_alloc_msix(ntb->device, &num_vectors); + + if (ntb_force_remap_mode != 0 && rc == 0 && + num_vectors == desired_vectors) + num_vectors--; + + if (rc == 0 && num_vectors < desired_vectors) { + rc = ntb_remap_msix(ntb->device, desired_vectors, + num_vectors); + if (rc == 0) + num_vectors = desired_vectors; + else + pci_release_msi(ntb->device); + } + if (rc != 0) + num_vectors = 1; + } else + num_vectors = 1; ntb_create_callbacks(ntb, num_vectors); From owner-svn-src-all@freebsd.org Wed Oct 14 23:47:36 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 56110A15C7A; Wed, 14 Oct 2015 23:47:36 +0000 (UTC) (envelope-from cem@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 22436ACC; Wed, 14 Oct 2015 23:47:36 +0000 (UTC) (envelope-from cem@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t9ENlZhJ050694; Wed, 14 Oct 2015 23:47:35 GMT (envelope-from cem@FreeBSD.org) Received: (from cem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9ENlZtw050693; Wed, 14 Oct 2015 23:47:35 GMT (envelope-from cem@FreeBSD.org) Message-Id: <201510142347.t9ENlZtw050693@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cem set sender to cem@FreeBSD.org using -f From: "Conrad E. Meyer" Date: Wed, 14 Oct 2015 23:47:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289345 - head/sys/dev/ntb/if_ntb X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Oct 2015 23:47:36 -0000 Author: cem Date: Wed Oct 14 23:47:35 2015 New Revision: 289345 URL: https://svnweb.freebsd.org/changeset/base/289345 Log: NTB: MFV a1413cfb: correct the spread of queues over mw's The detection of an uneven number of queues on the given memory windows was not correct. The mw_num is zero based and the mod should be division to spread them evenly over the mw's. Authored by: Jon Mason Obtained from: Linux (Dual BSD/GPL driver) Sponsored by: EMC / Isilon Storage Division Modified: head/sys/dev/ntb/if_ntb/if_ntb.c Modified: head/sys/dev/ntb/if_ntb/if_ntb.c ============================================================================== --- head/sys/dev/ntb/if_ntb/if_ntb.c Wed Oct 14 23:47:23 2015 (r289344) +++ head/sys/dev/ntb/if_ntb/if_ntb.c Wed Oct 14 23:47:35 2015 (r289345) @@ -566,7 +566,7 @@ ntb_transport_init_queue(struct ntb_netd qp->client_ready = NTB_LINK_DOWN; qp->event_handler = NULL; - if (nt->max_qps % NTB_NUM_MW && mw_num < nt->max_qps % NTB_NUM_MW) + if (nt->max_qps % NTB_NUM_MW && mw_num + 1 < nt->max_qps / NTB_NUM_MW) num_qps_mw = nt->max_qps / NTB_NUM_MW + 1; else num_qps_mw = nt->max_qps / NTB_NUM_MW; @@ -1197,7 +1197,7 @@ ntb_transport_setup_qp_mw(struct ntb_net uint8_t mw_num = QP_TO_MW(qp_num); unsigned int i; - if (nt->max_qps % NTB_NUM_MW && mw_num < nt->max_qps % NTB_NUM_MW) + if (nt->max_qps % NTB_NUM_MW && mw_num + 1 < nt->max_qps / NTB_NUM_MW) num_qps_mw = nt->max_qps / NTB_NUM_MW + 1; else num_qps_mw = nt->max_qps / NTB_NUM_MW; From owner-svn-src-all@freebsd.org Wed Oct 14 23:47:53 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id CBA4BA15CB2; Wed, 14 Oct 2015 23:47:53 +0000 (UTC) (envelope-from cem@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7C4B5C2A; Wed, 14 Oct 2015 23:47:53 +0000 (UTC) (envelope-from cem@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t9ENlqh1050757; Wed, 14 Oct 2015 23:47:52 GMT (envelope-from cem@FreeBSD.org) Received: (from cem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9ENlqLM050756; Wed, 14 Oct 2015 23:47:52 GMT (envelope-from cem@FreeBSD.org) Message-Id: <201510142347.t9ENlqLM050756@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cem set sender to cem@FreeBSD.org using -f From: "Conrad E. Meyer" Date: Wed, 14 Oct 2015 23:47:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289346 - head/sys/dev/ntb/if_ntb X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Oct 2015 23:47:53 -0000 Author: cem Date: Wed Oct 14 23:47:52 2015 New Revision: 289346 URL: https://svnweb.freebsd.org/changeset/base/289346 Log: if_ntb: MFV 3cc5ba19: Add alignment check to meet hardware requirement Original Linux commit log: The NTB translate register must have the value to be BAR size aligned. This alignment check make sure that the DMA memory allocated has the proper alignment. Another requirement for NTB to function properly with memory window BAR size greater or equal to 4M is to use the CMA feature in 3.16 kernel with the appropriate CONFIG_CMA_ALIGNMENT and CONFIG_CMA_SIZE_MBYTES set. Authored by: Dave Jiang Obtained from: Linux (Dual BSD/GPL driver) Sponsored by: EMC / Isilon Storage Division Modified: head/sys/dev/ntb/if_ntb/if_ntb.c Modified: head/sys/dev/ntb/if_ntb/if_ntb.c ============================================================================== --- head/sys/dev/ntb/if_ntb/if_ntb.c Wed Oct 14 23:47:35 2015 (r289345) +++ head/sys/dev/ntb/if_ntb/if_ntb.c Wed Oct 14 23:47:52 2015 (r289346) @@ -1163,13 +1163,26 @@ ntb_set_mw(struct ntb_netdev *nt, int nu BUS_SPACE_MAXADDR, mw->size, 0); if (mw->virt_addr == NULL) { mw->size = 0; - printf("ntb: Unable to allocate MW buffer of size %d\n", - (int)mw->size); + printf("ntb: Unable to allocate MW buffer of size %zu\n", + mw->size); return (ENOMEM); } /* TODO: replace with bus_space_* functions */ mw->dma_addr = vtophys(mw->virt_addr); + /* + * Ensure that the allocation from contigmalloc is aligned as + * requested. XXX: This may not be needed -- brought in for parity + * with the Linux driver. + */ + if (mw->dma_addr % size != 0) { + device_printf(ntb_get_device(nt->ntb), + "DMA memory 0x%jx not aligned to BAR size 0x%x\n", + (uintmax_t)mw->dma_addr, size); + ntb_free_mw(nt, num_mw); + return (ENOMEM); + } + /* Notify HW the memory location of the receive buffer */ ntb_set_mw_addr(nt->ntb, num_mw, mw->dma_addr); From owner-svn-src-all@freebsd.org Wed Oct 14 23:48:05 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1226CA15CED; Wed, 14 Oct 2015 23:48:05 +0000 (UTC) (envelope-from cem@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id DDB25D7D; Wed, 14 Oct 2015 23:48:04 +0000 (UTC) (envelope-from cem@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t9ENm30t050818; Wed, 14 Oct 2015 23:48:03 GMT (envelope-from cem@FreeBSD.org) Received: (from cem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9ENm3V0050817; Wed, 14 Oct 2015 23:48:03 GMT (envelope-from cem@FreeBSD.org) Message-Id: <201510142348.t9ENm3V0050817@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cem set sender to cem@FreeBSD.org using -f From: "Conrad E. Meyer" Date: Wed, 14 Oct 2015 23:48:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289347 - head/sys/dev/ntb/ntb_hw X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Oct 2015 23:48:05 -0000 Author: cem Date: Wed Oct 14 23:48:03 2015 New Revision: 289347 URL: https://svnweb.freebsd.org/changeset/base/289347 Log: NTB: Abstract doorbell register access The doorbell registers (and associated mask) are 16-bit on Xeon but 64-bit on SoC. Abstract IO access to doorbell registers with 'db_ioread' and 'db_iowrite' (names and idea borrowed from the dual BSD/GPL Linux driver). Sponsored by: EMC / Isilon Storage Division Modified: head/sys/dev/ntb/ntb_hw/ntb_hw.c Modified: head/sys/dev/ntb/ntb_hw/ntb_hw.c ============================================================================== --- head/sys/dev/ntb/ntb_hw/ntb_hw.c Wed Oct 14 23:47:52 2015 (r289346) +++ head/sys/dev/ntb/ntb_hw/ntb_hw.c Wed Oct 14 23:48:03 2015 (r289347) @@ -211,6 +211,8 @@ static void handle_xeon_irq(void *arg); static void handle_xeon_event_irq(void *arg); static void ntb_handle_legacy_interrupt(void *arg); static void ntb_irq_work(void *arg); +static uint64_t db_ioread(struct ntb_softc *, uint32_t regoff); +static void db_iowrite(struct ntb_softc *, uint32_t regoff, uint64_t val); static void mask_ldb_interrupt(struct ntb_softc *ntb, unsigned int idx); static void unmask_ldb_interrupt(struct ntb_softc *ntb, unsigned int idx); static int ntb_create_callbacks(struct ntb_softc *ntb, uint32_t num_vectors); @@ -601,18 +603,19 @@ static int ntb_setup_interrupts(struct ntb_softc *ntb) { uint32_t desired_vectors, num_vectors; + uint64_t mask; int rc; ntb->allocated_interrupts = 0; + /* * On SOC, disable all interrupts. On XEON, disable all but Link * Interrupt. The rest will be unmasked as callbacks are registered. */ - if (ntb->type == NTB_SOC) - ntb_reg_write(8, ntb->reg_ofs.ldb_mask, ~0); - else - ntb_reg_write(2, ntb->reg_ofs.ldb_mask, - (uint16_t) ~(1 << XEON_LINK_DB)); + mask = 0; + if (ntb->type == NTB_XEON) + mask = (1 << XEON_LINK_DB); + db_iowrite(ntb, ntb->reg_ofs.ldb_mask, ~mask); num_vectors = desired_vectors = MIN(pci_msix_count(ntb->device), ntb->limits.max_db_bits); @@ -700,24 +703,53 @@ ntb_teardown_interrupts(struct ntb_softc pci_release_msi(ntb->device); } +/* + * Doorbell register and mask are 64-bit on SoC, 16-bit on Xeon. Abstract it + * out to make code clearer. + */ +static uint64_t +db_ioread(struct ntb_softc *ntb, uint32_t regoff) +{ + + if (ntb->type == NTB_SOC) + return (ntb_reg_read(8, regoff)); + + KASSERT(ntb->type == NTB_XEON, ("bad ntb type")); + + return (ntb_reg_read(2, regoff)); +} + +static void +db_iowrite(struct ntb_softc *ntb, uint32_t regoff, uint64_t val) +{ + + if (ntb->type == NTB_SOC) { + ntb_reg_write(8, regoff, val); + return; + } + + KASSERT(ntb->type == NTB_XEON, ("bad ntb type")); + ntb_reg_write(2, regoff, (uint16_t)val); +} + static void mask_ldb_interrupt(struct ntb_softc *ntb, unsigned int idx) { - unsigned long mask; + uint64_t mask; - mask = ntb_reg_read(2, ntb->reg_ofs.ldb_mask); + mask = db_ioread(ntb, ntb->reg_ofs.ldb_mask); mask |= 1 << (idx * ntb->bits_per_vector); - ntb_reg_write(2, ntb->reg_ofs.ldb_mask, mask); + db_iowrite(ntb, ntb->reg_ofs.ldb_mask, mask); } static void unmask_ldb_interrupt(struct ntb_softc *ntb, unsigned int idx) { - unsigned long mask; + uint64_t mask; - mask = ntb_reg_read(2, ntb->reg_ofs.ldb_mask); + mask = db_ioread(ntb, ntb->reg_ofs.ldb_mask); mask &= ~(1 << (idx * ntb->bits_per_vector)); - ntb_reg_write(2, ntb->reg_ofs.ldb_mask, mask); + db_iowrite(ntb, ntb->reg_ofs.ldb_mask, mask); } static void @@ -726,7 +758,7 @@ handle_soc_irq(void *arg) struct ntb_db_cb *db_cb = arg; struct ntb_softc *ntb = db_cb->ntb; - ntb_reg_write(8, ntb->reg_ofs.ldb, (uint64_t) 1 << db_cb->db_num); + db_iowrite(ntb, ntb->reg_ofs.ldb, (uint64_t) 1 << db_cb->db_num); if (db_cb->callback != NULL) { mask_ldb_interrupt(ntb, db_cb->db_num); @@ -746,7 +778,7 @@ handle_xeon_irq(void *arg) * vectors, with the 4th having a single bit for link * interrupts. */ - ntb_reg_write(2, ntb->reg_ofs.ldb, + db_iowrite(ntb, ntb->reg_ofs.ldb, ((1 << ntb->bits_per_vector) - 1) << (db_cb->db_num * ntb->bits_per_vector)); @@ -768,40 +800,31 @@ handle_xeon_event_irq(void *arg) device_printf(ntb->device, "Error determining link status\n"); /* bit 15 is always the link bit */ - ntb_reg_write(2, ntb->reg_ofs.ldb, 1 << XEON_LINK_DB); + db_iowrite(ntb, ntb->reg_ofs.ldb, 1 << XEON_LINK_DB); } static void ntb_handle_legacy_interrupt(void *arg) { struct ntb_softc *ntb = arg; - unsigned int i = 0; - uint64_t ldb64; - uint16_t ldb16; - - if (ntb->type == NTB_SOC) { - ldb64 = ntb_reg_read(8, ntb->reg_ofs.ldb); + unsigned int i; + uint64_t ldb; - while (ldb64) { - i = ffs(ldb64); - ldb64 &= ldb64 - 1; - handle_soc_irq(&ntb->db_cb[i]); - } - } else { - ldb16 = ntb_reg_read(2, ntb->reg_ofs.ldb); + ldb = db_ioread(ntb, ntb->reg_ofs.ldb); - if ((ldb16 & XEON_DB_HW_LINK) != 0) { - handle_xeon_event_irq(ntb); - ldb16 &= ~XEON_DB_HW_LINK; - } + if (ntb->type == NTB_XEON && (ldb & XEON_DB_HW_LINK) != 0) { + handle_xeon_event_irq(ntb); + ldb &= ~XEON_DB_HW_LINK; + } - while (ldb16 != 0) { - i = ffs(ldb16); - ldb16 &= ldb16 - 1; + while (ldb != 0) { + i = ffs(ldb); + ldb &= ldb - 1; + if (ntb->type == NTB_SOC) + handle_soc_irq(&ntb->db_cb[i]); + else handle_xeon_irq(&ntb->db_cb[i]); - } } - } static int @@ -1669,25 +1692,24 @@ ntb_set_mw_addr(struct ntb_softc *ntb, u * * This function allows triggering of a doorbell on the secondary/external * side that will initiate an interrupt on the remote host - * - * RETURNS: An appropriate ERRNO error value on error, or zero for success. */ void ntb_ring_doorbell(struct ntb_softc *ntb, unsigned int db) { + uint64_t bit; if (ntb->type == NTB_SOC) - ntb_reg_write(8, ntb->reg_ofs.rdb, (uint64_t) 1 << db); - else { - if (HAS_FEATURE(NTB_REGS_THRU_MW)) - ntb_mw_write(2, XEON_SHADOW_PDOORBELL_OFFSET, - ((1 << ntb->bits_per_vector) - 1) << - (db * ntb->bits_per_vector)); - else - ntb_reg_write(2, ntb->reg_ofs.rdb, - ((1 << ntb->bits_per_vector) - 1) << - (db * ntb->bits_per_vector)); + bit = 1 << db; + else + bit = ((1 << ntb->bits_per_vector) - 1) << + (db * ntb->bits_per_vector); + + if (HAS_FEATURE(NTB_REGS_THRU_MW)) { + ntb_mw_write(2, XEON_SHADOW_PDOORBELL_OFFSET, bit); + return; } + + db_iowrite(ntb, ntb->reg_ofs.rdb, bit); } /** From owner-svn-src-all@freebsd.org Wed Oct 14 23:48:17 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D5050A15D20; Wed, 14 Oct 2015 23:48:17 +0000 (UTC) (envelope-from cem@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 955D1EC3; Wed, 14 Oct 2015 23:48:17 +0000 (UTC) (envelope-from cem@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t9ENmGh0050879; Wed, 14 Oct 2015 23:48:16 GMT (envelope-from cem@FreeBSD.org) Received: (from cem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9ENmGSK050878; Wed, 14 Oct 2015 23:48:16 GMT (envelope-from cem@FreeBSD.org) Message-Id: <201510142348.t9ENmGSK050878@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cem set sender to cem@FreeBSD.org using -f From: "Conrad E. Meyer" Date: Wed, 14 Oct 2015 23:48:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289348 - head/sys/dev/ntb/ntb_hw X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Oct 2015 23:48:17 -0000 Author: cem Date: Wed Oct 14 23:48:16 2015 New Revision: 289348 URL: https://svnweb.freebsd.org/changeset/base/289348 Log: NTB: MFV 1db97f25: Pull out platform detection logic Pull out read of PPD and platform detection logic to new functions, ntb_detect_xeon(), ntb_detect_soc(). No functional change -- mostly this is just shuffling the code to more closely match the Linux driver. Linux commit log: To simplify some of the platform detection code. Move the platform detection to a function to be called earlier. Authored by: Dave Jiang Obtained from: Linux (Dual BSD/GPL driver) Sponsored by: EMC / Isilon Storage Division Modified: head/sys/dev/ntb/ntb_hw/ntb_hw.c Modified: head/sys/dev/ntb/ntb_hw/ntb_hw.c ============================================================================== --- head/sys/dev/ntb/ntb_hw/ntb_hw.c Wed Oct 14 23:48:03 2015 (r289347) +++ head/sys/dev/ntb/ntb_hw/ntb_hw.c Wed Oct 14 23:48:16 2015 (r289348) @@ -146,6 +146,7 @@ struct ntb_softc { uint32_t lnk_stat; uint32_t spci_cmd; } reg_ofs; + uint32_t ppd; uint8_t conn_type; uint8_t dev_type; uint8_t bits_per_vector; @@ -218,6 +219,8 @@ static void unmask_ldb_interrupt(struct static int ntb_create_callbacks(struct ntb_softc *ntb, uint32_t num_vectors); static void ntb_free_callbacks(struct ntb_softc *ntb); static struct ntb_hw_info *ntb_get_device_info(uint32_t device_id); +static int ntb_detect_xeon(struct ntb_softc *ntb); +static int ntb_detect_soc(struct ntb_softc *ntb); static int ntb_setup_xeon(struct ntb_softc *ntb); static int ntb_setup_soc(struct ntb_softc *ntb); static void ntb_teardown_xeon(struct ntb_softc *ntb); @@ -311,6 +314,13 @@ ntb_attach(device_t device) callout_init(&ntb->heartbeat_timer, 1); callout_init(&ntb->lr_timer, 1); + if (ntb->type == NTB_SOC) + error = ntb_detect_soc(ntb); + else + error = ntb_detect_xeon(ntb); + if (error) + goto out; + error = ntb_map_pci_bars(ntb); if (error) goto out; @@ -874,29 +884,70 @@ ntb_teardown_xeon(struct ntb_softc *ntb) } static int -ntb_setup_xeon(struct ntb_softc *ntb) +ntb_detect_xeon(struct ntb_softc *ntb) { - uint8_t val, connection_type; - - val = pci_read_config(ntb->device, NTB_PPD_OFFSET, 1); + uint8_t ppd, conn_type; - connection_type = val & XEON_PPD_CONN_TYPE; + ppd = pci_read_config(ntb->device, NTB_PPD_OFFSET, 1); + ntb->ppd = ppd; - if ((val & XEON_PPD_DEV_TYPE) != 0) + if ((ppd & XEON_PPD_DEV_TYPE) != 0) ntb->dev_type = NTB_DEV_USD; else ntb->dev_type = NTB_DEV_DSD; + conn_type = ppd & XEON_PPD_CONN_TYPE; + switch (conn_type) { + case NTB_CONN_B2B: + ntb->conn_type = conn_type; + break; + case NTB_CONN_RP: + case NTB_CONN_TRANSPARENT: + default: + device_printf(ntb->device, "Unsupported connection type: %u\n", + (unsigned)conn_type); + return (ENXIO); + } + return (0); +} + +static int +ntb_detect_soc(struct ntb_softc *ntb) +{ + uint32_t ppd, conn_type; + + ppd = pci_read_config(ntb->device, NTB_PPD_OFFSET, 4); + ntb->ppd = ppd; + + if ((ppd & SOC_PPD_DEV_TYPE) != 0) + ntb->dev_type = NTB_DEV_DSD; + else + ntb->dev_type = NTB_DEV_USD; + + conn_type = (ppd & SOC_PPD_CONN_TYPE) >> 8; + switch (conn_type) { + case NTB_CONN_B2B: + ntb->conn_type = conn_type; + break; + default: + device_printf(ntb->device, "Unsupported NTB configuration\n"); + return (ENXIO); + } + return (0); +} + +static int +ntb_setup_xeon(struct ntb_softc *ntb) +{ + ntb->reg_ofs.ldb = XEON_PDOORBELL_OFFSET; ntb->reg_ofs.ldb_mask = XEON_PDBMSK_OFFSET; ntb->reg_ofs.spad_local = XEON_SPAD_OFFSET; ntb->reg_ofs.bar2_xlat = XEON_SBAR2XLAT_OFFSET; ntb->reg_ofs.bar4_xlat = XEON_SBAR4XLAT_OFFSET; - switch (connection_type) { + switch (ntb->conn_type) { case NTB_CONN_B2B: - ntb->conn_type = NTB_CONN_B2B; - /* * reg_ofs.rdb and reg_ofs.spad_remote are effectively ignored * with the NTB_REGS_THRU_MW errata mode enabled. (See @@ -922,7 +973,7 @@ ntb_setup_xeon(struct ntb_softc *ntb) case NTB_CONN_TRANSPARENT: default: device_printf(ntb->device, "Connection type %d not supported\n", - connection_type); + ntb->conn_type); return (ENXIO); } @@ -971,7 +1022,7 @@ ntb_setup_xeon(struct ntb_softc *ntb) */ if (HAS_FEATURE(NTB_B2BDOORBELL_BIT14) && !HAS_FEATURE(NTB_REGS_THRU_MW) && - connection_type == NTB_CONN_B2B) + ntb->conn_type == NTB_CONN_B2B) ntb->limits.max_db_bits = XEON_MAX_DB_BITS - 1; configure_xeon_secondary_side_bars(ntb); @@ -990,29 +1041,13 @@ ntb_setup_xeon(struct ntb_softc *ntb) static int ntb_setup_soc(struct ntb_softc *ntb) { - uint32_t val, connection_type; - - val = pci_read_config(ntb->device, NTB_PPD_OFFSET, 4); - - connection_type = (val & SOC_PPD_CONN_TYPE) >> 8; - switch (connection_type) { - case NTB_CONN_B2B: - ntb->conn_type = NTB_CONN_B2B; - break; - default: - device_printf(ntb->device, - "Unsupported NTB configuration (%d)\n", connection_type); - return (ENXIO); - } - if ((val & SOC_PPD_DEV_TYPE) != 0) - ntb->dev_type = NTB_DEV_DSD; - else - ntb->dev_type = NTB_DEV_USD; + KASSERT(ntb->conn_type == NTB_CONN_B2B, + ("Unsupported NTB configuration (%d)\n", ntb->conn_type)); /* Initiate PCI-E link training */ - pci_write_config(ntb->device, NTB_PPD_OFFSET, val | SOC_PPD_INIT_LINK, - 4); + pci_write_config(ntb->device, NTB_PPD_OFFSET, + ntb->ppd | SOC_PPD_INIT_LINK, 4); ntb->reg_ofs.ldb = SOC_PDOORBELL_OFFSET; ntb->reg_ofs.ldb_mask = SOC_PDBMSK_OFFSET; From owner-svn-src-all@freebsd.org Wed Oct 14 23:52:58 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id CDA00A151DD; Wed, 14 Oct 2015 23:52:58 +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 9A935836; Wed, 14 Oct 2015 23:52:58 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: by ioii196 with SMTP id i196so72687894ioi.3; Wed, 14 Oct 2015 16:52:58 -0700 (PDT) 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=RjmLKntLtvuqBLrEpyrtjTsPlMlv274Go2pMYJl9FPA=; b=BJudaJn5I2Fcv0m/rJyyw1yGG8whDsRGOO8I0b0B9ERrqQ0hE/xesL3+lQJTBlq49T IMHoUzzdozy/iamZP6H52Z7+d+oyVubGKra4M6vXIjVRHplkXNABbD5cubbJNfwug8g9 VNNHHsWiwV5BncoZO3VmF8qa7dlI1y4at49s9S6JZnc8duXC7sunFl0el851jxa5iZEC dWdb8agHhFuqUtSd0cEV64h3UmazqTMf7uJXxW9WCJtjXTFHl4V/WbM6RGdj4lVuAYdU wCWpJbtnPdKhGLGgwWwkyG3b3mDXLS+lxLxSdCIBKob1Hs2/I8TUDlRc5SzXxADlFA0M SN4w== MIME-Version: 1.0 X-Received: by 10.107.35.78 with SMTP id j75mr6714405ioj.123.1444866777898; Wed, 14 Oct 2015 16:52:57 -0700 (PDT) Received: by 10.36.46.66 with HTTP; Wed, 14 Oct 2015 16:52:57 -0700 (PDT) In-Reply-To: References: <201510142110.t9ELA6wv001917@repo.freebsd.org> Date: Wed, 14 Oct 2015 16:52:57 -0700 Message-ID: Subject: Re: svn commit: r289336 - head/sys/mips/conf From: Adrian Chadd To: Ed Maste 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 " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Oct 2015 23:52:58 -0000 Yeah, look at what I did with AR71XX_BASE, AR933X_BASE, etc. Maybe std.OCTEON1, etc.. -a On 14 October 2015 at 16:26, Ed Maste wrote: > On 14 October 2015 at 21:10, Ed Maste wrote: >> Author: emaste >> Date: Wed Oct 14 21:10:05 2015 >> New Revision: 289336 >> URL: https://svnweb.freebsd.org/changeset/base/289336 >> >> Log: >> Add Ubiquiti EdgeRouter Lite (ERL) kernel config file > > Because I've received a couple of private followups on this commit > I'll reply here to avoid the same discussion being spread across > multiple threads. > > There's a suggestion to have this config include OCTEON1 (on which > this is based) and then set a couple of ident/options. I didn't take > that approach here because OCTEON1 includes a whole bunch of devices > not relevant to the ERL, which has no PCI bus and doesn't support > AHCI, RAID controllers, PCI NICs, etc. In my opinion the device is > small enough that we don't want to bloat the kernel with devices that > cannot be used. To do so while still including OCTEON1 we'd end up > with a config file that's just about as long as this, full of nodevice > / nooption lines. > > Perhaps it makes sense to pull some common parts out into a > MIPS.common (e.g. options, USB devices, etc.) and include that from > OCTEON1, ERL, and other MIPS configurations? > From owner-svn-src-all@freebsd.org Wed Oct 14 23:55:28 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0534CA15274 for ; Wed, 14 Oct 2015 23:55:28 +0000 (UTC) (envelope-from ian@freebsd.org) Received: from pmta2.delivery6.ore.mailhop.org (pmta2.delivery6.ore.mailhop.org [54.200.129.228]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D85FA9AD for ; Wed, 14 Oct 2015 23:55:27 +0000 (UTC) (envelope-from ian@freebsd.org) Received: from ilsoft.org (unknown [73.34.117.227]) by outbound2.ore.mailhop.org (Halon Mail Gateway) with ESMTPSA; Wed, 14 Oct 2015 23:54:27 +0000 (UTC) Received: from rev (rev [172.22.42.240]) by ilsoft.org (8.14.9/8.14.9) with ESMTP id t9ENsIGV002107; Wed, 14 Oct 2015 17:54:18 -0600 (MDT) (envelope-from ian@freebsd.org) Message-ID: <1444866858.51093.3.camel@freebsd.org> Subject: Re: svn commit: r289336 - head/sys/mips/conf From: Ian Lepore To: Ed Maste , "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Date: Wed, 14 Oct 2015 17:54:18 -0600 In-Reply-To: References: <201510142110.t9ELA6wv001917@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 " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Oct 2015 23:55:28 -0000 On Wed, 2015-10-14 at 23:26 +0000, Ed Maste wrote: > On 14 October 2015 at 21:10, Ed Maste wrote: > > Author: emaste > > Date: Wed Oct 14 21:10:05 2015 > > New Revision: 289336 > > URL: https://svnweb.freebsd.org/changeset/base/289336 > > > > Log: > > Add Ubiquiti EdgeRouter Lite (ERL) kernel config file > > Because I've received a couple of private followups on this commit > I'll reply here to avoid the same discussion being spread across > multiple threads. > > There's a suggestion to have this config include OCTEON1 (on which > this is based) and then set a couple of ident/options. I didn't take > that approach here because OCTEON1 includes a whole bunch of devices > not relevant to the ERL, which has no PCI bus and doesn't support > AHCI, RAID controllers, PCI NICs, etc. In my opinion the device is > small enough that we don't want to bloat the kernel with devices that > cannot be used. To do so while still including OCTEON1 we'd end up > with a config file that's just about as long as this, full of > nodevice > / nooption lines. > > Perhaps it makes sense to pull some common parts out into a > MIPS.common (e.g. options, USB devices, etc.) and include that from > OCTEON1, ERL, and other MIPS configurations? > We did something like that recently for arm, with std.arm and std.armv6 files that have all the devices and options that are common to each of those architectures. -- Ian From owner-svn-src-all@freebsd.org Wed Oct 14 23:55:33 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C55EFA15297 for ; Wed, 14 Oct 2015 23:55:33 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from mail-ig0-f180.google.com (mail-ig0-f180.google.com [209.85.213.180]) (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 48DE8A34 for ; Wed, 14 Oct 2015 23:55:32 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: by igbkq10 with SMTP id kq10so125374827igb.0 for ; Wed, 14 Oct 2015 16:55:32 -0700 (PDT) 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=CWnUH24LyqYf8qHn26bD11yhlQSuaoqYmzoftk8vP6M=; b=kpms8Cm+xQvfZmsGxGjyJAXeyGE8EOm6KfkkAzFoW8j/8efXYWqxONWodwWtXbi9og d+SzE6xn9hDkEQLVhCsxp5sV0Q672EucleZO1QQxrUxhQwhanKuJT1Bl1RTKs/YrM0mT 5nKqdfg0YCy5kjDm3pQHt9cw8irzwuJEPa8wJ5aU58htxAsjjZS9K0kzRrJMx+/O+CQM avrxj8KprooMD0mlej9OgKAtIzYeSJu7m3MJqsMkrKR0hKNr6EikLaWIbIyxtV3Jjo/8 2gnik51vkwvuHdaaSsbqB8JUQp0twv2V8wMmqeCB6PsjMhNkoMxGapLu3hskStRgLmnK DQzQ== X-Gm-Message-State: ALoCoQnFH/UBz3fBD8mm0+q2aGjEhUHHSCUR+BKdtDcvC76wX+udYPP3uqCzBXaEnRbinVjUDiRa X-Received: by 10.50.73.201 with SMTP id n9mr29614899igv.47.1444866931771; Wed, 14 Oct 2015 16:55:31 -0700 (PDT) Received: from ?IPv6:2601:280:4900:3700:287f:6184:900a:6ea1? ([2601:280:4900:3700:287f:6184:900a:6ea1]) by smtp.gmail.com with ESMTPSA id f31sm4645661ioj.13.2015.10.14.16.55.30 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 14 Oct 2015 16:55:31 -0700 (PDT) Sender: Warner Losh Subject: Re: svn commit: r289336 - head/sys/mips/conf Mime-Version: 1.0 (Mac OS X Mail 8.2 \(2104\)) Content-Type: multipart/signed; boundary="Apple-Mail=_6CFBF72B-7842-4B1D-A96A-943499F80985"; protocol="application/pgp-signature"; micalg=pgp-sha512 X-Pgp-Agent: GPGMail 2.5.2 From: Warner Losh In-Reply-To: Date: Wed, 14 Oct 2015 17:55:29 -0600 Cc: Ed Maste , "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Message-Id: References: <201510142110.t9ELA6wv001917@repo.freebsd.org> To: Adrian Chadd 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 " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Oct 2015 23:55:33 -0000 --Apple-Mail=_6CFBF72B-7842-4B1D-A96A-943499F80985 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 std.oceton1 would follow the pattern. The whole _BASE stuff was a = reinvention of the pattern. I=E2=80=99ve been loathe to go in and clean it up, since = to do that properly would requiring rm -rf /usr/src/usr.sbin/config and starting over, and I = don=E2=80=99t have that kind of time... Warner > On Oct 14, 2015, at 5:52 PM, Adrian Chadd = wrote: >=20 > Yeah, look at what I did with AR71XX_BASE, AR933X_BASE, etc. Maybe > std.OCTEON1, etc.. >=20 >=20 > -a >=20 >=20 > On 14 October 2015 at 16:26, Ed Maste wrote: >> On 14 October 2015 at 21:10, Ed Maste wrote: >>> Author: emaste >>> Date: Wed Oct 14 21:10:05 2015 >>> New Revision: 289336 >>> URL: https://svnweb.freebsd.org/changeset/base/289336 >>>=20 >>> Log: >>> Add Ubiquiti EdgeRouter Lite (ERL) kernel config file >>=20 >> Because I've received a couple of private followups on this commit >> I'll reply here to avoid the same discussion being spread across >> multiple threads. >>=20 >> There's a suggestion to have this config include OCTEON1 (on which >> this is based) and then set a couple of ident/options. I didn't take >> that approach here because OCTEON1 includes a whole bunch of devices >> not relevant to the ERL, which has no PCI bus and doesn't support >> AHCI, RAID controllers, PCI NICs, etc. In my opinion the device is >> small enough that we don't want to bloat the kernel with devices that >> cannot be used. To do so while still including OCTEON1 we'd end up >> with a config file that's just about as long as this, full of = nodevice >> / nooption lines. >>=20 >> Perhaps it makes sense to pull some common parts out into a >> MIPS.common (e.g. options, USB devices, etc.) and include that from >> OCTEON1, ERL, and other MIPS configurations? >>=20 >=20 --Apple-Mail=_6CFBF72B-7842-4B1D-A96A-943499F80985 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 iQIcBAEBCgAGBQJWHutxAAoJEGwc0Sh9sBEAu+YQAOirMlkbk4uyDBgM0cwsPUms gysUaH3ozbzeED8dpS8dg3ljQKp3ebMnUxM3tjKA5tjMpp6YGcRtf5DcddZJYjZn fcVWqnLpu5UuK5Nn4vhetW4jvjrNURP7O79+6IV7kmOmwZfl+SqlI/PBFG6tNXet cdmIKnBs1KbyyUiSwWEE0gJl4+m5xam4SrBw3P2U3/Vgd7bvQcM0efcfxM+ShTic Z2VA6Qe+yDBuc3k89lm+Fkyu1x8h2JZ0NUMb1gNVqmD0rcEfx6wShGjVA2RdWBzD b0trXIU1Ya1fp3STlHeefqsMV50IPLPjU/uu3UNxPOLQHCi886H0N7SlsAZjd9a8 qma1rV8yAAokSe1bViohjkY2hC6pOrQWLPDfpISSSWMf+SfDtVuzF9GYsmgg2+MW d2VMSk5ZhXjDD4DuNXuKxVKlTGYMC0Av6TWAtVOrrBMUKFYkJMyZCdFKR7kO2WsK wrTXr+Nko0zw7mQH/wamBcCvmEDMt7qcajDUWI+XqFjQQMmLk3ZVK58v501p24zG Eseu20GSXIWJFD2jJpXmpm4icknKwHeB7b5lwKQu0XvO5kdPMuU0/08DPX6H/4sJ /puvPv/wmfwItGAfUC+Hv4UDdUMZcxNxaiE2HJIFbCBEGcF4Zk1Y/x4uOKCVvYXu Xm5ZVTUIQDwuqUzFH4ob =Cg6Q -----END PGP SIGNATURE----- --Apple-Mail=_6CFBF72B-7842-4B1D-A96A-943499F80985-- From owner-svn-src-all@freebsd.org Thu Oct 15 00:06:30 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2F6E3A157A9; Thu, 15 Oct 2015 00:06:30 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: from mail-ig0-x230.google.com (mail-ig0-x230.google.com [IPv6:2607:f8b0:4001:c05::230]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id EDE661252; Thu, 15 Oct 2015 00:06:29 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: by igbdj2 with SMTP id dj2so433337igb.1; Wed, 14 Oct 2015 17:06:29 -0700 (PDT) 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:content-transfer-encoding; bh=hi9a8miCy6a5zaR04HrCRxe4btAtUEruzDZ5AgWpxeQ=; b=aUVlgHnK7V+fohScR/q8KvoK9/POUgH6aIOjeAZk+hzs5iRK21DfSgnTijFShKid59 0Z8p+9sdYt/VDM2CaHW1UWOxC6rPbaifdiyGjDyNmG6LVdhNouq1Ofw+WKLH2fhuDvix u1v4is7dCoY9X88Rpg6uoQVpq/d5DGMQ0BCr9tDSXB3URqb73Xrtmb2yAr8oijB7Toio 1WwLX5rJJev3srO5BGpWXT4gfWtevSTiqey50bRXU1qkbJWRwrjXljnmPvBguq1S2Qo4 V4RDoqTEFsM4kN2Hs+OY5otxbWPeHXBvfCQSaQB8exGUgLkB+kqgcTSHMtANWTVA3Urg qGjw== MIME-Version: 1.0 X-Received: by 10.50.111.226 with SMTP id il2mr16263858igb.61.1444867589521; Wed, 14 Oct 2015 17:06:29 -0700 (PDT) Received: by 10.36.46.66 with HTTP; Wed, 14 Oct 2015 17:06:29 -0700 (PDT) In-Reply-To: References: <201510142110.t9ELA6wv001917@repo.freebsd.org> Date: Wed, 14 Oct 2015 17:06:29 -0700 Message-ID: Subject: Re: svn commit: r289336 - head/sys/mips/conf From: Adrian Chadd To: Warner Losh Cc: Ed Maste , "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 " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Oct 2015 00:06:30 -0000 On 14 October 2015 at 16:55, Warner Losh wrote: > std.oceton1 would follow the pattern. The whole _BASE stuff was a reinven= tion > of the pattern. I=E2=80=99ve been loathe to go in and clean it up, since = to do that properly > would requiring rm -rf /usr/src/usr.sbin/config and starting over, and I = don=E2=80=99t have > that kind of time... What can I say, I was young and stupid and needed the money. I'll go migrate those _BASE files to std.ARxxxx at some point soon. Thanks, -a From owner-svn-src-all@freebsd.org Thu Oct 15 01:09:16 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 02FCEA1243A; Thu, 15 Oct 2015 01:09:16 +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 ABA7B1E97; Thu, 15 Oct 2015 01:09:15 +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 t9F19ENF078640; Thu, 15 Oct 2015 01:09:14 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9F19EZ9078636; Thu, 15 Oct 2015 01:09:14 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201510150109.t9F19EZ9078636@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Thu, 15 Oct 2015 01:09:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289349 - head/usr.bin/mkimg X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Oct 2015 01:09:16 -0000 Author: emaste Date: Thu Oct 15 01:09:14 2015 New Revision: 289349 URL: https://svnweb.freebsd.org/changeset/base/289349 Log: mkimg: support fat16b partitions (MBR type 06h) Reviewed by: marcel Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D3894 Modified: head/usr.bin/mkimg/ebr.c head/usr.bin/mkimg/mbr.c head/usr.bin/mkimg/scheme.c head/usr.bin/mkimg/scheme.h Modified: head/usr.bin/mkimg/ebr.c ============================================================================== --- head/usr.bin/mkimg/ebr.c Wed Oct 14 23:48:16 2015 (r289348) +++ head/usr.bin/mkimg/ebr.c Thu Oct 15 01:09:14 2015 (r289349) @@ -39,11 +39,15 @@ __FBSDID("$FreeBSD$"); #include "mkimg.h" #include "scheme.h" +#ifndef DOSPTYP_FAT16B +#define DOSPTYP_FAT16B 0x06 +#endif #ifndef DOSPTYP_FAT32 #define DOSPTYP_FAT32 0x0b #endif static struct mkimg_alias ebr_aliases[] = { + { ALIAS_FAT16B, ALIAS_INT2TYPE(DOSPTYP_FAT16B) }, { ALIAS_FAT32, ALIAS_INT2TYPE(DOSPTYP_FAT32) }, { ALIAS_FREEBSD, ALIAS_INT2TYPE(DOSPTYP_386BSD) }, { ALIAS_NONE, 0 } Modified: head/usr.bin/mkimg/mbr.c ============================================================================== --- head/usr.bin/mkimg/mbr.c Wed Oct 14 23:48:16 2015 (r289348) +++ head/usr.bin/mkimg/mbr.c Thu Oct 15 01:09:14 2015 (r289349) @@ -39,6 +39,9 @@ __FBSDID("$FreeBSD$"); #include "mkimg.h" #include "scheme.h" +#ifndef DOSPTYP_FAT16B +#define DOSPTYP_FAT16B 0x06 +#endif #ifndef DOSPTYP_FAT32 #define DOSPTYP_FAT32 0x0b #endif @@ -49,6 +52,7 @@ __FBSDID("$FreeBSD$"); static struct mkimg_alias mbr_aliases[] = { { ALIAS_EBR, ALIAS_INT2TYPE(DOSPTYP_EXT) }, { ALIAS_EFI, ALIAS_INT2TYPE(DOSPTYP_EFI) }, + { ALIAS_FAT16B, ALIAS_INT2TYPE(DOSPTYP_FAT16B) }, { ALIAS_FAT32, ALIAS_INT2TYPE(DOSPTYP_FAT32) }, { ALIAS_FREEBSD, ALIAS_INT2TYPE(DOSPTYP_386BSD) }, { ALIAS_NTFS, ALIAS_INT2TYPE(DOSPTYP_NTFS) }, Modified: head/usr.bin/mkimg/scheme.c ============================================================================== --- head/usr.bin/mkimg/scheme.c Wed Oct 14 23:48:16 2015 (r289348) +++ head/usr.bin/mkimg/scheme.c Thu Oct 15 01:09:14 2015 (r289349) @@ -50,6 +50,7 @@ static struct { } scheme_alias[] = { { "ebr", ALIAS_EBR }, { "efi", ALIAS_EFI }, + { "fat16b", ALIAS_FAT16B }, { "fat32", ALIAS_FAT32 }, { "freebsd", ALIAS_FREEBSD }, { "freebsd-boot", ALIAS_FREEBSD_BOOT }, Modified: head/usr.bin/mkimg/scheme.h ============================================================================== --- head/usr.bin/mkimg/scheme.h Wed Oct 14 23:48:16 2015 (r289348) +++ head/usr.bin/mkimg/scheme.h Thu Oct 15 01:09:14 2015 (r289349) @@ -36,6 +36,7 @@ enum alias { /* start */ ALIAS_EBR, ALIAS_EFI, + ALIAS_FAT16B, ALIAS_FAT32, ALIAS_FREEBSD, ALIAS_FREEBSD_BOOT, From owner-svn-src-all@freebsd.org Thu Oct 15 01:44:33 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7A639A12E48; Thu, 15 Oct 2015 01:44:33 +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 3F80B1CE3; Thu, 15 Oct 2015 01:44:33 +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 t9F1iWNN089947; Thu, 15 Oct 2015 01:44:32 GMT (envelope-from bz@FreeBSD.org) Received: (from bz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9F1iWdo089946; Thu, 15 Oct 2015 01:44:32 GMT (envelope-from bz@FreeBSD.org) Message-Id: <201510150144.t9F1iWdo089946@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bz set sender to bz@FreeBSD.org using -f From: "Bjoern A. Zeeb" Date: Thu, 15 Oct 2015 01:44:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289350 - 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 " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Oct 2015 01:44:33 -0000 Author: bz Date: Thu Oct 15 01:44:32 2015 New Revision: 289350 URL: https://svnweb.freebsd.org/changeset/base/289350 Log: Hopefully also unbreak VIMAGE kernels replacing the &V_... with &VNET_NAME(...). Everything else is just a whitespace wrapping change. Modified: head/sys/netinet/tcp_pcap.c Modified: head/sys/netinet/tcp_pcap.c ============================================================================== --- head/sys/netinet/tcp_pcap.c Thu Oct 15 01:09:14 2015 (r289349) +++ head/sys/netinet/tcp_pcap.c Thu Oct 15 01:44:32 2015 (r289350) @@ -70,9 +70,9 @@ SYSCTL_INT(_net_inet_tcp, OID_AUTO, tcp_ VNET_DEFINE(int, tcp_pcap_packets) = 0; #define V_tcp_pcap_packets VNET(tcp_pcap_packets) -SYSCTL_INT(_net_inet_tcp, OID_AUTO, tcp_pcap_packets, CTLFLAG_RW, - &V_tcp_pcap_packets, 0, "Default number of packets saved per direction " - "per TCPCB"); +SYSCTL_INT(_net_inet_tcp, OID_AUTO, tcp_pcap_packets, + CTLFLAG_RW, &VNET_NAME(tcp_pcap_packets), 0, + "Default number of packets saved per direction per TCPCB"); /* Initialize the values. */ static void From owner-svn-src-all@freebsd.org Thu Oct 15 01:46:56 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B0787A12F50; Thu, 15 Oct 2015 01:46:56 +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 62EBB1E7B; Thu, 15 Oct 2015 01:46:56 +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 t9F1kt6q090086; Thu, 15 Oct 2015 01:46:55 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9F1ktJJ090083; Thu, 15 Oct 2015 01:46:55 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201510150146.t9F1ktJJ090083@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Thu, 15 Oct 2015 01:46:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289351 - in head: . etc etc/mtree X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Oct 2015 01:46:56 -0000 Author: emaste Date: Thu Oct 15 01:46:55 2015 New Revision: 289351 URL: https://svnweb.freebsd.org/changeset/base/289351 Log: Create /usr/tests *.debug file directory hierarchy Reviewed by: bdrewery, ngie Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D3896 Modified: head/Makefile.inc1 head/etc/Makefile head/etc/mtree/BSD.debug.dist Modified: head/Makefile.inc1 ============================================================================== --- head/Makefile.inc1 Thu Oct 15 01:44:32 2015 (r289350) +++ head/Makefile.inc1 Thu Oct 15 01:46:55 2015 (r289351) @@ -557,6 +557,10 @@ _worldtmp: mkdir -p ${WORLDTMP}${TESTSBASE} mtree -deU -f ${.CURDIR}/etc/mtree/BSD.tests.dist \ -p ${WORLDTMP}${TESTSBASE} >/dev/null +.if ${MK_DEBUG_FILES} != "no" + mtree -deU -f ${.CURDIR}/etc/mtree/BSD.tests.dist \ + -p ${WORLDTMP}/usr/lib/debug/${TESTSBASE} >/dev/null +.endif .endif .for _mtree in ${LOCAL_MTREE} mtree -deU -f ${.CURDIR}/${_mtree} -p ${WORLDTMP} > /dev/null @@ -892,6 +896,10 @@ distributeworld installworld: _installch -mkdir -p ${DESTDIR}/${DISTDIR}/${dist}${TESTSBASE} mtree -deU -f ${.CURDIR}/etc/mtree/BSD.tests.dist \ -p ${DESTDIR}/${DISTDIR}/${dist}${TESTSBASE} >/dev/null +.if ${MK_DEBUG_FILES} != "no" + mtree -deU -f ${.CURDIR}/etc/mtree/BSD.tests.dist \ + -p ${DESTDIR}/${DISTDIR}/${dist}/usr/lib/debug/${TESTSBASE} >/dev/null +.endif .endif .if defined(NO_ROOT) ${IMAKEENV} mtree -C -f ${.CURDIR}/etc/mtree/BSD.root.dist | \ Modified: head/etc/Makefile ============================================================================== --- head/etc/Makefile Thu Oct 15 01:44:32 2015 (r289350) +++ head/etc/Makefile Thu Oct 15 01:46:55 2015 (r289351) @@ -343,6 +343,7 @@ MTREES+= mtree/BSD.groff.dist /usr .endif .if ${MK_TESTS} != "no" MTREES+= mtree/BSD.tests.dist ${TESTSBASE} +MTREES+= mtree/BSD.tests.dist /usr/lib/debug/${TESTSBASE} .endif .if ${MK_SENDMAIL} != "no" MTREES+= mtree/BSD.sendmail.dist / Modified: head/etc/mtree/BSD.debug.dist ============================================================================== --- head/etc/mtree/BSD.debug.dist Thu Oct 15 01:44:32 2015 (r289350) +++ head/etc/mtree/BSD.debug.dist Thu Oct 15 01:46:55 2015 (r289351) @@ -61,6 +61,8 @@ .. sbin .. + tests + .. .. .. .. From owner-svn-src-all@freebsd.org Thu Oct 15 01:48:54 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 58579A12FD6; Thu, 15 Oct 2015 01:48:54 +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 22AE21FFE; Thu, 15 Oct 2015 01:48:54 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t9F1mrnG090191; Thu, 15 Oct 2015 01:48:53 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9F1mrAV090190; Thu, 15 Oct 2015 01:48:53 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201510150148.t9F1mrAV090190@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Thu, 15 Oct 2015 01:48:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289352 - head/usr.sbin/freebsd-update X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Oct 2015 01:48:54 -0000 Author: emaste Date: Thu Oct 15 01:48:52 2015 New Revision: 289352 URL: https://svnweb.freebsd.org/changeset/base/289352 Log: Add debug file extension to freebsd-update(8) after r288176 Reviewed by: delphij Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D3784 Modified: head/usr.sbin/freebsd-update/freebsd-update.sh Modified: head/usr.sbin/freebsd-update/freebsd-update.sh ============================================================================== --- head/usr.sbin/freebsd-update/freebsd-update.sh Thu Oct 15 01:46:55 2015 (r289351) +++ head/usr.sbin/freebsd-update/freebsd-update.sh Thu Oct 15 01:48:52 2015 (r289352) @@ -2736,7 +2736,7 @@ backup_kernel () { if [ $BACKUPKERNELSYMBOLFILES = yes ]; then FINDFILTER="" else - FINDFILTER=-"a ! -name *.symbols" + FINDFILTER="-a ! -name *.debug -a ! -name *.symbols" fi # Backup all the kernel files using hardlinks. From owner-svn-src-all@freebsd.org Thu Oct 15 01:51:11 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id ECC57A13104; Thu, 15 Oct 2015 01:51:11 +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 B7F53126D; Thu, 15 Oct 2015 01:51:11 +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 t9F1pAl6092229; Thu, 15 Oct 2015 01:51:10 GMT (envelope-from bz@FreeBSD.org) Received: (from bz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9F1pAYR092228; Thu, 15 Oct 2015 01:51:10 GMT (envelope-from bz@FreeBSD.org) Message-Id: <201510150151.t9F1pAYR092228@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bz set sender to bz@FreeBSD.org using -f From: "Bjoern A. Zeeb" Date: Thu, 15 Oct 2015 01:51:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289353 - 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 " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Oct 2015 01:51:12 -0000 Author: bz Date: Thu Oct 15 01:51:10 2015 New Revision: 289353 URL: https://svnweb.freebsd.org/changeset/base/289353 Log: 2nd try, after r289319: HWPMC depends on pmu.c even if device pmu is not specified. Would be great if we could just automatically enabled "device pmu" if we try to compile in HWPMC. Also several old kernel cnfigurations seem to have HWPMC enabled but are pre-FDT and thus fail. So make pmu.c depend on fdt in case of hwpmc as well. MFC after: 2 weeks Sponsored by: DARPA/AFRL Differential Revision: https://reviews.freebsd.org/D3877 Modified: head/sys/conf/files.arm Modified: head/sys/conf/files.arm ============================================================================== --- head/sys/conf/files.arm Thu Oct 15 01:48:52 2015 (r289352) +++ head/sys/conf/files.arm Thu Oct 15 01:51:10 2015 (r289353) @@ -56,7 +56,7 @@ arm/arm/platform_if.m optional platform arm/arm/pmap.c optional !armv6 arm/arm/pmap-v6.c optional armv6 !arm_new_pmap arm/arm/pmap-v6-new.c optional armv6 arm_new_pmap -arm/arm/pmu.c optional pmu +arm/arm/pmu.c optional pmu | fdt hwpmc arm/arm/sc_machdep.c optional sc arm/arm/setcpsr.S standard arm/arm/setstack.s standard From owner-svn-src-all@freebsd.org Thu Oct 15 01:56:41 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 122A9A13338; Thu, 15 Oct 2015 01:56:41 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from mx1.sbone.de (bird.sbone.de [46.4.1.90]) (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 C217E1616; Thu, 15 Oct 2015 01:56:39 +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 3992C25D3A71; Thu, 15 Oct 2015 01:56:30 +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 8886FC77038; Thu, 15 Oct 2015 01:56:29 +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 Xy9sI3nKv-X0; Thu, 15 Oct 2015 01:56:28 +0000 (UTC) Received: from [IPv6:fde9:577b:c1a9:4410:2834:7eb9:d092:18fa] (unknown [IPv6:fde9:577b:c1a9:4410:2834:7eb9:d092:18fa]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.sbone.de (Postfix) with ESMTPSA id 84E6FC76FD8; Thu, 15 Oct 2015 01:56:27 +0000 (UTC) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 8.2 \(2104\)) Subject: Re: svn commit: r289353 - head/sys/conf From: "Bjoern A. Zeeb" In-Reply-To: <201510150151.t9F1pAYR092228@repo.freebsd.org> Date: Thu, 15 Oct 2015 01:56:21 +0000 Content-Transfer-Encoding: quoted-printable Message-Id: References: <201510150151.t9F1pAYR092228@repo.freebsd.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@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 " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Oct 2015 01:56:41 -0000 > On 15 Oct 2015, at 01:51 , Bjoern A. Zeeb wrote: >=20 > Author: bz > Date: Thu Oct 15 01:51:10 2015 > New Revision: 289353 > URL: https://svnweb.freebsd.org/changeset/base/289353 >=20 > Log: > 2nd try, after r289319: >=20 > HWPMC depends on pmu.c even if device pmu is not specified. > Would be great if we could just automatically enabled "device pmu" > if we try to compile in HWPMC. >=20 > Also several old kernel cnfigurations seem to have HWPMC enabled but = are > pre-FDT and thus fail. So make pmu.c depend on fdt in case of hwpmc = as > well. Suggested by: ian > MFC after: 2 weeks > Sponsored by: DARPA/AFRL > Differential Revision: https://reviews.freebsd.org/D3877 >=20 > Modified: > head/sys/conf/files.arm >=20 > Modified: head/sys/conf/files.arm > = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D > --- head/sys/conf/files.arm Thu Oct 15 01:48:52 2015 = (r289352) > +++ head/sys/conf/files.arm Thu Oct 15 01:51:10 2015 = (r289353) > @@ -56,7 +56,7 @@ arm/arm/platform_if.m optional = platform > arm/arm/pmap.c optional !armv6 > arm/arm/pmap-v6.c optional armv6 !arm_new_pmap > arm/arm/pmap-v6-new.c optional armv6 arm_new_pmap > -arm/arm/pmu.c optional pmu > +arm/arm/pmu.c optional pmu | fdt hwpmc > arm/arm/sc_machdep.c optional sc > arm/arm/setcpsr.S standard > arm/arm/setstack.s standard From owner-svn-src-all@freebsd.org Thu Oct 15 02:52:32 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0BF2CA152D8; Thu, 15 Oct 2015 02:52:32 +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 CC5631FD9; Thu, 15 Oct 2015 02:52:31 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t9F2qUjW010224; Thu, 15 Oct 2015 02:52:30 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9F2qU2k010223; Thu, 15 Oct 2015 02:52:30 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201510150252.t9F2qU2k010223@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Thu, 15 Oct 2015 02:52:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289355 - 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 " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Oct 2015 02:52:32 -0000 Author: emaste Date: Thu Oct 15 02:52:30 2015 New Revision: 289355 URL: https://svnweb.freebsd.org/changeset/base/289355 Log: /usr/tests is part of the base system (for *.debug files) Sponsored by: The FreeBSD Foundation Modified: head/share/mk/bsd.prog.mk Modified: head/share/mk/bsd.prog.mk ============================================================================== --- head/share/mk/bsd.prog.mk Thu Oct 15 02:27:16 2015 (r289354) +++ head/share/mk/bsd.prog.mk Thu Oct 15 02:52:30 2015 (r289355) @@ -58,7 +58,7 @@ PROG_FULL=${PROG}.full ${BINDIR} == "/bin" ||\ ${BINDIR:C%/libexec(/.*)?%/libexec%} == "/libexec" ||\ ${BINDIR} == "/sbin" ||\ - ${BINDIR:C%/usr/(bin|bsdinstall|libexec|lpr|sendmail|sm.bin|sbin)(/.*)?%/usr/bin%} == "/usr/bin"\ + ${BINDIR:C%/usr/(bin|bsdinstall|libexec|lpr|sendmail|sm.bin|sbin|tests)(/.*)?%/usr/bin%} == "/usr/bin"\ ) DEBUGFILEDIR= ${DEBUGDIR}${BINDIR} .else From owner-svn-src-all@freebsd.org Thu Oct 15 03:25:38 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id EC348A15B82; Thu, 15 Oct 2015 03:25:38 +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 D94811554; Thu, 15 Oct 2015 03:25:38 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from mail.xzibition.com (localhost [IPv6:::1]) by freefall.freebsd.org (Postfix) with ESMTP id D22891733; Thu, 15 Oct 2015 03:25:38 +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 82119F9CE; Thu, 15 Oct 2015 03:25:38 +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 3bllotaEVJdz; Thu, 15 Oct 2015 03:25:36 +0000 (UTC) Subject: Re: svn commit: r289355 - head/share/mk DKIM-Filter: OpenDKIM Filter v2.9.2 mail.xzibition.com AD908F9C8 To: Ed Maste , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201510150252.t9F2qU2k010223@repo.freebsd.org> From: Bryan Drewery Organization: FreeBSD Message-ID: <561F1CAD.402@FreeBSD.org> Date: Wed, 14 Oct 2015 20:25:33 -0700 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.11; rv:38.0) Gecko/20100101 Thunderbird/38.3.0 MIME-Version: 1.0 In-Reply-To: <201510150252.t9F2qU2k010223@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 " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Oct 2015 03:25:39 -0000 On 10/14/15 7:52 PM, Ed Maste wrote: > Author: emaste > Date: Thu Oct 15 02:52:30 2015 > New Revision: 289355 > URL: https://svnweb.freebsd.org/changeset/base/289355 > > Log: > /usr/tests is part of the base system (for *.debug files) > > Sponsored by: The FreeBSD Foundation > > Modified: > head/share/mk/bsd.prog.mk > > Modified: head/share/mk/bsd.prog.mk > ============================================================================== > --- head/share/mk/bsd.prog.mk Thu Oct 15 02:27:16 2015 (r289354) > +++ head/share/mk/bsd.prog.mk Thu Oct 15 02:52:30 2015 (r289355) > @@ -58,7 +58,7 @@ PROG_FULL=${PROG}.full > ${BINDIR} == "/bin" ||\ > ${BINDIR:C%/libexec(/.*)?%/libexec%} == "/libexec" ||\ > ${BINDIR} == "/sbin" ||\ > - ${BINDIR:C%/usr/(bin|bsdinstall|libexec|lpr|sendmail|sm.bin|sbin)(/.*)?%/usr/bin%} == "/usr/bin"\ > + ${BINDIR:C%/usr/(bin|bsdinstall|libexec|lpr|sendmail|sm.bin|sbin|tests)(/.*)?%/usr/bin%} == "/usr/bin"\ > ) > DEBUGFILEDIR= ${DEBUGDIR}${BINDIR} > .else > Thanks for this. I realized this technically needs support in 'make delete-old'. Yay huge list. -- Regards, Bryan Drewery From owner-svn-src-all@freebsd.org Thu Oct 15 03:48:04 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A07B0A15F7E; Thu, 15 Oct 2015 03:48:04 +0000 (UTC) (envelope-from cperciva@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 59C511E3A; Thu, 15 Oct 2015 03:48:04 +0000 (UTC) (envelope-from cperciva@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t9F3m3Ow025660; Thu, 15 Oct 2015 03:48:03 GMT (envelope-from cperciva@FreeBSD.org) Received: (from cperciva@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9F3m3D5025659; Thu, 15 Oct 2015 03:48:03 GMT (envelope-from cperciva@FreeBSD.org) Message-Id: <201510150348.t9F3m3D5025659@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cperciva set sender to cperciva@FreeBSD.org using -f From: Colin Percival Date: Thu, 15 Oct 2015 03:48: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: r289358 - stable/10/sys/boot/i386/gptboot 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 " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Oct 2015 03:48:04 -0000 Author: cperciva Date: Thu Oct 15 03:48:03 2015 New Revision: 289358 URL: https://svnweb.freebsd.org/changeset/base/289358 Log: MFC 289031: Teach gptldr to handle >64k boot2. Modified: stable/10/sys/boot/i386/gptboot/gptldr.S Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/boot/i386/gptboot/gptldr.S ============================================================================== --- stable/10/sys/boot/i386/gptboot/gptldr.S Thu Oct 15 03:12:19 2015 (r289357) +++ stable/10/sys/boot/i386/gptboot/gptldr.S Thu Oct 15 03:48:03 2015 (r289358) @@ -45,6 +45,10 @@ /* Misc. Constants */ .set SIZ_PAG,0x1000 # Page size .set SIZ_SEC,0x200 # Sector size + .set COPY_BLKS,0x4 # Number of blocks + # to copy for boot2 + .set COPY_BLK_SZ,0x8000 # Copy in 32k blocks; must be + # a multiple of 16 bytes .globl start .code16 @@ -68,26 +72,39 @@ start: xor %cx,%cx # Zero * its header to find boot2. We need to copy boot2 to MEM_USR and BTX * to MEM_BTX. Since those might overlap, we have to copy boot2 * backwards first and then copy BTX. We aren't sure exactly how long - * boot2 is, but we assume it can't be longer than 64k, so we just always - * copy 64k. + * boot2 is, but it's currently under 128kB so we'll copy 4 blocks of 32kB + * each; this can be adjusted via COPY_BLK and COPY_BLK_SZ above. */ mov $end,%bx # BTX mov 0xa(%bx),%si # Get BTX length and set add %bx,%si # %si to start of boot2 - mov %si,%ax # Align %ds:%si on a - shr $4,%ax # paragraph boundary - and $0xf,%si # with the smallest - mov %ax,%ds # possible %si - add $(64 * 1024 - 16),%si - mov $MEM_USR/16,%ax # Point %es:%di at end of - mov $(64 * 1024 - 16),%di # largest boot2 range + dec %si # Set %ds:%si to point at the + mov %si,%ax # last byte we want to copy + shr $4,%ax # from boot2, with %si made as + add $(COPY_BLKS*COPY_BLK_SZ/16),%ax # small as possible. + and $0xf,%si # + mov %ax,%ds # + mov $MEM_USR/16,%ax # Set %es:(-1) to point at + add $(COPY_BLKS*COPY_BLK_SZ/16),%ax # the last byte we + mov %ax,%es # want to copy boot2 into. + mov $COPY_BLKS,%bx # Copy COPY_BLKS 32k blocks +copyloop: + add $COPY_BLK_SZ,%si # Adjust %ds:%si to point at + mov %ds,%ax # the end of the next 32k to + sub $COPY_BLK_SZ/16,%ax # copy from boot2 + mov %ax,%ds + mov $COPY_BLK_SZ-1,%di # Adjust %es:%di to point at + mov %es,%ax # the end of the next 32k into + sub $COPY_BLK_SZ/16,%ax # which we want boot2 copied mov %ax,%es + mov $COPY_BLK_SZ,%cx # Copy 32k std - mov %di,%cx # Copy 64k - paragraph + 1 - inc %cx # bytes rep movsb + dec %bx + jnz copyloop mov %cx,%ds # Reset %ds and %es mov %cx,%es + mov $end,%bx # BTX mov 0xa(%bx),%cx # Get BTX length and set mov %bx,%si # %si to end of BTX mov $MEM_BTX,%di # %di -> end of BTX at From owner-svn-src-all@freebsd.org Thu Oct 15 04:22:58 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id F2696A15861; Thu, 15 Oct 2015 04:22:57 +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 C7221DB9; Thu, 15 Oct 2015 04:22:57 +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 t9F4MusB037060; Thu, 15 Oct 2015 04:22:56 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9F4MurD037057; Thu, 15 Oct 2015 04:22:56 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201510150422.t9F4MurD037057@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Thu, 15 Oct 2015 04:22:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289359 - head/sys/dev/sdhci X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Oct 2015 04:22:58 -0000 Author: adrian Date: Thu Oct 15 04:22:56 2015 New Revision: 289359 URL: https://svnweb.freebsd.org/changeset/base/289359 Log: Add support for the BCM57765 card reader. This patch adds support for the BCM57765[2] card reader function included in Broadcom's BCM57766 ethernet/sd3.0 controller. This controller is commonly found in laptops and Apple hardware (MBP, iMac, etc). The BCM57765 chipset is almost fully compatible with the SD3.0 spec, but does not support deriving a frequency below 781KHz from its default base clock via the standard SD3.0-configured 10-bit clock divisor. If such a divisor is set, card identification (which requires a 400KHz clock frequency) will time out[1]. As a work-around, I've made use of an undocumented device-specific clock control register to switch the controller to a 63MHz clock source when targeting clock speeds below 781KHz; the clock source is likewise switched back to the 200MHz clock when targeting speeds greater than 781KHz. Additionally, this patch fixes a small sdhci_pci bug; the sdhci_pci_softc->quirks flag was not copied to the sdhci_slot, resulting in `quirk` behavior not being applied by sdhci.c. [1] A number of Linux/FreeBSD users have noted that bringing up the chipsets' associated ethernet interface will allow SD cards to enumerate (slowly). This is a controller implementation side-effect triggered by the ethernet driver's reading of the hardware statistics registers. [2] This may also fix card detection when using the BCM57785 chipset, but I don't have access to the BCM57785 chipset and can't verify. I actually snagged some BCM57785 hardware recently (2012 Retina MacBook Pro) and can confirm that this also fixes card enumeration with the BCM57785 chipset; with the patch, I can boot off of the internal sdcard reader. PR: kern/203385 Submitted by: Landon Fuller Modified: head/sys/dev/sdhci/sdhci.c head/sys/dev/sdhci/sdhci.h head/sys/dev/sdhci/sdhci_pci.c Modified: head/sys/dev/sdhci/sdhci.c ============================================================================== --- head/sys/dev/sdhci/sdhci.c Thu Oct 15 03:48:03 2015 (r289358) +++ head/sys/dev/sdhci/sdhci.c Thu Oct 15 04:22:56 2015 (r289359) @@ -89,6 +89,19 @@ static void sdhci_card_task(void *, int) #define SDHCI_200_MAX_DIVIDER 256 #define SDHCI_300_MAX_DIVIDER 2046 +/* + * Broadcom BCM577xx Controller Constants + */ +#define BCM577XX_DEFAULT_MAX_DIVIDER 256 /* Maximum divider supported by the default clock source. */ +#define BCM577XX_ALT_CLOCK_BASE 63000000 /* Alternative clock's base frequency. */ + +#define BCM577XX_HOST_CONTROL 0x198 +#define BCM577XX_CTRL_CLKSEL_MASK 0xFFFFCFFF +#define BCM577XX_CTRL_CLKSEL_SHIFT 12 +#define BCM577XX_CTRL_CLKSEL_DEFAULT 0x0 +#define BCM577XX_CTRL_CLKSEL_64MHZ 0x3 + + static void sdhci_getaddr(void *arg, bus_dma_segment_t *segs, int nsegs, int error) { @@ -228,6 +241,8 @@ sdhci_init(struct sdhci_slot *slot) static void sdhci_set_clock(struct sdhci_slot *slot, uint32_t clock) { + uint32_t clk_base; + uint32_t clk_sel; uint32_t res; uint16_t clk; uint16_t div; @@ -243,6 +258,22 @@ sdhci_set_clock(struct sdhci_slot *slot, /* If no clock requested - left it so. */ if (clock == 0) return; + + /* Determine the clock base frequency */ + clk_base = slot->max_clk; + if (slot->quirks & SDHCI_QUIRK_BCM577XX_400KHZ_CLKSRC) { + clk_sel = RD2(slot, BCM577XX_HOST_CONTROL) & BCM577XX_CTRL_CLKSEL_MASK; + + /* Select clock source appropriate for the requested frequency. */ + if ((clk_base / BCM577XX_DEFAULT_MAX_DIVIDER) > clock) { + clk_base = BCM577XX_ALT_CLOCK_BASE; + clk_sel |= (BCM577XX_CTRL_CLKSEL_64MHZ << BCM577XX_CTRL_CLKSEL_SHIFT); + } else { + clk_sel |= (BCM577XX_CTRL_CLKSEL_DEFAULT << BCM577XX_CTRL_CLKSEL_SHIFT); + } + + WR2(slot, BCM577XX_HOST_CONTROL, clk_sel); + } /* Recalculate timeout clock frequency based on the new sd clock. */ if (slot->quirks & SDHCI_QUIRK_DATA_TIMEOUT_USES_SDCLK) @@ -250,7 +281,7 @@ sdhci_set_clock(struct sdhci_slot *slot, if (slot->version < SDHCI_SPEC_300) { /* Looking for highest freq <= clock. */ - res = slot->max_clk; + res = clk_base; for (div = 1; div < SDHCI_200_MAX_DIVIDER; div <<= 1) { if (res <= clock) break; @@ -261,11 +292,11 @@ sdhci_set_clock(struct sdhci_slot *slot, } else { /* Version 3.0 divisors are multiples of two up to 1023*2 */ - if (clock >= slot->max_clk) + if (clock >= clk_base) div = 0; else { for (div = 2; div < SDHCI_300_MAX_DIVIDER; div += 2) { - if ((slot->max_clk / div) <= clock) + if ((clk_base / div) <= clock) break; } } @@ -273,8 +304,8 @@ sdhci_set_clock(struct sdhci_slot *slot, } if (bootverbose || sdhci_debug) - slot_printf(slot, "Divider %d for freq %d (max %d)\n", - div, clock, slot->max_clk); + slot_printf(slot, "Divider %d for freq %d (base %d)\n", + div, clock, clk_base); /* Now we have got divider, set it. */ clk = (div & SDHCI_DIVIDER_MASK) << SDHCI_DIVIDER_SHIFT; Modified: head/sys/dev/sdhci/sdhci.h ============================================================================== --- head/sys/dev/sdhci/sdhci.h Thu Oct 15 03:48:03 2015 (r289358) +++ head/sys/dev/sdhci/sdhci.h Thu Oct 15 04:22:56 2015 (r289359) @@ -63,6 +63,8 @@ #define SDHCI_QUIRK_WAITFOR_RESET_ASSERTED (1<<14) /* Leave controller in standard mode when putting card in HS mode. */ #define SDHCI_QUIRK_DONT_SET_HISPD_BIT (1<<15) +/* Alternate clock source is required when supplying a 400 KHz clock. */ +#define SDHCI_QUIRK_BCM577XX_400KHZ_CLKSRC (1<<16) /* * Controller registers Modified: head/sys/dev/sdhci/sdhci_pci.c ============================================================================== --- head/sys/dev/sdhci/sdhci_pci.c Thu Oct 15 03:48:03 2015 (r289358) +++ head/sys/dev/sdhci/sdhci_pci.c Thu Oct 15 04:22:56 2015 (r289359) @@ -105,6 +105,8 @@ static const struct sdhci_device { { 0x2381197B, 0xffff, "JMicron JMB38X SD", SDHCI_QUIRK_32BIT_DMA_SIZE | SDHCI_QUIRK_RESET_AFTER_REQUEST }, + { 0x16bc14e4, 0xffff, "Broadcom BCM577xx SDXC/MMC Card Reader", + SDHCI_QUIRK_BCM577XX_400KHZ_CLKSRC }, { 0, 0xffff, NULL, 0 } }; @@ -334,6 +336,8 @@ sdhci_pci_attach(device_t dev) device_printf(dev, "Can't allocate memory for slot %d\n", i); continue; } + + slot->quirks = sc->quirks; if (sdhci_init_slot(dev, slot, i) != 0) continue; From owner-svn-src-all@freebsd.org Thu Oct 15 05:26:13 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1CBCFA156B4; Thu, 15 Oct 2015 05:26:13 +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 DC6DE6AA; Thu, 15 Oct 2015 05:26:12 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t9F5QBKc054396; Thu, 15 Oct 2015 05:26:11 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9F5QBJg054395; Thu, 15 Oct 2015 05:26:11 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201510150526.t9F5QBJg054395@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Thu, 15 Oct 2015 05:26:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289360 - 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 " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Oct 2015 05:26:13 -0000 Author: bdrewery Date: Thu Oct 15 05:26:11 2015 New Revision: 289360 URL: https://svnweb.freebsd.org/changeset/base/289360 Log: Add temporary workaround for .MAKE being applied to _worldtmp, since r251750. This was causing files to be removed from the objdir when -n was used. _worldtmp makes no sub-make calls. A more comprehensive solution is coming involving fine-grained '+' where appropriate. Sponsored by: EMC / Isilon Storage Division MFC after: 1 week Modified: head/Makefile.inc1 Modified: head/Makefile.inc1 ============================================================================== --- head/Makefile.inc1 Thu Oct 15 04:22:56 2015 (r289359) +++ head/Makefile.inc1 Thu Oct 15 05:26:11 2015 (r289360) @@ -1062,7 +1062,7 @@ INSTALLKERNEL= ${_kernel} .endif .endfor -buildkernel ${WMAKE_TGTS} ${.ALLTARGETS:M_*}: .MAKE +buildkernel ${WMAKE_TGTS:N_worldtmp} ${.ALLTARGETS:M_*:N_worldtmp}: .MAKE # # buildkernel From owner-svn-src-all@freebsd.org Thu Oct 15 05:32:57 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 95701A158B7; Thu, 15 Oct 2015 05:32:57 +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 5A9D0BF0; Thu, 15 Oct 2015 05:32:57 +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 t9F5WuUw057179; Thu, 15 Oct 2015 05:32:56 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9F5WuEs057177; Thu, 15 Oct 2015 05:32:56 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201510150532.t9F5WuEs057177@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Thu, 15 Oct 2015 05:32:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289361 - 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 " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Oct 2015 05:32:57 -0000 Author: bdrewery Date: Thu Oct 15 05:32:56 2015 New Revision: 289361 URL: https://svnweb.freebsd.org/changeset/base/289361 Log: Consider top-level targets to be .PHONY as bmake won't build them otherwise if a file with the same name is found in the directory. MFC after: 1 week Sponsored by: EMC / Isilon Storage Division Modified: head/Makefile head/Makefile.inc1 Modified: head/Makefile ============================================================================== --- head/Makefile Thu Oct 15 05:26:11 2015 (r289360) +++ head/Makefile Thu Oct 15 05:32:56 2015 (r289361) @@ -250,7 +250,7 @@ ${TGTS}: .MAKE tinderbox toolchains kernel-toolchains: .MAKE .endif -${TGTS}: +${TGTS}: .PHONY ${_+_}@cd ${.CURDIR}; ${_MAKE} ${.TARGET} # The historic default "all" target creates files which may cause stale Modified: head/Makefile.inc1 ============================================================================== --- head/Makefile.inc1 Thu Oct 15 05:26:11 2015 (r289360) +++ head/Makefile.inc1 Thu Oct 15 05:32:56 2015 (r289361) @@ -1062,7 +1062,7 @@ INSTALLKERNEL= ${_kernel} .endif .endfor -buildkernel ${WMAKE_TGTS:N_worldtmp} ${.ALLTARGETS:M_*:N_worldtmp}: .MAKE +buildkernel ${WMAKE_TGTS:N_worldtmp} ${.ALLTARGETS:M_*:N_worldtmp}: .MAKE .PHONY # # buildkernel From owner-svn-src-all@freebsd.org Thu Oct 15 07:20:48 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 516F2A15AF4; Thu, 15 Oct 2015 07:20:48 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id EB9AB196D; Thu, 15 Oct 2015 07:20:47 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from tom.home (kostik@localhost [127.0.0.1]) by kib.kiev.ua (8.15.2/8.15.2) with ESMTPS id t9F7KdRB037426 (version=TLSv1 cipher=DHE-RSA-CAMELLIA256-SHA bits=256 verify=NO); Thu, 15 Oct 2015 10:20:40 +0300 (EEST) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.10.3 kib.kiev.ua t9F7KdRB037426 Received: (from kostik@localhost) by tom.home (8.15.2/8.15.2/Submit) id t9F7KdjB037425; Thu, 15 Oct 2015 10:20:39 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Thu, 15 Oct 2015 10:20:39 +0300 From: Konstantin Belousov To: Garrett Cooper Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r289332 - head/tools/regression/lib/msun Message-ID: <20151015072039.GY2257@kib.kiev.ua> References: <201510142022.t9EKMC1C088993@repo.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201510142022.t9EKMC1C088993@repo.freebsd.org> User-Agent: Mutt/1.5.24 (2015-08-30) X-Spam-Status: No, score=-2.0 required=5.0 tests=ALL_TRUSTED,BAYES_00, DKIM_ADSP_CUSTOM_MED,FREEMAIL_FROM,NML_ADSP_CUSTOM_MED autolearn=no autolearn_force=no version=3.4.1 X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on tom.home X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Oct 2015 07:20:48 -0000 On Wed, Oct 14, 2015 at 08:22:12PM +0000, Garrett Cooper wrote: > Author: ngie > Date: Wed Oct 14 20:22:12 2015 > New Revision: 289332 > URL: https://svnweb.freebsd.org/changeset/base/289332 > > Log: > Fix test-fenv:test_dfl_env when run on some amd64 CPUs > > Compare the fields that the AMD [1] and Intel [2] specs say will be > set once fnstenv returns. > > Not all amd64 capable processors zero out the env.__x87.__other field > (example: AMD Opteron 6308). The AMD64/x64 specs aren't explicit on what the > env.__x87.__other field will contain after fnstenv is executed, so the values > in env.__x87.__other could be filled with arbitrary data depending on how the > CPU-specific implementation of fnstenv. No Intel or AMD CPU write to __other field at all. > > 1. http://support.amd.com/TechDocs/26569_APM_v5.pdf > 2. http://www.intel.com/Assets/en_US/PDF/manual/253666.pdf > > Discussed with: kib, Anton Rang > Reviewed by: Daniel O'Connor (earlier patch; pre-generalization) > MFC after: 1 week > Sponsored by: EMC / Isilon Storage Division > Reported by: Bill Morchin > > Modified: > head/tools/regression/lib/msun/test-fenv.c > > Modified: head/tools/regression/lib/msun/test-fenv.c > ============================================================================== > --- head/tools/regression/lib/msun/test-fenv.c Wed Oct 14 19:30:04 2015 (r289331) > +++ head/tools/regression/lib/msun/test-fenv.c Wed Oct 14 20:22:12 2015 (r289332) > @@ -133,8 +133,35 @@ test_dfl_env(void) > fenv_t env; > > fegetenv(&env); > + > +#ifdef __amd64__ > + /* > + * Compare the fields that the AMD [1] and Intel [2] specs say will be > + * set once fnstenv returns. > + * > + * Not all amd64 capable processors implement the fnstenv instruction > + * by zero'ing out the env.__x87.__other field (example: AMD Opteron > + * 6308). The AMD64/x64 specs aren't explicit on what the > + * env.__x87.__other field will contain after fnstenv is executed, so > + * the values in env.__x87.__other could be filled with arbitrary > + * data depending on how the CPU implements fnstenv. > + * > + * 1. http://support.amd.com/TechDocs/26569_APM_v5.pdf > + * 2. http://www.intel.com/Assets/en_US/PDF/manual/253666.pdf > + */ > + assert(memcmp(&env.__mxcsr, &FE_DFL_ENV->__mxcsr, > + sizeof(env.__mxcsr)) == 0); > + assert(memcmp(&env.__x87.__control, &FE_DFL_ENV->__x87.__control, > + sizeof(env.__x87.__control)) == 0); > + assert(memcmp(&env.__x87.__status, &FE_DFL_ENV->__x87.__status, > + sizeof(env.__x87.__status)) == 0); > + assert(memcmp(&env.__x87.__tag, &FE_DFL_ENV->__x87.__tag, > + sizeof(env.__x87.__tag)) == 0); > +#else > assert(memcmp(&env, FE_DFL_ENV, sizeof(env)) == 0); > #endif > + > +#endif > assert(fetestexcept(FE_ALL_EXCEPT) == 0); > } > From owner-svn-src-all@freebsd.org Thu Oct 15 07:23:08 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A1BFAA15C30; Thu, 15 Oct 2015 07:23:08 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from mail106.syd.optusnet.com.au (mail106.syd.optusnet.com.au [211.29.132.42]) by mx1.freebsd.org (Postfix) with ESMTP id 4F3991CEF; Thu, 15 Oct 2015 07:23:07 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from c211-30-166-197.carlnfd1.nsw.optusnet.com.au (c211-30-166-197.carlnfd1.nsw.optusnet.com.au [211.30.166.197]) by mail106.syd.optusnet.com.au (Postfix) with ESMTPS id A70B23C08D2; Thu, 15 Oct 2015 18:22:59 +1100 (AEDT) Date: Thu, 15 Oct 2015 18:22:58 +1100 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: Garrett Cooper cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r289332 - head/tools/regression/lib/msun In-Reply-To: <201510142022.t9EKMC1C088993@repo.freebsd.org> Message-ID: <20151015145016.V1299@besplex.bde.org> References: <201510142022.t9EKMC1C088993@repo.freebsd.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Optus-CM-Score: 0 X-Optus-CM-Analysis: v=2.1 cv=R4L+YolX c=1 sm=1 tr=0 a=KA6XNC2GZCFrdESI5ZmdjQ==:117 a=PO7r1zJSAAAA:8 a=JzwRw_2MAAAA:8 a=kj9zAlcOel0A:10 a=zd2uoN0lAAAA:8 a=QyXUC8HyAAAA:8 a=tn-Ozr1CR29Ztkc_Ey0A:9 a=CjuIK1q_8ugA:10 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Oct 2015 07:23:08 -0000 On Wed, 14 Oct 2015, Garrett Cooper wrote: > Log: > Fix test-fenv:test_dfl_env when run on some amd64 CPUs > > Compare the fields that the AMD [1] and Intel [2] specs say will be > set once fnstenv returns. > > Not all amd64 capable processors zero out the env.__x87.__other field > (example: AMD Opteron 6308). The AMD64/x64 specs aren't explicit on what the > env.__x87.__other field will contain after fnstenv is executed, so the values > in env.__x87.__other could be filled with arbitrary data depending on how the > CPU-specific implementation of fnstenv. This is not very amd64-specific. All of the state is basically uninitialized. The ifdef should be the same for i386, so as to only check the part that we use. This part is not properly initialized either, but is less volatile and we need to check that its uninitialized value is what we want. > Modified: head/tools/regression/lib/msun/test-fenv.c > ============================================================================== > --- head/tools/regression/lib/msun/test-fenv.c Wed Oct 14 19:30:04 2015 (r289331) > +++ head/tools/regression/lib/msun/test-fenv.c Wed Oct 14 20:22:12 2015 (r289332) > @@ -133,8 +133,35 @@ test_dfl_env(void) > fenv_t env; > > fegetenv(&env); The fields were initialized in the kernel, not necessarily to our hard- coded value, but we want to check that they were. Then they may have been changed by early code in the program. There is a printf() there, and printf() could easily use the FPU although it probably doesn't. If anything earlier uses the FPU, the the state may be changed in many MD ways. E.g.: - if the part of the FPU used is the NPX, then the state has last-insruction data that should be changed by any non-control operation - the last-instruction data actually works on Intel CPU, but is broken by AMD optimizations - the amd64 optimizations give a security hole. Closing this hole modifies the last-instruction data, so the data may change in unexpected ways - amd64 binaries are unlikely to use the NPX even if they use the FPU, since they use SSE except for long doubles - i386 binaries should use the NPX if they use the FPU, but this is broken by clang optimizations in some cases - the hardware format stored by fnstenv doesn't have enough space for all the last-instruction data in long mode. Apparently, fstenv in long mode stores the same number of bytes as in 32-bit mode, with the leading bytes the same but the tailing bytes containing either truncated last-instruction data or garbage. This is probably the bug fixed by this commit (it doesn't take earlier use to give MD garbage). The kernel doesn't define any format for this case. fenv(3)'s fenv_t is a private format that has 12 leading bytes in common with the hardware format, then 16 opaque bytes in common with the unusable part of the hardware format, then an extension by 4 bytes. Testing this confused me. I thought that FreeBSD userland was in long mode, but tests gave the 32-bit format even for fxsave. This format has fields for segment registers, and shows the nonzero %cs and the zero %ds. > + > +#ifdef __amd64__ > + /* > + * Compare the fields that the AMD [1] and Intel [2] specs say will be > + * set once fnstenv returns. > + * > + * Not all amd64 capable processors implement the fnstenv instruction > + * by zero'ing out the env.__x87.__other field (example: AMD Opteron > + * 6308). The AMD64/x64 specs aren't explicit on what the > + * env.__x87.__other field will contain after fnstenv is executed, so > + * the values in env.__x87.__other could be filled with arbitrary > + * data depending on how the CPU implements fnstenv. Probably none do. Most of the fields that are still tested are documented in at least old amd64 manuals as being half "reserved, don't use". Usually the reserved bits are not 0, but are 1. Our tests usually pass because we hard-code 1 instead of 0. > + * > + * 1. http://support.amd.com/TechDocs/26569_APM_v5.pdf > + * 2. http://www.intel.com/Assets/en_US/PDF/manual/253666.pdf > + */ It should go without saying that fields that are unsupported by us and named __other to inhibit their use should not be tested. Verbose pointers to the man pages might be useful for the parts that we use, but these parts are fundamental and well known and used without comment throughout the implementaton. > + assert(memcmp(&env.__mxcsr, &FE_DFL_ENV->__mxcsr, > + sizeof(env.__mxcsr)) == 0); memcmp is verbose and bogus for comparing scalar values. All 32 bits in the scalar are supported, so this is the only correct part of the test. Oops, this too is incorrect on i386. On i386, __mxcsr doesn't exist. The mxcsr scalar is split into 2 discontiguous parts on i386. These parts need to be tested separately, and the amd64 spelling fails at compile time since neither part is named __mxcsr. > + assert(memcmp(&env.__x87.__control, &FE_DFL_ENV->__x87.__control, > + sizeof(env.__x87.__control)) == 0); This is broken on amd64 since the upper 16 bits of the scalar are "reserved, don't use". This is accidentally correct on i386 due to a hack. This field is basically 16 bits and is just that in 16-bit mode. It is padded with "reserved, don't use" bits in 32-bit mode (the format is expanded to make space), but in other (64-bit) formats it is compressed back to 16 bits. The kernel declares the padding as part of the field in 32-bit formats for convenience. So does fenv(3) for amd64. This is fragile but OK since the field is private. On i386, this test works accidentally since the field is declared as 16 bits so as to repurpose the padding bits for holding half of the mxcsr bits. > + assert(memcmp(&env.__x87.__status, &FE_DFL_ENV->__x87.__status, > + sizeof(env.__x87.__status)) == 0); This has the same bugs and accidental fix on i386 as the control word. The status word is the most volatile one so it is most likely to be changed from its kernel initialization by earlier code in the program. The only reasonable fix is to do the fegetenv() as the first thing in main(). Moving it earlier would be unreasonable, and initializing everything to a known state would break the test that the default state is as expected. Alternatively, only test the supported and/or non-volatile parts of the state -- just the exception flags. Bits giving the result of previous FP comparisons are uninteresting. Bits giving the stack pointer are interesting but not really supported -- we just need them to not give a corrupt stack. We don't support them enough to know when that is, and just test if they are 0 (or 1's?) > + assert(memcmp(&env.__x87.__tag, &FE_DFL_ENV->__x87.__tag, > + sizeof(env.__x87.__tag)) == 0); Similarly, except it is not accidentally fixed on i386. The most correct fix is to declare the padding explicitly and never look at it. Next best is to mask the bits so as to not look at them. Don't obfuscate this using memcmp() with a reduced size. Use: assert((env.__x87.__tag & 0xffff) == (FE_DFL_ENV->__x87.__tag & 0xffff)); Tag bits may be changed during previous FP operations, but I think the ABI requires them to be restored to EMPTY for subsequent operations to work. > +#else > assert(memcmp(&env, FE_DFL_ENV, sizeof(env)) == 0); > #endif > + > +#endif > assert(fetestexcept(FE_ALL_EXCEPT) == 0); Checking exception status bits in __status is not really needed since this checks these bits again. > } Bruce From owner-svn-src-all@freebsd.org Thu Oct 15 08:47:34 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9B5A19B6188; Thu, 15 Oct 2015 08:47:34 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5B039EE5; Thu, 15 Oct 2015 08:47:34 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t9F8lX29014199; Thu, 15 Oct 2015 08:47:33 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9F8lWrl014188; Thu, 15 Oct 2015 08:47:32 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201510150847.t9F8lWrl014188@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Thu, 15 Oct 2015 08:47:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289362 - in head: cddl/contrib/opensolaris/cmd/zfs cddl/contrib/opensolaris/cmd/zstreamdump cddl/contrib/opensolaris/lib/libzfs/common cddl/contrib/opensolaris/lib/libzfs_core/common c... X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Oct 2015 08:47:34 -0000 Author: mav Date: Thu Oct 15 08:47:32 2015 New Revision: 289362 URL: https://svnweb.freebsd.org/changeset/base/289362 Log: MFV r289312: 2605 want to resume interrupted zfs send Reviewed by: George Wilson Reviewed by: Paul Dagnelie Reviewed by: Richard Elling Reviewed by: Xin Li Reviewed by: Arne Jansen Approved by: Dan McDonald Author: Matthew Ahrens illumos/illumos-gate@9c3fd1216fa7fb02cfbc78a2518a686d54b48ab8 For more info, see: - slides http://www.slideshare.net/MatthewAhrens/openzfs-send-and-receive - video https://www.youtube.com/watch?v=iY44jPMvxog - manpage changes (for zfs resume -s and zfs send -t) - upcoming talk at the OpenZFS Developer Summit The TL;DR is: Use "zfs receive -s" to save the partially received state on failure. On failure, get the receive token with "zfs get receive_resume_token " Resume the send with "zfs send -t " Relnotes: yes Modified: head/cddl/contrib/opensolaris/cmd/zfs/zfs.8 head/cddl/contrib/opensolaris/cmd/zfs/zfs_main.c head/cddl/contrib/opensolaris/cmd/zstreamdump/zstreamdump.c head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs.h head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_compat.c head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_dataset.c head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_mount.c head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_sendrecv.c head/cddl/contrib/opensolaris/lib/libzfs_core/common/libzfs_core.c head/cddl/contrib/opensolaris/lib/libzfs_core/common/libzfs_core.h head/cddl/lib/libzfs/Makefile head/sys/cddl/contrib/opensolaris/common/zfs/zfs_ioctl_compat.c head/sys/cddl/contrib/opensolaris/common/zfs/zfs_ioctl_compat.h head/sys/cddl/contrib/opensolaris/common/zfs/zfs_prop.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_objset.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_send.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_traverse.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_dataset.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_destroy.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dmu_impl.h head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dmu_send.h head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dmu_traverse.h head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dsl_dataset.h head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zfs_ioctl.h head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c head/sys/cddl/contrib/opensolaris/uts/common/sys/fs/zfs.h Directory Properties: head/cddl/contrib/opensolaris/ (props changed) head/cddl/contrib/opensolaris/cmd/zfs/ (props changed) head/cddl/contrib/opensolaris/lib/libzfs/ (props changed) head/sys/cddl/contrib/opensolaris/ (props changed) Modified: head/cddl/contrib/opensolaris/cmd/zfs/zfs.8 ============================================================================== --- head/cddl/contrib/opensolaris/cmd/zfs/zfs.8 Thu Oct 15 05:32:56 2015 (r289361) +++ head/cddl/contrib/opensolaris/cmd/zfs/zfs.8 Thu Oct 15 08:47:32 2015 (r289362) @@ -189,17 +189,25 @@ .Op Fl i Ar snapshot Ns | Ns bookmark .Ar filesystem Ns | Ns Ar volume Ns | Ns Ar snapshot .Nm +.Cm send +.Op Fl Penv +.Fl t Ar receive_resume_token +.Nm .Cm receive Ns | Ns Cm recv -.Op Fl vnFu +.Op Fl vnsFu .Op Fl o Sy origin Ns = Ns Ar snapshot .Ar filesystem Ns | Ns Ar volume Ns | Ns Ar snapshot .Nm .Cm receive Ns | Ns Cm recv -.Op Fl vnFu +.Op Fl vnsFu .Op Fl d | e .Op Fl o Sy origin Ns = Ns Ar snapshot .Ar filesystem .Nm +.Cm receive Ns | Ns Cm recv +.Fl A +.Ar filesystem Ns | Ns Ar volume +.Nm .Cm allow .Ar filesystem Ns | Ns Ar volume .Nm @@ -597,6 +605,13 @@ For cloned file systems or volumes, the created. See also the .Sy clones property. +.It Sy receive_resume_token +For filesystems or volumes which have saved partially-completed state from +.Sy zfs receive -s , +this opaque token can be provided to +.Sy zfs send -t +to resume and complete the +.Sy zfs receive . .It Sy referenced The amount of data that is accessible by this dataset, which may or may not be shared with other datasets in the pool. When a snapshot or clone is created, it @@ -2714,15 +2729,28 @@ feature. .El .It Xo .Nm +.Cm send +.Op Fl Penv +.Fl t +.Ar receive_resume_token +.Xc +Creates a send stream which resumes an interrupted receive. The +.Ar receive_resume_token +is the value of this property on the filesystem +or volume that was being received into. See the documentation for +.Sy zfs receive -s +for more details. +.It Xo +.Nm .Cm receive Ns | Ns Cm recv -.Op Fl vnFu +.Op Fl vnsFu .Op Fl o Sy origin Ns = Ns Ar snapshot .Ar filesystem Ns | Ns Ar volume Ns | Ns Ar snapshot .Xc .It Xo .Nm .Cm receive Ns | Ns Cm recv -.Op Fl vnFu +.Op Fl vnsFu .Op Fl d | e .Op Fl o Sy origin Ns = Ns Ar snapshot .Ar filesystem @@ -2819,9 +2847,42 @@ performing the receive operation. If rec stream (for example, one generated by .Qq Nm Cm send Fl R Bro Fl i | Fl I Brc ) , destroy snapshots and file systems that do not exist on the sending side. +.It Fl s +If the receive is interrupted, save the partially received state, rather +than deleting it. Interruption may be due to premature termination of +the stream +.Po e.g. due to network failure or failure of the remote system +if the stream is being read over a network connection +.Pc , +a checksum error in the stream, termination of the +.Nm zfs Cm receive +process, or unclean shutdown of the system. +.Pp +The receive can be resumed with a stream generated by +.Nm zfs Cm send Fl t Ar token , +where the +.Ar token +is the value of the +.Sy receive_resume_token +property of the filesystem or volume which is received into. +.Pp +To use this flag, the storage pool must have the +.Sy extensible_dataset +feature enabled. See +.Xr zpool-features 5 +for details on ZFS feature flags. .El .It Xo .Nm +.Cm receive Ns | Ns Cm recv +.Fl A +.Ar filesystem Ns | Ns Ar volume +.Xc +Abort an interrupted +.Nm zfs Cm receive Fl s , +deleting its saved partially received state. +.It Xo +.Nm .Cm allow .Ar filesystem Ns | Ns Ar volume .Xc Modified: head/cddl/contrib/opensolaris/cmd/zfs/zfs_main.c ============================================================================== --- head/cddl/contrib/opensolaris/cmd/zfs/zfs_main.c Thu Oct 15 05:32:56 2015 (r289361) +++ head/cddl/contrib/opensolaris/cmd/zfs/zfs_main.c Thu Oct 15 08:47:32 2015 (r289362) @@ -263,10 +263,11 @@ get_usage(zfs_help_t idx) case HELP_PROMOTE: return (gettext("\tpromote \n")); case HELP_RECEIVE: - return (gettext("\treceive|recv [-vnFu] \n" - "\treceive|recv [-vnFu] [-o origin=] [-d | -e] " - "\n")); + "\treceive|recv [-vnsFu] [-o origin=] [-d | -e] " + "\n" + "\treceive|recv -A \n")); case HELP_RENAME: return (gettext("\trename [-f] " "\n" @@ -279,7 +280,8 @@ get_usage(zfs_help_t idx) return (gettext("\tsend [-DnPpRvLe] [-[iI] snapshot] " "\n" "\tsend [-Le] [-i snapshot|bookmark] " - "\n")); + "\n" + "\tsend [-nvPe] -t \n")); case HELP_SET: return (gettext("\tset " " ...\n")); @@ -3728,6 +3730,7 @@ zfs_do_send(int argc, char **argv) { char *fromname = NULL; char *toname = NULL; + char *resume_token = NULL; char *cp; zfs_handle_t *zhp; sendflags_t flags = { 0 }; @@ -3736,7 +3739,7 @@ zfs_do_send(int argc, char **argv) boolean_t extraverbose = B_FALSE; /* check options */ - while ((c = getopt(argc, argv, ":i:I:RDpvnPLe")) != -1) { + while ((c = getopt(argc, argv, ":i:I:RDpvnPLet:")) != -1) { switch (c) { case 'i': if (fromname) @@ -3777,6 +3780,9 @@ zfs_do_send(int argc, char **argv) case 'e': flags.embed_data = B_TRUE; break; + case 't': + resume_token = optarg; + break; case ':': (void) fprintf(stderr, gettext("missing argument for " "'%c' option\n"), optopt); @@ -3792,14 +3798,28 @@ zfs_do_send(int argc, char **argv) argc -= optind; argv += optind; - /* check number of arguments */ - if (argc < 1) { - (void) fprintf(stderr, gettext("missing snapshot argument\n")); - usage(B_FALSE); - } - if (argc > 1) { - (void) fprintf(stderr, gettext("too many arguments\n")); - usage(B_FALSE); + if (resume_token != NULL) { + if (fromname != NULL || flags.replicate || flags.props || + flags.dedup) { + (void) fprintf(stderr, + gettext("invalid flags combined with -t\n")); + usage(B_FALSE); + } + if (argc != 0) { + (void) fprintf(stderr, gettext("no additional " + "arguments are permitted with -t\n")); + usage(B_FALSE); + } + } else { + if (argc < 1) { + (void) fprintf(stderr, + gettext("missing snapshot argument\n")); + usage(B_FALSE); + } + if (argc > 1) { + (void) fprintf(stderr, gettext("too many arguments\n")); + usage(B_FALSE); + } } if (!flags.dryrun && isatty(STDOUT_FILENO)) { @@ -3809,6 +3829,11 @@ zfs_do_send(int argc, char **argv) return (1); } + if (resume_token != NULL) { + return (zfs_send_resume(g_zfs, &flags, STDOUT_FILENO, + resume_token)); + } + /* * Special case sending a filesystem, or from a bookmark. */ @@ -3914,8 +3939,6 @@ zfs_do_send(int argc, char **argv) } /* - * zfs receive [-vnFu] [-d | -e] - * * Restore a backup stream from stdin. */ static int @@ -3923,6 +3946,8 @@ zfs_do_receive(int argc, char **argv) { int c, err; recvflags_t flags = { 0 }; + boolean_t abort_resumable = B_FALSE; + nvlist_t *props; nvpair_t *nvp = NULL; @@ -3930,7 +3955,7 @@ zfs_do_receive(int argc, char **argv) nomem(); /* check options */ - while ((c = getopt(argc, argv, ":o:denuvF")) != -1) { + while ((c = getopt(argc, argv, ":o:denuvFsA")) != -1) { switch (c) { case 'o': if (parseprop(props, optarg) != 0) @@ -3952,9 +3977,15 @@ zfs_do_receive(int argc, char **argv) case 'v': flags.verbose = B_TRUE; break; + case 's': + flags.resumable = B_TRUE; + break; case 'F': flags.force = B_TRUE; break; + case 'A': + abort_resumable = B_TRUE; + break; case ':': (void) fprintf(stderr, gettext("missing argument for " "'%c' option\n"), optopt); @@ -3987,6 +4018,44 @@ zfs_do_receive(int argc, char **argv) } } + if (abort_resumable) { + if (flags.isprefix || flags.istail || flags.dryrun || + flags.resumable || flags.nomount) { + (void) fprintf(stderr, gettext("invalid option")); + usage(B_FALSE); + } + + char namebuf[ZFS_MAXNAMELEN]; + (void) snprintf(namebuf, sizeof (namebuf), + "%s/%%recv", argv[0]); + + if (zfs_dataset_exists(g_zfs, namebuf, + ZFS_TYPE_FILESYSTEM | ZFS_TYPE_VOLUME)) { + zfs_handle_t *zhp = zfs_open(g_zfs, + namebuf, ZFS_TYPE_FILESYSTEM | ZFS_TYPE_VOLUME); + if (zhp == NULL) + return (1); + err = zfs_destroy(zhp, B_FALSE); + } else { + zfs_handle_t *zhp = zfs_open(g_zfs, + argv[0], ZFS_TYPE_FILESYSTEM | ZFS_TYPE_VOLUME); + if (zhp == NULL) + usage(B_FALSE); + if (!zfs_prop_get_int(zhp, ZFS_PROP_INCONSISTENT) || + zfs_prop_get(zhp, ZFS_PROP_RECEIVE_RESUME_TOKEN, + NULL, 0, NULL, NULL, 0, B_TRUE) == -1) { + (void) fprintf(stderr, + gettext("'%s' does not have any " + "resumable receive state to abort\n"), + argv[0]); + return (1); + } + err = zfs_destroy(zhp, B_FALSE); + } + + return (err != 0); + } + if (isatty(STDIN_FILENO)) { (void) fprintf(stderr, gettext("Error: Backup stream can not be read " @@ -3994,7 +4063,6 @@ zfs_do_receive(int argc, char **argv) "You must redirect standard input.\n")); return (1); } - err = zfs_receive(g_zfs, argv[0], props, &flags, STDIN_FILENO, NULL); return (err != 0); @@ -5816,6 +5884,24 @@ share_mount_one(zfs_handle_t *zhp, int o } /* + * If this filesystem is inconsistent and has a receive resume + * token, we can not mount it. + */ + if (zfs_prop_get_int(zhp, ZFS_PROP_INCONSISTENT) && + zfs_prop_get(zhp, ZFS_PROP_RECEIVE_RESUME_TOKEN, + NULL, 0, NULL, NULL, 0, B_TRUE) == 0) { + if (!explicit) + return (0); + + (void) fprintf(stderr, gettext("cannot %s '%s': " + "Contains partially-completed state from " + "\"zfs receive -r\", which can be resumed with " + "\"zfs send -t\"\n"), + cmdname, zfs_get_name(zhp)); + return (1); + } + + /* * At this point, we have verified that the mountpoint and/or * shareopts are appropriate for auto management. If the * filesystem is already mounted or shared, return (failing Modified: head/cddl/contrib/opensolaris/cmd/zstreamdump/zstreamdump.c ============================================================================== --- head/cddl/contrib/opensolaris/cmd/zstreamdump/zstreamdump.c Thu Oct 15 05:32:56 2015 (r289361) +++ head/cddl/contrib/opensolaris/cmd/zstreamdump/zstreamdump.c Thu Oct 15 08:47:32 2015 (r289362) @@ -125,7 +125,7 @@ read_hdr(dmu_replay_record_t *drr, zio_c saved_cksum.zc_word[1], saved_cksum.zc_word[2], saved_cksum.zc_word[3]); - exit(1); + return (0); } return (sizeof (*drr)); } @@ -346,8 +346,7 @@ main(int argc, char *argv[]) if (verbose) (void) printf("\n"); - if ((DMU_GET_STREAM_HDRTYPE(drrb->drr_versioninfo) == - DMU_COMPOUNDSTREAM) && drr->drr_payloadlen != 0) { + if (drr->drr_payloadlen != 0) { nvlist_t *nv; int sz = drr->drr_payloadlen; Modified: head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs.h ============================================================================== --- head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs.h Thu Oct 15 05:32:56 2015 (r289361) +++ head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs.h Thu Oct 15 08:47:32 2015 (r289362) @@ -621,6 +621,10 @@ typedef boolean_t (snapfilter_cb_t)(zfs_ extern int zfs_send(zfs_handle_t *, const char *, const char *, sendflags_t *, int, snapfilter_cb_t, void *, nvlist_t **); extern int zfs_send_one(zfs_handle_t *, const char *, int, enum lzc_send_flags); +extern int zfs_send_resume(libzfs_handle_t *, sendflags_t *, int outfd, + const char *); +extern nvlist_t *zfs_send_resume_token_to_nvlist(libzfs_handle_t *hdl, + const char *token); extern int zfs_promote(zfs_handle_t *); extern int zfs_hold(zfs_handle_t *, const char *, const char *, @@ -661,6 +665,12 @@ typedef struct recvflags { /* set "canmount=off" on all modified filesystems */ boolean_t canmountoff; + /* + * Mark the file systems as "resumable" and do not destroy them if the + * receive is interrupted + */ + boolean_t resumable; + /* byteswap flag is used internally; callers need not specify */ boolean_t byteswap; Modified: head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_compat.c ============================================================================== --- head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_compat.c Thu Oct 15 05:32:56 2015 (r289361) +++ head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_compat.c Thu Oct 15 08:47:32 2015 (r289362) @@ -74,6 +74,9 @@ zcmd_ioctl(int fd, int request, zfs_cmd_ if (zfs_ioctl_version >= ZFS_IOCVER_DEADMAN) { switch (zfs_ioctl_version) { + case ZFS_IOCVER_EDBP: + cflag = ZFS_CMD_COMPAT_EDBP; + break; case ZFS_IOCVER_ZCMD: cflag = ZFS_CMD_COMPAT_ZCMD; break; Modified: head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_dataset.c ============================================================================== --- head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_dataset.c Thu Oct 15 05:32:56 2015 (r289361) +++ head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_dataset.c Thu Oct 15 08:47:32 2015 (r289362) @@ -1778,22 +1778,21 @@ getprop_uint64(zfs_handle_t *zhp, zfs_pr return (value); } -static char * +static const char * getprop_string(zfs_handle_t *zhp, zfs_prop_t prop, char **source) { nvlist_t *nv; - char *value; + const char *value; *source = NULL; if (nvlist_lookup_nvlist(zhp->zfs_props, zfs_prop_to_name(prop), &nv) == 0) { - verify(nvlist_lookup_string(nv, ZPROP_VALUE, &value) == 0); + value = fnvlist_lookup_string(nv, ZPROP_VALUE); (void) nvlist_lookup_string(nv, ZPROP_SOURCE, source); } else { verify(!zhp->zfs_props_table || zhp->zfs_props_table[prop] == B_TRUE); - if ((value = (char *)zfs_prop_default_string(prop)) == NULL) - value = ""; + value = zfs_prop_default_string(prop); *source = ""; } @@ -2195,7 +2194,7 @@ zfs_prop_get(zfs_handle_t *zhp, zfs_prop { char *source = NULL; uint64_t val; - char *str; + const char *str; const char *strval; boolean_t received = zfs_is_recvd_props_mode(zhp); @@ -2300,14 +2299,10 @@ zfs_prop_get(zfs_handle_t *zhp, zfs_prop break; case ZFS_PROP_ORIGIN: - (void) strlcpy(propbuf, getprop_string(zhp, prop, &source), - proplen); - /* - * If there is no parent at all, return failure to indicate that - * it doesn't apply to this dataset. - */ - if (propbuf[0] == '\0') + str = getprop_string(zhp, prop, &source); + if (str == NULL) return (-1); + (void) strlcpy(propbuf, str, proplen); break; case ZFS_PROP_CLONES: @@ -2488,8 +2483,10 @@ zfs_prop_get(zfs_handle_t *zhp, zfs_prop break; case PROP_TYPE_STRING: - (void) strlcpy(propbuf, - getprop_string(zhp, prop, &source), proplen); + str = getprop_string(zhp, prop, &source); + if (str == NULL) + return (-1); + (void) strlcpy(propbuf, str, proplen); break; case PROP_TYPE_INDEX: Modified: head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_mount.c ============================================================================== --- head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_mount.c Thu Oct 15 05:32:56 2015 (r289361) +++ head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_mount.c Thu Oct 15 08:47:32 2015 (r289362) @@ -1072,6 +1072,17 @@ mount_cb(zfs_handle_t *zhp, void *data) return (0); } + /* + * If this filesystem is inconsistent and has a receive resume + * token, we can not mount it. + */ + if (zfs_prop_get_int(zhp, ZFS_PROP_INCONSISTENT) && + zfs_prop_get(zhp, ZFS_PROP_RECEIVE_RESUME_TOKEN, + NULL, 0, NULL, NULL, 0, B_TRUE) == 0) { + zfs_close(zhp); + return (0); + } + libzfs_add_handle(cbp, zhp); if (zfs_iter_filesystems(zhp, mount_cb, cbp) != 0) { zfs_close(zhp); Modified: head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_sendrecv.c ============================================================================== --- head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_sendrecv.c Thu Oct 15 05:32:56 2015 (r289361) +++ head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_sendrecv.c Thu Oct 15 08:47:32 2015 (r289362) @@ -21,7 +21,7 @@ /* * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. - * Copyright (c) 2011, 2014 by Delphix. All rights reserved. + * Copyright (c) 2011, 2015 by Delphix. All rights reserved. * Copyright (c) 2012, Joyent, Inc. All rights reserved. * Copyright (c) 2012 Pawel Jakub Dawidek . * All rights reserved. @@ -51,6 +51,7 @@ #include "zfs_prop.h" #include "zfs_fletcher.h" #include "libzfs_impl.h" +#include #include #include #include @@ -67,6 +68,8 @@ extern void zfs_setprop_error(libzfs_han static int zfs_receive_impl(libzfs_handle_t *, const char *, const char *, recvflags_t *, int, const char *, nvlist_t *, avl_tree_t *, char **, int, uint64_t *); +static int guid_to_name(libzfs_handle_t *, const char *, + uint64_t, boolean_t, char *); static const zio_cksum_t zero_cksum = { 0 }; @@ -284,8 +287,7 @@ cksummer(void *arg) DMU_BACKUP_FEATURE_DEDUPPROPS); DMU_SET_FEATUREFLAGS(drrb->drr_versioninfo, fflags); - if (DMU_GET_STREAM_HDRTYPE(drrb->drr_versioninfo) == - DMU_COMPOUNDSTREAM && drr->drr_payloadlen != 0) { + if (drr->drr_payloadlen != 0) { sz = drr->drr_payloadlen; if (sz > SPA_MAXBLOCKSIZE) { @@ -995,17 +997,14 @@ static void * send_progress_thread(void *arg) { progress_arg_t *pa = arg; - zfs_cmd_t zc = { 0 }; zfs_handle_t *zhp = pa->pa_zhp; libzfs_handle_t *hdl = zhp->zfs_hdl; unsigned long long bytes; char buf[16]; - time_t t; struct tm *tm; - assert(zhp->zfs_type == ZFS_TYPE_SNAPSHOT); (void) strlcpy(zc.zc_name, zhp->zfs_name, sizeof (zc.zc_name)); if (!pa->pa_parsable) @@ -1038,6 +1037,51 @@ send_progress_thread(void *arg) } } +static void +send_print_verbose(FILE *fout, const char *tosnap, const char *fromsnap, + uint64_t size, boolean_t parsable) +{ + if (parsable) { + if (fromsnap != NULL) { + (void) fprintf(fout, "incremental\t%s\t%s", + fromsnap, tosnap); + } else { + (void) fprintf(fout, "full\t%s", + tosnap); + } + } else { + if (fromsnap != NULL) { + if (strchr(fromsnap, '@') == NULL && + strchr(fromsnap, '#') == NULL) { + (void) fprintf(fout, dgettext(TEXT_DOMAIN, + "send from @%s to %s"), + fromsnap, tosnap); + } else { + (void) fprintf(fout, dgettext(TEXT_DOMAIN, + "send from %s to %s"), + fromsnap, tosnap); + } + } else { + (void) fprintf(fout, dgettext(TEXT_DOMAIN, + "full send of %s"), + tosnap); + } + } + + if (size != 0) { + if (parsable) { + (void) fprintf(fout, "\t%llu", + (longlong_t)size); + } else { + char buf[16]; + zfs_nicenum(size, buf, sizeof (buf)); + (void) fprintf(fout, dgettext(TEXT_DOMAIN, + " estimated size is %s"), buf); + } + } + (void) fprintf(fout, "\n"); +} + static int dump_snapshot(zfs_handle_t *zhp, void *arg) { @@ -1117,37 +1161,14 @@ dump_snapshot(zfs_handle_t *zhp, void *a (sdd->fromorigin || sdd->replicate); if (sdd->verbose) { - uint64_t size; - err = estimate_ioctl(zhp, sdd->prevsnap_obj, + uint64_t size = 0; + (void) estimate_ioctl(zhp, sdd->prevsnap_obj, fromorigin, &size); - if (sdd->parsable) { - if (sdd->prevsnap[0] != '\0') { - (void) fprintf(fout, "incremental\t%s\t%s", - sdd->prevsnap, zhp->zfs_name); - } else { - (void) fprintf(fout, "full\t%s", - zhp->zfs_name); - } - } else { - (void) fprintf(fout, dgettext(TEXT_DOMAIN, - "send from @%s to %s"), - sdd->prevsnap, zhp->zfs_name); - } - if (err == 0) { - if (sdd->parsable) { - (void) fprintf(fout, "\t%llu\n", - (longlong_t)size); - } else { - char buf[16]; - zfs_nicenum(size, buf, sizeof (buf)); - (void) fprintf(fout, dgettext(TEXT_DOMAIN, - " estimated size is %s\n"), buf); - } - sdd->size += size; - } else { - (void) fprintf(fout, "\n"); - } + send_print_verbose(fout, zhp->zfs_name, + sdd->prevsnap[0] ? sdd->prevsnap : NULL, + size, sdd->parsable); + sdd->size += size; } if (!sdd->dryrun) { @@ -1358,6 +1379,233 @@ again: return (0); } +nvlist_t * +zfs_send_resume_token_to_nvlist(libzfs_handle_t *hdl, const char *token) +{ + unsigned int version; + int nread; + unsigned long long checksum, packed_len; + + /* + * Decode token header, which is: + * -- + * Note that the only supported token version is 1. + */ + nread = sscanf(token, "%u-%llx-%llx-", + &version, &checksum, &packed_len); + if (nread != 3) { + zfs_error_aux(hdl, dgettext(TEXT_DOMAIN, + "resume token is corrupt (invalid format)")); + return (NULL); + } + + if (version != ZFS_SEND_RESUME_TOKEN_VERSION) { + zfs_error_aux(hdl, dgettext(TEXT_DOMAIN, + "resume token is corrupt (invalid version %u)"), + version); + return (NULL); + } + + /* convert hexadecimal representation to binary */ + token = strrchr(token, '-') + 1; + int len = strlen(token) / 2; + unsigned char *compressed = zfs_alloc(hdl, len); + for (int i = 0; i < len; i++) { + nread = sscanf(token + i * 2, "%2hhx", compressed + i); + if (nread != 1) { + free(compressed); + zfs_error_aux(hdl, dgettext(TEXT_DOMAIN, + "resume token is corrupt " + "(payload is not hex-encoded)")); + return (NULL); + } + } + + /* verify checksum */ + zio_cksum_t cksum; + fletcher_4_native(compressed, len, &cksum); + if (cksum.zc_word[0] != checksum) { + free(compressed); + zfs_error_aux(hdl, dgettext(TEXT_DOMAIN, + "resume token is corrupt (incorrect checksum)")); + return (NULL); + } + + /* uncompress */ + void *packed = zfs_alloc(hdl, packed_len); + uLongf packed_len_long = packed_len; + if (uncompress(packed, &packed_len_long, compressed, len) != Z_OK || + packed_len_long != packed_len) { + free(packed); + free(compressed); + zfs_error_aux(hdl, dgettext(TEXT_DOMAIN, + "resume token is corrupt (decompression failed)")); + return (NULL); + } + + /* unpack nvlist */ + nvlist_t *nv; + int error = nvlist_unpack(packed, packed_len, &nv, KM_SLEEP); + free(packed); + free(compressed); + if (error != 0) { + zfs_error_aux(hdl, dgettext(TEXT_DOMAIN, + "resume token is corrupt (nvlist_unpack failed)")); + return (NULL); + } + return (nv); +} + +int +zfs_send_resume(libzfs_handle_t *hdl, sendflags_t *flags, int outfd, + const char *resume_token) +{ + char errbuf[1024]; + char *toname; + char *fromname = NULL; + uint64_t resumeobj, resumeoff, toguid, fromguid, bytes; + zfs_handle_t *zhp; + int error = 0; + char name[ZFS_MAXNAMELEN]; + enum lzc_send_flags lzc_flags = 0; + + (void) snprintf(errbuf, sizeof (errbuf), dgettext(TEXT_DOMAIN, + "cannot resume send")); + + nvlist_t *resume_nvl = + zfs_send_resume_token_to_nvlist(hdl, resume_token); + if (resume_nvl == NULL) { + /* + * zfs_error_aux has already been set by + * zfs_send_resume_token_to_nvlist + */ + return (zfs_error(hdl, EZFS_FAULT, errbuf)); + } + if (flags->verbose) { + (void) fprintf(stderr, dgettext(TEXT_DOMAIN, + "resume token contents:\n")); + nvlist_print(stderr, resume_nvl); + } + + if (nvlist_lookup_string(resume_nvl, "toname", &toname) != 0 || + nvlist_lookup_uint64(resume_nvl, "object", &resumeobj) != 0 || + nvlist_lookup_uint64(resume_nvl, "offset", &resumeoff) != 0 || + nvlist_lookup_uint64(resume_nvl, "bytes", &bytes) != 0 || + nvlist_lookup_uint64(resume_nvl, "toguid", &toguid) != 0) { + zfs_error_aux(hdl, dgettext(TEXT_DOMAIN, + "resume token is corrupt")); + return (zfs_error(hdl, EZFS_FAULT, errbuf)); + } + fromguid = 0; + (void) nvlist_lookup_uint64(resume_nvl, "fromguid", &fromguid); + + if (flags->embed_data || nvlist_exists(resume_nvl, "embedok")) + lzc_flags |= LZC_SEND_FLAG_EMBED_DATA; + + if (guid_to_name(hdl, toname, toguid, B_FALSE, name) != 0) { + if (zfs_dataset_exists(hdl, toname, ZFS_TYPE_DATASET)) { + zfs_error_aux(hdl, dgettext(TEXT_DOMAIN, + "'%s' is no longer the same snapshot used in " + "the initial send"), toname); + } else { + zfs_error_aux(hdl, dgettext(TEXT_DOMAIN, + "'%s' used in the initial send no longer exists"), + toname); + } + return (zfs_error(hdl, EZFS_BADPATH, errbuf)); + } + zhp = zfs_open(hdl, name, ZFS_TYPE_DATASET); + if (zhp == NULL) { + zfs_error_aux(hdl, dgettext(TEXT_DOMAIN, + "unable to access '%s'"), name); + return (zfs_error(hdl, EZFS_BADPATH, errbuf)); + } + + if (fromguid != 0) { + if (guid_to_name(hdl, toname, fromguid, B_TRUE, name) != 0) { + zfs_error_aux(hdl, dgettext(TEXT_DOMAIN, + "incremental source %#llx no longer exists"), + (longlong_t)fromguid); + return (zfs_error(hdl, EZFS_BADPATH, errbuf)); + } + fromname = name; + } + + if (flags->verbose) { + uint64_t size = 0; + error = lzc_send_space(zhp->zfs_name, fromname, &size); + if (error == 0) + size = MAX(0, (int64_t)(size - bytes)); + send_print_verbose(stderr, zhp->zfs_name, fromname, + size, flags->parsable); + } + + if (!flags->dryrun) { + progress_arg_t pa = { 0 }; + pthread_t tid; + /* + * If progress reporting is requested, spawn a new thread to + * poll ZFS_IOC_SEND_PROGRESS at a regular interval. + */ + if (flags->progress) { + pa.pa_zhp = zhp; + pa.pa_fd = outfd; + pa.pa_parsable = flags->parsable; + + error = pthread_create(&tid, NULL, + send_progress_thread, &pa); + if (error != 0) { + zfs_close(zhp); + return (error); + } + } + + error = lzc_send_resume(zhp->zfs_name, fromname, outfd, + lzc_flags, resumeobj, resumeoff); + + if (flags->progress) { + (void) pthread_cancel(tid); + (void) pthread_join(tid, NULL); + } + + char errbuf[1024]; + (void) snprintf(errbuf, sizeof (errbuf), dgettext(TEXT_DOMAIN, + "warning: cannot send '%s'"), zhp->zfs_name); + + zfs_close(zhp); + + switch (error) { + case 0: + return (0); + case EXDEV: + case ENOENT: + case EDQUOT: + case EFBIG: + case EIO: + case ENOLINK: + case ENOSPC: +#ifdef illumos + case ENOSTR: +#endif + case ENXIO: + case EPIPE: + case ERANGE: + case EFAULT: + case EROFS: + zfs_error_aux(hdl, strerror(errno)); + return (zfs_error(hdl, EZFS_BADBACKUP, errbuf)); + + default: + return (zfs_standard_error(hdl, errno, errbuf)); + } + } + + + zfs_close(zhp); + + return (error); +} + /* * Generate a send stream for the dataset identified by the argument zhp. * @@ -1897,6 +2145,7 @@ recv_destroy(libzfs_handle_t *hdl, const typedef struct guid_to_name_data { uint64_t guid; + boolean_t bookmark_ok; char *name; char *skip; } guid_to_name_data_t; @@ -1905,20 +2154,25 @@ static int guid_to_name_cb(zfs_handle_t *zhp, void *arg) { guid_to_name_data_t *gtnd = arg; + const char *slash; int err; if (gtnd->skip != NULL && - strcmp(zhp->zfs_name, gtnd->skip) == 0) { + (slash = strrchr(zhp->zfs_name, '/')) != NULL && + strcmp(slash + 1, gtnd->skip) == 0) { + zfs_close(zhp); return (0); } - if (zhp->zfs_dmustats.dds_guid == gtnd->guid) { + if (zfs_prop_get_int(zhp, ZFS_PROP_GUID) == gtnd->guid) { (void) strcpy(gtnd->name, zhp->zfs_name); zfs_close(zhp); return (EEXIST); } err = zfs_iter_children(zhp, guid_to_name_cb, gtnd); + if (err != EEXIST && gtnd->bookmark_ok) + err = zfs_iter_bookmarks(zhp, guid_to_name_cb, gtnd); zfs_close(zhp); return (err); } @@ -1932,45 +2186,48 @@ guid_to_name_cb(zfs_handle_t *zhp, void */ static int guid_to_name(libzfs_handle_t *hdl, const char *parent, uint64_t guid, - char *name) + boolean_t bookmark_ok, char *name) { - /* exhaustive search all local snapshots */ char pname[ZFS_MAXNAMELEN]; guid_to_name_data_t gtnd; - int err = 0; - zfs_handle_t *zhp; - char *cp; gtnd.guid = guid; + gtnd.bookmark_ok = bookmark_ok; gtnd.name = name; gtnd.skip = NULL; - (void) strlcpy(pname, parent, sizeof (pname)); - /* - * Search progressively larger portions of the hierarchy. This will + * Search progressively larger portions of the hierarchy, starting + * with the filesystem specified by 'parent'. This will * select the "most local" version of the origin snapshot in the case * that there are multiple matching snapshots in the system. */ - while ((cp = strrchr(pname, '/')) != NULL) { - + (void) strlcpy(pname, parent, sizeof (pname)); + char *cp = strrchr(pname, '@'); + if (cp == NULL) + cp = strchr(pname, '\0'); + for (; cp != NULL; cp = strrchr(pname, '/')) { /* Chop off the last component and open the parent */ *cp = '\0'; - zhp = make_dataset_handle(hdl, pname); + zfs_handle_t *zhp = make_dataset_handle(hdl, pname); if (zhp == NULL) continue; - - err = zfs_iter_children(zhp, guid_to_name_cb, >nd); + int err = guid_to_name_cb(zfs_handle_dup(zhp), >nd); + if (err != EEXIST) + err = zfs_iter_children(zhp, guid_to_name_cb, >nd); + if (err != EEXIST && bookmark_ok) + err = zfs_iter_bookmarks(zhp, guid_to_name_cb, >nd); zfs_close(zhp); if (err == EEXIST) return (0); /* - * Remember the dataset that we already searched, so we - * skip it next time through. + * Remember the last portion of the dataset so we skip it next + * time through (as we've already searched that portion of the + * hierarchy). */ - gtnd.skip = pname; + gtnd.skip = strrchr(pname, '/') + 1; } return (ENOENT); @@ -2568,11 +2825,9 @@ recv_skip(libzfs_handle_t *hdl, int fd, switch (drr->drr_type) { case DRR_BEGIN: - /* NB: not to be used on v2 stream packages */ if (drr->drr_payloadlen != 0) { - zfs_error_aux(hdl, dgettext(TEXT_DOMAIN, - "invalid substream header")); - return (zfs_error(hdl, EZFS_BADSTREAM, errbuf)); + (void) recv_read(hdl, fd, buf, + drr->drr_payloadlen, B_FALSE, NULL); } break; @@ -2633,6 +2888,40 @@ recv_skip(libzfs_handle_t *hdl, int fd, return (-1); } +static void +recv_ecksum_set_aux(libzfs_handle_t *hdl, const char *target_snap, + boolean_t resumable) +{ + char target_fs[ZFS_MAXNAMELEN]; *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@freebsd.org Thu Oct 15 08:49:53 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D06B49B61E7; Thu, 15 Oct 2015 08:49:53 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9C3CF1055; Thu, 15 Oct 2015 08:49:53 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t9F8nqgM014406; Thu, 15 Oct 2015 08:49:52 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9F8nq1F014405; Thu, 15 Oct 2015 08:49:52 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201510150849.t9F8nq1F014405@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Thu, 15 Oct 2015 08:49:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r289363 - stable/10/sys/cam/ctl 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 " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Oct 2015 08:49:53 -0000 Author: mav Date: Thu Oct 15 08:49:52 2015 New Revision: 289363 URL: https://svnweb.freebsd.org/changeset/base/289363 Log: MFC r289017: Add missing vnode lock in case of file modify request. Submitted by: Richard Kojedzinszky Modified: stable/10/sys/cam/ctl/ctl_backend_block.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/cam/ctl/ctl_backend_block.c ============================================================================== --- stable/10/sys/cam/ctl/ctl_backend_block.c Thu Oct 15 08:47:32 2015 (r289362) +++ stable/10/sys/cam/ctl/ctl_backend_block.c Thu Oct 15 08:49:52 2015 (r289363) @@ -2637,9 +2637,11 @@ ctl_be_block_modify(struct ctl_be_block_ error = ctl_be_block_open(be_lun, req); else if (vn_isdisk(be_lun->vn, &error)) error = ctl_be_block_open_dev(be_lun, req); - else if (be_lun->vn->v_type == VREG) + else if (be_lun->vn->v_type == VREG) { + vn_lock(be_lun->vn, LK_SHARED | LK_RETRY); error = ctl_be_block_open_file(be_lun, req); - else + VOP_UNLOCK(be_lun->vn, 0); + } else error = EINVAL; if ((cbe_lun->flags & CTL_LUN_FLAG_NO_MEDIA) && be_lun->vn != NULL) { From owner-svn-src-all@freebsd.org Thu Oct 15 11:42:57 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C1612A123B0; Thu, 15 Oct 2015 11:42:57 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from mail110.syd.optusnet.com.au (mail110.syd.optusnet.com.au [211.29.132.97]) by mx1.freebsd.org (Postfix) with ESMTP id 6513CD66; Thu, 15 Oct 2015 11:42:56 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from c211-30-166-197.carlnfd1.nsw.optusnet.com.au (c211-30-166-197.carlnfd1.nsw.optusnet.com.au [211.30.166.197]) by mail110.syd.optusnet.com.au (Postfix) with ESMTPS id A37C97821E0; Thu, 15 Oct 2015 22:12:04 +1100 (AEDT) Date: Thu, 15 Oct 2015 22:12:03 +1100 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: Konstantin Belousov cc: Garrett Cooper , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r289332 - head/tools/regression/lib/msun In-Reply-To: <20151015072039.GY2257@kib.kiev.ua> Message-ID: <20151015200157.I2174@besplex.bde.org> References: <201510142022.t9EKMC1C088993@repo.freebsd.org> <20151015072039.GY2257@kib.kiev.ua> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Optus-CM-Score: 0 X-Optus-CM-Analysis: v=2.1 cv=cK4dyQqN c=1 sm=1 tr=0 a=KA6XNC2GZCFrdESI5ZmdjQ==:117 a=PO7r1zJSAAAA:8 a=JzwRw_2MAAAA:8 a=kj9zAlcOel0A:10 a=6I5d2MoRAAAA:8 a=9N7FqewjUIADzGhDv98A:9 a=CjuIK1q_8ugA:10 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Oct 2015 11:42:57 -0000 On Thu, 15 Oct 2015, Konstantin Belousov wrote: > On Wed, Oct 14, 2015 at 08:22:12PM +0000, Garrett Cooper wrote: >> Author: ngie >> Date: Wed Oct 14 20:22:12 2015 >> New Revision: 289332 >> URL: https://svnweb.freebsd.org/changeset/base/289332 >> >> Log: >> Fix test-fenv:test_dfl_env when run on some amd64 CPUs >> >> Compare the fields that the AMD [1] and Intel [2] specs say will be >> set once fnstenv returns. >> >> Not all amd64 capable processors zero out the env.__x87.__other field >> (example: AMD Opteron 6308). The AMD64/x64 specs aren't explicit on what the >> env.__x87.__other field will contain after fnstenv is executed, so the values >> in env.__x87.__other could be filled with arbitrary data depending on how the >> CPU-specific implementation of fnstenv. > No Intel or AMD CPU write to __other field at all. No, they all do. Test on old i386 on old A64: Initial state for fegetenv(): X 00000000 7F 12 00 00 00 00 80 1F FF FF FF FF 52 3F 67 C0 --cw- -mxhi --sw- -mxlo --tw- -pad- ----fip---- ----------------- X 00000010 08 00 05 01 48 5F 74 C0 10 00 FF FF -fcs- -opc- ----foff--- -fds- -pad- ----other[16]---------------------- This always fails the test: cw: passes mxhi: passes sw: passes pad+tw: passes fip: always fails. The test wants 0, but the value is always the kernel eip for the instruction that is used to avoid the security hole. (The A64 CPU gives the security hole, and the kernel code is pessimal so it apparently runs always on the first use of the NPX by a thread.) fcs: always fails. The test wants 0, but the value is always the kernel cs, as above. opc: always fails. The value is the opcode for the kernel instruction foff: always fails. The value is the data address for the kernel instruction fds: always fails. The value is the kernel ds extended by padding with 1's Modified state for fxsave: X 0000001C 7F 12 00 38 80 00 F0 3F EE EE EE EE EE EE EE EE X 0000002C EE EE EE EE EE EE EE EE 80 1F 00 00 FF FF 00 00 Partial result of an fxsave instruction after fld1; fstl in the test program to try to change the kernel data. A byte value of EE indicates that the byte was written by memset() and not overwritten by fxsave. There are 16 such bytes. These correspond to __other[16]. You are probably thinking of fxsave not writing these, but fegetenv() doesn't use fxsave and always writes these. I think fxsave on all Intel CPUs write these (freefall's Xeon does), and all AMD CPUs write these after an error. The format is slightly different. All the other values seem to be the same as for fegetenv(). Modified state for fegetenv(): X 0000005C 7F 12 00 00 00 00 80 1F FF FF FF FF 63 82 04 08 --cw- -mxhi --sw- -mxlo --tw- -pad- ----fip---- ----------------- X 0000006C 1F 00 1D 05 A0 92 04 08 2F 00 FF FF -fcs- -opc- ----foff--- -fds- -pad- ----other[16]---------------------- This is from the same state as the fxsave. It has the following modifications relative to the initial state: - all kernel data changed to user addresses, as intended Modified state for fnsave: X 0000003C 7F 12 FF FF 00 00 FF FF FF FF FF FF 63 82 04 08 X 0000004C 1F 00 1D 05 A0 92 04 08 2F 00 FF FF This is from the same state as the fxsave. It has the same format and values as the state saved by fegetenv() except 2 padding fields are padded with 1's and not repurposed for mxcsr. Modified state for fnstenv: X 00000078 7F 12 FF FF 00 00 FF FF FF FF FF FF 63 82 04 08 X 00000088 1F 00 1D 05 A0 92 04 08 2F 00 FF FF EE EE EE EE This is from the same state as the fxsave. It has the same format and values as the state saved by fnsave. So last instruction/data values are always in fenv_t on i386. They are undocumented, but might be used. On amd64 in 64-bit mode, they don't fit in the hardware format used by fnstenv. fenv_t extends this format only to append mxcsr. amd64 should have used the env part of the better-designed 64-bit fxsave format. Test on -current amd64 on Xeon (freefall): early fegetenv(): X 00000000 7f 03 ff ff 00 00 ff ff ff ff ff ff 00 00 00 00 --cw- -pad- --sw- -pad- --tw- -pad- ----------- X 00000010 00 00 00 00 00 00 00 00 00 00 ff ff 80 1f 00 00 ---other[16]------------------------ ---mxcsr--- The test passes. The 2 bytes at the end of other[20] are reserved and not part of the last instruction/data. They are padded normally with 1's and not with 0's. The default env hard-codes the assumption that these reserved bits are 1's. Since Xeons are not AMD CPUs, the kernel doesn't execute the code that closes the security hole and all the last instruction/data values are 0. These values are written. later fxsave: X 00000020 7f 03 00 00 00 00 1c 05 75 08 40 00 43 00 00 00 --cw- --sw- tw 00 -opc- ----fip---- ----fcs---- X 00000030 20 62 60 00 3b 00 00 00 80 1f 00 00 ff ff 00 00 ----fdp---- ----fds---- ---mxcsr--- -mxcsrmask- fxsave always stores the last instruction/data values on Intel CPUs. They have the nonzero user values. The format is the 64-bit format. I now understand why it looked looked 32-bit format before -- it has segment registers instead of 64-bit offsets, but that is apparently from the memory model being small -- seg:offset32 is stored instead of rip and edp if the operand size is 32 bits. fcs == %cs. %ds is 0 but fds == %ss. Later fegetenv(): X 00000060 7f 03 ff ff 00 00 ff ff ff ff ff ff 75 08 40 00 X 00000070 43 00 1c 05 20 62 60 00 3b 00 ff ff 80 1f 00 00 Later fnsave: X 00000040 7f 03 ff ff 00 00 ff ff ff ff ff ff 75 08 40 00 X 00000050 43 00 1c 05 20 62 60 00 3b 00 ff ff 00 00 00 00 Later fnstenv: X 00000080 7f 03 ff ff 00 00 ff ff ff ff ff ff 75 08 40 00 X 00000090 43 00 1c 05 20 62 60 00 3b 00 ff ff ee ee ee ee Everything works right and the values are the same as for fxsave except for rearrangement and padding, but only because 64-bit offsets are not needed. This shows that: - it is the __other field that should be least MD, not most MD, since it has no reserved padding bits and just doesn't support 64-bit offsets - there seem to be no hardware differences for the __other field as saved by fnstenv and fegetenv(). The AMD bug/optimization is only for fxsave. - however, the FreeBSD fix for the AMD bug/optimization gives different initial values in the __other field for AMD CPUs only. I don't like it, but thought it was smarter than that. Perhaps it is, but I tested my version. My version is more efficient, and this involves doing the cleaning more unconditionally. For the first use of the NPX by a thread, it would be efficient enough to clean using fstenv; clean; fldenv before the normal fxrstor. But cleaning is needed on every NPX context switch, and we don't want to do fstenv; clean; fldenv on every switch. The AMD bug/optimization breaks some debugging methods and some error handling in applications, and the FreeBSD cleaning makes this worse. An application could try to use the last instruction/ data info for its error handling and use methods that preserve it internally. But the info is lost on any context switch. Even if no other thread uses the NPX, cleaning guarantees clobbering of the info when a thread is switched back to. It is lost even after an exception where AMD hardware doesn't lose it. Its loss is visible to debuggers -- debuggers will usually see the result of the cleaning. Bruce From owner-svn-src-all@freebsd.org Thu Oct 15 15:20:13 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 16184A15032; Thu, 15 Oct 2015 15:20:13 +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 B546E1E38; Thu, 15 Oct 2015 15:20: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 SAA05156; Thu, 15 Oct 2015 18:19:59 +0300 (EEST) (envelope-from avg@FreeBSD.org) Received: from localhost ([127.0.0.1]) by porto.starpoint.kiev.ua with esmtp (Exim 4.34 (FreeBSD)) id 1ZmkJz-000ML9-HX; Thu, 15 Oct 2015 18:19:59 +0300 Subject: Re: svn commit: r289310 - vendor-sys/illumos/dist/common/zfs vendor-sys/illumos/dist/uts/common vendor-sys/illumos/dist/uts/common/crypto vendor-sys/illumos/dist/uts/common/crypto/io vendor-sys/illumos... To: Alexander Motin , src-committers@FreeBSD.org, svn-src-all@FreeBSD.org, svn-src-vendor@FreeBSD.org References: <201510141112.t9EBClT3022215@repo.freebsd.org> From: Andriy Gapon Message-ID: <561FC3EC.7020706@FreeBSD.org> Date: Thu, 15 Oct 2015 17:19:08 +0200 User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.2.0 MIME-Version: 1.0 In-Reply-To: <201510141112.t9EBClT3022215@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 " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Oct 2015 15:20:13 -0000 On 14/10/2015 13:12, Alexander Motin wrote: > Author: mav > Date: Wed Oct 14 11:12:47 2015 > New Revision: 289310 > URL: https://svnweb.freebsd.org/changeset/base/289310 > > Log: > 4185 add new cryptographic checksums to ZFS: SHA-512, Skein, Edon-R Thank you very much for importing this complex commit. I have one question below. > Reviewed by: George Wilson > Reviewed by: Prakash Surya > Reviewed by: Saso Kiselkov > Reviewed by: Richard Lowe > Approved by: Garrett D'Amore > Author: Matthew Ahrens > > illumos/illumos-gate@45818ee124adeaaf947698996b4f4c722afc6d1f > > Added: > vendor-sys/illumos/dist/uts/common/crypto/ > vendor-sys/illumos/dist/uts/common/crypto/io/ > vendor-sys/illumos/dist/uts/common/crypto/io/edonr_mod.c (contents, props changed) > vendor-sys/illumos/dist/uts/common/crypto/io/skein_mod.c (contents, props changed) Do we actually need these two file in the vendor area? They look like illumos crypto drivers to me, so I think that it is unlikely that we will have a use for them. Or do you have some big plans about that? :-) > vendor-sys/illumos/dist/uts/common/fs/zfs/edonr_zfs.c (contents, props changed) > vendor-sys/illumos/dist/uts/common/fs/zfs/skein_zfs.c (contents, props changed) > vendor-sys/illumos/dist/uts/common/sys/edonr.h (contents, props changed) > vendor-sys/illumos/dist/uts/common/sys/skein.h (contents, props changed) -- Andriy Gapon From owner-svn-src-all@freebsd.org Thu Oct 15 15:27:18 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 13036A152B8; Thu, 15 Oct 2015 15:27:18 +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 3B525A93; Thu, 15 Oct 2015 15:27:16 +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 SAA05269; Thu, 15 Oct 2015 18:27:14 +0300 (EEST) (envelope-from avg@FreeBSD.org) Received: from localhost ([127.0.0.1]) by porto.starpoint.kiev.ua with esmtp (Exim 4.34 (FreeBSD)) id 1ZmkR0-000MM4-5w; Thu, 15 Oct 2015 18:27:14 +0300 Subject: Re: svn commit: r289310 - vendor-sys/illumos/dist/common/zfs vendor-sys/illumos/dist/uts/common vendor-sys/illumos/dist/uts/common/crypto vendor-sys/illumos/dist/uts/common/crypto/io vendor-sys/illumos... To: Alexander Motin , src-committers@FreeBSD.org, svn-src-all@FreeBSD.org, svn-src-vendor@FreeBSD.org References: <201510141112.t9EBCmFZ022230@repo.freebsd.org> From: Andriy Gapon X-Enigmail-Draft-Status: N1110 Message-ID: <561FC5A0.3040909@FreeBSD.org> Date: Thu, 15 Oct 2015 17:26:24 +0200 User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.2.0 MIME-Version: 1.0 In-Reply-To: <201510141112.t9EBCmFZ022230@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 " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Oct 2015 15:27:18 -0000 On 14/10/2015 13:12, Alexander Motin wrote: > Author: mav > Date: Wed Oct 14 11:12:47 2015 > New Revision: 289310 > URL: https://svnweb.freebsd.org/changeset/base/289310 > > Log: > 4185 add new cryptographic checksums to ZFS: SHA-512, Skein, Edon-R > > Reviewed by: George Wilson > Reviewed by: Prakash Surya > Reviewed by: Saso Kiselkov > Reviewed by: Richard Lowe > Approved by: Garrett D'Amore > Author: Matthew Ahrens > > illumos/illumos-gate@45818ee124adeaaf947698996b4f4c722afc6d1f > > Added: > vendor/illumos/dist/common/crypto/ > vendor/illumos/dist/common/crypto/edonr/ > vendor/illumos/dist/common/crypto/edonr/edonr.c (contents, props changed) > vendor/illumos/dist/common/crypto/edonr/edonr_byteorder.h (contents, props changed) > vendor/illumos/dist/common/crypto/skein/ > vendor/illumos/dist/common/crypto/skein/THIRDPARTYLICENSE (contents, props changed) > vendor/illumos/dist/common/crypto/skein/THIRDPARTYLICENSE.descrip (contents, props changed) > vendor/illumos/dist/common/crypto/skein/skein.c (contents, props changed) > vendor/illumos/dist/common/crypto/skein/skein_block.c (contents, props changed) > vendor/illumos/dist/common/crypto/skein/skein_impl.h (contents, props changed) > vendor/illumos/dist/common/crypto/skein/skein_iv.c (contents, props changed) > vendor/illumos/dist/common/crypto/skein/skein_port.h (contents, props changed) It seems that these are pieces of code that can be used by both the userland and the kernel. I think that previously we used to import such code into illumos-sys and then integrate it into sys/cddl (e.g. common/zfs/). Perhaps it is worthwhile following that convention in this case as well? > Modified: > vendor/illumos/dist/lib/libzfs/common/libzfs_dataset.c > vendor/illumos/dist/man/man5/zpool-features.5 Also, we probably need to synchronize man/man1m/zfs.1m in our vendor area with the latest upstream version. Even though we do not directly use that file, it still would be easier to make the future imports and also to compare (and to keep in sync) our version of the manual with the upstream version. Thank you for doing all the heavy lifting with this change! -- Andriy Gapon From owner-svn-src-all@freebsd.org Thu Oct 15 15:41:10 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C6D70A15684; Thu, 15 Oct 2015 15:41:10 +0000 (UTC) (envelope-from mavbsd@gmail.com) Received: from mail-qk0-x235.google.com (mail-qk0-x235.google.com [IPv6:2607:f8b0:400d:c09::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 5F0B31CDE; Thu, 15 Oct 2015 15:41:07 +0000 (UTC) (envelope-from mavbsd@gmail.com) Received: by qkas79 with SMTP id s79so40673099qka.0; Thu, 15 Oct 2015 08:41:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:message-id:date:from:user-agent:mime-version:to:subject :references:in-reply-to:content-type:content-transfer-encoding; bh=KkR5hMPZ4NV5lAb9UjLHdvYoH+Axy7zKlbzrhUo2Wj8=; b=cozQg4vgjX33ezSQl5lsxraf/Nm087kbzOAamH4agRji3gKZbF6hUP7y3JkVS4dg6n 9NKdVrsORXcGM4DZNJUYj2vgBUfuir5sDd65H14Jqu7vYFqFJPQjg1nEQVtPmfxooB+T cCXc4Zmw7yy9nTw6UbRy++0Oi8g0zlbruGXrhV++oeVFefccPwft4nDCMhghn9WXnNnF o6A2Q9JFSP1svvDsneC1MJU/UVkbOgjcyYqbPn8t15x7CDdNyHItHqeM5jRvjAFUSOqy Q6vmqLBHwSMS4GFcb44dCaInHYvMQeRVgi6Siyor8DihalHUlsxYBpQxGNNYYrHAxil0 3jBg== X-Received: by 10.194.11.71 with SMTP id o7mr11514434wjb.75.1444923666389; Thu, 15 Oct 2015 08:41:06 -0700 (PDT) Received: from mavbook.mavhome.dp.ua ([2a01:d0:c0a9:3:c685:8ff:fe11:1aa2]) by smtp.googlemail.com with ESMTPSA id i10sm17163361wjz.41.2015.10.15.08.41.05 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 15 Oct 2015 08:41:05 -0700 (PDT) Sender: Alexander Motin Message-ID: <561FC90F.4090706@FreeBSD.org> Date: Thu, 15 Oct 2015 18:41:03 +0300 From: Alexander Motin User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:31.0) Gecko/20100101 Thunderbird/31.6.0 MIME-Version: 1.0 To: Andriy Gapon , src-committers@FreeBSD.org, svn-src-all@FreeBSD.org, svn-src-vendor@FreeBSD.org Subject: Re: svn commit: r289310 - vendor-sys/illumos/dist/common/zfs vendor-sys/illumos/dist/uts/common vendor-sys/illumos/dist/uts/common/crypto vendor-sys/illumos/dist/uts/common/crypto/io vendor-sys/illumos... References: <201510141112.t9EBCmFZ022230@repo.freebsd.org> <561FC5A0.3040909@FreeBSD.org> In-Reply-To: <561FC5A0.3040909@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 " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Oct 2015 15:41:11 -0000 On 15.10.2015 18:26, Andriy Gapon wrote: > On 14/10/2015 13:12, Alexander Motin wrote: >> Author: mav >> Date: Wed Oct 14 11:12:47 2015 >> New Revision: 289310 >> URL: https://svnweb.freebsd.org/changeset/base/289310 >> >> Log: >> 4185 add new cryptographic checksums to ZFS: SHA-512, Skein, Edon-R >> >> Reviewed by: George Wilson >> Reviewed by: Prakash Surya >> Reviewed by: Saso Kiselkov >> Reviewed by: Richard Lowe >> Approved by: Garrett D'Amore >> Author: Matthew Ahrens >> >> illumos/illumos-gate@45818ee124adeaaf947698996b4f4c722afc6d1f >> >> Added: >> vendor/illumos/dist/common/crypto/ >> vendor/illumos/dist/common/crypto/edonr/ >> vendor/illumos/dist/common/crypto/edonr/edonr.c (contents, props changed) >> vendor/illumos/dist/common/crypto/edonr/edonr_byteorder.h (contents, props changed) >> vendor/illumos/dist/common/crypto/skein/ >> vendor/illumos/dist/common/crypto/skein/THIRDPARTYLICENSE (contents, props changed) >> vendor/illumos/dist/common/crypto/skein/THIRDPARTYLICENSE.descrip (contents, props changed) >> vendor/illumos/dist/common/crypto/skein/skein.c (contents, props changed) >> vendor/illumos/dist/common/crypto/skein/skein_block.c (contents, props changed) >> vendor/illumos/dist/common/crypto/skein/skein_impl.h (contents, props changed) >> vendor/illumos/dist/common/crypto/skein/skein_iv.c (contents, props changed) >> vendor/illumos/dist/common/crypto/skein/skein_port.h (contents, props changed) > > It seems that these are pieces of code that can be used by both the > userland and the kernel. I think that previously we used to import such > code into illumos-sys and then integrate it into sys/cddl (e.g. > common/zfs/). Perhaps it is worthwhile following that convention in > this case as well? I haven't decided what to do with this specific case. As I understand, now we are using FreeBSD's native crypto code instead of illumos' one. I was thinking about importing this commit only in infrastructural parts, until respective algorithms are implemented in our native crypto. I think it should not be a problem for Skein, since according to comments it is in public domain. About Edon-R I am not sure, since it seems to be CDDL. -- Alexander Motin From owner-svn-src-all@freebsd.org Thu Oct 15 15:44:12 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 745A5A1581B; Thu, 15 Oct 2015 15:44:12 +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 C994BFC; Thu, 15 Oct 2015 15:44:10 +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 SAA05522; Thu, 15 Oct 2015 18:44:09 +0300 (EEST) (envelope-from avg@FreeBSD.org) Received: from localhost ([127.0.0.1]) by porto.starpoint.kiev.ua with esmtp (Exim 4.34 (FreeBSD)) id 1ZmkhM-000MNr-S1; Thu, 15 Oct 2015 18:44:08 +0300 Subject: Re: svn commit: r289310 - vendor-sys/illumos/dist/common/zfs vendor-sys/illumos/dist/uts/common vendor-sys/illumos/dist/uts/common/crypto vendor-sys/illumos/dist/uts/common/crypto/io vendor-sys/illumos... To: Alexander Motin , src-committers@FreeBSD.org, svn-src-all@FreeBSD.org, svn-src-vendor@FreeBSD.org References: <201510141112.t9EBCmFZ022230@repo.freebsd.org> <561FC5A0.3040909@FreeBSD.org> <561FC90F.4090706@FreeBSD.org> From: Andriy Gapon Message-ID: <561FC996.3020207@FreeBSD.org> Date: Thu, 15 Oct 2015 17:43:18 +0200 User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.2.0 MIME-Version: 1.0 In-Reply-To: <561FC90F.4090706@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 " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Oct 2015 15:44:12 -0000 On 15/10/2015 17:41, Alexander Motin wrote: > On 15.10.2015 18:26, Andriy Gapon wrote: >> On 14/10/2015 13:12, Alexander Motin wrote: >>> Author: mav >>> Date: Wed Oct 14 11:12:47 2015 >>> New Revision: 289310 >>> URL: https://svnweb.freebsd.org/changeset/base/289310 >>> >>> Log: >>> 4185 add new cryptographic checksums to ZFS: SHA-512, Skein, Edon-R >>> >>> Reviewed by: George Wilson >>> Reviewed by: Prakash Surya >>> Reviewed by: Saso Kiselkov >>> Reviewed by: Richard Lowe >>> Approved by: Garrett D'Amore >>> Author: Matthew Ahrens >>> >>> illumos/illumos-gate@45818ee124adeaaf947698996b4f4c722afc6d1f >>> >>> Added: >>> vendor/illumos/dist/common/crypto/ >>> vendor/illumos/dist/common/crypto/edonr/ >>> vendor/illumos/dist/common/crypto/edonr/edonr.c (contents, props changed) >>> vendor/illumos/dist/common/crypto/edonr/edonr_byteorder.h (contents, props changed) >>> vendor/illumos/dist/common/crypto/skein/ >>> vendor/illumos/dist/common/crypto/skein/THIRDPARTYLICENSE (contents, props changed) >>> vendor/illumos/dist/common/crypto/skein/THIRDPARTYLICENSE.descrip (contents, props changed) >>> vendor/illumos/dist/common/crypto/skein/skein.c (contents, props changed) >>> vendor/illumos/dist/common/crypto/skein/skein_block.c (contents, props changed) >>> vendor/illumos/dist/common/crypto/skein/skein_impl.h (contents, props changed) >>> vendor/illumos/dist/common/crypto/skein/skein_iv.c (contents, props changed) >>> vendor/illumos/dist/common/crypto/skein/skein_port.h (contents, props changed) >> >> It seems that these are pieces of code that can be used by both the >> userland and the kernel. I think that previously we used to import such >> code into illumos-sys and then integrate it into sys/cddl (e.g. >> common/zfs/). Perhaps it is worthwhile following that convention in >> this case as well? > > I haven't decided what to do with this specific case. As I understand, > now we are using FreeBSD's native crypto code instead of illumos' one. I > was thinking about importing this commit only in infrastructural parts, > until respective algorithms are implemented in our native crypto. I > think it should not be a problem for Skein, since according to comments > it is in public domain. About Edon-R I am not sure, since it seems to be > CDDL. > This is confusing... It seems that like you replied to my question in another email, not the quoted one :-) -- Andriy Gapon From owner-svn-src-all@freebsd.org Thu Oct 15 15:48:56 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id EC7CFA1588E; Thu, 15 Oct 2015 15:48:55 +0000 (UTC) (envelope-from mavbsd@gmail.com) Received: from mail-lf0-x22f.google.com (mail-lf0-x22f.google.com [IPv6:2a00:1450:4010:c07::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 6E0262AA; Thu, 15 Oct 2015 15:48:55 +0000 (UTC) (envelope-from mavbsd@gmail.com) Received: by lfeh64 with SMTP id h64so32734632lfe.3; Thu, 15 Oct 2015 08:48:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:message-id:date:from:user-agent:mime-version:to:subject :references:in-reply-to:content-type:content-transfer-encoding; bh=/MmDOb0XE/onoZsRyjwrB80KsCDRsESvN4IKf5SpkQk=; b=dmcs7avlMzVfsv6jNtfVqZ9UMV2SeaQ+7vLt4RgY3HrZu5Km5rlNBeE9ya3XUkv0qQ 2QLbWTESokbLGOhH6jvkR1yH1ceD2fwdRAPzx8uyd62KIGsib1RLVe/zV7/SGS8TUan2 7coOilBQXfRliieq2eWTEdMafq18hUAf7unhF5dd55MtDWW4xWr7L9fbNfTt6B+7FZWP fNszSU2AAeIZcT7Ds2QbvwZr1/2p5aJPj0XLeMqJxsis/bFJa/WARXJThBCkYg9tpt/y wQOcBJkf6vICBq+xhQhiM2SlFr5mfsuoNJ5fYsh0GYXwexKo0vz0bpZf6ly/i4eEiuDW xvig== X-Received: by 10.180.20.1 with SMTP id j1mr27954638wie.78.1444924131751; Thu, 15 Oct 2015 08:48:51 -0700 (PDT) Received: from mavbook.mavhome.dp.ua ([2a01:d0:c0a9:3:c685:8ff:fe11:1aa2]) by smtp.googlemail.com with ESMTPSA id xa5sm17196280wjc.20.2015.10.15.08.48.50 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 15 Oct 2015 08:48:51 -0700 (PDT) Sender: Alexander Motin Message-ID: <561FCAE1.1040504@FreeBSD.org> Date: Thu, 15 Oct 2015 18:48:49 +0300 From: Alexander Motin User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:31.0) Gecko/20100101 Thunderbird/31.6.0 MIME-Version: 1.0 To: Andriy Gapon , src-committers@FreeBSD.org, svn-src-all@FreeBSD.org, svn-src-vendor@FreeBSD.org Subject: Re: svn commit: r289310 - vendor-sys/illumos/dist/common/zfs vendor-sys/illumos/dist/uts/common vendor-sys/illumos/dist/uts/common/crypto vendor-sys/illumos/dist/uts/common/crypto/io vendor-sys/illumos... References: <201510141112.t9EBCmFZ022230@repo.freebsd.org> <561FC5A0.3040909@FreeBSD.org> <561FC90F.4090706@FreeBSD.org> <561FC996.3020207@FreeBSD.org> In-Reply-To: <561FC996.3020207@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 " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Oct 2015 15:48:56 -0000 On 15.10.2015 18:43, Andriy Gapon wrote: > On 15/10/2015 17:41, Alexander Motin wrote: >> On 15.10.2015 18:26, Andriy Gapon wrote: >>> On 14/10/2015 13:12, Alexander Motin wrote: >>>> Author: mav >>>> Date: Wed Oct 14 11:12:47 2015 >>>> New Revision: 289310 >>>> URL: https://svnweb.freebsd.org/changeset/base/289310 >>>> >>>> Log: >>>> 4185 add new cryptographic checksums to ZFS: SHA-512, Skein, Edon-R >>>> >>>> Reviewed by: George Wilson >>>> Reviewed by: Prakash Surya >>>> Reviewed by: Saso Kiselkov >>>> Reviewed by: Richard Lowe >>>> Approved by: Garrett D'Amore >>>> Author: Matthew Ahrens >>>> >>>> illumos/illumos-gate@45818ee124adeaaf947698996b4f4c722afc6d1f >>>> >>>> Added: >>>> vendor/illumos/dist/common/crypto/ >>>> vendor/illumos/dist/common/crypto/edonr/ >>>> vendor/illumos/dist/common/crypto/edonr/edonr.c (contents, props changed) >>>> vendor/illumos/dist/common/crypto/edonr/edonr_byteorder.h (contents, props changed) >>>> vendor/illumos/dist/common/crypto/skein/ >>>> vendor/illumos/dist/common/crypto/skein/THIRDPARTYLICENSE (contents, props changed) >>>> vendor/illumos/dist/common/crypto/skein/THIRDPARTYLICENSE.descrip (contents, props changed) >>>> vendor/illumos/dist/common/crypto/skein/skein.c (contents, props changed) >>>> vendor/illumos/dist/common/crypto/skein/skein_block.c (contents, props changed) >>>> vendor/illumos/dist/common/crypto/skein/skein_impl.h (contents, props changed) >>>> vendor/illumos/dist/common/crypto/skein/skein_iv.c (contents, props changed) >>>> vendor/illumos/dist/common/crypto/skein/skein_port.h (contents, props changed) >>> >>> It seems that these are pieces of code that can be used by both the >>> userland and the kernel. I think that previously we used to import such >>> code into illumos-sys and then integrate it into sys/cddl (e.g. >>> common/zfs/). Perhaps it is worthwhile following that convention in >>> this case as well? >> >> I haven't decided what to do with this specific case. As I understand, >> now we are using FreeBSD's native crypto code instead of illumos' one. I >> was thinking about importing this commit only in infrastructural parts, >> until respective algorithms are implemented in our native crypto. I >> think it should not be a problem for Skein, since according to comments >> it is in public domain. About Edon-R I am not sure, since it seems to be >> CDDL. > > This is confusing... It seems that like you replied to my question in > another email, not the quoted one :-) What other email? You've told me that I put code into the wrong place, and I replied that it may be irrelevant, since I am not sure we should import this code to FreeBSD as-is to its place in illumos. -- Alexander Motin From owner-svn-src-all@freebsd.org Thu Oct 15 15:49:13 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 26508A158E3 for ; Thu, 15 Oct 2015 15:49:13 +0000 (UTC) (envelope-from shawn.webb@hardenedbsd.org) Received: from mail-qk0-f169.google.com (mail-qk0-f169.google.com [209.85.220.169]) (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 D832561B for ; Thu, 15 Oct 2015 15:49:12 +0000 (UTC) (envelope-from shawn.webb@hardenedbsd.org) Received: by qkap81 with SMTP id p81so40957608qka.2 for ; Thu, 15 Oct 2015 08:49:06 -0700 (PDT) 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=a8gfLratcTHOa0fJRjfmQlH3ZY2EGc+xLYvGHDFRwHE=; b=RIQYUxROmH/gjE732mwpJ7GrtJfvqwOzdoqaiogu1em1DnuxwcioR7v1z2wzPiQZuW LdBqOUmO0FCf3rw/oovzDN+zDkdlhNeSoLVHWVPPtX4oLPl9tHKV/2MF9q27SNtlqkvG dKG0hMcrfozemHwDyTd5jgw1Vrfpn34DuWZH1eI0yQ5JUkIjXFHUJLUM1LnmHgFM12Pq P+lXAvkgHspOLBaoXaJ1dYJJHKhIlFONn5Dn0XrEdq4LRCp30cOdUFlgGOTk+kdq+JdN zAYaA6FmP/cPWZS8E9vbklHYO4bpHds9lQEKO8vPoos8YFn9K0smvp88YnkSeZKFwTjQ uqSg== X-Gm-Message-State: ALoCoQnku59sqYdkq+0tgYtkYyN2h2MDVFxKq32PbArg6tjV/7qlQE67O29IUq6g+LPg4/P1R4mL X-Received: by 10.55.25.141 with SMTP id 13mr12742739qkz.105.1444924145818; Thu, 15 Oct 2015 08:49:05 -0700 (PDT) Received: from mutt-hardenedbsd ([63.88.83.104]) by smtp.gmail.com with ESMTPSA id q32sm5711120qkq.1.2015.10.15.08.49.04 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 15 Oct 2015 08:49:05 -0700 (PDT) Date: Thu, 15 Oct 2015 11:49:02 -0400 From: Shawn Webb To: Andriy Gapon Cc: Alexander Motin , src-committers@FreeBSD.org, svn-src-all@FreeBSD.org, svn-src-vendor@FreeBSD.org Subject: Re: svn commit: r289310 - vendor-sys/illumos/dist/common/zfs vendor-sys/illumos/dist/uts/common vendor-sys/illumos/dist/uts/common/crypto vendor-sys/illumos/dist/uts/common/crypto/io vendor-sys/illumos... Message-ID: <20151015154853.GA60326@mutt-hardenedbsd> References: <201510141112.t9EBClT3022215@repo.freebsd.org> <561FC3EC.7020706@FreeBSD.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="envbJBWh7q8WU6mo" Content-Disposition: inline In-Reply-To: <561FC3EC.7020706@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.23 (2014-03-12) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Oct 2015 15:49:13 -0000 --envbJBWh7q8WU6mo Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Oct 15, 2015 at 05:19:08PM +0200, Andriy Gapon wrote: > On 14/10/2015 13:12, Alexander Motin wrote: > > Author: mav > > Date: Wed Oct 14 11:12:47 2015 > > New Revision: 289310 > > URL: https://svnweb.freebsd.org/changeset/base/289310 > >=20 > > Log: > > 4185 add new cryptographic checksums to ZFS: SHA-512, Skein, Edon-R >=20 > Thank you very much for importing this complex commit. > I have one question below. >=20 > > Reviewed by: George Wilson > > Reviewed by: Prakash Surya > > Reviewed by: Saso Kiselkov > > Reviewed by: Richard Lowe > > Approved by: Garrett D'Amore > > Author: Matthew Ahrens > > =20 > > illumos/illumos-gate@45818ee124adeaaf947698996b4f4c722afc6d1f > >=20 > > Added: > > vendor-sys/illumos/dist/uts/common/crypto/ > > vendor-sys/illumos/dist/uts/common/crypto/io/ > > vendor-sys/illumos/dist/uts/common/crypto/io/edonr_mod.c (contents,= props changed) > > vendor-sys/illumos/dist/uts/common/crypto/io/skein_mod.c (contents,= props changed) >=20 > Do we actually need these two file in the vendor area? > They look like illumos crypto drivers to me, so I think that it is > unlikely that we will have a use for them. Or do you have some big > plans about that? :-) =46rom a securitiy engineering perspective, it would be extremely nice to be able to use these additional hashing algorithms from elsewhere. Would it be possible to genericize them and integrate the ZFS support with that? HardenedBSD has a feature called Integriforce, which allows us to validate executables against a pre-computed list of hashes loaded into the kernel. It'd be extremely nice to add support for these other hashing algorithms. Thanks, --=20 Shawn Webb HardenedBSD GPG Key ID: 0x6A84658F52456EEE GPG Key Fingerprint: 2ABA B6BD EF6A F486 BE89 3D9E 6A84 658F 5245 6EEE --envbJBWh7q8WU6mo Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQIcBAEBCAAGBQJWH8rjAAoJEGqEZY9SRW7uIcEP/R8+znW/japTaYM6m74NizEJ tJAQ1HeewOtiI4ujQU+fGs8WkEyQNIa/hPI3IUOVBNKZDp31L3cHZnr6Eeo1UWHM pZUjIv1SzYHL1RhXVqNPWIruL8IoidOaYk/aftifMb/2nqhBfkEpOutPGwWx42UB 2s/ZaUtVzL/Ulq5mudxm3uZJtcIxlUP+tjTlWAm+62I4DxiH0PCEWzSNa/4JIjua g7YIp3u6fIZyMB0CPAoQsGFbudXAA55ETcPaAoSmc1+tCLAr2Dd8JWyW5pkBVeCm tiQSybyBZQK4h/ti/ei8EODi9Q5Rb18SRjgVzfHknP9/rBRzgo9fsLtgGlGFSc7N k1JEF9HMsZ85MIE2H+sqmKF7l/s8pg4rSqMQ6gzDWyzeYEkjoHhY8/krI4SLJJ1x afAIuHChqiBCEy04+w4Z8CQ1SXGrziKhD//akF+/WPJ0N5G8uPTMLNzDqd/XUYJI cKC34i4/625Fq51Aaf/olvoI+GUHQ0zGbawTEtafo3tFNcao4MNxS8hQPef3DIov jG0aaU7thVC2wYX0nQ/3SLTpLSW0zp1yYMgVv8jT+QN8nMk9gwbp/PsNnS2qYv5a hW8Qo8Ra+aoYN8h3Ym9dQVpd5Ga7nMRDvGs/uY2HPmbl0oemGLiOQBvVbk36MYth CKicxOBdalhE4wM7qzRy =o8so -----END PGP SIGNATURE----- --envbJBWh7q8WU6mo-- From owner-svn-src-all@freebsd.org Thu Oct 15 16:06:12 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1606BA15C76; Thu, 15 Oct 2015 16:06: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 D6E2DF64; Thu, 15 Oct 2015 16:06: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 t9FG6A13048776; Thu, 15 Oct 2015 16:06:10 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9FG6A7O048775; Thu, 15 Oct 2015 16:06:10 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201510151606.t9FG6A7O048775@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Thu, 15 Oct 2015 16:06: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: r289367 - stable/10/sbin/newfs_msdos 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 " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Oct 2015 16:06:12 -0000 Author: emaste Date: Thu Oct 15 16:06:10 2015 New Revision: 289367 URL: https://svnweb.freebsd.org/changeset/base/289367 Log: MFC r264889: newfs_msdos: Correct min/max cluster counts for FAT12/16/32 FAT12 1..4084 FAT16 4085..65524 FAT32 65525.. This is required for interoperability with other FAT implementations, and in particular UEFI. Obtained from: NetBSD Sponsored by: The FreeBSD Foundation Modified: stable/10/sbin/newfs_msdos/newfs_msdos.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sbin/newfs_msdos/newfs_msdos.c ============================================================================== --- stable/10/sbin/newfs_msdos/newfs_msdos.c Thu Oct 15 15:51:40 2015 (r289366) +++ stable/10/sbin/newfs_msdos/newfs_msdos.c Thu Oct 15 16:06:10 2015 (r289367) @@ -64,11 +64,11 @@ static const char rcsid[] = #define DEFRDE 512 /* default root directory entries */ #define RESFTE 2 /* reserved FAT entries */ #define MINCLS12 1U /* minimum FAT12 clusters */ -#define MINCLS16 0x1000U /* minimum FAT16 clusters */ -#define MINCLS32 2U /* minimum FAT32 clusters */ -#define MAXCLS12 0xfedU /* maximum FAT12 clusters */ -#define MAXCLS16 0xfff5U /* maximum FAT16 clusters */ -#define MAXCLS32 0xffffff5U /* maximum FAT32 clusters */ +#define MINCLS16 0xff5U /* minimum FAT16 clusters */ +#define MINCLS32 0xfff5U /* minimum FAT32 clusters */ +#define MAXCLS12 0xff4U /* maximum FAT12 clusters */ +#define MAXCLS16 0xfff4U /* maximum FAT16 clusters */ +#define MAXCLS32 0xffffff4U /* maximum FAT32 clusters */ #define mincls(fat) ((fat) == 12 ? MINCLS12 : \ (fat) == 16 ? MINCLS16 : \ From owner-svn-src-all@freebsd.org Thu Oct 15 16:07:16 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6FA33A15CD9; Thu, 15 Oct 2015 16:07:16 +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 3283010CA; Thu, 15 Oct 2015 16:07: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 t9FG7FRX048864; Thu, 15 Oct 2015 16:07:15 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9FG7FYo048863; Thu, 15 Oct 2015 16:07:15 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201510151607.t9FG7FYo048863@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Thu, 15 Oct 2015 16:07: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: r289368 - stable/10/sbin/newfs_msdos 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 " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Oct 2015 16:07:16 -0000 Author: emaste Date: Thu Oct 15 16:07:15 2015 New Revision: 289368 URL: https://svnweb.freebsd.org/changeset/base/289368 Log: MFC r265164: Small cleanup: mostly whitespace vs. tabs. Modified: stable/10/sbin/newfs_msdos/newfs_msdos.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sbin/newfs_msdos/newfs_msdos.c ============================================================================== --- stable/10/sbin/newfs_msdos/newfs_msdos.c Thu Oct 15 16:06:10 2015 (r289367) +++ stable/10/sbin/newfs_msdos/newfs_msdos.c Thu Oct 15 16:07:15 2015 (r289368) @@ -51,50 +51,50 @@ static const char rcsid[] = #include #include -#define MAXU16 0xffff /* maximum unsigned 16-bit quantity */ -#define BPN 4 /* bits per nibble */ -#define NPB 2 /* nibbles per byte */ - -#define DOSMAGIC 0xaa55 /* DOS magic number */ -#define MINBPS 512 /* minimum bytes per sector */ -#define MAXSPC 128 /* maximum sectors per cluster */ -#define MAXNFT 16 /* maximum number of FATs */ -#define DEFBLK 4096 /* default block size */ -#define DEFBLK16 2048 /* default block size FAT16 */ -#define DEFRDE 512 /* default root directory entries */ -#define RESFTE 2 /* reserved FAT entries */ -#define MINCLS12 1U /* minimum FAT12 clusters */ -#define MINCLS16 0xff5U /* minimum FAT16 clusters */ -#define MINCLS32 0xfff5U /* minimum FAT32 clusters */ -#define MAXCLS12 0xff4U /* maximum FAT12 clusters */ -#define MAXCLS16 0xfff4U /* maximum FAT16 clusters */ -#define MAXCLS32 0xffffff4U /* maximum FAT32 clusters */ +#define MAXU16 0xffff /* maximum unsigned 16-bit quantity */ +#define BPN 4 /* bits per nibble */ +#define NPB 2 /* nibbles per byte */ + +#define DOSMAGIC 0xaa55 /* DOS magic number */ +#define MINBPS 512 /* minimum bytes per sector */ +#define MAXSPC 128 /* maximum sectors per cluster */ +#define MAXNFT 16 /* maximum number of FATs */ +#define DEFBLK 4096 /* default block size */ +#define DEFBLK16 2048 /* default block size FAT16 */ +#define DEFRDE 512 /* default root directory entries */ +#define RESFTE 2 /* reserved FAT entries */ +#define MINCLS12 1U /* minimum FAT12 clusters */ +#define MINCLS16 0xff5U /* minimum FAT16 clusters */ +#define MINCLS32 0xfff5U /* minimum FAT32 clusters */ +#define MAXCLS12 0xff4U /* maximum FAT12 clusters */ +#define MAXCLS16 0xfff4U /* maximum FAT16 clusters */ +#define MAXCLS32 0xffffff4U /* maximum FAT32 clusters */ -#define mincls(fat) ((fat) == 12 ? MINCLS12 : \ +#define mincls(fat) ((fat) == 12 ? MINCLS12 : \ (fat) == 16 ? MINCLS16 : \ MINCLS32) -#define maxcls(fat) ((fat) == 12 ? MAXCLS12 : \ +#define maxcls(fat) ((fat) == 12 ? MAXCLS12 : \ (fat) == 16 ? MAXCLS16 : \ MAXCLS32) -#define mk1(p, x) \ +#define mk1(p, x) \ (p) = (u_int8_t)(x) -#define mk2(p, x) \ +#define mk2(p, x) \ (p)[0] = (u_int8_t)(x), \ (p)[1] = (u_int8_t)((x) >> 010) -#define mk4(p, x) \ +#define mk4(p, x) \ (p)[0] = (u_int8_t)(x), \ (p)[1] = (u_int8_t)((x) >> 010), \ (p)[2] = (u_int8_t)((x) >> 020), \ (p)[3] = (u_int8_t)((x) >> 030) -#define argto1(arg, lo, msg) argtou(arg, lo, 0xff, msg) -#define argto2(arg, lo, msg) argtou(arg, lo, 0xffff, msg) -#define argto4(arg, lo, msg) argtou(arg, lo, 0xffffffff, msg) -#define argtox(arg, lo, msg) argtou(arg, lo, UINT_MAX, msg) +#define argto1(arg, lo, msg) argtou(arg, lo, 0xff, msg) +#define argto2(arg, lo, msg) argtou(arg, lo, 0xffff, msg) +#define argto4(arg, lo, msg) argtou(arg, lo, 0xffffffff, msg) +#define argtox(arg, lo, msg) argtou(arg, lo, UINT_MAX, msg) struct bs { u_int8_t bsJump[3]; /* bootstrap entry point */ @@ -131,7 +131,7 @@ struct bsx { u_int8_t exReserved1; /* reserved */ u_int8_t exBootSignature; /* extended boot signature */ u_int8_t exVolumeID[4]; /* volume ID number */ - u_int8_t exVolumeLabel[11]; /* volume label */ + u_int8_t exVolumeLabel[11]; /* volume label */ u_int8_t exFileSysType[8]; /* file system type */ } __packed; @@ -164,7 +164,7 @@ struct bpb { u_int bpbBackup; /* backup boot sector */ }; -#define BPBGAP 0, 0, 0, 0, 0, 0 +#define BPBGAP 0, 0, 0, 0, 0, 0 static struct { const char *name; @@ -174,10 +174,10 @@ static struct { {"180", {512, 1, 1, 2, 64, 360, 0xfc, 2, 9, 1, BPBGAP}}, {"320", {512, 2, 1, 2, 112, 640, 0xff, 1, 8, 2, BPBGAP}}, {"360", {512, 2, 1, 2, 112, 720, 0xfd, 2, 9, 2, BPBGAP}}, - {"640", {512, 2, 1, 2, 112, 1280, 0xfb, 2, 8, 2, BPBGAP}}, + {"640", {512, 2, 1, 2, 112, 1280, 0xfb, 2, 8, 2, BPBGAP}}, {"720", {512, 2, 1, 2, 112, 1440, 0xf9, 3, 9, 2, BPBGAP}}, {"1200", {512, 1, 1, 2, 224, 2400, 0xf9, 7, 15, 2, BPBGAP}}, - {"1232", {1024,1, 1, 2, 192, 1232, 0xfe, 2, 8, 2, BPBGAP}}, + {"1232", {1024,1, 1, 2, 192, 1232, 0xfe, 2, 8, 2, BPBGAP}}, {"1440", {512, 1, 1, 2, 224, 2880, 0xf0, 9, 18, 2, BPBGAP}}, {"2880", {512, 2, 1, 2, 240, 5760, 0xf0, 9, 36, 2, BPBGAP}} }; @@ -1029,7 +1029,7 @@ usage(void) fprintf(stderr, "usage: newfs_msdos [ -options ] special [disktype]\n" "where the options are:\n" - "\t-@ create file system at specified offset\n" + "\t-@ create file system at specified offset\n" "\t-B get bootstrap from file\n" "\t-C create image file with specified size\n" "\t-F FAT type (12, 16, or 32)\n" From owner-svn-src-all@freebsd.org Thu Oct 15 16:19:01 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id BAA67A15084; Thu, 15 Oct 2015 16:19:01 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 772DB1C08; Thu, 15 Oct 2015 16:19: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 t9FGJ0Ge051817; Thu, 15 Oct 2015 16:19:00 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9FGJ05t051816; Thu, 15 Oct 2015 16:19:00 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201510151619.t9FGJ05t051816@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Thu, 15 Oct 2015 16:19:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289369 - head/sbin/newfs_msdos X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Oct 2015 16:19:01 -0000 Author: emaste Date: Thu Oct 15 16:19:00 2015 New Revision: 289369 URL: https://svnweb.freebsd.org/changeset/base/289369 Log: newfs_msdos: rework option parsing to match NetBSD NetBSD split newfs_msdos in two so that they can reuse the file system creation part in makefs. This change is a step on the path of bringing that support to FreeBSD. Reviewed by: kib, pfg Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D3905 Modified: head/sbin/newfs_msdos/newfs_msdos.c Modified: head/sbin/newfs_msdos/newfs_msdos.c ============================================================================== --- head/sbin/newfs_msdos/newfs_msdos.c Thu Oct 15 16:07:15 2015 (r289368) +++ head/sbin/newfs_msdos/newfs_msdos.c Thu Oct 15 16:19:00 2015 (r289369) @@ -214,6 +214,35 @@ static const u_int8_t bootcode[] = { 0 }; +struct msdos_options { + const char *bootstrap; + const char *volume_label; + const char *OEM_string; + const char *floppy; + u_int fat_type; + u_int volume_id; + u_int bytes_per_sector; + u_int sectors_per_fat; + u_int block_size; + u_int sectors_per_cluster; + u_int directory_entries; + u_int drive_heads; + u_int info_sector; + u_int backup_sector; + u_int media_descriptor; + u_int num_FAT; + u_int hidden_sectors; + u_int reserved_sectors; + u_int size; + u_int sectors_per_track; + int no_create; + off_t create_size; + off_t offset; + int volume_id_set; + int media_descriptor_set; + int hidden_sectors_set; +}; + static volatile sig_atomic_t got_siginfo; static void infohandler(int); @@ -226,6 +255,7 @@ static u_int ckgeom(const char *, u_int, static u_int argtou(const char *, u_int, u_int, const char *); static off_t argtooff(const char *, const char *); static int oklabel(const char *); +static int mkfs_msdos(const char *, const char *, const struct msdos_options *); static void mklabel(u_int8_t *, const char *); static void setstr(u_int8_t *, const char *, size_t); static void usage(void); @@ -237,114 +267,96 @@ int main(int argc, char *argv[]) { static const char opts[] = "@:NB:C:F:I:L:O:S:a:b:c:e:f:h:i:k:m:n:o:r:s:u:"; - const char *opt_B = NULL, *opt_L = NULL, *opt_O = NULL, *opt_f = NULL; - u_int opt_F = 0, opt_I = 0, opt_S = 0, opt_a = 0, opt_b = 0, opt_c = 0; - u_int opt_e = 0, opt_h = 0, opt_i = 0, opt_k = 0, opt_m = 0, opt_n = 0; - u_int opt_o = 0, opt_r = 0, opt_s = 0, opt_u = 0; - int opt_N = 0; - int Iflag = 0, mflag = 0, oflag = 0; + struct msdos_options o; + const char *fname, *dtype; char buf[MAXPATHLEN]; - struct sigaction si_sa; - struct stat sb; - struct timeval tv; - struct bpb bpb; - struct tm *tm; - struct bs *bs; - struct bsbpb *bsbpb; - struct bsxbpb *bsxbpb; - struct bsx *bsx; - struct de *de; - u_int8_t *img; - const char *fname, *dtype, *bname; - ssize_t n; - time_t now; - u_int fat, bss, rds, cls, dir, lsn, x, x1, x2; - int ch, fd, fd1; - off_t opt_create = 0, opt_ofs = 0; + int ch; + + memset(&o, 0, sizeof(o)); while ((ch = getopt(argc, argv, opts)) != -1) switch (ch) { case '@': - opt_ofs = argtooff(optarg, "offset"); + o.offset = argtooff(optarg, "offset"); break; case 'N': - opt_N = 1; + o.no_create = 1; break; case 'B': - opt_B = optarg; + o.bootstrap = optarg; break; case 'C': - opt_create = argtooff(optarg, "create size"); + o.create_size = argtooff(optarg, "create size"); break; case 'F': if (strcmp(optarg, "12") && strcmp(optarg, "16") && strcmp(optarg, "32")) errx(1, "%s: bad FAT type", optarg); - opt_F = atoi(optarg); + o.fat_type = atoi(optarg); break; case 'I': - opt_I = argto4(optarg, 0, "volume ID"); - Iflag = 1; + o.volume_id = argto4(optarg, 0, "volume ID"); + o.volume_id_set = 1; break; case 'L': if (!oklabel(optarg)) errx(1, "%s: bad volume label", optarg); - opt_L = optarg; + o.volume_label = optarg; break; case 'O': if (strlen(optarg) > 8) errx(1, "%s: bad OEM string", optarg); - opt_O = optarg; + o.OEM_string = optarg; break; case 'S': - opt_S = argto2(optarg, 1, "bytes/sector"); + o.bytes_per_sector = argto2(optarg, 1, "bytes/sector"); break; case 'a': - opt_a = argto4(optarg, 1, "sectors/FAT"); + o.sectors_per_fat = argto4(optarg, 1, "sectors/FAT"); break; case 'b': - opt_b = argtox(optarg, 1, "block size"); - opt_c = 0; + o.block_size = argtox(optarg, 1, "block size"); + o.sectors_per_cluster = 0; break; case 'c': - opt_c = argto1(optarg, 1, "sectors/cluster"); - opt_b = 0; + o.sectors_per_cluster = argto1(optarg, 1, "sectors/cluster"); + o.block_size = 0; break; case 'e': - opt_e = argto2(optarg, 1, "directory entries"); + o.directory_entries = argto2(optarg, 1, "directory entries"); break; case 'f': - opt_f = optarg; + o.floppy = optarg; break; case 'h': - opt_h = argto2(optarg, 1, "drive heads"); + o.drive_heads = argto2(optarg, 1, "drive heads"); break; case 'i': - opt_i = argto2(optarg, 1, "info sector"); + o.info_sector = argto2(optarg, 1, "info sector"); break; case 'k': - opt_k = argto2(optarg, 1, "backup sector"); + o.backup_sector = argto2(optarg, 1, "backup sector"); break; case 'm': - opt_m = argto1(optarg, 0, "media descriptor"); - mflag = 1; + o.media_descriptor = argto1(optarg, 0, "media descriptor"); + o.media_descriptor_set = 1; break; case 'n': - opt_n = argto1(optarg, 1, "number of FATs"); + o.num_FAT = argto1(optarg, 1, "number of FATs"); break; case 'o': - opt_o = argto4(optarg, 0, "hidden sectors"); - oflag = 1; + o.hidden_sectors = argto4(optarg, 0, "hidden sectors"); + o.hidden_sectors_set = 1; break; case 'r': - opt_r = argto2(optarg, 1, "reserved sectors"); + o.reserved_sectors = argto2(optarg, 1, "reserved sectors"); break; case 's': - opt_s = argto4(optarg, 1, "file system size"); + o.size = argto4(optarg, 1, "file system size"); break; case 'u': - opt_u = argto2(optarg, 1, "sectors/track"); + o.sectors_per_track = argto2(optarg, 1, "sectors/track"); break; default: usage(); @@ -354,57 +366,82 @@ main(int argc, char *argv[]) if (argc < 1 || argc > 2) usage(); fname = *argv++; - if (!opt_create && !strchr(fname, '/')) { + if (!o.create_size && !strchr(fname, '/')) { snprintf(buf, sizeof(buf), "%s%s", _PATH_DEV, fname); if (!(fname = strdup(buf))) err(1, NULL); } dtype = *argv; - if (opt_create) { - if (opt_N) + return mkfs_msdos(fname, dtype, &o); +} + +int mkfs_msdos(const char *fname, const char *dtype, + const struct msdos_options *op) +{ + char buf[MAXPATHLEN]; + struct sigaction si_sa; + struct stat sb; + struct timeval tv; + struct bpb bpb; + struct tm *tm; + struct bs *bs; + struct bsbpb *bsbpb; + struct bsxbpb *bsxbpb; + struct bsx *bsx; + struct de *de; + u_int8_t *img; + const char *bname; + ssize_t n; + time_t now; + u_int fat, bss, rds, cls, dir, lsn, x, x1, x2; + int fd, fd1; + struct msdos_options o = *op; + + if (o.create_size) { + if (o.no_create) errx(1, "create (-C) is incompatible with -N"); fd = open(fname, O_RDWR | O_CREAT | O_TRUNC, 0644); if (fd == -1) errx(1, "failed to create %s", fname); - if (ftruncate(fd, opt_create)) - errx(1, "failed to initialize %jd bytes", (intmax_t)opt_create); - } else if ((fd = open(fname, opt_N ? O_RDONLY : O_RDWR)) == -1) + if (ftruncate(fd, o.create_size)) + errx(1, "failed to initialize %jd bytes", (intmax_t)o.create_size); + } else if ((fd = open(fname, o.no_create ? O_RDONLY : O_RDWR)) == -1) err(1, "%s", fname); if (fstat(fd, &sb)) err(1, "%s", fname); - if (opt_create) { + if (o.create_size) { if (!S_ISREG(sb.st_mode)) warnx("warning, %s is not a regular file", fname); } else { if (!S_ISCHR(sb.st_mode)) warnx("warning, %s is not a character device", fname); } - if (!opt_N) + if (!o.no_create) check_mounted(fname, sb.st_mode); - if (opt_ofs && opt_ofs != lseek(fd, opt_ofs, SEEK_SET)) - errx(1, "cannot seek to %jd", (intmax_t)opt_ofs); + if (o.offset && o.offset != lseek(fd, o.offset, SEEK_SET)) + errx(1, "cannot seek to %jd", (intmax_t)o.offset); memset(&bpb, 0, sizeof(bpb)); - if (opt_f) { - getstdfmt(opt_f, &bpb); + if (o.floppy) { + getstdfmt(o.floppy, &bpb); bpb.bpbHugeSectors = bpb.bpbSectors; bpb.bpbSectors = 0; bpb.bpbBigFATsecs = bpb.bpbFATsecs; bpb.bpbFATsecs = 0; } - if (opt_h) - bpb.bpbHeads = opt_h; - if (opt_u) - bpb.bpbSecPerTrack = opt_u; - if (opt_S) - bpb.bpbBytesPerSec = opt_S; - if (opt_s) - bpb.bpbHugeSectors = opt_s; - if (oflag) - bpb.bpbHiddenSecs = opt_o; - if (!(opt_f || (opt_h && opt_u && opt_S && opt_s && oflag))) { + if (o.drive_heads) + bpb.bpbHeads = o.drive_heads; + if (o.sectors_per_track) + bpb.bpbSecPerTrack = o.sectors_per_track; + if (o.bytes_per_sector) + bpb.bpbBytesPerSec = o.bytes_per_sector; + if (o.size) + bpb.bpbHugeSectors = o.size; + if (o.hidden_sectors_set) + bpb.bpbHiddenSecs = o.hidden_sectors; + if (!(o.floppy || (o.drive_heads && o.sectors_per_track && o.bytes_per_sector && o.size && o.hidden_sectors_set))) { off_t delta; - getdiskinfo(fd, fname, dtype, oflag, &bpb); - bpb.bpbHugeSectors -= (opt_ofs / bpb.bpbBytesPerSec); + getdiskinfo(fd, fname, dtype, o.hidden_sectors_set, &bpb); + bpb.bpbHugeSectors -= (o.offset / bpb.bpbBytesPerSec); delta = bpb.bpbHugeSectors % bpb.bpbSecPerTrack; if (delta != 0) { warnx("trim %d sectors to adjust to a multiple of %d", @@ -429,60 +466,60 @@ main(int argc, char *argv[]) if (bpb.bpbBytesPerSec < MINBPS) errx(1, "bytes/sector (%u) is too small; minimum is %u", bpb.bpbBytesPerSec, MINBPS); - if (!(fat = opt_F)) { - if (opt_f) + if (!(fat = o.fat_type)) { + if (o.floppy) fat = 12; - else if (!opt_e && (opt_i || opt_k)) + else if (!o.directory_entries && (o.info_sector || o.backup_sector)) fat = 32; } - if ((fat == 32 && opt_e) || (fat != 32 && (opt_i || opt_k))) + if ((fat == 32 && o.directory_entries) || (fat != 32 && (o.info_sector || o.backup_sector))) errx(1, "-%c is not a legal FAT%s option", - fat == 32 ? 'e' : opt_i ? 'i' : 'k', + fat == 32 ? 'e' : o.info_sector ? 'i' : 'k', fat == 32 ? "32" : "12/16"); - if (opt_f && fat == 32) + if (o.floppy && fat == 32) bpb.bpbRootDirEnts = 0; - if (opt_b) { - if (!powerof2(opt_b)) - errx(1, "block size (%u) is not a power of 2", opt_b); - if (opt_b < bpb.bpbBytesPerSec) + if (o.block_size) { + if (!powerof2(o.block_size)) + errx(1, "block size (%u) is not a power of 2", o.block_size); + if (o.block_size < bpb.bpbBytesPerSec) errx(1, "block size (%u) is too small; minimum is %u", - opt_b, bpb.bpbBytesPerSec); - if (opt_b > bpb.bpbBytesPerSec * MAXSPC) + o.block_size, bpb.bpbBytesPerSec); + if (o.block_size > bpb.bpbBytesPerSec * MAXSPC) errx(1, "block size (%u) is too large; maximum is %u", - opt_b, bpb.bpbBytesPerSec * MAXSPC); - bpb.bpbSecPerClust = opt_b / bpb.bpbBytesPerSec; + o.block_size, bpb.bpbBytesPerSec * MAXSPC); + bpb.bpbSecPerClust = o.block_size / bpb.bpbBytesPerSec; } - if (opt_c) { - if (!powerof2(opt_c)) - errx(1, "sectors/cluster (%u) is not a power of 2", opt_c); - bpb.bpbSecPerClust = opt_c; - } - if (opt_r) - bpb.bpbResSectors = opt_r; - if (opt_n) { - if (opt_n > MAXNFT) + if (o.sectors_per_cluster) { + if (!powerof2(o.sectors_per_cluster)) + errx(1, "sectors/cluster (%u) is not a power of 2", o.sectors_per_cluster); + bpb.bpbSecPerClust = o.sectors_per_cluster; + } + if (o.reserved_sectors) + bpb.bpbResSectors = o.reserved_sectors; + if (o.num_FAT) { + if (o.num_FAT > MAXNFT) errx(1, "number of FATs (%u) is too large; maximum is %u", - opt_n, MAXNFT); - bpb.bpbFATs = opt_n; + o.num_FAT, MAXNFT); + bpb.bpbFATs = o.num_FAT; } - if (opt_e) - bpb.bpbRootDirEnts = opt_e; - if (mflag) { - if (opt_m < 0xf0) - errx(1, "illegal media descriptor (%#x)", opt_m); - bpb.bpbMedia = opt_m; - } - if (opt_a) - bpb.bpbBigFATsecs = opt_a; - if (opt_i) - bpb.bpbFSInfo = opt_i; - if (opt_k) - bpb.bpbBackup = opt_k; + if (o.directory_entries) + bpb.bpbRootDirEnts = o.directory_entries; + if (o.media_descriptor_set) { + if (o.media_descriptor < 0xf0) + errx(1, "illegal media descriptor (%#x)", o.media_descriptor); + bpb.bpbMedia = o.media_descriptor; + } + if (o.sectors_per_fat) + bpb.bpbBigFATsecs = o.sectors_per_fat; + if (o.info_sector) + bpb.bpbFSInfo = o.info_sector; + if (o.backup_sector) + bpb.bpbBackup = o.backup_sector; bss = 1; bname = NULL; fd1 = -1; - if (opt_B) { - bname = opt_B; + if (o.bootstrap) { + bname = o.bootstrap; if (!strchr(bname, '/')) { snprintf(buf, sizeof(buf), "/boot/%s", bname); if (!(bname = strdup(buf))) @@ -612,7 +649,7 @@ main(int argc, char *argv[]) bpb.bpbBigFATsecs = 0; } print_bpb(&bpb); - if (!opt_N) { + if (!o.no_create) { gettimeofday(&tv, NULL); now = tv.tv_sec; tm = localtime(&now); @@ -634,14 +671,14 @@ main(int argc, char *argv[]) got_siginfo = 0; } x = lsn; - if (opt_B && + if (o.bootstrap && fat == 32 && bpb.bpbBackup != MAXU16 && bss <= bpb.bpbBackup && x >= bpb.bpbBackup) { x -= bpb.bpbBackup; - if (!x && lseek(fd1, opt_ofs, SEEK_SET)) + if (!x && lseek(fd1, o.offset, SEEK_SET)) err(1, "%s", bname); } - if (opt_B && x < bss) { + if (o.bootstrap && x < bss) { if ((n = read(fd1, img, bpb.bpbBytesPerSec)) == -1) err(1, "%s", bname); if ((unsigned)n != bpb.bpbBytesPerSec) @@ -678,8 +715,8 @@ main(int argc, char *argv[]) } bsx = (struct bsx *)(img + x1); mk1(bsx->exBootSignature, 0x29); - if (Iflag) - x = opt_I; + if (o.volume_id_set) + x = o.volume_id; else x = (((u_int)(1 + tm->tm_mon) << 8 | (u_int)tm->tm_mday) + @@ -689,16 +726,16 @@ main(int argc, char *argv[]) ((u_int)tm->tm_hour << 8 | (u_int)tm->tm_min)); mk4(bsx->exVolumeID, x); - mklabel(bsx->exVolumeLabel, opt_L ? opt_L : "NO NAME"); + mklabel(bsx->exVolumeLabel, o.volume_label ? o.volume_label : "NO NAME"); sprintf(buf, "FAT%u", fat); setstr(bsx->exFileSysType, buf, sizeof(bsx->exFileSysType)); - if (!opt_B) { + if (!o.bootstrap) { x1 += sizeof(struct bsx); bs = (struct bs *)img; mk1(bs->bsJump[0], 0xeb); mk1(bs->bsJump[1], x1 - 2); mk1(bs->bsJump[2], 0x90); - setstr(bs->bsOemName, opt_O ? opt_O : "BSD4.4 ", + setstr(bs->bsOemName, o.OEM_string ? o.OEM_string : "BSD4.4 ", sizeof(bs->bsOemName)); memcpy(img + x1, bootcode, sizeof(bootcode)); mk2(img + MINBPS - 2, DOSMAGIC); @@ -719,9 +756,9 @@ main(int argc, char *argv[]) mk1(img[0], bpb.bpbMedia); for (x = 1; x < fat * (fat == 32 ? 3 : 2) / 8; x++) mk1(img[x], fat == 32 && x % 4 == 3 ? 0x0f : 0xff); - } else if (lsn == dir && opt_L) { + } else if (lsn == dir && o.volume_label) { de = (struct de *)img; - mklabel(de->deName, opt_L); + mklabel(de->deName, o.volume_label); mk1(de->deAttributes, 050); x = (u_int)tm->tm_hour << 11 | (u_int)tm->tm_min << 5 | From owner-svn-src-all@freebsd.org Thu Oct 15 17:40:41 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B0545A15052; Thu, 15 Oct 2015 17:40:41 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 878421C05; Thu, 15 Oct 2015 17:40:41 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t9FHee19076870; Thu, 15 Oct 2015 17:40:40 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9FHeeEY076864; Thu, 15 Oct 2015 17:40:40 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201510151740.t9FHeeEY076864@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Thu, 15 Oct 2015 17:40:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289372 - in head/sys/arm: arm include X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Oct 2015 17:40:41 -0000 Author: kib Date: Thu Oct 15 17:40:39 2015 New Revision: 289372 URL: https://svnweb.freebsd.org/changeset/base/289372 Log: ARM userspace accessors, e.g. {s,f}uword(9), copy{in,out}(9), casuword(9) and others, use LDRT and STRT instructions to access memory with the privileges of userspace. If the *RT instruction faults on the kernel address, then additional checks must be done to not confuse the VM system with invalid kernel-mode faults. Put ARM on line with other FreeBSD architectures and disallow usermode buffers which intersect with the kernel address space in advance, before any accesses are performed. In other words, vm_fault(9) is no longer called when e.g. suword(9) stores to invalid (i.e. not userspace) address. Also, switch ARM to use fueword(9) and casueword(9). Note: there is a pending patch in D3617, which adds the special processing for faults from LDRT and STRT. The addition of the processing is useful for potential other uses of the instructions and for completeness, but standard userspace accessors are better served by not allowing such faults beforehand. Reviewed by: andrew Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D3816 MFC after: 2 weeks Modified: head/sys/arm/arm/bcopyinout.S head/sys/arm/arm/bcopyinout_xscale.S head/sys/arm/arm/copystr.S head/sys/arm/arm/fusu.S head/sys/arm/arm/genassym.c head/sys/arm/include/param.h Modified: head/sys/arm/arm/bcopyinout.S ============================================================================== --- head/sys/arm/arm/bcopyinout.S Thu Oct 15 17:36:56 2015 (r289371) +++ head/sys/arm/arm/bcopyinout.S Thu Oct 15 17:40:39 2015 (r289372) @@ -94,6 +94,15 @@ ENTRY(copyin) moveq r0, #0 RETeq + adds r3, r0, r2 + movcs r0, #EFAULT + RETc(cs) + + ldr r12, =(VM_MAXUSER_ADDRESS + 1) + cmp r3, r12 + movcs r0, #EFAULT + RETc(cs) + ldr r3, .L_arm_memcpy ldr r3, [r3] cmp r3, #0 @@ -332,6 +341,15 @@ ENTRY(copyout) moveq r0, #0 RETeq + adds r3, r1, r2 + movcs r0, #EFAULT + RETc(cs) + + ldr r12, =(VM_MAXUSER_ADDRESS + 1) + cmp r3, r12 + movcs r0, #EFAULT + RETc(cs) + ldr r3, .L_arm_memcpy ldr r3, [r3] cmp r3, #0 Modified: head/sys/arm/arm/bcopyinout_xscale.S ============================================================================== --- head/sys/arm/arm/bcopyinout_xscale.S Thu Oct 15 17:36:56 2015 (r289371) +++ head/sys/arm/arm/bcopyinout_xscale.S Thu Oct 15 17:40:39 2015 (r289372) @@ -67,6 +67,15 @@ ENTRY(copyin) movle r0, #0x00 movle pc, lr /* Bail early if length is <= 0 */ + adds r3, r0, r2 + movcs r0, #EFAULT + RETc(cs) + + ldr r12, =(VM_MAXUSER_ADDRESS + 1) + cmp r3, r12 + movcs r0, #EFAULT + RETc(cs) + ldr r3, .L_arm_memcpy ldr r3, [r3] cmp r3, #0 @@ -509,6 +518,15 @@ ENTRY(copyout) movle r0, #0x00 movle pc, lr /* Bail early if length is <= 0 */ + adds r3, r1, r2 + movcs r0, #EFAULT + RETc(cs) + + ldr r12, =(VM_MAXUSER_ADDRESS + 1) + cmp r3, r12 + movcs r0, #EFAULT + RETc(cs) + ldr r3, .L_arm_memcpy ldr r3, [r3] cmp r3, #0 Modified: head/sys/arm/arm/copystr.S ============================================================================== --- head/sys/arm/arm/copystr.S Thu Oct 15 17:36:56 2015 (r289371) +++ head/sys/arm/arm/copystr.S Thu Oct 15 17:40:39 2015 (r289372) @@ -113,6 +113,8 @@ ENTRY(copyinstr) moveq r0, #ENAMETOOLONG beq 2f + ldr r12, =VM_MAXUSER_ADDRESS + GET_PCB(r4) ldr r4, [r4] @@ -124,7 +126,10 @@ ENTRY(copyinstr) adr r5, .Lcopystrfault str r5, [r4, #PCB_ONFAULT] -1: ldrbt r5, [r0], #0x0001 +1: + cmp r0, r12 + bcs .Lcopystrfault + ldrbt r5, [r0], #0x0001 add r6, r6, #0x00000001 teq r5, #0x00000000 strb r5, [r1], #0x0001 @@ -161,6 +166,8 @@ ENTRY(copyoutstr) moveq r0, #ENAMETOOLONG beq 2f + ldr r12, =VM_MAXUSER_ADDRESS + GET_PCB(r4) ldr r4, [r4] @@ -172,7 +179,10 @@ ENTRY(copyoutstr) adr r5, .Lcopystrfault str r5, [r4, #PCB_ONFAULT] -1: ldrb r5, [r0], #0x0001 +1: + cmp r0, r12 + bcs .Lcopystrfault + ldrb r5, [r0], #0x0001 add r6, r6, #0x00000001 teq r5, #0x00000000 strbt r5, [r1], #0x0001 @@ -195,9 +205,9 @@ END(copyoutstr) /* A fault occurred during the copy */ .Lcopystrfault: - mov r0, #EFAULT mov r1, #0x00000000 str r1, [r4, #PCB_ONFAULT] + mov r0, #EFAULT RESTORE_REGS RET Modified: head/sys/arm/arm/fusu.S ============================================================================== --- head/sys/arm/arm/fusu.S Thu Oct 15 17:36:56 2015 (r289371) +++ head/sys/arm/arm/fusu.S Thu Oct 15 17:40:39 2015 (r289372) @@ -53,49 +53,51 @@ __FBSDID("$FreeBSD$"); #endif /* - * fuword(caddr_t uaddr); - * Fetch an int from the user's address space. + * casueword32(volatile uint32_t *base, uint32_t oldval, uint32_t *oldvalp, + * uint32_t newval); */ -ENTRY(casuword) -EENTRY_NP(casuword32) - GET_PCB(r3) - ldr r3, [r3] +ENTRY(casueword) +EENTRY_NP(casueword32) + stmfd sp!, {r4, r5, r6} + + ldr r4, =(VM_MAXUSER_ADDRESS-3) + cmp r0, r4 + mvncs r0, #0 + bcs 2f + + GET_PCB(r6) + ldr r6, [r6] #ifdef DIAGNOSTIC - teq r3, #0x00000000 + teq r6, #0x00000000 + ldmfdeq sp!, {r4, r5, r6} beq .Lfusupcbfault #endif - stmfd sp!, {r4, r5} + adr r4, .Lcasuwordfault - str r4, [r3, #PCB_ONFAULT] + str r4, [r6, #PCB_ONFAULT] + #if __ARM_ARCH >= 6 1: - cmp r0, #KERNBASE - mvnhs r0, #0 - bhs 2f - - ldrex r5, [r0] - cmp r5, r1 - movne r0, r5 - bne 2f - strex r5, r2, [r0] - cmp r5, #0 - bne 1b + ldrex r4, [r0] + cmp r4, r1 + strexeq r5, r3, [r0] + cmpeq r5, #1 + beq 1b #else - ldrt r5, [r0] - cmp r5, r1 - movne r0, r5 - strteq r2, [r0] -#endif - moveq r0, r1 + ldrt r4, [r0] + cmp r4, r1 + strteq r3, [r0] +#endif + str r4, [r2] + mov r0, #0 + str r0, [r6, #PCB_ONFAULT] 2: - ldmfd sp!, {r4, r5} - mov r1, #0x00000000 - str r1, [r3, #PCB_ONFAULT] + ldmfd sp!, {r4, r5, r6} RET -EEND(casuword32) -END(casuword) +EEND(casueword32) +END(casueword) /* * Handle faults from casuword. Clean up and return -1. @@ -103,18 +105,23 @@ END(casuword) .Lcasuwordfault: mov r0, #0x00000000 - str r0, [r3, #PCB_ONFAULT] - mvn r0, #0x00000000 - ldmfd sp!, {r4, r5} + str r0, [r6, #PCB_ONFAULT] + mvn r0, #0 + ldmfd sp!, {r4, r5, r6} RET /* - * fuword(caddr_t uaddr); + * fueword(caddr_t uaddr, long *val); * Fetch an int from the user's address space. */ -ENTRY(fuword) -EENTRY_NP(fuword32) +ENTRY(fueword) +EENTRY_NP(fueword32) + ldr r3, =(VM_MAXUSER_ADDRESS-3) + cmp r0, r3 + mvncs r0, #0 + RETc(cs) + GET_PCB(r2) ldr r2, [r2] @@ -123,14 +130,14 @@ EENTRY_NP(fuword32) beq .Lfusupcbfault #endif - adr r1, .Lfusufault - str r1, [r2, #PCB_ONFAULT] + adr r3, .Lfusufault + str r3, [r2, #PCB_ONFAULT] ldrt r3, [r0] + str r3, [r1] - mov r1, #0x00000000 - str r1, [r2, #PCB_ONFAULT] - mov r0, r3 + mov r0, #0x00000000 + str r0, [r2, #PCB_ONFAULT] RET EEND(fuword32) END(fuword) @@ -141,6 +148,11 @@ END(fuword) */ ENTRY(fusword) + ldr r3, =(VM_MAXUSER_ADDRESS-1) + cmp r0, r3 + mvncs r0, #0 + RETc(cs) + GET_PCB(r2) ldr r2, [r2] @@ -171,6 +183,11 @@ END(fusword) */ ENTRY(fuswintr) + ldr r3, =(VM_MAXUSER_ADDRESS-1) + cmp r0, r3 + mvncs r0, #0 + RETc(cs) + ldr r2, Lblock_userspace_access ldr r2, [r2] teq r2, #0 @@ -217,6 +234,11 @@ _C_LABEL(block_userspace_access): */ ENTRY(fubyte) + ldr r3, =VM_MAXUSER_ADDRESS + cmp r0, r3 + mvncs r0, #0 + RETc(cs) + GET_PCB(r2) ldr r2, [r2] @@ -282,6 +304,11 @@ fusupcbfaulttext: ENTRY(suword) EENTRY_NP(suword32) + ldr r3, =(VM_MAXUSER_ADDRESS-3) + cmp r0, r3 + mvncs r0, #0 + RETc(cs) + GET_PCB(r2) ldr r2, [r2] @@ -308,6 +335,11 @@ END(suword) */ ENTRY(suswintr) + ldr r3, =(VM_MAXUSER_ADDRESS-1) + cmp r0, r3 + mvncs r0, #0 + RETc(cs) + ldr r2, Lblock_userspace_access ldr r2, [r2] teq r2, #0 @@ -345,6 +377,11 @@ END(suswintr) */ ENTRY(susword) + ldr r3, =(VM_MAXUSER_ADDRESS-1) + cmp r0, r3 + mvncs r0, #0 + RETc(cs) + GET_PCB(r2) ldr r2, [r2] @@ -376,6 +413,11 @@ END(susword) */ ENTRY(subyte) + ldr r3, =VM_MAXUSER_ADDRESS + cmp r0, r3 + mvncs r0, #0 + RETc(cs) + GET_PCB(r2) ldr r2, [r2] Modified: head/sys/arm/arm/genassym.c ============================================================================== --- head/sys/arm/arm/genassym.c Thu Oct 15 17:36:56 2015 (r289371) +++ head/sys/arm/arm/genassym.c Thu Oct 15 17:40:39 2015 (r289372) @@ -161,6 +161,7 @@ ASSYM(P_VMSPACE, offsetof(struct proc, p ASSYM(VM_PMAP, offsetof(struct vmspace, vm_pmap)); ASSYM(PM_ACTIVE, offsetof(struct pmap, pm_active)); ASSYM(PC_CPUID, offsetof(struct pcpu, pc_cpuid)); +ASSYM(VM_MAXUSER_ADDRESS, VM_MAXUSER_ADDRESS); ASSYM(DCACHE_LINE_SIZE, offsetof(struct cpuinfo, dcache_line_size)); ASSYM(DCACHE_LINE_MASK, offsetof(struct cpuinfo, dcache_line_mask)); Modified: head/sys/arm/include/param.h ============================================================================== --- head/sys/arm/include/param.h Thu Oct 15 17:36:56 2015 (r289371) +++ head/sys/arm/include/param.h Thu Oct 15 17:40:39 2015 (r289372) @@ -149,8 +149,4 @@ #define pgtok(x) ((x) * (PAGE_SIZE / 1024)) -#ifdef _KERNEL -#define NO_FUEWORD 1 -#endif - #endif /* !_ARM_INCLUDE_PARAM_H_ */ From owner-svn-src-all@freebsd.org Thu Oct 15 17:50:29 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C495AA15303; Thu, 15 Oct 2015 17:50:29 +0000 (UTC) (envelope-from ed@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8BA3A19D; Thu, 15 Oct 2015 17:50:29 +0000 (UTC) (envelope-from ed@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t9FHoSKo077897; Thu, 15 Oct 2015 17:50:28 GMT (envelope-from ed@FreeBSD.org) Received: (from ed@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9FHoS7n077896; Thu, 15 Oct 2015 17:50:28 GMT (envelope-from ed@FreeBSD.org) Message-Id: <201510151750.t9FHoS7n077896@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ed set sender to ed@FreeBSD.org using -f From: Ed Schouten Date: Thu, 15 Oct 2015 17:50:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289373 - head/sys/arm64/arm64 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Oct 2015 17:50:29 -0000 Author: ed Date: Thu Oct 15 17:50:28 2015 New Revision: 289373 URL: https://svnweb.freebsd.org/changeset/base/289373 Log: Properly set the return value for casueword to 0 upon success. While trying to get multithreading working for CloudABI on aarch64, I noticed that compare-and-exchange operations in kernelspace would always fail. It turns out that we don't properly set the return value to 0 when the compare and exchange succeeds. Approved by: andrew Differential Revision: https://reviews.freebsd.org/D3899 Modified: head/sys/arm64/arm64/support.S Modified: head/sys/arm64/arm64/support.S ============================================================================== --- head/sys/arm64/arm64/support.S Thu Oct 15 17:40:39 2015 (r289372) +++ head/sys/arm64/arm64/support.S Thu Oct 15 17:50:28 2015 (r289373) @@ -59,6 +59,7 @@ ENTRY(casueword32) ldrb w0, [x0] /* Try loading the data */ 2: SET_FAULT_HANDLER(xzr, x5) /* Reset the fault handler */ str w4, [x2] /* Store the read data */ + mov x0, #0 /* Success */ ret /* Return */ END(casueword32) @@ -76,6 +77,7 @@ ENTRY(casueword) ldrb w0, [x0] /* Try loading the data */ 2: SET_FAULT_HANDLER(xzr, x5) /* Reset the fault handler */ str x4, [x2] /* Store the read data */ + mov x0, #0 /* Success */ ret /* Return */ END(casueword) From owner-svn-src-all@freebsd.org Thu Oct 15 18:46:49 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 53A5AA151F2; Thu, 15 Oct 2015 18:46:49 +0000 (UTC) (envelope-from mahrens@gmail.com) Received: from mail-lf0-x22b.google.com (mail-lf0-x22b.google.com [IPv6:2a00:1450:4010:c07::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 CBACE13D6; Thu, 15 Oct 2015 18:46:48 +0000 (UTC) (envelope-from mahrens@gmail.com) Received: by lffy185 with SMTP id y185so42006187lff.2; Thu, 15 Oct 2015 11:46:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:cc:content-type; bh=XxvQQnBB0fXDjQGwNkpJrszAOP1bJa7pXP04JVWC3e4=; b=TioSlg+3aAxgniuW61vXm0nNek8kzoJazs9u74ntj1vyw0+zUX8bvYRbTYxSAVqdzI hcRwsl/rgSE1Vk6Jxhi04uzcA8kppNXZwbWEC8mxkse0HZM1yiasprE4nYNT4J9R2Njq Ij95x7QYljzdcHwOUHgWDw/QEm3ZJJGTL9g6pH5Vd0ang5Hmz2BfhpcF8awRI88g0iur joldovJvLvccLCYaJJpTG5bkut2apURzPZFWEDEzsYWwPFpdH3CXDW/Abotnyj2ywMAE y1CsrC/pqkRsJncyfzydpFuNwkqMHSbiqBws5zFIw9qQcOUwllfD4+MnnFcmo7nrfUOF l5Xg== MIME-Version: 1.0 X-Received: by 10.25.23.69 with SMTP id n66mr2037497lfi.52.1444934806731; Thu, 15 Oct 2015 11:46:46 -0700 (PDT) Sender: mahrens@gmail.com Received: by 10.112.4.8 with HTTP; Thu, 15 Oct 2015 11:46:46 -0700 (PDT) In-Reply-To: <561FC90F.4090706@FreeBSD.org> References: <201510141112.t9EBCmFZ022230@repo.freebsd.org> <561FC5A0.3040909@FreeBSD.org> <561FC90F.4090706@FreeBSD.org> Date: Thu, 15 Oct 2015 11:46:46 -0700 X-Google-Sender-Auth: 7LKecjwO-zzr263MSyWRMiPZuL4 Message-ID: Subject: Re: svn commit: r289310 - vendor-sys/illumos/dist/common/zfs vendor-sys/illumos/dist/uts/common vendor-sys/illumos/dist/uts/common/crypto vendor-sys/illumos/dist/uts/common/crypto/io vendor-sys/illumos... From: Matthew Ahrens To: Alexander Motin Cc: Andriy Gapon , "src-committers@freebsd.org" , svn-src-all@freebsd.org, svn-src-vendor@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 " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Oct 2015 18:46:49 -0000 On Thu, Oct 15, 2015 at 8:41 AM, Alexander Motin wrote: > > I haven't decided what to do with this specific case. As I understand, > now we are using FreeBSD's native crypto code instead of illumos' one. I > was thinking about importing this commit only in infrastructural parts, > until respective algorithms are implemented in our native crypto. I > think it should not be a problem for Skein, since according to comments > it is in public domain. About Edon-R I am not sure, since it seems to be > CDDL. > > In terms of Edon-R license, we requested the author to relicense under CDDL. He might be amenable to also license under BSD. Some googling turned up a separate implementation which is permissively licensed -- not sure if it is binary compatible or not. https://github.com/rhash/RHash/blob/master/librhash/edonr.c I'll forward you the email from the Edon-R author with license info. --matt From owner-svn-src-all@freebsd.org Thu Oct 15 18:53:27 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 71264A153C3; Thu, 15 Oct 2015 18:53:27 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3413A1A51; Thu, 15 Oct 2015 18:53:27 +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 t9FIrQIk098790; Thu, 15 Oct 2015 18:53:26 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9FIrQb5098789; Thu, 15 Oct 2015 18:53:26 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201510151853.t9FIrQb5098789@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Thu, 15 Oct 2015 18:53:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289374 - 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 " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Oct 2015 18:53:27 -0000 Author: bdrewery Date: Thu Oct 15 18:53:26 2015 New Revision: 289374 URL: https://svnweb.freebsd.org/changeset/base/289374 Log: Remove excess .else MFC after: 1 week Sponsored by: EMC / Isilon Storage Division Modified: head/share/mk/bsd.doc.mk Modified: head/share/mk/bsd.doc.mk ============================================================================== --- head/share/mk/bsd.doc.mk Thu Oct 15 17:50:28 2015 (r289373) +++ head/share/mk/bsd.doc.mk Thu Oct 15 18:53:26 2015 (r289374) @@ -184,7 +184,6 @@ ${DFILE.html}: ${SRCS} .else # unroff(1) requires a macro package as an argument cd ${SRCDIR}; ${UNROFF} -ms ${UNROFFFLAGS} \ document=${DOC} ${SRCS} -.else .endif .endif .endfor From owner-svn-src-all@freebsd.org Thu Oct 15 18:55:45 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C1302A1541A; Thu, 15 Oct 2015 18:55:45 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 737E61BE7; Thu, 15 Oct 2015 18:55:45 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t9FItilg098916; Thu, 15 Oct 2015 18:55:44 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9FItih1098915; Thu, 15 Oct 2015 18:55:44 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201510151855.t9FItih1098915@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Thu, 15 Oct 2015 18:55:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289375 - 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 " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Oct 2015 18:55:45 -0000 Author: bdrewery Date: Thu Oct 15 18:55:43 2015 New Revision: 289375 URL: https://svnweb.freebsd.org/changeset/base/289375 Log: Fix wrong use of .for; the iteration variable is not used in the loop. MFC after: 1 week Sponsored by: EMC / Isilon Storage Division Modified: head/share/mk/bsd.doc.mk Modified: head/share/mk/bsd.doc.mk ============================================================================== --- head/share/mk/bsd.doc.mk Thu Oct 15 18:53:26 2015 (r289374) +++ head/share/mk/bsd.doc.mk Thu Oct 15 18:55:43 2015 (r289375) @@ -133,11 +133,11 @@ CLEANFILES+= ${DOC}.ascii ${DOC}.ascii${ ${DOC}.html ${DOC}-*.html realinstall: -.for _dev in ${PRINTERDEVICE:Mhtml} +.if ${PRINTERDEVICE:Mhtml} cd ${SRCDIR}; \ ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m ${BINMODE} \ ${DOC}*.html ${DESTDIR}${BINDIR}/${VOLUME} -.endfor +.endif .for _dev in ${PRINTERDEVICE:Nhtml} ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m ${BINMODE} \ ${DFILE.${_dev}} ${DESTDIR}${BINDIR}/${VOLUME} From owner-svn-src-all@freebsd.org Thu Oct 15 19:00:34 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id EF29BA1548E; Thu, 15 Oct 2015 19:00:34 +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 826881F78; Thu, 15 Oct 2015 19:00:34 +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 t9FJ0XoA099155; Thu, 15 Oct 2015 19:00:33 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9FJ0XRS099150; Thu, 15 Oct 2015 19:00:33 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201510151900.t9FJ0XRS099150@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Thu, 15 Oct 2015 19:00:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289376 - head/sbin/newfs_msdos X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Oct 2015 19:00:35 -0000 Author: emaste Date: Thu Oct 15 19:00:33 2015 New Revision: 289376 URL: https://svnweb.freebsd.org/changeset/base/289376 Log: newfs_msdos: move mkfs_msdos to separate file for later use in makefs Sponsored by: The FreeBSD Foundation Added: head/sbin/newfs_msdos/mkfs_msdos.c (contents, props changed) head/sbin/newfs_msdos/mkfs_msdos.h (contents, props changed) Modified: head/sbin/newfs_msdos/Makefile head/sbin/newfs_msdos/newfs_msdos.c Modified: head/sbin/newfs_msdos/Makefile ============================================================================== --- head/sbin/newfs_msdos/Makefile Thu Oct 15 18:55:43 2015 (r289375) +++ head/sbin/newfs_msdos/Makefile Thu Oct 15 19:00:33 2015 (r289376) @@ -2,6 +2,7 @@ PROG= newfs_msdos MAN= newfs_msdos.8 +SRCS= newfs_msdos.c mkfs_msdos.c # XXX - this is verboten .if ${MACHINE_CPUARCH} == "arm" Added: head/sbin/newfs_msdos/mkfs_msdos.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sbin/newfs_msdos/mkfs_msdos.c Thu Oct 15 19:00:33 2015 (r289376) @@ -0,0 +1,854 @@ +/* + * Copyright (c) 1998 Robert Nordier + * 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(S) ``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(S) 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. + */ + +#ifndef lint +static const char rcsid[] = + "$FreeBSD$"; +#endif /* not lint */ + +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "mkfs_msdos.h" + +#define MAXU16 0xffff /* maximum unsigned 16-bit quantity */ +#define BPN 4 /* bits per nibble */ +#define NPB 2 /* nibbles per byte */ + +#define DOSMAGIC 0xaa55 /* DOS magic number */ +#define MINBPS 512 /* minimum bytes per sector */ +#define MAXSPC 128 /* maximum sectors per cluster */ +#define MAXNFT 16 /* maximum number of FATs */ +#define DEFBLK 4096 /* default block size */ +#define DEFBLK16 2048 /* default block size FAT16 */ +#define DEFRDE 512 /* default root directory entries */ +#define RESFTE 2 /* reserved FAT entries */ +#define MINCLS12 1U /* minimum FAT12 clusters */ +#define MINCLS16 0xff5U /* minimum FAT16 clusters */ +#define MINCLS32 0xfff5U /* minimum FAT32 clusters */ +#define MAXCLS12 0xff4U /* maximum FAT12 clusters */ +#define MAXCLS16 0xfff4U /* maximum FAT16 clusters */ +#define MAXCLS32 0xffffff4U /* maximum FAT32 clusters */ + +#define mincls(fat) ((fat) == 12 ? MINCLS12 : \ + (fat) == 16 ? MINCLS16 : \ + MINCLS32) + +#define maxcls(fat) ((fat) == 12 ? MAXCLS12 : \ + (fat) == 16 ? MAXCLS16 : \ + MAXCLS32) + +#define mk1(p, x) \ + (p) = (u_int8_t)(x) + +#define mk2(p, x) \ + (p)[0] = (u_int8_t)(x), \ + (p)[1] = (u_int8_t)((x) >> 010) + +#define mk4(p, x) \ + (p)[0] = (u_int8_t)(x), \ + (p)[1] = (u_int8_t)((x) >> 010), \ + (p)[2] = (u_int8_t)((x) >> 020), \ + (p)[3] = (u_int8_t)((x) >> 030) + +struct bs { + u_int8_t bsJump[3]; /* bootstrap entry point */ + u_int8_t bsOemName[8]; /* OEM name and version */ +} __packed; + +struct bsbpb { + u_int8_t bpbBytesPerSec[2]; /* bytes per sector */ + u_int8_t bpbSecPerClust; /* sectors per cluster */ + u_int8_t bpbResSectors[2]; /* reserved sectors */ + u_int8_t bpbFATs; /* number of FATs */ + u_int8_t bpbRootDirEnts[2]; /* root directory entries */ + u_int8_t bpbSectors[2]; /* total sectors */ + u_int8_t bpbMedia; /* media descriptor */ + u_int8_t bpbFATsecs[2]; /* sectors per FAT */ + u_int8_t bpbSecPerTrack[2]; /* sectors per track */ + u_int8_t bpbHeads[2]; /* drive heads */ + u_int8_t bpbHiddenSecs[4]; /* hidden sectors */ + u_int8_t bpbHugeSectors[4]; /* big total sectors */ +} __packed; + +struct bsxbpb { + u_int8_t bpbBigFATsecs[4]; /* big sectors per FAT */ + u_int8_t bpbExtFlags[2]; /* FAT control flags */ + u_int8_t bpbFSVers[2]; /* file system version */ + u_int8_t bpbRootClust[4]; /* root directory start cluster */ + u_int8_t bpbFSInfo[2]; /* file system info sector */ + u_int8_t bpbBackup[2]; /* backup boot sector */ + u_int8_t bpbReserved[12]; /* reserved */ +} __packed; + +struct bsx { + u_int8_t exDriveNumber; /* drive number */ + u_int8_t exReserved1; /* reserved */ + u_int8_t exBootSignature; /* extended boot signature */ + u_int8_t exVolumeID[4]; /* volume ID number */ + u_int8_t exVolumeLabel[11]; /* volume label */ + u_int8_t exFileSysType[8]; /* file system type */ +} __packed; + +struct de { + u_int8_t deName[11]; /* name and extension */ + u_int8_t deAttributes; /* attributes */ + u_int8_t rsvd[10]; /* reserved */ + u_int8_t deMTime[2]; /* last-modified time */ + u_int8_t deMDate[2]; /* last-modified date */ + u_int8_t deStartCluster[2]; /* starting cluster */ + u_int8_t deFileSize[4]; /* size */ +} __packed; + +struct bpb { + u_int bpbBytesPerSec; /* bytes per sector */ + u_int bpbSecPerClust; /* sectors per cluster */ + u_int bpbResSectors; /* reserved sectors */ + u_int bpbFATs; /* number of FATs */ + u_int bpbRootDirEnts; /* root directory entries */ + u_int bpbSectors; /* total sectors */ + u_int bpbMedia; /* media descriptor */ + u_int bpbFATsecs; /* sectors per FAT */ + u_int bpbSecPerTrack; /* sectors per track */ + u_int bpbHeads; /* drive heads */ + u_int bpbHiddenSecs; /* hidden sectors */ + u_int bpbHugeSectors; /* big total sectors */ + u_int bpbBigFATsecs; /* big sectors per FAT */ + u_int bpbRootClust; /* root directory start cluster */ + u_int bpbFSInfo; /* file system info sector */ + u_int bpbBackup; /* backup boot sector */ +}; + +#define BPBGAP 0, 0, 0, 0, 0, 0 + +static struct { + const char *name; + struct bpb bpb; +} const stdfmt[] = { + {"160", {512, 1, 1, 2, 64, 320, 0xfe, 1, 8, 1, BPBGAP}}, + {"180", {512, 1, 1, 2, 64, 360, 0xfc, 2, 9, 1, BPBGAP}}, + {"320", {512, 2, 1, 2, 112, 640, 0xff, 1, 8, 2, BPBGAP}}, + {"360", {512, 2, 1, 2, 112, 720, 0xfd, 2, 9, 2, BPBGAP}}, + {"640", {512, 2, 1, 2, 112, 1280, 0xfb, 2, 8, 2, BPBGAP}}, + {"720", {512, 2, 1, 2, 112, 1440, 0xf9, 3, 9, 2, BPBGAP}}, + {"1200", {512, 1, 1, 2, 224, 2400, 0xf9, 7, 15, 2, BPBGAP}}, + {"1232", {1024,1, 1, 2, 192, 1232, 0xfe, 2, 8, 2, BPBGAP}}, + {"1440", {512, 1, 1, 2, 224, 2880, 0xf0, 9, 18, 2, BPBGAP}}, + {"2880", {512, 2, 1, 2, 240, 5760, 0xf0, 9, 36, 2, BPBGAP}} +}; + +static const u_int8_t bootcode[] = { + 0xfa, /* cli */ + 0x31, 0xc0, /* xor ax,ax */ + 0x8e, 0xd0, /* mov ss,ax */ + 0xbc, 0x00, 0x7c, /* mov sp,7c00h */ + 0xfb, /* sti */ + 0x8e, 0xd8, /* mov ds,ax */ + 0xe8, 0x00, 0x00, /* call $ + 3 */ + 0x5e, /* pop si */ + 0x83, 0xc6, 0x19, /* add si,+19h */ + 0xbb, 0x07, 0x00, /* mov bx,0007h */ + 0xfc, /* cld */ + 0xac, /* lodsb */ + 0x84, 0xc0, /* test al,al */ + 0x74, 0x06, /* jz $ + 8 */ + 0xb4, 0x0e, /* mov ah,0eh */ + 0xcd, 0x10, /* int 10h */ + 0xeb, 0xf5, /* jmp $ - 9 */ + 0x30, 0xe4, /* xor ah,ah */ + 0xcd, 0x16, /* int 16h */ + 0xcd, 0x19, /* int 19h */ + 0x0d, 0x0a, + 'N', 'o', 'n', '-', 's', 'y', 's', 't', + 'e', 'm', ' ', 'd', 'i', 's', 'k', + 0x0d, 0x0a, + 'P', 'r', 'e', 's', 's', ' ', 'a', 'n', + 'y', ' ', 'k', 'e', 'y', ' ', 't', 'o', + ' ', 'r', 'e', 'b', 'o', 'o', 't', + 0x0d, 0x0a, + 0 +}; + +static volatile sig_atomic_t got_siginfo; +static void infohandler(int); + +static void check_mounted(const char *, mode_t); +static void getstdfmt(const char *, struct bpb *); +static void getdiskinfo(int, const char *, const char *, int, + struct bpb *); +static void print_bpb(struct bpb *); +static u_int ckgeom(const char *, u_int, const char *); +static void mklabel(u_int8_t *, const char *); +static int oklabel(const char *); +static void setstr(u_int8_t *, const char *, size_t); + +int mkfs_msdos(const char *fname, const char *dtype, + const struct msdos_options *op) +{ + char buf[MAXPATHLEN]; + struct sigaction si_sa; + struct stat sb; + struct timeval tv; + struct bpb bpb; + struct tm *tm; + struct bs *bs; + struct bsbpb *bsbpb; + struct bsxbpb *bsxbpb; + struct bsx *bsx; + struct de *de; + u_int8_t *img; + const char *bname; + ssize_t n; + time_t now; + u_int fat, bss, rds, cls, dir, lsn, x, x1, x2; + int fd, fd1; + struct msdos_options o = *op; + + if (o.OEM_string && strlen(o.OEM_string) > 8) { + errx(1, "%s: bad OEM string", o.OEM_string); + } + if (o.create_size) { + if (o.no_create) + errx(1, "create (-C) is incompatible with -N"); + fd = open(fname, O_RDWR | O_CREAT | O_TRUNC, 0644); + if (fd == -1) + errx(1, "failed to create %s", fname); + if (ftruncate(fd, o.create_size)) + errx(1, "failed to initialize %jd bytes", (intmax_t)o.create_size); + } else if ((fd = open(fname, o.no_create ? O_RDONLY : O_RDWR)) == -1) + err(1, "%s", fname); + if (fstat(fd, &sb)) + err(1, "%s", fname); + if (o.create_size) { + if (!S_ISREG(sb.st_mode)) + warnx("warning, %s is not a regular file", fname); + } else { + if (!S_ISCHR(sb.st_mode)) + warnx("warning, %s is not a character device", fname); + } + if (!o.no_create) + check_mounted(fname, sb.st_mode); + if (o.offset && o.offset != lseek(fd, o.offset, SEEK_SET)) + errx(1, "cannot seek to %jd", (intmax_t)o.offset); + memset(&bpb, 0, sizeof(bpb)); + if (o.floppy) { + getstdfmt(o.floppy, &bpb); + bpb.bpbHugeSectors = bpb.bpbSectors; + bpb.bpbSectors = 0; + bpb.bpbBigFATsecs = bpb.bpbFATsecs; + bpb.bpbFATsecs = 0; + } + if (o.drive_heads) + bpb.bpbHeads = o.drive_heads; + if (o.sectors_per_track) + bpb.bpbSecPerTrack = o.sectors_per_track; + if (o.bytes_per_sector) + bpb.bpbBytesPerSec = o.bytes_per_sector; + if (o.size) + bpb.bpbHugeSectors = o.size; + if (o.hidden_sectors_set) + bpb.bpbHiddenSecs = o.hidden_sectors; + if (!(o.floppy || (o.drive_heads && o.sectors_per_track && o.bytes_per_sector && o.size && o.hidden_sectors_set))) { + off_t delta; + getdiskinfo(fd, fname, dtype, o.hidden_sectors_set, &bpb); + bpb.bpbHugeSectors -= (o.offset / bpb.bpbBytesPerSec); + delta = bpb.bpbHugeSectors % bpb.bpbSecPerTrack; + if (delta != 0) { + warnx("trim %d sectors to adjust to a multiple of %d", + (int)delta, bpb.bpbSecPerTrack); + bpb.bpbHugeSectors -= delta; + } + if (bpb.bpbSecPerClust == 0) { /* set defaults */ + if (bpb.bpbHugeSectors <= 6000) /* about 3MB -> 512 bytes */ + bpb.bpbSecPerClust = 1; + else if (bpb.bpbHugeSectors <= (1<<17)) /* 64M -> 4k */ + bpb.bpbSecPerClust = 8; + else if (bpb.bpbHugeSectors <= (1<<19)) /* 256M -> 8k */ + bpb.bpbSecPerClust = 16; + else if (bpb.bpbHugeSectors <= (1<<21)) /* 1G -> 16k */ + bpb.bpbSecPerClust = 32; + else + bpb.bpbSecPerClust = 64; /* otherwise 32k */ + } + } + if (!powerof2(bpb.bpbBytesPerSec)) + errx(1, "bytes/sector (%u) is not a power of 2", bpb.bpbBytesPerSec); + if (bpb.bpbBytesPerSec < MINBPS) + errx(1, "bytes/sector (%u) is too small; minimum is %u", + bpb.bpbBytesPerSec, MINBPS); + if (o.volume_label && !oklabel(o.volume_label)) + errx(1, "%s: bad volume label", o.volume_label); + if (!(fat = o.fat_type)) { + if (o.floppy) + fat = 12; + else if (!o.directory_entries && (o.info_sector || o.backup_sector)) + fat = 32; + } + if ((fat == 32 && o.directory_entries) || (fat != 32 && (o.info_sector || o.backup_sector))) + errx(1, "-%c is not a legal FAT%s option", + fat == 32 ? 'e' : o.info_sector ? 'i' : 'k', + fat == 32 ? "32" : "12/16"); + if (o.floppy && fat == 32) + bpb.bpbRootDirEnts = 0; + if (fat != 0 && fat != 12 && fat != 16 && fat != 32) { + errx(1, "%d: bad FAT type", fat); + } + + if (o.block_size) { + if (!powerof2(o.block_size)) + errx(1, "block size (%u) is not a power of 2", o.block_size); + if (o.block_size < bpb.bpbBytesPerSec) + errx(1, "block size (%u) is too small; minimum is %u", + o.block_size, bpb.bpbBytesPerSec); + if (o.block_size > bpb.bpbBytesPerSec * MAXSPC) + errx(1, "block size (%u) is too large; maximum is %u", + o.block_size, bpb.bpbBytesPerSec * MAXSPC); + bpb.bpbSecPerClust = o.block_size / bpb.bpbBytesPerSec; + } + if (o.sectors_per_cluster) { + if (!powerof2(o.sectors_per_cluster)) + errx(1, "sectors/cluster (%u) is not a power of 2", o.sectors_per_cluster); + bpb.bpbSecPerClust = o.sectors_per_cluster; + } + if (o.reserved_sectors) + bpb.bpbResSectors = o.reserved_sectors; + if (o.num_FAT) { + if (o.num_FAT > MAXNFT) + errx(1, "number of FATs (%u) is too large; maximum is %u", + o.num_FAT, MAXNFT); + bpb.bpbFATs = o.num_FAT; + } + if (o.directory_entries) + bpb.bpbRootDirEnts = o.directory_entries; + if (o.media_descriptor_set) { + if (o.media_descriptor < 0xf0) + errx(1, "illegal media descriptor (%#x)", o.media_descriptor); + bpb.bpbMedia = o.media_descriptor; + } + if (o.sectors_per_fat) + bpb.bpbBigFATsecs = o.sectors_per_fat; + if (o.info_sector) + bpb.bpbFSInfo = o.info_sector; + if (o.backup_sector) + bpb.bpbBackup = o.backup_sector; + bss = 1; + bname = NULL; + fd1 = -1; + if (o.bootstrap) { + bname = o.bootstrap; + if (!strchr(bname, '/')) { + snprintf(buf, sizeof(buf), "/boot/%s", bname); + if (!(bname = strdup(buf))) + err(1, NULL); + } + if ((fd1 = open(bname, O_RDONLY)) == -1 || fstat(fd1, &sb)) + err(1, "%s", bname); + if (!S_ISREG(sb.st_mode) || sb.st_size % bpb.bpbBytesPerSec || + sb.st_size < bpb.bpbBytesPerSec || + sb.st_size > bpb.bpbBytesPerSec * MAXU16) + errx(1, "%s: inappropriate file type or format", bname); + bss = sb.st_size / bpb.bpbBytesPerSec; + } + if (!bpb.bpbFATs) + bpb.bpbFATs = 2; + if (!fat) { + if (bpb.bpbHugeSectors < (bpb.bpbResSectors ? bpb.bpbResSectors : bss) + + howmany((RESFTE + (bpb.bpbSecPerClust ? MINCLS16 : MAXCLS12 + 1)) * + (bpb.bpbSecPerClust ? 16 : 12) / BPN, + bpb.bpbBytesPerSec * NPB) * + bpb.bpbFATs + + howmany(bpb.bpbRootDirEnts ? bpb.bpbRootDirEnts : DEFRDE, + bpb.bpbBytesPerSec / sizeof(struct de)) + + (bpb.bpbSecPerClust ? MINCLS16 : MAXCLS12 + 1) * + (bpb.bpbSecPerClust ? bpb.bpbSecPerClust : + howmany(DEFBLK, bpb.bpbBytesPerSec))) + fat = 12; + else if (bpb.bpbRootDirEnts || bpb.bpbHugeSectors < + (bpb.bpbResSectors ? bpb.bpbResSectors : bss) + + howmany((RESFTE + MAXCLS16) * 2, bpb.bpbBytesPerSec) * + bpb.bpbFATs + + howmany(DEFRDE, bpb.bpbBytesPerSec / sizeof(struct de)) + + (MAXCLS16 + 1) * + (bpb.bpbSecPerClust ? bpb.bpbSecPerClust : + howmany(8192, bpb.bpbBytesPerSec))) + fat = 16; + else + fat = 32; + } + x = bss; + if (fat == 32) { + if (!bpb.bpbFSInfo) { + if (x == MAXU16 || x == bpb.bpbBackup) + errx(1, "no room for info sector"); + bpb.bpbFSInfo = x; + } + if (bpb.bpbFSInfo != MAXU16 && x <= bpb.bpbFSInfo) + x = bpb.bpbFSInfo + 1; + if (!bpb.bpbBackup) { + if (x == MAXU16) + errx(1, "no room for backup sector"); + bpb.bpbBackup = x; + } else if (bpb.bpbBackup != MAXU16 && bpb.bpbBackup == bpb.bpbFSInfo) + errx(1, "backup sector would overwrite info sector"); + if (bpb.bpbBackup != MAXU16 && x <= bpb.bpbBackup) + x = bpb.bpbBackup + 1; + } + if (!bpb.bpbResSectors) + bpb.bpbResSectors = fat == 32 ? + MAX(x, MAX(16384 / bpb.bpbBytesPerSec, 4)) : x; + else if (bpb.bpbResSectors < x) + errx(1, "too few reserved sectors (need %d have %d)", x, + bpb.bpbResSectors); + if (fat != 32 && !bpb.bpbRootDirEnts) + bpb.bpbRootDirEnts = DEFRDE; + rds = howmany(bpb.bpbRootDirEnts, bpb.bpbBytesPerSec / sizeof(struct de)); + if (!bpb.bpbSecPerClust) + for (bpb.bpbSecPerClust = howmany(fat == 16 ? DEFBLK16 : + DEFBLK, bpb.bpbBytesPerSec); + bpb.bpbSecPerClust < MAXSPC && + bpb.bpbResSectors + + howmany((RESFTE + maxcls(fat)) * (fat / BPN), + bpb.bpbBytesPerSec * NPB) * + bpb.bpbFATs + + rds + + (u_int64_t) (maxcls(fat) + 1) * + bpb.bpbSecPerClust <= bpb.bpbHugeSectors; + bpb.bpbSecPerClust <<= 1) + continue; + if (fat != 32 && bpb.bpbBigFATsecs > MAXU16) + errx(1, "too many sectors/FAT for FAT12/16"); + x1 = bpb.bpbResSectors + rds; + x = bpb.bpbBigFATsecs ? bpb.bpbBigFATsecs : 1; + if (x1 + (u_int64_t)x * bpb.bpbFATs > bpb.bpbHugeSectors) + errx(1, "meta data exceeds file system size"); + x1 += x * bpb.bpbFATs; + x = (u_int64_t)(bpb.bpbHugeSectors - x1) * bpb.bpbBytesPerSec * NPB / + (bpb.bpbSecPerClust * bpb.bpbBytesPerSec * NPB + fat / + BPN * bpb.bpbFATs); + x2 = howmany((RESFTE + MIN(x, maxcls(fat))) * (fat / BPN), + bpb.bpbBytesPerSec * NPB); + if (!bpb.bpbBigFATsecs) { + bpb.bpbBigFATsecs = x2; + x1 += (bpb.bpbBigFATsecs - 1) * bpb.bpbFATs; + } + cls = (bpb.bpbHugeSectors - x1) / bpb.bpbSecPerClust; + x = (u_int64_t)bpb.bpbBigFATsecs * bpb.bpbBytesPerSec * NPB / (fat / BPN) - + RESFTE; + if (cls > x) + cls = x; + if (bpb.bpbBigFATsecs < x2) + warnx("warning: sectors/FAT limits file system to %u clusters", + cls); + if (cls < mincls(fat)) + errx(1, "%u clusters too few clusters for FAT%u, need %u", cls, fat, + mincls(fat)); + if (cls > maxcls(fat)) { + cls = maxcls(fat); + bpb.bpbHugeSectors = x1 + (cls + 1) * bpb.bpbSecPerClust - 1; + warnx("warning: FAT type limits file system to %u sectors", + bpb.bpbHugeSectors); + } + printf("%s: %u sector%s in %u FAT%u cluster%s " + "(%u bytes/cluster)\n", fname, cls * bpb.bpbSecPerClust, + cls * bpb.bpbSecPerClust == 1 ? "" : "s", cls, fat, + cls == 1 ? "" : "s", bpb.bpbBytesPerSec * bpb.bpbSecPerClust); + if (!bpb.bpbMedia) + bpb.bpbMedia = !bpb.bpbHiddenSecs ? 0xf0 : 0xf8; + if (fat == 32) + bpb.bpbRootClust = RESFTE; + if (bpb.bpbHiddenSecs + bpb.bpbHugeSectors <= MAXU16) { + bpb.bpbSectors = bpb.bpbHugeSectors; + bpb.bpbHugeSectors = 0; + } + if (fat != 32) { + bpb.bpbFATsecs = bpb.bpbBigFATsecs; + bpb.bpbBigFATsecs = 0; + } + print_bpb(&bpb); + if (!o.no_create) { + gettimeofday(&tv, NULL); + now = tv.tv_sec; + tm = localtime(&now); + if (!(img = malloc(bpb.bpbBytesPerSec))) + err(1, NULL); + dir = bpb.bpbResSectors + (bpb.bpbFATsecs ? bpb.bpbFATsecs : + bpb.bpbBigFATsecs) * bpb.bpbFATs; + memset(&si_sa, 0, sizeof(si_sa)); + si_sa.sa_handler = infohandler; + if (sigaction(SIGINFO, &si_sa, NULL) == -1) + err(1, "sigaction SIGINFO"); + for (lsn = 0; lsn < dir + (fat == 32 ? bpb.bpbSecPerClust : rds); lsn++) { + if (got_siginfo) { + fprintf(stderr,"%s: writing sector %u of %u (%u%%)\n", + fname, lsn, + (dir + (fat == 32 ? bpb.bpbSecPerClust: rds)), + (lsn * 100) / (dir + + (fat == 32 ? bpb.bpbSecPerClust: rds))); + got_siginfo = 0; + } + x = lsn; + if (o.bootstrap && + fat == 32 && bpb.bpbBackup != MAXU16 && + bss <= bpb.bpbBackup && x >= bpb.bpbBackup) { + x -= bpb.bpbBackup; + if (!x && lseek(fd1, o.offset, SEEK_SET)) + err(1, "%s", bname); + } + if (o.bootstrap && x < bss) { + if ((n = read(fd1, img, bpb.bpbBytesPerSec)) == -1) + err(1, "%s", bname); + if ((unsigned)n != bpb.bpbBytesPerSec) + errx(1, "%s: can't read sector %u", bname, x); + } else + memset(img, 0, bpb.bpbBytesPerSec); + if (!lsn || + (fat == 32 && bpb.bpbBackup != MAXU16 && + lsn == bpb.bpbBackup)) { + x1 = sizeof(struct bs); + bsbpb = (struct bsbpb *)(img + x1); + mk2(bsbpb->bpbBytesPerSec, bpb.bpbBytesPerSec); + mk1(bsbpb->bpbSecPerClust, bpb.bpbSecPerClust); + mk2(bsbpb->bpbResSectors, bpb.bpbResSectors); + mk1(bsbpb->bpbFATs, bpb.bpbFATs); + mk2(bsbpb->bpbRootDirEnts, bpb.bpbRootDirEnts); + mk2(bsbpb->bpbSectors, bpb.bpbSectors); + mk1(bsbpb->bpbMedia, bpb.bpbMedia); + mk2(bsbpb->bpbFATsecs, bpb.bpbFATsecs); + mk2(bsbpb->bpbSecPerTrack, bpb.bpbSecPerTrack); + mk2(bsbpb->bpbHeads, bpb.bpbHeads); + mk4(bsbpb->bpbHiddenSecs, bpb.bpbHiddenSecs); + mk4(bsbpb->bpbHugeSectors, bpb.bpbHugeSectors); + x1 += sizeof(struct bsbpb); + if (fat == 32) { + bsxbpb = (struct bsxbpb *)(img + x1); + mk4(bsxbpb->bpbBigFATsecs, bpb.bpbBigFATsecs); + mk2(bsxbpb->bpbExtFlags, 0); + mk2(bsxbpb->bpbFSVers, 0); + mk4(bsxbpb->bpbRootClust, bpb.bpbRootClust); + mk2(bsxbpb->bpbFSInfo, bpb.bpbFSInfo); + mk2(bsxbpb->bpbBackup, bpb.bpbBackup); + x1 += sizeof(struct bsxbpb); + } + bsx = (struct bsx *)(img + x1); + mk1(bsx->exBootSignature, 0x29); + if (o.volume_id_set) + x = o.volume_id; + else + x = (((u_int)(1 + tm->tm_mon) << 8 | + (u_int)tm->tm_mday) + + ((u_int)tm->tm_sec << 8 | + (u_int)(tv.tv_usec / 10))) << 16 | + ((u_int)(1900 + tm->tm_year) + + ((u_int)tm->tm_hour << 8 | + (u_int)tm->tm_min)); + mk4(bsx->exVolumeID, x); + mklabel(bsx->exVolumeLabel, o.volume_label ? o.volume_label : "NO NAME"); + sprintf(buf, "FAT%u", fat); + setstr(bsx->exFileSysType, buf, sizeof(bsx->exFileSysType)); + if (!o.bootstrap) { + x1 += sizeof(struct bsx); + bs = (struct bs *)img; + mk1(bs->bsJump[0], 0xeb); + mk1(bs->bsJump[1], x1 - 2); + mk1(bs->bsJump[2], 0x90); + setstr(bs->bsOemName, o.OEM_string ? o.OEM_string : "BSD4.4 ", + sizeof(bs->bsOemName)); + memcpy(img + x1, bootcode, sizeof(bootcode)); + mk2(img + MINBPS - 2, DOSMAGIC); + } + } else if (fat == 32 && bpb.bpbFSInfo != MAXU16 && + (lsn == bpb.bpbFSInfo || + (bpb.bpbBackup != MAXU16 && + lsn == bpb.bpbBackup + bpb.bpbFSInfo))) { + mk4(img, 0x41615252); + mk4(img + MINBPS - 28, 0x61417272); + mk4(img + MINBPS - 24, 0xffffffff); + mk4(img + MINBPS - 20, bpb.bpbRootClust); + mk2(img + MINBPS - 2, DOSMAGIC); + } else if (lsn >= bpb.bpbResSectors && lsn < dir && + !((lsn - bpb.bpbResSectors) % + (bpb.bpbFATsecs ? bpb.bpbFATsecs : + bpb.bpbBigFATsecs))) { + mk1(img[0], bpb.bpbMedia); + for (x = 1; x < fat * (fat == 32 ? 3 : 2) / 8; x++) + mk1(img[x], fat == 32 && x % 4 == 3 ? 0x0f : 0xff); + } else if (lsn == dir && o.volume_label) { + de = (struct de *)img; + mklabel(de->deName, o.volume_label); + mk1(de->deAttributes, 050); + x = (u_int)tm->tm_hour << 11 | + (u_int)tm->tm_min << 5 | + (u_int)tm->tm_sec >> 1; + mk2(de->deMTime, x); + x = (u_int)(tm->tm_year - 80) << 9 | + (u_int)(tm->tm_mon + 1) << 5 | + (u_int)tm->tm_mday; + mk2(de->deMDate, x); + } + if ((n = write(fd, img, bpb.bpbBytesPerSec)) == -1) + err(1, "%s", fname); + if ((unsigned)n != bpb.bpbBytesPerSec) + errx(1, "%s: can't write sector %u", fname, lsn); + } + } + return 0; +} + +/* + * Exit with error if file system is mounted. + */ +static void +check_mounted(const char *fname, mode_t mode) +{ + struct statfs *mp; + const char *s1, *s2; + size_t len; + int n, r; + + if (!(n = getmntinfo(&mp, MNT_NOWAIT))) + err(1, "getmntinfo"); + len = strlen(_PATH_DEV); + s1 = fname; + if (!strncmp(s1, _PATH_DEV, len)) + s1 += len; + r = S_ISCHR(mode) && s1 != fname && *s1 == 'r'; + for (; n--; mp++) { + s2 = mp->f_mntfromname; + if (!strncmp(s2, _PATH_DEV, len)) + s2 += len; + if ((r && s2 != mp->f_mntfromname && !strcmp(s1 + 1, s2)) || + !strcmp(s1, s2)) + errx(1, "%s is mounted on %s", fname, mp->f_mntonname); + } +} + +/* + * Get a standard format. + */ +static void +getstdfmt(const char *fmt, struct bpb *bpb) +{ + u_int x, i; + + x = sizeof(stdfmt) / sizeof(stdfmt[0]); + for (i = 0; i < x && strcmp(fmt, stdfmt[i].name); i++); + if (i == x) + errx(1, "%s: unknown standard format", fmt); + *bpb = stdfmt[i].bpb; +} + +/* + * Get disk slice, partition, and geometry information. + */ +static void +getdiskinfo(int fd, const char *fname, const char *dtype, __unused int oflag, + struct bpb *bpb) +{ + struct disklabel *lp, dlp; + struct fd_type type; + off_t ms, hs = 0; + + lp = NULL; + + /* If the user specified a disk type, try to use that */ + if (dtype != NULL) { + lp = getdiskbyname(dtype); + } + + /* Maybe it's a floppy drive */ + if (lp == NULL) { + if (ioctl(fd, DIOCGMEDIASIZE, &ms) == -1) { + struct stat st; + + if (fstat(fd, &st)) + err(1, "cannot get disk size"); + /* create a fake geometry for a file image */ + ms = st.st_size; + dlp.d_secsize = 512; + dlp.d_nsectors = 63; + dlp.d_ntracks = 255; + dlp.d_secperunit = ms / dlp.d_secsize; + lp = &dlp; + } else if (ioctl(fd, FD_GTYPE, &type) != -1) { + dlp.d_secsize = 128 << type.secsize; + dlp.d_nsectors = type.sectrac; + dlp.d_ntracks = type.heads; + dlp.d_secperunit = ms / dlp.d_secsize; + lp = &dlp; + } + } + + /* Maybe it's a fixed drive */ + if (lp == NULL) { + if (bpb->bpbBytesPerSec) + dlp.d_secsize = bpb->bpbBytesPerSec; + if (bpb->bpbBytesPerSec == 0 && ioctl(fd, DIOCGSECTORSIZE, + &dlp.d_secsize) == -1) + err(1, "cannot get sector size"); + + dlp.d_secperunit = ms / dlp.d_secsize; + + if (bpb->bpbSecPerTrack == 0 && ioctl(fd, DIOCGFWSECTORS, + &dlp.d_nsectors) == -1) { + warn("cannot get number of sectors per track"); + dlp.d_nsectors = 63; + } + if (bpb->bpbHeads == 0 && + ioctl(fd, DIOCGFWHEADS, &dlp.d_ntracks) == -1) { + warn("cannot get number of heads"); + if (dlp.d_secperunit <= 63*1*1024) + dlp.d_ntracks = 1; + else if (dlp.d_secperunit <= 63*16*1024) + dlp.d_ntracks = 16; + else + dlp.d_ntracks = 255; + } + + hs = (ms / dlp.d_secsize) - dlp.d_secperunit; + lp = &dlp; + } + + if (bpb->bpbBytesPerSec == 0) + bpb->bpbBytesPerSec = ckgeom(fname, lp->d_secsize, "bytes/sector"); + if (bpb->bpbSecPerTrack == 0) + bpb->bpbSecPerTrack = ckgeom(fname, lp->d_nsectors, "sectors/track"); + if (bpb->bpbHeads == 0) + bpb->bpbHeads = ckgeom(fname, lp->d_ntracks, "drive heads"); + if (bpb->bpbHugeSectors == 0) + bpb->bpbHugeSectors = lp->d_secperunit; + if (bpb->bpbHiddenSecs == 0) + bpb->bpbHiddenSecs = hs; +} + +/* + * Print out BPB values. + */ +static void +print_bpb(struct bpb *bpb) +{ + printf("BytesPerSec=%u SecPerClust=%u ResSectors=%u FATs=%u", + bpb->bpbBytesPerSec, bpb->bpbSecPerClust, bpb->bpbResSectors, + bpb->bpbFATs); + if (bpb->bpbRootDirEnts) + printf(" RootDirEnts=%u", bpb->bpbRootDirEnts); + if (bpb->bpbSectors) + printf(" Sectors=%u", bpb->bpbSectors); + printf(" Media=%#x", bpb->bpbMedia); + if (bpb->bpbFATsecs) + printf(" FATsecs=%u", bpb->bpbFATsecs); + printf(" SecPerTrack=%u Heads=%u HiddenSecs=%u", bpb->bpbSecPerTrack, + bpb->bpbHeads, bpb->bpbHiddenSecs); + if (bpb->bpbHugeSectors) + printf(" HugeSectors=%u", bpb->bpbHugeSectors); + if (!bpb->bpbFATsecs) { + printf(" FATsecs=%u RootCluster=%u", bpb->bpbBigFATsecs, + bpb->bpbRootClust); + printf(" FSInfo="); + printf(bpb->bpbFSInfo == MAXU16 ? "%#x" : "%u", bpb->bpbFSInfo); + printf(" Backup="); + printf(bpb->bpbBackup == MAXU16 ? "%#x" : "%u", bpb->bpbBackup); + } + printf("\n"); +} + +/* + * Check a disk geometry value. + */ +static u_int +ckgeom(const char *fname, u_int val, const char *msg) +{ + if (!val) + errx(1, "%s: no default %s", fname, msg); + if (val > MAXU16) + errx(1, "%s: illegal %s %d", fname, msg, val); + return val; +} + +/* + * Check a volume label. + */ +static int +oklabel(const char *src) +{ + int c, i; + + for (i = 0; i <= 11; i++) { + c = (u_char)*src++; + if (c < ' ' + !i || strchr("\"*+,./:;<=>?[\\]|", c)) + break; + } + return i && !c; +} + +/* + * Make a volume label. + */ +static void +mklabel(u_int8_t *dest, const char *src) +{ + int c, i; + + for (i = 0; i < 11; i++) { + c = *src ? toupper(*src++) : ' '; + *dest++ = !i && c == '\xe5' ? 5 : c; + } +} + +/* + * Copy string, padding with spaces. + */ +static void +setstr(u_int8_t *dest, const char *src, size_t len) +{ + while (len--) + *dest++ = *src ? *src++ : ' '; +} + +static void +infohandler(int sig __unused) +{ + + got_siginfo = 1; +} Added: head/sbin/newfs_msdos/mkfs_msdos.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sbin/newfs_msdos/mkfs_msdos.h Thu Oct 15 19:00:33 2015 (r289376) @@ -0,0 +1,61 @@ +/*- + * Copyright (c) 2015 The FreeBSD Foundation + * All rights reserved. + * + * This software was developed by Ed Maste under sponsorship from + * the FreeBSD Foundation. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 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 AUTHORS 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 AUTHORS 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$ + */ + +struct msdos_options { + const char *bootstrap; + const char *volume_label; + const char *OEM_string; + const char *floppy; + u_int fat_type; + u_int volume_id; + u_int bytes_per_sector; + u_int sectors_per_fat; + u_int block_size; + u_int sectors_per_cluster; + u_int directory_entries; + u_int drive_heads; + u_int info_sector; + u_int backup_sector; + u_int media_descriptor; + u_int num_FAT; + u_int hidden_sectors; + u_int reserved_sectors; + u_int size; + u_int sectors_per_track; + int no_create; + off_t create_size; + off_t offset; + int volume_id_set; + int media_descriptor_set; + int hidden_sectors_set; +}; + +int mkfs_msdos(const char *, const char *, const struct msdos_options *); Modified: head/sbin/newfs_msdos/newfs_msdos.c ============================================================================== --- head/sbin/newfs_msdos/newfs_msdos.c Thu Oct 15 18:55:43 2015 (r289375) +++ head/sbin/newfs_msdos/newfs_msdos.c Thu Oct 15 19:00:33 2015 (r289376) @@ -31,233 +31,24 @@ static const char rcsid[] = #endif /* not lint */ #include -#include -#include -#include -#include -#include -#include -#include #include #include -#include -#include #include -#include #include #include #include -#include #include -#define MAXU16 0xffff /* maximum unsigned 16-bit quantity */ -#define BPN 4 /* bits per nibble */ -#define NPB 2 /* nibbles per byte */ - -#define DOSMAGIC 0xaa55 /* DOS magic number */ -#define MINBPS 512 /* minimum bytes per sector */ -#define MAXSPC 128 /* maximum sectors per cluster */ -#define MAXNFT 16 /* maximum number of FATs */ -#define DEFBLK 4096 /* default block size */ -#define DEFBLK16 2048 /* default block size FAT16 */ -#define DEFRDE 512 /* default root directory entries */ -#define RESFTE 2 /* reserved FAT entries */ -#define MINCLS12 1U /* minimum FAT12 clusters */ -#define MINCLS16 0xff5U /* minimum FAT16 clusters */ -#define MINCLS32 0xfff5U /* minimum FAT32 clusters */ -#define MAXCLS12 0xff4U /* maximum FAT12 clusters */ -#define MAXCLS16 0xfff4U /* maximum FAT16 clusters */ -#define MAXCLS32 0xffffff4U /* maximum FAT32 clusters */ - -#define mincls(fat) ((fat) == 12 ? MINCLS12 : \ - (fat) == 16 ? MINCLS16 : \ - MINCLS32) - -#define maxcls(fat) ((fat) == 12 ? MAXCLS12 : \ - (fat) == 16 ? MAXCLS16 : \ - MAXCLS32) - -#define mk1(p, x) \ - (p) = (u_int8_t)(x) - -#define mk2(p, x) \ - (p)[0] = (u_int8_t)(x), \ - (p)[1] = (u_int8_t)((x) >> 010) - -#define mk4(p, x) \ - (p)[0] = (u_int8_t)(x), \ - (p)[1] = (u_int8_t)((x) >> 010), \ - (p)[2] = (u_int8_t)((x) >> 020), \ - (p)[3] = (u_int8_t)((x) >> 030) +#include "mkfs_msdos.h" #define argto1(arg, lo, msg) argtou(arg, lo, 0xff, msg) #define argto2(arg, lo, msg) argtou(arg, lo, 0xffff, msg) *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@freebsd.org Thu Oct 15 19:07:39 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 850EBA15672; Thu, 15 Oct 2015 19:07:39 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 511BC7CF; Thu, 15 Oct 2015 19:07:39 +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 t9FJ7cIl002253; Thu, 15 Oct 2015 19:07:38 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9FJ7cnK002252; Thu, 15 Oct 2015 19:07:38 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201510151907.t9FJ7cnK002252@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Thu, 15 Oct 2015 19:07:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289377 - head/sys/vm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Oct 2015 19:07:39 -0000 Author: kib Date: Thu Oct 15 19:07:38 2015 New Revision: 289377 URL: https://svnweb.freebsd.org/changeset/base/289377 Log: Revert r289302, invalid pages can be queued, e.g. by vfs_vmio_unwire(). Found by: alc Tested by: pho Sponsored by: The FreeBSD Foundation Modified: head/sys/vm/vm_pageout.c Modified: head/sys/vm/vm_pageout.c ============================================================================== --- head/sys/vm/vm_pageout.c Thu Oct 15 19:00:33 2015 (r289376) +++ head/sys/vm/vm_pageout.c Thu Oct 15 19:07:38 2015 (r289377) @@ -1174,12 +1174,11 @@ unlock_page: queues_locked = FALSE; /* - * Invalid pages cannot appear on a queue. If - * vm_pageout_fallback_object_lock() allowed a window - * where the page could be invalidated, it should - * detect this. + * Invalid pages can be easily freed. They cannot be + * mapped, vm_page_free() asserts this. */ - KASSERT(m->valid != 0, ("Invalid page %p on inact queue", m)); + if (m->valid == 0) + goto free_page; /* * If the page has been referenced and the object is not dead, @@ -1232,6 +1231,7 @@ unlock_page: /* * Clean pages can be freed. */ +free_page: vm_page_free(m); PCPU_INC(cnt.v_dfree); --page_shortage; From owner-svn-src-all@freebsd.org Thu Oct 15 19:13:54 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 859D1A15955; Thu, 15 Oct 2015 19:13:54 +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 500D9D47; Thu, 15 Oct 2015 19:13:54 +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 t9FJDrno005044; Thu, 15 Oct 2015 19:13:53 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9FJDrPE005043; Thu, 15 Oct 2015 19:13:53 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201510151913.t9FJDrPE005043@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Thu, 15 Oct 2015 19:13:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289378 - head/secure X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Oct 2015 19:13:54 -0000 Author: bdrewery Date: Thu Oct 15 19:13:53 2015 New Revision: 289378 URL: https://svnweb.freebsd.org/changeset/base/289378 Log: Mark sub-make targets as .MAKE and .PHONY to handle -n and always-build properly. MFC after: 1 week Sponsored by: EMC / Isilon Storage Division Modified: head/secure/Makefile Modified: head/secure/Makefile ============================================================================== --- head/secure/Makefile Thu Oct 15 19:07:38 2015 (r289377) +++ head/secure/Makefile Thu Oct 15 19:13:53 2015 (r289378) @@ -17,7 +17,7 @@ SPROGS+=usr.sbin/sendmail .endif # This target is used to rebuild these programs with crypto. -secure: +secure: .MAKE .PHONY .for entry in ${SPROGS} cd ${.CURDIR}/../${entry}; \ ${MAKE} cleandir; \ @@ -28,7 +28,7 @@ secure: .endfor # This target is used to rebuild these programs without crypto. -insecure: +insecure: .MAKE .PHONY .for entry in ${SPROGS} cd ${.CURDIR}/../${entry}; \ ${MAKE} MK_CRYPT=no cleandir; \ From owner-svn-src-all@freebsd.org Thu Oct 15 19:49:10 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C5F6DA15152; Thu, 15 Oct 2015 19:49:10 +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 79EEB119; Thu, 15 Oct 2015 19:49:10 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t9FJn9je014291; Thu, 15 Oct 2015 19:49:09 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9FJn9ej014290; Thu, 15 Oct 2015 19:49:09 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201510151949.t9FJn9ej014290@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Thu, 15 Oct 2015 19:49:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289379 - in head/gnu/usr.bin/cc: collect2 protoize X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Oct 2015 19:49:10 -0000 Author: bdrewery Date: Thu Oct 15 19:49:09 2015 New Revision: 289379 URL: https://svnweb.freebsd.org/changeset/base/289379 Log: Remove directories disconnected since r169718. MFC after: 1 week Sponsored by: EMC / Isilon Storage Division Deleted: head/gnu/usr.bin/cc/collect2/ head/gnu/usr.bin/cc/protoize/ From owner-svn-src-all@freebsd.org Thu Oct 15 19:51:35 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A1242A153C3; Thu, 15 Oct 2015 19:51:35 +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 54B306DD; Thu, 15 Oct 2015 19:51:35 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t9FJpY02016932; Thu, 15 Oct 2015 19:51:34 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9FJpYmm016931; Thu, 15 Oct 2015 19:51:34 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201510151951.t9FJpYmm016931@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Thu, 15 Oct 2015 19:51:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289380 - head/gnu/usr.bin/cc/c++filt X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Oct 2015 19:51:35 -0000 Author: bdrewery Date: Thu Oct 15 19:51:34 2015 New Revision: 289380 URL: https://svnweb.freebsd.org/changeset/base/289380 Log: Remove empty directory c++filt leftover from r286332. Sponsored by: EMC / Isilon Storage Division Deleted: head/gnu/usr.bin/cc/c++filt/ From owner-svn-src-all@freebsd.org Thu Oct 15 20:27:16 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C12D6A165F5; Thu, 15 Oct 2015 20:27:16 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 903829E5; Thu, 15 Oct 2015 20:27:16 +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 t9FKRFvA031178; Thu, 15 Oct 2015 20:27:15 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9FKRFgT031177; Thu, 15 Oct 2015 20:27:15 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201510152027.t9FKRFgT031177@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Thu, 15 Oct 2015 20:27:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289384 - head/lib X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Oct 2015 20:27:16 -0000 Author: bdrewery Date: Thu Oct 15 20:27:15 2015 New Revision: 289384 URL: https://svnweb.freebsd.org/changeset/base/289384 Log: Let the SUBDIR_DEPEND*c++ variables actually work rather than being parsed as a +=. These were safe due to a .WAIT very early on. Sponsored by: EMC / Isilon Storage Division Modified: head/lib/Makefile Modified: head/lib/Makefile ============================================================================== --- head/lib/Makefile Thu Oct 15 19:57:13 2015 (r289383) +++ head/lib/Makefile Thu Oct 15 20:27:15 2015 (r289384) @@ -129,7 +129,7 @@ SUBDIR_DEPEND_libarchive= libz libbz2 li SUBDIR_DEPEND_libatm= libmd SUBDIR_DEPEND_libauditdm= libbsm SUBDIR_DEPEND_libbsnmp= ${_libnetgraph} -SUBDIR_DEPEND_libc++= libcxxrt +SUBDIR_DEPEND_libc++:= libcxxrt SUBDIR_DEPEND_libc= libcompiler_rt SUBDIR_DEPEND_libcam= libsbuf SUBDIR_DEPEND_libcapsicum= libnv @@ -148,7 +148,7 @@ SUBDIR_DEPEND_libpjdlog= libutil SUBDIR_DEPEND_libprocstat= libkvm libutil SUBDIR_DEPEND_libradius= libmd SUBDIR_DEPEND_libsmb= libkiconv -SUBDIR_DEPEND_libstdc++= msun +SUBDIR_DEPEND_libstdc++:= msun SUBDIR_DEPEND_libtacplus= libmd SUBDIR_DEPEND_libulog= libmd SUBDIR_DEPEND_libunbound= ${_libldns} From owner-svn-src-all@freebsd.org Thu Oct 15 20:36:06 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 00248A16726; Thu, 15 Oct 2015 20:36:05 +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 ADA3BE32; Thu, 15 Oct 2015 20:36:05 +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 t9FKa4Lv034029; Thu, 15 Oct 2015 20:36:04 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9FKa4dZ034028; Thu, 15 Oct 2015 20:36:04 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201510152036.t9FKa4dZ034028@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Thu, 15 Oct 2015 20:36: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: r289385 - 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 " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Oct 2015 20:36:06 -0000 Author: adrian Date: Thu Oct 15 20:36:04 2015 New Revision: 289385 URL: https://svnweb.freebsd.org/changeset/base/289385 Log: Add the paravirt.h support from -HEAD. Submitted by: eric Sponsored by: Norse Corp, Inc. Added: stable/10/sys/net/paravirt.h (contents, props changed) Added: stable/10/sys/net/paravirt.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/sys/net/paravirt.h Thu Oct 15 20:36:04 2015 (r289385) @@ -0,0 +1,157 @@ +/* + * Copyright (C) 2013 Luigi Rizzo. 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. + */ + +#ifndef NET_PARAVIRT_H +#define NET_PARAVIRT_H + + /* + * $FreeBSD$ + * + Support for virtio-like communication between host (H) and guest (G) NICs. + + THIS IS EXPERIMENTAL CODE AND SUBJECT TO CHANGE. + + The guest allocates the shared Communication Status Block (csb) and + write its physical address at CSBAL and CSBAH (data is little endian). + csb->csb_on enables the mode. If disabled, the device acts a regular one. + + Notifications for tx and rx are exchanged without vm exits + if possible. In particular (only mentioning csb mode below), + the following actions are performed. In the description below, + "double check" means verifying again the condition that caused + the previous action, and reverting the action if the condition has + changed. The condition typically depends on a variable set by the + other party, and the double check is done to avoid races. E.g. + + // start with A=0 + again: + // do something + if ( cond(C) ) { // C is written by the other side + A = 1; + // barrier + if ( !cond(C) ) { + A = 0; + goto again; + } + } + + TX: start from idle: + H starts with host_need_txkick=1 when the I/O thread bh is idle. Upon new + transmissions, G always updates guest_tdt. If host_need_txkick == 1, + G also writes to the TDT, which acts as a kick to H (so pending + writes are always dispatched to H as soon as possible.) + + TX: active state: + On the kick (TDT write) H sets host_need_txkick == 0 (if not + done already by G), and starts an I/O thread trying to consume + packets from TDH to guest_tdt, periodically refreshing host_tdh + and TDH. When host_tdh == guest_tdt, H sets host_need_txkick=1, + and then does the "double check" for race avoidance. + + TX: G runs out of buffers + XXX there are two mechanisms, one boolean (using guest_need_txkick) + and one with a threshold (using guest_txkick_at). They are mutually + exclusive. + BOOLEAN: when G has no space, it sets guest_need_txkick=1 and does + the double check. If H finds guest_need_txkick== 1 on a write + to TDH, it also generates an interrupt. + THRESHOLD: G sets guest_txkick_at to the TDH value for which it + wants to receive an interrupt. When H detects that TDH moves + across guest_txkick_at, it generates an interrupt. + This second mechanism reduces the number of interrupts and + TDT writes on the transmit side when the host is too slow. + + RX: start from idle + G starts with guest_need_rxkick = 1 when the receive ring is empty. + As packets arrive, H updates host_rdh (and RDH) and also generates an + interrupt when guest_need_rxkick == 1 (so incoming packets are + always reported to G as soon as possible, apart from interrupt + moderation delays). It also tracks guest_rdt for new buffers. + + RX: active state + As the interrupt arrives, G sets guest_need_rxkick = 0 and starts + draining packets from the receive ring, while updating guest_rdt + When G runs out of packets it sets guest_need_rxkick=1 and does the + double check. + + RX: H runs out of buffers + XXX there are two mechanisms, one boolean (using host_need_rxkick) + and one with a threshold (using host_xxkick_at). They are mutually + exclusive. + BOOLEAN: when H has no space, it sets host_need_rxkick=1 and does the + double check. If G finds host_need_rxkick==1 on updating guest_rdt, + it also writes to RDT causing a kick to H. + THRESHOLD: H sets host_rxkick_at to the RDT value for which it wants + to receive a kick. When G detects that guest_rdt moves across + host_rxkick_at, it writes to RDT thus generates a kick. + This second mechanism reduces the number of kicks and + RDT writes on the receive side when the guest is too slow and + would free only a few buffers at a time. + + */ +struct paravirt_csb { + /* XXX revise the layout to minimize cache bounces. + * Usage is described as follows: + * [GH][RW][+-0] guest/host reads/writes frequently/rarely/almost never + */ + /* these are (mostly) written by the guest */ + uint32_t guest_tdt; /* GW+ HR+ pkt to transmit */ + uint32_t guest_need_txkick; /* GW- HR+ G ran out of tx bufs, request kick */ + uint32_t guest_need_rxkick; /* GW- HR+ G ran out of rx pkts, request kick */ + uint32_t guest_csb_on; /* GW- HR+ enable paravirtual mode */ + uint32_t guest_rdt; /* GW+ HR+ rx buffers available */ + uint32_t guest_txkick_at; /* GW- HR+ tx ring pos. where G expects an intr */ + uint32_t guest_use_msix; /* GW0 HR0 guest uses MSI-X interrupts. */ + uint32_t pad[9]; + + /* these are (mostly) written by the host */ + uint32_t host_tdh; /* GR0 HW- shadow register, mostly unused */ + uint32_t host_need_txkick; /* GR+ HW- start the iothread */ + uint32_t host_txcycles_lim; /* GW- HR- how much to spin before sleep. + * set by the guest */ + uint32_t host_txcycles; /* GR0 HW- counter, but no need to be exported */ + uint32_t host_rdh; /* GR0 HW- shadow register, mostly unused */ + uint32_t host_need_rxkick; /* GR+ HW- flush rx queued packets */ + uint32_t host_isr; /* GR* HW* shadow copy of ISR */ + uint32_t host_rxkick_at; /* GR+ HW- rx ring pos where H expects a kick */ + uint32_t vnet_ring_high; /* Vnet ring physical address high. */ + uint32_t vnet_ring_low; /* Vnet ring physical address low. */ +}; + +#define NET_PARAVIRT_CSB_SIZE 4096 +#define NET_PARAVIRT_NONE (~((uint32_t)0)) + +#ifdef QEMU_PCI_H + +/* + * API functions only available within QEMU + */ + +void paravirt_configure_csb(struct paravirt_csb** csb, uint32_t csbbal, + uint32_t csbbah, QEMUBH* tx_bh, AddressSpace *as); + +#endif /* QEMU_PCI_H */ + +#endif /* NET_PARAVIRT_H */ From owner-svn-src-all@freebsd.org Thu Oct 15 20:37:31 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A4ACAA167C1; Thu, 15 Oct 2015 20:37:31 +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 56897FE4; Thu, 15 Oct 2015 20:37:31 +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 t9FKbUuX034117; Thu, 15 Oct 2015 20:37:30 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9FKbUVI034115; Thu, 15 Oct 2015 20:37:30 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201510152037.t9FKbUVI034115@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Thu, 15 Oct 2015 20:37: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: r289386 - 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 " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Oct 2015 20:37:31 -0000 Author: adrian Date: Thu Oct 15 20:37:30 2015 New Revision: 289386 URL: https://svnweb.freebsd.org/changeset/base/289386 Log: if_lem: Bring over the missing pieces from -HEAD to make NIC_PARAVIRT work. The paravirt support for the driver and netmap code was already MFCed, but the adapter and ifnet API bits weren't. This was backported from -HEAD by Eric Melville . Submitted by: eric Sponsored by: Norse Corp, Inc. Modified: stable/10/sys/dev/e1000/if_lem.c stable/10/sys/dev/e1000/if_lem.h Modified: stable/10/sys/dev/e1000/if_lem.c ============================================================================== --- stable/10/sys/dev/e1000/if_lem.c Thu Oct 15 20:36:04 2015 (r289385) +++ stable/10/sys/dev/e1000/if_lem.c Thu Oct 15 20:37:30 2015 (r289386) @@ -951,7 +951,7 @@ lem_start_locked(struct ifnet *ifp) if (adapter->num_tx_desc_avail <= EM_TX_OP_THRESHOLD) ifp->if_drv_flags |= IFF_DRV_OACTIVE; #ifdef NIC_PARAVIRT - if (if_getdrvflags(ifp) & IFF_DRV_OACTIVE && adapter->csb && + if ((ifp->if_drv_flags & IFF_DRV_OACTIVE) && adapter->csb && adapter->csb->guest_csb_on && !(adapter->csb->guest_need_txkick & 1)) { adapter->csb->guest_need_txkick = 1; Modified: stable/10/sys/dev/e1000/if_lem.h ============================================================================== --- stable/10/sys/dev/e1000/if_lem.h Thu Oct 15 20:36:04 2015 (r289385) +++ stable/10/sys/dev/e1000/if_lem.h Thu Oct 15 20:37:30 2015 (r289386) @@ -265,6 +265,13 @@ #define PICOSECS_PER_TICK 20833 #define TSYNC_PORT 319 /* UDP port for the protocol */ +#ifdef NIC_PARAVIRT +#define E1000_PARA_SUBDEV 0x1101 /* special id */ +#define E1000_CSBAL 0x02830 /* csb phys. addr. low */ +#define E1000_CSBAH 0x02834 /* csb phys. addr. hi */ +#include +#endif + /* * Bus dma allocation structure used by * e1000_dma_malloc and e1000_dma_free. @@ -437,6 +444,15 @@ struct adapter { boolean_t pcix_82544; boolean_t in_detach; +#ifdef NIC_PARAVIRT + struct em_dma_alloc csb_mem; + struct paravirt_csb *csb; + uint32_t rx_retries; + uint32_t tdt_csb_count; + uint32_t tdt_reg_count; + uint32_t tdt_int_count; + uint32_t guest_need_kick_count; +#endif struct e1000_hw_stats stats; }; From owner-svn-src-all@freebsd.org Thu Oct 15 20:40:24 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D56C8A16838; Thu, 15 Oct 2015 20:40:24 +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 A1903119C; Thu, 15 Oct 2015 20:40:24 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t9FKeNjr034864; Thu, 15 Oct 2015 20:40:23 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9FKeNU2034863; Thu, 15 Oct 2015 20:40:23 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201510152040.t9FKeNU2034863@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Thu, 15 Oct 2015 20:40:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289387 - head/lib X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Oct 2015 20:40:24 -0000 Author: bdrewery Date: Thu Oct 15 20:40:23 2015 New Revision: 289387 URL: https://svnweb.freebsd.org/changeset/base/289387 Log: Fix another ++= parsed as '+=', missed in r289384. Sponsored by: EMC / Isilon Storage Division Modified: head/lib/Makefile Modified: head/lib/Makefile ============================================================================== --- head/lib/Makefile Thu Oct 15 20:37:30 2015 (r289386) +++ head/lib/Makefile Thu Oct 15 20:40:23 2015 (r289387) @@ -137,7 +137,7 @@ SUBDIR_DEPEND_libcasper= libcapsicum lib SUBDIR_DEPEND_libdevstat= libkvm SUBDIR_DEPEND_libdpv= libfigpar ncurses libutil SUBDIR_DEPEND_libedit= ncurses -SUBDIR_DEPEND_libg++= msun +SUBDIR_DEPEND_libg++:= msun SUBDIR_DEPEND_libgeom= libexpat libsbuf SUBDIR_DEPEND_liblibrpcsec_gss= libgssapi SUBDIR_DEPEND_libmagic= libz From owner-svn-src-all@freebsd.org Thu Oct 15 20:46:35 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 90A30A16A2A; Thu, 15 Oct 2015 20:46:35 +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 5ABDD1908; Thu, 15 Oct 2015 20:46:35 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t9FKkY4k037217; Thu, 15 Oct 2015 20:46:34 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9FKkYOq037216; Thu, 15 Oct 2015 20:46:34 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201510152046.t9FKkYOq037216@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Thu, 15 Oct 2015 20:46:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289388 - head/lib X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Oct 2015 20:46:35 -0000 Author: bdrewery Date: Thu Oct 15 20:46:34 2015 New Revision: 289388 URL: https://svnweb.freebsd.org/changeset/base/289388 Log: Remove unneeded libg++ reference that came in with r267511 based on a removed comment. Sponsored by: EMC / Isilon Storage Division Modified: head/lib/Makefile Modified: head/lib/Makefile ============================================================================== --- head/lib/Makefile Thu Oct 15 20:40:23 2015 (r289387) +++ head/lib/Makefile Thu Oct 15 20:46:34 2015 (r289388) @@ -137,7 +137,6 @@ SUBDIR_DEPEND_libcasper= libcapsicum lib SUBDIR_DEPEND_libdevstat= libkvm SUBDIR_DEPEND_libdpv= libfigpar ncurses libutil SUBDIR_DEPEND_libedit= ncurses -SUBDIR_DEPEND_libg++:= msun SUBDIR_DEPEND_libgeom= libexpat libsbuf SUBDIR_DEPEND_liblibrpcsec_gss= libgssapi SUBDIR_DEPEND_libmagic= libz From owner-svn-src-all@freebsd.org Thu Oct 15 20:49:22 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 32332A16A86; Thu, 15 Oct 2015 20:49:22 +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 EBDF31A9E; Thu, 15 Oct 2015 20:49:21 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t9FKnLXr037342; Thu, 15 Oct 2015 20:49:21 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9FKnKle037341; Thu, 15 Oct 2015 20:49:20 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201510152049.t9FKnKle037341@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Thu, 15 Oct 2015 20:49:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289389 - head/lib X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Oct 2015 20:49:22 -0000 Author: bdrewery Date: Thu Oct 15 20:49:20 2015 New Revision: 289389 URL: https://svnweb.freebsd.org/changeset/base/289389 Log: libstdc++ also snook in incorrectly in r267511, despite not being a real subdir. Sponsored by: EMC / Isilon Storage Division Modified: head/lib/Makefile Modified: head/lib/Makefile ============================================================================== --- head/lib/Makefile Thu Oct 15 20:46:34 2015 (r289388) +++ head/lib/Makefile Thu Oct 15 20:49:20 2015 (r289389) @@ -147,7 +147,6 @@ SUBDIR_DEPEND_libpjdlog= libutil SUBDIR_DEPEND_libprocstat= libkvm libutil SUBDIR_DEPEND_libradius= libmd SUBDIR_DEPEND_libsmb= libkiconv -SUBDIR_DEPEND_libstdc++:= msun SUBDIR_DEPEND_libtacplus= libmd SUBDIR_DEPEND_libulog= libmd SUBDIR_DEPEND_libunbound= ${_libldns} From owner-svn-src-all@freebsd.org Thu Oct 15 20:50:22 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D97FCA16B81; Thu, 15 Oct 2015 20:50:22 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:1900:2254:206c::16:87]) by mx1.freebsd.org (Postfix) with ESMTP id C319C1CB1; Thu, 15 Oct 2015 20:50:22 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from mail.xzibition.com (localhost [IPv6:::1]) by freefall.freebsd.org (Postfix) with ESMTP id BB91C1D3D; Thu, 15 Oct 2015 20:50:22 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from mail.xzibition.com (localhost [172.31.3.2]) by mail.xzibition.com (Postfix) with ESMTP id 77ED8116F2; Thu, 15 Oct 2015 20:50:22 +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 INZNY6Dt81oL; Thu, 15 Oct 2015 20:50:20 +0000 (UTC) Subject: Re: svn commit: r289389 - head/lib DKIM-Filter: OpenDKIM Filter v2.9.2 mail.xzibition.com C2640116EB To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201510152049.t9FKnKle037341@repo.freebsd.org> From: Bryan Drewery Openpgp: id=F9173CB2C3AAEA7A5C8A1F0935D771BB6E4697CF; url=http://www.shatow.net/bryan/bryan2.asc Organization: FreeBSD Message-ID: <5620118C.5060007@FreeBSD.org> Date: Thu, 15 Oct 2015 13:50:20 -0700 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0 MIME-Version: 1.0 In-Reply-To: <201510152049.t9FKnKle037341@repo.freebsd.org> Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="gsauCM1lG8LlPbsxkjnFKA0jsuNLRCuQQ" X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Oct 2015 20:50:22 -0000 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --gsauCM1lG8LlPbsxkjnFKA0jsuNLRCuQQ Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Sorry for the commit spam on this file. I missed this all when "fixing" it in r289384. On 10/15/2015 1:49 PM, Bryan Drewery wrote: > Author: bdrewery > Date: Thu Oct 15 20:49:20 2015 > New Revision: 289389 > URL: https://svnweb.freebsd.org/changeset/base/289389 >=20 > Log: > libstdc++ also snook in incorrectly in r267511, despite not being a r= eal > subdir. > =20 > Sponsored by: EMC / Isilon Storage Division >=20 > Modified: > head/lib/Makefile >=20 > Modified: head/lib/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/Makefile Thu Oct 15 20:46:34 2015 (r289388) > +++ head/lib/Makefile Thu Oct 15 20:49:20 2015 (r289389) > @@ -147,7 +147,6 @@ SUBDIR_DEPEND_libpjdlog=3D libutil > SUBDIR_DEPEND_libprocstat=3D libkvm libutil > SUBDIR_DEPEND_libradius=3D libmd > SUBDIR_DEPEND_libsmb=3D libkiconv > -SUBDIR_DEPEND_libstdc++:=3D msun > SUBDIR_DEPEND_libtacplus=3D libmd > SUBDIR_DEPEND_libulog=3D libmd > SUBDIR_DEPEND_libunbound=3D ${_libldns} >=20 --=20 Regards, Bryan Drewery --gsauCM1lG8LlPbsxkjnFKA0jsuNLRCuQQ 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 iQEcBAEBAgAGBQJWIBGMAAoJEDXXcbtuRpfPHIQH+wbqhQRIwVyZl4MbKG0feGWi psrSoC/di81IhgVqR5l9WOeUTY4NHIdkpOIOn6tbbTqOEZ9rZYrW0FtD9OrVKQj4 luE2rQ64KDncVvsu3HNL0A3goIlhJBN0qKkAwpkwWzRXpFL840ixZ7lDIGiya4AA 8S/ALv3k0TE/x+CihRRyWjWY0bvrNMij5slNIUkzIed3h8PyTPKI5n7Vg7Wke2l7 jmRDHt0ISfKxLTGz2VJNLlYMAHSiZwxH0ttsiLL1VX7LJO81zkk3tPfOMeTy1ykP 5L1ppDe/7/1f2MM70OAD72eOgNIROPMXjIQ/gLJW1KYhis16MJeO9OcT64OtpDg= =GQNY -----END PGP SIGNATURE----- --gsauCM1lG8LlPbsxkjnFKA0jsuNLRCuQQ-- From owner-svn-src-all@freebsd.org Thu Oct 15 20:54:21 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 33C02A16DBB; Thu, 15 Oct 2015 20:54:21 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:1900:2254:206c::16:87]) by mx1.freebsd.org (Postfix) with ESMTP id 1D668172; Thu, 15 Oct 2015 20:54:21 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from mail.xzibition.com (localhost [IPv6:::1]) by freefall.freebsd.org (Postfix) with ESMTP id 160111FA3; Thu, 15 Oct 2015 20:54:21 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from mail.xzibition.com (localhost [172.31.3.2]) by mail.xzibition.com (Postfix) with ESMTP id CB7F411702; Thu, 15 Oct 2015 20:54:20 +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 OlKQO0H7y7ty; Thu, 15 Oct 2015 20:54:18 +0000 (UTC) Subject: Re: svn commit: r289384 - head/lib DKIM-Filter: OpenDKIM Filter v2.9.2 mail.xzibition.com 09977116FD To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201510152027.t9FKRFgT031177@repo.freebsd.org> From: Bryan Drewery Openpgp: id=F9173CB2C3AAEA7A5C8A1F0935D771BB6E4697CF; url=http://www.shatow.net/bryan/bryan2.asc Organization: FreeBSD Message-ID: <5620127C.9070409@FreeBSD.org> Date: Thu, 15 Oct 2015 13:54:20 -0700 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0 MIME-Version: 1.0 In-Reply-To: <201510152027.t9FKRFgT031177@repo.freebsd.org> Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="E49o5nIfaL6gCDKRg0enRtaK5s62Bo14p" X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Oct 2015 20:54:21 -0000 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --E49o5nIfaL6gCDKRg0enRtaK5s62Bo14p Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 10/15/2015 1:27 PM, Bryan Drewery wrote: > Author: bdrewery > Date: Thu Oct 15 20:27:15 2015 > New Revision: 289384 > URL: https://svnweb.freebsd.org/changeset/base/289384 >=20 > Log: > Let the SUBDIR_DEPEND*c++ variables actually work rather than being p= arsed > as a +=3D. These were safe due to a .WAIT very early on. > =20 My analysis was wrong. The libc++ dependency on libcxxrt was actually broken here and would not have built if you went directly into lib and built in parallel. It was hidden by the fact that a proper dependency is in Makefile.inc1 via an __L target. The power of redundancy! This too allows kerberos5/lib to work with SUBDIR_PARALLEL=3D since it's so greatly defined in Makefile.inc1. > -SUBDIR_DEPEND_libc++=3D libcxxrt > +SUBDIR_DEPEND_libc++:=3D libcxxrt > SUBDIR_DEPEND_libc=3D libcompiler_rt > SUBDIR_DEPEND_libcam=3D libsbuf > SUBDIR_DEPEND_libcapsicum=3D libnv > @@ -148,7 +148,7 @@ SUBDIR_DEPEND_libpjdlog=3D libutil --=20 Regards, Bryan Drewery --E49o5nIfaL6gCDKRg0enRtaK5s62Bo14p 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 iQEcBAEBAgAGBQJWIBJ8AAoJEDXXcbtuRpfPttUH/jSTk9jViF/rUHYo1zXaSBPf Bmuww7e+LfHLsGhmONjJH7aE+bvH58tGv1TZWMCQdj/6QmLbmfrMoYdH4XcNzpQf Vk7IYNwWUj6V7mItIj2z6mDtP8nLb1zP750v0gw9Mfy+gOJnSaWJQuL80m6cS5JU WyrlB8GdsRetIiALFpiFSxePDWAW/H5+SPnpF5e87FujE4ycZEIONehLSmO28F/L ETqG+0h9TGrkLxCrb9kdM1oia+a6APrbyqGYqHJ9hyBtxGkHHNYjqiomyeOKWQox mm/xKmBGcmrI6yN2TbzzM7jdLs0yP9EHhfRjRl6x440pQRp4+S1kkHP+n7inpdk= =vd1Y -----END PGP SIGNATURE----- --E49o5nIfaL6gCDKRg0enRtaK5s62Bo14p-- From owner-svn-src-all@freebsd.org Thu Oct 15 21:00:13 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B0BABA16F37 for ; Thu, 15 Oct 2015 21:00:13 +0000 (UTC) (envelope-from ian@freebsd.org) Received: from pmta2.delivery6.ore.mailhop.org (pmta2.delivery6.ore.mailhop.org [54.200.129.228]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8E489971 for ; Thu, 15 Oct 2015 21:00:13 +0000 (UTC) (envelope-from ian@freebsd.org) Received: from ilsoft.org (unknown [73.34.117.227]) by outbound2.ore.mailhop.org (Halon Mail Gateway) with ESMTPSA; Thu, 15 Oct 2015 21:00:19 +0000 (UTC) Received: from rev (rev [172.22.42.240]) by ilsoft.org (8.14.9/8.14.9) with ESMTP id t9FL0A3k001896; Thu, 15 Oct 2015 15:00:10 -0600 (MDT) (envelope-from ian@freebsd.org) Message-ID: <1444942810.71631.3.camel@freebsd.org> Subject: Re: svn commit: r289384 - head/lib From: Ian Lepore To: Bryan Drewery , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Date: Thu, 15 Oct 2015 15:00:10 -0600 In-Reply-To: <5620127C.9070409@FreeBSD.org> References: <201510152027.t9FKRFgT031177@repo.freebsd.org> <5620127C.9070409@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 " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Oct 2015 21:00:13 -0000 On Thu, 2015-10-15 at 13:54 -0700, Bryan Drewery wrote: > On 10/15/2015 1:27 PM, Bryan Drewery wrote: > > Author: bdrewery > > Date: Thu Oct 15 20:27:15 2015 > > New Revision: 289384 > > URL: https://svnweb.freebsd.org/changeset/base/289384 > > > > Log: > > Let the SUBDIR_DEPEND*c++ variables actually work rather than > > being parsed > > as a +=. These were safe due to a .WAIT very early on. > > > > My analysis was wrong. The libc++ dependency on libcxxrt was actually > broken here and would not have built if you went directly into lib > and > built in parallel. It was hidden by the fact that a proper dependency > is > in Makefile.inc1 via an __L target. The power of redundancy! > > This too allows kerberos5/lib to work with SUBDIR_PARALLEL= since > it's > so greatly defined in Makefile.inc1. > > But don't both sets of dependencies have to be correct? As I vaguely recall, the ones in Makefile.inc1 are used during bootstrapping and tool building, and the ones in lib/Makefile are used when world -building. It may be that when MACHINE_ARCH == TARGET_ARCH some of them are the same libraries and the Makefile.inc1 dependencies take care of everything. -- Ian > > -SUBDIR_DEPEND_libc++= libcxxrt > > +SUBDIR_DEPEND_libc++:= libcxxrt > > SUBDIR_DEPEND_libc= libcompiler_rt > > SUBDIR_DEPEND_libcam= libsbuf > > SUBDIR_DEPEND_libcapsicum= libnv > > @@ -148,7 +148,7 @@ SUBDIR_DEPEND_libpjdlog= libutil > > From owner-svn-src-all@freebsd.org Thu Oct 15 21:18:06 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 59B70A16428; Thu, 15 Oct 2015 21:18:06 +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 40D471410; Thu, 15 Oct 2015 21:18:06 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from mail.xzibition.com (localhost [IPv6:::1]) by freefall.freebsd.org (Postfix) with ESMTP id 3483A19AE; Thu, 15 Oct 2015 21:18:06 +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 DCB83117A9; Thu, 15 Oct 2015 21:18:05 +0000 (UTC) X-Virus-Scanned: amavisd-new at mail.xzibition.com Received: from mail.xzibition.com ([172.31.3.2]) by mail.xzibition.com (mail.xzibition.com [172.31.3.2]) (amavisd-new, port 10026) with LMTP id e6ZW5lN5ramn; Thu, 15 Oct 2015 21:18:02 +0000 (UTC) Subject: Re: svn commit: r289384 - head/lib DKIM-Filter: OpenDKIM Filter v2.9.2 mail.xzibition.com 66C94117A4 To: Ian Lepore , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201510152027.t9FKRFgT031177@repo.freebsd.org> <5620127C.9070409@FreeBSD.org> <1444942810.71631.3.camel@freebsd.org> From: Bryan Drewery Openpgp: id=F9173CB2C3AAEA7A5C8A1F0935D771BB6E4697CF; url=http://www.shatow.net/bryan/bryan2.asc X-Enigmail-Draft-Status: N1110 Organization: FreeBSD Message-ID: <5620180D.5010206@FreeBSD.org> Date: Thu, 15 Oct 2015 14:18:05 -0700 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0 MIME-Version: 1.0 In-Reply-To: <1444942810.71631.3.camel@freebsd.org> Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="P51kRJtLk4pJGMQoASnWCN7lLvlQWNK3u" X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Oct 2015 21:18:06 -0000 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --P51kRJtLk4pJGMQoASnWCN7lLvlQWNK3u Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: quoted-printable On 10/15/2015 2:00 PM, Ian Lepore wrote: > On Thu, 2015-10-15 at 13:54 -0700, Bryan Drewery wrote: >> On 10/15/2015 1:27 PM, Bryan Drewery wrote: >>> Author: bdrewery >>> Date: Thu Oct 15 20:27:15 2015 >>> New Revision: 289384 >>> URL: https://svnweb.freebsd.org/changeset/base/289384 >>> >>> Log: >>> Let the SUBDIR_DEPEND*c++ variables actually work rather than >>> being parsed >>> as a +=3D. These were safe due to a .WAIT very early on. >>> =20 >> >> My analysis was wrong. The libc++ dependency on libcxxrt was actually >> broken here and would not have built if you went directly into lib >> and >> built in parallel. It was hidden by the fact that a proper dependency >> is >> in Makefile.inc1 via an __L target. The power of redundancy! >> >> This too allows kerberos5/lib to work with SUBDIR_PARALLEL=3D since >> it's >> so greatly defined in Makefile.inc1. >> >> >=20 > But don't both sets of dependencies have to be correct? As I vaguely > recall, the ones in Makefile.inc1 are used during bootstrapping and > tool building, and the ones in lib/Makefile are used when world > -building. It may be that when MACHINE_ARCH =3D=3D TARGET_ARCH some of= > them are the same libraries and the Makefile.inc1 dependencies take > care of everything. It's complicated, my words may seem to contradict but it's just the nature of the convoluted process that we bootstrap the build by. Libraries, and anything else we list in the bootstrap phases, are special. Their SUBDIR_depend are less needed in the context of buildworld since they will already be built by the time the 'make libraries' builds all of lib/ with a subdir build or the 'make all' is ran on the tree, because of the __L dependencies. The special bootstrap phase stuff and special libraries need to have all of the proper __L targets to order them as they are built directly, not via bsd.subdir.mk recursing. One of the last steps of 'make libraries' does do a subdir build in lib/ since _generic_libs contains 'lib'. So yes the SUBDIR_depend are relevant for buildworld, but getting it wrong can be fine in cases where the library was built early with proper __L deps list= ed. The SUBDIR_depend are needed for manual direct subdir builds outside of buildworld and the builds 'make libraries' and 'make all' phases which use subdir builds to build things lacking a __L list. I've noticed that when people add new libraries into the early phases they usually follow-up with multiple commits trying to get it all right and update all of the proper places. Note that we actually have a 3rd dependency list in the tree now which is in the scattered Makefile.depend files. These are used for "meta mode" which I do think is more on the right track as it lets a clean build start from any directory. It doesn't use the SUBDIR_depend or the __L lists at all. The problem with it is the auto-generated nature of it can lead to problems with optional dependencies and adding new directories. --=20 Regards, Bryan Drewery --P51kRJtLk4pJGMQoASnWCN7lLvlQWNK3u 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 iQEcBAEBAgAGBQJWIBgNAAoJEDXXcbtuRpfPeEwIAIZ11UJimCfSZ6pCJzZECubN QrG4ilQglxbBXkjQxAumE2uG3WwSCQUQvboPGE1zcBjaPIcj20Kh01dARynPIWAY 6C8hARolZZuogbKnA+2nHDkx9yO2xKF+Aa+qFhdsMqKFrSpeeovjU9IvjzB1mrZs tAxuFpu7h0e8DqI3hbydj4YL6kjaMgl4G2bsui4h4Q0T89Q0nEoLwnqJYAfEfgkW qVCCx9snreBJKkmGuv2FKgOzJktLqAeMeJvVpSGJjULQC8bCGGib93fYYIyyFBdY 1sEdwjck0xtMV85VpRrqLZy9BDn+LJBhlaujPQ+CH7Pktuj37IDcsXR5F1eIvZ0= =WeWj -----END PGP SIGNATURE----- --P51kRJtLk4pJGMQoASnWCN7lLvlQWNK3u-- From owner-svn-src-all@freebsd.org Thu Oct 15 21:21:42 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id BF881A16556; Thu, 15 Oct 2015 21:21:42 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8465B18F7; Thu, 15 Oct 2015 21:21:42 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t9FLLfV1049219; Thu, 15 Oct 2015 21:21:41 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9FLLfwf049218; Thu, 15 Oct 2015 21:21:41 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201510152121.t9FLLfwf049218@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Thu, 15 Oct 2015 21:21:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289390 - 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 " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Oct 2015 21:21:42 -0000 Author: bdrewery Date: Thu Oct 15 21:21:41 2015 New Revision: 289390 URL: https://svnweb.freebsd.org/changeset/base/289390 Log: Fix buildworld with clean objdir after r289351. Sponsored by: EMC / Isilon Storage Division Modified: head/Makefile.inc1 Modified: head/Makefile.inc1 ============================================================================== --- head/Makefile.inc1 Thu Oct 15 20:49:20 2015 (r289389) +++ head/Makefile.inc1 Thu Oct 15 21:21:41 2015 (r289390) @@ -558,6 +558,7 @@ _worldtmp: mtree -deU -f ${.CURDIR}/etc/mtree/BSD.tests.dist \ -p ${WORLDTMP}${TESTSBASE} >/dev/null .if ${MK_DEBUG_FILES} != "no" + mkdir -p ${WORLDTMP}/usr/lib/debug/${TESTSBASE} mtree -deU -f ${.CURDIR}/etc/mtree/BSD.tests.dist \ -p ${WORLDTMP}/usr/lib/debug/${TESTSBASE} >/dev/null .endif From owner-svn-src-all@freebsd.org Thu Oct 15 22:41:02 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id CE9BEA16EA6; Thu, 15 Oct 2015 22:41:02 +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 AFC0518B9; Thu, 15 Oct 2015 22:41:02 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from mail.xzibition.com (localhost [IPv6:::1]) by freefall.freebsd.org (Postfix) with ESMTP id A473916C9; Thu, 15 Oct 2015 22:41:02 +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 6472F118FE; Thu, 15 Oct 2015 22:41: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 8O8-eUZSl4Yx; Thu, 15 Oct 2015 22:40:58 +0000 (UTC) Subject: Re: svn commit: r289384 - head/lib DKIM-Filter: OpenDKIM Filter v2.9.2 mail.xzibition.com 98FE0118F8 To: Ian Lepore , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201510152027.t9FKRFgT031177@repo.freebsd.org> <5620127C.9070409@FreeBSD.org> <1444942810.71631.3.camel@freebsd.org> <5620180D.5010206@FreeBSD.org> From: Bryan Drewery Openpgp: id=F9173CB2C3AAEA7A5C8A1F0935D771BB6E4697CF; url=http://www.shatow.net/bryan/bryan2.asc X-Enigmail-Draft-Status: N1110 Organization: FreeBSD Message-ID: <56202B7C.9020105@FreeBSD.org> Date: Thu, 15 Oct 2015 15:41:00 -0700 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0 MIME-Version: 1.0 In-Reply-To: <5620180D.5010206@FreeBSD.org> Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="iOfpjA51JV7QM6MSnOoxV8ruxcagnlUbh" X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Oct 2015 22:41:03 -0000 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --iOfpjA51JV7QM6MSnOoxV8ruxcagnlUbh Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: quoted-printable On 10/15/2015 2:18 PM, Bryan Drewery wrote: > On 10/15/2015 2:00 PM, Ian Lepore wrote: >> On Thu, 2015-10-15 at 13:54 -0700, Bryan Drewery wrote: >>> On 10/15/2015 1:27 PM, Bryan Drewery wrote: >>>> Author: bdrewery >>>> Date: Thu Oct 15 20:27:15 2015 >>>> New Revision: 289384 >>>> URL: https://svnweb.freebsd.org/changeset/base/289384 >>>> >>>> Log: >>>> Let the SUBDIR_DEPEND*c++ variables actually work rather than >>>> being parsed >>>> as a +=3D. These were safe due to a .WAIT very early on. >>>> =20 >>> >>> My analysis was wrong. The libc++ dependency on libcxxrt was actually= >>> broken here and would not have built if you went directly into lib >>> and >>> built in parallel. It was hidden by the fact that a proper dependency= >>> is >>> in Makefile.inc1 via an __L target. The power of redundancy! >>> >>> This too allows kerberos5/lib to work with SUBDIR_PARALLEL=3D since >>> it's >>> so greatly defined in Makefile.inc1. >>> >>> >> >> But don't both sets of dependencies have to be correct? As I vaguely >> recall, the ones in Makefile.inc1 are used during bootstrapping and >> tool building, and the ones in lib/Makefile are used when world >> -building. It may be that when MACHINE_ARCH =3D=3D TARGET_ARCH some o= f >> them are the same libraries and the Makefile.inc1 dependencies take >> care of everything. >=20 > It's complicated, my words may seem to contradict but it's just the > nature of the convoluted process that we bootstrap the build by. >=20 > Libraries, and anything else we list in the bootstrap phases, are > special. Their SUBDIR_depend are less needed in the context of > buildworld since they will already be built by the time the 'make > libraries' builds all of lib/ with a subdir build or the 'make all' is > ran on the tree, because of the __L dependencies. The special bootstrap= > phase stuff and special libraries need to have all of the proper __L > targets to order them as they are built directly, not via bsd.subdir.mk= > recursing. One of the last steps of 'make libraries' does do a subdir > build in lib/ since _generic_libs contains 'lib'. So yes the > SUBDIR_depend are relevant for buildworld, but getting it wrong can be > fine in cases where the library was built early with proper __L deps li= sted. >=20 > The SUBDIR_depend are needed for manual direct subdir builds outside of= > buildworld and the builds 'make libraries' and 'make all' phases which > use subdir builds to build things lacking a __L list. >=20 > I've noticed that when people add new libraries into the early phases > they usually follow-up with multiple commits trying to get it all right= > and update all of the proper places. >=20 > Note that we actually have a 3rd dependency list in the tree now which > is in the scattered Makefile.depend files. These are used for "meta > mode" which I do think is more on the right track as it lets a clean > build start from any directory. It doesn't use the SUBDIR_depend or th= e > __L lists at all. The problem with it is the auto-generated nature of > it can lead to problems with optional dependencies and adding new > directories. >=20 Here's an example of how weird buildworld is with libraries. This is during the 'make all' phase. 0:00.32 make all DIRPRFX=3Dusr.bin/svn/lib/libsvn_client/ 0:09.27 make all DIRPRFX=3Dlib/libc/ 0:00.49 make all DIRPRFX=3Dusr.sbin/wpa/wpa_supplicant/ 0:00.05 make all DIRPRFX=3Dusr.bin/svn/ 0:00.03 make all DIRPRFX=3Dusr.bin/svn/lib/ 0:00.12 make all DIRPRFX=3Dusr.sbin/wpa/ 0:14.68 make -f Makefile.inc1 DESTDIR=3D/usr/obj/root/svn/base/tmp par-a= ll 0:06.35 make all DIRPRFX=3Dlib/ 0:12.63 make all DIRPRFX=3Dusr.bin/ 0:13.22 make all DIRPRFX=3Dusr.sbin/ 0:07.16 make -j15 buildworld It's building lib/ a 2nd time while also building things depending on libraries, so really at this point the SUBDIR_depend in lib/ and elsewhere are not too important since they were already built by 'make libraries' which had the __L targets. We probably don't need to run 'make all' in the library directories a 2nd time, just 'install'. Also interestingly they are building in parallel without actually using the SUBDIR_PARALLEL mechanism as it was made to be parallel in a similar way in r30113. This is likely redundant now as well. I'll look into those more. --=20 Regards, Bryan Drewery --iOfpjA51JV7QM6MSnOoxV8ruxcagnlUbh 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 iQEcBAEBAgAGBQJWICt8AAoJEDXXcbtuRpfPOIgIAI/W9MyVSmkCwu1UAzPpJx8Z NM4zULsU9jhdXBBz8hnIxbOtf/A+YvCmdTgGTGUkGLndVfEa8eIXhIItceJLlUom BJ5wtIKL+zK5WinJus2gYTyd3IwnfHH09TJK4dBd9Cs/AeIDfVO28x+tPqg5ntJh 1PhbQSTHfAWgvbSGoFFjyj4GXSG5qbmcCyuNm8l3jRKAXVuXeAeUXo1ABFsva32B GxL8UtlqtwiqnflKZgSsrcaQiwFr7xMj05Oc+UxBBz7QOw3nhnAYPljzboTU4efm EhFK3IX+btETpm2+MDMGCTSKNNcK3MKKcASCgJ92JRj3PQHwfOwme0KvNPA9dEg= =Psba -----END PGP SIGNATURE----- --iOfpjA51JV7QM6MSnOoxV8ruxcagnlUbh-- From owner-svn-src-all@freebsd.org Thu Oct 15 22:49:58 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0E46CA16FDC; Thu, 15 Oct 2015 22:49:58 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id DA81A1B82; Thu, 15 Oct 2015 22:49:57 +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 t9FMnuer072772; Thu, 15 Oct 2015 22:49:56 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9FMnuna072765; Thu, 15 Oct 2015 22:49:56 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201510152249.t9FMnuna072765@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Thu, 15 Oct 2015 22:49:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289391 - 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 " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Oct 2015 22:49:58 -0000 Author: bdrewery Date: Thu Oct 15 22:49:56 2015 New Revision: 289391 URL: https://svnweb.freebsd.org/changeset/base/289391 Log: Make installing to a non-existent directory an error. Before this, if a file was installed to DESTDIR/some/dir and that directory was missing due to not having ran 'make distrib-dirs' yet, the file would be installed as 'some/dir'. For something like bsd.incs.mk with INCLUDEDIR being a sub-directory of /usr/include, this could result in all of the headers being installed to a file rather than getting a directory of them. Now it will error that the file/directory does not exist rather than hide the issue. Another option being discussed is to implement GNU's install -D flag which would auto create any missing directories. This is a mitigation of the problem. The proper order to the build is to run 'make distrib-dirs' first, but that can be forgotten if building from a sub-directory after updating the source code to the latest revision. MFC after: 2 weeks Sponsored by: EMC / Isilon Storage Division Modified: head/share/mk/bsd.confs.mk head/share/mk/bsd.files.mk head/share/mk/bsd.incs.mk head/share/mk/bsd.info.mk head/share/mk/bsd.lib.mk head/share/mk/bsd.man.mk head/share/mk/bsd.prog.mk Modified: head/share/mk/bsd.confs.mk ============================================================================== --- head/share/mk/bsd.confs.mk Thu Oct 15 21:21:41 2015 (r289390) +++ head/share/mk/bsd.confs.mk Thu Oct 15 22:49:56 2015 (r289391) @@ -69,7 +69,7 @@ _${group}INS: ${_${group}CONFS} ${.ALLSRC} ${DESTDIR}${${group}DIR}/${${group}NAME} .else ${INSTALL} -C -o ${${group}OWN} -g ${${group}GRP} -m ${${group}MODE} \ - ${.ALLSRC} ${DESTDIR}${${group}DIR} + ${.ALLSRC} ${DESTDIR}${${group}DIR}/ .endif .endif Modified: head/share/mk/bsd.files.mk ============================================================================== --- head/share/mk/bsd.files.mk Thu Oct 15 21:21:41 2015 (r289390) +++ head/share/mk/bsd.files.mk Thu Oct 15 22:49:56 2015 (r289391) @@ -75,7 +75,7 @@ _${group}INS: ${_${group}FILES} ${DESTDIR}${${group}DIR}/${${group}NAME} .else ${INSTALL} -o ${${group}OWN} -g ${${group}GRP} \ - -m ${${group}MODE} ${.ALLSRC} ${DESTDIR}${${group}DIR} + -m ${${group}MODE} ${.ALLSRC} ${DESTDIR}${${group}DIR}/ .endif .endif Modified: head/share/mk/bsd.incs.mk ============================================================================== --- head/share/mk/bsd.incs.mk Thu Oct 15 21:21:41 2015 (r289390) +++ head/share/mk/bsd.incs.mk Thu Oct 15 22:49:56 2015 (r289391) @@ -70,7 +70,7 @@ _${group}INS: ${_${group}INCS} ${.ALLSRC} ${DESTDIR}${${group}DIR}/${${group}NAME} .else ${INSTALL} -C -o ${${group}OWN} -g ${${group}GRP} -m ${${group}MODE} \ - ${.ALLSRC} ${DESTDIR}${${group}DIR} + ${.ALLSRC} ${DESTDIR}${${group}DIR}/ .endif .endif Modified: head/share/mk/bsd.info.mk ============================================================================== --- head/share/mk/bsd.info.mk Thu Oct 15 21:21:41 2015 (r289390) +++ head/share/mk/bsd.info.mk Thu Oct 15 22:49:56 2015 (r289391) @@ -177,11 +177,11 @@ CLEANFILES+= ${INFO:S/$/.info.*.html/} $ install: ${INSTALLINFODIRS} .if !empty(IFILES:N*.html) ${INSTALL} -o ${INFOOWN} -g ${INFOGRP} -m ${INFOMODE} \ - ${IFILES:N*.html} ${DESTDIR}${INFODIR} + ${IFILES:N*.html} ${DESTDIR}${INFODIR}/ .endif .if !empty(FORMATS:Mhtml) ${INSTALL} -o ${INFOOWN} -g ${INFOGRP} -m ${INFOMODE} \ - ${INFO:S/$/.info.*.html/} ${DESTDIR}${INFODIR} + ${INFO:S/$/.info.*.html/} ${DESTDIR}${INFODIR}/ .endif .else # The indirection in the following is to avoid the null install rule Modified: head/share/mk/bsd.lib.mk ============================================================================== --- head/share/mk/bsd.lib.mk Thu Oct 15 21:21:41 2015 (r289390) +++ head/share/mk/bsd.lib.mk Thu Oct 15 22:49:56 2015 (r289391) @@ -339,23 +339,23 @@ realinstall: _libinstall _libinstall: .if defined(LIB) && !empty(LIB) && ${MK_INSTALLLIB} != "no" ${INSTALL} -C -o ${LIBOWN} -g ${LIBGRP} -m ${LIBMODE} \ - ${_INSTALLFLAGS} lib${LIB_PRIVATE}${LIB}.a ${DESTDIR}${_LIBDIR} + ${_INSTALLFLAGS} lib${LIB_PRIVATE}${LIB}.a ${DESTDIR}${_LIBDIR}/ .endif .if ${MK_PROFILE} != "no" && defined(LIB) && !empty(LIB) ${INSTALL} -C -o ${LIBOWN} -g ${LIBGRP} -m ${LIBMODE} \ - ${_INSTALLFLAGS} lib${LIB_PRIVATE}${LIB}_p.a ${DESTDIR}${_LIBDIR} + ${_INSTALLFLAGS} lib${LIB_PRIVATE}${LIB}_p.a ${DESTDIR}${_LIBDIR}/ .endif .if defined(SHLIB_NAME) ${INSTALL} ${STRIP} -o ${LIBOWN} -g ${LIBGRP} -m ${LIBMODE} \ ${_INSTALLFLAGS} ${_SHLINSTALLFLAGS} \ - ${SHLIB_NAME} ${DESTDIR}${_SHLIBDIR} + ${SHLIB_NAME} ${DESTDIR}${_SHLIBDIR}/ .if ${MK_DEBUG_FILES} != "no" .if defined(DEBUGMKDIR) - ${INSTALL} -T debug -d ${DESTDIR}${DEBUGFILEDIR} + ${INSTALL} -T debug -d ${DESTDIR}${DEBUGFILEDIR}/ .endif ${INSTALL} -T debug -o ${LIBOWN} -g ${LIBGRP} -m ${DEBUGMODE} \ ${_INSTALLFLAGS} \ - ${SHLIB_NAME}.debug ${DESTDIR}${DEBUGFILEDIR} + ${SHLIB_NAME}.debug ${DESTDIR}${DEBUGFILEDIR}/ .endif .if defined(SHLIB_LINK) .if commands(${SHLIB_LINK:R}.ld) @@ -378,11 +378,11 @@ _libinstall: .endif # SHIB_NAME .if defined(INSTALL_PIC_ARCHIVE) && defined(LIB) && !empty(LIB) && ${MK_TOOLCHAIN} != "no" ${INSTALL} -o ${LIBOWN} -g ${LIBGRP} -m ${LIBMODE} \ - ${_INSTALLFLAGS} lib${LIB}_pic.a ${DESTDIR}${_LIBDIR} + ${_INSTALLFLAGS} lib${LIB}_pic.a ${DESTDIR}${_LIBDIR}/ .endif .if defined(WANT_LINT) && !defined(NO_LINT) && defined(LIB) && !empty(LIB) ${INSTALL} -o ${LIBOWN} -g ${LIBGRP} -m ${LIBMODE} \ - ${_INSTALLFLAGS} ${LINTLIB} ${DESTDIR}${LINTLIBDIR} + ${_INSTALLFLAGS} ${LINTLIB} ${DESTDIR}${LINTLIBDIR}/ .endif .endif # !defined(INTERNALLIB) Modified: head/share/mk/bsd.man.mk ============================================================================== --- head/share/mk/bsd.man.mk Thu Oct 15 21:21:41 2015 (r289390) +++ head/share/mk/bsd.man.mk Thu Oct 15 22:49:56 2015 (r289391) @@ -187,7 +187,7 @@ _maninstall: ${MAN} .endfor .else .for _page _sect in ${.ALLSRC:C/\.([^.]*)$/.\1 \1/} - @d=${DESTDIR}${MANDIR}${_sect}${MANSUBDIR}; \ + @d=${DESTDIR}${MANDIR}${_sect}${MANSUBDIR}/; \ ${ECHO} ${MINSTALL} ${_page} $${d}; \ ${MINSTALL} $${page} $${d}; .endfor @@ -201,7 +201,7 @@ _maninstall: ${MAN} .else .for __page in ${MAN} ${MINSTALL} ${__page:T:S/$/${MCOMPRESS_EXT}/g} \ - ${DESTDIR}${MANDIR}${__page:E}${MANSUBDIR} + ${DESTDIR}${MANDIR}${__page:E}${MANSUBDIR}/ .if defined(MANBUILDCAT) && !empty(MANBUILDCAT) ${MINSTALL} ${__page:T:S/$/${CATEXT}${MCOMPRESS_EXT}/g} \ ${DESTDIR}${CATDIR}${__page:E}${MANSUBDIR}/${__page:T:S/$/${MCOMPRESS_EXT}/} Modified: head/share/mk/bsd.prog.mk ============================================================================== --- head/share/mk/bsd.prog.mk Thu Oct 15 21:21:41 2015 (r289390) +++ head/share/mk/bsd.prog.mk Thu Oct 15 22:49:56 2015 (r289391) @@ -205,7 +205,7 @@ _proginstall: ${_INSTALLFLAGS} ${PROG} ${DESTDIR}${BINDIR}/${PROGNAME} .if ${MK_DEBUG_FILES} != "no" .if defined(DEBUGMKDIR) - ${INSTALL} -T debug -d ${DESTDIR}${DEBUGFILEDIR} + ${INSTALL} -T debug -d ${DESTDIR}${DEBUGFILEDIR}/ .endif ${INSTALL} -T debug -o ${BINOWN} -g ${BINGRP} -m ${DEBUGMODE} \ ${PROGNAME}.debug ${DESTDIR}${DEBUGFILEDIR}/${PROGNAME}.debug From owner-svn-src-all@freebsd.org Thu Oct 15 22:55:12 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C8F0BA151F3; Thu, 15 Oct 2015 22:55:12 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 89D30E6; Thu, 15 Oct 2015 22:55:12 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t9FMtB4i075607; Thu, 15 Oct 2015 22:55:11 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9FMt8aK075575; Thu, 15 Oct 2015 22:55:08 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201510152255.t9FMt8aK075575@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Thu, 15 Oct 2015 22:55:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289393 - in head: bin/sh/tests cddl etc/periodic gnu gnu/lib gnu/usr.bin/cc gnu/usr.bin/groff gnu/usr.bin/rcs include lib/libiconv_modules secure secure/libexec secure/usr.bin secure/u... X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Oct 2015 22:55:13 -0000 Author: bdrewery Date: Thu Oct 15 22:55:08 2015 New Revision: 289393 URL: https://svnweb.freebsd.org/changeset/base/289393 Log: Add more SUBDIR_PARALLEL. MFC after: 3 weeks Sponsored by: EMC / Isilon Storage Division Modified: head/bin/sh/tests/Makefile head/cddl/Makefile head/etc/periodic/Makefile head/gnu/Makefile head/gnu/lib/Makefile head/gnu/usr.bin/cc/Makefile head/gnu/usr.bin/groff/Makefile head/gnu/usr.bin/rcs/Makefile head/include/Makefile head/lib/libiconv_modules/Makefile head/secure/Makefile head/secure/libexec/Makefile head/secure/usr.bin/Makefile head/secure/usr.sbin/Makefile head/share/Makefile head/share/doc/Makefile head/share/doc/legal/Makefile head/share/doc/papers/Makefile head/share/doc/psd/Makefile head/share/doc/smm/Makefile head/share/doc/usd/Makefile head/share/examples/Makefile head/share/i18n/Makefile head/share/i18n/csmapper/Makefile head/share/i18n/esdb/Makefile head/share/man/Makefile head/share/syscons/Makefile head/tests/Makefile head/tests/sys/Makefile head/tests/sys/pjdfstest/Makefile head/tests/sys/pjdfstest/tests/Makefile Modified: head/bin/sh/tests/Makefile ============================================================================== --- head/bin/sh/tests/Makefile Thu Oct 15 22:50:36 2015 (r289392) +++ head/bin/sh/tests/Makefile Thu Oct 15 22:55:08 2015 (r289393) @@ -10,4 +10,6 @@ TESTS_SUBDIRS+= parameters TESTS_SUBDIRS+= parser TESTS_SUBDIRS+= set-e +SUBDIR_PARALLEL= + .include Modified: head/cddl/Makefile ============================================================================== --- head/cddl/Makefile Thu Oct 15 22:50:36 2015 (r289392) +++ head/cddl/Makefile Thu Oct 15 22:55:08 2015 (r289393) @@ -2,10 +2,13 @@ .include -SUBDIR= lib sbin usr.bin usr.sbin +SUBDIR= lib .WAIT \ + sbin usr.bin usr.sbin .if ${MK_TESTS} != "no" SUBDIR+=tests .endif +SUBDIR_PARALLEL= + .include Modified: head/etc/periodic/Makefile ============================================================================== --- head/etc/periodic/Makefile Thu Oct 15 22:50:36 2015 (r289392) +++ head/etc/periodic/Makefile Thu Oct 15 22:55:08 2015 (r289393) @@ -1,5 +1,6 @@ # $FreeBSD$ SUBDIR= daily security weekly monthly +SUBDIR_PARALLEL= .include Modified: head/gnu/Makefile ============================================================================== --- head/gnu/Makefile Thu Oct 15 22:50:36 2015 (r289392) +++ head/gnu/Makefile Thu Oct 15 22:55:08 2015 (r289393) @@ -3,10 +3,13 @@ .include -SUBDIR= lib ${_tests} usr.bin +SUBDIR= lib .WAIT \ + ${_tests} usr.bin .if ${MK_TESTS} != "no" _tests= tests .endif +SUBDIR_PARALLEL= + .include Modified: head/gnu/lib/Makefile ============================================================================== --- head/gnu/lib/Makefile Thu Oct 15 22:50:36 2015 (r289392) +++ head/gnu/lib/Makefile Thu Oct 15 22:55:08 2015 (r289393) @@ -24,6 +24,9 @@ SUBDIR+= libreadline # have taken care of that already. .if ${MK_GNUCXX} != "no" SUBDIR+= libstdc++ libsupc++ +SUBDIR_DEPENDS_libsupc++:= libstdc++ .endif +SUBDIR_PARALLEL= + .include Modified: head/gnu/usr.bin/cc/Makefile ============================================================================== --- head/gnu/usr.bin/cc/Makefile Thu Oct 15 22:50:36 2015 (r289392) +++ head/gnu/usr.bin/cc/Makefile Thu Oct 15 22:55:08 2015 (r289393) @@ -5,7 +5,8 @@ # The order of some of these are rather important. Some depend on previous # subdirs. -SUBDIR= cc_tools libiberty libcpp libdecnumber cc_int cc cc1 include +SUBDIR= cc_tools .WAIT \ + libiberty libcpp libdecnumber cc_int cc cc1 include .if ${MK_CPP} != "no" SUBDIR+= cpp @@ -19,4 +20,13 @@ SUBDIR+= cc1plus c++ SUBDIR+= gcov .endif +SUBDIR_DEPEND_c++:= libcpp libiberty +SUBDIR_DEPEND_cc= libcpp libiberty +SUBDIR_DEPEND_cpp= libcpp libiberty +SUBDIR_DEPEND_cc1plus= cc_int libcpp libdecnumber libiberty +SUBDIR_DEPEND_cc1= cc_int libcpp libdecnumber libiberty +SUBDIR_DEPEND_gcov= libiberty + +SUBDIR_PARALLEL= + .include Modified: head/gnu/usr.bin/groff/Makefile ============================================================================== --- head/gnu/usr.bin/groff/Makefile Thu Oct 15 22:50:36 2015 (r289392) +++ head/gnu/usr.bin/groff/Makefile Thu Oct 15 22:55:08 2015 (r289393) @@ -6,4 +6,6 @@ SUBDIR= contrib font man src tmac SUBDIR_DEPEND_${subdir}= src .endfor +SUBDIR_PARALLEL= + .include Modified: head/gnu/usr.bin/rcs/Makefile ============================================================================== --- head/gnu/usr.bin/rcs/Makefile Thu Oct 15 22:50:36 2015 (r289392) +++ head/gnu/usr.bin/rcs/Makefile Thu Oct 15 22:55:08 2015 (r289393) @@ -1,5 +1,7 @@ # $FreeBSD$ -SUBDIR= lib ci co merge rcs rcsclean rcsdiff rcsmerge rlog rcsfreeze +SUBDIR= lib .WAIT \ + ci co merge rcs rcsclean rcsdiff rcsmerge rlog rcsfreeze +SUBDIR_PARALLEL= .include Modified: head/include/Makefile ============================================================================== --- head/include/Makefile Thu Oct 15 22:50:36 2015 (r289392) +++ head/include/Makefile Thu Oct 15 22:55:08 2015 (r289393) @@ -7,6 +7,7 @@ CLEANFILES= osreldate.h version vers.c SUBDIR= arpa protocols rpcsvc rpc xlocale +SUBDIR_PARALLEL= INCS= a.out.h ar.h assert.h bitstring.h complex.h cpio.h _ctype.h ctype.h \ db.h \ dirent.h dlfcn.h elf.h elf-hints.h err.h fmtmsg.h fnmatch.h fstab.h \ Modified: head/lib/libiconv_modules/Makefile ============================================================================== --- head/lib/libiconv_modules/Makefile Thu Oct 15 22:50:36 2015 (r289392) +++ head/lib/libiconv_modules/Makefile Thu Oct 15 22:55:08 2015 (r289393) @@ -5,5 +5,6 @@ SUBDIR= BIG5 DECHanyu EUC EUCTW GBK2K HZ ISO2022 JOHAB MSKanji UES UTF1632 \ UTF7 UTF8 VIQR ZW iconv_none iconv_std mapper_646 mapper_none \ mapper_parallel mapper_serial mapper_std mapper_zone +SUBDIR_PARALLEL= .include Modified: head/secure/Makefile ============================================================================== --- head/secure/Makefile Thu Oct 15 22:50:36 2015 (r289392) +++ head/secure/Makefile Thu Oct 15 22:55:08 2015 (r289393) @@ -2,7 +2,9 @@ .include -SUBDIR= lib libexec ${_tests} usr.bin usr.sbin +SUBDIR= lib .WAIT \ + libexec ${_tests} usr.bin usr.sbin +SUBDIR_PARALLEL= .if ${MK_TESTS} != "no" _tests= tests Modified: head/secure/libexec/Makefile ============================================================================== --- head/secure/libexec/Makefile Thu Oct 15 22:50:36 2015 (r289392) +++ head/secure/libexec/Makefile Thu Oct 15 22:55:08 2015 (r289393) @@ -11,4 +11,6 @@ SUBDIR+=sftp-server ssh-keysign ssh-pkcs SUBDIR+=tests .endif +SUBDIR_PARALLEL= + .include Modified: head/secure/usr.bin/Makefile ============================================================================== --- head/secure/usr.bin/Makefile Thu Oct 15 22:50:36 2015 (r289392) +++ head/secure/usr.bin/Makefile Thu Oct 15 22:55:08 2015 (r289393) @@ -14,4 +14,6 @@ SUBDIR+=scp sftp ssh ssh-add ssh-agent s SUBDIR+=tests .endif +SUBDIR_PARALLEL= + .include Modified: head/secure/usr.sbin/Makefile ============================================================================== --- head/secure/usr.sbin/Makefile Thu Oct 15 22:50:36 2015 (r289392) +++ head/secure/usr.sbin/Makefile Thu Oct 15 22:55:08 2015 (r289393) @@ -11,4 +11,6 @@ SUBDIR+=sshd SUBDIR+=tests .endif +SUBDIR_PARALLEL= + .include Modified: head/share/Makefile ============================================================================== --- head/share/Makefile Thu Oct 15 22:50:36 2015 (r289392) +++ head/share/Makefile Thu Oct 15 22:55:08 2015 (r289393) @@ -98,4 +98,6 @@ _vt= vt _zoneinfo= zoneinfo .endif +SUBDIR_PARALLEL= + .include Modified: head/share/doc/Makefile ============================================================================== --- head/share/doc/Makefile Thu Oct 15 22:50:36 2015 (r289392) +++ head/share/doc/Makefile Thu Oct 15 22:55:08 2015 (r289393) @@ -28,6 +28,8 @@ _IPv6= IPv6 _roffdocs= papers psd smm usd .endif +SUBDIR_PARALLEL= + # Default output format for troff documents is ascii. # To generate postscript versions of troff documents, use: # make PRINTERDEVICE=ps Modified: head/share/doc/legal/Makefile ============================================================================== --- head/share/doc/legal/Makefile Thu Oct 15 22:50:36 2015 (r289392) +++ head/share/doc/legal/Makefile Thu Oct 15 22:55:08 2015 (r289393) @@ -6,4 +6,6 @@ SUBDIR= intel_ipw \ intel_wpi \ realtek +SUBDIR_PARALLEL= + .include Modified: head/share/doc/papers/Makefile ============================================================================== --- head/share/doc/papers/Makefile Thu Oct 15 22:50:36 2015 (r289392) +++ head/share/doc/papers/Makefile Thu Oct 15 22:55:08 2015 (r289393) @@ -15,4 +15,6 @@ SUBDIR= beyond4.3 \ sysperf \ timecounter +SUBDIR_PARALLEL= + .include Modified: head/share/doc/psd/Makefile ============================================================================== --- head/share/doc/psd/Makefile Thu Oct 15 22:50:36 2015 (r289392) +++ head/share/doc/psd/Makefile Thu Oct 15 22:55:08 2015 (r289393) @@ -37,4 +37,6 @@ SUBDIR+=22.rpcgen \ 26.rpcrfc \ 27.nfsrpc +SUBDIR_PARALLEL= + .include Modified: head/share/doc/smm/Makefile ============================================================================== --- head/share/doc/smm/Makefile Thu Oct 15 22:50:36 2015 (r289392) +++ head/share/doc/smm/Makefile Thu Oct 15 22:55:08 2015 (r289393) @@ -32,4 +32,6 @@ _08.sendmailop= 08.sendmailop _07.lpd= 07.lpd .endif +SUBDIR_PARALLEL= + .include Modified: head/share/doc/usd/Makefile ============================================================================== --- head/share/doc/usd/Makefile Thu Oct 15 22:50:36 2015 (r289392) +++ head/share/doc/usd/Makefile Thu Oct 15 22:55:08 2015 (r289393) @@ -19,5 +19,6 @@ SUBDIR= title \ 20.meref \ 21.troff \ 22.trofftut +SUBDIR_PARALLEL= .include Modified: head/share/examples/Makefile ============================================================================== --- head/share/examples/Makefile Thu Oct 15 22:50:36 2015 (r289392) +++ head/share/examples/Makefile Thu Oct 15 22:55:08 2015 (r289393) @@ -261,4 +261,6 @@ SUBDIR+=pf SUBDIR+=tests .endif +SUBDIR_PARALLEL= + .include Modified: head/share/i18n/Makefile ============================================================================== --- head/share/i18n/Makefile Thu Oct 15 22:50:36 2015 (r289392) +++ head/share/i18n/Makefile Thu Oct 15 22:55:08 2015 (r289393) @@ -4,5 +4,6 @@ .include SUBDIR= csmapper esdb +SUBDIR_PARALLEL= .include Modified: head/share/i18n/csmapper/Makefile ============================================================================== --- head/share/i18n/csmapper/Makefile Thu Oct 15 22:50:36 2015 (r289392) +++ head/share/i18n/csmapper/Makefile Thu Oct 15 22:55:08 2015 (r289393) @@ -5,6 +5,7 @@ FILESDIR= ${CSMAPPERDIR} SUBDIR= APPLE AST BIG5 CNS CP EBCDIC GB GEORGIAN ISO646 ISO-8859 JIS \ KAZAKH KOI KS MISC TCVN +SUBDIR_PARALLEL= mapper.dir: ${SUBDIR} newfile=$$(for i in ${SUBDIR}; do \ Modified: head/share/i18n/esdb/Makefile ============================================================================== --- head/share/i18n/esdb/Makefile Thu Oct 15 22:50:36 2015 (r289392) +++ head/share/i18n/esdb/Makefile Thu Oct 15 22:55:08 2015 (r289393) @@ -5,6 +5,7 @@ FILESDIR= ${ESDBDIR} SUBDIR= APPLE AST BIG5 CP DEC EUC EBCDIC GB GEORGIAN ISO-2022 ISO-8859 \ ISO646 KAZAKH KOI MISC TCVN UTF +SUBDIR_PARALLEL= FILES+= esdb.dir esdb.dir.db esdb.alias esdb.alias.db CLEANFILES= ${FILES} Modified: head/share/man/Makefile ============================================================================== --- head/share/man/Makefile Thu Oct 15 22:50:36 2015 (r289392) +++ head/share/man/Makefile Thu Oct 15 22:55:08 2015 (r289393) @@ -5,6 +5,7 @@ # XXX MISSING: man3f SUBDIR= man1 man3 man4 man5 man6 man7 man8 man9 +SUBDIR_PARALLEL= MAKEWHATIS?= makewhatis Modified: head/share/syscons/Makefile ============================================================================== --- head/share/syscons/Makefile Thu Oct 15 22:50:36 2015 (r289392) +++ head/share/syscons/Makefile Thu Oct 15 22:55:08 2015 (r289393) @@ -1,5 +1,6 @@ # $FreeBSD$ SUBDIR= fonts keymaps scrnmaps +SUBDIR_PARALLEL= .include Modified: head/tests/Makefile ============================================================================== --- head/tests/Makefile Thu Oct 15 22:50:36 2015 (r289392) +++ head/tests/Makefile Thu Oct 15 22:55:08 2015 (r289393) @@ -4,6 +4,7 @@ SUBDIR+= etc SUBDIR+= sys +SUBDIR_PARALLEL= TESTSDIR= ${TESTSBASE} KYUAFILE= yes Modified: head/tests/sys/Makefile ============================================================================== --- head/tests/sys/Makefile Thu Oct 15 22:50:36 2015 (r289392) +++ head/tests/sys/Makefile Thu Oct 15 22:55:08 2015 (r289393) @@ -18,4 +18,6 @@ TESTS_SUBDIRS+= vm # Items not integrated into kyua runs by default SUBDIR+= pjdfstest +SUBDIR_PARALLEL= + .include Modified: head/tests/sys/pjdfstest/Makefile ============================================================================== --- head/tests/sys/pjdfstest/Makefile Thu Oct 15 22:50:36 2015 (r289392) +++ head/tests/sys/pjdfstest/Makefile Thu Oct 15 22:55:08 2015 (r289393) @@ -2,5 +2,6 @@ SUBDIR+= pjdfstest SUBDIR+= tests +SUBDIR_PARALLEL= .include Modified: head/tests/sys/pjdfstest/tests/Makefile ============================================================================== --- head/tests/sys/pjdfstest/tests/Makefile Thu Oct 15 22:50:36 2015 (r289392) +++ head/tests/sys/pjdfstest/tests/Makefile Thu Oct 15 22:55:08 2015 (r289393) @@ -36,4 +36,6 @@ TESTS_SUBDIRS+= symlink TESTS_SUBDIRS+= truncate TESTS_SUBDIRS+= unlink +SUBDIR_PARALLEL= + .include From owner-svn-src-all@freebsd.org Thu Oct 15 23:37:33 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6DCF3A158DA; Thu, 15 Oct 2015 23:37:33 +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 4CCAE123D; Thu, 15 Oct 2015 23:37:33 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from mail.xzibition.com (localhost [IPv6:::1]) by freefall.freebsd.org (Postfix) with ESMTP id 45B941206; Thu, 15 Oct 2015 23:37:33 +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 EFE7411A01; Thu, 15 Oct 2015 23:37:32 +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 KBh1e69LugCJ; Thu, 15 Oct 2015 23:37:30 +0000 (UTC) Subject: Re: svn commit: r289393 - in head: bin/sh/tests cddl etc/periodic gnu gnu/lib gnu/usr.bin/cc gnu/usr.bin/groff gnu/usr.bin/rcs include lib/libiconv_modules secure secure/libexec secure/usr.bin secure/u... DKIM-Filter: OpenDKIM Filter v2.9.2 mail.xzibition.com 141B5119FA To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201510152255.t9FMt8aK075575@repo.freebsd.org> From: Bryan Drewery Openpgp: id=F9173CB2C3AAEA7A5C8A1F0935D771BB6E4697CF; url=http://www.shatow.net/bryan/bryan2.asc Organization: FreeBSD Message-ID: <562038BC.4040606@FreeBSD.org> Date: Thu, 15 Oct 2015 16:37:32 -0700 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0 MIME-Version: 1.0 In-Reply-To: <201510152255.t9FMt8aK075575@repo.freebsd.org> Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="xffkNTh8LQmjwdTFgiMcq8tokAnQ0gxLx" X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Oct 2015 23:37:33 -0000 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --xffkNTh8LQmjwdTFgiMcq8tokAnQ0gxLx Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 10/15/2015 3:55 PM, Bryan Drewery wrote: > Author: bdrewery > Date: Thu Oct 15 22:55:08 2015 > New Revision: 289393 > URL: https://svnweb.freebsd.org/changeset/base/289393 >=20 > Log: > Add more SUBDIR_PARALLEL. > =20 > MFC after: 3 weeks > Sponsored by: EMC / Isilon Storage Division I forgot to test installworld with -j. It appears there is an issue there. I will look into it later tonight. --=20 Regards, Bryan Drewery --xffkNTh8LQmjwdTFgiMcq8tokAnQ0gxLx 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 iQEcBAEBAgAGBQJWIDi8AAoJEDXXcbtuRpfPbFgH/1X8lsgB/LISmDTFwxbg9k95 cpvSBQfhlsdcsish504Zda9F4Cb1G0jZntMMzVpUDLpWWFwmkL99P5aZ/0kD353y exKZgIvt29KGSjbgmWmpEtVIxFBQMbTk/uUqBrNh4Pf6YAvsqcQLsmXvEwrHsa6U 79WET1kK9dMUTFkIupTY2ppglABiDi2/B7uoRJIqxHWoxFv0Aa+du7jbDUCCBMvf NNKwUFP/EzRm9eDIonjnHkzesntgcL8E/RSGZKStbl8te1p46lKWXoEX7MnGZo16 9JLF4cYMudZhAyR/j9wB6a76ho2GoV2aX4L0FfhOaZiGlzEQQbGc+mtNZ/6sBH0= =YKUM -----END PGP SIGNATURE----- --xffkNTh8LQmjwdTFgiMcq8tokAnQ0gxLx-- From owner-svn-src-all@freebsd.org Thu Oct 15 23:40:27 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2F67CA15A47; Thu, 15 Oct 2015 23:40:27 +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 18E3F1456; Thu, 15 Oct 2015 23:40:27 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from mail.xzibition.com (localhost [IPv6:::1]) by freefall.freebsd.org (Postfix) with ESMTP id 12A5F1386; Thu, 15 Oct 2015 23:40:27 +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 BDC9E11A1E; Thu, 15 Oct 2015 23:40:26 +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 hfYdE55d73HK; Thu, 15 Oct 2015 23:40:24 +0000 (UTC) Subject: Re: svn commit: r289391 - head/share/mk DKIM-Filter: OpenDKIM Filter v2.9.2 mail.xzibition.com 221CB11A17 To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201510152249.t9FMnuna072765@repo.freebsd.org> From: Bryan Drewery Openpgp: id=F9173CB2C3AAEA7A5C8A1F0935D771BB6E4697CF; url=http://www.shatow.net/bryan/bryan2.asc Organization: FreeBSD Message-ID: <5620396A.1050209@FreeBSD.org> Date: Thu, 15 Oct 2015 16:40:26 -0700 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0 MIME-Version: 1.0 In-Reply-To: <201510152249.t9FMnuna072765@repo.freebsd.org> Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="g36tls76k7jvIODlGo7soWA76B9noIaxT" X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Oct 2015 23:40:27 -0000 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --g36tls76k7jvIODlGo7soWA76B9noIaxT Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 10/15/2015 3:49 PM, Bryan Drewery wrote: > Author: bdrewery > Date: Thu Oct 15 22:49:56 2015 > New Revision: 289391 > URL: https://svnweb.freebsd.org/changeset/base/289391 >=20 > Log: > Make installing to a non-existent directory an error. Sigh - I forgot to test installworld on this. Stupid. We have a winner too: =3D=3D=3D> share/doc/legal/intel_iwn (install) install -o root -g wheel -m 444 /root/svn/base/share/doc/legal/intel_iwn/../../../../sys/contrib/dev/iwn/= LICENSE /tmp/blah/usr/share/doc/legal/intel_iwn/ install: /tmp/blah/usr/share/doc/legal/intel_iwn/: No such file or direct= ory *** Error code 71 --=20 Regards, Bryan Drewery --g36tls76k7jvIODlGo7soWA76B9noIaxT 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 iQEcBAEBAgAGBQJWIDlrAAoJEDXXcbtuRpfP1LMIAItQJ01hFO4ewqhTnWVjb/uF zwc47IFZI3I1QwknIgcxnDQQPaxCsAvmk3Ryi6iC6TzXa0kJve9VpWNOwXZXb9uf IViY23GBSSK7XSsHD85Z1JQlY72NcYyclLo8EiHEfypKs5q4LFkuhVwiR1raq83D NqbLDrFgNfGg/Yu8waghVGHpxGi9S8xkYMEweN4EcuGeus8knrJeSWXijUHPKnbr Gp17ONWdpar4c0bIqdNF7raDrEvmylWSOhfJ+rNnEqhY7Aim8p9sWgeizJ1qU5Lb NNslaz7tHn/DuB2wBVYRohRE87oNQhA6eJhc/IX0Ry8P9Ru6Gzkx3gv7liAeSrI= =4Grv -----END PGP SIGNATURE----- --g36tls76k7jvIODlGo7soWA76B9noIaxT-- From owner-svn-src-all@freebsd.org Thu Oct 15 23:41:48 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E7FF3A15AAB; Thu, 15 Oct 2015 23:41:48 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id AD11F17DB; Thu, 15 Oct 2015 23:41:48 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t9FNflLU090000; Thu, 15 Oct 2015 23:41:47 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9FNflHJ089999; Thu, 15 Oct 2015 23:41:47 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201510152341.t9FNflHJ089999@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Thu, 15 Oct 2015 23:41:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289394 - head/etc/mtree X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Oct 2015 23:41:49 -0000 Author: bdrewery Date: Thu Oct 15 23:41:47 2015 New Revision: 289394 URL: https://svnweb.freebsd.org/changeset/base/289394 Log: Add missing directory for /usr/share/doc/legal/intel_iwn/ used by share/doc/legal/intel_iwn. Exposed by r289391. MFC after: 3 weeks X-MFC-With: 289391 Sponsored by: EMC / Isilon Storage Division Modified: head/etc/mtree/BSD.usr.dist Modified: head/etc/mtree/BSD.usr.dist ============================================================================== --- head/etc/mtree/BSD.usr.dist Thu Oct 15 22:55:08 2015 (r289393) +++ head/etc/mtree/BSD.usr.dist Thu Oct 15 23:41:47 2015 (r289394) @@ -192,6 +192,8 @@ legal intel_ipw .. + intel_iwn + .. intel_iwi .. intel_wpi From owner-svn-src-all@freebsd.org Thu Oct 15 23:45:01 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 87758A15B03; Thu, 15 Oct 2015 23:45:01 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4E3CC1A3F; Thu, 15 Oct 2015 23:45:01 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t9FNj03C090171; Thu, 15 Oct 2015 23:45:00 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9FNj0Gf090170; Thu, 15 Oct 2015 23:45:00 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201510152345.t9FNj0Gf090170@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Thu, 15 Oct 2015 23:45:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289395 - head/etc/mtree X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Oct 2015 23:45:01 -0000 Author: bdrewery Date: Thu Oct 15 23:45:00 2015 New Revision: 289395 URL: https://svnweb.freebsd.org/changeset/base/289395 Log: Add missing /usr/share/doc/legal/realtek/ for share/doc/legal/realtek, exposed by r289391. MFC after: 3 weeks X-MFC-With: 289391 Sponsored by: EMC / Isilon Storage Division Modified: head/etc/mtree/BSD.usr.dist Modified: head/etc/mtree/BSD.usr.dist ============================================================================== --- head/etc/mtree/BSD.usr.dist Thu Oct 15 23:41:47 2015 (r289394) +++ head/etc/mtree/BSD.usr.dist Thu Oct 15 23:45:00 2015 (r289395) @@ -198,6 +198,8 @@ .. intel_wpi .. + realtek + .. .. llvm clang From owner-svn-src-all@freebsd.org Thu Oct 15 23:45:44 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8AD08A15B80; Thu, 15 Oct 2015 23:45:44 +0000 (UTC) (envelope-from cem@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 62C831BB7; Thu, 15 Oct 2015 23:45:44 +0000 (UTC) (envelope-from cem@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t9FNjhg2090238; Thu, 15 Oct 2015 23:45:43 GMT (envelope-from cem@FreeBSD.org) Received: (from cem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9FNjh08090235; Thu, 15 Oct 2015 23:45:43 GMT (envelope-from cem@FreeBSD.org) Message-Id: <201510152345.t9FNjh08090235@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cem set sender to cem@FreeBSD.org using -f From: "Conrad E. Meyer" Date: Thu, 15 Oct 2015 23:45:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289396 - in head/sys/dev/ntb: if_ntb ntb_hw X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Oct 2015 23:45:44 -0000 Author: cem Date: Thu Oct 15 23:45:43 2015 New Revision: 289396 URL: https://svnweb.freebsd.org/changeset/base/289396 Log: NTB: Add variable number MW, DB CB support code This is a follow-up to r289208: "Xeon Errata Workaround." Add logic to support a variable number of memory windows and doorbell callbacks. This was added to the Linux driver in the "Xeon Errata Workaround" commit, but I skipped it because it didn't look neccessary at the time. It is needed for future Haswell split-BAR support, so bring it in now. A new tunable was added for if_ntb, 'hw.ntb.max_num_clients'. By default, it is set to zero -- infer the number of clients from the number of memory windows available from the hardware. Any other positive value can specify a different number of clients, limited by the number of doorbell callbacks available (4 under MSI-X, or 15 (Xeon) or 34 (SoC) under legacy INTx). Obtained from: Linux (Dual BSD/GPL driver) Sponsored by: EMC / Isilon Storage Division Modified: head/sys/dev/ntb/if_ntb/if_ntb.c head/sys/dev/ntb/ntb_hw/ntb_hw.c head/sys/dev/ntb/ntb_hw/ntb_hw.h Modified: head/sys/dev/ntb/if_ntb/if_ntb.c ============================================================================== --- head/sys/dev/ntb/if_ntb/if_ntb.c Thu Oct 15 23:45:00 2015 (r289395) +++ head/sys/dev/ntb/if_ntb/if_ntb.c Thu Oct 15 23:45:43 2015 (r289396) @@ -80,11 +80,11 @@ __FBSDID("$FreeBSD$"); static unsigned int transport_mtu = 0x4000 + ETHER_HDR_LEN + ETHER_CRC_LEN; -/* - * This is an oversimplification to work around Xeon Errata. The second client - * may be usable for unidirectional traffic. - */ -static unsigned int max_num_clients = 1; +static unsigned int max_num_clients; +SYSCTL_UINT(_hw_ntb, OID_AUTO, max_num_clients, CTLFLAG_RDTUN, + &max_num_clients, 0, "Maximum number of NTB transport clients. " + "0 (default) - use all available NTB memory windows; " + "positive integer N - Limit to N memory windows."); STAILQ_HEAD(ntb_queue_list, ntb_queue_entry); @@ -174,7 +174,7 @@ struct ntb_transport_mw { struct ntb_netdev { struct ntb_softc *ntb; struct ifnet *ifp; - struct ntb_transport_mw mw[NTB_NUM_MW]; + struct ntb_transport_mw mw[NTB_MAX_NUM_MW]; struct ntb_transport_qp *qps; uint64_t max_qps; uint64_t qp_bitmap; @@ -220,7 +220,7 @@ enum { IF_NTB_MAX_SPAD, }; -#define QP_TO_MW(qp) ((qp) % NTB_NUM_MW) +#define QP_TO_MW(ntb, qp) ((qp) % ntb_get_max_mw(ntb)) #define NTB_QP_DEF_NUM_ENTRIES 100 #define NTB_LINK_DOWN_TIMEOUT 10 @@ -492,7 +492,11 @@ ntb_transport_init(struct ntb_softc *ntb struct ntb_netdev *nt = &net_softc; int rc, i; - nt->max_qps = max_num_clients; + if (max_num_clients == 0) + nt->max_qps = MIN(ntb_get_max_cbs(ntb), ntb_get_max_mw(ntb)); + else + nt->max_qps = MIN(ntb_get_max_cbs(ntb), max_num_clients); + ntb_register_transport(ntb, nt); mtx_init(&nt->tx_lock, "ntb transport tx", NULL, MTX_DEF); mtx_init(&nt->rx_lock, "ntb transport rx", NULL, MTX_DEF); @@ -544,7 +548,7 @@ ntb_transport_free(void *transport) ntb_unregister_event_callback(ntb); - for (i = 0; i < NTB_NUM_MW; i++) + for (i = 0; i < NTB_MAX_NUM_MW; i++) ntb_free_mw(nt, i); free(nt->qps, M_NTB_IF); @@ -556,7 +560,10 @@ ntb_transport_init_queue(struct ntb_netd { struct ntb_transport_qp *qp; unsigned int num_qps_mw, tx_size; - uint8_t mw_num = QP_TO_MW(qp_num); + uint8_t mw_num, mw_max; + + mw_max = ntb_get_max_mw(nt->ntb); + mw_num = QP_TO_MW(nt->ntb, qp_num); qp = &nt->qps[qp_num]; qp->qp_num = qp_num; @@ -566,15 +573,15 @@ ntb_transport_init_queue(struct ntb_netd qp->client_ready = NTB_LINK_DOWN; qp->event_handler = NULL; - if (nt->max_qps % NTB_NUM_MW && mw_num + 1 < nt->max_qps / NTB_NUM_MW) - num_qps_mw = nt->max_qps / NTB_NUM_MW + 1; + if (nt->max_qps % mw_max && mw_num + 1 < nt->max_qps / mw_max) + num_qps_mw = nt->max_qps / mw_max + 1; else - num_qps_mw = nt->max_qps / NTB_NUM_MW; + num_qps_mw = nt->max_qps / mw_max; tx_size = (unsigned int) ntb_get_mw_size(qp->ntb, mw_num) / num_qps_mw; qp->rx_info = (struct ntb_rx_info *) ((char *)ntb_get_mw_vbase(qp->ntb, mw_num) + - (qp_num / NTB_NUM_MW * tx_size)); + (qp_num / mw_max * tx_size)); tx_size -= sizeof(struct ntb_rx_info); qp->tx_mw = qp->rx_info + 1; @@ -1048,10 +1055,7 @@ ntb_transport_link_work(void *arg) uint32_t val, i, num_mw; int rc; - if (ntb_has_feature(ntb, NTB_REGS_THRU_MW)) - num_mw = NTB_NUM_MW - 1; - else - num_mw = NTB_NUM_MW; + num_mw = ntb_get_max_mw(ntb); /* send the local info, in the opposite order of the way we read it */ for (i = 0; i < num_mw; i++) { @@ -1136,7 +1140,7 @@ ntb_transport_link_work(void *arg) return; free_mws: - for (i = 0; i < NTB_NUM_MW; i++) + for (i = 0; i < NTB_MAX_NUM_MW; i++) ntb_free_mw(nt, i); out: if (ntb_query_link_status(ntb)) @@ -1207,17 +1211,20 @@ ntb_transport_setup_qp_mw(struct ntb_net struct ntb_transport_qp *qp = &nt->qps[qp_num]; void *offset; unsigned int rx_size, num_qps_mw; - uint8_t mw_num = QP_TO_MW(qp_num); + uint8_t mw_num, mw_max; unsigned int i; - if (nt->max_qps % NTB_NUM_MW && mw_num + 1 < nt->max_qps / NTB_NUM_MW) - num_qps_mw = nt->max_qps / NTB_NUM_MW + 1; + mw_max = ntb_get_max_mw(nt->ntb); + mw_num = QP_TO_MW(nt->ntb, qp_num); + + if (nt->max_qps % mw_max && mw_num + 1 < nt->max_qps / mw_max) + num_qps_mw = nt->max_qps / mw_max + 1; else - num_qps_mw = nt->max_qps / NTB_NUM_MW; + num_qps_mw = nt->max_qps / mw_max; rx_size = (unsigned int) nt->mw[mw_num].size / num_qps_mw; qp->remote_rx_info = (void *)((uint8_t *)nt->mw[mw_num].virt_addr + - (qp_num / NTB_NUM_MW * rx_size)); + (qp_num / mw_max * rx_size)); rx_size -= sizeof(struct ntb_rx_info); qp->rx_buff = qp->remote_rx_info + 1; Modified: head/sys/dev/ntb/ntb_hw/ntb_hw.c ============================================================================== --- head/sys/dev/ntb/ntb_hw/ntb_hw.c Thu Oct 15 23:45:00 2015 (r289395) +++ head/sys/dev/ntb/ntb_hw/ntb_hw.c Thu Oct 15 23:45:43 2015 (r289396) @@ -127,9 +127,11 @@ struct ntb_softc { void *ntb_transport; ntb_event_callback event_cb; - struct ntb_db_cb *db_cb; + struct ntb_db_cb *db_cb; + uint8_t max_cbs; struct { + uint8_t max_mw; uint8_t max_spads; uint8_t max_db_bits; uint8_t msix_cnt; @@ -321,6 +323,8 @@ ntb_attach(device_t device) if (error) goto out; + ntb->limits.max_mw = NTB_MAX_NUM_MW; + error = ntb_map_pci_bars(ntb); if (error) goto out; @@ -533,6 +537,7 @@ ntb_setup_xeon_msix(struct ntb_softc *nt * slot, from which they will never be called back. */ ntb->db_cb[num_vectors - 1].reserved = true; + ntb->max_cbs--; return (0); } @@ -649,16 +654,32 @@ ntb_setup_interrupts(struct ntb_softc *n } else num_vectors = 1; + /* + * If allocating MSI-X interrupts succeeds, limit callbacks to the + * number of MSI-X slots available. + */ ntb_create_callbacks(ntb, num_vectors); if (ntb->type == NTB_XEON) rc = ntb_setup_xeon_msix(ntb, num_vectors); else rc = ntb_setup_soc_msix(ntb, num_vectors); - if (rc != 0) + if (rc != 0) { device_printf(ntb->device, "Error allocating MSI-X interrupts: %d\n", rc); + /* + * If allocating MSI-X interrupts failed and we're forced to + * use legacy INTx anyway, the only limit on individual + * callbacks is the number of doorbell bits. + * + * CEM: This seems odd to me but matches the behavior of the + * Linux driver ca. September 2013 + */ + ntb_free_callbacks(ntb); + ntb_create_callbacks(ntb, ntb->limits.max_db_bits); + } + if (ntb->type == NTB_XEON && rc == ENOSPC) rc = ntb_setup_legacy_interrupt(ntb); @@ -842,6 +863,7 @@ ntb_create_callbacks(struct ntb_softc *n { uint32_t i; + ntb->max_cbs = num_vectors; ntb->db_cb = malloc(num_vectors * sizeof(*ntb->db_cb), M_NTB, M_ZERO | M_WAITOK); for (i = 0; i < num_vectors; i++) { @@ -857,10 +879,11 @@ ntb_free_callbacks(struct ntb_softc *ntb { uint8_t i; - for (i = 0; i < ntb->limits.max_db_bits; i++) + for (i = 0; i < ntb->max_cbs; i++) ntb_unregister_db_callback(ntb, i); free(ntb->db_cb, M_NTB); + ntb->max_cbs = 0; } static struct ntb_hw_info * @@ -989,14 +1012,16 @@ ntb_setup_xeon(struct ntb_softc *ntb) * This should already be the case based on the driver defaults, but * write the limit registers first just in case. */ - if (HAS_FEATURE(NTB_REGS_THRU_MW)) + if (HAS_FEATURE(NTB_REGS_THRU_MW)) { + /* Reserve the last MW for mapping remote spad */ + ntb->limits.max_mw--; /* * Set the Limit register to 4k, the minimum size, to prevent * an illegal access. */ ntb_reg_write(8, XEON_PBAR4LMT_OFFSET, ntb_get_mw_size(ntb, 1) + 0x1000); - else + } else /* * Disable the limit register, just in case it is set to * something silly. @@ -1432,8 +1457,7 @@ ntb_register_db_callback(struct ntb_soft { struct ntb_db_cb *db_cb = &ntb->db_cb[idx]; - if (idx >= ntb->allocated_interrupts || db_cb->callback || - db_cb->reserved) { + if (idx >= ntb->max_cbs || db_cb->callback != NULL || db_cb->reserved) { device_printf(ntb->device, "Invalid Index.\n"); return (EINVAL); } @@ -1459,7 +1483,7 @@ void ntb_unregister_db_callback(struct ntb_softc *ntb, unsigned int idx) { - if (idx >= ntb->allocated_interrupts || !ntb->db_cb[idx].callback) + if (idx >= ntb->max_cbs || ntb->db_cb[idx].callback == NULL) return; mask_ldb_interrupt(ntb, idx); @@ -1518,12 +1542,12 @@ ntb_register_transport(struct ntb_softc void ntb_unregister_transport(struct ntb_softc *ntb) { - int i; + uint8_t i; if (ntb->ntb_transport == NULL) return; - for (i = 0; i < ntb->allocated_interrupts; i++) + for (i = 0; i < ntb->max_cbs; i++) ntb_unregister_db_callback(ntb, i); ntb_unregister_event_callback(ntb); @@ -1546,6 +1570,20 @@ ntb_get_max_spads(struct ntb_softc *ntb) return (ntb->limits.max_spads); } +uint8_t +ntb_get_max_cbs(struct ntb_softc *ntb) +{ + + return (ntb->max_cbs); +} + +uint8_t +ntb_get_max_mw(struct ntb_softc *ntb) +{ + + return (ntb->limits.max_mw); +} + /** * ntb_write_local_spad() - write to the secondary scratchpad register * @ntb: pointer to ntb_softc instance @@ -1658,7 +1696,7 @@ void * ntb_get_mw_vbase(struct ntb_softc *ntb, unsigned int mw) { - if (mw >= NTB_NUM_MW) + if (mw >= ntb_get_max_mw(ntb)) return (NULL); return (ntb->bar_info[NTB_MW_TO_BAR(mw)].vbase); @@ -1668,7 +1706,7 @@ vm_paddr_t ntb_get_mw_pbase(struct ntb_softc *ntb, unsigned int mw) { - if (mw >= NTB_NUM_MW) + if (mw >= ntb_get_max_mw(ntb)) return (0); return (ntb->bar_info[NTB_MW_TO_BAR(mw)].pbase); @@ -1687,7 +1725,7 @@ u_long ntb_get_mw_size(struct ntb_softc *ntb, unsigned int mw) { - if (mw >= NTB_NUM_MW) + if (mw >= ntb_get_max_mw(ntb)) return (0); return (ntb->bar_info[NTB_MW_TO_BAR(mw)].size); @@ -1707,7 +1745,7 @@ void ntb_set_mw_addr(struct ntb_softc *ntb, unsigned int mw, uint64_t addr) { - if (mw >= NTB_NUM_MW) + if (mw >= ntb_get_max_mw(ntb)) return; switch (NTB_MW_TO_BAR(mw)) { Modified: head/sys/dev/ntb/ntb_hw/ntb_hw.h ============================================================================== --- head/sys/dev/ntb/ntb_hw/ntb_hw.h Thu Oct 15 23:45:00 2015 (r289395) +++ head/sys/dev/ntb/ntb_hw/ntb_hw.h Thu Oct 15 23:45:43 2015 (r289396) @@ -31,7 +31,7 @@ struct ntb_softc; -#define NTB_NUM_MW 2 +#define NTB_MAX_NUM_MW 2 enum ntb_link_event { NTB_LINK_DOWN = 0, @@ -61,6 +61,8 @@ void *ntb_find_transport(struct ntb_soft struct ntb_softc *ntb_register_transport(struct ntb_softc *ntb, void *transport); void ntb_unregister_transport(struct ntb_softc *ntb); +uint8_t ntb_get_max_cbs(struct ntb_softc *ntb); +uint8_t ntb_get_max_mw(struct ntb_softc *ntb); uint8_t ntb_get_max_spads(struct ntb_softc *ntb); int ntb_write_local_spad(struct ntb_softc *ntb, unsigned int idx, uint32_t val); int ntb_read_local_spad(struct ntb_softc *ntb, unsigned int idx, uint32_t *val); From owner-svn-src-all@freebsd.org Thu Oct 15 23:46:08 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id CDB38A15BC0; Thu, 15 Oct 2015 23:46:08 +0000 (UTC) (envelope-from cem@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 91AEE1D0A; Thu, 15 Oct 2015 23:46:08 +0000 (UTC) (envelope-from cem@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t9FNk7Dw090304; Thu, 15 Oct 2015 23:46:07 GMT (envelope-from cem@FreeBSD.org) Received: (from cem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9FNk7Pa090301; Thu, 15 Oct 2015 23:46:07 GMT (envelope-from cem@FreeBSD.org) Message-Id: <201510152346.t9FNk7Pa090301@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cem set sender to cem@FreeBSD.org using -f From: "Conrad E. Meyer" Date: Thu, 15 Oct 2015 23:46:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289397 - head/sys/dev/ntb/ntb_hw X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Oct 2015 23:46:08 -0000 Author: cem Date: Thu Oct 15 23:46:07 2015 New Revision: 289397 URL: https://svnweb.freebsd.org/changeset/base/289397 Log: NTB: MFV ab760a0c: Add split BAR support for Haswell On the Haswell platform, a split BAR option to allow creation of 2 32bit BARs (4 and 5) from the 64bit BAR 4. Adding support for this new option. Authored by: Dave Jiang Obtained from: Linux (Dual BSD/GPL driver) Sponsored by: EMC / Isilon Storage Division Modified: head/sys/dev/ntb/ntb_hw/ntb_hw.c head/sys/dev/ntb/ntb_hw/ntb_hw.h head/sys/dev/ntb/ntb_hw/ntb_regs.h Modified: head/sys/dev/ntb/ntb_hw/ntb_hw.c ============================================================================== --- head/sys/dev/ntb/ntb_hw/ntb_hw.c Thu Oct 15 23:45:43 2015 (r289396) +++ head/sys/dev/ntb/ntb_hw/ntb_hw.c Thu Oct 15 23:46:07 2015 (r289397) @@ -62,7 +62,8 @@ __FBSDID("$FreeBSD$"); #define NTB_CONFIG_BAR 0 #define NTB_B2B_BAR_1 1 #define NTB_B2B_BAR_2 2 -#define NTB_MAX_BARS 3 +#define NTB_B2B_BAR_3 3 +#define NTB_MAX_BARS 4 #define NTB_MW_TO_BAR(mw) ((mw) + 1) #define MAX_MSIX_INTERRUPTS MAX(XEON_MAX_DB_BITS, SOC_MAX_DB_BITS) @@ -85,7 +86,7 @@ struct ntb_hw_info { uint32_t device_id; const char *desc; enum ntb_device_type type; - uint64_t features; + uint32_t features; }; struct ntb_pci_bar_info { @@ -142,6 +143,7 @@ struct ntb_softc { uint32_t rdb; uint32_t bar2_xlat; uint32_t bar4_xlat; + uint32_t bar5_xlat; uint32_t spad_remote; uint32_t spad_local; uint32_t lnk_cntl; @@ -186,9 +188,11 @@ bus_space_write_8(bus_space_tag_t tag, b #define ntb_reg_read(SIZE, offset) ntb_bar_read(SIZE, NTB_CONFIG_BAR, offset) #define ntb_reg_write(SIZE, offset, val) \ ntb_bar_write(SIZE, NTB_CONFIG_BAR, offset, val) -#define ntb_mw_read(SIZE, offset) ntb_bar_read(SIZE, NTB_B2B_BAR_2, offset) +#define ntb_mw_read(SIZE, offset) \ + ntb_bar_read(SIZE, NTB_MW_TO_BAR(ntb->limits.max_mw), offset) #define ntb_mw_write(SIZE, offset, val) \ - ntb_bar_write(SIZE, NTB_B2B_BAR_2, offset, val) + ntb_bar_write(SIZE, NTB_MW_TO_BAR(ntb->limits.max_mw), \ + offset, val) typedef int (*bar_map_strategy)(struct ntb_softc *ntb, struct ntb_pci_bar_info *bar); @@ -221,6 +225,7 @@ static void unmask_ldb_interrupt(struct static int ntb_create_callbacks(struct ntb_softc *ntb, uint32_t num_vectors); static void ntb_free_callbacks(struct ntb_softc *ntb); static struct ntb_hw_info *ntb_get_device_info(uint32_t device_id); +static void ntb_detect_max_mw(struct ntb_softc *ntb); static int ntb_detect_xeon(struct ntb_softc *ntb); static int ntb_detect_soc(struct ntb_softc *ntb); static int ntb_setup_xeon(struct ntb_softc *ntb); @@ -323,7 +328,7 @@ ntb_attach(device_t device) if (error) goto out; - ntb->limits.max_mw = NTB_MAX_NUM_MW; + ntb_detect_max_mw(ntb); error = ntb_map_pci_bars(ntb); if (error) @@ -357,6 +362,12 @@ ntb_detach(device_t device) if (ntb->type == NTB_XEON) ntb_teardown_xeon(ntb); ntb_teardown_interrupts(ntb); + + /* + * Redetect total MWs so we unmap properly -- in case we lowered the + * maximum to work around Xeon errata. + */ + ntb_detect_max_mw(ntb); ntb_unmap_pci_bar(ntb); return (0); @@ -379,12 +390,22 @@ ntb_map_pci_bars(struct ntb_softc *ntb) return (rc); ntb->bar_info[NTB_B2B_BAR_2].pci_resource_id = PCIR_BAR(4); - if (HAS_FEATURE(NTB_REGS_THRU_MW)) + if (HAS_FEATURE(NTB_REGS_THRU_MW) && !HAS_FEATURE(NTB_SPLIT_BAR)) rc = map_pci_bar(ntb, map_mmr_bar, &ntb->bar_info[NTB_B2B_BAR_2]); else rc = map_pci_bar(ntb, map_memory_window_bar, &ntb->bar_info[NTB_B2B_BAR_2]); + if (!HAS_FEATURE(NTB_SPLIT_BAR)) + return (rc); + + ntb->bar_info[NTB_B2B_BAR_3].pci_resource_id = PCIR_BAR(5); + if (HAS_FEATURE(NTB_REGS_THRU_MW)) + rc = map_pci_bar(ntb, map_mmr_bar, + &ntb->bar_info[NTB_B2B_BAR_3]); + else + rc = map_pci_bar(ntb, map_memory_window_bar, + &ntb->bar_info[NTB_B2B_BAR_3]); return (rc); } @@ -484,7 +505,7 @@ ntb_unmap_pci_bar(struct ntb_softc *ntb) struct ntb_pci_bar_info *current_bar; int i; - for (i = 0; i< NTB_MAX_BARS; i++) { + for (i = 0; i < NTB_MAX_BARS; i++) { current_bar = &ntb->bar_info[i]; if (current_bar->pci_resource != NULL) bus_release_resource(ntb->device, SYS_RES_MEMORY, @@ -906,6 +927,21 @@ ntb_teardown_xeon(struct ntb_softc *ntb) ntb_hw_link_down(ntb); } +static void +ntb_detect_max_mw(struct ntb_softc *ntb) +{ + + if (ntb->type == NTB_SOC) { + ntb->limits.max_mw = SOC_MAX_MW; + return; + } + + if (HAS_FEATURE(NTB_SPLIT_BAR)) + ntb->limits.max_mw = XEON_HSXSPLIT_MAX_MW; + else + ntb->limits.max_mw = XEON_SNB_MAX_MW; +} + static int ntb_detect_xeon(struct ntb_softc *ntb) { @@ -919,6 +955,9 @@ ntb_detect_xeon(struct ntb_softc *ntb) else ntb->dev_type = NTB_DEV_DSD; + if ((ppd & XEON_PPD_SPLIT_BAR) != 0) + ntb->features |= NTB_SPLIT_BAR; + conn_type = ppd & XEON_PPD_CONN_TYPE; switch (conn_type) { case NTB_CONN_B2B: @@ -968,6 +1007,8 @@ ntb_setup_xeon(struct ntb_softc *ntb) ntb->reg_ofs.spad_local = XEON_SPAD_OFFSET; ntb->reg_ofs.bar2_xlat = XEON_SBAR2XLAT_OFFSET; ntb->reg_ofs.bar4_xlat = XEON_SBAR4XLAT_OFFSET; + if (HAS_FEATURE(NTB_SPLIT_BAR)) + ntb->reg_ofs.bar5_xlat = XEON_SBAR5XLAT_OFFSET; switch (ntb->conn_type) { case NTB_CONN_B2B: @@ -1013,22 +1054,24 @@ ntb_setup_xeon(struct ntb_softc *ntb) * write the limit registers first just in case. */ if (HAS_FEATURE(NTB_REGS_THRU_MW)) { - /* Reserve the last MW for mapping remote spad */ - ntb->limits.max_mw--; /* * Set the Limit register to 4k, the minimum size, to prevent * an illegal access. + * + * XXX: Should this be PBAR5LMT / get_mw_size(, max_mw - 1)? */ ntb_reg_write(8, XEON_PBAR4LMT_OFFSET, ntb_get_mw_size(ntb, 1) + 0x1000); + /* Reserve the last MW for mapping remote spad */ + ntb->limits.max_mw--; } else /* * Disable the limit register, just in case it is set to - * something silly. + * something silly. A 64-bit write will also clear PBAR5LMT in + * split-bar mode, and this is desired. */ ntb_reg_write(8, XEON_PBAR4LMT_OFFSET, 0); - ntb->reg_ofs.lnk_cntl = XEON_NTBCNTL_OFFSET; ntb->reg_ofs.lnk_stat = XEON_LINK_STATUS_OFFSET; ntb->reg_ofs.spci_cmd = XEON_PCICMD_OFFSET; @@ -1112,15 +1155,15 @@ configure_soc_secondary_side_bars(struct { if (ntb->dev_type == NTB_DEV_USD) { - ntb_reg_write(8, SOC_PBAR2XLAT_OFFSET, PBAR2XLAT_USD_ADDR); - ntb_reg_write(8, SOC_PBAR4XLAT_OFFSET, PBAR4XLAT_USD_ADDR); + ntb_reg_write(8, SOC_PBAR2XLAT_OFFSET, MBAR23_DSD_ADDR); + ntb_reg_write(8, SOC_PBAR4XLAT_OFFSET, MBAR4_DSD_ADDR); ntb_reg_write(8, SOC_MBAR23_OFFSET, MBAR23_USD_ADDR); - ntb_reg_write(8, SOC_MBAR45_OFFSET, MBAR45_USD_ADDR); + ntb_reg_write(8, SOC_MBAR45_OFFSET, MBAR4_USD_ADDR); } else { - ntb_reg_write(8, SOC_PBAR2XLAT_OFFSET, PBAR2XLAT_DSD_ADDR); - ntb_reg_write(8, SOC_PBAR4XLAT_OFFSET, PBAR4XLAT_DSD_ADDR); + ntb_reg_write(8, SOC_PBAR2XLAT_OFFSET, MBAR23_USD_ADDR); + ntb_reg_write(8, SOC_PBAR4XLAT_OFFSET, MBAR4_USD_ADDR); ntb_reg_write(8, SOC_MBAR23_OFFSET, MBAR23_DSD_ADDR); - ntb_reg_write(8, SOC_MBAR45_OFFSET, MBAR45_DSD_ADDR); + ntb_reg_write(8, SOC_MBAR45_OFFSET, MBAR4_DSD_ADDR); } } @@ -1129,13 +1172,19 @@ configure_xeon_secondary_side_bars(struc { if (ntb->dev_type == NTB_DEV_USD) { - ntb_reg_write(8, XEON_PBAR2XLAT_OFFSET, PBAR2XLAT_USD_ADDR); + ntb_reg_write(8, XEON_PBAR2XLAT_OFFSET, MBAR23_DSD_ADDR); if (HAS_FEATURE(NTB_REGS_THRU_MW)) ntb_reg_write(8, XEON_PBAR4XLAT_OFFSET, MBAR01_DSD_ADDR); else { - ntb_reg_write(8, XEON_PBAR4XLAT_OFFSET, - PBAR4XLAT_USD_ADDR); + if (HAS_FEATURE(NTB_SPLIT_BAR)) { + ntb_reg_write(4, XEON_PBAR4XLAT_OFFSET, + MBAR4_DSD_ADDR); + ntb_reg_write(4, XEON_PBAR5XLAT_OFFSET, + MBAR5_DSD_ADDR); + } else + ntb_reg_write(8, XEON_PBAR4XLAT_OFFSET, + MBAR4_DSD_ADDR); /* * B2B_XLAT_OFFSET is a 64-bit register but can only be * written 32 bits at a time. @@ -1147,15 +1196,25 @@ configure_xeon_secondary_side_bars(struc } ntb_reg_write(8, XEON_SBAR0BASE_OFFSET, MBAR01_USD_ADDR); ntb_reg_write(8, XEON_SBAR2BASE_OFFSET, MBAR23_USD_ADDR); - ntb_reg_write(8, XEON_SBAR4BASE_OFFSET, MBAR45_USD_ADDR); + if (HAS_FEATURE(NTB_SPLIT_BAR)) { + ntb_reg_write(4, XEON_SBAR4BASE_OFFSET, MBAR4_USD_ADDR); + ntb_reg_write(4, XEON_SBAR5BASE_OFFSET, MBAR5_USD_ADDR); + } else + ntb_reg_write(8, XEON_SBAR4BASE_OFFSET, MBAR4_USD_ADDR); } else { - ntb_reg_write(8, XEON_PBAR2XLAT_OFFSET, PBAR2XLAT_DSD_ADDR); + ntb_reg_write(8, XEON_PBAR2XLAT_OFFSET, MBAR23_USD_ADDR); if (HAS_FEATURE(NTB_REGS_THRU_MW)) ntb_reg_write(8, XEON_PBAR4XLAT_OFFSET, MBAR01_USD_ADDR); else { - ntb_reg_write(8, XEON_PBAR4XLAT_OFFSET, - PBAR4XLAT_DSD_ADDR); + if (HAS_FEATURE(NTB_SPLIT_BAR)) { + ntb_reg_write(4, XEON_PBAR4XLAT_OFFSET, + MBAR4_USD_ADDR); + ntb_reg_write(4, XEON_PBAR5XLAT_OFFSET, + MBAR5_USD_ADDR); + } else + ntb_reg_write(8, XEON_PBAR4XLAT_OFFSET, + MBAR4_USD_ADDR); /* * B2B_XLAT_OFFSET is a 64-bit register but can only be * written 32 bits at a time. @@ -1167,7 +1226,14 @@ configure_xeon_secondary_side_bars(struc } ntb_reg_write(8, XEON_SBAR0BASE_OFFSET, MBAR01_DSD_ADDR); ntb_reg_write(8, XEON_SBAR2BASE_OFFSET, MBAR23_DSD_ADDR); - ntb_reg_write(8, XEON_SBAR4BASE_OFFSET, MBAR45_DSD_ADDR); + if (HAS_FEATURE(NTB_SPLIT_BAR)) { + ntb_reg_write(4, XEON_SBAR4BASE_OFFSET, + MBAR4_DSD_ADDR); + ntb_reg_write(4, XEON_SBAR5BASE_OFFSET, + MBAR5_DSD_ADDR); + } else + ntb_reg_write(8, XEON_SBAR4BASE_OFFSET, + MBAR4_DSD_ADDR); } } @@ -1288,7 +1354,9 @@ ntb_hw_link_up(struct ntb_softc *ntb) cntl = ntb_reg_read(4, ntb->reg_ofs.lnk_cntl); cntl &= ~(NTB_CNTL_LINK_DISABLE | NTB_CNTL_CFG_LOCK); cntl |= NTB_CNTL_P2S_BAR23_SNOOP | NTB_CNTL_S2P_BAR23_SNOOP; - cntl |= NTB_CNTL_P2S_BAR45_SNOOP | NTB_CNTL_S2P_BAR45_SNOOP; + cntl |= NTB_CNTL_P2S_BAR4_SNOOP | NTB_CNTL_S2P_BAR4_SNOOP; + if (HAS_FEATURE(NTB_SPLIT_BAR)) + cntl |= NTB_CNTL_P2S_BAR5_SNOOP | NTB_CNTL_S2P_BAR5_SNOOP; ntb_reg_write(4, ntb->reg_ofs.lnk_cntl, cntl); } @@ -1304,7 +1372,9 @@ ntb_hw_link_down(struct ntb_softc *ntb) cntl = ntb_reg_read(4, ntb->reg_ofs.lnk_cntl); cntl &= ~(NTB_CNTL_P2S_BAR23_SNOOP | NTB_CNTL_S2P_BAR23_SNOOP); - cntl &= ~(NTB_CNTL_P2S_BAR45_SNOOP | NTB_CNTL_S2P_BAR45_SNOOP); + cntl &= ~(NTB_CNTL_P2S_BAR4_SNOOP | NTB_CNTL_S2P_BAR4_SNOOP); + if (HAS_FEATURE(NTB_SPLIT_BAR)) + cntl &= ~(NTB_CNTL_P2S_BAR5_SNOOP | NTB_CNTL_S2P_BAR5_SNOOP); cntl |= NTB_CNTL_LINK_DISABLE | NTB_CNTL_CFG_LOCK; ntb_reg_write(4, ntb->reg_ofs.lnk_cntl, cntl); } @@ -1753,7 +1823,13 @@ ntb_set_mw_addr(struct ntb_softc *ntb, u ntb_reg_write(8, ntb->reg_ofs.bar2_xlat, addr); break; case NTB_B2B_BAR_2: - ntb_reg_write(8, ntb->reg_ofs.bar4_xlat, addr); + if (HAS_FEATURE(NTB_SPLIT_BAR)) + ntb_reg_write(4, ntb->reg_ofs.bar4_xlat, addr); + else + ntb_reg_write(8, ntb->reg_ofs.bar4_xlat, addr); + break; + case NTB_B2B_BAR_3: + ntb_reg_write(4, ntb->reg_ofs.bar5_xlat, addr); break; } } Modified: head/sys/dev/ntb/ntb_hw/ntb_hw.h ============================================================================== --- head/sys/dev/ntb/ntb_hw/ntb_hw.h Thu Oct 15 23:45:43 2015 (r289396) +++ head/sys/dev/ntb/ntb_hw/ntb_hw.h Thu Oct 15 23:46:07 2015 (r289397) @@ -31,7 +31,7 @@ struct ntb_softc; -#define NTB_MAX_NUM_MW 2 +#define NTB_MAX_NUM_MW 3 enum ntb_link_event { NTB_LINK_DOWN = 0, @@ -78,11 +78,14 @@ void ntb_ring_doorbell(struct ntb_softc bool ntb_query_link_status(struct ntb_softc *ntb); device_t ntb_get_device(struct ntb_softc *ntb); +/* Hardware owns the low 32 bits of features. */ #define NTB_BAR_SIZE_4K (1 << 0) /* REGS_THRU_MW is the equivalent of Linux's NTB_HWERR_SDOORBELL_LOCKUP */ #define NTB_REGS_THRU_MW (1 << 1) #define NTB_SB01BASE_LOCKUP (1 << 2) #define NTB_B2BDOORBELL_BIT14 (1 << 3) +/* Software/configuration owns the top 32 bits. */ +#define NTB_SPLIT_BAR (1ull << 32) bool ntb_has_feature(struct ntb_softc *, uint64_t); #endif /* _NTB_HW_H_ */ Modified: head/sys/dev/ntb/ntb_hw/ntb_regs.h ============================================================================== --- head/sys/dev/ntb/ntb_hw/ntb_regs.h Thu Oct 15 23:45:43 2015 (r289396) +++ head/sys/dev/ntb/ntb_hw/ntb_regs.h Thu Oct 15 23:46:07 2015 (r289397) @@ -34,6 +34,8 @@ #define NTB_LINK_WIDTH_MASK 0x03f0 #define XEON_MSIX_CNT 4 +#define XEON_SNB_MAX_MW 2 +#define XEON_HSXSPLIT_MAX_MW 3 #define XEON_MAX_SPADS 16 #define XEON_MAX_COMPAT_SPADS 16 /* Reserve the uppermost bit for link interrupt */ @@ -50,15 +52,20 @@ #define XEON_PBAR2LMT_OFFSET 0x0000 #define XEON_PBAR4LMT_OFFSET 0x0008 +#define XEON_PBAR5LMT_OFFSET 0x000c #define XEON_PBAR2XLAT_OFFSET 0x0010 #define XEON_PBAR4XLAT_OFFSET 0x0018 +#define XEON_PBAR5XLAT_OFFSET 0x001c #define XEON_SBAR2LMT_OFFSET 0x0020 #define XEON_SBAR4LMT_OFFSET 0x0028 +#define XEON_SBAR5LMT_OFFSET 0x002c #define XEON_SBAR2XLAT_OFFSET 0x0030 #define XEON_SBAR4XLAT_OFFSET 0x0038 +#define XEON_SBAR5XLAT_OFFSET 0x003c #define XEON_SBAR0BASE_OFFSET 0x0040 #define XEON_SBAR2BASE_OFFSET 0x0048 #define XEON_SBAR4BASE_OFFSET 0x0050 +#define XEON_SBAR5BASE_OFFSET 0x0054 #define XEON_NTBCNTL_OFFSET 0x0058 #define XEON_SBDF_OFFSET 0x005c #define XEON_PDOORBELL_OFFSET 0x0060 @@ -75,6 +82,7 @@ #define XEON_B2B_XLAT_OFFSETU 0x0148 #define SOC_MSIX_CNT 34 +#define SOC_MAX_MW 2 #define SOC_MAX_SPADS 16 #define SOC_MAX_DB_BITS 34 #define SOC_DB_BITS_PER_VEC 1 @@ -111,17 +119,19 @@ #define SOC_LTSSMSTATEJMP_OFFSET (SOC_IP_BASE + 0x3040) #define SOC_IBSTERRRCRVSTS0_OFFSET (SOC_IP_BASE + 0x3324) -#define SOC_DESKEWSTS_DBERR (1 << 15) +#define SOC_DESKEWSTS_DBERR (1 << 15) #define SOC_LTSSMERRSTS0_UNEXPECTEDEI (1 << 20) #define SOC_LTSSMSTATEJMP_FORCEDETECT (1 << 2) -#define SOC_IBIST_ERR_OFLOW 0x7fff7fff +#define SOC_IBIST_ERR_OFLOW 0x7fff7fff #define NTB_CNTL_CFG_LOCK (1 << 0) #define NTB_CNTL_LINK_DISABLE (1 << 1) #define NTB_CNTL_S2P_BAR23_SNOOP (1 << 2) #define NTB_CNTL_P2S_BAR23_SNOOP (1 << 4) -#define NTB_CNTL_S2P_BAR45_SNOOP (1 << 6) -#define NTB_CNTL_P2S_BAR45_SNOOP (1 << 8) +#define NTB_CNTL_S2P_BAR4_SNOOP (1 << 6) +#define NTB_CNTL_P2S_BAR4_SNOOP (1 << 8) +#define NTB_CNTL_S2P_BAR5_SNOOP (1 << 12) +#define NTB_CNTL_P2S_BAR5_SNOOP (1 << 14) #define SOC_CNTL_LINK_DOWN (1 << 16) #define XEON_PBAR23SZ_OFFSET 0x00d0 @@ -129,6 +139,7 @@ #define NTB_PPD_OFFSET 0x00d4 #define XEON_PPD_CONN_TYPE 0x0003 #define XEON_PPD_DEV_TYPE 0x0010 +#define XEON_PPD_SPLIT_BAR 0x0040 #define SOC_PPD_INIT_LINK 0x0008 #define SOC_PPD_CONN_TYPE 0x0300 #define SOC_PPD_DEV_TYPE 0x1000 @@ -140,16 +151,15 @@ #define NTB_DEV_DSD 1 #define NTB_DEV_USD 0 -#define PBAR2XLAT_USD_ADDR 0x0000004000000000ull -#define PBAR4XLAT_USD_ADDR 0x0000008000000000ull -#define MBAR01_USD_ADDR 0x000000210000000cull -#define MBAR23_USD_ADDR 0x000000410000000cull -#define MBAR45_USD_ADDR 0x000000810000000cull -#define PBAR2XLAT_DSD_ADDR 0x0000004100000000ull -#define PBAR4XLAT_DSD_ADDR 0x0000008100000000ull -#define MBAR01_DSD_ADDR 0x000000200000000cull -#define MBAR23_DSD_ADDR 0x000000400000000cull -#define MBAR45_DSD_ADDR 0x000000800000000cull +/* All addresses are in low 32-bit space so 32-bit BARs can function */ +#define MBAR01_USD_ADDR 0x2100000cull +#define MBAR23_USD_ADDR 0x4100000cull +#define MBAR4_USD_ADDR 0x8100000cull +#define MBAR5_USD_ADDR 0xa100000cull +#define MBAR01_DSD_ADDR 0x2000000cull +#define MBAR23_DSD_ADDR 0x4000000cull +#define MBAR4_DSD_ADDR 0x8000000cull +#define MBAR5_DSD_ADDR 0xa000000cull /* XEON Shadowed MMIO Space */ #define XEON_SHADOW_PDOORBELL_OFFSET 0x60 From owner-svn-src-all@freebsd.org Thu Oct 15 23:46:15 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1C58AA15BEF; Thu, 15 Oct 2015 23:46:15 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: from mail-qg0-x234.google.com (mail-qg0-x234.google.com [IPv6:2607:f8b0:400d:c04::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 A4A3E1D68; Thu, 15 Oct 2015 23:46:14 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: by qgx61 with SMTP id 61so85851183qgx.3; Thu, 15 Oct 2015 16:46:13 -0700 (PDT) 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=qnqOAEj5SS2INrnbL9DURRina5vIjR+jvkBfWy8fd/4=; b=c24gJA4GDzsmUb5Zsn6totLUzHVpW2l+f6veGcyFvDU1qkc/FY1detFVVaI1erJ59a DSJkRPbwRPbkRMhAvlkjU5UvjRazo4gHwFbtwcyhKL34B0aPA4LA5EmPhLfnI+NQJJSr SXjCK56d9qWgHoJ+PfRUI813lBprbdN+UXfDh/v7zr4iLl56ZLbHJNbNeEU8RRmhi3Hh esl30poEkJoghcvU+GQQ/y+q4xVQrFulofHYq+PNyckLTyEa4h0vib208z7l/6KQ4IaD TSWFE6D+fCds/3lRv8RAhp+B7gbQu1LUtqbUtle6rcUNQAdRlMqLP+bFSBH1FnXN74uG X7oQ== MIME-Version: 1.0 X-Received: by 10.140.101.226 with SMTP id u89mr15638662qge.90.1444952773118; Thu, 15 Oct 2015 16:46:13 -0700 (PDT) Received: by 10.140.88.180 with HTTP; Thu, 15 Oct 2015 16:46:13 -0700 (PDT) In-Reply-To: <201510152341.t9FNflHJ089999@repo.freebsd.org> References: <201510152341.t9FNflHJ089999@repo.freebsd.org> Date: Thu, 15 Oct 2015 16:46:13 -0700 Message-ID: Subject: Re: svn commit: r289394 - head/etc/mtree From: NGie Cooper To: Bryan Drewery Cc: "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Content-Type: text/plain; charset=UTF-8 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Oct 2015 23:46:15 -0000 On Thu, Oct 15, 2015 at 4:41 PM, Bryan Drewery wrote: > Author: bdrewery > Date: Thu Oct 15 23:41:47 2015 > New Revision: 289394 > URL: https://svnweb.freebsd.org/changeset/base/289394 ... > Modified: head/etc/mtree/BSD.usr.dist > ============================================================================== > --- head/etc/mtree/BSD.usr.dist Thu Oct 15 22:55:08 2015 (r289393) > +++ head/etc/mtree/BSD.usr.dist Thu Oct 15 23:41:47 2015 (r289394) > @@ -192,6 +192,8 @@ > legal > intel_ipw > .. > + intel_iwn > + .. > intel_iwi > .. > intel_wpi Sort the list (iwi < iwn)? From owner-svn-src-all@freebsd.org Thu Oct 15 23:48:01 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B4D8AA15CBB; Thu, 15 Oct 2015 23:48: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 9BD9551; Thu, 15 Oct 2015 23:48:01 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from mail.xzibition.com (localhost [IPv6:::1]) by freefall.freebsd.org (Postfix) with ESMTP id 946E51B22; Thu, 15 Oct 2015 23:48: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 4C2CB11A88; Thu, 15 Oct 2015 23:48: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 NmjoKvP3fbCG; Thu, 15 Oct 2015 23:47:59 +0000 (UTC) Subject: Re: svn commit: r289394 - head/etc/mtree DKIM-Filter: OpenDKIM Filter v2.9.2 mail.xzibition.com CA3CF11A82 To: NGie Cooper References: <201510152341.t9FNflHJ089999@repo.freebsd.org> Cc: "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" From: Bryan Drewery Openpgp: id=F9173CB2C3AAEA7A5C8A1F0935D771BB6E4697CF; url=http://www.shatow.net/bryan/bryan2.asc Organization: FreeBSD Message-ID: <56203B30.5010907@FreeBSD.org> Date: Thu, 15 Oct 2015 16:48:00 -0700 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0 MIME-Version: 1.0 In-Reply-To: Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="7lNP9AXtNrUvG7pk318LqvbdVqLg4NKbI" X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Oct 2015 23:48:01 -0000 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --7lNP9AXtNrUvG7pk318LqvbdVqLg4NKbI Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 10/15/2015 4:46 PM, NGie Cooper wrote: > On Thu, Oct 15, 2015 at 4:41 PM, Bryan Drewery w= rote: >> Author: bdrewery >> Date: Thu Oct 15 23:41:47 2015 >> New Revision: 289394 >> URL: https://svnweb.freebsd.org/changeset/base/289394 > ... >> Modified: head/etc/mtree/BSD.usr.dist >> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=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/etc/mtree/BSD.usr.dist Thu Oct 15 22:55:08 2015 (r2893= 93) >> +++ head/etc/mtree/BSD.usr.dist Thu Oct 15 23:41:47 2015 (r2893= 94) >> @@ -192,6 +192,8 @@ >> legal >> intel_ipw >> .. >> + intel_iwn >> + .. >> intel_iwi >> .. >> intel_wpi >=20 > Sort the list (iwi < iwn)? >=20 Woops, brain saw 'h' rather than 'n'. --=20 Regards, Bryan Drewery --7lNP9AXtNrUvG7pk318LqvbdVqLg4NKbI 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 iQEcBAEBAgAGBQJWIDsxAAoJEDXXcbtuRpfPwyEH/jbgfVMCyJv9h3GE1BxzjxDK 195cTdcR5ocR7xisDXe1VgOdp3n4ABiGAWHdlc8a5aWi5J7cnh8XRNnXQTaxjYC1 RTsjaDK7tMMhsEHqFOrylRhF3McETqltFRML4PXDwsrtDH7sw1mGYGYdXDRmpMNt KhOimTZX+PXOSF0hcNnpiLHHUg3924eg++zZKhxAvgsnMGZt7b8V7ABPDcUp/rh8 sSxBHTprTHLFGeHeRVFZyc75MfvrETvYrX933nzDxyPw68lHOiks4ydufWQ0D2j9 eMfN7qezTvvWfGiDoxCbM9QHMAXnelvmhHGnNoRjKluh3hgxmCHvbl1652gALHM= =IXme -----END PGP SIGNATURE----- --7lNP9AXtNrUvG7pk318LqvbdVqLg4NKbI-- From owner-svn-src-all@freebsd.org Thu Oct 15 23:49:06 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6B9C5A15D3D; Thu, 15 Oct 2015 23:49:06 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 366E51FC; Thu, 15 Oct 2015 23:49:06 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t9FNn57X090441; Thu, 15 Oct 2015 23:49:05 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9FNn5b3090440; Thu, 15 Oct 2015 23:49:05 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201510152349.t9FNn5b3090440@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Thu, 15 Oct 2015 23:49:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289398 - head/etc/mtree X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Oct 2015 23:49:06 -0000 Author: bdrewery Date: Thu Oct 15 23:49:05 2015 New Revision: 289398 URL: https://svnweb.freebsd.org/changeset/base/289398 Log: Sort new entry intel_iwn. Submitted by: ngie MFC after: 3 weeks X-MFC-With: r289391 Sponsored by: EMC / Isilon Storage Division Modified: head/etc/mtree/BSD.usr.dist Modified: head/etc/mtree/BSD.usr.dist ============================================================================== --- head/etc/mtree/BSD.usr.dist Thu Oct 15 23:46:07 2015 (r289397) +++ head/etc/mtree/BSD.usr.dist Thu Oct 15 23:49:05 2015 (r289398) @@ -192,10 +192,10 @@ legal intel_ipw .. - intel_iwn - .. intel_iwi .. + intel_iwn + .. intel_wpi .. realtek From owner-svn-src-all@freebsd.org Thu Oct 15 23:51:18 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 53844A15EA7; Thu, 15 Oct 2015 23:51:18 +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 3A599681; Thu, 15 Oct 2015 23:51:18 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from mail.xzibition.com (localhost [IPv6:::1]) by freefall.freebsd.org (Postfix) with ESMTP id 334501DE4; Thu, 15 Oct 2015 23:51:18 +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 DCFED11A9B; Thu, 15 Oct 2015 23:51:17 +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 pcq0a4IUvNTs; Thu, 15 Oct 2015 23:51:15 +0000 (UTC) Subject: Re: svn commit: r289393 - in head: bin/sh/tests cddl etc/periodic gnu gnu/lib gnu/usr.bin/cc gnu/usr.bin/groff gnu/usr.bin/rcs include lib/libiconv_modules secure secure/libexec secure/usr.bin secure/u... DKIM-Filter: OpenDKIM Filter v2.9.2 mail.xzibition.com E394111A96 To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201510152255.t9FMt8aK075575@repo.freebsd.org> <562038BC.4040606@FreeBSD.org> From: Bryan Drewery Openpgp: id=F9173CB2C3AAEA7A5C8A1F0935D771BB6E4697CF; url=http://www.shatow.net/bryan/bryan2.asc Organization: FreeBSD Message-ID: <56203BF5.5040408@FreeBSD.org> Date: Thu, 15 Oct 2015 16:51:17 -0700 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0 MIME-Version: 1.0 In-Reply-To: <562038BC.4040606@FreeBSD.org> Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="x2tI6HVqJuW1T56HA0T4K5MmqlVUDKGhH" X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Oct 2015 23:51:18 -0000 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --x2tI6HVqJuW1T56HA0T4K5MmqlVUDKGhH Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 10/15/2015 4:37 PM, Bryan Drewery wrote: > On 10/15/2015 3:55 PM, Bryan Drewery wrote: >> Author: bdrewery >> Date: Thu Oct 15 22:55:08 2015 >> New Revision: 289393 >> URL: https://svnweb.freebsd.org/changeset/base/289393 >> >> Log: >> Add more SUBDIR_PARALLEL. >> =20 >> MFC after: 3 weeks >> Sponsored by: EMC / Isilon Storage Division >=20 > I forgot to test installworld with -j. It appears there is an issue > there. I will look into it later tonight. >=20 OK it is fine. The issue was missing directories in etc/mtree/BSD.usr.dist. Resolved. I should mention too that soon I expect these SUBDIR_PARALLEL to come out and be replaced with NO_SUBDIR_PARALLEL where needed. --=20 Regards, Bryan Drewery --x2tI6HVqJuW1T56HA0T4K5MmqlVUDKGhH 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 iQEcBAEBAgAGBQJWIDv1AAoJEDXXcbtuRpfPxcwIANpu1bjt/eMfO5reLscS4/a6 Hv12rPEpFeGBCoNIvnfFeaIeULWb0MVS8jwdPaYKHUCrfJPJxPSgQVBejZ1RvxwB j/Z5NwutwSikuhvMWKComBYlNywSfEQs3FJtt6iBmcrPnc1LTvoVumDHF6m2qhSz 55CWce3IC6SH3LU/iLif0/G6eTVfVbf00qM2Bi0bQ5RPr1OiJV7cyCsryseHqT86 qT9Qk+w5RTqyQVOE0CoJqLvWXdR+l4HQQhAe0s0ycVRjjqrjsaICN6l2DSYV8pWz X7cGboYpKWwrbayQERs1sM8HggvGq6mumAxiTRK0mz1xEhumWrtW+67GBTwLEYo= =r1TO -----END PGP SIGNATURE----- --x2tI6HVqJuW1T56HA0T4K5MmqlVUDKGhH-- From owner-svn-src-all@freebsd.org Thu Oct 15 23:53:37 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id ADB71A15F61; Thu, 15 Oct 2015 23:53:37 +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 92B0BA18; Thu, 15 Oct 2015 23:53:37 +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 t9FNrRuQ040461; Thu, 15 Oct 2015 16:53:31 -0700 (PDT) (envelope-from truckman@FreeBSD.org) Message-Id: <201510152353.t9FNrRuQ040461@gw.catspoiler.org> Date: Thu, 15 Oct 2015 16:53:27 -0700 (PDT) From: Don Lewis Subject: Re: svn commit: r289391 - head/share/mk To: bdrewery@FreeBSD.org cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org In-Reply-To: <5620396A.1050209@FreeBSD.org> MIME-Version: 1.0 Content-Type: TEXT/plain; charset=us-ascii X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Oct 2015 23:53:37 -0000 On 15 Oct, Bryan Drewery wrote: > On 10/15/2015 3:49 PM, Bryan Drewery wrote: >> Author: bdrewery >> Date: Thu Oct 15 22:49:56 2015 >> New Revision: 289391 >> URL: https://svnweb.freebsd.org/changeset/base/289391 >> >> Log: >> Make installing to a non-existent directory an error. > > > Sigh - I forgot to test installworld on this. Stupid. > > We have a winner too: > > ===> share/doc/legal/intel_iwn (install) > install -o root -g wheel -m 444 > /root/svn/base/share/doc/legal/intel_iwn/../../../../sys/contrib/dev/iwn/LICENSE > /tmp/blah/usr/share/doc/legal/intel_iwn/ > install: /tmp/blah/usr/share/doc/legal/intel_iwn/: No such file or directory > *** Error code 71 Should the fix include entries in ObsoleteFiles.inc and UPDATING? From owner-svn-src-all@freebsd.org Thu Oct 15 23:53:39 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 22239A15F66; Thu, 15 Oct 2015 23:53:39 +0000 (UTC) (envelope-from cse.cem@gmail.com) Received: from mail-yk0-f169.google.com (mail-yk0-f169.google.com [209.85.160.169]) (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 DD26FA1C; Thu, 15 Oct 2015 23:53:38 +0000 (UTC) (envelope-from cse.cem@gmail.com) Received: by ykdt21 with SMTP id t21so33068377ykd.3; Thu, 15 Oct 2015 16:53:32 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=mime-version:reply-to:in-reply-to:references:date:message-id :subject:from:to:cc:content-type; bh=qwt8VseBB/oGf3AaNr41MuidDA64LiyP2iKAeG2zUE0=; b=A69OXN2X8DxyupA+8l37vDXZlEqyFkrgxuivIJWdN5baefY+NY64Bxs80M5M6Gss3p OKQCQ1xbdVcDP28qdw62ROic8WHe/jgZCKCePYSv3Z/X1Yyc+xdBa/c2HsSB0UYa5MF/ 45xGa7Omoawo4VP23qcgEZkk2/8lPUyv4pTeGIFyiA/jwNb4eORd4joNOvtABoh4bDm0 tRSheC3rNfLjtV4/7gzZQfJLpT8bhlkQ96EklOHatJxfNK+xYlEupDrr4LNwOlIdaxqd /np9F9suERivNmdOYBoP5quV0obCPOthK00hKHcRqEqUpWyrRkNMjKm88I+S9O5lLCWo cwyA== X-Received: by 10.13.239.2 with SMTP id y2mr8493988ywe.300.1444952864707; Thu, 15 Oct 2015 16:47:44 -0700 (PDT) Received: from mail-yk0-f179.google.com (mail-yk0-f179.google.com. [209.85.160.179]) by smtp.gmail.com with ESMTPSA id z205sm12481576ywz.14.2015.10.15.16.47.44 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 15 Oct 2015 16:47:44 -0700 (PDT) Received: by ykdt21 with SMTP id t21so32973974ykd.3; Thu, 15 Oct 2015 16:47:44 -0700 (PDT) MIME-Version: 1.0 X-Received: by 10.129.159.194 with SMTP id w185mr8570548ywg.272.1444952864231; Thu, 15 Oct 2015 16:47:44 -0700 (PDT) Reply-To: cem@FreeBSD.org Received: by 10.37.203.75 with HTTP; Thu, 15 Oct 2015 16:47:44 -0700 (PDT) In-Reply-To: <201510152346.t9FNk7Pa090301@repo.freebsd.org> References: <201510152346.t9FNk7Pa090301@repo.freebsd.org> Date: Thu, 15 Oct 2015 16:47:44 -0700 Message-ID: Subject: Re: svn commit: r289397 - head/sys/dev/ntb/ntb_hw From: Conrad Meyer To: svn-src-head@freebsd.org Cc: src-committers@freebsd.org, svn-src-all@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 " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Oct 2015 23:53:39 -0000 This catches us up to the Linux driver as of Jun 23, 2015. Thanks, Conrad On Thu, Oct 15, 2015 at 4:46 PM, Conrad E. Meyer wrote: > Author: cem > Date: Thu Oct 15 23:46:07 2015 > New Revision: 289397 > URL: https://svnweb.freebsd.org/changeset/base/289397 > > Log: > NTB: MFV ab760a0c: Add split BAR support for Haswell > > On the Haswell platform, a split BAR option to allow creation of 2 32bit > BARs (4 and 5) from the 64bit BAR 4. Adding support for this new option. > > Authored by: Dave Jiang > Obtained from: Linux (Dual BSD/GPL driver) > Sponsored by: EMC / Isilon Storage Division > > Modified: > head/sys/dev/ntb/ntb_hw/ntb_hw.c > head/sys/dev/ntb/ntb_hw/ntb_hw.h > head/sys/dev/ntb/ntb_hw/ntb_regs.h > > Modified: head/sys/dev/ntb/ntb_hw/ntb_hw.c > ============================================================================== > --- head/sys/dev/ntb/ntb_hw/ntb_hw.c Thu Oct 15 23:45:43 2015 (r289396) > +++ head/sys/dev/ntb/ntb_hw/ntb_hw.c Thu Oct 15 23:46:07 2015 (r289397) > @@ -62,7 +62,8 @@ __FBSDID("$FreeBSD$"); > #define NTB_CONFIG_BAR 0 > #define NTB_B2B_BAR_1 1 > #define NTB_B2B_BAR_2 2 > -#define NTB_MAX_BARS 3 > +#define NTB_B2B_BAR_3 3 > +#define NTB_MAX_BARS 4 > #define NTB_MW_TO_BAR(mw) ((mw) + 1) > > #define MAX_MSIX_INTERRUPTS MAX(XEON_MAX_DB_BITS, SOC_MAX_DB_BITS) > @@ -85,7 +86,7 @@ struct ntb_hw_info { > uint32_t device_id; > const char *desc; > enum ntb_device_type type; > - uint64_t features; > + uint32_t features; > }; > > struct ntb_pci_bar_info { > @@ -142,6 +143,7 @@ struct ntb_softc { > uint32_t rdb; > uint32_t bar2_xlat; > uint32_t bar4_xlat; > + uint32_t bar5_xlat; > uint32_t spad_remote; > uint32_t spad_local; > uint32_t lnk_cntl; > @@ -186,9 +188,11 @@ bus_space_write_8(bus_space_tag_t tag, b > #define ntb_reg_read(SIZE, offset) ntb_bar_read(SIZE, NTB_CONFIG_BAR, offset) > #define ntb_reg_write(SIZE, offset, val) \ > ntb_bar_write(SIZE, NTB_CONFIG_BAR, offset, val) > -#define ntb_mw_read(SIZE, offset) ntb_bar_read(SIZE, NTB_B2B_BAR_2, offset) > +#define ntb_mw_read(SIZE, offset) \ > + ntb_bar_read(SIZE, NTB_MW_TO_BAR(ntb->limits.max_mw), offset) > #define ntb_mw_write(SIZE, offset, val) \ > - ntb_bar_write(SIZE, NTB_B2B_BAR_2, offset, val) > + ntb_bar_write(SIZE, NTB_MW_TO_BAR(ntb->limits.max_mw), \ > + offset, val) > > typedef int (*bar_map_strategy)(struct ntb_softc *ntb, > struct ntb_pci_bar_info *bar); > @@ -221,6 +225,7 @@ static void unmask_ldb_interrupt(struct > static int ntb_create_callbacks(struct ntb_softc *ntb, uint32_t num_vectors); > static void ntb_free_callbacks(struct ntb_softc *ntb); > static struct ntb_hw_info *ntb_get_device_info(uint32_t device_id); > +static void ntb_detect_max_mw(struct ntb_softc *ntb); > static int ntb_detect_xeon(struct ntb_softc *ntb); > static int ntb_detect_soc(struct ntb_softc *ntb); > static int ntb_setup_xeon(struct ntb_softc *ntb); > @@ -323,7 +328,7 @@ ntb_attach(device_t device) > if (error) > goto out; > > - ntb->limits.max_mw = NTB_MAX_NUM_MW; > + ntb_detect_max_mw(ntb); > > error = ntb_map_pci_bars(ntb); > if (error) > @@ -357,6 +362,12 @@ ntb_detach(device_t device) > if (ntb->type == NTB_XEON) > ntb_teardown_xeon(ntb); > ntb_teardown_interrupts(ntb); > + > + /* > + * Redetect total MWs so we unmap properly -- in case we lowered the > + * maximum to work around Xeon errata. > + */ > + ntb_detect_max_mw(ntb); > ntb_unmap_pci_bar(ntb); > > return (0); > @@ -379,12 +390,22 @@ ntb_map_pci_bars(struct ntb_softc *ntb) > return (rc); > > ntb->bar_info[NTB_B2B_BAR_2].pci_resource_id = PCIR_BAR(4); > - if (HAS_FEATURE(NTB_REGS_THRU_MW)) > + if (HAS_FEATURE(NTB_REGS_THRU_MW) && !HAS_FEATURE(NTB_SPLIT_BAR)) > rc = map_pci_bar(ntb, map_mmr_bar, > &ntb->bar_info[NTB_B2B_BAR_2]); > else > rc = map_pci_bar(ntb, map_memory_window_bar, > &ntb->bar_info[NTB_B2B_BAR_2]); > + if (!HAS_FEATURE(NTB_SPLIT_BAR)) > + return (rc); > + > + ntb->bar_info[NTB_B2B_BAR_3].pci_resource_id = PCIR_BAR(5); > + if (HAS_FEATURE(NTB_REGS_THRU_MW)) > + rc = map_pci_bar(ntb, map_mmr_bar, > + &ntb->bar_info[NTB_B2B_BAR_3]); > + else > + rc = map_pci_bar(ntb, map_memory_window_bar, > + &ntb->bar_info[NTB_B2B_BAR_3]); > return (rc); > } > > @@ -484,7 +505,7 @@ ntb_unmap_pci_bar(struct ntb_softc *ntb) > struct ntb_pci_bar_info *current_bar; > int i; > > - for (i = 0; i< NTB_MAX_BARS; i++) { > + for (i = 0; i < NTB_MAX_BARS; i++) { > current_bar = &ntb->bar_info[i]; > if (current_bar->pci_resource != NULL) > bus_release_resource(ntb->device, SYS_RES_MEMORY, > @@ -906,6 +927,21 @@ ntb_teardown_xeon(struct ntb_softc *ntb) > ntb_hw_link_down(ntb); > } > > +static void > +ntb_detect_max_mw(struct ntb_softc *ntb) > +{ > + > + if (ntb->type == NTB_SOC) { > + ntb->limits.max_mw = SOC_MAX_MW; > + return; > + } > + > + if (HAS_FEATURE(NTB_SPLIT_BAR)) > + ntb->limits.max_mw = XEON_HSXSPLIT_MAX_MW; > + else > + ntb->limits.max_mw = XEON_SNB_MAX_MW; > +} > + > static int > ntb_detect_xeon(struct ntb_softc *ntb) > { > @@ -919,6 +955,9 @@ ntb_detect_xeon(struct ntb_softc *ntb) > else > ntb->dev_type = NTB_DEV_DSD; > > + if ((ppd & XEON_PPD_SPLIT_BAR) != 0) > + ntb->features |= NTB_SPLIT_BAR; > + > conn_type = ppd & XEON_PPD_CONN_TYPE; > switch (conn_type) { > case NTB_CONN_B2B: > @@ -968,6 +1007,8 @@ ntb_setup_xeon(struct ntb_softc *ntb) > ntb->reg_ofs.spad_local = XEON_SPAD_OFFSET; > ntb->reg_ofs.bar2_xlat = XEON_SBAR2XLAT_OFFSET; > ntb->reg_ofs.bar4_xlat = XEON_SBAR4XLAT_OFFSET; > + if (HAS_FEATURE(NTB_SPLIT_BAR)) > + ntb->reg_ofs.bar5_xlat = XEON_SBAR5XLAT_OFFSET; > > switch (ntb->conn_type) { > case NTB_CONN_B2B: > @@ -1013,22 +1054,24 @@ ntb_setup_xeon(struct ntb_softc *ntb) > * write the limit registers first just in case. > */ > if (HAS_FEATURE(NTB_REGS_THRU_MW)) { > - /* Reserve the last MW for mapping remote spad */ > - ntb->limits.max_mw--; > /* > * Set the Limit register to 4k, the minimum size, to prevent > * an illegal access. > + * > + * XXX: Should this be PBAR5LMT / get_mw_size(, max_mw - 1)? > */ > ntb_reg_write(8, XEON_PBAR4LMT_OFFSET, > ntb_get_mw_size(ntb, 1) + 0x1000); > + /* Reserve the last MW for mapping remote spad */ > + ntb->limits.max_mw--; > } else > /* > * Disable the limit register, just in case it is set to > - * something silly. > + * something silly. A 64-bit write will also clear PBAR5LMT in > + * split-bar mode, and this is desired. > */ > ntb_reg_write(8, XEON_PBAR4LMT_OFFSET, 0); > > - > ntb->reg_ofs.lnk_cntl = XEON_NTBCNTL_OFFSET; > ntb->reg_ofs.lnk_stat = XEON_LINK_STATUS_OFFSET; > ntb->reg_ofs.spci_cmd = XEON_PCICMD_OFFSET; > @@ -1112,15 +1155,15 @@ configure_soc_secondary_side_bars(struct > { > > if (ntb->dev_type == NTB_DEV_USD) { > - ntb_reg_write(8, SOC_PBAR2XLAT_OFFSET, PBAR2XLAT_USD_ADDR); > - ntb_reg_write(8, SOC_PBAR4XLAT_OFFSET, PBAR4XLAT_USD_ADDR); > + ntb_reg_write(8, SOC_PBAR2XLAT_OFFSET, MBAR23_DSD_ADDR); > + ntb_reg_write(8, SOC_PBAR4XLAT_OFFSET, MBAR4_DSD_ADDR); > ntb_reg_write(8, SOC_MBAR23_OFFSET, MBAR23_USD_ADDR); > - ntb_reg_write(8, SOC_MBAR45_OFFSET, MBAR45_USD_ADDR); > + ntb_reg_write(8, SOC_MBAR45_OFFSET, MBAR4_USD_ADDR); > } else { > - ntb_reg_write(8, SOC_PBAR2XLAT_OFFSET, PBAR2XLAT_DSD_ADDR); > - ntb_reg_write(8, SOC_PBAR4XLAT_OFFSET, PBAR4XLAT_DSD_ADDR); > + ntb_reg_write(8, SOC_PBAR2XLAT_OFFSET, MBAR23_USD_ADDR); > + ntb_reg_write(8, SOC_PBAR4XLAT_OFFSET, MBAR4_USD_ADDR); > ntb_reg_write(8, SOC_MBAR23_OFFSET, MBAR23_DSD_ADDR); > - ntb_reg_write(8, SOC_MBAR45_OFFSET, MBAR45_DSD_ADDR); > + ntb_reg_write(8, SOC_MBAR45_OFFSET, MBAR4_DSD_ADDR); > } > } > > @@ -1129,13 +1172,19 @@ configure_xeon_secondary_side_bars(struc > { > > if (ntb->dev_type == NTB_DEV_USD) { > - ntb_reg_write(8, XEON_PBAR2XLAT_OFFSET, PBAR2XLAT_USD_ADDR); > + ntb_reg_write(8, XEON_PBAR2XLAT_OFFSET, MBAR23_DSD_ADDR); > if (HAS_FEATURE(NTB_REGS_THRU_MW)) > ntb_reg_write(8, XEON_PBAR4XLAT_OFFSET, > MBAR01_DSD_ADDR); > else { > - ntb_reg_write(8, XEON_PBAR4XLAT_OFFSET, > - PBAR4XLAT_USD_ADDR); > + if (HAS_FEATURE(NTB_SPLIT_BAR)) { > + ntb_reg_write(4, XEON_PBAR4XLAT_OFFSET, > + MBAR4_DSD_ADDR); > + ntb_reg_write(4, XEON_PBAR5XLAT_OFFSET, > + MBAR5_DSD_ADDR); > + } else > + ntb_reg_write(8, XEON_PBAR4XLAT_OFFSET, > + MBAR4_DSD_ADDR); > /* > * B2B_XLAT_OFFSET is a 64-bit register but can only be > * written 32 bits at a time. > @@ -1147,15 +1196,25 @@ configure_xeon_secondary_side_bars(struc > } > ntb_reg_write(8, XEON_SBAR0BASE_OFFSET, MBAR01_USD_ADDR); > ntb_reg_write(8, XEON_SBAR2BASE_OFFSET, MBAR23_USD_ADDR); > - ntb_reg_write(8, XEON_SBAR4BASE_OFFSET, MBAR45_USD_ADDR); > + if (HAS_FEATURE(NTB_SPLIT_BAR)) { > + ntb_reg_write(4, XEON_SBAR4BASE_OFFSET, MBAR4_USD_ADDR); > + ntb_reg_write(4, XEON_SBAR5BASE_OFFSET, MBAR5_USD_ADDR); > + } else > + ntb_reg_write(8, XEON_SBAR4BASE_OFFSET, MBAR4_USD_ADDR); > } else { > - ntb_reg_write(8, XEON_PBAR2XLAT_OFFSET, PBAR2XLAT_DSD_ADDR); > + ntb_reg_write(8, XEON_PBAR2XLAT_OFFSET, MBAR23_USD_ADDR); > if (HAS_FEATURE(NTB_REGS_THRU_MW)) > ntb_reg_write(8, XEON_PBAR4XLAT_OFFSET, > MBAR01_USD_ADDR); > else { > - ntb_reg_write(8, XEON_PBAR4XLAT_OFFSET, > - PBAR4XLAT_DSD_ADDR); > + if (HAS_FEATURE(NTB_SPLIT_BAR)) { > + ntb_reg_write(4, XEON_PBAR4XLAT_OFFSET, > + MBAR4_USD_ADDR); > + ntb_reg_write(4, XEON_PBAR5XLAT_OFFSET, > + MBAR5_USD_ADDR); > + } else > + ntb_reg_write(8, XEON_PBAR4XLAT_OFFSET, > + MBAR4_USD_ADDR); > /* > * B2B_XLAT_OFFSET is a 64-bit register but can only be > * written 32 bits at a time. > @@ -1167,7 +1226,14 @@ configure_xeon_secondary_side_bars(struc > } > ntb_reg_write(8, XEON_SBAR0BASE_OFFSET, MBAR01_DSD_ADDR); > ntb_reg_write(8, XEON_SBAR2BASE_OFFSET, MBAR23_DSD_ADDR); > - ntb_reg_write(8, XEON_SBAR4BASE_OFFSET, MBAR45_DSD_ADDR); > + if (HAS_FEATURE(NTB_SPLIT_BAR)) { > + ntb_reg_write(4, XEON_SBAR4BASE_OFFSET, > + MBAR4_DSD_ADDR); > + ntb_reg_write(4, XEON_SBAR5BASE_OFFSET, > + MBAR5_DSD_ADDR); > + } else > + ntb_reg_write(8, XEON_SBAR4BASE_OFFSET, > + MBAR4_DSD_ADDR); > } > } > > @@ -1288,7 +1354,9 @@ ntb_hw_link_up(struct ntb_softc *ntb) > cntl = ntb_reg_read(4, ntb->reg_ofs.lnk_cntl); > cntl &= ~(NTB_CNTL_LINK_DISABLE | NTB_CNTL_CFG_LOCK); > cntl |= NTB_CNTL_P2S_BAR23_SNOOP | NTB_CNTL_S2P_BAR23_SNOOP; > - cntl |= NTB_CNTL_P2S_BAR45_SNOOP | NTB_CNTL_S2P_BAR45_SNOOP; > + cntl |= NTB_CNTL_P2S_BAR4_SNOOP | NTB_CNTL_S2P_BAR4_SNOOP; > + if (HAS_FEATURE(NTB_SPLIT_BAR)) > + cntl |= NTB_CNTL_P2S_BAR5_SNOOP | NTB_CNTL_S2P_BAR5_SNOOP; > ntb_reg_write(4, ntb->reg_ofs.lnk_cntl, cntl); > } > > @@ -1304,7 +1372,9 @@ ntb_hw_link_down(struct ntb_softc *ntb) > > cntl = ntb_reg_read(4, ntb->reg_ofs.lnk_cntl); > cntl &= ~(NTB_CNTL_P2S_BAR23_SNOOP | NTB_CNTL_S2P_BAR23_SNOOP); > - cntl &= ~(NTB_CNTL_P2S_BAR45_SNOOP | NTB_CNTL_S2P_BAR45_SNOOP); > + cntl &= ~(NTB_CNTL_P2S_BAR4_SNOOP | NTB_CNTL_S2P_BAR4_SNOOP); > + if (HAS_FEATURE(NTB_SPLIT_BAR)) > + cntl &= ~(NTB_CNTL_P2S_BAR5_SNOOP | NTB_CNTL_S2P_BAR5_SNOOP); > cntl |= NTB_CNTL_LINK_DISABLE | NTB_CNTL_CFG_LOCK; > ntb_reg_write(4, ntb->reg_ofs.lnk_cntl, cntl); > } > @@ -1753,7 +1823,13 @@ ntb_set_mw_addr(struct ntb_softc *ntb, u > ntb_reg_write(8, ntb->reg_ofs.bar2_xlat, addr); > break; > case NTB_B2B_BAR_2: > - ntb_reg_write(8, ntb->reg_ofs.bar4_xlat, addr); > + if (HAS_FEATURE(NTB_SPLIT_BAR)) > + ntb_reg_write(4, ntb->reg_ofs.bar4_xlat, addr); > + else > + ntb_reg_write(8, ntb->reg_ofs.bar4_xlat, addr); > + break; > + case NTB_B2B_BAR_3: > + ntb_reg_write(4, ntb->reg_ofs.bar5_xlat, addr); > break; > } > } > > Modified: head/sys/dev/ntb/ntb_hw/ntb_hw.h > ============================================================================== > --- head/sys/dev/ntb/ntb_hw/ntb_hw.h Thu Oct 15 23:45:43 2015 (r289396) > +++ head/sys/dev/ntb/ntb_hw/ntb_hw.h Thu Oct 15 23:46:07 2015 (r289397) > @@ -31,7 +31,7 @@ > > struct ntb_softc; > > -#define NTB_MAX_NUM_MW 2 > +#define NTB_MAX_NUM_MW 3 > > enum ntb_link_event { > NTB_LINK_DOWN = 0, > @@ -78,11 +78,14 @@ void ntb_ring_doorbell(struct ntb_softc > bool ntb_query_link_status(struct ntb_softc *ntb); > device_t ntb_get_device(struct ntb_softc *ntb); > > +/* Hardware owns the low 32 bits of features. */ > #define NTB_BAR_SIZE_4K (1 << 0) > /* REGS_THRU_MW is the equivalent of Linux's NTB_HWERR_SDOORBELL_LOCKUP */ > #define NTB_REGS_THRU_MW (1 << 1) > #define NTB_SB01BASE_LOCKUP (1 << 2) > #define NTB_B2BDOORBELL_BIT14 (1 << 3) > +/* Software/configuration owns the top 32 bits. */ > +#define NTB_SPLIT_BAR (1ull << 32) > bool ntb_has_feature(struct ntb_softc *, uint64_t); > > #endif /* _NTB_HW_H_ */ > > Modified: head/sys/dev/ntb/ntb_hw/ntb_regs.h > ============================================================================== > --- head/sys/dev/ntb/ntb_hw/ntb_regs.h Thu Oct 15 23:45:43 2015 (r289396) > +++ head/sys/dev/ntb/ntb_hw/ntb_regs.h Thu Oct 15 23:46:07 2015 (r289397) > @@ -34,6 +34,8 @@ > #define NTB_LINK_WIDTH_MASK 0x03f0 > > #define XEON_MSIX_CNT 4 > +#define XEON_SNB_MAX_MW 2 > +#define XEON_HSXSPLIT_MAX_MW 3 > #define XEON_MAX_SPADS 16 > #define XEON_MAX_COMPAT_SPADS 16 > /* Reserve the uppermost bit for link interrupt */ > @@ -50,15 +52,20 @@ > > #define XEON_PBAR2LMT_OFFSET 0x0000 > #define XEON_PBAR4LMT_OFFSET 0x0008 > +#define XEON_PBAR5LMT_OFFSET 0x000c > #define XEON_PBAR2XLAT_OFFSET 0x0010 > #define XEON_PBAR4XLAT_OFFSET 0x0018 > +#define XEON_PBAR5XLAT_OFFSET 0x001c > #define XEON_SBAR2LMT_OFFSET 0x0020 > #define XEON_SBAR4LMT_OFFSET 0x0028 > +#define XEON_SBAR5LMT_OFFSET 0x002c > #define XEON_SBAR2XLAT_OFFSET 0x0030 > #define XEON_SBAR4XLAT_OFFSET 0x0038 > +#define XEON_SBAR5XLAT_OFFSET 0x003c > #define XEON_SBAR0BASE_OFFSET 0x0040 > #define XEON_SBAR2BASE_OFFSET 0x0048 > #define XEON_SBAR4BASE_OFFSET 0x0050 > +#define XEON_SBAR5BASE_OFFSET 0x0054 > #define XEON_NTBCNTL_OFFSET 0x0058 > #define XEON_SBDF_OFFSET 0x005c > #define XEON_PDOORBELL_OFFSET 0x0060 > @@ -75,6 +82,7 @@ > #define XEON_B2B_XLAT_OFFSETU 0x0148 > > #define SOC_MSIX_CNT 34 > +#define SOC_MAX_MW 2 > #define SOC_MAX_SPADS 16 > #define SOC_MAX_DB_BITS 34 > #define SOC_DB_BITS_PER_VEC 1 > @@ -111,17 +119,19 @@ > #define SOC_LTSSMSTATEJMP_OFFSET (SOC_IP_BASE + 0x3040) > #define SOC_IBSTERRRCRVSTS0_OFFSET (SOC_IP_BASE + 0x3324) > > -#define SOC_DESKEWSTS_DBERR (1 << 15) > +#define SOC_DESKEWSTS_DBERR (1 << 15) > #define SOC_LTSSMERRSTS0_UNEXPECTEDEI (1 << 20) > #define SOC_LTSSMSTATEJMP_FORCEDETECT (1 << 2) > -#define SOC_IBIST_ERR_OFLOW 0x7fff7fff > +#define SOC_IBIST_ERR_OFLOW 0x7fff7fff > > #define NTB_CNTL_CFG_LOCK (1 << 0) > #define NTB_CNTL_LINK_DISABLE (1 << 1) > #define NTB_CNTL_S2P_BAR23_SNOOP (1 << 2) > #define NTB_CNTL_P2S_BAR23_SNOOP (1 << 4) > -#define NTB_CNTL_S2P_BAR45_SNOOP (1 << 6) > -#define NTB_CNTL_P2S_BAR45_SNOOP (1 << 8) > +#define NTB_CNTL_S2P_BAR4_SNOOP (1 << 6) > +#define NTB_CNTL_P2S_BAR4_SNOOP (1 << 8) > +#define NTB_CNTL_S2P_BAR5_SNOOP (1 << 12) > +#define NTB_CNTL_P2S_BAR5_SNOOP (1 << 14) > #define SOC_CNTL_LINK_DOWN (1 << 16) > > #define XEON_PBAR23SZ_OFFSET 0x00d0 > @@ -129,6 +139,7 @@ > #define NTB_PPD_OFFSET 0x00d4 > #define XEON_PPD_CONN_TYPE 0x0003 > #define XEON_PPD_DEV_TYPE 0x0010 > +#define XEON_PPD_SPLIT_BAR 0x0040 > #define SOC_PPD_INIT_LINK 0x0008 > #define SOC_PPD_CONN_TYPE 0x0300 > #define SOC_PPD_DEV_TYPE 0x1000 > @@ -140,16 +151,15 @@ > #define NTB_DEV_DSD 1 > #define NTB_DEV_USD 0 > > -#define PBAR2XLAT_USD_ADDR 0x0000004000000000ull > -#define PBAR4XLAT_USD_ADDR 0x0000008000000000ull > -#define MBAR01_USD_ADDR 0x000000210000000cull > -#define MBAR23_USD_ADDR 0x000000410000000cull > -#define MBAR45_USD_ADDR 0x000000810000000cull > -#define PBAR2XLAT_DSD_ADDR 0x0000004100000000ull > -#define PBAR4XLAT_DSD_ADDR 0x0000008100000000ull > -#define MBAR01_DSD_ADDR 0x000000200000000cull > -#define MBAR23_DSD_ADDR 0x000000400000000cull > -#define MBAR45_DSD_ADDR 0x000000800000000cull > +/* All addresses are in low 32-bit space so 32-bit BARs can function */ > +#define MBAR01_USD_ADDR 0x2100000cull > +#define MBAR23_USD_ADDR 0x4100000cull > +#define MBAR4_USD_ADDR 0x8100000cull > +#define MBAR5_USD_ADDR 0xa100000cull > +#define MBAR01_DSD_ADDR 0x2000000cull > +#define MBAR23_DSD_ADDR 0x4000000cull > +#define MBAR4_DSD_ADDR 0x8000000cull > +#define MBAR5_DSD_ADDR 0xa000000cull > > /* XEON Shadowed MMIO Space */ > #define XEON_SHADOW_PDOORBELL_OFFSET 0x60 > From owner-svn-src-all@freebsd.org Thu Oct 15 23:57:28 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 92464A161E1; Thu, 15 Oct 2015 23:57:28 +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 7B271D26; Thu, 15 Oct 2015 23:57:28 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from mail.xzibition.com (localhost [IPv6:::1]) by freefall.freebsd.org (Postfix) with ESMTP id 73D961233; Thu, 15 Oct 2015 23:57:28 +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 2001D11AE3; Thu, 15 Oct 2015 23:57:28 +0000 (UTC) X-Virus-Scanned: amavisd-new at mail.xzibition.com Received: from mail.xzibition.com ([172.31.3.2]) by mail.xzibition.com (mail.xzibition.com [172.31.3.2]) (amavisd-new, port 10026) with LMTP id KJhrGmg9e1cT; Thu, 15 Oct 2015 23:57:21 +0000 (UTC) Subject: Re: svn commit: r289391 - head/share/mk DKIM-Filter: OpenDKIM Filter v2.9.2 mail.xzibition.com 2882C11ADC To: Don Lewis References: <201510152353.t9FNrRuQ040461@gw.catspoiler.org> Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org From: Bryan Drewery Openpgp: id=F9173CB2C3AAEA7A5C8A1F0935D771BB6E4697CF; url=http://www.shatow.net/bryan/bryan2.asc Organization: FreeBSD Message-ID: <56203D63.50303@FreeBSD.org> Date: Thu, 15 Oct 2015 16:57:23 -0700 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0 MIME-Version: 1.0 In-Reply-To: <201510152353.t9FNrRuQ040461@gw.catspoiler.org> Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="uLKcUVC7nb81XkW4JgNAhfSqOnRT4jLeA" X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Oct 2015 23:57:28 -0000 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --uLKcUVC7nb81XkW4JgNAhfSqOnRT4jLeA Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: quoted-printable On 10/15/2015 4:53 PM, Don Lewis wrote: > On 15 Oct, Bryan Drewery wrote: >> On 10/15/2015 3:49 PM, Bryan Drewery wrote: >>> Author: bdrewery >>> Date: Thu Oct 15 22:49:56 2015 >>> New Revision: 289391 >>> URL: https://svnweb.freebsd.org/changeset/base/289391 >>> >>> Log: >>> Make installing to a non-existent directory an error. >> >> >> Sigh - I forgot to test installworld on this. Stupid. >> >> We have a winner too: >> >> =3D=3D=3D> share/doc/legal/intel_iwn (install) >> install -o root -g wheel -m 444 >> /root/svn/base/share/doc/legal/intel_iwn/../../../../sys/contrib/dev/i= wn/LICENSE >> /tmp/blah/usr/share/doc/legal/intel_iwn/ >> install: /tmp/blah/usr/share/doc/legal/intel_iwn/: No such file or dir= ectory >> *** Error code 71 >=20 >=20 > Should the fix include entries in ObsoleteFiles.inc and UPDATING? >=20 I do see that distrib-dirs/mtree doesn't handle this case gracefully. I don't think so regarding ObsoleteFiles - the files will become directories with a new file in it. So the name won't go away, unless the fix here is to rename them. I'll add a fix in. --=20 Regards, Bryan Drewery --uLKcUVC7nb81XkW4JgNAhfSqOnRT4jLeA 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 iQEcBAEBAgAGBQJWID1jAAoJEDXXcbtuRpfPgjIIANlfBnEYRmbJ55lMAtabMxb/ vpNWfhTYzA81CJ4/9avmWPBWbb3sr1InPVB/4h9UhmQ9iGQvQoYXhQB8kNLI7C48 iZxyluzLVQT9UP/psIcz/k7uKAbwGRBkyjpv642r0yQXQ1YK77Urvdms9IR0T1de 5aqaIOLGzk8KAoRrq9c4n5on2PM+Y2vOVeYtrEUkSS4Vzja5FdNJ8NbgjA+z4YWD 1TDulfB2/ZO5oHH/PR97t1s8h8OuPlDLczGB1SCVf/BcNes5LlcnxluTFHJQ1En4 Dy75boR3nl/rfhE2K7o1BLkqOW/7Jk0GHPl+dAgP1hGx6I7Q0+ofnpG1GJR8oqU= =Vu2W -----END PGP SIGNATURE----- --uLKcUVC7nb81XkW4JgNAhfSqOnRT4jLeA-- From owner-svn-src-all@freebsd.org Fri Oct 16 00:33:13 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 69E1DA169EF for ; Fri, 16 Oct 2015 00:33:13 +0000 (UTC) (envelope-from ian@freebsd.org) Received: from outbound1b.ore.mailhop.org (outbound1b.ore.mailhop.org [54.200.247.200]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 48C24105 for ; Fri, 16 Oct 2015 00:33:12 +0000 (UTC) (envelope-from ian@freebsd.org) Received: from ilsoft.org (unknown [73.34.117.227]) by outbound1.ore.mailhop.org (Halon Mail Gateway) with ESMTPSA; Fri, 16 Oct 2015 00:32:13 +0000 (UTC) Received: from rev (rev [172.22.42.240]) by ilsoft.org (8.14.9/8.14.9) with ESMTP id t9G0W4jc002238; Thu, 15 Oct 2015 18:32:04 -0600 (MDT) (envelope-from ian@freebsd.org) Message-ID: <1444955524.71631.6.camel@freebsd.org> Subject: Re: svn commit: r289393 - in head: bin/sh/tests cddl etc/periodic gnu gnu/lib gnu/usr.bin/cc gnu/usr.bin/groff gnu/usr.bin/rcs include lib/libiconv_modules secure secure/libexec secure/usr.bin secure/u... From: Ian Lepore To: Bryan Drewery , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Date: Thu, 15 Oct 2015 18:32:04 -0600 In-Reply-To: <56203BF5.5040408@FreeBSD.org> References: <201510152255.t9FMt8aK075575@repo.freebsd.org> <562038BC.4040606@FreeBSD.org> <56203BF5.5040408@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 " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Oct 2015 00:33:13 -0000 On Thu, 2015-10-15 at 16:51 -0700, Bryan Drewery wrote: > On 10/15/2015 4:37 PM, Bryan Drewery wrote: > > On 10/15/2015 3:55 PM, Bryan Drewery wrote: > > > Author: bdrewery > > > Date: Thu Oct 15 22:55:08 2015 > > > New Revision: 289393 > > > URL: https://svnweb.freebsd.org/changeset/base/289393 > > > > > > Log: > > > Add more SUBDIR_PARALLEL. > > > > > > MFC after: 3 weeks > > > Sponsored by: EMC / Isilon Storage Division > > > > I forgot to test installworld with -j. It appears there is an > > issue > > there. I will look into it later tonight. > > > > OK it is fine. The issue was missing directories in > etc/mtree/BSD.usr.dist. Resolved. > > I should mention too that soon I expect these SUBDIR_PARALLEL to come > out and be replaced with NO_SUBDIR_PARALLEL where needed. > That seems to imply that the default is going to flip to always building parallel unless it's supressed by specific makefiles. -- Ian From owner-svn-src-all@freebsd.org Fri Oct 16 00:36:05 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A7734A16A91; Fri, 16 Oct 2015 00:36:05 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:1900:2254:206c::16:87]) by mx1.freebsd.org (Postfix) with ESMTP id 8D78630B; Fri, 16 Oct 2015 00:36:05 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from mail.xzibition.com (localhost [IPv6:::1]) by freefall.freebsd.org (Postfix) with ESMTP id 8669F1BD6; Fri, 16 Oct 2015 00:36:05 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from mail.xzibition.com (localhost [172.31.3.2]) by mail.xzibition.com (Postfix) with ESMTP id 3884211BA3; Fri, 16 Oct 2015 00:36:05 +0000 (UTC) X-Virus-Scanned: amavisd-new at mail.xzibition.com Received: from mail.xzibition.com ([172.31.3.2]) by mail.xzibition.com (mail.xzibition.com [172.31.3.2]) (amavisd-new, port 10026) with LMTP id 1CwomRifpA6L; Fri, 16 Oct 2015 00:36:02 +0000 (UTC) Subject: Re: svn commit: r289393 - in head: bin/sh/tests cddl etc/periodic gnu gnu/lib gnu/usr.bin/cc gnu/usr.bin/groff gnu/usr.bin/rcs include lib/libiconv_modules secure secure/libexec secure/usr.bin secure/u... DKIM-Filter: OpenDKIM Filter v2.9.2 mail.xzibition.com 7583811B9D To: Ian Lepore , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201510152255.t9FMt8aK075575@repo.freebsd.org> <562038BC.4040606@FreeBSD.org> <56203BF5.5040408@FreeBSD.org> <1444955524.71631.6.camel@freebsd.org> From: Bryan Drewery Openpgp: id=F9173CB2C3AAEA7A5C8A1F0935D771BB6E4697CF; url=http://www.shatow.net/bryan/bryan2.asc Organization: FreeBSD Message-ID: <56204674.3040502@FreeBSD.org> Date: Thu, 15 Oct 2015 17:36:04 -0700 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0 MIME-Version: 1.0 In-Reply-To: <1444955524.71631.6.camel@freebsd.org> Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="6GOEjxq81jmE351TUCwsXKrBFJEjVvr4E" X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Oct 2015 00:36:05 -0000 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --6GOEjxq81jmE351TUCwsXKrBFJEjVvr4E Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: quoted-printable On 10/15/2015 5:32 PM, Ian Lepore wrote: > On Thu, 2015-10-15 at 16:51 -0700, Bryan Drewery wrote: >> On 10/15/2015 4:37 PM, Bryan Drewery wrote: >>> On 10/15/2015 3:55 PM, Bryan Drewery wrote: >>>> Author: bdrewery >>>> Date: Thu Oct 15 22:55:08 2015 >>>> New Revision: 289393 >>>> URL: https://svnweb.freebsd.org/changeset/base/289393 >>>> >>>> Log: >>>> Add more SUBDIR_PARALLEL. >>>> =20 >>>> MFC after: 3 weeks >>>> Sponsored by: EMC / Isilon Storage Division >>> >>> I forgot to test installworld with -j. It appears there is an >>> issue >>> there. I will look into it later tonight. >>> >> >> OK it is fine. The issue was missing directories in >> etc/mtree/BSD.usr.dist. Resolved. >> >> I should mention too that soon I expect these SUBDIR_PARALLEL to come >> out and be replaced with NO_SUBDIR_PARALLEL where needed. >> >=20 > That seems to imply that the default is going to flip to always > building parallel unless it's supressed by specific makefiles. >=20 Yes. It will be safe to do so if building in the src tree, but not when building outside of the src tree. --=20 Regards, Bryan Drewery --6GOEjxq81jmE351TUCwsXKrBFJEjVvr4E 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 iQEcBAEBAgAGBQJWIEZ0AAoJEDXXcbtuRpfP5zEH/AhiuC0H7vqXt3mxzAgICXq1 eImoB/nQsSpTqcDFjvpRddibNK5YuDc1nwbk4cUksBNiw5RvnTH2uxoTzOAyh6Cf F3FpHBFS51AJWMt2Kv7lp18S0jsK/S46sRZWmc5kHu0qoCi5wyA0OCEAbf2YWHFM S/yxRnm5vDGFQAxrvQRy4Ts7BMnSajIUOQrGk3o83jMsYVrBgA+k+JFZ1MatyQCB ZUQG61//CwM0h5j9RyJmPbCDhQmTgWqxRywpy2epblsOrQspiE2Yxu2wQOwIBRTL Oa8SJAV1SIFp72PupoefkMRtMqROnxe7O2on69/oFxNWpYvJoQbaWLUtELOcYKs= =oBgE -----END PGP SIGNATURE----- --6GOEjxq81jmE351TUCwsXKrBFJEjVvr4E-- From owner-svn-src-all@freebsd.org Fri Oct 16 00:38:08 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 88AC9A16AEF; Fri, 16 Oct 2015 00:38: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 52D4C6A5; Fri, 16 Oct 2015 00:38: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 t9G0c7qC005247; Fri, 16 Oct 2015 00:38:07 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9G0c5H5005231; Fri, 16 Oct 2015 00:38:05 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201510160038.t9G0c5H5005231@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Fri, 16 Oct 2015 00:38:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289399 - in head: . etc/mtree share/doc/legal/intel_ipw share/doc/legal/intel_iwi share/doc/legal/intel_iwn share/doc/legal/intel_wpi share/doc/legal/realtek share/man/man4 sys/tools X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Oct 2015 00:38:08 -0000 Author: bdrewery Date: Fri Oct 16 00:38:05 2015 New Revision: 289399 URL: https://svnweb.freebsd.org/changeset/base/289399 Log: Rename the /usr/share/doc/legal files to driver.LICENSE to work around bug of installing 'realtek' and 'intel_iwn' as files rather then as a 'LICENSE' file in their directories. Also add obsolete entries for the older names and names that existed in head for a period of time. Suggested by: jmg X-MFC-With: r289391 MFC after: 3 weeks Sponsored by: EMC / Isilon Storage Division Modified: head/ObsoleteFiles.inc head/etc/mtree/BSD.usr.dist head/share/doc/legal/intel_ipw/Makefile head/share/doc/legal/intel_iwi/Makefile head/share/doc/legal/intel_iwn/Makefile head/share/doc/legal/intel_wpi/Makefile head/share/doc/legal/realtek/Makefile head/share/man/man4/ipw.4 head/share/man/man4/ipwfw.4 head/share/man/man4/iwi.4 head/share/man/man4/iwifw.4 head/share/man/man4/rsu.4 head/share/man/man4/urtwn.4 head/share/man/man4/urtwnfw.4 head/share/man/man4/wpi.4 head/sys/tools/fw_stub.awk Modified: head/ObsoleteFiles.inc ============================================================================== --- head/ObsoleteFiles.inc Thu Oct 15 23:49:05 2015 (r289398) +++ head/ObsoleteFiles.inc Fri Oct 16 00:38:05 2015 (r289399) @@ -38,6 +38,19 @@ # xargs -n1 | sort | uniq -d; # done +# 20151015: Rename files due to file-installed-as-dir bug +OLD_FILES+=usr/share/doc/legal/realtek +OLD_FILES+=usr/share/doc/legal/realtek/LICENSE +OLD_DIRS+=usr/share/doc/legal/realtek +OLD_DIRS+=usr/share/doc/legal/intel_ipw +OLD_FILES+=usr/share/doc/legal/intel_ipw/LICENSE +OLD_FILES+=usr/share/doc/legal/intel_iwn +OLD_FILES+=usr/share/doc/legal/intel_iwn/LICENSE +OLD_DIRS+=usr/share/doc/legal/intel_iwn +OLD_DIRS+=usr/share/doc/legal/intel_iwi +OLD_FILES+=usr/share/doc/legal/intel_iwi/LICENSE +OLD_DIRS+=usr/share/doc/legal/intel_wpi +OLD_FILES+=usr/share/doc/legal/intel_wpi/LICENSE # 20151006: new libc++ import OLD_FILES+=usr/include/c++/__tuple_03 # 20151006: new clang import which bumps version from 3.6.1 to 3.7.0. Modified: head/etc/mtree/BSD.usr.dist ============================================================================== --- head/etc/mtree/BSD.usr.dist Thu Oct 15 23:49:05 2015 (r289398) +++ head/etc/mtree/BSD.usr.dist Fri Oct 16 00:38:05 2015 (r289399) @@ -190,16 +190,6 @@ atm .. legal - intel_ipw - .. - intel_iwi - .. - intel_iwn - .. - intel_wpi - .. - realtek - .. .. llvm clang Modified: head/share/doc/legal/intel_ipw/Makefile ============================================================================== --- head/share/doc/legal/intel_ipw/Makefile Thu Oct 15 23:49:05 2015 (r289398) +++ head/share/doc/legal/intel_ipw/Makefile Fri Oct 16 00:38:05 2015 (r289399) @@ -1,6 +1,7 @@ # $FreeBSD$ FILES= ${.CURDIR}/../../../../sys/contrib/dev/ipw/LICENSE -FILESDIR= ${SHAREDIR}/doc/legal/intel_ipw +FILESDIR= ${SHAREDIR}/doc/legal +FILESNAME= intel_ipw.LICENSE .include Modified: head/share/doc/legal/intel_iwi/Makefile ============================================================================== --- head/share/doc/legal/intel_iwi/Makefile Thu Oct 15 23:49:05 2015 (r289398) +++ head/share/doc/legal/intel_iwi/Makefile Fri Oct 16 00:38:05 2015 (r289399) @@ -1,6 +1,7 @@ # $FreeBSD$ FILES= ${.CURDIR}/../../../../sys/contrib/dev/iwi/LICENSE -FILESDIR= ${SHAREDIR}/doc/legal/intel_iwi +FILESDIR= ${SHAREDIR}/doc/legal +FILESNAME= intel_iwi.LICENSE .include Modified: head/share/doc/legal/intel_iwn/Makefile ============================================================================== --- head/share/doc/legal/intel_iwn/Makefile Thu Oct 15 23:49:05 2015 (r289398) +++ head/share/doc/legal/intel_iwn/Makefile Fri Oct 16 00:38:05 2015 (r289399) @@ -1,6 +1,7 @@ # $FreeBSD$ FILES= ${.CURDIR}/../../../../sys/contrib/dev/iwn/LICENSE -FILESDIR= ${SHAREDIR}/doc/legal/intel_iwn +FILESDIR= ${SHAREDIR}/doc/legal +FILESNAME= intel_iwn.LICENSE .include Modified: head/share/doc/legal/intel_wpi/Makefile ============================================================================== --- head/share/doc/legal/intel_wpi/Makefile Thu Oct 15 23:49:05 2015 (r289398) +++ head/share/doc/legal/intel_wpi/Makefile Fri Oct 16 00:38:05 2015 (r289399) @@ -1,7 +1,8 @@ # $FreeBSD$ FILES= ${.CURDIR}/../../../../sys/contrib/dev/wpi/LICENSE -FILESDIR= ${SHAREDIR}/doc/legal/intel_wpi +FILESDIR= ${SHAREDIR}/doc/legal +FILESNAME= intel_wpi.LICENSE .include Modified: head/share/doc/legal/realtek/Makefile ============================================================================== --- head/share/doc/legal/realtek/Makefile Thu Oct 15 23:49:05 2015 (r289398) +++ head/share/doc/legal/realtek/Makefile Fri Oct 16 00:38:05 2015 (r289399) @@ -1,6 +1,7 @@ # $FreeBSD$ FILES= ${.CURDIR}/../../../../sys/contrib/dev/urtwn/LICENSE -FILESDIR= ${SHAREDIR}/doc/legal/realtek +FILESDIR= ${SHAREDIR}/doc/legal +FILESNAME= realtek.LICENSE .include Modified: head/share/man/man4/ipw.4 ============================================================================== --- head/share/man/man4/ipw.4 Thu Oct 15 23:49:05 2015 (r289398) +++ head/share/man/man4/ipw.4 Fri Oct 16 00:38:05 2015 (r289399) @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd April 13, 2008 +.Dd October 15, 2015 .Dt IPW 4 .Os .Sh NAME @@ -77,14 +77,14 @@ This driver requires the firmware built .Nm ipwfw module to work. For the loaded firmware to be enabled for use the license at -.Pa /usr/share/doc/legal/intel_ipw/LICENSE +.Pa /usr/share/doc/legal/intel_ipw.LICENSE must be agreed by adding the following line to .Xr loader.conf 5 : .Pp .Dl "legal.intel_ipw.license_ack=1" .Sh FILES -.Bl -tag -width ".Pa /usr/share/doc/legal/intel_ipw/LICENSE" -compact -.It Pa /usr/share/doc/legal/intel_ipw/LICENSE +.Bl -tag -width ".Pa /usr/share/doc/legal/intel_ipw.LICENSE" -compact +.It Pa /usr/share/doc/legal/intel_ipw.LICENSE .Nm firmware license .El Modified: head/share/man/man4/ipwfw.4 ============================================================================== --- head/share/man/man4/ipwfw.4 Thu Oct 15 23:49:05 2015 (r289398) +++ head/share/man/man4/ipwfw.4 Fri Oct 16 00:38:05 2015 (r289399) @@ -22,7 +22,7 @@ .\" .\" $FreeBSD$ .\" -.Dd January 14, 2010 +.Dd October 15, 2015 .Dt IPWFW 4 .Os .Sh NAME @@ -59,14 +59,14 @@ Intel PRO/Wireless 2100 series of IEEE 8 It may be statically linked into the kernel, or loaded as a module. .Pp For the loaded firmware to be enabled for use the license at -.Pa /usr/share/doc/legal/intel_ipw/LICENSE +.Pa /usr/share/doc/legal/intel_ipw.LICENSE must be agreed to by adding the following line to .Xr loader.conf 5 : .Pp .Dl "legal.intel_ipw.license_ack=1" .Sh FILES -.Bl -tag -width ".Pa /usr/share/doc/legal/intel_ipw/LICENSE" -compact -.It Pa /usr/share/doc/legal/intel_ipw/LICENSE +.Bl -tag -width ".Pa /usr/share/doc/legal/intel_ipw.LICENSE" -compact +.It Pa /usr/share/doc/legal/intel_ipw.LICENSE .Nm firmware license .El Modified: head/share/man/man4/iwi.4 ============================================================================== --- head/share/man/man4/iwi.4 Thu Oct 15 23:49:05 2015 (r289398) +++ head/share/man/man4/iwi.4 Fri Oct 16 00:38:05 2015 (r289399) @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd April 13, 2008 +.Dd October 15, 2015 .Dt IWI 4 .Os .Sh NAME @@ -77,14 +77,14 @@ This driver requires the firmware built .Nm iwifw module to work. For the loaded firmware to be enabled for use the license at -.Pa /usr/share/doc/legal/intel_iwi/LICENSE +.Pa /usr/share/doc/legal/intel_iwi.LICENSE must be agreed by adding the following line to .Xr loader.conf 5 : .Pp .Dl "legal.intel_iwi.license_ack=1" .Sh FILES -.Bl -tag -width ".Pa /usr/share/doc/legal/intel_iwi/LICENSE" -compact -.It Pa /usr/share/doc/legal/intel_iwi/LICENSE +.Bl -tag -width ".Pa /usr/share/doc/legal/intel_iwi.LICENSE" -compact +.It Pa /usr/share/doc/legal/intel_iwi.LICENSE .Nm firmware license .El Modified: head/share/man/man4/iwifw.4 ============================================================================== --- head/share/man/man4/iwifw.4 Thu Oct 15 23:49:05 2015 (r289398) +++ head/share/man/man4/iwifw.4 Fri Oct 16 00:38:05 2015 (r289399) @@ -22,7 +22,7 @@ .\" .\" $FreeBSD$ .\" -.Dd January 14, 2010 +.Dd October 15, 2015 .Dt IWIFW 4 .Os .Sh NAME @@ -59,14 +59,14 @@ Intel PRO/Wireless 2200BG/2225BG/2915ABG It may be statically linked into the kernel, or loaded as a module. .Pp For the loaded firmware to be enabled for use the license at -.Pa /usr/share/doc/legal/intel_iwi/LICENSE +.Pa /usr/share/doc/legal/intel_iwi.LICENSE must be agreed to by adding the following line to .Xr loader.conf 5 : .Pp .Dl "legal.intel_iwi.license_ack=1" .Sh FILES -.Bl -tag -width ".Pa /usr/share/doc/legal/intel_iwi/LICENSE" -compact -.It Pa /usr/share/doc/legal/intel_iwi/LICENSE +.Bl -tag -width ".Pa /usr/share/doc/legal/intel_iwi.LICENSE" -compact +.It Pa /usr/share/doc/legal/intel_iwi.LICENSE .Nm firmware license .El Modified: head/share/man/man4/rsu.4 ============================================================================== --- head/share/man/man4/rsu.4 Thu Oct 15 23:49:05 2015 (r289398) +++ head/share/man/man4/rsu.4 Fri Oct 16 00:38:05 2015 (r289399) @@ -15,7 +15,7 @@ .\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF .\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. .\" -.Dd October 13, 2015 +.Dd October 15, 2015 .Dt RSU 4 .Os .Sh NAME @@ -41,7 +41,7 @@ if_rsu_load="YES" .Ed .Pp After you have read the license in -.Pa /usr/share/doc/legal/realtek +.Pa /usr/share/doc/legal/realtek.LICENSE you will want to add the following lines to .Xr loader.conf 5 : .Bd -literal -offset indent Modified: head/share/man/man4/urtwn.4 ============================================================================== --- head/share/man/man4/urtwn.4 Thu Oct 15 23:49:05 2015 (r289398) +++ head/share/man/man4/urtwn.4 Fri Oct 16 00:38:05 2015 (r289399) @@ -14,7 +14,7 @@ .\" .\" $FreeBSD$ .\" -.Dd October 24, 2014 +.Dd October 15, 2015 .Dt URTWN 4 .Os .Sh NAME @@ -68,14 +68,14 @@ This driver requires the firmware built .Nm urtwnfw module to work. For the loaded firmware to be enabled for use the license at -.Pa /usr/share/doc/legal/realtek +.Pa /usr/share/doc/legal/realtek.LICENSE must be agreed by adding the following line to .Xr loader.conf 5 : .Pp .Dl "legal.realtek.license_ack=1" .Sh FILES -.Bl -tag -width ".Pa /usr/share/doc/legal/realtek" -compact -.It Pa /usr/share/doc/legal/realtek +.Bl -tag -width ".Pa /usr/share/doc/legal/realtek.LICENSE" -compact +.It Pa /usr/share/doc/legal/realtek.LICENSE .Nm firmware license .El Modified: head/share/man/man4/urtwnfw.4 ============================================================================== --- head/share/man/man4/urtwnfw.4 Thu Oct 15 23:49:05 2015 (r289398) +++ head/share/man/man4/urtwnfw.4 Fri Oct 16 00:38:05 2015 (r289399) @@ -22,7 +22,7 @@ .\" .\" $FreeBSD$ .\" -.Dd April 25, 2014 +.Dd October 15, 2015 .Dt URTWNFW 4 .Os .Sh NAME @@ -61,14 +61,14 @@ It may be statically linked into the kernel, or loaded as a module. .Pp For the loaded firmware to be enabled for use the license at -.Pa /usr/share/doc/legal/realtek +.Pa /usr/share/doc/legal/realtek.LICENSE must be agreed to by adding the following line to .Xr loader.conf 5 : .Pp .Dl "legal.realtek.license_ack=1" .Sh FILES -.Bl -tag -width ".Pa /usr/share/doc/legal/realtek" -compact -.It Pa /usr/share/doc/legal/realtek +.Bl -tag -width ".Pa /usr/share/doc/legal/realtek.LICENSE" -compact +.It Pa /usr/share/doc/legal/realtek.LICENSE .Nm firmware license .El Modified: head/share/man/man4/wpi.4 ============================================================================== --- head/share/man/man4/wpi.4 Thu Oct 15 23:49:05 2015 (r289398) +++ head/share/man/man4/wpi.4 Fri Oct 16 00:38:05 2015 (r289399) @@ -26,7 +26,7 @@ .\" .\" $FreeBSD$ .\" -.Dd October 5, 2008 +.Dd October 15, 2015 .Dt WPI 4 .Os .Sh NAME @@ -72,8 +72,8 @@ This driver requires the firmware built .Nm wpifw module to work. .Sh FILES -.Bl -tag -width ".Pa /usr/share/doc/legal/intel_wpi/LICENSE" -compact -.It Pa /usr/share/doc/legal/intel_wpi/LICENSE +.Bl -tag -width ".Pa /usr/share/doc/legal/intel_wpi.LICENSE" -compact +.It Pa /usr/share/doc/legal/intel_wpi.LICENSE .Nm firmware license .El Modified: head/sys/tools/fw_stub.awk ============================================================================== --- head/sys/tools/fw_stub.awk Thu Oct 15 23:49:05 2015 (r289398) +++ head/sys/tools/fw_stub.awk Fri Oct 16 00:38:05 2015 (r289399) @@ -156,7 +156,7 @@ if (opt_l) { printc("\ TUNABLE_LONG_FETCH(\"legal." opt_l ".license_ack\", &" opt_l "_license_ack);\ if (!" opt_l "_license_ack) {\ - printf(\"" opt_m ": You need to read the LICENSE file in /usr/share/doc/legal/" opt_l "/.\\n\");\ + printf(\"" opt_m ": You need to read the LICENSE file in /usr/share/doc/legal/" opt_l ".LICENSE.\\n\");\ printf(\"" opt_m ": If you agree with the license, set legal." opt_l ".license_ack=1 in /boot/loader.conf.\\n\");\ return(EPERM);\ }\n"); From owner-svn-src-all@freebsd.org Fri Oct 16 00:38:24 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0BB7FA16B18; Fri, 16 Oct 2015 00:38:24 +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 E62B187E; Fri, 16 Oct 2015 00:38:23 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from mail.xzibition.com (localhost [IPv6:::1]) by freefall.freebsd.org (Postfix) with ESMTP id DF2271E56; Fri, 16 Oct 2015 00:38:23 +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 9F70B11BB7; Fri, 16 Oct 2015 00:38:23 +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 yLlg30LzAFuJ; Fri, 16 Oct 2015 00:38:21 +0000 (UTC) Subject: Re: svn commit: r289391 - head/share/mk DKIM-Filter: OpenDKIM Filter v2.9.2 mail.xzibition.com F40AD11BB0 To: Don Lewis References: <201510152353.t9FNrRuQ040461@gw.catspoiler.org> Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org From: Bryan Drewery Openpgp: id=F9173CB2C3AAEA7A5C8A1F0935D771BB6E4697CF; url=http://www.shatow.net/bryan/bryan2.asc Organization: FreeBSD Message-ID: <562046FE.1000200@FreeBSD.org> Date: Thu, 15 Oct 2015 17:38:22 -0700 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0 MIME-Version: 1.0 In-Reply-To: <201510152353.t9FNrRuQ040461@gw.catspoiler.org> Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="KGWrFhaTgBOeAiqaCNxm3GwITw6AbGedM" X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Oct 2015 00:38:24 -0000 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --KGWrFhaTgBOeAiqaCNxm3GwITw6AbGedM Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: quoted-printable On 10/15/2015 4:53 PM, Don Lewis wrote: > On 15 Oct, Bryan Drewery wrote: >> On 10/15/2015 3:49 PM, Bryan Drewery wrote: >>> Author: bdrewery >>> Date: Thu Oct 15 22:49:56 2015 >>> New Revision: 289391 >>> URL: https://svnweb.freebsd.org/changeset/base/289391 >>> >>> Log: >>> Make installing to a non-existent directory an error. >> >> >> Sigh - I forgot to test installworld on this. Stupid. >> >> We have a winner too: >> >> =3D=3D=3D> share/doc/legal/intel_iwn (install) >> install -o root -g wheel -m 444 >> /root/svn/base/share/doc/legal/intel_iwn/../../../../sys/contrib/dev/i= wn/LICENSE >> /tmp/blah/usr/share/doc/legal/intel_iwn/ >> install: /tmp/blah/usr/share/doc/legal/intel_iwn/: No such file or dir= ectory >> *** Error code 71 >=20 >=20 > Should the fix include entries in ObsoleteFiles.inc and UPDATING? >=20 >=20 Should all be fixed now. I have to run. --=20 Regards, Bryan Drewery --KGWrFhaTgBOeAiqaCNxm3GwITw6AbGedM 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 iQEcBAEBAgAGBQJWIEb+AAoJEDXXcbtuRpfPHa0H/1x4p48JnDVtzdHyqYzYHN6k PfPSUqKzoR1PAl9w3fLyi3SGioMH3mCYPX7s30KEyFQLQJ4I5xTxMXjs/1jnqhLN bpGQp1jWYJOhBr+A5tb4g9n4vc6BXdVquzUhd6/AwQi6hQvNn14nC75fvCAwOhpo 7tD7LMIV/Z77uE4rlUuJedEhoe/R4E1LHeYOXS4U3+WoYQI3cQUF796yMquMsmeR R+YYOt4ZepPorvcaDwnVDCl831McMu+w/2fhHH2XTJkbjlN1yJsmHLQCmuT3r/s9 mc5OsgNkbGiXe5iSCOeenKsrRrELdBfdd0O4t2slpDTLOxb9Nv/AeB5hXsFn8q8= =fJ21 -----END PGP SIGNATURE----- --KGWrFhaTgBOeAiqaCNxm3GwITw6AbGedM-- From owner-svn-src-all@freebsd.org Fri Oct 16 01:16:02 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id ED985A13034; Fri, 16 Oct 2015 01:16:02 +0000 (UTC) (envelope-from hrs@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B86C01770; Fri, 16 Oct 2015 01:16:02 +0000 (UTC) (envelope-from hrs@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t9G1G1Ng016721; Fri, 16 Oct 2015 01:16:01 GMT (envelope-from hrs@FreeBSD.org) Received: (from hrs@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9G1G1eY016720; Fri, 16 Oct 2015 01:16:01 GMT (envelope-from hrs@FreeBSD.org) Message-Id: <201510160116.t9G1G1eY016720@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hrs set sender to hrs@FreeBSD.org using -f From: Hiroki Sato Date: Fri, 16 Oct 2015 01:16:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289400 - head/sys/net X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Oct 2015 01:16:03 -0000 Author: hrs Date: Fri Oct 16 01:16:01 2015 New Revision: 289400 URL: https://svnweb.freebsd.org/changeset/base/289400 Log: Fix a panic when destroying a lagg interface. Differential Revision: https://reviews.freebsd.org/D3883 Modified: head/sys/net/if_lagg.c Modified: head/sys/net/if_lagg.c ============================================================================== --- head/sys/net/if_lagg.c Fri Oct 16 00:38:05 2015 (r289399) +++ head/sys/net/if_lagg.c Fri Oct 16 01:16:01 2015 (r289400) @@ -916,7 +916,8 @@ lagg_port_destroy(struct lagg_port *lp, * iflladdr_event. */ sc->sc_primary = lp0; - lagg_port_lladdr(lp0, lladdr); + if (lp0 != NULL) + lagg_port_lladdr(lp0, lladdr); } /* Remove any pending lladdr changes from the queue */ From owner-svn-src-all@freebsd.org Fri Oct 16 01:19:57 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 28230A130B0; Fri, 16 Oct 2015 01:19:57 +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 D86751957; Fri, 16 Oct 2015 01:19:56 +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 t9G1Jtt0016878; Fri, 16 Oct 2015 01:19:55 GMT (envelope-from np@FreeBSD.org) Received: (from np@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9G1JtrY016876; Fri, 16 Oct 2015 01:19:55 GMT (envelope-from np@FreeBSD.org) Message-Id: <201510160119.t9G1JtrY016876@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: np set sender to np@FreeBSD.org using -f From: Navdeep Parhar Date: Fri, 16 Oct 2015 01:19:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289401 - in head/sys: dev/cxgbe modules/cxgbe/if_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 " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Oct 2015 01:19:57 -0000 Author: np Date: Fri Oct 16 01:19:55 2015 New Revision: 289401 URL: https://svnweb.freebsd.org/changeset/base/289401 Log: cxgbe(4): support for the kernel RSS option. You need PCBGROUP and RSS in the kernel config to use this. Relnotes: Yes Sponsored by: Chelsio Communications Modified: head/sys/dev/cxgbe/t4_main.c head/sys/modules/cxgbe/if_cxgbe/Makefile Modified: head/sys/dev/cxgbe/t4_main.c ============================================================================== --- head/sys/dev/cxgbe/t4_main.c Fri Oct 16 01:16:01 2015 (r289400) +++ head/sys/dev/cxgbe/t4_main.c Fri Oct 16 01:19:55 2015 (r289401) @@ -30,6 +30,7 @@ __FBSDID("$FreeBSD$"); #include "opt_inet.h" #include "opt_inet6.h" +#include "opt_rss.h" #include #include @@ -55,6 +56,9 @@ __FBSDID("$FreeBSD$"); #include #include #include +#ifdef RSS +#include +#endif #if defined(__i386__) || defined(__amd64__) #include #include @@ -3464,6 +3468,71 @@ adapter_full_uninit(struct adapter *sc) return (0); } +#ifdef RSS +#define SUPPORTED_RSS_HASHTYPES (RSS_HASHTYPE_RSS_IPV4 | \ + RSS_HASHTYPE_RSS_TCP_IPV4 | RSS_HASHTYPE_RSS_IPV6 | \ + RSS_HASHTYPE_RSS_TCP_IPV6 | RSS_HASHTYPE_RSS_UDP_IPV4 | \ + RSS_HASHTYPE_RSS_UDP_IPV6) + +/* Translates kernel hash types to hardware. */ +static int +hashconfig_to_hashen(int hashconfig) +{ + int hashen = 0; + + if (hashconfig & RSS_HASHTYPE_RSS_IPV4) + hashen |= F_FW_RSS_VI_CONFIG_CMD_IP4TWOTUPEN; + if (hashconfig & RSS_HASHTYPE_RSS_IPV6) + hashen |= F_FW_RSS_VI_CONFIG_CMD_IP6TWOTUPEN; + if (hashconfig & RSS_HASHTYPE_RSS_UDP_IPV4) { + hashen |= F_FW_RSS_VI_CONFIG_CMD_UDPEN | + F_FW_RSS_VI_CONFIG_CMD_IP4FOURTUPEN; + } + if (hashconfig & RSS_HASHTYPE_RSS_UDP_IPV6) { + hashen |= F_FW_RSS_VI_CONFIG_CMD_UDPEN | + F_FW_RSS_VI_CONFIG_CMD_IP6FOURTUPEN; + } + if (hashconfig & RSS_HASHTYPE_RSS_TCP_IPV4) + hashen |= F_FW_RSS_VI_CONFIG_CMD_IP4FOURTUPEN; + if (hashconfig & RSS_HASHTYPE_RSS_TCP_IPV6) + hashen |= F_FW_RSS_VI_CONFIG_CMD_IP6FOURTUPEN; + + return (hashen); +} + +/* Translates hardware hash types to kernel. */ +static int +hashen_to_hashconfig(int hashen) +{ + int hashconfig = 0; + + if (hashen & F_FW_RSS_VI_CONFIG_CMD_UDPEN) { + /* + * If UDP hashing was enabled it must have been enabled for + * either IPv4 or IPv6 (inclusive or). Enabling UDP without + * enabling any 4-tuple hash is nonsense configuration. + */ + MPASS(hashen & (F_FW_RSS_VI_CONFIG_CMD_IP4FOURTUPEN | + F_FW_RSS_VI_CONFIG_CMD_IP6FOURTUPEN)); + + if (hashen & F_FW_RSS_VI_CONFIG_CMD_IP4FOURTUPEN) + hashconfig |= RSS_HASHTYPE_RSS_UDP_IPV4; + if (hashen & F_FW_RSS_VI_CONFIG_CMD_IP6FOURTUPEN) + hashconfig |= RSS_HASHTYPE_RSS_UDP_IPV6; + } + if (hashen & F_FW_RSS_VI_CONFIG_CMD_IP4FOURTUPEN) + hashconfig |= RSS_HASHTYPE_RSS_TCP_IPV4; + if (hashen & F_FW_RSS_VI_CONFIG_CMD_IP6FOURTUPEN) + hashconfig |= RSS_HASHTYPE_RSS_TCP_IPV6; + if (hashen & F_FW_RSS_VI_CONFIG_CMD_IP4TWOTUPEN) + hashconfig |= RSS_HASHTYPE_RSS_IPV4; + if (hashen & F_FW_RSS_VI_CONFIG_CMD_IP6TWOTUPEN) + hashconfig |= RSS_HASHTYPE_RSS_IPV6; + + return (hashconfig); +} +#endif + int port_full_init(struct port_info *pi) { @@ -3471,7 +3540,14 @@ port_full_init(struct port_info *pi) struct ifnet *ifp = pi->ifp; uint16_t *rss; struct sge_rxq *rxq; - int rc, i, j; + int rc, i, j, hashen; +#ifdef RSS + int nbuckets = rss_getnumbuckets(); + int hashconfig = rss_gethashconfig(); + int extra; + uint32_t raw_rss_key[RSS_KEYSIZE / sizeof(uint32_t)]; + uint32_t rss_key[RSS_KEYSIZE / sizeof(uint32_t)]; +#endif ASSERT_SYNCHRONIZED_OP(sc); KASSERT((pi->flags & PORT_INIT_DONE) == 0, @@ -3490,13 +3566,42 @@ port_full_init(struct port_info *pi) /* * Setup RSS for this port. Save a copy of the RSS table for later use. */ + if (pi->nrxq > pi->rss_size) { + if_printf(ifp, "nrxq (%d) > hw RSS table size (%d); " + "some queues will never receive traffic.\n", pi->nrxq, + pi->rss_size); + } else if (pi->rss_size % pi->nrxq) { + if_printf(ifp, "nrxq (%d), hw RSS table size (%d); " + "expect uneven traffic distribution.\n", pi->nrxq, + pi->rss_size); + } +#ifdef RSS + MPASS(RSS_KEYSIZE == 40); + if (pi->nrxq != nbuckets) { + if_printf(ifp, "nrxq (%d) != kernel RSS buckets (%d);" + "performance will be impacted.\n", pi->nrxq, nbuckets); + } + + rss_getkey((void *)&raw_rss_key[0]); + for (i = 0; i < nitems(rss_key); i++) { + rss_key[i] = htobe32(raw_rss_key[nitems(rss_key) - 1 - i]); + } + t4_write_rss_key(sc, (void *)&rss_key[0], -1); +#endif rss = malloc(pi->rss_size * sizeof (*rss), M_CXGBE, M_ZERO | M_WAITOK); for (i = 0; i < pi->rss_size;) { +#ifdef RSS + j = rss_get_indirection_to_bucket(i); + j %= pi->nrxq; + rxq = &sc->sge.rxq[pi->first_rxq + j]; + rss[i++] = rxq->iq.abs_id; +#else for_each_rxq(pi, j, rxq) { rss[i++] = rxq->iq.abs_id; if (i == pi->rss_size) break; } +#endif } rc = -t4_config_rss_range(sc, sc->mbox, pi->viid, 0, pi->rss_size, rss, @@ -3506,6 +3611,54 @@ port_full_init(struct port_info *pi) goto done; } +#ifdef RSS + hashen = hashconfig_to_hashen(hashconfig); + + /* + * We may have had to enable some hashes even though the global config + * wants them disabled. This is a potential problem that must be + * reported to the user. + */ + extra = hashen_to_hashconfig(hashen) ^ hashconfig; + + /* + * If we consider only the supported hash types, then the enabled hashes + * are a superset of the requested hashes. In other words, there cannot + * be any supported hash that was requested but not enabled, but there + * can be hashes that were not requested but had to be enabled. + */ + extra &= SUPPORTED_RSS_HASHTYPES; + MPASS((extra & hashconfig) == 0); + + if (extra) { + if_printf(ifp, + "global RSS config (0x%x) cannot be accomodated.\n", + hashconfig); + } + if (extra & RSS_HASHTYPE_RSS_IPV4) + if_printf(ifp, "IPv4 2-tuple hashing forced on.\n"); + if (extra & RSS_HASHTYPE_RSS_TCP_IPV4) + if_printf(ifp, "TCP/IPv4 4-tuple hashing forced on.\n"); + if (extra & RSS_HASHTYPE_RSS_IPV6) + if_printf(ifp, "IPv6 2-tuple hashing forced on.\n"); + if (extra & RSS_HASHTYPE_RSS_TCP_IPV6) + if_printf(ifp, "TCP/IPv6 4-tuple hashing forced on.\n"); + if (extra & RSS_HASHTYPE_RSS_UDP_IPV4) + if_printf(ifp, "UDP/IPv4 4-tuple hashing forced on.\n"); + if (extra & RSS_HASHTYPE_RSS_UDP_IPV6) + if_printf(ifp, "UDP/IPv6 4-tuple hashing forced on.\n"); +#else + hashen = F_FW_RSS_VI_CONFIG_CMD_IP6FOURTUPEN | + F_FW_RSS_VI_CONFIG_CMD_IP6TWOTUPEN | + F_FW_RSS_VI_CONFIG_CMD_IP4FOURTUPEN | + F_FW_RSS_VI_CONFIG_CMD_IP4TWOTUPEN | F_FW_RSS_VI_CONFIG_CMD_UDPEN; +#endif + rc = -t4_config_vi_rss(sc, sc->mbox, pi->viid, hashen, rss[0]); + if (rc != 0) { + if_printf(ifp, "rss hash/defaultq config failed: %d\n", rc); + goto done; + } + pi->rss = rss; pi->flags |= PORT_INIT_DONE; done: @@ -8380,17 +8533,39 @@ tweak_tunables(void) { int nc = mp_ncpus; /* our snapshot of the number of CPUs */ - if (t4_ntxq10g < 1) + if (t4_ntxq10g < 1) { +#ifdef RSS + t4_ntxq10g = rss_getnumbuckets(); +#else t4_ntxq10g = min(nc, NTXQ_10G); +#endif + } - if (t4_ntxq1g < 1) + if (t4_ntxq1g < 1) { +#ifdef RSS + /* XXX: way too many for 1GbE? */ + t4_ntxq1g = rss_getnumbuckets(); +#else t4_ntxq1g = min(nc, NTXQ_1G); +#endif + } - if (t4_nrxq10g < 1) + if (t4_nrxq10g < 1) { +#ifdef RSS + t4_nrxq10g = rss_getnumbuckets(); +#else t4_nrxq10g = min(nc, NRXQ_10G); +#endif + } - if (t4_nrxq1g < 1) + if (t4_nrxq1g < 1) { +#ifdef RSS + /* XXX: way too many for 1GbE? */ + t4_nrxq1g = rss_getnumbuckets(); +#else t4_nrxq1g = min(nc, NRXQ_1G); +#endif + } #ifdef TCP_OFFLOAD if (t4_nofldtxq10g < 1) Modified: head/sys/modules/cxgbe/if_cxgbe/Makefile ============================================================================== --- head/sys/modules/cxgbe/if_cxgbe/Makefile Fri Oct 16 01:16:01 2015 (r289400) +++ head/sys/modules/cxgbe/if_cxgbe/Makefile Fri Oct 16 01:19:55 2015 (r289401) @@ -11,6 +11,7 @@ SRCS+= device_if.h SRCS+= opt_inet.h SRCS+= opt_inet6.h SRCS+= opt_ofed.h +SRCS+= opt_rss.h SRCS+= pci_if.h SRCS+= t4_hw.c SRCS+= t4_l2t.c From owner-svn-src-all@freebsd.org Fri Oct 16 01:23:43 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 16EE4A13248; Fri, 16 Oct 2015 01:23:43 +0000 (UTC) (envelope-from cperciva@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B9B9F1D02; Fri, 16 Oct 2015 01:23:42 +0000 (UTC) (envelope-from cperciva@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t9G1NfwL019597; Fri, 16 Oct 2015 01:23:41 GMT (envelope-from cperciva@FreeBSD.org) Received: (from cperciva@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9G1NfJf019595; Fri, 16 Oct 2015 01:23:41 GMT (envelope-from cperciva@FreeBSD.org) Message-Id: <201510160123.t9G1NfJf019595@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cperciva set sender to cperciva@FreeBSD.org using -f From: Colin Percival Date: Fri, 16 Oct 2015 01:23: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: r289402 - stable/10/usr.sbin/freebsd-update 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 " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Oct 2015 01:23:43 -0000 Author: cperciva Date: Fri Oct 16 01:23:41 2015 New Revision: 289402 URL: https://svnweb.freebsd.org/changeset/base/289402 Log: MFC r289065: Add --currently-running option to freebsd-update. Modified: stable/10/usr.sbin/freebsd-update/freebsd-update.8 stable/10/usr.sbin/freebsd-update/freebsd-update.sh Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.sbin/freebsd-update/freebsd-update.8 ============================================================================== --- stable/10/usr.sbin/freebsd-update/freebsd-update.8 Fri Oct 16 01:19:55 2015 (r289401) +++ stable/10/usr.sbin/freebsd-update/freebsd-update.8 Fri Oct 16 01:23:41 2015 (r289402) @@ -113,6 +113,11 @@ Please do not run .Nm Cm fetch from crontab or similar using this flag, see: .Nm Cm cron +.It Fl -currently-running Ar release +Don't detect the currently-running release; instead, assume that the +system is running the specified +.Ar release . +This is most likely to be useful when upgrading jails. .El .Sh COMMANDS The Modified: stable/10/usr.sbin/freebsd-update/freebsd-update.sh ============================================================================== --- stable/10/usr.sbin/freebsd-update/freebsd-update.sh Fri Oct 16 01:19:55 2015 (r289401) +++ stable/10/usr.sbin/freebsd-update/freebsd-update.sh Fri Oct 16 01:23:41 2015 (r289402) @@ -52,6 +52,8 @@ Options: (default: root) --not-running-from-cron -- Run without a tty, for use by automated tools + --currently-running release + -- Update as if currently running this release Commands: fetch -- Fetch updates from server cron -- Sleep rand(3600) seconds, fetch updates, and send an @@ -434,6 +436,9 @@ parse_cmdline () { --not-running-from-cron) NOTTYOK=1 ;; + --currently-running) + shift; export UNAME_r="$1" + ;; # Configuration file equivalents -b) From owner-svn-src-all@freebsd.org Fri Oct 16 01:26:28 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0C751A13338 for ; Fri, 16 Oct 2015 01:26:28 +0000 (UTC) (envelope-from ian@freebsd.org) Received: from outbound1b.ore.mailhop.org (outbound1b.ore.mailhop.org [54.200.247.200]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id DEBD91EAD for ; Fri, 16 Oct 2015 01:26:27 +0000 (UTC) (envelope-from ian@freebsd.org) Received: from ilsoft.org (unknown [73.34.117.227]) by outbound1.ore.mailhop.org (Halon Mail Gateway) with ESMTPSA; Fri, 16 Oct 2015 01:26:33 +0000 (UTC) Received: from rev (rev [172.22.42.240]) by ilsoft.org (8.14.9/8.14.9) with ESMTP id t9G1QOqA002321; Thu, 15 Oct 2015 19:26:24 -0600 (MDT) (envelope-from ian@freebsd.org) Message-ID: <1444958784.71631.14.camel@freebsd.org> Subject: Re: svn commit: r289393 - in head: bin/sh/tests cddl etc/periodic gnu gnu/lib gnu/usr.bin/cc gnu/usr.bin/groff gnu/usr.bin/rcs include lib/libiconv_modules secure secure/libexec secure/usr.bin secure/u... From: Ian Lepore To: Bryan Drewery , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Date: Thu, 15 Oct 2015 19:26:24 -0600 In-Reply-To: <56204674.3040502@FreeBSD.org> References: <201510152255.t9FMt8aK075575@repo.freebsd.org> <562038BC.4040606@FreeBSD.org> <56203BF5.5040408@FreeBSD.org> <1444955524.71631.6.camel@freebsd.org> <56204674.3040502@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 " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Oct 2015 01:26:28 -0000 On Thu, 2015-10-15 at 17:36 -0700, Bryan Drewery wrote: > On 10/15/2015 5:32 PM, Ian Lepore wrote: > > On Thu, 2015-10-15 at 16:51 -0700, Bryan Drewery wrote: > > > On 10/15/2015 4:37 PM, Bryan Drewery wrote: > > > > On 10/15/2015 3:55 PM, Bryan Drewery wrote: > > > > > Author: bdrewery > > > > > Date: Thu Oct 15 22:55:08 2015 > > > > > New Revision: 289393 > > > > > URL: https://svnweb.freebsd.org/changeset/base/289393 > > > > > > > > > > Log: > > > > > Add more SUBDIR_PARALLEL. > > > > > > > > > > MFC after: 3 weeks > > > > > Sponsored by: EMC / Isilon Storage Division > > > > > > > > I forgot to test installworld with -j. It appears there is an > > > > issue > > > > there. I will look into it later tonight. > > > > > > > > > > OK it is fine. The issue was missing directories in > > > etc/mtree/BSD.usr.dist. Resolved. > > > > > > I should mention too that soon I expect these SUBDIR_PARALLEL to > > > come > > > out and be replaced with NO_SUBDIR_PARALLEL where needed. > > > > > > > That seems to imply that the default is going to flip to always > > building parallel unless it's supressed by specific makefiles. > > > > Yes. It will be safe to do so if building in the src tree, but not > when > building outside of the src tree. I'm not sure what you mean by that. It's going to break anybody who uses the freebsd machinery to build code other than /usr/src and has embraced the SUBDIR_PARALLEL thing, is that what you mean? -- Ian From owner-svn-src-all@freebsd.org Fri Oct 16 01:31:39 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 57127A13532; Fri, 16 Oct 2015 01:31: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 23BB934B; Fri, 16 Oct 2015 01:31: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 t9G1Vcw4022439; Fri, 16 Oct 2015 01:31:38 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9G1VcvQ022438; Fri, 16 Oct 2015 01:31:38 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201510160131.t9G1VcvQ022438@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Fri, 16 Oct 2015 01:31:38 +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: r289403 - 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 " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Oct 2015 01:31:39 -0000 Author: emaste Date: Fri Oct 16 01:31:38 2015 New Revision: 289403 URL: https://svnweb.freebsd.org/changeset/base/289403 Log: MFC r289070: Add .gnu.versym VERSYM_HIDDEN flag and related mask Sponsored by: The FreeBSD Foundation Modified: stable/10/sys/sys/elf_common.h Modified: stable/10/sys/sys/elf_common.h ============================================================================== --- stable/10/sys/sys/elf_common.h Fri Oct 16 01:23:41 2015 (r289402) +++ stable/10/sys/sys/elf_common.h Fri Oct 16 01:31:38 2015 (r289403) @@ -336,6 +336,12 @@ typedef struct { /* Flags for section groups. */ #define GRP_COMDAT 0x1 /* COMDAT semantics. */ +/* + * Flags / mask for .gnu.versym sections. + */ +#define VERSYM_VERSION 0x7fff +#define VERSYM_HIDDEN 0x8000 + /* Values for p_type. */ #define PT_NULL 0 /* Unused entry. */ #define PT_LOAD 1 /* Loadable segment. */ From owner-svn-src-all@freebsd.org Fri Oct 16 02:30:59 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 052A8A15015; Fri, 16 Oct 2015 02:30:59 +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 DB9371920; Fri, 16 Oct 2015 02:30:58 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from mail.xzibition.com (localhost [IPv6:::1]) by freefall.freebsd.org (Postfix) with ESMTP id D46FF1015; Fri, 16 Oct 2015 02:30:58 +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 A478711D7B; Fri, 16 Oct 2015 02:30:58 +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 aBlZCl6h1gwU; Fri, 16 Oct 2015 02:30:55 +0000 (UTC) Subject: Re: svn commit: r289393 - in head: bin/sh/tests cddl etc/periodic gnu gnu/lib gnu/usr.bin/cc gnu/usr.bin/groff gnu/usr.bin/rcs include lib/libiconv_modules secure secure/libexec secure/usr.bin secure/u... DKIM-Filter: OpenDKIM Filter v2.9.2 mail.xzibition.com 2AD5A11D75 To: Ian Lepore , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201510152255.t9FMt8aK075575@repo.freebsd.org> <562038BC.4040606@FreeBSD.org> <56203BF5.5040408@FreeBSD.org> <1444955524.71631.6.camel@freebsd.org> <56204674.3040502@FreeBSD.org> <1444958784.71631.14.camel@freebsd.org> From: Bryan Drewery Openpgp: id=F9173CB2C3AAEA7A5C8A1F0935D771BB6E4697CF; url=http://www.shatow.net/bryan/bryan2.asc Organization: FreeBSD Message-ID: <5620615E.2080901@FreeBSD.org> Date: Thu, 15 Oct 2015 19:30:54 -0700 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0 MIME-Version: 1.0 In-Reply-To: <1444958784.71631.14.camel@freebsd.org> Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="V4kdb6p5sDL54KV0ee7M8DexlB11WQ1Ql" X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Oct 2015 02:30:59 -0000 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --V4kdb6p5sDL54KV0ee7M8DexlB11WQ1Ql Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: quoted-printable On 10/15/2015 6:26 PM, Ian Lepore wrote: > On Thu, 2015-10-15 at 17:36 -0700, Bryan Drewery wrote: >> On 10/15/2015 5:32 PM, Ian Lepore wrote: >>> On Thu, 2015-10-15 at 16:51 -0700, Bryan Drewery wrote: >>>> On 10/15/2015 4:37 PM, Bryan Drewery wrote: >>>>> On 10/15/2015 3:55 PM, Bryan Drewery wrote: >>>>>> Author: bdrewery >>>>>> Date: Thu Oct 15 22:55:08 2015 >>>>>> New Revision: 289393 >>>>>> URL: https://svnweb.freebsd.org/changeset/base/289393 >>>>>> >>>>>> Log: >>>>>> Add more SUBDIR_PARALLEL. >>>>>> =20 >>>>>> MFC after: 3 weeks >>>>>> Sponsored by: EMC / Isilon Storage Division >>>>> >>>>> I forgot to test installworld with -j. It appears there is an >>>>> issue >>>>> there. I will look into it later tonight. >>>>> >>>> >>>> OK it is fine. The issue was missing directories in >>>> etc/mtree/BSD.usr.dist. Resolved. >>>> >>>> I should mention too that soon I expect these SUBDIR_PARALLEL to >>>> come >>>> out and be replaced with NO_SUBDIR_PARALLEL where needed. >>>> >>> >>> That seems to imply that the default is going to flip to always >>> building parallel unless it's supressed by specific makefiles. >>> >> >> Yes. It will be safe to do so if building in the src tree, but not >> when >> building outside of the src tree. >=20 > I'm not sure what you mean by that. It's going to break anybody who > uses the freebsd machinery to build code other than /usr/src and has > embraced the SUBDIR_PARALLEL thing, is that what you mean? >=20 Sorry, I realized after sending that it may have been unclear. Yes it would not be safe to force this feature on some build that is not actually /usr/src, but is just some program that is using /usr/share/mk. So this on-by-default feature would only apply to src builds. We have the power to ensure features are limited to in-tree /usr/src builds. --=20 Regards, Bryan Drewery --V4kdb6p5sDL54KV0ee7M8DexlB11WQ1Ql 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 iQEcBAEBAgAGBQJWIGFfAAoJEDXXcbtuRpfPIFsH/RESyw0rILEmbPuhZ0JX4Lpl 2xh2+c+GUotCOHQzSO+VLs8oVERf+dy+lpSL8LpYxsCme6P2BC/cKSbu34Ut9ZfJ ngWspQDI/c3t2w863u9eSrPFM9FrFHQy4exWpADRByg4pLIE6CIb2++QC3WmOT7i l0A0JMLFKIpiGlumD5tGSHPnjnY0F0I47GSy293W0H0khjuBV96Dtb8UYpwabsAd CViFESt4GKsmFGxFBeylb8kwABt9vNDR+doIYYhvX6XV8AHRCwo5E7UTUyPPFOQq jwVAmaHeGqr+kyuCG9UK0vKLlRFVPTNnC5m+XaJLPKVb4KY4fLVS2w2b624B6Rc= =MCH+ -----END PGP SIGNATURE----- --V4kdb6p5sDL54KV0ee7M8DexlB11WQ1Ql-- From owner-svn-src-all@freebsd.org Fri Oct 16 03:06:04 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 22A41A15812; Fri, 16 Oct 2015 03:06:04 +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 E18B4D1B; Fri, 16 Oct 2015 03:06:03 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t9G362cq049129; Fri, 16 Oct 2015 03:06:02 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9G3622O049128; Fri, 16 Oct 2015 03:06:02 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201510160306.t9G3622O049128@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Fri, 16 Oct 2015 03:06:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289405 - head/sys/ufs/ffs X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Oct 2015 03:06:04 -0000 Author: imp Date: Fri Oct 16 03:06:02 2015 New Revision: 289405 URL: https://svnweb.freebsd.org/changeset/base/289405 Log: Do not relocate extents to make them contiguous if the underlying drive can do deletions. Ability to do deletions is a strong indication that this optimization will not help performance. It will only generate extra write traffic. These devices are typically flash based and have a limited number of write cycles. In addition, making the file contiguous in LBA space doesn't improve the access times from flash devices because they have no seek time. Reviewed by: mckusick@ Modified: head/sys/ufs/ffs/ffs_alloc.c Modified: head/sys/ufs/ffs/ffs_alloc.c ============================================================================== --- head/sys/ufs/ffs/ffs_alloc.c Fri Oct 16 03:03:04 2015 (r289404) +++ head/sys/ufs/ffs/ffs_alloc.c Fri Oct 16 03:06:02 2015 (r289405) @@ -481,9 +481,19 @@ ffs_reallocblks(ap) struct cluster_save *a_buflist; } */ *ap; { + struct ufsmount *ump; - if (doreallocblks == 0) + /* + * If the underlying device can do deletes, then skip reallocating + * the blocks of this file into contiguous sequences. Devices that + * benefit from BIO_DELETE also benefit from not moving the data. + * These devices are flash and therefore work less well with this + * optimization. Also skip if reallocblks has been disabled globally. + */ + ump = VTOI(ap->a_vp)->i_ump; + if (ump->um_candelete || doreallocblks == 0) return (ENOSPC); + /* * We can't wait in softdep prealloc as it may fsync and recurse * here. Instead we simply fail to reallocate blocks if this @@ -492,7 +502,7 @@ ffs_reallocblks(ap) if (DOINGSOFTDEP(ap->a_vp)) if (softdep_prealloc(ap->a_vp, MNT_NOWAIT) != 0) return (ENOSPC); - if (VTOI(ap->a_vp)->i_ump->um_fstype == UFS1) + if (ump->um_fstype == UFS1) return (ffs_reallocblks_ufs1(ap)); return (ffs_reallocblks_ufs2(ap)); } From owner-svn-src-all@freebsd.org Fri Oct 16 04:07:29 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 040B8A164C4; Fri, 16 Oct 2015 04:07:29 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id BCE25A85; Fri, 16 Oct 2015 04:07:28 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t9G47RfB066657; Fri, 16 Oct 2015 04:07:27 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9G47RjY066656; Fri, 16 Oct 2015 04:07:27 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201510160407.t9G47RjY066656@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Fri, 16 Oct 2015 04:07:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289407 - 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 " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Oct 2015 04:07:29 -0000 Author: bdrewery Date: Fri Oct 16 04:07:27 2015 New Revision: 289407 URL: https://svnweb.freebsd.org/changeset/base/289407 Log: Fix delete-old and check-old-files not removing old debug symbols. This was handled for libraries in r256842 but for some reason was missed for files (bsd.prog.mk). MFC after: 1 week Sponsored by: EMC / Isilon Storage Division Relnotes: yes Modified: head/Makefile.inc1 Modified: head/Makefile.inc1 ============================================================================== --- head/Makefile.inc1 Fri Oct 16 03:21:24 2015 (r289406) +++ head/Makefile.inc1 Fri Oct 16 04:07:27 2015 (r289407) @@ -1996,6 +1996,13 @@ delete-old-files: chflags noschg "${DESTDIR}/$${file}" 2>/dev/null || true; \ rm ${RM_I} "${DESTDIR}/$${file}" <&3; \ fi; \ + for ext in debug symbols; do \ + if ! [ -e "${DESTDIR}/$${file}" ] && [ -f \ + "${DESTDIR}${DEBUGDIR}/$${file}.$${ext}" ]; then \ + rm ${RM_I} "${DESTDIR}${DEBUGDIR}/$${file}.$${ext}" \ + <&3; \ + fi; \ + done; \ done # Remove catpages without corresponding manpages. @exec 3<&0; \ @@ -2018,6 +2025,11 @@ check-old-files: if [ -f "${DESTDIR}/$${file}" -o -L "${DESTDIR}/$${file}" ]; then \ echo "${DESTDIR}/$${file}"; \ fi; \ + for ext in debug symbols; do \ + if [ -f "${DESTDIR}${DEBUGDIR}/$${file}.$${ext}" ]; then \ + echo "${DESTDIR}${DEBUGDIR}/$${file}.$${ext}"; \ + fi; \ + done; \ done # Check for catpages without corresponding manpages. @find ${DESTDIR}/usr/share/man/cat* ! -type d | \ From owner-svn-src-all@freebsd.org Fri Oct 16 05:06:44 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id AC433A16DBB; Fri, 16 Oct 2015 05:06: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 7A0F5C0; Fri, 16 Oct 2015 05:06: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 t9G56hro083984; Fri, 16 Oct 2015 05:06:43 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9G56h14083983; Fri, 16 Oct 2015 05:06:43 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201510160506.t9G56h14083983@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Fri, 16 Oct 2015 05:06:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289408 - 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 " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Oct 2015 05:06:44 -0000 Author: bdrewery Date: Fri Oct 16 05:06:43 2015 New Revision: 289408 URL: https://svnweb.freebsd.org/changeset/base/289408 Log: Similar to r289355, /usr/tests is within the base system so put the symbols into /usr/lib/debug. This covers some missing files: /usr/tests/libexec/rtld-elf/.debug /usr/tests/libexec/rtld-elf/.debug/libpythagoras.so.0.debug /usr/tests/lib/libc/tls/.debug /usr/tests/lib/libc/tls/.debug/libh_tls_dynamic.so.1.debug /usr/tests/lib/libc/tls/.debug/h_tls_dlopen.so.debug /usr/tests/lib/libthr/dlopen/.debug /usr/tests/lib/libthr/dlopen/.debug/h_pthread_dlopen.so.1.debug /usr/tests/lib/libxo/.debug /usr/tests/lib/libxo/.debug/libenc_test.so.debug 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 Fri Oct 16 04:07:27 2015 (r289407) +++ head/share/mk/bsd.lib.mk Fri Oct 16 05:06:43 2015 (r289408) @@ -140,7 +140,7 @@ SHLIB_NAME_FULL=${SHLIB_NAME}.full # Use ${DEBUGDIR} for base system debug files, else .debug subdirectory .if ${_SHLIBDIR} == "/boot" ||\ ${SHLIBDIR:C%/lib(/.*)?$%/lib%} == "/lib" ||\ - ${SHLIBDIR:C%/usr/lib(32)?(/.*)?%/usr/lib%} == "/usr/lib" + ${SHLIBDIR:C%/usr/(tests/)?lib(32|exec)?(/.*)?%/usr/lib%} == "/usr/lib" DEBUGFILEDIR=${DEBUGDIR}${_SHLIBDIR} .else DEBUGFILEDIR=${_SHLIBDIR}/.debug From owner-svn-src-all@freebsd.org Fri Oct 16 05:13:23 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 15D02A16FEB; Fri, 16 Oct 2015 05:13:23 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D1E5483D; Fri, 16 Oct 2015 05:13:22 +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 t9G5DLKX086780; Fri, 16 Oct 2015 05:13:21 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9G5DLY2086779; Fri, 16 Oct 2015 05:13:21 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201510160513.t9G5DLY2086779@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Fri, 16 Oct 2015 05:13:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289409 - 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 " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Oct 2015 05:13:23 -0000 Author: bdrewery Date: Fri Oct 16 05:13:21 2015 New Revision: 289409 URL: https://svnweb.freebsd.org/changeset/base/289409 Log: Add entries for moved test symbols for r289355 and r289330. This list is likely not complete. Sponsored by: EMC / Isilon Storage Division Modified: head/ObsoleteFiles.inc Modified: head/ObsoleteFiles.inc ============================================================================== --- head/ObsoleteFiles.inc Fri Oct 16 05:06:43 2015 (r289408) +++ head/ObsoleteFiles.inc Fri Oct 16 05:13:21 2015 (r289409) @@ -38,6 +38,397 @@ # xargs -n1 | sort | uniq -d; # done +# 20151015: test symbols moved to /usr/lib/debug +OLD_DIRS+=usr/tests/lib/atf/libatf-c++/.debug +OLD_FILES+=usr/tests/lib/atf/libatf-c++/.debug/atf_c++_test.debug +OLD_FILES+=usr/tests/lib/atf/libatf-c++/.debug/build_test.debug +OLD_FILES+=usr/tests/lib/atf/libatf-c++/.debug/check_test.debug +OLD_FILES+=usr/tests/lib/atf/libatf-c++/.debug/config_test.debug +OLD_FILES+=usr/tests/lib/atf/libatf-c++/.debug/macros_test.debug +OLD_FILES+=usr/tests/lib/atf/libatf-c++/.debug/tests_test.debug +OLD_FILES+=usr/tests/lib/atf/libatf-c++/.debug/utils_test.debug +OLD_DIRS+=usr/tests/lib/atf/libatf-c++/detail/.debug +OLD_FILES+=usr/tests/lib/atf/libatf-c++/detail/.debug/application_test.debug +OLD_FILES+=usr/tests/lib/atf/libatf-c++/detail/.debug/env_test.debug +OLD_FILES+=usr/tests/lib/atf/libatf-c++/detail/.debug/exceptions_test.debug +OLD_FILES+=usr/tests/lib/atf/libatf-c++/detail/.debug/fs_test.debug +OLD_FILES+=usr/tests/lib/atf/libatf-c++/detail/.debug/process_test.debug +OLD_FILES+=usr/tests/lib/atf/libatf-c++/detail/.debug/sanity_test.debug +OLD_FILES+=usr/tests/lib/atf/libatf-c++/detail/.debug/text_test.debug +OLD_FILES+=usr/tests/lib/atf/libatf-c++/detail/.debug/version_helper.debug +OLD_DIRS+=usr/tests/lib/atf/libatf-c/.debug +OLD_FILES+=usr/tests/lib/atf/libatf-c/.debug/atf_c_test.debug +OLD_FILES+=usr/tests/lib/atf/libatf-c/.debug/build_test.debug +OLD_FILES+=usr/tests/lib/atf/libatf-c/.debug/check_test.debug +OLD_FILES+=usr/tests/lib/atf/libatf-c/.debug/config_test.debug +OLD_FILES+=usr/tests/lib/atf/libatf-c/.debug/error_test.debug +OLD_FILES+=usr/tests/lib/atf/libatf-c/.debug/macros_test.debug +OLD_FILES+=usr/tests/lib/atf/libatf-c/.debug/tc_test.debug +OLD_FILES+=usr/tests/lib/atf/libatf-c/.debug/tp_test.debug +OLD_FILES+=usr/tests/lib/atf/libatf-c/.debug/utils_test.debug +OLD_DIRS+=usr/tests/lib/atf/libatf-c/detail/.debug +OLD_FILES+=usr/tests/lib/atf/libatf-c/detail/.debug/dynstr_test.debug +OLD_FILES+=usr/tests/lib/atf/libatf-c/detail/.debug/env_test.debug +OLD_FILES+=usr/tests/lib/atf/libatf-c/detail/.debug/fs_test.debug +OLD_FILES+=usr/tests/lib/atf/libatf-c/detail/.debug/list_test.debug +OLD_FILES+=usr/tests/lib/atf/libatf-c/detail/.debug/map_test.debug +OLD_FILES+=usr/tests/lib/atf/libatf-c/detail/.debug/process_helpers.debug +OLD_FILES+=usr/tests/lib/atf/libatf-c/detail/.debug/process_test.debug +OLD_FILES+=usr/tests/lib/atf/libatf-c/detail/.debug/sanity_test.debug +OLD_FILES+=usr/tests/lib/atf/libatf-c/detail/.debug/text_test.debug +OLD_FILES+=usr/tests/lib/atf/libatf-c/detail/.debug/user_test.debug +OLD_FILES+=usr/tests/lib/atf/libatf-c/detail/.debug/version_helper.debug +OLD_DIRS+=usr/tests/lib/atf/test-programs/.debug +OLD_FILES+=usr/tests/lib/atf/test-programs/.debug/c_helpers.debug +OLD_FILES+=usr/tests/lib/atf/test-programs/.debug/cpp_helpers.debug +OLD_DIRS+=usr/tests/lib/libc/c063/.debug +OLD_FILES+=usr/tests/lib/libc/c063/.debug/faccessat.debug +OLD_FILES+=usr/tests/lib/libc/c063/.debug/fchmodat.debug +OLD_FILES+=usr/tests/lib/libc/c063/.debug/fchownat.debug +OLD_FILES+=usr/tests/lib/libc/c063/.debug/fexecve.debug +OLD_FILES+=usr/tests/lib/libc/c063/.debug/fstatat.debug +OLD_FILES+=usr/tests/lib/libc/c063/.debug/linkat.debug +OLD_FILES+=usr/tests/lib/libc/c063/.debug/mkdirat.debug +OLD_FILES+=usr/tests/lib/libc/c063/.debug/mkfifoat.debug +OLD_FILES+=usr/tests/lib/libc/c063/.debug/mknodat.debug +OLD_FILES+=usr/tests/lib/libc/c063/.debug/openat.debug +OLD_FILES+=usr/tests/lib/libc/c063/.debug/readlinkat.debug +OLD_FILES+=usr/tests/lib/libc/c063/.debug/renameat.debug +OLD_FILES+=usr/tests/lib/libc/c063/.debug/symlinkat.debug +OLD_FILES+=usr/tests/lib/libc/c063/.debug/unlinkat.debug +OLD_FILES+=usr/tests/lib/libc/c063/.debug/utimensat.debug +OLD_DIRS+=usr/tests/lib/libc/db/.debug +OLD_FILES+=usr/tests/lib/libc/db/.debug/h_db.debug +OLD_DIRS+=usr/tests/lib/libc/gen/.debug +OLD_FILES+=usr/tests/lib/libc/gen/.debug/alarm_test.debug +OLD_FILES+=usr/tests/lib/libc/gen/.debug/arc4random_test.debug +OLD_FILES+=usr/tests/lib/libc/gen/.debug/assert_test.debug +OLD_FILES+=usr/tests/lib/libc/gen/.debug/basedirname_test.debug +OLD_FILES+=usr/tests/lib/libc/gen/.debug/dir_test.debug +OLD_FILES+=usr/tests/lib/libc/gen/.debug/floatunditf_test.debug +OLD_FILES+=usr/tests/lib/libc/gen/.debug/fnmatch_test.debug +OLD_FILES+=usr/tests/lib/libc/gen/.debug/fpclassify2_test.debug +OLD_FILES+=usr/tests/lib/libc/gen/.debug/fpclassify_test.debug +OLD_FILES+=usr/tests/lib/libc/gen/.debug/fpsetmask_test.debug +OLD_FILES+=usr/tests/lib/libc/gen/.debug/fpsetround_test.debug +OLD_FILES+=usr/tests/lib/libc/gen/.debug/ftok_test.debug +OLD_FILES+=usr/tests/lib/libc/gen/.debug/getcwd_test.debug +OLD_FILES+=usr/tests/lib/libc/gen/.debug/getgrent_test.debug +OLD_FILES+=usr/tests/lib/libc/gen/.debug/glob_test.debug +OLD_FILES+=usr/tests/lib/libc/gen/.debug/humanize_number_test.debug +OLD_FILES+=usr/tests/lib/libc/gen/.debug/isnan_test.debug +OLD_FILES+=usr/tests/lib/libc/gen/.debug/nice_test.debug +OLD_FILES+=usr/tests/lib/libc/gen/.debug/pause_test.debug +OLD_FILES+=usr/tests/lib/libc/gen/.debug/raise_test.debug +OLD_FILES+=usr/tests/lib/libc/gen/.debug/realpath_test.debug +OLD_FILES+=usr/tests/lib/libc/gen/.debug/setdomainname_test.debug +OLD_FILES+=usr/tests/lib/libc/gen/.debug/sethostname_test.debug +OLD_FILES+=usr/tests/lib/libc/gen/.debug/sleep_test.debug +OLD_FILES+=usr/tests/lib/libc/gen/.debug/syslog_test.debug +OLD_FILES+=usr/tests/lib/libc/gen/.debug/time_test.debug +OLD_FILES+=usr/tests/lib/libc/gen/.debug/ttyname_test.debug +OLD_FILES+=usr/tests/lib/libc/gen/.debug/vis_test.debug +OLD_DIRS+=usr/tests/lib/libc/gen/execve/.debug +OLD_FILES+=usr/tests/lib/libc/gen/execve/.debug/execve_test.debug +OLD_DIRS+=usr/tests/lib/libc/gen/posix_spawn/.debug +OLD_FILES+=usr/tests/lib/libc/gen/posix_spawn/.debug/fileactions_test.debug +OLD_FILES+=usr/tests/lib/libc/gen/posix_spawn/.debug/h_fileactions.debug +OLD_FILES+=usr/tests/lib/libc/gen/posix_spawn/.debug/h_spawn.debug +OLD_FILES+=usr/tests/lib/libc/gen/posix_spawn/.debug/h_spawnattr.debug +OLD_FILES+=usr/tests/lib/libc/gen/posix_spawn/.debug/spawn_test.debug +OLD_FILES+=usr/tests/lib/libc/gen/posix_spawn/.debug/spawnattr_test.debug +OLD_DIRS+=usr/tests/lib/libc/hash/.debug +OLD_FILES+=usr/tests/lib/libc/hash/.debug/h_hash.debug +OLD_FILES+=usr/tests/lib/libc/hash/.debug/sha2_test.debug +OLD_DIRS+=usr/tests/lib/libc/inet/.debug +OLD_FILES+=usr/tests/lib/libc/inet/.debug/inet_network_test.debug +OLD_DIRS+=usr/tests/lib/libc/locale/.debug +OLD_FILES+=usr/tests/lib/libc/locale/.debug/io_test.debug +OLD_FILES+=usr/tests/lib/libc/locale/.debug/mbrtowc_test.debug +OLD_FILES+=usr/tests/lib/libc/locale/.debug/mbsnrtowcs_test.debug +OLD_FILES+=usr/tests/lib/libc/locale/.debug/mbstowcs_test.debug +OLD_FILES+=usr/tests/lib/libc/locale/.debug/mbtowc_test.debug +OLD_FILES+=usr/tests/lib/libc/locale/.debug/wcscspn_test.debug +OLD_FILES+=usr/tests/lib/libc/locale/.debug/wcspbrk_test.debug +OLD_FILES+=usr/tests/lib/libc/locale/.debug/wcsspn_test.debug +OLD_FILES+=usr/tests/lib/libc/locale/.debug/wcstod_test.debug +OLD_FILES+=usr/tests/lib/libc/locale/.debug/wctomb_test.debug +OLD_DIRS+=usr/tests/lib/libc/net/.debug +OLD_FILES+=usr/tests/lib/libc/net/.debug/ether_aton_test.debug +OLD_FILES+=usr/tests/lib/libc/net/.debug/getprotoent_test.debug +OLD_FILES+=usr/tests/lib/libc/net/.debug/h_dns_server.debug +OLD_FILES+=usr/tests/lib/libc/net/.debug/h_nsd_recurse.debug +OLD_FILES+=usr/tests/lib/libc/net/.debug/h_protoent.debug +OLD_FILES+=usr/tests/lib/libc/net/.debug/h_servent.debug +OLD_DIRS+=usr/tests/lib/libc/regex/.debug +OLD_FILES+=usr/tests/lib/libc/regex/.debug/exhaust_test.debug +OLD_FILES+=usr/tests/lib/libc/regex/.debug/h_regex.debug +OLD_FILES+=usr/tests/lib/libc/regex/.debug/regex_att_test.debug +OLD_DIRS+=usr/tests/lib/libc/ssp/.debug +OLD_FILES+=usr/tests/lib/libc/ssp/.debug/h_fgets.debug +OLD_FILES+=usr/tests/lib/libc/ssp/.debug/h_getcwd.debug +OLD_FILES+=usr/tests/lib/libc/ssp/.debug/h_gets.debug +OLD_FILES+=usr/tests/lib/libc/ssp/.debug/h_memcpy.debug +OLD_FILES+=usr/tests/lib/libc/ssp/.debug/h_memmove.debug +OLD_FILES+=usr/tests/lib/libc/ssp/.debug/h_memset.debug +OLD_FILES+=usr/tests/lib/libc/ssp/.debug/h_raw.debug +OLD_FILES+=usr/tests/lib/libc/ssp/.debug/h_read.debug +OLD_FILES+=usr/tests/lib/libc/ssp/.debug/h_readlink.debug +OLD_FILES+=usr/tests/lib/libc/ssp/.debug/h_snprintf.debug +OLD_FILES+=usr/tests/lib/libc/ssp/.debug/h_sprintf.debug +OLD_FILES+=usr/tests/lib/libc/ssp/.debug/h_stpcpy.debug +OLD_FILES+=usr/tests/lib/libc/ssp/.debug/h_stpncpy.debug +OLD_FILES+=usr/tests/lib/libc/ssp/.debug/h_strcat.debug +OLD_FILES+=usr/tests/lib/libc/ssp/.debug/h_strcpy.debug +OLD_FILES+=usr/tests/lib/libc/ssp/.debug/h_strncat.debug +OLD_FILES+=usr/tests/lib/libc/ssp/.debug/h_strncpy.debug +OLD_FILES+=usr/tests/lib/libc/ssp/.debug/h_vsnprintf.debug +OLD_FILES+=usr/tests/lib/libc/ssp/.debug/h_vsprintf.debug +OLD_DIRS+=usr/tests/lib/libc/stdio/.debug +OLD_FILES+=usr/tests/lib/libc/stdio/.debug/clearerr_test.debug +OLD_FILES+=usr/tests/lib/libc/stdio/.debug/fflush_test.debug +OLD_FILES+=usr/tests/lib/libc/stdio/.debug/fmemopen2_test.debug +OLD_FILES+=usr/tests/lib/libc/stdio/.debug/fmemopen_test.debug +OLD_FILES+=usr/tests/lib/libc/stdio/.debug/fopen_test.debug +OLD_FILES+=usr/tests/lib/libc/stdio/.debug/fputc_test.debug +OLD_FILES+=usr/tests/lib/libc/stdio/.debug/mktemp_test.debug +OLD_FILES+=usr/tests/lib/libc/stdio/.debug/popen_test.debug +OLD_FILES+=usr/tests/lib/libc/stdio/.debug/printf_test.debug +OLD_FILES+=usr/tests/lib/libc/stdio/.debug/scanf_test.debug +OLD_DIRS+=usr/tests/lib/libc/stdlib/.debug +OLD_FILES+=usr/tests/lib/libc/stdlib/.debug/abs_test.debug +OLD_FILES+=usr/tests/lib/libc/stdlib/.debug/atoi_test.debug +OLD_FILES+=usr/tests/lib/libc/stdlib/.debug/div_test.debug +OLD_FILES+=usr/tests/lib/libc/stdlib/.debug/exit_test.debug +OLD_FILES+=usr/tests/lib/libc/stdlib/.debug/getenv_test.debug +OLD_FILES+=usr/tests/lib/libc/stdlib/.debug/h_getopt.debug +OLD_FILES+=usr/tests/lib/libc/stdlib/.debug/h_getopt_long.debug +OLD_FILES+=usr/tests/lib/libc/stdlib/.debug/hsearch_test.debug +OLD_FILES+=usr/tests/lib/libc/stdlib/.debug/posix_memalign_test.debug +OLD_FILES+=usr/tests/lib/libc/stdlib/.debug/random_test.debug +OLD_FILES+=usr/tests/lib/libc/stdlib/.debug/strtod_test.debug +OLD_FILES+=usr/tests/lib/libc/stdlib/.debug/strtol_test.debug +OLD_FILES+=usr/tests/lib/libc/stdlib/.debug/system_test.debug +OLD_DIRS+=usr/tests/lib/libc/string/.debug +OLD_FILES+=usr/tests/lib/libc/string/.debug/memchr.debug +OLD_FILES+=usr/tests/lib/libc/string/.debug/memcpy.debug +OLD_FILES+=usr/tests/lib/libc/string/.debug/memmem.debug +OLD_FILES+=usr/tests/lib/libc/string/.debug/memset.debug +OLD_FILES+=usr/tests/lib/libc/string/.debug/strcat.debug +OLD_FILES+=usr/tests/lib/libc/string/.debug/strchr.debug +OLD_FILES+=usr/tests/lib/libc/string/.debug/strcmp.debug +OLD_FILES+=usr/tests/lib/libc/string/.debug/strcpy.debug +OLD_FILES+=usr/tests/lib/libc/string/.debug/strcspn.debug +OLD_FILES+=usr/tests/lib/libc/string/.debug/strerror.debug +OLD_FILES+=usr/tests/lib/libc/string/.debug/strlen.debug +OLD_FILES+=usr/tests/lib/libc/string/.debug/strpbrk.debug +OLD_FILES+=usr/tests/lib/libc/string/.debug/strrchr.debug +OLD_FILES+=usr/tests/lib/libc/string/.debug/strspn.debug +OLD_FILES+=usr/tests/lib/libc/string/.debug/swab.debug +OLD_DIRS+=usr/tests/lib/libc/sys/.debug +OLD_FILES+=usr/tests/lib/libc/sys/.debug/access_test.debug +OLD_FILES+=usr/tests/lib/libc/sys/.debug/chroot_test.debug +OLD_FILES+=usr/tests/lib/libc/sys/.debug/clock_gettime_test.debug +OLD_FILES+=usr/tests/lib/libc/sys/.debug/connect_test.debug +OLD_FILES+=usr/tests/lib/libc/sys/.debug/dup_test.debug +OLD_FILES+=usr/tests/lib/libc/sys/.debug/fsync_test.debug +OLD_FILES+=usr/tests/lib/libc/sys/.debug/getcontext_test.debug +OLD_FILES+=usr/tests/lib/libc/sys/.debug/getgroups_test.debug +OLD_FILES+=usr/tests/lib/libc/sys/.debug/getitimer_test.debug +OLD_FILES+=usr/tests/lib/libc/sys/.debug/getlogin_test.debug +OLD_FILES+=usr/tests/lib/libc/sys/.debug/getpid_test.debug +OLD_FILES+=usr/tests/lib/libc/sys/.debug/getrusage_test.debug +OLD_FILES+=usr/tests/lib/libc/sys/.debug/getsid_test.debug +OLD_FILES+=usr/tests/lib/libc/sys/.debug/gettimeofday_test.debug +OLD_FILES+=usr/tests/lib/libc/sys/.debug/issetugid_test.debug +OLD_FILES+=usr/tests/lib/libc/sys/.debug/kevent_test.debug +OLD_FILES+=usr/tests/lib/libc/sys/.debug/kill_test.debug +OLD_FILES+=usr/tests/lib/libc/sys/.debug/link_test.debug +OLD_FILES+=usr/tests/lib/libc/sys/.debug/listen_test.debug +OLD_FILES+=usr/tests/lib/libc/sys/.debug/mincore_test.debug +OLD_FILES+=usr/tests/lib/libc/sys/.debug/mkdir_test.debug +OLD_FILES+=usr/tests/lib/libc/sys/.debug/mkfifo_test.debug +OLD_FILES+=usr/tests/lib/libc/sys/.debug/mknod_test.debug +OLD_FILES+=usr/tests/lib/libc/sys/.debug/mlock_test.debug +OLD_FILES+=usr/tests/lib/libc/sys/.debug/mmap_test.debug +OLD_FILES+=usr/tests/lib/libc/sys/.debug/mprotect_test.debug +OLD_FILES+=usr/tests/lib/libc/sys/.debug/msgctl_test.debug +OLD_FILES+=usr/tests/lib/libc/sys/.debug/msgget_test.debug +OLD_FILES+=usr/tests/lib/libc/sys/.debug/msgrcv_test.debug +OLD_FILES+=usr/tests/lib/libc/sys/.debug/msgsnd_test.debug +OLD_FILES+=usr/tests/lib/libc/sys/.debug/msync_test.debug +OLD_FILES+=usr/tests/lib/libc/sys/.debug/nanosleep_test.debug +OLD_FILES+=usr/tests/lib/libc/sys/.debug/pipe2_test.debug +OLD_FILES+=usr/tests/lib/libc/sys/.debug/pipe_test.debug +OLD_FILES+=usr/tests/lib/libc/sys/.debug/poll_test.debug +OLD_FILES+=usr/tests/lib/libc/sys/.debug/revoke_test.debug +OLD_FILES+=usr/tests/lib/libc/sys/.debug/select_test.debug +OLD_FILES+=usr/tests/lib/libc/sys/.debug/setrlimit_test.debug +OLD_FILES+=usr/tests/lib/libc/sys/.debug/setuid_test.debug +OLD_FILES+=usr/tests/lib/libc/sys/.debug/sigaction_test.debug +OLD_FILES+=usr/tests/lib/libc/sys/.debug/sigqueue_test.debug +OLD_FILES+=usr/tests/lib/libc/sys/.debug/sigtimedwait_test.debug +OLD_FILES+=usr/tests/lib/libc/sys/.debug/socketpair_test.debug +OLD_FILES+=usr/tests/lib/libc/sys/.debug/stat_test.debug +OLD_FILES+=usr/tests/lib/libc/sys/.debug/timer_create_test.debug +OLD_FILES+=usr/tests/lib/libc/sys/.debug/truncate_test.debug +OLD_FILES+=usr/tests/lib/libc/sys/.debug/ucontext_test.debug +OLD_FILES+=usr/tests/lib/libc/sys/.debug/umask_test.debug +OLD_FILES+=usr/tests/lib/libc/sys/.debug/unlink_test.debug +OLD_FILES+=usr/tests/lib/libc/sys/.debug/write_test.debug +OLD_DIRS+=usr/tests/lib/libc/termios/.debug +OLD_FILES+=usr/tests/lib/libc/termios/.debug/tcsetpgrp_test.debug +OLD_DIRS+=usr/tests/lib/libc/tls/.debug +OLD_FILES+=usr/tests/lib/libc/tls/.debug/h_tls_dlopen.so.debug +OLD_FILES+=usr/tests/lib/libc/tls/.debug/libh_tls_dynamic.so.1.debug +OLD_FILES+=usr/tests/lib/libc/tls/.debug/tls_dlopen_test.debug +OLD_FILES+=usr/tests/lib/libc/tls/.debug/tls_dynamic_test.debug +OLD_DIRS+=usr/tests/lib/libc/ttyio/.debug +OLD_FILES+=usr/tests/lib/libc/ttyio/.debug/ttyio_test.debug +OLD_DIRS+=usr/tests/lib/libcrypt/.debug +OLD_FILES+=usr/tests/lib/libcrypt/.debug/crypt_tests.debug +OLD_DIRS+=usr/tests/lib/libmp/.debug +OLD_FILES+=usr/tests/lib/libmp/.debug/legacy_test.debug +OLD_DIRS+=usr/tests/lib/libnv/.debug +OLD_FILES+=usr/tests/lib/libnv/.debug/dnv_tests.debug +OLD_FILES+=usr/tests/lib/libnv/.debug/nv_array_tests.debug +OLD_FILES+=usr/tests/lib/libnv/.debug/nv_tests.debug +OLD_FILES+=usr/tests/lib/libnv/.debug/nvlist_add_test.debug +OLD_FILES+=usr/tests/lib/libnv/.debug/nvlist_exists_test.debug +OLD_FILES+=usr/tests/lib/libnv/.debug/nvlist_free_test.debug +OLD_FILES+=usr/tests/lib/libnv/.debug/nvlist_get_test.debug +OLD_FILES+=usr/tests/lib/libnv/.debug/nvlist_move_test.debug +OLD_FILES+=usr/tests/lib/libnv/.debug/nvlist_send_recv_test.debug +OLD_DIRS+=usr/tests/lib/libpam/.debug +OLD_FILES+=usr/tests/lib/libpam/.debug/t_openpam_ctype.debug +OLD_FILES+=usr/tests/lib/libpam/.debug/t_openpam_readlinev.debug +OLD_FILES+=usr/tests/lib/libpam/.debug/t_openpam_readword.debug +OLD_DIRS+=usr/tests/lib/libproc/.debug +OLD_FILES+=usr/tests/lib/libproc/.debug/proc_test.debug +OLD_FILES+=usr/tests/lib/libproc/.debug/target_prog.debug +OLD_DIRS+=usr/tests/lib/librt/.debug +OLD_FILES+=usr/tests/lib/librt/.debug/sched_test.debug +OLD_FILES+=usr/tests/lib/librt/.debug/sem_test.debug +OLD_DIRS+=usr/tests/lib/libthr/.debug +OLD_FILES+=usr/tests/lib/libthr/.debug/barrier_test.debug +OLD_FILES+=usr/tests/lib/libthr/.debug/cond_test.debug +OLD_FILES+=usr/tests/lib/libthr/.debug/condwait_test.debug +OLD_FILES+=usr/tests/lib/libthr/.debug/detach_test.debug +OLD_FILES+=usr/tests/lib/libthr/.debug/equal_test.debug +OLD_FILES+=usr/tests/lib/libthr/.debug/fork_test.debug +OLD_FILES+=usr/tests/lib/libthr/.debug/fpu_test.debug +OLD_FILES+=usr/tests/lib/libthr/.debug/h_atexit.debug +OLD_FILES+=usr/tests/lib/libthr/.debug/h_cancel.debug +OLD_FILES+=usr/tests/lib/libthr/.debug/h_exit.debug +OLD_FILES+=usr/tests/lib/libthr/.debug/h_resolv.debug +OLD_FILES+=usr/tests/lib/libthr/.debug/join_test.debug +OLD_FILES+=usr/tests/lib/libthr/.debug/kill_test.debug +OLD_FILES+=usr/tests/lib/libthr/.debug/mutex_test.debug +OLD_FILES+=usr/tests/lib/libthr/.debug/once_test.debug +OLD_FILES+=usr/tests/lib/libthr/.debug/preempt_test.debug +OLD_FILES+=usr/tests/lib/libthr/.debug/rwlock_test.debug +OLD_FILES+=usr/tests/lib/libthr/.debug/sem_test.debug +OLD_FILES+=usr/tests/lib/libthr/.debug/siglongjmp_test.debug +OLD_FILES+=usr/tests/lib/libthr/.debug/sigmask_test.debug +OLD_FILES+=usr/tests/lib/libthr/.debug/sigsuspend_test.debug +OLD_FILES+=usr/tests/lib/libthr/.debug/sleep_test.debug +OLD_FILES+=usr/tests/lib/libthr/.debug/swapcontext_test.debug +OLD_DIRS+=usr/tests/lib/libthr/dlopen/.debug +OLD_FILES+=usr/tests/lib/libthr/dlopen/.debug/dlopen_test.debug +OLD_FILES+=usr/tests/lib/libthr/dlopen/.debug/h_pthread_dlopen.so.1.debug +OLD_FILES+=usr/tests/lib/libthr/dlopen/.debug/main_pthread_create_test.debug +OLD_DIRS+=usr/tests/lib/libutil/.debug +OLD_FILES+=usr/tests/lib/libutil/.debug/flopen_test.debug +OLD_FILES+=usr/tests/lib/libutil/.debug/grp_test.debug +OLD_FILES+=usr/tests/lib/libutil/.debug/humanize_number_test.debug +OLD_FILES+=usr/tests/lib/libutil/.debug/pidfile_test.debug +OLD_FILES+=usr/tests/lib/libutil/.debug/trimdomain-nodomain_test.debug +OLD_FILES+=usr/tests/lib/libutil/.debug/trimdomain_test.debug +OLD_DIRS+=usr/tests/lib/libxo/.debug +OLD_FILES+=usr/tests/lib/libxo/.debug/libenc_test.so.debug +OLD_FILES+=usr/tests/lib/libxo/.debug/test_01.debug +OLD_FILES+=usr/tests/lib/libxo/.debug/test_02.debug +OLD_FILES+=usr/tests/lib/libxo/.debug/test_03.debug +OLD_FILES+=usr/tests/lib/libxo/.debug/test_04.debug +OLD_FILES+=usr/tests/lib/libxo/.debug/test_05.debug +OLD_FILES+=usr/tests/lib/libxo/.debug/test_06.debug +OLD_FILES+=usr/tests/lib/libxo/.debug/test_07.debug +OLD_FILES+=usr/tests/lib/libxo/.debug/test_08.debug +OLD_FILES+=usr/tests/lib/libxo/.debug/test_09.debug +OLD_FILES+=usr/tests/lib/libxo/.debug/test_10.debug +OLD_FILES+=usr/tests/lib/libxo/.debug/test_11.debug +OLD_DIRS+=usr/tests/lib/msun/.debug +OLD_FILES+=usr/tests/lib/msun/.debug/acos_test.debug +OLD_FILES+=usr/tests/lib/msun/.debug/asin_test.debug +OLD_FILES+=usr/tests/lib/msun/.debug/atan_test.debug +OLD_FILES+=usr/tests/lib/msun/.debug/cbrt_test.debug +OLD_FILES+=usr/tests/lib/msun/.debug/ceil_test.debug +OLD_FILES+=usr/tests/lib/msun/.debug/cos_test.debug +OLD_FILES+=usr/tests/lib/msun/.debug/cosh_test.debug +OLD_FILES+=usr/tests/lib/msun/.debug/erf_test.debug +OLD_FILES+=usr/tests/lib/msun/.debug/exp_test.debug +OLD_FILES+=usr/tests/lib/msun/.debug/fmod_test.debug +OLD_FILES+=usr/tests/lib/msun/.debug/infinity_test.debug +OLD_FILES+=usr/tests/lib/msun/.debug/ldexp_test.debug +OLD_FILES+=usr/tests/lib/msun/.debug/log_test.debug +OLD_FILES+=usr/tests/lib/msun/.debug/pow_test.debug +OLD_FILES+=usr/tests/lib/msun/.debug/precision_test.debug +OLD_FILES+=usr/tests/lib/msun/.debug/round_test.debug +OLD_FILES+=usr/tests/lib/msun/.debug/scalbn_test.debug +OLD_FILES+=usr/tests/lib/msun/.debug/sin_test.debug +OLD_FILES+=usr/tests/lib/msun/.debug/sinh_test.debug +OLD_FILES+=usr/tests/lib/msun/.debug/sqrt_test.debug +OLD_FILES+=usr/tests/lib/msun/.debug/tan_test.debug +OLD_FILES+=usr/tests/lib/msun/.debug/tanh_test.debug +OLD_DIRS+=usr/tests/libexec/rtld-elf/.debug +OLD_FILES+=usr/tests/libexec/rtld-elf/.debug/ld_library_pathfds.debug +OLD_FILES+=usr/tests/libexec/rtld-elf/.debug/libpythagoras.so.0.debug +OLD_FILES+=usr/tests/libexec/rtld-elf/.debug/target.debug +OLD_DIRS+=usr/tests/sbin/devd/.debug +OLD_FILES+=usr/tests/sbin/devd/.debug/client_test.debug +OLD_DIRS+=usr/tests/sbin/dhclient/.debug +OLD_FILES+=usr/tests/sbin/dhclient/.debug/option-domain-search_test.debug +OLD_DIRS+=usr/tests/share/examples/tests/atf/.debug +OLD_FILES+=usr/tests/share/examples/tests/atf/.debug/printf_test.debug +OLD_DIRS+=usr/tests/share/examples/tests/plain/.debug +OLD_FILES+=usr/tests/share/examples/tests/plain/.debug/printf_test.debug +OLD_DIRS+=usr/tests/sys/aio/.debug +OLD_FILES+=usr/tests/sys/aio/.debug/aio_kqueue_test.debug +OLD_FILES+=usr/tests/sys/aio/.debug/aio_test.debug +OLD_FILES+=usr/tests/sys/aio/.debug/lio_kqueue_test.debug +OLD_DIRS+=usr/tests/sys/fifo/.debug +OLD_FILES+=usr/tests/sys/fifo/.debug/fifo_create.debug +OLD_FILES+=usr/tests/sys/fifo/.debug/fifo_io.debug +OLD_FILES+=usr/tests/sys/fifo/.debug/fifo_misc.debug +OLD_FILES+=usr/tests/sys/fifo/.debug/fifo_open.debug +OLD_DIRS+=usr/tests/sys/file/.debug +OLD_FILES+=usr/tests/sys/file/.debug/closefrom_test.debug +OLD_FILES+=usr/tests/sys/file/.debug/dup_test.debug +OLD_FILES+=usr/tests/sys/file/.debug/fcntlflags_test.debug +OLD_FILES+=usr/tests/sys/file/.debug/flock_helper.debug +OLD_FILES+=usr/tests/sys/file/.debug/ftruncate_test.debug +OLD_FILES+=usr/tests/sys/file/.debug/newfileops_on_fork_test.debug +OLD_DIRS+=usr/tests/sys/kern/.debug +OLD_FILES+=usr/tests/sys/kern/.debug/kern_descrip_test.debug +OLD_FILES+=usr/tests/sys/kern/.debug/ptrace_test.debug +OLD_FILES+=usr/tests/sys/kern/.debug/unix_seqpacket_test.debug +OLD_DIRS+=usr/tests/sys/kern/execve/.debug +OLD_FILES+=usr/tests/sys/kern/execve/.debug/execve_helper.debug +OLD_FILES+=usr/tests/sys/kern/execve/.debug/good_aout.debug +OLD_DIRS+=usr/tests/sys/kqueue/.debug +OLD_FILES+=usr/tests/sys/kqueue/.debug/kqtest.debug +OLD_DIRS+=usr/tests/sys/mqueue/.debug +OLD_FILES+=usr/tests/sys/mqueue/.debug/mqtest1.debug +OLD_FILES+=usr/tests/sys/mqueue/.debug/mqtest2.debug +OLD_FILES+=usr/tests/sys/mqueue/.debug/mqtest3.debug +OLD_FILES+=usr/tests/sys/mqueue/.debug/mqtest4.debug +OLD_FILES+=usr/tests/sys/mqueue/.debug/mqtest5.debug +OLD_DIRS+=usr/tests/sys/netinet/.debug +OLD_FILES+=usr/tests/sys/netinet/.debug/udp_dontroute.debug +OLD_DIRS+=usr/tests/sys/pjdfstest/.debug +OLD_FILES+=usr/tests/sys/pjdfstest/.debug/pjdfstest.debug +OLD_DIRS+=usr/tests/sys/vm/.debug +OLD_FILES+=usr/tests/sys/vm/.debug/mmap_test.debug # 20151015: Rename files due to file-installed-as-dir bug OLD_FILES+=usr/share/doc/legal/realtek OLD_FILES+=usr/share/doc/legal/realtek/LICENSE From owner-svn-src-all@freebsd.org Fri Oct 16 05:14:01 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B0700A16034; Fri, 16 Oct 2015 05: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 9978D982; Fri, 16 Oct 2015 05: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 92A3A1F79; Fri, 16 Oct 2015 05:14: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 4B24B11362; Fri, 16 Oct 2015 05:14: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 kHzbSNmvsUc2; Fri, 16 Oct 2015 05:13:58 +0000 (UTC) Subject: Re: svn commit: r289355 - head/share/mk DKIM-Filter: OpenDKIM Filter v2.9.2 mail.xzibition.com D54D11135D To: Ed Maste , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201510150252.t9F2qU2k010223@repo.freebsd.org> <561F1CAD.402@FreeBSD.org> From: Bryan Drewery Openpgp: id=F9173CB2C3AAEA7A5C8A1F0935D771BB6E4697CF; url=http://www.shatow.net/bryan/bryan2.asc Organization: FreeBSD Message-ID: <56208796.9010609@FreeBSD.org> Date: Thu, 15 Oct 2015 22:13:58 -0700 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0 MIME-Version: 1.0 In-Reply-To: <561F1CAD.402@FreeBSD.org> Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="pnJhjqx4a8KAIKqP2wMs497kIOt1RSlkK" X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Oct 2015 05:14:01 -0000 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --pnJhjqx4a8KAIKqP2wMs497kIOt1RSlkK Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 10/14/2015 8:25 PM, Bryan Drewery wrote: > On 10/14/15 7:52 PM, Ed Maste wrote: >> Author: emaste >> Date: Thu Oct 15 02:52:30 2015 >> New Revision: 289355 >> URL: https://svnweb.freebsd.org/changeset/base/289355 >> >> Log: >> /usr/tests is part of the base system (for *.debug files) >> =20 >> Sponsored by: The FreeBSD Foundation >> >> Modified: >> head/share/mk/bsd.prog.mk >> >> Modified: head/share/mk/bsd.prog.mk >> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D >> --- head/share/mk/bsd.prog.mk Thu Oct 15 02:27:16 2015 (r289354) >> +++ head/share/mk/bsd.prog.mk Thu Oct 15 02:52:30 2015 (r289355) >> @@ -58,7 +58,7 @@ PROG_FULL=3D${PROG}.full >> ${BINDIR} =3D=3D "/bin" ||\ >> ${BINDIR:C%/libexec(/.*)?%/libexec%} =3D=3D "/libexec" ||\ >> ${BINDIR} =3D=3D "/sbin" ||\ >> - ${BINDIR:C%/usr/(bin|bsdinstall|libexec|lpr|sendmail|sm.bin|sbin)= (/.*)?%/usr/bin%} =3D=3D "/usr/bin"\ >> + ${BINDIR:C%/usr/(bin|bsdinstall|libexec|lpr|sendmail|sm.bin|sbin|= tests)(/.*)?%/usr/bin%} =3D=3D "/usr/bin"\ >> ) >> DEBUGFILEDIR=3D ${DEBUGDIR}${BINDIR} >> .else >> >=20 > Thanks for this. >=20 > I realized this technically needs support in 'make delete-old'. Yay hug= e > list. >=20 Done in r289409, based on my current install, so it may not be complete. --=20 Regards, Bryan Drewery --pnJhjqx4a8KAIKqP2wMs497kIOt1RSlkK 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 iQEcBAEBAgAGBQJWIIeWAAoJEDXXcbtuRpfPHrgIAMS7jzZoVWVdSvkIAfNAzWec UK87y/ok88HCu30TBUpebmAVXRoK5tA9KRgPX5U2sE4PElNASoBIY3tmg60RQhiM bkNzC1tC2yrMDbDugstLuVNOkPc8jPwfbeh5WVdF8L4ERENHBGeXIShcrjQPfUlK /6zcOScHjTYqlagR+hrvkHCGC06T8yaUaMij1dTfWdkyU9FQY8D6xFJkYg1BC7dl Wul7h/2w6jRONjjMLA/NbUqNvkOkbS/d4xCQEAJYAztK4fgjzV0nh2YZ26dhz5vW eM6K433QsuW9CiJ7wrZ/jdVtCvH/4aX+SVDBSMJl8sK7EUHlPnZ0JsZAhfJz7MY= =maDc -----END PGP SIGNATURE----- --pnJhjqx4a8KAIKqP2wMs497kIOt1RSlkK-- From owner-svn-src-all@freebsd.org Fri Oct 16 05:20:10 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0EA33A16101; Fri, 16 Oct 2015 05:20:10 +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 E9D98B0A; Fri, 16 Oct 2015 05:20:09 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from mail.xzibition.com (localhost [IPv6:::1]) by freefall.freebsd.org (Postfix) with ESMTP id E2FE110E5; Fri, 16 Oct 2015 05:20:09 +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 9467D1136E; Fri, 16 Oct 2015 05:20:09 +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 FYJdArfjN1p2; Fri, 16 Oct 2015 05:20:02 +0000 (UTC) Subject: Re: svn commit: r289172 - in head: bin/cat/tests bin/date/tests bin/expr/tests bin/ls/tests bin/mv/tests bin/pax/tests bin/pkill/tests bin/sh/tests bin/sleep/tests bin/test/tests bin/tests cddl/lib/tes... DKIM-Filter: OpenDKIM Filter v2.9.2 mail.xzibition.com 7302411369 To: Garrett Cooper , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201510120816.t9C8G3DZ001516@repo.freebsd.org> From: Bryan Drewery Openpgp: id=F9173CB2C3AAEA7A5C8A1F0935D771BB6E4697CF; url=http://www.shatow.net/bryan/bryan2.asc Organization: FreeBSD Message-ID: <56208905.6070603@FreeBSD.org> Date: Thu, 15 Oct 2015 22:20:05 -0700 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0 MIME-Version: 1.0 In-Reply-To: <201510120816.t9C8G3DZ001516@repo.freebsd.org> Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="cf7iCIsGJCXjqjqkB35OqleF6UsT7rdi5" X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Oct 2015 05:20:10 -0000 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --cf7iCIsGJCXjqjqkB35OqleF6UsT7rdi5 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 10/12/2015 1:16 AM, Garrett Cooper wrote: > Author: ngie > Date: Mon Oct 12 08:16:03 2015 > New Revision: 289172 > URL: https://svnweb.freebsd.org/changeset/base/289172 >=20 > Log: > Refactor the test/ Makefiles after recent changes to bsd.test.mk (r28= 9158) and > netbsd-tests.test.mk (r289151) > =20 > - Eliminate explicit OBJTOP/SRCTOP setting > - Convert all ad hoc NetBSD test integration over to netbsd-tests.tes= t.mk > - Remove unnecessary TESTSDIR setting > - Use SRCTOP where possible for clarity > =20 > MFC after: 2 weeks OBJTOP, OBJROOT and SRCTOP are not set in stable/10 by the share/mk files= =2E --=20 Regards, Bryan Drewery --cf7iCIsGJCXjqjqkB35OqleF6UsT7rdi5 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 iQEcBAEBAgAGBQJWIIkFAAoJEDXXcbtuRpfPzUwH/0pxE5jPhbaIKyqYeuc+LWpR MWQVWfct/W882ZRANKN0qJI2w2eqA/OVSxR/G3OHQrTqK14HbyfkO2VGvhkqwJ8s 2Z96ZIs6aT+UPqJZb+FSGViFJ14Q/8uUS9cT/MsEvvzX7QoVsbM4NPbk8G7jNyVG MWpfSS06j4Nt5sDHiJdpOrbrxzG8MUWGzsFCzi1CX76vx/mxQQFAuz02DbWBHBcB 0Tm6TMcHFxB4x1/4PsnzHIEDF31HPowK0HR+43CPybgQSf9POQngZFTsh3VgA3j2 TO+3woDgy5bTDcuXw5nhx/pIvabeuOyZh6fura4IxM2WU3EhjDtup/21kcrXhmA= =O9to -----END PGP SIGNATURE----- --cf7iCIsGJCXjqjqkB35OqleF6UsT7rdi5-- From owner-svn-src-all@freebsd.org Fri Oct 16 05:54:43 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1B156A1674F; Fri, 16 Oct 2015 05:54:43 +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 DC3571887; Fri, 16 Oct 2015 05:54:42 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t9G5sgRB098640; Fri, 16 Oct 2015 05:54:42 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9G5sfTT098639; Fri, 16 Oct 2015 05:54:41 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201510160554.t9G5sfTT098639@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Fri, 16 Oct 2015 05:54:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289410 - head/gnu/usr.bin/binutils/ld X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Oct 2015 05:54:43 -0000 Author: bdrewery Date: Fri Oct 16 05:54:41 2015 New Revision: 289410 URL: https://svnweb.freebsd.org/changeset/base/289410 Log: Avoid warning race with creating 'ldscripts' directory during build. In r204548 the 'rm -f ldscripts' was added likely due to reading the conditional as 'else it is a file'. That seems unlikely though and the more likely case is just that the directory hasn't been created yet. Because this races with ,ssother scripts, use 'mkdir -p' which is a minimal modification vs upstream to avoid the warning of 'File exists' if another script creates it first. This could replace the 'test -d' as well but then it's more unneeded change to the upstream script. Sponsored by: EMC / Isilon Storage Division Modified: head/gnu/usr.bin/binutils/ld/genscripts.sh Modified: head/gnu/usr.bin/binutils/ld/genscripts.sh ============================================================================== --- head/gnu/usr.bin/binutils/ld/genscripts.sh Fri Oct 16 05:13:21 2015 (r289409) +++ head/gnu/usr.bin/binutils/ld/genscripts.sh Fri Oct 16 05:54:41 2015 (r289410) @@ -50,8 +50,7 @@ fi if test -d ldscripts; then true else - rm -f ldscripts - mkdir ldscripts + mkdir -p ldscripts fi # Set some flags for the emultempl scripts. USE_LIBPATH will From owner-svn-src-all@freebsd.org Fri Oct 16 06:00:00 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8F59EA167C8; Fri, 16 Oct 2015 06:00:00 +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 508D91A0C; Fri, 16 Oct 2015 06:00:00 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t9G5xxFA098855; Fri, 16 Oct 2015 05:59:59 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9G5xxFK098854; Fri, 16 Oct 2015 05:59:59 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201510160559.t9G5xxFK098854@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Fri, 16 Oct 2015 05:59:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289411 - 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 " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Oct 2015 06:00:00 -0000 Author: bdrewery Date: Fri Oct 16 05:59:59 2015 New Revision: 289411 URL: https://svnweb.freebsd.org/changeset/base/289411 Log: Tweak the default target to not suggest 'all' since it really doesn't do anything useful for most users. MFC after: 2 weeks Sponsored by: EMC / Isilon Storage Division Modified: head/Makefile Modified: head/Makefile ============================================================================== --- head/Makefile Fri Oct 16 05:54:41 2015 (r289410) +++ head/Makefile Fri Oct 16 05:59:59 2015 (r289411) @@ -259,9 +259,9 @@ ${TGTS}: .PHONY # if they want the historic behavior. .MAIN: _guard -_guard: +_guard: .PHONY @echo - @echo "Explicit target required (use \"all\" for historic behavior)" + @echo "Explicit target required. Likely \"buildworld\" is wanted. See build(7)." @echo @false From owner-svn-src-all@freebsd.org Fri Oct 16 06:21:22 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9099CA16BC2; Fri, 16 Oct 2015 06:21:22 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from mail109.syd.optusnet.com.au (mail109.syd.optusnet.com.au [211.29.132.80]) by mx1.freebsd.org (Postfix) with ESMTP id 1923D2B9; Fri, 16 Oct 2015 06:21:21 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from c211-30-166-197.carlnfd1.nsw.optusnet.com.au (c211-30-166-197.carlnfd1.nsw.optusnet.com.au [211.30.166.197]) by mail109.syd.optusnet.com.au (Postfix) with ESMTPS id 92151D66A8C; Fri, 16 Oct 2015 17:21:11 +1100 (AEDT) Date: Fri, 16 Oct 2015 17:21:09 +1100 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: Warner Losh cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r289405 - head/sys/ufs/ffs In-Reply-To: <201510160306.t9G3622O049128@repo.freebsd.org> Message-ID: <20151016151349.W1280@besplex.bde.org> References: <201510160306.t9G3622O049128@repo.freebsd.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Optus-CM-Score: 0 X-Optus-CM-Analysis: v=2.1 cv=R4L+YolX c=1 sm=1 tr=0 a=KA6XNC2GZCFrdESI5ZmdjQ==:117 a=PO7r1zJSAAAA:8 a=JzwRw_2MAAAA:8 a=kj9zAlcOel0A:10 a=vRWhB1pj-ohvYJLlHdEA:9 a=ALDmZt6oEDJzuPMU:21 a=OORJ6kMRU7IAifqU:21 a=CjuIK1q_8ugA:10 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Oct 2015 06:21:22 -0000 On Fri, 16 Oct 2015, Warner Losh wrote: > Log: > Do not relocate extents to make them contiguous if the underlying drive can do > deletions. Ability to do deletions is a strong indication that this > optimization will not help performance. It will only generate extra write > traffic. These devices are typically flash based and have a limited number of > write cycles. In addition, making the file contiguous in LBA space doesn't > improve the access times from flash devices because they have no seek time. > > Reviewed by: mckusick@ Actually, making the file contiguous does improve the access time, probably by relatively more for flash devices, since for fast devices the number of i/o's per second is a bottleneck and discontiguous files give many more i/o's per second. E.g., suppose the block size is 16K and the transfer rate is 1GB/sec. This requires 64K i/o's per second (iops) to keep up with the data and many more to keep up with the metadata. Completely discontiguous files are limited to this rate. But clustering of large contiguous files increases the block size to 128K, so you only need 8K iops to keep up with the data. I think turning of reallocation always gives 1 discontiguous block for medium-sized files, but not many more than that. That still doubles ot triples the number of data i/o's for files of size about 128K (1 block is often split into 3 by a seek in the middle). > Modified: head/sys/ufs/ffs/ffs_alloc.c > ============================================================================== > --- head/sys/ufs/ffs/ffs_alloc.c Fri Oct 16 03:03:04 2015 (r289404) > +++ head/sys/ufs/ffs/ffs_alloc.c Fri Oct 16 03:06:02 2015 (r289405) > @@ -481,9 +481,19 @@ ffs_reallocblks(ap) > struct cluster_save *a_buflist; > } */ *ap; > { > + struct ufsmount *ump; > > - if (doreallocblks == 0) The correct way to configure this is a mount option, not this sysctl variable. I think the variable was only intended for turning off reallocation when it was buggy. In 4.4SD-Lite2, this variable wasn't even private for ffs, and old versions of FreeBSD misused it in ext2fs. The related sysctl variables noclusterr and noclusterw were misconfigured similarly in 4.4BSD-Lite2, but FreeBSD fixed this by turning them into mount options, despite them probably being less important than doreallocblocks. I only use them to see if vfs clustering is still useful. Unfortunately, it still is in most cases. It is too complicated, and too heavyweight. But its weight is still smaller than more i/o's for smaller blocks, at least on non-memory disks. I think the cleanup was motivated mainly for non-automatic use of the flags on memory disks in pc98. Configuration of memory disks in main memory is also badly supported. I think md(4) still gives double-caching for all types of backing store, so if iops is not a problem then doreallocblks and cluster[rw] should be turned off in all cases for md to recover a small part of the loss from the double-caching, but md doesn't know anything about this. Oops, actually md does try to avoid the double-caching, but it does this for all reads (by using IO_DIRECT) for all types of backing store, and this destroys performance for at least the case of vnode-backed disks with the vnode on a hard disk. IO_DIRECT certainly prevents clustering. Then if it works as intended to avoid double-caching, it also gives many more i/o's than necessary if there is a block size mismatch. Perhaps 128 times as many for a 64K:512 mismatch (128 reads of different virtual 512-blocks are mapped to 128 reads of the same physical 64K-block. IO_DIRECT prevents caching of the physical block. The virtual blocks should be clustered into part of 1 128K- block, but don't seem to be. Bruce From owner-svn-src-all@freebsd.org Fri Oct 16 08:10:32 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 832D0A16897; Fri, 16 Oct 2015 08:10:32 +0000 (UTC) (envelope-from hp@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 49B7F1DBA; Fri, 16 Oct 2015 08:10:30 +0000 (UTC) (envelope-from hp@selasky.org) Received: from laptop015.home.selasky.org (cm-176.74.213.204.customer.telag.net [176.74.213.204]) (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 0C6581FE022; Fri, 16 Oct 2015 10:10:29 +0200 (CEST) Subject: Re: svn commit: r289405 - head/sys/ufs/ffs To: Bruce Evans , Warner Losh References: <201510160306.t9G3622O049128@repo.freebsd.org> <20151016151349.W1280@besplex.bde.org> Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org From: Hans Petter Selasky Message-ID: <5620B15C.8090104@selasky.org> Date: Fri, 16 Oct 2015 10:12:12 +0200 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:38.0) Gecko/20100101 Thunderbird/38.2.0 MIME-Version: 1.0 In-Reply-To: <20151016151349.W1280@besplex.bde.org> 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 " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Oct 2015 08:10:32 -0000 On 10/16/15 08:21, Bruce Evans wrote: > In addition, making the file contiguous in LBA space doesn't > improve the access times from flash devices because they have no seek > time. Hi, This is not exactly true, like Bruce pointed out too. Maybe there should be a check, that if the block is too small reallocate it, else leave it for the sake of the flash. Doing 1K accesses versus 64K accesses will typically show up in the performance benchmark regardless of how fast the underlying medium is. --HPS From owner-svn-src-all@freebsd.org Fri Oct 16 08:53:21 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B45DBA16504; Fri, 16 Oct 2015 08:53:21 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from mail105.syd.optusnet.com.au (mail105.syd.optusnet.com.au [211.29.132.249]) by mx1.freebsd.org (Postfix) with ESMTP id 706AF149D; Fri, 16 Oct 2015 08:53:20 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from c211-30-166-197.carlnfd1.nsw.optusnet.com.au (c211-30-166-197.carlnfd1.nsw.optusnet.com.au [211.30.166.197]) by mail105.syd.optusnet.com.au (Postfix) with ESMTPS id 8DBCF10409F7; Fri, 16 Oct 2015 19:53:09 +1100 (AEDT) Date: Fri, 16 Oct 2015 19:53:06 +1100 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: Hans Petter Selasky cc: Bruce Evans , Warner Losh , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r289405 - head/sys/ufs/ffs In-Reply-To: <5620B15C.8090104@selasky.org> Message-ID: <20151016194242.N2138@besplex.bde.org> References: <201510160306.t9G3622O049128@repo.freebsd.org> <20151016151349.W1280@besplex.bde.org> <5620B15C.8090104@selasky.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Optus-CM-Score: 0 X-Optus-CM-Analysis: v=2.1 cv=R4L+YolX c=1 sm=1 tr=0 a=KA6XNC2GZCFrdESI5ZmdjQ==:117 a=PO7r1zJSAAAA:8 a=JzwRw_2MAAAA:8 a=kj9zAlcOel0A:10 a=Yp1Ll2uoM9ACfSKRgMIA:9 a=CjuIK1q_8ugA:10 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Oct 2015 08:53:21 -0000 On Fri, 16 Oct 2015, Hans Petter Selasky wrote: > On 10/16/15 08:21, Bruce Evans wrote: >> [Bruce Evans didn't write:] >> In addition, making the file contiguous in LBA space doesn't >> improve the access times from flash devices because they have no seek >> time. > > This is not exactly true, like Bruce pointed out too. Maybe there should be a > check, that if the block is too small reallocate it, else leave it for the > sake of the flash. Doing 1K accesses versus 64K accesses will typically show > up in the performance benchmark regardless of how fast the underlying medium > is. Now I don't unerstand the whole point of the change. Anything that reduces i/o's is good, but AFAIK ffs_doreallocblks() is all in software. Writes should be delayed so that it doesn't have to do extra i/o's to back out of committed writes. Often it reduces the number of writes and increases their size by making blocks contiguous so that the write can be clustered. Increasing the write size is especially good for flash devices, but maybe ffs's default block size is already large enough. Bruce From owner-svn-src-all@freebsd.org Fri Oct 16 08:57:13 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3953DA165B3; Fri, 16 Oct 2015 08:57:13 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 01C9117D1; Fri, 16 Oct 2015 08:57:12 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t9G8vCGZ051733; Fri, 16 Oct 2015 08:57:12 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9G8vBUV051731; Fri, 16 Oct 2015 08:57:11 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201510160857.t9G8vBUV051731@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Fri, 16 Oct 2015 08:57:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289415 - in 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 " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Oct 2015 08:57:13 -0000 Author: mav Date: Fri Oct 16 08:57:11 2015 New Revision: 289415 URL: https://svnweb.freebsd.org/changeset/base/289415 Log: Bump version and add notice about incompatibility introduced by resumable send/receive support in ZFS. Modified: head/UPDATING head/sys/sys/param.h Modified: head/UPDATING ============================================================================== --- head/UPDATING Fri Oct 16 08:22:21 2015 (r289414) +++ head/UPDATING Fri Oct 16 08:57:11 2015 (r289415) @@ -31,6 +31,12 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 11 disable the most expensive debugging functionality run "ln -s 'abort:false,junk:false' /etc/malloc.conf".) +20151015: + Added ZFS support for resumable send/receive changed respective + IOCTL API/ABI. Compatibility ABI shims were provided for other + functionality, while receive require version match between world + and kernel. + 20151012: If you specify SENDMAIL_MC or SENDMAIL_CF in make.conf, mergemaster and etcupdate will now use this file. A custom sendmail.cf is now Modified: head/sys/sys/param.h ============================================================================== --- head/sys/sys/param.h Fri Oct 16 08:22:21 2015 (r289414) +++ head/sys/sys/param.h Fri Oct 16 08:57:11 2015 (r289415) @@ -58,7 +58,7 @@ * in the range 5 to 9. */ #undef __FreeBSD_version -#define __FreeBSD_version 1100080 /* Master, propagated to newvers */ +#define __FreeBSD_version 1100081 /* Master, propagated to newvers */ /* * __FreeBSD_kernel__ indicates that this system uses the kernel of FreeBSD, From owner-svn-src-all@freebsd.org Fri Oct 16 10:26:17 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 059829D2F3A; Fri, 16 Oct 2015 10:26:17 +0000 (UTC) (envelope-from ed@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C1FA963C; Fri, 16 Oct 2015 10:26:16 +0000 (UTC) (envelope-from ed@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t9GAQFVT077697; Fri, 16 Oct 2015 10:26:15 GMT (envelope-from ed@FreeBSD.org) Received: (from ed@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9GAQFjk077696; Fri, 16 Oct 2015 10:26:15 GMT (envelope-from ed@FreeBSD.org) Message-Id: <201510161026.t9GAQFjk077696@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ed set sender to ed@FreeBSD.org using -f From: Ed Schouten Date: Fri, 16 Oct 2015 10:26:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289417 - head/sys/modules/cloudabi64 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Oct 2015 10:26:17 -0000 Author: ed Date: Fri Oct 16 10:26:15 2015 New Revision: 289417 URL: https://svnweb.freebsd.org/changeset/base/289417 Log: Use the right variable name. MACHINE_CPUARCH expands to aarch64 for arm64, whereas MACHINE always corresponds to the directory name under sys/ that contains the sources for that architecture. Modified: head/sys/modules/cloudabi64/Makefile Modified: head/sys/modules/cloudabi64/Makefile ============================================================================== --- head/sys/modules/cloudabi64/Makefile Fri Oct 16 09:37:15 2015 (r289416) +++ head/sys/modules/cloudabi64/Makefile Fri Oct 16 10:26:15 2015 (r289417) @@ -1,7 +1,7 @@ # $FreeBSD$ .PATH: ${.CURDIR}/../../compat/cloudabi64 -.PATH: ${.CURDIR}/../../${MACHINE_CPUARCH}/cloudabi64 +.PATH: ${.CURDIR}/../../${MACHINE}/cloudabi64 KMOD= cloudabi64 SRCS= cloudabi64_fd.c cloudabi64_poll.c cloudabi64_sock.c \ From owner-svn-src-all@freebsd.org Fri Oct 16 12:16:36 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B1DE0A1669F; Fri, 16 Oct 2015 12:16:36 +0000 (UTC) (envelope-from pho@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7F3B69; Fri, 16 Oct 2015 12:16:36 +0000 (UTC) (envelope-from pho@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t9GCGZNN009763; Fri, 16 Oct 2015 12:16:35 GMT (envelope-from pho@FreeBSD.org) Received: (from pho@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9GCGZ7W009762; Fri, 16 Oct 2015 12:16:35 GMT (envelope-from pho@FreeBSD.org) Message-Id: <201510161216.t9GCGZ7W009762@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: pho set sender to pho@FreeBSD.org using -f From: Peter Holm Date: Fri, 16 Oct 2015 12:16: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: r289418 - stable/10/sys/kern 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 " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Oct 2015 12:16:36 -0000 Author: pho Date: Fri Oct 16 12:16:35 2015 New Revision: 289418 URL: https://svnweb.freebsd.org/changeset/base/289418 Log: Fix build with options DIAGNOSTIC. Sponsored by: EMC / Isilon storage division In collaboration with: kib Modified: stable/10/sys/kern/vfs_cache.c Modified: stable/10/sys/kern/vfs_cache.c ============================================================================== --- stable/10/sys/kern/vfs_cache.c Fri Oct 16 10:26:15 2015 (r289417) +++ stable/10/sys/kern/vfs_cache.c Fri Oct 16 12:16:35 2015 (r289418) @@ -324,11 +324,9 @@ static SYSCTL_NODE(_debug, OID_AUTO, has static int sysctl_debug_hashstat_rawnchash(SYSCTL_HANDLER_ARGS) { - int error; struct nchashhead *ncpp; struct namecache *ncp; - int n_nchash; - int count; + int i, error, n_nchash, *cntbuf; retry: n_nchash = nchash + 1; /* nchash is max index, not count */ From owner-svn-src-all@freebsd.org Fri Oct 16 12:21:45 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id BE96CA168C8; Fri, 16 Oct 2015 12:21:45 +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 6FA78638; Fri, 16 Oct 2015 12:21: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 t9GCLi4i012505; Fri, 16 Oct 2015 12:21:44 GMT (envelope-from des@FreeBSD.org) Received: (from des@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9GCLiuE012504; Fri, 16 Oct 2015 12:21:44 GMT (envelope-from des@FreeBSD.org) Message-Id: <201510161221.t9GCLiuE012504@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?= Date: Fri, 16 Oct 2015 12:21:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289419 - 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 " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Oct 2015 12:21:45 -0000 Author: des Date: Fri Oct 16 12:21:44 2015 New Revision: 289419 URL: https://svnweb.freebsd.org/changeset/base/289419 Log: Fix two bugs in HTTPS tunnelling: - If the proxy returns a non-200 result, set the error code accordingly so the caller / user gets a somewhat meaningful error message. - Consume and discard any HTTP response header following the result line. PR: 194483 Tested by: Fabian Keil MFC after: 1 week Modified: head/lib/libfetch/http.c Modified: head/lib/libfetch/http.c ============================================================================== --- head/lib/libfetch/http.c Fri Oct 16 12:16:35 2015 (r289418) +++ head/lib/libfetch/http.c Fri Oct 16 12:21:44 2015 (r289419) @@ -1376,8 +1376,12 @@ http_connect(struct url *URL, struct url { struct url *curl; conn_t *conn; + hdr_t h; + http_headerbuf_t headerbuf; + const char *p; int verbose; int af, val; + int serrno; #ifdef INET6 af = AF_UNSPEC; @@ -1398,6 +1402,7 @@ http_connect(struct url *URL, struct url if ((conn = fetch_connect(curl->host, curl->port, af, verbose)) == NULL) /* fetch_connect() has already set an error code */ return (NULL); + init_http_headerbuf(&headerbuf); if (strcasecmp(URL->scheme, SCHEME_HTTPS) == 0 && purl) { http_cmd(conn, "CONNECT %s:%d HTTP/1.1", URL->host, URL->port); @@ -1405,10 +1410,26 @@ http_connect(struct url *URL, struct url URL->host, URL->port); http_cmd(conn, ""); if (http_get_reply(conn) != HTTP_OK) { - fetch_close(conn); - return (NULL); + http_seterr(conn->err); + goto ouch; } - http_get_reply(conn); + /* Read and discard the rest of the proxy response */ + if (fetch_getln(conn) < 0) { + fetch_syserr(); + goto ouch; + } + do { + switch ((h = http_next_header(conn, &headerbuf, &p))) { + case hdr_syserror: + fetch_syserr(); + goto ouch; + case hdr_error: + http_seterr(HTTP_PROTOCOL_ERROR); + goto ouch; + default: + /* ignore */ ; + } + } while (h < hdr_end); } if (strcasecmp(URL->scheme, SCHEME_HTTPS) == 0 && fetch_ssl(conn, URL, verbose) == -1) { @@ -1416,13 +1437,20 @@ http_connect(struct url *URL, struct url /* grrr */ errno = EAUTH; fetch_syserr(); - return (NULL); + goto ouch; } val = 1; setsockopt(conn->sd, IPPROTO_TCP, TCP_NOPUSH, &val, sizeof(val)); + clean_http_headerbuf(&headerbuf); return (conn); +ouch: + serrno = errno; + clean_http_headerbuf(&headerbuf); + fetch_close(conn); + errno = serrno; + return (NULL); } static struct url * From owner-svn-src-all@freebsd.org Fri Oct 16 12:31:50 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id EB19DA16AE5; Fri, 16 Oct 2015 12:31:50 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from cell.glebius.int.ru (glebius.int.ru [81.19.69.10]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "cell.glebius.int.ru", Issuer "cell.glebius.int.ru" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 72B53CBC; Fri, 16 Oct 2015 12:31:49 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from cell.glebius.int.ru (localhost [127.0.0.1]) by cell.glebius.int.ru (8.15.2/8.15.2) with ESMTPS id t9GCVeRW049457 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Fri, 16 Oct 2015 15:31:40 +0300 (MSK) (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by cell.glebius.int.ru (8.15.2/8.15.2/Submit) id t9GCVeGk049456; Fri, 16 Oct 2015 15:31:40 +0300 (MSK) (envelope-from glebius@FreeBSD.org) X-Authentication-Warning: cell.glebius.int.ru: glebius set sender to glebius@FreeBSD.org using -f Date: Fri, 16 Oct 2015 15:31:39 +0300 From: Gleb Smirnoff To: "Bjoern A. Zeeb" Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r289350 - head/sys/netinet Message-ID: <20151016123139.GX1023@FreeBSD.org> References: <201510150144.t9F1iWdo089946@repo.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201510150144.t9F1iWdo089946@repo.freebsd.org> User-Agent: Mutt/1.5.23 (2014-03-12) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Oct 2015 12:31:51 -0000 On Thu, Oct 15, 2015 at 01:44:32AM +0000, Bjoern A. Zeeb wrote: B> Author: bz B> Date: Thu Oct 15 01:44:32 2015 B> New Revision: 289350 B> URL: https://svnweb.freebsd.org/changeset/base/289350 B> B> Log: B> Hopefully also unbreak VIMAGE kernels replacing the &V_... with B> &VNET_NAME(...). B> Everything else is just a whitespace wrapping change. B> B> Modified: B> head/sys/netinet/tcp_pcap.c B> B> Modified: head/sys/netinet/tcp_pcap.c B> ============================================================================== B> --- head/sys/netinet/tcp_pcap.c Thu Oct 15 01:09:14 2015 (r289349) B> +++ head/sys/netinet/tcp_pcap.c Thu Oct 15 01:44:32 2015 (r289350) B> @@ -70,9 +70,9 @@ SYSCTL_INT(_net_inet_tcp, OID_AUTO, tcp_ B> B> VNET_DEFINE(int, tcp_pcap_packets) = 0; B> #define V_tcp_pcap_packets VNET(tcp_pcap_packets) B> -SYSCTL_INT(_net_inet_tcp, OID_AUTO, tcp_pcap_packets, CTLFLAG_RW, B> - &V_tcp_pcap_packets, 0, "Default number of packets saved per direction " B> - "per TCPCB"); B> +SYSCTL_INT(_net_inet_tcp, OID_AUTO, tcp_pcap_packets, B> + CTLFLAG_RW, &VNET_NAME(tcp_pcap_packets), 0, B> + "Default number of packets saved per direction per TCPCB"); It also lacks CTLFLAG_VNET flag. Will panic on write now. -- Totus tuus, Glebius. From owner-svn-src-all@freebsd.org Fri Oct 16 12:53:23 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B96A7A16FC5; Fri, 16 Oct 2015 12:53: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 839441923; Fri, 16 Oct 2015 12:53: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 t9GCrM4S021614; Fri, 16 Oct 2015 12:53:22 GMT (envelope-from des@FreeBSD.org) Received: (from des@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9GCrMb5021613; Fri, 16 Oct 2015 12:53:22 GMT (envelope-from des@FreeBSD.org) Message-Id: <201510161253.t9GCrMb5021613@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?= Date: Fri, 16 Oct 2015 12:53:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289420 - 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 " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Oct 2015 12:53:23 -0000 Author: des Date: Fri Oct 16 12:53:22 2015 New Revision: 289420 URL: https://svnweb.freebsd.org/changeset/base/289420 Log: Use fopen()'s newfangled "e" flag instead of explicit fcntl() calls. PR: 199801 Submitted by: Jukka Ukkonen MFC after: 1 week Modified: head/lib/libfetch/file.c Modified: head/lib/libfetch/file.c ============================================================================== --- head/lib/libfetch/file.c Fri Oct 16 12:21:44 2015 (r289419) +++ head/lib/libfetch/file.c Fri Oct 16 12:53:22 2015 (r289420) @@ -48,7 +48,7 @@ fetchXGetFile(struct url *u, struct url_ if (us && fetchStatFile(u, us, flags) == -1) return (NULL); - f = fopen(u->doc, "r"); + f = fopen(u->doc, "re"); if (f == NULL) { fetch_syserr(); @@ -61,7 +61,6 @@ fetchXGetFile(struct url *u, struct url_ return (NULL); } - fcntl(fileno(f), F_SETFD, FD_CLOEXEC); return (f); } @@ -77,9 +76,9 @@ fetchPutFile(struct url *u, const char * FILE *f; if (CHECK_FLAG('a')) - f = fopen(u->doc, "a"); + f = fopen(u->doc, "ae"); else - f = fopen(u->doc, "w+"); + f = fopen(u->doc, "w+e"); if (f == NULL) { fetch_syserr(); @@ -92,7 +91,6 @@ fetchPutFile(struct url *u, const char * return (NULL); } - fcntl(fileno(f), F_SETFD, FD_CLOEXEC); return (f); } From owner-svn-src-all@freebsd.org Fri Oct 16 13:19:49 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 33C9CA16B5F; Fri, 16 Oct 2015 13:19:49 +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 E5A761181; Fri, 16 Oct 2015 13:19:48 +0000 (UTC) (envelope-from slw@zxy.spb.ru) Received: from slw by zxy.spb.ru with local (Exim 4.84 (FreeBSD)) (envelope-from ) id 1Zn4v6-000C33-C5; Fri, 16 Oct 2015 16:19:40 +0300 Date: Fri, 16 Oct 2015 16:19:40 +0300 From: Slawa Olhovchenkov To: Warner Losh Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r289405 - head/sys/ufs/ffs Message-ID: <20151016131940.GE42243@zxy.spb.ru> References: <201510160306.t9G3622O049128@repo.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201510160306.t9G3622O049128@repo.freebsd.org> User-Agent: Mutt/1.5.23 (2014-03-12) X-SA-Exim-Connect-IP: X-SA-Exim-Mail-From: slw@zxy.spb.ru X-SA-Exim-Scanned: No (on zxy.spb.ru); SAEximRunCond expanded to false X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Oct 2015 13:19:49 -0000 On Fri, Oct 16, 2015 at 03:06:02AM +0000, Warner Losh wrote: > Author: imp > Date: Fri Oct 16 03:06:02 2015 > New Revision: 289405 > URL: https://svnweb.freebsd.org/changeset/base/289405 > > Log: > Do not relocate extents to make them contiguous if the underlying drive can do > deletions. Ability to do deletions is a strong indication that this > optimization will not help performance. It will only generate extra write > traffic. These devices are typically flash based and have a limited number of > write cycles. In addition, making the file contiguous in LBA space doesn't > improve the access times from flash devices because they have no seek time. In reality, flash devices have seek time, about 0.1ms. Many flash devices can do 8 simultaneously "seek" (I think NVMe can do more). From owner-svn-src-all@freebsd.org Fri Oct 16 14:03:56 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2F192A16900 for ; Fri, 16 Oct 2015 14:03:56 +0000 (UTC) (envelope-from pfg@FreeBSD.org) Received: from nm3-vm0.bullet.mail.bf1.yahoo.com (nm3-vm0.bullet.mail.bf1.yahoo.com [98.139.212.154]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id CE25514EA for ; Fri, 16 Oct 2015 14:03:55 +0000 (UTC) (envelope-from pfg@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1445004228; bh=VnUQJiuBvXj7yTM/r9l7XPJlG/W8/3ERiObqBbQUesY=; h=Subject:To:References:Cc:From:Date:In-Reply-To:From:Subject; b=rZVWjdw7+w7ojbboUg7OlKDdy6h2dBMCHywnern8y3twh//pCnJPfKXWs/rYZ1lCPzvlTbCod0qjQO944WlQzrklOd7kXphXmaJB2FwfaqcnNTt2ea9mrb0tI1SS+p/Ka3ONkUGkiG/BsaKGtIOI6SBfR8LI5UGzu/it6X4136SdcfnugxPsy/clnJXCZZC398c88xQ5XRagz2vxUDdcmofZjWHALT0rwwivIg76syK88CyzEFIMtwVitrpJN2QHoB6gy12JX5psgSH828/qgE9ft4pUgV0mCSQlzcBltv5jNcT4XGmA0BtXvgxFIz20QwZSphJw/f4mG8pPptKN7g== Received: from [98.139.170.179] by nm3.bullet.mail.bf1.yahoo.com with NNFMP; 16 Oct 2015 14:03:48 -0000 Received: from [68.142.230.78] by tm22.bullet.mail.bf1.yahoo.com with NNFMP; 16 Oct 2015 14:03:48 -0000 Received: from [127.0.0.1] by smtp235.mail.bf1.yahoo.com with NNFMP; 16 Oct 2015 14:03:48 -0000 X-Yahoo-Newman-Id: 697641.67357.bm@smtp235.mail.bf1.yahoo.com X-Yahoo-Newman-Property: ymail-3 X-YMail-OSG: ZToBMZUVM1m9DV2WWHydO_Kt2eRZupw1jYh7lJ95ZnxgdiD 1xdIZzFpAZcUzfmb12fTXdf0HvR8XYVytVHT0PvdQ9SoWwTzjIh4PC4r07jk vXRukcocROQU68SbIKaRUS8vq9J8zvYGXswnGkO97MITZH1lLNWjfGdbySNX kBqWpgtUcApiigYLcdTWB_E_1jG14CcVU_2_2JHGKUOnEdsJWCSQz8ZswacQ jvP0suJXVMCKwqIV2nZWRORuVmDsw744BEn3EFIXA5wNRE3tmjvRfzoOVioM y3ptiRcdfUjIIK_ZmQsar6OZ56dae3L6X6QtdUkHeT8vPj.YWeWks3MvsTEP d8pRYvfQ9dql91ADVSNo76jrSJvaDLPhJVm.DS3gJbTDFkL.avL6uqCqho9Q tKumr7snXju50nJh4GVU3tK8IF9RHyR71irvSDSq8mmtaHIbKZMOw._Y2Exs W4MjAIcRe9xcTxoNXpgt.0SFxdpokK9hBuReI6wSOGfn033W5eyV.qPpVxEV mj7GKBpL7fMaTUJBHE1Lo2IM.ymD6Urt2 X-Yahoo-SMTP: xcjD0guswBAZaPPIbxpWwLcp9Unf Subject: Re: svn commit: r289405 - head/sys/ufs/ffs To: Bruce Evans , Hans Petter Selasky References: <201510160306.t9G3622O049128@repo.freebsd.org> <20151016151349.W1280@besplex.bde.org> <5620B15C.8090104@selasky.org> <20151016194242.N2138@besplex.bde.org> Cc: Warner Losh , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org From: Pedro Giffuni Message-ID: <562103B6.2090406@FreeBSD.org> Date: Fri, 16 Oct 2015 09:03:34 -0500 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:38.0) Gecko/20100101 Thunderbird/38.2.0 MIME-Version: 1.0 In-Reply-To: <20151016194242.N2138@besplex.bde.org> 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 " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Oct 2015 14:03:56 -0000 On 10/16/15 03:53, Bruce Evans wrote: > On Fri, 16 Oct 2015, Hans Petter Selasky wrote: > >> On 10/16/15 08:21, Bruce Evans wrote: >>> [Bruce Evans didn't write:] >>> In addition, making the file contiguous in LBA space doesn't >>> improve the access times from flash devices because they have no seek >>> time. >> >> This is not exactly true, like Bruce pointed out too. Maybe there >> should be a check, that if the block is too small reallocate it, else >> leave it for the sake of the flash. Doing 1K accesses versus 64K >> accesses will typically show up in the performance benchmark >> regardless of how fast the underlying medium is. > > Now I don't unerstand the whole point of the change. Anything that reduces > i/o's is good, but AFAIK ffs_doreallocblks() is all in software. Writes > should be delayed so that it doesn't have to do extra i/o's to back out of > committed writes. Often it reduces the number of writes and increases > their size by making blocks contiguous so that the write can be clustered. > Increasing the write size is especially good for flash devices, but maybe > ffs's default block size is already large enough. > I agree with Bruce: reallocation (which our ext2fs also does) happens in memory, before it hits the disk. By the nature of their load, Netflix doesn't care about fragmentation, but even in that case reallocblk doesn't hurt, and I don't see anything inherent in SSDs that makes fragmentation desirable. Of course, no one understands reallocblk better than Kirk, and Warner knows SSD's pretty well so I must be missing something. :). Pedro. From owner-svn-src-all@freebsd.org Fri Oct 16 14:04:18 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 05CD6A16934; Fri, 16 Oct 2015 14:04:18 +0000 (UTC) (envelope-from cy@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B520F177B; Fri, 16 Oct 2015 14:04:17 +0000 (UTC) (envelope-from cy@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t9GE4GjR046441; Fri, 16 Oct 2015 14:04:16 GMT (envelope-from cy@FreeBSD.org) Received: (from cy@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9GE4GqM046436; Fri, 16 Oct 2015 14:04:16 GMT (envelope-from cy@FreeBSD.org) Message-Id: <201510161404.t9GE4GqM046436@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cy set sender to cy@FreeBSD.org using -f From: Cy Schubert Date: Fri, 16 Oct 2015 14:04:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289421 - in head/etc: . mtree ntp X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Oct 2015 14:04:18 -0000 Author: cy Date: Fri Oct 16 14:04:16 2015 New Revision: 289421 URL: https://svnweb.freebsd.org/changeset/base/289421 Log: Add default leap-seconds file. This should help ntp networks get the leap second date correct Updates to the file can be obtained from ftp://time.nist.gov/pub/ or ftp://tycho.usno.navy.mil/pub/ntp/. Suggested by: dwmalone Reviewed by: roberto, dwmalone, delphij Approved by: roberto MFC after: 1 week Added: head/etc/ntp/ head/etc/ntp/Makefile (contents, props changed) head/etc/ntp/leap-seconds (contents, props changed) Modified: head/etc/Makefile head/etc/mtree/BSD.var.dist head/etc/ntp.conf Modified: head/etc/Makefile ============================================================================== --- head/etc/Makefile Fri Oct 16 12:53:22 2015 (r289420) +++ head/etc/Makefile Fri Oct 16 14:04:16 2015 (r289421) @@ -240,6 +240,9 @@ distribution: ${_+_}cd ${.CURDIR}/defaults; ${MAKE} install ${_+_}cd ${.CURDIR}/devd; ${MAKE} install ${_+_}cd ${.CURDIR}/gss; ${MAKE} install +.if ${MK_NTP} != "no" + ${_+_}cd ${.CURDIR}/ntp; ${MAKE} install +.endif ${_+_}cd ${.CURDIR}/periodic; ${MAKE} install .if ${MK_PKGBOOTSTRAP} != "no" ${_+_}cd ${.CURDIR}/pkg; ${MAKE} install Modified: head/etc/mtree/BSD.var.dist ============================================================================== --- head/etc/mtree/BSD.var.dist Fri Oct 16 12:53:22 2015 (r289420) +++ head/etc/mtree/BSD.var.dist Fri Oct 16 14:04:16 2015 (r289421) @@ -46,6 +46,8 @@ .. ipf mode=0700 .. + ntp mode=0700 + .. pkg .. ports Modified: head/etc/ntp.conf ============================================================================== --- head/etc/ntp.conf Fri Oct 16 12:53:22 2015 (r289420) +++ head/etc/ntp.conf Fri Oct 16 14:04:16 2015 (r289421) @@ -77,3 +77,8 @@ restrict 127.127.1.0 # #server 127.127.1.0 #fudge 127.127.1.0 stratum 10 + +# See http://support.ntp.org/bin/view/Support/ConfiguringNTP#Section_6.14. +# for documentation regarding leapfile. Updates to the file can be obtained +# from ftp://time.nist.gov/pub/ or ftp://tycho.usno.navy.mil/pub/ntp/. +leapfile "/etc/ntp/leap-seconds" Added: head/etc/ntp/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/etc/ntp/Makefile Fri Oct 16 14:04:16 2015 (r289421) @@ -0,0 +1,10 @@ +# $FreeBSD$ + +NO_OBJ= + +FILES= leap-seconds + +FILESDIR= /etc/ntp +FILESMODE= 644 + +.include Added: head/etc/ntp/leap-seconds ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/etc/ntp/leap-seconds Fri Oct 16 14:04:16 2015 (r289421) @@ -0,0 +1,119 @@ +# +# $FreeBSD$ +# +# ATOMIC TIME. +# The Coordinated Universal Time (UTC) is the reference time scale derived +# from The "Temps Atomique International" (TAI) calculated by the Bureau +# International des Poids et Mesures (BIPM) using a worldwide network of atomic +# clocks. UTC differs from TAI by an integer number of seconds; it is the basis +# of all activities in the world. +# +# +# ASTRONOMICAL TIME (UT1) is the time scale based on the rate of rotation of the earth. +# It is now mainly derived from Very Long Baseline Interferometry (VLBI). The various +# irregular fluctuations progressively detected in the rotation rate of the Earth lead +# in 1972 to the replacement of UT1 by UTC as the reference time scale. +# +# +# LEAP SECOND +# Atomic clocks are more stable than the rate of the earth rotatiob since the later +# undergoes a full range of geophysical perturbations at various time scales (lunisolar +# and core-mantle torques,atmospheric and oceanic effetcs, ...) +# Leap seconds are needed to keep the two time scales in agreement, i.e. UT1-UTC smaller +# than 0.9 second. So, when necessary a "leap second" is introduced in UTC. +# Since the adoption of this system in 1972 it has been necessary to add 26 seconds to UTC, +# firstly due to the initial choice of the value of the second (1/86400 mean solar day of +# the year 1820) and secondly to the general slowing down of the Earth's rotation. It is +# theorically possible to have a negative leap second (a second removed from UTC), but so far, +# all leap seconds have been positive (a second has been added to UTC). Based on what we know about the earth's rotation, +# it is unlikely that we will ever have a negative leap second. +# +# +# HISTORY +# The first leap second was added on June 30, 1972. Until 2000, it was necessary in average to add a leap second at a rate +# of 1 to 2 years. Since 2000, due to the fact that the earth rate of rotation is accelerating, leap seconds are introduced +# with an average frequency of 3 to 4 years. +# +# +# RESPONSABILITY OF THE DECISION TO INTRODUCE A LEAP SECOND IN UTC +# The decision to introduce a leap second in UTC is the responsibility of the Earth Orientation Center of +# the International Earth Rotation and reference System Service (IERS). This center is located at Paris +# Observatory. According to international agreements, leap second date have to occur at fixed date : +# first preference is given to the end of December and June, and second preference at the end of March +# and September. Since the system was introduced in 1972, only dates in June and December were used. +# +# Questions or comments to: +# Daniel Gambis, daniel.gambis@obspm.fr +# Christian Bizouard: christian.bizouard@obspm.fr +# Earth orientation Center of the IERS +# Paris Observatory, France +# +# +# +# VALIDITY OF THE FILE +# It is important to express the validity of the file. These next two dates are +# given in units of seconds since 1900.0. +# +# 1) Last update of the file. +# +# Updated through IERS Bulletin C (ftp://hpiers.obspm.fr/iers/bul/bulc/bulletinc.dat) +# +# The following line shows the last update of this file in NTP timestamp: +# +#$ 3645216000 +# +# 2) Expiration date of the file given on a semi-annual basis: last June or last December +# +# File expires on 28 December 2015 +# +# Expire date in NTP timestamp: +# +#@ 3660249600 +# +# +# LIST OF LEAP SECONDS +# NTP timestamp (X parameter) is the number of seconds since 1900.0 +# +# MJD: The Modified Julian Day number. MJD = X/86400 + 15020 +# +# DTAI: The difference DTAI= TAI-UTC in units of seconds +# It is the quantity to add to UTC to get the time in TAI +# +# Day Month Year : epoch in clear +# +#NTP Time DTAI Day Month Year +# +2272060800 10 # 1 Jan 1972 +2287785600 11 # 1 Jul 1972 +2303683200 12 # 1 Jan 1973 +2335219200 13 # 1 Jan 1974 +2366755200 14 # 1 Jan 1975 +2398291200 15 # 1 Jan 1976 +2429913600 16 # 1 Jan 1977 +2461449600 17 # 1 Jan 1978 +2492985600 18 # 1 Jan 1979 +2524521600 19 # 1 Jan 1980 +2571782400 20 # 1 Jul 1981 +2603318400 21 # 1 Jul 1982 +2634854400 22 # 1 Jul 1983 +2698012800 23 # 1 Jul 1985 +2776982400 24 # 1 Jan 1988 +2840140800 25 # 1 Jan 1990 +2871676800 26 # 1 Jan 1991 +2918937600 27 # 1 Jul 1992 +2950473600 28 # 1 Jul 1993 +2982009600 29 # 1 Jul 1994 +3029443200 30 # 1 Jan 1996 +3076704000 31 # 1 Jul 1997 +3124137600 32 # 1 Jan 1999 +3345062400 33 # 1 Jan 2006 +3439756800 34 # 1 Jan 2009 +3550089600 35 # 1 Jul 2012 +3644697600 36 # 1 Jul 2015 +# +# In order to verify the integrity of this file, a hash code +# has been generated. For more information how to use +# this hash code, please consult the README file under the +# 'sha' repertory. +# +#h 620ba8af 37900668 95ac09ba d77640f9 6fd75493 From owner-svn-src-all@freebsd.org Fri Oct 16 14:45:25 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B307BA164AF; Fri, 16 Oct 2015 14:45:25 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5F16B12CD; Fri, 16 Oct 2015 14:45:25 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t9GEjOjB059254; Fri, 16 Oct 2015 14:45:24 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9GEjMbK059229; Fri, 16 Oct 2015 14:45:22 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201510161445.t9GEjMbK059229@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Fri, 16 Oct 2015 14:45:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289422 - in head: cddl/contrib/opensolaris/lib/libzfs/common sys/cddl/contrib/opensolaris/common/zfs sys/cddl/contrib/opensolaris/uts/common/fs/zfs sys/cddl/contrib/opensolaris/uts/com... X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Oct 2015 14:45:25 -0000 Author: mav Date: Fri Oct 16 14:45:21 2015 New Revision: 289422 URL: https://svnweb.freebsd.org/changeset/base/289422 Log: MFV r289310: 4185 add new cryptographic checksums to ZFS: SHA-512, Skein, Edon-R Reviewed by: George Wilson Reviewed by: Prakash Surya Reviewed by: Saso Kiselkov Reviewed by: Richard Lowe Approved by: Garrett D'Amore Author: Matthew Ahrens illumos/illumos-gate@45818ee124adeaaf947698996b4f4c722afc6d1f This is only a partial merge of respective ZFS infrastructure changes. At this moment FreeBSD kernel has no those crypto algorithms, so the parts of the code to enable them are commented out. When they are implemented, it will be trivial to plug them in. Added: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/edonr_zfs.c - copied unchanged from r289310, vendor-sys/illumos/dist/uts/common/fs/zfs/edonr_zfs.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/skein_zfs.c - copied unchanged from r289310, vendor-sys/illumos/dist/uts/common/fs/zfs/skein_zfs.c Modified: head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_dataset.c head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_sendrecv.c head/sys/cddl/contrib/opensolaris/common/zfs/zfeature_common.c head/sys/cddl/contrib/opensolaris/common/zfs/zfeature_common.h head/sys/cddl/contrib/opensolaris/common/zfs/zfs_fletcher.c head/sys/cddl/contrib/opensolaris/common/zfs/zfs_fletcher.h head/sys/cddl/contrib/opensolaris/common/zfs/zfs_prop.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/ddt.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_send.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_dataset.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sha256.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa_misc.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dmu.h head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/spa.h head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/spa_impl.h head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zio.h head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zio_checksum.h head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zio.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zio_checksum.c head/sys/cddl/contrib/opensolaris/uts/common/sys/debug.h Directory Properties: head/cddl/contrib/opensolaris/ (props changed) head/cddl/contrib/opensolaris/lib/libzfs/ (props changed) head/sys/cddl/contrib/opensolaris/ (props changed) Modified: head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_dataset.c ============================================================================== --- head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_dataset.c Fri Oct 16 14:04:16 2015 (r289421) +++ head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_dataset.c Fri Oct 16 14:45:21 2015 (r289422) @@ -1493,6 +1493,12 @@ zfs_setprop_error(libzfs_handle_t *hdl, "property setting is not allowed on " "bootable datasets")); (void) zfs_error(hdl, EZFS_NOTSUP, errbuf); + } else if (prop == ZFS_PROP_CHECKSUM || + prop == ZFS_PROP_DEDUP) { + (void) zfs_error_aux(hdl, dgettext(TEXT_DOMAIN, + "property setting is not allowed on " + "root pools")); + (void) zfs_error(hdl, EZFS_NOTSUP, errbuf); } else { (void) zfs_standard_error(hdl, err, errbuf); } Modified: head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_sendrecv.c ============================================================================== --- head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_sendrecv.c Fri Oct 16 14:04:16 2015 (r289421) +++ head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_sendrecv.c Fri Oct 16 14:45:21 2015 (r289422) @@ -1423,7 +1423,7 @@ zfs_send_resume_token_to_nvlist(libzfs_h /* verify checksum */ zio_cksum_t cksum; - fletcher_4_native(compressed, len, &cksum); + fletcher_4_native(compressed, len, NULL, &cksum); if (cksum.zc_word[0] != checksum) { free(compressed); zfs_error_aux(hdl, dgettext(TEXT_DOMAIN, Modified: head/sys/cddl/contrib/opensolaris/common/zfs/zfeature_common.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/common/zfs/zfeature_common.c Fri Oct 16 14:04:16 2015 (r289421) +++ head/sys/cddl/contrib/opensolaris/common/zfs/zfeature_common.c Fri Oct 16 14:45:21 2015 (r289422) @@ -230,4 +230,19 @@ zpool_feature_init(void) "org.open-zfs:large_blocks", "large_blocks", "Support for blocks larger than 128KB.", ZFEATURE_FLAG_PER_DATASET, large_blocks_deps); + +#ifdef illumos + zfeature_register(SPA_FEATURE_SHA512, + "org.illumos:sha512", "sha512", + "SHA-512/256 hash algorithm.", + ZFEATURE_FLAG_PER_DATASET, NULL); + zfeature_register(SPA_FEATURE_SKEIN, + "org.illumos:skein", "skein", + "Skein hash algorithm.", + ZFEATURE_FLAG_PER_DATASET, NULL); + zfeature_register(SPA_FEATURE_EDONR, + "org.illumos:edonr", "edonr", + "Edon-R hash algorithm.", + ZFEATURE_FLAG_PER_DATASET, NULL); +#endif } Modified: head/sys/cddl/contrib/opensolaris/common/zfs/zfeature_common.h ============================================================================== --- head/sys/cddl/contrib/opensolaris/common/zfs/zfeature_common.h Fri Oct 16 14:04:16 2015 (r289421) +++ head/sys/cddl/contrib/opensolaris/common/zfs/zfeature_common.h Fri Oct 16 14:45:21 2015 (r289422) @@ -51,6 +51,11 @@ typedef enum spa_feature { SPA_FEATURE_BOOKMARKS, SPA_FEATURE_FS_SS_LIMIT, SPA_FEATURE_LARGE_BLOCKS, +#ifdef illumos + SPA_FEATURE_SHA512, + SPA_FEATURE_SKEIN, + SPA_FEATURE_EDONR, +#endif SPA_FEATURES } spa_feature_t; Modified: head/sys/cddl/contrib/opensolaris/common/zfs/zfs_fletcher.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/common/zfs/zfs_fletcher.c Fri Oct 16 14:04:16 2015 (r289421) +++ head/sys/cddl/contrib/opensolaris/common/zfs/zfs_fletcher.c Fri Oct 16 14:45:21 2015 (r289422) @@ -22,6 +22,9 @@ * Copyright 2009 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ +/* + * Copyright 2013 Saso Kiselkov. All rights reserved. + */ /* * Fletcher Checksums @@ -131,8 +134,10 @@ #include #include +/*ARGSUSED*/ void -fletcher_2_native(const void *buf, uint64_t size, zio_cksum_t *zcp) +fletcher_2_native(const void *buf, uint64_t size, + const void *ctx_template, zio_cksum_t *zcp) { const uint64_t *ip = buf; const uint64_t *ipend = ip + (size / sizeof (uint64_t)); @@ -148,8 +153,10 @@ fletcher_2_native(const void *buf, uint6 ZIO_SET_CHECKSUM(zcp, a0, a1, b0, b1); } +/*ARGSUSED*/ void -fletcher_2_byteswap(const void *buf, uint64_t size, zio_cksum_t *zcp) +fletcher_2_byteswap(const void *buf, uint64_t size, + const void *ctx_template, zio_cksum_t *zcp) { const uint64_t *ip = buf; const uint64_t *ipend = ip + (size / sizeof (uint64_t)); @@ -165,8 +172,10 @@ fletcher_2_byteswap(const void *buf, uin ZIO_SET_CHECKSUM(zcp, a0, a1, b0, b1); } +/*ARGSUSED*/ void -fletcher_4_native(const void *buf, uint64_t size, zio_cksum_t *zcp) +fletcher_4_native(const void *buf, uint64_t size, + const void *ctx_template, zio_cksum_t *zcp) { const uint32_t *ip = buf; const uint32_t *ipend = ip + (size / sizeof (uint32_t)); @@ -182,8 +191,10 @@ fletcher_4_native(const void *buf, uint6 ZIO_SET_CHECKSUM(zcp, a, b, c, d); } +/*ARGSUSED*/ void -fletcher_4_byteswap(const void *buf, uint64_t size, zio_cksum_t *zcp) +fletcher_4_byteswap(const void *buf, uint64_t size, + const void *ctx_template, zio_cksum_t *zcp) { const uint32_t *ip = buf; const uint32_t *ipend = ip + (size / sizeof (uint32_t)); Modified: head/sys/cddl/contrib/opensolaris/common/zfs/zfs_fletcher.h ============================================================================== --- head/sys/cddl/contrib/opensolaris/common/zfs/zfs_fletcher.h Fri Oct 16 14:04:16 2015 (r289421) +++ head/sys/cddl/contrib/opensolaris/common/zfs/zfs_fletcher.h Fri Oct 16 14:45:21 2015 (r289422) @@ -22,6 +22,9 @@ * Copyright 2009 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ +/* + * Copyright 2013 Saso Kiselkov. All rights reserved. + */ #ifndef _ZFS_FLETCHER_H #define _ZFS_FLETCHER_H @@ -37,14 +40,12 @@ extern "C" { * fletcher checksum functions */ -void fletcher_2_native(const void *, uint64_t, zio_cksum_t *); -void fletcher_2_byteswap(const void *, uint64_t, zio_cksum_t *); -void fletcher_4_native(const void *, uint64_t, zio_cksum_t *); -void fletcher_4_byteswap(const void *, uint64_t, zio_cksum_t *); -void fletcher_4_incremental_native(const void *, uint64_t, - zio_cksum_t *); -void fletcher_4_incremental_byteswap(const void *, uint64_t, - zio_cksum_t *); +void fletcher_2_native(const void *, uint64_t, const void *, zio_cksum_t *); +void fletcher_2_byteswap(const void *, uint64_t, const void *, zio_cksum_t *); +void fletcher_4_native(const void *, uint64_t, const void *, zio_cksum_t *); +void fletcher_4_byteswap(const void *, uint64_t, const void *, zio_cksum_t *); +void fletcher_4_incremental_native(const void *, uint64_t, zio_cksum_t *); +void fletcher_4_incremental_byteswap(const void *, uint64_t, zio_cksum_t *); #ifdef __cplusplus } Modified: head/sys/cddl/contrib/opensolaris/common/zfs/zfs_prop.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/common/zfs/zfs_prop.c Fri Oct 16 14:04:16 2015 (r289421) +++ head/sys/cddl/contrib/opensolaris/common/zfs/zfs_prop.c Fri Oct 16 14:45:21 2015 (r289422) @@ -71,6 +71,11 @@ zfs_prop_init(void) { "fletcher4", ZIO_CHECKSUM_FLETCHER_4 }, { "sha256", ZIO_CHECKSUM_SHA256 }, { "noparity", ZIO_CHECKSUM_NOPARITY }, +#ifdef illumos + { "sha512", ZIO_CHECKSUM_SHA512 }, + { "skein", ZIO_CHECKSUM_SKEIN }, + { "edonr", ZIO_CHECKSUM_EDONR }, +#endif { NULL } }; @@ -81,6 +86,16 @@ zfs_prop_init(void) { "sha256", ZIO_CHECKSUM_SHA256 }, { "sha256,verify", ZIO_CHECKSUM_SHA256 | ZIO_CHECKSUM_VERIFY }, +#ifdef illumos + { "sha512", ZIO_CHECKSUM_SHA512 }, + { "sha512,verify", + ZIO_CHECKSUM_SHA512 | ZIO_CHECKSUM_VERIFY }, + { "skein", ZIO_CHECKSUM_SKEIN }, + { "skein,verify", + ZIO_CHECKSUM_SKEIN | ZIO_CHECKSUM_VERIFY }, + { "edonr,verify", + ZIO_CHECKSUM_EDONR | ZIO_CHECKSUM_VERIFY }, +#endif { NULL } }; @@ -225,12 +240,12 @@ zfs_prop_init(void) zprop_register_index(ZFS_PROP_CHECKSUM, "checksum", ZIO_CHECKSUM_DEFAULT, PROP_INHERIT, ZFS_TYPE_FILESYSTEM | ZFS_TYPE_VOLUME, - "on | off | fletcher2 | fletcher4 | sha256", "CHECKSUM", - checksum_table); + "on | off | fletcher2 | fletcher4 | sha256 | sha512 | " + "skein | edonr", "CHECKSUM", checksum_table); zprop_register_index(ZFS_PROP_DEDUP, "dedup", ZIO_CHECKSUM_OFF, PROP_INHERIT, ZFS_TYPE_FILESYSTEM | ZFS_TYPE_VOLUME, - "on | off | verify | sha256[,verify]", "DEDUP", - dedup_table); + "on | off | verify | sha256[,verify], sha512[,verify], " + "skein[,verify], edonr,verify", "DEDUP", dedup_table); zprop_register_index(ZFS_PROP_COMPRESSION, "compression", ZIO_COMPRESS_DEFAULT, PROP_INHERIT, ZFS_TYPE_FILESYSTEM | ZFS_TYPE_VOLUME, Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c Fri Oct 16 14:04:16 2015 (r289421) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c Fri Oct 16 14:45:21 2015 (r289422) @@ -1552,7 +1552,7 @@ arc_cksum_verify(arc_buf_t *buf) mutex_exit(&buf->b_hdr->b_l1hdr.b_freeze_lock); return; } - fletcher_2_native(buf->b_data, buf->b_hdr->b_size, &zc); + fletcher_2_native(buf->b_data, buf->b_hdr->b_size, NULL, &zc); if (!ZIO_CHECKSUM_EQUAL(*buf->b_hdr->b_freeze_cksum, zc)) panic("buffer modified while frozen!"); mutex_exit(&buf->b_hdr->b_l1hdr.b_freeze_lock); @@ -1565,7 +1565,7 @@ arc_cksum_equal(arc_buf_t *buf) int equal; mutex_enter(&buf->b_hdr->b_l1hdr.b_freeze_lock); - fletcher_2_native(buf->b_data, buf->b_hdr->b_size, &zc); + fletcher_2_native(buf->b_data, buf->b_hdr->b_size, NULL, &zc); equal = ZIO_CHECKSUM_EQUAL(*buf->b_hdr->b_freeze_cksum, zc); mutex_exit(&buf->b_hdr->b_l1hdr.b_freeze_lock); @@ -1585,7 +1585,7 @@ arc_cksum_compute(arc_buf_t *buf, boolea } buf->b_hdr->b_freeze_cksum = kmem_alloc(sizeof (zio_cksum_t), KM_SLEEP); fletcher_2_native(buf->b_data, buf->b_hdr->b_size, - buf->b_hdr->b_freeze_cksum); + NULL, buf->b_hdr->b_freeze_cksum); mutex_exit(&buf->b_hdr->b_l1hdr.b_freeze_lock); #ifdef illumos arc_buf_watch(buf); Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/ddt.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/ddt.c Fri Oct 16 14:04:16 2015 (r289421) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/ddt.c Fri Oct 16 14:45:21 2015 (r289422) @@ -21,7 +21,7 @@ /* * Copyright (c) 2009, 2010, Oracle and/or its affiliates. All rights reserved. - * Copyright (c) 2012, 2014 by Delphix. All rights reserved. + * Copyright (c) 2012, 2015 by Delphix. All rights reserved. */ #include @@ -64,7 +64,8 @@ ddt_object_create(ddt_t *ddt, enum ddt_t spa_t *spa = ddt->ddt_spa; objset_t *os = ddt->ddt_os; uint64_t *objectp = &ddt->ddt_object[type][class]; - boolean_t prehash = zio_checksum_table[ddt->ddt_checksum].ci_dedup; + boolean_t prehash = zio_checksum_table[ddt->ddt_checksum].ci_flags & + ZCHECKSUM_FLAG_DEDUP; char name[DDT_NAMELEN]; ddt_object_name(ddt, type, class, name); Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu.c Fri Oct 16 14:04:16 2015 (r289421) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu.c Fri Oct 16 14:45:21 2015 (r289422) @@ -1493,7 +1493,8 @@ dmu_sync_done(zio_t *zio, arc_buf_t *buf ASSERT(BP_EQUAL(bp, bp_orig)); ASSERT(zio->io_prop.zp_compress != ZIO_COMPRESS_OFF); - ASSERT(zio_checksum_table[chksum].ci_dedup); + ASSERT(zio_checksum_table[chksum].ci_flags & + ZCHECKSUM_FLAG_NOPWRITE); } dr->dt.dl.dr_overridden_by = *zio->io_bp; dr->dt.dl.dr_override_state = DR_OVERRIDDEN; @@ -1840,8 +1841,10 @@ dmu_write_policy(objset_t *os, dnode_t * * as well. Otherwise, the metadata checksum defaults * to fletcher4. */ - if (zio_checksum_table[checksum].ci_correctable < 1 || - zio_checksum_table[checksum].ci_eck) + if (!(zio_checksum_table[checksum].ci_flags & + ZCHECKSUM_FLAG_METADATA) || + (zio_checksum_table[checksum].ci_flags & + ZCHECKSUM_FLAG_EMBEDDED)) checksum = ZIO_CHECKSUM_FLETCHER_4; if (os->os_redundant_metadata == ZFS_REDUNDANT_METADATA_ALL || @@ -1880,17 +1883,20 @@ dmu_write_policy(objset_t *os, dnode_t * */ if (dedup_checksum != ZIO_CHECKSUM_OFF) { dedup = (wp & WP_DMU_SYNC) ? B_FALSE : B_TRUE; - if (!zio_checksum_table[checksum].ci_dedup) + if (!(zio_checksum_table[checksum].ci_flags & + ZCHECKSUM_FLAG_DEDUP)) dedup_verify = B_TRUE; } /* - * Enable nopwrite if we have a cryptographically secure - * checksum that has no known collisions (i.e. SHA-256) - * and compression is enabled. We don't enable nopwrite if - * dedup is enabled as the two features are mutually exclusive. + * Enable nopwrite if we have secure enough checksum + * algorithm (see comment in zio_nop_write) and + * compression is enabled. We don't enable nopwrite if + * dedup is enabled as the two features are mutually + * exclusive. */ - nopwrite = (!dedup && zio_checksum_table[checksum].ci_dedup && + nopwrite = (!dedup && (zio_checksum_table[checksum].ci_flags & + ZCHECKSUM_FLAG_NOPWRITE) && compress != ZIO_COMPRESS_OFF && zfs_nopwrite_enabled); } Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_send.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_send.c Fri Oct 16 14:04:16 2015 (r289421) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_send.c Fri Oct 16 14:45:21 2015 (r289422) @@ -292,7 +292,8 @@ dump_write(dmu_sendarg_t *dsp, dmu_objec drrw->drr_checksumtype = ZIO_CHECKSUM_OFF; } else { drrw->drr_checksumtype = BP_GET_CHECKSUM(bp); - if (zio_checksum_table[drrw->drr_checksumtype].ci_dedup) + if (zio_checksum_table[drrw->drr_checksumtype].ci_flags & + ZCHECKSUM_FLAG_DEDUP) drrw->drr_checksumflags |= DRR_CHECKSUM_DEDUP; DDK_SET_LSIZE(&drrw->drr_key, BP_GET_LSIZE(bp)); DDK_SET_PSIZE(&drrw->drr_key, BP_GET_PSIZE(bp)); Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_dataset.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_dataset.c Fri Oct 16 14:04:16 2015 (r289421) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_dataset.c Fri Oct 16 14:45:21 2015 (r289422) @@ -52,6 +52,8 @@ #include #include #include +#include +#include #include #include @@ -133,10 +135,16 @@ dsl_dataset_block_born(dsl_dataset_t *ds dsl_dataset_phys(ds)->ds_compressed_bytes += compressed; dsl_dataset_phys(ds)->ds_uncompressed_bytes += uncompressed; dsl_dataset_phys(ds)->ds_unique_bytes += used; + if (BP_GET_LSIZE(bp) > SPA_OLD_MAXBLOCKSIZE) { ds->ds_feature_activation_needed[SPA_FEATURE_LARGE_BLOCKS] = B_TRUE; } + + spa_feature_t f = zio_checksum_to_feature(BP_GET_CHECKSUM(bp)); + if (f != SPA_FEATURE_NONE) + ds->ds_feature_activation_needed[f] = B_TRUE; + mutex_exit(&ds->ds_lock); dsl_dir_diduse_space(ds->ds_dir, DD_USED_HEAD, delta, compressed, uncompressed, tx); @@ -1791,7 +1799,7 @@ get_receive_resume_stats(dsl_dataset_t * packed_size, packed_size, 6); zio_cksum_t cksum; - fletcher_4_native(compressed, compressed_size, &cksum); + fletcher_4_native(compressed, compressed_size, NULL, &cksum); str = kmem_alloc(compressed_size * 2 + 1, KM_SLEEP); for (int i = 0; i < compressed_size; i++) { Copied: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/edonr_zfs.c (from r289310, vendor-sys/illumos/dist/uts/common/fs/zfs/edonr_zfs.c) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/edonr_zfs.c Fri Oct 16 14:45:21 2015 (r289422, copy of r289310, vendor-sys/illumos/dist/uts/common/fs/zfs/edonr_zfs.c) @@ -0,0 +1,102 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://opensource.org/licenses/CDDL-1.0. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ +/* + * Copyright 2013 Saso Kiselkov. All rights reserved. + * Use is subject to license terms. + */ +#include +#include +#include + +#define EDONR_MODE 512 +#define EDONR_BLOCK_SIZE EdonR512_BLOCK_SIZE + +/* + * Native zio_checksum interface for the Edon-R hash function. + */ +/*ARGSUSED*/ +void +zio_checksum_edonr_native(const void *buf, uint64_t size, + const void *ctx_template, zio_cksum_t *zcp) +{ + uint8_t digest[EDONR_MODE / 8]; + EdonRState ctx; + + ASSERT(ctx_template != NULL); + bcopy(ctx_template, &ctx, sizeof (ctx)); + EdonRUpdate(&ctx, buf, size * 8); + EdonRFinal(&ctx, digest); + bcopy(digest, zcp->zc_word, sizeof (zcp->zc_word)); +} + +/* + * Byteswapped zio_checksum interface for the Edon-R hash function. + */ +void +zio_checksum_edonr_byteswap(const void *buf, uint64_t size, + const void *ctx_template, zio_cksum_t *zcp) +{ + zio_cksum_t tmp; + + zio_checksum_edonr_native(buf, size, ctx_template, &tmp); + zcp->zc_word[0] = BSWAP_64(zcp->zc_word[0]); + zcp->zc_word[1] = BSWAP_64(zcp->zc_word[1]); + zcp->zc_word[2] = BSWAP_64(zcp->zc_word[2]); + zcp->zc_word[3] = BSWAP_64(zcp->zc_word[3]); +} + +void * +zio_checksum_edonr_tmpl_init(const zio_cksum_salt_t *salt) +{ + EdonRState *ctx; + uint8_t salt_block[EDONR_BLOCK_SIZE]; + + /* + * Edon-R needs all but the last hash invocation to be on full-size + * blocks, but the salt is too small. Rather than simply padding it + * with zeros, we expand the salt into a new salt block of proper + * size by double-hashing it (the new salt block will be composed of + * H(salt) || H(H(salt))). + */ + CTASSERT(EDONR_BLOCK_SIZE == 2 * (EDONR_MODE / 8)); + EdonRHash(EDONR_MODE, salt->zcs_bytes, sizeof (salt->zcs_bytes) * 8, + salt_block); + EdonRHash(EDONR_MODE, salt_block, EDONR_MODE, salt_block + + EDONR_MODE / 8); + + /* + * Feed the new salt block into the hash function - this will serve + * as our MAC key. + */ + ctx = kmem_zalloc(sizeof (*ctx), KM_SLEEP); + EdonRInit(ctx, EDONR_MODE); + EdonRUpdate(ctx, salt_block, sizeof (salt_block) * 8); + return (ctx); +} + +void +zio_checksum_edonr_tmpl_free(void *ctx_template) +{ + EdonRState *ctx = ctx_template; + + bzero(ctx, sizeof (*ctx)); + kmem_free(ctx, sizeof (*ctx)); +} Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sha256.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sha256.c Fri Oct 16 14:04:16 2015 (r289421) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sha256.c Fri Oct 16 14:45:21 2015 (r289422) @@ -22,6 +22,9 @@ * Copyright 2009 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ +/* + * Copyright 2013 Saso Kiselkov. All rights reserved. + */ #include #include #ifdef _KERNEL @@ -30,8 +33,10 @@ #include #endif +/*ARGSUSED*/ void -zio_checksum_SHA256(const void *buf, uint64_t size, zio_cksum_t *zcp) +zio_checksum_SHA256(const void *buf, uint64_t size, + const void *ctx_template, zio_cksum_t *zcp) { SHA256_CTX ctx; zio_cksum_t tmp; @@ -52,3 +57,31 @@ zio_checksum_SHA256(const void *buf, uin zcp->zc_word[2] = BE_64(tmp.zc_word[2]); zcp->zc_word[3] = BE_64(tmp.zc_word[3]); } + +#ifdef illumos +/*ARGSUSED*/ +void +zio_checksum_SHA512_native(const void *buf, uint64_t size, + const void *ctx_template, zio_cksum_t *zcp) +{ + SHA2_CTX ctx; + + SHA2Init(SHA512_256, &ctx); + SHA2Update(&ctx, buf, size); + SHA2Final(zcp, &ctx); +} + +/*ARGSUSED*/ +void +zio_checksum_SHA512_byteswap(const void *buf, uint64_t size, + const void *ctx_template, zio_cksum_t *zcp) +{ + zio_cksum_t tmp; + + zio_checksum_SHA512_native(buf, size, ctx_template, &tmp); + zcp->zc_word[0] = BSWAP_64(tmp.zc_word[0]); + zcp->zc_word[1] = BSWAP_64(tmp.zc_word[1]); + zcp->zc_word[2] = BSWAP_64(tmp.zc_word[2]); + zcp->zc_word[3] = BSWAP_64(tmp.zc_word[3]); +} +#endif Copied: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/skein_zfs.c (from r289310, vendor-sys/illumos/dist/uts/common/fs/zfs/skein_zfs.c) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/skein_zfs.c Fri Oct 16 14:45:21 2015 (r289422, copy of r289310, vendor-sys/illumos/dist/uts/common/fs/zfs/skein_zfs.c) @@ -0,0 +1,91 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://opensource.org/licenses/CDDL-1.0. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ +/* + * Copyright 2013 Saso Kiselkov. All rights reserved. + */ +#include +#include +#include + +/* + * Computes a native 256-bit skein MAC checksum. Please note that this + * function requires the presence of a ctx_template that should be allocated + * using zio_checksum_skein_tmpl_init. + */ +/*ARGSUSED*/ +void +zio_checksum_skein_native(const void *buf, uint64_t size, + const void *ctx_template, zio_cksum_t *zcp) +{ + Skein_512_Ctxt_t ctx; + + ASSERT(ctx_template != NULL); + bcopy(ctx_template, &ctx, sizeof (ctx)); + (void) Skein_512_Update(&ctx, buf, size); + (void) Skein_512_Final(&ctx, (uint8_t *)zcp); + bzero(&ctx, sizeof (ctx)); +} + +/* + * Byteswapped version of zio_checksum_skein_native. This just invokes + * the native checksum function and byteswaps the resulting checksum (since + * skein is internally endian-insensitive). + */ +void +zio_checksum_skein_byteswap(const void *buf, uint64_t size, + const void *ctx_template, zio_cksum_t *zcp) +{ + zio_cksum_t tmp; + + zio_checksum_skein_native(buf, size, ctx_template, &tmp); + zcp->zc_word[0] = BSWAP_64(tmp.zc_word[0]); + zcp->zc_word[1] = BSWAP_64(tmp.zc_word[1]); + zcp->zc_word[2] = BSWAP_64(tmp.zc_word[2]); + zcp->zc_word[3] = BSWAP_64(tmp.zc_word[3]); +} + +/* + * Allocates a skein MAC template suitable for using in skein MAC checksum + * computations and returns a pointer to it. + */ +void * +zio_checksum_skein_tmpl_init(const zio_cksum_salt_t *salt) +{ + Skein_512_Ctxt_t *ctx; + + ctx = kmem_zalloc(sizeof (*ctx), KM_SLEEP); + (void) Skein_512_InitExt(ctx, sizeof (zio_cksum_t) * 8, 0, + salt->zcs_bytes, sizeof (salt->zcs_bytes)); + return (ctx); +} + +/* + * Frees a skein context template previously allocated using + * zio_checksum_skein_tmpl_init. + */ +void +zio_checksum_skein_tmpl_free(void *ctx_template) +{ + Skein_512_Ctxt_t *ctx = ctx_template; + + bzero(ctx, sizeof (*ctx)); + kmem_free(ctx, sizeof (*ctx)); +} Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c Fri Oct 16 14:04:16 2015 (r289421) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c Fri Oct 16 14:45:21 2015 (r289422) @@ -25,6 +25,7 @@ * Copyright (c) 2015, Nexenta Systems, Inc. All rights reserved. * Copyright (c) 2013 Martin Matuska . All rights reserved. * Copyright (c) 2014 Spectra Logic Corporation, All rights reserved. + * Copyright 2013 Saso Kiselkov. All rights reserved. */ /* @@ -2582,6 +2583,19 @@ spa_load_impl(spa_t *spa, uint64_t pool_ return (spa_load(spa, state, SPA_IMPORT_EXISTING, B_TRUE)); } + /* Grab the secret checksum salt from the MOS. */ + error = zap_lookup(spa->spa_meta_objset, DMU_POOL_DIRECTORY_OBJECT, + DMU_POOL_CHECKSUM_SALT, 1, + sizeof (spa->spa_cksum_salt.zcs_bytes), + spa->spa_cksum_salt.zcs_bytes); + if (error == ENOENT) { + /* Generate a new salt for subsequent use */ + (void) random_get_pseudo_bytes(spa->spa_cksum_salt.zcs_bytes, + sizeof (spa->spa_cksum_salt.zcs_bytes)); + } else if (error != 0) { + return (spa_vdev_err(rvd, VDEV_AUX_CORRUPT_DATA, EIO)); + } + if (spa_dir_prop(spa, DMU_POOL_SYNC_BPOBJ, &obj) != 0) return (spa_vdev_err(rvd, VDEV_AUX_CORRUPT_DATA, EIO)); error = bpobj_open(&spa->spa_deferred_bpobj, spa->spa_meta_objset, obj); @@ -3750,6 +3764,12 @@ spa_create(const char *pool, nvlist_t *n spa_history_create_obj(spa, tx); /* + * Generate some random noise for salted checksums to operate on. + */ + (void) random_get_pseudo_bytes(spa->spa_cksum_salt.zcs_bytes, + sizeof (spa->spa_cksum_salt.zcs_bytes)); + + /* * Set pool properties. */ spa->spa_bootfs = zpool_prop_default_numeric(ZPOOL_PROP_BOOTFS); @@ -6551,6 +6571,20 @@ spa_sync_upgrades(spa_t *spa, dmu_tx_t * if (lz4_en && !lz4_ac) spa_feature_incr(spa, SPA_FEATURE_LZ4_COMPRESS, tx); } + + /* + * If we haven't written the salt, do so now. Note that the + * feature may not be activated yet, but that's fine since + * the presence of this ZAP entry is backwards compatible. + */ + if (zap_contains(spa->spa_meta_objset, DMU_POOL_DIRECTORY_OBJECT, + DMU_POOL_CHECKSUM_SALT) == ENOENT) { + VERIFY0(zap_add(spa->spa_meta_objset, + DMU_POOL_DIRECTORY_OBJECT, DMU_POOL_CHECKSUM_SALT, 1, + sizeof (spa->spa_cksum_salt.zcs_bytes), + spa->spa_cksum_salt.zcs_bytes, tx)); + } + rrw_exit(&dp->dp_config_rwlock, FTAG); } Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa_misc.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa_misc.c Fri Oct 16 14:04:16 2015 (r289421) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa_misc.c Fri Oct 16 14:45:21 2015 (r289422) @@ -24,6 +24,7 @@ * Copyright 2011 Nexenta Systems, Inc. All rights reserved. * Copyright 2013 Martin Matuska . All rights reserved. * Copyright (c) 2014 Spectra Logic Corporation, All rights reserved. + * Copyright 2013 Saso Kiselkov. All rights reserved. */ #include @@ -51,7 +52,7 @@ #include #include #include "zfs_prop.h" -#include "zfeature_common.h" +#include /* * SPA locking @@ -631,6 +632,7 @@ spa_add(const char *name, nvlist_t *conf mutex_init(&spa->spa_history_lock, NULL, MUTEX_DEFAULT, NULL); mutex_init(&spa->spa_proc_lock, NULL, MUTEX_DEFAULT, NULL); mutex_init(&spa->spa_props_lock, NULL, MUTEX_DEFAULT, NULL); + mutex_init(&spa->spa_cksum_tmpls_lock, NULL, MUTEX_DEFAULT, NULL); mutex_init(&spa->spa_scrub_lock, NULL, MUTEX_DEFAULT, NULL); mutex_init(&spa->spa_suspend_lock, NULL, MUTEX_DEFAULT, NULL); mutex_init(&spa->spa_vdev_top_lock, NULL, MUTEX_DEFAULT, NULL); @@ -793,6 +795,8 @@ spa_remove(spa_t *spa) for (int t = 0; t < TXG_SIZE; t++) bplist_destroy(&spa->spa_free_bplist[t]); + zio_checksum_templates_free(spa); + cv_destroy(&spa->spa_async_cv); cv_destroy(&spa->spa_evicting_os_cv); cv_destroy(&spa->spa_proc_cv); @@ -806,6 +810,7 @@ spa_remove(spa_t *spa) mutex_destroy(&spa->spa_history_lock); mutex_destroy(&spa->spa_proc_lock); mutex_destroy(&spa->spa_props_lock); + mutex_destroy(&spa->spa_cksum_tmpls_lock); mutex_destroy(&spa->spa_scrub_lock); mutex_destroy(&spa->spa_suspend_lock); mutex_destroy(&spa->spa_vdev_top_lock); Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dmu.h ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dmu.h Fri Oct 16 14:04:16 2015 (r289421) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dmu.h Fri Oct 16 14:45:21 2015 (r289422) @@ -27,6 +27,7 @@ * Copyright 2013 DEY Storage Systems, Inc. * Copyright 2014 HybridCluster. All rights reserved. * Copyright (c) 2014 Spectra Logic Corporation, All rights reserved. + * Copyright 2013 Saso Kiselkov. All rights reserved. */ /* Portions Copyright 2010 Robert Milkowski */ @@ -320,6 +321,7 @@ typedef struct dmu_buf { #define DMU_POOL_FREE_BPOBJ "free_bpobj" #define DMU_POOL_BPTREE_OBJ "bptree_obj" #define DMU_POOL_EMPTY_BPOBJ "empty_bpobj" +#define DMU_POOL_CHECKSUM_SALT "org.illumos:checksum_salt" /* * Allocate an object from this objset. The range of object numbers Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/spa.h ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/spa.h Fri Oct 16 14:04:16 2015 (r289421) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/spa.h Fri Oct 16 14:45:21 2015 (r289422) @@ -23,6 +23,7 @@ * Copyright (c) 2011, 2014 by Delphix. All rights reserved. * Copyright 2011 Nexenta Systems, Inc. All rights reserved. * Copyright (c) 2014 Spectra Logic Corporation, All rights reserved. + * Copyright 2013 Saso Kiselkov. All rights reserved. */ #ifndef _SYS_SPA_H @@ -163,6 +164,14 @@ typedef struct zio_cksum { } zio_cksum_t; /* + * Some checksums/hashes need a 256-bit initialization salt. This salt is kept + * secret and is suitable for use in MAC algorithms as the key. + */ +typedef struct zio_cksum_salt { + uint8_t zcs_bytes[32]; +} zio_cksum_salt_t; + +/* * Each block is described by its DVAs, time of birth, checksum, etc. * The word-by-word, bit-by-bit layout of the blkptr is as follows: * Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/spa_impl.h ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/spa_impl.h Fri Oct 16 14:04:16 2015 (r289421) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/spa_impl.h Fri Oct 16 14:45:21 2015 (r289422) @@ -24,6 +24,7 @@ * Copyright 2011 Nexenta Systems, Inc. All rights reserved. * Copyright 2013 Martin Matuska . All rights reserved. * Copyright (c) 2014 Spectra Logic Corporation, All rights reserved. + * Copyright 2013 Saso Kiselkov. All rights reserved. */ #ifndef _SYS_SPA_IMPL_H @@ -166,6 +167,10 @@ struct spa { uint64_t spa_syncing_txg; /* txg currently syncing */ bpobj_t spa_deferred_bpobj; /* deferred-free bplist */ bplist_t spa_free_bplist[TXG_SIZE]; /* bplist of stuff to free */ + zio_cksum_salt_t spa_cksum_salt; /* secret salt for cksum */ + /* checksum context templates */ + kmutex_t spa_cksum_tmpls_lock; + void *spa_cksum_tmpls[ZIO_CHECKSUM_FUNCTIONS]; uberblock_t spa_ubsync; /* last synced uberblock */ uberblock_t spa_uberblock; /* current uberblock */ boolean_t spa_extreme_rewind; /* rewind past deferred frees */ Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zio.h ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zio.h Fri Oct 16 14:04:16 2015 (r289421) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zio.h Fri Oct 16 14:45:21 2015 (r289422) @@ -82,6 +82,11 @@ enum zio_checksum { ZIO_CHECKSUM_SHA256, ZIO_CHECKSUM_ZILOG2, ZIO_CHECKSUM_NOPARITY, +#ifdef illumos + ZIO_CHECKSUM_SHA512, + ZIO_CHECKSUM_SKEIN, + ZIO_CHECKSUM_EDONR, +#endif ZIO_CHECKSUM_FUNCTIONS }; Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zio_checksum.h ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zio_checksum.h Fri Oct 16 14:04:16 2015 (r289421) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zio_checksum.h Fri Oct 16 14:45:21 2015 (r289422) @@ -20,13 +20,15 @@ */ /* * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. - * Copyright (c) 2014 by Delphix. All rights reserved. + * Copyright (c) 2014, 2015 by Delphix. All rights reserved. + * Copyright Saso Kiselkov 2013, All rights reserved. */ #ifndef _SYS_ZIO_CHECKSUM_H #define _SYS_ZIO_CHECKSUM_H #include +#include #ifdef __cplusplus extern "C" { @@ -35,17 +37,34 @@ extern "C" { /* * Signature for checksum functions. */ -typedef void zio_checksum_func_t(const void *, uint64_t, zio_cksum_t *); +typedef void zio_checksum_t(const void *data, uint64_t size, + const void *ctx_template, zio_cksum_t *zcp); +typedef void *zio_checksum_tmpl_init_t(const zio_cksum_salt_t *salt); +typedef void zio_checksum_tmpl_free_t(void *ctx_template); + +typedef enum zio_checksum_flags { + /* Strong enough for metadata? */ + ZCHECKSUM_FLAG_METADATA = (1 << 1), + /* ZIO embedded checksum */ + ZCHECKSUM_FLAG_EMBEDDED = (1 << 2), + /* Strong enough for dedup (without verification)? */ + ZCHECKSUM_FLAG_DEDUP = (1 << 3), + /* Uses salt value */ + ZCHECKSUM_FLAG_SALTED = (1 << 4), + /* Strong enough for nopwrite? */ + ZCHECKSUM_FLAG_NOPWRITE = (1 << 5) +} zio_checksum_flags_t; /* * Information about each checksum function. */ typedef struct zio_checksum_info { - zio_checksum_func_t *ci_func[2]; /* checksum function per byteorder */ - int ci_correctable; /* number of correctable bits */ - int ci_eck; /* uses zio embedded checksum? */ - boolean_t ci_dedup; /* strong enough for dedup? */ - char *ci_name; /* descriptive name */ + /* checksum function for each byteorder */ + zio_checksum_t *ci_func[2]; + zio_checksum_tmpl_init_t *ci_tmpl_init; + zio_checksum_tmpl_free_t *ci_tmpl_free; + zio_checksum_flags_t ci_flags; + char *ci_name; /* descriptive name */ } zio_checksum_info_t; typedef struct zio_bad_cksum { @@ -62,12 +81,30 @@ extern zio_checksum_info_t zio_checksum_ /* * Checksum routines. */ -extern zio_checksum_func_t zio_checksum_SHA256; +extern zio_checksum_t zio_checksum_SHA256; +#ifdef illumos +extern zio_checksum_t zio_checksum_SHA512_native; +extern zio_checksum_t zio_checksum_SHA512_byteswap; + +/* Skein */ +extern zio_checksum_t zio_checksum_skein_native; +extern zio_checksum_t zio_checksum_skein_byteswap; +extern zio_checksum_tmpl_init_t zio_checksum_skein_tmpl_init; +extern zio_checksum_tmpl_free_t zio_checksum_skein_tmpl_free; + +/* Edon-R */ +extern zio_checksum_t zio_checksum_edonr_native; +extern zio_checksum_t zio_checksum_edonr_byteswap; +extern zio_checksum_tmpl_init_t zio_checksum_edonr_tmpl_init; +extern zio_checksum_tmpl_free_t zio_checksum_edonr_tmpl_free; +#endif extern void zio_checksum_compute(zio_t *zio, enum zio_checksum checksum, void *data, uint64_t size); extern int zio_checksum_error(zio_t *zio, zio_bad_cksum_t *out); extern enum zio_checksum spa_dedup_checksum(spa_t *spa); +extern void zio_checksum_templates_free(spa_t *spa); +extern spa_feature_t zio_checksum_to_feature(enum zio_checksum cksum); #ifdef __cplusplus } 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 Fri Oct 16 14:04:16 2015 (r289421) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c Fri Oct 16 14:45:21 2015 (r289422) @@ -188,6 +188,7 @@ #include #include #include +#include #include "zfs_namecheck.h" #include "zfs_prop.h" @@ -3903,11 +3904,6 @@ zfs_check_settable(const char *dsname, n return (SET_ERROR(ENOTSUP)); break; - case ZFS_PROP_DEDUP: - if (zfs_earlier_version(dsname, SPA_VERSION_DEDUP)) - return (SET_ERROR(ENOTSUP)); - break; - case ZFS_PROP_RECORDSIZE: /* Record sizes above 128k need the feature to be enabled */ if (nvpair_value_uint64(pair, &intval) == 0 && @@ -3958,6 +3954,45 @@ zfs_check_settable(const char *dsname, n return (SET_ERROR(ENOTSUP)); } break; + + case ZFS_PROP_CHECKSUM: + case ZFS_PROP_DEDUP: + { + spa_feature_t feature; + spa_t *spa; + + /* dedup feature version checks */ + if (prop == ZFS_PROP_DEDUP && + zfs_earlier_version(dsname, SPA_VERSION_DEDUP)) + return (SET_ERROR(ENOTSUP)); + + if (nvpair_value_uint64(pair, &intval) != 0) + return (SET_ERROR(EINVAL)); + + /* check prop value is enabled in features */ + feature = zio_checksum_to_feature(intval); + if (feature == SPA_FEATURE_NONE) + break; + + if ((err = spa_open(dsname, &spa, FTAG)) != 0) + return (err); + /* + * Salted checksums are not supported on root pools. + */ + if (spa_bootfs(spa) != 0 && + intval < ZIO_CHECKSUM_FUNCTIONS && + (zio_checksum_table[intval].ci_flags & + ZCHECKSUM_FLAG_SALTED)) { + spa_close(spa, FTAG); + return (SET_ERROR(ERANGE)); + } + if (!spa_feature_is_enabled(spa, feature)) { + spa_close(spa, FTAG); + return (SET_ERROR(ENOTSUP)); + } + spa_close(spa, FTAG); + break; + } } return (zfs_secpolicy_setprop(dsname, prop, pair, CRED())); Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zio.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zio.c Fri Oct 16 14:04:16 2015 (r289421) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zio.c Fri Oct 16 14:45:21 2015 (r289422) @@ -997,7 +997,7 @@ zio_write_phys(zio_t *pio, vdev_t *vd, u zio->io_prop.zp_checksum = checksum; - if (zio_checksum_table[checksum].ci_eck) { + if (zio_checksum_table[checksum].ci_flags & ZCHECKSUM_FLAG_EMBEDDED) { /* * zec checksums are necessarily destructive -- they modify * the end of the write buffer to hold the verifier/checksum. @@ -1209,8 +1209,8 @@ zio_write_bp_init(zio_t *zio) if (BP_IS_HOLE(bp) || !zp->zp_dedup) return (ZIO_PIPELINE_CONTINUE); - ASSERT(zio_checksum_table[zp->zp_checksum].ci_dedup || - zp->zp_dedup_verify); + ASSERT((zio_checksum_table[zp->zp_checksum].ci_flags & + ZCHECKSUM_FLAG_DEDUP) || zp->zp_dedup_verify); if (BP_GET_CHECKSUM(bp) == zp->zp_checksum) { BP_SET_DEDUP(bp, 1); @@ -2072,12 +2072,22 @@ zio_write_gang_block(zio_t *pio) } /* - * The zio_nop_write stage in the pipeline determines if allocating - * a new bp is necessary. By leveraging a cryptographically secure checksum, - * such as SHA256, we can compare the checksums of the new data and the old - * to determine if allocating a new block is required. The nopwrite - * feature can handle writes in either syncing or open context (i.e. zil - * writes) and as a result is mutually exclusive with dedup. + * The zio_nop_write stage in the pipeline determines if allocating a + * new bp is necessary. The nopwrite feature can handle writes in + * either syncing or open context (i.e. zil writes) and as a result is + * mutually exclusive with dedup. + * + * By leveraging a cryptographically secure checksum, such as SHA256, we + * can compare the checksums of the new data and the old to determine if + * allocating a new block is required. Note that our requirements for + * cryptographic strength are fairly weak: there can't be any accidental + * hash collisions, but we don't need to be secure against intentional + * (malicious) collisions. To trigger a nopwrite, you have to be able + * to write the file to begin with, and triggering an incorrect (hash + * collision) nopwrite is no worse than simply writing to the file. *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@freebsd.org Fri Oct 16 14:55:41 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 18067A16792; Fri, 16 Oct 2015 14:55:41 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D31A619C9; Fri, 16 Oct 2015 14:55:40 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t9GEtdI6062793; Fri, 16 Oct 2015 14:55:39 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9GEtdDw062792; Fri, 16 Oct 2015 14:55:39 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201510161455.t9GEtdDw062792@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Fri, 16 Oct 2015 14:55:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289423 - 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 " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Oct 2015 14:55:41 -0000 Author: kib Date: Fri Oct 16 14:55:39 2015 New Revision: 289423 URL: https://svnweb.freebsd.org/changeset/base/289423 Log: If falloc_caps() failed, cleanup needs to be performed. This is a bug in r289026. Sponsored by: The FreeBSD Foundation Modified: head/sys/kern/kern_fork.c Modified: head/sys/kern/kern_fork.c ============================================================================== --- head/sys/kern/kern_fork.c Fri Oct 16 14:45:21 2015 (r289422) +++ head/sys/kern/kern_fork.c Fri Oct 16 14:55:39 2015 (r289423) @@ -848,7 +848,7 @@ fork1(struct thread *td, int flags, int if (flags & RFPROCDESC) { error = falloc_caps(td, &fp_procdesc, procdescp, 0, fcaps); if (error != 0) - return (error); + goto fail2; } mem_charged = 0; From owner-svn-src-all@freebsd.org Fri Oct 16 15:19:37 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id AEF3AA16C1B; Fri, 16 Oct 2015 15:19:37 +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 7DF17352; Fri, 16 Oct 2015 15:19:37 +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 t9GFJaPR068992; Fri, 16 Oct 2015 15:19:36 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9GFJa7G068991; Fri, 16 Oct 2015 15:19:36 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201510161519.t9GFJa7G068991@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Fri, 16 Oct 2015 15:19:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289424 - head/sbin/newfs_msdos X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Oct 2015 15:19:37 -0000 Author: emaste Date: Fri Oct 16 15:19:36 2015 New Revision: 289424 URL: https://svnweb.freebsd.org/changeset/base/289424 Log: newfs_msdos: prefer snprintf to sprintf Obtained from: NetBSD Sponsored by: The FreeBSD Foundation Modified: head/sbin/newfs_msdos/mkfs_msdos.c Modified: head/sbin/newfs_msdos/mkfs_msdos.c ============================================================================== --- head/sbin/newfs_msdos/mkfs_msdos.c Fri Oct 16 14:55:39 2015 (r289423) +++ head/sbin/newfs_msdos/mkfs_msdos.c Fri Oct 16 15:19:36 2015 (r289424) @@ -585,7 +585,7 @@ int mkfs_msdos(const char *fname, const (u_int)tm->tm_min)); mk4(bsx->exVolumeID, x); mklabel(bsx->exVolumeLabel, o.volume_label ? o.volume_label : "NO NAME"); - sprintf(buf, "FAT%u", fat); + snprintf(buf, sizeof(buf), "FAT%u", fat); setstr(bsx->exFileSysType, buf, sizeof(bsx->exFileSysType)); if (!o.bootstrap) { x1 += sizeof(struct bsx); From owner-svn-src-all@freebsd.org Fri Oct 16 16:27:00 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 89271A16C7A; Fri, 16 Oct 2015 16:27:00 +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 E918EC46; Fri, 16 Oct 2015 16:26:58 +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 TAA25724; Fri, 16 Oct 2015 19:26:50 +0300 (EEST) (envelope-from avg@FreeBSD.org) Received: from localhost ([127.0.0.1]) by porto.starpoint.kiev.ua with esmtp (Exim 4.34 (FreeBSD)) id 1Zn7qE-000O7s-4F; Fri, 16 Oct 2015 19:26:50 +0300 Subject: Re: svn commit: r289310 - vendor-sys/illumos/dist/common/zfs vendor-sys/illumos/dist/uts/common vendor-sys/illumos/dist/uts/common/crypto vendor-sys/illumos/dist/uts/common/crypto/io vendor-sys/illumos... To: Alexander Motin , src-committers@FreeBSD.org, svn-src-all@FreeBSD.org, svn-src-vendor@FreeBSD.org References: <201510141112.t9EBCmFZ022230@repo.freebsd.org> <561FC5A0.3040909@FreeBSD.org> <561FC90F.4090706@FreeBSD.org> <561FC996.3020207@FreeBSD.org> <561FCAE1.1040504@FreeBSD.org> From: Andriy Gapon Message-ID: <56212524.2020301@FreeBSD.org> Date: Fri, 16 Oct 2015 18:26:12 +0200 User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.2.0 MIME-Version: 1.0 In-Reply-To: <561FCAE1.1040504@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 " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Oct 2015 16:27:00 -0000 On 15/10/2015 17:48, Alexander Motin wrote: > On 15.10.2015 18:43, Andriy Gapon wrote: >> On 15/10/2015 17:41, Alexander Motin wrote: >>> On 15.10.2015 18:26, Andriy Gapon wrote: >>>> On 14/10/2015 13:12, Alexander Motin wrote: >>>>> Author: mav >>>>> Date: Wed Oct 14 11:12:47 2015 >>>>> New Revision: 289310 >>>>> URL: https://svnweb.freebsd.org/changeset/base/289310 >>>>> >>>>> Log: >>>>> 4185 add new cryptographic checksums to ZFS: SHA-512, Skein, Edon-R >>>>> >>>>> Reviewed by: George Wilson >>>>> Reviewed by: Prakash Surya >>>>> Reviewed by: Saso Kiselkov >>>>> Reviewed by: Richard Lowe >>>>> Approved by: Garrett D'Amore >>>>> Author: Matthew Ahrens >>>>> >>>>> illumos/illumos-gate@45818ee124adeaaf947698996b4f4c722afc6d1f >>>>> >>>>> Added: >>>>> vendor/illumos/dist/common/crypto/ >>>>> vendor/illumos/dist/common/crypto/edonr/ >>>>> vendor/illumos/dist/common/crypto/edonr/edonr.c (contents, props changed) >>>>> vendor/illumos/dist/common/crypto/edonr/edonr_byteorder.h (contents, props changed) >>>>> vendor/illumos/dist/common/crypto/skein/ >>>>> vendor/illumos/dist/common/crypto/skein/THIRDPARTYLICENSE (contents, props changed) >>>>> vendor/illumos/dist/common/crypto/skein/THIRDPARTYLICENSE.descrip (contents, props changed) >>>>> vendor/illumos/dist/common/crypto/skein/skein.c (contents, props changed) >>>>> vendor/illumos/dist/common/crypto/skein/skein_block.c (contents, props changed) >>>>> vendor/illumos/dist/common/crypto/skein/skein_impl.h (contents, props changed) >>>>> vendor/illumos/dist/common/crypto/skein/skein_iv.c (contents, props changed) >>>>> vendor/illumos/dist/common/crypto/skein/skein_port.h (contents, props changed) >>>> >>>> It seems that these are pieces of code that can be used by both the >>>> userland and the kernel. I think that previously we used to import such >>>> code into illumos-sys and then integrate it into sys/cddl (e.g. >>>> common/zfs/). Perhaps it is worthwhile following that convention in >>>> this case as well? >>> >>> I haven't decided what to do with this specific case. As I understand, >>> now we are using FreeBSD's native crypto code instead of illumos' one. I >>> was thinking about importing this commit only in infrastructural parts, >>> until respective algorithms are implemented in our native crypto. I >>> think it should not be a problem for Skein, since according to comments >>> it is in public domain. About Edon-R I am not sure, since it seems to be >>> CDDL. >> >> This is confusing... It seems that like you replied to my question in >> another email, not the quoted one :-) > > What other email? So, I was confused, I got an impression that you had replied to this one http://article.gmane.org/gmane.os.freebsd.devel.cvs/534648 Actually, it would be nice if you do :) > You've told me that I put code into the wrong place, > and I replied that it may be irrelevant, since I am not sure we should > import this code to FreeBSD as-is to its place in illumos. Even if the code turns out to be irrelevant for us, it still would be nice to put it into the correct / conventional place in the vendor area. There is no reason to create the confusion for no good cause. -- Andriy Gapon From owner-svn-src-all@freebsd.org Fri Oct 16 16:33:58 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 077E9A16E93; Fri, 16 Oct 2015 16:33:58 +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 610941053; Fri, 16 Oct 2015 16:33:56 +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 TAA25822; Fri, 16 Oct 2015 19:33:54 +0300 (EEST) (envelope-from avg@FreeBSD.org) Received: from localhost ([127.0.0.1]) by porto.starpoint.kiev.ua with esmtp (Exim 4.34 (FreeBSD)) id 1Zn7x4-000O8X-FB; Fri, 16 Oct 2015 19:33:54 +0300 Subject: Re: svn commit: r289422 - in head: cddl/contrib/opensolaris/lib/libzfs/common sys/cddl/contrib/opensolaris/common/zfs sys/cddl/contrib/opensolaris/uts/common/fs/zfs sys/cddl/contrib/opensolaris/uts/com... To: Alexander Motin , src-committers@FreeBSD.org, svn-src-all@FreeBSD.org, svn-src-head@FreeBSD.org References: <201510161445.t9GEjMbK059229@repo.freebsd.org> From: Andriy Gapon Message-ID: <562126BA.7050805@FreeBSD.org> Date: Fri, 16 Oct 2015 18:32:58 +0200 User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.2.0 MIME-Version: 1.0 In-Reply-To: <201510161445.t9GEjMbK059229@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 " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Oct 2015 16:33:58 -0000 On 16/10/2015 16:45, Alexander Motin wrote: > Author: mav > Date: Fri Oct 16 14:45:21 2015 > New Revision: 289422 > URL: https://svnweb.freebsd.org/changeset/base/289422 > > Log: > MFV r289310: > 4185 add new cryptographic checksums to ZFS: SHA-512, Skein, Edon-R > > Reviewed by: George Wilson > Reviewed by: Prakash Surya > Reviewed by: Saso Kiselkov > Reviewed by: Richard Lowe > Approved by: Garrett D'Amore > Author: Matthew Ahrens > > illumos/illumos-gate@45818ee124adeaaf947698996b4f4c722afc6d1f > > This is only a partial merge of respective ZFS infrastructure changes. > At this moment FreeBSD kernel has no those crypto algorithms, so the > parts of the code to enable them are commented out. When they are > implemented, it will be trivial to plug them in. BTW, do we need to add SHA-512 support to the boot code? Toomas Soome has already written some code for that: https://github.com/tsoome/illumos-gate/blob/loader/usr/src/boot/sys/cddl/boot/zfs/sha256.c > Added: > head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/edonr_zfs.c > - copied unchanged from r289310, vendor-sys/illumos/dist/uts/common/fs/zfs/edonr_zfs.c > head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/skein_zfs.c > - copied unchanged from r289310, vendor-sys/illumos/dist/uts/common/fs/zfs/skein_zfs.c > Modified: > head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_dataset.c > head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_sendrecv.c > head/sys/cddl/contrib/opensolaris/common/zfs/zfeature_common.c > head/sys/cddl/contrib/opensolaris/common/zfs/zfeature_common.h > head/sys/cddl/contrib/opensolaris/common/zfs/zfs_fletcher.c > head/sys/cddl/contrib/opensolaris/common/zfs/zfs_fletcher.h > head/sys/cddl/contrib/opensolaris/common/zfs/zfs_prop.c > head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c > head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/ddt.c > head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu.c > head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_send.c > head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_dataset.c > head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sha256.c > head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c > head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa_misc.c > head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dmu.h > head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/spa.h > head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/spa_impl.h > head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zio.h > head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zio_checksum.h > head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c > head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zio.c > head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zio_checksum.c > head/sys/cddl/contrib/opensolaris/uts/common/sys/debug.h > Directory Properties: > head/cddl/contrib/opensolaris/ (props changed) > head/cddl/contrib/opensolaris/lib/libzfs/ (props changed) > head/sys/cddl/contrib/opensolaris/ (props changed) > -- Andriy Gapon From owner-svn-src-all@freebsd.org Fri Oct 16 16:41:25 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 82816A160B1; Fri, 16 Oct 2015 16:41:25 +0000 (UTC) (envelope-from allanjude@freebsd.org) Received: from mx1.scaleengine.net (mx1.scaleengine.net [209.51.186.6]) by mx1.freebsd.org (Postfix) with ESMTP id 5B1081594; Fri, 16 Oct 2015 16:41:25 +0000 (UTC) (envelope-from allanjude@freebsd.org) Received: from [10.1.1.2] (unknown [10.1.1.2]) (Authenticated sender: allanjude.freebsd@scaleengine.com) by mx1.scaleengine.net (Postfix) with ESMTPSA id 45146D879; Fri, 16 Oct 2015 16:41:24 +0000 (UTC) Subject: Re: svn commit: r289422 - in head: cddl/contrib/opensolaris/lib/libzfs/common sys/cddl/contrib/opensolaris/common/zfs sys/cddl/contrib/opensolaris/uts/common/fs/zfs sys/cddl/contrib/opensolaris/uts/com... To: Andriy Gapon , Alexander Motin , src-committers@FreeBSD.org, svn-src-all@FreeBSD.org, svn-src-head@FreeBSD.org References: <201510161445.t9GEjMbK059229@repo.freebsd.org> <562126BA.7050805@FreeBSD.org> From: Allan Jude X-Enigmail-Draft-Status: N1110 Message-ID: <562128CA.9060807@freebsd.org> Date: Fri, 16 Oct 2015 12:41:46 -0400 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0 MIME-Version: 1.0 In-Reply-To: <562126BA.7050805@FreeBSD.org> Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="eloJvFHEXGCDIIhnUIPSj06bX7Bk2lUe8" X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Oct 2015 16:41:25 -0000 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --eloJvFHEXGCDIIhnUIPSj06bX7Bk2lUe8 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 2015-10-16 12:32, Andriy Gapon wrote: > On 16/10/2015 16:45, Alexander Motin wrote: >> Author: mav >> Date: Fri Oct 16 14:45:21 2015 >> New Revision: 289422 >> URL: https://svnweb.freebsd.org/changeset/base/289422 >> >> Log: >> MFV r289310: >> 4185 add new cryptographic checksums to ZFS: SHA-512, Skein, Edon-R >> =20 >> Reviewed by: George Wilson >> Reviewed by: Prakash Surya >> Reviewed by: Saso Kiselkov >> Reviewed by: Richard Lowe >> Approved by: Garrett D'Amore >> Author: Matthew Ahrens >> =20 >> illumos/illumos-gate@45818ee124adeaaf947698996b4f4c722afc6d1f >> =20 >> This is only a partial merge of respective ZFS infrastructure change= s. >> At this moment FreeBSD kernel has no those crypto algorithms, so the= >> parts of the code to enable them are commented out. When they are >> implemented, it will be trivial to plug them in. >=20 > BTW, do we need to add SHA-512 support to the boot code? > Toomas Soome has already written some code for that: > https://github.com/tsoome/illumos-gate/blob/loader/usr/src/boot/sys/cdd= l/boot/zfs/sha256.c >=20 >> Added: >> head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/edonr_zfs.c >> - copied unchanged from r289310, vendor-sys/illumos/dist/uts/comm= on/fs/zfs/edonr_zfs.c >> head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/skein_zfs.c >> - copied unchanged from r289310, vendor-sys/illumos/dist/uts/comm= on/fs/zfs/skein_zfs.c >> Modified: >> head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_dataset.c >> head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_sendrecv.c >> head/sys/cddl/contrib/opensolaris/common/zfs/zfeature_common.c >> head/sys/cddl/contrib/opensolaris/common/zfs/zfeature_common.h >> head/sys/cddl/contrib/opensolaris/common/zfs/zfs_fletcher.c >> head/sys/cddl/contrib/opensolaris/common/zfs/zfs_fletcher.h >> head/sys/cddl/contrib/opensolaris/common/zfs/zfs_prop.c >> head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c >> head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/ddt.c >> head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu.c >> head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_send.c >> head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_dataset.c >> head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sha256.c >> head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c >> head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa_misc.c >> head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dmu.h >> head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/spa.h >> head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/spa_impl.h >> head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zio.h >> head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zio_checksum= =2Eh >> head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c >> head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zio.c >> head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zio_checksum.c >> head/sys/cddl/contrib/opensolaris/uts/common/sys/debug.h >> Directory Properties: >> head/cddl/contrib/opensolaris/ (props changed) >> head/cddl/contrib/opensolaris/lib/libzfs/ (props changed) >> head/sys/cddl/contrib/opensolaris/ (props changed) >> >=20 >=20 I am working on a SHA512/256 implementation for FreeBSD, it is almost finished. I will get it in ASAP, and I can also handle adding the support to our gptzfsboot. --=20 Allan Jude --eloJvFHEXGCDIIhnUIPSj06bX7Bk2lUe8 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.22 (MingW32) iQIcBAEBAgAGBQJWISjNAAoJEBmVNT4SmAt+6xYP/ihp2dhC8xfLtttQjcTTdy3Z qw2iGsKfJW0ayC+PmScIrlkZGEa8OXu1xQC8ySgrMryV4Ne9RONb9xKToJLUhPI+ GV1e2gbc+uIYNURq6hM2rGmoWQ7SIheHM9JBj622B2zV2g0ily91o1ktWJRhX6rS vMxOf5TFnTYrhIxsC/U7mxZ6rxAsjkOBnR3F4/LqRFbaT7Nkgjt+0LQ0gYQq5Tc4 N+JSzEbssNlkYRDZR3VPmAkcg3scL1WMOAhljs/yOPfgYWOIG5vRrll9oQDlKLBE 4AvPir81Fo/PN4ZAjytH9Cx3lIl1088PNf6cPjrvLfKbNtd/2gEPRBho7KH2W0OA K6dcgGXuf3mz6El78CxSbJ8XmtJ7BiSFCZZQvlpcdm3VmoP92qYUSQgefQowb8a0 ifMZ1jo+6+NYvWf8ABteCNGDYgFRL1oSmmNajETVzE7ijYi4Na+tamzbPd5AXXDk KESTPu9zUfTpaPdpr25NaL3xWJLC4V96hWPvSXjuZAutev23BXIqxwML5Q7AOfjw 5ZtgZGMT4vtESbHXUp34GHr+1QpJHcxfSzl9QebDhPXU8MXsdv3Q4oSi9vzP/aOG 9Bce1y0IxMea547Q2IhCnvE4E5L/GNfufCs69sl0scN+a2xdVGEAeFg447mBeOK3 VvZedMK5o3EhiooudoM8 =9buR -----END PGP SIGNATURE----- --eloJvFHEXGCDIIhnUIPSj06bX7Bk2lUe8-- From owner-svn-src-all@freebsd.org Fri Oct 16 16:57:30 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 66F43A164E3; Fri, 16 Oct 2015 16:57:30 +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 D1E941EB8; Fri, 16 Oct 2015 16:57:28 +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 TAA26103; Fri, 16 Oct 2015 19:57:26 +0300 (EEST) (envelope-from avg@FreeBSD.org) Received: from localhost ([127.0.0.1]) by porto.starpoint.kiev.ua with esmtp (Exim 4.34 (FreeBSD)) id 1Zn8Jq-000OAB-Gh; Fri, 16 Oct 2015 19:57:26 +0300 Subject: Re: svn commit: r289422 - in head: cddl/contrib/opensolaris/lib/libzfs/common sys/cddl/contrib/opensolaris/common/zfs sys/cddl/contrib/opensolaris/uts/common/fs/zfs sys/cddl/contrib/opensolaris/uts/com... To: Allan Jude , Alexander Motin , src-committers@FreeBSD.org, svn-src-all@FreeBSD.org, svn-src-head@FreeBSD.org References: <201510161445.t9GEjMbK059229@repo.freebsd.org> <562126BA.7050805@FreeBSD.org> <562128CA.9060807@freebsd.org> From: Andriy Gapon Message-ID: <56212C52.4060104@FreeBSD.org> Date: Fri, 16 Oct 2015 18:56:50 +0200 User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.2.0 MIME-Version: 1.0 In-Reply-To: <562128CA.9060807@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 " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Oct 2015 16:57:30 -0000 On 16/10/2015 18:41, Allan Jude wrote: > I am working on a SHA512/256 implementation for FreeBSD, it is almost > finished. I will get it in ASAP, and I can also handle adding the > support to our gptzfsboot. Sounds great. Thank you! -- Andriy Gapon From owner-svn-src-all@freebsd.org Fri Oct 16 17:50:38 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1955CA171A4; Fri, 16 Oct 2015 17:50:38 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D7B0D1A5D; Fri, 16 Oct 2015 17:50:37 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t9GHoa6d014808; Fri, 16 Oct 2015 17:50:36 GMT (envelope-from jkim@FreeBSD.org) Received: (from jkim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9GHoabV014807; Fri, 16 Oct 2015 17:50:36 GMT (envelope-from jkim@FreeBSD.org) Message-Id: <201510161750.t9GHoabV014807@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jkim set sender to jkim@FreeBSD.org using -f From: Jung-uk Kim Date: Fri, 16 Oct 2015 17:50:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289425 - head/usr.bin/ldd X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Oct 2015 17:50:38 -0000 Author: jkim Date: Fri Oct 16 17:50:36 2015 New Revision: 289425 URL: https://svnweb.freebsd.org/changeset/base/289425 Log: Add support for ARM EABI. MFC after: 1 week Modified: head/usr.bin/ldd/ldd.c Modified: head/usr.bin/ldd/ldd.c ============================================================================== --- head/usr.bin/ldd/ldd.c Fri Oct 16 15:19:36 2015 (r289424) +++ head/usr.bin/ldd/ldd.c Fri Oct 16 17:50:36 2015 (r289425) @@ -386,9 +386,20 @@ is_executable(const char *fname, int fd, return (0); } if (hdr.elf.e_type == ET_DYN) { - if (hdr.elf.e_ident[EI_OSABI] == ELFOSABI_FREEBSD) { + switch (hdr.elf.e_ident[EI_OSABI]) { + case ELFOSABI_FREEBSD: *is_shlib = 1; return (1); +#ifdef __ARM_EABI__ + case ELFOSABI_NONE: + if (hdr.elf.e_machine != EM_ARM) + break; + if (EF_ARM_EABI_VERSION(hdr.elf.e_flags) < + EF_ARM_EABI_FREEBSD_MIN) + break; + *is_shlib = 1; + return (1); +#endif } warnx("%s: not a FreeBSD ELF shared object", fname); return (0); From owner-svn-src-all@freebsd.org Fri Oct 16 17:56:45 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2FDD4A17272; Fri, 16 Oct 2015 17:56:45 +0000 (UTC) (envelope-from scottl@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 078FD1D50; Fri, 16 Oct 2015 17:56:44 +0000 (UTC) (envelope-from scottl@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t9GHuiqX016998; Fri, 16 Oct 2015 17:56:44 GMT (envelope-from scottl@FreeBSD.org) Received: (from scottl@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9GHuh3u016993; Fri, 16 Oct 2015 17:56:43 GMT (envelope-from scottl@FreeBSD.org) Message-Id: <201510161756.t9GHuh3u016993@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: scottl set sender to scottl@FreeBSD.org using -f From: Scott Long Date: Fri, 16 Oct 2015 17:56:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289426 - in head/sys/dev: mpr mps X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Oct 2015 17:56:45 -0000 Author: scottl Date: Fri Oct 16 17:56:43 2015 New Revision: 289426 URL: https://svnweb.freebsd.org/changeset/base/289426 Log: Remove _FreeBSD_version check for something that was only an issue with 9-CURRENT. Obtained from: Netlfix, Inc MFC after: 3 days Modified: head/sys/dev/mpr/mpr.c head/sys/dev/mpr/mprvar.h head/sys/dev/mps/mps.c head/sys/dev/mps/mps_sas.h head/sys/dev/mps/mpsvar.h Modified: head/sys/dev/mpr/mpr.c ============================================================================== --- head/sys/dev/mpr/mpr.c Fri Oct 16 17:50:36 2015 (r289425) +++ head/sys/dev/mpr/mpr.c Fri Oct 16 17:56:43 2015 (r289426) @@ -1471,11 +1471,9 @@ mpr_setup_sysctl(struct mpr_softc *sc) OID_AUTO, "enable_ssu", CTLFLAG_RW, &sc->enable_ssu, 0, "enable SSU to SATA SSD/HDD at shutdown"); -#if __FreeBSD_version >= 900030 SYSCTL_ADD_UQUAD(sysctl_ctx, SYSCTL_CHILDREN(sysctl_tree), OID_AUTO, "chain_alloc_fail", CTLFLAG_RD, &sc->chain_alloc_fail, "chain allocation failures"); -#endif //FreeBSD_version >= 900030 SYSCTL_ADD_INT(sysctl_ctx, SYSCTL_CHILDREN(sysctl_tree), OID_AUTO, "spinup_wait_time", CTLFLAG_RD, Modified: head/sys/dev/mpr/mprvar.h ============================================================================== --- head/sys/dev/mpr/mprvar.h Fri Oct 16 17:50:36 2015 (r289425) +++ head/sys/dev/mpr/mprvar.h Fri Oct 16 17:56:43 2015 (r289426) @@ -265,9 +265,7 @@ struct mpr_softc { int chain_free_lowwater; u_int enable_ssu; int spinup_wait_time; -#if __FreeBSD_version >= 900030 uint64_t chain_alloc_fail; -#endif struct sysctl_ctx_list sysctl_ctx; struct sysctl_oid *sysctl_tree; char fw_version[16]; @@ -451,11 +449,8 @@ mpr_alloc_chain(struct mpr_softc *sc) sc->chain_free--; if (sc->chain_free < sc->chain_free_lowwater) sc->chain_free_lowwater = sc->chain_free; - } -#if __FreeBSD_version >= 900030 - else + } else sc->chain_alloc_fail++; -#endif return (chain); } Modified: head/sys/dev/mps/mps.c ============================================================================== --- head/sys/dev/mps/mps.c Fri Oct 16 17:50:36 2015 (r289425) +++ head/sys/dev/mps/mps.c Fri Oct 16 17:56:43 2015 (r289426) @@ -1468,11 +1468,9 @@ mps_setup_sysctl(struct mps_softc *sc) OID_AUTO, "enable_ssu", CTLFLAG_RW, &sc->enable_ssu, 0, "enable SSU to SATA SSD/HDD at shutdown"); -#if __FreeBSD_version >= 900030 SYSCTL_ADD_UQUAD(sysctl_ctx, SYSCTL_CHILDREN(sysctl_tree), OID_AUTO, "chain_alloc_fail", CTLFLAG_RD, &sc->chain_alloc_fail, "chain allocation failures"); -#endif //FreeBSD_version >= 900030 SYSCTL_ADD_INT(sysctl_ctx, SYSCTL_CHILDREN(sysctl_tree), OID_AUTO, "spinup_wait_time", CTLFLAG_RD, Modified: head/sys/dev/mps/mps_sas.h ============================================================================== --- head/sys/dev/mps/mps_sas.h Fri Oct 16 17:50:36 2015 (r289425) +++ head/sys/dev/mps/mps_sas.h Fri Oct 16 17:56:43 2015 (r289426) @@ -58,7 +58,6 @@ struct mpssas_target { uint16_t tid; SLIST_HEAD(, mpssas_lun) luns; - TAILQ_HEAD(, mps_command) commands; struct mps_command *tm; TAILQ_HEAD(, mps_command) timedout_commands; uint16_t exp_dev_handle; Modified: head/sys/dev/mps/mpsvar.h ============================================================================== --- head/sys/dev/mps/mpsvar.h Fri Oct 16 17:50:36 2015 (r289425) +++ head/sys/dev/mps/mpsvar.h Fri Oct 16 17:56:43 2015 (r289426) @@ -283,9 +283,7 @@ struct mps_softc { int chain_free_lowwater; u_int enable_ssu; int spinup_wait_time; -#if __FreeBSD_version >= 900030 uint64_t chain_alloc_fail; -#endif struct sysctl_ctx_list sysctl_ctx; struct sysctl_oid *sysctl_tree; char fw_version[16]; @@ -483,11 +481,8 @@ mps_alloc_chain(struct mps_softc *sc) sc->chain_free--; if (sc->chain_free < sc->chain_free_lowwater) sc->chain_free_lowwater = sc->chain_free; - } -#if __FreeBSD_version >= 900030 - else + } else sc->chain_alloc_fail++; -#endif return (chain); } From owner-svn-src-all@freebsd.org Fri Oct 16 18:17:07 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9E4DBA17686; Fri, 16 Oct 2015 18:17:07 +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 87136BAF; Fri, 16 Oct 2015 18:17:07 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from mail.xzibition.com (localhost [IPv6:::1]) by freefall.freebsd.org (Postfix) with ESMTP id 80FF411E3; Fri, 16 Oct 2015 18:17:07 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from mail.xzibition.com (localhost [172.31.3.2]) by mail.xzibition.com (Postfix) with ESMTP id 38618138D3; Fri, 16 Oct 2015 18:17:07 +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 awo06nehVTHO; Fri, 16 Oct 2015 18:17:04 +0000 (UTC) Subject: Re: svn commit: r289415 - in head: . sys/sys DKIM-Filter: OpenDKIM Filter v2.9.2 mail.xzibition.com 21BE1138CE To: Alexander Motin , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201510160857.t9G8vBUV051731@repo.freebsd.org> From: Bryan Drewery Openpgp: id=F9173CB2C3AAEA7A5C8A1F0935D771BB6E4697CF; url=http://www.shatow.net/bryan/bryan2.asc Organization: FreeBSD Message-ID: <56213F23.7000909@FreeBSD.org> Date: Fri, 16 Oct 2015 11:17:07 -0700 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0 MIME-Version: 1.0 In-Reply-To: <201510160857.t9G8vBUV051731@repo.freebsd.org> Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="ERqE5Cp8URukwBEsj3wjWNQH0n2dFrrAu" X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Oct 2015 18:17:07 -0000 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --ERqE5Cp8URukwBEsj3wjWNQH0n2dFrrAu Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 10/16/2015 1:57 AM, Alexander Motin wrote: > Author: mav > Date: Fri Oct 16 08:57:11 2015 > New Revision: 289415 > URL: https://svnweb.freebsd.org/changeset/base/289415 >=20 > Log: > Bump version and add notice about incompatibility introduced by resum= able > send/receive support in ZFS. >=20 > Modified: > head/UPDATING > head/sys/sys/param.h >=20 > Modified: head/UPDATING > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=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/UPDATING Fri Oct 16 08:22:21 2015 (r289414) > +++ head/UPDATING Fri Oct 16 08:57:11 2015 (r289415) > @@ -31,6 +31,12 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 11 > disable the most expensive debugging functionality run > "ln -s 'abort:false,junk:false' /etc/malloc.conf".) > =20 > +20151015: > + Added ZFS support for resumable send/receive changed respective > + IOCTL API/ABI. Compatibility ABI shims were provided for other > + functionality, while receive require version match between world > + and kernel. This means for example that 'zfs recv' in a 10.2 jail running on a 11.0 kernel will not work? Can compatibility be added for it? --=20 Regards, Bryan Drewery --ERqE5Cp8URukwBEsj3wjWNQH0n2dFrrAu 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 iQEbBAEBAgAGBQJWIT8jAAoJEDXXcbtuRpfPf7EH+N2u+QhyE49bmu5c9bp6tem+ 0x474SOYYZzWtVdKYpBGX4elmNNXS1kNWpvJDAD+ah1O5XGhxTR0RRu2VmUvgniN G1UfsP8zS+5AsbAcKiavx1Ta96+zY2WI1s/LKOo1Qn3ESRAKGGkC/K9kay9ucBJB 5YlArle8v86DnIRR08P73F+xPFvM7IFtGMKDzMbFHmoeTF4QQQLkrckRSHsiMmtb fJTBNCj03ZeXta+2XWr7Ou+/xCtkklmoWPBaa/sO58Gko56IZ7GWz2kApxQZ/dmh KUbTIZdb5izQKvuKEg4P0rfzUQYHDk8lhRysUqGFDrHKOPtRcAkO3ccMKU5YKw== =mRUW -----END PGP SIGNATURE----- --ERqE5Cp8URukwBEsj3wjWNQH0n2dFrrAu-- From owner-svn-src-all@freebsd.org Fri Oct 16 18:26:10 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7F70AA178ED; Fri, 16 Oct 2015 18:26:10 +0000 (UTC) (envelope-from mavbsd@gmail.com) Received: from mail-lf0-x22d.google.com (mail-lf0-x22d.google.com [IPv6:2a00:1450:4010:c07::22d]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 05E4212F0; Fri, 16 Oct 2015 18:26:10 +0000 (UTC) (envelope-from mavbsd@gmail.com) Received: by lffv3 with SMTP id v3so83901090lff.0; Fri, 16 Oct 2015 11:26:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:message-id:date:from:user-agent:mime-version:to:subject :references:in-reply-to:content-type:content-transfer-encoding; bh=mgwpvWjFqBaPAyQ0GscRnc/er0WMrRNHiHjicL+TktI=; b=dbFIizJLjcmJqW+F/yS2ORXGdGo8B5/eR+Q7S1EGvlR1cR8FGSM2A+oH1dje8pUFLJ /Q/CX/klf5nVT00w+gHq4wQTPUvq+L+zwlT46VnjwPOiAj33fnvKp8rz6aKcdZy2UCB7 YdBlLn/mXvfUZb8eJZu3Y7MPhAHJr2LBlTjJYfupiXXn9HtLBomg/uCTnl2Tu/t5Qpx0 Zg+aitvQ0K31fFi/FTZ3D5GjYfu2nxrnMCmfpooB80AcJejGV5RodMEYZfR3LqK0+1Ob EO0ERZ5SpgFjyWp4tAganD9zYG34jBL9H57XpswCfyvFy3q8DxbByslwd3ADaVWVPrj1 BomQ== X-Received: by 10.25.18.233 with SMTP id 102mr5834596lfs.96.1445019968145; Fri, 16 Oct 2015 11:26:08 -0700 (PDT) Received: from mavbook.mavhome.dp.ua ([2a01:d0:c0a9:3:c685:8ff:fe11:1aa2]) by smtp.googlemail.com with ESMTPSA id 34sm2154910lfx.47.2015.10.16.11.26.06 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 16 Oct 2015 11:26:07 -0700 (PDT) Sender: Alexander Motin Message-ID: <5621413C.1090904@FreeBSD.org> Date: Fri, 16 Oct 2015 21:26:04 +0300 From: Alexander Motin User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:31.0) Gecko/20100101 Thunderbird/31.6.0 MIME-Version: 1.0 To: Bryan Drewery , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r289415 - in head: . sys/sys References: <201510160857.t9G8vBUV051731@repo.freebsd.org> <56213F23.7000909@FreeBSD.org> In-Reply-To: <56213F23.7000909@FreeBSD.org> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Oct 2015 18:26:10 -0000 On 16.10.2015 21:17, Bryan Drewery wrote: > On 10/16/2015 1:57 AM, Alexander Motin wrote: >> Author: mav >> Date: Fri Oct 16 08:57:11 2015 >> New Revision: 289415 >> URL: https://svnweb.freebsd.org/changeset/base/289415 >> >> Log: >> Bump version and add notice about incompatibility introduced by resumable >> send/receive support in ZFS. >> >> Modified: >> head/UPDATING >> head/sys/sys/param.h >> >> Modified: head/UPDATING >> ============================================================================== >> --- head/UPDATING Fri Oct 16 08:22:21 2015 (r289414) >> +++ head/UPDATING Fri Oct 16 08:57:11 2015 (r289415) >> @@ -31,6 +31,12 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 11 >> disable the most expensive debugging functionality run >> "ln -s 'abort:false,junk:false' /etc/malloc.conf".) >> >> +20151015: >> + Added ZFS support for resumable send/receive changed respective >> + IOCTL API/ABI. Compatibility ABI shims were provided for other >> + functionality, while receive require version match between world >> + and kernel. > > This means for example that 'zfs recv' in a 10.2 jail running on a 11.0 > kernel will not work? Can compatibility be added for it? The structures passed as argument for receive are large and completely different. Unfortunately I don't know enough about that code to say whether new one can be forged from the old one. I'll take another look, but can not promise anything. -- Alexander Motin From owner-svn-src-all@freebsd.org Fri Oct 16 19:13:35 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0131FA1662D; Fri, 16 Oct 2015 19:13:35 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C2AAD186A; Fri, 16 Oct 2015 19:13:34 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t9GJDX2n041338; Fri, 16 Oct 2015 19:13:33 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9GJDX8h041337; Fri, 16 Oct 2015 19:13:33 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201510161913.t9GJDX8h041337@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Fri, 16 Oct 2015 19:13:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r289428 - vendor-sys/illumos/dist/uts/common/crypto vendor/illumos/dist/common/crypto 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 " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Oct 2015 19:13:35 -0000 Author: mav Date: Fri Oct 16 19:13:33 2015 New Revision: 289428 URL: https://svnweb.freebsd.org/changeset/base/289428 Log: Remove parts not directly mergeable to FreeBSD. Illumos kernel modures are just not applicable, while hashing algorithms would better be BSD-licensed and put into proper sys/crypto place. Requested by: avg Deleted: vendor/illumos/dist/common/crypto/ Changes in other areas also in this revision: Deleted: vendor-sys/illumos/dist/uts/common/crypto/ From owner-svn-src-all@freebsd.org Fri Oct 16 19:13:34 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E19ADA1662C; Fri, 16 Oct 2015 19:13:34 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A9A581869; Fri, 16 Oct 2015 19:13:34 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t9GJDXSY041333; Fri, 16 Oct 2015 19:13:33 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9GJDXkV041332; Fri, 16 Oct 2015 19:13:33 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201510161913.t9GJDXkV041332@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Fri, 16 Oct 2015 19:13:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r289428 - vendor-sys/illumos/dist/uts/common/crypto vendor/illumos/dist/common/crypto X-SVN-Group: vendor-sys MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Oct 2015 19:13:35 -0000 Author: mav Date: Fri Oct 16 19:13:33 2015 New Revision: 289428 URL: https://svnweb.freebsd.org/changeset/base/289428 Log: Remove parts not directly mergeable to FreeBSD. Illumos kernel modures are just not applicable, while hashing algorithms would better be BSD-licensed and put into proper sys/crypto place. Requested by: avg Deleted: vendor-sys/illumos/dist/uts/common/crypto/ Changes in other areas also in this revision: Deleted: vendor/illumos/dist/common/crypto/ From owner-svn-src-all@freebsd.org Fri Oct 16 19:16:50 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id ACCECA167B3 for ; Fri, 16 Oct 2015 19:16:50 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from mail-pa0-f50.google.com (mail-pa0-f50.google.com [209.85.220.50]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 7D7FB1B8B for ; Fri, 16 Oct 2015 19:16:50 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: by padcn9 with SMTP id cn9so13352526pad.2 for ; Fri, 16 Oct 2015 12:16:43 -0700 (PDT) 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=C0Di2Rpc5cr7PhSWee3fFGHWnY3qlKZgCtMh5fhC+Ds=; b=WfoI5+P3QzZEuzghBzcBdsP6VdhV6T1gv/78YCkIoiv5QemGrepnZyyxn+EdToWWaR Kbw/ppgZBY9sjAKf2efpejCp4NaN2HnsaCiLf4sj1jDjbMJL7rwtMYRpE9lDmNFddMNN oXCyMeQkeenUADjv9bcMO8YgfCnuH0f0RwG915nTL4fVx5CCkAh9N/FNJkQaQn7bzZHm W7kI67JxdYKM0gK079G5Ok3WNdhz0daGy7egMf+4xrHWPEttW5Fow508AxzAvgIkkh3d CcUVoT8SAwWxmkinid2t+7GICKU7EKbbKy+3gAaJ5OhBh9oHtUf1dGwxXLmk0p7CN52m KDuA== X-Gm-Message-State: ALoCoQknZPYaG8pAqNSgjRurVVeM6FP4U18icQ2AMRflph/P3APGCv0W/Y2tV439ZD1MFMAiWjPD X-Received: by 10.66.253.99 with SMTP id zz3mr18136324pac.38.1445023003857; Fri, 16 Oct 2015 12:16:43 -0700 (PDT) Received: from ip-100-127-144-209.ec2.internal ([69.53.245.40]) by smtp.gmail.com with ESMTPSA id w8sm22582800pbs.87.2015.10.16.12.16.42 (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 16 Oct 2015 12:16:43 -0700 (PDT) Sender: Warner Losh Subject: Re: svn commit: r289405 - head/sys/ufs/ffs Mime-Version: 1.0 (Mac OS X Mail 8.2 \(2104\)) Content-Type: multipart/signed; boundary="Apple-Mail=_F5C7F81A-87C9-4B9F-AF3C-C309D07FE444"; protocol="application/pgp-signature"; micalg=pgp-sha512 X-Pgp-Agent: GPGMail 2.5.2 From: Warner Losh In-Reply-To: <5620B15C.8090104@selasky.org> Date: Fri, 16 Oct 2015 13:16:39 -0600 Cc: Bruce Evans , Warner Losh , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Message-Id: References: <201510160306.t9G3622O049128@repo.freebsd.org> <20151016151349.W1280@besplex.bde.org> <5620B15C.8090104@selasky.org> To: Hans Petter Selasky 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 " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Oct 2015 19:16:50 -0000 --Apple-Mail=_F5C7F81A-87C9-4B9F-AF3C-C309D07FE444 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=windows-1252 > On Oct 16, 2015, at 2:12 AM, Hans Petter Selasky = wrote: >=20 > On 10/16/15 08:21, Bruce Evans wrote: >> In addition, making the file contiguous in LBA space doesn't >> improve the access times from flash devices because they have no = seek >> time. >=20 > Hi, >=20 > This is not exactly true, like Bruce pointed out too. Maybe there = should be a check, that if the block is too small reallocate it, else = leave it for the sake of the flash. Doing 1K accesses versus 64K = accesses will typically show up in the performance benchmark regardless = of how fast the underlying medium is. But that=92s not what this does. It isn=92t the defrag code that takes = the 2-8k fragments and squashes them into 16-64k block size for the = device. This takes the larger blocks and makes sure they are next to = each other. This takes large contiguous space (like 2MB) and puts as = much as possible in a cylinder group. That=92s totally useless on a = flash drive. Since the sizes of the blocks are so large, moving them won=92t change = any benchmarks. Warner --Apple-Mail=_F5C7F81A-87C9-4B9F-AF3C-C309D07FE444 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 iQIcBAEBCgAGBQJWIU0XAAoJEGwc0Sh9sBEA2NAP/jExMKGTXDjVBkUPfavVpXSY cUdIspM7IEasio9YevjdT17MePqRGd5Iwc8ViYvZC2RwACUMYbjKl2fP02DxJfd2 BafqkQB+Ruxpgggj8YpV0J9o2vcagmehr9waX47DvlpQ+r1XnltmpK94xU3FP81F 4V2/7Cqqx0AA20yOD3dorEvZYEfV6w4fv1j0AqanXXzNOJ3uOY4G7XhTbDPr8eGg eOLeqocZ7ssN+Gms0VA8mUAK5nKld47bOJPM3M3+x3Q+GRxVQ0ojNQKHh8hBUlRN cLGL5SW0wTF4VpHAEx5MaC8YoWMhIvbFcf+rmFDTgfkeomE2eVSo5OdjbTQmdS/t yRGzjpRe/o20BSn0xURzkqwiIMKhoTzBeDOhyBP3WAmCy5P3JGsMCErsxTp3g0AM zEnA7d0AX79WfLxO+ybZyRFACO1W1N+0inlbB0QSouxIgqC85OJ2eohvQwexso1E MP+ZYpJXqiDsiEgt9r8Xy57yUbmS6Nyo5kkn6EutGozV+aQlZhgKaZtQl6KC7/1x fYvI4CFywfB/aVUQznaY3PGlDwd3123djNATTAI+z/dwX1P4R0elf2TfYlax0CBx aGY3PeExVZeclKD1eHYi/3ZlD37dzRs8Z7CZzd5OlXRHfvMZOMDi/lxswJZ2VcUh /UZAVvTW/OQ56aSejQhG =t5ja -----END PGP SIGNATURE----- --Apple-Mail=_F5C7F81A-87C9-4B9F-AF3C-C309D07FE444-- From owner-svn-src-all@freebsd.org Fri Oct 16 19:22:55 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C463BA16A43 for ; Fri, 16 Oct 2015 19:22:55 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from mail-pa0-f47.google.com (mail-pa0-f47.google.com [209.85.220.47]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 94B5E1FCC for ; Fri, 16 Oct 2015 19:22:55 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: by pacfv9 with SMTP id fv9so30652877pac.3 for ; Fri, 16 Oct 2015 12:22:49 -0700 (PDT) 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=/NPcPuaCR0MBkXgogxlgeGuh06z3sAqTUZJSoeEIAiI=; b=m5Sjf5DqVqh7mI8evp6IZ7CZJEpBn5UCMbIj90WuJEhAc2OhRnqKEk1cOyU/OvE6Fq pDXp5x3omXGj7JsmYV4/jPlU2E2SwC+CzHaeA+bManvsJgeZO4l9GKryZgQYHvN+2Bkn /SkpML0wxEZWCl0sa+RcL9soNan7jiyo3fpHfSYhhZcDEfpqStSKcDrHDB8WWgIdV4YA rTcHLVHWAzMRXcy2C5IeCKp66Ekyz7cVDmVgK6EgMqJFtLKf+w5FRgANAHWBqJYTPw2D +JH5CaRYhFaII+NRph0sp1rRHi90Zz+Um+8CU9tiDW/4qdC2k4rcZTFuHXvsXzChOAYw gpEg== X-Gm-Message-State: ALoCoQktwIxJp+HWplJ9DQWyG2WluC82SQMQo08oQE6x9RMBRzmzerJXqjQKsHjJb7F3nhKwiYfA X-Received: by 10.68.185.67 with SMTP id fa3mr7141640pbc.113.1445023369402; Fri, 16 Oct 2015 12:22:49 -0700 (PDT) Received: from ip-100-127-144-209.ec2.internal ([69.53.245.40]) by smtp.gmail.com with ESMTPSA id yt3sm2334873pbc.31.2015.10.16.12.22.47 (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 16 Oct 2015 12:22:48 -0700 (PDT) Sender: Warner Losh Subject: Re: svn commit: r289405 - head/sys/ufs/ffs Mime-Version: 1.0 (Mac OS X Mail 8.2 \(2104\)) Content-Type: multipart/signed; boundary="Apple-Mail=_7FB987D8-D45D-47AC-8C10-CDCA9B1DCE46"; protocol="application/pgp-signature"; micalg=pgp-sha512 X-Pgp-Agent: GPGMail 2.5.2 From: Warner Losh In-Reply-To: <20151016131940.GE42243@zxy.spb.ru> Date: Fri, 16 Oct 2015 13:22:44 -0600 Cc: Warner Losh , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Message-Id: <3ADA7934-3EE1-449E-A8D1-723B73020C13@bsdimp.com> References: <201510160306.t9G3622O049128@repo.freebsd.org> <20151016131940.GE42243@zxy.spb.ru> To: Slawa Olhovchenkov 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 " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Oct 2015 19:22:55 -0000 --Apple-Mail=_7FB987D8-D45D-47AC-8C10-CDCA9B1DCE46 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 > On Oct 16, 2015, at 7:19 AM, Slawa Olhovchenkov = wrote: >=20 > On Fri, Oct 16, 2015 at 03:06:02AM +0000, Warner Losh wrote: >=20 >> Author: imp >> Date: Fri Oct 16 03:06:02 2015 >> New Revision: 289405 >> URL: https://svnweb.freebsd.org/changeset/base/289405 >>=20 >> Log: >> Do not relocate extents to make them contiguous if the underlying = drive can do >> deletions. Ability to do deletions is a strong indication that this >> optimization will not help performance. It will only generate extra = write >> traffic. These devices are typically flash based and have a limited = number of >> write cycles. In addition, making the file contiguous in LBA space = doesn't >> improve the access times from flash devices because they have no = seek time. >=20 > In reality, flash devices have seek time, about 0.1ms. > Many flash devices can do 8 simultaneously "seek" (I think NVMe can do > more). That=E2=80=99s just not true. tREAD for most flash is a few tens of = microseconds. The streaming time is at most 10 microseconds. There=E2=80=99s no =E2=80=9Csee= k=E2=80=9D time in the classic sense. Once you get the data, you have it. There=E2=80=99s no extra = =E2=80=9Cread time=E2=80=9D in the NAND flash parts. And the number of simultaneous reads depends a lot on how the flash = vendor organized the flash. Many of today=E2=80=99s designs use 8 or 16 die = parts that have 2 to 4 planes on them, giving a parallelism in the 16-64 range. And = that=E2=80=99s before we get into innovative strategies that use partial page reads to = decrease tREAD time and novel data striping methods. Seek time, as a separate operation, simply doesn=E2=80=99t exist. Furthermore, NAND-based devices are log-structured with garbage = collection for both retention and to deal with retired blocks in the underlying = NAND. The relationship between LBA ranges and where the data is at any given time = on the NAND is almost uncorrelated. So, rearranging data so that it is in LBA contiguous ranges doesn=E2=80=99= t help once you=E2=80=99re above the FFS block level. Warner --Apple-Mail=_7FB987D8-D45D-47AC-8C10-CDCA9B1DCE46 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 iQIcBAEBCgAGBQJWIU6EAAoJEGwc0Sh9sBEAbIYP/RtYW6TeKYHBOuL2JWV3Srud 6z6oXEp/U8dq1fZSrvJuKCxXaZXbFAaDSWabv1qayx+xhWDaJljorQIzlhVuSmOC Mvk5pZMEMHcEnxquZ9QT9rAfYXtUgbpBAhjeQsKwk5USb+5oTL1dzkYZZkS0CwhM /aB8PaKX3iMvRgsr540ZdfXOCpHA1K7ntLr5Eb9ZETZ6eexrhQUE/+wIVrUpr+kt gGPUNRjr375jAiObt6PWzl32OlnfJHTvU+R0N5ZVPWNMBGurLWiNGrT4BCMM4KLj Xc4Kaiv/AkcJjI8q2EdlprUDH7dyHTiXndYHgI7VEVzv3JHa7QIvMZLk5UVUCYCr Xs4BX0SdZ2xaNYi1JUPkoRxv6bsrpKMRtfH6WuJAKJwgGEfJhMkocFXtYhl/JUbO Oli7DXKEYd3KwRA9Acn/4/RWk7unL+j4rWQMiWtzTA5KHxh+9kTP0W6Y6pFsjKFv zl1sZLw5ACUipRJuCJLBdUn8IdrMR1h3AOJqmdx5VMPIaYTGF8nLqhtuykyTutTA Ta8z+g3DIxc7NO7gI6jJ//L7L2VsUMjvwLG8L+P3HvFVslhbPn9+XK3gixEWYiB2 aq/SW3dFWqvItmo0hD394ZRN/+sf/jpk026MrrC/e9+t6no+VvBxu1BZQIL5nnUh UMJYjYECkz5UT/CIzgq0 =bUtC -----END PGP SIGNATURE----- --Apple-Mail=_7FB987D8-D45D-47AC-8C10-CDCA9B1DCE46-- From owner-svn-src-all@freebsd.org Fri Oct 16 19:24:27 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id CB229A16B05 for ; Fri, 16 Oct 2015 19:24:27 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from mail-pa0-f52.google.com (mail-pa0-f52.google.com [209.85.220.52]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 9F49825E for ; Fri, 16 Oct 2015 19:24:27 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: by padcn9 with SMTP id cn9so13494050pad.2 for ; Fri, 16 Oct 2015 12:24:27 -0700 (PDT) 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=1Sq0m/R9vp55uy+rIbhke/MMPkti2g8pFx6VFfC742c=; b=J703N3kYSXhKr0mDNFNRPE9dJwuOErPKSLNDMbMvPWGqYotJN5BuxqZKOVWljsgbGR hlxyajD+auROz6v8TUbCT1ZApvxL5ZrNIGONNvN7zS7q9yugxUyhBBhMzWuniEaSuZAW HMjt3vp+X5d4nN8PTLzyEE/WysBoMXum/2PGg5Cr5dOiVQY9D4F3zYmQwP9maqXN7jsW bG2Fxkt7AoVg48+GS5+Bw5PPik/+1ZFU7iMjNx7dJ2b99n6P2IAm85wYRHXnFzUH5aud fKoyBfBVXttkOSy6+Mi6+0dc88McdtUIfSry8XGlsltb56Pih/nyir74nGHInjvfsqbZ gISg== X-Gm-Message-State: ALoCoQkJQ6pWnx5mK1808rJyoesQodm7q7Mdt8nHv9UJMhZpQmTDbv6DD11CIj+OKzkUwwpaeI9w X-Received: by 10.67.30.136 with SMTP id ke8mr18617677pad.16.1445023467112; Fri, 16 Oct 2015 12:24:27 -0700 (PDT) Received: from ip-100-127-144-209.ec2.internal ([69.53.245.40]) by smtp.gmail.com with ESMTPSA id ix1sm9386977pbd.40.2015.10.16.12.24.25 (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 16 Oct 2015 12:24:26 -0700 (PDT) Sender: Warner Losh Subject: Re: svn commit: r289405 - head/sys/ufs/ffs Mime-Version: 1.0 (Mac OS X Mail 8.2 \(2104\)) Content-Type: multipart/signed; boundary="Apple-Mail=_A61B5B61-D22A-4A4C-9A17-34CDD74809B4"; protocol="application/pgp-signature"; micalg=pgp-sha512 X-Pgp-Agent: GPGMail 2.5.2 From: Warner Losh In-Reply-To: <562103B6.2090406@FreeBSD.org> Date: Fri, 16 Oct 2015 13:24:22 -0600 Cc: Bruce Evans , Hans Petter Selasky , Warner Losh , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Message-Id: References: <201510160306.t9G3622O049128@repo.freebsd.org> <20151016151349.W1280@besplex.bde.org> <5620B15C.8090104@selasky.org> <20151016194242.N2138@besplex.bde.org> <562103B6.2090406@FreeBSD.org> To: Pedro Giffuni 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 " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Oct 2015 19:24:27 -0000 --Apple-Mail=_A61B5B61-D22A-4A4C-9A17-34CDD74809B4 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=windows-1252 > On Oct 16, 2015, at 8:03 AM, Pedro Giffuni wrote: >=20 >=20 >=20 > On 10/16/15 03:53, Bruce Evans wrote: >> On Fri, 16 Oct 2015, Hans Petter Selasky wrote: >>=20 >>> On 10/16/15 08:21, Bruce Evans wrote: >>>> [Bruce Evans didn't write:] >>>> In addition, making the file contiguous in LBA space doesn't >>>> improve the access times from flash devices because they have no = seek >>>> time. >>>=20 >>> This is not exactly true, like Bruce pointed out too. Maybe there >>> should be a check, that if the block is too small reallocate it, = else >>> leave it for the sake of the flash. Doing 1K accesses versus 64K >>> accesses will typically show up in the performance benchmark >>> regardless of how fast the underlying medium is. >>=20 >> Now I don't unerstand the whole point of the change. Anything that = reduces >> i/o's is good, but AFAIK ffs_doreallocblks() is all in software. = Writes >> should be delayed so that it doesn't have to do extra i/o's to back = out of >> committed writes. Often it reduces the number of writes and = increases >> their size by making blocks contiguous so that the write can be = clustered. >> Increasing the write size is especially good for flash devices, but = maybe >> ffs's default block size is already large enough. >>=20 >=20 > I agree with Bruce: reallocation (which our ext2fs also does) happens > in memory, before it hits the disk. >=20 > By the nature of their load, Netflix doesn't care about fragmentation, > but even in that case reallocblk doesn't hurt, and I don't see = anything > inherent in SSDs that makes fragmentation desirable. >=20 > Of course, no one understands reallocblk better than Kirk, and Warner > knows SSD's pretty well so I must be missing something. :). This has nothing to do with fragments at all. This is all about = rearranging FFS blocks arbitrarily, which isn=92t all in memory before the writes = happen. The data can and does move, which generates TRIM operations for the old data placement, and real writes for the new data placement. = These optimizations do help. Warner --Apple-Mail=_A61B5B61-D22A-4A4C-9A17-34CDD74809B4 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 iQIcBAEBCgAGBQJWIU7mAAoJEGwc0Sh9sBEAfWMQAKSJFNG5G3FJ5eOJKtCJGuOE hLc9ZSny6vHGHk8RuqgWJBgESh2VaocOwewkCB2wdbHCCk0vH3OuRflb6zviH0jI fAFyVpiCGqWJ6hkap57xHfwU+a9iHgY0wT2cHCyh1M3sOC03KqGa31UnZcZ1detF 2JtKewPE+KvAL09KbjLkpEmBESrWIMf0ABiL/KFa2sUSR9P8SvwA55AmymU67Zjc 52VLeiSwoBheYhL6fSa9Tpn8sl/CsT6mptRKqYsv9g27MKEKyzWmhS8Ikvfza6wG YKaafpdWvQhYQkoypWHT/w5BE7CeEbJ1y3oUSlAtBwjrvY4c1kbpKt3TjXfqTz0V G1F0uXb02XGhZK9x6P/gfX5HmVTPOet27YBagt2MP8/1wUVhobD6zcWfVqeUrPMz zFvfJm/k+Rh0s0AHh0GNESkY4gpbLgHfjxzO2WJfaz6wCIz1XZwGywHhA/lkspgm d3w4wUHDbbstCj8v/BycbU3WHrhWmqUrWsSJGCgFmdr23dDJFQeHcN/w5temmx2E nlX0yUq9Wm74x/iUmNf5+nKe/SXiSf7cNtUFvTMErVvqL1hwgT52SHoMFusV1Kkx 6MwrUVhqsrRGlfrLL8qNPDZQb5t7BVf0Tj+uRmIB8czEyfIADPXRhpa0H4+M0Sfd cgJ8cFo4hCSIfn6VMpSl =o9Gc -----END PGP SIGNATURE----- --Apple-Mail=_A61B5B61-D22A-4A4C-9A17-34CDD74809B4-- From owner-svn-src-all@freebsd.org Fri Oct 16 20:18:13 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id BF51CA17938; Fri, 16 Oct 2015 20:18:13 +0000 (UTC) (envelope-from scottl@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 868AA3C9; Fri, 16 Oct 2015 20:18:13 +0000 (UTC) (envelope-from scottl@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t9GKICvX059647; Fri, 16 Oct 2015 20:18:12 GMT (envelope-from scottl@FreeBSD.org) Received: (from scottl@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9GKICR3059646; Fri, 16 Oct 2015 20:18:12 GMT (envelope-from scottl@FreeBSD.org) Message-Id: <201510162018.t9GKICR3059646@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: scottl set sender to scottl@FreeBSD.org using -f From: Scott Long Date: Fri, 16 Oct 2015 20:18:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289429 - head/sys/dev/mps X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Oct 2015 20:18:13 -0000 Author: scottl Date: Fri Oct 16 20:18:12 2015 New Revision: 289429 URL: https://svnweb.freebsd.org/changeset/base/289429 Log: Revert an extra hunk that crept into the last commit. Submitted by: emax Obtained from: Netflix, Inc. MFC after: 3 days Modified: head/sys/dev/mps/mps_sas.h Modified: head/sys/dev/mps/mps_sas.h ============================================================================== --- head/sys/dev/mps/mps_sas.h Fri Oct 16 19:13:33 2015 (r289428) +++ head/sys/dev/mps/mps_sas.h Fri Oct 16 20:18:12 2015 (r289429) @@ -58,6 +58,7 @@ struct mpssas_target { uint16_t tid; SLIST_HEAD(, mpssas_lun) luns; + TAILQ_HEAD(, mps_command) commands; struct mps_command *tm; TAILQ_HEAD(, mps_command) timedout_commands; uint16_t exp_dev_handle; From owner-svn-src-all@freebsd.org Fri Oct 16 20:18:55 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2EEBFA17976; Fri, 16 Oct 2015 20:18:55 +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 DF2A17D9; Fri, 16 Oct 2015 20:18:54 +0000 (UTC) (envelope-from slw@zxy.spb.ru) Received: from slw by zxy.spb.ru with local (Exim 4.84 (FreeBSD)) (envelope-from ) id 1ZnBSk-000LA4-VA; Fri, 16 Oct 2015 23:18:51 +0300 Date: Fri, 16 Oct 2015 23:18:50 +0300 From: Slawa Olhovchenkov To: Warner Losh Cc: Warner Losh , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r289405 - head/sys/ufs/ffs Message-ID: <20151016201850.GP6469@zxy.spb.ru> References: <201510160306.t9G3622O049128@repo.freebsd.org> <20151016131940.GE42243@zxy.spb.ru> <3ADA7934-3EE1-449E-A8D1-723B73020C13@bsdimp.com> MIME-Version: 1.0 Content-Type: text/plain; charset=koi8-r Content-Disposition: inline In-Reply-To: <3ADA7934-3EE1-449E-A8D1-723B73020C13@bsdimp.com> User-Agent: Mutt/1.5.23 (2014-03-12) X-SA-Exim-Connect-IP: X-SA-Exim-Mail-From: slw@zxy.spb.ru X-SA-Exim-Scanned: No (on zxy.spb.ru); SAEximRunCond expanded to false X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Oct 2015 20:18:55 -0000 On Fri, Oct 16, 2015 at 01:22:44PM -0600, Warner Losh wrote: > > > On Oct 16, 2015, at 7:19 AM, Slawa Olhovchenkov wrote: > > > > On Fri, Oct 16, 2015 at 03:06:02AM +0000, Warner Losh wrote: > > > >> Author: imp > >> Date: Fri Oct 16 03:06:02 2015 > >> New Revision: 289405 > >> URL: https://svnweb.freebsd.org/changeset/base/289405 > >> > >> Log: > >> Do not relocate extents to make them contiguous if the underlying drive can do > >> deletions. Ability to do deletions is a strong indication that this > >> optimization will not help performance. It will only generate extra write > >> traffic. These devices are typically flash based and have a limited number of > >> write cycles. In addition, making the file contiguous in LBA space doesn't > >> improve the access times from flash devices because they have no seek time. > > > > In reality, flash devices have seek time, about 0.1ms. > > Many flash devices can do 8 simultaneously "seek" (I think NVMe can do > > more). > > That's just not true. tREAD for most flash is a few tens of microseconds. The > streaming time is at most 10 microseconds. There's no "seek" time in the classic > sense. Once you get the data, you have it. There's no extra "read time" in > the NAND flash parts. > > And the number of simultaneous reads depends a lot on how the flash vendor > organized the flash. Many of today's designs use 8 or 16 die parts that have 2 > to 4 planes on them, giving a parallelism in the 16-64 range. And that's before > we get into innovative strategies that use partial page reads to decrease tREAD > time and novel data striping methods. > > Seek time, as a separate operation, simply doesn't exist. > > Furthermore, NAND-based devices are log-structured with garbage collection > for both retention and to deal with retired blocks in the underlying NAND. The > relationship between LBA ranges and where the data is at any given time on > the NAND is almost uncorrelated. > > So, rearranging data so that it is in LBA contiguous ranges doesn't help once > you're above the FFS block level. Stream of random reads 512-4096 bytes from most flash SATA drives in one thread give about 10K IOPS. This is only 40Mbit/s from 6*0.8 Gbit/s SATA bandwidth. You may decompose 0.1ms to different, real delay (bank select, command process and etc.) or give 0.1ms seek time for all practical purpose. From owner-svn-src-all@freebsd.org Fri Oct 16 20:23:05 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D1DA2A17AF2; Fri, 16 Oct 2015 20:23: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 9E6B3C8D; Fri, 16 Oct 2015 20:23: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 t9GKN4SZ062559; Fri, 16 Oct 2015 20:23:04 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9GKN4BE062558; Fri, 16 Oct 2015 20:23:04 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201510162023.t9GKN4BE062558@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Fri, 16 Oct 2015 20:23:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289430 - 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 " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Oct 2015 20:23:05 -0000 Author: bdrewery Date: Fri Oct 16 20:23:04 2015 New Revision: 289430 URL: https://svnweb.freebsd.org/changeset/base/289430 Log: Remove .MAKE from targets that do more than just run sub-makes, such as calling rm or mtree. MFC after: 1 week Sponsored by: EMC / Isilon Storage Division Modified: head/Makefile.inc1 Modified: head/Makefile.inc1 ============================================================================== --- head/Makefile.inc1 Fri Oct 16 20:18:12 2015 (r289429) +++ head/Makefile.inc1 Fri Oct 16 20:23:04 2015 (r289430) @@ -1063,7 +1063,7 @@ INSTALLKERNEL= ${_kernel} .endif .endfor -buildkernel ${WMAKE_TGTS:N_worldtmp} ${.ALLTARGETS:M_*:N_worldtmp}: .MAKE .PHONY +buildkernel ${WMAKE_TGTS:N_worldtmp:Nbuild32} ${.ALLTARGETS:M_*:N_worldtmp}: .MAKE .PHONY # # buildkernel @@ -1493,7 +1493,7 @@ build-tools: .MAKE # # kernel-tools: Build kernel-building tools # -kernel-tools: .MAKE +kernel-tools: mkdir -p ${MAKEOBJDIRPREFIX}/usr mtree -deU -f ${.CURDIR}/etc/mtree/BSD.usr.dist \ -p ${MAKEOBJDIRPREFIX}/usr >/dev/null @@ -1593,7 +1593,7 @@ NXBMAKE= ${NXBENV} ${MAKE} \ # For non-clang enabled targets that are still using the in tree gcc # we must build a gperf binary for one instance of its Makefiles. On # clang-enabled systems, the gperf binary is obsolete. -native-xtools: .MAKE +native-xtools: .if ${MK_GCC_BOOTSTRAP} != "no" mkdir -p ${OBJTREE}/gperf_for_gcc/usr/bin ${_+_}@${ECHODIR} "===> ${_gperf} (obj,depend,all,install)"; \ From owner-svn-src-all@freebsd.org Fri Oct 16 20:51:26 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D0187A17F5E; Fri, 16 Oct 2015 20:51:26 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8DFF51BD9; Fri, 16 Oct 2015 20:51:26 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t9GKpPZm071609; Fri, 16 Oct 2015 20:51:25 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9GKpPG6071607; Fri, 16 Oct 2015 20:51:25 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201510162051.t9GKpPG6071607@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Fri, 16 Oct 2015 20:51: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: r289431 - stable/10/sys/kern 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 " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Oct 2015 20:51:26 -0000 Author: kib Date: Fri Oct 16 20:51:25 2015 New Revision: 289431 URL: https://svnweb.freebsd.org/changeset/base/289431 Log: MFC r289026: Enforce the maxproc limitation before allocating struct proc. In collaboration with: pho Modified: stable/10/sys/kern/kern_exit.c stable/10/sys/kern/kern_fork.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/kern/kern_exit.c ============================================================================== --- stable/10/sys/kern/kern_exit.c Fri Oct 16 20:23:04 2015 (r289430) +++ stable/10/sys/kern/kern_exit.c Fri Oct 16 20:51:25 2015 (r289431) @@ -957,9 +957,7 @@ proc_reap(struct thread *td, struct proc KASSERT(FIRST_THREAD_IN_PROC(p), ("proc_reap: no residual thread!")); uma_zfree(proc_zone, p); - sx_xlock(&allproc_lock); - nprocs--; - sx_xunlock(&allproc_lock); + atomic_add_int(&nprocs, -1); } static int Modified: stable/10/sys/kern/kern_fork.c ============================================================================== --- stable/10/sys/kern/kern_fork.c Fri Oct 16 20:23:04 2015 (r289430) +++ stable/10/sys/kern/kern_fork.c Fri Oct 16 20:51:25 2015 (r289431) @@ -386,12 +386,6 @@ do_fork(struct thread *td, int flags, st p2_held = 0; p1 = td->td_proc; - /* - * Increment the nprocs resource before blocking can occur. There - * are hard-limits as to the number of processes that can run. - */ - nprocs++; - trypid = fork_findpid(flags); sx_sunlock(&proctree_lock); @@ -773,18 +767,16 @@ int fork1(struct thread *td, int flags, int pages, struct proc **procp, int *procdescp, int pdflags) { - struct proc *p1; - struct proc *newproc; - int ok; + struct proc *p1, *newproc; struct thread *td2; struct vmspace *vm2; +#ifdef PROCDESC + struct file *fp_procdesc; +#endif vm_ooffset_t mem_charged; - int error; + int error, nprocs_new, ok; static int curfail; static struct timeval lastfail; -#ifdef PROCDESC - struct file *fp_procdesc = NULL; -#endif /* Check for the undefined or unimplemented flags. */ if ((flags & ~(RFFLAGS | RFTSIGFLAGS(RFTSIGMASK))) != 0) @@ -826,6 +818,37 @@ fork1(struct thread *td, int flags, int } #ifdef PROCDESC + fp_procdesc = NULL; +#endif + newproc = NULL; + vm2 = NULL; + + /* + * Increment the nprocs resource before allocations occur. + * Although process entries are dynamically created, we still + * keep a global limit on the maximum number we will + * create. There are hard-limits as to the number of processes + * that can run, established by the KVA and memory usage for + * the process data. + * + * Don't allow a nonprivileged user to use the last ten + * processes; don't let root exceed the limit. + */ + nprocs_new = atomic_fetchadd_int(&nprocs, 1) + 1; + if ((nprocs_new >= maxproc - 10 && priv_check_cred(td->td_ucred, + PRIV_MAXPROC, 0) != 0) || nprocs_new >= maxproc) { + sx_xlock(&allproc_lock); + if (ppsratecheck(&lastfail, &curfail, 1)) { + printf("maxproc limit exceeded by uid %u (pid %d); " + "see tuning(7) and login.conf(5)\n", + td->td_ucred->cr_ruid, p1->p_pid); + } + sx_xunlock(&allproc_lock); + error = EAGAIN; + goto fail1; + } + +#ifdef PROCDESC /* * If required, create a process descriptor in the parent first; we * will abandon it if something goes wrong. We don't finit() until @@ -834,12 +857,11 @@ fork1(struct thread *td, int flags, int if (flags & RFPROCDESC) { error = falloc(td, &fp_procdesc, procdescp, 0); if (error != 0) - return (error); + goto fail1; } #endif mem_charged = 0; - vm2 = NULL; if (pages == 0) pages = KSTACK_PAGES; /* Allocate new proc. */ @@ -906,20 +928,7 @@ fork1(struct thread *td, int flags, int /* We have to lock the process tree while we look for a pid. */ sx_slock(&proctree_lock); - - /* - * Although process entries are dynamically created, we still keep - * a global limit on the maximum number we will create. Don't allow - * a nonprivileged user to use the last ten processes; don't let root - * exceed the limit. The variable nprocs is the current number of - * processes, maxproc is the limit. - */ sx_xlock(&allproc_lock); - if ((nprocs >= maxproc - 10 && priv_check_cred(td->td_ucred, - PRIV_MAXPROC, 0) != 0) || nprocs >= maxproc) { - error = EAGAIN; - goto fail; - } /* * Increment the count of procs running with this uid. Don't allow @@ -954,11 +963,7 @@ fork1(struct thread *td, int flags, int } error = EAGAIN; -fail: sx_sunlock(&proctree_lock); - if (ppsratecheck(&lastfail, &curfail, 1)) - printf("maxproc limit exceeded by uid %u (pid %d); see tuning(7) and login.conf(5)\n", - td->td_ucred->cr_ruid, p1->p_pid); sx_xunlock(&allproc_lock); #ifdef MAC mac_proc_destroy(newproc); @@ -974,6 +979,7 @@ fail1: fdrop(fp_procdesc, td); } #endif + atomic_add_int(&nprocs, -1); pause("fork", hz / 2); return (error); } From owner-svn-src-all@freebsd.org Fri Oct 16 20:59:05 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2390AA17175; Fri, 16 Oct 2015 20:59: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 DEF1B25C; Fri, 16 Oct 2015 20:59:04 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t9GKx3gc072276; Fri, 16 Oct 2015 20:59:03 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9GKx3vR072275; Fri, 16 Oct 2015 20:59:03 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201510162059.t9GKx3vR072275@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Fri, 16 Oct 2015 20:59:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289432 - 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 " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Oct 2015 20:59:05 -0000 Author: bdrewery Date: Fri Oct 16 20:59:03 2015 New Revision: 289432 URL: https://svnweb.freebsd.org/changeset/base/289432 Log: Tweak the guard more to suggest 'all' if SUBDIR_OVERRIDE is specified. In that case 'all' does make sense. MFC after: 2 weeks X-MFC-With: r289411 Sponsored by: EMC / Isilon Storage Division Modified: head/Makefile Modified: head/Makefile ============================================================================== --- head/Makefile Fri Oct 16 20:51:25 2015 (r289431) +++ head/Makefile Fri Oct 16 20:59:03 2015 (r289432) @@ -261,7 +261,7 @@ ${TGTS}: .PHONY _guard: .PHONY @echo - @echo "Explicit target required. Likely \"buildworld\" is wanted. See build(7)." + @echo "Explicit target required. Likely \"${SUBDIR_OVERRIDE:Dall:Ubuildworld}\" is wanted. See build(7)." @echo @false From owner-svn-src-all@freebsd.org Fri Oct 16 21:01:01 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id DD007A171F2 for ; Fri, 16 Oct 2015 21:01:00 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from mail-pa0-f53.google.com (mail-pa0-f53.google.com [209.85.220.53]) (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 B214F83C for ; Fri, 16 Oct 2015 21:01:00 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: by padcn9 with SMTP id cn9so15311948pad.2 for ; Fri, 16 Oct 2015 14:00:54 -0700 (PDT) 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=DMcmxZeTV6vfIknNiDjqRCx0HvY/gwFCGbBFWy4mvQY=; b=MpBCI1HlkEUgRAwF32IY7+8b86kMvcWgAgjxpypMoWhp5X3oJg1Qr56yN/jGnDVxT/ DCxDsprrER4Q0uX/idqCFpsFG9cp5p0Kh8C3gfzPs2BRK+QLBcbf84DBkT2cLl9N5UA1 QBYRzoPlsOltb4yR5zHzJYQXpeCG9diTQW9HBtJoeILKppI1cwwEd01UEe1svSu8OVO6 +pJTp5NXQhNhMuxkJY8mdhqSRPqlrKuVlZdouWS1Efd4gaza7moJumsSF9OMMgynFpqX 3cysmpQx7rOJk2PA894Gtx6XEP+4ImgjyzwEqyTHfqp7vTVc/TCQloY0sovpTMybjywm YQ1A== X-Gm-Message-State: ALoCoQkCvGphwH6XqbooQiIcLLbIRmu0mprOlfXxhWqb4rPHUwvPiT8XumVI3UkyaWVFivouFH1S X-Received: by 10.66.221.170 with SMTP id qf10mr18277308pac.134.1445029254443; Fri, 16 Oct 2015 14:00:54 -0700 (PDT) Received: from ip-100-127-128-61.ec2.internal ([69.53.245.6]) by smtp.gmail.com with ESMTPSA id fm3sm22851111pbb.36.2015.10.16.14.00.53 (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 16 Oct 2015 14:00:53 -0700 (PDT) Sender: Warner Losh Subject: Re: svn commit: r289405 - head/sys/ufs/ffs Mime-Version: 1.0 (Mac OS X Mail 8.2 \(2104\)) Content-Type: multipart/signed; boundary="Apple-Mail=_C25C7893-14A4-420C-B308-F1CCEDBC1EC2"; protocol="application/pgp-signature"; micalg=pgp-sha512 X-Pgp-Agent: GPGMail 2.5.2 From: Warner Losh In-Reply-To: <20151016201850.GP6469@zxy.spb.ru> Date: Fri, 16 Oct 2015 15:00:50 -0600 Cc: Warner Losh , src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Message-Id: <4FC55895-99AF-4E5B-9E1B-C5085F3FC178@bsdimp.com> References: <201510160306.t9G3622O049128@repo.freebsd.org> <20151016131940.GE42243@zxy.spb.ru> <3ADA7934-3EE1-449E-A8D1-723B73020C13@bsdimp.com> <20151016201850.GP6469@zxy.spb.ru> To: Slawa Olhovchenkov 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 " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Oct 2015 21:01:01 -0000 --Apple-Mail=_C25C7893-14A4-420C-B308-F1CCEDBC1EC2 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 > On Oct 16, 2015, at 2:18 PM, Slawa Olhovchenkov = wrote: >=20 > On Fri, Oct 16, 2015 at 01:22:44PM -0600, Warner Losh wrote: >=20 >>=20 >>> On Oct 16, 2015, at 7:19 AM, Slawa Olhovchenkov = wrote: >>>=20 >>> On Fri, Oct 16, 2015 at 03:06:02AM +0000, Warner Losh wrote: >>>=20 >>>> Author: imp >>>> Date: Fri Oct 16 03:06:02 2015 >>>> New Revision: 289405 >>>> URL: https://svnweb.freebsd.org/changeset/base/289405 >>>>=20 >>>> Log: >>>> Do not relocate extents to make them contiguous if the underlying = drive can do >>>> deletions. Ability to do deletions is a strong indication that this >>>> optimization will not help performance. It will only generate extra = write >>>> traffic. These devices are typically flash based and have a limited = number of >>>> write cycles. In addition, making the file contiguous in LBA space = doesn't >>>> improve the access times from flash devices because they have no = seek time. >>>=20 >>> In reality, flash devices have seek time, about 0.1ms. >>> Many flash devices can do 8 simultaneously "seek" (I think NVMe can = do >>> more). >>=20 >> That's just not true. tREAD for most flash is a few tens of = microseconds. The >> streaming time is at most 10 microseconds. There's no "seek" time in = the classic >> sense. Once you get the data, you have it. There's no extra "read = time" in >> the NAND flash parts. >>=20 >> And the number of simultaneous reads depends a lot on how the flash = vendor >> organized the flash. Many of today's designs use 8 or 16 die parts = that have 2 >> to 4 planes on them, giving a parallelism in the 16-64 range. And = that's before >> we get into innovative strategies that use partial page reads to = decrease tREAD >> time and novel data striping methods. >>=20 >> Seek time, as a separate operation, simply doesn't exist. >>=20 >> Furthermore, NAND-based devices are log-structured with garbage = collection >> for both retention and to deal with retired blocks in the underlying = NAND. The >> relationship between LBA ranges and where the data is at any given = time on >> the NAND is almost uncorrelated. >>=20 >> So, rearranging data so that it is in LBA contiguous ranges doesn't = help once >> you're above the FFS block level. >=20 > Stream of random reads 512-4096 bytes from most flash SATA drives in = one > thread give about 10K IOPS. This is only 40Mbit/s from 6*0.8 Gbit/s > SATA bandwidth. You may decompose 0.1ms to different, real delay (bank > select, command process and etc.) or give 0.1ms seek time for all > practical purpose. I strongly disagree. That=E2=80=99s not seek time in the classic sense. = All of those 100us are the delay from reading the data from the flash. The reason I=E2=80=99m= so adamant is that adjacent pages read have exactly the same cost. In a spinning = disk, adjacent sectors read have a tiny cost compared to moving the head = (seeking). Then again, I spent almost three years building a PCIe NAND-based flash drive, so maybe I=E2=80=99m biased by that experience... Warner --Apple-Mail=_C25C7893-14A4-420C-B308-F1CCEDBC1EC2 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 iQIcBAEBCgAGBQJWIWWDAAoJEGwc0Sh9sBEAmroP+wWo8J4NU8z/c2CLNEE4usuk 1Qkb/8V8TgQ7+QZc+931yh4zOIqz2pL0XgHTjywHCIva28/lvoxSAPgLSSLBRm2l JPHrTssUWLRMiBhB/bdIidVPhQeGoSWXP4OcoPC8EXpn5HC/LEe7LV0q2LK94OQh vgHOo6AqF/0ttj/pZ/pnEC1DuXVFz6CdDOV3zKOpPB26QOMhElfGbBjVDrKx7jBq iB14C0BUFAixzjBiP22o6oDw63NGwDKAertByiR4XebxTT/1hlYAuOeZm+pzFGg0 iTm9uJS9N/FG1lkAyUVjUVwA5jTWg1KeW0ABZIXVrZnDU8RFiji+K8ZSikWukEiX CIZkq9GrZB87Wpi/us5tLLKvv3VQ6hLdcMzsLcbcpjSJz/l9X56Gn4gqKoC45usL W4PELjcLXhJhvlSD7xsnZtcHnD5KvupKXI+d0qApOSjdJ7PGQBPfeIgjFywtlhlS GZLloU0Om9oAuWcUc/CbV00eyfxjgYzjNjHWNqNBYFWb4AiHx8sTP+2HuDmh+v1R oO3LJNRSAbjeJpoULU0KFuio5T3Nh0tv3HF5vJWiSWlgZtjs1JWrMCdkahpnFtq8 F19GHKlcgYAa5zP+FOQq2q/ZwLzf+VIza2bA943PUswMoD+2C88ELCvTzD11OwKF 0W8NR/Ni2gjZ8vgNxMXO =niQ2 -----END PGP SIGNATURE----- --Apple-Mail=_C25C7893-14A4-420C-B308-F1CCEDBC1EC2-- From owner-svn-src-all@freebsd.org Fri Oct 16 21:09:17 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2FC2BA173E2; Fri, 16 Oct 2015 21:09: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 D32F3D61; Fri, 16 Oct 2015 21:09:16 +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 t9GL9Fcu075891; Fri, 16 Oct 2015 21:09:15 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9GL9F0Q075889; Fri, 16 Oct 2015 21:09:15 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201510162109.t9GL9F0Q075889@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Fri, 16 Oct 2015 21:09:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289433 - 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 " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Oct 2015 21:09:17 -0000 Author: bdrewery Date: Fri Oct 16 21:09:15 2015 New Revision: 289433 URL: https://svnweb.freebsd.org/changeset/base/289433 Log: Correct a bitrotted comment about installworld order requirements. The case of make(1) using a new /bin/sh issue was fixed in r173219 when ITOOLS was introduced. There are still issues with mid-install errors leaving a system unusable that are currently non-trivial to solve. The safest ordering requires installing rtld, libc and libthr (in that order) before anything else. We don't do that now though. Much improvement is needed here still. Discussed with: kip and kan (rtld/library ordering) MFC after: 1 week Sponsored by: EMC / Isilon Storage Division Modified: head/Makefile.inc1 Modified: head/Makefile.inc1 ============================================================================== --- head/Makefile.inc1 Fri Oct 16 20:59:03 2015 (r289432) +++ head/Makefile.inc1 Fri Oct 16 21:09:15 2015 (r289433) @@ -50,11 +50,14 @@ .include .include -# We must do lib/ and libexec/ before bin/, because if installworld -# installs a new /bin/sh, the 'make' command will *immediately* -# use that new version. And the new (dynamically-linked) /bin/sh -# will expect to find appropriate libraries in /lib and /libexec. -# +# We must do lib/ and libexec/ before bin/ in case of a mid-install error to +# keep the users system reasonably usable. For static->dynamic root upgrades, +# we don't want to install a dynamic binary without rtld and the needed +# libraries. More commonly, for dynamic root, we don't want to install a +# binary that requires a newer library version that hasn't been installed yet. +# This ordering is not a guarantee though. The only guarantee of a working +# system here would require fine-grained ordering of all components based +# on their dependencies. SRCDIR?= ${.CURDIR} .if defined(SUBDIR_OVERRIDE) SUBDIR= ${SUBDIR_OVERRIDE} From owner-svn-src-all@freebsd.org Fri Oct 16 21:10:48 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 21137A17443; Fri, 16 Oct 2015 21:10:48 +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 0B0FEFDC; Fri, 16 Oct 2015 21:10:48 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from mail.xzibition.com (localhost [IPv6:::1]) by freefall.freebsd.org (Postfix) with ESMTP id 03F5415AF; Fri, 16 Oct 2015 21:10:48 +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 9ED3F13C6C; Fri, 16 Oct 2015 21:10:47 +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 Nn7pbiecZoOx; Fri, 16 Oct 2015 21:10:41 +0000 (UTC) Subject: Re: svn commit: r289433 - head DKIM-Filter: OpenDKIM Filter v2.9.2 mail.xzibition.com 6EDF013C67 To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201510162109.t9GL9F0Q075889@repo.freebsd.org> From: Bryan Drewery Openpgp: id=F9173CB2C3AAEA7A5C8A1F0935D771BB6E4697CF; url=http://www.shatow.net/bryan/bryan2.asc Organization: FreeBSD Message-ID: <562167D2.9020104@FreeBSD.org> Date: Fri, 16 Oct 2015 14:10:42 -0700 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0 MIME-Version: 1.0 In-Reply-To: <201510162109.t9GL9F0Q075889@repo.freebsd.org> Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="TaiJwLXnmWHhwKhIHcVboXDsDasXk7pfK" X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Oct 2015 21:10:48 -0000 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --TaiJwLXnmWHhwKhIHcVboXDsDasXk7pfK Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 10/16/2015 2:09 PM, Bryan Drewery wrote: > Discussed with: kip and kan (rtld/library ordering) Ugh, sorry. This was *kib*. I know a "kip" outside of the community as well that was I talking to earlier which lead to this. --=20 Regards, Bryan Drewery --TaiJwLXnmWHhwKhIHcVboXDsDasXk7pfK 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 iQEcBAEBAgAGBQJWIWfSAAoJEDXXcbtuRpfPwAkH/1eY0j/4nw44jShl95C4rbhi NUYY43A1qoLO7bKHIhRW3oCAH9PuXOB0FiCsG7VuDzZ5CfchDi/ioUtm8Ufp/cpl TmnjAXVNmIENEmzXK/NWU8LapgmoqVWmWWBaQGYwIxqvOB++XLV87cs7r4OW/Dvn v0XZVKeo+/Htqf8m6faKkstZhkhEBaACflJ9MN2947g/BqND4TekUMDbI1xAA0vb KQFTAGRZIIzMX8kq3Pejjd+MxmiISZVUZvNor3F8QOstNoU4wpapR1Z9Xz6etbWu Mwerj/zHZwPJQjsI/3y2/xmrCGZt9pSCGNRcOKlA3YWysL0SzTkDnWGFyHrEOoo= =BWiS -----END PGP SIGNATURE----- --TaiJwLXnmWHhwKhIHcVboXDsDasXk7pfK-- From owner-svn-src-all@freebsd.org Fri Oct 16 21:54:57 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 361E9A17C0B; Fri, 16 Oct 2015 21:54:57 +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 E641039F; Fri, 16 Oct 2015 21:54:56 +0000 (UTC) (envelope-from slw@zxy.spb.ru) Received: from slw by zxy.spb.ru with local (Exim 4.84 (FreeBSD)) (envelope-from ) id 1ZnCxg-000N0n-JH; Sat, 17 Oct 2015 00:54:52 +0300 Date: Sat, 17 Oct 2015 00:54:52 +0300 From: Slawa Olhovchenkov To: Warner Losh Cc: Warner Losh , src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r289405 - head/sys/ufs/ffs\ Message-ID: <20151016215452.GQ6469@zxy.spb.ru> References: <201510160306.t9G3622O049128@repo.freebsd.org> <20151016131940.GE42243@zxy.spb.ru> <3ADA7934-3EE1-449E-A8D1-723B73020C13@bsdimp.com> <20151016201850.GP6469@zxy.spb.ru> <4FC55895-99AF-4E5B-9E1B-C5085F3FC178@bsdimp.com> MIME-Version: 1.0 Content-Type: text/plain; charset=koi8-r Content-Disposition: inline In-Reply-To: <4FC55895-99AF-4E5B-9E1B-C5085F3FC178@bsdimp.com> User-Agent: Mutt/1.5.23 (2014-03-12) X-SA-Exim-Connect-IP: X-SA-Exim-Mail-From: slw@zxy.spb.ru X-SA-Exim-Scanned: No (on zxy.spb.ru); SAEximRunCond expanded to false X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Oct 2015 21:54:57 -0000 On Fri, Oct 16, 2015 at 03:00:50PM -0600, Warner Losh wrote: > >>>> Do not relocate extents to make them contiguous if the underlying drive can do > >>>> deletions. Ability to do deletions is a strong indication that this > >>>> optimization will not help performance. It will only generate extra write > >>>> traffic. These devices are typically flash based and have a limited number of > >>>> write cycles. In addition, making the file contiguous in LBA space doesn't > >>>> improve the access times from flash devices because they have no seek time. > >>> > >>> In reality, flash devices have seek time, about 0.1ms. > >>> Many flash devices can do 8 simultaneously "seek" (I think NVMe can do > >>> more). > >> > >> That's just not true. tREAD for most flash is a few tens of microseconds. The > >> streaming time is at most 10 microseconds. There's no "seek" time in the classic > >> sense. Once you get the data, you have it. There's no extra "read time" in > >> the NAND flash parts. > >> > >> And the number of simultaneous reads depends a lot on how the flash vendor > >> organized the flash. Many of today's designs use 8 or 16 die parts that have 2 > >> to 4 planes on them, giving a parallelism in the 16-64 range. And that's before > >> we get into innovative strategies that use partial page reads to decrease tREAD > >> time and novel data striping methods. > >> > >> Seek time, as a separate operation, simply doesn't exist. > >> > >> Furthermore, NAND-based devices are log-structured with garbage collection > >> for both retention and to deal with retired blocks in the underlying NAND. The > >> relationship between LBA ranges and where the data is at any given time on > >> the NAND is almost uncorrelated. > >> > >> So, rearranging data so that it is in LBA contiguous ranges doesn't help once > >> you're above the FFS block level. > > > > Stream of random reads 512-4096 bytes from most flash SATA drives in one > > thread give about 10K IOPS. This is only 40Mbit/s from 6*0.8 Gbit/s > > SATA bandwidth. You may decompose 0.1ms to different, real delay (bank > > select, command process and etc.) or give 0.1ms seek time for all > > practical purpose. > > I strongly disagree. That's not seek time in the classic sense. All of those 100us > are the delay from reading the data from the flash. The reason I'm so adamant > is that adjacent pages read have exactly the same cost. In a spinning disk, > adjacent sectors read have a tiny cost compared to moving the head (seeking). > > Then again, I spent almost three years building a PCIe NAND-based flash > drive, so maybe I'm biased by that experience... For internal view you right. For external view this delay like seek time. For general HDD total_time = seek_time + transfer_time. seek_time independed of block_size. transfer_time depended of block_size and is block_size/transfer_speed. http://tweakers.net/benchdb/testcombo/3817 https://docs.google.com/spreadsheets/d/1BJ-XY0xwc1JvHJxfOGbcW2Be-q5GQbATcMOh9W0d1-U/edit?usp=sharing This is very closed aproximated by 0.11+block_size/461456. As for HDD. Yes, no real seek. But in all models this is like seek time, regardless of real cause. From owner-svn-src-all@freebsd.org Fri Oct 16 22:41:32 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id BCBFBA1660F; Fri, 16 Oct 2015 22:41:32 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7F18C1B8D; Fri, 16 Oct 2015 22:41:32 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t9GMfVxP006730; Fri, 16 Oct 2015 22:41:31 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9GMfVFu006729; Fri, 16 Oct 2015 22:41:31 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201510162241.t9GMfVFu006729@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Fri, 16 Oct 2015 22:41:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289434 - 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 " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Oct 2015 22:41:32 -0000 Author: bdrewery Date: Fri Oct 16 22:41:31 2015 New Revision: 289434 URL: https://svnweb.freebsd.org/changeset/base/289434 Log: Remove lockf as an ITOOL. It was added in r152006 to handle serializing access of info/dir when installing INFO files. We no longer support INFO files since r276551 though. Sponsored by: EMC / Isilon Storage Division Modified: head/Makefile.inc1 Modified: head/Makefile.inc1 ============================================================================== --- head/Makefile.inc1 Fri Oct 16 21:09:15 2015 (r289433) +++ head/Makefile.inc1 Fri Oct 16 22:41:31 2015 (r289434) @@ -823,7 +823,7 @@ _zoneinfo= zic tzsetup ITOOLS= [ awk cap_mkdb cat chflags chmod chown cmp cp \ date echo egrep find grep id install ${_install-info} \ - ln lockf make mkdir mtree mv pwd_mkdb \ + ln make mkdir mtree mv pwd_mkdb \ rm sed services_mkdb sh strip sysctl test true uname wc ${_zoneinfo} \ ${LOCAL_ITOOLS} From owner-svn-src-all@freebsd.org Fri Oct 16 23:53:38 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id BBB47A17489; Fri, 16 Oct 2015 23:53:38 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 793F6198E; Fri, 16 Oct 2015 23:53:38 +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 t9GNrbod027229; Fri, 16 Oct 2015 23:53:37 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9GNrbHc027228; Fri, 16 Oct 2015 23:53:37 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201510162353.t9GNrbHc027228@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Fri, 16 Oct 2015 23:53:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289435 - 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 " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Oct 2015 23:53:38 -0000 Author: bdrewery Date: Fri Oct 16 23:53:37 2015 New Revision: 289435 URL: https://svnweb.freebsd.org/changeset/base/289435 Log: Fix adding manpages installed by LOCAL_DIRS to whatis file. The ordering of 'etc' in the install has a long history dating back to the first time it was realized it needed to be "last" in r4486. That commit still left it before LOCAL_DIRS though. By having it before LOCAL_DIRS any manpages they install were not being added to the whatis database in the install image. They would likely show up in the file after a periodic rebuild of the file though. Currently the whatis file is built by an 'afterinstall' hook in etc/Makefile that calls share/man's 'makedb' target. MFC after: 2 weeks Sponsored by: EMC / Isilon Storage Division Modified: head/Makefile.inc1 Modified: head/Makefile.inc1 ============================================================================== --- head/Makefile.inc1 Fri Oct 16 22:41:31 2015 (r289434) +++ head/Makefile.inc1 Fri Oct 16 23:53:37 2015 (r289435) @@ -88,10 +88,6 @@ SUBDIR+= tests .if ${MK_OFED} != "no" SUBDIR+=contrib/ofed .endif -# -# We must do etc/ last for install/distribute to work. -# -SUBDIR+=etc # Local directories are last, since it is nice to at least get the base # system rebuilt before you do them. @@ -115,6 +111,12 @@ SUBDIR+= ${_DIR} .endfor .endif +# We must do etc/ last as it hooks into building the man whatis file +# by calling 'makedb' in share/man. This is only relevant for +# install/distribute so they build the whatis file after every manpage is +# installed. +SUBDIR+=etc + .if defined(NOCLEAN) NO_CLEAN= ${NOCLEAN} .endif From owner-svn-src-all@freebsd.org Sat Oct 17 02:49:21 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 27749A17A8D; Sat, 17 Oct 2015 02:49:21 +0000 (UTC) (envelope-from wblock@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id DC9EA86; Sat, 17 Oct 2015 02:49:20 +0000 (UTC) (envelope-from wblock@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t9H2nKnE078015; Sat, 17 Oct 2015 02:49:20 GMT (envelope-from wblock@FreeBSD.org) Received: (from wblock@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9H2nKjk078014; Sat, 17 Oct 2015 02:49:20 GMT (envelope-from wblock@FreeBSD.org) Message-Id: <201510170249.t9H2nKjk078014@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: wblock set sender to wblock@FreeBSD.org using -f From: Warren Block Date: Sat, 17 Oct 2015 02:49: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: r289436 - stable/10/usr.sbin/pw X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 17 Oct 2015 02:49:21 -0000 Author: wblock (doc committer) Date: Sat Oct 17 02:49:19 2015 New Revision: 289436 URL: https://svnweb.freebsd.org/changeset/base/289436 Log: MFC 289067: Fix a repeated typo: rootir -> rootdir. Modified: stable/10/usr.sbin/pw/pw.c Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.sbin/pw/pw.c ============================================================================== --- stable/10/usr.sbin/pw/pw.c Fri Oct 16 23:53:37 2015 (r289435) +++ stable/10/usr.sbin/pw/pw.c Sat Oct 17 02:49:19 2015 (r289436) @@ -233,7 +233,7 @@ cmdhelp(int mode, int which) { "usage: pw useradd [name] [switches]\n" "\t-V etcdir alternate /etc location\n" - "\t-R rootir alternate root directory\n" + "\t-R rootdir alternate root directory\n" "\t-C config configuration file\n" "\t-q quiet operation\n" " Adding users:\n" @@ -256,7 +256,7 @@ cmdhelp(int mode, int which) "\t-N no update\n" " Setting defaults:\n" "\t-V etcdir alternate /etc location\n" - "\t-R rootir alternate root directory\n" + "\t-R rootdir alternate root directory\n" "\t-D set user defaults\n" "\t-b dir default home root dir\n" "\t-e period default expiry period\n" @@ -273,7 +273,7 @@ cmdhelp(int mode, int which) "\t-y path set NIS passwd file path\n", "usage: pw userdel [uid|name] [switches]\n" "\t-V etcdir alternate /etc location\n" - "\t-R rootir alternate root directory\n" + "\t-R rootdir alternate root directory\n" "\t-n name login name\n" "\t-u uid user id\n" "\t-Y update NIS maps\n" @@ -281,7 +281,7 @@ cmdhelp(int mode, int which) "\t-r remove home & contents\n", "usage: pw usermod [uid|name] [switches]\n" "\t-V etcdir alternate /etc location\n" - "\t-R rootir alternate root directory\n" + "\t-R rootdir alternate root directory\n" "\t-C config configuration file\n" "\t-q quiet operation\n" "\t-F force add if no user\n" @@ -306,7 +306,7 @@ cmdhelp(int mode, int which) "\t-N no update\n", "usage: pw usershow [uid|name] [switches]\n" "\t-V etcdir alternate /etc location\n" - "\t-R rootir alternate root directory\n" + "\t-R rootdir alternate root directory\n" "\t-n name login name\n" "\t-u uid user id\n" "\t-F force print\n" @@ -315,7 +315,7 @@ cmdhelp(int mode, int which) "\t-7 print in v7 format\n", "usage: pw usernext [switches]\n" "\t-V etcdir alternate /etc location\n" - "\t-R rootir alternate root directory\n" + "\t-R rootdir alternate root directory\n" "\t-C config configuration file\n" "\t-q quiet operation\n", "usage pw: lock [switches]\n" @@ -330,7 +330,7 @@ cmdhelp(int mode, int which) { "usage: pw groupadd [group|gid] [switches]\n" "\t-V etcdir alternate /etc location\n" - "\t-R rootir alternate root directory\n" + "\t-R rootdir alternate root directory\n" "\t-C config configuration file\n" "\t-q quiet operation\n" "\t-n group group name\n" @@ -341,13 +341,13 @@ cmdhelp(int mode, int which) "\t-N no update\n", "usage: pw groupdel [group|gid] [switches]\n" "\t-V etcdir alternate /etc location\n" - "\t-R rootir alternate root directory\n" + "\t-R rootdir alternate root directory\n" "\t-n name group name\n" "\t-g gid group id\n" "\t-Y update NIS maps\n", "usage: pw groupmod [group|gid] [switches]\n" "\t-V etcdir alternate /etc location\n" - "\t-R rootir alternate root directory\n" + "\t-R rootdir alternate root directory\n" "\t-C config configuration file\n" "\t-q quiet operation\n" "\t-F force add if not exists\n" @@ -361,7 +361,7 @@ cmdhelp(int mode, int which) "\t-N no update\n", "usage: pw groupshow [group|gid] [switches]\n" "\t-V etcdir alternate /etc location\n" - "\t-R rootir alternate root directory\n" + "\t-R rootdir alternate root directory\n" "\t-n name group name\n" "\t-g gid group id\n" "\t-F force print\n" @@ -369,7 +369,7 @@ cmdhelp(int mode, int which) "\t-a print all accounting groups\n", "usage: pw groupnext [switches]\n" "\t-V etcdir alternate /etc location\n" - "\t-R rootir alternate root directory\n" + "\t-R rootdir alternate root directory\n" "\t-C config configuration file\n" "\t-q quiet operation\n" } From owner-svn-src-all@freebsd.org Sat Oct 17 03:51:51 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id BEECCA168C0; Sat, 17 Oct 2015 03:51:51 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 91635BC; Sat, 17 Oct 2015 03:51:51 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t9H3podR095466; Sat, 17 Oct 2015 03:51:50 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9H3poQZ095465; Sat, 17 Oct 2015 03:51:50 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201510170351.t9H3poQZ095465@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Sat, 17 Oct 2015 03:51:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289438 - 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 " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 17 Oct 2015 03:51:51 -0000 Author: bdrewery Date: Sat Oct 17 03:51:50 2015 New Revision: 289438 URL: https://svnweb.freebsd.org/changeset/base/289438 Log: Rework the world subdir build targets to use the standard SUBDIR_PARALLEL mechanism. Back in r30113, the 'par-*' targets were added to parallelize portions of the build in a very similar fashion as the SUBDIR_PARALLEL feature used in r263778. Calling a target without 'par-' (for 'parallel') resulted in the standard bsd.subdir.mk handling without parallelization. Given we have SUBDIR_PARALLEL now there is no reason to duplicate the handling here. In build logs this will result in the ${dir}.${target}__D targets now showing as the normal ${target}_subdir_${dir} targets. I audited all of the uses of Makefile.inc1 and Makefile's targets that use bsd.subdir.mk and found that all but 'all' and 'install' were fine to use as always parallel. - For 'install' (from installworld -j) the ordering of lib/ and libexec/ before the rest of the system (described in r289433), and etc/ being last (described in r289435), is all that matters. So now a .WAIT is added in the proper places when invoking any 'install*' target. A parallel installworld does work and took 46% of the time a non-parallel install would take on my system with -j15 to ZFS. - For 'all' I left the default handling for this to not run in parallel. A 'par-all' target is still used by the 'everything' stage of buildworld to continue building in parallel as it already has been. This works because most of the dependencies are handled by the early bootstrap phases as well as 'libraries' and 'includes' phases. This lets all of the SUBDIR build in parallel fine, such as bin/ and lib/. This will not work if the user invokes 'all' though as we have dependencies spread all over the system with no way to depend between them (except for the dirdeps feature in the META_MODE build). Calling 'make all' from the top-level is still useful at least when using SUBDIR_OVERRIDE. MFC after: 2 weeks Sponsored by: EMC / Isilon Storage Division Modified: head/Makefile.inc1 Modified: head/Makefile.inc1 ============================================================================== --- head/Makefile.inc1 Sat Oct 17 03:13:22 2015 (r289437) +++ head/Makefile.inc1 Sat Oct 17 03:51:50 2015 (r289438) @@ -63,6 +63,10 @@ SRCDIR?= ${.CURDIR} SUBDIR= ${SUBDIR_OVERRIDE} .else SUBDIR= lib libexec +.if make(install*) +# Ensure libraries are installed before progressing. +SUBDIR+=.WAIT +.endif SUBDIR+=bin .if ${MK_CDDL} != "no" SUBDIR+=cddl @@ -115,6 +119,9 @@ SUBDIR+= ${_DIR} # by calling 'makedb' in share/man. This is only relevant for # install/distribute so they build the whatis file after every manpage is # installed. +.if make(install*) +SUBDIR+=.WAIT +.endif SUBDIR+=etc .if defined(NOCLEAN) @@ -589,9 +596,9 @@ _cleanobj: @echo "--------------------------------------------------------------" @echo ">>> stage 2.1: cleaning up the object tree" @echo "--------------------------------------------------------------" - ${_+_}cd ${.CURDIR}; ${WMAKE} ${CLEANDIR:S/^/par-/} + ${_+_}cd ${.CURDIR}; ${WMAKE} ${CLEANDIR} .if defined(LIB32TMP) - ${_+_}cd ${.CURDIR}; ${LIB32WMAKE} -f Makefile.inc1 ${CLEANDIR:S/^/par-/} + ${_+_}cd ${.CURDIR}; ${LIB32WMAKE} -f Makefile.inc1 ${CLEANDIR} .endif .endif _obj: @@ -599,7 +606,7 @@ _obj: @echo "--------------------------------------------------------------" @echo ">>> stage 2.2: rebuilding the object tree" @echo "--------------------------------------------------------------" - ${_+_}cd ${.CURDIR}; ${WMAKE} par-obj + ${_+_}cd ${.CURDIR}; ${WMAKE} obj _build-tools: @echo @echo "--------------------------------------------------------------" @@ -618,7 +625,7 @@ _includes: @echo "--------------------------------------------------------------" @echo ">>> stage 4.1: building includes" @echo "--------------------------------------------------------------" - ${_+_}cd ${.CURDIR}; ${WMAKE} SHARED=symlinks par-includes + ${_+_}cd ${.CURDIR}; ${WMAKE} SHARED=symlinks includes _libraries: @echo @echo "--------------------------------------------------------------" @@ -632,7 +639,7 @@ _depend: @echo "--------------------------------------------------------------" @echo ">>> stage 4.3: make dependencies" @echo "--------------------------------------------------------------" - ${_+_}cd ${.CURDIR}; ${WMAKE} par-depend + ${_+_}cd ${.CURDIR}; ${WMAKE} depend everything: @echo @echo "--------------------------------------------------------------" @@ -1944,22 +1951,18 @@ _startup_libs: ${_startup_libs:S/$/__L/} _prebuild_libs: ${_prebuild_libs:S/$/__L/} _generic_libs: ${_generic_libs:S/$/__L/} -.for __target in all clean cleandepend cleandir depend includes obj -.for entry in ${SUBDIR} -${entry}.${__target}__D: .PHONY .MAKE - ${_+_}@set -e; if test -d ${.CURDIR}/${entry}.${MACHINE_ARCH}; then \ - ${ECHODIR} "===> ${DIRPRFX}${entry}.${MACHINE_ARCH} (${__target})"; \ - edir=${entry}.${MACHINE_ARCH}; \ - cd ${.CURDIR}/$${edir}; \ - else \ - ${ECHODIR} "===> ${DIRPRFX}${entry} (${__target})"; \ - edir=${entry}; \ - cd ${.CURDIR}/$${edir}; \ - fi; \ - ${MAKE} ${__target} DIRPRFX=${DIRPRFX}$${edir}/ -.endfor -par-${__target}: ${SUBDIR:S/$/.${__target}__D/} -.endfor +# Enable SUBDIR_PARALLEL when not calling 'make all', unless called as +# 'par-all'. This is because it is unlikely that running 'make all' from +# the top-level, especially with a SUBDIR_OVERRIDE or LOCAL_DIRS set, +# will have a reliable build if SUBDIRs are built in parallel. This is +# safe for the world stage of buildworld though since it has already +# built libraries in a proper order and installed includes into WORLDTMP. +# Special handling is done for SUBDIR ordering for 'install*' to avoid +# trashing a system if it crashes mid-install. +par-all: all .PHONY +.if !make(all) +SUBDIR_PARALLEL= +.endif .include @@ -2267,7 +2270,7 @@ _xi-cross-tools: .endfor _xi-includes: - ${_+_}cd ${.CURDIR}; ${CD2MAKE} -f Makefile.inc1 par-includes \ + ${_+_}cd ${.CURDIR}; ${CD2MAKE} -f Makefile.inc1 includes \ DESTDIR=${XDDESTDIR} _xi-libraries: From owner-svn-src-all@freebsd.org Sat Oct 17 04:03:54 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E8C2CA16A4F; Sat, 17 Oct 2015 04:03:54 +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 AE5986CF; Sat, 17 Oct 2015 04:03:54 +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 t9H43rSs097441; Sat, 17 Oct 2015 04:03:53 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9H43rh9097440; Sat, 17 Oct 2015 04:03:53 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201510170403.t9H43rh9097440@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Sat, 17 Oct 2015 04:03:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289439 - 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 " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 17 Oct 2015 04:03:55 -0000 Author: bdrewery Date: Sat Oct 17 04:03:53 2015 New Revision: 289439 URL: https://svnweb.freebsd.org/changeset/base/289439 Log: Export OSRELDATE so sub-makes don't look it up again. We pass BOOTSTRAPPING=${OSRELDATE} to some of the sub-makes. Rather than chase every ${MAKE} invokation, just export it as bmake lets us. Sponsored by: EMC / Isilon Storage Division Modified: head/Makefile.inc1 Modified: head/Makefile.inc1 ============================================================================== --- head/Makefile.inc1 Sat Oct 17 03:51:50 2015 (r289438) +++ head/Makefile.inc1 Sat Oct 17 04:03:53 2015 (r289439) @@ -148,6 +148,7 @@ OSRELDATE!= awk '/^\#define[[:space:]]*_ .else OSRELDATE= 0 .endif +.export OSRELDATE .endif .if !defined(VERSION) From owner-svn-src-all@freebsd.org Sat Oct 17 04:18:35 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id CCC35A16C7E; Sat, 17 Oct 2015 04:18:35 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from mail106.syd.optusnet.com.au (mail106.syd.optusnet.com.au [211.29.132.42]) by mx1.freebsd.org (Postfix) with ESMTP id 58511F80; Sat, 17 Oct 2015 04:18:35 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from c211-30-166-197.carlnfd1.nsw.optusnet.com.au (c211-30-166-197.carlnfd1.nsw.optusnet.com.au [211.30.166.197]) by mail106.syd.optusnet.com.au (Postfix) with ESMTPS id 88AF53C4BD2; Sat, 17 Oct 2015 15:18:24 +1100 (AEDT) Date: Sat, 17 Oct 2015 15:18:24 +1100 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: Warner Losh cc: Hans Petter Selasky , Bruce Evans , Warner Losh , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r289405 - head/sys/ufs/ffs In-Reply-To: Message-ID: <20151017135131.T1240@besplex.bde.org> References: <201510160306.t9G3622O049128@repo.freebsd.org> <20151016151349.W1280@besplex.bde.org> <5620B15C.8090104@selasky.org> MIME-Version: 1.0 X-Optus-CM-Score: 0 X-Optus-CM-Analysis: v=2.1 cv=H5kmuLsi c=1 sm=1 tr=0 a=KA6XNC2GZCFrdESI5ZmdjQ==:117 a=PO7r1zJSAAAA:8 a=JzwRw_2MAAAA:8 a=nlC_4_pT8q9DhB4Ho9EA:9 a=ndaoGXS1AAAA:8 a=gQzIAJoF2sBFKuwrgaYA:9 a=45ClL6m2LaAA:10 Content-Type: TEXT/PLAIN; charset=X-UNKNOWN; format=flowed 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 " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 17 Oct 2015 04:18:36 -0000 On Fri, 16 Oct 2015, Warner Losh wrote: >> On Oct 16, 2015, at 2:12 AM, Hans Petter Selasky wrote: >> >> On 10/16/15 08:21, Bruce Evans wrote: >>> In addition, making the file contiguous in LBA space doesn't >>> improve the access times from flash devices because they have no seek >>> time. >> >> This is not exactly true, like Bruce pointed out too. Maybe there should= be a check, that if the block is too small reallocate it, else leave it fo= r the sake of the flash. Doing 1K accesses versus 64K accesses will typical= ly show up in the performance benchmark regardless of how fast the underlyi= ng medium is. > > But that=92s not what this does. It isn=92t the defrag code that takes th= e 2-8k fragments and squashes them into 16-64k block size for the device. T= his takes the larger blocks and makes sure they are next to each other. Thi= s takes large contiguous space (like 2MB) and puts as much as possible in a= cylinder group. That=92s totally useless on a flash drive. > > Since the sizes of the blocks are so large, moving them won=92t change an= y benchmarks. Not true. First, the fragment size is actually 512-4K and the block size is 4K-64K and the block size is that of ffs, not of the device (but the ffs size should be chosen to be a multiple of the device size). ffs_doreallocblks() doesn't take large (2MB) blocks and put them in in a cylinder group. It takes not very large (4K-64K) ffs blocks and tries to make them contiguous. Sometimes this gives large (2MB) contiguous sets of blocks). Cylinder groups are irrelevant except that contiguity is impossible across them. The pessimization that I was talking about was expanding the number of i/o's by a large (anything more than 1%) factor by not grouping ffs blocks. I know too much about this from benchmarking and fixing the 10-20% performance loss in soft updates for _reading_ of medium-size files from pessimizal block allocation. The loss was larger for soft updates than for other cases because ffs used its delayed allocation to perfectly pessimize the location of the indirect block. 10%-20% is for files in /usr/src with an ffs block size smaller than its current default of 32K, on a not very fast hard disks. Most of these files don't need an indirect block when the ffs block size is 32K or even 16K. It is surprising that the effect is so large when the block size is even 16K. Then only files larger than 192K need an indirect block. The size of the effect also depends on the amount of caching in disks. With none, any seek kills performance by much more than 10-20%. With some, small seeks are almost free. They just take another i/o to access the disk's cache provided the disk does good read-ahead. The bug seems to be that ffs_doreallocblks() does trimming for _all_ blocks that it looks at although most of them were just written with a delayed write and never reached the disk. Even the extra i/o's for this are not good. Hopefully the disk does nothing for trims on unwritten blocks. Bruce From owner-svn-src-all@freebsd.org Sat Oct 17 04:31:01 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7B69CA16F29; Sat, 17 Oct 2015 04:31:01 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: from mail-pa0-x230.google.com (mail-pa0-x230.google.com [IPv6:2607:f8b0:400e:c03::230]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4B39515B8; Sat, 17 Oct 2015 04:31:01 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: by pacfv9 with SMTP id fv9so40161173pac.3; Fri, 16 Oct 2015 21:31:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=content-type:mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=5P4Kxjkxmx7CThSy0jm4cvPCnjdXJ7mT5ZH6t2xJuHk=; b=PEhNYn+/ZyB3Kpb/XnbgpNEmKAMnBVnBjYT9BfrYiAVdVCu9/L2ML/9P3vx3RX/W77 ES/dijga84l2ZSW6FHWoxYeczkevPUJwwnYsV4WQGXQeNqkbooF25wXxoaKrXEAjqoSI ZyRzULqPH4j/E970BOVKWZEEuUTkbDv7AkHprYuUhy6di9LHQWEWByW6T6lIngFQAJF6 kT39pj2p3kN0FQ92fnAjQzg03G8hVtn+nIxqX3YMhTwYjMvRcZDc/Ef2ecInM9/NjIhs tEgus1Pe0wgltbcUqqaMWgvsr0GflUOXtzMR78ZwjLSlBAxkbpFpKoa9ylSPRWkJuAHL WVTw== X-Received: by 10.66.248.10 with SMTP id yi10mr21057330pac.6.1445056260687; Fri, 16 Oct 2015 21:31:00 -0700 (PDT) Received: from [192.168.20.7] (c-24-16-212-205.hsd1.wa.comcast.net. [24.16.212.205]) by smtp.gmail.com with ESMTPSA id j16sm23972835pbq.23.2015.10.16.21.30.59 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 16 Oct 2015 21:31:00 -0700 (PDT) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 8.2 \(2104\)) Subject: Re: svn commit: r289253 - head/share/mk From: NGie Cooper In-Reply-To: <561EB815.6050600@FreeBSD.org> Date: Fri, 16 Oct 2015 21:30:59 -0700 Cc: "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Content-Transfer-Encoding: quoted-printable Message-Id: References: <201510131911.t9DJBMTc034025@repo.freebsd.org> <561D7549.2070202@FreeBSD.org> <561D8B38.7030202@FreeBSD.org> <561EB815.6050600@FreeBSD.org> To: Bryan Drewery 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 " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 17 Oct 2015 04:31:01 -0000 > On Oct 14, 2015, at 13:16, Bryan Drewery wrote: ... > I think what is being seen here is because I removed 'cleanobj' from > bsd.progs.mk (in r288201) to let bsd.obj.mk handle it. It sometimes > recurses clean when needed. If there's an obj dir 'cleanobj' will just > remove that and avoid 'clean'. >=20 > For example (without bsd.progs.mk) >=20 > ~/svn/clean2/usr.bin/vi # make obj > /usr/obj/root/svn/clean2/usr.bin/vi created for = /root/svn/clean2/usr.bin/vi > =3D=3D=3D> catalog (obj) > /usr/obj/root/svn/clean2/usr.bin/vi/catalog created for > /root/svn/clean2/usr.bin/vi/catalog >=20 >=20 > ~/svn/clean2/usr.bin/vi # make cleanobj > =3D=3D=3D> catalog (cleanobj) > rm -f dump dutch english french german polish ru_RU.KOI8-R spanish > swedish uk_UA.KOI8-U zh_CN.GB2312 dutch.UTF-8 french.UTF-8 = german.UTF-8 > polish.UTF-8 spanish.UTF-8 swedish.UTF-8 zh_CN.UTF-8 ru_RU.UTF-8 > uk_UA.UTF-8 english.base *.check __ck1 __ck2 >=20 > Next call finds no obj dir and tries cleaning in local dirs: >=20 > ~/svn/clean2/usr.bin/vi # make cleanobj > rm -f nex nvi nvi.full nvi.debug cl_funcs.o cl_main.o cl_read.o > cl_screen.o cl_term.o conv.o cut.o delete.o encoding.o exf.o key.o > line.o log.o main.o mark.o msg.o options.o options_f.o put.o recover.o > screen.o search.o seq.o util.o ex.o ex_abbrev.o ex_append.o ex_args.o > ex_argv.o ex_at.o ex_bang.o ex_cd.o ex_cmd.o ex_cscope.o ex_delete.o > ex_display.o ex_edit.o ex_equal.o ex_file.o ex_filter.o ex_global.o > ex_init.o ex_join.o ex_map.o ex_mark.o ex_mkexrc.o ex_move.o ex_open.o > ex_preserve.o ex_print.o ex_put.o ex_quit.o ex_read.o ex_screen.o > ex_script.o ex_set.o ex_shell.o ex_shift.o ex_source.o ex_stop.o > ex_subst.o ex_tag.o ex_txt.o ex_undo.o ex_usage.o ex_util.o = ex_version.o > ex_visual.o ex_write.o ex_yank.o ex_z.o getc.o v_at.o v_ch.o v_cmd.o > v_delete.o v_ex.o v_increment.o v_init.o v_itxt.o v_left.o v_mark.o > v_match.o v_paragraph.o v_put.o v_redraw.o v_replace.o v_right.o > v_screen.o v_scroll.o v_search.o v_section.o v_sentence.o v_status.o > v_txt.o v_ulcase.o v_undo.o v_util.o v_word.o v_xchar.o v_yank.o v_z.o > v_zexit.o vi.o vs_line.o vs_msg.o vs_refresh.o vs_relative.o vs_smap.o > vs_split.o regcomp.o regerror.o regexec.o regfree.o vi.1.gz = vi.1.cat.gz > =3D=3D=3D> catalog (clean) > rm -f dump dutch english french german polish ru_RU.KOI8-R spanish > swedish uk_UA.KOI8-U zh_CN.GB2312 dutch.UTF-8 french.UTF-8 = german.UTF-8 > polish.UTF-8 spanish.UTF-8 swedish.UTF-8 zh_CN.UTF-8 ru_RU.UTF-8 > uk_UA.UTF-8 english.base *.check __ck1 __ck2 > rm -f .depend tags > =3D=3D=3D> catalog (cleandepend) > =3D=3D=3D> catalog (cleanobj) > rm -f dump dutch english french german polish ru_RU.KOI8-R spanish > swedish uk_UA.KOI8-U zh_CN.GB2312 dutch.UTF-8 french.UTF-8 = german.UTF-8 > polish.UTF-8 spanish.UTF-8 swedish.UTF-8 zh_CN.UTF-8 ru_RU.UTF-8 > uk_UA.UTF-8 english.base *.check __ck1 __ck2 >=20 >=20 > Similar behavior will happen with bsd.progs.mk usage now. 'cleandir' > also has this flip-flopping behavior. That could be a part of it. Part of the other unintuitive legacy = behavior for make cleandir is that you have to call it twice in order = for it to completely invoke all of the clean targets that its dependent = on: $ uname -a FreeBSD fbsd11 11.0-CURRENT FreeBSD 11.0-CURRENT #6 = r288943+b94810a(isilon-atf): Tue Oct 6 14:54:34 PDT 2015 = ngie@fbsd11:/usr/obj/usr/src/git/sys/GENERIC-NODEBUG amd64 $ make cleandir (cd /usr/src/svn/tests/sys/posixshm && DEPENDFILE=3D.depend.posixshm_test= make -f /usr/src/svn/tests/sys/posixshm/Makefile _RECURSING_PROGS=3D = SUBDIR=3D PROG=3Dposixshm_test cleandir) rm -f posixshm_test posixshm_test.o rm -f .depend.posixshm_test GPATH GRTAGS GSYMS GTAGS [ngie@fbsd11 /usr/src/svn/tests/sys/posixshm]$ make cleandir (cd /usr/src/svn/tests/sys/posixshm && DEPENDFILE=3D.depend.posixshm_test= make -f Makefile _RECURSING_PROGS=3D SUBDIR=3D PROG=3Dposixshm_test = clean) rm -f posixshm_test posixshm_test.o rm -f Kyuafile.auto Kyuafile.auto.tmp (cd /usr/src/svn/tests/sys/posixshm && DEPENDFILE=3D.depend.posixshm_test= make -f Makefile _RECURSING_PROGS=3D SUBDIR=3D PROG=3Dposixshm_test = cleandepend) rm -f .depend.posixshm_test GPATH GRTAGS GSYMS GTAGS (cd /usr/src/svn/tests/sys/posixshm && DEPENDFILE=3D.depend.posixshm_test= make -f Makefile _RECURSING_PROGS=3D SUBDIR=3D PROG=3Dposixshm_test = cleandir) rm -f posixshm_test posixshm_test.o rm -f .depend.posixshm_test GPATH GRTAGS GSYMS GTAGS This might be some of what you were observing above. It looks better now = after the last few days, but it was definitely less functional on head = between the 12th and now on head. Thanks! -NGie= From owner-svn-src-all@freebsd.org Sat Oct 17 04:32:23 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 068F6A17025; Sat, 17 Oct 2015 04:32: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 C14941949; Sat, 17 Oct 2015 04:32:22 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t9H4WL9X007476; Sat, 17 Oct 2015 04:32:21 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9H4WLs3007471; Sat, 17 Oct 2015 04:32:21 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201510170432.t9H4WLs3007471@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Sat, 17 Oct 2015 04:32:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289441 - in head: etc/mtree tests/sys tests/sys/posixshm tools/regression/posixshm tools/test/posixshm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 17 Oct 2015 04:32:23 -0000 Author: ngie Date: Sat Oct 17 04:32:21 2015 New Revision: 289441 URL: https://svnweb.freebsd.org/changeset/base/289441 Log: Integrate tools/test/posixshm and tools/regression/posixshm into the FreeBSD test suite as tests/sys/posixshm Some other highlights: - Convert the testcases over to ATF - Don't use hardcoded paths to /tmp (which violate the ATF/kyua samdbox); use mkstemp to generate temporary paths for non-SHM_ANON shm objects. MFC after: 2 weeks Sponsored by: EMC / Isilon Storage Division Added: head/tests/sys/posixshm/ - copied from r289223, user/ngie/more-tests2/tests/sys/posixshm/ head/tests/sys/posixshm/posixshm_test.c - copied, changed from r289437, user/ngie/more-tests2/tests/sys/posixshm/posixshm_test.c Deleted: head/tests/sys/posixshm/posixshm.c head/tests/sys/posixshm/shm_test.c head/tests/sys/posixshm/test.c head/tests/sys/posixshm/test.h head/tools/regression/posixshm/ head/tools/test/posixshm/ Modified: head/etc/mtree/BSD.tests.dist head/tests/sys/Makefile head/tests/sys/posixshm/Makefile Directory Properties: head/ (props changed) Modified: head/etc/mtree/BSD.tests.dist ============================================================================== --- head/etc/mtree/BSD.tests.dist Sat Oct 17 04:07:41 2015 (r289440) +++ head/etc/mtree/BSD.tests.dist Sat Oct 17 04:32:21 2015 (r289441) @@ -410,6 +410,8 @@ unlink .. .. + posixshm + .. vfs .. vm Modified: head/tests/sys/Makefile ============================================================================== --- head/tests/sys/Makefile Sat Oct 17 04:07:41 2015 (r289440) +++ head/tests/sys/Makefile Sat Oct 17 04:32:21 2015 (r289441) @@ -12,6 +12,7 @@ TESTS_SUBDIRS+= kqueue TESTS_SUBDIRS+= mqueue TESTS_SUBDIRS+= netinet TESTS_SUBDIRS+= opencrypto +TESTS_SUBDIRS+= posixshm TESTS_SUBDIRS+= vfs TESTS_SUBDIRS+= vm Modified: head/tests/sys/posixshm/Makefile ============================================================================== --- user/ngie/more-tests2/tests/sys/posixshm/Makefile Tue Oct 13 16:50:12 2015 (r289223) +++ head/tests/sys/posixshm/Makefile Sat Oct 17 04:32:21 2015 (r289441) @@ -2,10 +2,6 @@ TESTSDIR= ${TESTSBASE}/sys/posixshm -TAP_TESTS_C+= posixshm_test -PLAIN_TESTS_C+= posixshm_test2 - -SRCS.posixshm_test= posixshm.c test.c -SRCS.posixshm_test2= shm_test.c +ATF_TESTS_C+= posixshm_test .include Copied and modified: head/tests/sys/posixshm/posixshm_test.c (from r289437, user/ngie/more-tests2/tests/sys/posixshm/posixshm_test.c) ============================================================================== --- user/ngie/more-tests2/tests/sys/posixshm/posixshm_test.c Sat Oct 17 03:13:22 2015 (r289437, copy source) +++ head/tests/sys/posixshm/posixshm_test.c Sat Oct 17 04:32:21 2015 (r289441) @@ -110,18 +110,18 @@ scribble_object(void) fd = shm_open(test_path, O_CREAT | O_EXCL | O_RDWR, 0777); } if (fd < 0) - atf_tc_fail("shm_open"); + atf_tc_fail("shm_open failed; errno=%d", errno); if (ftruncate(fd, getpagesize()) < 0) - atf_tc_fail("ftruncate"); + atf_tc_fail("ftruncate failed; errno=%d", errno); page = mmap(0, getpagesize(), PROT_READ | PROT_WRITE, MAP_SHARED, fd, 0); if (page == MAP_FAILED) - atf_tc_fail("mmap"); + atf_tc_fail("mmap failed; errno=%d", errno); page[0] = '1'; if (munmap(page, getpagesize()) < 0) - atf_tc_fail("munmap"); + atf_tc_fail("munmap failed; errno=%d", errno); return (fd); } @@ -136,32 +136,18 @@ ATF_TC_BODY(remap_object, tc) page = mmap(0, getpagesize(), PROT_READ | PROT_WRITE, MAP_SHARED, fd, 0); - if (page == MAP_FAILED) { - atf_tc_fail("mmap(2)"); - close(fd); - shm_unlink(test_path); - return; - } + if (page == MAP_FAILED) + atf_tc_fail("mmap(2) failed; errno=%d", errno); - if (page[0] != '1') { - atf_tc_fail("missing data"); - close(fd); - shm_unlink(test_path); - return; - } + if (page[0] != '1') + atf_tc_fail("missing data ('%c' != '1')", page[0]); close(fd); - if (munmap(page, getpagesize()) < 0) { - atf_tc_fail("munmap"); - shm_unlink(test_path); - return; - } - - if (shm_unlink(test_path) < 0) { - atf_tc_fail("shm_unlink"); - return; - } + if (munmap(page, getpagesize()) < 0) + atf_tc_fail("munmap failed; errno=%d", errno); + ATF_REQUIRE_MSG(shm_unlink(test_path) != -1, + "shm_unlink failed; errno=%d", errno); } ATF_TC_WITHOUT_HEAD(reopen_object); @@ -174,30 +160,20 @@ ATF_TC_BODY(reopen_object, tc) close(fd); fd = shm_open(test_path, O_RDONLY, 0777); - if (fd < 0) { - atf_tc_fail("shm_open(2)"); - shm_unlink(test_path); - return; - } + if (fd < 0) + atf_tc_fail("shm_open(2) failed; errno=%d", errno); + page = mmap(0, getpagesize(), PROT_READ, MAP_SHARED, fd, 0); - if (page == MAP_FAILED) { - atf_tc_fail("mmap(2)"); - close(fd); - shm_unlink(test_path); - return; - } + if (page == MAP_FAILED) + atf_tc_fail("mmap(2) failed; errno=%d", errno); - if (page[0] != '1') { - atf_tc_fail("missing data"); - munmap(page, getpagesize()); - close(fd); - shm_unlink(test_path); - return; - } + if (page[0] != '1') + atf_tc_fail("missing data ('%c' != '1')", page[0]); munmap(page, getpagesize()); close(fd); - shm_unlink(test_path); + ATF_REQUIRE_MSG(shm_unlink(test_path) != -1, + "shm_unlink failed; errno=%d", errno); } ATF_TC_WITHOUT_HEAD(readonly_mmap_write); @@ -209,30 +185,21 @@ ATF_TC_BODY(readonly_mmap_write, tc) gen_test_path(); fd = shm_open(test_path, O_RDONLY | O_CREAT, 0777); - if (fd < 0) { - atf_tc_fail("shm_open"); - return; - } + ATF_REQUIRE_MSG(fd >= 0, "shm_open failed; errno=%d", errno); /* PROT_WRITE should fail with EACCES. */ page = mmap(0, getpagesize(), PROT_READ | PROT_WRITE, MAP_SHARED, fd, 0); - if (page != MAP_FAILED) { - atf_tc_fail("mmap(PROT_WRITE) succeeded"); - munmap(page, getpagesize()); - close(fd); - shm_unlink(test_path); - return; - } - if (errno != EACCES) { - atf_tc_fail("mmap"); - close(fd); - shm_unlink(test_path); - return; - } + if (page != MAP_FAILED) + atf_tc_fail("mmap(PROT_WRITE) succeeded unexpectedly"); + + if (errno != EACCES) + atf_tc_fail("mmap(PROT_WRITE) didn't fail with EACCES; " + "errno=%d", errno); close(fd); - shm_unlink(test_path); + ATF_REQUIRE_MSG(shm_unlink(test_path) != -1, + "shm_unlink failed; errno=%d", errno); } ATF_TC_WITHOUT_HEAD(open_after_link); @@ -243,16 +210,11 @@ ATF_TC_BODY(open_after_link, tc) gen_test_path(); fd = shm_open(test_path, O_RDONLY | O_CREAT, 0777); - if (fd < 0) { - atf_tc_fail("shm_open(1)"); - return; - } + ATF_REQUIRE_MSG(fd >= 0, "shm_open(1) failed; errno=%d", errno); close(fd); - if (shm_unlink(test_path) < 0) { - atf_tc_fail("shm_unlink"); - return; - } + ATF_REQUIRE_MSG(shm_unlink(test_path) != -1, "shm_unlink failed: %d", + errno); shm_open_should_fail(test_path, O_RDONLY, 0777, ENOENT); } @@ -288,10 +250,7 @@ ATF_TC_BODY(open_anon, tc) int fd; fd = shm_open(SHM_ANON, O_RDWR, 0777); - if (fd < 0) { - atf_tc_fail("shm_open"); - return; - } + ATF_REQUIRE_MSG(fd >= 0, "shm_open failed; errno=%d", errno); close(fd); } @@ -336,13 +295,14 @@ ATF_TC_BODY(open_create_existing_object, gen_test_path(); fd = shm_open(test_path, O_RDONLY|O_CREAT, 0777); - ATF_REQUIRE_MSG(fd != -1, "shm_open(O_CREAT) failed; errno=%d", errno); + ATF_REQUIRE_MSG(fd >= 0, "shm_open failed; errno=%d", errno); close(fd); shm_open_should_fail(test_path, O_RDONLY|O_CREAT|O_EXCL, 0777, EEXIST); - shm_unlink("shm_object"); + ATF_REQUIRE_MSG(shm_unlink(test_path) != -1, + "shm_unlink failed; errno=%d", errno); } ATF_TC_WITHOUT_HEAD(trunc_resets_object); @@ -355,48 +315,24 @@ ATF_TC_BODY(trunc_resets_object, tc) /* Create object and set size to 1024. */ fd = shm_open(test_path, O_RDWR | O_CREAT, 0777); - if (fd < 0) { - atf_tc_fail("shm_open(1)"); - return; - } - if (ftruncate(fd, 1024) < 0) { - atf_tc_fail("ftruncate"); - close(fd); - return; - } - if (fstat(fd, &sb) < 0) { - atf_tc_fail("fstat(1)"); - close(fd); - return; - } - if (sb.st_size != 1024) { - atf_tc_fail("size %d != 1024", (int)sb.st_size); - close(fd); - return; - } + ATF_REQUIRE_MSG(fd >= 0, "shm_open(1) failed; errno=%d", errno); + ATF_REQUIRE_MSG(ftruncate(fd, 1024) != -1, + "ftruncate failed; errno=%d", errno); + ATF_REQUIRE_MSG(fstat(fd, &sb) != -1, + "fstat(1) failed; errno=%d", errno); + ATF_REQUIRE_MSG(sb.st_size == 1024, "size %d != 1024", (int)sb.st_size); close(fd); /* Open with O_TRUNC which should reset size to 0. */ fd = shm_open(test_path, O_RDWR | O_TRUNC, 0777); - if (fd < 0) { - atf_tc_fail("shm_open(2)"); - return; - } - if (fstat(fd, &sb) < 0) { - atf_tc_fail("fstat(2)"); - close(fd); - return; - } - if (sb.st_size != 0) { - atf_tc_fail("size after O_TRUNC %d != 0", (int)sb.st_size); - close(fd); - return; - } + ATF_REQUIRE_MSG(fd >= 0, "shm_open(2) failed; errno=%d", errno); + ATF_REQUIRE_MSG(fstat(fd, &sb) != -1, + "fstat(2) failed; errno=%d", errno); + ATF_REQUIRE_MSG(sb.st_size == 0, + "size was not 0 after truncation: %d", (int)sb.st_size); close(fd); - if (shm_unlink(test_path) < 0) { - atf_tc_fail("shm_unlink"); - return; - } + ATF_REQUIRE_MSG(shm_unlink(test_path) != -1, + "shm_unlink failed; errno=%d", errno); } ATF_TC_WITHOUT_HEAD(unlink_bad_path_pointer); @@ -423,110 +359,76 @@ ATF_TC_BODY(object_resize, tc) { pid_t pid; struct stat sb; - char *page; + char err_buf[1024], *page; int fd, status; /* Start off with a size of a single page. */ - fd = shm_open(SHM_ANON, O_CREAT | O_RDWR, 0777); - if (fd < 0) { - atf_tc_fail("shm_open"); - return; - } - if (ftruncate(fd, getpagesize()) < 0) { - atf_tc_fail("ftruncate(1)"); - close(fd); - return; - } - if (fstat(fd, &sb) < 0) { - atf_tc_fail("fstat(1)"); - close(fd); - return; - } - if (sb.st_size != getpagesize()) { - atf_tc_fail("first resize failed"); - close(fd); - return; - } + fd = shm_open(SHM_ANON, O_CREAT|O_RDWR, 0777); + if (fd < 0) + atf_tc_fail("shm_open failed; errno=%d", errno); + + if (ftruncate(fd, getpagesize()) < 0) + atf_tc_fail("ftruncate(1) failed; errno=%d", errno); + + if (fstat(fd, &sb) < 0) + atf_tc_fail("fstat(1) failed; errno=%d", errno); + + if (sb.st_size != getpagesize()) + atf_tc_fail("first resize failed (%d != %d)", + (int)sb.st_size, getpagesize()); /* Write a '1' to the first byte. */ - page = mmap(0, getpagesize(), PROT_READ | PROT_WRITE, MAP_SHARED, fd, + page = mmap(0, getpagesize(), PROT_READ|PROT_WRITE, MAP_SHARED, fd, 0); - if (page == MAP_FAILED) { + if (page == MAP_FAILED) atf_tc_fail("mmap(1)"); - close(fd); - return; - } page[0] = '1'; - if (munmap(page, getpagesize()) < 0) { - atf_tc_fail("munmap(1)"); - close(fd); - return; - } + if (munmap(page, getpagesize()) < 0) + atf_tc_fail("munmap(1) failed; errno=%d", errno); /* Grow the object to 2 pages. */ - if (ftruncate(fd, getpagesize() * 2) < 0) { - atf_tc_fail("ftruncate(2)"); - close(fd); - return; - } - if (fstat(fd, &sb) < 0) { - atf_tc_fail("fstat(2)"); - close(fd); - return; - } - if (sb.st_size != getpagesize() * 2) { - atf_tc_fail("second resize failed"); - close(fd); - return; - } + if (ftruncate(fd, getpagesize() * 2) < 0) + atf_tc_fail("ftruncate(2) failed; errno=%d", errno); + + if (fstat(fd, &sb) < 0) + atf_tc_fail("fstat(2) failed; errno=%d", errno); + + if (sb.st_size != getpagesize() * 2) + atf_tc_fail("second resize failed (%d != %d)", + (int)sb.st_size, getpagesize() * 2); /* Check for '1' at the first byte. */ - page = mmap(0, getpagesize() * 2, PROT_READ | PROT_WRITE, MAP_SHARED, + page = mmap(0, getpagesize() * 2, PROT_READ|PROT_WRITE, MAP_SHARED, fd, 0); - if (page == MAP_FAILED) { - atf_tc_fail("mmap(2)"); - close(fd); - return; - } + if (page == MAP_FAILED) + atf_tc_fail("mmap(2) failed; errno=%d", errno); - if (page[0] != '1') { - atf_tc_fail("missing data at 0"); - close(fd); - return; - } + if (page[0] != '1') + atf_tc_fail("'%c' != '1'", page[0]); /* Write a '2' at the start of the second page. */ page[getpagesize()] = '2'; /* Shrink the object back to 1 page. */ - if (ftruncate(fd, getpagesize()) < 0) { - atf_tc_fail("ftruncate(3)"); - close(fd); - return; - } - if (fstat(fd, &sb) < 0) { - atf_tc_fail("fstat(3)"); - close(fd); - return; - } - if (sb.st_size != getpagesize()) { - atf_tc_fail("third resize failed"); - close(fd); - return; - } + if (ftruncate(fd, getpagesize()) < 0) + atf_tc_fail("ftruncate(3) failed; errno=%d", errno); + + if (fstat(fd, &sb) < 0) + atf_tc_fail("fstat(3) failed; errno=%d", errno); + + if (sb.st_size != getpagesize()) + atf_tc_fail("third resize failed (%d != %d)", + (int)sb.st_size, getpagesize()); /* * Fork a child process to make sure the second page is no * longer valid. */ pid = fork(); - if (pid < 0) { - atf_tc_fail("fork"); - close(fd); - return; - } + if (pid == -1) + atf_tc_fail("fork failed; errno=%d", errno); if (pid == 0) { struct rlimit lim; @@ -546,33 +448,23 @@ ATF_TC_BODY(object_resize, tc) fprintf(stderr, "child: page 1: '%c'\n", c); exit(0); } - if (wait(&status) < 0) { - atf_tc_fail("wait"); - close(fd); - return; - } - if (!WIFSIGNALED(status) || WTERMSIG(status) != SIGSEGV) { + + if (wait(&status) < 0) + atf_tc_fail("wait failed; errno=%d", errno); + + if (!WIFSIGNALED(status) || WTERMSIG(status) != SIGSEGV) atf_tc_fail("child terminated with status %x", status); - close(fd); - return; - } /* Grow the object back to 2 pages. */ - if (ftruncate(fd, getpagesize() * 2) < 0) { - atf_tc_fail("ftruncate(4)"); - close(fd); - return; - } - if (fstat(fd, &sb) < 0) { - atf_tc_fail("fstat(4)"); - close(fd); - return; - } - if (sb.st_size != getpagesize() * 2) { - atf_tc_fail("second resize failed"); - close(fd); - return; - } + if (ftruncate(fd, getpagesize() * 2) < 0) + atf_tc_fail("ftruncate(2) failed; errno=%d", errno); + + if (fstat(fd, &sb) < 0) + atf_tc_fail("fstat(2) failed; errno=%d", errno); + + if (sb.st_size != getpagesize() * 2) + atf_tc_fail("fourth resize failed (%d != %d)", + (int)sb.st_size, getpagesize()); /* * Note that the mapping at 'page' for the second page is @@ -583,11 +475,9 @@ ATF_TC_BODY(object_resize, tc) * object was shrunk and the new pages when an object are * grown are zero-filled. */ - if (page[getpagesize()] != 0) { - atf_tc_fail("invalid data at %d", getpagesize()); - close(fd); - return; - } + if (page[getpagesize()] != 0) + atf_tc_fail("invalid data at %d: %x != 0", + getpagesize(), (int)page[getpagesize()]); close(fd); } From owner-svn-src-all@freebsd.org Sat Oct 17 05:49:09 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 19C48A17883; Sat, 17 Oct 2015 05:49:09 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E3854BF; Sat, 17 Oct 2015 05:49: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 t9H5n8wI020893; Sat, 17 Oct 2015 05:49:08 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9H5n7ab020890; Sat, 17 Oct 2015 05:49:07 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201510170549.t9H5n7ab020890@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Sat, 17 Oct 2015 05:49:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289442 - 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 " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 17 Oct 2015 05:49:09 -0000 Author: bdrewery Date: Sat Oct 17 05:49:07 2015 New Revision: 289442 URL: https://svnweb.freebsd.org/changeset/base/289442 Log: Do as r289391 did for share/mk and make installing to a non-existent directory an error. Most of these do a 'mkdir -p' or 'install -d' before installing, but add the trailing / here for consistency with the userland install. MFC after: 2 weeks X-MFC-With: r289391 Sponsored by: EMC / Isilon Storage Division Modified: head/sys/conf/dtb.mk head/sys/conf/kern.post.mk head/sys/conf/kmod.mk Modified: head/sys/conf/dtb.mk ============================================================================== --- head/sys/conf/dtb.mk Sat Oct 17 04:32:21 2015 (r289441) +++ head/sys/conf/dtb.mk Sat Oct 17 05:49:07 2015 (r289442) @@ -69,7 +69,7 @@ _dtbinstall: test -d ${DESTDIR}${DTBDIR} || ${INSTALL} -d -o ${DTBOWN} -g ${DTBGRP} ${DESTDIR}${DTBDIR} .for _dtb in ${DTB} ${INSTALL} -o ${DTBOWN} -g ${DTBGRP} -m ${DTBMODE} \ - ${_INSTALLFLAGS} ${_dtb} ${DESTDIR}${DTBDIR} + ${_INSTALLFLAGS} ${_dtb} ${DESTDIR}${DTBDIR}/ .endfor .endif # !target(realinstall) .endif # !target(install) Modified: head/sys/conf/kern.post.mk ============================================================================== --- head/sys/conf/kern.post.mk Sat Oct 17 04:32:21 2015 (r289441) +++ head/sys/conf/kern.post.mk Sat Oct 17 05:49:07 2015 (r289442) @@ -270,22 +270,22 @@ kernel-install: fi .endif mkdir -p ${DESTDIR}${KODIR} - ${INSTALL} -p -m 555 -o ${KMODOWN} -g ${KMODGRP} ${KERNEL_KO} ${DESTDIR}${KODIR} + ${INSTALL} -p -m 555 -o ${KMODOWN} -g ${KMODGRP} ${KERNEL_KO} ${DESTDIR}${KODIR}/ .if defined(DEBUG) && !defined(INSTALL_NODEBUG) && ${MK_KERNEL_SYMBOLS} != "no" mkdir -p ${DESTDIR}${KERN_DEBUGDIR}${KODIR} - ${INSTALL} -p -m 555 -o ${KMODOWN} -g ${KMODGRP} ${KERNEL_KO}.debug ${DESTDIR}${KERN_DEBUGDIR}${KODIR} + ${INSTALL} -p -m 555 -o ${KMODOWN} -g ${KMODGRP} ${KERNEL_KO}.debug ${DESTDIR}${KERN_DEBUGDIR}${KODIR}/ .endif .if defined(KERNEL_EXTRA_INSTALL) - ${INSTALL} -p -m 555 -o ${KMODOWN} -g ${KMODGRP} ${KERNEL_EXTRA_INSTALL} ${DESTDIR}${KODIR} + ${INSTALL} -p -m 555 -o ${KMODOWN} -g ${KMODGRP} ${KERNEL_EXTRA_INSTALL} ${DESTDIR}${KODIR}/ .endif kernel-reinstall: @-chflags -R noschg ${DESTDIR}${KODIR} - ${INSTALL} -p -m 555 -o ${KMODOWN} -g ${KMODGRP} ${KERNEL_KO} ${DESTDIR}${KODIR} + ${INSTALL} -p -m 555 -o ${KMODOWN} -g ${KMODGRP} ${KERNEL_KO} ${DESTDIR}${KODIR}/ .if defined(DEBUG) && !defined(INSTALL_NODEBUG) && ${MK_KERNEL_SYMBOLS} != "no" - ${INSTALL} -p -m 555 -o ${KMODOWN} -g ${KMODGRP} ${KERNEL_KO}.debug ${DESTDIR}${KERN_DEBUGDIR}${KODIR} + ${INSTALL} -p -m 555 -o ${KMODOWN} -g ${KMODGRP} ${KERNEL_KO}.debug ${DESTDIR}${KERN_DEBUGDIR}${KODIR}/ .endif config.o env.o hints.o vers.o vnode_if.o: Modified: head/sys/conf/kmod.mk ============================================================================== --- head/sys/conf/kmod.mk Sat Oct 17 04:32:21 2015 (r289441) +++ head/sys/conf/kmod.mk Sat Oct 17 05:49:07 2015 (r289442) @@ -296,10 +296,10 @@ realinstall: _kmodinstall .ORDER: beforeinstall _kmodinstall _kmodinstall: ${INSTALL} -o ${KMODOWN} -g ${KMODGRP} -m ${KMODMODE} \ - ${_INSTALLFLAGS} ${PROG} ${DESTDIR}${KMODDIR} + ${_INSTALLFLAGS} ${PROG} ${DESTDIR}${KMODDIR}/ .if defined(DEBUG_FLAGS) && !defined(INSTALL_NODEBUG) && ${MK_KERNEL_SYMBOLS} != "no" ${INSTALL} -o ${KMODOWN} -g ${KMODGRP} -m ${KMODMODE} \ - ${_INSTALLFLAGS} ${PROG}.debug ${DESTDIR}${KERN_DEBUGDIR}${KMODDIR} + ${_INSTALLFLAGS} ${PROG}.debug ${DESTDIR}${KERN_DEBUGDIR}${KMODDIR}/ .endif .include From owner-svn-src-all@freebsd.org Sat Oct 17 05:55:46 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id BD732A17987; Sat, 17 Oct 2015 05:55: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 7C8AF648; Sat, 17 Oct 2015 05:55: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 t9H5tjLX022676; Sat, 17 Oct 2015 05:55:45 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9H5tjki022675; Sat, 17 Oct 2015 05:55:45 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201510170555.t9H5tjki022675@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Sat, 17 Oct 2015 05:55:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289443 - 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 " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 17 Oct 2015 05:55:46 -0000 Author: bdrewery Date: Sat Oct 17 05:55:45 2015 New Revision: 289443 URL: https://svnweb.freebsd.org/changeset/base/289443 Log: Always export VERSION to the environment to avoid looking it up again in sub-makes. Some of the world phases that used plain '${MAKE} -f Makefile.inc1' were not passing this variable along which caused them to look it up again. By using bmake's .export we can remove it from all of the other environment lines. Add a comment about the usage for VERSION for ctfmerge. Sponsored by: EMC / Isilon Storage Division Modified: head/Makefile.inc1 Modified: head/Makefile.inc1 ============================================================================== --- head/Makefile.inc1 Sat Oct 17 05:49:07 2015 (r289442) +++ head/Makefile.inc1 Sat Oct 17 05:55:45 2015 (r289443) @@ -151,12 +151,14 @@ OSRELDATE= 0 .export OSRELDATE .endif +# Set VERSION for CTFMERGE to use via the default CTFFLAGS=-L VERSION. .if !defined(VERSION) REVISION!= ${MAKE} -C ${SRCDIR}/release -V REVISION BRANCH!= ${MAKE} -C ${SRCDIR}/release -V BRANCH SRCRELDATE!= awk '/^\#define[[:space:]]*__FreeBSD_version/ { print $$3 }' \ ${SRCDIR}/sys/sys/param.h VERSION= FreeBSD ${REVISION}-${BRANCH:C/-p[0-9]+$//} ${TARGET_ARCH} ${SRCRELDATE} +.export VERSION .endif KNOWN_ARCHES?= aarch64/arm64 amd64 arm armeb/arm armv6/arm armv6hf/arm i386 i386/pc98 mips mipsel/mips mips64el/mips mips64/mips mipsn32el/mips mipsn32/mips powerpc powerpc64/powerpc sparc64 @@ -265,7 +267,6 @@ CROSSENV+= ${TARGET_CFLAGS} BMAKEENV= INSTALL="sh ${.CURDIR}/tools/install.sh" \ PATH=${BPATH}:${PATH} \ WORLDTMP=${WORLDTMP} \ - VERSION="${VERSION}" \ MAKEFLAGS="-m ${.CURDIR}/tools/build/mk ${.MAKEFLAGS}" # need to keep this in sync with targets/pseudo/bootstrap-tools/Makefile BSARGS= DESTDIR= \ @@ -302,8 +303,7 @@ XMAKE= TOOLS_PREFIX=${WORLDTMP} ${BMAKE # kernel-tools stage KTMAKEENV= INSTALL="sh ${.CURDIR}/tools/install.sh" \ PATH=${BPATH}:${PATH} \ - WORLDTMP=${WORLDTMP} \ - VERSION="${VERSION}" + WORLDTMP=${WORLDTMP} KTMAKE= TOOLS_PREFIX=${WORLDTMP} MAKEOBJDIRPREFIX=${WORLDTMP} \ ${KTMAKEENV} ${MAKE} ${WORLD_FLAGS} -f Makefile.inc1 \ DESTDIR= \ @@ -316,7 +316,6 @@ KTMAKE= TOOLS_PREFIX=${WORLDTMP} MAKEOB # world stage WMAKEENV= ${CROSSENV} \ _LDSCRIPTROOT= \ - VERSION="${VERSION}" \ INSTALL="sh ${.CURDIR}/tools/install.sh" \ PATH=${TMPPATH} @@ -459,7 +458,6 @@ LIB32FLAGS+= --sysroot=${WORLDTMP} # Yes, the flags are redundant. LIB32WMAKEENV+= MAKEOBJDIRPREFIX=${LIB32_OBJTREE} \ _LDSCRIPTROOT=${LIB32TMP} \ - VERSION="${VERSION}" \ INSTALL="sh ${.CURDIR}/tools/install.sh" \ PATH=${TMPPATH} \ LIBDIR=/usr/lib32 \ @@ -1587,7 +1585,6 @@ cross-tools: .MAKE NXBENV= MAKEOBJDIRPREFIX=${OBJTREE}/nxb \ INSTALL="sh ${.CURDIR}/tools/install.sh" \ - VERSION="${VERSION}" \ PATH=${PATH}:${OBJTREE}/gperf_for_gcc/usr/bin NXBMAKE= ${NXBENV} ${MAKE} \ TBLGEN=${OBJTREE}/nxb-bin/usr/bin/tblgen \ From owner-svn-src-all@freebsd.org Sat Oct 17 05:57:30 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id CFE6DA179E9; Sat, 17 Oct 2015 05:57:30 +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 9A6C184C; Sat, 17 Oct 2015 05:57:30 +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 t9H5vTiA022770; Sat, 17 Oct 2015 05:57:29 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9H5vTth022769; Sat, 17 Oct 2015 05:57:29 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201510170557.t9H5vTth022769@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Sat, 17 Oct 2015 05:57:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289444 - 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 " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 17 Oct 2015 05:57:30 -0000 Author: bdrewery Date: Sat Oct 17 05:57:29 2015 New Revision: 289444 URL: https://svnweb.freebsd.org/changeset/base/289444 Log: For 'buildenvvars' show any .exported variables as well to cover recent exporting of OSRELDATE and VERSION. These already do export to 'buildenv' fine. Sponsored by: EMC / Isilon Storage Division Modified: head/Makefile.inc1 Modified: head/Makefile.inc1 ============================================================================== --- head/Makefile.inc1 Sat Oct 17 05:55:45 2015 (r289443) +++ head/Makefile.inc1 Sat Oct 17 05:57:29 2015 (r289444) @@ -747,7 +747,7 @@ buildworld_epilogue: # to quote multiword values. # buildenvvars: - @echo ${WMAKEENV:Q} + @echo ${WMAKEENV:Q} ${.MAKE.EXPORTED:@v@$v=\"${$v}\"@} .if ${.TARGETS:Mbuildenv} .if ${.MAKEFLAGS:M-j} From owner-svn-src-all@freebsd.org Sat Oct 17 07:32:48 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0ED73A176D2; Sat, 17 Oct 2015 07:32:48 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C0A8015FF; Sat, 17 Oct 2015 07:32:47 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t9H7WkuQ041756; Sat, 17 Oct 2015 07:32:46 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9H7Wkxh041754; Sat, 17 Oct 2015 07:32:46 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201510170732.t9H7Wkxh041754@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Sat, 17 Oct 2015 07:32:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289445 - in head: . sys/cddl/contrib/opensolaris/common/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 " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 17 Oct 2015 07:32:48 -0000 Author: mav Date: Sat Oct 17 07:32:46 2015 New Revision: 289445 URL: https://svnweb.freebsd.org/changeset/base/289445 Log: Fix ZFS ABI compat shims for `zfs receive` after r289362. Difference appeared much less drammatic then seemed originally. Modified: head/UPDATING head/sys/cddl/contrib/opensolaris/common/zfs/zfs_ioctl_compat.c Modified: head/UPDATING ============================================================================== --- head/UPDATING Sat Oct 17 05:57:29 2015 (r289444) +++ head/UPDATING Sat Oct 17 07:32:46 2015 (r289445) @@ -31,12 +31,6 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 11 disable the most expensive debugging functionality run "ln -s 'abort:false,junk:false' /etc/malloc.conf".) -20151015: - Added ZFS support for resumable send/receive changed respective - IOCTL API/ABI. Compatibility ABI shims were provided for other - functionality, while receive require version match between world - and kernel. - 20151012: If you specify SENDMAIL_MC or SENDMAIL_CF in make.conf, mergemaster and etcupdate will now use this file. A custom sendmail.cf is now Modified: head/sys/cddl/contrib/opensolaris/common/zfs/zfs_ioctl_compat.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/common/zfs/zfs_ioctl_compat.c Sat Oct 17 05:57:29 2015 (r289444) +++ head/sys/cddl/contrib/opensolaris/common/zfs/zfs_ioctl_compat.c Sat Oct 17 07:32:46 2015 (r289445) @@ -84,6 +84,7 @@ zfs_cmd_compat_get(zfs_cmd_t *zc, caddr_ ZCMD_COPY(zc_share); ZCMD_COPY(zc_jailid); ZCMD_COPY(zc_objset_stats); + zc->zc_begin_record.drr_u.drr_begin = edbp_c->zc_begin_record; ZCMD_COPY(zc_inject_record); ZCMD_COPY(zc_defer_destroy); ZCMD_COPY(zc_flags); @@ -126,6 +127,7 @@ zfs_cmd_compat_get(zfs_cmd_t *zc, caddr_ ZCMD_COPY(zc_share); ZCMD_COPY(zc_jailid); ZCMD_COPY(zc_objset_stats); + zc->zc_begin_record.drr_u.drr_begin = zcmd_c->zc_begin_record; ZCMD_COPY(zc_inject_record); /* boolean_t -> uint32_t */ @@ -168,6 +170,7 @@ zfs_cmd_compat_get(zfs_cmd_t *zc, caddr_ zc->zc_share = zcdm_c->zc_share; zc->zc_jailid = zcdm_c->zc_jailid; zc->zc_objset_stats = zcdm_c->zc_objset_stats; + zc->zc_begin_record.drr_u.drr_begin = zcdm_c->zc_begin_record; zc->zc_defer_destroy = zcdm_c->zc_defer_destroy; (void)zcdm_c->zc_temphold; zc->zc_action_handle = zcdm_c->zc_action_handle; @@ -211,6 +214,7 @@ zfs_cmd_compat_get(zfs_cmd_t *zc, caddr_ zc->zc_share = zc28_c->zc_share; zc->zc_jailid = zc28_c->zc_jailid; zc->zc_objset_stats = zc28_c->zc_objset_stats; + zc->zc_begin_record.drr_u.drr_begin = zc28_c->zc_begin_record; zc->zc_defer_destroy = zc28_c->zc_defer_destroy; (void)zc28_c->zc_temphold; zc->zc_action_handle = zc28_c->zc_action_handle; @@ -279,6 +283,7 @@ zfs_cmd_compat_get(zfs_cmd_t *zc, caddr_ zc->zc_share = zc_c->zc_share; zc->zc_jailid = zc_c->zc_jailid; zc->zc_objset_stats = zc_c->zc_objset_stats; + zc->zc_begin_record.drr_u.drr_begin = zc_c->zc_begin_record; /* zc->zc_inject_record */ zc->zc_inject_record.zi_objset = @@ -343,6 +348,7 @@ zfs_cmd_compat_put(zfs_cmd_t *zc, caddr_ ZCMD_COPY(zc_share); ZCMD_COPY(zc_jailid); ZCMD_COPY(zc_objset_stats); + edbp_c->zc_begin_record = zc->zc_begin_record.drr_u.drr_begin; ZCMD_COPY(zc_inject_record); ZCMD_COPY(zc_defer_destroy); ZCMD_COPY(zc_flags); @@ -384,6 +390,7 @@ zfs_cmd_compat_put(zfs_cmd_t *zc, caddr_ ZCMD_COPY(zc_share); ZCMD_COPY(zc_jailid); ZCMD_COPY(zc_objset_stats); + zcmd_c->zc_begin_record = zc->zc_begin_record.drr_u.drr_begin; ZCMD_COPY(zc_inject_record); /* boolean_t -> uint32_t */ @@ -425,6 +432,7 @@ zfs_cmd_compat_put(zfs_cmd_t *zc, caddr_ zcdm_c->zc_share = zc->zc_share; zcdm_c->zc_jailid = zc->zc_jailid; zcdm_c->zc_objset_stats = zc->zc_objset_stats; + zcdm_c->zc_begin_record = zc->zc_begin_record.drr_u.drr_begin; zcdm_c->zc_defer_destroy = zc->zc_defer_destroy; zcdm_c->zc_temphold = 0; zcdm_c->zc_action_handle = zc->zc_action_handle; @@ -469,6 +477,7 @@ zfs_cmd_compat_put(zfs_cmd_t *zc, caddr_ zc28_c->zc_share = zc->zc_share; zc28_c->zc_jailid = zc->zc_jailid; zc28_c->zc_objset_stats = zc->zc_objset_stats; + zc28_c->zc_begin_record = zc->zc_begin_record.drr_u.drr_begin; zc28_c->zc_defer_destroy = zc->zc_defer_destroy; zc28_c->zc_temphold = 0; zc28_c->zc_action_handle = zc->zc_action_handle; @@ -539,6 +548,7 @@ zfs_cmd_compat_put(zfs_cmd_t *zc, caddr_ zc_c->zc_share = zc->zc_share; zc_c->zc_jailid = zc->zc_jailid; zc_c->zc_objset_stats = zc->zc_objset_stats; + zc_c->zc_begin_record = zc->zc_begin_record.drr_u.drr_begin; /* zc_inject_record */ zc_c->zc_inject_record.zi_objset = From owner-svn-src-all@freebsd.org Sat Oct 17 07:35:06 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3FB83A17761; Sat, 17 Oct 2015 07:35:06 +0000 (UTC) (envelope-from mavbsd@gmail.com) Received: from mail-lf0-x22f.google.com (mail-lf0-x22f.google.com [IPv6:2a00:1450:4010:c07::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 BAA1B1961; Sat, 17 Oct 2015 07:35:05 +0000 (UTC) (envelope-from mavbsd@gmail.com) Received: by lfaz124 with SMTP id z124so88225787lfa.1; Sat, 17 Oct 2015 00:35:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:message-id:date:from:user-agent:mime-version:to:subject :references:in-reply-to:content-type:content-transfer-encoding; bh=2CYLHjXBu8sjrBrNxDi2icN55NCMxVSZOlhlA9NMei8=; b=yzR+5VZ/FO51n63AW5kqqYIJ//Ax9a32xyHMmp1wZ9ISas/3e700TpaoLAN58jlbPn n97sS6uVxdSYD0enRRrRkjxeCEIcUIpTvTcyS6hKwIU5j53FsaP/vK5Y7F+YnAu0w3T5 9TiQ5orCllJROI9sr87OucxK89Pqzw2OafoTE4hOi7L2chaxYQozDjftYGgfECZ7ENN0 yFUnarLNg7s0mLBv3JpvJOEah33BAMRlrhqogMrOlWrlJ/Pvj9jdCxylSJ0Oi3ZBMyE4 9CQw/b5BbN8qwXOsp6BpTU64WQa33vqhJZCNtK+1/aZhcVww1bGhoDPs9LmAEPmcuIfD unrQ== X-Received: by 10.25.18.39 with SMTP id h39mr6762905lfi.7.1445067302396; Sat, 17 Oct 2015 00:35:02 -0700 (PDT) Received: from mavbook.mavhome.dp.ua ([2a01:d0:c0a9:3:c685:8ff:fe11:1aa2]) by smtp.googlemail.com with ESMTPSA id i126sm3491495lfe.45.2015.10.17.00.35.00 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 17 Oct 2015 00:35:01 -0700 (PDT) Sender: Alexander Motin Message-ID: <5621FA23.4030202@FreeBSD.org> Date: Sat, 17 Oct 2015 10:34:59 +0300 From: Alexander Motin User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:31.0) Gecko/20100101 Thunderbird/31.6.0 MIME-Version: 1.0 To: Bryan Drewery , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r289415 - in head: . sys/sys References: <201510160857.t9G8vBUV051731@repo.freebsd.org> <56213F23.7000909@FreeBSD.org> <5621413C.1090904@FreeBSD.org> In-Reply-To: <5621413C.1090904@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 " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 17 Oct 2015 07:35:06 -0000 On 16.10.2015 21:26, Alexander Motin wrote: > On 16.10.2015 21:17, Bryan Drewery wrote: >> On 10/16/2015 1:57 AM, Alexander Motin wrote: >>> Author: mav >>> Date: Fri Oct 16 08:57:11 2015 >>> New Revision: 289415 >>> URL: https://svnweb.freebsd.org/changeset/base/289415 >>> >>> Log: >>> Bump version and add notice about incompatibility introduced by resumable >>> send/receive support in ZFS. >>> >>> Modified: >>> head/UPDATING >>> head/sys/sys/param.h >>> >>> Modified: head/UPDATING >>> ============================================================================== >>> --- head/UPDATING Fri Oct 16 08:22:21 2015 (r289414) >>> +++ head/UPDATING Fri Oct 16 08:57:11 2015 (r289415) >>> @@ -31,6 +31,12 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 11 >>> disable the most expensive debugging functionality run >>> "ln -s 'abort:false,junk:false' /etc/malloc.conf".) >>> >>> +20151015: >>> + Added ZFS support for resumable send/receive changed respective >>> + IOCTL API/ABI. Compatibility ABI shims were provided for other >>> + functionality, while receive require version match between world >>> + and kernel. >> >> This means for example that 'zfs recv' in a 10.2 jail running on a 11.0 >> kernel will not work? Can compatibility be added for it? > > The structures passed as argument for receive are large and completely > different. Unfortunately I don't know enough about that code to say > whether new one can be forged from the old one. I'll take another look, > but can not promise anything. My first thought I was wrong. r289445 should fix compatibility. -- Alexander Motin From owner-svn-src-all@freebsd.org Sat Oct 17 07:46:19 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id ACA51A17910; Sat, 17 Oct 2015 07:46:19 +0000 (UTC) (envelope-from delphij@delphij.net) Received: from anubis.delphij.net (anubis.delphij.net [64.62.153.212]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "anubis.delphij.net", Issuer "StartCom Class 1 Primary Intermediate Server CA" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 516CE1DFC; Sat, 17 Oct 2015 07:46:19 +0000 (UTC) (envelope-from delphij@delphij.net) Received: from Xins-MBP.home.us.delphij.net (unknown [IPv6:2601:646:8f00:8a91:c013:52ad:f5a8:b22e]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by anubis.delphij.net (Postfix) with ESMTPSA id BEDD12A248; Sat, 17 Oct 2015 00:46:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=delphij.net; s=anubis; t=1445067978; x=1445082378; bh=XkDjXV8HU+LFfsikmqjShTxOAd9pbiLORHAXOYlA57I=; h=Subject:To:References:From:Date:In-Reply-To; b=XD0TMgvO2YLkf2t1nNsGiCPsVzcmUcp9VD00L4GwJorCEDpqK4fo1HSNMD56zzdAL BS0K4pFyPSUr+91cTQgY2WTJnEF3nvM2u5/nPzjz+JHZDF0vJ9A9qcVI1eFl9Q0SVf GADPKcEuyail4s+qxSWUyZ5YqP/W27aelTNaC9YQ= Subject: Re: svn commit: r289445 - in head: . sys/cddl/contrib/opensolaris/common/zfs To: Alexander Motin , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201510170732.t9H7Wkxh041754@repo.freebsd.org> From: Xin Li Message-ID: <5621FCC6.7020303@delphij.net> Date: Sat, 17 Oct 2015 00:46:14 -0700 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.11; rv:38.0) Gecko/20100101 Thunderbird/38.3.0 MIME-Version: 1.0 In-Reply-To: <201510170732.t9H7Wkxh041754@repo.freebsd.org> Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="fBbieaL3MdNRNTFRH02vr0QWFujSXwDkn" X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 17 Oct 2015 07:46:19 -0000 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --fBbieaL3MdNRNTFRH02vr0QWFujSXwDkn Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 10/17/15 00:32, Alexander Motin wrote: > Author: mav > Date: Sat Oct 17 07:32:46 2015 > New Revision: 289445 > URL: https://svnweb.freebsd.org/changeset/base/289445 >=20 > Log: > Fix ZFS ABI compat shims for `zfs receive` after r289362. > =20 > Difference appeared much less drammatic then seemed originally. Thanks! Cheers, --fBbieaL3MdNRNTFRH02vr0QWFujSXwDkn Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- iQIcBAEBCgAGBQJWIfzKAAoJEJW2GBstM+nsz3wP/RCScSRU16k0j8+HOReFj+Ho lqrp6A/ydEmHPPFGO4VR4P2FUFM8m/1D/K3iNCuVQ8Muhe2uRJZ5jf741NPw3+R5 PNn2/kQMBiMdyQmZsKQnk5/r9rb3sNLEUADhkjNiZrhVK9LQyiQN3cj8iEzopkCs aT/UB3QVo1pSoVAmdonoCXj/986fjmiCRgq77qQYLXMKgsWl+yiK1rWYUUef7ENY nn7wXu6cZUx2TAjX7WKywnsiXGQK/up+kM2xyZI+sqEiZlqhMD4r+lo5s3KSrSKo GBQISISPGTSDUerAWwyD4mPtOQaFqgv/xLzgPHfAwF9eypzkL5Oiu8e3h5D1lpuu 2Un1yVkp6+7R6XDGMFa5x40FF4IOG7s7KOPJc48dDaRDuzKHZcZGSCg+WWMjAEPK YbFbB+lsdMi8dNL2J90AUM7qYQzTC8n7rEXzCKXY0gmIoney39fhOrKUNdL5U5J7 72kAx6RGcrENY3zkA24uifWq8OytuLXnOcZbgX9i/3xovsbBZCvRf2bYF2n0clHv cWx+YIoYE82+qNncuc5WFCt0CCMCpZQMLt2VP5GybZVU/HWHYIvh2VuL0g3eeUxc mk3vFOIRCBdjEqjA36JUCI+RygG+RqWkLeVe0msjZ4kmck1/BKzzxbyDLNc5WC+f h1S2C9N31HjbTpQyGOSM =oSMY -----END PGP SIGNATURE----- --fBbieaL3MdNRNTFRH02vr0QWFujSXwDkn-- From owner-svn-src-all@freebsd.org Sat Oct 17 08:39:38 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id F16EDA1359D; Sat, 17 Oct 2015 08:39:38 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9D54F10E6; Sat, 17 Oct 2015 08:39:38 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t9H8dbM5057329; Sat, 17 Oct 2015 08:39:37 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9H8dbVB057326; Sat, 17 Oct 2015 08:39:37 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201510170839.t9H8dbVB057326@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Sat, 17 Oct 2015 08:39:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289446 - in head: etc/mtree tests/sys tests/sys/acl tools/regression/acltools X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 17 Oct 2015 08:39:39 -0000 Author: ngie Date: Sat Oct 17 08:39:37 2015 New Revision: 289446 URL: https://svnweb.freebsd.org/changeset/base/289446 Log: Integrate tools/regression/acltools into the FreeBSD test suite as tests/sys/acl - Make the requirements more complete for the testcases - Detect prerequisites so the tests won't fail (zfs.ko is loaded, zpool(1) is available, ACL support is enabled with UFS, etc). - Work with temporary files/directories/mountpoints that work with atf/kyua - Limit the testcases to work on temporary filesystems to reduce tainting the test host MFC after: 2 weeks Reviewed by: trasz (earlier version) Differential Revision: https://reviews.freebsd.org/D3810 Added: head/tests/sys/acl/ - copied from r289236, user/ngie/more-tests2/tests/sys/acl/ head/tests/sys/acl/Makefile - copied unchanged from r289325, user/ngie/more-tests2/tests/sys/acl/Makefile Deleted: head/tools/regression/acltools/ Modified: head/etc/mtree/BSD.tests.dist head/tests/sys/Makefile Directory Properties: head/ (props changed) Modified: head/etc/mtree/BSD.tests.dist ============================================================================== --- head/etc/mtree/BSD.tests.dist Sat Oct 17 07:32:46 2015 (r289445) +++ head/etc/mtree/BSD.tests.dist Sat Oct 17 08:39:37 2015 (r289446) @@ -360,6 +360,8 @@ .. .. sys + acl + .. aio .. fifo Modified: head/tests/sys/Makefile ============================================================================== --- head/tests/sys/Makefile Sat Oct 17 07:32:46 2015 (r289445) +++ head/tests/sys/Makefile Sat Oct 17 08:39:37 2015 (r289446) @@ -4,6 +4,7 @@ TESTSDIR= ${TESTSBASE}/sys +TESTS_SUBDIRS+= acl TESTS_SUBDIRS+= aio TESTS_SUBDIRS+= fifo TESTS_SUBDIRS+= file Copied: head/tests/sys/acl/Makefile (from r289325, user/ngie/more-tests2/tests/sys/acl/Makefile) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tests/sys/acl/Makefile Sat Oct 17 08:39:37 2015 (r289446, copy of r289325, user/ngie/more-tests2/tests/sys/acl/Makefile) @@ -0,0 +1,29 @@ +# $FreeBSD$ + +TESTSDIR= ${TESTSBASE}/sys/acl + +BINDIR= ${TESTSDIR} + +FILES+= tools-crossfs.test +FILES+= tools-nfs4.test +FILES+= tools-nfs4-psarc.test +FILES+= tools-nfs4-trivial.test +FILES+= tools-posix.test + +SCRIPTS+= run + +TAP_TESTS_SH+= 00 +TAP_TESTS_SH+= 01 +TAP_TESTS_SH+= 02 +TAP_TESTS_SH+= 03 +TAP_TESTS_SH+= 04 + +.for t in ${TAP_TESTS_SH} +TEST_METADATA.$t+= required_user="root" +.endfor + +.for t in 01 03 04 +TEST_METADATA.$t+= required_programs="/sbin/zpool" +.endfor + +.include From owner-svn-src-all@freebsd.org Sat Oct 17 08:51:11 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9BEFEA1397E; Sat, 17 Oct 2015 08:51:11 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4962619D3; Sat, 17 Oct 2015 08:51:11 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t9H8pAUC061053; Sat, 17 Oct 2015 08:51:10 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9H8pAd4061051; Sat, 17 Oct 2015 08:51:10 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201510170851.t9H8pAd4061051@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Sat, 17 Oct 2015 08:51:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289449 - in head: sbin/mount 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 " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 17 Oct 2015 08:51:11 -0000 Author: ngie Date: Sat Oct 17 08:51:10 2015 New Revision: 289449 URL: https://svnweb.freebsd.org/changeset/base/289449 Log: Replace /dev/acd0 with /dev/cd1 atapicd(4) has been removed since r249083, and if a system has more than one optical drive, it will likely be /dev/cd1 Update mount.conf(8) to reflect the change in behavior MFC after: never Sponsored by: EMC / Isilon Storage Division Modified: head/sbin/mount/mount.conf.8 head/sys/kern/vfs_mountroot.c Modified: head/sbin/mount/mount.conf.8 ============================================================================== --- head/sbin/mount/mount.conf.8 Sat Oct 17 08:43:25 2015 (r289448) +++ head/sbin/mount/mount.conf.8 Sat Oct 17 08:51:10 2015 (r289449) @@ -26,7 +26,7 @@ .\" $FreeBSD$ .\" .\" -.Dd July 7, 2013 +.Dd October 17, 2013 .Dt MOUNT.CONF 8 .Os .Sh NAME @@ -154,7 +154,7 @@ will direct the kernel to try mounting t first as an ISO CD9660 file system on .Pa /dev/cd0 , then if that does not work, as an ISO CD9660 file system on -.Pa /dev/acd0 , +.Pa /dev/cd1 , and then if that does not work, as a UFS file system on .Pa /dev/ada0s1a . If that does not work, a @@ -167,7 +167,7 @@ Finally if that does not work, the kerne .Li .timeout 3 cd9660:/dev/cd0 ro .Li .timeout 0 -cd9660:/dev/acd0 ro +cd9660:/dev/cd1 ro .Li .timeout 3 ufs:/dev/ada0s1a .Li .ask Modified: head/sys/kern/vfs_mountroot.c ============================================================================== --- head/sys/kern/vfs_mountroot.c Sat Oct 17 08:43:25 2015 (r289448) +++ head/sys/kern/vfs_mountroot.c Sat Oct 17 08:51:10 2015 (r289449) @@ -468,9 +468,9 @@ parse_dir_ask(char **conf) printf("\n"); printf(" eg. ufs:/dev/da0s1a\n"); printf(" zfs:tank\n"); - printf(" cd9660:/dev/acd0 ro\n"); + printf(" cd9660:/dev/cd0 ro\n"); printf(" (which is equivalent to: "); - printf("mount -t cd9660 -o ro /dev/acd0 /)\n"); + printf("mount -t cd9660 -o ro /dev/cd0 /)\n"); printf("\n"); printf(" ? List valid disk boot devices\n"); printf(" . Yield 1 second (for background tasks)\n"); @@ -837,7 +837,7 @@ vfs_mountroot_conf0(struct sbuf *sb) if (boothowto & RB_CDROM) { sbuf_printf(sb, "cd9660:/dev/cd0 ro\n"); sbuf_printf(sb, ".timeout 0\n"); - sbuf_printf(sb, "cd9660:/dev/acd0 ro\n"); + sbuf_printf(sb, "cd9660:/dev/cd1 ro\n"); sbuf_printf(sb, ".timeout %d\n", root_mount_timeout); } s = kern_getenv("vfs.root.mountfrom"); From owner-svn-src-all@freebsd.org Sat Oct 17 09:07:55 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4008CA151B5; Sat, 17 Oct 2015 09:07:55 +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 0E4CD1F23; Sat, 17 Oct 2015 09:07:54 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t9H97sD7066103; Sat, 17 Oct 2015 09:07:54 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9H97sgF066102; Sat, 17 Oct 2015 09:07:54 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201510170907.t9H97sgF066102@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Sat, 17 Oct 2015 09:07:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289450 - head/lib/libcam X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 17 Oct 2015 09:07:55 -0000 Author: ngie Date: Sat Oct 17 09:07:53 2015 New Revision: 289450 URL: https://svnweb.freebsd.org/changeset/base/289450 Log: Set dev->fd to -1 when calling cam_close_spec_device with a valid dev->fd descriptor to avoid trashing valid file descriptors that access dev->fd at a later point in time PR: 192671 Submitted by: Scott Ferris MFC after: 1 week Sponsored by: EMC / Isilon Storage Division Modified: head/lib/libcam/camlib.c Modified: head/lib/libcam/camlib.c ============================================================================== --- head/lib/libcam/camlib.c Sat Oct 17 08:51:10 2015 (r289449) +++ head/lib/libcam/camlib.c Sat Oct 17 09:07:53 2015 (r289450) @@ -676,8 +676,10 @@ cam_close_spec_device(struct cam_device if (dev == NULL) return; - if (dev->fd >= 0) + if (dev->fd >= 0) { close(dev->fd); + dev->fd = -1; + } } char * From owner-svn-src-all@freebsd.org Sat Oct 17 09:12:56 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id AF724A15422; Sat, 17 Oct 2015 09:12:56 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: from mail-pa0-x230.google.com (mail-pa0-x230.google.com [IPv6:2607:f8b0:400e:c03::230]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 8020339C; Sat, 17 Oct 2015 09:12:56 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: by payp3 with SMTP id p3so11848159pay.2; Sat, 17 Oct 2015 02:12:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=content-type:mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=GCANfHpF3m+HjdQmvVwxj4KA8VysWaCsg7TOyc1fu1g=; b=gH3mNfm2zJND7RdWkBpXd2mbEdJDE5OmQLETwebmgLhtiBX5ByG8bq9vSPwaiYy3K1 aYm2OEKbRa+uHtMMYJoHW/YZlUAyS2LTLsUiIrXGnwBqM6fHR/yw5nHyYBaNkrdxyqF7 +wY1YqODaToYAp51kGHhMWSacsGVKWYpTBoxi3os6EbQqAiuyq7ILS24yvX2/K+/5AG9 SwKp2xodAPcmDWkcrcQSmhINMoDErL2YmSXp1Vp9sIPUTqWbVtVnJLoFC7pxKDN48kQD kbVup5mBxFKdWcZ0mG6tP5xqUTc3qodah4vIC0T4Wq4LkYEVWqkCiYH2rIYPKfi3gYxK CMMQ== X-Received: by 10.68.143.4 with SMTP id sa4mr21631749pbb.111.1445073176183; Sat, 17 Oct 2015 02:12:56 -0700 (PDT) Received: from ?IPv6:2601:601:800:126d:50a2:a8c0:9eec:851c? ([2601:601:800:126d:50a2:a8c0:9eec:851c]) by smtp.gmail.com with ESMTPSA id kw10sm25482275pbc.25.2015.10.17.02.12.55 (version=TLSv1/SSLv3 cipher=OTHER); Sat, 17 Oct 2015 02:12:55 -0700 (PDT) Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 8.2 \(2104\)) Subject: Re: svn commit: r289450 - head/lib/libcam From: NGie Cooper In-Reply-To: <201510170907.t9H97sgF066102@repo.freebsd.org> Date: Sat, 17 Oct 2015 02:12:55 -0700 Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Transfer-Encoding: quoted-printable Message-Id: <70C8FD63-73D9-4DE0-9FA4-DE928225F479@gmail.com> References: <201510170907.t9H97sgF066102@repo.freebsd.org> To: Garrett Cooper 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 " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 17 Oct 2015 09:12:56 -0000 > On Oct 17, 2015, at 02:07, Garrett Cooper wrote: >=20 > Author: ngie > Date: Sat Oct 17 09:07:53 2015 > New Revision: 289450 > URL: https://svnweb.freebsd.org/changeset/base/289450 >=20 > Log: > Set dev->fd to -1 when calling cam_close_spec_device with a valid = dev->fd > descriptor to avoid trashing valid file descriptors that access = dev->fd at a > later point in time That wasn=E2=80=99t a good description =E2=80=94 sorry :(. The cam_close_spec_device API doesn=E2=80=99t free `struct cam_device = *dev` by design, so something could reuse the structure, or call close = on dev->fd (out of band), which could trash valid file descriptor(s) by = accident. Thanks! -NGie= From owner-svn-src-all@freebsd.org Sat Oct 17 09:26:17 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6F91EA157E4; Sat, 17 Oct 2015 09:26:17 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 324BAA41; Sat, 17 Oct 2015 09:26: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 t9H9QGfC071821; Sat, 17 Oct 2015 09:26:16 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9H9QGPb071820; Sat, 17 Oct 2015 09:26:16 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201510170926.t9H9QGPb071820@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Sat, 17 Oct 2015 09:26:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289451 - head/share/zoneinfo X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 17 Oct 2015 09:26:17 -0000 Author: ngie Date: Sat Oct 17 09:26:16 2015 New Revision: 289451 URL: https://svnweb.freebsd.org/changeset/base/289451 Log: Install share/zoneinfo in a deterministic way by sorting the results from find This helps produce deterministic METALOG output PR: 200674 Submitted by: Fabian Keil Reviewed by: emaste MFC after: 1 week Obtained from: ElectroBSD Modified: head/share/zoneinfo/Makefile Modified: head/share/zoneinfo/Makefile ============================================================================== --- head/share/zoneinfo/Makefile Sat Oct 17 09:07:53 2015 (r289450) +++ head/share/zoneinfo/Makefile Sat Oct 17 09:26:16 2015 (r289451) @@ -79,7 +79,7 @@ zoneinfo: yearistype ${TDATA} beforeinstall: cd ${TZBUILDDIR} && \ - find * -type f -print -exec ${INSTALL} \ + find -s * -type f -print -exec ${INSTALL} \ -o ${BINOWN} -g ${BINGRP} -m ${NOBINMODE} \ \{} ${DESTDIR}/usr/share/zoneinfo/\{} \; ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m ${NOBINMODE} \ From owner-svn-src-all@freebsd.org Sat Oct 17 13:00:36 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 18BB0A17133; Sat, 17 Oct 2015 13:00:36 +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 D6486F4; Sat, 17 Oct 2015 13:00:35 +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 t9HD0YIk032950; Sat, 17 Oct 2015 13:00:34 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9HD0YTg032949; Sat, 17 Oct 2015 13:00:34 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201510171300.t9HD0YTg032949@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Sat, 17 Oct 2015 13:00:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289452 - head/rescue/rescue X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 17 Oct 2015 13:00:36 -0000 Author: trasz Date: Sat Oct 17 13:00:34 2015 New Revision: 289452 URL: https://svnweb.freebsd.org/changeset/base/289452 Log: Add iscsictl(8) and iscsid(8) to rescue(8). The point is to make it easier to build md_root images from rescue(8), to use with iSCSI boot. The change increases the size of rescue by 62kB, from 8728kB to 8790kB. Reviewed by: bapt@ MFC after: 1 month Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D3865 Modified: head/rescue/rescue/Makefile Modified: head/rescue/rescue/Makefile ============================================================================== --- head/rescue/rescue/Makefile Sat Oct 17 09:26:16 2015 (r289451) +++ head/rescue/rescue/Makefile Sat Oct 17 13:00:34 2015 (r289452) @@ -179,7 +179,7 @@ CRUNCH_BUILDOPTS_dhclient= -DRELEASE_CRU # CRUNCH_SRCDIRS+= usr.bin -CRUNCH_PROGS_usr.bin= head mt nc sed tail tee +CRUNCH_PROGS_usr.bin= head iscsictl mt nc sed tail tee CRUNCH_PROGS_usr.bin+= gzip CRUNCH_ALIAS_gzip= gunzip gzcat zcat @@ -214,7 +214,7 @@ CRUNCH_ALIAS_id= groups whoami # CRUNCH_SRCDIRS+= usr.sbin -CRUNCH_PROGS_usr.sbin+= chroot +CRUNCH_PROGS_usr.sbin+= chroot iscsid CRUNCH_PROGS_usr.sbin+= chown CRUNCH_ALIAS_chown= chgrp From owner-svn-src-all@freebsd.org Sat Oct 17 13:06:53 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9F66BA1741B; Sat, 17 Oct 2015 13:06:53 +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 5CFA17E9; Sat, 17 Oct 2015 13:06:53 +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 t9HD6quc035706; Sat, 17 Oct 2015 13:06:52 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9HD6qAt035704; Sat, 17 Oct 2015 13:06:52 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201510171306.t9HD6qAt035704@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Sat, 17 Oct 2015 13:06:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289453 - head/usr.bin/iscsictl X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 17 Oct 2015 13:06:53 -0000 Author: trasz Date: Sat Oct 17 13:06:52 2015 New Revision: 289453 URL: https://svnweb.freebsd.org/changeset/base/289453 Log: Add -w flag to iscsictl(8) utility, to make it wait for successfull session establishment. Scripting is kind of hard without it. Reviewed by: mav@ MFC after: 1 month Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D3872 Modified: head/usr.bin/iscsictl/iscsictl.8 head/usr.bin/iscsictl/iscsictl.c Modified: head/usr.bin/iscsictl/iscsictl.8 ============================================================================== --- head/usr.bin/iscsictl/iscsictl.8 Sat Oct 17 13:00:34 2015 (r289452) +++ head/usr.bin/iscsictl/iscsictl.8 Sat Oct 17 13:06:52 2015 (r289453) @@ -27,7 +27,7 @@ .\" .\" $FreeBSD$ .\" -.Dd September 12, 2014 +.Dd October 17, 2015 .Dt ISCSICTL 8 .Os .Sh NAME @@ -36,7 +36,9 @@ .Sh SYNOPSIS .Nm .Fl A -.Fl p Ar portal Fl t Ar target Op Fl u Ar user Fl s Ar secret +.Fl p Ar portal Fl t Ar target +.Op Fl u Ar user Fl s Ar secret +.Op Fl w Ar timeout .Nm .Fl A .Fl d Ar discovery-host Op Fl u Ar user Fl s Ar secret @@ -70,6 +72,7 @@ .Nm .Fl L .Op Fl v +.Op Fl w Ar timeout .Sh DESCRIPTION The .Nm @@ -113,6 +116,10 @@ Target name. CHAP login. .It Fl v Verbose mode. +.It Fl w +Instead of returning immediately, wait up to +.Ar timeout +seconds until all configured sessions are successfully established. .El .Pp Certain parameters are necessary when adding a session. @@ -132,9 +139,11 @@ via configuration file. .Pp Since connecting to the target is performed in background, non-zero exit status does not mean that the session was successfully established. -Use +Use either .Nm Fl L -to check the connection status. +to check the connection status, or the +.Fl w +flag to wait for session establishment. .Pp Note that in order for the iSCSI initiator to be able to connect to a target, the Modified: head/usr.bin/iscsictl/iscsictl.c ============================================================================== --- head/usr.bin/iscsictl/iscsictl.c Sat Oct 17 13:00:34 2015 (r289452) +++ head/usr.bin/iscsictl/iscsictl.c Sat Oct 17 13:06:52 2015 (r289453) @@ -592,12 +592,70 @@ kernel_list(int iscsi_fd, const struct t return (0); } +static int +kernel_wait(int iscsi_fd, int timeout) +{ + struct iscsi_session_state *states = NULL; + const struct iscsi_session_state *state; + const struct iscsi_session_conf *conf; + struct iscsi_session_list isl; + unsigned int i, nentries = 1; + bool all_connected; + int error; + + for (;;) { + for (;;) { + states = realloc(states, + nentries * sizeof(struct iscsi_session_state)); + if (states == NULL) + xo_err(1, "realloc"); + + memset(&isl, 0, sizeof(isl)); + isl.isl_nentries = nentries; + isl.isl_pstates = states; + + error = ioctl(iscsi_fd, ISCSISLIST, &isl); + if (error != 0 && errno == EMSGSIZE) { + nentries *= 4; + continue; + } + break; + } + if (error != 0) { + xo_warn("ISCSISLIST"); + return (error); + } + + all_connected = true; + for (i = 0; i < isl.isl_nentries; i++) { + state = &states[i]; + conf = &state->iss_conf; + + if (!state->iss_connected) { + all_connected = false; + break; + } + } + + if (all_connected) + return (0); + + sleep(1); + + if (timeout > 0) { + timeout--; + if (timeout == 0) + return (1); + } + } +} + static void usage(void) { fprintf(stderr, "usage: iscsictl -A -p portal -t target " - "[-u user -s secret]\n"); + "[-u user -s secret] [-w timeout]\n"); fprintf(stderr, " iscsictl -A -d discovery-host " "[-u user -s secret]\n"); fprintf(stderr, " iscsictl -A -a [-c path]\n"); @@ -609,7 +667,7 @@ usage(void) fprintf(stderr, " iscsictl -R [-p portal] [-t target]\n"); fprintf(stderr, " iscsictl -R -a\n"); fprintf(stderr, " iscsictl -R -n nickname [-c path]\n"); - fprintf(stderr, " iscsictl -L [-v]\n"); + fprintf(stderr, " iscsictl -L [-v] [-w timeout]\n"); exit(1); } @@ -631,6 +689,7 @@ main(int argc, char **argv) const char *conf_path = DEFAULT_CONFIG_PATH; char *nickname = NULL, *discovery_host = NULL, *portal = NULL, *target = NULL, *user = NULL, *secret = NULL; + int timeout = -1; long long session_id = -1; char *end; int ch, error, iscsi_fd, retval, saved_errno; @@ -641,7 +700,7 @@ main(int argc, char **argv) argc = xo_parse_args(argc, argv); xo_open_container("iscsictl"); - while ((ch = getopt(argc, argv, "AMRLac:d:i:n:p:t:u:s:v")) != -1) { + while ((ch = getopt(argc, argv, "AMRLac:d:i:n:p:t:u:s:vw:")) != -1) { switch (ch) { case 'A': Aflag = 1; @@ -692,6 +751,13 @@ main(int argc, char **argv) case 'v': vflag = 1; break; + case 'w': + timeout = strtol(optarg, &end, 10); + if ((size_t)(end - optarg) != strlen(optarg)) + xo_errx(1, "trailing characters after timeout"); + if (timeout < 0) + xo_errx(1, "timeout cannot be negative"); + break; case '?': default: usage(); @@ -782,6 +848,8 @@ main(int argc, char **argv) if (vflag != 0) xo_errx(1, "-v cannot be used with -M"); + if (timeout != -1) + xo_errx(1, "-w cannot be used with -M"); } else if (Rflag != 0) { if (user != NULL) @@ -811,6 +879,8 @@ main(int argc, char **argv) xo_errx(1, "-i cannot be used with -R"); if (vflag != 0) xo_errx(1, "-v cannot be used with -R"); + if (timeout != -1) + xo_errx(1, "-w cannot be used with -R"); } else { assert(Lflag != 0); @@ -896,6 +966,9 @@ main(int argc, char **argv) failed += kernel_list(iscsi_fd, targ, vflag); } + if (timeout != -1) + failed += kernel_wait(iscsi_fd, timeout); + error = close(iscsi_fd); if (error != 0) xo_err(1, "close"); From owner-svn-src-all@freebsd.org Sat Oct 17 13:09:15 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B63E6A174FE; Sat, 17 Oct 2015 13:09:15 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4336DA20; Sat, 17 Oct 2015 13:09:15 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from tom.home (kostik@localhost [127.0.0.1]) by kib.kiev.ua (8.15.2/8.15.2) with ESMTPS id t9HD97tm027477 (version=TLSv1 cipher=DHE-RSA-CAMELLIA256-SHA bits=256 verify=NO); Sat, 17 Oct 2015 16:09:07 +0300 (EEST) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.10.3 kib.kiev.ua t9HD97tm027477 Received: (from kostik@localhost) by tom.home (8.15.2/8.15.2/Submit) id t9HD97um027476; Sat, 17 Oct 2015 16:09:07 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Sat, 17 Oct 2015 16:09:07 +0300 From: Konstantin Belousov To: Bruce Evans Cc: Garrett Cooper , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r289332 - head/tools/regression/lib/msun Message-ID: <20151017130907.GZ2257@kib.kiev.ua> References: <201510142022.t9EKMC1C088993@repo.freebsd.org> <20151015072039.GY2257@kib.kiev.ua> <20151015200157.I2174@besplex.bde.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20151015200157.I2174@besplex.bde.org> User-Agent: Mutt/1.5.24 (2015-08-30) X-Spam-Status: No, score=-2.0 required=5.0 tests=ALL_TRUSTED,BAYES_00, DKIM_ADSP_CUSTOM_MED,FREEMAIL_FROM,NML_ADSP_CUSTOM_MED autolearn=no autolearn_force=no version=3.4.1 X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on tom.home X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 17 Oct 2015 13:09:15 -0000 On Thu, Oct 15, 2015 at 10:12:03PM +1100, Bruce Evans wrote: > On Thu, 15 Oct 2015, Konstantin Belousov wrote: > > > On Wed, Oct 14, 2015 at 08:22:12PM +0000, Garrett Cooper wrote: > >> Author: ngie > >> Date: Wed Oct 14 20:22:12 2015 > >> New Revision: 289332 > >> URL: https://svnweb.freebsd.org/changeset/base/289332 > >> > >> Log: > >> Fix test-fenv:test_dfl_env when run on some amd64 CPUs > >> > >> Compare the fields that the AMD [1] and Intel [2] specs say will be > >> set once fnstenv returns. > >> > >> Not all amd64 capable processors zero out the env.__x87.__other field > >> (example: AMD Opteron 6308). The AMD64/x64 specs aren't explicit on what the > >> env.__x87.__other field will contain after fnstenv is executed, so the values > >> in env.__x87.__other could be filled with arbitrary data depending on how the > >> CPU-specific implementation of fnstenv. > > No Intel or AMD CPU write to __other field at all. > > No, they all do. > > Test on old i386 on old A64: > > Initial state for fegetenv(): > X 00000000 7F 12 00 00 00 00 80 1F FF FF FF FF 52 3F 67 C0 > --cw- -mxhi --sw- -mxlo --tw- -pad- ----fip---- > ----------------- > X 00000010 08 00 05 01 48 5F 74 C0 10 00 FF FF > -fcs- -opc- ----foff--- -fds- -pad- > ----other[16]---------------------- > > This always fails the test: > cw: passes > mxhi: passes > sw: passes > pad+tw: passes > fip: always fails. The test wants 0, but the value is always the kernel > eip for the instruction that is used to avoid the security hole. > (The A64 CPU gives the security hole, and the kernel code is > pessimal so it apparently runs always on the first use of the > NPX by a thread.) > fcs: always fails. The test wants 0, but the value is always the kernel > cs, as above. > opc: always fails. The value is the opcode for the kernel instruction > foff: always fails. The value is the data address for the kernel instruction > fds: always fails. The value is the kernel ds extended by padding with 1's > > Modified state for fxsave: > X 0000001C 7F 12 00 38 80 00 F0 3F EE EE EE EE EE EE EE EE > X 0000002C EE EE EE EE EE EE EE EE 80 1F 00 00 FF FF 00 00 > > Partial result of an fxsave instruction after fld1; fstl in the test > program to try to change the kernel data. A byte value of EE indicates > that the byte was written by memset() and not overwritten by fxsave. > There are 16 such bytes. These correspond to __other[16]. You are > probably thinking of fxsave not writing these, but fegetenv() doesn't > use fxsave and always writes these. I think fxsave on all Intel CPUs > write these (freefall's Xeon does), and all AMD CPUs write these after > an error. No, I did not thought about fegetenv() as executing FXSAVE instruction. I did knew that fegetenv() is a wrapper around FNSAVE, and I was completely sure that FNSAVE in the long mode, when executed by a 64bit program, never writes anything into the %eip/data offset portion of the FNSAVE area. I suspect that this was motivated by unavoidable 32-bitness of the store format. I was unable to find a reference in either Intel SDM or in AMD APM which would support my statement. The closest thing is the claim that the FOP field is not filled, in the SDM. Still, I wonder how things are really arranged by hardware for FNSAVE in 64bit mode. Are your experiments below were done for the 32bit programs, or for 64bit ? Both FXSAVE and XSAVE area formats and rules would be irrelevant for the FreeBSD ABI. > > The format is slightly different. All the other values seem to be the > same as for fegetenv(). > > Modified state for fegetenv(): > X 0000005C 7F 12 00 00 00 00 80 1F FF FF FF FF 63 82 04 08 > --cw- -mxhi --sw- -mxlo --tw- -pad- ----fip---- > ----------------- > X 0000006C 1F 00 1D 05 A0 92 04 08 2F 00 FF FF > -fcs- -opc- ----foff--- -fds- -pad- > ----other[16]---------------------- > > This is from the same state as the fxsave. It has the following > modifications relative to the initial state: > - all kernel data changed to user addresses, as intended > > Modified state for fnsave: > X 0000003C 7F 12 FF FF 00 00 FF FF FF FF FF FF 63 82 04 08 > X 0000004C 1F 00 1D 05 A0 92 04 08 2F 00 FF FF > > This is from the same state as the fxsave. It has the same format > and values as the state saved by fegetenv() except 2 padding > fields are padded with 1's and not repurposed for mxcsr. > > Modified state for fnstenv: > X 00000078 7F 12 FF FF 00 00 FF FF FF FF FF FF 63 82 04 08 > X 00000088 1F 00 1D 05 A0 92 04 08 2F 00 FF FF EE EE EE EE > > This is from the same state as the fxsave. It has the same format > and values as the state saved by fnsave. > > So last instruction/data values are always in fenv_t on i386. They > are undocumented, but might be used. On amd64 in 64-bit mode, they > don't fit in the hardware format used by fnstenv. fenv_t extends > this format only to append mxcsr. amd64 should have used the env > part of the better-designed 64-bit fxsave format. > > Test on -current amd64 on Xeon (freefall): > > early fegetenv(): > X 00000000 7f 03 ff ff 00 00 ff ff ff ff ff ff 00 00 00 00 > --cw- -pad- --sw- -pad- --tw- -pad- ----------- > X 00000010 00 00 00 00 00 00 00 00 00 00 ff ff 80 1f 00 00 > ---other[16]------------------------ ---mxcsr--- > > The test passes. The 2 bytes at the end of other[20] are reserved > and not part of the last instruction/data. They are padded normally > with 1's and not with 0's. The default env hard-codes the assumption > that these reserved bits are 1's. > > Since Xeons are not AMD CPUs, the kernel doesn't execute the code that > closes the security hole and all the last instruction/data values are > 0. These values are written. > > later fxsave: > X 00000020 7f 03 00 00 00 00 1c 05 75 08 40 00 43 00 00 00 > --cw- --sw- tw 00 -opc- ----fip---- ----fcs---- > X 00000030 20 62 60 00 3b 00 00 00 80 1f 00 00 ff ff 00 00 > ----fdp---- ----fds---- ---mxcsr--- -mxcsrmask- > > fxsave always stores the last instruction/data values on Intel CPUs. > They have the nonzero user values. The format is the 64-bit format. > I now understand why it looked looked 32-bit format before -- it > has segment registers instead of 64-bit offsets, but that is apparently > from the memory model being small -- seg:offset32 is stored instead > of rip and edp if the operand size is 32 bits. fcs == %cs. %ds is > 0 but fds == %ss. > > Later fegetenv(): > X 00000060 7f 03 ff ff 00 00 ff ff ff ff ff ff 75 08 40 00 > X 00000070 43 00 1c 05 20 62 60 00 3b 00 ff ff 80 1f 00 00 > > Later fnsave: > X 00000040 7f 03 ff ff 00 00 ff ff ff ff ff ff 75 08 40 00 > X 00000050 43 00 1c 05 20 62 60 00 3b 00 ff ff 00 00 00 00 > > Later fnstenv: > X 00000080 7f 03 ff ff 00 00 ff ff ff ff ff ff 75 08 40 00 > X 00000090 43 00 1c 05 20 62 60 00 3b 00 ff ff ee ee ee ee > > Everything works right and the values are the same as for fxsave > except for rearrangement and padding, but only because 64-bit > offsets are not needed. > > This shows that: > - it is the __other field that should be least MD, not most MD, > since it has no reserved padding bits and just doesn't > support 64-bit offsets > - there seem to be no hardware differences for the __other field > as saved by fnstenv and fegetenv(). The AMD bug/optimization > is only for fxsave. > - however, the FreeBSD fix for the AMD bug/optimization gives > different initial values in the __other field for AMD CPUs only. > I don't like it, but thought it was smarter than that. Perhaps > it is, but I tested my version. My version is more efficient, > and this involves doing the cleaning more unconditionally. For > the first use of the NPX by a thread, it would be efficient > enough to clean using fstenv; clean; fldenv before the normal > fxrstor. But cleaning is needed on every NPX context switch, > and we don't want to do fstenv; clean; fldenv on every switch. > > The AMD bug/optimization breaks some debugging methods and some > error handling in applications, and the FreeBSD cleaning makes > this worse. An application could try to use the last instruction/ > data info for its error handling and use methods that preserve > it internally. But the info is lost on any context switch. Even > if no other thread uses the NPX, cleaning guarantees clobbering > of the info when a thread is switched back to. It is lost even > after an exception where AMD hardware doesn't lose it. Its loss > is visible to debuggers -- debuggers will usually see the result > of the cleaning. > > Bruce From owner-svn-src-all@freebsd.org Sat Oct 17 13:20:44 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id EBA9CA1786C; Sat, 17 Oct 2015 13:20:43 +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 C1175EF7; Sat, 17 Oct 2015 13:20:43 +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 t9HDKgSR039151; Sat, 17 Oct 2015 13:20:42 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9HDKgRw039148; Sat, 17 Oct 2015 13:20:42 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201510171320.t9HDKgRw039148@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Sat, 17 Oct 2015 13:20:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289454 - head/sys/arm64/arm64 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 17 Oct 2015 13:20:44 -0000 Author: kib Date: Sat Oct 17 13:20:42 2015 New Revision: 289454 URL: https://svnweb.freebsd.org/changeset/base/289454 Log: Add checks for kernel VA accesses to the copyin(9) and related functions on arm64. Reviewed by: andrew Sponsored by: The FreeBSD Foundation Differential revision: https://reviews.freebsd.org/D3907 Modified: head/sys/arm64/arm64/copyinout.S head/sys/arm64/arm64/genassym.c head/sys/arm64/arm64/support.S Modified: head/sys/arm64/arm64/copyinout.S ============================================================================== --- head/sys/arm64/arm64/copyinout.S Sat Oct 17 13:06:52 2015 (r289453) +++ head/sys/arm64/arm64/copyinout.S Sat Oct 17 13:20:42 2015 (r289454) @@ -40,6 +40,7 @@ __FBSDID("$FreeBSD$"); */ ENTRY(copyio_fault) SET_FAULT_HANDLER(xzr, x1) /* Clear the handler */ +copyio_fault_nopcb: mov x0, #EFAULT ret END(copyio_fault) @@ -51,6 +52,10 @@ END(copyio_fault) */ ENTRY(copyout) cbz x2, 2f /* If len == 0 then skip loop */ + add x3, x1, x2 + ldr x4, =VM_MAXUSER_ADDRESS + cmp x3, x4 + b.hi copyio_fault_nopcb adr x6, copyio_fault /* Get the handler address */ SET_FAULT_HANDLER(x6, x7) /* Set the handler */ @@ -73,6 +78,10 @@ END(copyout) */ ENTRY(copyin) cbz x2, 2f /* If len == 0 then skip loop */ + add x3, x0, x2 + ldr x4, =VM_MAXUSER_ADDRESS + cmp x3, x4 + b.hi copyio_fault_nopcb adr x6, copyio_fault /* Get the handler address */ SET_FAULT_HANDLER(x6, x7) /* Set the handler */ @@ -97,11 +106,14 @@ ENTRY(copyinstr) mov x5, xzr /* count = 0 */ mov w4, #1 /* If zero return faulure */ cbz x2, 3f /* If len == 0 then skip loop */ + ldr x7, =VM_MAXUSER_ADDRESS adr x6, copyio_fault /* Get the handler address */ SET_FAULT_HANDLER(x6, x7) /* Set the handler */ -1: ldrb w4, [x0], #1 /* Load from uaddr */ +1: cmp x0, x7 + b.cs copyio_fault + ldrb w4, [x0], #1 /* Load from uaddr */ strb w4, [x1], #1 /* Store in kaddr */ add x5, x5, #1 /* count++ */ cbz w4, 2f /* Break when NUL-terminated */ Modified: head/sys/arm64/arm64/genassym.c ============================================================================== --- head/sys/arm64/arm64/genassym.c Sat Oct 17 13:06:52 2015 (r289453) +++ head/sys/arm64/arm64/genassym.c Sat Oct 17 13:20:42 2015 (r289454) @@ -38,6 +38,8 @@ __FBSDID("$FreeBSD$"); #include ASSYM(KERNBASE, KERNBASE); +ASSYM(VM_MAXUSER_ADDRESS, VM_MAXUSER_ADDRESS); + ASSYM(TDF_ASTPENDING, TDF_ASTPENDING); ASSYM(TDF_NEEDRESCHED, TDF_NEEDRESCHED); Modified: head/sys/arm64/arm64/support.S ============================================================================== --- head/sys/arm64/arm64/support.S Sat Oct 17 13:06:52 2015 (r289453) +++ head/sys/arm64/arm64/support.S Sat Oct 17 13:20:42 2015 (r289454) @@ -41,6 +41,7 @@ __FBSDID("$FreeBSD$"); */ ENTRY(fsu_fault) SET_FAULT_HANDLER(xzr, x1) /* Reset the handler function */ +fsu_fault_nopcb: mov x0, #-1 ret END(fsu_fault) @@ -49,6 +50,9 @@ END(fsu_fault) * int casueword32(volatile uint32_t *, uint32_t, uint32_t *, uint32_t) */ ENTRY(casueword32) + ldr x4, =(VM_MAXUSER_ADDRESS-3) + cmp x0, x4 + b.cs fsu_fault_nopcb adr x6, fsu_fault /* Load the fault handler */ SET_FAULT_HANDLER(x6, x4) /* And set it */ 1: ldxr w4, [x0] /* Load-exclusive the data */ @@ -67,6 +71,9 @@ END(casueword32) * int casueword(volatile u_long *, u_long, u_long *, u_long) */ ENTRY(casueword) + ldr x4, =(VM_MAXUSER_ADDRESS-7) + cmp x0, x4 + b.cs fsu_fault_nopcb adr x6, fsu_fault /* Load the fault handler */ SET_FAULT_HANDLER(x6, x4) /* And set it */ 1: ldxr x4, [x0] /* Load-exclusive the data */ @@ -85,6 +92,9 @@ END(casueword) * int fubyte(volatile const void *) */ ENTRY(fubyte) + ldr x1, =VM_MAXUSER_ADDRESS + cmp x0, x1 + b.cs fsu_fault_nopcb adr x6, fsu_fault /* Load the fault handler */ SET_FAULT_HANDLER(x6, x1) /* And set it */ ldrb w0, [x0] /* Try loading the data */ @@ -96,6 +106,9 @@ END(fubyte) * int fuword(volatile const void *) */ ENTRY(fuword16) + ldr x1, =(VM_MAXUSER_ADDRESS-1) + cmp x0, x1 + b.cs fsu_fault_nopcb adr x6, fsu_fault /* Load the fault handler */ SET_FAULT_HANDLER(x6, x1) /* And set it */ ldrh w0, [x0] /* Try loading the data */ @@ -107,6 +120,9 @@ END(fuword16) * int32_t fueword32(volatile const void *, int32_t *) */ ENTRY(fueword32) + ldr x2, =(VM_MAXUSER_ADDRESS-3) + cmp x0, x2 + b.cs fsu_fault_nopcb adr x6, fsu_fault /* Load the fault handler */ SET_FAULT_HANDLER(x6, x2) /* And set it */ ldr w0, [x0] /* Try loading the data */ @@ -122,6 +138,9 @@ END(fueword32) */ ENTRY(fueword) EENTRY(fueword64) + ldr x2, =(VM_MAXUSER_ADDRESS-7) + cmp x0, x2 + b.cs fsu_fault_nopcb adr x6, fsu_fault /* Load the fault handler */ SET_FAULT_HANDLER(x6, x2) /* And set it */ ldr x0, [x0] /* Try loading the data */ @@ -136,6 +155,9 @@ END(fueword) * int subyte(volatile void *, int) */ ENTRY(subyte) + ldr x2, =VM_MAXUSER_ADDRESS + cmp x0, x2 + b.cs fsu_fault_nopcb adr x6, fsu_fault /* Load the fault handler */ SET_FAULT_HANDLER(x6, x2) /* And set it */ strb w1, [x0] /* Try storing the data */ @@ -148,6 +170,9 @@ END(subyte) * int suword16(volatile void *, int) */ ENTRY(suword16) + ldr x2, =(VM_MAXUSER_ADDRESS-1) + cmp x0, x2 + b.cs fsu_fault_nopcb adr x6, fsu_fault /* Load the fault handler */ SET_FAULT_HANDLER(x6, x2) /* And set it */ strh w1, [x0] /* Try storing the data */ @@ -160,6 +185,9 @@ END(suword16) * int suword32(volatile void *, int) */ ENTRY(suword32) + ldr x2, =(VM_MAXUSER_ADDRESS-3) + cmp x0, x2 + b.cs fsu_fault_nopcb adr x6, fsu_fault /* Load the fault handler */ SET_FAULT_HANDLER(x6, x2) /* And set it */ str w1, [x0] /* Try storing the data */ @@ -173,6 +201,9 @@ END(suword32) */ ENTRY(suword) EENTRY(suword64) + ldr x2, =(VM_MAXUSER_ADDRESS-7) + cmp x0, x2 + b.cs fsu_fault_nopcb adr x6, fsu_fault /* Load the fault handler */ SET_FAULT_HANDLER(x6, x2) /* And set it */ str x1, [x0] /* Try storing the data */ @@ -201,6 +232,9 @@ END(fsu_fault) * int fuswintr(void *) */ ENTRY(fuswintr) + ldr x1, =(VM_MAXUSER_ADDRESS-3) + cmp x0, x1 + b.cs fsu_fault_nopcb adr x6, fsu_intr_fault /* Load the fault handler */ SET_FAULT_HANDLER(x6, x1) /* And set it */ ldr w0, [x0] /* Try loading the data */ @@ -212,6 +246,9 @@ END(fuswintr) * int suswintr(void *base, int word) */ ENTRY(suswintr) + ldr x2, =(VM_MAXUSER_ADDRESS-3) + cmp x0, x2 + b.cs fsu_fault_nopcb adr x6, fsu_intr_fault /* Load the fault handler */ SET_FAULT_HANDLER(x6, x2) /* And set it */ str w1, [x0] /* Try storing the data */ From owner-svn-src-all@freebsd.org Sat Oct 17 14:07:49 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 358DAA176AA; Sat, 17 Oct 2015 14:07:49 +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 E5FA11F86; Sat, 17 Oct 2015 14:07:48 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t9HE7lSu053308; Sat, 17 Oct 2015 14:07:47 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9HE7lQf053307; Sat, 17 Oct 2015 14:07:47 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <201510171407.t9HE7lQf053307@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Sat, 17 Oct 2015 14:07:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289455 - head/sys/arm64/arm64 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 17 Oct 2015 14:07:49 -0000 Author: andrew Date: Sat Oct 17 14:07:47 2015 New Revision: 289455 URL: https://svnweb.freebsd.org/changeset/base/289455 Log: Rename build_block_pagetable to build_l2_block_pagetable in preperation for adding support for 4 levels of page tables. Obtained from: Patrick Wildt Modified: head/sys/arm64/arm64/locore.S Modified: head/sys/arm64/arm64/locore.S ============================================================================== --- head/sys/arm64/arm64/locore.S Sat Oct 17 13:20:42 2015 (r289454) +++ head/sys/arm64/arm64/locore.S Sat Oct 17 14:07:47 2015 (r289455) @@ -357,7 +357,7 @@ create_pagetables: mov x7, #NORMAL_MEM mov x8, #(KERNBASE & L2_BLOCK_MASK) mov x9, x28 - bl build_block_pagetable + bl build_l2_block_pagetable /* Move to the l1 table */ add x26, x26, #PAGE_SIZE @@ -427,7 +427,7 @@ build_section_pagetable: * Builds an L1 -> L2 table descriptor * * This is a link for a 1GiB block of memory with up to 2MiB regions mapped - * within it by build_block_pagetable. + * within it by build_l1_block_pagetable. * * x6 = L1 table * x8 = Virtual Address @@ -463,7 +463,7 @@ link_l1_pagetable: * x10 = Entry count (TODO) * x11, x12 and x13 are trashed */ -build_block_pagetable: +build_l2_block_pagetable: /* * Build the L2 table entry. */ From owner-svn-src-all@freebsd.org Sat Oct 17 14:48:40 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 93781A173D0; Sat, 17 Oct 2015 14:48:40 +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 50A8A1613; Sat, 17 Oct 2015 14:48:40 +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 t9HEmdhd065013; Sat, 17 Oct 2015 14:48:39 GMT (envelope-from dumbbell@FreeBSD.org) Received: (from dumbbell@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9HEmdYK065011; Sat, 17 Oct 2015 14:48:39 GMT (envelope-from dumbbell@FreeBSD.org) Message-Id: <201510171448.t9HEmdYK065011@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?= Date: Sat, 17 Oct 2015 14:48:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289456 - head/sys/dev/drm2/i915 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 17 Oct 2015 14:48:40 -0000 Author: dumbbell Date: Sat Oct 17 14:48:39 2015 New Revision: 289456 URL: https://svnweb.freebsd.org/changeset/base/289456 Log: drm/i915: Reduce diff with Linux 3.8 There is no functional change. The goal is to ease the future update to Linux 3.8's i915 driver. MFC after: 2 months Modified: head/sys/dev/drm2/i915/intel_dp.c head/sys/dev/drm2/i915/intel_iic.c Modified: head/sys/dev/drm2/i915/intel_dp.c ============================================================================== --- head/sys/dev/drm2/i915/intel_dp.c Sat Oct 17 14:07:47 2015 (r289455) +++ head/sys/dev/drm2/i915/intel_dp.c Sat Oct 17 14:48:39 2015 (r289456) @@ -555,12 +555,12 @@ intel_dp_aux_native_read(struct intel_dp } static int -intel_dp_i2c_aux_ch(device_t idev, int mode, uint8_t write_byte, - uint8_t *read_byte) +intel_dp_i2c_aux_ch(device_t adapter, int mode, + uint8_t write_byte, uint8_t *read_byte) { - struct iic_dp_aux_data *data; - struct intel_dp *intel_dp; - uint16_t address; + struct iic_dp_aux_data *data = device_get_softc(adapter); + struct intel_dp *intel_dp = data->priv; + uint16_t address = data->address; uint8_t msg[5]; uint8_t reply[2]; unsigned retry; @@ -568,10 +568,6 @@ intel_dp_i2c_aux_ch(device_t idev, int m int reply_bytes; int ret; - data = device_get_softc(idev); - intel_dp = data->priv; - address = data->address; - intel_dp_check_edp(intel_dp); /* Set up the command byte */ if (mode & MODE_I2C_READ) @@ -609,7 +605,7 @@ intel_dp_i2c_aux_ch(device_t idev, int m reply, reply_bytes); if (ret < 0) { DRM_DEBUG_KMS("aux_ch failed %d\n", ret); - return (ret); + return ret; } switch (reply[0] & AUX_NATIVE_REPLY_MASK) { @@ -620,14 +616,14 @@ intel_dp_i2c_aux_ch(device_t idev, int m break; case AUX_NATIVE_REPLY_NACK: DRM_DEBUG_KMS("aux_ch native nack\n"); - return (-EREMOTEIO); + return -EREMOTEIO; case AUX_NATIVE_REPLY_DEFER: DELAY(100); continue; default: DRM_ERROR("aux_ch invalid native reply 0x%02x\n", reply[0]); - return (-EREMOTEIO); + return -EREMOTEIO; } switch (reply[0] & AUX_I2C_REPLY_MASK) { @@ -638,19 +634,19 @@ intel_dp_i2c_aux_ch(device_t idev, int m return (0/*reply_bytes - 1*/); case AUX_I2C_REPLY_NACK: DRM_DEBUG_KMS("aux_i2c nack\n"); - return (-EREMOTEIO); + return -EREMOTEIO; case AUX_I2C_REPLY_DEFER: DRM_DEBUG_KMS("aux_i2c defer\n"); DELAY(100); break; default: DRM_ERROR("aux_i2c invalid reply 0x%02x\n", reply[0]); - return (-EREMOTEIO); + return -EREMOTEIO; } } DRM_ERROR("too many retries, giving up\n"); - return (-EREMOTEIO); + return -EREMOTEIO; } static void ironlake_edp_panel_vdd_on(struct intel_dp *intel_dp); @@ -660,7 +656,7 @@ static int intel_dp_i2c_init(struct intel_dp *intel_dp, struct intel_connector *intel_connector, const char *name) { - int ret; + int ret; DRM_DEBUG_KMS("i2c_init %s\n", name); @@ -669,7 +665,7 @@ intel_dp_i2c_init(struct intel_dp *intel intel_dp_i2c_aux_ch, intel_dp, &intel_dp->dp_iic_bus, &intel_dp->adapter); ironlake_edp_panel_vdd_off(intel_dp, false); - return (ret); + return ret; } static bool @@ -956,8 +952,7 @@ static void ironlake_wait_panel_status(s I915_READ(PCH_PP_STATUS), I915_READ(PCH_PP_CONTROL)); - if (_intel_wait_for(dev, - (I915_READ(PCH_PP_STATUS) & mask) == value, 5000, 10, "915iwp")) { + if (_intel_wait_for(dev, (I915_READ(PCH_PP_STATUS) & mask) == value, 5000, 10, "915iwp")) { DRM_ERROR("Panel status timeout: status %08x control %08x\n", I915_READ(PCH_PP_STATUS), I915_READ(PCH_PP_CONTROL)); Modified: head/sys/dev/drm2/i915/intel_iic.c ============================================================================== --- head/sys/dev/drm2/i915/intel_iic.c Sat Oct 17 14:07:47 2015 (r289455) +++ head/sys/dev/drm2/i915/intel_iic.c Sat Oct 17 14:48:39 2015 (r289456) @@ -96,8 +96,27 @@ struct intel_iic_softc { uint32_t reg0; }; -static void -intel_iic_quirk_set(struct drm_i915_private *dev_priv, bool enable) +void +intel_iic_reset(struct drm_device *dev) +{ + struct drm_i915_private *dev_priv = dev->dev_private; + I915_WRITE(dev_priv->gpio_mmio_base + GMBUS0, 0); +} + +static int +intel_iicbus_reset(device_t idev, u_char speed, u_char addr, u_char *oldaddr) +{ + struct intel_iic_softc *sc; + struct drm_device *dev; + + sc = device_get_softc(idev); + dev = sc->drm_dev; + + intel_iic_reset(dev); + return (0); +} + +static void intel_i2c_quirk_set(struct drm_i915_private *dev_priv, bool enable) { u32 val; @@ -113,130 +132,103 @@ intel_iic_quirk_set(struct drm_i915_priv I915_WRITE(DSPCLK_GATE_D, val); } -static u32 -intel_iic_get_reserved(device_t idev) +static u32 get_reserved(device_t idev) { - struct intel_iic_softc *sc; - struct drm_device *dev; - struct drm_i915_private *dev_priv; - u32 reserved; + struct intel_iic_softc *sc = device_get_softc(idev); + struct drm_device *dev = sc->drm_dev; + struct drm_i915_private *dev_priv = dev->dev_private; + u32 reserved = 0; - sc = device_get_softc(idev); - dev = sc->drm_dev; - dev_priv = dev->dev_private; - - if (!IS_I830(dev) && !IS_845G(dev)) { + if (!IS_I830(dev) && !IS_845G(dev)) reserved = I915_READ_NOTRACE(sc->reg) & - (GPIO_DATA_PULLUP_DISABLE | GPIO_CLOCK_PULLUP_DISABLE); - } else { - reserved = 0; - } + (GPIO_DATA_PULLUP_DISABLE | + GPIO_CLOCK_PULLUP_DISABLE); - return (reserved); + return reserved; } -void -intel_iic_reset(struct drm_device *dev) +static int get_clock(device_t adapter) { - struct drm_i915_private *dev_priv; - - dev_priv = dev->dev_private; - I915_WRITE(dev_priv->gpio_mmio_base + GMBUS0, 0); + struct intel_iic_softc *sc = device_get_softc(adapter); + struct drm_i915_private *dev_priv = sc->drm_dev->dev_private; + u32 reserved = get_reserved(adapter); + I915_WRITE_NOTRACE(sc->reg, reserved | GPIO_CLOCK_DIR_MASK); + I915_WRITE_NOTRACE(sc->reg, reserved); + return ((I915_READ_NOTRACE(sc->reg) & GPIO_CLOCK_VAL_IN) != 0); } -static int -intel_iicbus_reset(device_t idev, u_char speed, u_char addr, u_char *oldaddr) +static int get_data(device_t adapter) { - struct intel_iic_softc *sc; - struct drm_device *dev; - - sc = device_get_softc(idev); - dev = sc->drm_dev; - - intel_iic_reset(dev); - return (0); + struct intel_iic_softc *sc = device_get_softc(adapter); + struct drm_i915_private *dev_priv = sc->drm_dev->dev_private; + u32 reserved = get_reserved(adapter); + I915_WRITE_NOTRACE(sc->reg, reserved | GPIO_DATA_DIR_MASK); + I915_WRITE_NOTRACE(sc->reg, reserved); + return ((I915_READ_NOTRACE(sc->reg) & GPIO_DATA_VAL_IN) != 0); } -static void -intel_iicbb_setsda(device_t idev, int val) +static void set_clock(device_t adapter, int state_high) { - struct intel_iic_softc *sc; - struct drm_i915_private *dev_priv; - u32 reserved; - u32 data_bits; - - sc = device_get_softc(idev); - dev_priv = sc->drm_dev->dev_private; + struct intel_iic_softc *sc = device_get_softc(adapter); + struct drm_i915_private *dev_priv = sc->drm_dev->dev_private; + u32 reserved = get_reserved(adapter); + u32 clock_bits; - reserved = intel_iic_get_reserved(idev); - if (val) - data_bits = GPIO_DATA_DIR_IN | GPIO_DATA_DIR_MASK; + if (state_high) + clock_bits = GPIO_CLOCK_DIR_IN | GPIO_CLOCK_DIR_MASK; else - data_bits = GPIO_DATA_DIR_OUT | GPIO_DATA_DIR_MASK | - GPIO_DATA_VAL_MASK; + clock_bits = GPIO_CLOCK_DIR_OUT | GPIO_CLOCK_DIR_MASK | + GPIO_CLOCK_VAL_MASK; - I915_WRITE_NOTRACE(sc->reg, reserved | data_bits); + I915_WRITE_NOTRACE(sc->reg, reserved | clock_bits); POSTING_READ(sc->reg); } -static void -intel_iicbb_setscl(device_t idev, int val) +static void set_data(device_t adapter, int state_high) { - struct intel_iic_softc *sc; - struct drm_i915_private *dev_priv; - u32 clock_bits, reserved; - - sc = device_get_softc(idev); - dev_priv = sc->drm_dev->dev_private; + struct intel_iic_softc *sc = device_get_softc(adapter); + struct drm_i915_private *dev_priv = sc->drm_dev->dev_private; + u32 reserved = get_reserved(adapter); + u32 data_bits; - reserved = intel_iic_get_reserved(idev); - if (val) - clock_bits = GPIO_CLOCK_DIR_IN | GPIO_CLOCK_DIR_MASK; + if (state_high) + data_bits = GPIO_DATA_DIR_IN | GPIO_DATA_DIR_MASK; else - clock_bits = GPIO_CLOCK_DIR_OUT | GPIO_CLOCK_DIR_MASK | - GPIO_CLOCK_VAL_MASK; + data_bits = GPIO_DATA_DIR_OUT | GPIO_DATA_DIR_MASK | + GPIO_DATA_VAL_MASK; - I915_WRITE_NOTRACE(sc->reg, reserved | clock_bits); + I915_WRITE_NOTRACE(sc->reg, reserved | data_bits); POSTING_READ(sc->reg); } static int -intel_iicbb_getsda(device_t idev) +intel_gpio_pre_xfer(device_t adapter) { - struct intel_iic_softc *sc; - struct drm_i915_private *dev_priv; - u32 reserved; - - sc = device_get_softc(idev); - dev_priv = sc->drm_dev->dev_private; - - reserved = intel_iic_get_reserved(idev); + struct intel_iic_softc *sc = device_get_softc(adapter); + struct drm_i915_private *dev_priv = sc->drm_dev->dev_private; - I915_WRITE_NOTRACE(sc->reg, reserved | GPIO_DATA_DIR_MASK); - I915_WRITE_NOTRACE(sc->reg, reserved); - return ((I915_READ_NOTRACE(sc->reg) & GPIO_DATA_VAL_IN) != 0); + intel_iic_reset(sc->drm_dev); + intel_i2c_quirk_set(dev_priv, true); + IICBB_SETSDA(adapter, 1); + IICBB_SETSCL(adapter, 1); + DELAY(I2C_RISEFALL_TIME); + return 0; } -static int -intel_iicbb_getscl(device_t idev) +static void +intel_gpio_post_xfer(device_t adapter) { - struct intel_iic_softc *sc; - struct drm_i915_private *dev_priv; - u32 reserved; + struct intel_iic_softc *sc = device_get_softc(adapter); + struct drm_i915_private *dev_priv = sc->drm_dev->dev_private; - sc = device_get_softc(idev); - dev_priv = sc->drm_dev->dev_private; - - reserved = intel_iic_get_reserved(idev); - - I915_WRITE_NOTRACE(sc->reg, reserved | GPIO_CLOCK_DIR_MASK); - I915_WRITE_NOTRACE(sc->reg, reserved); - return ((I915_READ_NOTRACE(sc->reg) & GPIO_CLOCK_VAL_IN) != 0); + IICBB_SETSDA(adapter, 1); + IICBB_SETSCL(adapter, 1); + intel_i2c_quirk_set(dev_priv, false); } static int gmbus_xfer_read(struct drm_i915_private *dev_priv, struct iic_msg *msg, - u32 gmbus1_index) + u32 gmbus1_index) { int reg_offset = dev_priv->gpio_mmio_base; u16 len = msg->len; @@ -254,19 +246,19 @@ gmbus_xfer_read(struct drm_i915_private u32 gmbus2; ret = _intel_wait_for(sc->drm_dev, - ((gmbus2 = I915_READ(GMBUS2 + reg_offset)) & - (GMBUS_SATOER | GMBUS_HW_RDY)), - 50, 1, "915gbr"); + ((gmbus2 = I915_READ(GMBUS2 + reg_offset)) & + (GMBUS_SATOER | GMBUS_HW_RDY)), + 50, 1, "915gbr"); if (ret) - return (-ETIMEDOUT); + return -ETIMEDOUT; if (gmbus2 & GMBUS_SATOER) - return (-ENXIO); + return -ENXIO; val = I915_READ(GMBUS3 + reg_offset); do { *buf++ = val & 0xff; val >>= 8; - } while (--len != 0 && ++loop < 4); + } while (--len && ++loop < 4); } return 0; @@ -299,18 +291,18 @@ gmbus_xfer_write(struct drm_i915_private val = loop = 0; do { val |= *buf++ << (8 * loop); - } while (--len != 0 && ++loop < 4); + } while (--len && ++loop < 4); I915_WRITE(GMBUS3 + reg_offset, val); ret = _intel_wait_for(sc->drm_dev, - ((gmbus2 = I915_READ(GMBUS2 + reg_offset)) & - (GMBUS_SATOER | GMBUS_HW_RDY)), - 50, 1, "915gbw"); + ((gmbus2 = I915_READ(GMBUS2 + reg_offset)) & + (GMBUS_SATOER | GMBUS_HW_RDY)), + 50, 1, "915gbw"); if (ret) - return (-ETIMEDOUT); + return -ETIMEDOUT; if (gmbus2 & GMBUS_SATOER) - return (-ENXIO); + return -ENXIO; } return 0; } @@ -356,20 +348,20 @@ gmbus_xfer_index_read(struct drm_i915_pr } static int -intel_gmbus_transfer(device_t idev, struct iic_msg *msgs, uint32_t nmsgs) +gmbus_xfer(device_t adapter, + struct iic_msg *msgs, + uint32_t num) { - struct intel_iic_softc *sc; - struct drm_i915_private *dev_priv; + struct intel_iic_softc *sc = device_get_softc(adapter); + struct drm_i915_private *dev_priv = sc->drm_dev->dev_private; int error, i, ret, reg_offset, unit; error = 0; - sc = device_get_softc(idev); - dev_priv = sc->drm_dev->dev_private; - unit = device_get_unit(idev); + unit = device_get_unit(adapter); sx_xlock(&dev_priv->gmbus_sx); if (sc->force_bit_dev) { - error = -IICBUS_TRANSFER(dev_priv->bbbus[unit], msgs, nmsgs); + error = -IICBUS_TRANSFER(dev_priv->bbbus[unit], msgs, num); goto out; } @@ -377,10 +369,10 @@ intel_gmbus_transfer(device_t idev, stru I915_WRITE(GMBUS0 + reg_offset, sc->reg0); - for (i = 0; i < nmsgs; i++) { + for (i = 0; i < num; i++) { u32 gmbus2; - if (gmbus_is_index_read(msgs, i, nmsgs)) { + if (gmbus_is_index_read(msgs, i, num)) { error = gmbus_xfer_index_read(dev_priv, &msgs[i]); i += 1; /* set i to the index of the read xfer */ } else if (msgs[i].flags & IIC_M_RD) { @@ -413,12 +405,12 @@ intel_gmbus_transfer(device_t idev, stru /* Mark the GMBUS interface as disabled after waiting for idle. * We will re-enable it at the start of the next xfer, * till then let it sleep. - */ + */ if (_intel_wait_for(dev, (I915_READ(GMBUS2 + reg_offset) & GMBUS_ACTIVE) == 0, 10, 1, "915gbu")) { DRM_DEBUG_KMS("GMBUS [%s] timed out waiting for idle\n", - sc->name); + sc->name); error = -ETIMEDOUT; } I915_WRITE(GMBUS0 + reg_offset, 0); @@ -459,81 +451,16 @@ clear_err: timeout: DRM_INFO("GMBUS [%s] timed out, falling back to bit banging on pin %d\n", - sc->name, sc->reg0 & 0xff); + sc->name, sc->reg0 & 0xff); I915_WRITE(GMBUS0 + reg_offset, 0); - /* - * Hardware may not support GMBUS over these pins? - * Try GPIO bitbanging instead. - */ + /* Hardware may not support GMBUS over these pins? Try GPIO bitbanging instead. */ sc->force_bit_dev = true; - error = -IICBUS_TRANSFER(idev, msgs, nmsgs); - goto out; + error = -IICBUS_TRANSFER(adapter, msgs, num); out: sx_xunlock(&dev_priv->gmbus_sx); - return (-error); -} - -device_t -intel_gmbus_get_adapter(struct drm_i915_private *dev_priv, - unsigned port) -{ - - if (!intel_gmbus_is_port_valid(port)) - DRM_ERROR("GMBUS get adapter %d: invalid port\n", port); - return (intel_gmbus_is_port_valid(port) ? dev_priv->gmbus[port - 1] : - NULL); -} - -void -intel_gmbus_set_speed(device_t idev, int speed) -{ - struct intel_iic_softc *sc; - - sc = device_get_softc(device_get_parent(idev)); - - sc->reg0 = (sc->reg0 & ~(0x3 << 8)) | speed; -} - -void -intel_gmbus_force_bit(device_t idev, bool force_bit) -{ - struct intel_iic_softc *sc; - - sc = device_get_softc(device_get_parent(idev)); - sc->force_bit_dev = force_bit; -} - -static int -intel_iicbb_pre_xfer(device_t idev) -{ - struct intel_iic_softc *sc; - struct drm_i915_private *dev_priv; - - sc = device_get_softc(idev); - dev_priv = sc->drm_dev->dev_private; - - intel_iic_reset(sc->drm_dev); - intel_iic_quirk_set(dev_priv, true); - IICBB_SETSDA(idev, 1); - IICBB_SETSCL(idev, 1); - DELAY(I2C_RISEFALL_TIME); - return (0); -} - -static void -intel_iicbb_post_xfer(device_t idev) -{ - struct intel_iic_softc *sc; - struct drm_i915_private *dev_priv; - - sc = device_get_softc(idev); - dev_priv = sc->drm_dev->dev_private; - - IICBB_SETSDA(idev, 1); - IICBB_SETSCL(idev, 1); - intel_iic_quirk_set(dev_priv, false); + return -error; } static int @@ -663,7 +590,7 @@ static device_method_t intel_gmbus_metho DEVMETHOD(device_attach, intel_gmbus_attach), DEVMETHOD(device_detach, intel_gmbus_detach), DEVMETHOD(iicbus_reset, intel_iicbus_reset), - DEVMETHOD(iicbus_transfer, intel_gmbus_transfer), + DEVMETHOD(iicbus_transfer, gmbus_xfer), DEVMETHOD_END }; static driver_t intel_gmbus_driver = { @@ -686,12 +613,12 @@ static device_method_t intel_iicbb_metho DEVMETHOD(iicbb_callback, iicbus_null_callback), DEVMETHOD(iicbb_reset, intel_iicbus_reset), - DEVMETHOD(iicbb_setsda, intel_iicbb_setsda), - DEVMETHOD(iicbb_setscl, intel_iicbb_setscl), - DEVMETHOD(iicbb_getsda, intel_iicbb_getsda), - DEVMETHOD(iicbb_getscl, intel_iicbb_getscl), - DEVMETHOD(iicbb_pre_xfer, intel_iicbb_pre_xfer), - DEVMETHOD(iicbb_post_xfer, intel_iicbb_post_xfer), + DEVMETHOD(iicbb_setsda, set_data), + DEVMETHOD(iicbb_setscl, set_clock), + DEVMETHOD(iicbb_getsda, get_data), + DEVMETHOD(iicbb_getscl, get_clock), + DEVMETHOD(iicbb_pre_xfer, intel_gpio_pre_xfer), + DEVMETHOD(iicbb_post_xfer, intel_gpio_post_xfer), DEVMETHOD_END }; static driver_t intel_iicbb_driver = { @@ -704,20 +631,19 @@ DRIVER_MODULE_ORDERED(intel_iicbb, drmn, intel_iicbb_devclass, 0, 0, SI_ORDER_FIRST); DRIVER_MODULE(iicbb, intel_iicbb, iicbb_driver, iicbb_devclass, 0, 0); -int -intel_setup_gmbus(struct drm_device *dev) +int intel_setup_gmbus(struct drm_device *dev) { - struct drm_i915_private *dev_priv; + struct drm_i915_private *dev_priv = dev->dev_private; device_t iic_dev; - int i, ret; + int ret, i; - dev_priv = dev->dev_private; - sx_init(&dev_priv->gmbus_sx, "gmbus"); if (HAS_PCH_SPLIT(dev)) dev_priv->gpio_mmio_base = PCH_GPIOA - GPIOA; else dev_priv->gpio_mmio_base = 0; + sx_init(&dev_priv->gmbus_sx, "gmbus"); + /* * The Giant there is recursed, most likely. Normally, the * intel_setup_gmbus() is called from the attach method of the @@ -786,14 +712,41 @@ intel_setup_gmbus(struct drm_device *dev intel_iic_reset(dev); } - mtx_unlock(&Giant); - return (0); + + return 0; err: intel_teardown_gmbus_m(dev, i); mtx_unlock(&Giant); - return (ret); + return ret; +} + +device_t intel_gmbus_get_adapter(struct drm_i915_private *dev_priv, + unsigned port) +{ + + if (!intel_gmbus_is_port_valid(port)) + DRM_ERROR("GMBUS get adapter %d: invalid port\n", port); + return (intel_gmbus_is_port_valid(port) ? dev_priv->gmbus[port - 1] : + NULL); +} + +void intel_gmbus_set_speed(device_t adapter, int speed) +{ + struct intel_iic_softc *sc; + + sc = device_get_softc(device_get_parent(adapter)); + + sc->reg0 = (sc->reg0 & ~(0x3 << 8)) | speed; +} + +void intel_gmbus_force_bit(device_t adapter, bool force_bit) +{ + struct intel_iic_softc *sc; + + sc = device_get_softc(device_get_parent(adapter)); + sc->force_bit_dev = force_bit; } static void @@ -806,8 +759,7 @@ intel_teardown_gmbus_m(struct drm_device sx_destroy(&dev_priv->gmbus_sx); } -void -intel_teardown_gmbus(struct drm_device *dev) +void intel_teardown_gmbus(struct drm_device *dev) { mtx_lock(&Giant); From owner-svn-src-all@freebsd.org Sat Oct 17 14:58:56 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5C015A176AF; Sat, 17 Oct 2015 14:58:56 +0000 (UTC) (envelope-from jah@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1D0C71B17; Sat, 17 Oct 2015 14:58:56 +0000 (UTC) (envelope-from jah@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t9HEwtjC067934; Sat, 17 Oct 2015 14:58:55 GMT (envelope-from jah@FreeBSD.org) Received: (from jah@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9HEwtYS067933; Sat, 17 Oct 2015 14:58:55 GMT (envelope-from jah@FreeBSD.org) Message-Id: <201510171458.t9HEwtYS067933@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jah set sender to jah@FreeBSD.org using -f From: "Jason A. Harmening" Date: Sat, 17 Oct 2015 14:58:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289457 - head/sys/x86/x86 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 17 Oct 2015 14:58:56 -0000 Author: jah Date: Sat Oct 17 14:58:55 2015 New Revision: 289457 URL: https://svnweb.freebsd.org/changeset/base/289457 Log: Don't page-align the physical address when calling PHYS_TO_VM_PAGE(). M busdma_bounce.c Modified: head/sys/x86/x86/busdma_bounce.c Modified: head/sys/x86/x86/busdma_bounce.c ============================================================================== --- head/sys/x86/x86/busdma_bounce.c Sat Oct 17 14:48:39 2015 (r289456) +++ head/sys/x86/x86/busdma_bounce.c Sat Oct 17 14:58:55 2015 (r289457) @@ -1006,7 +1006,8 @@ add_bounce_page(bus_dma_tag_t dmat, bus_ bpage->busaddr |= addr & PAGE_MASK; } bpage->datavaddr = vaddr; - bpage->datapage = PHYS_TO_VM_PAGE(addr & ~PAGE_MASK); + /* PHYS_TO_VM_PAGE() will truncate unaligned addresses. */ + bpage->datapage = PHYS_TO_VM_PAGE(addr); bpage->dataoffs = addr & PAGE_MASK; bpage->datacount = size; STAILQ_INSERT_TAIL(&(map->bpages), bpage, links); From owner-svn-src-all@freebsd.org Sat Oct 17 15:23:03 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 42583A17E4A; Sat, 17 Oct 2015 15:23: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 1B7DA863; Sat, 17 Oct 2015 15:23:03 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from mail.xzibition.com (localhost [IPv6:::1]) by freefall.freebsd.org (Postfix) with ESMTP id 149AE1CA0; Sat, 17 Oct 2015 15:23: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 CD93214DA5; Sat, 17 Oct 2015 15:23: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 qL8_IKay9zG8; Sat, 17 Oct 2015 15:23:00 +0000 (UTC) Subject: Re: svn commit: r289415 - in head: . sys/sys DKIM-Filter: OpenDKIM Filter v2.9.2 mail.xzibition.com B025314D9F To: Alexander Motin , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201510160857.t9G8vBUV051731@repo.freebsd.org> <56213F23.7000909@FreeBSD.org> <5621413C.1090904@FreeBSD.org> <5621FA23.4030202@FreeBSD.org> From: Bryan Drewery Openpgp: id=F9173CB2C3AAEA7A5C8A1F0935D771BB6E4697CF; url=http://www.shatow.net/bryan/bryan2.asc Organization: FreeBSD Message-ID: <562267D3.8050001@FreeBSD.org> Date: Sat, 17 Oct 2015 08:22:59 -0700 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0 MIME-Version: 1.0 In-Reply-To: <5621FA23.4030202@FreeBSD.org> Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="NMBpseSAkpGJ0aKCG3N0XV7vWEct4vIFR" X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 17 Oct 2015 15:23:03 -0000 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --NMBpseSAkpGJ0aKCG3N0XV7vWEct4vIFR Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 10/17/2015 12:34 AM, Alexander Motin wrote: > On 16.10.2015 21:26, Alexander Motin wrote: >> On 16.10.2015 21:17, Bryan Drewery wrote: >>> On 10/16/2015 1:57 AM, Alexander Motin wrote: >>>> Author: mav >>>> Date: Fri Oct 16 08:57:11 2015 >>>> New Revision: 289415 >>>> URL: https://svnweb.freebsd.org/changeset/base/289415 >>>> >>>> Log: >>>> Bump version and add notice about incompatibility introduced by re= sumable >>>> send/receive support in ZFS. >>>> >>>> Modified: >>>> head/UPDATING >>>> head/sys/sys/param.h >>>> >>>> Modified: head/UPDATING >>>> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=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/UPDATING Fri Oct 16 08:22:21 2015 (r289414) >>>> +++ head/UPDATING Fri Oct 16 08:57:11 2015 (r289415) >>>> @@ -31,6 +31,12 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 11 >>>> disable the most expensive debugging functionality run >>>> "ln -s 'abort:false,junk:false' /etc/malloc.conf".) >>>> =20 >>>> +20151015: >>>> + Added ZFS support for resumable send/receive changed respective >>>> + IOCTL API/ABI. Compatibility ABI shims were provided for other >>>> + functionality, while receive require version match between world >>>> + and kernel. >>> >>> This means for example that 'zfs recv' in a 10.2 jail running on a 11= =2E0 >>> kernel will not work? Can compatibility be added for it? >> >> The structures passed as argument for receive are large and completely= >> different. Unfortunately I don't know enough about that code to say >> whether new one can be forged from the old one. I'll take another look= , >> but can not promise anything. >=20 > My first thought I was wrong. r289445 should fix compatibility. >=20 Thank you! While I don't run this setup I could see it being a common issue otherwise. --=20 Regards, Bryan Drewery --NMBpseSAkpGJ0aKCG3N0XV7vWEct4vIFR 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 iQEcBAEBAgAGBQJWImfTAAoJEDXXcbtuRpfPsbwH/RfiVWrtS0fn1njlec6y5LY0 syw4ulJlf5AKyd4CTX2xzVlu0/ARHhLFegC+sBD9REp9g6GME/GTh8WEbnq8a+Cy Zy5t7JUq6XgNXo1T5595esVXfpDR1Qozu2dMXfJQe3+q2FiJbJmyc5ZJHhwYfwYo ETubNDx97y7mdeehun5+eIfQ199kojLYuIwt2rr34HNhFk0PXAgmE2h6HMkpzzbP dW0Zgdw6G1cvOOUQmg8ZT+SMS7uoCIgOQZkI3E8qrEgR9eR/7otrI/8DNhtzdsHn /gr3yANFpmgrGAxznf4et8EU0q3uBnw6YvfuybG8K2isfas5PHUZmBsMuCG9na4= =CyvI -----END PGP SIGNATURE----- --NMBpseSAkpGJ0aKCG3N0XV7vWEct4vIFR-- From owner-svn-src-all@freebsd.org Sat Oct 17 15:50:54 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 26A7CA1755E; Sat, 17 Oct 2015 15:50:54 +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 E5E0EFF1; Sat, 17 Oct 2015 15:50:53 +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 t9HFor3G082344; Sat, 17 Oct 2015 15:50:53 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9HFoqTR082343; Sat, 17 Oct 2015 15:50:52 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201510171550.t9HFoqTR082343@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Sat, 17 Oct 2015 15:50:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289458 - 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 " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 17 Oct 2015 15:50:54 -0000 Author: bdrewery Date: Sat Oct 17 15:50:52 2015 New Revision: 289458 URL: https://svnweb.freebsd.org/changeset/base/289458 Log: Conditionalize the META_MODE tool handling on MK_META_MODE. It was not being used outside of META_MODE but this should make it more clear that it is only for META_MODE. Sponsored by: EMC / Isilon Storage Division Modified: head/lib/clang/clang.build.mk Modified: head/lib/clang/clang.build.mk ============================================================================== --- head/lib/clang/clang.build.mk Sat Oct 17 14:58:55 2015 (r289457) +++ head/lib/clang/clang.build.mk Sat Oct 17 15:50:52 2015 (r289458) @@ -39,6 +39,7 @@ CXXFLAGS.clang+= -stdlib=libc++ .PATH: ${LLVM_SRCS}/${SRCDIR} +.if ${MK_META_MODE} == "yes" .if empty(TOOLSDIR) || !exists(${TOOLSDIR}/usr/bin/clang-tblgen) .if ${MACHINE} == "host" && defined(BOOTSTRAPPING_TOOLS) .if !empty(LEGACY_TOOLS) && exists(${LEGACY_TOOLS}/usr/bin/tblgen) @@ -57,6 +58,7 @@ TOOLSDIR?= TBLGEN= ${TOOLSDIR}/usr/bin/tblgen CLANG_TBLGEN= ${TOOLSDIR}/usr/bin/clang-tblgen .endif +.endif # ${MK_META_MODE} == "yes" TBLGEN?= tblgen CLANG_TBLGEN?= clang-tblgen From owner-svn-src-all@freebsd.org Sat Oct 17 16:05:44 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1818AA17BAB; Sat, 17 Oct 2015 16:05:44 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D5A031B12; Sat, 17 Oct 2015 16:05:43 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t9HG5gM2087928; Sat, 17 Oct 2015 16:05:42 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9HG5gxQ087927; Sat, 17 Oct 2015 16:05:42 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201510171605.t9HG5gxQ087927@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Sat, 17 Oct 2015 16:05:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289459 - head/usr.bin/iscsictl X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 17 Oct 2015 16:05:44 -0000 Author: trasz Date: Sat Oct 17 16:05:42 2015 New Revision: 289459 URL: https://svnweb.freebsd.org/changeset/base/289459 Log: Remove write-only variable. Submitted by: Dominic Marks MFC after: 1 month Sponsored by: The FreeBSD Foundation Modified: head/usr.bin/iscsictl/iscsictl.c Modified: head/usr.bin/iscsictl/iscsictl.c ============================================================================== --- head/usr.bin/iscsictl/iscsictl.c Sat Oct 17 15:50:52 2015 (r289458) +++ head/usr.bin/iscsictl/iscsictl.c Sat Oct 17 16:05:42 2015 (r289459) @@ -597,7 +597,6 @@ kernel_wait(int iscsi_fd, int timeout) { struct iscsi_session_state *states = NULL; const struct iscsi_session_state *state; - const struct iscsi_session_conf *conf; struct iscsi_session_list isl; unsigned int i, nentries = 1; bool all_connected; @@ -629,7 +628,6 @@ kernel_wait(int iscsi_fd, int timeout) all_connected = true; for (i = 0; i < isl.isl_nentries; i++) { state = &states[i]; - conf = &state->iss_conf; if (!state->iss_connected) { all_connected = false; From owner-svn-src-all@freebsd.org Sat Oct 17 16:42:56 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7C6A8A17305; Sat, 17 Oct 2015 16:42: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 5389CE86; Sat, 17 Oct 2015 16:42: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 t9HGgt6Q000948; Sat, 17 Oct 2015 16:42:55 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9HGgt8b000945; Sat, 17 Oct 2015 16:42:55 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201510171642.t9HGgt8b000945@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Sat, 17 Oct 2015 16:42:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289460 - in head: . share/mk X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 17 Oct 2015 16:42:56 -0000 Author: bdrewery Date: Sat Oct 17 16:42:54 2015 New Revision: 289460 URL: https://svnweb.freebsd.org/changeset/base/289460 Log: Rework the 'make -n -n' feature such that '-n' recurses and '-N' does not. Bmake has a documented feature of '-N' to skip executing commands which is specifically intended for debugging top-level builds and not recursing into sub-directories. This matches the older 'make -n' behavior we added which made '-n -n' the recursing target and '-n' a non-recursing target. Removing the '-n -n' feature allows the build to work as documented in the bmake manpage with '-n' and '-N'. The older '-n -n' feature was also not documented anywhere that I could see. Note that the ${_+_} var is still needed as currently bmake incorrectly executes '+' commands when '-N' is specified. The '-n' and '-n -n' features were broken for several reasons prior to this. r251748 made '_+_' never expand with '-n -n' which resulted in many sub-directories not being visited until fixed 2 years later in r288391, and many targets were given .MAKE over the past few years which resulted in non-sub-make commands, such as rm and ln and mtree, to be executed. This should also allow removing some indirection hacks in bsd.subdir.mk and other cases of .USE that have a .MAKE by using '+'. Sponsored by: EMC / Isilon Storage Division Discussed on: arch@ (mostly silence) Modified: head/Makefile head/UPDATING head/share/mk/sys.mk Modified: head/Makefile ============================================================================== --- head/Makefile Sat Oct 17 16:05:42 2015 (r289459) +++ head/Makefile Sat Oct 17 16:42:54 2015 (r289460) @@ -243,14 +243,8 @@ cleanworld: # Handle the user-driven targets, using the source relative mk files. # -.if !(!empty(.MAKEFLAGS:M-n) && ${.MAKEFLAGS:M-n} == "-n") -# skip this for -n to avoid changing previous behavior of -# 'make -n buildworld' etc. Using -n -n will run it. -${TGTS}: .MAKE tinderbox toolchains kernel-toolchains: .MAKE -.endif - -${TGTS}: .PHONY +${TGTS}: .PHONY .MAKE ${_+_}@cd ${.CURDIR}; ${_MAKE} ${.TARGET} # The historic default "all" target creates files which may cause stale Modified: head/UPDATING ============================================================================== --- head/UPDATING Sat Oct 17 16:05:42 2015 (r289459) +++ head/UPDATING Sat Oct 17 16:42:54 2015 (r289460) @@ -31,6 +31,12 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 11 disable the most expensive debugging functionality run "ln -s 'abort:false,junk:false' /etc/malloc.conf".) +20151017: + The build previously allowed using 'make -n' to not recurse into + sub-directories while showing what commands would be executed, and + 'make -n -n' to recursively show commands. Now 'make -n' will recurse + and 'make -N' will not. + 20151012: If you specify SENDMAIL_MC or SENDMAIL_CF in make.conf, mergemaster and etcupdate will now use this file. A custom sendmail.cf is now Modified: head/share/mk/sys.mk ============================================================================== --- head/share/mk/sys.mk Sat Oct 17 16:05:42 2015 (r289459) +++ head/share/mk/sys.mk Sat Oct 17 16:42:54 2015 (r289460) @@ -145,13 +145,12 @@ ECHODIR ?= true .endif .endif -.if defined(.PARSEDIR) -# _+_ appears to be a workaround for the special src .MAKE not working. -# setting it to + interferes with -N -_+_ ?= -.elif !empty(.MAKEFLAGS:M-n) && ${.MAKEFLAGS:M-n} == "-n" -# the check above matches only a single -n, so -n -n will result -# in _+_ = + +.if ${.MAKEFLAGS:M-N} +# bmake -N is supposed to skip executing anything but it does not skip +# exeucting '+' commands. The '+' feature is used where .MAKE +# is not safe for the entire target. -N is intended to skip building sub-makes +# so it executing '+' commands is not right. Work around the bug by not +# setting '+' when -N is used. _+_ ?= .else _+_ ?= + From owner-svn-src-all@freebsd.org Sat Oct 17 17:26:46 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 921DEA17B99; Sat, 17 Oct 2015 17:26:46 +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 4A8F96A7; Sat, 17 Oct 2015 17:26:46 +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 t9HHQjVn014563; Sat, 17 Oct 2015 17:26:45 GMT (envelope-from melifaro@FreeBSD.org) Received: (from melifaro@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9HHQi9l014559; Sat, 17 Oct 2015 17:26:44 GMT (envelope-from melifaro@FreeBSD.org) Message-Id: <201510171726.t9HHQi9l014559@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: melifaro set sender to melifaro@FreeBSD.org using -f From: "Alexander V. Chernikov" Date: Sat, 17 Oct 2015 17:26:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289461 - in head/sys: net 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 " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 17 Oct 2015 17:26:46 -0000 Author: melifaro Date: Sat Oct 17 17:26:44 2015 New Revision: 289461 URL: https://svnweb.freebsd.org/changeset/base/289461 Log: Remove several compat functions from pre-fib era. Modified: head/sys/net/route.c head/sys/net/route.h head/sys/netinet/in_rmx.c head/sys/netinet/in_var.h Modified: head/sys/net/route.c ============================================================================== --- head/sys/net/route.c Sat Oct 17 16:42:54 2015 (r289460) +++ head/sys/net/route.c Sat Oct 17 17:26:44 2015 (r289461) @@ -931,13 +931,6 @@ rt_flushifroutes(struct ifnet *ifp) #define ifpaddr info->rti_info[RTAX_IFP] #define flags info->rti_flags -int -rt_getifa(struct rt_addrinfo *info) -{ - - return (rt_getifa_fib(info, RT_DEFAULT_FIB)); -} - /* * Look up rt_addrinfo for a specific fib. Note that if rti_ifa is defined, * it will be referenced so the caller must free it. Modified: head/sys/net/route.h ============================================================================== --- head/sys/net/route.h Sat Oct 17 16:42:54 2015 (r289460) +++ head/sys/net/route.h Sat Oct 17 17:26:44 2015 (r289461) @@ -387,7 +387,6 @@ void rt_flushifroutes(struct ifnet *ifp) /* XXX MRT COMPAT VERSIONS THAT SET UNIVERSE to 0 */ /* Thes are used by old code not yet converted to use multiple FIBS */ -int rt_getifa(struct rt_addrinfo *); void rtalloc_ign(struct route *ro, u_long ignflags); void rtalloc(struct route *ro); /* XXX deprecated, use rtalloc_ign(ro, 0) */ struct rtentry *rtalloc1(struct sockaddr *, int, u_long); Modified: head/sys/netinet/in_rmx.c ============================================================================== --- head/sys/netinet/in_rmx.c Sat Oct 17 16:42:54 2015 (r289460) +++ head/sys/netinet/in_rmx.c Sat Oct 17 17:26:44 2015 (r289461) @@ -228,19 +228,6 @@ in_rtalloc_ign(struct route *ro, u_long rtalloc_ign_fib(ro, ignflags, fibnum); } -int -in_rtrequest( int req, - struct sockaddr *dst, - struct sockaddr *gateway, - struct sockaddr *netmask, - int flags, - struct rtentry **ret_nrt, - u_int fibnum) -{ - return (rtrequest_fib(req, dst, gateway, netmask, - flags, ret_nrt, fibnum)); -} - struct rtentry * in_rtalloc1(struct sockaddr *dst, int report, u_long ignflags, u_int fibnum) { @@ -264,10 +251,3 @@ in_rtalloc(struct route *ro, u_int fibnu rtalloc_ign_fib(ro, 0UL, fibnum); } -#if 0 -int in_rt_getifa(struct rt_addrinfo *, u_int fibnum); -int in_rtioctl(u_long, caddr_t, u_int); -int in_rtrequest1(int, struct rt_addrinfo *, struct rtentry **, u_int); -#endif - - Modified: head/sys/netinet/in_var.h ============================================================================== --- head/sys/netinet/in_var.h Sat Oct 17 16:42:54 2015 (r289460) +++ head/sys/netinet/in_var.h Sat Oct 17 17:26:44 2015 (r289461) @@ -391,8 +391,6 @@ void in_rtalloc(struct route *ro, u_int struct rtentry *in_rtalloc1(struct sockaddr *, int, u_long, u_int); void in_rtredirect(struct sockaddr *, struct sockaddr *, struct sockaddr *, int, struct sockaddr *, u_int); -int in_rtrequest(int, struct sockaddr *, - struct sockaddr *, struct sockaddr *, int, struct rtentry **, u_int); #endif /* _KERNEL */ /* INET6 stuff */ From owner-svn-src-all@freebsd.org Sat Oct 17 17:42:16 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 07AAFA17E89; Sat, 17 Oct 2015 17:42:16 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from mail105.syd.optusnet.com.au (mail105.syd.optusnet.com.au [211.29.132.249]) by mx1.freebsd.org (Postfix) with ESMTP id 8E6CCF6F; Sat, 17 Oct 2015 17:42:15 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from c211-30-166-197.carlnfd1.nsw.optusnet.com.au (c211-30-166-197.carlnfd1.nsw.optusnet.com.au [211.30.166.197]) by mail105.syd.optusnet.com.au (Postfix) with ESMTPS id 93AC810438B5; Sun, 18 Oct 2015 04:42:05 +1100 (AEDT) Date: Sun, 18 Oct 2015 04:42:04 +1100 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: Konstantin Belousov cc: Bruce Evans , Garrett Cooper , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r289332 - head/tools/regression/lib/msun In-Reply-To: <20151017130907.GZ2257@kib.kiev.ua> Message-ID: <20151018032945.S2131@besplex.bde.org> References: <201510142022.t9EKMC1C088993@repo.freebsd.org> <20151015072039.GY2257@kib.kiev.ua> <20151015200157.I2174@besplex.bde.org> <20151017130907.GZ2257@kib.kiev.ua> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Optus-CM-Score: 0 X-Optus-CM-Analysis: v=2.1 cv=H5kmuLsi c=1 sm=1 tr=0 a=KA6XNC2GZCFrdESI5ZmdjQ==:117 a=PO7r1zJSAAAA:8 a=JzwRw_2MAAAA:8 a=kj9zAlcOel0A:10 a=6I5d2MoRAAAA:8 a=zZveqbLd5Ndqbm7dd78A:9 a=4MDDdnzbS4BmB7eP:21 a=7hCw1NtTjnd_u7oe:21 a=CjuIK1q_8ugA:10 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 17 Oct 2015 17:42:16 -0000 On Sat, 17 Oct 2015, Konstantin Belousov wrote: > On Thu, Oct 15, 2015 at 10:12:03PM +1100, Bruce Evans wrote: >> On Thu, 15 Oct 2015, Konstantin Belousov wrote: >> >>> On Wed, Oct 14, 2015 at 08:22:12PM +0000, Garrett Cooper wrote: >>>> Author: ngie >>>> Date: Wed Oct 14 20:22:12 2015 >>>> New Revision: 289332 >>>> URL: https://svnweb.freebsd.org/changeset/base/289332 >>>> >>>> Log: >>>> Fix test-fenv:test_dfl_env when run on some amd64 CPUs >>>> >>>> Compare the fields that the AMD [1] and Intel [2] specs say will be >>>> set once fnstenv returns. >>>> >>>> Not all amd64 capable processors zero out the env.__x87.__other field >>>> (example: AMD Opteron 6308). The AMD64/x64 specs aren't explicit on what the >>>> env.__x87.__other field will contain after fnstenv is executed, so the values >>>> in env.__x87.__other could be filled with arbitrary data depending on how the >>>> CPU-specific implementation of fnstenv. >>> No Intel or AMD CPU write to __other field at all. >> >> No, they all do. >> >> Test on old i386 on old A64: >> ... > No, I did not thought about fegetenv() as executing FXSAVE instruction. > I did knew that fegetenv() is a wrapper around FNSAVE, and I was completely > sure that FNSAVE in the long mode, when executed by a 64bit program, > never writes anything into the %eip/data offset portion of the FNSAVE > area. I suspect that this was motivated by unavoidable 32-bitness of > the store format. fegetenv() is actually a wrapper around FNSTENV, and FNSTENV is a subset of FNSAVE. > I was unable to find a reference in either Intel SDM or in AMD APM which > would support my statement. The closest thing is the claim that the FOP > field is not filled, in the SDM. Still, I wonder how things are really > arranged by hardware for FNSAVE in 64bit mode. Let's check FOP below. > Are your experiments below were done for the 32bit programs, or for 64bit ? > Both FXSAVE and XSAVE area formats and rules would be irrelevant for the > FreeBSD ABI. For amd64, I used the freefall default which I think is long mode, but there is some magic for the pointer size (small model?) BTW, -m32 has been broken on freefall for years. At least libgcc.a is incompatible or not installed. >> ... >> Modified state for fegetenv(): >> X 0000005C 7F 12 00 00 00 00 80 1F FF FF FF FF 63 82 04 08 >> --cw- -mxhi --sw- -mxlo --tw- -pad- ----fip---- >> ----------------- >> X 0000006C 1F 00 1D 05 A0 92 04 08 2F 00 FF FF >> -fcs- -opc- ----foff--- -fds- -pad- >> ----other[16]---------------------- FOP (opc) is clearly filled on i386 (32-bit mode). >> ... >> Test on -current amd64 on Xeon (freefall): >> ... >> Later fegetenv(): >> X 00000060 7f 03 ff ff 00 00 ff ff ff ff ff ff 75 08 40 00 >> X 00000070 43 00 1c 05 20 62 60 00 3b 00 ff ff 80 1f 00 00 FOP is filled to 1c 05 on freefall and to 1D 05 on my old i386. But the instruction is the same (fstpl). The difference is a different encoding of the direct address mode. Futher testing: Only small model seems to be supported. I got relocation errors with messages about R_X86_64_32S for an array of size 4G. malloc() works to allocate arrays larger than 4G. Writing to addresses above 4G in such arrays or on the stack never gave 64-bit offsets. It truncated the offsets to 32 bits and still printed the segment register. Bruce From owner-svn-src-all@freebsd.org Sat Oct 17 18:22:19 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8FA90A170E3; Sat, 17 Oct 2015 18:22:19 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3BA13D4C; Sat, 17 Oct 2015 18:22: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 t9HIMIFi038197; Sat, 17 Oct 2015 18:22:18 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9HIMIKF038196; Sat, 17 Oct 2015 18:22:18 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201510171822.t9HIMIKF038196@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Sat, 17 Oct 2015 18:22:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289462 - 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 " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 17 Oct 2015 18:22:19 -0000 Author: bdrewery Date: Sat Oct 17 18:22:18 2015 New Revision: 289462 URL: https://svnweb.freebsd.org/changeset/base/289462 Log: Fix wrong PATH being set for world 'includes' stage after r289438. The 'includes' target is currently a pseudo target in bsd.subdir.mk that does 'cd ${.CURDIR} && ${MAKE} buildincludes && ${MAKE} installincludes', versus all over targets that just recurse. In Makefile.inc1 the older duplicated bsd.subdir.mk logic for calling 'includes' was being executed in each subdir directly, meaning 'cd lib && make includes' became 'cd lib && make buildincludes && make installincludes'. Now that the bsd.subdir.mk logic is used it is calling 'make buildincludes && make installincludes' from the top-level which pulls in the PATH= from /Makefile. The sub-make logic for 'includes' in bsd.subdir.mk was attempted to be removed in r289282 but turned out to be wrong. I have a working version now but it is not yet ready for commit. So for now in Makefile.inc1 split out 'includes' to 'buildincludes' and 'installincludes' which will avoid the problem. MFC after: 2 weeks X-MFC-With: r289438 Sponsored by: EMC / Isilon Storage Division Modified: head/Makefile.inc1 Modified: head/Makefile.inc1 ============================================================================== --- head/Makefile.inc1 Sat Oct 17 17:26:44 2015 (r289461) +++ head/Makefile.inc1 Sat Oct 17 18:22:18 2015 (r289462) @@ -624,7 +624,8 @@ _includes: @echo "--------------------------------------------------------------" @echo ">>> stage 4.1: building includes" @echo "--------------------------------------------------------------" - ${_+_}cd ${.CURDIR}; ${WMAKE} SHARED=symlinks includes + ${_+_}cd ${.CURDIR}; ${WMAKE} SHARED=symlinks buildincludes + ${_+_}cd ${.CURDIR}; ${WMAKE} SHARED=symlinks installincludes _libraries: @echo @echo "--------------------------------------------------------------" @@ -2268,7 +2269,9 @@ _xi-cross-tools: .endfor _xi-includes: - ${_+_}cd ${.CURDIR}; ${CD2MAKE} -f Makefile.inc1 includes \ + ${_+_}cd ${.CURDIR}; ${CD2MAKE} -f Makefile.inc1 buildincludes \ + DESTDIR=${XDDESTDIR} + ${_+_}cd ${.CURDIR}; ${CD2MAKE} -f Makefile.inc1 installincludes \ DESTDIR=${XDDESTDIR} _xi-libraries: From owner-svn-src-all@freebsd.org Sat Oct 17 18:25:59 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id DBE0EA1725F for ; Sat, 17 Oct 2015 18:25:59 +0000 (UTC) (envelope-from ian@freebsd.org) Received: from pmta2.delivery6.ore.mailhop.org (pmta2.delivery6.ore.mailhop.org [54.200.129.228]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B4AC0FDC for ; Sat, 17 Oct 2015 18:25:59 +0000 (UTC) (envelope-from ian@freebsd.org) Received: from ilsoft.org (unknown [73.34.117.227]) by outbound2.ore.mailhop.org (Halon Mail Gateway) with ESMTPSA; Sat, 17 Oct 2015 18:26:01 +0000 (UTC) Received: from rev (rev [172.22.42.240]) by ilsoft.org (8.14.9/8.14.9) with ESMTP id t9HIPoKl006306; Sat, 17 Oct 2015 12:25:50 -0600 (MDT) (envelope-from ian@freebsd.org) Message-ID: <1445106350.71631.36.camel@freebsd.org> Subject: Re: svn commit: r289421 - in head/etc: . mtree ntp From: Ian Lepore To: Cy Schubert , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Date: Sat, 17 Oct 2015 12:25:50 -0600 In-Reply-To: <201510161404.t9GE4GqM046436@repo.freebsd.org> References: <201510161404.t9GE4GqM046436@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 " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 17 Oct 2015 18:26:00 -0000 On Fri, 2015-10-16 at 14:04 +0000, Cy Schubert wrote: > Author: cy > Date: Fri Oct 16 14:04:16 2015 > New Revision: 289421 > URL: https://svnweb.freebsd.org/changeset/base/289421 > > Log: > Add default leap-seconds file. This should help ntp networks get > the > leap second date correct > > Updates to the file can be obtained from ftp://time.nist.gov/pub/ o > r > ftp://tycho.usno.navy.mil/pub/ntp/. > > Suggested by: dwmalone > Reviewed by: roberto, dwmalone, delphij > Approved by: roberto > MFC after: 1 week One thing about this change scares me. In the ntpd documentation: If the leapseconds file is present, the leap bits for reference clocks and downstratum servers are ignored. I can't determine from casual code examination (and I don't have time to experiment now) whether that is true even if the file is expired. The leapfile expires every six months, and users must update it using some external mechanism, or they must have configured autokey stuff so that updates can be accepted from peer servers. In either case what we've done is created a default configuration that is likely to fail right out of the box, because at least for releases the file we deliver will be expired before they even download and install the image. At the very least I think we should hold off on MFC of this until we know for sure whether an expired-but-present leapfile causes incorrect operation. If a pending leap notification in the leap bits of packets from peer servers and refclocks will be honored when the file is expired, then there is no problem with this change. -- Ian From owner-svn-src-all@freebsd.org Sat Oct 17 18:34:21 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 64035A174D4; Sat, 17 Oct 2015 18:34:21 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:1900:2254:206c::16:87]) by mx1.freebsd.org (Postfix) with ESMTP id 4F80A14CF; Sat, 17 Oct 2015 18:34:21 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from mail.xzibition.com (localhost [IPv6:::1]) by freefall.freebsd.org (Postfix) with ESMTP id 48E0D1DB3; Sat, 17 Oct 2015 18:34:21 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from mail.xzibition.com (localhost [172.31.3.2]) by mail.xzibition.com (Postfix) with ESMTP id 024ED114D3; Sat, 17 Oct 2015 18:34:21 +0000 (UTC) X-Virus-Scanned: amavisd-new at mail.xzibition.com Received: from mail.xzibition.com ([172.31.3.2]) by mail.xzibition.com (mail.xzibition.com [172.31.3.2]) (amavisd-new, port 10026) with LMTP id LLzD5ACfO7rW; Sat, 17 Oct 2015 18:34:16 +0000 (UTC) Subject: Re: svn commit: r289421 - in head/etc: . mtree ntp DKIM-Filter: OpenDKIM Filter v2.9.2 mail.xzibition.com E96A7114CC To: Ian Lepore , Cy Schubert , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201510161404.t9GE4GqM046436@repo.freebsd.org> <1445106350.71631.36.camel@freebsd.org> From: Bryan Drewery Organization: FreeBSD Message-ID: <562294A5.10309@FreeBSD.org> Date: Sat, 17 Oct 2015 11:34:13 -0700 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.11; rv:38.0) Gecko/20100101 Thunderbird/38.3.0 MIME-Version: 1.0 In-Reply-To: <1445106350.71631.36.camel@freebsd.org> 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 " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 17 Oct 2015 18:34:21 -0000 On 10/17/15 11:25 AM, Ian Lepore wrote: > On Fri, 2015-10-16 at 14:04 +0000, Cy Schubert wrote: >> Author: cy >> Date: Fri Oct 16 14:04:16 2015 >> New Revision: 289421 >> URL: https://svnweb.freebsd.org/changeset/base/289421 >> >> Log: >> Add default leap-seconds file. This should help ntp networks get >> the >> leap second date correct >> >> Updates to the file can be obtained from ftp://time.nist.gov/pub/ o >> r >> ftp://tycho.usno.navy.mil/pub/ntp/. >> >> Suggested by: dwmalone >> Reviewed by: roberto, dwmalone, delphij >> Approved by: roberto >> MFC after: 1 week > > One thing about this change scares me. In the ntpd documentation: > > If the leapseconds file is present, the leap bits for reference > clocks and downstratum servers are ignored. > > I can't determine from casual code examination (and I don't have time > to experiment now) whether that is true even if the file is expired. > > The leapfile expires every six months, and users must update it using > some external mechanism, or they must have configured autokey stuff so > that updates can be accepted from peer servers. In either case what > we've done is created a default configuration that is likely to fail > right out of the box, because at least for releases the file we deliver > will be expired before they even download and install the image. > > At the very least I think we should hold off on MFC of this until we > know for sure whether an expired-but-present leapfile causes incorrect > operation. If a pending leap notification in the leap bits of packets > from peer servers and refclocks will be honored when the file is > expired, then there is no problem with this change. > Yeah. This sounds like something that needs to be delivered more easily in a normal update mechanism, such as packages. ENs every 6 months are not practical for this and a lot of users don't always apply EN while IMO they are more likely to apply package upgrades. Short of that, some kind of periodic script could fetch an updated file . -- Regards, Bryan Drewery From owner-svn-src-all@freebsd.org Sat Oct 17 18:53:03 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id CD78CA17918; Sat, 17 Oct 2015 18:53:03 +0000 (UTC) (envelope-from jmg@gold.funkthat.com) Received: from gold.funkthat.com (gate2.funkthat.com [208.87.223.18]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client CN "gold.funkthat.com", Issuer "gold.funkthat.com" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id AD4BC1FC0; Sat, 17 Oct 2015 18:53:03 +0000 (UTC) (envelope-from jmg@gold.funkthat.com) Received: from gold.funkthat.com (localhost [127.0.0.1]) by gold.funkthat.com (8.14.5/8.14.5) with ESMTP id t9HIr3lk065344 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sat, 17 Oct 2015 11:53:03 -0700 (PDT) (envelope-from jmg@gold.funkthat.com) Received: (from jmg@localhost) by gold.funkthat.com (8.14.5/8.14.5/Submit) id t9HIr3il065343; Sat, 17 Oct 2015 11:53:03 -0700 (PDT) (envelope-from jmg) Date: Sat, 17 Oct 2015 11:53:03 -0700 From: John-Mark Gurney To: Garrett Cooper Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r289451 - head/share/zoneinfo Message-ID: <20151017185302.GS67524@funkthat.com> References: <201510170926.t9H9QGPb071820@repo.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201510170926.t9H9QGPb071820@repo.freebsd.org> X-Operating-System: FreeBSD 9.1-PRERELEASE amd64 X-PGP-Fingerprint: 54BA 873B 6515 3F10 9E88 9322 9CB1 8F74 6D3F A396 X-Files: The truth is out there X-URL: http://resnet.uoregon.edu/~gurney_j/ X-Resume: http://resnet.uoregon.edu/~gurney_j/resume.html X-TipJar: bitcoin:13Qmb6AeTgQecazTWph4XasEsP7nGRbAPE X-to-the-FBI-CIA-and-NSA: HI! HOW YA DOIN? can i haz chizburger? User-Agent: Mutt/1.5.21 (2010-09-15) X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.2.7 (gold.funkthat.com [127.0.0.1]); Sat, 17 Oct 2015 11:53:03 -0700 (PDT) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 17 Oct 2015 18:53:03 -0000 Garrett Cooper wrote this message on Sat, Oct 17, 2015 at 09:26 +0000: > Author: ngie > Date: Sat Oct 17 09:26:16 2015 > New Revision: 289451 > URL: https://svnweb.freebsd.org/changeset/base/289451 > > Log: > Install share/zoneinfo in a deterministic way by sorting the results from find > > This helps produce deterministic METALOG output We seem to have duplicate installs happening again: /tmp/makeroot.UHdcn/manifest:161: warning: duplicate definition of mailer.conf /tmp/makeroot.UHdcn/manifest:935: warning: duplicate definition of dtc /tmp/makeroot.UHdcn/manifest:4334: warning: duplicate definition of usr /tmp/makeroot.UHdcn/manifest:4354: warning: duplicate definition of tests /tmp/makeroot.UHdcn/manifest:5721: warning: duplicate definition of 10.exref /tmp/makeroot.UHdcn/manifest:5724: warning: duplicate definition of 12.vi /tmp/makeroot.UHdcn/manifest:5725: warning: duplicate definition of 12.vi This is after an installworld/distribution to the same directory... This would be a great jenkins test IMO... -- John-Mark Gurney Voice: +1 415 225 5579 "All that I will do, has been done, All that I have, has not." From owner-svn-src-all@freebsd.org Sat Oct 17 18:59:15 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id CD6FBA179CD; Sat, 17 Oct 2015 18:59:15 +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 94F3E1C4; Sat, 17 Oct 2015 18:59:15 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t9HIxEVR047835; Sat, 17 Oct 2015 18:59:14 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9HIxEqa047834; Sat, 17 Oct 2015 18:59:14 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201510171859.t9HIxEqa047834@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Sat, 17 Oct 2015 18:59:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289464 - 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 " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 17 Oct 2015 18:59:15 -0000 Author: bdrewery Date: Sat Oct 17 18:59:14 2015 New Revision: 289464 URL: https://svnweb.freebsd.org/changeset/base/289464 Log: Remove unneeded MK_CTF=no when MK_CDDL=no. This has been handled since r228158 made MK_CTF dependent on MK_CDDL in share/mk/bsd.opts.mk. MFC after: 2 weeks Sponsored by: EMC / Isilon Storage Division Modified: head/Makefile.inc1 Modified: head/Makefile.inc1 ============================================================================== --- head/Makefile.inc1 Sat Oct 17 18:35:40 2015 (r289463) +++ head/Makefile.inc1 Sat Oct 17 18:59:14 2015 (r289464) @@ -325,10 +325,6 @@ HMAKE= PATH=${TMPPATH} ${MAKE} LOCAL_MT HMAKE+= PATH=${TMPPATH} METALOG=${METALOG} -DNO_ROOT .endif -.if ${MK_CDDL} == "no" -WMAKEENV+= MK_CTF=no -.endif - .if defined(CROSS_TOOLCHAIN) LOCALBASE?= /usr/local .include "${LOCALBASE}/share/toolchains/${CROSS_TOOLCHAIN}.mk" From owner-svn-src-all@freebsd.org Sat Oct 17 19:01:32 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7046BA17B24; Sat, 17 Oct 2015 19:01:32 +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 5C6846D6; Sat, 17 Oct 2015 19:01:32 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from mail.xzibition.com (localhost [IPv6:::1]) by freefall.freebsd.org (Postfix) with ESMTP id 5563E1562; Sat, 17 Oct 2015 19:01:32 +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 13DF111551; Sat, 17 Oct 2015 19:01:32 +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 5QBIXWlRTQOf; Sat, 17 Oct 2015 19:01:25 +0000 (UTC) Subject: Re: svn commit: r289451 - head/share/zoneinfo DKIM-Filter: OpenDKIM Filter v2.9.2 mail.xzibition.com EA88D11549 To: John-Mark Gurney , Garrett Cooper References: <201510170926.t9H9QGPb071820@repo.freebsd.org> <20151017185302.GS67524@funkthat.com> Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org From: Bryan Drewery Organization: FreeBSD Message-ID: <56229B03.3080109@FreeBSD.org> Date: Sat, 17 Oct 2015 12:01:23 -0700 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.11; rv:38.0) Gecko/20100101 Thunderbird/38.3.0 MIME-Version: 1.0 In-Reply-To: <20151017185302.GS67524@funkthat.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 " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 17 Oct 2015 19:01:32 -0000 On 10/17/15 11:53 AM, John-Mark Gurney wrote: > Garrett Cooper wrote this message on Sat, Oct 17, 2015 at 09:26 +0000: >> Author: ngie >> Date: Sat Oct 17 09:26:16 2015 >> New Revision: 289451 >> URL: https://svnweb.freebsd.org/changeset/base/289451 >> >> Log: >> Install share/zoneinfo in a deterministic way by sorting the results from find >> >> This helps produce deterministic METALOG output > > We seem to have duplicate installs happening again: > /tmp/makeroot.UHdcn/manifest:161: warning: duplicate definition of mailer.conf > /tmp/makeroot.UHdcn/manifest:935: warning: duplicate definition of dtc > /tmp/makeroot.UHdcn/manifest:4334: warning: duplicate definition of usr > /tmp/makeroot.UHdcn/manifest:4354: warning: duplicate definition of tests > /tmp/makeroot.UHdcn/manifest:5721: warning: duplicate definition of 10.exref > /tmp/makeroot.UHdcn/manifest:5724: warning: duplicate definition of 12.vi > /tmp/makeroot.UHdcn/manifest:5725: warning: duplicate definition of 12.vi > > This is after an installworld/distribution to the same directory... > > This would be a great jenkins test IMO... > How new is this / when did you last check for warnings? -- Regards, Bryan Drewery From owner-svn-src-all@freebsd.org Sat Oct 17 19:10:02 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C5C83A17B95; Sat, 17 Oct 2015 19:10:02 +0000 (UTC) (envelope-from jmg@gold.funkthat.com) Received: from gold.funkthat.com (gate2.funkthat.com [208.87.223.18]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client CN "gold.funkthat.com", Issuer "gold.funkthat.com" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 7AA449A4; Sat, 17 Oct 2015 19:10:02 +0000 (UTC) (envelope-from jmg@gold.funkthat.com) Received: from gold.funkthat.com (localhost [127.0.0.1]) by gold.funkthat.com (8.14.5/8.14.5) with ESMTP id t9HJA1LB065616 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sat, 17 Oct 2015 12:10:01 -0700 (PDT) (envelope-from jmg@gold.funkthat.com) Received: (from jmg@localhost) by gold.funkthat.com (8.14.5/8.14.5/Submit) id t9HJA1OL065615; Sat, 17 Oct 2015 12:10:01 -0700 (PDT) (envelope-from jmg) Date: Sat, 17 Oct 2015 12:10:01 -0700 From: John-Mark Gurney To: Bryan Drewery Cc: Garrett Cooper , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r289451 - head/share/zoneinfo Message-ID: <20151017191001.GU67524@funkthat.com> References: <201510170926.t9H9QGPb071820@repo.freebsd.org> <20151017185302.GS67524@funkthat.com> <56229B03.3080109@FreeBSD.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <56229B03.3080109@FreeBSD.org> X-Operating-System: FreeBSD 9.1-PRERELEASE amd64 X-PGP-Fingerprint: 54BA 873B 6515 3F10 9E88 9322 9CB1 8F74 6D3F A396 X-Files: The truth is out there X-URL: http://resnet.uoregon.edu/~gurney_j/ X-Resume: http://resnet.uoregon.edu/~gurney_j/resume.html X-TipJar: bitcoin:13Qmb6AeTgQecazTWph4XasEsP7nGRbAPE X-to-the-FBI-CIA-and-NSA: HI! HOW YA DOIN? can i haz chizburger? User-Agent: Mutt/1.5.21 (2010-09-15) X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.2.7 (gold.funkthat.com [127.0.0.1]); Sat, 17 Oct 2015 12:10:01 -0700 (PDT) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 17 Oct 2015 19:10:02 -0000 Bryan Drewery wrote this message on Sat, Oct 17, 2015 at 12:01 -0700: > On 10/17/15 11:53 AM, John-Mark Gurney wrote: > > Garrett Cooper wrote this message on Sat, Oct 17, 2015 at 09:26 +0000: > >> Author: ngie > >> Date: Sat Oct 17 09:26:16 2015 > >> New Revision: 289451 > >> URL: https://svnweb.freebsd.org/changeset/base/289451 > >> > >> Log: > >> Install share/zoneinfo in a deterministic way by sorting the results from find > >> > >> This helps produce deterministic METALOG output > > > > We seem to have duplicate installs happening again: > > /tmp/makeroot.UHdcn/manifest:161: warning: duplicate definition of mailer.conf > > /tmp/makeroot.UHdcn/manifest:935: warning: duplicate definition of dtc > > /tmp/makeroot.UHdcn/manifest:4334: warning: duplicate definition of usr > > /tmp/makeroot.UHdcn/manifest:4354: warning: duplicate definition of tests > > /tmp/makeroot.UHdcn/manifest:5721: warning: duplicate definition of 10.exref > > /tmp/makeroot.UHdcn/manifest:5724: warning: duplicate definition of 12.vi > > /tmp/makeroot.UHdcn/manifest:5725: warning: duplicate definition of 12.vi > > > > This is after an installworld/distribution to the same directory... > > > > This would be a great jenkins test IMO... > > How new is this / when did you last check for warnings? It's been a number of months, since this spring or summer, when I last had a non-duplicate set of installs... I'm pretty sure either ngie or I fixed the mailer.conf last time... -- John-Mark Gurney Voice: +1 415 225 5579 "All that I will do, has been done, All that I have, has not." From owner-svn-src-all@freebsd.org Sat Oct 17 19:19:49 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6DB5DA17DD1 for ; Sat, 17 Oct 2015 19:19:49 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from mail-pa0-f53.google.com (mail-pa0-f53.google.com [209.85.220.53]) (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 42F22E34 for ; Sat, 17 Oct 2015 19:19:48 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: by pacfv9 with SMTP id fv9so53461678pac.3 for ; Sat, 17 Oct 2015 12:19:48 -0700 (PDT) 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=RKwktKO5rPO/1jw3+xeUafypGTwoQARVGX2nMc2q/pU=; b=Uw5RUqI5HnlUwBicavUrrXRzCJ41bQl6H1t4cEE4HccsIxcM8QuxYizMPZstr9yKIb jZ9jl19pAJ3lrYdvYWhmf41AdUXK0TmEte+SEFfrx9+T6GQMgU/hn3BabRCe4Aph1tlq PKY4kpL//J5Kz0NP87GwCEYuqZp66j7ugy8QrbfXuVPIJK8rfJELJz5mDSrgnm3L4CQc km/WZvs62SNWkn+MVmEeV6GVsD+6dxBFmjwkXTfCTSPaUWwNbPHWwAqIqBtnHtA4/ggm WVc0UIloL2b14w574Ta8T4a4SQXs3uNyNqMOZOLROYW6StnM47ncdCNdf6Bi84iSSW00 OtJw== X-Gm-Message-State: ALoCoQlWp7myHDXQkjxgLSuPb0SQlfCUBJC4ixXxom+TRBZYvO1V1BVTvAXILWsOP8DULuYTKiVp X-Received: by 10.66.131.81 with SMTP id ok17mr23955803pab.150.1445109587980; Sat, 17 Oct 2015 12:19:47 -0700 (PDT) Received: from ip-100-127-128-53.ec2.internal ([69.53.245.5]) by smtp.gmail.com with ESMTPSA id bs3sm27868044pbd.89.2015.10.17.12.19.46 (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sat, 17 Oct 2015 12:19:47 -0700 (PDT) Sender: Warner Losh Subject: Re: svn commit: r289421 - in head/etc: . mtree ntp Mime-Version: 1.0 (Mac OS X Mail 8.2 \(2104\)) Content-Type: multipart/signed; boundary="Apple-Mail=_60572A67-97E7-4200-AEF6-88DC6354712B"; protocol="application/pgp-signature"; micalg=pgp-sha512 X-Pgp-Agent: GPGMail 2.5.2 From: Warner Losh In-Reply-To: <201510161404.t9GE4GqM046436@repo.freebsd.org> Date: Sat, 17 Oct 2015 13:19:44 -0600 Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Message-Id: <8154492E-C29E-41B1-A13B-34E33586DEC6@bsdimp.com> References: <201510161404.t9GE4GqM046436@repo.freebsd.org> To: Cy Schubert 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 " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 17 Oct 2015 19:19:49 -0000 --Apple-Mail=_60572A67-97E7-4200-AEF6-88DC6354712B Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 Until the next leap second=E2=80=A6. It would be better to just always try to grab the latest one=E2=80=A6 Can we put something in periodic to do that so users that have releases that are older than 6 months aren=E2=80=99t screwed? Warner > On Oct 16, 2015, at 8:04 AM, Cy Schubert wrote: >=20 > Author: cy > Date: Fri Oct 16 14:04:16 2015 > New Revision: 289421 > URL: https://svnweb.freebsd.org/changeset/base/289421 >=20 > Log: > Add default leap-seconds file. This should help ntp networks get the > leap second date correct >=20 > Updates to the file can be obtained from ftp://time.nist.gov/pub/ or > ftp://tycho.usno.navy.mil/pub/ntp/. >=20 > Suggested by: dwmalone > Reviewed by: roberto, dwmalone, delphij > Approved by: roberto > MFC after: 1 week >=20 > Added: > head/etc/ntp/ > head/etc/ntp/Makefile (contents, props changed) > head/etc/ntp/leap-seconds (contents, props changed) > Modified: > head/etc/Makefile > head/etc/mtree/BSD.var.dist > head/etc/ntp.conf >=20 > Modified: head/etc/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/etc/Makefile Fri Oct 16 12:53:22 2015 (r289420) > +++ head/etc/Makefile Fri Oct 16 14:04:16 2015 (r289421) > @@ -240,6 +240,9 @@ distribution: > ${_+_}cd ${.CURDIR}/defaults; ${MAKE} install > ${_+_}cd ${.CURDIR}/devd; ${MAKE} install > ${_+_}cd ${.CURDIR}/gss; ${MAKE} install > +.if ${MK_NTP} !=3D "no" > + ${_+_}cd ${.CURDIR}/ntp; ${MAKE} install > +.endif > ${_+_}cd ${.CURDIR}/periodic; ${MAKE} install > .if ${MK_PKGBOOTSTRAP} !=3D "no" > ${_+_}cd ${.CURDIR}/pkg; ${MAKE} install >=20 > Modified: head/etc/mtree/BSD.var.dist > = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=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/etc/mtree/BSD.var.dist Fri Oct 16 12:53:22 2015 = (r289420) > +++ head/etc/mtree/BSD.var.dist Fri Oct 16 14:04:16 2015 = (r289421) > @@ -46,6 +46,8 @@ > .. > ipf mode=3D0700 > .. > + ntp mode=3D0700 > + .. > pkg > .. > ports >=20 > Modified: head/etc/ntp.conf > = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=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/etc/ntp.conf Fri Oct 16 12:53:22 2015 (r289420) > +++ head/etc/ntp.conf Fri Oct 16 14:04:16 2015 (r289421) > @@ -77,3 +77,8 @@ restrict 127.127.1.0 > # > #server 127.127.1.0 > #fudge 127.127.1.0 stratum 10 > + > +# See = http://support.ntp.org/bin/view/Support/ConfiguringNTP#Section_6.14. > +# for documentation regarding leapfile. Updates to the file can be = obtained > +# from ftp://time.nist.gov/pub/ or = ftp://tycho.usno.navy.mil/pub/ntp/. > +leapfile "/etc/ntp/leap-seconds" >=20 > Added: head/etc/ntp/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 > --- /dev/null 00:00:00 1970 (empty, because file is newly added) > +++ head/etc/ntp/Makefile Fri Oct 16 14:04:16 2015 = (r289421) > @@ -0,0 +1,10 @@ > +# $FreeBSD$ > + > +NO_OBJ=3D > + > +FILES=3D leap-seconds > + > +FILESDIR=3D /etc/ntp > +FILESMODE=3D 644 > + > +.include >=20 > Added: head/etc/ntp/leap-seconds > = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D > --- /dev/null 00:00:00 1970 (empty, because file is newly added) > +++ head/etc/ntp/leap-seconds Fri Oct 16 14:04:16 2015 = (r289421) > @@ -0,0 +1,119 @@ > +# > +# $FreeBSD$ > +# > +# ATOMIC TIME. > +# The Coordinated Universal Time (UTC) is the reference time scale = derived > +# from The "Temps Atomique International" (TAI) calculated by the = Bureau > +# International des Poids et Mesures (BIPM) using a worldwide = network of atomic > +# clocks. UTC differs from TAI by an integer number of seconds; it = is the basis > +# of all activities in the world. > +# > +# > +# ASTRONOMICAL TIME (UT1) is the time scale based on the rate of = rotation of the earth. > +# It is now mainly derived from Very Long Baseline Interferometry = (VLBI). The various > +# irregular fluctuations progressively detected in the rotation = rate of the Earth lead > +# in 1972 to the replacement of UT1 by UTC as the reference time = scale. > +# > +# > +# LEAP SECOND > +# Atomic clocks are more stable than the rate of the earth = rotatiob since the later > +# undergoes a full range of geophysical perturbations at various = time scales (lunisolar > +# and core-mantle torques,atmospheric and oceanic effetcs, ...) > +# Leap seconds are needed to keep the two time scales in = agreement, i.e. UT1-UTC smaller > +# than 0.9 second. So, when necessary a "leap second" is = introduced in UTC. > +# Since the adoption of this system in 1972 it has been necessary = to add 26 seconds to UTC, > +# firstly due to the initial choice of the value of the second = (1/86400 mean solar day of > +# the year 1820) and secondly to the general slowing down of the = Earth's rotation. It is > +# theorically possible to have a negative leap second (a second = removed from UTC), but so far, > +# all leap seconds have been positive (a second has been added to = UTC). Based on what we know about the earth's rotation, > +# it is unlikely that we will ever have a negative leap second. > +# > +# > +# HISTORY > +# The first leap second was added on June 30, 1972. Until 2000, it = was necessary in average to add a leap second at a rate > +# of 1 to 2 years. Since 2000, due to the fact that the earth rate = of rotation is accelerating, leap seconds are introduced > +# with an average frequency of 3 to 4 years. > +# > +# > +# RESPONSABILITY OF THE DECISION TO INTRODUCE A LEAP SECOND IN UTC > +# The decision to introduce a leap second in UTC is the = responsibility of the Earth Orientation Center of > +# the International Earth Rotation and reference System Service = (IERS). This center is located at Paris > +# Observatory. According to international agreements, leap second = date have to occur at fixed date : > +# first preference is given to the end of December and June, and = second preference at the end of March > +# and September. Since the system was introduced in 1972, only = dates in June and December were used. > +# > +# Questions or comments to: > +# Daniel Gambis, daniel.gambis@obspm.fr > +# Christian Bizouard: christian.bizouard@obspm.fr > +# Earth orientation Center of the IERS > +# Paris Observatory, France > +# > +# > +# > +# VALIDITY OF THE FILE > +# It is important to express the validity of the file. These next = two dates are > +# given in units of seconds since 1900.0. > +# > +# 1) Last update of the file. > +# > +# Updated through IERS Bulletin C = (ftp://hpiers.obspm.fr/iers/bul/bulc/bulletinc.dat) > +# > +# The following line shows the last update of this file in NTP = timestamp: > +# > +#$ 3645216000 > +# > +# 2) Expiration date of the file given on a semi-annual basis: = last June or last December > +# > +# File expires on 28 December 2015 > +# > +# Expire date in NTP timestamp: > +# > +#@ 3660249600 > +# > +# > +# LIST OF LEAP SECONDS > +# NTP timestamp (X parameter) is the number of seconds since = 1900.0 > +# > +# MJD: The Modified Julian Day number. MJD =3D X/86400 + 15020 > +# > +# DTAI: The difference DTAI=3D TAI-UTC in units of seconds > +# It is the quantity to add to UTC to get the time in TAI > +# > +# Day Month Year : epoch in clear > +# > +#NTP Time DTAI Day Month Year > +# > +2272060800 10 # 1 Jan 1972 > +2287785600 11 # 1 Jul 1972 > +2303683200 12 # 1 Jan 1973 > +2335219200 13 # 1 Jan 1974 > +2366755200 14 # 1 Jan 1975 > +2398291200 15 # 1 Jan 1976 > +2429913600 16 # 1 Jan 1977 > +2461449600 17 # 1 Jan 1978 > +2492985600 18 # 1 Jan 1979 > +2524521600 19 # 1 Jan 1980 > +2571782400 20 # 1 Jul 1981 > +2603318400 21 # 1 Jul 1982 > +2634854400 22 # 1 Jul 1983 > +2698012800 23 # 1 Jul 1985 > +2776982400 24 # 1 Jan 1988 > +2840140800 25 # 1 Jan 1990 > +2871676800 26 # 1 Jan 1991 > +2918937600 27 # 1 Jul 1992 > +2950473600 28 # 1 Jul 1993 > +2982009600 29 # 1 Jul 1994 > +3029443200 30 # 1 Jan 1996 > +3076704000 31 # 1 Jul 1997 > +3124137600 32 # 1 Jan 1999 > +3345062400 33 # 1 Jan 2006 > +3439756800 34 # 1 Jan 2009 > +3550089600 35 # 1 Jul 2012 > +3644697600 36 # 1 Jul 2015 > +# > +# In order to verify the integrity of this file, a hash code > +# has been generated. For more information how to use > +# this hash code, please consult the README file under the > +# 'sha' repertory. > +# > +#h 620ba8af 37900668 95ac09ba d77640f9 6fd75493 >=20 --Apple-Mail=_60572A67-97E7-4200-AEF6-88DC6354712B 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 iQIcBAEBCgAGBQJWIp9QAAoJEGwc0Sh9sBEA8GMP/RxMSBQvI0BKgbMfYZh7+x2w gGPNOl5FrDjv6R1QxM2alDe3sEZmhNsZ5o0Ekso4kA/uzz5hF9eElp2EA0wn2DMa 1IWJKbLUwLsKvN5bC2cMVmzlklqknm9R7EVyRwPB1Q9jgN8cQV4q01tN96XzbCmQ 1M2Tg8CccnpI9hpdOLjpZQB72kr+rTUm9YrIuiP+nq62NjP4u4UyquKOeUfyyZP1 WnpDNHNknvzlhCnXiexFHUtueL0bAjnSs0F9C7k661xtdt43q/zp0VWkTUeib8/y o64PLOmq3dRK+PLDwRLY94OSpe5QqDivyR4H0BAbKbV97GjC/9byhJenR2J+5GUC 2w54ddlW6rr7rE5kZYd8E5DSoMlmunpm1rMbEwHLHtRXxorZxDUMvj779VS4rj2b MDxVngI/H0/o3inpSZjsqyLqNut8h204r64m2W5MWTMUJ5z1Evb/Uj6Gewfu3rk2 kALtxq32we0Edt8VjYUAOOG/ZjTUWdBY0DPsDBeqjeYqkTNP7Ebgj0z0P69UYRsu XBuMd7ONzSDSAGYXHbyBa2eLhPxDpInBPZ/R4agybBQIJ1qKv6PtV0VH8VGYzADm DhrVGOsSc/yyou+YX7EzTT4F0S1gjPEgO4wopmZdOUFaNBzE8n8UVxTmT4jMlrTH SchUp801COK+osnNyG4c =3+ya -----END PGP SIGNATURE----- --Apple-Mail=_60572A67-97E7-4200-AEF6-88DC6354712B-- From owner-svn-src-all@freebsd.org Sat Oct 17 19:24:21 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 78651A17061 for ; Sat, 17 Oct 2015 19:24:21 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from mail-pa0-f54.google.com (mail-pa0-f54.google.com [209.85.220.54]) (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 44CDE66A for ; Sat, 17 Oct 2015 19:24:21 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: by pabrc13 with SMTP id rc13so150770188pab.0 for ; Sat, 17 Oct 2015 12:24:14 -0700 (PDT) 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=E4y1uvCRxIqlBJ8ACe/VaTP9+pBS5bixABBRYxWGSo0=; b=C+N1H1DxnOjUg65r/+jXAspgqAM3LiTMh81v5+7VPLoF49J3GZhuQuoimjkm+vciZQ 0OtDOunW0qFz05yxyzPzAq1uoeahxbDXwdtnYzxnyym/BLmow7DnyYNauo06kBjZE00q Y65Mbn+LCBFnCqFJrZej1Ht8CATk43r5CQYLhxKW5nmqj8wvEQ5Zikh0w9asIhekOht9 yUk6zfuo3Q8DPPgGsdEEuVj3xcNFLVHakFwRuZYeZyjtBgkAa7kU2lYYtyjpsrGBrE4z CawoWRC3tC9sgY4D6NVemh+3fECpPcvYImr+uwX/OZLkZJkD8WnOYb+TiyxnQvsvGbtq hGjw== X-Gm-Message-State: ALoCoQn00Uz00YnWDMWg5JWkzbSGh3SPWw/KlGQiZ9DkDS0nb/gylanELHH2pkysrGtWxPDi4tKM X-Received: by 10.68.165.34 with SMTP id yv2mr24394581pbb.112.1445109854830; Sat, 17 Oct 2015 12:24:14 -0700 (PDT) Received: from ip-100-127-128-53.ec2.internal ([69.53.245.5]) by smtp.gmail.com with ESMTPSA id u10sm27890182pbs.63.2015.10.17.12.24.13 (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sat, 17 Oct 2015 12:24:14 -0700 (PDT) Sender: Warner Losh Subject: Re: svn commit: r289421 - in head/etc: . mtree ntp Mime-Version: 1.0 (Mac OS X Mail 8.2 \(2104\)) Content-Type: multipart/signed; boundary="Apple-Mail=_16F1F0DA-759B-465C-8562-B362DD59EF9A"; protocol="application/pgp-signature"; micalg=pgp-sha512 X-Pgp-Agent: GPGMail 2.5.2 From: Warner Losh In-Reply-To: <562294A5.10309@FreeBSD.org> Date: Sat, 17 Oct 2015 13:24:12 -0600 Cc: Ian Lepore , Cy Schubert , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Message-Id: <8B01FEEE-71A5-4F0A-B733-D0846920C6D0@bsdimp.com> References: <201510161404.t9GE4GqM046436@repo.freebsd.org> <1445106350.71631.36.camel@freebsd.org> <562294A5.10309@FreeBSD.org> To: Bryan Drewery 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 " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 17 Oct 2015 19:24:21 -0000 --Apple-Mail=_16F1F0DA-759B-465C-8562-B362DD59EF9A Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=windows-1252 > On Oct 17, 2015, at 12:34 PM, Bryan Drewery = wrote: >=20 > On 10/17/15 11:25 AM, Ian Lepore wrote: >> On Fri, 2015-10-16 at 14:04 +0000, Cy Schubert wrote: >>> Author: cy >>> Date: Fri Oct 16 14:04:16 2015 >>> New Revision: 289421 >>> URL: https://svnweb.freebsd.org/changeset/base/289421 >>>=20 >>> Log: >>> Add default leap-seconds file. This should help ntp networks get >>> the >>> leap second date correct >>>=20 >>> Updates to the file can be obtained from ftp://time.nist.gov/pub/ o >>> r >>> ftp://tycho.usno.navy.mil/pub/ntp/. >>>=20 >>> Suggested by: dwmalone >>> Reviewed by: roberto, dwmalone, delphij >>> Approved by: roberto >>> MFC after: 1 week >>=20 >> One thing about this change scares me. In the ntpd documentation: >>=20 >> If the leapseconds file is present, the leap bits for reference >> clocks and downstratum servers are ignored. >>=20 >> I can't determine from casual code examination (and I don't have time >> to experiment now) whether that is true even if the file is expired. >>=20 >> The leapfile expires every six months, and users must update it using >> some external mechanism, or they must have configured autokey stuff = so >> that updates can be accepted from peer servers. In either case what >> we've done is created a default configuration that is likely to fail >> right out of the box, because at least for releases the file we = deliver >> will be expired before they even download and install the image. >>=20 >> At the very least I think we should hold off on MFC of this until we >> know for sure whether an expired-but-present leapfile causes = incorrect >> operation. If a pending leap notification in the leap bits of = packets >> from peer servers and refclocks will be honored when the file is >> expired, then there is no problem with this change. >>=20 >=20 > Yeah. This sounds like something that needs to be delivered more = easily > in a normal update mechanism, such as packages. ENs every 6 months = are > not practical for this and a lot of users don't always apply EN while > IMO they are more likely to apply package upgrades. Short of that, = some > kind of periodic script could fetch an updated file discussion>. The file itself is signed, but only weakly with a sha hash at the end. = Don=92t know if the hash is one of the ones that=92s been broken yet or not. Warner --Apple-Mail=_16F1F0DA-759B-465C-8562-B362DD59EF9A 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 iQIcBAEBCgAGBQJWIqBcAAoJEGwc0Sh9sBEAXxMP/Ajo7+HPdkUCFpI+s8rMUjgu cIiWH3IKOYOcxtY8QfPXaMMJs20FdzIkMy3iG/MOmRLnRQBEeysli89M6Aeu4tvd sWQ8zmwVLlEvLgjyd3dqGfUJKNW8BCXVLHS0XFi62CYAx6i1gchBkJuzW4suey7z aAN0Sbsz+K7UY993nS+AXESnlVCw4pbSeYz/5y5iGmruJB26F76UWJlBqZjU35lx dLuPYXMwQxI21Zf+xWH2M3+XyR7KtGKe1G/egMRRoDc1TPBDe8KZEFPkuBfdX0Ca YesNqke4Bk1t0uhyaaLPVCPmNVheNG5y+iVvl+PQBcLCVGqCd3Q0Qk28PchBriCw 19HUXTlkR2jSLIEZ4NxAsIizTLwuwReqg7WS8Nb9NhS3+JuecUgsc7F8csF6mJgN xCKLkdSc8OHpKKBB1WUfYH54WijA2rCuln12g4o1i8a9BhewTJ/2xc/BFWk7+INp zn27LL3OmYYJIMb2y5qQpUSjvu5zv49AMjUZ2cZy/gelKbNvBVA5uA1exEo4D5FL kyrAEt/EDs5nh6N0naGRuedRggPr/ZR/03pmGvu7ehs2F7Ttqn58XNb1hoRLjJBg 4S2ZnLBpYHehSR1kck8KJIMzafOTAhr6FJGg4ifAezx20gSiDajewyJftoLiQwOP fYSnMd2+00b8sQphfKpq =CWrv -----END PGP SIGNATURE----- --Apple-Mail=_16F1F0DA-759B-465C-8562-B362DD59EF9A-- From owner-svn-src-all@freebsd.org Sat Oct 17 19:25:59 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id AC5D6A170C9 for ; Sat, 17 Oct 2015 19:25:59 +0000 (UTC) (envelope-from ian@freebsd.org) Received: from pmta2.delivery6.ore.mailhop.org (pmta2.delivery6.ore.mailhop.org [54.200.129.228]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8F230888 for ; Sat, 17 Oct 2015 19:25:59 +0000 (UTC) (envelope-from ian@freebsd.org) Received: from ilsoft.org (unknown [73.34.117.227]) by outbound2.ore.mailhop.org (Halon Mail Gateway) with ESMTPSA; Sat, 17 Oct 2015 19:26:07 +0000 (UTC) Received: from rev (rev [172.22.42.240]) by ilsoft.org (8.14.9/8.14.9) with ESMTP id t9HJPuPu006435; Sat, 17 Oct 2015 13:25:56 -0600 (MDT) (envelope-from ian@freebsd.org) Message-ID: <1445109956.71631.44.camel@freebsd.org> Subject: Re: svn commit: r289421 - in head/etc: . mtree ntp From: Ian Lepore To: Warner Losh , Cy Schubert Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Date: Sat, 17 Oct 2015 13:25:56 -0600 In-Reply-To: <8154492E-C29E-41B1-A13B-34E33586DEC6@bsdimp.com> References: <201510161404.t9GE4GqM046436@repo.freebsd.org> <8154492E-C29E-41B1-A13B-34E33586DEC6@bsdimp.com> Content-Type: text/plain; charset="windows-1251" X-Mailer: Evolution 3.16.5 FreeBSD GNOME Team Port Mime-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 17 Oct 2015 19:25:59 -0000 On Sat, 2015-10-17 at 13:19 -0600, Warner Losh wrote: > Until the next leap second…. It would be better to just > always try to grab the latest one… Can we put something > in periodic to do that so users that have releases > that are older than 6 months aren’t screwed? > > Warner > I think writing a leapfeatcher task for periodic daily|weekly would make a nice junior-hacker task. It would be nice if it only hit the network when expiration of the installed file is imminent (like within a month), and only if both ntp and the leapfile feature are enabled and stuff like that. It should probably have a configurable list of URLs t o fetch from. -- Ian > > On Oct 16, 2015, at 8:04 AM, Cy Schubert wrote: > > > > Author: cy > > Date: Fri Oct 16 14:04:16 2015 > > New Revision: 289421 > > URL: https://svnweb.freebsd.org/changeset/base/289421 > > > > Log: > > Add default leap-seconds file. This should help ntp networks get > > the > > leap second date correct > > > > Updates to the file can be obtained from ftp://time.nist.gov/pub/ > > or > > ftp://tycho.usno.navy.mil/pub/ntp/. > > > > Suggested by: dwmalone > > Reviewed by: roberto, dwmalone, delphij > > Approved by: roberto > > MFC after: 1 week > > > > Added: > > head/etc/ntp/ > > head/etc/ntp/Makefile (contents, props changed) > > head/etc/ntp/leap-seconds (contents, props changed) > > Modified: > > head/etc/Makefile > > head/etc/mtree/BSD.var.dist > > head/etc/ntp.conf > > > > Modified: head/etc/Makefile > > =================================================================== > > =========== > > --- head/etc/Makefile Fri Oct 16 12:53:22 2015 (r2894 > > 20) > > +++ head/etc/Makefile Fri Oct 16 14:04:16 2015 (r2894 > > 21) > > @@ -240,6 +240,9 @@ distribution: > > ${_+_}cd ${.CURDIR}/defaults; ${MAKE} install > > ${_+_}cd ${.CURDIR}/devd; ${MAKE} install > > ${_+_}cd ${.CURDIR}/gss; ${MAKE} install > > +.if ${MK_NTP} != "no" > > + ${_+_}cd ${.CURDIR}/ntp; ${MAKE} install > > +.endif > > ${_+_}cd ${.CURDIR}/periodic; ${MAKE} install > > .if ${MK_PKGBOOTSTRAP} != "no" > > ${_+_}cd ${.CURDIR}/pkg; ${MAKE} install > > > > Modified: head/etc/mtree/BSD.var.dist > > =================================================================== > > =========== > > --- head/etc/mtree/BSD.var.dist Fri Oct 16 12:53:22 2015 > > (r289420) > > +++ head/etc/mtree/BSD.var.dist Fri Oct 16 14:04:16 2015 > > (r289421) > > @@ -46,6 +46,8 @@ > > .. > > ipf mode=0700 > > .. > > + ntp mode=0700 > > + .. > > pkg > > .. > > ports > > > > Modified: head/etc/ntp.conf > > =================================================================== > > =========== > > --- head/etc/ntp.conf Fri Oct 16 12:53:22 2015 (r2894 > > 20) > > +++ head/etc/ntp.conf Fri Oct 16 14:04:16 2015 (r2894 > > 21) > > @@ -77,3 +77,8 @@ restrict 127.127.1.0 > > # > > #server 127.127.1.0 > > #fudge 127.127.1.0 stratum 10 > > + > > +# See > > http://support.ntp.org/bin/view/Support/ConfiguringNTP#Section_6.14 > > . > > +# for documentation regarding leapfile. Updates to the file can be > > obtained > > +# from ftp://time.nist.gov/pub/ or > > ftp://tycho.usno.navy.mil/pub/ntp/. > > +leapfile "/etc/ntp/leap-seconds" > > > > Added: head/etc/ntp/Makefile > > =================================================================== > > =========== > > --- /dev/null 00:00:00 1970 (empty, because file is > > newly added) > > +++ head/etc/ntp/Makefile Fri Oct 16 14:04:16 2015 (r > > 289421) > > @@ -0,0 +1,10 @@ > > +# $FreeBSD$ > > + > > +NO_OBJ= > > + > > +FILES= leap-seconds > > + > > +FILESDIR= /etc/ntp > > +FILESMODE= 644 > > + > > +.include > > > > Added: head/etc/ntp/leap-seconds > > =================================================================== > > =========== > > --- /dev/null 00:00:00 1970 (empty, because file is > > newly added) > > +++ head/etc/ntp/leap-seconds Fri Oct 16 14:04:16 2015 > > (r289421) > > @@ -0,0 +1,119 @@ > > +# > > +# $FreeBSD$ > > +# > > +# ATOMIC TIME. > > +# The Coordinated Universal Time (UTC) is the reference > > time scale derived > > +# from The "Temps Atomique International" (TAI) calculated > > by the Bureau > > +# International des Poids et Mesures (BIPM) using a > > worldwide network of atomic > > +# clocks. UTC differs from TAI by an integer number of > > seconds; it is the basis > > +# of all activities in the world. > > +# > > +# > > +# ASTRONOMICAL TIME (UT1) is the time scale based on the > > rate of rotation of the earth. > > +# It is now mainly derived from Very Long Baseline > > Interferometry (VLBI). The various > > +# irregular fluctuations progressively detected in the > > rotation rate of the Earth lead > > +# in 1972 to the replacement of UT1 by UTC as the reference > > time scale. > > +# > > +# > > +# LEAP SECOND > > +# Atomic clocks are more stable than the rate of the earth > > rotatiob since the later > > +# undergoes a full range of geophysical perturbations at > > various time scales (lunisolar > > +# and core-mantle torques,atmospheric and oceanic effetcs, > > ...) > > +# Leap seconds are needed to keep the two time scales in > > agreement, i.e. UT1-UTC smaller > > +# than 0.9 second. So, when necessary a "leap second" is > > introduced in UTC. > > +# Since the adoption of this system in 1972 it has been > > necessary to add 26 seconds to UTC, > > +# firstly due to the initial choice of the value of the > > second (1/86400 mean solar day of > > +# the year 1820) and secondly to the general slowing down > > of the Earth's rotation. It is > > +# theorically possible to have a negative leap second (a > > second removed from UTC), but so far, > > +# all leap seconds have been positive (a second has been > > added to UTC). Based on what we know about the earth's rotation, > > +# it is unlikely that we will ever have a negative leap > > second. > > +# > > +# > > +# HISTORY > > +# The first leap second was added on June 30, 1972. Until > > 2000, it was necessary in average to add a leap second at a rate > > +# of 1 to 2 years. Since 2000, due to the fact that the > > earth rate of rotation is accelerating, leap seconds are introduced > > +# with an average frequency of 3 to 4 years. > > +# > > +# > > +# RESPONSABILITY OF THE DECISION TO INTRODUCE A LEAP SECOND > > IN UTC > > +# The decision to introduce a leap second in UTC is the > > responsibility of the Earth Orientation Center of > > +# the International Earth Rotation and reference System > > Service (IERS). This center is located at Paris > > +# Observatory. According to international agreements, leap > > second date have to occur at fixed date : > > +# first preference is given to the end of December and > > June, and second preference at the end of March > > +# and September. Since the system was introduced in 1972, > > only dates in June and December were used. > > +# > > +# Questions or comments to: > > +# Daniel Gambis, daniel.gambis@obspm.fr > > +# Christian Bizouard: > > christian.bizouard@obspm.fr > > +# Earth orientation Center of the IERS > > +# Paris Observatory, France > > +# > > +# > > +# > > +# VALIDITY OF THE FILE > > +# It is important to express the validity of the file. > > These next two dates are > > +# given in units of seconds since 1900.0. > > +# > > +# 1) Last update of the file. > > +# > > +# Updated through IERS Bulletin C ( > > ftp://hpiers.obspm.fr/iers/bul/bulc/bulletinc.dat) > > +# > > +# The following line shows the last update of this file in > > NTP timestamp: > > +# > > +#$ 3645216000 > > +# > > +# 2) Expiration date of the file given on a semi-annual > > basis: last June or last December > > +# > > +# File expires on 28 December 2015 > > +# > > +# Expire date in NTP timestamp: > > +# > > +#@ 3660249600 > > +# > > +# > > +# LIST OF LEAP SECONDS > > +# NTP timestamp (X parameter) is the number of seconds > > since 1900.0 > > +# > > +# MJD: The Modified Julian Day number. MJD = X/86400 + > > 15020 > > +# > > +# DTAI: The difference DTAI= TAI-UTC in units of seconds > > +# It is the quantity to add to UTC to get the time in TAI > > +# > > +# Day Month Year : epoch in clear > > +# > > +#NTP Time DTAI Day Month Year > > +# > > +2272060800 10 # 1 Jan 1972 > > +2287785600 11 # 1 Jul 1972 > > +2303683200 12 # 1 Jan 1973 > > +2335219200 13 # 1 Jan 1974 > > +2366755200 14 # 1 Jan 1975 > > +2398291200 15 # 1 Jan 1976 > > +2429913600 16 # 1 Jan 1977 > > +2461449600 17 # 1 Jan 1978 > > +2492985600 18 # 1 Jan 1979 > > +2524521600 19 # 1 Jan 1980 > > +2571782400 20 # 1 Jul 1981 > > +2603318400 21 # 1 Jul 1982 > > +2634854400 22 # 1 Jul 1983 > > +2698012800 23 # 1 Jul 1985 > > +2776982400 24 # 1 Jan 1988 > > +2840140800 25 # 1 Jan 1990 > > +2871676800 26 # 1 Jan 1991 > > +2918937600 27 # 1 Jul 1992 > > +2950473600 28 # 1 Jul 1993 > > +2982009600 29 # 1 Jul 1994 > > +3029443200 30 # 1 Jan 1996 > > +3076704000 31 # 1 Jul 1997 > > +3124137600 32 # 1 Jan 1999 > > +3345062400 33 # 1 Jan 2006 > > +3439756800 34 # 1 Jan 2009 > > +3550089600 35 # 1 Jul 2012 > > +3644697600 36 # 1 Jul 2015 > > +# > > +# In order to verify the integrity of this file, a hash > > code > > +# has been generated. For more information how to use > > +# this hash code, please consult the README file under the > > +# 'sha' repertory. > > +# > > +#h 620ba8af 37900668 95ac09ba d77640f9 6fd75493 > > > From owner-svn-src-all@freebsd.org Sat Oct 17 19:48:19 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 37D2AA1759F; Sat, 17 Oct 2015 19:48:19 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0698814D; Sat, 17 Oct 2015 19:48:18 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t9HJmIv2062391; Sat, 17 Oct 2015 19:48:18 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9HJmIDe062390; Sat, 17 Oct 2015 19:48:18 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201510171948.t9HJmIDe062390@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Sat, 17 Oct 2015 19:48:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289465 - 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 " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 17 Oct 2015 19:48:19 -0000 Author: ngie Date: Sat Oct 17 19:48:17 2015 New Revision: 289465 URL: https://svnweb.freebsd.org/changeset/base/289465 Log: Only use -fstack-protector-strong with supported compilers This includes clang 3.5.0+, gcc 4.2.1, gcc 4.8.4+ This allows me to do subdirectory makes again after setting MAKESYSPATH on 10.2-RELEASE as it comes with clang 3.4.1. As a sidenote: this isn't technically correct for all vintages of gcc 4.2.1, but will be correct when gcc is rebuilt/reinstalled after r286074, so this version check should be good enough. X-MFC with: r288669 Differential Revision: https://reviews.freebsd.org/D3924 Reviewed by: emaste, pfg Modified: head/share/mk/bsd.sys.mk Modified: head/share/mk/bsd.sys.mk ============================================================================== --- head/share/mk/bsd.sys.mk Sat Oct 17 18:59:14 2015 (r289464) +++ head/share/mk/bsd.sys.mk Sat Oct 17 19:48:17 2015 (r289465) @@ -148,9 +148,13 @@ CXXFLAGS.clang+= -Wno-c++11-extensions .if ${MK_SSP} != "no" && \ ${MACHINE_CPUARCH} != "arm" && ${MACHINE_CPUARCH} != "mips" +.if (${COMPILER_TYPE} == "clang" && ${COMPILER_VERSION} >= 30500) || \ + (${COMPILER_TYPE} == "gcc" && \ + (${COMPILER_VERSION} == 40201 || ${COMPILER_VERSION} >= 40800)) # Don't use -Wstack-protector as it breaks world with -Werror. SSP_CFLAGS?= -fstack-protector-strong CFLAGS+= ${SSP_CFLAGS} +.endif .endif # SSP && !ARM && !MIPS # Allow user-specified additional warning flags, plus compiler specific flag overrides. From owner-svn-src-all@freebsd.org Sat Oct 17 19:52:19 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id EC6C0A176E9; Sat, 17 Oct 2015 19:52:18 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id BE49579A; Sat, 17 Oct 2015 19:52:18 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t9HJqHe2065194; Sat, 17 Oct 2015 19:52:17 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9HJqHIf065193; Sat, 17 Oct 2015 19:52:17 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <201510171952.t9HJqHIf065193@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Sat, 17 Oct 2015 19:52:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289466 - head/sys/arm64/arm64 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 17 Oct 2015 19:52:19 -0000 Author: andrew Date: Sat Oct 17 19:52:17 2015 New Revision: 289466 URL: https://svnweb.freebsd.org/changeset/base/289466 Log: Replace build_section_pagetable with build_l1_block_pagetable as it takes an extra argument to specify the number of 1GiB pages to map. This should be a nop as we are only mapping a single page, but when we move to use an extra level of page tables we will be able to map a second block, e.g. if the kernel was loaded over a 1GiB boundary. Modified: head/sys/arm64/arm64/locore.S Modified: head/sys/arm64/arm64/locore.S ============================================================================== --- head/sys/arm64/arm64/locore.S Sat Oct 17 19:48:17 2015 (r289465) +++ head/sys/arm64/arm64/locore.S Sat Oct 17 19:52:17 2015 (r289466) @@ -379,7 +379,8 @@ create_pagetables: mov x7, #DEVICE_MEM mov x8, #(SOCDEV_VA) /* VA start */ mov x9, #(SOCDEV_PA) /* PA start */ - bl build_section_pagetable + mov x10, #1 + bl build_l1_block_pagetable #endif /* Create the VA = PA map */ @@ -387,36 +388,38 @@ create_pagetables: mov x7, #NORMAL_UNCACHED /* Uncached as it's only needed early on */ mov x9, x27 mov x8, x9 /* VA start (== PA start) */ - bl build_section_pagetable + mov x10, #1 + bl build_l1_block_pagetable /* Restore the Link register */ mov x30, x5 ret /* - * Builds a 1 GiB page table entry - * x6 = L1 table - * x7 = Type (0 = Device, 1 = Normal) - * x8 = VA start - * x9 = PA start (trashed) + * Builds an L1 -> L2 table descriptor + * + * This is a link for a 1GiB block of memory with up to 2MiB regions mapped + * within it by build_l2_block_pagetable. + * + * x6 = L1 table + * x8 = Virtual Address + * x9 = L2 PA (trashed) * x11, x12 and x13 are trashed */ -build_section_pagetable: +link_l1_pagetable: /* - * Build the L1 table entry. + * Link an L1 -> L2 table entry. */ /* Find the table index */ lsr x11, x8, #L1_SHIFT and x11, x11, #Ln_ADDR_MASK /* Build the L1 block entry */ - lsl x12, x7, #2 - orr x12, x12, #L1_BLOCK - orr x12, x12, #(ATTR_AF) + mov x12, #L1_TABLE /* Only use the output address bits */ - lsr x9, x9, #L1_SHIFT - orr x12, x12, x9, lsl #L1_SHIFT + lsr x9, x9, #12 + orr x12, x12, x9, lsl #12 /* Store the entry */ str x12, [x6, x11, lsl #3] @@ -424,35 +427,48 @@ build_section_pagetable: ret /* - * Builds an L1 -> L2 table descriptor - * - * This is a link for a 1GiB block of memory with up to 2MiB regions mapped - * within it by build_l1_block_pagetable. - * + * Builds count 1 GiB page table entry * x6 = L1 table - * x8 = Virtual Address - * x9 = L2 PA (trashed) + * x7 = Type (0 = Device, 1 = Normal) + * x8 = VA start + * x9 = PA start (trashed) + * x10 = Entry count (TODO) * x11, x12 and x13 are trashed */ -link_l1_pagetable: +build_l1_block_pagetable: /* - * Link an L1 -> L2 table entry. + * Build the L1 table entry. */ /* Find the table index */ lsr x11, x8, #L1_SHIFT and x11, x11, #Ln_ADDR_MASK /* Build the L1 block entry */ - mov x12, #L1_TABLE + lsl x12, x7, #2 + orr x12, x12, #L1_BLOCK + orr x12, x12, #(ATTR_AF) +#ifdef SMP + orr x12, x12, ATTR_SH(ATTR_SH_IS) +#endif /* Only use the output address bits */ - lsr x9, x9, #12 - orr x12, x12, x9, lsl #12 + lsr x9, x9, #L1_SHIFT + + /* Set the physical address for this virtual address */ +1: orr x12, x12, x9, lsl #L1_SHIFT /* Store the entry */ str x12, [x6, x11, lsl #3] - ret + /* Clear the address bits */ + and x12, x12, #ATTR_MASK_L + + sub x10, x10, #1 + add x11, x11, #1 + add x9, x9, #1 + cbnz x10, 1b + +2: ret /* * Builds count 2 MiB page table entry From owner-svn-src-all@freebsd.org Sat Oct 17 19:55:59 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A0EC1A17782; Sat, 17 Oct 2015 19:55:59 +0000 (UTC) (envelope-from cem@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 78ACA95A; Sat, 17 Oct 2015 19:55:59 +0000 (UTC) (envelope-from cem@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t9HJtwtL065453; Sat, 17 Oct 2015 19:55:58 GMT (envelope-from cem@FreeBSD.org) Received: (from cem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9HJtwUF065449; Sat, 17 Oct 2015 19:55:58 GMT (envelope-from cem@FreeBSD.org) Message-Id: <201510171955.t9HJtwUF065449@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cem set sender to cem@FreeBSD.org using -f From: "Conrad E. Meyer" Date: Sat, 17 Oct 2015 19:55:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289467 - in head: lib/libc/string share/man/man3 share/man/man9 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 17 Oct 2015 19:55:59 -0000 Author: cem Date: Sat Oct 17 19:55:58 2015 New Revision: 289467 URL: https://svnweb.freebsd.org/changeset/base/289467 Log: Document bitset(9) Added: head/share/man/man9/bitset.9 (contents, props changed) Modified: head/lib/libc/string/ffs.3 head/share/man/man3/bitstring.3 head/share/man/man9/Makefile Modified: head/lib/libc/string/ffs.3 ============================================================================== --- head/lib/libc/string/ffs.3 Sat Oct 17 19:52:17 2015 (r289466) +++ head/lib/libc/string/ffs.3 Sat Oct 17 19:55:58 2015 (r289467) @@ -30,7 +30,7 @@ .\" @(#)ffs.3 8.2 (Berkeley) 4/19/94 .\" $FreeBSD$ .\" -.Dd September 29, 2012 +.Dd October 17, 2015 .Dt FFS 3 .Os .Sh NAME @@ -81,7 +81,8 @@ Bits are numbered starting at 1, the lea A return value of zero from any of these functions means that the argument was zero. .Sh SEE ALSO -.Xr bitstring 3 +.Xr bitstring 3 , +.Xr bitset 9 .Sh HISTORY The .Fn ffs Modified: head/share/man/man3/bitstring.3 ============================================================================== --- head/share/man/man3/bitstring.3 Sat Oct 17 19:52:17 2015 (r289466) +++ head/share/man/man3/bitstring.3 Sat Oct 17 19:55:58 2015 (r289467) @@ -30,7 +30,7 @@ .\" @(#)bitstring.3 8.1 (Berkeley) 7/19/93 .\" $FreeBSD$ .\" -.Dd July 19, 1993 +.Dd October 17, 2015 .Dt BITSTRING 3 .Os .Sh NAME @@ -178,7 +178,8 @@ make_lpr_available() } .Ed .Sh SEE ALSO -.Xr malloc 3 +.Xr malloc 3 , +.Xr bitset 9 .Sh HISTORY The .Nm bitstring Modified: head/share/man/man9/Makefile ============================================================================== --- head/share/man/man9/Makefile Sat Oct 17 19:52:17 2015 (r289466) +++ head/share/man/man9/Makefile Sat Oct 17 19:55:58 2015 (r289467) @@ -11,6 +11,7 @@ MAN= accept_filter.9 \ altq.9 \ atomic.9 \ bios.9 \ + bitset.9 \ boot.9 \ bpf.9 \ buf.9 \ @@ -429,6 +430,32 @@ MLINKS+=atomic.9 atomic_add.9 \ atomic.9 atomic_subtract.9 \ atomic.9 atomic_swap.9 \ atomic.9 atomic_testandset.9 +MLINKS+=bitset.9 BITSET_DEFINE.9 \ + bitset.9 BITSET_T_INITIALIZER.9 \ + bitset.9 BITSET_FSET.9 \ + bitset.9 BIT_CLR.9 \ + bitset.9 BIT_COPY.9 \ + bitset.9 BIT_ISSET.9 \ + bitset.9 BIT_SET.9 \ + bitset.9 BIT_ZERO.9 \ + bitset.9 BIT_FILL.9 \ + bitset.9 BIT_SETOF.9 \ + bitset.9 BIT_EMPTY.9 \ + bitset.9 BIT_ISFULLSET.9 \ + bitset.9 BIT_FFS.9 \ + bitset.9 BIT_COUNT.9 \ + bitset.9 BIT_SUBSET.9 \ + bitset.9 BIT_OVERLAP.9 \ + bitset.9 BIT_CMP.9 \ + bitset.9 BIT_OR.9 \ + bitset.9 BIT_AND.9 \ + bitset.9 BIT_NAND.9 \ + bitset.9 BIT_CLR_ATOMIC.9 \ + bitset.9 BIT_SET_ATOMIC.9 \ + bitset.9 BIT_SET_ATOMIC_ACQ.9 \ + bitset.9 BIT_AND_ATOMIC.9 \ + bitset.9 BIT_OR_ATOMIC.9 \ + bitset.9 BIT_COPY_STORE_REL.9 MLINKS+=bpf.9 bpfattach.9 \ bpf.9 bpfattach2.9 \ bpf.9 bpfdetach.9 \ Added: head/share/man/man9/bitset.9 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/share/man/man9/bitset.9 Sat Oct 17 19:55:58 2015 (r289467) @@ -0,0 +1,400 @@ +.\" Copyright (c) 2015 Conrad Meyer +.\" All rights reserved. +.\" +.\" Redistribution and use in source and binary forms, with or without +.\" modification, are permitted provided that the following conditions +.\" are met: +.\" 1. Redistributions of source code must retain the above copyright +.\" notice, this list of conditions and the following disclaimer. +.\" 2. Redistributions in binary form must reproduce the above copyright +.\" notice, this list of conditions and the following disclaimer in the +.\" documentation and/or other materials provided with the distribution. +.\" +.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' +.\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED +.\" TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +.\" PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE +.\" LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +.\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +.\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +.\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +.\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +.\" POSSIBILITY OF SUCH DAMAGE. +.\" +.\" $FreeBSD$ +.\" +.Dd October 17, 2015 +.Dt BITSET 9 +.Os +.Sh NAME +.Nm bitset(9) +\(em +.Nm BITSET_DEFINE , +.Nm BITSET_T_INITIALIZER , +.Nm BITSET_FSET , +.Nm BIT_CLR , +.Nm BIT_COPY , +.Nm BIT_ISSET , +.Nm BIT_SET , +.Nm BIT_ZERO , +.Nm BIT_FILL , +.Nm BIT_SETOF , +.Nm BIT_EMPTY , +.Nm BIT_ISFULLSET , +.Nm BIT_FFS , +.Nm BIT_COUNT , +.Nm BIT_SUBSET , +.Nm BIT_OVERLAP , +.Nm BIT_CMP , +.Nm BIT_OR , +.Nm BIT_AND , +.Nm BIT_NAND , +.Nm BIT_CLR_ATOMIC , +.Nm BIT_SET_ATOMIC , +.Nm BIT_SET_ATOMIC_ACQ , +.Nm BIT_AND_ATOMIC , +.Nm BIT_OR_ATOMIC , +.Nm BIT_COPY_STORE_REL +.Nd bitset manipulation macros +.Sh SYNOPSIS +.In sys/_bitset.h +.In sys/bitset.h +.\" +.Fn BITSET_DEFINE "STRUCTNAME" "const SETSIZE" +.Fn BITSET_T_INITIALIZER "ARRAY_CONTENTS" +.Fn BITSET_FSET "N_WORDS" +.\" +.Fn BIT_CLR "const SETSIZE" "size_t bit" "struct STRUCTNAME *bitset" +.Fn BIT_COPY "const SETSIZE" "struct STRUCTNAME *from" "struct STRUCTNAME *to" +.Ft bool +.Fn BIT_ISSET "const SETSIZE" "size_t bit" "struct STRUCTNAME *bitset" +.Fn BIT_SET "const SETSIZE" "size_t bit" "struct STRUCTNAME *bitset" +.Fn BIT_ZERO "const SETSIZE" "struct STRUCTNAME *bitset" +.Fn BIT_FILL "const SETSIZE" "struct STRUCTNAME *bitset" +.Fn BIT_SETOF "const SETSIZE" "size_t bit" "struct STRUCTNAME *bitset" +.Ft bool +.Fn BIT_EMPTY "const SETSIZE" "struct STRUCTNAME *bitset" +.Ft bool +.Fn BIT_ISFULLSET "const SETSIZE" "struct STRUCTNAME *bitset" +.Ft size_t +.Fn BIT_FFS "const SETSIZE" "struct STRUCTNAME *bitset" +.Ft size_t +.Fn BIT_COUNT "const SETSIZE" "struct STRUCTNAME *bitset" +.\" +.Ft bool +.Fo BIT_SUBSET +.Fa "const SETSIZE" "struct STRUCTNAME *haystack" "struct STRUCTNAME *needle" +.Fc +.Ft bool +.Fo BIT_OVERLAP +.Fa "const SETSIZE" "struct STRUCTNAME *bitset1" "struct STRUCTNAME *bitset2" +.Fc +.Ft bool +.Fo BIT_CMP +.Fa "const SETSIZE" "struct STRUCTNAME *bitset1" "struct STRUCTNAME *bitset2" +.Fc +.Fn BIT_OR "const SETSIZE" "struct STRUCTNAME *dst" "struct STRUCTNAME *src" +.Fn BIT_AND "const SETSIZE" "struct STRUCTNAME *dst" "struct STRUCTNAME *src" +.Fn BIT_NAND "const SETSIZE" "struct STRUCTNAME *dst" "struct STRUCTNAME *src" +.\" +.Fn BIT_CLR_ATOMIC "const SETSIZE" "size_t bit" "struct STRUCTNAME *bitset" +.Fn BIT_SET_ATOMIC "const SETSIZE" "size_t bit" "struct STRUCTNAME *bitset" +.Fn BIT_SET_ATOMIC_ACQ "const SETSIZE" "size_t bit" "struct STRUCTNAME *bitset" +.\" +.Fo BIT_AND_ATOMIC +.Fa "const SETSIZE" "struct STRUCTNAME *dst" "struct STRUCTNAME *src" +.Fc +.Fo BIT_OR_ATOMIC +.Fa "const SETSIZE" "struct STRUCTNAME *dst" "struct STRUCTNAME *src" +.Fc +.Fo BIT_COPY_STORE_REL +.Fa "const SETSIZE" "struct STRUCTNAME *from" "struct STRUCTNAME *to" +.Fc +.Sh DESCRIPTION +The +.Nm +family of macros provide a flexible and efficient bitset implementation if the +maximum size of the set is known at compilation. +Throughout this manual page, the name +.Fa SETSIZE +refers to the size of the bitset in bits. +Individual bits in bitsets are referenced with indices zero through +.Fa SETSIZE - 1 . +One example use of +.In sys/bitset.h +is +.In sys/cpuset.h . +.Pp +The +.Fn BITSET_DEFINE +macro defines a bitset struct +.Fa STRUCTNAME +with room to represent +.Fa SETSIZE +bits. +.Pp +The +.Fn BITSET_T_INITIALIZER +macro allows one to initialize a bitset struct with a compile time literal +value. +.Pp +The +.Fn BITSET_FSET +macro generates a compile time literal, usable by +.Fn BITSET_T_INITIALIZER , +representing a full bitset (all bits set). +For examples of +.Fn BITSET_T_INITIALIZER +and +.Fn BITSET_FSET +usage, see the +.Sx BITSET_T_INITIALIZER EXAMPLE +section. +The +.Fa N_WORDS +parameter to +.Fn BITSET_FSET +should be: +.Bd -literal -offset indent +__bitset_words(SETSIZE) +.Ed +.Pp +The +.Fn BIT_CLR +macro clears bit +.Fa bit +in the bitset pointed to by +.Fa bitset . +The +.Fn BIT_CLR_ATOMIC +macro is identical, but the bit is cleared atomically. +.Pp +The +.Fn BIT_COPY +macro copies the contents of the bitset +.Fa from +to the bitset +.Fa to . +.Fn BIT_COPY_STORE_REL +is similar, but copies component machine words from +.Fa from +and writes them to +.Fa to +with atomic store with release semantics. +(That is, if +.Fa to +is composed of multiple machine words, +.Fn BIT_COPY_STORE_REL +performs multiple individually atomic operations.) +.Pp +The +.Fn BIT_SET +macro sets bit +.Fa bit +in the bitset pointed to by +.Fa bitset . +The +.Fn BIT_SET_ATOMIC +macro is identical, but the bit is set atomically. +The +.Fn BIT_SET_ATOMIC_ACQ +macro sets the bit with acquire semantics. +.Pp +The +.Fn BIT_ZERO +macro clears all bits in +.Fa bitset . +.Pp +The +.Fn BIT_FILL +macro sets all bits in +.Fa bitset . +.Pp +The +.Fn BIT_SETOF +macro clears all bits in +.Fa bitset +before setting only bit +.Fa bit . +.Pp +The +.Fn BIT_EMPTY +macro returns +.Dv true +if +.Fa bitset +is empty. +.Pp +The +.Fn BIT_ISFULLSET +macro returns +.Dv true +if +.Fa bitset +is full (all bits set). +.Pp +The +.Fn BIT_FFS +macro returns the 1-index of the first (lowest) set bit in +.Fa bitset , +or zero if +.Fa bitset +is empty. +Like with +.Xr ffs 3 , +to use the non-zero result of +.Fn BIT_FFS +as a +.Fa bit +index parameter to any other +.Nm +macro, you must subtract one from the result. +.Pp +The +.Fn BIT_COUNT +macro returns the total number of set bits in +.Fa bitset . +.Pp +The +.Fn BIT_SUBSET +macro returns +.Dv true +if +.Fa needle +is a subset of +.Fa haystack . +.Pp +The +.Fn BIT_OVERLAP +macro returns +.Dv true +if +.Fa bitset1 +and +.Fa bitset2 +have any common bits. +(That is, if +.Fa bitset1 +AND +.Fa bitset2 +is not the empty set.) +.Pp +The +.Fn BIT_CMP +macro returns +.Dv true +if +.Fa bitset1 +is NOT equal to +.Fa bitset2 . +.Pp +The +.Fn BIT_OR +macro sets bits present in +.Fa src +in +.Fa dst . +(It is the +.Nm +equivalent of the scalar: +.Fa dst +|= +.Fa src . ) +.Fn BIT_OR_ATOMIC +is similar, but sets bits in the component machine words in +.Fa dst +atomically. +(That is, if +.Fa dst +is composed of multiple machine words, +.Fn BIT_OR_ATOMIC +performs multiple individually atomic operations.) +.Pp +The +.Fn BIT_AND +macro clears bits absent from +.Fa src +from +.Fa dst . +(It is the +.Nm +equivalent of the scalar: +.Fa dst +&= +.Fa src . ) +.Fn BIT_AND_ATOMIC +is similar, with the same atomic semantics as +.Fn BIT_OR_ATOMIC . +.Pp +The +.Fn BIT_NAND +macro clears bits set in +.Fa src +from +.Fa dst . +(It is the +.Nm +equivalent of the scalar: +.Fa dst +&= +.Fa ~ src . ) +.Sh BITSET_T_INITIALIZER EXAMPLE +.Bd -literal +BITSET_DEFINE(_myset, MYSETSIZE); + +struct _myset myset; + +/* Initialize myset to filled (all bits set) */ +myset = BITSET_T_INITIALIZER(BITSET_FSET(__bitset_words(MYSETSIZE))); + +/* Initialize myset to only the lowest bit set */ +myset = BITSET_T_INITIALIZER(0x1); +.Ed +.Sh SEE ALSO +The older +.Xr bitstring 3 . +.Sh HISTORY +.In sys/cpuset.h +first appeared in +.Fx 7.1 , +released in January 2009, and in +.Fx 8.0 , +released in November 2009 . +.Pp +The +.Nm +macros first appeared in +.Fx 10.0 +in January 2014. +They were MFCed to +.Fx 9.3 , +released in July 2014. +.Pp +This manual page first appeared in +.Fx 11.0 . +.Sh AUTHORS +.An -nosplit +The +.Nm +macros were written for +.In sys/cpuset.h +by +.An Jeff Roberson Aq Mt jeff@FreeBSD.org ; +they were generalized and pulled out as +.In sys/_bitset.h +and +.In sys/bitset.h +by +.An Attilio Rao Aq Mt attilio@FreeBSD.org . +This manual page was written by +.An Conrad Meyer Aq Mt cem@FreeBSD.org . +.Sh CAVEATS +The +.Fa SETSIZE +argument to all of these macros must match the value given to +.Fn BITSET_DEFINE . +.Pp +Unlike every other reference to individual set members, which are zero-indexed, +.Fn BIT_FFS +returns a one-indexed result (or zero if the set is empty). From owner-svn-src-all@freebsd.org Sat Oct 17 20:38:41 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6213EA17EE6; Sat, 17 Oct 2015 20:38:41 +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 21C85C0E; Sat, 17 Oct 2015 20:38:41 +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 t9HKcee9077365; Sat, 17 Oct 2015 20:38:40 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9HKce7d077364; Sat, 17 Oct 2015 20:38:40 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201510172038.t9HKce7d077364@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Sat, 17 Oct 2015 20:38: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: r289468 - stable/10/cddl/contrib/opensolaris/cmd/dtrace 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 " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 17 Oct 2015 20:38:41 -0000 Author: markj Date: Sat Oct 17 20:38:40 2015 New Revision: 289468 URL: https://svnweb.freebsd.org/changeset/base/289468 Log: MFC r272455: Have dtrace(1) handle SIGPIPE, and handle signals when in list mode (-l). In particular, make sure to detach from child processes before exiting. Modified: stable/10/cddl/contrib/opensolaris/cmd/dtrace/dtrace.c Directory Properties: stable/10/ (props changed) Modified: stable/10/cddl/contrib/opensolaris/cmd/dtrace/dtrace.c ============================================================================== --- stable/10/cddl/contrib/opensolaris/cmd/dtrace/dtrace.c Sat Oct 17 19:55:58 2015 (r289467) +++ stable/10/cddl/contrib/opensolaris/cmd/dtrace/dtrace.c Sat Oct 17 20:38:40 2015 (r289468) @@ -710,6 +710,9 @@ list_probe(dtrace_hdl_t *dtp, const dtra if (g_verbose && dtrace_probe_info(dtp, pdp, &p) == 0) print_probe_info(&p); + if (g_intr != 0) + return (1); + return (0); } @@ -1220,11 +1223,34 @@ intr(int signo) g_impatient = 1; } +static void +installsighands(void) +{ + struct sigaction act, oact; + + (void) sigemptyset(&act.sa_mask); + act.sa_flags = 0; + act.sa_handler = intr; + + if (sigaction(SIGINT, NULL, &oact) == 0 && oact.sa_handler != SIG_IGN) + (void) sigaction(SIGINT, &act, NULL); + + if (sigaction(SIGTERM, NULL, &oact) == 0 && oact.sa_handler != SIG_IGN) + (void) sigaction(SIGTERM, &act, NULL); + +#if !defined(sun) + if (sigaction(SIGPIPE, NULL, &oact) == 0 && oact.sa_handler != SIG_IGN) + (void) sigaction(SIGPIPE, &act, NULL); + + if (sigaction(SIGUSR1, NULL, &oact) == 0 && oact.sa_handler != SIG_IGN) + (void) sigaction(SIGUSR1, &act, NULL); +#endif +} + int main(int argc, char *argv[]) { dtrace_bufdesc_t buf; - struct sigaction act, oact; dtrace_status_t status[2]; dtrace_optval_t opt; dtrace_cmd_t *dcp; @@ -1776,6 +1802,8 @@ main(int argc, char *argv[]) if (g_ofile != NULL && (g_ofp = fopen(g_ofile, "a")) == NULL) fatal("failed to open output file '%s'", g_ofile); + installsighands(); + oprintf("%5s %10s %17s %33s %s\n", "ID", "PROVIDER", "MODULE", "FUNCTION", "NAME"); @@ -1861,20 +1889,7 @@ main(int argc, char *argv[]) if (opt != DTRACEOPT_UNSET) notice("allowing destructive actions\n"); - (void) sigemptyset(&act.sa_mask); - act.sa_flags = 0; - act.sa_handler = intr; - - if (sigaction(SIGINT, NULL, &oact) == 0 && oact.sa_handler != SIG_IGN) - (void) sigaction(SIGINT, &act, NULL); - - if (sigaction(SIGTERM, NULL, &oact) == 0 && oact.sa_handler != SIG_IGN) - (void) sigaction(SIGTERM, &act, NULL); - -#if !defined(sun) - if (sigaction(SIGUSR1, NULL, &oact) == 0 && oact.sa_handler != SIG_IGN) - (void) sigaction(SIGUSR1, &act, NULL); -#endif + installsighands(); /* * Now that tracing is active and we are ready to consume trace data, From owner-svn-src-all@freebsd.org Sat Oct 17 21:11:43 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E1493A17518; Sat, 17 Oct 2015 21:11:43 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A6F38BD6; Sat, 17 Oct 2015 21:11:43 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t9HLBgi5088664; Sat, 17 Oct 2015 21:11:42 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9HLBgEg088663; Sat, 17 Oct 2015 21:11:42 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201510172111.t9HLBgEg088663@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Sat, 17 Oct 2015 21:11:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289469 - head/rescue/rescue X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 17 Oct 2015 21:11:44 -0000 Author: ngie Date: Sat Oct 17 21:11:42 2015 New Revision: 289469 URL: https://svnweb.freebsd.org/changeset/base/289469 Log: Make iscsictl and iscsid build if MK_ISCSI == yes MFC after: 1 month X-MFC with: r289452 Modified: head/rescue/rescue/Makefile Modified: head/rescue/rescue/Makefile ============================================================================== --- head/rescue/rescue/Makefile Sat Oct 17 20:38:40 2015 (r289468) +++ head/rescue/rescue/Makefile Sat Oct 17 21:11:42 2015 (r289469) @@ -179,7 +179,7 @@ CRUNCH_BUILDOPTS_dhclient= -DRELEASE_CRU # CRUNCH_SRCDIRS+= usr.bin -CRUNCH_PROGS_usr.bin= head iscsictl mt nc sed tail tee +CRUNCH_PROGS_usr.bin= head mt nc sed tail tee CRUNCH_PROGS_usr.bin+= gzip CRUNCH_ALIAS_gzip= gunzip gzcat zcat @@ -214,12 +214,17 @@ CRUNCH_ALIAS_id= groups whoami # CRUNCH_SRCDIRS+= usr.sbin -CRUNCH_PROGS_usr.sbin+= chroot iscsid +CRUNCH_PROGS_usr.sbin+= chroot CRUNCH_PROGS_usr.sbin+= chown CRUNCH_ALIAS_chown= chgrp ################################################################## CRUNCH_LIBS+= -lm +.if ${MK_ISCSI} != "no" +CRUNCH_PROGS_usr.bin+= iscsictl +CRUNCH_PROGS_usr.sbin+= iscsid +.endif + .include .include From owner-svn-src-all@freebsd.org Sat Oct 17 21:20:42 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B2489A1764E; Sat, 17 Oct 2015 21:20:42 +0000 (UTC) (envelope-from dwmalone@maths.tcd.ie) Received: from salmon.maths.tcd.ie (salmon.maths.tcd.ie [IPv6:2001:770:10:300::86e2:510b]) by mx1.freebsd.org (Postfix) with ESMTP id 6FAC3ECF; Sat, 17 Oct 2015 21:20:42 +0000 (UTC) (envelope-from dwmalone@maths.tcd.ie) Received: from salmon.maths.tcd.ie (localhost [127.0.0.1]) by salmon.maths.tcd.ie (Postfix) with ESMTP id 1B2F71591E1; Sat, 17 Oct 2015 22:20:40 +0100 (IST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=maths.tcd.ie; h= user-agent:in-reply-to:content-disposition:content-type :content-type:mime-version:references:message-id:subject:subject :from:from:date:date:received:received:received; s=20150418; t= 1445116834; x=1446931235; bh=tPbA0FlI+LERq8fMn+IBo7vCmw0CYmjJNSv wpREV6rY=; b=TNylZYbTGS2p6jfGMRVPe+UwbVg+OHml6LKYMyoxeMJD/eCFwQc YlALmEtBJSfLCXloisxsTGfACV+Fxa1u9SdZ2btguOsZUedVNdu9+s+wrLXdSEel POE53oN3JoRFqAC9yDlgpPnaEKW4SdPD5NFr7ZD8XIWWSmo5EgGSMl1I= X-Virus-Scanned: amavisd-new at maths.tcd.ie Received: from salmon.maths.tcd.ie ([127.0.0.1]) by salmon.maths.tcd.ie (salmon.maths.tcd.ie [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id NkFcabDtMXdD; Sat, 17 Oct 2015 22:20:34 +0100 (IST) Received: from walton.maths.tcd.ie (walton.maths.tcd.ie [IPv6:2001:770:10:300::86e2:510a]) by salmon.maths.tcd.ie (Postfix) with ESMTP id D7CAE1591E0; Sat, 17 Oct 2015 22:20:33 +0100 (IST) Received: by walton.maths.tcd.ie (Postfix, from userid 238) id 6732B730AA; Sat, 17 Oct 2015 22:20:33 +0100 (IST) Date: Sat, 17 Oct 2015 22:20:33 +0100 From: David Malone To: Ian Lepore Cc: Cy Schubert , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r289421 - in head/etc: . mtree ntp Message-ID: <20151017212033.GA43955@walton.maths.tcd.ie> References: <201510161404.t9GE4GqM046436@repo.freebsd.org> <1445106350.71631.36.camel@freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1445106350.71631.36.camel@freebsd.org> User-Agent: Mutt/1.5.23 (2014-03-12) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 17 Oct 2015 21:20:42 -0000 On Sat, Oct 17, 2015 at 12:25:50PM -0600, Ian Lepore wrote: > If the leapseconds file is present, the leap bits for reference > clocks and downstratum servers are ignored. > > I can't determine from casual code examination (and I don't have time > to experiment now) whether that is true even if the file is expired. The way the code seems to work is: 1) Take a vote from your peers on if there is an upcoming leap second. Refclocks can outvote other peers. (This is in ntp_proto.c:clock_update() - search for leap_vote_ins). 2) If one seems to be pending, try to insert it into an in-memory table for the end of the month. 3) If you find that you loaded a table and the leapsecond you are trying to insert is within the valid range of the table, return an error. (This is in ntp_leapsec.c:leapsec_add()) So, I think the change should be safe, if the comments match the code. David. From owner-svn-src-all@freebsd.org Sat Oct 17 23:44:46 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id CF851A18CA0 for ; Sat, 17 Oct 2015 23:44:46 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from mail-pa0-f49.google.com (mail-pa0-f49.google.com [209.85.220.49]) (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 A44C610A1 for ; Sat, 17 Oct 2015 23:44:46 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: by pabrc13 with SMTP id rc13so153777606pab.0 for ; Sat, 17 Oct 2015 16:44:40 -0700 (PDT) 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=XRrdVgXmEe95ixwj6YhfwlUEXrh9JLAmM46v//aXEE4=; b=OVqNoBy+jEUXWvA378NMizQ1RL24n9l9umJQhQZQ0SZAl1GMuav0ytUDJBGQKhte9m lAZ6UECc84wXvgc4MRp7o8XfG6iPE//Uq0OhFGaZ43IinH68MmiflQ8xQkN7IWIG17U+ 8r4OnX4xfDw6cdNCfLAsRznQaoGIAiTQlLNZjvurP3WWozFWW7df8xve+k4JGlRva6vL fcfC04LmitTHiLklTy6rZpMW+x0+b2nokXUNxRJRHc6qaZkzyvIHNByLNo4oCdbiSMZI 0GBN5ropXyCEuXTMMhqkFZK+x82VAay7BMkcEYcewCKFP/h5CyZryzQKdhkw7Mu1Vo3A IQTw== X-Gm-Message-State: ALoCoQkGaNhcqBl63ZphsjOB7g8UabENA0zwP8jropUo2zezDvBWsLZT59qR65MJ+JRaLEBrQ3V/ X-Received: by 10.67.1.73 with SMTP id be9mr25423812pad.35.1445125479832; Sat, 17 Oct 2015 16:44:39 -0700 (PDT) Received: from ip-100-127-128-53.ec2.internal ([69.53.245.5]) by smtp.gmail.com with ESMTPSA id es4sm28456206pbc.42.2015.10.17.16.44.38 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Sat, 17 Oct 2015 16:44:39 -0700 (PDT) Sender: Warner Losh Subject: Re: svn commit: r289421 - in head/etc: . mtree ntp Mime-Version: 1.0 (Mac OS X Mail 8.2 \(2104\)) Content-Type: multipart/signed; boundary="Apple-Mail=_E8A0F81E-2334-4E56-9521-4574B2EC9B16"; protocol="application/pgp-signature"; micalg=pgp-sha512 X-Pgp-Agent: GPGMail 2.5.2 From: Warner Losh In-Reply-To: <20151017212033.GA43955@walton.maths.tcd.ie> Date: Sat, 17 Oct 2015 17:44:35 -0600 Cc: Ian Lepore , Cy Schubert , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Message-Id: <00150EF2-0020-42E5-A1E5-324A23975577@bsdimp.com> References: <201510161404.t9GE4GqM046436@repo.freebsd.org> <1445106350.71631.36.camel@freebsd.org> <20151017212033.GA43955@walton.maths.tcd.ie> To: David Malone 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 " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 17 Oct 2015 23:44:46 -0000 --Apple-Mail=_E8A0F81E-2334-4E56-9521-4574B2EC9B16 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 > On Oct 17, 2015, at 3:20 PM, David Malone = wrote: >=20 > On Sat, Oct 17, 2015 at 12:25:50PM -0600, Ian Lepore wrote: >> If the leapseconds file is present, the leap bits for reference >> clocks and downstratum servers are ignored. >>=20 >> I can't determine from casual code examination (and I don't have time >> to experiment now) whether that is true even if the file is expired. >=20 > The way the code seems to work is: >=20 > 1) Take a vote from your peers on if there is an upcoming > leap second. Refclocks can outvote other peers. (This is > in ntp_proto.c:clock_update() - search for leap_vote_ins). Assuming no bugs, yes. And assuming your peers are sending the correct information. History with ntpd and ntp serves well illustrates that these assumptions are violated often. > 2) If one seems to be pending, try to insert it into an > in-memory table for the end of the month. NTP only recognizes June and December as valid leap insertion points. This is likely safe for the foreseeable future though, even though the official standard allows leap seconds to be the end of any month. Too many things assume you only have leap seconds at these times for IERS to issue one that isn=E2=80=99t at the end of = December or June until earth rotation forces their hand sometime around the end of this century (give or take a few decades). > 3) If you find that you loaded a table and the leapsecond > you are trying to insert is within the valid range of the > table, return an error. (This is in ntp_leapsec.c:leapsec_add()) >=20 > So, I think the change should be safe, if the comments match the code. That=E2=80=99s a big if. Both Ian and I have witnessed the carnage of = incorrect leap seconds first hand and so are somewhat touchy on the subject. It is a place where getting the canonical information is 1000x better than relying on code to implement things that can=E2=80=99t go wrong. Because = they often do. Way way too often. When you have leap second info, always always always try extra hard to make sure it is as up to date as you can get it. Any =E2=80=9Cshort cut=E2=80=9D here is asking for trouble, = even if you think you can prove that no such trouble is possible. Warner --Apple-Mail=_E8A0F81E-2334-4E56-9521-4574B2EC9B16 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 iQIcBAEBCgAGBQJWIt1kAAoJEGwc0Sh9sBEAPSQQAOurNfBul18bw00iYpASv/gl lDWhyF77yd0XI7EugmZBF+jYr0jHMWlIW7ViP2qBx01aN9C3Axwz2UKzG5qZBkKl rMAsbEw7xcySbWrSu/4EtDLetr0tkXImSjon1eNpnwdrQPeklku5n+3gXJis+YF/ vG1JTc6GpoJez0HWk/DREpDwtUz3y8bHrzSPmIXcvm9OhzUDnChv2wiIZqbrK0qk wJYxkdw8rVCb8oiPMvWRlwLW7LbjzD2PkpTBlnxW1BIbXhmwslVmuYXQTXWk4fnF 6EACndACuhkIsxrfUmqrjIYqIdqAxm6YbCq0bnVv1Y+7ov1yUyk3vr57xVmrkPi7 WwbNejohjkgs0mquCp9MOvI5Z5N4kqd3/Fmh7qL51ousc5k8cZVKcF7q2sla6ahe w62+jX3mW/gtOP1hTpSnyybMHZZaxpVFzJy1tUKZF6OJF3kc4334/l1u/7b/UKvj JF5ubNkj3Rrpm3vrZVJMPZO/LTBONRsH1WItSWsQWhuX4hpXa0Po2vsnz+DFQTc8 kMO5+d3gYjsks3gGptxa3a6Y7GaXMiE5XmUfZ9AwvjjWdrK2+avUWitjrgGVAcqM EvQbSRuIIuJlP34b1hik9uDsRi+3ba4BtHre6ixSWJ9mhBETMS6Iav1n/yXpVqfM 4qyaGJ8BzskZr3euEYbm =fuAx -----END PGP SIGNATURE----- --Apple-Mail=_E8A0F81E-2334-4E56-9521-4574B2EC9B16-- From owner-svn-src-all@freebsd.org Sat Oct 17 23:48:23 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 083DAA18CE8 for ; Sat, 17 Oct 2015 23:48:23 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from mail-pa0-f52.google.com (mail-pa0-f52.google.com [209.85.220.52]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id D0E8C11DB for ; Sat, 17 Oct 2015 23:48:22 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: by pabrc13 with SMTP id rc13so153820722pab.0 for ; Sat, 17 Oct 2015 16:48:22 -0700 (PDT) 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=R/ChuBGHK9jPyeCqiKGUldqtC3t1SCRqtRlFx/ijrqc=; b=JLJBPWZ98o4KTa1QBi9HqeshMXa4h0KKTuXcrlJrPo7zrD6zJAvao6hyE9aLiKunFw hCEyHvvY856NyeYg1bBe2CSWAcSRnSLfdqUr2ROJooa/0dFNm9an5oXYwvyDssoHGv9q BpFnu7qbOXNOHNSVR6syTVIX8zPWtACqS2ROj70zsjIful9GzjZUVvjCHLywGq4tMMzW 1MUyEdrVyrZ7BiGT0KGy71MnzXoykc6Tg4QYTynJW+ZZAryB2ioseI7G6DiTD0dddAmI ooRnudtJQDm7l9IX3nmVJ33sdP78Z1S967cTt8HNgs0lk/BCIWhTts/R5nNSF7L8VJC2 AxmA== X-Gm-Message-State: ALoCoQkcJdBpQDsEjcy74mCMEnN3yRmYt0Q5iRsFkgRDT7Z9U57dWpeo6gUL9UpXDPBSTPQDq2tC X-Received: by 10.68.68.197 with SMTP id y5mr25319998pbt.88.1445125701868; Sat, 17 Oct 2015 16:48:21 -0700 (PDT) Received: from ip-100-127-128-53.ec2.internal ([69.53.245.5]) by smtp.gmail.com with ESMTPSA id jt1sm18589163pbc.83.2015.10.17.16.48.20 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Sat, 17 Oct 2015 16:48:21 -0700 (PDT) Sender: Warner Losh Subject: Re: svn commit: r289421 - in head/etc: . mtree ntp Mime-Version: 1.0 (Mac OS X Mail 8.2 \(2104\)) Content-Type: multipart/signed; boundary="Apple-Mail=_3E5135A8-EFF6-4383-9DF4-73E45AB0F707"; protocol="application/pgp-signature"; micalg=pgp-sha512 X-Pgp-Agent: GPGMail 2.5.2 From: Warner Losh In-Reply-To: <1445109956.71631.44.camel@freebsd.org> Date: Sat, 17 Oct 2015 17:48:19 -0600 Cc: Cy Schubert , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Message-Id: <95712496-46C7-4F1F-B267-F25E4924E3B4@bsdimp.com> References: <201510161404.t9GE4GqM046436@repo.freebsd.org> <8154492E-C29E-41B1-A13B-34E33586DEC6@bsdimp.com> <1445109956.71631.44.camel@freebsd.org> To: Ian Lepore 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 " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 17 Oct 2015 23:48:23 -0000 --Apple-Mail=_3E5135A8-EFF6-4383-9DF4-73E45AB0F707 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 > On Oct 17, 2015, at 1:25 PM, Ian Lepore wrote: >=20 > On Sat, 2015-10-17 at 13:19 -0600, Warner Losh wrote: >> Until the next leap second=E2=80=A6. It would be better to just >> always try to grab the latest one=E2=80=A6 Can we put something >> in periodic to do that so users that have releases >> that are older than 6 months aren=E2=80=99t screwed? >>=20 >> Warner >>=20 >=20 > I think writing a leapfeatcher task for periodic daily|weekly would > make a nice junior-hacker task. It would be nice if it only hit the > network when expiration of the installed file is imminent (like within > a month), and only if both ntp and the leapfile feature are enabled = and > stuff like that. It should probably have a configurable list of URLs > to fetch from. It should be very easy to try to fetch it once a day in June and = December until you succeed from each of the URLs in a list, with the default list being the two canonical (for the US at least) sources. Shouldn=E2=80=99= t be more than a dozen lines in a periodic script. The BIPM also publishes this data in another form, as does USNO for the paranoid that want to check. phk has also spearheaded an effort to publish this data via DNS, but I don=E2=80=99t know if that=E2=80=99s = live and automated or just live and experimental=E2=80=A6 Warner > -- Ian >=20 >>> On Oct 16, 2015, at 8:04 AM, Cy Schubert wrote: >>>=20 >>> Author: cy >>> Date: Fri Oct 16 14:04:16 2015 >>> New Revision: 289421 >>> URL: https://svnweb.freebsd.org/changeset/base/289421 >>>=20 >>> Log: >>> Add default leap-seconds file. This should help ntp networks get >>> the >>> leap second date correct >>>=20 >>> Updates to the file can be obtained from ftp://time.nist.gov/pub/ >>> or >>> ftp://tycho.usno.navy.mil/pub/ntp/. >>>=20 >>> Suggested by: dwmalone >>> Reviewed by: roberto, dwmalone, delphij >>> Approved by: roberto >>> MFC after: 1 week >>>=20 >>> Added: >>> head/etc/ntp/ >>> head/etc/ntp/Makefile (contents, props changed) >>> head/etc/ntp/leap-seconds (contents, props changed) >>> Modified: >>> head/etc/Makefile >>> head/etc/mtree/BSD.var.dist >>> head/etc/ntp.conf >>>=20 >>> Modified: head/etc/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/etc/Makefile Fri Oct 16 12:53:22 2015 (r2894 >>> 20) >>> +++ head/etc/Makefile Fri Oct 16 14:04:16 2015 (r2894 >>> 21) >>> @@ -240,6 +240,9 @@ distribution: >>> ${_+_}cd ${.CURDIR}/defaults; ${MAKE} install >>> ${_+_}cd ${.CURDIR}/devd; ${MAKE} install >>> ${_+_}cd ${.CURDIR}/gss; ${MAKE} install >>> +.if ${MK_NTP} !=3D "no" >>> + ${_+_}cd ${.CURDIR}/ntp; ${MAKE} install >>> +.endif >>> ${_+_}cd ${.CURDIR}/periodic; ${MAKE} install >>> .if ${MK_PKGBOOTSTRAP} !=3D "no" >>> ${_+_}cd ${.CURDIR}/pkg; ${MAKE} install >>>=20 >>> Modified: head/etc/mtree/BSD.var.dist >>> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=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/etc/mtree/BSD.var.dist Fri Oct 16 12:53:22 2015 >>> (r289420) >>> +++ head/etc/mtree/BSD.var.dist Fri Oct 16 14:04:16 2015 >>> (r289421) >>> @@ -46,6 +46,8 @@ >>> .. >>> ipf mode=3D0700 >>> .. >>> + ntp mode=3D0700 >>> + .. >>> pkg >>> .. >>> ports >>>=20 >>> Modified: head/etc/ntp.conf >>> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=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/etc/ntp.conf Fri Oct 16 12:53:22 2015 (r2894 >>> 20) >>> +++ head/etc/ntp.conf Fri Oct 16 14:04:16 2015 (r2894 >>> 21) >>> @@ -77,3 +77,8 @@ restrict 127.127.1.0 >>> # >>> #server 127.127.1.0 >>> #fudge 127.127.1.0 stratum 10 >>> + >>> +# See >>> http://support.ntp.org/bin/view/Support/ConfiguringNTP#Section_6.14 >>> . >>> +# for documentation regarding leapfile. Updates to the file can be >>> obtained >>> +# from ftp://time.nist.gov/pub/ or >>> ftp://tycho.usno.navy.mil/pub/ntp/. >>> +leapfile "/etc/ntp/leap-seconds" >>>=20 >>> Added: head/etc/ntp/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 >>> --- /dev/null 00:00:00 1970 (empty, because file is >>> newly added) >>> +++ head/etc/ntp/Makefile Fri Oct 16 14:04:16 2015 (r >>> 289421) >>> @@ -0,0 +1,10 @@ >>> +# $FreeBSD$ >>> + >>> +NO_OBJ=3D >>> + >>> +FILES=3D leap-seconds >>> + >>> +FILESDIR=3D /etc/ntp >>> +FILESMODE=3D 644 >>> + >>> +.include >>>=20 >>> Added: head/etc/ntp/leap-seconds >>> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D >>> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D >>> --- /dev/null 00:00:00 1970 (empty, because file is >>> newly added) >>> +++ head/etc/ntp/leap-seconds Fri Oct 16 14:04:16 2015 >>> (r289421) >>> @@ -0,0 +1,119 @@ >>> +# >>> +# $FreeBSD$ >>> +# >>> +# ATOMIC TIME. >>> +# The Coordinated Universal Time (UTC) is the reference >>> time scale derived >>> +# from The "Temps Atomique International" (TAI) calculated >>> by the Bureau >>> +# International des Poids et Mesures (BIPM) using a >>> worldwide network of atomic >>> +# clocks. UTC differs from TAI by an integer number of >>> seconds; it is the basis >>> +# of all activities in the world. >>> +# >>> +# >>> +# ASTRONOMICAL TIME (UT1) is the time scale based on the >>> rate of rotation of the earth. >>> +# It is now mainly derived from Very Long Baseline >>> Interferometry (VLBI). The various >>> +# irregular fluctuations progressively detected in the >>> rotation rate of the Earth lead >>> +# in 1972 to the replacement of UT1 by UTC as the reference >>> time scale. >>> +# >>> +# >>> +# LEAP SECOND >>> +# Atomic clocks are more stable than the rate of the earth >>> rotatiob since the later >>> +# undergoes a full range of geophysical perturbations at >>> various time scales (lunisolar >>> +# and core-mantle torques,atmospheric and oceanic effetcs, >>> ...) >>> +# Leap seconds are needed to keep the two time scales in >>> agreement, i.e. UT1-UTC smaller >>> +# than 0.9 second. So, when necessary a "leap second" is >>> introduced in UTC. >>> +# Since the adoption of this system in 1972 it has been >>> necessary to add 26 seconds to UTC, >>> +# firstly due to the initial choice of the value of the >>> second (1/86400 mean solar day of >>> +# the year 1820) and secondly to the general slowing down >>> of the Earth's rotation. It is >>> +# theorically possible to have a negative leap second (a >>> second removed from UTC), but so far, >>> +# all leap seconds have been positive (a second has been >>> added to UTC). Based on what we know about the earth's rotation, >>> +# it is unlikely that we will ever have a negative leap >>> second. >>> +# >>> +# >>> +# HISTORY >>> +# The first leap second was added on June 30, 1972. Until >>> 2000, it was necessary in average to add a leap second at a rate >>> +# of 1 to 2 years. Since 2000, due to the fact that the >>> earth rate of rotation is accelerating, leap seconds are introduced >>> +# with an average frequency of 3 to 4 years. >>> +# >>> +# >>> +# RESPONSABILITY OF THE DECISION TO INTRODUCE A LEAP SECOND >>> IN UTC >>> +# The decision to introduce a leap second in UTC is the >>> responsibility of the Earth Orientation Center of >>> +# the International Earth Rotation and reference System >>> Service (IERS). This center is located at Paris >>> +# Observatory. According to international agreements, leap >>> second date have to occur at fixed date : >>> +# first preference is given to the end of December and >>> June, and second preference at the end of March >>> +# and September. Since the system was introduced in 1972, >>> only dates in June and December were used. >>> +# >>> +# Questions or comments to: >>> +# Daniel Gambis, daniel.gambis@obspm.fr >>> +# Christian Bizouard: >>> christian.bizouard@obspm.fr >>> +# Earth orientation Center of the IERS >>> +# Paris Observatory, France >>> +# >>> +# >>> +# >>> +# VALIDITY OF THE FILE >>> +# It is important to express the validity of the file. >>> These next two dates are >>> +# given in units of seconds since 1900.0. >>> +# >>> +# 1) Last update of the file. >>> +# >>> +# Updated through IERS Bulletin C ( >>> ftp://hpiers.obspm.fr/iers/bul/bulc/bulletinc.dat) >>> +# >>> +# The following line shows the last update of this file in >>> NTP timestamp: >>> +# >>> +#$ 3645216000 >>> +# >>> +# 2) Expiration date of the file given on a semi-annual >>> basis: last June or last December >>> +# >>> +# File expires on 28 December 2015 >>> +# >>> +# Expire date in NTP timestamp: >>> +# >>> +#@ 3660249600 >>> +# >>> +# >>> +# LIST OF LEAP SECONDS >>> +# NTP timestamp (X parameter) is the number of seconds >>> since 1900.0 >>> +# >>> +# MJD: The Modified Julian Day number. MJD =3D X/86400 + >>> 15020 >>> +# >>> +# DTAI: The difference DTAI=3D TAI-UTC in units of seconds >>> +# It is the quantity to add to UTC to get the time in TAI >>> +# >>> +# Day Month Year : epoch in clear >>> +# >>> +#NTP Time DTAI Day Month Year >>> +# >>> +2272060800 10 # 1 Jan 1972 >>> +2287785600 11 # 1 Jul 1972 >>> +2303683200 12 # 1 Jan 1973 >>> +2335219200 13 # 1 Jan 1974 >>> +2366755200 14 # 1 Jan 1975 >>> +2398291200 15 # 1 Jan 1976 >>> +2429913600 16 # 1 Jan 1977 >>> +2461449600 17 # 1 Jan 1978 >>> +2492985600 18 # 1 Jan 1979 >>> +2524521600 19 # 1 Jan 1980 >>> +2571782400 20 # 1 Jul 1981 >>> +2603318400 21 # 1 Jul 1982 >>> +2634854400 22 # 1 Jul 1983 >>> +2698012800 23 # 1 Jul 1985 >>> +2776982400 24 # 1 Jan 1988 >>> +2840140800 25 # 1 Jan 1990 >>> +2871676800 26 # 1 Jan 1991 >>> +2918937600 27 # 1 Jul 1992 >>> +2950473600 28 # 1 Jul 1993 >>> +2982009600 29 # 1 Jul 1994 >>> +3029443200 30 # 1 Jan 1996 >>> +3076704000 31 # 1 Jul 1997 >>> +3124137600 32 # 1 Jan 1999 >>> +3345062400 33 # 1 Jan 2006 >>> +3439756800 34 # 1 Jan 2009 >>> +3550089600 35 # 1 Jul 2012 >>> +3644697600 36 # 1 Jul 2015 >>> +# >>> +# In order to verify the integrity of this file, a hash >>> code >>> +# has been generated. For more information how to use >>> +# this hash code, please consult the README file under the >>> +# 'sha' repertory. >>> +# >>> +#h 620ba8af 37900668 95ac09ba d77640f9 6fd75493 >>>=20 >>=20 --Apple-Mail=_3E5135A8-EFF6-4383-9DF4-73E45AB0F707 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 iQIcBAEBCgAGBQJWIt5DAAoJEGwc0Sh9sBEA2L0P/jNNWWqslhtFThKvaIMY8Mi+ 1+TeNFMCm2NmbHvMrpIyYycBFx4JcqjkJ82wLbJ/52CRDjsa0riGIPMe1bRuIZzA VWzqoLDp8MXlZq7uT9jHlqgFN7hy98Zf61CDuwN7e9z2QIHc3oROKLtc0rpwQE+K e4/f8r5cCBa41iVulk7Q3knwgMEVCXvapU002vusKbs51vy4BmD90MF+I+3zBYJH 2RqOpRm4IH9NmbhweD8wmPdgTXlGwJREQMyC3fD9c+8kzTnHqSCQp02H/TqFqwv8 /QjrOcyl6z48Ro1v8fVeeKNUqzX2PqyLsT2b/OvjJuRzdizGh6iflzpb8NxCbJ/v mE4OsV87buWx3fWpF3zIljetMu+1+YsuyZYkbctoBlbEFqdKXKn2uKr79GXgca3Z /41wyUzEZ1JiZAplIuK6suXOMe7OekOVjwgtuK8ccU5BGg47IOaKZ+9a//BucAqH wc646HULfckwaedLduUFB7Eq+eiVWxuz2F7j2p/OdNy9H+BkagsjtvgSw3c6ne8z 5DXiiKOE+kX60FLkdUU118jF2Mq0MJWtux6Xzc+joREs002Hq6KUX7fhSaoNZa8u cZhPG5qkgtrXQqLukBeBRcqRiDLCjAGJ5lIP/rCBWJV3EeiuMfvjlhz3UxLjQXp8 o0slawiRn02VfwpbTjUU =wsDF -----END PGP SIGNATURE----- --Apple-Mail=_3E5135A8-EFF6-4383-9DF4-73E45AB0F707--