From owner-svn-src-head@freebsd.org Sun Jan 8 02:32:54 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id ACC7CC99D3B; Sun, 8 Jan 2017 02:32:54 +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 870FD131D; Sun, 8 Jan 2017 02:32:54 +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 v082Wrpk028929; Sun, 8 Jan 2017 02:32:53 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v082WruG028927; Sun, 8 Jan 2017 02:32:53 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201701080232.v082WruG028927@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Sun, 8 Jan 2017 02:32:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r311660 - 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-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 08 Jan 2017 02:32:54 -0000 Author: ian Date: Sun Jan 8 02:32:53 2017 New Revision: 311660 URL: https://svnweb.freebsd.org/changeset/base/311660 Log: Add a new sdhci interface method, get_card_present(). Many embedded SoC controllers that are (more or less) sdhci-compatible don't implement card detect, and the related values in the PRESENT_STATE register aren't useful. A bridge driver can now implement get_card_present() to read a gpio pin or whatever else is necessary for that system. The default implementation reads the CARD_PRESENT bit from the PRESENT_STATE register, so existing drivers will keep working (or keep not-fully-working, since many drivers right now can't detect card insert/remove). Modified: head/sys/dev/sdhci/sdhci.c head/sys/dev/sdhci/sdhci.h head/sys/dev/sdhci/sdhci_if.m Modified: head/sys/dev/sdhci/sdhci.c ============================================================================== --- head/sys/dev/sdhci/sdhci.c Sat Jan 7 23:42:17 2017 (r311659) +++ head/sys/dev/sdhci/sdhci.c Sun Jan 8 02:32:53 2017 (r311660) @@ -164,8 +164,7 @@ sdhci_reset(struct sdhci_slot *slot, uin int timeout; if (slot->quirks & SDHCI_QUIRK_NO_CARD_NO_RESET) { - if (!(RD4(slot, SDHCI_PRESENT_STATE) & - SDHCI_CARD_PRESENT)) + if (!SDHCI_GET_CARD_PRESENT(slot->bus, slot)) return; } @@ -489,7 +488,7 @@ sdhci_card_task(void *arg, int pending) struct sdhci_slot *slot = arg; SDHCI_LOCK(slot); - if (RD4(slot, SDHCI_PRESENT_STATE) & SDHCI_CARD_PRESENT) { + if (SDHCI_GET_CARD_PRESENT(slot->bus, slot)) { if (slot->dev == NULL) { /* If card is present - attach mmc bus. */ slot->dev = device_add_child(slot->bus, "mmc", -1); @@ -718,6 +717,13 @@ sdhci_generic_min_freq(device_t brdev, s return (slot->max_clk / SDHCI_200_MAX_DIVIDER); } +bool +sdhci_generic_get_card_present(device_t brdev, struct sdhci_slot *slot) +{ + + return (RD4(slot, SDHCI_PRESENT_STATE) & SDHCI_CARD_PRESENT); +} + int sdhci_generic_update_ios(device_t brdev, device_t reqdev) { @@ -834,7 +840,7 @@ sdhci_start_command(struct sdhci_slot *s state = RD4(slot, SDHCI_PRESENT_STATE); /* Do not issue command if there is no card, clock or power. * Controller will not detect timeout without clock active. */ - if ((state & SDHCI_CARD_PRESENT) == 0 || + if (!SDHCI_GET_CARD_PRESENT(slot->bus, slot) || slot->power == 0 || slot->clock == 0) { cmd->error = MMC_ERR_FAILED; @@ -1323,7 +1329,7 @@ sdhci_generic_intr(struct sdhci_slot *sl /* Handle card presence interrupts. */ if (intmask & (SDHCI_INT_CARD_INSERT | SDHCI_INT_CARD_REMOVE)) { - present = RD4(slot, SDHCI_PRESENT_STATE) & SDHCI_CARD_PRESENT; + present = SDHCI_GET_CARD_PRESENT(slot->bus, slot); slot->intmask &= ~(SDHCI_INT_CARD_INSERT | SDHCI_INT_CARD_REMOVE); slot->intmask |= present ? SDHCI_INT_CARD_REMOVE : Modified: head/sys/dev/sdhci/sdhci.h ============================================================================== --- head/sys/dev/sdhci/sdhci.h Sat Jan 7 23:42:17 2017 (r311659) +++ head/sys/dev/sdhci/sdhci.h Sun Jan 8 02:32:53 2017 (r311660) @@ -322,5 +322,6 @@ int sdhci_generic_acquire_host(device_t int sdhci_generic_release_host(device_t brdev, device_t reqdev); void sdhci_generic_intr(struct sdhci_slot *slot); uint32_t sdhci_generic_min_freq(device_t brdev, struct sdhci_slot *slot); +bool sdhci_generic_get_card_present(device_t brdev, struct sdhci_slot *slot); #endif /* __SDHCI_H__ */ Modified: head/sys/dev/sdhci/sdhci_if.m ============================================================================== --- head/sys/dev/sdhci/sdhci_if.m Sat Jan 7 23:42:17 2017 (r311659) +++ head/sys/dev/sdhci/sdhci_if.m Sun Jan 8 02:32:53 2017 (r311660) @@ -152,3 +152,9 @@ METHOD uint32_t min_freq { device_t brdev; struct sdhci_slot *slot; } DEFAULT sdhci_generic_min_freq; + +METHOD bool get_card_present { + device_t brdev; + struct sdhci_slot *slot; +} DEFAULT sdhci_generic_get_card_present; + From owner-svn-src-head@freebsd.org Sun Jan 8 04:23:07 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1A88CCA5021; Sun, 8 Jan 2017 04:23:07 +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 DA1CB1F3C; Sun, 8 Jan 2017 04:23:06 +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 v084N6G4073713; Sun, 8 Jan 2017 04:23:06 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v084N6Sc073712; Sun, 8 Jan 2017 04:23:06 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201701080423.v084N6Sc073712@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Sun, 8 Jan 2017 04:23:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r311661 - head/sys/net80211 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 08 Jan 2017 04:23:07 -0000 Author: adrian Date: Sun Jan 8 04:23:05 2017 New Revision: 311661 URL: https://svnweb.freebsd.org/changeset/base/311661 Log: [net80211] add a "is VHT available" macro. We have run out of config bits, sigh, so until I expand the ic config bits, just use this macro as a substitute. Modified: head/sys/net80211/ieee80211_var.h Modified: head/sys/net80211/ieee80211_var.h ============================================================================== --- head/sys/net80211/ieee80211_var.h Sun Jan 8 02:32:53 2017 (r311660) +++ head/sys/net80211/ieee80211_var.h Sun Jan 8 04:23:05 2017 (r311661) @@ -88,6 +88,14 @@ #define IEEE80211_TU_TO_TICKS(x)(((uint64_t)(x) * 1024 * hz) / (1000 * 1000)) /* + * Technically, vhtflags may be 0 /and/ 11ac is enabled. + * At some point ic should just grow a flag somewhere that + * says that VHT is supported - and then this macro can be + * changed. + */ +#define IEEE80211_CONF_VHT(ic) ((ic)->ic_vhtcaps != 0) + +/* * 802.11 control state is split into a common portion that maps * 1-1 to a physical device and one or more "Virtual AP's" (VAP) * that are bound to an ieee80211com instance and share a single From owner-svn-src-head@freebsd.org Sun Jan 8 04:25:43 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 15647CA514B; Sun, 8 Jan 2017 04:25: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 D1D711185; Sun, 8 Jan 2017 04:25: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 v084Pg61073842; Sun, 8 Jan 2017 04:25:42 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v084Pg57073840; Sun, 8 Jan 2017 04:25:42 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201701080425.v084Pg57073840@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Sun, 8 Jan 2017 04:25:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r311662 - head/sys/net80211 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 08 Jan 2017 04:25:43 -0000 Author: adrian Date: Sun Jan 8 04:25:41 2017 New Revision: 311662 URL: https://svnweb.freebsd.org/changeset/base/311662 Log: [net80211] Add initial VHT support routines. This is a skeleton set based on ieee80211_ht.c. It implements some IE parsing, some basic unfinished negotiation, and channel promotion/demotion. However, by itself it's not enough to do VHT - notably, the actual channel promotion for STA mode at least is done in ieee80211_ht.c as part of htinfo_update_chw(). I was .. quite amused when I found that out. I'm checking this in so others can see progress rather than one huge commit when VHT is "done" (which will likely be quite a while.) Added: head/sys/net80211/ieee80211_vht.c (contents, props changed) head/sys/net80211/ieee80211_vht.h (contents, props changed) Added: head/sys/net80211/ieee80211_vht.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/net80211/ieee80211_vht.c Sun Jan 8 04:25:41 2017 (r311662) @@ -0,0 +1,469 @@ +/*- + * Copyright (c) 2017 Adrian Chadd + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include +#ifdef __FreeBSD__ +__FBSDID("$FreeBSD$"); +#endif + +/* + * IEEE 802.11ac-2013 protocol support. + */ + +#include "opt_inet.h" +#include "opt_wlan.h" + +#include +#include +#include +#include +#include + +#include + +#include +#include +#include +#include + +#include +#include +#include +#include + +/* define here, used throughout file */ +#define MS(_v, _f) (((_v) & _f) >> _f##_S) +#define SM(_v, _f) (((_v) << _f##_S) & _f) + +#define ADDSHORT(frm, v) do { \ + frm[0] = (v) & 0xff; \ + frm[1] = (v) >> 8; \ + frm += 2; \ +} while (0) +#define ADDWORD(frm, v) do { \ + frm[0] = (v) & 0xff; \ + frm[1] = ((v) >> 8) & 0xff; \ + frm[2] = ((v) >> 16) & 0xff; \ + frm[3] = ((v) >> 24) & 0xff; \ + frm += 4; \ +} while (0) + +/* + * XXX TODO: handle WLAN_ACTION_VHT_OPMODE_NOTIF + * + * Look at mac80211/vht.c:ieee80211_vht_handle_opmode() for further details. + */ + +static void +ieee80211_vht_init(void) +{ +} + +SYSINIT(wlan_vht, SI_SUB_DRIVERS, SI_ORDER_FIRST, ieee80211_vht_init, NULL); + +void +ieee80211_vht_attach(struct ieee80211com *ic) +{ +} + +void +ieee80211_vht_detach(struct ieee80211com *ic) +{ +} + +void +ieee80211_vht_vattach(struct ieee80211vap *vap) +{ + struct ieee80211com *ic = vap->iv_ic; + + if (! IEEE80211_CONF_VHT(ic)) + return; + + vap->iv_vhtcaps = ic->ic_vhtcaps; + vap->iv_vhtextcaps = ic->ic_vhtextcaps; + + /* XXX assume VHT80 support; should really check vhtcaps */ + vap->iv_flags_vht = + IEEE80211_FVHT_VHT + | IEEE80211_FVHT_USEVHT40 + | IEEE80211_FVHT_USEVHT80; + /* XXX TODO: enable VHT80+80, VHT160 capabilities */ + + memcpy(&vap->iv_vht_mcsinfo, &ic->ic_vht_mcsinfo, + sizeof(struct ieee80211_vht_mcs_info)); +} + +void +ieee80211_vht_vdetach(struct ieee80211vap *vap) +{ +} + +#if 0 +static void +vht_announce(struct ieee80211com *ic, enum ieee80211_phymode mode) +{ +} +#endif + +static int +vht_mcs_to_num(int m) +{ + + switch (m) { + case IEEE80211_VHT_MCS_SUPPORT_0_7: + return (7); + case IEEE80211_VHT_MCS_SUPPORT_0_8: + return (8); + case IEEE80211_VHT_MCS_SUPPORT_0_9: + return (9); + default: + return (0); + } +} + +void +ieee80211_vht_announce(struct ieee80211com *ic) +{ + int i, tx, rx; + + if (! IEEE80211_CONF_VHT(ic)) + return; + + /* Channel width */ + ic_printf(ic, "[VHT] Channel Widths: 20MHz, 40MHz, 80MHz"); + if (ic->ic_vhtcaps & IEEE80211_VHTCAP_SUPP_CHAN_WIDTH_160_80PLUS80MHZ) + printf(" 80+80MHz"); + if (ic->ic_vhtcaps & IEEE80211_VHTCAP_SUPP_CHAN_WIDTH_160MHZ) + printf(" 160MHz"); + printf("\n"); + + /* Features */ + ic_printf(ic, "[VHT] Features: %b\n", ic->ic_vhtcaps, + IEEE80211_VHTCAP_BITS); + + /* For now, just 5GHz VHT. Worry about 2GHz VHT later */ + for (i = 0; i < 7; i++) { + /* Each stream is 2 bits */ + tx = (ic->ic_vht_mcsinfo.tx_mcs_map >> (2*i)) & 0x3; + rx = (ic->ic_vht_mcsinfo.rx_mcs_map >> (2*i)) & 0x3; + if (tx == 3 && rx == 3) + continue; + ic_printf(ic, "[VHT] NSS %d: TX MCS 0..%d, RX MCS 0..%d\n", + i + 1, + vht_mcs_to_num(tx), + vht_mcs_to_num(rx)); + } +} + +void +ieee80211_vht_node_init(struct ieee80211_node *ni) +{ + + IEEE80211_NOTE(ni->ni_vap, IEEE80211_MSG_11N, ni, + "%s: called", __func__); + ni->ni_flags |= IEEE80211_NODE_VHT; +} + +void +ieee80211_vht_node_cleanup(struct ieee80211_node *ni) +{ + + IEEE80211_NOTE(ni->ni_vap, IEEE80211_MSG_11N, ni, + "%s: called", __func__); + ni->ni_flags &= ~IEEE80211_NODE_VHT; + ni->ni_vhtcap = 0; + bzero(&ni->ni_vht_mcsinfo, sizeof(struct ieee80211_vht_mcs_info)); +} + +/* + * Parse an 802.11ac VHT operation IE. + */ +void +ieee80211_parse_vhtopmode(struct ieee80211_node *ni, const uint8_t *ie) +{ + /* vht operation */ + ni->ni_vht_chanwidth = ie[2]; + ni->ni_vht_chan1 = ie[3]; + ni->ni_vht_chan2 = ie[4]; + ni->ni_vht_basicmcs = le16dec(ie + 5); + +#if 0 + printf("%s: chan1=%d, chan2=%d, chanwidth=%d, basicmcs=0x%04x\n", + __func__, + ni->ni_vht_chan1, + ni->ni_vht_chan2, + ni->ni_vht_chanwidth, + ni->ni_vht_basicmcs); +#endif +} + +/* + * Parse an 802.11ac VHT capability IE. + */ +void +ieee80211_parse_vhtcap(struct ieee80211_node *ni, const uint8_t *ie) +{ + + /* vht capability */ + ni->ni_vhtcap = le32dec(ie + 2); + + /* suppmcs */ + ni->ni_vht_mcsinfo.rx_mcs_map = le16dec(ie + 6); + ni->ni_vht_mcsinfo.rx_highest = le16dec(ie + 8); + ni->ni_vht_mcsinfo.tx_mcs_map = le16dec(ie + 10); + ni->ni_vht_mcsinfo.tx_highest = le16dec(ie + 12); +} + +int +ieee80211_vht_updateparams(struct ieee80211_node *ni, + const uint8_t *vhtcap_ie, + const uint8_t *vhtop_ie) +{ + + //printf("%s: called\n", __func__); + + ieee80211_parse_vhtcap(ni, vhtcap_ie); + ieee80211_parse_vhtopmode(ni, vhtop_ie); + return (0); +} + +void +ieee80211_setup_vht_rates(struct ieee80211_node *ni, + const uint8_t *vhtcap_ie, + const uint8_t *vhtop_ie) +{ + + //printf("%s: called\n", __func__); + /* XXX TODO */ +} + +void +ieee80211_vht_timeout(struct ieee80211com *ic) +{ +} + +void +ieee80211_vht_node_join(struct ieee80211_node *ni) +{ + + IEEE80211_NOTE(ni->ni_vap, IEEE80211_MSG_11N, ni, + "%s: called", __func__); +} + +void +ieee80211_vht_node_leave(struct ieee80211_node *ni) +{ + + IEEE80211_NOTE(ni->ni_vap, IEEE80211_MSG_11N, ni, + "%s: called", __func__); +} + +uint8_t * +ieee80211_add_vhtcap(uint8_t *frm, struct ieee80211_node *ni) +{ + uint32_t cap; + + memset(frm, '\0', sizeof(struct ieee80211_ie_vhtcap)); + + frm[0] = IEEE80211_ELEMID_VHT_CAP; + frm[1] = sizeof(struct ieee80211_ie_vhtcap) - 2; + frm += 2; + + /* + * For now, don't do any configuration. + * Just populate the node configuration. + * We can worry about making it configurable later. + */ + + cap = ni->ni_vhtcap; + + /* + * XXX TODO: any capability changes required by + * configuration. + */ + + /* 32-bit VHT capability */ + ADDWORD(frm, cap); + + /* suppmcs */ + ADDSHORT(frm, ni->ni_vht_mcsinfo.rx_mcs_map); + ADDSHORT(frm, ni->ni_vht_mcsinfo.rx_highest); + ADDSHORT(frm, ni->ni_vht_mcsinfo.tx_mcs_map); + ADDSHORT(frm, ni->ni_vht_mcsinfo.tx_highest); + + return (frm); +} + +static uint8_t +ieee80211_vht_get_chwidth_ie(struct ieee80211_channel *c) +{ + + /* + * XXX TODO: look at the node configuration as + * well? + */ + + if (IEEE80211_IS_CHAN_VHT160(c)) { + return IEEE80211_VHT_CHANWIDTH_160MHZ; + } + if (IEEE80211_IS_CHAN_VHT80_80(c)) { + return IEEE80211_VHT_CHANWIDTH_80P80MHZ; + } + if (IEEE80211_IS_CHAN_VHT80(c)) { + return IEEE80211_VHT_CHANWIDTH_80MHZ; + } + if (IEEE80211_IS_CHAN_VHT40(c)) { + return IEEE80211_VHT_CHANWIDTH_USE_HT; + } + if (IEEE80211_IS_CHAN_VHT20(c)) { + return IEEE80211_VHT_CHANWIDTH_USE_HT; + } + + /* We shouldn't get here */ + printf("%s: called on a non-VHT channel (freq=%d, flags=0x%08x\n", + __func__, + (int) c->ic_freq, + c->ic_flags); + return IEEE80211_VHT_CHANWIDTH_USE_HT; +} + +/* + * Note: this just uses the current channel information; + * it doesn't use the node info after parsing. + */ +uint8_t * +ieee80211_add_vhtinfo(uint8_t *frm, struct ieee80211_node *ni) +{ + memset(frm, '\0', sizeof(struct ieee80211_ie_vht_operation)); + + frm[0] = IEEE80211_ELEMID_VHT_OPMODE; + frm[1] = sizeof(struct ieee80211_ie_vht_operation) - 2; + frm += 2; + + /* + * XXX if it's a station, then see if we have a node + * channel or ANYC. If it's ANYC then assume we're + * scanning, and announce our capabilities. + * + * This should set the "20/40/80/160MHz wide config"; + * the 80/80 or 160MHz wide config is done in VHTCAP. + * + * Other modes - just limit it to the channel. + */ + + /* 8-bit chanwidth */ + *frm++ = ieee80211_vht_get_chwidth_ie(ni->ni_chan); + + /* 8-bit freq1 */ + *frm++ = ni->ni_chan->ic_vht_ch_freq1; + + /* 8-bit freq2 */ + *frm++ = ni->ni_chan->ic_vht_ch_freq1; + + /* 16-bit basic MCS set - just MCS0..7 for NSS=1 for now */ + ADDSHORT(frm, 0xfffc); + + return (frm); +} + +void +ieee80211_vht_update_cap(struct ieee80211_node *ni, const uint8_t *vhtcap_ie, + const uint8_t *vhtop_ie) +{ + + ieee80211_parse_vhtcap(ni, vhtcap_ie); + ieee80211_parse_vhtopmode(ni, vhtop_ie); +} + +static struct ieee80211_channel * +findvhtchan(struct ieee80211com *ic, struct ieee80211_channel *c, int vhtflags) +{ + + return (ieee80211_find_channel(ic, c->ic_freq, + (c->ic_flags & ~IEEE80211_CHAN_VHT) | vhtflags)); +} + +/* + * Handle channel promotion to VHT, similar to ieee80211_ht_adjust_channel(). + */ +struct ieee80211_channel * +ieee80211_vht_adjust_channel(struct ieee80211com *ic, + struct ieee80211_channel *chan, int flags) +{ + struct ieee80211_channel *c; + + /* First case - handle channel demotion - if VHT isn't set */ + if ((flags & IEEE80211_FVHT_VHT) == 0) { +#if 0 + printf("%s: demoting channel %d/0x%08x\n", __func__, + chan->ic_ieee, chan->ic_flags); +#endif + c = ieee80211_find_channel(ic, chan->ic_freq, + chan->ic_flags & ~IEEE80211_CHAN_VHT); + if (c == NULL) + c = chan; +#if 0 + printf("%s: .. to %d/0x%08x\n", __func__, + c->ic_ieee, c->ic_flags); +#endif + return (c); + } + + /* + * We can upgrade to VHT - attempt to do so + * + * Note: we don't clear the HT flags, these are the hints + * for HT40U/HT40D when selecting VHT40 or larger channels. + */ + /* Start with VHT80 */ + c = NULL; + if ((c == NULL) && (flags & IEEE80211_FVHT_USEVHT160)) + c = findvhtchan(ic, chan, IEEE80211_CHAN_VHT80); + + if ((c == NULL) && (flags & IEEE80211_FVHT_USEVHT80P80)) + c = findvhtchan(ic, chan, IEEE80211_CHAN_VHT80_80); + + if ((c == NULL) && (flags & IEEE80211_FVHT_USEVHT80)) + c = findvhtchan(ic, chan, IEEE80211_CHAN_VHT80); + + if ((c == NULL) && (flags & IEEE80211_FVHT_USEVHT40)) + c = findvhtchan(ic, chan, IEEE80211_CHAN_VHT40U); + if ((c == NULL) && (flags & IEEE80211_FVHT_USEVHT40)) + c = findvhtchan(ic, chan, IEEE80211_CHAN_VHT40D); + /* + * If we get here, VHT20 is always possible because we checked + * for IEEE80211_FVHT_VHT above. + */ + if (c == NULL) + c = findvhtchan(ic, chan, IEEE80211_CHAN_VHT20); + + if (c != NULL) + chan = c; + +#if 0 + printf("%s: selected %d/0x%08x\n", __func__, c->ic_ieee, c->ic_flags); +#endif + return (chan); +} Added: head/sys/net80211/ieee80211_vht.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/net80211/ieee80211_vht.h Sun Jan 8 04:25:41 2017 (r311662) @@ -0,0 +1,63 @@ +/*- + * Copyright (c) 2016 Adrian Chadd + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * $FreeBSD$ + */ +#ifndef _NET80211_IEEE80211_VHT_H_ +#define _NET80211_IEEE80211_VHT_H_ + +void ieee80211_vht_attach(struct ieee80211com *); +void ieee80211_vht_detach(struct ieee80211com *); +void ieee80211_vht_vattach(struct ieee80211vap *); +void ieee80211_vht_vdetach(struct ieee80211vap *); + +void ieee80211_vht_announce(struct ieee80211com *); + +void ieee80211_vht_node_init(struct ieee80211_node *); +void ieee80211_vht_node_cleanup(struct ieee80211_node *); + +void ieee80211_parse_vhtopmode(struct ieee80211_node *, const uint8_t *); +void ieee80211_parse_vhtcap(struct ieee80211_node *, const uint8_t *); + +int ieee80211_vht_updateparams(struct ieee80211_node *, + const uint8_t *, const uint8_t *); +void ieee80211_setup_vht_rates(struct ieee80211_node *, + const uint8_t *, const uint8_t *); + +void ieee80211_vht_timeout(struct ieee80211com *ic); + +void ieee80211_vht_node_join(struct ieee80211_node *ni); +void ieee80211_vht_node_leave(struct ieee80211_node *ni); + +uint8_t * ieee80211_add_vhtcap(uint8_t *frm, struct ieee80211_node *); +uint8_t * ieee80211_add_vhtinfo(uint8_t *frm, struct ieee80211_node *); + +void ieee80211_vht_update_cap(struct ieee80211_node *, + const uint8_t *, const uint8_t *); + +struct ieee80211_channel * + ieee80211_vht_adjust_channel(struct ieee80211com *, + struct ieee80211_channel *, int); + +#endif /* _NET80211_IEEE80211_VHT_H_ */ From owner-svn-src-head@freebsd.org Sun Jan 8 04:27:09 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 53368CA51CF; Sun, 8 Jan 2017 04:27:09 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 24FF61323; Sun, 8 Jan 2017 04:27:09 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v084R8W5073942; Sun, 8 Jan 2017 04:27:08 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v084R8dH073940; Sun, 8 Jan 2017 04:27:08 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201701080427.v084R8dH073940@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Sun, 8 Jan 2017 04:27:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r311663 - in head/sys: conf modules/wlan X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 08 Jan 2017 04:27:09 -0000 Author: adrian Date: Sun Jan 8 04:27:08 2017 New Revision: 311663 URL: https://svnweb.freebsd.org/changeset/base/311663 Log: [net80211] include the prototype VHT code into the build. Note: it isn't called anywhere yet! Modified: head/sys/conf/files head/sys/modules/wlan/Makefile Modified: head/sys/conf/files ============================================================================== --- head/sys/conf/files Sun Jan 8 04:25:41 2017 (r311662) +++ head/sys/conf/files Sun Jan 8 04:27:08 2017 (r311663) @@ -3965,6 +3965,7 @@ net80211/ieee80211_sta.c optional wlan \ net80211/ieee80211_superg.c optional wlan ieee80211_support_superg net80211/ieee80211_scan_sw.c optional wlan net80211/ieee80211_tdma.c optional wlan ieee80211_support_tdma +net80211/ieee80211_vht.c optional wlan net80211/ieee80211_wds.c optional wlan net80211/ieee80211_xauth.c optional wlan wlan_xauth net80211/ieee80211_alq.c optional wlan ieee80211_alq Modified: head/sys/modules/wlan/Makefile ============================================================================== --- head/sys/modules/wlan/Makefile Sun Jan 8 04:25:41 2017 (r311662) +++ head/sys/modules/wlan/Makefile Sun Jan 8 04:27:08 2017 (r311663) @@ -12,7 +12,7 @@ SRCS= ieee80211.c ieee80211_action.c iee ieee80211_ratectl_none.c ieee80211_regdomain.c \ ieee80211_ht.c ieee80211_hwmp.c ieee80211_adhoc.c ieee80211_hostap.c \ ieee80211_monitor.c ieee80211_sta.c ieee80211_wds.c ieee80211_ddb.c \ - ieee80211_tdma.c ieee80211_superg.c + ieee80211_tdma.c ieee80211_superg.c ieee80211_vht.c SRCS+= bus_if.h device_if.h opt_ddb.h opt_inet.h opt_inet6.h \ opt_tdma.h opt_wlan.h From owner-svn-src-head@freebsd.org Sun Jan 8 06:20:23 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 132DBCA59AA; Sun, 8 Jan 2017 06:20:23 +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 D95221903; Sun, 8 Jan 2017 06:20: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 v086KMf1018189; Sun, 8 Jan 2017 06:20:22 GMT (envelope-from cem@FreeBSD.org) Received: (from cem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v086KMsf018188; Sun, 8 Jan 2017 06:20:22 GMT (envelope-from cem@FreeBSD.org) Message-Id: <201701080620.v086KMsf018188@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cem set sender to cem@FreeBSD.org using -f From: "Conrad E. Meyer" Date: Sun, 8 Jan 2017 06:20:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r311664 - head/sys/dev/mmc X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 08 Jan 2017 06:20:23 -0000 Author: cem Date: Sun Jan 8 06:20:21 2017 New Revision: 311664 URL: https://svnweb.freebsd.org/changeset/base/311664 Log: mmc: Accept even lower voltage for Cherryview And HP x2 210, per DragonFlyBSD 240bd9cd58f8259c12c14a8006837e698. Submitted by: Johannes Lundberg No objection: gonzo@ Obtained from: DragonFlyBSD Modified: head/sys/dev/mmc/mmcreg.h Modified: head/sys/dev/mmc/mmcreg.h ============================================================================== --- head/sys/dev/mmc/mmcreg.h Sun Jan 8 04:27:08 2017 (r311663) +++ head/sys/dev/mmc/mmcreg.h Sun Jan 8 06:20:21 2017 (r311664) @@ -355,8 +355,8 @@ struct mmc_request { */ #define MMC_OCR_VOLTAGE 0x3fffffffU /* Vdd Voltage mask */ #define MMC_OCR_LOW_VOLTAGE (1u << 7) /* Low Voltage Range -- tbd */ +#define MMC_OCR_MIN_VOLTAGE_SHIFT 7 #define MMC_OCR_200_210 (1U << 8) /* Vdd voltage 2.00 ~ 2.10 */ -#define MMC_OCR_MIN_VOLTAGE_SHIFT 8 #define MMC_OCR_210_220 (1U << 9) /* Vdd voltage 2.10 ~ 2.20 */ #define MMC_OCR_220_230 (1U << 10) /* Vdd voltage 2.20 ~ 2.30 */ #define MMC_OCR_230_240 (1U << 11) /* Vdd voltage 2.30 ~ 2.40 */ From owner-svn-src-head@freebsd.org Sun Jan 8 06:21:51 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 81EF0CA5B1F; Sun, 8 Jan 2017 06:21:51 +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 4F9A31C6F; Sun, 8 Jan 2017 06:21:51 +0000 (UTC) (envelope-from cem@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v086LoJL019819; Sun, 8 Jan 2017 06:21:50 GMT (envelope-from cem@FreeBSD.org) Received: (from cem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v086LnAX019001; Sun, 8 Jan 2017 06:21:49 GMT (envelope-from cem@FreeBSD.org) Message-Id: <201701080621.v086LnAX019001@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cem set sender to cem@FreeBSD.org using -f From: "Conrad E. Meyer" Date: Sun, 8 Jan 2017 06:21:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r311665 - head/sys/fs/cd9660 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 08 Jan 2017 06:21:51 -0000 Author: cem Date: Sun Jan 8 06:21:49 2017 New Revision: 311665 URL: https://svnweb.freebsd.org/changeset/base/311665 Log: cd9660: Expand internal inum size to 64 bits Inums in cd9660 refer to byte offsets on the media. DVD and BD media can have entries above 4GB, especially with multi-session images. PR: 190655 Reported by: Thomas Schmitt Modified: head/sys/fs/cd9660/cd9660_lookup.c head/sys/fs/cd9660/cd9660_node.c head/sys/fs/cd9660/cd9660_node.h head/sys/fs/cd9660/cd9660_rrip.c head/sys/fs/cd9660/cd9660_vfsops.c head/sys/fs/cd9660/cd9660_vnops.c head/sys/fs/cd9660/iso.h head/sys/fs/cd9660/iso_rrip.h Modified: head/sys/fs/cd9660/cd9660_lookup.c ============================================================================== --- head/sys/fs/cd9660/cd9660_lookup.c Sun Jan 8 06:20:21 2017 (r311664) +++ head/sys/fs/cd9660/cd9660_lookup.c Sun Jan 8 06:21:49 2017 (r311665) @@ -51,8 +51,8 @@ __FBSDID("$FreeBSD$"); #include struct cd9660_ino_alloc_arg { - ino_t ino; - ino_t i_ino; + cd_ino_t ino; + cd_ino_t i_ino; struct iso_directory_record *ep; }; @@ -124,7 +124,7 @@ cd9660_lookup(ap) struct cd9660_ino_alloc_arg dd_arg; u_long bmask; /* block offset mask */ int error; - ino_t ino, i_ino; + cd_ino_t ino, i_ino; int ltype, reclen; u_short namelen; int isoflags; Modified: head/sys/fs/cd9660/cd9660_node.c ============================================================================== --- head/sys/fs/cd9660/cd9660_node.c Sun Jan 8 06:20:21 2017 (r311664) +++ head/sys/fs/cd9660/cd9660_node.c Sun Jan 8 06:21:49 2017 (r311665) @@ -309,12 +309,12 @@ cd9660_tstamp_conv17(pi,pu) return cd9660_tstamp_conv7(buf, pu, ISO_FTYPE_DEFAULT); } -ino_t +cd_ino_t isodirino(isodir, imp) struct iso_directory_record *isodir; struct iso_mnt *imp; { - ino_t ino; + cd_ino_t ino; ino = (isonum_733(isodir->extent) + isonum_711(isodir->ext_attr_length)) << imp->im_bshift; Modified: head/sys/fs/cd9660/cd9660_node.h ============================================================================== --- head/sys/fs/cd9660/cd9660_node.h Sun Jan 8 06:20:21 2017 (r311664) +++ head/sys/fs/cd9660/cd9660_node.h Sun Jan 8 06:21:49 2017 (r311665) @@ -58,7 +58,7 @@ typedef struct { struct iso_node { struct vnode *i_vnode; /* vnode associated with this inode */ - ino_t i_number; /* the identity of the inode */ + cd_ino_t i_number; /* the identity of the inode */ /* we use the actual starting block of the file */ struct iso_mnt *i_mnt; /* filesystem associated with this inode */ struct lockf *i_lockf; /* head of byte-level lock list */ Modified: head/sys/fs/cd9660/cd9660_rrip.c ============================================================================== --- head/sys/fs/cd9660/cd9660_rrip.c Sun Jan 8 06:20:21 2017 (r311664) +++ head/sys/fs/cd9660/cd9660_rrip.c Sun Jan 8 06:21:49 2017 (r311665) @@ -628,7 +628,7 @@ cd9660_rrip_getname(isodir,outbuf,outlen struct iso_directory_record *isodir; char *outbuf; u_short *outlen; - ino_t *inump; + cd_ino_t *inump; struct iso_mnt *imp; { ISO_RRIP_ANALYZE analyze; Modified: head/sys/fs/cd9660/cd9660_vfsops.c ============================================================================== --- head/sys/fs/cd9660/cd9660_vfsops.c Sun Jan 8 06:20:21 2017 (r311664) +++ head/sys/fs/cd9660/cd9660_vfsops.c Sun Jan 8 06:21:49 2017 (r311665) @@ -540,7 +540,7 @@ cd9660_root(mp, flags, vpp) struct iso_mnt *imp = VFSTOISOFS(mp); struct iso_directory_record *dp = (struct iso_directory_record *)imp->root; - ino_t ino = isodirino(dp, imp); + cd_ino_t ino = isodirino(dp, imp); /* * With RRIP we must use the `.' entry of the root directory. @@ -617,6 +617,11 @@ cd9660_fhtovp(mp, fhp, flags, vpp) return (0); } +/* + * Conform to standard VFS interface; can't vget arbitrary inodes beyond 4GB + * into media with current inode scheme and 32-bit ino_t. This shouldn't be + * needed for anything other than nfsd, and who exports a mounted DVD over NFS? + */ static int cd9660_vget(mp, ino, flags, vpp) struct mount *mp; @@ -640,10 +645,22 @@ cd9660_vget(mp, ino, flags, vpp) (struct iso_directory_record *)0)); } +/* Use special comparator for full 64-bit ino comparison. */ +static int +cd9660_vfs_hash_cmp(vp, pino) + struct vnode *vp; + cd_ino_t *pino; +{ + struct iso_node *ip; + + ip = VTOI(vp); + return (ip->i_number != *pino); +} + int cd9660_vget_internal(mp, ino, flags, vpp, relocated, isodir) struct mount *mp; - ino_t ino; + cd_ino_t ino; int flags; struct vnode **vpp; int relocated; @@ -658,7 +675,8 @@ cd9660_vget_internal(mp, ino, flags, vpp struct thread *td; td = curthread; - error = vfs_hash_get(mp, ino, flags, td, vpp, NULL, NULL); + error = vfs_hash_get(mp, ino, flags, td, vpp, cd9660_vfs_hash_cmp, + &ino); if (error || *vpp != NULL) return (error); @@ -699,7 +717,8 @@ cd9660_vget_internal(mp, ino, flags, vpp *vpp = NULLVP; return (error); } - error = vfs_hash_insert(vp, ino, flags, td, vpp, NULL, NULL); + error = vfs_hash_insert(vp, ino, flags, td, vpp, cd9660_vfs_hash_cmp, + &ino); if (error || *vpp != NULL) return (error); Modified: head/sys/fs/cd9660/cd9660_vnops.c ============================================================================== --- head/sys/fs/cd9660/cd9660_vnops.c Sun Jan 8 06:20:21 2017 (r311664) +++ head/sys/fs/cd9660/cd9660_vnops.c Sun Jan 8 06:21:49 2017 (r311665) @@ -481,6 +481,7 @@ cd9660_readdir(ap) u_short namelen; int ncookies = 0; u_long *cookies = NULL; + cd_ino_t ino; dp = VTOI(vdp); imp = dp->i_mnt; @@ -576,8 +577,10 @@ cd9660_readdir(ap) switch (imp->iso_ftype) { case ISO_FTYPE_RRIP: - cd9660_rrip_getname(ep,idp->current.d_name, &namelen, - &idp->current.d_fileno,imp); + ino = idp->current.d_fileno; + cd9660_rrip_getname(ep, idp->current.d_name, &namelen, + &ino, imp); + idp->current.d_fileno = ino; idp->current.d_namlen = (u_char)namelen; if (idp->current.d_namlen) error = iso_uiodir(idp,&idp->current,idp->curroff); @@ -831,8 +834,8 @@ cd9660_vptofh(ap) memcpy(ap->a_fhp, &ifh, sizeof(ifh)); #ifdef ISOFS_DBG - printf("vptofh: ino %d, start %ld\n", - ifh.ifid_ino, ifh.ifid_start); + printf("vptofh: ino %jd, start %ld\n", + (uintmax_t)ifh.ifid_ino, ifh.ifid_start); #endif return (0); Modified: head/sys/fs/cd9660/iso.h ============================================================================== --- head/sys/fs/cd9660/iso.h Sun Jan 8 06:20:21 2017 (r311664) +++ head/sys/fs/cd9660/iso.h Sun Jan 8 06:21:49 2017 (r311665) @@ -219,6 +219,11 @@ enum ISO_FTYPE { ISO_FTYPE_DEFAULT, ISO_ #define ISOFSMNT_ROOT 0 #endif +/* + * When ino_t becomes 64-bit, we can remove this definition in favor of ino_t. + */ +#define cd_ino_t uint64_t + struct iso_mnt { uint64_t im_flags; @@ -250,10 +255,10 @@ struct iso_mnt { }; struct ifid { - u_short ifid_len; - u_short ifid_pad; - int ifid_ino; - long ifid_start; + u_short ifid_len; + u_short ifid_pad; + cd_ino_t ifid_ino; + long ifid_start; }; #define VFSTOISOFS(mp) ((struct iso_mnt *)((mp)->mnt_data)) @@ -263,7 +268,7 @@ struct ifid { #define lblkno(imp, loc) ((loc) >> (imp)->im_bshift) #define blksize(imp, ip, lbn) ((imp)->logical_block_size) -int cd9660_vget_internal(struct mount *, ino_t, int, struct vnode **, int, +int cd9660_vget_internal(struct mount *, cd_ino_t, int, struct vnode **, int, struct iso_directory_record *); #define cd9660_sysctl ((int (*)(int *, u_int, void *, size_t *, void *, \ size_t, struct proc *))eopnotsupp) @@ -274,7 +279,7 @@ extern struct vop_vector cd9660_fifoops; int isochar(u_char *, u_char *, int, u_short *, int *, int, void *); int isofncmp(u_char *, int, u_char *, int, int, int, void *, void *); void isofntrans(u_char *, int, u_char *, u_short *, int, int, int, int, void *); -ino_t isodirino(struct iso_directory_record *, struct iso_mnt *); +cd_ino_t isodirino(struct iso_directory_record *, struct iso_mnt *); u_short sgetrune(const char *, size_t, char const **, int, void *); #endif /* _KERNEL */ Modified: head/sys/fs/cd9660/iso_rrip.h ============================================================================== --- head/sys/fs/cd9660/iso_rrip.h Sun Jan 8 06:20:21 2017 (r311664) +++ head/sys/fs/cd9660/iso_rrip.h Sun Jan 8 06:21:49 2017 (r311665) @@ -61,7 +61,7 @@ typedef struct { off_t iso_ce_off; /* offset of continuation area */ int iso_ce_len; /* length of continuation area */ struct iso_mnt *imp; /* mount structure */ - ino_t *inump; /* inode number pointer */ + cd_ino_t *inump; /* inode number pointer */ char *outbuf; /* name/symbolic link output area */ u_short *outlen; /* length of above */ u_short maxlen; /* maximum length of above */ @@ -74,7 +74,7 @@ int cd9660_rrip_analyze(struct iso_direc struct iso_node *inop, struct iso_mnt *imp); int cd9660_rrip_getname(struct iso_directory_record *isodir, char *outbuf, u_short *outlen, - ino_t *inump, struct iso_mnt *imp); + cd_ino_t *inump, struct iso_mnt *imp); int cd9660_rrip_getsymname(struct iso_directory_record *isodir, char *outbuf, u_short *outlen, struct iso_mnt *imp); From owner-svn-src-head@freebsd.org Sun Jan 8 06:22:36 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B1700CA5B92; Sun, 8 Jan 2017 06:22: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 7FE901E87; Sun, 8 Jan 2017 06:22: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 v086MZcw022056; Sun, 8 Jan 2017 06:22:35 GMT (envelope-from cem@FreeBSD.org) Received: (from cem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v086MZ7o022055; Sun, 8 Jan 2017 06:22:35 GMT (envelope-from cem@FreeBSD.org) Message-Id: <201701080622.v086MZ7o022055@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cem set sender to cem@FreeBSD.org using -f From: "Conrad E. Meyer" Date: Sun, 8 Jan 2017 06:22:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r311666 - head/sys/fs/cd9660 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 08 Jan 2017 06:22:36 -0000 Author: cem Date: Sun Jan 8 06:22:35 2017 New Revision: 311666 URL: https://svnweb.freebsd.org/changeset/base/311666 Log: Do not truncate inode calculation from ISO9660 block offset PR: 190655 Reported by: Thomas Schmitt Obtained from: NetBSD sys/fs/cd9660/cd9660_node.c,r1.31 Modified: head/sys/fs/cd9660/cd9660_node.c Modified: head/sys/fs/cd9660/cd9660_node.c ============================================================================== --- head/sys/fs/cd9660/cd9660_node.c Sun Jan 8 06:21:49 2017 (r311665) +++ head/sys/fs/cd9660/cd9660_node.c Sun Jan 8 06:22:35 2017 (r311666) @@ -316,7 +316,14 @@ isodirino(isodir, imp) { cd_ino_t ino; - ino = (isonum_733(isodir->extent) + isonum_711(isodir->ext_attr_length)) - << imp->im_bshift; - return (ino); + /* + * Note there is an inverse calculation in + * cd9660_vfsops.c:cd9660_vget_internal(): + * ip->iso_start = ino >> imp->im_bshift; + * and also a calculation of the isodir pointer + * from an inode in cd9660_vnops.c:cd9660_readlink() + */ + ino = ((cd_ino_t)isonum_733(isodir->extent) + + isonum_711(isodir->ext_attr_length)) << imp->im_bshift; + return ino; } From owner-svn-src-head@freebsd.org Sun Jan 8 06:26:34 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B11E8CA5D5C; Sun, 8 Jan 2017 06:26:34 +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 8B555120F; Sun, 8 Jan 2017 06:26:34 +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 v086QXFv022255; Sun, 8 Jan 2017 06:26:33 GMT (envelope-from cem@FreeBSD.org) Received: (from cem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v086QXDx022252; Sun, 8 Jan 2017 06:26:33 GMT (envelope-from cem@FreeBSD.org) Message-Id: <201701080626.v086QXDx022252@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cem set sender to cem@FreeBSD.org using -f From: "Conrad E. Meyer" Date: Sun, 8 Jan 2017 06:26:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r311667 - in head/sys/contrib/dev/acpica: components/namespace components/tables include X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 08 Jan 2017 06:26:34 -0000 Author: cem Date: Sun Jan 8 06:26:33 2017 New Revision: 311667 URL: https://svnweb.freebsd.org/changeset/base/311667 Log: Add some additional ACPI methods for DRM Add AcpiGetDataFull and AcpiGetTableWithSize. Submitted by: Matt Macy Modified: head/sys/contrib/dev/acpica/components/namespace/nsxfeval.c head/sys/contrib/dev/acpica/components/tables/tbxface.c head/sys/contrib/dev/acpica/include/acpixf.h Modified: head/sys/contrib/dev/acpica/components/namespace/nsxfeval.c ============================================================================== --- head/sys/contrib/dev/acpica/components/namespace/nsxfeval.c Sun Jan 8 06:22:35 2017 (r311666) +++ head/sys/contrib/dev/acpica/components/namespace/nsxfeval.c Sun Jan 8 06:26:33 2017 (r311667) @@ -1022,23 +1022,25 @@ ACPI_EXPORT_SYMBOL (AcpiDetachData) /******************************************************************************* * - * FUNCTION: AcpiGetData + * FUNCTION: AcpiGetDataFull * * PARAMETERS: ObjHandle - Namespace node - * Handler - Handler used in call to AttachData + * Handle - Handler used in call to attach_data * Data - Where the data is returned + * Callback - function to execute before returning * * RETURN: Status * - * DESCRIPTION: Retrieve data that was previously attached to a namespace node. + * DESCRIPTION: Retrieve data that was previously attached to a namespace node + * and execute a callback before returning. * ******************************************************************************/ - ACPI_STATUS -AcpiGetData ( +AcpiGetDataFull ( ACPI_HANDLE ObjHandle, ACPI_OBJECT_HANDLER Handler, - void **Data) + void **Data, + void (*Callback)(void *)) { ACPI_NAMESPACE_NODE *Node; ACPI_STATUS Status; @@ -1069,10 +1071,34 @@ AcpiGetData ( } Status = AcpiNsGetAttachedData (Node, Handler, Data); - + if (ACPI_SUCCESS(Status) && Callback) { + Callback(*Data); + } UnlockAndExit: (void) AcpiUtReleaseMutex (ACPI_MTX_NAMESPACE); return (Status); } +ACPI_EXPORT_SYMBOL (AcpiGetDataFull) +/******************************************************************************* + * + * FUNCTION: AcpiGetData + * + * PARAMETERS: ObjHandle - Namespace node + * Handler - Handler used in call to AttachData + * Data - Where the data is returned + * + * RETURN: Status + * + * DESCRIPTION: Retrieve data that was previously attached to a namespace node. + * + ******************************************************************************/ +ACPI_STATUS +AcpiGetData ( + ACPI_HANDLE ObjHandle, + ACPI_OBJECT_HANDLER Handler, + void **Data) +{ + return (AcpiGetDataFull(ObjHandle, Handler, Data, NULL)); +} ACPI_EXPORT_SYMBOL (AcpiGetData) Modified: head/sys/contrib/dev/acpica/components/tables/tbxface.c ============================================================================== --- head/sys/contrib/dev/acpica/components/tables/tbxface.c Sun Jan 8 06:22:35 2017 (r311666) +++ head/sys/contrib/dev/acpica/components/tables/tbxface.c Sun Jan 8 06:26:33 2017 (r311667) @@ -314,11 +314,12 @@ ACPI_EXPORT_SYMBOL (AcpiGetTableHeader) /******************************************************************************* * - * FUNCTION: AcpiGetTable + * FUNCTION: AcpiGetTableWithSize * * PARAMETERS: Signature - ACPI signature of needed table * Instance - Which instance (for SSDTs) * OutTable - Where the pointer to the table is returned + * TblSize - Size of the table * * RETURN: Status and pointer to the requested table * @@ -333,10 +334,11 @@ ACPI_EXPORT_SYMBOL (AcpiGetTableHeader) ******************************************************************************/ ACPI_STATUS -AcpiGetTable ( +AcpiGetTableWithSize ( char *Signature, UINT32 Instance, - ACPI_TABLE_HEADER **OutTable) + ACPI_TABLE_HEADER **OutTable, + ACPI_SIZE *TblSize) { UINT32 i; UINT32 j; @@ -434,12 +436,40 @@ AcpiPutTable ( (void) AcpiUtReleaseMutex (ACPI_MTX_TABLES); return_VOID; } - ACPI_EXPORT_SYMBOL (AcpiPutTable) /******************************************************************************* * + * FUNCTION: AcpiGetTable + * + * PARAMETERS: Signature - ACPI signature of needed table + * Instance - Which instance (for SSDTs) + * OutTable - Where the pointer to the table is returned + * + * RETURN: Status and pointer to the requested table + * + * DESCRIPTION: Finds and verifies an ACPI table. Table must be in the + * RSDT/XSDT. + * + ******************************************************************************/ + +ACPI_STATUS +AcpiGetTable ( + char *Signature, + UINT32 Instance, + ACPI_TABLE_HEADER **OutTable) +{ + ACPI_SIZE Size; + + return (AcpiGetTableWithSize(Signature, Instance, OutTable, &Size)); +} + +ACPI_EXPORT_SYMBOL (AcpiGetTable) + + +/******************************************************************************* + * * FUNCTION: AcpiGetTableByIndex * * PARAMETERS: TableIndex - Table index Modified: head/sys/contrib/dev/acpica/include/acpixf.h ============================================================================== --- head/sys/contrib/dev/acpica/include/acpixf.h Sun Jan 8 06:22:35 2017 (r311666) +++ head/sys/contrib/dev/acpica/include/acpixf.h Sun Jan 8 06:26:33 2017 (r311667) @@ -586,6 +586,14 @@ AcpiGetTableHeader ( ACPI_EXTERNAL_RETURN_STATUS ( ACPI_STATUS +AcpiGetTableWithSize ( + ACPI_STRING Signature, + UINT32 Instance, + ACPI_TABLE_HEADER **OutTable, + ACPI_SIZE *TblSize)) + +ACPI_EXTERNAL_RETURN_STATUS ( +ACPI_STATUS AcpiGetTable ( ACPI_STRING Signature, UINT32 Instance, @@ -672,6 +680,14 @@ AcpiGetData ( ACPI_EXTERNAL_RETURN_STATUS ( ACPI_STATUS +AcpiGetDataFull ( + ACPI_HANDLE Object, + ACPI_OBJECT_HANDLER Handler, + void **Data, + void (*Callback)(void *))) + +ACPI_EXTERNAL_RETURN_STATUS ( +ACPI_STATUS AcpiDebugTrace ( const char *Name, UINT32 DebugLevel, From owner-svn-src-head@freebsd.org Sun Jan 8 06:50:54 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id EB681CA51EE; Sun, 8 Jan 2017 06:50:54 +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 942E31BB2; Sun, 8 Jan 2017 06:50:54 +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 v086orEc031889; Sun, 8 Jan 2017 06:50:53 GMT (envelope-from cem@FreeBSD.org) Received: (from cem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v086or32031887; Sun, 8 Jan 2017 06:50:53 GMT (envelope-from cem@FreeBSD.org) Message-Id: <201701080650.v086or32031887@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cem set sender to cem@FreeBSD.org using -f From: "Conrad E. Meyer" Date: Sun, 8 Jan 2017 06:50:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r311668 - head/bin/chmod X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 08 Jan 2017 06:50:55 -0000 Author: cem Date: Sun Jan 8 06:50:53 2017 New Revision: 311668 URL: https://svnweb.freebsd.org/changeset/base/311668 Log: chmod: Add SIGINFO handler PR: 191884 Submitted by: Dan McGregor Reviewed by: mjg@ (earlier version) Modified: head/bin/chmod/chmod.1 head/bin/chmod/chmod.c Modified: head/bin/chmod/chmod.1 ============================================================================== --- head/bin/chmod/chmod.1 Sun Jan 8 06:26:33 2017 (r311667) +++ head/bin/chmod/chmod.1 Sun Jan 8 06:50:53 2017 (r311668) @@ -32,7 +32,7 @@ .\" @(#)chmod.1 8.4 (Berkeley) 3/31/94 .\" $FreeBSD$ .\" -.Dd April 20, 2015 +.Dd January 7, 2017 .Dt CHMOD 1 .Os .Sh NAME @@ -106,6 +106,16 @@ option is specified. In addition, these options override each other and the command's actions are determined by the last one specified. .Pp +If +.Nm +receives a +.Dv SIGINFO +signal (see the +.Cm status +argument for +.Xr stty 1 ) , +then the current filename as well as the old and new modes are displayed. +.Pp Only the owner of a file or the super-user is permitted to change the mode of a file. .Sh EXIT STATUS Modified: head/bin/chmod/chmod.c ============================================================================== --- head/bin/chmod/chmod.c Sun Jan 8 06:26:33 2017 (r311667) +++ head/bin/chmod/chmod.c Sun Jan 8 06:50:53 2017 (r311668) @@ -49,14 +49,24 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include #include +static volatile sig_atomic_t siginfo; + static void usage(void); static int may_have_nfs4acl(const FTSENT *ent, int hflag); +static void +siginfo_handler(int sig __unused) +{ + + siginfo = 1; +} + int main(int argc, char *argv[]) { @@ -125,6 +135,8 @@ done: argv += optind; if (argc < 2) usage(); + (void)signal(SIGINFO, siginfo_handler); + if (Rflag) { if (hflag) errx(1, "the -R and -h options may not be " @@ -192,10 +204,10 @@ done: argv += optind; && !fflag) { warn("%s", p->fts_path); rval = 1; - } else if (vflag) { + } else if (vflag || siginfo) { (void)printf("%s", p->fts_path); - if (vflag > 1) { + if (vflag > 1 || siginfo) { char m1[12], m2[12]; strmode(p->fts_statp->st_mode, m1); @@ -207,6 +219,7 @@ done: argv += optind; newmode, m2); } (void)printf("\n"); + siginfo = 0; } } if (errno) From owner-svn-src-head@freebsd.org Sun Jan 8 06:58:44 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2EFAECA5410; Sun, 8 Jan 2017 06:58: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 E3C1E1FEE; Sun, 8 Jan 2017 06:58: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 v086whUg034286; Sun, 8 Jan 2017 06:58:43 GMT (envelope-from cem@FreeBSD.org) Received: (from cem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v086wggb034283; Sun, 8 Jan 2017 06:58:42 GMT (envelope-from cem@FreeBSD.org) Message-Id: <201701080658.v086wggb034283@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cem set sender to cem@FreeBSD.org using -f From: "Conrad E. Meyer" Date: Sun, 8 Jan 2017 06:58:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r311669 - head/usr.sbin/chown X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 08 Jan 2017 06:58:44 -0000 Author: cem Date: Sun Jan 8 06:58:42 2017 New Revision: 311669 URL: https://svnweb.freebsd.org/changeset/base/311669 Log: chown/chgrp: Add SIGINFO handler PR: 191884 Submitted by: Dan McGregor Reviewed by: mjg@ (earlier version) Modified: head/usr.sbin/chown/chgrp.1 head/usr.sbin/chown/chown.8 head/usr.sbin/chown/chown.c Modified: head/usr.sbin/chown/chgrp.1 ============================================================================== --- head/usr.sbin/chown/chgrp.1 Sun Jan 8 06:50:53 2017 (r311668) +++ head/usr.sbin/chown/chgrp.1 Sun Jan 8 06:58:42 2017 (r311669) @@ -31,7 +31,7 @@ .\" @(#)chgrp.1 8.3 (Berkeley) 3/31/94 .\" $FreeBSD$ .\" -.Dd April 20, 2015 +.Dd January 7, 2017 .Dt CHGRP 1 .Os .Sh NAME @@ -120,6 +120,17 @@ The user invoking .Nm must belong to the specified group and be the owner of the file, or be the super-user. +.Pp +If +.Nm +receives a +.Dv SIGINFO +signal (see the +.Cm status +argument for +.Xr stty 1 ) , +then the current filename as well as the old and new group names are +displayed. .Sh FILES .Bl -tag -width /etc/group -compact .It Pa /etc/group Modified: head/usr.sbin/chown/chown.8 ============================================================================== --- head/usr.sbin/chown/chown.8 Sun Jan 8 06:50:53 2017 (r311668) +++ head/usr.sbin/chown/chown.8 Sun Jan 8 06:58:42 2017 (r311669) @@ -28,7 +28,7 @@ .\" @(#)chown.8 8.3 (Berkeley) 3/31/94 .\" $FreeBSD$ .\" -.Dd April 20, 2015 +.Dd January 7, 2017 .Dt CHOWN 8 .Os .Sh NAME @@ -135,6 +135,17 @@ group name. .Pp The ownership of a file may only be altered by a super-user for obvious security reasons. +.Pp +If +.Nm +receives a +.Dv SIGINFO +signal (see the +.Cm status +argument for +.Xr stty 1 ) , +then the current filename as well as the old and new file owner and group +are displayed. .Sh EXIT STATUS .Ex -std .Sh COMPATIBILITY Modified: head/usr.sbin/chown/chown.c ============================================================================== --- head/usr.sbin/chown/chown.c Sun Jan 8 06:50:53 2017 (r311668) +++ head/usr.sbin/chown/chown.c Sun Jan 8 06:58:42 2017 (r311669) @@ -52,6 +52,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -63,11 +64,20 @@ static void a_uid(const char *); static void chownerr(const char *); static uid_t id(const char *, const char *); static void usage(void); +static void print_info(const FTSENT *, int); static uid_t uid; static gid_t gid; static int ischown; static const char *gname; +static volatile sig_atomic_t siginfo; + +static void +siginfo_handler(int sig __unused) +{ + + siginfo = 1; +} int main(int argc, char **argv) @@ -119,6 +129,8 @@ main(int argc, char **argv) if (argc < 2) usage(); + (void)signal(SIGINFO, siginfo_handler); + if (Rflag) { if (hflag && (Hflag || Lflag)) errx(1, "the -R%c and -h options may not be " @@ -189,6 +201,10 @@ main(int argc, char **argv) default: break; } + if (siginfo) { + print_info(p, 2); + siginfo = 0; + } if ((uid == (uid_t)-1 || uid == p->fts_statp->st_uid) && (gid == (gid_t)-1 || gid == p->fts_statp->st_gid)) continue; @@ -196,35 +212,8 @@ main(int argc, char **argv) == -1 && !fflag) { chownerr(p->fts_path); rval = 1; - } else if (vflag) { - printf("%s", p->fts_path); - if (vflag > 1) { - if (ischown) { - printf(": %ju:%ju -> %ju:%ju", - (uintmax_t) - p->fts_statp->st_uid, - (uintmax_t) - p->fts_statp->st_gid, - (uid == (uid_t)-1) ? - (uintmax_t) - p->fts_statp->st_uid : - (uintmax_t)uid, - (gid == (gid_t)-1) ? - (uintmax_t) - p->fts_statp->st_gid : - (uintmax_t)gid); - } else { - printf(": %ju -> %ju", - (uintmax_t) - p->fts_statp->st_gid, - (gid == (gid_t)-1) ? - (uintmax_t) - p->fts_statp->st_gid : - (uintmax_t)gid); - } - } - printf("\n"); - } + } else if (vflag) + print_info(p, vflag); } if (errno) err(1, "fts_read"); @@ -315,3 +304,26 @@ usage(void) "usage: chgrp [-fhvx] [-R [-H | -L | -P]] group file ..."); exit(1); } + +static void +print_info(const FTSENT *p, int vflag) +{ + + printf("%s", p->fts_path); + if (vflag > 1) { + if (ischown) { + printf(": %ju:%ju -> %ju:%ju", + (uintmax_t)p->fts_statp->st_uid, + (uintmax_t)p->fts_statp->st_gid, + (uid == (uid_t)-1) ? + (uintmax_t)p->fts_statp->st_uid : (uintmax_t)uid, + (gid == (gid_t)-1) ? + (uintmax_t)p->fts_statp->st_gid : (uintmax_t)gid); + } else { + printf(": %ju -> %ju", (uintmax_t)p->fts_statp->st_gid, + (gid == (gid_t)-1) ? + (uintmax_t)p->fts_statp->st_gid : (uintmax_t)gid); + } + } + printf("\n"); +} From owner-svn-src-head@freebsd.org Sun Jan 8 08:08:20 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E625CCA5551; Sun, 8 Jan 2017 08:08:20 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: from mail-yw0-x242.google.com (mail-yw0-x242.google.com [IPv6:2607:f8b0:4002:c05::242]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id AD6CC1E46; Sun, 8 Jan 2017 08:08:20 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: by mail-yw0-x242.google.com with SMTP id r204so52541417ywb.3; Sun, 08 Jan 2017 00:08:20 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=iuemPcUJUnJ2oLDWWisa+S/q9dNxE0rmuozEtsIa/e0=; b=KJmSDlmuS9gCmKeJ/68P5OSFRt/Q1CiL+AR9brFTv/X19UANLPQbRgvPrHTte4ubSs ad0jXuqBWY60Zgx1hxxaG/hw/8sLmOKWwi27eIVDdHwHuYPFIHQmb1x9l1POh+lPFH8o 3GCJbSt7XP2eTeylCSWlAT2zBGCVvb3GvvwwaNa4I9vb+8utIyfFiL80+BKZNzfinvOH PyuRBXmi3bb+DVfrgg6PGl0aF7ksCNoEuUSYZ3vuwG6YsmCVhzWPdTiuilaVmBF5EDy9 IX4lYzje6v8GJyx0Paao0UOCfYxKrBNbVSyh1+mM1yWLx2LVnaI8UlXUYoKweS+TSbUJ CRmA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=iuemPcUJUnJ2oLDWWisa+S/q9dNxE0rmuozEtsIa/e0=; b=uLDZ1w3ui0soGPea7w6nUtkcOzGCtuWijjVgF1RcU8T/+G7YxhdSReNnkB5Jw8HhaP 7Er9XQKAPfml5gsdpb4Lt4oFN8Pe0qOLmyltkiQE5kAcvCfEmTXxe8KO3k7KLEnXmBaG EpKSd9sMrqmWY8Yt4104x2AGBGZmnf7HXB5ZE3lsp3W7HARz5czoNCiy56eS+igdJDW3 zkROT/n+txmFjhIGH8RdGvxTLSUBRd6+Qp1iwo5LZdXNUb9NN1IDzroJxT/9laYjWPad 4v2cKMXgtwAsG/wkgKKLMsI7Q/H84Fb/goHlpnyLy6PRuyI4inet+7yimOcdX5yvgzpK IHWg== X-Gm-Message-State: AIkVDXLMzwc83oWoFxpHGRIrzJPorXbz7RUh3fwHpA7ml9tHmYHMKILppgyamXwk+2pV6Q== X-Received: by 10.129.13.215 with SMTP id 206mr79831452ywn.69.1483862899445; Sun, 08 Jan 2017 00:08:19 -0800 (PST) Received: from ?IPv6:2607:fb90:f4b:cf76:e161:eb39:5338:a8bd? ([2607:fb90:f4b:cf76:e161:eb39:5338:a8bd]) by smtp.gmail.com with ESMTPSA id l27sm2756827ywh.33.2017.01.08.00.08.17 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 08 Jan 2017 00:08:18 -0800 (PST) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (1.0) Subject: Re: svn commit: r311665 - head/sys/fs/cd9660 From: Ngie Cooper X-Mailer: iPhone Mail (14C92) In-Reply-To: <201701080621.v086LnAX019001@repo.freebsd.org> Date: Sun, 8 Jan 2017 00:07:25 -0800 Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Transfer-Encoding: quoted-printable Message-Id: <1793A89F-4AC6-4922-B65A-DE0BFFCA11A1@gmail.com> References: <201701080621.v086LnAX019001@repo.freebsd.org> To: "Conrad E. Meyer" X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 08 Jan 2017 08:08:21 -0000 > On Jan 7, 2017, at 22:21, Conrad E. Meyer wrote: >=20 > Author: cem > Date: Sun Jan 8 06:21:49 2017 > New Revision: 311665 > URL: https://svnweb.freebsd.org/changeset/base/311665 >=20 > Log: > cd9660: Expand internal inum size to 64 bits >=20 > Inums in cd9660 refer to byte offsets on the media. DVD and BD media > can have entries above 4GB, especially with multi-session images. This change broke the build; look for the Jenkins i386 email that notes that= cd_ino_t isn't defined. Thanks, -Ngie= From owner-svn-src-head@freebsd.org Sun Jan 8 08:36:38 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 58936CA5A05; Sun, 8 Jan 2017 08:36: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 2A97F199E; Sun, 8 Jan 2017 08:36: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 v088abET074376; Sun, 8 Jan 2017 08:36:37 GMT (envelope-from cem@FreeBSD.org) Received: (from cem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v088abgq074375; Sun, 8 Jan 2017 08:36:37 GMT (envelope-from cem@FreeBSD.org) Message-Id: <201701080836.v088abgq074375@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cem set sender to cem@FreeBSD.org using -f From: "Conrad E. Meyer" Date: Sun, 8 Jan 2017 08:36:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r311671 - head/lib/libprocstat X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 08 Jan 2017 08:36:38 -0000 Author: cem Date: Sun Jan 8 08:36:37 2017 New Revision: 311671 URL: https://svnweb.freebsd.org/changeset/base/311671 Log: libprocstat: Include cd9660 headers in the same order as the kernel Fix userspace build after r311665. Modified: head/lib/libprocstat/cd9660.c Modified: head/lib/libprocstat/cd9660.c ============================================================================== --- head/lib/libprocstat/cd9660.c Sun Jan 8 07:25:22 2017 (r311670) +++ head/lib/libprocstat/cd9660.c Sun Jan 8 08:36:37 2017 (r311671) @@ -53,10 +53,10 @@ __FBSDID("$FreeBSD$"); #include -#include #define _KERNEL #include #undef _KERNEL +#include #include #include From owner-svn-src-head@freebsd.org Sun Jan 8 09:16:08 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 929E3CA3728; Sun, 8 Jan 2017 09:16: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 648F41FE1; Sun, 8 Jan 2017 09:16: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 v089G7mg091019; Sun, 8 Jan 2017 09:16:07 GMT (envelope-from cem@FreeBSD.org) Received: (from cem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v089G7Qu091018; Sun, 8 Jan 2017 09:16:07 GMT (envelope-from cem@FreeBSD.org) Message-Id: <201701080916.v089G7Qu091018@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cem set sender to cem@FreeBSD.org using -f From: "Conrad E. Meyer" Date: Sun, 8 Jan 2017 09:16:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r311675 - head/sys/fs/cd9660 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 08 Jan 2017 09:16:08 -0000 Author: cem Date: Sun Jan 8 09:16:07 2017 New Revision: 311675 URL: https://svnweb.freebsd.org/changeset/base/311675 Log: iso_rrip.h: Hide kernel definitions from makefs(8) Reported by: O. Hartmann Modified: head/sys/fs/cd9660/iso_rrip.h Modified: head/sys/fs/cd9660/iso_rrip.h ============================================================================== --- head/sys/fs/cd9660/iso_rrip.h Sun Jan 8 08:53:34 2017 (r311674) +++ head/sys/fs/cd9660/iso_rrip.h Sun Jan 8 09:16:07 2017 (r311675) @@ -54,6 +54,7 @@ #define ISO_SUSP_STOP 0x1000 #define ISO_SUSP_UNKNOWN 0x8000 +#ifdef _KERNEL typedef struct { struct iso_node *inop; int fields; /* interesting fields in this analysis */ @@ -80,3 +81,4 @@ int cd9660_rrip_getsymname(struct iso_di struct iso_mnt *imp); int cd9660_rrip_offset(struct iso_directory_record *isodir, struct iso_mnt *imp); +#endif /* _KERNEL */ From owner-svn-src-head@freebsd.org Sun Jan 8 09:17:25 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1309CCA37EB; Sun, 8 Jan 2017 09:17:25 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9F2EC115C; Sun, 8 Jan 2017 09:17:24 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from tom.home (kib@localhost [127.0.0.1]) by kib.kiev.ua (8.15.2/8.15.2) with ESMTPS id v089HEQO024013 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Sun, 8 Jan 2017 11:17:14 +0200 (EET) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.10.3 kib.kiev.ua v089HEQO024013 Received: (from kostik@localhost) by tom.home (8.15.2/8.15.2/Submit) id v089HEPa024012; Sun, 8 Jan 2017 11:17:14 +0200 (EET) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Sun, 8 Jan 2017 11:17:14 +0200 From: Konstantin Belousov To: "Conrad E. Meyer" Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r311665 - head/sys/fs/cd9660 Message-ID: <20170108091714.GF2349@kib.kiev.ua> References: <201701080621.v086LnAX019001@repo.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201701080621.v086LnAX019001@repo.freebsd.org> User-Agent: Mutt/1.7.2 (2016-11-26) X-Spam-Status: No, score=-2.0 required=5.0 tests=ALL_TRUSTED,BAYES_00, DKIM_ADSP_CUSTOM_MED,FREEMAIL_FROM,NML_ADSP_CUSTOM_MED autolearn=no autolearn_force=no version=3.4.1 X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on tom.home X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 08 Jan 2017 09:17:25 -0000 On Sun, Jan 08, 2017 at 06:21:49AM +0000, Conrad E. Meyer wrote: > +/* > + * When ino_t becomes 64-bit, we can remove this definition in favor of ino_t. > + */ > +#define cd_ino_t uint64_t > + Why the type is defined and not typedef-ed ? Also, I do not think that it is good idea to rely on specific size of the special-purpose system types, like ino_t, even if it is only an intent. Both because the types can change, and because it reduces the usefulness of the code outside the FreeBSD content (our code is often taken into weird embedded systems), where system types might be different. From owner-svn-src-head@freebsd.org Sun Jan 8 10:07:55 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id BDC73CA2552; Sun, 8 Jan 2017 10:07: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 834D21666; Sun, 8 Jan 2017 10:07: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 v08A7sAR010958; Sun, 8 Jan 2017 10:07:54 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v08A7sOP010957; Sun, 8 Jan 2017 10:07:54 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201701081007.v08A7sOP010957@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Sun, 8 Jan 2017 10:07:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r311677 - head/sys/net80211 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 08 Jan 2017 10:07:55 -0000 Author: adrian Date: Sun Jan 8 10:07:54 2017 New Revision: 311677 URL: https://svnweb.freebsd.org/changeset/base/311677 Log: [net80211] use the correct freq2 field when populating VHT operation element. Whilst here, leave a TODO comment so I revisit this routine in the context of hostap operation probe requests for IBSS/mesh. Modified: head/sys/net80211/ieee80211_vht.c Modified: head/sys/net80211/ieee80211_vht.c ============================================================================== --- head/sys/net80211/ieee80211_vht.c Sun Jan 8 09:18:08 2017 (r311676) +++ head/sys/net80211/ieee80211_vht.c Sun Jan 8 10:07:54 2017 (r311677) @@ -352,6 +352,14 @@ ieee80211_vht_get_chwidth_ie(struct ieee /* * Note: this just uses the current channel information; * it doesn't use the node info after parsing. + * + * XXX TODO: need to make the basic MCS set configurable. + * XXX TODO: read 802.11-2013 to determine what to set + * chwidth to when scanning. I have a feeling + * it isn't involved in scanning and we shouldn't + * be sending it; and I don't yet know what to set + * it to for IBSS or hostap where the peer may be + * a completely different channel width to us. */ uint8_t * ieee80211_add_vhtinfo(uint8_t *frm, struct ieee80211_node *ni) @@ -380,7 +388,7 @@ ieee80211_add_vhtinfo(uint8_t *frm, stru *frm++ = ni->ni_chan->ic_vht_ch_freq1; /* 8-bit freq2 */ - *frm++ = ni->ni_chan->ic_vht_ch_freq1; + *frm++ = ni->ni_chan->ic_vht_ch_freq2; /* 16-bit basic MCS set - just MCS0..7 for NSS=1 for now */ ADDSHORT(frm, 0xfffc); From owner-svn-src-head@freebsd.org Sun Jan 8 10:13:06 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 61807CA2776; Sun, 8 Jan 2017 10:13: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 2DC6C1AD3; Sun, 8 Jan 2017 10:13:06 +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 v08AD5uj014991; Sun, 8 Jan 2017 10:13:05 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v08AD5DM014990; Sun, 8 Jan 2017 10:13:05 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201701081013.v08AD5DM014990@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Sun, 8 Jan 2017 10:13:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r311678 - head/sys/net80211 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 08 Jan 2017 10:13:06 -0000 Author: adrian Date: Sun Jan 8 10:13:05 2017 New Revision: 311678 URL: https://svnweb.freebsd.org/changeset/base/311678 Log: [net80211] add roaming parameters for 11ac. These are mostly placeholders for now. Modified: head/sys/net80211/ieee80211_scan.c Modified: head/sys/net80211/ieee80211_scan.c ============================================================================== --- head/sys/net80211/ieee80211_scan.c Sun Jan 8 10:07:54 2017 (r311677) +++ head/sys/net80211/ieee80211_scan.c Sun Jan 8 10:13:05 2017 (r311678) @@ -68,6 +68,7 @@ __FBSDID("$FreeBSD$"); #define ROAM_RATE_HALF_DEFAULT 2*6 /* half-width 11a/g bss */ #define ROAM_RATE_QUARTER_DEFAULT 2*3 /* quarter-width 11a/g bss */ #define ROAM_MCS_11N_DEFAULT (1 | IEEE80211_RATE_MCS) /* 11n bss */ +#define ROAM_MCS_11AC_DEFAULT (1 | IEEE80211_RATE_MCS) /* 11ac bss; XXX not used yet */ void ieee80211_scan_attach(struct ieee80211com *ic) @@ -116,6 +117,11 @@ static const struct ieee80211_roamparam .rate = ROAM_MCS_11N_DEFAULT }, [IEEE80211_MODE_11NG] = { .rssi = ROAM_RSSI_11B_DEFAULT, .rate = ROAM_MCS_11N_DEFAULT }, + [IEEE80211_MODE_VHT_2GHZ] = { .rssi = ROAM_RSSI_11B_DEFAULT, + .rate = ROAM_MCS_11AC_DEFAULT }, + [IEEE80211_MODE_VHT_5GHZ] = { .rssi = ROAM_RSSI_11A_DEFAULT, + .rate = ROAM_MCS_11AC_DEFAULT }, + }; void From owner-svn-src-head@freebsd.org Sun Jan 8 12:40:09 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 47063CA55AA; Sun, 8 Jan 2017 12:40:09 +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 EE5451963; Sun, 8 Jan 2017 12:40: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 v08Ce8Oi071798; Sun, 8 Jan 2017 12:40:08 GMT (envelope-from ae@FreeBSD.org) Received: (from ae@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v08Ce87T071797; Sun, 8 Jan 2017 12:40:08 GMT (envelope-from ae@FreeBSD.org) Message-Id: <201701081240.v08Ce87T071797@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ae set sender to ae@FreeBSD.org using -f From: "Andrey V. Elsukov" Date: Sun, 8 Jan 2017 12:40:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r311679 - head/sys/netipsec X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 08 Jan 2017 12:40:09 -0000 Author: ae Date: Sun Jan 8 12:40:07 2017 New Revision: 311679 URL: https://svnweb.freebsd.org/changeset/base/311679 Log: Add direction argument to ipsec_setspidx_inpcb() function. This function is used only by ipsec_getpolicybysock() to fill security policy index selector for locally generated packets (that have INPCB). The function incorrectly assumes that spidx is the same for both directions. Fix this by using new direction argument to specify correct INPCB security policy - sp_in or sp_out. There is no need to fill both policy indeces, because they are overwritten for each packet. This fixes security policy matching for outbound packets when user has specified TCP/UDP ports in the security policy upperspec. PR: 213869 MFC after: 1 week Modified: head/sys/netipsec/ipsec.c Modified: head/sys/netipsec/ipsec.c ============================================================================== --- head/sys/netipsec/ipsec.c Sun Jan 8 10:13:05 2017 (r311678) +++ head/sys/netipsec/ipsec.c Sun Jan 8 12:40:07 2017 (r311679) @@ -241,7 +241,7 @@ SYSCTL_VNET_PCPUSTAT(_net_inet6_ipsec6, #endif /* INET6 */ static int ipsec_in_reject(struct secpolicy *, const struct mbuf *); -static int ipsec_setspidx_inpcb(const struct mbuf *, struct inpcb *); +static int ipsec_setspidx_inpcb(const struct mbuf *, struct inpcb *, u_int); static int ipsec_setspidx(const struct mbuf *, struct secpolicyindex *, int); static void ipsec4_get_ulp(const struct mbuf *m, struct secpolicyindex *, int); static int ipsec4_setspidx_ipaddr(const struct mbuf *, struct secpolicyindex *); @@ -343,7 +343,7 @@ ipsec_getpolicybysock(const struct mbuf } /* Set spidx in pcb. */ - *error = ipsec_setspidx_inpcb(m, inp); + *error = ipsec_setspidx_inpcb(m, inp, dir); if (*error) return (NULL); @@ -500,8 +500,9 @@ ipsec4_checkpolicy(const struct mbuf *m, } static int -ipsec_setspidx_inpcb(const struct mbuf *m, struct inpcb *inp) +ipsec_setspidx_inpcb(const struct mbuf *m, struct inpcb *inp, u_int dir) { + struct secpolicyindex *spidx; int error; IPSEC_ASSERT(inp != NULL, ("null inp")); @@ -509,11 +510,13 @@ ipsec_setspidx_inpcb(const struct mbuf * IPSEC_ASSERT(inp->inp_sp->sp_out != NULL && inp->inp_sp->sp_in != NULL, ("null sp_in || sp_out")); - error = ipsec_setspidx(m, &inp->inp_sp->sp_in->spidx, 1); + if (dir == IPSEC_DIR_INBOUND) + spidx = &inp->inp_sp->sp_in->spidx; + else + spidx = &inp->inp_sp->sp_out->spidx; + error = ipsec_setspidx(m, spidx, 1); if (error == 0) { - inp->inp_sp->sp_in->spidx.dir = IPSEC_DIR_INBOUND; - inp->inp_sp->sp_out->spidx = inp->inp_sp->sp_in->spidx; - inp->inp_sp->sp_out->spidx.dir = IPSEC_DIR_OUTBOUND; + spidx->dir = dir; } else { bzero(&inp->inp_sp->sp_in->spidx, sizeof (inp->inp_sp->sp_in->spidx)); From owner-svn-src-head@freebsd.org Sun Jan 8 13:26:35 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E3095CA525D; Sun, 8 Jan 2017 13:26: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 B52751E83; Sun, 8 Jan 2017 13:26:35 +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 v08DQYOJ091427; Sun, 8 Jan 2017 13:26:34 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v08DQYoJ091426; Sun, 8 Jan 2017 13:26:34 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201701081326.v08DQYoJ091426@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Sun, 8 Jan 2017 13:26:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r311680 - 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-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 08 Jan 2017 13:26:36 -0000 Author: mav Date: Sun Jan 8 13:26:34 2017 New Revision: 311680 URL: https://svnweb.freebsd.org/changeset/base/311680 Log: Make CTL_GETSTATS ioctl return partial data if buffer is small. MFC after: 2 weeks Modified: head/sys/cam/ctl/ctl.c Modified: head/sys/cam/ctl/ctl.c ============================================================================== --- head/sys/cam/ctl/ctl.c Sun Jan 8 12:40:07 2017 (r311679) +++ head/sys/cam/ctl/ctl.c Sun Jan 8 13:26:34 2017 (r311680) @@ -2779,32 +2779,29 @@ ctl_ioctl(struct cdev *dev, u_long cmd, break; } case CTL_GETSTATS: { - struct ctl_stats *stats; + struct ctl_stats *stats = (struct ctl_stats *)addr; int i; - stats = (struct ctl_stats *)addr; - - if ((sizeof(struct ctl_lun_io_stats) * softc->num_luns) > - stats->alloc_len) { - stats->status = CTL_SS_NEED_MORE_SPACE; - stats->num_luns = softc->num_luns; - break; - } /* * XXX KDM no locking here. If the LUN list changes, * things can blow up. */ i = 0; + stats->status = CTL_SS_OK; + stats->fill_len = 0; STAILQ_FOREACH(lun, &softc->lun_list, links) { + if (stats->fill_len + sizeof(lun->stats) > + stats->alloc_len) { + stats->status = CTL_SS_NEED_MORE_SPACE; + break; + } retval = copyout(&lun->stats, &stats->lun_stats[i++], sizeof(lun->stats)); if (retval != 0) break; + stats->fill_len += sizeof(lun->stats); } stats->num_luns = softc->num_luns; - stats->fill_len = sizeof(struct ctl_lun_io_stats) * - softc->num_luns; - stats->status = CTL_SS_OK; #ifdef CTL_TIME_IO stats->flags = CTL_STATS_FLAG_TIME_VALID; #else From owner-svn-src-head@freebsd.org Sun Jan 8 17:56:55 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A35CFCA561B; Sun, 8 Jan 2017 17:56:55 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6AD24120A; Sun, 8 Jan 2017 17:56:55 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v08HusQM002360; Sun, 8 Jan 2017 17:56:54 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v08HusdO002359; Sun, 8 Jan 2017 17:56:54 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201701081756.v08HusdO002359@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Sun, 8 Jan 2017 17:56:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r311688 - head/sys/geom/vinum X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 08 Jan 2017 17:56:55 -0000 Author: dim Date: Sun Jan 8 17:56:54 2017 New Revision: 311688 URL: https://svnweb.freebsd.org/changeset/base/311688 Log: Fix logic error in gvinum's gv_set_sd_state() With clang 4.0.0, I'm getting the following warnings: sys/geom/vinum/geom_vinum_state.c:186:7: error: logical not is only applied to the left hand side of this bitwise operator [-Werror,-Wlogical-not-parentheses] if (!flags & GV_SETSTATE_FORCE) ^ ~ The logical not operator should obiously be called after masking. Reviewed by: mav, pfg MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D9093 Modified: head/sys/geom/vinum/geom_vinum_state.c Modified: head/sys/geom/vinum/geom_vinum_state.c ============================================================================== --- head/sys/geom/vinum/geom_vinum_state.c Sun Jan 8 16:59:07 2017 (r311687) +++ head/sys/geom/vinum/geom_vinum_state.c Sun Jan 8 17:56:54 2017 (r311688) @@ -183,7 +183,7 @@ gv_set_sd_state(struct gv_sd *s, int new * Only do this if we're forced, since it usually is done * internally, and then we do use the force flag. */ - if (!flags & GV_SETSTATE_FORCE) + if (!(flags & GV_SETSTATE_FORCE)) return (GV_ERR_SETSTATE); break; From owner-svn-src-head@freebsd.org Sun Jan 8 18:28:08 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 02BD9CA53B9; Sun, 8 Jan 2017 18:28:08 +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 BCEDB1B37; Sun, 8 Jan 2017 18:28:07 +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 v08IS61Z014845; Sun, 8 Jan 2017 18:28:06 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v08IS6YR014844; Sun, 8 Jan 2017 18:28:06 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201701081828.v08IS6YR014844@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Sun, 8 Jan 2017 18:28:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r311693 - 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-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 08 Jan 2017 18:28:08 -0000 Author: ian Date: Sun Jan 8 18:28:06 2017 New Revision: 311693 URL: https://svnweb.freebsd.org/changeset/base/311693 Log: Now that the PRESENT_STATE register is only used for the inhibit bits loop in this function, eliminate the state variable and restructure the loop to read the register just once at the top of the loop. Suggested by: skra Modified: head/sys/dev/sdhci/sdhci.c Modified: head/sys/dev/sdhci/sdhci.c ============================================================================== --- head/sys/dev/sdhci/sdhci.c Sun Jan 8 18:17:35 2017 (r311692) +++ head/sys/dev/sdhci/sdhci.c Sun Jan 8 18:28:06 2017 (r311693) @@ -821,7 +821,7 @@ static void sdhci_start_command(struct sdhci_slot *slot, struct mmc_command *cmd) { int flags, timeout; - uint32_t mask, state; + uint32_t mask; slot->curcmd = cmd; slot->cmd_done = 0; @@ -836,8 +836,6 @@ sdhci_start_command(struct sdhci_slot *s return; } - /* Read controller present state. */ - state = RD4(slot, SDHCI_PRESENT_STATE); /* Do not issue command if there is no card, clock or power. * Controller will not detect timeout without clock active. */ if (!SDHCI_GET_CARD_PRESENT(slot->bus, slot) || @@ -866,7 +864,7 @@ sdhci_start_command(struct sdhci_slot *s * (It's usually more like 20-30ms in the real world.) */ timeout = 250; - while (state & mask) { + while (mask & RD4(slot, SDHCI_PRESENT_STATE)) { if (timeout == 0) { slot_printf(slot, "Controller never released " "inhibit bit(s).\n"); @@ -877,7 +875,6 @@ sdhci_start_command(struct sdhci_slot *s } timeout--; DELAY(1000); - state = RD4(slot, SDHCI_PRESENT_STATE); } /* Prepare command flags. */ From owner-svn-src-head@freebsd.org Sun Jan 8 18:46:02 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1A1ACCA59A7; Sun, 8 Jan 2017 18:46:02 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D54D815EA; Sun, 8 Jan 2017 18:46:01 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v08Ik10j022730; Sun, 8 Jan 2017 18:46:01 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v08Ik1Ff022729; Sun, 8 Jan 2017 18:46:01 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201701081846.v08Ik1Ff022729@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Sun, 8 Jan 2017 18:46:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r311695 - head/sys/netinet6 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 08 Jan 2017 18:46:02 -0000 Author: markj Date: Sun Jan 8 18:46:00 2017 New Revision: 311695 URL: https://svnweb.freebsd.org/changeset/base/311695 Log: Release the ND6 list lock before making a prefix off-link in nd6_timer(). Reported by: Jim X-MFC With: r306829 Modified: head/sys/netinet6/nd6.c Modified: head/sys/netinet6/nd6.c ============================================================================== --- head/sys/netinet6/nd6.c Sun Jan 8 18:33:13 2017 (r311694) +++ head/sys/netinet6/nd6.c Sun Jan 8 18:46:00 2017 (r311695) @@ -910,7 +910,7 @@ nd6_timer(void *arg) struct nd_defrouter *dr, *ndr; struct nd_prefix *pr, *npr; struct in6_ifaddr *ia6, *nia6; - bool onlink_locked; + uint64_t genid; TAILQ_INIT(&drq); LIST_INIT(&prl); @@ -1022,7 +1022,6 @@ nd6_timer(void *arg) } ND6_WLOCK(); - onlink_locked = false; restart: LIST_FOREACH_SAFE(pr, &V_nd_prefix, ndpr_entry, npr) { /* @@ -1045,22 +1044,19 @@ restart: continue; } if ((pr->ndpr_stateflags & NDPRF_ONLINK) != 0) { - if (!onlink_locked) { - onlink_locked = ND6_ONLINK_TRYLOCK(); - if (!onlink_locked) { - ND6_WUNLOCK(); - ND6_ONLINK_LOCK(); - onlink_locked = true; - ND6_WLOCK(); - goto restart; - } - } + genid = V_nd6_list_genid; + nd6_prefix_ref(pr); + ND6_WUNLOCK(); + ND6_ONLINK_LOCK(); (void)nd6_prefix_offlink(pr); + ND6_ONLINK_UNLOCK(); + ND6_WLOCK(); + nd6_prefix_rele(pr); + if (genid != V_nd6_list_genid) + goto restart; } } ND6_WUNLOCK(); - if (onlink_locked) - ND6_ONLINK_UNLOCK(); while ((pr = LIST_FIRST(&prl)) != NULL) { LIST_REMOVE(pr, ndpr_entry); From owner-svn-src-head@freebsd.org Sun Jan 8 20:29:37 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 247E2CA66C7; Sun, 8 Jan 2017 20:29:37 +0000 (UTC) (envelope-from grehan@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id CF4041F08; Sun, 8 Jan 2017 20:29:36 +0000 (UTC) (envelope-from grehan@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v08KTaeM062823; Sun, 8 Jan 2017 20:29:36 GMT (envelope-from grehan@FreeBSD.org) Received: (from grehan@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v08KTaIK062822; Sun, 8 Jan 2017 20:29:36 GMT (envelope-from grehan@FreeBSD.org) Message-Id: <201701082029.v08KTaIK062822@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: grehan set sender to grehan@FreeBSD.org using -f From: Peter Grehan Date: Sun, 8 Jan 2017 20:29:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r311699 - head/usr.sbin/bhyve X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 08 Jan 2017 20:29:37 -0000 Author: grehan Date: Sun Jan 8 20:29:35 2017 New Revision: 311699 URL: https://svnweb.freebsd.org/changeset/base/311699 Log: Make sure the 'Always-one' bit is always set to one, in the first byte of the 3-byte mouse data report. Plan9/9front requires this. Switch over to using #defines for the data report bits. Verified no regression on Win10/Fedora-live. Reported and tested by: Trent Thompson (trentnthompson at gmail com) MFC after: 1 week Modified: head/usr.sbin/bhyve/ps2mouse.c Modified: head/usr.sbin/bhyve/ps2mouse.c ============================================================================== --- head/usr.sbin/bhyve/ps2mouse.c Sun Jan 8 19:48:13 2017 (r311698) +++ head/usr.sbin/bhyve/ps2mouse.c Sun Jan 8 20:29:35 2017 (r311699) @@ -62,6 +62,16 @@ __FBSDID("$FreeBSD$"); /* mouse device id */ #define PS2MOUSE_DEV_ID 0x0 +/* mouse data bits */ +#define PS2M_DATA_Y_OFLOW 0x80 +#define PS2M_DATA_X_OFLOW 0x40 +#define PS2M_DATA_Y_SIGN 0x20 +#define PS2M_DATA_X_SIGN 0x10 +#define PS2M_DATA_AONE 0x08 +#define PS2M_DATA_MID_BUTTON 0x04 +#define PS2M_DATA_RIGHT_BUTTON 0x02 +#define PS2M_DATA_LEFT_BUTTON 0x01 + /* mouse status bits */ #define PS2M_STS_REMOTE_MODE 0x40 #define PS2M_STS_ENABLE_DEV 0x20 @@ -169,19 +179,20 @@ movement_get(struct ps2mouse_softc *sc) assert(pthread_mutex_isowned_np(&sc->mtx)); - val0 = sc->status & (PS2M_STS_LEFT_BUTTON | - PS2M_STS_RIGHT_BUTTON | PS2M_STS_MID_BUTTON); + val0 = PS2M_DATA_AONE; + val0 |= sc->status & (PS2M_DATA_LEFT_BUTTON | + PS2M_DATA_RIGHT_BUTTON | PS2M_DATA_MID_BUTTON); if (sc->delta_x >= 0) { if (sc->delta_x > 255) { - val0 |= (1 << 6); + val0 |= PS2M_DATA_X_OFLOW; val1 = 255; } else val1 = sc->delta_x; } else { - val0 |= (1 << 4); + val0 |= PS2M_DATA_X_SIGN; if (sc->delta_x < -255) { - val0 |= (1 << 6); + val0 |= PS2M_DATA_X_OFLOW; val1 = 255; } else val1 = sc->delta_x; @@ -190,14 +201,14 @@ movement_get(struct ps2mouse_softc *sc) if (sc->delta_y >= 0) { if (sc->delta_y > 255) { - val0 |= (1 << 7); + val0 |= PS2M_DATA_Y_OFLOW; val2 = 255; } else val2 = sc->delta_y; } else { - val0 |= (1 << 5); + val0 |= PS2M_DATA_Y_SIGN; if (sc->delta_y < -255) { - val0 |= (1 << 7); + val0 |= PS2M_DATA_Y_OFLOW; val2 = 255; } else val2 = sc->delta_y; From owner-svn-src-head@freebsd.org Sun Jan 8 20:37:42 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 96C43CA5476; Sun, 8 Jan 2017 20:37:42 +0000 (UTC) (envelope-from loos@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 68A9116EB; Sun, 8 Jan 2017 20:37:42 +0000 (UTC) (envelope-from loos@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v08KbfKc067131; Sun, 8 Jan 2017 20:37:41 GMT (envelope-from loos@FreeBSD.org) Received: (from loos@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v08Kbf01067130; Sun, 8 Jan 2017 20:37:41 GMT (envelope-from loos@FreeBSD.org) Message-Id: <201701082037.v08Kbf01067130@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: loos set sender to loos@FreeBSD.org using -f From: Luiz Otavio O Souza Date: Sun, 8 Jan 2017 20:37:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r311700 - head/sys/dev/etherswitch X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 08 Jan 2017 20:37:42 -0000 Author: loos Date: Sun Jan 8 20:37:41 2017 New Revision: 311700 URL: https://svnweb.freebsd.org/changeset/base/311700 Log: Convert etherswitch to use the make_dev_s(9) KPI. This fix a possible race where si_drv1 can be accessed before it gets set. MFC after: 3 days Suggested by: kib Sponsored by: Rubicon Communications, LLC (Netgate) Modified: head/sys/dev/etherswitch/etherswitch.c Modified: head/sys/dev/etherswitch/etherswitch.c ============================================================================== --- head/sys/dev/etherswitch/etherswitch.c Sun Jan 8 20:29:35 2017 (r311699) +++ head/sys/dev/etherswitch/etherswitch.c Sun Jan 8 20:37:41 2017 (r311700) @@ -99,17 +99,24 @@ etherswitch_probe(device_t dev) static int etherswitch_attach(device_t dev) { - struct etherswitch_softc *sc = (struct etherswitch_softc *)device_get_softc(dev); + int err; + struct etherswitch_softc *sc; + struct make_dev_args devargs; + sc = device_get_softc(dev); sc->sc_dev = dev; - sc->sc_devnode = make_dev(ðerswitch_cdevsw, device_get_unit(dev), - UID_ROOT, GID_WHEEL, - 0600, "etherswitch%d", device_get_unit(dev)); - if (sc->sc_devnode == NULL) { + make_dev_args_init(&devargs); + devargs.mda_devsw = ðerswitch_cdevsw; + devargs.mda_uid = UID_ROOT; + devargs.mda_gid = GID_WHEEL; + devargs.mda_mode = 0600; + devargs.mda_si_drv1 = sc; + err = make_dev_s(&devargs, &sc->sc_devnode, "etherswitch%d", + device_get_unit(dev)); + if (err != 0) { device_printf(dev, "failed to create character device\n"); return (ENXIO); } - sc->sc_devnode->si_drv1 = sc; return (0); } From owner-svn-src-head@freebsd.org Sun Jan 8 20:41:33 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8B2C1CA56CD; Sun, 8 Jan 2017 20:41:33 +0000 (UTC) (envelope-from loos@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 53EE719B6; Sun, 8 Jan 2017 20:41:33 +0000 (UTC) (envelope-from loos@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v08KfWKa069020; Sun, 8 Jan 2017 20:41:32 GMT (envelope-from loos@FreeBSD.org) Received: (from loos@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v08KfW1J069019; Sun, 8 Jan 2017 20:41:32 GMT (envelope-from loos@FreeBSD.org) Message-Id: <201701082041.v08KfW1J069019@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: loos set sender to loos@FreeBSD.org using -f From: Luiz Otavio O Souza Date: Sun, 8 Jan 2017 20:41:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r311701 - head/sys/dev/gpio X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 08 Jan 2017 20:41:33 -0000 Author: loos Date: Sun Jan 8 20:41:32 2017 New Revision: 311701 URL: https://svnweb.freebsd.org/changeset/base/311701 Log: Convert gpioc to use the make_dev_s(9) KPI. This fix a possible race where si_drv1 can be accessed before it gets set. This is inspired on r311700. MFC after: 3 days Modified: head/sys/dev/gpio/gpioc.c Modified: head/sys/dev/gpio/gpioc.c ============================================================================== --- head/sys/dev/gpio/gpioc.c Sun Jan 8 20:37:41 2017 (r311700) +++ head/sys/dev/gpio/gpioc.c Sun Jan 8 20:41:32 2017 (r311701) @@ -78,18 +78,25 @@ gpioc_probe(device_t dev) static int gpioc_attach(device_t dev) { - struct gpioc_softc *sc = device_get_softc(dev); + int err; + struct gpioc_softc *sc; + struct make_dev_args devargs; + sc = device_get_softc(dev); sc->sc_dev = dev; sc->sc_pdev = device_get_parent(dev); sc->sc_unit = device_get_unit(dev); - sc->sc_ctl_dev = make_dev(&gpioc_cdevsw, sc->sc_unit, - UID_ROOT, GID_WHEEL, 0600, "gpioc%d", sc->sc_unit); - if (!sc->sc_ctl_dev) { + make_dev_args_init(&devargs); + devargs.mda_devsw = &gpioc_cdevsw; + devargs.mda_uid = UID_ROOT; + devargs.mda_gid = GID_WHEEL; + devargs.mda_mode = 0600; + devargs.mda_si_drv1 = sc; + err = make_dev_s(&devargs, &sc->sc_ctl_dev, "gpioc%d", sc->sc_unit); + if (err != 0) { printf("Failed to create gpioc%d", sc->sc_unit); return (ENXIO); } - sc->sc_ctl_dev->si_drv1 = sc; return (0); } From owner-svn-src-head@freebsd.org Sun Jan 8 20:49:41 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 96758CA5E99; Sun, 8 Jan 2017 20:49:41 +0000 (UTC) (envelope-from markjdb@gmail.com) Received: from mail-pg0-x244.google.com (mail-pg0-x244.google.com [IPv6:2607:f8b0:400e:c05::244]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 65F1D1CB0; Sun, 8 Jan 2017 20:49:41 +0000 (UTC) (envelope-from markjdb@gmail.com) Received: by mail-pg0-x244.google.com with SMTP id 204so2852032pge.2; Sun, 08 Jan 2017 12:49:41 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=8SwQ1oodX8tdfSxvmS1v6ikbbRXyf00Y9UWMNDtkcUo=; b=udUN1qs9bpW2SXBDDNzq2wA/CMo0WYNLaslg7ymLKlgy1Q2io4+JCXOCAsFUxFyAAb Wf+iXlZacc+2NTIVsprYs2ALT2NHo10zW84PCtJLqDz3JQp+B4FH5FDieqVQ+PITB3hu PPYMsc9QDox7QEJw2CeuTejZH2N1ss5be8BmUxFRdwiJpTlOMT9OvSWi8vTbeZ6i6ULG BR8oIo3jNsOpMJbLLjwYBxnwOx3jXTvlna91E5SEFkmbt2HdLPAycjsbzElNVEpInrly wgQBpkgIEbfuUcLsgo0PE9nUEwqL/ajWix154ygMuPttw30EmmxHO9DX1QskrMAUmnWd xySA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:date:from:to:cc:subject:message-id :references:mime-version:content-disposition:in-reply-to:user-agent; bh=8SwQ1oodX8tdfSxvmS1v6ikbbRXyf00Y9UWMNDtkcUo=; b=XcbDZJttVhyCDzbb1axI3HuefPoc92DaNQnMimlxGlb2G85qfEuiNMBrqglyCeWjxG nNiuJwbStdFLJF5sdDeBPX8FLfVlernLZ9xSXxBH4MtkPbQyd3e0iyhj5MVXF/w+kCIK KUBdQrA0eqBRa+zU9XTYX/KpziBpWnxmKfopdYNm7BtDKGziw6NelYBLzgnpDdgbDFQQ jShgb11U3KKO8rk1+KoaFQqlU+NOrsGa0rAAkYOwJn6vdkK5cHbloZp2aerzZWD7NlVH hNPVEeU8EXJ32bAfux6t9/2Qb4MoOgVWeuzmNM4nR9/U1oCwALjNuM5dzKDr7T1UqEgR W9Rg== X-Gm-Message-State: AIkVDXJrftsikEQNHjmlIbiRxwpK9qo7K2mlzaAbKL0WcMyWKZJPFY6iFy0BU50hHMos7w== X-Received: by 10.84.195.1 with SMTP id i1mr186516356pld.84.1483908580798; Sun, 08 Jan 2017 12:49:40 -0800 (PST) Received: from raichu ([2604:4080:1102:0:ca60:ff:fe9d:3963]) by smtp.gmail.com with ESMTPSA id q145sm173280216pfq.22.2017.01.08.12.49.40 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 08 Jan 2017 12:49:40 -0800 (PST) Sender: Mark Johnston Date: Sun, 8 Jan 2017 12:49:38 -0800 From: Mark Johnston To: George Neville-Neil Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r311225 - head/sys/netinet Message-ID: <20170108204938.GC34440@raichu> References: <201701040219.v042JDEk026544@repo.freebsd.org> <20170104182630.GA26522@wkstn-mjohnston.west.isilon.com> <4C01D080-64D9-4862-AFD5-42CC49B5CC0B@freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.7.2 (2016-11-26) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 08 Jan 2017 20:49:41 -0000 On Sat, Jan 07, 2017 at 02:31:28PM -0500, George Neville-Neil wrote: > > > On 7 Jan 2017, at 14:23, George Neville-Neil wrote: > > > On 4 Jan 2017, at 13:26, Mark Johnston wrote: > > > >> On Wed, Jan 04, 2017 at 02:19:13AM +0000, George V. Neville-Neil > >> wrote: > >>> Author: gnn > >>> Date: Wed Jan 4 02:19:13 2017 > >>> New Revision: 311225 > >>> URL: https://svnweb.freebsd.org/changeset/base/311225 > >>> > >>> Log: > >>> Fix DTrace TCP tracepoints to not use mtod() as it is both > >>> unnecessary and > >>> dangerous. Those wanting data from an mbuf should use DTrace > >>> itself to get > >>> the data. > >> > >> I think you also need to update the types in in_kdtrace.c, and add a > >> translator for struct mbuf * to ipinfo_t. > > > > Fair points. > > > > Actually, following up to myself, this does not need to be done just > yet. The pkt_info stuff is currently always NULL. I'm working on a > copyoutmbuf() subroutine that will make all of this much cleaner. The pkt_info stuff is unrelated to this - ipinfo_t is the third argument to the tcp probes. The translator which expects a pointer to the IP header is now getting a pointer to an mbuf, so this change effectively breaks scripts that use args[2] in a tcp:::send or tcp:::receive probe (among others). From owner-svn-src-head@freebsd.org Sun Jan 8 20:58:59 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id AFCEDCA641A; Sun, 8 Jan 2017 20:58:59 +0000 (UTC) (envelope-from grehan@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7C98E12E4; Sun, 8 Jan 2017 20:58:59 +0000 (UTC) (envelope-from grehan@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v08KwwDR077475; Sun, 8 Jan 2017 20:58:58 GMT (envelope-from grehan@FreeBSD.org) Received: (from grehan@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v08KwwtR077474; Sun, 8 Jan 2017 20:58:58 GMT (envelope-from grehan@FreeBSD.org) Message-Id: <201701082058.v08KwwtR077474@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: grehan set sender to grehan@FreeBSD.org using -f From: Peter Grehan Date: Sun, 8 Jan 2017 20:58:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r311702 - head/usr.sbin/bhyve X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 08 Jan 2017 20:58:59 -0000 Author: grehan Date: Sun Jan 8 20:58:58 2017 New Revision: 311702 URL: https://svnweb.freebsd.org/changeset/base/311702 Log: Use correct PCI device id for virtio-rng. This prevented the device from attaching with a Windows guest (most other guests use the device type for matching) PR: 212711 Submitted by: jbeich MFC after: 3 days Modified: head/usr.sbin/bhyve/virtio.h Modified: head/usr.sbin/bhyve/virtio.h ============================================================================== --- head/usr.sbin/bhyve/virtio.h Sun Jan 8 20:41:32 2017 (r311701) +++ head/usr.sbin/bhyve/virtio.h Sun Jan 8 20:58:58 2017 (r311702) @@ -209,8 +209,8 @@ struct vring_used { #define VIRTIO_VENDOR 0x1AF4 #define VIRTIO_DEV_NET 0x1000 #define VIRTIO_DEV_BLOCK 0x1001 -#define VIRTIO_DEV_RANDOM 0x1002 #define VIRTIO_DEV_CONSOLE 0x1003 +#define VIRTIO_DEV_RANDOM 0x1005 /* * PCI config space constants. From owner-svn-src-head@freebsd.org Sun Jan 8 21:12:47 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id AE088CA5107; Sun, 8 Jan 2017 21:12:47 +0000 (UTC) (envelope-from jhibbits@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7D59112B9; Sun, 8 Jan 2017 21:12:47 +0000 (UTC) (envelope-from jhibbits@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v08LCk2s085402; Sun, 8 Jan 2017 21:12:46 GMT (envelope-from jhibbits@FreeBSD.org) Received: (from jhibbits@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v08LCk0D085401; Sun, 8 Jan 2017 21:12:46 GMT (envelope-from jhibbits@FreeBSD.org) Message-Id: <201701082112.v08LCk0D085401@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhibbits set sender to jhibbits@FreeBSD.org using -f From: Justin Hibbits Date: Sun, 8 Jan 2017 21:12:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r311703 - head/sys/powerpc/include X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 08 Jan 2017 21:12:47 -0000 Author: jhibbits Date: Sun Jan 8 21:12:46 2017 New Revision: 311703 URL: https://svnweb.freebsd.org/changeset/base/311703 Log: Knock a page off VM_MAX_KERNEL_ADDRESS There are places where checks are made against VM_MAX_KERNEL_ADDRESS, or virtual_end (set to VM_MAX_KERNEL_ADDRESS). With 32-bit checks, an address will always be less than or equal to 0xffffffff. Drop a page, so those checks can terminate loops safely. Modified: head/sys/powerpc/include/vmparam.h Modified: head/sys/powerpc/include/vmparam.h ============================================================================== --- head/sys/powerpc/include/vmparam.h Sun Jan 8 20:58:58 2017 (r311702) +++ head/sys/powerpc/include/vmparam.h Sun Jan 8 21:12:46 2017 (r311703) @@ -111,7 +111,7 @@ #define KERNBASE 0xc0000000 /* start of kernel virtual */ #define VM_MIN_KERNEL_ADDRESS KERNBASE -#define VM_MAX_KERNEL_ADDRESS 0xffffffff +#define VM_MAX_KERNEL_ADDRESS 0xffffefff #define VM_MAX_SAFE_KERNEL_ADDRESS VM_MAX_KERNEL_ADDRESS #endif /* AIM/E500 */ From owner-svn-src-head@freebsd.org Sun Jan 8 21:53:42 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D6B89CA6078; Sun, 8 Jan 2017 21:53:42 +0000 (UTC) (envelope-from kczekirda@gmail.com) Received: from mail-yw0-x235.google.com (mail-yw0-x235.google.com [IPv6:2607:f8b0:4002:c05::235]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 94DCB1684; Sun, 8 Jan 2017 21:53:42 +0000 (UTC) (envelope-from kczekirda@gmail.com) Received: by mail-yw0-x235.google.com with SMTP id v81so309934608ywb.2; Sun, 08 Jan 2017 13:53:42 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=45b2oIibiVWdoF//mxa7ib7C/d2fRyp6aKv8Kg6PY2Y=; b=tme82WyYRi6EDIr/kLbTaWQDbFHXivypEevg53iL6ATW2ttJjqExsPbMKHzDkOt8gi kO3Hh9AwO0hmS+jtCY0qUJGYlsnyhQSxxPJ6gwFycfu5/FnMrQwJ6BI7NKZ0a1sui3AB LKlrsJIjnLoFAerk/8HI/tDIS3X+KXjUNIXiRf+E2yRJzPhSC8taQOMePTAnA7yxMSlt iGiJtzCheH5NzXgvQTgf/o8g0U/tvhziH+N7kWZ+szplJTBWUk1znIeaV7kBJm7iQzD9 XlYDxpBAOOdOpCZqDd1rh0wZ1VTKErhziTUd/vQ28lBMMLHrIvk4z0XyTcncYdbbAuro lHRQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc; bh=45b2oIibiVWdoF//mxa7ib7C/d2fRyp6aKv8Kg6PY2Y=; b=aV9cePwLlLY0AFiJye9Mi7rUoip3uec2DPMbyA7Wzet1zRxE2ZkeOTdUlhjpdbH7cg Xz4wHhwoGbOvt5hCPBxDernPdFyUbL2SdNyIV/le1v/fS23ZzzqmNwHzC6kQXK4s2+Vn iyH0DRQlJLImh6UsF+HcpMHk9CBZjZk7Vxjs/N6VJH9p8rs/qjLmZbLIQWiar8rKk2/E B3Jyq7cGKsBpX6U+n5VhWLdcrQBYSYY6LZO8KRtbDXPvwHqDJR71xGJw5np9vJ0RmCp3 XZj34zbTP8gMj6XVUdvIpPTw8Dy3cQ75dSJrXEBIAFX1QSJ85+tuJWs5FJUTOEAFllpG yc8w== X-Gm-Message-State: AIkVDXL6m8DP/kI68e+zWS+icMUPxpwX2yQIScx5ThISNM1DPwgicxioL5ae4aod4NF3G0psnXBeFK64YAFVtQ== X-Received: by 10.129.131.86 with SMTP id t83mr81516739ywf.142.1483912421551; Sun, 08 Jan 2017 13:53:41 -0800 (PST) MIME-Version: 1.0 Sender: kczekirda@gmail.com Received: by 10.37.199.199 with HTTP; Sun, 8 Jan 2017 13:53:11 -0800 (PST) In-Reply-To: <201701072342.v07NgHrk059834@repo.freebsd.org> References: <201701072342.v07NgHrk059834@repo.freebsd.org> From: Kamil Czekirda Date: Sun, 8 Jan 2017 22:53:11 +0100 X-Google-Sender-Auth: scUjmYaUOWHuj78ud-cpGTS2Gc4 Message-ID: Subject: Re: svn commit: r311659 - head/lib/libstand To: Baptiste Daroussin Cc: src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Type: text/plain; charset=UTF-8 X-Content-Filtered-By: Mailman/MimeDel 2.1.23 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 08 Jan 2017 21:53:42 -0000 Thanks. 2017-01-08 0:42 GMT+01:00 Baptiste Daroussin : > Author: bapt > Date: Sat Jan 7 23:42:17 2017 > New Revision: 311659 > URL: https://svnweb.freebsd.org/changeset/base/311659 > > Log: > remove network mask calculation for Classful network > > Nowadays it's not necessary to compute network mask from the IP address > and > compare to given by DHCP. > > Submitted by: kczekirda > Reviewed by: glebius, bapt > MFC after: 3 weeks > Sponsored by: Oktawave > Differential Revision: https://reviews.freebsd.org/D8740 > > Modified: > head/lib/libstand/bootp.c > > Modified: head/lib/libstand/bootp.c > ============================================================ > ================== > --- head/lib/libstand/bootp.c Sat Jan 7 22:55:23 2017 (r311658) > +++ head/lib/libstand/bootp.c Sat Jan 7 23:42:17 2017 (r311659) > @@ -62,8 +62,6 @@ __FBSDID("$FreeBSD$"); > > struct in_addr servip; > > -static n_long nmask, smask; > - > static time_t bot; > > static char vm_rfc1048[4] = VM_RFC1048; > @@ -223,30 +221,19 @@ bootp(sock, flag) > bcopy(rbuf.rbootp.bp_file, bootfile, sizeof(bootfile)); > bootfile[sizeof(bootfile) - 1] = '\0'; > > - if (IN_CLASSA(ntohl(myip.s_addr))) > - nmask = htonl(IN_CLASSA_NET); > - else if (IN_CLASSB(ntohl(myip.s_addr))) > - nmask = htonl(IN_CLASSB_NET); > - else > - nmask = htonl(IN_CLASSC_NET); > -#ifdef BOOTP_DEBUG > - if (debug) > - printf("'native netmask' is %s\n", intoa(nmask)); > -#endif > - > - /* Check subnet mask against net mask; toss if bogus */ > - if ((nmask & smask) != nmask) { > + if (!netmask) { > + if (IN_CLASSA(ntohl(myip.s_addr))) > + netmask = htonl(IN_CLASSA_NET); > + else if (IN_CLASSB(ntohl(myip.s_addr))) > + netmask = htonl(IN_CLASSB_NET); > + else > + netmask = htonl(IN_CLASSC_NET); > #ifdef BOOTP_DEBUG > if (debug) > - printf("subnet mask (%s) bad\n", intoa(smask)); > + printf("'native netmask' is %s\n", intoa(netmask)); > #endif > - smask = 0; > } > > - /* Get subnet (or natural net) mask */ > - netmask = nmask; > - if (smask) > - netmask = smask; > #ifdef BOOTP_DEBUG > if (debug) > printf("mask: %s\n", intoa(netmask)); > @@ -385,7 +372,7 @@ vend_rfc1048(cp, len) > break; > > if (tag == TAG_SUBNET_MASK) { > - bcopy(cp, &smask, sizeof(smask)); > + bcopy(cp, &netmask, sizeof(netmask)); > } > if (tag == TAG_GATEWAY) { > bcopy(cp, &gateip.s_addr, sizeof(gateip.s_addr)); > @@ -445,7 +432,7 @@ vend_cmu(cp) > vp = (struct cmu_vend *)cp; > > if (vp->v_smask.s_addr != 0) { > - smask = vp->v_smask.s_addr; > + netmask = vp->v_smask.s_addr; > } > if (vp->v_dgate.s_addr != 0) { > gateip = vp->v_dgate; > _______________________________________________ > svn-src-head@freebsd.org mailing list > https://lists.freebsd.org/mailman/listinfo/svn-src-head > To unsubscribe, send any mail to "svn-src-head-unsubscribe@freebsd.org" > From owner-svn-src-head@freebsd.org Sun Jan 8 23:25:47 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6A975CA6A0F; Sun, 8 Jan 2017 23:25:47 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 30C8011EA; Sun, 8 Jan 2017 23:25:47 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v08NPkNH037825; Sun, 8 Jan 2017 23:25:46 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v08NPkrV037824; Sun, 8 Jan 2017 23:25:46 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201701082325.v08NPkrV037824@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Sun, 8 Jan 2017 23:25:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r311706 - head/share/misc X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 08 Jan 2017 23:25:47 -0000 Author: bapt Date: Sun Jan 8 23:25:46 2017 New Revision: 311706 URL: https://svnweb.freebsd.org/changeset/base/311706 Log: Update pciids to 2017.01.08 MFC after: 1 day Modified: head/share/misc/pci_vendors Modified: head/share/misc/pci_vendors ============================================================================== --- head/share/misc/pci_vendors Sun Jan 8 21:42:19 2017 (r311705) +++ head/share/misc/pci_vendors Sun Jan 8 23:25:46 2017 (r311706) @@ -3,8 +3,8 @@ # # List of PCI ID's # -# Version: 2016.11.21 -# Date: 2016-11-21 03:15:01 +# Version: 2017.01.08 +# Date: 2017-01-08 03:15:02 # # Maintained by Albert Pool, Martin Mares, and other volunteers from # the PCI ID Project at http://pci-ids.ucw.cz/. @@ -249,6 +249,7 @@ 0014 MegaRAID Tri-Mode SAS3516 1028 1fd4 PERC H745P MX 1d49 0602 ThinkSystem RAID 930-16i 4GB Flash PCIe 12Gb Adapter + 0015 MegaRAID Tri-Mode SAS3416 0016 MegaRAID Tri-Mode SAS3508 1028 1fc9 PERC H840 Adapter 1028 1fcb PERC H740P Adapter @@ -548,6 +549,7 @@ 1028 1f53 HBA330 Mini 1028 1fd2 HBA330 MX 1028 1fd3 HBA330 MMZ + 1bd4 0011 Inspur 12Gb 8i-3008 IT SAS HBA 00ab SAS3516 Fusion-MPT Tri-Mode RAID On Chip (ROC) 00ac SAS3416 Fusion-MPT Tri-Mode I/O Controller Chip (IOC) 1d49 0201 ThinkSystem 430-16i SAS/SATA 12Gb HBA @@ -2201,6 +2203,11 @@ 67b9 Vesuvius [Radeon R9 295X2] 67be Hawaii LE 67c0 Ellesmere [Polaris10] + 67c4 Ellesmere [Radeon Pro WX 7100] + 67c7 Ellesmere [Radeon Pro WX 5100] + 67ca Ellesmere [Polaris10] + 67cc Ellesmere [Polaris10] + 67cf Ellesmere [Polaris10] 67df Ellesmere [Radeon RX 470/480] 1002 0b37 Radeon RX 480 1043 04a8 Radeon RX 480 @@ -2218,6 +2225,7 @@ 1787 a480 Radeon RX 480 67e0 Baffin [Polaris11] 67e1 Baffin [Polaris11] + 67e3 Baffin [Radeon Pro WX 4100] 67e8 Baffin [Polaris11] 67e9 Baffin [Polaris11] 67eb Baffin [Polaris11] @@ -2924,6 +2932,12 @@ 148c 9380 Radeon R9 380 # Make naming scheme consistent 174b e308 Radeon R9 380 Nitro 4G D5 + 6980 Polaris12 + 6981 Polaris12 + 6985 Polaris12 + 6986 Polaris12 + 6987 Polaris12 + 699f Polaris12 700f RS100 AGP Bridge 7010 RS200/RS250 AGP Bridge 7100 R520 [Radeon X1800 XT] @@ -5095,6 +5109,7 @@ 0675 1704 ISDN Adapter (PCI Bus, D, C) 0675 1707 ISDN Adapter (PCI Bus, DV, W) 10cf 105e ISDN Adapter (PCI Bus, DV, W) + 13a0 Transformer Book T101HA-GR030R # Should be 1022:9602 9602 AMD RS780/RS880 PCI to PCI bridge (int gfx) 1043 83a2 M4A785TD Motherboard @@ -10077,6 +10092,7 @@ 10c3 GT218 [GeForce 8400 GS Rev. 3] 10c5 GT218 [GeForce 405] 10d8 GT218 [NVS 300] + 10ef GP102 HDMI Audio Controller 10f0 GP104 High Definition Audio Controller 1140 GF117M [GeForce 610M/710M/810M/820M / GT 620M/625M/630M/720M] 1019 0799 GeForce 820M @@ -10620,7 +10636,7 @@ 13f1 GM204GL [Quadro M4000] 13f2 GM204GL [Tesla M60] 13f3 GM204GL [Tesla M6] - 13f8 GM204GLM [Quadro M5000M] + 13f8 GM204GLM [Quadro M5000M / M5000 SE] 13f9 GM204GLM [Quadro M4000M] 13fa GM204GLM [Quadro M3000M] 10de 11c9 Quadro M3000 SE @@ -10634,8 +10650,9 @@ 1431 GM206GL [Tesla M4] 15f0 GP100GL 15f1 GP100GL - 15f8 GP100GL - 15f9 GP100GL + 15f7 GP100GL [Tesla P100 PCIe 12GB] + 15f8 GP100GL [Tesla P100 PCIe 16GB] + 15f9 GP100GL [Tesla P100 SMX2 16GB] 1617 GM204M [GeForce GTX 980M] 1618 GM204M [GeForce GTX 970M] 1619 GM204M [GeForce GTX 965M] @@ -10659,10 +10676,12 @@ 1b81 GP104 [GeForce GTX 1070] 1b82 GP104 1b83 GP104 + 1b84 GP104 [GeForce GTX 1060 3GB] 1ba0 GP104M [GeForce GTX 1080] 1ba1 GP104M [GeForce GTX 1070] 1bb0 GP104GL [Quadro P5000] 1bb1 GP104GL + 1bb3 GP104GL [Tesla P4] 1bb4 GP104GL 1be0 GP104M [GeForce GTX 1080] 1be1 GP104M [GeForce GTX 1070] @@ -10678,6 +10697,9 @@ 1c80 GP107 1c81 GP107 [GeForce GTX 1050] 1c82 GP107 [GeForce GTX 1050 Ti] + 1c8c GP107M [GeForce GTX 1050 Ti] + 1c8d GP107M [GeForce GTX 1050] + 1c8e GP107M 1ca7 GP107GL 1ca8 GP107GL 1caa GP107GL @@ -12103,7 +12125,11 @@ 111f Precision Digital Images 4a47 Precision MX Video engine interface 5243 Frame capture bus interface -1120 EMC Corporation +# formerly EMC Corporation +1120 Dell EMC + 2306 Unity Fibre Channel Controller + 2501 Unity Ethernet Controller + 2505 Unity Fibre Channel Controller 1121 Zilog 1122 Multi-tech Systems, Inc. 1123 Excellent Design, Inc. @@ -15975,7 +16001,7 @@ 5081 T540-5081 Unified Wire Ethernet Controller 5082 T504-5082 Unified Wire Ethernet Controller 5083 T540-5083 Unified Wire Ethernet Controller - 5084 T580-5084 Unified Wire Ethernet Controller + 5084 T540-5084 Unified Wire Ethernet Controller 5085 T580-5085 Unified Wire Ethernet Controller 5086 T580-5086 Unified Wire Ethernet Controller 5087 T580-5087 Unified Wire Ethernet Controller @@ -15994,6 +16020,7 @@ 509a T520-509A Unified Wire Ethernet Controller 509b T540-509B Unified Wire Ethernet Controller 509c T520-509C Unified Wire Ethernet Controller + 509d T540-509D Unified Wire Ethernet Controller 5401 T520-CR Unified Wire Ethernet Controller 5402 T522-CR Unified Wire Ethernet Controller 5403 T540-CR Unified Wire Ethernet Controller @@ -16041,6 +16068,7 @@ 549a T520-509A Unified Wire Ethernet Controller 549b T540-509B Unified Wire Ethernet Controller 549c T520-509C Unified Wire Ethernet Controller + 549d T540-509D Unified Wire Ethernet Controller 5501 T520-CR Unified Wire Storage Controller 5502 T522-CR Unified Wire Storage Controller 5503 T540-CR Unified Wire Storage Controller @@ -16088,6 +16116,7 @@ 559a T520-509A Unified Wire Storage Controller 559b T540-509B Unified Wire Storage Controller 559c T520-509C Unified Wire Storage Controller + 559d T540-509D Unified Wire Storage Controller 5601 T520-CR Unified Wire Storage Controller 5602 T522-CR Unified Wire Storage Controller 5603 T540-CR Unified Wire Storage Controller @@ -16135,6 +16164,7 @@ 569a T520-509A Unified Wire Storage Controller 569b T540-509B Unified Wire Storage Controller 569c T520-509C Unified Wire Storage Controller + 569d T540-509D Unified Wire Storage Controller 5701 T520-CR Unified Wire Ethernet Controller 5702 T522-CR Unified Wire Ethernet Controller 5703 T540-CR Unified Wire Ethernet Controller @@ -16221,6 +16251,7 @@ 589a T520-509A Unified Wire Ethernet Controller [VF] 589b T540-509B Unified Wire Ethernet Controller [VF] 589c T520-509C Unified Wire Ethernet Controller [VF] + 589d T540-509D Unified Wire Ethernet Controller [VF] 6001 T6225-CR Unified Wire Ethernet Controller 6002 T6225-SO-CR Unified Wire Ethernet Controller 6003 T6425-CR Unified Wire Ethernet Controller @@ -16357,7 +16388,8 @@ 144d Samsung Electronics Co Ltd 1600 Apple PCIe SSD a800 XP941 PCIe SSD - a802 NVMe SSD Controller + a802 NVMe SSD Controller SM951/PM951 + a804 NVMe SSD Controller SM961/PM961 a820 NVMe SSD Controller 171X 1028 1f95 Express Flash NVMe XS1715 SSD 400GB 1028 1f96 Express Flash NVMe XS1715 SSD 800GB @@ -17968,11 +18000,13 @@ 15b3 Mellanox Technologies 0191 MT25408 [ConnectX IB Flash Recovery] 01f6 MT27500 Family [ConnectX-3 Flash Recovery] + 01f8 MT27520 Family [ConnectX-3 Pro Flash Recovery] 01ff MT27600 Family [Connect-IB Flash Recovery] 0209 MT27700 Family [ConnectX-4 Flash Recovery] 020b MT27710 Family [ConnectX-4 Lx Flash Recovery] 020d MT28800 Family [ConnectX-5 Flash Recovery] 020f MT28908A0 Family [ConnectX-6 Flash Recovery] + 0211 MT416842 Family [BlueField SoC Flash Recovery] # reserved for RM#105916 024e MT53100 [Spectrum-2, Flash recovery mode] # Actual value to be used @@ -18732,6 +18766,7 @@ 7013 AP440-3: 32-Channel Isolated Digital Input Module 7014 AP445: 32-Channel Isolated Digital Output Module 7016 AP470 48-Channel TTL Level Digital Input/Output Module + 7017 AP323 16-bit, 20 or 40 Channel Analog Input Module 7018 AP408: 32-Channel Digital I/O Module 701a AP220-16 12-Bit, 16-Channel Analog Output Module 701b AP231-16 16-Bit, 16-Channel Analog Output Module @@ -18992,6 +19027,7 @@ 1160 ARC-1160 16-Port PCI-X to SATA RAID Controller 1170 ARC-1170 24-Port PCI-X to SATA RAID Controller 1201 ARC-1200 2-Port PCI-Express to SATA II RAID Controller + 1203 ARC-1203 2/4/8 Port PCIe 2.0 to SATA 6Gb RAID Controller 1210 ARC-1210 4-Port PCI-Express to SATA RAID Controller 1214 ARC-12x4 PCIe 2.0 to SAS/SATA 6Gb RAID Controller 17d3 1214 ARC-1214 4-Port PCIe 2.0 to SAS/SATA 6Gb RAID Controller @@ -19510,7 +19546,7 @@ 1924 5105 SFN4111T-R5 1924 5201 SFN4112F-R1 1924 5202 SFN4112F-R2 - 0803 SFC9020 [Solarstorm] + 0803 SFC9020 10G Ethernet Controller 1014 0478 2-port 10GbE Low-Latency (R7) 1014 0479 2-port 10GbE OpenOnload (R7) 1014 04a7 Solarflare 10Gb Low-latency Dual-port HBA (R7) @@ -19540,7 +19576,7 @@ 1924 7207 SFN5162F-R7 SFP+ Server Adapter 1924 7a06 SFN5152F-R6 SFP+ Server Adapter 1924 7a07 SFN5152F-R7 SFP+ Server Adapter - 0813 SFL9021 [Solarstorm] + 0813 SFL9021 10GBASE-T Ethernet Controller 1924 6100 SFN5121T-R0 10GBASE-T Server Adapter 1924 6102 SFN5121T-R2 10GBASE-T Server Adapter 1924 6103 SFN5121T-R3 10GBASE-T Server Adapter @@ -19549,7 +19585,7 @@ 1924 6904 SFN5111T-R4 10GBASE-T Server Adapter 1924 7104 SFN5161T-R4 10GBASE-T Server Adapter 1924 7904 SFN5151T-R4 10GBASE-T Server Adapter - 0903 SFC9120 + 0903 SFC9120 10G Ethernet Controller 1014 04cc SFN7122F-R2 2x10GbE SFP+ Flareon Ultra 1924 8002 SFN7122F-R1 SFP+ Server Adapter 1924 8003 SFN7x41Q-R1 Flareon Ultra 7000 Series 10/40G Adapter @@ -19561,11 +19597,11 @@ 1924 800d SFN7x02F-R3 Flareon 7000 Series 10G Adapter 1924 8010 SFA7942Q-R1 QSFP+ AOE Adapter 1924 8015 SFA7942Q-A5-0-R1 QSFP+ AOE Adapter - 0923 SFC9140 + 0923 SFC9140 10/40G Ethernet Controller 1924 800b SFN7x42Q-R1 Flareon Ultra 7000 Series 10/40G Adapter 1924 800e SFN7x42Q-R2 Flareon Ultra 7000 Series 10/40G Adapter 1924 800f SFN7xx4F-R1 Flareon Ultra 7000 Series 10G Adapter - 0a03 SFC9220 + 0a03 SFC9220 10/40G Ethernet Controller 1924 8011 SFN 8022-R1 Solarflare Flareon 8000 Series 10G Adapter 1924 8012 SFN8522-R1 Flareon Ultra 8000 Series 10G Adapter 1924 8013 SFN8042-R1 Solarflare Flareon 8000 Series 10/40G Adapter @@ -19574,10 +19610,11 @@ 1924 8017 SFN8522-R2 Flareon Ultra 8000 Series 10G Adapter 1924 8018 SFN8042-R2 Flareon 8000 Series 10/40G Adapter 1924 8019 SFN8542-R2 Flareon Ultra 8000 Series 10/40G Adapter - 1803 SFC9020 Virtual Function [Solarstorm] - 1813 SFL9021 Virtual Function [Solarstorm] - 1903 SFC9120 Virtual Function - 1923 SFC9140 Virtual Function + 1803 SFC9020 10G Ethernet Controller (Virtual Function) + 1813 SFL9021 10GBASE-T Ethernet Controller (Virtual Function) + 1903 SFC9120 10G Ethernet Controller (Virtual Function) + 1923 SFC9140 10/40G Ethernet Controller (Virtual Function) + 1a03 SFC9220 10/40G Ethernet Controller (Virtual Function) 6703 SFC4000 rev A iSCSI/Onload [Solarstorm] 10b8 0102 SMC10GPCIe-10BT (A2) [TigerCard] 10b8 0103 SMC10GPCIe-10BT (A3) [TigerCard] @@ -19864,6 +19901,7 @@ 5801 DDRdrive X1 5808 DDRdrive X8 dd52 DDRdrive X1-30 +19e5 Huawei Technologies Co., Ltd. 19e7 NET (Network Equipment Technologies) 1001 STIX DSP Card 1002 STIX - 1 Port T1/E1 Card @@ -20303,6 +20341,8 @@ 0303 Simulyzer-RT CompactPCI Serial PSI5-SIM-1 card 0304 Simulyzer-RT CompactPCI Serial PWR-ANA-1 card 0305 Simulyzer-RT CompactPCI Serial CAN-1 card +1cd7 Nanjing Magewell Electronics Co., Ltd. + 0010 Pro Capture Endpoint 1cdd secunet Security Networks AG 1ce4 Exablaze 0001 ExaNIC X4 @@ -20310,6 +20350,7 @@ 0003 ExaNIC X10 0004 ExaNIC X10-GM 0005 ExaNIC X40 + 0006 ExaNIC X10-HPT 1cf7 Subspace Dynamics 1d00 Pure Storage 1d1d CNEX Labs @@ -21336,6 +21377,27 @@ 0813 Moorestown SC DMA 0814 Moorestown LPE DMA 0815 Moorestown SSP0 + 0817 Medfield Serial IO I2C Controller #3 + 0818 Medfield Serial IO I2C Controller #4 + 0819 Medfield Serial IO I2C Controller #5 + 081a Medfield GPIO Controller [Core] + 081b Medfield Serial IO HSUART Controller #1 + 081c Medfield Serial IO HSUART Controller #2 + 081d Medfield Serial IO HSUART Controller #3 + 081e Medfield Serial IO HSUART DMA Controller + 081f Medfield GPIO Controller [AON] + 0820 Medfield SD Host Controller + 0821 Medfield SDIO Controller #1 + 0822 Medfield SDIO Controller #2 + 0823 Medfield eMMC Controller #0 + 0824 Medfield eMMC Controller #1 + 0827 Medfield Serial IO DMA Controller + 0828 Medfield Power Management Unit + 0829 Medfield USB Device Controller (OTG) + 082a Medfield SCU IPC + 082c Medfield Serial IO I2C Controller #0 + 082d Medfield Serial IO I2C Controller #1 + 082e Medfield Serial IO I2C Controller #2 0885 Centrino Wireless-N + WiMAX 6150 8086 1305 Centrino Wireless-N + WiMAX 6150 BGN 8086 1307 Centrino Wireless-N + WiMAX 6150 BG @@ -22445,6 +22507,18 @@ 1161 82806AA PCI64 Hub Advanced Programmable Interrupt Controller 8086 1161 82806AA PCI64 Hub APIC 1162 Xscale 80200 Big Endian Companion Chip + 1190 Merrifield SD/SDIO/eMMC Controller + 1191 Merrifield Serial IO HSUART Controller + 1192 Merrifield Serial IO HSUART DMA Controller + 1194 Merrifield Serial IO SPI Controller + 1195 Merrifield Serial IO I2C Controller + 1196 Merrifield Serial IO I2C Controller + 1199 Merrifield GPIO Controller + 119e Merrifield USB Device Controller (OTG) + 11a0 Merrifield SCU IPC + 11a1 Merrifield Power Management Unit + 11a2 Merrifield Serial IO DMA Controller + 11a5 Merrifield Serial IO PWM Controller 1200 IXP1200 Network Processor 172a 0000 AEP SSL Accelerator 1209 8255xER/82551IT Fast Ethernet Controller @@ -22917,8 +22991,8 @@ 103c 0000 HPE Ethernet 10/20Gb 2-port 660FLB Adapter 103c 22fe HPE Ethernet 10/20Gb 2-port 660FLB Adapter 1588 Ethernet Controller XL710 for 20GbE backplane - 103c 0000 HPE Ethernet 10/20Gb 2-port 660M Adapter - 103c 22ff HPE Ethernet 10/20Gb 2-port 660M Adapter + 103c 0000 Ethernet 10/20Gb 2-port 660M Adapter + 103c 22ff Ethernet 10/20Gb 2-port 660M Adapter 1589 Ethernet Controller X710/X557-AT 10GBASE-T 108e 0000 Quad Port 10GBase-T Adapter 108e 7b1c Quad Port 10GBase-T Adapter @@ -22951,12 +23025,17 @@ 15ac Ethernet Connection X552 10 GbE SFP+ 15ad Ethernet Connection X552/X557-AT 10GBASE-T 15ae Ethernet Connection X552 1000BASE-T + 15b0 Ethernet Connection X552 Backplane 15b4 X553 Virtual Function 15b5 DSL6340 USB 3.1 Controller [Alpine Ridge] 15b6 DSL6540 USB 3.1 Controller [Alpine Ridge] 15b7 Ethernet Connection (2) I219-LM 15b8 Ethernet Connection (2) I219-V 15b9 Ethernet Connection (3) I219-LM + 15bb Ethernet Connection (7) I219-LM + 15bc Ethernet Connection (7) I219-V + 15bd Ethernet Connection (6) I219-LM + 15be Ethernet Connection (6) I219-V 15bf JHL6240 Thunderbolt 3 NHI (Low Power) [Alpine Ridge LP 2016] 15c0 JHL6240 Thunderbolt 3 Bridge (Low Power) [Alpine Ridge LP 2016] 15c5 X553 Virtual Function @@ -24258,6 +24337,9 @@ 24f4 Wireless 8260 # Snow Field Peak AC 8086 0030 Dual Band Wireless-AC 8260 + 24fd Wireless 8265 / 8275 +# Windstorm Peak + 8086 0010 Dual Band Wireless-AC 8265 2500 82820 820 (Camino) Chipset Host Bridge (MCH) 1028 0095 Precision Workstation 220 Chipset 1043 801c P3C-2000 system chipset @@ -25145,12 +25227,12 @@ 1028 01da OptiPlex 745 1462 7235 P965 Neo MS-7235 mainboard 2826 C600/X79 series chipset SATA RAID Controller - 1d49 0100 ThinkSystem RAID 331 - 1d49 0101 ThinkSystem RAID 331 - 1d49 0102 ThinkSystem RAID 331 - 1d49 0103 ThinkSystem RAID 331 - 1d49 0104 ThinkSystem RAID 331 - 1d49 0105 ThinkSystem RAID 331 + 1d49 0100 Intel RSTe SATA Software RAID + 1d49 0101 Intel RSTe SATA Software RAID + 1d49 0102 Intel RSTe SATA Software RAID + 1d49 0103 Intel RSTe SATA Software RAID + 1d49 0104 Intel RSTe SATA Software RAID + 1d49 0105 Intel RSTe SATA Software RAID 2827 C610/X99 series chipset sSATA Controller [RAID mode] 2828 82801HM/HEM (ICH8M/ICH8M-E) SATA Controller [IDE mode] 1028 01f3 Inspiron 1420 @@ -26950,41 +27032,41 @@ 530d 80310 (IOP) IO Processor 5845 QEMU NVM Express Controller 1af4 1100 QEMU Virtual Machine - 5a84 Atom/Celeron/Pentium Processor N4200/N3350/E3900 Series Integrated Graphics Controller - 5a88 Atom/Celeron/Pentium Processor N4200/N3350/E3900 Series Imaging Unit - 5a98 Atom/Celeron/Pentium Processor N4200/N3350/E3900 Series Audio Cluster - 5a9a Atom/Celeron/Pentium Processor N4200/N3350/E3900 Series Trusted Execution Engine - 5aa2 Atom/Celeron/Pentium Processor N4200/N3350/E3900 Series Integrated Sensor Hub - 5aa8 Atom/Celeron/Pentium Processor N4200/N3350/E3900 Series USB xHCI - 5aac Atom/Celeron/Pentium Processor N4200/N3350/E3900 Series I2C Controller #1 - 5aae Atom/Celeron/Pentium Processor N4200/N3350/E3900 Series I2C Controller #2 - 5ab0 Atom/Celeron/Pentium Processor N4200/N3350/E3900 Series I2C Controller #3 - 5ab2 Atom/Celeron/Pentium Processor N4200/N3350/E3900 Series I2C Controller #4 - 5ab4 Atom/Celeron/Pentium Processor N4200/N3350/E3900 Series I2C Controller #5 - 5ab6 Atom/Celeron/Pentium Processor N4200/N3350/E3900 Series I2C Controller #6 - 5ab8 Atom/Celeron/Pentium Processor N4200/N3350/E3900 Series I2C Controller #7 - 5aba Atom/Celeron/Pentium Processor N4200/N3350/E3900 Series I2C Controller #8 - 5abc Atom/Celeron/Pentium Processor N4200/N3350/E3900 Series HSUART Controller #1 - 5abe Atom/Celeron/Pentium Processor N4200/N3350/E3900 Series HSUART Controller #2 - 5ac0 Atom/Celeron/Pentium Processor N4200/N3350/E3900 Series HSUART Controller #3 - 5ac2 Atom/Celeron/Pentium Processor N4200/N3350/E3900 Series SPI Controller #1 - 5ac4 Atom/Celeron/Pentium Processor N4200/N3350/E3900 Series SPI Controller #2 - 5ac6 Atom/Celeron/Pentium Processor N4200/N3350/E3900 Series SPI Controller #3 - 5ac8 Atom/Celeron/Pentium Processor N4200/N3350/E3900 Series PWM Pin Controller - 5aca Atom/Celeron/Pentium Processor N4200/N3350/E3900 Series SDXC/MMC Host Controller - 5acc Atom/Celeron/Pentium Processor N4200/N3350/E3900 Series eMMC Controller - 5ad0 Atom/Celeron/Pentium Processor N4200/N3350/E3900 Series SDIO Controller - 5ad4 Atom/Celeron/Pentium Processor N4200/N3350/E3900 Series SMBus Controller - 5ad6 Atom/Celeron/Pentium Processor N4200/N3350/E3900 Series PCI Express Port B #1 - 5ad7 Atom/Celeron/Pentium Processor N4200/N3350/E3900 Series PCI Express Port B #2 - 5ad8 Atom/Celeron/Pentium Processor N4200/N3350/E3900 Series PCI Express Port A #1 - 5ad9 Atom/Celeron/Pentium Processor N4200/N3350/E3900 Series PCI Express Port A #2 - 5ada Atom/Celeron/Pentium Processor N4200/N3350/E3900 Series PCI Express Port A #3 - 5adb Atom/Celeron/Pentium Processor N4200/N3350/E3900 Series PCI Express Port A #4 - 5ae3 Atom/Celeron/Pentium Processor N4200/N3350/E3900 Series SATA AHCI Controller - 5ae8 Atom/Celeron/Pentium Processor N4200/N3350/E3900 Series Low Pin Count Interface - 5aee Atom/Celeron/Pentium Processor N4200/N3350/E3900 Series HSUART Controller #4 - 5af0 Atom/Celeron/Pentium Processor N4200/N3350/E3900 Series Host Bridge + 5a84 Celeron N3350/Pentium N4200/Atom E3900 Series Integrated Graphics Controller + 5a88 Celeron N3350/Pentium N4200/Atom E3900 Series Imaging Unit + 5a98 Celeron N3350/Pentium N4200/Atom E3900 Series Audio Cluster + 5a9a Celeron N3350/Pentium N4200/Atom E3900 Series Trusted Execution Engine + 5aa2 Celeron N3350/Pentium N4200/Atom E3900 Series Integrated Sensor Hub + 5aa8 Celeron N3350/Pentium N4200/Atom E3900 Series USB xHCI + 5aac Celeron N3350/Pentium N4200/Atom E3900 Series I2C Controller #1 + 5aae Celeron N3350/Pentium N4200/Atom E3900 Series I2C Controller #2 + 5ab0 Celeron N3350/Pentium N4200/Atom E3900 Series I2C Controller #3 + 5ab2 Celeron N3350/Pentium N4200/Atom E3900 Series I2C Controller #4 + 5ab4 Celeron N3350/Pentium N4200/Atom E3900 Series I2C Controller #5 + 5ab6 Celeron N3350/Pentium N4200/Atom E3900 Series I2C Controller #6 + 5ab8 Celeron N3350/Pentium N4200/Atom E3900 Series I2C Controller #7 + 5aba Celeron N3350/Pentium N4200/Atom E3900 Series I2C Controller #8 + 5abc Celeron N3350/Pentium N4200/Atom E3900 Series HSUART Controller #1 + 5abe Celeron N3350/Pentium N4200/Atom E3900 Series HSUART Controller #2 + 5ac0 Celeron N3350/Pentium N4200/Atom E3900 Series HSUART Controller #3 + 5ac2 Celeron N3350/Pentium N4200/Atom E3900 Series SPI Controller #1 + 5ac4 Celeron N3350/Pentium N4200/Atom E3900 Series SPI Controller #2 + 5ac6 Celeron N3350/Pentium N4200/Atom E3900 Series SPI Controller #3 + 5ac8 Celeron N3350/Pentium N4200/Atom E3900 Series PWM Pin Controller + 5aca Celeron N3350/Pentium N4200/Atom E3900 Series SDXC/MMC Host Controller + 5acc Celeron N3350/Pentium N4200/Atom E3900 Series eMMC Controller + 5ad0 Celeron N3350/Pentium N4200/Atom E3900 Series SDIO Controller + 5ad4 Celeron N3350/Pentium N4200/Atom E3900 Series SMBus Controller + 5ad6 Celeron N3350/Pentium N4200/Atom E3900 Series PCI Express Port B #1 + 5ad7 Celeron N3350/Pentium N4200/Atom E3900 Series PCI Express Port B #2 + 5ad8 Celeron N3350/Pentium N4200/Atom E3900 Series PCI Express Port A #1 + 5ad9 Celeron N3350/Pentium N4200/Atom E3900 Series PCI Express Port A #2 + 5ada Celeron N3350/Pentium N4200/Atom E3900 Series PCI Express Port A #3 + 5adb Celeron N3350/Pentium N4200/Atom E3900 Series PCI Express Port A #4 + 5ae3 Celeron N3350/Pentium N4200/Atom E3900 Series SATA AHCI Controller + 5ae8 Celeron N3350/Pentium N4200/Atom E3900 Series Low Pin Count Interface + 5aee Celeron N3350/Pentium N4200/Atom E3900 Series HSUART Controller #4 + 5af0 Celeron N3350/Pentium N4200/Atom E3900 Series Host Bridge 65c0 5100 Chipset Memory Controller Hub 65e2 5100 Chipset PCI Express x4 Port 2 65e3 5100 Chipset PCI Express x4 Port 3 @@ -27826,6 +27908,25 @@ a243 Lewisburg LPC or eSPI Controller a252 Lewisburg SSATA Controller [AHCI mode] a256 Lewisburg SSATA Controller [RAID mode] + a282 200 Series PCH SATA controller [AHCI mode] + a294 200 Series PCH PCI Express Root Port #1 + a2a1 200 Series PCH PMC + a2a3 200 Series PCH SMBus Controller + a2a7 200 Series PCH Serial IO UART Controller #0 + a2a8 200 Series PCH Serial IO UART Controller #1 + a2a9 200 Series PCH Serial IO SPI Controller #0 + a2aa 200 Series PCH Serial IO SPI Controller #1 + a2af 200 Series PCH USB 3.0 xHCI Controller + a2b1 200 Series PCH Thermal Subsystem + a2ba 200 Series PCH CSME HECI #1 + a2bb 200 Series PCH CSME HECI #2 + a2c6 200 Series PCH LPC Controller + a2e0 200 Series PCH Serial IO I2C Controller #0 + a2e1 200 Series PCH Serial IO I2C Controller #1 + a2e2 200 Series PCH Serial IO I2C Controller #2 + a2e3 200 Series PCH Serial IO I2C Controller #3 + a2e6 200 Series PCH Serial IO UART Controller #2 + a2f0 200 Series PCH HD Audio a620 6400/6402 Advanced Memory Buffer (AMB) abc0 Omni-Path Fabric Switch Silicon 100 Series b152 21152 PCI-to-PCI Bridge @@ -28605,6 +28706,7 @@ f1d0 AJA Video cafe Kona SD cfee Xena LS/SD-22-DA/SD-DA daff KONA LHi + db09 Corvid 24 dcaf Kona HD dfee Xena HD-DA efac Xena SD-MM/SD-22-MM From owner-svn-src-head@freebsd.org Sun Jan 8 23:41:19 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 08C0CCA65D3; Sun, 8 Jan 2017 23:41:19 +0000 (UTC) (envelope-from avos@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id BE98C1BF2; Sun, 8 Jan 2017 23:41:18 +0000 (UTC) (envelope-from avos@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v08NfHp4046814; Sun, 8 Jan 2017 23:41:17 GMT (envelope-from avos@FreeBSD.org) Received: (from avos@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v08NfH4O046808; Sun, 8 Jan 2017 23:41:17 GMT (envelope-from avos@FreeBSD.org) Message-Id: <201701082341.v08NfH4O046808@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avos set sender to avos@FreeBSD.org using -f From: Andriy Voskoboinyk Date: Sun, 8 Jan 2017 23:41:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r311707 - in head/sys/dev/rtwn: . usb X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 08 Jan 2017 23:41:19 -0000 Author: avos Date: Sun Jan 8 23:41:17 2017 New Revision: 311707 URL: https://svnweb.freebsd.org/changeset/base/311707 Log: rtwn_usb(4): fix Rx buffer size calculation. Use device-specific Rx buffer size to ensure that data will not be truncated + add a warning if truncation was detected (the driver cannot handle this case correctly yet). Tested with: - RTL8188CUS, RTL8188EU and RTL8821AU, STA / AP modes. Modified: head/sys/dev/rtwn/if_rtwnvar.h head/sys/dev/rtwn/usb/rtwn_usb_attach.c head/sys/dev/rtwn/usb/rtwn_usb_ep.c head/sys/dev/rtwn/usb/rtwn_usb_rx.c Modified: head/sys/dev/rtwn/if_rtwnvar.h ============================================================================== --- head/sys/dev/rtwn/if_rtwnvar.h Sun Jan 8 23:25:46 2017 (r311706) +++ head/sys/dev/rtwn/if_rtwnvar.h Sun Jan 8 23:41:17 2017 (r311707) @@ -25,7 +25,6 @@ #define RTWN_TX_DESC_SIZE 64 -#define RTWN_RXBUFSZ (8 * 1024) #define RTWN_TXBUFSZ (16 * 1024) #define RTWN_BCN_MAX_SIZE 512 Modified: head/sys/dev/rtwn/usb/rtwn_usb_attach.c ============================================================================== --- head/sys/dev/rtwn/usb/rtwn_usb_attach.c Sun Jan 8 23:25:46 2017 (r311706) +++ head/sys/dev/rtwn/usb/rtwn_usb_attach.c Sun Jan 8 23:41:17 2017 (r311707) @@ -133,8 +133,9 @@ rtwn_usb_alloc_rx_list(struct rtwn_softc struct rtwn_usb_softc *uc = RTWN_USB_SOFTC(sc); int error, i; + /* XXX recheck */ error = rtwn_usb_alloc_list(sc, uc->uc_rx, RTWN_USB_RX_LIST_COUNT, - RTWN_RXBUFSZ); + sc->rx_dma_size + 1024); if (error != 0) return (error); Modified: head/sys/dev/rtwn/usb/rtwn_usb_ep.c ============================================================================== --- head/sys/dev/rtwn/usb/rtwn_usb_ep.c Sun Jan 8 23:25:46 2017 (r311706) +++ head/sys/dev/rtwn/usb/rtwn_usb_ep.c Sun Jan 8 23:41:17 2017 (r311707) @@ -63,7 +63,6 @@ static struct usb_config rtwn_config[RTW .type = UE_BULK, .endpoint = UE_ADDR_ANY, .direction = UE_DIR_IN, - .bufsize = RTWN_RXBUFSZ, .flags = { .pipe_bof = 1, .short_xfer_ok = 1 @@ -222,6 +221,7 @@ rtwn_usb_setup_endpoints(struct rtwn_usb break; } + rtwn_config[RTWN_BULK_RX].bufsize = sc->rx_dma_size + 1024; error = usbd_transfer_setup(uc->uc_udev, &iface_index, uc->uc_xfer, rtwn_config, RTWN_N_TRANSFER, uc, &sc->sc_mtx); if (error) { Modified: head/sys/dev/rtwn/usb/rtwn_usb_rx.c ============================================================================== --- head/sys/dev/rtwn/usb/rtwn_usb_rx.c Sun Jan 8 23:25:46 2017 (r311706) +++ head/sys/dev/rtwn/usb/rtwn_usb_rx.c Sun Jan 8 23:41:17 2017 (r311707) @@ -158,8 +158,12 @@ rtwn_rxeof(struct rtwn_softc *sc, uint8_ /* Make sure everything fits in xfer. */ totlen = sizeof(*stat) + infosz + pktlen; - if (totlen > len) + if (totlen > len) { + device_printf(sc->sc_dev, + "%s: totlen (%d) > len (%d)!\n", + __func__, totlen, len); break; + } if (m0 == NULL) m0 = m = rtwn_rx_copy_to_mbuf(sc, stat, totlen); From owner-svn-src-head@freebsd.org Mon Jan 9 00:25:34 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id DA516CA2063; Mon, 9 Jan 2017 00:25:34 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id AAC691F5D; Mon, 9 Jan 2017 00:25:34 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v090PXZX068657; Mon, 9 Jan 2017 00:25:33 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v090PXHV068656; Mon, 9 Jan 2017 00:25:33 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201701090025.v090PXHV068656@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Mon, 9 Jan 2017 00:25:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r311709 - head/usr.sbin/rwhod X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 09 Jan 2017 00:25:35 -0000 Author: ngie Date: Mon Jan 9 00:25:33 2017 New Revision: 311709 URL: https://svnweb.freebsd.org/changeset/base/311709 Log: Style(9) fixes - Sort sys/ #includes - Use nitems instead of hardcoding the length of `mib` MFC after: 3 days Modified: head/usr.sbin/rwhod/rwhod.c Modified: head/usr.sbin/rwhod/rwhod.c ============================================================================== --- head/usr.sbin/rwhod/rwhod.c Mon Jan 9 00:09:19 2017 (r311708) +++ head/usr.sbin/rwhod/rwhod.c Mon Jan 9 00:25:33 2017 (r311709) @@ -43,14 +43,14 @@ static char sccsid[] = "@(#)rwhod.c 8.1 #include __FBSDID("$FreeBSD$"); -#include #include +#include +#include +#include #include #include #include -#include #include -#include #include #include @@ -548,7 +548,7 @@ getboottime(int signo __unused) mib[0] = CTL_KERN; mib[1] = KERN_BOOTTIME; size = sizeof(tm); - if (sysctl(mib, 2, &tm, &size, NULL, 0) == -1) { + if (sysctl(mib, nitems(mib), &tm, &size, NULL, 0) == -1) { syslog(LOG_ERR, "cannot get boottime: %m"); exit(1); } @@ -629,11 +629,11 @@ configure(int so) mib[3] = AF_INET; mib[4] = NET_RT_IFLIST; mib[5] = 0; - if (sysctl(mib, 6, NULL, &needed, NULL, 0) < 0) + if (sysctl(mib, nitems(mib), NULL, &needed, NULL, 0) < 0) quit("route-sysctl-estimate"); if ((buf = malloc(needed)) == NULL) quit("malloc"); - if (sysctl(mib, 6, buf, &needed, NULL, 0) < 0) + if (sysctl(mib, nitems(mib), buf, &needed, NULL, 0) < 0) quit("actual retrieval of interface table"); lim = buf + needed; From owner-svn-src-head@freebsd.org Mon Jan 9 00:29:24 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C12D3CA220B; Mon, 9 Jan 2017 00:29:24 +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 9371C117B; Mon, 9 Jan 2017 00:29:24 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v090TNAP068861; Mon, 9 Jan 2017 00:29:23 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v090TNOf068860; Mon, 9 Jan 2017 00:29:23 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201701090029.v090TNOf068860@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Mon, 9 Jan 2017 00:29:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r311710 - head/usr.bin/top X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 09 Jan 2017 00:29:24 -0000 Author: ngie Date: Mon Jan 9 00:29:23 2017 New Revision: 311710 URL: https://svnweb.freebsd.org/changeset/base/311710 Log: Style fixes - Delete trailing whitespace - Use nitems(mib) instead of hardcoding the mib length MFC after: 3 days Modified: head/usr.bin/top/machine.c Modified: head/usr.bin/top/machine.c ============================================================================== --- head/usr.bin/top/machine.c Mon Jan 9 00:25:33 2017 (r311709) +++ head/usr.bin/top/machine.c Mon Jan 9 00:29:23 2017 (r311710) @@ -413,7 +413,7 @@ format_header(char *uname_field) { static char Header[128]; const char *prehead; - + if (ps.jail) jidlength = TOP_JID_LEN + 1; /* +1 for extra left space. */ else @@ -559,7 +559,7 @@ get_system_info(struct system_info *si) arc_stats[5] = arc_stat >> 10; si->arc = arc_stats; } - + /* set arrays and strings */ if (pcpu_stats) { si->cpustates = pcpu_cpu_states; @@ -585,7 +585,7 @@ get_system_info(struct system_info *si) mib[0] = CTL_KERN; mib[1] = KERN_BOOTTIME; size = sizeof(boottime); - if (sysctl(mib, 2, &boottime, &size, NULL, 0) != -1 && + if (sysctl(mib, nitems(mib), &boottime, &size, NULL, 0) != -1 && boottime.tv_sec != 0) { si->boottime = boottime; } else { @@ -1072,7 +1072,7 @@ format_next_process(caddr_t handle, char } } - if (ps.jail == 0) + if (ps.jail == 0) jid_buf[0] = '\0'; else snprintf(jid_buf, sizeof(jid_buf), "%*d", From owner-svn-src-head@freebsd.org Mon Jan 9 00:33:28 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 86E30CA24AF; Mon, 9 Jan 2017 00:33:28 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5E6DB1632; Mon, 9 Jan 2017 00:33: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 v090XRPO072738; Mon, 9 Jan 2017 00:33:27 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v090XREB072737; Mon, 9 Jan 2017 00:33:27 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201701090033.v090XREB072737@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Mon, 9 Jan 2017 00:33:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r311711 - head/usr.sbin/route6d X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 09 Jan 2017 00:33:28 -0000 Author: ngie Date: Mon Jan 9 00:33:27 2017 New Revision: 311711 URL: https://svnweb.freebsd.org/changeset/base/311711 Log: Clean up trailing whitespace MFC after: 3 days Modified: head/usr.sbin/route6d/route6d.c Modified: head/usr.sbin/route6d/route6d.c ============================================================================== --- head/usr.sbin/route6d/route6d.c Mon Jan 9 00:29:23 2017 (r311710) +++ head/usr.sbin/route6d/route6d.c Mon Jan 9 00:33:27 2017 (r311711) @@ -4,7 +4,7 @@ /* * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project. * All rights reserved. - * + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: @@ -16,7 +16,7 @@ * 3. Neither the name of the project nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. - * + * * THIS SOFTWARE IS PROVIDED BY THE PROJECT 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 @@ -106,7 +106,7 @@ struct ifc { /* Configuration of an in }; TAILQ_HEAD(, ifc) ifc_head = TAILQ_HEAD_INITIALIZER(ifc_head); -struct ifac { /* Adddress associated to an interface */ +struct ifac { /* Adddress associated to an interface */ TAILQ_ENTRY(ifac) ifac_next; struct ifc *ifac_ifc; /* back pointer */ @@ -673,7 +673,7 @@ init(void) fatal("rip IPV6_PKTINFO"); /*NOTREACHED*/ } -#endif +#endif #ifdef IPV6_RECVPKTINFO if (setsockopt(ripsock, IPPROTO_IPV6, IPV6_RECVHOPLIMIT, @@ -819,8 +819,8 @@ ripsend(struct ifc *ifcp, struct sockadd * Request from non-link local address is not * a regular route6d update. */ - maxrte = (IFMINMTU - sizeof(struct ip6_hdr) - - sizeof(struct udphdr) - + maxrte = (IFMINMTU - sizeof(struct ip6_hdr) - + sizeof(struct udphdr) - sizeof(struct rip6) + sizeof(struct netinfo6)) / sizeof(struct netinfo6); nh = NULL; @@ -868,8 +868,8 @@ ripsend(struct ifc *ifcp, struct sockadd return; } - maxrte = (ifcp->ifc_mtu - sizeof(struct ip6_hdr) - - sizeof(struct udphdr) - + maxrte = (ifcp->ifc_mtu - sizeof(struct ip6_hdr) - + sizeof(struct udphdr) - sizeof(struct rip6) + sizeof(struct netinfo6)) / sizeof(struct netinfo6); @@ -953,13 +953,13 @@ out_filter(struct riprt *rrt, struct ifc /* * -A: filter out less specific routes, if we have aggregated * route configured. - */ + */ TAILQ_FOREACH(iffp, &ifcp->ifc_iff_head, iff_next) { if (iffp->iff_type != 'A') continue; if (rrt->rrt_info.rip6_plen <= iffp->iff_plen) continue; - ia = rrt->rrt_info.rip6_dest; + ia = rrt->rrt_info.rip6_dest; applyplen(&ia, iffp->iff_plen); if (IN6_ARE_ADDR_EQUAL(&ia, &iffp->iff_addr)) return 0; @@ -995,7 +995,7 @@ out_filter(struct riprt *rrt, struct ifc continue; if (rrt->rrt_info.rip6_plen < iffp->iff_plen) continue; - ia = rrt->rrt_info.rip6_dest; + ia = rrt->rrt_info.rip6_dest; applyplen(&ia, iffp->iff_plen); if (IN6_ARE_ADDR_EQUAL(&ia, &iffp->iff_addr)) { ok = 1; @@ -1195,8 +1195,8 @@ riprecv(void) } else { riprequest(NULL, np, nn, &fsock); } - return; - } + return; + } if (!IN6_IS_ADDR_LINKLOCAL(&fsock.sin6_addr)) { trace(1, "Response from non-ll addr: %s\n", @@ -1223,7 +1223,7 @@ riprecv(void) * source address to be forwarded to a different link. * So we also check whether the destination address is a link-local * address or the hop limit is 255. Note that RFC2080 does not require - * the specific hop limit for a unicast response, so we cannot assume + * the specific hop limit for a unicast response, so we cannot assume * the limitation. */ if (!IN6_IS_ADDR_LINKLOCAL(&pi->ipi6_addr) && *hlimp != 255) { @@ -1245,7 +1245,7 @@ riprecv(void) return; /* The packet is from me; ignore */ if (rp->rip6_cmd != RIP6_RESPONSE) { trace(1, "Invalid command %d\n", rp->rip6_cmd); - return; + return; } /* -N: no use */ @@ -1323,7 +1323,7 @@ riprecv(void) /* special rule: ::/0 means default, not "in /0" */ if (iffp->iff_plen == 0 && np->rip6_plen > 0) continue; - ia = np->rip6_dest; + ia = np->rip6_dest; applyplen(&ia, iffp->iff_plen); if (IN6_ARE_ADDR_EQUAL(&ia, &iffp->iff_addr)) { ok = 1; @@ -1374,7 +1374,7 @@ riprecv(void) } else if (nq->rip6_metric == np->rip6_metric && np->rip6_metric < HOPCNT_INFINITY6) { if (rrt->rrt_index == ifcp->ifc_index && - IN6_ARE_ADDR_EQUAL(&nh, &rrt->rrt_gw)) { + IN6_ARE_ADDR_EQUAL(&nh, &rrt->rrt_gw)) { /* same metric, same route from same gw */ rrt->rrt_t = t; } else if (rrt->rrt_t < t_half_lifetime) { @@ -1389,7 +1389,7 @@ riprecv(void) rrt->rrt_t = t; } } - /* + /* * if nq->rip6_metric == HOPCNT_INFINITY6 then * do not update age value. Do nothing. */ @@ -1667,7 +1667,7 @@ ifremove(int ifindex) break; } if (ifcp == NULL) - return; + return; tracet(1, "ifremove: %s is departed.\n", ifcp->ifc_name); TAILQ_REMOVE(&ifc_head, ifcp, ifc_next); @@ -1824,7 +1824,7 @@ rtrecv(void) #if 0 if (rta[RTAX_DST] == NULL) { trace(1, "\tno destination, ignored\n"); - continue; + continue; } if (rta[RTAX_DST]->sin6_family != AF_INET6) { trace(1, "\taf mismatch, ignored\n"); @@ -3238,7 +3238,7 @@ ifonly: #if 0 /* * When the address has already been registered in the - * kernel routing table, it should be removed + * kernel routing table, it should be removed */ delroute(&rrt->rrt_info, &gw); #else @@ -3319,7 +3319,7 @@ mask2len(const struct in6_addr *addr, in { int i = 0, j; const u_char *p = (const u_char *)addr; - + for (j = 0; j < lenlim; j++, p++) { if (*p != 0xff) break; @@ -3446,7 +3446,7 @@ ripsuptrig(void) time_t t; double r = rand(); - t = (int)(RIP_TRIG_INT6_MIN + + t = (int)(RIP_TRIG_INT6_MIN + (RIP_TRIG_INT6_MAX - RIP_TRIG_INT6_MIN) * (r / RAND_MAX)); sup_trig_update = time(NULL) + t; return t; From owner-svn-src-head@freebsd.org Mon Jan 9 00:37:11 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 12C7FCA2713; Mon, 9 Jan 2017 00:37: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 D8EAC1A08; Mon, 9 Jan 2017 00:37:10 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v090bAZZ072901; Mon, 9 Jan 2017 00:37:10 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v090bAkD072899; Mon, 9 Jan 2017 00:37:10 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201701090037.v090bAkD072899@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Mon, 9 Jan 2017 00:37:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r311712 - head/usr.sbin/route6d X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 09 Jan 2017 00:37:11 -0000 Author: ngie Date: Mon Jan 9 00:37:09 2017 New Revision: 311712 URL: https://svnweb.freebsd.org/changeset/base/311712 Log: Sort #includes MFC after: 3 days Modified: head/usr.sbin/route6d/route6d.c Modified: head/usr.sbin/route6d/route6d.c ============================================================================== --- head/usr.sbin/route6d/route6d.c Mon Jan 9 00:33:27 2017 (r311711) +++ head/usr.sbin/route6d/route6d.c Mon Jan 9 00:37:09 2017 (r311712) @@ -34,44 +34,40 @@ static const char _rcsid[] = "$KAME: route6d.c,v 1.104 2003/10/31 00:30:20 itojun Exp $"; #endif -#include - -#include -#include -#include -#include -#include -#include -#ifdef __STDC__ -#include -#else -#include -#endif -#include -#include -#include -#include -#ifdef HAVE_POLL_H -#include -#endif - -#include #include #include -#include #include +#include #include #include +#include #include #include #include #include #include #include -#include +#include +#include +#include #include - -#include +#include +#ifdef HAVE_POLL_H +#include +#endif +#include +#include +#ifdef __STDC__ +#include +#else +#include +#endif +#include +#include +#include +#include +#include +#include #include "route6d.h" From owner-svn-src-head@freebsd.org Mon Jan 9 00:38:21 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 12F0CCA2826; Mon, 9 Jan 2017 00:38:21 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D95241C58; Mon, 9 Jan 2017 00:38:20 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v090cK9e072986; Mon, 9 Jan 2017 00:38:20 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v090cKqq072985; Mon, 9 Jan 2017 00:38:20 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201701090038.v090cKqq072985@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Mon, 9 Jan 2017 00:38:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r311713 - head/usr.sbin/route6d X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 09 Jan 2017 00:38:21 -0000 Author: ngie Date: Mon Jan 9 00:38:19 2017 New Revision: 311713 URL: https://svnweb.freebsd.org/changeset/base/311713 Log: Use nitems(mib) instead of hardcoding mib's length MFC after: 3 days Modified: head/usr.sbin/route6d/route6d.c Modified: head/usr.sbin/route6d/route6d.c ============================================================================== --- head/usr.sbin/route6d/route6d.c Mon Jan 9 00:37:09 2017 (r311712) +++ head/usr.sbin/route6d/route6d.c Mon Jan 9 00:38:19 2017 (r311713) @@ -2418,7 +2418,7 @@ getifmtu(int ifindex) mib[3] = AF_INET6; mib[4] = NET_RT_IFLIST; mib[5] = ifindex; - if (sysctl(mib, 6, NULL, &msize, NULL, 0) < 0) { + if (sysctl(mib, nitems(mib), NULL, &msize, NULL, 0) < 0) { fatal("sysctl estimate NET_RT_IFLIST"); /*NOTREACHED*/ } @@ -2426,7 +2426,7 @@ getifmtu(int ifindex) fatal("malloc"); /*NOTREACHED*/ } - if (sysctl(mib, 6, buf, &msize, NULL, 0) < 0) { + if (sysctl(mib, nitems(mib), buf, &msize, NULL, 0) < 0) { fatal("sysctl NET_RT_IFLIST"); /*NOTREACHED*/ } @@ -2598,7 +2598,7 @@ krtread(int again) free(buf); buf = NULL; } - if (sysctl(mib, 6, NULL, &msize, NULL, 0) < 0) { + if (sysctl(mib, nitems(mib), NULL, &msize, NULL, 0) < 0) { errmsg = "sysctl estimate"; continue; } @@ -2606,7 +2606,7 @@ krtread(int again) errmsg = "malloc"; continue; } - if (sysctl(mib, 6, buf, &msize, NULL, 0) < 0) { + if (sysctl(mib, nitems(mib), buf, &msize, NULL, 0) < 0) { errmsg = "sysctl NET_RT_DUMP"; continue; } From owner-svn-src-head@freebsd.org Mon Jan 9 00:47:25 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 62C5DCA2B37; Mon, 9 Jan 2017 00:47: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 3AC8B1166; Mon, 9 Jan 2017 00:47: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 v090lOBb077140; Mon, 9 Jan 2017 00:47:24 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v090lOlF077136; Mon, 9 Jan 2017 00:47:24 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201701090047.v090lOlF077136@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Mon, 9 Jan 2017 00:47:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r311714 - head/lib/libutil X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 09 Jan 2017 00:47:25 -0000 Author: ngie Date: Mon Jan 9 00:47:23 2017 New Revision: 311714 URL: https://svnweb.freebsd.org/changeset/base/311714 Log: lib/libutil/kinfo_*: style cleanup - Use nitems(mib) instead of hardcoding mib's length - Sort sys/ #includes MFC after: 3 days Modified: head/lib/libutil/kinfo_getallproc.c head/lib/libutil/kinfo_getfile.c head/lib/libutil/kinfo_getproc.c head/lib/libutil/kinfo_getvmmap.c Modified: head/lib/libutil/kinfo_getallproc.c ============================================================================== --- head/lib/libutil/kinfo_getallproc.c Mon Jan 9 00:38:19 2017 (r311713) +++ head/lib/libutil/kinfo_getallproc.c Mon Jan 9 00:47:23 2017 (r311714) @@ -31,8 +31,8 @@ __FBSDID("$FreeBSD$"); #include -#include #include +#include #include #include @@ -75,14 +75,14 @@ kinfo_getallproc(int *cntp) mib[2] = KERN_PROC_PROC; len = 0; - if (sysctl(mib, 3, NULL, &len, NULL, 0) < 0) + if (sysctl(mib, nitems(mib), NULL, &len, NULL, 0) < 0) return (NULL); kipp = malloc(len); if (kipp == NULL) return (NULL); - if (sysctl(mib, 3, kipp, &len, NULL, 0) < 0) + if (sysctl(mib, nitems(mib), kipp, &len, NULL, 0) < 0) goto bad; if (len % sizeof(*kipp) != 0) goto bad; Modified: head/lib/libutil/kinfo_getfile.c ============================================================================== --- head/lib/libutil/kinfo_getfile.c Mon Jan 9 00:38:19 2017 (r311713) +++ head/lib/libutil/kinfo_getfile.c Mon Jan 9 00:47:23 2017 (r311714) @@ -2,8 +2,8 @@ __FBSDID("$FreeBSD$"); #include -#include #include +#include #include #include @@ -26,14 +26,14 @@ kinfo_getfile(pid_t pid, int *cntp) mib[2] = KERN_PROC_FILEDESC; mib[3] = pid; - error = sysctl(mib, 4, NULL, &len, NULL, 0); + error = sysctl(mib, nitems(mib), NULL, &len, NULL, 0); if (error) return (NULL); len = len * 4 / 3; buf = malloc(len); if (buf == NULL) return (NULL); - error = sysctl(mib, 4, buf, &len, NULL, 0); + error = sysctl(mib, nitems(mib), buf, &len, NULL, 0); if (error) { free(buf); return (NULL); Modified: head/lib/libutil/kinfo_getproc.c ============================================================================== --- head/lib/libutil/kinfo_getproc.c Mon Jan 9 00:38:19 2017 (r311713) +++ head/lib/libutil/kinfo_getproc.c Mon Jan 9 00:47:23 2017 (r311714) @@ -30,8 +30,8 @@ __FBSDID("$FreeBSD$"); #include -#include #include +#include #include #include @@ -49,14 +49,14 @@ kinfo_getproc(pid_t pid) mib[1] = KERN_PROC; mib[2] = KERN_PROC_PID; mib[3] = pid; - if (sysctl(mib, 4, NULL, &len, NULL, 0) < 0) + if (sysctl(mib, nitems(mib), NULL, &len, NULL, 0) < 0) return (NULL); kipp = malloc(len); if (kipp == NULL) return (NULL); - if (sysctl(mib, 4, kipp, &len, NULL, 0) < 0) + if (sysctl(mib, nitems(mib), kipp, &len, NULL, 0) < 0) goto bad; if (len != sizeof(*kipp)) goto bad; Modified: head/lib/libutil/kinfo_getvmmap.c ============================================================================== --- head/lib/libutil/kinfo_getvmmap.c Mon Jan 9 00:38:19 2017 (r311713) +++ head/lib/libutil/kinfo_getvmmap.c Mon Jan 9 00:47:23 2017 (r311714) @@ -2,8 +2,8 @@ __FBSDID("$FreeBSD$"); #include -#include #include +#include #include #include @@ -26,14 +26,14 @@ kinfo_getvmmap(pid_t pid, int *cntp) mib[2] = KERN_PROC_VMMAP; mib[3] = pid; - error = sysctl(mib, 4, NULL, &len, NULL, 0); + error = sysctl(mib, nitems(mib), NULL, &len, NULL, 0); if (error) return (NULL); len = len * 4 / 3; buf = malloc(len); if (buf == NULL) return (NULL); - error = sysctl(mib, 4, buf, &len, NULL, 0); + error = sysctl(mib, nitems(mib), buf, &len, NULL, 0); if (error) { free(buf); return (NULL); From owner-svn-src-head@freebsd.org Mon Jan 9 00:54:19 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id CEB47CA2E09; Mon, 9 Jan 2017 00:54: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 8A80817C9; Mon, 9 Jan 2017 00:54:19 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v090sIEO080894; Mon, 9 Jan 2017 00:54:18 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v090sIQV080893; Mon, 9 Jan 2017 00:54:18 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201701090054.v090sIQV080893@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Mon, 9 Jan 2017 00:54:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r311715 - head/lib/libprocstat X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 09 Jan 2017 00:54:19 -0000 Author: ngie Date: Mon Jan 9 00:54:18 2017 New Revision: 311715 URL: https://svnweb.freebsd.org/changeset/base/311715 Log: Use nitems({mib,name}) instead of hardcoding their value MFC after: 3 days Modified: head/lib/libprocstat/libprocstat.c Modified: head/lib/libprocstat/libprocstat.c ============================================================================== --- head/lib/libprocstat/libprocstat.c Mon Jan 9 00:47:23 2017 (r311714) +++ head/lib/libprocstat/libprocstat.c Mon Jan 9 00:54:18 2017 (r311715) @@ -282,7 +282,7 @@ procstat_getprocs(struct procstat *procs name[1] = KERN_PROC; name[2] = what; name[3] = arg; - error = sysctl(name, 4, NULL, &len, NULL, 0); + error = sysctl(name, nitems(name), NULL, &len, NULL, 0); if (error < 0 && errno != EPERM) { warn("sysctl(kern.proc)"); goto fail; @@ -299,7 +299,7 @@ procstat_getprocs(struct procstat *procs goto fail; } olen = len; - error = sysctl(name, 4, p, &len, NULL, 0); + error = sysctl(name, nitems(name), p, &len, NULL, 0); } while (error < 0 && errno == ENOMEM && olen == len); if (error < 0 && errno != EPERM) { warn("sysctl(kern.proc)"); @@ -1760,7 +1760,7 @@ getargv(struct procstat *procstat, struc name[2] = env ? KERN_PROC_ENV : KERN_PROC_ARGS; name[3] = kp->ki_pid; len = nchr; - error = sysctl(name, 4, av->buf, &len, NULL, 0); + error = sysctl(name, nitems(name), av->buf, &len, NULL, 0); if (error != 0 && errno != ESRCH && errno != EPERM) warn("sysctl(kern.proc.%s)", env ? "env" : "args"); if (error != 0 || len == 0) @@ -1983,7 +1983,7 @@ procstat_getgroups_sysctl(pid_t pid, uns warn("malloc(%zu)", len); return (NULL); } - if (sysctl(mib, 4, groups, &len, NULL, 0) == -1) { + if (sysctl(mib, nitems(mib), groups, &len, NULL, 0) == -1) { warn("sysctl: kern.proc.groups: %d", pid); free(groups); return (NULL); @@ -2059,7 +2059,7 @@ procstat_getumask_sysctl(pid_t pid, unsi mib[2] = KERN_PROC_UMASK; mib[3] = pid; len = sizeof(*maskp); - error = sysctl(mib, 4, maskp, &len, NULL, 0); + error = sysctl(mib, nitems(mib), maskp, &len, NULL, 0); if (error != 0 && errno != ESRCH && errno != EPERM) warn("sysctl: kern.proc.umask: %d", pid); return (error); @@ -2139,7 +2139,7 @@ procstat_getrlimit_sysctl(pid_t pid, int name[3] = pid; name[4] = which; len = sizeof(struct rlimit); - error = sysctl(name, 5, rlimit, &len, NULL, 0); + error = sysctl(name, nitems(name), rlimit, &len, NULL, 0); if (error < 0 && errno != ESRCH) { warn("sysctl: kern.proc.rlimit: %d", pid); return (-1); @@ -2201,7 +2201,7 @@ procstat_getpathname_sysctl(pid_t pid, c name[2] = KERN_PROC_PATHNAME; name[3] = pid; len = maxlen; - error = sysctl(name, 4, pathname, &len, NULL, 0); + error = sysctl(name, nitems(name), pathname, &len, NULL, 0); if (error != 0 && errno != ESRCH) warn("sysctl: kern.proc.pathname: %d", pid); if (len == 0) @@ -2281,7 +2281,7 @@ procstat_getosrel_sysctl(pid_t pid, int name[2] = KERN_PROC_OSREL; name[3] = pid; len = sizeof(*osrelp); - error = sysctl(name, 4, osrelp, &len, NULL, 0); + error = sysctl(name, nitems(name), osrelp, &len, NULL, 0); if (error != 0 && errno != ESRCH) warn("sysctl: kern.proc.osrel: %d", pid); return (error); @@ -2341,7 +2341,7 @@ is_elf32_sysctl(pid_t pid) name[2] = KERN_PROC_SV_NAME; name[3] = pid; len = sizeof(sv_name); - error = sysctl(name, 4, sv_name, &len, NULL, 0); + error = sysctl(name, nitems(name), sv_name, &len, NULL, 0); if (error != 0 || len == 0) return (0); for (i = 0; i < sizeof(elf32_sv_names) / sizeof(*elf32_sv_names); i++) { @@ -2372,7 +2372,7 @@ procstat_getauxv32_sysctl(pid_t pid, uns warn("malloc(%zu)", len); goto out; } - if (sysctl(name, 4, auxv32, &len, NULL, 0) == -1) { + if (sysctl(name, nitems(name), auxv32, &len, NULL, 0) == -1) { if (errno != ESRCH && errno != EPERM) warn("sysctl: kern.proc.auxv: %d: %d", pid, errno); goto out; @@ -2421,7 +2421,7 @@ procstat_getauxv_sysctl(pid_t pid, unsig warn("malloc(%zu)", len); return (NULL); } - if (sysctl(name, 4, auxv, &len, NULL, 0) == -1) { + if (sysctl(name, nitems(name), auxv, &len, NULL, 0) == -1) { if (errno != ESRCH && errno != EPERM) warn("sysctl: kern.proc.auxv: %d: %d", pid, errno); free(auxv); @@ -2482,7 +2482,7 @@ procstat_getkstack_sysctl(pid_t pid, int name[3] = pid; len = 0; - error = sysctl(name, 4, NULL, &len, NULL, 0); + error = sysctl(name, nitems(name), NULL, &len, NULL, 0); if (error < 0 && errno != ESRCH && errno != EPERM && errno != ENOENT) { warn("sysctl: kern.proc.kstack: %d", pid); return (NULL); @@ -2499,7 +2499,7 @@ procstat_getkstack_sysctl(pid_t pid, int warn("malloc(%zu)", len); return (NULL); } - if (sysctl(name, 4, kkstp, &len, NULL, 0) == -1) { + if (sysctl(name, nitems(name), kkstp, &len, NULL, 0) == -1) { warn("sysctl: kern.proc.pid: %d", pid); free(kkstp); return (NULL); From owner-svn-src-head@freebsd.org Mon Jan 9 00:55:12 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 01E91CA2E8E; Mon, 9 Jan 2017 00:55:12 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: from mail-pg0-x241.google.com (mail-pg0-x241.google.com [IPv6:2607:f8b0:400e:c05::241]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id C39FF1976; Mon, 9 Jan 2017 00:55:11 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: by mail-pg0-x241.google.com with SMTP id 204so3225617pge.2; Sun, 08 Jan 2017 16:55:11 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:mime-version:from:in-reply-to:date:cc:message-id:references :to; bh=UCvEM8p/an/UFcmw4sPGffZ7/Bjf+7pCm5gdIHhe4rQ=; b=R8GS75GW0FYNrpBSqfdrvukQvuEJW2moduYxgvb7ldrpQ0A40WL2js6CgwSrQeiW5t 3rJpb9zfR/YgHwmk2zc0iLk64GfYJ/J6C/Qoz+kH2lzWrYGQ3QaP+ekG4t/XN6xWEWwJ 4VIHmqkxXYxBZBc2efLMtk5f3cdfXZE9xSVZK/Db4qebqX7GRpfFFDhi1BiWF6uNKlES 7B421pc+cYQjXpUfOitRw5ksqvitMxY+Bw+fyn6WxDFRgmQuTVMmwrZxzolqLIYAfS8c DULcy5ABgqMPcY4AH1evQMcKqec3PGvrPv+Xntb85p7nJrvywAd2Ixg15k975my7hYEL N0Mg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:mime-version:from:in-reply-to:date:cc :message-id:references:to; bh=UCvEM8p/an/UFcmw4sPGffZ7/Bjf+7pCm5gdIHhe4rQ=; b=eBj2M4f4P/FOVpin1C9YDURMB/OSJJ8zJ055VEun2mJXBVN3VTkZWyBdlL6rhiT6hc Av5nmwUgvb1pcvhvapHlJRK5mP1b/e7d7MRl2qsX8zScyOo53EVGw6Edm0CeK14sspWX XG8XMRVSZ/ArbJ2ulTanSoApfvdNGoVXjA1KQRMgtJQUeF57k/d3ND1gJ6gsXXjeHBvc FLmicstNoXo07+qOws3/HmX0ItsVdg+/EvcbMLBIU7/K+hqlq2Xx7LvXYi7eCWT++wGV IOnJbVc0IZEh29elaEp7k77BQCcOWyRitly4SYQFu6OHxqV10tsqbPz5d9SGY3CKyD+m FwJQ== X-Gm-Message-State: AIkVDXLhycA6FnCQU8sI5ciAq8l6t9bCyGuawqeQHHgOfUP9jwbk56vGg9KT/AMVUWBO6w== X-Received: by 10.99.152.10 with SMTP id q10mr158462766pgd.106.1483923311132; Sun, 08 Jan 2017 16:55:11 -0800 (PST) Received: from [192.168.20.12] (c-73-19-52-228.hsd1.wa.comcast.net. [73.19.52.228]) by smtp.gmail.com with ESMTPSA id o1sm175408399pgf.35.2017.01.08.16.55.10 (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sun, 08 Jan 2017 16:55:10 -0800 (PST) Subject: Re: svn commit: r311715 - head/lib/libprocstat Mime-Version: 1.0 (Mac OS X Mail 9.3 \(3124\)) Content-Type: multipart/signed; boundary="Apple-Mail=_D5226151-598D-4ACB-890C-557BE980343F"; protocol="application/pgp-signature"; micalg=pgp-sha512 X-Pgp-Agent: GPGMail From: "Ngie Cooper (yaneurabeya)" In-Reply-To: <201701090054.v090sIQV080893@repo.freebsd.org> Date: Sun, 8 Jan 2017 16:55:06 -0800 Cc: src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Message-Id: <6FCB0545-5369-48E7-959B-9A4FB29FA4D7@gmail.com> References: <201701090054.v090sIQV080893@repo.freebsd.org> To: Ngie Cooper X-Mailer: Apple Mail (2.3124) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 09 Jan 2017 00:55:12 -0000 --Apple-Mail=_D5226151-598D-4ACB-890C-557BE980343F Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=us-ascii > On Jan 8, 2017, at 16:54, Ngie Cooper wrote: > > Author: ngie > Date: Mon Jan 9 00:54:18 2017 > New Revision: 311715 > URL: https://svnweb.freebsd.org/changeset/base/311715 > > Log: > Use nitems({mib,name}) instead of hardcoding their value *value -> length --Apple-Mail=_D5226151-598D-4ACB-890C-557BE980343F 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 iQIcBAEBCgAGBQJYct9tAAoJEPWDqSZpMIYVszkP/16mkGO3jif2uVcTyjxFqpep 64i94OMveM9Cs0gKS7DXRmAN3mCCb7up/R9eITtDwbZxjei0AdpwoWe4L6JJIdnP ogs2oLomgN7a8j7E83O81+a1MsXwlpEDiw1LmsdEGB9SbcQjzYTh3zq9LdjZKDUV uBpZt6f9Hf3A60EW+TfxNhIsSBprxpy5ms7WynLkuWg33aXkY65zYy4FtzuVndP6 Ll0z1qxtyiIy2w8R2HL371XaeztAGrG/FjQrIYh/VP/EASHgNksiCXV8i5nYVADo biFtS+Q9zdbAsakf+OJYQfIPDinqaGI9zHJARtMkupC2nPR+VevK6NXkzaqpQOR9 7yxoo79ag0Bze99r6AV6l1c/ew6AI8LJyNzKhgg+ugbEayb6PhT7A7yz2RRRJFH0 DS3Vs9b8hTUsv/pC+pWTuj47X//ql1IWeqPThLlO53Mumh09pd/xK//UmHl6WFrO 94odOtDcsA+oi+1T2lZ/H/YwfTG4lEfWFZLml+0VLDUmRCPMhD7YGV6s2ju7yabO zD0FcT1VUAYBnZzf2R/R5Uy7aQNXgrrK3fOlLexF4nVThSr+4tfAnNfq8gSxSR7q 4Fg04jA8vrW/t95bo94cIA7iN7VJEeXV+jD69Lj4oXRjo6oqal0TYzLkjK7+vuQ/ sIJEijJzM0lVbwr0fHK2 =zs3Y -----END PGP SIGNATURE----- --Apple-Mail=_D5226151-598D-4ACB-890C-557BE980343F-- From owner-svn-src-head@freebsd.org Mon Jan 9 01:15:19 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id BDA72CA5AA7; Mon, 9 Jan 2017 01:15:19 +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 9817D118A; Mon, 9 Jan 2017 01:15:19 +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 v091FI7j089712; Mon, 9 Jan 2017 01:15:18 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v091FIcu089710; Mon, 9 Jan 2017 01:15:18 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201701090115.v091FIcu089710@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Mon, 9 Jan 2017 01:15:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r311727 - 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-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 09 Jan 2017 01:15:19 -0000 Author: ian Date: Mon Jan 9 01:15:18 2017 New Revision: 311727 URL: https://svnweb.freebsd.org/changeset/base/311727 Log: Add support for non-removable media, and a quirk to use polling to detect card insert/remove events on controllers that don't implement the insert and remove interrupts. Bridge drivers can set a new slot option, SDHCI_NON_REMOVABLE, to indicate non-removable media (such as eMMC). The sdhci driver will not enable insert/remove interrupts, and sdhci_generic_get_card_present() will always return true. Bridge drivers can set a new quirk, SDHCI_QUIRK_POLL_CARD_PRESENT, and the sdhci driver will not enable insert/remove interrupts, and instead will use a callout to poll the card-present status at 5 Hz. For bridge drivers that get notified of card insert/remove via gpio interrupts, there is a new sdhci_handle_card_present() function they can call from the gpio interrupt handler to inform the sdhci code of the event. In addition to adding these new features, the existing code to debounce card insertions was updated to use taskqueue_enqueue_timeout() instead of scheduling a callout to do the taskqueue_enqueue(). There is also now a comment explaining that insertion-debounce is what's going on -- it took me a long time to realize that's what the old sdhci_card_delay() routine was really doing. There is no functional difference between the old and new debounce code (I hope!). Modified: head/sys/dev/sdhci/sdhci.c head/sys/dev/sdhci/sdhci.h Modified: head/sys/dev/sdhci/sdhci.c ============================================================================== --- head/sys/dev/sdhci/sdhci.c Mon Jan 9 01:12:34 2017 (r311726) +++ head/sys/dev/sdhci/sdhci.c Mon Jan 9 01:15:18 2017 (r311727) @@ -73,6 +73,7 @@ static void sdhci_set_clock(struct sdhci static void sdhci_start(struct sdhci_slot *slot); static void sdhci_start_data(struct sdhci_slot *slot, struct mmc_data *data); +static void sdhci_card_poll(void *); static void sdhci_card_task(void *, int); /* helper routines */ @@ -89,6 +90,9 @@ static void sdhci_card_task(void *, int) #define SDHCI_200_MAX_DIVIDER 256 #define SDHCI_300_MAX_DIVIDER 2046 +#define SDHCI_CARD_PRESENT_TICKS (hz / 5) +#define SDHCI_INSERT_DELAY_TICKS (hz / 2) + /* * Broadcom BCM577xx Controller Constants */ @@ -229,10 +233,15 @@ sdhci_init(struct sdhci_slot *slot) slot->intmask = SDHCI_INT_BUS_POWER | SDHCI_INT_DATA_END_BIT | SDHCI_INT_DATA_CRC | SDHCI_INT_DATA_TIMEOUT | SDHCI_INT_INDEX | SDHCI_INT_END_BIT | SDHCI_INT_CRC | SDHCI_INT_TIMEOUT | - SDHCI_INT_CARD_REMOVE | SDHCI_INT_CARD_INSERT | SDHCI_INT_DATA_AVAIL | SDHCI_INT_SPACE_AVAIL | SDHCI_INT_DMA_END | SDHCI_INT_DATA_END | SDHCI_INT_RESPONSE | SDHCI_INT_ACMD12ERR; + + if (!(slot->quirks & SDHCI_QUIRK_POLL_CARD_PRESENT) && + !(slot->opt & SDHCI_NON_REMOVABLE)) { + slot->intmask |= SDHCI_INT_CARD_REMOVE | SDHCI_INT_CARD_INSERT; + } + WR4(slot, SDHCI_INT_ENABLE, slot->intmask); WR4(slot, SDHCI_SIGNAL_ENABLE, slot->intmask); } @@ -474,14 +483,6 @@ sdhci_transfer_pio(struct sdhci_slot *sl } } -static void -sdhci_card_delay(void *arg) -{ - struct sdhci_slot *slot = arg; - - taskqueue_enqueue(taskqueue_swi_giant, &slot->card_task); -} - static void sdhci_card_task(void *arg, int pending) { @@ -491,6 +492,8 @@ sdhci_card_task(void *arg, int pending) if (SDHCI_GET_CARD_PRESENT(slot->bus, slot)) { if (slot->dev == NULL) { /* If card is present - attach mmc bus. */ + if (bootverbose || sdhci_debug) + slot_printf(slot, "Card inserted\n"); slot->dev = device_add_child(slot->bus, "mmc", -1); device_set_ivars(slot->dev, slot); SDHCI_UNLOCK(slot); @@ -500,6 +503,8 @@ sdhci_card_task(void *arg, int pending) } else { if (slot->dev != NULL) { /* If no card present - detach mmc bus. */ + if (bootverbose || sdhci_debug) + slot_printf(slot, "Card removed\n"); device_t d = slot->dev; slot->dev = NULL; SDHCI_UNLOCK(slot); @@ -509,6 +514,44 @@ sdhci_card_task(void *arg, int pending) } } +void +sdhci_handle_card_present(struct sdhci_slot *slot, bool is_present) +{ + bool was_present; + + /* + * If there was no card and now there is one, schedule the task to + * create the child device after a short delay. The delay is to + * debounce the card insert (sometimes the card detect pin stabilizes + * before the other pins have made good contact). + * + * If there was a card present and now it's gone, immediately schedule + * the task to delete the child device. No debouncing -- gone is gone, + * because once power is removed, a full card re-init is needed, and + * that happens by deleting and recreating the child device. + */ + SDHCI_LOCK(slot); + was_present = slot->dev != NULL; + if (!was_present && is_present) { + taskqueue_enqueue_timeout(taskqueue_swi_giant, + &slot->card_delayed_task, -SDHCI_INSERT_DELAY_TICKS); + } else if (was_present && !is_present) { + taskqueue_enqueue(taskqueue_swi_giant, &slot->card_task); + } + SDHCI_UNLOCK(slot); +} + +static void +sdhci_card_poll(void *arg) +{ + struct sdhci_slot *slot = arg; + + sdhci_handle_card_present(slot, + SDHCI_GET_CARD_PRESENT(slot->bus, slot)); + callout_reset(&slot->card_poll_callout, SDHCI_CARD_PRESENT_TICKS, + sdhci_card_poll, slot); +} + int sdhci_init_slot(device_t dev, struct sdhci_slot *slot, int num) { @@ -652,9 +695,17 @@ sdhci_init_slot(device_t dev, struct sdh "timeout", CTLFLAG_RW, &slot->timeout, 0, "Maximum timeout for SDHCI transfers (in secs)"); TASK_INIT(&slot->card_task, 0, sdhci_card_task, slot); - callout_init(&slot->card_callout, 1); + TIMEOUT_TASK_INIT(taskqueue_swi_giant, &slot->card_delayed_task, 0, + sdhci_card_task, slot); + callout_init(&slot->card_poll_callout, 1); callout_init_mtx(&slot->timeout_callout, &slot->mtx, 0); + if ((slot->quirks & SDHCI_QUIRK_POLL_CARD_PRESENT) && + !(slot->opt & SDHCI_NON_REMOVABLE)) { + callout_reset(&slot->card_poll_callout, + SDHCI_CARD_PRESENT_TICKS, sdhci_card_poll, slot); + } + return (0); } @@ -670,8 +721,9 @@ sdhci_cleanup_slot(struct sdhci_slot *sl device_t d; callout_drain(&slot->timeout_callout); - callout_drain(&slot->card_callout); + callout_drain(&slot->card_poll_callout); taskqueue_drain(taskqueue_swi_giant, &slot->card_task); + taskqueue_drain_timeout(taskqueue_swi_giant, &slot->card_delayed_task); SDHCI_LOCK(slot); d = slot->dev; @@ -721,6 +773,9 @@ bool sdhci_generic_get_card_present(device_t brdev, struct sdhci_slot *slot) { + if (slot->opt & SDHCI_NON_REMOVABLE) + return true; + return (RD4(slot, SDHCI_PRESENT_STATE) & SDHCI_CARD_PRESENT); } @@ -1326,7 +1381,7 @@ sdhci_generic_intr(struct sdhci_slot *sl /* Handle card presence interrupts. */ if (intmask & (SDHCI_INT_CARD_INSERT | SDHCI_INT_CARD_REMOVE)) { - present = SDHCI_GET_CARD_PRESENT(slot->bus, slot); + present = (intmask & SDHCI_INT_CARD_INSERT) != 0; slot->intmask &= ~(SDHCI_INT_CARD_INSERT | SDHCI_INT_CARD_REMOVE); slot->intmask |= present ? SDHCI_INT_CARD_REMOVE : @@ -1335,20 +1390,7 @@ sdhci_generic_intr(struct sdhci_slot *sl WR4(slot, SDHCI_SIGNAL_ENABLE, slot->intmask); WR4(slot, SDHCI_INT_STATUS, intmask & (SDHCI_INT_CARD_INSERT | SDHCI_INT_CARD_REMOVE)); - - if (intmask & SDHCI_INT_CARD_REMOVE) { - if (bootverbose || sdhci_debug) - slot_printf(slot, "Card removed\n"); - callout_stop(&slot->card_callout); - taskqueue_enqueue(taskqueue_swi_giant, - &slot->card_task); - } - if (intmask & SDHCI_INT_CARD_INSERT) { - if (bootverbose || sdhci_debug) - slot_printf(slot, "Card inserted\n"); - callout_reset(&slot->card_callout, hz / 2, - sdhci_card_delay, slot); - } + sdhci_handle_card_present(slot, present); intmask &= ~(SDHCI_INT_CARD_INSERT | SDHCI_INT_CARD_REMOVE); } /* Handle command interrupts. */ Modified: head/sys/dev/sdhci/sdhci.h ============================================================================== --- head/sys/dev/sdhci/sdhci.h Mon Jan 9 01:12:34 2017 (r311726) +++ head/sys/dev/sdhci/sdhci.h Mon Jan 9 01:15:18 2017 (r311727) @@ -65,6 +65,8 @@ #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) +/* Card insert/remove interrupts don't work, polling required. */ +#define SDHCI_QUIRK_POLL_CARD_PRESENT (1<<17) /* * Controller registers @@ -273,8 +275,9 @@ struct sdhci_slot { device_t dev; /* Slot device */ u_char num; /* Slot number */ u_char opt; /* Slot options */ -#define SDHCI_HAVE_DMA 1 -#define SDHCI_PLATFORM_TRANSFER 2 +#define SDHCI_HAVE_DMA 0x01 +#define SDHCI_PLATFORM_TRANSFER 0x02 +#define SDHCI_NON_REMOVABLE 0x04 u_char version; int timeout; /* Transfer timeout */ uint32_t max_clk; /* Max possible freq */ @@ -284,7 +287,9 @@ struct sdhci_slot { u_char *dmamem; bus_addr_t paddr; /* DMA buffer address */ struct task card_task; /* Card presence check task */ - struct callout card_callout; /* Card insert delay callout */ + struct timeout_task + card_delayed_task;/* Card insert delayed task */ + struct callout card_poll_callout;/* Card present polling callout */ struct callout timeout_callout;/* Card command/data response timeout */ struct mmc_host host; /* Host parameters */ struct mmc_request *req; /* Current request */ @@ -323,5 +328,6 @@ int sdhci_generic_release_host(device_t void sdhci_generic_intr(struct sdhci_slot *slot); uint32_t sdhci_generic_min_freq(device_t brdev, struct sdhci_slot *slot); bool sdhci_generic_get_card_present(device_t brdev, struct sdhci_slot *slot); +void sdhci_handle_card_present(struct sdhci_slot *slot, bool is_present); #endif /* __SDHCI_H__ */ From owner-svn-src-head@freebsd.org Mon Jan 9 01:47:01 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 67E90CA5525; Mon, 9 Jan 2017 01:47:01 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1DABF14F1; Mon, 9 Jan 2017 01:47:01 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v091l0a8002346; Mon, 9 Jan 2017 01:47:00 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v091l0fi002345; Mon, 9 Jan 2017 01:47:00 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201701090147.v091l0fi002345@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Mon, 9 Jan 2017 01:47:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r311733 - head/contrib/bsnmp/snmp_mibII X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 09 Jan 2017 01:47:01 -0000 Author: ngie Date: Mon Jan 9 01:47:00 2017 New Revision: 311733 URL: https://svnweb.freebsd.org/changeset/base/311733 Log: Use nitems(mib) instead of hardcoding mib's length when calling sysctl(3) MFC after: 3 days Modified: head/contrib/bsnmp/snmp_mibII/mibII.c Modified: head/contrib/bsnmp/snmp_mibII/mibII.c ============================================================================== --- head/contrib/bsnmp/snmp_mibII/mibII.c Mon Jan 9 01:35:33 2017 (r311732) +++ head/contrib/bsnmp/snmp_mibII/mibII.c Mon Jan 9 01:47:00 2017 (r311733) @@ -319,7 +319,7 @@ fetch_generic_mib(struct mibif *ifp, con name[5] = IFDATA_GENERAL; len = sizeof(ifp->mib); - if (sysctl(name, 6, &ifp->mib, &len, NULL, 0) == -1) { + if (sysctl(name, nitems(name), &ifp->mib, &len, NULL, 0) == -1) { if (errno != ENOENT) syslog(LOG_WARNING, "sysctl(ifmib, %s) failed %m", ifp->name); @@ -480,7 +480,7 @@ mib_fetch_ifmib(struct mibif *ifp) name[3] = IFMIB_IFDATA; name[4] = ifp->sysindex; name[5] = IFDATA_LINKSPECIFIC; - if (sysctl(name, 6, NULL, &len, NULL, 0) == -1) { + if (sysctl(name, nitems(name), NULL, &len, NULL, 0) == -1) { syslog(LOG_WARNING, "sysctl linkmib estimate (%s): %m", ifp->name); if (ifp->specmib != NULL) { @@ -506,7 +506,7 @@ mib_fetch_ifmib(struct mibif *ifp) ifp->specmib = newmib; ifp->specmiblen = len; } - if (sysctl(name, 6, ifp->specmib, &len, NULL, 0) == -1) { + if (sysctl(name, nitems(name), ifp->specmib, &len, NULL, 0) == -1) { syslog(LOG_WARNING, "sysctl linkmib (%s): %m", ifp->name); if (ifp->specmib != NULL) { ifp->specmib = NULL; @@ -902,7 +902,7 @@ mib_refresh_iflist(void) for (idx = 1; idx <= count; idx++) { name[4] = idx; len = sizeof(mib); - if (sysctl(name, 6, &mib, &len, NULL, 0) == -1) { + if (sysctl(name, nitems(name), &mib, &len, NULL, 0) == -1) { if (errno == ENOENT) continue; syslog(LOG_ERR, "ifmib(%u): %m", idx); @@ -1213,7 +1213,7 @@ mib_fetch_rtab(int af, int info, int arg *lenp = 0; /* initial estimate */ - if (sysctl(name, 6, NULL, lenp, NULL, 0) == -1) { + if (sysctl(name, nitems(name), NULL, lenp, NULL, 0) == -1) { syslog(LOG_ERR, "sysctl estimate (%d,%d,%d,%d,%d,%d): %m", name[0], name[1], name[2], name[3], name[4], name[5]); return (NULL); @@ -1230,7 +1230,7 @@ mib_fetch_rtab(int af, int info, int arg } buf = newbuf; - if (sysctl(name, 6, buf, lenp, NULL, 0) == 0) + if (sysctl(name, nitems(name), buf, lenp, NULL, 0) == 0) break; if (errno != ENOMEM) { From owner-svn-src-head@freebsd.org Mon Jan 9 01:54:37 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D5DC2CA5868; Mon, 9 Jan 2017 01:54:37 +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 AF73A1B03; Mon, 9 Jan 2017 01:54:37 +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 v091sa8o006234; Mon, 9 Jan 2017 01:54:36 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v091saIa006231; Mon, 9 Jan 2017 01:54:36 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201701090154.v091saIa006231@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Mon, 9 Jan 2017 01:54:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r311734 - in head/sys: conf 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-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 09 Jan 2017 01:54:37 -0000 Author: ian Date: Mon Jan 9 01:54:36 2017 New Revision: 311734 URL: https://svnweb.freebsd.org/changeset/base/311734 Log: Add new helper routines for sdhci bridge drivers that use gpio pins for card presence and write protect switch detection. A bridge driver just needs to call the setup routine in its attach(), the teardown in its detach(), and write a couple tiny glue functions to connect the sdhci interface functions to the new helper functions. This is not extensively documented, but multiple examples will exist real soon. Added: head/sys/dev/sdhci/sdhci_fdt_gpio.c (contents, props changed) head/sys/dev/sdhci/sdhci_fdt_gpio.h (contents, props changed) Modified: head/sys/conf/files Modified: head/sys/conf/files ============================================================================== --- head/sys/conf/files Mon Jan 9 01:47:00 2017 (r311733) +++ head/sys/conf/files Mon Jan 9 01:54:36 2017 (r311734) @@ -2824,6 +2824,7 @@ dev/scc/scc_dev_quicc.c optional scc qu dev/scc/scc_dev_sab82532.c optional scc dev/scc/scc_dev_z8530.c optional scc dev/sdhci/sdhci.c optional sdhci +dev/sdhci/sdhci_fdt_gpio.c optional sdhci fdt gpio dev/sdhci/sdhci_if.m optional sdhci dev/sdhci/sdhci_pci.c optional sdhci pci dev/sf/if_sf.c optional sf pci Added: head/sys/dev/sdhci/sdhci_fdt_gpio.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/dev/sdhci/sdhci_fdt_gpio.c Mon Jan 9 01:54:36 2017 (r311734) @@ -0,0 +1,256 @@ +/*- + * Copyright (c) 2017 Ian Lepore + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +/* + * Support routines usable by any SoC sdhci bridge driver that uses gpio pins + * for card detect and write protect, and uses FDT data to describe those pins. + */ + +#include +__FBSDID("$FreeBSD$"); + +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include + +struct sdhci_fdt_gpio { + device_t dev; + struct sdhci_slot * slot; + gpio_pin_t wp_pin; + gpio_pin_t cd_pin; + void * cd_ihandler; + struct resource * cd_ires; + int cd_irid; + bool wp_disabled; + bool wp_inverted; + bool cd_disabled; + bool cd_inverted; +}; + +/* + * Card detect interrupt handler. + */ +static void +cd_intr(void *arg) +{ + struct sdhci_fdt_gpio *gpio = arg; + + sdhci_handle_card_present(gpio->slot, sdhci_fdt_gpio_get_present(gpio)); +} + +/* + * Card detect setup. + */ +static void +cd_setup(struct sdhci_fdt_gpio *gpio, phandle_t node) +{ + int pincaps; + device_t dev; + const char *cd_mode_str; + + dev = gpio->dev; + + /* + * If the device is flagged as non-removable, set that slot option, and + * set a flag to make sdhci_fdt_gpio_get_present() always return true. + */ + if (OF_hasprop(node, "non-removable")) { + gpio->slot->opt |= SDHCI_NON_REMOVABLE; + gpio->cd_disabled = true; + if (bootverbose) + device_printf(dev, "Non-removable media"); + return; + } + + /* + * If there is no cd-gpios property, then presumably the hardware + * PRESENT_STATE register and interrupts will reflect card state + * properly, and there's nothing more for us to do. Our get_present() + * will return sdhci_generic_get_card_present() because cd_pin is NULL. + * + * If there is a property, make sure we can read the pin. + */ + if (gpio_pin_get_by_ofw_property(dev, node, "cd-gpios", &gpio->cd_pin)) + return; + + if (gpio_pin_getcaps(gpio->cd_pin, &pincaps) != 0 || + !(pincaps & GPIO_PIN_INPUT)) { + device_printf(dev, "Cannot read card-detect gpio pin; " + "setting card-always-present flag.\n"); + gpio->cd_disabled = true; + return; + } + + if (OF_hasprop(node, "cd-inverted")) + gpio->cd_inverted = true; + + /* + * If the pin can trigger an interrupt on both rising and falling edges, + * we can use it to detect card presence changes. If not, we'll request + * card presence polling instead of using interrupts. + */ + if (!(pincaps & GPIO_INTR_EDGE_BOTH)) { + if (bootverbose) + device_printf(dev, "Cannot configure " + "GPIO_INTR_EDGE_BOTH for card detect\n"); + goto without_interrupts; + } + + /* + * Create an interrupt resource from the pin and set up the interrupt. + */ + if ((gpio->cd_ires = gpio_alloc_intr_resource(dev, &gpio->cd_irid, + RF_ACTIVE, gpio->cd_pin, GPIO_INTR_EDGE_BOTH)) == NULL) { + if (bootverbose) + device_printf(dev, "Cannot allocate an IRQ for card " + "detect GPIO\n"); + goto without_interrupts; + } + + if (bus_setup_intr(dev, gpio->cd_ires, INTR_TYPE_BIO | INTR_MPSAFE, + NULL, cd_intr, gpio, &gpio->cd_ihandler) != 0) { + device_printf(dev, "Unable to setup card-detect irq handler\n"); + gpio->cd_ihandler = NULL; + goto without_interrupts; + } + +without_interrupts: + + /* + * If we have a readable gpio pin, but didn't successfully configure + * gpio interrupts, ask the sdhci driver to poll from a callout. + */ + if (gpio->cd_ihandler == NULL) { + cd_mode_str = "polling"; + gpio->slot->quirks |= SDHCI_QUIRK_POLL_CARD_PRESENT; + } else { + cd_mode_str = "interrupts"; + } + + if (bootverbose) { + device_printf(dev, "Card presence detect on %s pin %u, " + "configured for %s.\n", + device_get_nameunit(gpio->cd_pin->dev), gpio->cd_pin->pin, + cd_mode_str); + } +} + +/* + * Write protect setup. + */ +static void +wp_setup(struct sdhci_fdt_gpio *gpio, phandle_t node) +{ + device_t dev; + + dev = gpio->dev; + + if (OF_hasprop(node, "wp-disable")) + return; + + if (gpio_pin_get_by_ofw_property(dev, node, "wp-gpios", &gpio->wp_pin)) + return; + + if (OF_hasprop(node, "wp-inverted")) + gpio->wp_inverted = true; + + if (bootverbose) + device_printf(dev, "Write protect switch on %s pin %u\n", + device_get_nameunit(gpio->cd_pin->dev), gpio->cd_pin->pin); +} + +struct sdhci_fdt_gpio * +sdhci_fdt_gpio_setup(device_t dev, struct sdhci_slot *slot) +{ + phandle_t node; + struct sdhci_fdt_gpio *gpio; + + gpio = malloc(sizeof(*gpio), M_DEVBUF, M_ZERO | M_WAITOK); + gpio->dev = dev; + gpio->slot = slot; + + node = ofw_bus_get_node(dev); + + wp_setup(gpio, node); + cd_setup(gpio, node); + + return (gpio); +} + +void +sdhci_fdt_gpio_teardown(struct sdhci_fdt_gpio *gpio) +{ + + if (gpio == NULL) + return; + + if (gpio->cd_ihandler != NULL) { + bus_teardown_intr(gpio->dev, gpio->cd_ires, gpio->cd_ihandler); + } + + free(gpio, M_DEVBUF); +} + +bool +sdhci_fdt_gpio_get_present(struct sdhci_fdt_gpio *gpio) +{ + bool pinstate; + + if (gpio->cd_disabled) + return (true); + + if (gpio->cd_pin == NULL) + return (sdhci_generic_get_card_present(gpio->slot->bus, + gpio->slot)); + + gpio_pin_is_active(gpio->cd_pin, &pinstate); + + return (pinstate ^ gpio->cd_inverted); +} + +int +sdhci_fdt_gpio_get_readonly(struct sdhci_fdt_gpio *gpio) +{ + bool pinstate; + + if (gpio->wp_disabled) + return (false); + + if (gpio->wp_pin == NULL) + return (sdhci_generic_get_ro(gpio->slot->bus, gpio->slot->dev)); + + gpio_pin_is_active(gpio->wp_pin, &pinstate); + + return (pinstate ^ gpio->wp_inverted); +} Added: head/sys/dev/sdhci/sdhci_fdt_gpio.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/dev/sdhci/sdhci_fdt_gpio.h Mon Jan 9 01:54:36 2017 (r311734) @@ -0,0 +1,69 @@ +/*- + * Copyright (c) 2017 Ian Lepore + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * $FreeBSD$ + */ + +/* + * Support routines usable by any SoC sdhci bridge driver that uses gpio pins + * for card detect and/or write protect, and uses FDT data to describe those + * pins. A bridge driver need only supply a couple 2-line forwarding functions + * to connect the get_present and get_readonly accessors to the corresponding + * driver interface functions, and add setup/teardown calls to its attach and + * detach functions. + */ + +#ifndef _SDHCI_FDT_GPIO_H_ +#define _SDHCI_FDT_GPIO_H_ + +struct sdhci_slot; +struct sdhci_fdt_gpio; + +/* + * sdhci_fdt_gpio_setup() + * sdhci_fdt_gpio_teardown() + * + * Process FDT properties that use gpio pins and set up interrupt handling (if + * supported by hardware) and accessor functions to read the pins. + * + * Setup cannot fail. If the properties are not present, the accessors will + * return the values from standard sdhci registers. If the gpio controller + * can't trigger interrupts on both edges, it configures the slot to use polling + * for card presence detection. If it can't access the gpio pin at all it sets + * up the get_present() accessor to always return true. Likewise the + * get_readonly() accessor always returns false if its pin can't be accessed. + */ +struct sdhci_fdt_gpio *sdhci_fdt_gpio_setup(device_t dev, struct sdhci_slot *slot); +void sdhci_fdt_gpio_teardown(struct sdhci_fdt_gpio *gpio); + +/* + * sdhci_fdt_gpio_get_present() + * sdhci_fdt_gpio_get_readonly() + * + * Gpio pin state accessor functions. + */ +bool sdhci_fdt_gpio_get_present(struct sdhci_fdt_gpio *gpio); +int sdhci_fdt_gpio_get_readonly(struct sdhci_fdt_gpio *gpio); + +#endif From owner-svn-src-head@freebsd.org Mon Jan 9 01:57:52 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E6005CA59CB; Mon, 9 Jan 2017 01:57:52 +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 A6C621CC2; Mon, 9 Jan 2017 01:57:52 +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 v091vpVe006409; Mon, 9 Jan 2017 01:57:51 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v091vpV0006408; Mon, 9 Jan 2017 01:57:51 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201701090157.v091vpV0006408@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Mon, 9 Jan 2017 01:57:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r311735 - head/sys/arm/ti X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 09 Jan 2017 01:57:53 -0000 Author: ian Date: Mon Jan 9 01:57:51 2017 New Revision: 311735 URL: https://svnweb.freebsd.org/changeset/base/311735 Log: Use the new sdhci_fdt_gpio helper functions to add full support for FDT gpio pins for detecting card insert/remove and write protect. Modified: head/sys/arm/ti/ti_sdhci.c Modified: head/sys/arm/ti/ti_sdhci.c ============================================================================== --- head/sys/arm/ti/ti_sdhci.c Mon Jan 9 01:54:36 2017 (r311734) +++ head/sys/arm/ti/ti_sdhci.c Mon Jan 9 01:57:51 2017 (r311735) @@ -52,6 +52,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include "sdhci_if.h" #include @@ -61,7 +62,7 @@ __FBSDID("$FreeBSD$"); struct ti_sdhci_softc { device_t dev; - device_t gpio_dev; + struct sdhci_fdt_gpio * gpio; struct resource * mem_res; struct resource * irq_res; void * intr_cookie; @@ -362,20 +363,24 @@ static int ti_sdhci_get_ro(device_t brdev, device_t reqdev) { struct ti_sdhci_softc *sc = device_get_softc(brdev); - unsigned int readonly = 0; - /* If a gpio pin is configured, read it. */ - if (sc->gpio_dev != NULL) { - GPIO_PIN_GET(sc->gpio_dev, sc->wp_gpio_pin, &readonly); - } + return (sdhci_fdt_gpio_get_readonly(sc->gpio)); +} - return (readonly); +static bool +ti_sdhci_get_card_present(device_t dev, struct sdhci_slot *slot) +{ + struct ti_sdhci_softc *sc = device_get_softc(dev); + + return (sdhci_fdt_gpio_get_present(sc->gpio)); } static int ti_sdhci_detach(device_t dev) { + /* sdhci_fdt_gpio_teardown(sc->gpio); */ + return (EBUSY); } @@ -502,25 +507,6 @@ ti_sdhci_attach(device_t dev) } /* - * See if we've got a GPIO-based write detect pin. This is not the - * standard documented property for this, we added it in freebsd. - */ - if ((OF_getencprop(node, "mmchs-wp-gpio-pin", &prop, sizeof(prop))) <= 0) - sc->wp_gpio_pin = 0xffffffff; - else - sc->wp_gpio_pin = prop; - - if (sc->wp_gpio_pin != 0xffffffff) { - sc->gpio_dev = devclass_get_device(devclass_find("gpio"), 0); - if (sc->gpio_dev == NULL) - device_printf(dev, "Error: No GPIO device, " - "Write Protect pin will not function\n"); - else - GPIO_PIN_SETFLAGS(sc->gpio_dev, sc->wp_gpio_pin, - GPIO_PIN_INPUT); - } - - /* * Set the offset from the device's memory start to the MMCHS registers. * Also for OMAP4 disable high speed mode due to erratum ID i626. */ @@ -572,6 +558,8 @@ ti_sdhci_attach(device_t dev) goto fail; } + sc->gpio = sdhci_fdt_gpio_setup(sc->dev, &sc->slot); + /* Initialise the MMCHS hardware. */ ti_sdhci_hw_init(dev); @@ -706,6 +694,7 @@ static device_method_t ti_sdhci_methods[ DEVMETHOD(sdhci_write_2, ti_sdhci_write_2), DEVMETHOD(sdhci_write_4, ti_sdhci_write_4), DEVMETHOD(sdhci_write_multi_4, ti_sdhci_write_multi_4), + DEVMETHOD(sdhci_get_card_present, ti_sdhci_get_card_present), DEVMETHOD_END }; From owner-svn-src-head@freebsd.org Mon Jan 9 02:04:55 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id BB1D0CA5C82; Mon, 9 Jan 2017 02:04:55 +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 97A6A1101; Mon, 9 Jan 2017 02:04:55 +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 v0924s6J010382; Mon, 9 Jan 2017 02:04:54 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v0924sAV010381; Mon, 9 Jan 2017 02:04:54 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201701090204.v0924sAV010381@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Mon, 9 Jan 2017 02:04:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r311736 - 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-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 09 Jan 2017 02:04:55 -0000 Author: ian Date: Mon Jan 9 02:04:54 2017 New Revision: 311736 URL: https://svnweb.freebsd.org/changeset/base/311736 Log: Use the new sdhci_fdt_gpio helper functions to add full support for FDT gpio pins for detecting card insert/remove and write protect. Modified: head/sys/dev/sdhci/fsl_sdhci.c Modified: head/sys/dev/sdhci/fsl_sdhci.c ============================================================================== --- head/sys/dev/sdhci/fsl_sdhci.c Mon Jan 9 01:57:51 2017 (r311735) +++ head/sys/dev/sdhci/fsl_sdhci.c Mon Jan 9 02:04:54 2017 (r311736) @@ -59,6 +59,7 @@ __FBSDID("$FreeBSD$"); #include #endif +#include #include #include @@ -67,6 +68,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include "sdhci_if.h" struct fsl_sdhci_softc { @@ -77,10 +79,10 @@ struct fsl_sdhci_softc { struct sdhci_slot slot; struct callout r1bfix_callout; sbintime_t r1bfix_timeout_at; + struct sdhci_fdt_gpio * gpio; uint32_t baseclk_hz; uint32_t cmd_and_mode; uint32_t r1bfix_intmask; - boolean_t force_card_present; uint16_t sdclockreg_freq_bits; uint8_t r1bfix_type; uint8_t hwtype; @@ -345,8 +347,6 @@ fsl_sdhci_read_4(device_t dev, struct sd val32 &= 0x000F0F07; val32 |= (wrk32 >> 4) & SDHCI_STATE_DAT_MASK; val32 |= (wrk32 >> 9) & SDHCI_RETUNE_REQUEST; - if (sc->force_card_present) - val32 |= SDHCI_CARD_PRESENT; return (val32); } @@ -752,9 +752,15 @@ fsl_sdhci_get_ro(device_t bus, device_t { struct fsl_sdhci_softc *sc = device_get_softc(bus); - if (RD4(sc, SDHCI_PRESENT_STATE) & SDHC_PRES_WPSPL) - return (false); - return (true); + return (sdhci_fdt_gpio_get_readonly(sc->gpio)); +} + +static bool +fsl_sdhci_get_card_present(device_t dev, struct sdhci_slot *slot) +{ + struct fsl_sdhci_softc *sc = device_get_softc(dev); + + return (sdhci_fdt_gpio_get_present(sc->gpio)); } #ifdef __powerpc__ @@ -802,6 +808,7 @@ static int fsl_sdhci_detach(device_t dev) { + /* sdhci_fdt_gpio_teardown(sc->gpio); */ return (EBUSY); } @@ -810,8 +817,8 @@ fsl_sdhci_attach(device_t dev) { struct fsl_sdhci_softc *sc = device_get_softc(dev); int rid, err; - phandle_t node; #ifdef __powerpc__ + phandle_t node; uint32_t protctl; #endif @@ -887,24 +894,13 @@ fsl_sdhci_attach(device_t dev) sc->slot.max_clk = sc->baseclk_hz; /* - * If the slot is flagged with the non-removable property, set our flag - * to always force the SDHCI_CARD_PRESENT bit on. - * - * XXX Workaround for gpio-based card detect... - * - * We don't have gpio support yet. If there's a cd-gpios property just - * force the SDHCI_CARD_PRESENT bit on for now. If there isn't really a - * card there it will fail to probe at the mmc layer and nothing bad - * happens except instantiating an mmcN device for an empty slot. + * Set up any gpio pin handling described in the FDT data. This cannot + * fail; see comments in sdhci_fdt_gpio.h for details. */ - node = ofw_bus_get_node(dev); - if (OF_hasprop(node, "non-removable")) - sc->force_card_present = true; - else if (OF_hasprop(node, "cd-gpios")) { - /* XXX put real gpio hookup here. */ - sc->force_card_present = true; - } + sc->gpio = sdhci_fdt_gpio_setup(dev, &sc->slot); + #ifdef __powerpc__ + node = ofw_bus_get_node(dev); /* Default to big-endian on powerpc */ protctl = RD4(sc, SDHC_PROT_CTRL); protctl &= ~SDHC_PROT_EMODE_MASK; @@ -974,7 +970,7 @@ static device_method_t fsl_sdhci_methods DEVMETHOD(mmcbr_acquire_host, sdhci_generic_acquire_host), DEVMETHOD(mmcbr_release_host, sdhci_generic_release_host), - /* SDHCI registers accessors */ + /* SDHCI accessors */ DEVMETHOD(sdhci_read_1, fsl_sdhci_read_1), DEVMETHOD(sdhci_read_2, fsl_sdhci_read_2), DEVMETHOD(sdhci_read_4, fsl_sdhci_read_4), @@ -983,6 +979,7 @@ static device_method_t fsl_sdhci_methods DEVMETHOD(sdhci_write_2, fsl_sdhci_write_2), DEVMETHOD(sdhci_write_4, fsl_sdhci_write_4), DEVMETHOD(sdhci_write_multi_4, fsl_sdhci_write_multi_4), + DEVMETHOD(sdhci_get_card_present,fsl_sdhci_get_card_present), { 0, 0 } }; From owner-svn-src-head@freebsd.org Mon Jan 9 02:24:01 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 96712CA0466; Mon, 9 Jan 2017 02:24:01 +0000 (UTC) (envelope-from jbeich@freebsd.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2610:1c1:1:6074::16:84]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "freefall.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 7B9F41A90; Mon, 9 Jan 2017 02:24:01 +0000 (UTC) (envelope-from jbeich@freebsd.org) Received: by freefall.freebsd.org (Postfix, from userid 1354) id D7E72487A; Mon, 9 Jan 2017 02:24:00 +0000 (UTC) To: cem@FreeBSD.org, src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r311667 - in head/sys/contrib/dev/acpica: components/namespace components/tables include In-Reply-To: <201701080626.v086QXDx022252@repo.freebsd.org> Message-Id: <20170109022400.D7E72487A@freefall.freebsd.org> Date: Mon, 9 Jan 2017 02:24:00 +0000 (UTC) From: jbeich@freebsd.org (Jan Beich) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 09 Jan 2017 02:24:01 -0000 "Conrad E. Meyer" writes: > +++ head/sys/contrib/dev/acpica/components/tables/tbxface.c Sun Jan 8 06:26:33 2017 (r311667) > @@ -314,11 +314,12 @@ ACPI_EXPORT_SYMBOL (AcpiGetTableHeader) > > /******************************************************************************* > * > - * FUNCTION: AcpiGetTable > + * FUNCTION: AcpiGetTableWithSize > * > * PARAMETERS: Signature - ACPI signature of needed table > * Instance - Which instance (for SSDTs) > * OutTable - Where the pointer to the table is returned > + * TblSize - Size of the table > * > * RETURN: Status and pointer to the requested table > * > @@ -333,10 +334,11 @@ ACPI_EXPORT_SYMBOL (AcpiGetTableHeader) > ******************************************************************************/ > > ACPI_STATUS > -AcpiGetTable ( > +AcpiGetTableWithSize ( Can you adjust ACPI_EXPORT_SYMBOL() as well? It doesn't make sense to export AcpiGetTable() twice but compiler won't complain if you do. From owner-svn-src-head@freebsd.org Mon Jan 9 02:25:20 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id CF1E7CA0502; Mon, 9 Jan 2017 02:25:20 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: from mail-pf0-x243.google.com (mail-pf0-x243.google.com [IPv6:2607:f8b0:400e:c00::243]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 9BBA11C31; Mon, 9 Jan 2017 02:25:20 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: by mail-pf0-x243.google.com with SMTP id f144so4517400pfa.2; Sun, 08 Jan 2017 18:25:20 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:mime-version:from:in-reply-to:date:cc:message-id:references :to; bh=15WxPo2dFa02BLg/iHtPHYChOXVKFb6fa5djohrPJVc=; b=MXJX8Ctg/6elx27c1IkGG2cpTDqUk/hAT7s2mJG2JKBcjn1BlApblICSem9jLVndIY hR8Q4KYbDr75ewIy5h7UYDWMdCV1dWd8p+Eb8KyPSNmw0BwSVFj7k5THhrFQ1cc3DzLL DHLbbosMliZdaXGRCYTx93kfJTXlk8K/omPoH527Y5eNrgnkbED1TGFdLrTpxOuhTqOb 2AqsQgZjQZ9NenpIWjiHbhIM7goIP1sGObIxulQleLKfH/bqEUaonz2LS+ZrXdgA6iln L9xSxsRzrhfoQvrfz1OLThYaQHvX59pO6sLCC1DpnPyQKXgc2k1bxjse+Zr8Kl7CEaAU l5OA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:mime-version:from:in-reply-to:date:cc :message-id:references:to; bh=15WxPo2dFa02BLg/iHtPHYChOXVKFb6fa5djohrPJVc=; b=n1hTHzW5i39uAS7i6GrBixUC/u/2MXT1qTQ21HM280r/Vo8iA/M7pjCxcxPce9TROH HSgzhcGf1zUpcJ5eZTrRYGXQ3C/Qu9V8s3ozKbAnTTRkv+105UywxtsI2KI3qm3REBQS PZkf+vu5HA1l7B9v34/vLGlFpps6Ekdab8zL/UMFYcgZaB9UoCE+l8vsnBdcGUsKjIKy tooE7gceZJevQXsv38pEPgu6sDuXuROhWvFIgbymI+5/4Ctpf2ph0TxQ1GDoxBhYNRht nJXAoQzjRwRo0G2YjiuUqCSErhrslg14tg7qaGpFguaVmcYCJ35GkBFzFz+YHOy9sJGZ d80g== X-Gm-Message-State: AIkVDXLJWAPCktPsi1tMuJggTGnMneGCb0ivDydLxhH/ZhT5suQTUkEiWh/alN6cnKfLSg== X-Received: by 10.84.216.91 with SMTP id f27mr29815428plj.92.1483928720052; Sun, 08 Jan 2017 18:25:20 -0800 (PST) Received: from [192.168.20.12] (c-73-19-52-228.hsd1.wa.comcast.net. [73.19.52.228]) by smtp.gmail.com with ESMTPSA id a24sm174345495pfh.57.2017.01.08.18.25.19 (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sun, 08 Jan 2017 18:25:19 -0800 (PST) Subject: Re: svn commit: r311667 - in head/sys/contrib/dev/acpica: components/namespace components/tables include Mime-Version: 1.0 (Mac OS X Mail 9.3 \(3124\)) Content-Type: multipart/signed; boundary="Apple-Mail=_FEFBCA4B-3EC2-4CAE-B15E-D892D007ED4B"; protocol="application/pgp-signature"; micalg=pgp-sha512 X-Pgp-Agent: GPGMail From: "Ngie Cooper (yaneurabeya)" In-Reply-To: <20170109022400.D7E72487A@freefall.freebsd.org> Date: Sun, 8 Jan 2017 18:25:18 -0800 Cc: "Conrad E. Meyer" , src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Message-Id: <31477079-EE88-4D42-B006-BB8C1B061DCB@gmail.com> References: <20170109022400.D7E72487A@freefall.freebsd.org> To: Jan Beich X-Mailer: Apple Mail (2.3124) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 09 Jan 2017 02:25:20 -0000 --Apple-Mail=_FEFBCA4B-3EC2-4CAE-B15E-D892D007ED4B Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 > On Jan 8, 2017, at 18:24, Jan Beich wrote: >=20 > "Conrad E. Meyer" writes: >=20 >> +++ head/sys/contrib/dev/acpica/components/tables/tbxface.c Sun Jan = 8 06:26:33 2017 (r311667) >> @@ -314,11 +314,12 @@ ACPI_EXPORT_SYMBOL (AcpiGetTableHeader) >>=20 >> = /*************************************************************************= ****** >> * >> - * FUNCTION: AcpiGetTable >> + * FUNCTION: AcpiGetTableWithSize >> * >> * PARAMETERS: Signature - ACPI signature of needed table >> * Instance - Which instance (for SSDTs) >> * OutTable - Where the pointer to the table = is returned >> + * TblSize - Size of the table >> * >> * RETURN: Status and pointer to the requested table >> * >> @@ -333,10 +334,11 @@ ACPI_EXPORT_SYMBOL (AcpiGetTableHeader) >> = **************************************************************************= ****/ >>=20 >> ACPI_STATUS >> -AcpiGetTable ( >> +AcpiGetTableWithSize ( >=20 > Can you adjust ACPI_EXPORT_SYMBOL() as well? It doesn't make sense to > export AcpiGetTable() twice but compiler won't complain if you do. Depends on the compiler and the version. IIRC clang won=E2=80=99t, but = gcc will (depending on the version). Cheers, -Ngie --Apple-Mail=_FEFBCA4B-3EC2-4CAE-B15E-D892D007ED4B 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 iQIcBAEBCgAGBQJYcvSOAAoJEPWDqSZpMIYVEtwP/1cFjNtjU2Fp5oQrp0TGcdUg p34EM859JhAuhFdAqv7LEU66u6c0PMBqZb1nXVvs3O6MGwDig/xvAseUOJChmVkr VOZ6SGKSlkRvv4tDgypRuDYKqej2o7XGKCZW2HFQPqyOOyFfZvPbvgJusVKbvOJB vX8+jKbqt2jB3Kn8RUWJl7a2RRymDhcNHZcv3RVhHin2jNs79883Ek143dT37yxD NmMkldDI9DILxPAWxDyfVopSjgdC8HL08HO8RRH4zeqfd7eSdnrYvaD/aDOEmWZt h2z/cNTPSd8qJ83TTe3VMhCUWbYGr/z0GfWYyPRyR2wKgN79C9NoPVD+OI342uXD cjq5Xo0BEYZLOZOqG1mhV9Cvmi8WWrbMlRgMd7yBDbCiIFH4s0bRDRGEjcefglS9 Ti+Wh3R5M51RRgjJOLxs0qMSbdtXM+7qaYtOz49lQeRfrZdnlDrDu3nqjCMOUGap EyU4cihxqKLFqGS/Wj/ifq7Onx2RmHnhTzuex9godyzPdttwXRRzquukr7HFGy20 9lskFBeEgLicWjLq+wu+TmRgLt9HCYnJKp60hGunuwMZHUqJNbFKPU/fl6l1IBja U9JLBOJojteSs1zlsWltKxc6aVIYfv98dZKCIvaFydxGg0sPd2pOJSj7eKVBhW8b VwnomwcNNROiqKXsLjeD =btMk -----END PGP SIGNATURE----- --Apple-Mail=_FEFBCA4B-3EC2-4CAE-B15E-D892D007ED4B-- From owner-svn-src-head@freebsd.org Mon Jan 9 03:08:22 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C3E0FCA633C; Mon, 9 Jan 2017 03:08:22 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A0ECA1486; Mon, 9 Jan 2017 03:08: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 v0938Ltm035373; Mon, 9 Jan 2017 03:08:21 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v0938L66035365; Mon, 9 Jan 2017 03:08:21 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201701090308.v0938L66035365@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Mon, 9 Jan 2017 03:08:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r311739 - in head/usr.sbin/bsnmpd/modules: snmp_atm snmp_hast snmp_hostres snmp_mibII snmp_target snmp_usm snmp_vacm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 09 Jan 2017 03:08:22 -0000 Author: ngie Date: Mon Jan 9 03:08:21 2017 New Revision: 311739 URL: https://svnweb.freebsd.org/changeset/base/311739 Log: Use SRCTOP instead of spelling out the full path with .CURDIR This helps condense the output for CFLAGS and .PATH MFC after: 3 days Modified: head/usr.sbin/bsnmpd/modules/snmp_atm/Makefile head/usr.sbin/bsnmpd/modules/snmp_hast/Makefile head/usr.sbin/bsnmpd/modules/snmp_hostres/Makefile head/usr.sbin/bsnmpd/modules/snmp_mibII/Makefile head/usr.sbin/bsnmpd/modules/snmp_target/Makefile head/usr.sbin/bsnmpd/modules/snmp_usm/Makefile head/usr.sbin/bsnmpd/modules/snmp_vacm/Makefile Modified: head/usr.sbin/bsnmpd/modules/snmp_atm/Makefile ============================================================================== --- head/usr.sbin/bsnmpd/modules/snmp_atm/Makefile Mon Jan 9 02:48:08 2017 (r311738) +++ head/usr.sbin/bsnmpd/modules/snmp_atm/Makefile Mon Jan 9 03:08:21 2017 (r311739) @@ -2,7 +2,7 @@ # # Author: Harti Brandt -CONTRIB= ${.CURDIR}/../../../../contrib/ngatm +CONTRIB= ${SRCTOP}/contrib/ngatm .PATH: ${CONTRIB}/snmp_atm MOD= atm Modified: head/usr.sbin/bsnmpd/modules/snmp_hast/Makefile ============================================================================== --- head/usr.sbin/bsnmpd/modules/snmp_hast/Makefile Mon Jan 9 02:48:08 2017 (r311738) +++ head/usr.sbin/bsnmpd/modules/snmp_hast/Makefile Mon Jan 9 03:08:21 2017 (r311739) @@ -2,7 +2,7 @@ .include -.PATH: ${.CURDIR}/../../../../sbin/hastd +.PATH: ${SRCTOP}/sbin/hastd MOD= hast SRCS= ebuf.c @@ -18,7 +18,7 @@ MAN= snmp_hast.3 NO_WFORMAT= NO_WCAST_ALIGN= NO_WMISSING_VARIABLE_DECLARATIONS= -CFLAGS+=-I${.CURDIR}/../../../../sbin/hastd +CFLAGS+=-I${SRCTOP}/sbin/hastd CFLAGS+=-DHAVE_CAPSICUM CFLAGS+=-DINET .if ${MK_INET6_SUPPORT} != "no" Modified: head/usr.sbin/bsnmpd/modules/snmp_hostres/Makefile ============================================================================== --- head/usr.sbin/bsnmpd/modules/snmp_hostres/Makefile Mon Jan 9 02:48:08 2017 (r311738) +++ head/usr.sbin/bsnmpd/modules/snmp_hostres/Makefile Mon Jan 9 03:08:21 2017 (r311739) @@ -28,7 +28,7 @@ # $FreeBSD$ # -LPRSRC= ${.CURDIR}/../../../lpr/common_source +LPRSRC= ${SRCTOP}/usr.sbin/lpr/common_source .PATH: ${LPRSRC} MOD= hostres Modified: head/usr.sbin/bsnmpd/modules/snmp_mibII/Makefile ============================================================================== --- head/usr.sbin/bsnmpd/modules/snmp_mibII/Makefile Mon Jan 9 02:48:08 2017 (r311738) +++ head/usr.sbin/bsnmpd/modules/snmp_mibII/Makefile Mon Jan 9 03:08:21 2017 (r311739) @@ -2,7 +2,7 @@ # # Author: Harti Brandt -CONTRIB= ${.CURDIR}/../../../../contrib/bsnmp +CONTRIB= ${SRCTOP}/contrib/bsnmp .PATH: ${CONTRIB}/snmp_mibII MOD= mibII Modified: head/usr.sbin/bsnmpd/modules/snmp_target/Makefile ============================================================================== --- head/usr.sbin/bsnmpd/modules/snmp_target/Makefile Mon Jan 9 02:48:08 2017 (r311738) +++ head/usr.sbin/bsnmpd/modules/snmp_target/Makefile Mon Jan 9 03:08:21 2017 (r311739) @@ -2,7 +2,7 @@ # # Author: Shteryana Shopova -CONTRIB= ${.CURDIR}/../../../../contrib/bsnmp +CONTRIB= ${SRCTOP}/contrib/bsnmp .PATH: ${CONTRIB}/snmp_target MOD= target Modified: head/usr.sbin/bsnmpd/modules/snmp_usm/Makefile ============================================================================== --- head/usr.sbin/bsnmpd/modules/snmp_usm/Makefile Mon Jan 9 02:48:08 2017 (r311738) +++ head/usr.sbin/bsnmpd/modules/snmp_usm/Makefile Mon Jan 9 03:08:21 2017 (r311739) @@ -2,7 +2,7 @@ # # Author: Shteryana Shopova -CONTRIB= ${.CURDIR}/../../../../contrib/bsnmp +CONTRIB= ${SRCTOP}/contrib/bsnmp .PATH: ${CONTRIB}/snmp_usm MOD= usm Modified: head/usr.sbin/bsnmpd/modules/snmp_vacm/Makefile ============================================================================== --- head/usr.sbin/bsnmpd/modules/snmp_vacm/Makefile Mon Jan 9 02:48:08 2017 (r311738) +++ head/usr.sbin/bsnmpd/modules/snmp_vacm/Makefile Mon Jan 9 03:08:21 2017 (r311739) @@ -2,7 +2,7 @@ # # Author: Shteryana Shopova -CONTRIB= ${.CURDIR}/../../../../contrib/bsnmp +CONTRIB= ${SRCTOP}/contrib/bsnmp .PATH: ${CONTRIB}/snmp_vacm MOD= vacm From owner-svn-src-head@freebsd.org Mon Jan 9 03:14:06 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 138E8CA65D1; Mon, 9 Jan 2017 03:14:06 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D41381AFD; Mon, 9 Jan 2017 03:14:05 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v093E4Dq039248; Mon, 9 Jan 2017 03:14:04 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v093E49A039246; Mon, 9 Jan 2017 03:14:04 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201701090314.v093E49A039246@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Mon, 9 Jan 2017 03:14:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r311740 - in head/usr.sbin/bsnmpd/modules: snmp_hostres snmp_mibII X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 09 Jan 2017 03:14:06 -0000 Author: ngie Date: Mon Jan 9 03:14:04 2017 New Revision: 311740 URL: https://svnweb.freebsd.org/changeset/base/311740 Log: Improve the smilint target in the hostres and mibII modules - Mark the smilint target .PHONY so it's always executed when requested - Leverage .PATH for BMIBS instead of spelling the path out longhand for them MFC after: 1 week Modified: head/usr.sbin/bsnmpd/modules/snmp_hostres/Makefile head/usr.sbin/bsnmpd/modules/snmp_mibII/Makefile Modified: head/usr.sbin/bsnmpd/modules/snmp_hostres/Makefile ============================================================================== --- head/usr.sbin/bsnmpd/modules/snmp_hostres/Makefile Mon Jan 9 03:08:21 2017 (r311739) +++ head/usr.sbin/bsnmpd/modules/snmp_hostres/Makefile Mon Jan 9 03:14:04 2017 (r311740) @@ -76,6 +76,7 @@ LIBADD= kvm devinfo m geom memstat printcap.pico: printcap.c ${CC} ${PICFLAG} -DPIC ${CFLAGS:C/^-W.*//} -c ${.IMPSRC} -o ${.TARGET} -smilint: +smilint: .PHONY +smilint: ${BMIBS} env SMIPATH=.:/usr/share/snmp/mibs:/usr/local/share/snmp/mibs \ - smilint -c /dev/null -l6 -i group-membership BEGEMOT-HOSTRES-MIB + smilint -c /dev/null -l6 -i group-membership ${.ALLSRC} Modified: head/usr.sbin/bsnmpd/modules/snmp_mibII/Makefile ============================================================================== --- head/usr.sbin/bsnmpd/modules/snmp_mibII/Makefile Mon Jan 9 03:08:21 2017 (r311739) +++ head/usr.sbin/bsnmpd/modules/snmp_mibII/Makefile Mon Jan 9 03:14:04 2017 (r311740) @@ -22,6 +22,7 @@ BMIBS= BEGEMOT-IP-MIB.txt BEGEMOT-MIB2-M .include -smilint: +smilint: .PHONY +smilint: ${BMIBS} env SMIPATH=/usr/share/snmp/mibs:/usr/local/share/snmp/mibs \ - smilint -c /dev/null -l6 -i group-membership ${BMIBS:C/^/${CONTRIB}\/snmp_mibII\//} + smilint -c /dev/null -l6 -i group-membership ${.ALLSRC} From owner-svn-src-head@freebsd.org Mon Jan 9 03:18:20 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8F234CA6674; Mon, 9 Jan 2017 03:18:20 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6127B1D4B; Mon, 9 Jan 2017 03:18:20 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v093IJu4039434; Mon, 9 Jan 2017 03:18:19 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v093IJ5a039433; Mon, 9 Jan 2017 03:18:19 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201701090318.v093IJ5a039433@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Mon, 9 Jan 2017 03:18:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r311741 - head/usr.sbin/bsnmpd/modules/snmp_hostres X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 09 Jan 2017 03:18:20 -0000 Author: ngie Date: Mon Jan 9 03:18:19 2017 New Revision: 311741 URL: https://svnweb.freebsd.org/changeset/base/311741 Log: Add a REVISION section to track changes for the hostres module There haven't been any changes to the MIB definition, so the REVISION remains static at the version it was imported at MFC after: 1 week Modified: head/usr.sbin/bsnmpd/modules/snmp_hostres/BEGEMOT-HOSTRES-MIB.txt Modified: head/usr.sbin/bsnmpd/modules/snmp_hostres/BEGEMOT-HOSTRES-MIB.txt ============================================================================== --- head/usr.sbin/bsnmpd/modules/snmp_hostres/BEGEMOT-HOSTRES-MIB.txt Mon Jan 9 03:14:04 2017 (r311740) +++ head/usr.sbin/bsnmpd/modules/snmp_hostres/BEGEMOT-HOSTRES-MIB.txt Mon Jan 9 03:18:19 2017 (r311741) @@ -54,6 +54,9 @@ begemotHostres MODULE-IDENTITY E-mail: harti@freebsd.org" DESCRIPTION "The MIB for additional HOST-RESOURCES data." + REVISION "200601030000Z" + DESCRIPTION + "Initial revision." ::= { begemot 202 } begemotHostresObjects OBJECT IDENTIFIER ::= { begemotHostres 1 } From owner-svn-src-head@freebsd.org Mon Jan 9 03:21:22 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 722FFCA6809; Mon, 9 Jan 2017 03:21:22 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 41EA210C6; Mon, 9 Jan 2017 03:21: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 v093LLjb039590; Mon, 9 Jan 2017 03:21:21 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v093LLrH039589; Mon, 9 Jan 2017 03:21:21 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201701090321.v093LLrH039589@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Mon, 9 Jan 2017 03:21:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r311742 - head/contrib/bsnmp/snmp_mibII X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 09 Jan 2017 03:21:22 -0000 Author: ngie Date: Mon Jan 9 03:21:21 2017 New Revision: 311742 URL: https://svnweb.freebsd.org/changeset/base/311742 Log: Add a REVISION section to track changes for the BEGEMOT-IP-MIB MIB file There haven't been any changes to the MIB definition, so the REVISION remains static at the version it was imported at MFC after: 1 week Modified: head/contrib/bsnmp/snmp_mibII/BEGEMOT-IP-MIB.txt Modified: head/contrib/bsnmp/snmp_mibII/BEGEMOT-IP-MIB.txt ============================================================================== --- head/contrib/bsnmp/snmp_mibII/BEGEMOT-IP-MIB.txt Mon Jan 9 03:18:19 2017 (r311741) +++ head/contrib/bsnmp/snmp_mibII/BEGEMOT-IP-MIB.txt Mon Jan 9 03:21:21 2017 (r311742) @@ -54,6 +54,9 @@ begemotIp MODULE-IDENTITY E-mail: harti@freebsd.org" DESCRIPTION "The MIB for IP stuff that is not in the official IP MIBs." + REVISION "200602130000Z" + DESCRIPTION + "Initial revision." ::= { begemot 3 } begemotIpObjects OBJECT IDENTIFIER ::= { begemotIp 1 } From owner-svn-src-head@freebsd.org Mon Jan 9 03:38:43 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 57F93CA6A7A; Mon, 9 Jan 2017 03:38:43 +0000 (UTC) (envelope-from sephe@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2FDC518F2; Mon, 9 Jan 2017 03:38:43 +0000 (UTC) (envelope-from sephe@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v093cgHJ047604; Mon, 9 Jan 2017 03:38:42 GMT (envelope-from sephe@FreeBSD.org) Received: (from sephe@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v093cf9t047600; Mon, 9 Jan 2017 03:38:41 GMT (envelope-from sephe@FreeBSD.org) Message-Id: <201701090338.v093cf9t047600@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: sephe set sender to sephe@FreeBSD.org using -f From: Sepherosa Ziehau Date: Mon, 9 Jan 2017 03:38:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r311743 - in head/sys/dev/hyperv: include utilities vmbus vmbus/amd64 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 09 Jan 2017 03:38:43 -0000 Author: sephe Date: Mon Jan 9 03:38:41 2017 New Revision: 311743 URL: https://svnweb.freebsd.org/changeset/base/311743 Log: hyperv: Add method to read 64bit Hyper-V specific time value. MFC after: 1 week Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D9057 Modified: head/sys/dev/hyperv/include/hyperv.h head/sys/dev/hyperv/utilities/vmbus_timesync.c head/sys/dev/hyperv/vmbus/amd64/hyperv_machdep.c head/sys/dev/hyperv/vmbus/hyperv.c head/sys/dev/hyperv/vmbus/vmbus_et.c Modified: head/sys/dev/hyperv/include/hyperv.h ============================================================================== --- head/sys/dev/hyperv/include/hyperv.h Mon Jan 9 03:21:21 2017 (r311742) +++ head/sys/dev/hyperv/include/hyperv.h Mon Jan 9 03:38:41 2017 (r311743) @@ -79,9 +79,17 @@ struct hyperv_guid { #define HYPERV_GUID_STRLEN 40 -int hyperv_guid2str(const struct hyperv_guid *, char *, size_t); +typedef uint64_t (*hyperv_tc64_t)(void); -extern u_int hyperv_features; /* CPUID_HV_MSR_ */ +int hyperv_guid2str(const struct hyperv_guid *, char *, + size_t); + +/* + * hyperv_tc64 could be NULL, if there were no suitable Hyper-V + * specific timecounter. + */ +extern hyperv_tc64_t hyperv_tc64; +extern u_int hyperv_features; /* CPUID_HV_MSR_ */ #endif /* _KERNEL */ Modified: head/sys/dev/hyperv/utilities/vmbus_timesync.c ============================================================================== --- head/sys/dev/hyperv/utilities/vmbus_timesync.c Mon Jan 9 03:21:21 2017 (r311742) +++ head/sys/dev/hyperv/utilities/vmbus_timesync.c Mon Jan 9 03:38:41 2017 (r311743) @@ -52,8 +52,7 @@ __FBSDID("$FreeBSD$"); VMBUS_ICVER_LE(VMBUS_IC_VERSION(4, 0), (sc)->ic_msgver) #define VMBUS_TIMESYNC_DORTT(sc) \ - (VMBUS_TIMESYNC_MSGVER4((sc)) &&\ - (hyperv_features & CPUID_HV_MSR_TIME_REFCNT)) + (VMBUS_TIMESYNC_MSGVER4((sc)) && hyperv_tc64 != NULL) static int vmbus_timesync_probe(device_t); static int vmbus_timesync_attach(device_t); @@ -117,7 +116,7 @@ vmbus_timesync(struct vmbus_ic_softc *sc uint64_t hv_ns, vm_ns, rtt = 0; if (VMBUS_TIMESYNC_DORTT(sc)) - rtt = rdmsr(MSR_HV_TIME_REF_COUNT) - sent_tc; + rtt = hyperv_tc64() - sent_tc; hv_ns = (hvtime - VMBUS_ICMSG_TS_BASE + rtt) * HYPERV_TIMER_NS_FACTOR; nanotime(&vm_ts); Modified: head/sys/dev/hyperv/vmbus/amd64/hyperv_machdep.c ============================================================================== --- head/sys/dev/hyperv/vmbus/amd64/hyperv_machdep.c Mon Jan 9 03:21:21 2017 (r311742) +++ head/sys/dev/hyperv/vmbus/amd64/hyperv_machdep.c Mon Jan 9 03:38:41 2017 (r311743) @@ -133,8 +133,8 @@ hyperv_tsc_vdso_timehands(struct vdso_ti } #define HYPERV_TSC_TIMECOUNT(fence) \ -static u_int \ -hyperv_tsc_timecount_##fence(struct timecounter *tc) \ +static uint64_t \ +hyperv_tc64_tsc_##fence(void) \ { \ struct hyperv_reftsc *tsc_ref = hyperv_ref_tsc.tsc_ref; \ uint32_t seq; \ @@ -162,6 +162,13 @@ hyperv_tsc_timecount_##fence(struct time /* Fallback to the generic timecounter, i.e. rdmsr. */ \ return (rdmsr(MSR_HV_TIME_REF_COUNT)); \ } \ + \ +static u_int \ +hyperv_tsc_timecount_##fence(struct timecounter *tc __unused) \ +{ \ + \ + return (hyperv_tc64_tsc_##fence()); \ +} \ struct __hack HYPERV_TSC_TIMECOUNT(lfence); @@ -170,6 +177,7 @@ HYPERV_TSC_TIMECOUNT(mfence); static void hyperv_tsc_tcinit(void *dummy __unused) { + hyperv_tc64_t tc64 = NULL; uint64_t val, orig; if ((hyperv_features & @@ -182,11 +190,13 @@ hyperv_tsc_tcinit(void *dummy __unused) case CPU_VENDOR_AMD: hyperv_tsc_timecounter.tc_get_timecount = hyperv_tsc_timecount_mfence; + tc64 = hyperv_tc64_tsc_mfence; break; case CPU_VENDOR_INTEL: hyperv_tsc_timecounter.tc_get_timecount = hyperv_tsc_timecount_lfence; + tc64 = hyperv_tc64_tsc_lfence; break; default: @@ -211,6 +221,10 @@ hyperv_tsc_tcinit(void *dummy __unused) /* Register "enlightened" timecounter. */ tc_init(&hyperv_tsc_timecounter); + /* Install 64 bits timecounter method for other modules to use. */ + KASSERT(tc64 != NULL, ("tc64 is not set")); + hyperv_tc64 = tc64; + /* Add device for mmap(2). */ make_dev(&hyperv_tsc_cdevsw, 0, UID_ROOT, GID_WHEEL, 0444, HYPERV_REFTSC_DEVNAME); Modified: head/sys/dev/hyperv/vmbus/hyperv.c ============================================================================== --- head/sys/dev/hyperv/vmbus/hyperv.c Mon Jan 9 03:21:21 2017 (r311742) +++ head/sys/dev/hyperv/vmbus/hyperv.c Mon Jan 9 03:38:41 2017 (r311743) @@ -77,6 +77,8 @@ u_int hyperv_recommends; static u_int hyperv_pm_features; static u_int hyperv_features3; +hyperv_tc64_t hyperv_tc64; + static struct timecounter hyperv_timecounter = { .tc_get_timecount = hyperv_get_timecount, .tc_poll_pps = NULL, @@ -96,6 +98,13 @@ hyperv_get_timecount(struct timecounter return rdmsr(MSR_HV_TIME_REF_COUNT); } +static uint64_t +hyperv_tc64_rdmsr(void) +{ + + return (rdmsr(MSR_HV_TIME_REF_COUNT)); +} + uint64_t hypercall_post_message(bus_addr_t msg_paddr) { @@ -232,6 +241,12 @@ hyperv_init(void *dummy __unused) if (hyperv_features & CPUID_HV_MSR_TIME_REFCNT) { /* Register Hyper-V timecounter */ tc_init(&hyperv_timecounter); + + /* + * Install 64 bits timecounter method for other modules + * to use. + */ + hyperv_tc64 = hyperv_tc64_rdmsr; } } SYSINIT(hyperv_initialize, SI_SUB_HYPERVISOR, SI_ORDER_FIRST, hyperv_init, Modified: head/sys/dev/hyperv/vmbus/vmbus_et.c ============================================================================== --- head/sys/dev/hyperv/vmbus/vmbus_et.c Mon Jan 9 03:21:21 2017 (r311742) +++ head/sys/dev/hyperv/vmbus/vmbus_et.c Mon Jan 9 03:38:41 2017 (r311743) @@ -48,13 +48,10 @@ __FBSDID("$FreeBSD$"); MSR_HV_STIMER_CFG_SINT_MASK) /* - * Two additionally required features: + * Additionally required feature: * - SynIC is needed for interrupt generation. - * - Time reference counter is needed to set ABS reference count to - * STIMER0_COUNT. */ -#define CPUID_HV_ET_MASK (CPUID_HV_MSR_TIME_REFCNT | \ - CPUID_HV_MSR_SYNIC | \ +#define CPUID_HV_ET_MASK (CPUID_HV_MSR_SYNIC | \ CPUID_HV_MSR_SYNTIMER) static void vmbus_et_identify(driver_t *, device_t); @@ -102,7 +99,7 @@ vmbus_et_start(struct eventtimer *et __u { uint64_t current; - current = rdmsr(MSR_HV_TIME_REF_COUNT); + current = hyperv_tc64(); current += hyperv_sbintime2count(first); wrmsr(MSR_HV_STIMER0_COUNT, current); @@ -131,7 +128,8 @@ vmbus_et_identify(driver_t *driver, devi { if (device_get_unit(parent) != 0 || device_find_child(parent, VMBUS_ET_NAME, -1) != NULL || - (hyperv_features & CPUID_HV_ET_MASK) != CPUID_HV_ET_MASK) + (hyperv_features & CPUID_HV_ET_MASK) != CPUID_HV_ET_MASK || + hyperv_tc64 == NULL) return; device_add_child(parent, VMBUS_ET_NAME, -1); @@ -187,9 +185,8 @@ vmbus_et_attach(device_t dev) vmbus_et.et_start = vmbus_et_start; /* - * Delay a bit to make sure that MSR_HV_TIME_REF_COUNT will - * not return 0, since writing 0 to STIMER0_COUNT will disable - * STIMER0. + * Delay a bit to make sure that hyperv_tc64 will not return 0, + * since writing 0 to STIMER0_COUNT will disable STIMER0. */ DELAY(100); smp_rendezvous(NULL, vmbus_et_config, NULL, NULL); From owner-svn-src-head@freebsd.org Mon Jan 9 04:35:56 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id CAFD8CA6561; Mon, 9 Jan 2017 04:35:56 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7DB831FC8; Mon, 9 Jan 2017 04:35:56 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v094ZtPH071460; Mon, 9 Jan 2017 04:35:55 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v094ZtGS071459; Mon, 9 Jan 2017 04:35:55 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201701090435.v094ZtGS071459@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Mon, 9 Jan 2017 04:35:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r311744 - head/share/mk X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 09 Jan 2017 04:35:56 -0000 Author: ngie Date: Mon Jan 9 04:35:55 2017 New Revision: 311744 URL: https://svnweb.freebsd.org/changeset/base/311744 Log: Document bsd.snmpmod.mk from a high-level MFC after: 2 weeks Modified: head/share/mk/bsd.README Modified: head/share/mk/bsd.README ============================================================================== --- head/share/mk/bsd.README Mon Jan 9 03:38:41 2017 (r311743) +++ head/share/mk/bsd.README Mon Jan 9 04:35:55 2017 (r311744) @@ -410,6 +410,63 @@ If foo has multiple source files, add th =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= +The include file, , handles building MIB modules for bsnmpd +from one or more source files, along with their manual pages. It has a +limited number of suffixes, consistent with the current needs of the BSD +tree. + +bsd.snmpmod.mk leverages bsd.lib.mk for building MIB modules and +bsd.files.mk for installing MIB description and definition files. + +It has no additional targets. + +It sets/uses the following variables: + +BMIBS The MIB definitions to install. + +BMIBSDIR The directory where the MIB definitions are installed. + This defaults to `${SHAREDIR}/snmp/mibs`. + +DEFS The MIB description files to install. + +DEFSDIR The directory where MIB description files are installed. + This defaults to `${SHAREDIR}/snmp/defs`. + +EXTRAMIBDEFS Extra MIB description files to use as input when + generating ${MOD}_oid.h and ${MOD}_tree.[ch]. + +EXTRAMIBSYMS Extra MIB definition files used only for extracting + symbols. + + EXTRAMIBSYMS are useful when resolving inter-module + dependencies and are useful with files containing only + enum-definitions. + + See ${MOD}_oid.h for more details. + +MOD The bsnmpd module name. + +XSYM MIB names to extract symbols for. See ${MOD}_oid.h for + more details. + +It generates the following files: + +${MOD}_tree.c A source file and header which programmatically describes +${MOD}_tree.h the MIB (type, OID name, ACCESS attributes, etc). + + The files are generated via "gensnmptree -p". + + See gensnmptree(1) for more details. + +${MOD}_oid.h A header which programmatically describes the MIB root and + MIB tables. + + The files are generated via "gensnmptree -e". + + See gensnmptree(1) for more details. + +=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= + The include file contains the default targets for building subdirectories. It has the same seven targets as : all, clean, cleandir, depend, install, lint, and tags. For all of the directories From owner-svn-src-head@freebsd.org Mon Jan 9 05:46:42 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 93B94CA5603; Mon, 9 Jan 2017 05:46:42 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5A3F11DF3; Mon, 9 Jan 2017 05:46:42 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v095kfuC099721; Mon, 9 Jan 2017 05:46:41 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v095kfTE099720; Mon, 9 Jan 2017 05:46:41 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201701090546.v095kfTE099720@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Mon, 9 Jan 2017 05:46:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r311748 - head/tools/tools/gensnmpdef X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 09 Jan 2017 05:46:42 -0000 Author: ngie Date: Mon Jan 9 05:46:41 2017 New Revision: 311748 URL: https://svnweb.freebsd.org/changeset/base/311748 Log: Bump WARNS up from 0 to 6 MFC after: 5 days Modified: head/tools/tools/gensnmpdef/Makefile Modified: head/tools/tools/gensnmpdef/Makefile ============================================================================== --- head/tools/tools/gensnmpdef/Makefile Mon Jan 9 05:44:19 2017 (r311747) +++ head/tools/tools/gensnmpdef/Makefile Mon Jan 9 05:46:41 2017 (r311748) @@ -19,4 +19,6 @@ LDFLAGS+= -L${LOCALBASE}/lib LDADD+= -lsmi +WARNS?= 6 + .include From owner-svn-src-head@freebsd.org Mon Jan 9 05:51:39 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4FD23CA5833; Mon, 9 Jan 2017 05:51:39 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1F64A11CE; Mon, 9 Jan 2017 05:51:39 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v095pcA4002222; Mon, 9 Jan 2017 05:51:38 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v095pcOl002221; Mon, 9 Jan 2017 05:51:38 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201701090551.v095pcOl002221@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Mon, 9 Jan 2017 05:51:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r311750 - head/contrib/bsnmp/gensnmpdef X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 09 Jan 2017 05:51:39 -0000 Author: ngie Date: Mon Jan 9 05:51:38 2017 New Revision: 311750 URL: https://svnweb.freebsd.org/changeset/base/311750 Log: Check result from smiGetFirstNode and smiGetNodeByOID This avoids a segfault with malformed or unanticipated files, like IPV6-TC.txt (a file containing just TEXTUAL-CONVENTIONS). MFC after: 5 days Found with: gensnmpdef /usr/local/share/snmp/mibs/IPV6-TC.txt Modified: head/contrib/bsnmp/gensnmpdef/gensnmpdef.c Modified: head/contrib/bsnmp/gensnmpdef/gensnmpdef.c ============================================================================== --- head/contrib/bsnmp/gensnmpdef/gensnmpdef.c Mon Jan 9 05:50:52 2017 (r311749) +++ head/contrib/bsnmp/gensnmpdef/gensnmpdef.c Mon Jan 9 05:51:38 2017 (r311750) @@ -126,9 +126,11 @@ open_node(const SmiNode *n, u_int level, while (level < n->oidlen - 1) { if (level >= cut) { + n1 = smiGetNodeByOID(level + 1, n->oid); + if (n1 == NULL) + continue; pindent(level); printf("(%u", n->oid[level]); - n1 = smiGetNodeByOID(level + 1, n->oid); printf(" "); print_name(n1); printf("\n"); @@ -560,6 +562,8 @@ main(int argc, char *argv[]) last = NULL; for (opt = 0; opt < argc; opt++) { n = smiGetFirstNode(mods[opt], SMI_NODEKIND_ANY); + if (n == NULL) + continue; for (;;) { if (do_typedef == 0) { level = open_node(n, level, &last); From owner-svn-src-head@freebsd.org Mon Jan 9 06:03:50 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id CF2BBCA5D19; Mon, 9 Jan 2017 06:03:50 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A152E1E9F; Mon, 9 Jan 2017 06:03:50 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v0963nIB008436; Mon, 9 Jan 2017 06:03:49 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v0963nCc008435; Mon, 9 Jan 2017 06:03:49 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201701090603.v0963nCc008435@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Mon, 9 Jan 2017 06:03:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r311754 - head/contrib/bsnmp/gensnmpdef X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 09 Jan 2017 06:03:50 -0000 Author: ngie Date: Mon Jan 9 06:03:49 2017 New Revision: 311754 URL: https://svnweb.freebsd.org/changeset/base/311754 Log: Use calloc instead of malloc + memset(.., 0, ..) MFC after: 5 days Modified: head/contrib/bsnmp/gensnmpdef/gensnmpdef.c Modified: head/contrib/bsnmp/gensnmpdef/gensnmpdef.c ============================================================================== --- head/contrib/bsnmp/gensnmpdef/gensnmpdef.c Mon Jan 9 05:58:48 2017 (r311753) +++ head/contrib/bsnmp/gensnmpdef/gensnmpdef.c Mon Jan 9 06:03:49 2017 (r311754) @@ -399,12 +399,11 @@ static void save_typdef(char *name) { struct tdef *t; - t = malloc(sizeof(struct tdef)); + t = calloc(1, sizeof(struct tdef)); if (t == NULL) err(1, NULL); - memset(t, 0 , sizeof(struct tdef)); t->name = name; SLIST_INSERT_HEAD(&tdefs, t, link); } From owner-svn-src-head@freebsd.org Mon Jan 9 06:13:29 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 24E60CA6158; Mon, 9 Jan 2017 06:13: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 E5769170F; Mon, 9 Jan 2017 06:13: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 v096DSWq012401; Mon, 9 Jan 2017 06:13:28 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v096DSp3012400; Mon, 9 Jan 2017 06:13:28 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201701090613.v096DSp3012400@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Mon, 9 Jan 2017 06:13:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r311757 - head/contrib/bsnmp/gensnmpdef X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 09 Jan 2017 06:13:29 -0000 Author: ngie Date: Mon Jan 9 06:13:27 2017 New Revision: 311757 URL: https://svnweb.freebsd.org/changeset/base/311757 Log: Similar to r311750, check for the result from smiGetModule to avoid a segfault when dereferencing a NULL pointer later on. Choose to just check for the NULL pointer in the next for-loop for now to fix the issue with a minimal amount of code churn sys/queue.h use here would make more sense than using a static table MFC after: 5 days Modified: head/contrib/bsnmp/gensnmpdef/gensnmpdef.c Modified: head/contrib/bsnmp/gensnmpdef/gensnmpdef.c ============================================================================== --- head/contrib/bsnmp/gensnmpdef/gensnmpdef.c Mon Jan 9 06:07:44 2017 (r311756) +++ head/contrib/bsnmp/gensnmpdef/gensnmpdef.c Mon Jan 9 06:13:27 2017 (r311757) @@ -560,6 +560,8 @@ main(int argc, char *argv[]) level = 0; last = NULL; for (opt = 0; opt < argc; opt++) { + if (mods[opt] == NULL) /* smiGetModule failed above */ + continue; n = smiGetFirstNode(mods[opt], SMI_NODEKIND_ANY); if (n == NULL) continue; From owner-svn-src-head@freebsd.org Mon Jan 9 06:19:21 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id EAA4DCA61E1; Mon, 9 Jan 2017 06:19:21 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A8D8818D5; Mon, 9 Jan 2017 06:19:21 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v096JK3x012626; Mon, 9 Jan 2017 06:19:20 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v096JKYW012625; Mon, 9 Jan 2017 06:19:20 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201701090619.v096JKYW012625@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Mon, 9 Jan 2017 06:19:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r311758 - head/usr.sbin/bsnmpd/modules/snmp_atm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 09 Jan 2017 06:19:22 -0000 Author: ngie Date: Mon Jan 9 06:19:20 2017 New Revision: 311758 URL: https://svnweb.freebsd.org/changeset/base/311758 Log: Add a REVISION section to track changes for the BEGEMOT-ATM-FREEBSD-MIB MIB file There haven't been any changes to the MIB definition, so the REVISION remains static at the version it was imported at MFC after: 1 week Modified: head/usr.sbin/bsnmpd/modules/snmp_atm/BEGEMOT-ATM-FREEBSD-MIB.txt Modified: head/usr.sbin/bsnmpd/modules/snmp_atm/BEGEMOT-ATM-FREEBSD-MIB.txt ============================================================================== --- head/usr.sbin/bsnmpd/modules/snmp_atm/BEGEMOT-ATM-FREEBSD-MIB.txt Mon Jan 9 06:13:27 2017 (r311757) +++ head/usr.sbin/bsnmpd/modules/snmp_atm/BEGEMOT-ATM-FREEBSD-MIB.txt Mon Jan 9 06:19:20 2017 (r311758) @@ -56,7 +56,9 @@ begemotAtmFreeBSDGroup MODULE-IDENTITY E-mail: harti@freebsd.org" DESCRIPTION "The FreeBSD specific Begemot MIB for ATM interfaces." - + REVISION "200408060000Z" + DESCRIPTION + "Initial revision." ::= { begemotAtmSysGroup 1 } -- Netgraph From owner-svn-src-head@freebsd.org Mon Jan 9 06:24:29 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 726C8CA637D; Mon, 9 Jan 2017 06:24: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 447EF1D0D; Mon, 9 Jan 2017 06:24:29 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v096OS1S016596; Mon, 9 Jan 2017 06:24:28 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v096OSV8016595; Mon, 9 Jan 2017 06:24:28 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201701090624.v096OSV8016595@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Mon, 9 Jan 2017 06:24:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r311759 - head/contrib/bsnmp/snmpd X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 09 Jan 2017 06:24:29 -0000 Author: ngie Date: Mon Jan 9 06:24:28 2017 New Revision: 311759 URL: https://svnweb.freebsd.org/changeset/base/311759 Log: Add a REVISION section to track changes for the FOKUS-MIB MIB file There haven't been any changes to the MIB definition, so the REVISION remains static at the version it was imported at MFC after: 1 week Modified: head/contrib/bsnmp/snmpd/FOKUS-MIB.txt Modified: head/contrib/bsnmp/snmpd/FOKUS-MIB.txt ============================================================================== --- head/contrib/bsnmp/snmpd/FOKUS-MIB.txt Mon Jan 9 06:19:20 2017 (r311758) +++ head/contrib/bsnmp/snmpd/FOKUS-MIB.txt Mon Jan 9 06:24:28 2017 (r311759) @@ -52,6 +52,9 @@ fokus MODULE-IDENTITY E-mail: harti@freebsd.org" DESCRIPTION "The root of the Fokus enterprises tree." + REVISION "200202050000Z" + DESCRIPTION + "Initial revision." ::= { enterprises 12325 } END From owner-svn-src-head@freebsd.org Mon Jan 9 06:27:31 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A6818CA6407; Mon, 9 Jan 2017 06:27:31 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6DED11EBB; Mon, 9 Jan 2017 06:27:31 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v096RUF8016740; Mon, 9 Jan 2017 06:27:30 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v096RUXs016739; Mon, 9 Jan 2017 06:27:30 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201701090627.v096RUXs016739@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Mon, 9 Jan 2017 06:27:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r311760 - head/contrib/bsnmp/snmpd X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 09 Jan 2017 06:27:31 -0000 Author: ngie Date: Mon Jan 9 06:27:30 2017 New Revision: 311760 URL: https://svnweb.freebsd.org/changeset/base/311760 Log: Add a REVISION section to track changes for the BEGEMOT-MIB MIB file There haven't been any changes to the MIB definition, so the REVISION remains static at the version it was imported at MFC after: 1 week Modified: head/contrib/bsnmp/snmpd/BEGEMOT-MIB.txt Modified: head/contrib/bsnmp/snmpd/BEGEMOT-MIB.txt ============================================================================== --- head/contrib/bsnmp/snmpd/BEGEMOT-MIB.txt Mon Jan 9 06:24:28 2017 (r311759) +++ head/contrib/bsnmp/snmpd/BEGEMOT-MIB.txt Mon Jan 9 06:27:30 2017 (r311760) @@ -54,6 +54,9 @@ begemot MODULE-IDENTITY E-mail: harti@freebsd.org" DESCRIPTION "The root of the Begemot subtree of the fokus tree." + REVISION "200201300000Z" + DESCRIPTION + "Initial revision." ::= { fokus 1 } END From owner-svn-src-head@freebsd.org Mon Jan 9 06:36:19 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1D2FDCA66D9; Mon, 9 Jan 2017 06:36: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 E05FF14A0; Mon, 9 Jan 2017 06:36: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 v096aITN020797; Mon, 9 Jan 2017 06:36:18 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v096aIpm020796; Mon, 9 Jan 2017 06:36:18 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201701090636.v096aIpm020796@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Mon, 9 Jan 2017 06:36:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r311761 - head/usr.sbin/bsnmpd/modules/snmp_netgraph X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 09 Jan 2017 06:36:19 -0000 Author: ngie Date: Mon Jan 9 06:36:17 2017 New Revision: 311761 URL: https://svnweb.freebsd.org/changeset/base/311761 Log: Add a REVISION section to track changes for the BEGEMOT-NETGRAPH MIB file This change also documents the modification harti made to a handful of objects in r122758 (the max OCTET STRING width was increased from 15 to 31 octets) MFC after: 1 week Modified: head/usr.sbin/bsnmpd/modules/snmp_netgraph/BEGEMOT-NETGRAPH.txt Modified: head/usr.sbin/bsnmpd/modules/snmp_netgraph/BEGEMOT-NETGRAPH.txt ============================================================================== --- head/usr.sbin/bsnmpd/modules/snmp_netgraph/BEGEMOT-NETGRAPH.txt Mon Jan 9 06:27:30 2017 (r311760) +++ head/usr.sbin/bsnmpd/modules/snmp_netgraph/BEGEMOT-NETGRAPH.txt Mon Jan 9 06:36:17 2017 (r311761) @@ -59,6 +59,19 @@ begemotNg MODULE-IDENTITY E-mail: harti@freebsd.org" DESCRIPTION "The MIB for the NetGraph access module for SNMP." + REVISION "200311140000Z" + DESCRIPTION + "The maximum width of the following OCTET STRINGs was increased + from 15 to 31: + + - NgTypeName + - NgNodeName + - NgNodeNameOrEmpty + - NgHookName + " + REVISION "200201310000Z" + DESCRIPTION + "Initial revision." ::= { begemot 2 } begemotNgObjects OBJECT IDENTIFIER ::= { begemotNg 1 } From owner-svn-src-head@freebsd.org Mon Jan 9 07:36:32 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B1CE1CA64AA; Mon, 9 Jan 2017 07:36:32 +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 8156C1FBB; Mon, 9 Jan 2017 07:36:32 +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 v097aV40045022; Mon, 9 Jan 2017 07:36:31 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v097aVFG045021; Mon, 9 Jan 2017 07:36:31 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <201701090736.v097aVFG045021@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Mon, 9 Jan 2017 07:36:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r311762 - head/usr.bin/netstat X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 09 Jan 2017 07:36:32 -0000 Author: delphij Date: Mon Jan 9 07:36:31 2017 New Revision: 311762 URL: https://svnweb.freebsd.org/changeset/base/311762 Log: Fix typo. MFC after: 3 days Modified: head/usr.bin/netstat/route.c Modified: head/usr.bin/netstat/route.c ============================================================================== --- head/usr.bin/netstat/route.c Mon Jan 9 06:36:17 2017 (r311761) +++ head/usr.bin/netstat/route.c Mon Jan 9 07:36:31 2017 (r311762) @@ -496,7 +496,7 @@ fmt_sockaddr(struct sockaddr *sa, struct cq = buf; slim = sa->sa_len + (u_char *) sa; cqlim = cq + sizeof(buf) - sizeof(" ffff"); - snprintf(cq, sizeof(cq), "(%d)", sa->sa_family); + snprintf(cq, sizeof(buf), "(%d)", sa->sa_family); cq += strlen(cq); while (s < slim && cq < cqlim) { snprintf(cq, sizeof(" ff"), " %02x", *s++); From owner-svn-src-head@freebsd.org Mon Jan 9 08:08:54 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0FD8CCA6514; Mon, 9 Jan 2017 08:08:54 +0000 (UTC) (envelope-from hps@selasky.org) Received: from mail.turbocat.net (turbocat.net [88.99.82.50]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id CF5C61799; Mon, 9 Jan 2017 08:08:52 +0000 (UTC) (envelope-from hps@selasky.org) Received: from hps2016.home.selasky.org (unknown [62.141.129.119]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.turbocat.net (Postfix) with ESMTPSA id 328841FE1B5; Mon, 9 Jan 2017 09:08:25 +0100 (CET) Subject: Re: svn commit: r311707 - in head/sys/dev/rtwn: . usb To: Andriy Voskoboinyk , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201701082341.v08NfH4O046808@repo.freebsd.org> From: Hans Petter Selasky Message-ID: <83881095-b47e-facb-6bbe-a79f8e54209d@selasky.org> Date: Mon, 9 Jan 2017 09:08:13 +0100 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:45.0) Gecko/20100101 Thunderbird/45.4.0 MIME-Version: 1.0 In-Reply-To: <201701082341.v08NfH4O046808@repo.freebsd.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 09 Jan 2017 08:08:54 -0000 On 01/09/17 00:41, Andriy Voskoboinyk wrote: > Modified: head/sys/dev/rtwn/usb/rtwn_usb_ep.c > ============================================================================== > --- head/sys/dev/rtwn/usb/rtwn_usb_ep.c Sun Jan 8 23:25:46 2017 (r311706) > +++ head/sys/dev/rtwn/usb/rtwn_usb_ep.c Sun Jan 8 23:41:17 2017 (r311707) > @@ -63,7 +63,6 @@ static struct usb_config rtwn_config[RTW > .type = UE_BULK, > .endpoint = UE_ADDR_ANY, > .direction = UE_DIR_IN, > - .bufsize = RTWN_RXBUFSZ, > .flags = { > .pipe_bof = 1, > .short_xfer_ok = 1 > @@ -222,6 +221,7 @@ rtwn_usb_setup_endpoints(struct rtwn_usb > break; > } > > + rtwn_config[RTWN_BULK_RX].bufsize = sc->rx_dma_size + 1024; Hi, You should copy the rtwn_config to the stack/softc, and not write to the static struct, which should be made "static const" after this change! This might lead to a race when multiple adapters are connecting at the same time! Remember USB enumeration is multithreaded. Else your change looks good. --HPS From owner-svn-src-head@freebsd.org Mon Jan 9 09:28:04 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7343FCA5017; Mon, 9 Jan 2017 09:28:04 +0000 (UTC) (envelope-from smh@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4564E111E; Mon, 9 Jan 2017 09:28:04 +0000 (UTC) (envelope-from smh@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v099S3Bk090432; Mon, 9 Jan 2017 09:28:03 GMT (envelope-from smh@FreeBSD.org) Received: (from smh@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v099S3fM090431; Mon, 9 Jan 2017 09:28:03 GMT (envelope-from smh@FreeBSD.org) Message-Id: <201701090928.v099S3fM090431@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: smh set sender to smh@FreeBSD.org using -f From: Steven Hartland Date: Mon, 9 Jan 2017 09:28:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r311769 - head/usr.bin/netstat X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 09 Jan 2017 09:28:04 -0000 Author: smh Date: Mon Jan 9 09:28:03 2017 New Revision: 311769 URL: https://svnweb.freebsd.org/changeset/base/311769 Log: Fix rstat: symbol not in namelist from netstat Load kvm symbols earlier to prevent rstat: symbol not in namelist error when running netstat -rs. Submitted by: Sebastian Huber MFC after: 1 week Sponsored by: Multiplay Modified: head/usr.bin/netstat/main.c Modified: head/usr.bin/netstat/main.c ============================================================================== --- head/usr.bin/netstat/main.c Mon Jan 9 08:12:22 2017 (r311768) +++ head/usr.bin/netstat/main.c Mon Jan 9 09:28:03 2017 (r311769) @@ -427,6 +427,9 @@ main(int argc, char *argv[]) if (xflag && Tflag) xo_errx(1, "-x and -T are incompatible, pick one."); + /* Load all necessary kvm symbols */ + kresolve_list(nl); + if (Bflag) { if (!live) usage(); @@ -507,9 +510,6 @@ main(int argc, char *argv[]) exit(0); } - /* Load all necessary kvm symbols */ - kresolve_list(nl); - if (tp) { xo_open_container("statistics"); printproto(tp, tp->pr_name, &first); From owner-svn-src-head@freebsd.org Mon Jan 9 10:47:21 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A04BCCA53D0; Mon, 9 Jan 2017 10:47:21 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6FCE4167D; Mon, 9 Jan 2017 10:47:21 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v09AlKCr024342; Mon, 9 Jan 2017 10:47:20 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v09AlKsD024341; Mon, 9 Jan 2017 10:47:20 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201701091047.v09AlKsD024341@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Mon, 9 Jan 2017 10:47:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r311780 - head/lib/libprocstat X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 09 Jan 2017 10:47:21 -0000 Author: kib Date: Mon Jan 9 10:47:20 2017 New Revision: 311780 URL: https://svnweb.freebsd.org/changeset/base/311780 Log: Use tab for indent. Extracted from: ino64 work by gleb Sponsored by: The FreeBSD Foundation MFC after: 1 week Modified: head/lib/libprocstat/Makefile Modified: head/lib/libprocstat/Makefile ============================================================================== --- head/lib/libprocstat/Makefile Mon Jan 9 10:31:39 2017 (r311779) +++ head/lib/libprocstat/Makefile Mon Jan 9 10:47:20 2017 (r311780) @@ -9,7 +9,7 @@ SRCS= cd9660.c \ common_kvm.c \ core.c \ libprocstat.c \ - msdosfs.c \ + msdosfs.c \ smbfs.c \ udf.c From owner-svn-src-head@freebsd.org Mon Jan 9 11:11:53 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 563F5CA5C8F; Mon, 9 Jan 2017 11:11:53 +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 187341353; Mon, 9 Jan 2017 11:11:53 +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 v09BBqf3036185; Mon, 9 Jan 2017 11:11:52 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v09BBqcN036184; Mon, 9 Jan 2017 11:11:52 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201701091111.v09BBqcN036184@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Mon, 9 Jan 2017 11:11:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r311781 - head/lib/libprocstat X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 09 Jan 2017 11:11:53 -0000 Author: kib Date: Mon Jan 9 11:11:52 2017 New Revision: 311781 URL: https://svnweb.freebsd.org/changeset/base/311781 Log: Use standard Versions.def for libprocstat. This makes the versions inheritance consistent for our versioned libraries. Extracted from: ino64 Discussed with: kan Sponsored by: The FreeBSD Foundation MFC after: 1 week Deleted: head/lib/libprocstat/Versions.def Modified: head/lib/libprocstat/Makefile Modified: head/lib/libprocstat/Makefile ============================================================================== --- head/lib/libprocstat/Makefile Mon Jan 9 10:47:20 2017 (r311780) +++ head/lib/libprocstat/Makefile Mon Jan 9 11:11:52 2017 (r311781) @@ -13,7 +13,7 @@ SRCS= cd9660.c \ smbfs.c \ udf.c -VERSION_DEF= ${.CURDIR}/Versions.def +VERSION_DEF= ${LIBCSRCDIR}/Versions.def SYMBOL_MAPS= ${.CURDIR}/Symbol.map INCS= libprocstat.h From owner-svn-src-head@freebsd.org Mon Jan 9 16:21:07 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9761BCA75BB; Mon, 9 Jan 2017 16:21: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 59CD01D1F; Mon, 9 Jan 2017 16:21: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 v09GL6U9062659; Mon, 9 Jan 2017 16:21:06 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v09GL63o062398; Mon, 9 Jan 2017 16:21:06 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201701091621.v09GL63o062398@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Mon, 9 Jan 2017 16:21:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r311787 - 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-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 09 Jan 2017 16:21:07 -0000 Author: mav Date: Mon Jan 9 16:21:06 2017 New Revision: 311787 URL: https://svnweb.freebsd.org/changeset/base/311787 Log: Allocate memory for prevent flags only for removable LUs. This array takes 64KB of RAM now, that was more then half of struct ctl_lun size. If at some point we support more ports, this may need another tune. MFC after: 2 weeks Modified: head/sys/cam/ctl/ctl.c head/sys/cam/ctl/ctl_private.h Modified: head/sys/cam/ctl/ctl.c ============================================================================== --- head/sys/cam/ctl/ctl.c Mon Jan 9 14:13:47 2017 (r311786) +++ head/sys/cam/ctl/ctl.c Mon Jan 9 16:21:06 2017 (r311787) @@ -4585,6 +4585,10 @@ ctl_alloc_lun(struct ctl_softc *ctl_soft lun->ie_reported = 1; callout_init_mtx(&lun->ie_callout, &lun->lun_lock, 0); ctl_tpc_lun_init(lun); + if (lun->flags & CTL_LUN_REMOVABLE) { + lun->prevent = malloc((CTL_MAX_INITIATORS + 31) / 32 * 4, + M_CTL, M_WAITOK); + } /* * Initialize the mode and log page index. @@ -4666,6 +4670,7 @@ ctl_free_lun(struct ctl_lun *lun) for (i = 0; i < CTL_MAX_PORTS; i++) free(lun->pr_keys[i], M_CTL); free(lun->write_buffer, M_CTL); + free(lun->prevent, M_CTL); if (lun->flags & CTL_LUN_MALLOCED) free(lun, M_CTL); @@ -5276,7 +5281,7 @@ ctl_prevent_allow(struct ctl_scsiio *cts cdb = (struct scsi_prevent *)ctsio->cdb; - if ((lun->flags & CTL_LUN_REMOVABLE) == 0) { + if ((lun->flags & CTL_LUN_REMOVABLE) == 0 || lun->prevent == NULL) { ctl_set_invalid_opcode(ctsio); ctl_done((union ctl_io *)ctsio); return (CTL_RETVAL_COMPLETE); @@ -11872,8 +11877,10 @@ ctl_do_lun_reset(struct ctl_lun *lun, un ctl_clear_mask(lun->have_ca, i); #endif lun->prevent_count = 0; - for (i = 0; i < CTL_MAX_INITIATORS; i++) - ctl_clear_mask(lun->prevent, i); + if (lun->prevent) { + for (i = 0; i < CTL_MAX_INITIATORS; i++) + ctl_clear_mask(lun->prevent, i); + } mtx_unlock(&lun->lun_lock); return (0); @@ -12019,7 +12026,7 @@ ctl_i_t_nexus_reset(union ctl_io *io) #endif if ((lun->flags & CTL_LUN_RESERVED) && (lun->res_idx == initidx)) lun->flags &= ~CTL_LUN_RESERVED; - if (ctl_is_set(lun->prevent, initidx)) { + if (lun->prevent && ctl_is_set(lun->prevent, initidx)) { ctl_clear_mask(lun->prevent, initidx); lun->prevent_count--; } Modified: head/sys/cam/ctl/ctl_private.h ============================================================================== --- head/sys/cam/ctl/ctl_private.h Mon Jan 9 14:13:47 2017 (r311786) +++ head/sys/cam/ctl/ctl_private.h Mon Jan 9 16:21:06 2017 (r311787) @@ -412,7 +412,7 @@ struct ctl_lun { uint32_t pr_res_idx; uint8_t pr_res_type; int prevent_count; - uint32_t prevent[(CTL_MAX_INITIATORS+31)/32]; + uint32_t *prevent; uint8_t *write_buffer; struct ctl_devid *lun_devid; TAILQ_HEAD(tpc_lists, tpc_list) tpc_lists; From owner-svn-src-head@freebsd.org Mon Jan 9 16:49:24 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 80931CA70AD for ; Mon, 9 Jan 2017 16:49:24 +0000 (UTC) (envelope-from shawn.webb@hardenedbsd.org) Received: from mail-qk0-x22a.google.com (mail-qk0-x22a.google.com [IPv6:2607:f8b0:400d:c09::22a]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 39DB9159C for ; Mon, 9 Jan 2017 16:49:24 +0000 (UTC) (envelope-from shawn.webb@hardenedbsd.org) Received: by mail-qk0-x22a.google.com with SMTP id u25so530705656qki.2 for ; Mon, 09 Jan 2017 08:49:24 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=hardenedbsd-org.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=701/3LMfEj8sl09rUQzuS0Lg7NacbmwvM2LcUoRgR/E=; b=F/dL+HtDWBZ+H6Wz6DnTIMqPUgL9hFJ5UsY35EcgD4V//Zb7x7SSIzTLVQodUbrcAk oeEG6QhmJhbI2g8W4RFbp66FdBHJaewoukaNTdMRSX1isZYBuOvpbFhxoGX31U67K0++ asUDQABwNSl7ap3sMswsCxj1+09ES0jZdfSEWwELiXskm+PQAuBWRYRwRG2/ikLTqLHM TPgp9mK1+9Ud6NBDh+W05kwDIjV6cePChyvm9Xi1PwWkw5iVHqXPkcCZo/z+ckmvup3i dAZ1zAdw57JEaVBPtqNwNPZtyEY8C8RVqK0unTwoWI8giKt/0fQDeBx/Ttj9J4fWHhJb ZdMw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=701/3LMfEj8sl09rUQzuS0Lg7NacbmwvM2LcUoRgR/E=; b=Kdkk6iZLvBuvhuOTa6UlOraLkKBUZ4DKkt7369bRRwLql3ij1skeCXCc3QHC4jWxNk kkIuUvrpo/twFaE/R3MixMvthNIu6G5YLOl2jpl4lY6luiYALAXM00y2EMzb0dlKkxUx xgGzSUeTafTNS8llYybDMd+NWcavROvAiQVjDh12kDHr7J7BYv0X8hdMsmzBwf4Wm3ph /oZtI30abIAMtdZWL4Ku7Rz/QPnpTadJD49rcora4dkLKNHd+LK++o2TEn434C9Lf2X+ 631yFpaMRpodZ8fefdeeQirIzvGoPv4XNrVxWvHPg2FnlaT4GeBhRJqphMmSFk7eDvtD uuXw== X-Gm-Message-State: AIkVDXIa/3eQX2EKDOy7eyqBBNYoUhQWQo/J9m7TUeQ7E8R6RDDwoKtoBWKUmt/APKoeCTww X-Received: by 10.55.99.81 with SMTP id x78mr27883179qkb.62.1483980563469; Mon, 09 Jan 2017 08:49:23 -0800 (PST) Received: from mutt-hardenedbsd ([63.88.83.66]) by smtp.gmail.com with ESMTPSA id d189sm718349qka.32.2017.01.09.08.49.22 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 09 Jan 2017 08:49:22 -0800 (PST) Date: Mon, 9 Jan 2017 11:49:21 -0500 From: Shawn Webb To: Ian Lepore Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r311736 - head/sys/dev/sdhci Message-ID: <20170109164921.nrpezj7b7dk33yor@mutt-hardenedbsd> References: <201701090204.v0924sAV010381@repo.freebsd.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="yius2fbq4uvbn7au" Content-Disposition: inline In-Reply-To: <201701090204.v0924sAV010381@repo.freebsd.org> X-Operating-System: FreeBSD mutt-hardenedbsd 12.0-CURRENT-HBSD FreeBSD 12.0-CURRENT-HBSD X-PGP-Key: http://pgp.mit.edu/pks/lookup?op=vindex&search=0x6A84658F52456EEE User-Agent: NeoMutt/20161126 (1.7.1) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 09 Jan 2017 16:49:24 -0000 --yius2fbq4uvbn7au Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hey Ian, On Mon, Jan 09, 2017 at 02:04:54AM +0000, Ian Lepore wrote: > Author: ian > Date: Mon Jan 9 02:04:54 2017 > New Revision: 311736 > URL: https://svnweb.freebsd.org/changeset/base/311736 >=20 > Log: > Use the new sdhci_fdt_gpio helper functions to add full support for FDT > gpio pins for detecting card insert/remove and write protect. Looks like the new sdhci work causes a kernel panic on the RPI3. It was reported to me by one of our users. I'll shortly be in the process of dissecting which exact commit causes it. Screenshots of the kernel panic: http://www.zyxst.net/~bofh/rpi3/hbsd/panic0.jpg http://www.zyxst.net/~bofh/rpi3/hbsd/panic1.jpg Thanks, --=20 Shawn Webb Cofounder and Security Engineer HardenedBSD GPG Key ID: 0x6A84658F52456EEE GPG Key Fingerprint: 2ABA B6BD EF6A F486 BE89 3D9E 6A84 658F 5245 6EEE --yius2fbq4uvbn7au Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEEKrq2ve9q9Ia+iT2eaoRlj1JFbu4FAlhzvxAACgkQaoRlj1JF bu5v8w//a/n/NYtH7ubBzmxRIyMf+uXEE7VC2h775yT9MIFaWlfY/OPiaer9sWql 9ZEVAFTtk9rPwktHXAkBNk3aAxAvN0UDvPZ7noYE99Db1lorJlYO0uJgcb9nsKwD BbLDpm92CK2qaZHlYYR7GvyPhUmwgIyqi8aKPMbABOyEsO2601FKfqf7hNT+w3Iq HIAN7DmALWpmb33IuAEKTG0wGRkpyiJXvMbZ21XCp9ySwEsCgLwOSFbQ3jHHKfHQ m6HIRz2fifmKq9sAjN8loko08GIFR+7MdlD+cuX54IJqh+8QcS+xBFb8/mQyLyk4 FeRfTibdPIyGTaNs/C0r96GM1gk/RgxTxVr/Il74e60m3iHdOVQdI6ZWl0rPhDxD 76wI2mHm051bXUFx5j5TXX8lkIlNp9QwH5/xCq0Sx+vOL9dfmkgX01P8eLu2BUix jSGTMmBKeJz46QWGwvs92jl04ujDRjnQLE45RfApMRWHGozz8ism+F4rt3LvnxLF rGNFVVS56OudpXaK0C4K48VrdygIdUvCeMNkunrZX7Nf4Kk/9BKNY5CJS7cVuLKU eaMCkxW4Kkll76AsaKyDrHFMeX03yb6rhjeOWxWp5VSz/Aj1DRYHsuYcMArpkcUT Tp89sHtywevZLcwIXDY7FZvg5BMSBBGugeHYE3oyCCd5Z8DUXPA= =D+vQ -----END PGP SIGNATURE----- --yius2fbq4uvbn7au-- From owner-svn-src-head@freebsd.org Mon Jan 9 17:05:41 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 23F5ECA7C85; Mon, 9 Jan 2017 17:05:41 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E5BE51A55; Mon, 9 Jan 2017 17:05:40 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v09H5eSX083110; Mon, 9 Jan 2017 17:05:40 GMT (envelope-from marius@FreeBSD.org) Received: (from marius@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v09H5ePE083109; Mon, 9 Jan 2017 17:05:40 GMT (envelope-from marius@FreeBSD.org) Message-Id: <201701091705.v09H5ePE083109@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: marius set sender to marius@FreeBSD.org using -f From: Marius Strobl Date: Mon, 9 Jan 2017 17:05:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r311793 - head/sys/dev/mmc X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 09 Jan 2017 17:05:41 -0000 Author: marius Date: Mon Jan 9 17:05:39 2017 New Revision: 311793 URL: https://svnweb.freebsd.org/changeset/base/311793 Log: In mmcsd_task(), bio_resid was not being set to 0 on a successful read or write, resulting in random short-read and short-write returns for requests. Fixing this fixes nominal block I/O via mmcsd(4). Obtained from: DragonFlyBSD (fd4b97583be1a1e57234713c25f6e81bc0411cb0) MFC after: 5 days Modified: head/sys/dev/mmc/mmcsd.c Modified: head/sys/dev/mmc/mmcsd.c ============================================================================== --- head/sys/dev/mmc/mmcsd.c Mon Jan 9 17:04:51 2017 (r311792) +++ head/sys/dev/mmc/mmcsd.c Mon Jan 9 17:05:39 2017 (r311793) @@ -545,6 +545,8 @@ mmcsd_task(void *arg) bp->bio_error = EIO; bp->bio_resid = (end - block) * sz; bp->bio_flags |= BIO_ERROR; + } else { + bp->bio_resid = 0; } biodone(bp); } From owner-svn-src-head@freebsd.org Mon Jan 9 17:07:16 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id AA761CA7E1B; Mon, 9 Jan 2017 17:07:16 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 206BB1CF6; Mon, 9 Jan 2017 17:07:14 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v09H7Drh083227; Mon, 9 Jan 2017 17:07:13 GMT (envelope-from marius@FreeBSD.org) Received: (from marius@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v09H7D8A083223; Mon, 9 Jan 2017 17:07:13 GMT (envelope-from marius@FreeBSD.org) Message-Id: <201701091707.v09H7D8A083223@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: marius set sender to marius@FreeBSD.org using -f From: Marius Strobl Date: Mon, 9 Jan 2017 17:07:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r311794 - 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-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 09 Jan 2017 17:07:16 -0000 Author: marius Date: Mon Jan 9 17:07:13 2017 New Revision: 311794 URL: https://svnweb.freebsd.org/changeset/base/311794 Log: - Add support for Intel Apollo Lake and Bay Trail eMMC controllers. Besides slots always having non-removable media, these HCIs require a custom hardware reset sequence after power-up. - Flesh out the support for Intel Braswell eMMC controllers further. Apart from also requiring said reset code, the timeout clock needs to be hardcoded to 1 MHz for these. Both the special reset and timeout clock handlings are implemented as global sdhci(4) quirks as the same treatment will be necessary for Intel eMMC controllers attached via ACPI (once sdhci(4) grows such a front-end). - In sdhci_init_slot(), use the right capability field for determining the announced bus width based on MMC_CAP_*_BIT_DATA. - Correct inverted sdhci_pci_softc member comments added in r276469. [1] Submitted by: Anton Yuzhaninov [1] MFC after: 5 days 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 Mon Jan 9 17:05:39 2017 (r311793) +++ head/sys/dev/sdhci/sdhci.c Mon Jan 9 17:07:13 2017 (r311794) @@ -376,6 +376,13 @@ sdhci_set_power(struct sdhci_slot *slot, /* Turn on the power. */ pwr |= SDHCI_POWER_ON; WR1(slot, SDHCI_POWER_CONTROL, pwr); + + if (slot->quirks & SDHCI_QUIRK_INTEL_POWER_UP_RESET) { + WR1(slot, SDHCI_POWER_CONTROL, pwr | 0x10); + DELAY(10); + WR1(slot, SDHCI_POWER_CONTROL, pwr); + DELAY(300); + } } static void @@ -622,9 +629,11 @@ sdhci_init_slot(device_t dev, struct sdh device_printf(dev, "Hardware doesn't specify base clock " "frequency, using %dMHz as default.\n", SDHCI_DEFAULT_MAX_FREQ); } - /* Calculate timeout clock frequency. */ + /* Calculate/set timeout clock frequency. */ if (slot->quirks & SDHCI_QUIRK_DATA_TIMEOUT_USES_SDCLK) { slot->timeout_clk = slot->max_clk / 1000; + } else if (slot->quirks & SDHCI_QUIRK_DATA_TIMEOUT_1MHZ) { + slot->timeout_clk = 1000; } else { slot->timeout_clk = (caps & SDHCI_TIMEOUT_CLK_MASK) >> SDHCI_TIMEOUT_CLK_SHIFT; @@ -668,6 +677,8 @@ sdhci_init_slot(device_t dev, struct sdh slot->opt &= ~SDHCI_HAVE_DMA; if (slot->quirks & SDHCI_QUIRK_FORCE_DMA) slot->opt |= SDHCI_HAVE_DMA; + if (slot->quirks & SDHCI_QUIRK_ALL_SLOTS_NON_REMOVABLE) + slot->opt |= SDHCI_NON_REMOVABLE; /* * Use platform-provided transfer backend @@ -680,8 +691,9 @@ sdhci_init_slot(device_t dev, struct sdh slot_printf(slot, "%uMHz%s %s%s%s%s %s\n", slot->max_clk / 1000000, (caps & SDHCI_CAN_DO_HISPD) ? " HS" : "", - (caps & MMC_CAP_8_BIT_DATA) ? "8bits" : - ((caps & MMC_CAP_4_BIT_DATA) ? "4bits" : "1bit"), + (slot->host.caps & MMC_CAP_8_BIT_DATA) ? "8bits" : + ((slot->host.caps & MMC_CAP_4_BIT_DATA) ? "4bits" : + "1bit"), (caps & SDHCI_CAN_VDD_330) ? " 3.3V" : "", (caps & SDHCI_CAN_VDD_300) ? " 3.0V" : "", (caps & SDHCI_CAN_VDD_180) ? " 1.8V" : "", Modified: head/sys/dev/sdhci/sdhci.h ============================================================================== --- head/sys/dev/sdhci/sdhci.h Mon Jan 9 17:05:39 2017 (r311793) +++ head/sys/dev/sdhci/sdhci.h Mon Jan 9 17:07:13 2017 (r311794) @@ -66,7 +66,13 @@ /* Alternate clock source is required when supplying a 400 KHz clock. */ #define SDHCI_QUIRK_BCM577XX_400KHZ_CLKSRC (1<<16) /* Card insert/remove interrupts don't work, polling required. */ -#define SDHCI_QUIRK_POLL_CARD_PRESENT (1<<17) +#define SDHCI_QUIRK_POLL_CARD_PRESENT (1<<17) +/* All controller slots are non-removable. */ +#define SDHCI_QUIRK_ALL_SLOTS_NON_REMOVABLE (1<<18) +/* Issue custom Intel controller reset sequence after power-up. */ +#define SDHCI_QUIRK_INTEL_POWER_UP_RESET (1<<19) +/* Data timeout is invalid, use 1 MHz clock instead. */ +#define SDHCI_QUIRK_DATA_TIMEOUT_1MHZ (1<<20) /* * Controller registers Modified: head/sys/dev/sdhci/sdhci_pci.c ============================================================================== --- head/sys/dev/sdhci/sdhci_pci.c Mon Jan 9 17:05:39 2017 (r311793) +++ head/sys/dev/sdhci/sdhci_pci.c Mon Jan 9 17:07:13 2017 (r311794) @@ -107,8 +107,19 @@ static const struct sdhci_device { SDHCI_QUIRK_RESET_AFTER_REQUEST }, { 0x16bc14e4, 0xffff, "Broadcom BCM577xx SDXC/MMC Card Reader", SDHCI_QUIRK_BCM577XX_400KHZ_CLKSRC }, - { 0x22948086, 0xffff, "Intel Braswell Storage Cluster Control MMC Port", - 0 }, + { 0x0f148086, 0xffff, "Intel Bay Trail eMMC 4.5 Controller", + SDHCI_QUIRK_ALL_SLOTS_NON_REMOVABLE | + SDHCI_QUIRK_INTEL_POWER_UP_RESET }, + { 0x0f508086, 0xffff, "Intel Bay Trail eMMC 4.5 Controller", + SDHCI_QUIRK_ALL_SLOTS_NON_REMOVABLE | + SDHCI_QUIRK_INTEL_POWER_UP_RESET }, + { 0x22948086, 0xffff, "Intel Braswell eMMC 4.5.1 Controller", + SDHCI_QUIRK_ALL_SLOTS_NON_REMOVABLE | + SDHCI_QUIRK_DATA_TIMEOUT_1MHZ | + SDHCI_QUIRK_INTEL_POWER_UP_RESET }, + { 0x5acc8086, 0xffff, "Intel Apollo Lake eMMC 5.0 Controller", + SDHCI_QUIRK_ALL_SLOTS_NON_REMOVABLE | + SDHCI_QUIRK_INTEL_POWER_UP_RESET }, { 0, 0xffff, NULL, 0 } }; @@ -121,8 +132,8 @@ struct sdhci_pci_softc { int num_slots; /* Number of slots on this controller */ struct sdhci_slot slots[6]; struct resource *mem_res[6]; /* Memory resource */ - uint8_t cfg_freq; /* Saved mode */ - uint8_t cfg_mode; /* Saved frequency */ + uint8_t cfg_freq; /* Saved frequency */ + uint8_t cfg_mode; /* Saved mode */ }; static int sdhci_enable_msi = 1; From owner-svn-src-head@freebsd.org Mon Jan 9 17:10:51 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 67A5ECA717A; Mon, 9 Jan 2017 17:10:51 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 213E5138F; Mon, 9 Jan 2017 17:10:51 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v09HAojV083510; Mon, 9 Jan 2017 17:10:50 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v09HAo4j083509; Mon, 9 Jan 2017 17:10:50 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201701091710.v09HAo4j083509@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Mon, 9 Jan 2017 17:10:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r311797 - 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-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 09 Jan 2017 17:10:51 -0000 Author: ian Date: Mon Jan 9 17:10:50 2017 New Revision: 311797 URL: https://svnweb.freebsd.org/changeset/base/311797 Log: Add sdhci_handle_card_present_locked() that can be called from the interrupt handler which already holds the mutex, and have sdhci_handle_card_present() be just a tiny wrapper that does the locking for external callers. This should fix the recursive locking panics seen on rpi3. Reported by: Shawn Webb Modified: head/sys/dev/sdhci/sdhci.c Modified: head/sys/dev/sdhci/sdhci.c ============================================================================== --- head/sys/dev/sdhci/sdhci.c Mon Jan 9 17:09:53 2017 (r311796) +++ head/sys/dev/sdhci/sdhci.c Mon Jan 9 17:10:50 2017 (r311797) @@ -521,8 +521,8 @@ sdhci_card_task(void *arg, int pending) } } -void -sdhci_handle_card_present(struct sdhci_slot *slot, bool is_present) +static void +sdhci_handle_card_present_locked(struct sdhci_slot *slot, bool is_present) { bool was_present; @@ -537,7 +537,6 @@ sdhci_handle_card_present(struct sdhci_s * because once power is removed, a full card re-init is needed, and * that happens by deleting and recreating the child device. */ - SDHCI_LOCK(slot); was_present = slot->dev != NULL; if (!was_present && is_present) { taskqueue_enqueue_timeout(taskqueue_swi_giant, @@ -545,6 +544,14 @@ sdhci_handle_card_present(struct sdhci_s } else if (was_present && !is_present) { taskqueue_enqueue(taskqueue_swi_giant, &slot->card_task); } +} + +void +sdhci_handle_card_present(struct sdhci_slot *slot, bool is_present) +{ + + SDHCI_LOCK(slot); + sdhci_handle_card_present_locked(slot, is_present); SDHCI_UNLOCK(slot); } @@ -1402,7 +1409,7 @@ sdhci_generic_intr(struct sdhci_slot *sl WR4(slot, SDHCI_SIGNAL_ENABLE, slot->intmask); WR4(slot, SDHCI_INT_STATUS, intmask & (SDHCI_INT_CARD_INSERT | SDHCI_INT_CARD_REMOVE)); - sdhci_handle_card_present(slot, present); + sdhci_handle_card_present_locked(slot, present); intmask &= ~(SDHCI_INT_CARD_INSERT | SDHCI_INT_CARD_REMOVE); } /* Handle command interrupts. */ From owner-svn-src-head@freebsd.org Mon Jan 9 17:13:03 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E7BDCCA7440; Mon, 9 Jan 2017 17:13:03 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from mail.baldwin.cx (bigwig.baldwin.cx [96.47.65.170]) (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 C517119E1; Mon, 9 Jan 2017 17:13:03 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from ralph.baldwin.cx (c-73-231-226-104.hsd1.ca.comcast.net [73.231.226.104]) by mail.baldwin.cx (Postfix) with ESMTPSA id 2203410B56B; Mon, 9 Jan 2017 12:12:56 -0500 (EST) From: John Baldwin To: "Conrad E. Meyer" Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r311667 - in head/sys/contrib/dev/acpica: components/namespace components/tables include Date: Mon, 09 Jan 2017 09:08:26 -0800 Message-ID: <7685799.RHuinLcsJW@ralph.baldwin.cx> User-Agent: KMail/4.14.10 (FreeBSD/11.0-STABLE; KDE/4.14.10; amd64; ; ) In-Reply-To: <201701080626.v086QXDx022252@repo.freebsd.org> References: <201701080626.v086QXDx022252@repo.freebsd.org> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.4.3 (mail.baldwin.cx); Mon, 09 Jan 2017 12:12:56 -0500 (EST) X-Virus-Scanned: clamav-milter 0.99.2 at mail.baldwin.cx X-Virus-Status: Clean X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 09 Jan 2017 17:13:04 -0000 On Sunday, January 08, 2017 06:26:33 AM Conrad E. Meyer wrote: > Author: cem > Date: Sun Jan 8 06:26:33 2017 > New Revision: 311667 > URL: https://svnweb.freebsd.org/changeset/base/311667 > > Log: > Add some additional ACPI methods for DRM > > Add AcpiGetDataFull and AcpiGetTableWithSize. > > Submitted by: Matt Macy Have these been submitted upstream? The Intel folks are generally quite responsive on freebsd-acpi@FreeBSD.org and this codebase is actively maintained externally. -- John Baldwin From owner-svn-src-head@freebsd.org Mon Jan 9 18:01:42 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C0537CA7A63; Mon, 9 Jan 2017 18:01:42 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2610:1c1:1:6074::16:84]) by mx1.freebsd.org (Postfix) with ESMTP id 3D5D6197E; Mon, 9 Jan 2017 18:01:42 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Subject: Re: svn commit: r311667 - in head/sys/contrib/dev/acpica: components/namespace components/tables include To: John Baldwin , "Conrad E. Meyer" References: <201701080626.v086QXDx022252@repo.freebsd.org> <7685799.RHuinLcsJW@ralph.baldwin.cx> Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org From: Jung-uk Kim Message-ID: <53d948ef-9e7e-422f-aead-39437abc8352@FreeBSD.org> Date: Mon, 9 Jan 2017 13:01:41 -0500 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:45.0) Gecko/20100101 Thunderbird/45.6.0 MIME-Version: 1.0 In-Reply-To: <7685799.RHuinLcsJW@ralph.baldwin.cx> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 09 Jan 2017 18:01:42 -0000 On 01/09/2017 12:08, John Baldwin wrote: > On Sunday, January 08, 2017 06:26:33 AM Conrad E. Meyer wrote: >> Author: cem >> Date: Sun Jan 8 06:26:33 2017 >> New Revision: 311667 >> URL: https://svnweb.freebsd.org/changeset/base/311667 >> >> Log: >> Add some additional ACPI methods for DRM >> >> Add AcpiGetDataFull and AcpiGetTableWithSize. >> >> Submitted by: Matt Macy > > Have these been submitted upstream? The Intel folks are generally quite > responsive on freebsd-acpi@FreeBSD.org and this codebase is actively > maintained externally. Please submit upstream first. https://github.com/acpica/acpica Jung-uk Kim From owner-svn-src-head@freebsd.org Mon Jan 9 18:18:17 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 90C08CA72D7; Mon, 9 Jan 2017 18:18:17 +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 58D4717C6; Mon, 9 Jan 2017 18:18:17 +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 v09IIGZ7013902; Mon, 9 Jan 2017 18:18:16 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v09IIFaZ013894; Mon, 9 Jan 2017 18:18:15 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201701091818.v09IIFaZ013894@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Mon, 9 Jan 2017 18:18:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r311804 - in head: sys/cam/ctl usr.bin/ctlstat X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 09 Jan 2017 18:18:17 -0000 Author: mav Date: Mon Jan 9 18:18:15 2017 New Revision: 311804 URL: https://svnweb.freebsd.org/changeset/base/311804 Log: Rewrite CTL statistics in more simple and scalable way. Instead of collecting statistics for each combination of ports and logical units, that consumed ~45KB per LU with present number of ports, collect separate statistics for every port and every logical unit separately, that consume only 176 bytes per each single LU/port. This reduces struct ctl_lun size down to just 6KB. Also new IOCTL API/ABI does not hardcode number of LUs/ports, and should allow handling of very large quantities. MFC after: 2 weeks (probably keeping old API enabled for some time) Modified: head/sys/cam/ctl/ctl.c head/sys/cam/ctl/ctl_backend.h head/sys/cam/ctl/ctl_frontend.c head/sys/cam/ctl/ctl_frontend.h head/sys/cam/ctl/ctl_ioctl.h head/sys/cam/ctl/ctl_private.h head/usr.bin/ctlstat/ctlstat.8 head/usr.bin/ctlstat/ctlstat.c Modified: head/sys/cam/ctl/ctl.c ============================================================================== --- head/sys/cam/ctl/ctl.c Mon Jan 9 17:25:23 2017 (r311803) +++ head/sys/cam/ctl/ctl.c Mon Jan 9 18:18:15 2017 (r311804) @@ -1,7 +1,7 @@ /*- * Copyright (c) 2003-2009 Silicon Graphics International Corp. * Copyright (c) 2012 The FreeBSD Foundation - * Copyright (c) 2015 Alexander Motin + * Copyright (c) 2014-2017 Alexander Motin * All rights reserved. * * Portions of this software were developed by Edward Tomasz Napierala @@ -2567,6 +2567,7 @@ ctl_ioctl(struct cdev *dev, u_long cmd, struct thread *td) { struct ctl_softc *softc = dev->si_drv1; + struct ctl_port *port; struct ctl_lun *lun; int retval; @@ -2778,6 +2779,7 @@ ctl_ioctl(struct cdev *dev, u_long cmd, #endif /* CTL_IO_DELAY */ break; } +#ifdef CTL_LEGACY_STATS case CTL_GETSTATS: { struct ctl_stats *stats = (struct ctl_stats *)addr; int i; @@ -2790,26 +2792,26 @@ ctl_ioctl(struct cdev *dev, u_long cmd, stats->status = CTL_SS_OK; stats->fill_len = 0; STAILQ_FOREACH(lun, &softc->lun_list, links) { - if (stats->fill_len + sizeof(lun->stats) > + if (stats->fill_len + sizeof(lun->legacy_stats) > stats->alloc_len) { stats->status = CTL_SS_NEED_MORE_SPACE; break; } - retval = copyout(&lun->stats, &stats->lun_stats[i++], - sizeof(lun->stats)); + retval = copyout(&lun->legacy_stats, &stats->lun_stats[i++], + sizeof(lun->legacy_stats)); if (retval != 0) break; - stats->fill_len += sizeof(lun->stats); + stats->fill_len += sizeof(lun->legacy_stats); } stats->num_luns = softc->num_luns; -#ifdef CTL_TIME_IO - stats->flags = CTL_STATS_FLAG_TIME_VALID; -#else stats->flags = CTL_STATS_FLAG_NONE; +#ifdef CTL_TIME_IO + stats->flags |= CTL_STATS_FLAG_TIME_VALID; #endif getnanouptime(&stats->timestamp); break; } +#endif /* CTL_LEGACY_STATS */ case CTL_ERROR_INJECT: { struct ctl_error_desc *err_desc, *new_err_desc; @@ -3397,6 +3399,72 @@ ctl_ioctl(struct cdev *dev, u_long cmd, ctl_isc_announce_port(port); break; } + case CTL_GET_LUN_STATS: { + struct ctl_get_io_stats *stats = (struct ctl_get_io_stats *)addr; + int i; + + /* + * XXX KDM no locking here. If the LUN list changes, + * things can blow up. + */ + i = 0; + stats->status = CTL_SS_OK; + stats->fill_len = 0; + STAILQ_FOREACH(lun, &softc->lun_list, links) { + if (lun->lun < stats->first_item) + continue; + if (stats->fill_len + sizeof(lun->stats) > + stats->alloc_len) { + stats->status = CTL_SS_NEED_MORE_SPACE; + break; + } + retval = copyout(&lun->stats, &stats->stats[i++], + sizeof(lun->stats)); + if (retval != 0) + break; + stats->fill_len += sizeof(lun->stats); + } + stats->num_items = softc->num_luns; + stats->flags = CTL_STATS_FLAG_NONE; +#ifdef CTL_TIME_IO + stats->flags |= CTL_STATS_FLAG_TIME_VALID; +#endif + getnanouptime(&stats->timestamp); + break; + } + case CTL_GET_PORT_STATS: { + struct ctl_get_io_stats *stats = (struct ctl_get_io_stats *)addr; + int i; + + /* + * XXX KDM no locking here. If the LUN list changes, + * things can blow up. + */ + i = 0; + stats->status = CTL_SS_OK; + stats->fill_len = 0; + STAILQ_FOREACH(port, &softc->port_list, links) { + if (port->targ_port < stats->first_item) + continue; + if (stats->fill_len + sizeof(port->stats) > + stats->alloc_len) { + stats->status = CTL_SS_NEED_MORE_SPACE; + break; + } + retval = copyout(&port->stats, &stats->stats[i++], + sizeof(port->stats)); + if (retval != 0) + break; + stats->fill_len += sizeof(port->stats); + } + stats->num_items = softc->num_ports; + stats->flags = CTL_STATS_FLAG_NONE; +#ifdef CTL_TIME_IO + stats->flags |= CTL_STATS_FLAG_TIME_VALID; +#endif + getnanouptime(&stats->timestamp); + break; + } default: { /* XXX KDM should we fix this? */ #if 0 @@ -4391,7 +4459,7 @@ ctl_alloc_lun(struct ctl_softc *ctl_soft struct scsi_vpd_id_descriptor *desc; struct scsi_vpd_id_t10 *t10id; const char *eui, *naa, *scsiname, *uuid, *vendor, *value; - int lun_number, i, lun_malloced; + int lun_number, lun_malloced; int devidlen, idlen1, idlen2 = 0, len; if (be_lun == NULL) @@ -4613,13 +4681,16 @@ ctl_alloc_lun(struct ctl_softc *ctl_soft ctl_softc->num_luns++; /* Setup statistics gathering */ - lun->stats.device_type = be_lun->lun_type; - lun->stats.lun_number = lun_number; - lun->stats.blocksize = be_lun->blocksize; +#ifdef CTL_LEGACY_STATS + lun->legacy_stats.device_type = be_lun->lun_type; + lun->legacy_stats.lun_number = lun_number; + lun->legacy_stats.blocksize = be_lun->blocksize; if (be_lun->blocksize == 0) - lun->stats.flags = CTL_LUN_STATS_NO_BLOCKSIZE; - for (i = 0;i < CTL_MAX_PORTS;i++) - lun->stats.ports[i].targ_port = i; + lun->legacy_stats.flags = CTL_LUN_STATS_NO_BLOCKSIZE; + for (len = 0; len < CTL_MAX_PORTS; len++) + lun->legacy_stats.ports[len].targ_port = len; +#endif /* CTL_LEGACY_STATS */ + lun->stats.item = lun_number; mtx_unlock(&ctl_softc->ctl_lock); @@ -6685,9 +6756,7 @@ ctl_sap_log_sense_handler(struct ctl_scs { struct ctl_lun *lun = CTL_LUN(ctsio); struct stat_page *data; - uint64_t rn, wn, rb, wb; - struct bintime rt, wt; - int i; + struct bintime *t; data = (struct stat_page *)page_index->page_data; @@ -6695,28 +6764,21 @@ ctl_sap_log_sense_handler(struct ctl_scs data->sap.hdr.param_control = SLP_LBIN; data->sap.hdr.param_len = sizeof(struct scsi_log_stat_and_perf) - sizeof(struct scsi_log_param_header); - rn = wn = rb = wb = 0; - bintime_clear(&rt); - bintime_clear(&wt); - for (i = 0; i < CTL_MAX_PORTS; i++) { - rn += lun->stats.ports[i].operations[CTL_STATS_READ]; - wn += lun->stats.ports[i].operations[CTL_STATS_WRITE]; - rb += lun->stats.ports[i].bytes[CTL_STATS_READ]; - wb += lun->stats.ports[i].bytes[CTL_STATS_WRITE]; - bintime_add(&rt, &lun->stats.ports[i].time[CTL_STATS_READ]); - bintime_add(&wt, &lun->stats.ports[i].time[CTL_STATS_WRITE]); - } - scsi_u64to8b(rn, data->sap.read_num); - scsi_u64to8b(wn, data->sap.write_num); - if (lun->stats.blocksize > 0) { - scsi_u64to8b(wb / lun->stats.blocksize, - data->sap.recvieved_lba); - scsi_u64to8b(rb / lun->stats.blocksize, - data->sap.transmitted_lba); + scsi_u64to8b(lun->stats.operations[CTL_STATS_READ], + data->sap.read_num); + scsi_u64to8b(lun->stats.operations[CTL_STATS_WRITE], + data->sap.write_num); + if (lun->be_lun->blocksize > 0) { + scsi_u64to8b(lun->stats.bytes[CTL_STATS_WRITE] / + lun->be_lun->blocksize, data->sap.recvieved_lba); + scsi_u64to8b(lun->stats.bytes[CTL_STATS_READ] / + lun->be_lun->blocksize, data->sap.transmitted_lba); } - scsi_u64to8b((uint64_t)rt.sec * 1000 + rt.frac / (UINT64_MAX / 1000), + t = &lun->stats.time[CTL_STATS_READ]; + scsi_u64to8b((uint64_t)t->sec * 1000 + t->frac / (UINT64_MAX / 1000), data->sap.read_int); - scsi_u64to8b((uint64_t)wt.sec * 1000 + wt.frac / (UINT64_MAX / 1000), + t = &lun->stats.time[CTL_STATS_WRITE]; + scsi_u64to8b((uint64_t)t->sec * 1000 + t->frac / (UINT64_MAX / 1000), data->sap.write_int); scsi_u64to8b(0, data->sap.weighted_num); scsi_u64to8b(0, data->sap.weighted_int); @@ -13053,13 +13115,13 @@ static void ctl_process_done(union ctl_io *io) { struct ctl_softc *softc = CTL_SOFTC(io); + struct ctl_port *port = CTL_PORT(io); struct ctl_lun *lun = CTL_LUN(io); void (*fe_done)(union ctl_io *io); union ctl_ha_msg msg; - uint32_t targ_port = io->io_hdr.nexus.targ_port; CTL_DEBUG_PRINT(("ctl_process_done\n")); - fe_done = softc->ctl_ports[targ_port]->fe_done; + fe_done = port->fe_done; #ifdef CTL_TIME_IO if ((time_uptime - io->io_hdr.start_time) > ctl_time_io_secs) { @@ -13162,11 +13224,13 @@ ctl_process_done(union ctl_io *io) */ if ((io->io_hdr.status & CTL_STATUS_MASK) == CTL_SUCCESS && io->io_hdr.io_type == CTL_IO_SCSI) { -#ifdef CTL_TIME_IO - struct bintime cur_bt; -#endif int type; +#ifdef CTL_TIME_IO + struct bintime bt; + getbinuptime(&bt); + bintime_sub(&bt, &io->io_hdr.start_bt); +#endif if ((io->io_hdr.flags & CTL_FLAG_DATA_MASK) == CTL_FLAG_DATA_IN) type = CTL_STATS_READ; @@ -13176,18 +13240,38 @@ ctl_process_done(union ctl_io *io) else type = CTL_STATS_NO_IO; - lun->stats.ports[targ_port].bytes[type] += +#ifdef CTL_LEGACY_STATS + uint32_t targ_port = port->targ_port; + lun->legacy_stats.ports[targ_port].bytes[type] += io->scsiio.kern_total_len; - lun->stats.ports[targ_port].operations[type]++; + lun->legacy_stats.ports[targ_port].operations[type] ++; + lun->legacy_stats.ports[targ_port].num_dmas[type] += + io->io_hdr.num_dmas; #ifdef CTL_TIME_IO - bintime_add(&lun->stats.ports[targ_port].dma_time[type], + bintime_add(&lun->legacy_stats.ports[targ_port].dma_time[type], &io->io_hdr.dma_bt); - getbinuptime(&cur_bt); - bintime_sub(&cur_bt, &io->io_hdr.start_bt); - bintime_add(&lun->stats.ports[targ_port].time[type], &cur_bt); + bintime_add(&lun->legacy_stats.ports[targ_port].time[type], + &bt); #endif - lun->stats.ports[targ_port].num_dmas[type] += - io->io_hdr.num_dmas; +#endif /* CTL_LEGACY_STATS */ + + lun->stats.bytes[type] += io->scsiio.kern_total_len; + lun->stats.operations[type] ++; + lun->stats.dmas[type] += io->io_hdr.num_dmas; +#ifdef CTL_TIME_IO + bintime_add(&lun->stats.dma_time[type], &io->io_hdr.dma_bt); + bintime_add(&lun->stats.time[type], &bt); +#endif + + mtx_lock(&port->port_lock); + port->stats.bytes[type] += io->scsiio.kern_total_len; + port->stats.operations[type] ++; + port->stats.dmas[type] += io->io_hdr.num_dmas; +#ifdef CTL_TIME_IO + bintime_add(&port->stats.dma_time[type], &io->io_hdr.dma_bt); + bintime_add(&port->stats.time[type], &bt); +#endif + mtx_unlock(&port->port_lock); } /* Modified: head/sys/cam/ctl/ctl_backend.h ============================================================================== --- head/sys/cam/ctl/ctl_backend.h Mon Jan 9 17:25:23 2017 (r311803) +++ head/sys/cam/ctl/ctl_backend.h Mon Jan 9 18:18:15 2017 (r311804) @@ -1,6 +1,6 @@ /*- * Copyright (c) 2003 Silicon Graphics International Corp. - * Copyright (c) 2014-2015 Alexander Motin + * Copyright (c) 2014-2017 Alexander Motin * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -40,54 +40,7 @@ #ifndef _CTL_BACKEND_H_ #define _CTL_BACKEND_H_ -/* - * XXX KDM move this to another header file? - */ -#define CTL_BE_NAME_LEN 32 - -/* - * The ID_REQ flag is used to say that the caller has requested a - * particular LUN ID in the req_lun_id field. If we cannot allocate that - * LUN ID, the ctl_add_lun() call will fail. - * - * The STOPPED flag tells us that the LUN should default to the powered - * off state. It will return 0x04,0x02 until it is powered up. ("Logical - * unit not ready, initializing command required.") - * - * The NO_MEDIA flag tells us that the LUN has no media inserted. - * - * The PRIMARY flag tells us that this LUN is registered as a Primary LUN - * which is accessible via the Master shelf controller in an HA. This flag - * being set indicates a Primary LUN. This flag being reset represents a - * Secondary LUN controlled by the Secondary controller in an HA - * configuration. Flag is applicable at this time to T_DIRECT types. - * - * The SERIAL_NUM flag tells us that the serial_num field is filled in and - * valid for use in SCSI INQUIRY VPD page 0x80. - * - * The DEVID flag tells us that the device_id field is filled in and - * valid for use in SCSI INQUIRY VPD page 0x83. - * - * The DEV_TYPE flag tells us that the device_type field is filled in. - * - * The EJECTED flag tells us that the removable LUN has tray open. - * - * The UNMAP flag tells us that this LUN supports UNMAP. - * - * The OFFLINE flag tells us that this LUN can not access backing store. - */ -typedef enum { - CTL_LUN_FLAG_ID_REQ = 0x01, - CTL_LUN_FLAG_STOPPED = 0x02, - CTL_LUN_FLAG_NO_MEDIA = 0x04, - CTL_LUN_FLAG_PRIMARY = 0x08, - CTL_LUN_FLAG_SERIAL_NUM = 0x10, - CTL_LUN_FLAG_DEVID = 0x20, - CTL_LUN_FLAG_DEV_TYPE = 0x40, - CTL_LUN_FLAG_UNMAP = 0x80, - CTL_LUN_FLAG_EJECTED = 0x100, - CTL_LUN_FLAG_READONLY = 0x200 -} ctl_backend_lun_flags; +#include typedef enum { CTL_LUN_SERSEQ_OFF, Modified: head/sys/cam/ctl/ctl_frontend.c ============================================================================== --- head/sys/cam/ctl/ctl_frontend.c Mon Jan 9 17:25:23 2017 (r311803) +++ head/sys/cam/ctl/ctl_frontend.c Mon Jan 9 18:18:15 2017 (r311804) @@ -1,5 +1,6 @@ /*- * Copyright (c) 2003 Silicon Graphics International Corp. + * Copyright (c) 2014-2017 Alexander Motin * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -192,13 +193,14 @@ error: mtx_unlock(&softc->ctl_lock); return (retval); } + port->targ_port = port_num; port->ctl_pool_ref = pool; - if (port->options.stqh_first == NULL) STAILQ_INIT(&port->options); + port->stats.item = port_num; + mtx_init(&port->port_lock, "CTL port", NULL, MTX_DEF); mtx_lock(&softc->ctl_lock); - port->targ_port = port_num; STAILQ_INSERT_TAIL(&port->frontend->port_list, port, fe_links); for (tport = NULL, nport = STAILQ_FIRST(&softc->port_list); nport != NULL && nport->targ_port < port_num; @@ -218,17 +220,11 @@ int ctl_port_deregister(struct ctl_port *port) { struct ctl_softc *softc = port->ctl_softc; - struct ctl_io_pool *pool; - int retval, i; - - retval = 0; - - pool = (struct ctl_io_pool *)port->ctl_pool_ref; + struct ctl_io_pool *pool = (struct ctl_io_pool *)port->ctl_pool_ref; + int i; - if (port->targ_port == -1) { - retval = 1; - goto bailout; - } + if (port->targ_port == -1) + return (1); mtx_lock(&softc->ctl_lock); STAILQ_REMOVE(&softc->port_list, port, ctl_port, links); @@ -251,9 +247,9 @@ ctl_port_deregister(struct ctl_port *por for (i = 0; i < port->max_initiators; i++) free(port->wwpn_iid[i].name, M_CTL); free(port->wwpn_iid, M_CTL); + mtx_destroy(&port->port_lock); -bailout: - return (retval); + return (0); } void Modified: head/sys/cam/ctl/ctl_frontend.h ============================================================================== --- head/sys/cam/ctl/ctl_frontend.h Mon Jan 9 17:25:23 2017 (r311803) +++ head/sys/cam/ctl/ctl_frontend.h Mon Jan 9 18:18:15 2017 (r311804) @@ -1,5 +1,6 @@ /*- * Copyright (c) 2003 Silicon Graphics International Corp. + * Copyright (c) 2014-2017 Alexander Motin * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -39,6 +40,8 @@ #ifndef _CTL_FRONTEND_H_ #define _CTL_FRONTEND_H_ +#include + typedef enum { CTL_PORT_STATUS_NONE = 0x00, CTL_PORT_STATUS_ONLINE = 0x01, @@ -243,6 +246,8 @@ struct ctl_port { struct ctl_devid *port_devid; /* passed to CTL */ struct ctl_devid *target_devid; /* passed to CTL */ struct ctl_devid *init_devid; /* passed to CTL */ + struct ctl_io_stats stats; /* used by CTL */ + struct mtx port_lock; /* used by CTL */ STAILQ_ENTRY(ctl_port) fe_links; /* used by CTL */ STAILQ_ENTRY(ctl_port) links; /* used by CTL */ }; Modified: head/sys/cam/ctl/ctl_ioctl.h ============================================================================== --- head/sys/cam/ctl/ctl_ioctl.h Mon Jan 9 17:25:23 2017 (r311803) +++ head/sys/cam/ctl/ctl_ioctl.h Mon Jan 9 18:18:15 2017 (r311804) @@ -1,6 +1,7 @@ /*- * Copyright (c) 2003 Silicon Graphics International Corp. * Copyright (c) 2011 Spectra Logic Corporation + * Copyright (c) 2014-2017 Alexander Motin * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -80,6 +81,9 @@ /* Hopefully this won't conflict with new misc devices that pop up */ #define CTL_MINOR 225 +/* Legacy statistics accumulated for every port for every LU. */ +//#define CTL_LEGACY_STATS 1 + typedef enum { CTL_DELAY_TYPE_NONE, CTL_DELAY_TYPE_CONT, @@ -117,6 +121,18 @@ typedef enum { #define CTL_STATS_NUM_TYPES 3 typedef enum { + CTL_SS_OK, + CTL_SS_NEED_MORE_SPACE, + CTL_SS_ERROR +} ctl_stats_status; + +typedef enum { + CTL_STATS_FLAG_NONE = 0x00, + CTL_STATS_FLAG_TIME_VALID = 0x01 +} ctl_stats_flags; + +#ifdef CTL_LEGACY_STATS +typedef enum { CTL_LUN_STATS_NO_BLOCKSIZE = 0x01 } ctl_lun_stats_flags; @@ -137,17 +153,6 @@ struct ctl_lun_io_stats { struct ctl_lun_io_port_stats ports[CTL_MAX_PORTS]; }; -typedef enum { - CTL_SS_OK, - CTL_SS_NEED_MORE_SPACE, - CTL_SS_ERROR -} ctl_stats_status; - -typedef enum { - CTL_STATS_FLAG_NONE = 0x00, - CTL_STATS_FLAG_TIME_VALID = 0x01 -} ctl_stats_flags; - struct ctl_stats { int alloc_len; /* passed to kernel */ struct ctl_lun_io_stats *lun_stats; /* passed to/from kernel */ @@ -157,6 +162,27 @@ struct ctl_stats { ctl_stats_flags flags; /* passed to userland */ struct timespec timestamp; /* passed to userland */ }; +#endif /* CTL_LEGACY_STATS */ + +struct ctl_io_stats { + uint32_t item; + uint64_t bytes[CTL_STATS_NUM_TYPES]; + uint64_t operations[CTL_STATS_NUM_TYPES]; + uint64_t dmas[CTL_STATS_NUM_TYPES]; + struct bintime time[CTL_STATS_NUM_TYPES]; + struct bintime dma_time[CTL_STATS_NUM_TYPES]; +}; + +struct ctl_get_io_stats { + struct ctl_io_stats *stats; /* passed to/from kernel */ + size_t alloc_len; /* passed to kernel */ + size_t fill_len; /* passed to userland */ + int first_item; /* passed to kernel */ + int num_items; /* passed to userland */ + ctl_stats_status status; /* passed to userland */ + ctl_stats_flags flags; /* passed to userland */ + struct timespec timestamp; /* passed to userland */ +}; /* * The types of errors that can be injected: @@ -342,12 +368,54 @@ typedef enum { CTL_LUNREQ_MODIFY, } ctl_lunreq_type; +/* + * The ID_REQ flag is used to say that the caller has requested a + * particular LUN ID in the req_lun_id field. If we cannot allocate that + * LUN ID, the ctl_add_lun() call will fail. + * + * The STOPPED flag tells us that the LUN should default to the powered + * off state. It will return 0x04,0x02 until it is powered up. ("Logical + * unit not ready, initializing command required.") + * + * The NO_MEDIA flag tells us that the LUN has no media inserted. + * + * The PRIMARY flag tells us that this LUN is registered as a Primary LUN + * which is accessible via the Master shelf controller in an HA. This flag + * being set indicates a Primary LUN. This flag being reset represents a + * Secondary LUN controlled by the Secondary controller in an HA + * configuration. Flag is applicable at this time to T_DIRECT types. + * + * The SERIAL_NUM flag tells us that the serial_num field is filled in and + * valid for use in SCSI INQUIRY VPD page 0x80. + * + * The DEVID flag tells us that the device_id field is filled in and + * valid for use in SCSI INQUIRY VPD page 0x83. + * + * The DEV_TYPE flag tells us that the device_type field is filled in. + * + * The EJECTED flag tells us that the removable LUN has tray open. + * + * The UNMAP flag tells us that this LUN supports UNMAP. + * + * The OFFLINE flag tells us that this LUN can not access backing store. + */ +typedef enum { + CTL_LUN_FLAG_ID_REQ = 0x01, + CTL_LUN_FLAG_STOPPED = 0x02, + CTL_LUN_FLAG_NO_MEDIA = 0x04, + CTL_LUN_FLAG_PRIMARY = 0x08, + CTL_LUN_FLAG_SERIAL_NUM = 0x10, + CTL_LUN_FLAG_DEVID = 0x20, + CTL_LUN_FLAG_DEV_TYPE = 0x40, + CTL_LUN_FLAG_UNMAP = 0x80, + CTL_LUN_FLAG_EJECTED = 0x100, + CTL_LUN_FLAG_READONLY = 0x200 +} ctl_backend_lun_flags; /* * LUN creation parameters: * - * flags: Various LUN flags, see ctl_backend.h for a - * description of the flag values and meanings. + * flags: Various LUN flags, see above. * * device_type: The SCSI device type. e.g. 0 for Direct Access, * 3 for Processor, etc. Only certain backends may @@ -465,6 +533,7 @@ union ctl_lunreq_data { * kern_be_args: For kernel use only. */ struct ctl_lun_req { +#define CTL_BE_NAME_LEN 32 char backend[CTL_BE_NAME_LEN]; ctl_lunreq_type reqtype; union ctl_lunreq_data reqdata; @@ -777,6 +846,8 @@ struct ctl_lun_map { #define CTL_PORT_REQ _IOWR(CTL_MINOR, 0x26, struct ctl_req) #define CTL_PORT_LIST _IOWR(CTL_MINOR, 0x27, struct ctl_lun_list) #define CTL_LUN_MAP _IOW(CTL_MINOR, 0x28, struct ctl_lun_map) +#define CTL_GET_LUN_STATS _IOWR(CTL_MINOR, 0x29, struct ctl_get_io_stats) +#define CTL_GET_PORT_STATS _IOWR(CTL_MINOR, 0x2a, struct ctl_get_io_stats) #endif /* _CTL_IOCTL_H_ */ Modified: head/sys/cam/ctl/ctl_private.h ============================================================================== --- head/sys/cam/ctl/ctl_private.h Mon Jan 9 17:25:23 2017 (r311803) +++ head/sys/cam/ctl/ctl_private.h Mon Jan 9 18:18:15 2017 (r311804) @@ -1,6 +1,6 @@ /*- * Copyright (c) 2003, 2004, 2005, 2008 Silicon Graphics International Corp. - * Copyright (c) 2014-2015 Alexander Motin + * Copyright (c) 2014-2017 Alexander Motin * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -404,7 +404,10 @@ struct ctl_lun { struct callout ie_callout; /* INTERVAL TIMER */ struct ctl_mode_pages mode_pages; struct ctl_log_pages log_pages; - struct ctl_lun_io_stats stats; +#ifdef CTL_LEGACY_STATS + struct ctl_lun_io_stats legacy_stats; +#endif /* CTL_LEGACY_STATS */ + struct ctl_io_stats stats; uint32_t res_idx; uint32_t pr_generation; uint64_t *pr_keys[CTL_MAX_PORTS]; Modified: head/usr.bin/ctlstat/ctlstat.8 ============================================================================== --- head/usr.bin/ctlstat/ctlstat.8 Mon Jan 9 17:25:23 2017 (r311803) +++ head/usr.bin/ctlstat/ctlstat.8 Mon Jan 9 18:18:15 2017 (r311804) @@ -34,7 +34,7 @@ .\" $Id: //depot/users/kenm/FreeBSD-test2/usr.bin/ctlstat/ctlstat.8#2 $ .\" $FreeBSD$ .\" -.Dd September 21, 2015 +.Dd January 9, 2017 .Dt CTLSTAT 8 .Os .Sh NAME @@ -120,3 +120,4 @@ every 10 seconds. .Sh AUTHORS .An Ken Merry Aq Mt ken@FreeBSD.org .An Will Andrews Aq Mt will@FreeBSD.org +.An Alexander Motin Aq Mt mav@FreeBSD.org Modified: head/usr.bin/ctlstat/ctlstat.c ============================================================================== --- head/usr.bin/ctlstat/ctlstat.c Mon Jan 9 17:25:23 2017 (r311803) +++ head/usr.bin/ctlstat/ctlstat.c Mon Jan 9 18:18:15 2017 (r311804) @@ -1,5 +1,6 @@ /*- * Copyright (c) 2004, 2008, 2009 Silicon Graphics International Corp. + * Copyright (c) 2017 Alexander Motin * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -66,17 +67,17 @@ __FBSDID("$FreeBSD$"); #include /* - * The default amount of space we allocate for LUN storage space. We - * dynamically allocate more if needed. + * The default amount of space we allocate for stats storage space. + * We dynamically allocate more if needed. */ -#define CTL_STAT_NUM_LUNS 30 +#define CTL_STAT_NUM_ITEMS 256 /* * The default number of LUN selection bits we allocate. This is large * because we don't currently increase it if the user specifies a LUN * number of 1024 or larger. */ -#define CTL_STAT_LUN_BITS 1024L +#define CTL_STAT_BITS 1024L static const char *ctlstat_opts = "Cc:Ddhjl:n:p:tw:"; static const char *ctlstat_usage = "Usage: ctlstat [-CDdjht] [-l lunnum]" @@ -101,31 +102,32 @@ typedef enum { #define CTLSTAT_FLAG_FIRST_RUN (1 << 2) #define CTLSTAT_FLAG_TOTALS (1 << 3) #define CTLSTAT_FLAG_DMA_TIME (1 << 4) -#define CTLSTAT_FLAG_LUN_TIME_VALID (1 << 5) -#define CTLSTAT_FLAG_LUN_MASK (1 << 6) -#define CTLSTAT_FLAG_PORT_MASK (1 << 7) +#define CTLSTAT_FLAG_TIME_VALID (1 << 5) +#define CTLSTAT_FLAG_MASK (1 << 6) +#define CTLSTAT_FLAG_LUNS (1 << 7) +#define CTLSTAT_FLAG_PORTS (1 << 8) #define F_CPU(ctx) ((ctx)->flags & CTLSTAT_FLAG_CPU) #define F_HDR(ctx) ((ctx)->flags & CTLSTAT_FLAG_HEADER) #define F_FIRST(ctx) ((ctx)->flags & CTLSTAT_FLAG_FIRST_RUN) #define F_TOTALS(ctx) ((ctx)->flags & CTLSTAT_FLAG_TOTALS) #define F_DMA(ctx) ((ctx)->flags & CTLSTAT_FLAG_DMA_TIME) -#define F_LUNVAL(ctx) ((ctx)->flags & CTLSTAT_FLAG_LUN_TIME_VALID) -#define F_LUNMASK(ctx) ((ctx)->flags & CTLSTAT_FLAG_LUN_MASK) -#define F_PORTMASK(ctx) ((ctx)->flags & CTLSTAT_FLAG_PORT_MASK) +#define F_TIMEVAL(ctx) ((ctx)->flags & CTLSTAT_FLAG_TIME_VALID) +#define F_MASK(ctx) ((ctx)->flags & CTLSTAT_FLAG_MASK) +#define F_LUNS(ctx) ((ctx)->flags & CTLSTAT_FLAG_LUNS) +#define F_PORTS(ctx) ((ctx)->flags & CTLSTAT_FLAG_PORTS) struct ctlstat_context { ctlstat_mode_types mode; int flags; - struct ctl_lun_io_stats *cur_lun_stats, *prev_lun_stats, - *tmp_lun_stats; - struct ctl_lun_io_stats cur_total_stats[3], prev_total_stats[3]; + struct ctl_io_stats *cur_stats, *prev_stats; + struct ctl_io_stats cur_total_stats[3], prev_total_stats[3]; struct timespec cur_time, prev_time; struct ctl_cpu_stats cur_cpu, prev_cpu; uint64_t cur_total_jiffies, prev_total_jiffies; uint64_t cur_idle, prev_idle; - bitstr_t bit_decl(lun_mask, CTL_STAT_LUN_BITS); - bitstr_t bit_decl(port_mask, CTL_MAX_PORTS); - int num_luns; + bitstr_t bit_decl(item_mask, CTL_STAT_BITS); + int cur_items, prev_items; + int cur_alloc, prev_alloc; int numdevs; int header_interval; }; @@ -135,12 +137,11 @@ struct ctlstat_context { #endif static void usage(int error); -static int getstats(int fd, int *num_luns, struct ctl_lun_io_stats **xlun_stats, - struct timespec *cur_time, int *lun_time_valid); +static int getstats(int fd, int *alloc_items, int *num_items, + struct ctl_io_stats **xstats, struct timespec *cur_time, int *time_valid); static int getcpu(struct ctl_cpu_stats *cpu_stats); -static void compute_stats(struct ctlstat_context *ctx, - struct ctl_lun_io_stats *cur_stats, - struct ctl_lun_io_stats *prev_stats, +static void compute_stats(struct ctl_io_stats *cur_stats, + struct ctl_io_stats *prev_stats, long double etime, long double *mbsec, long double *kb_per_transfer, long double *transfers_per_second, @@ -155,64 +156,55 @@ usage(int error) } static int -getstats(int fd, int *num_luns, struct ctl_lun_io_stats **xlun_stats, +getstats(int fd, int *alloc_items, int *num_items, struct ctl_io_stats **stats, struct timespec *cur_time, int *flags) { - struct ctl_lun_io_stats *lun_stats; - struct ctl_stats stats; - int more_space_count; + struct ctl_get_io_stats get_stats; + int more_space_count = 0; - more_space_count = 0; - - if (*num_luns == 0) - *num_luns = CTL_STAT_NUM_LUNS; - - lun_stats = *xlun_stats; + if (*alloc_items == 0) + *alloc_items = CTL_STAT_NUM_ITEMS; retry: + if (*stats == NULL) + *stats = malloc(sizeof(**stats) * *alloc_items); - if (lun_stats == NULL) { - lun_stats = (struct ctl_lun_io_stats *)malloc( - sizeof(*lun_stats) * *num_luns); - } - - memset(&stats, 0, sizeof(stats)); - stats.alloc_len = *num_luns * sizeof(*lun_stats); - memset(lun_stats, 0, stats.alloc_len); - stats.lun_stats = lun_stats; - - if (ioctl(fd, CTL_GETSTATS, &stats) == -1) - err(1, "error returned from CTL_GETSTATS ioctl"); + memset(&get_stats, 0, sizeof(get_stats)); + get_stats.alloc_len = *alloc_items * sizeof(**stats); + memset(*stats, 0, get_stats.alloc_len); + get_stats.stats = *stats; + + if (ioctl(fd, (*flags & CTLSTAT_FLAG_PORTS) ? CTL_GET_PORT_STATS : + CTL_GET_LUN_STATS, &get_stats) == -1) + err(1, "CTL_GET_*_STATS ioctl returned error"); - switch (stats.status) { + switch (get_stats.status) { case CTL_SS_OK: break; case CTL_SS_ERROR: - err(1, "CTL_SS_ERROR returned from CTL_GETSTATS ioctl"); + err(1, "CTL_GET_*_STATS ioctl returned CTL_SS_ERROR"); break; case CTL_SS_NEED_MORE_SPACE: - if (more_space_count > 0) { - errx(1, "CTL_GETSTATS returned NEED_MORE_SPACE again"); - } - *num_luns = stats.num_luns; - free(lun_stats); - lun_stats = NULL; + if (more_space_count >= 2) + errx(1, "CTL_GET_*_STATS returned NEED_MORE_SPACE again"); + *alloc_items = get_stats.num_items * 5 / 4; + free(*stats); + *stats = NULL; more_space_count++; goto retry; break; /* NOTREACHED */ default: - errx(1, "unknown status %d returned from CTL_GETSTATS ioctl", - stats.status); + errx(1, "CTL_GET_*_STATS ioctl returned unknown status %d", + get_stats.status); break; } - *xlun_stats = lun_stats; - *num_luns = stats.num_luns; - cur_time->tv_sec = stats.timestamp.tv_sec; - cur_time->tv_nsec = stats.timestamp.tv_nsec; - if (stats.flags & CTL_STATS_FLAG_TIME_VALID) - *flags |= CTLSTAT_FLAG_LUN_TIME_VALID; + *num_items = get_stats.fill_len / sizeof(**stats); + cur_time->tv_sec = get_stats.timestamp.tv_sec; + cur_time->tv_nsec = get_stats.timestamp.tv_nsec; + if (get_stats.flags & CTL_STATS_FLAG_TIME_VALID) + *flags |= CTLSTAT_FLAG_TIME_VALID; else - *flags &= ~CTLSTAT_FLAG_LUN_TIME_VALID; + *flags &= ~CTLSTAT_FLAG_TIME_VALID; return (0); } @@ -240,14 +232,13 @@ getcpu(struct ctl_cpu_stats *cpu_stats) } static void -compute_stats(struct ctlstat_context *ctx, struct ctl_lun_io_stats *cur_stats, - struct ctl_lun_io_stats *prev_stats, long double etime, +compute_stats(struct ctl_io_stats *cur_stats, + struct ctl_io_stats *prev_stats, long double etime, long double *mbsec, long double *kb_per_transfer, long double *transfers_per_second, long double *ms_per_transfer, long double *ms_per_dma, long double *dmas_per_second) { uint64_t total_bytes = 0, total_operations = 0, total_dmas = 0; - uint32_t port; struct bintime total_time_bt, total_dma_bt; struct timespec total_time_ts, total_dma_ts; int i; @@ -256,31 +247,18 @@ compute_stats(struct ctlstat_context *ct bzero(&total_dma_bt, sizeof(total_dma_bt)); bzero(&total_time_ts, sizeof(total_time_ts)); bzero(&total_dma_ts, sizeof(total_dma_ts)); - for (port = 0; port < CTL_MAX_PORTS; port++) { - if (F_PORTMASK(ctx) && - bit_test(ctx->port_mask, port) == 0) - continue; - for (i = 0; i < CTL_STATS_NUM_TYPES; i++) { - total_bytes += cur_stats->ports[port].bytes[i]; - total_operations += - cur_stats->ports[port].operations[i]; - total_dmas += cur_stats->ports[port].num_dmas[i]; - bintime_add(&total_time_bt, - &cur_stats->ports[port].time[i]); - bintime_add(&total_dma_bt, - &cur_stats->ports[port].dma_time[i]); - if (prev_stats != NULL) { - total_bytes -= - prev_stats->ports[port].bytes[i]; - total_operations -= - prev_stats->ports[port].operations[i]; - total_dmas -= - prev_stats->ports[port].num_dmas[i]; - bintime_sub(&total_time_bt, - &prev_stats->ports[port].time[i]); - bintime_sub(&total_dma_bt, - &prev_stats->ports[port].dma_time[i]); - } + for (i = 0; i < CTL_STATS_NUM_TYPES; i++) { + total_bytes += cur_stats->bytes[i]; + total_operations += cur_stats->operations[i]; + total_dmas += cur_stats->dmas[i]; + bintime_add(&total_time_bt, &cur_stats->time[i]); + bintime_add(&total_dma_bt, &cur_stats->dma_time[i]); + if (prev_stats != NULL) { + total_bytes -= prev_stats->bytes[i]; + total_operations -= prev_stats->operations[i]; + total_dmas -= prev_stats->dmas[i]; + bintime_sub(&total_time_bt, &prev_stats->time[i]); + bintime_sub(&total_dma_bt, &prev_stats->dma_time[i]); } } @@ -340,35 +318,25 @@ compute_stats(struct ctlstat_context *ct static const char *iotypes[] = {"NO IO", "READ", "WRITE"}; static void -ctlstat_dump(struct ctlstat_context *ctx) { - int iotype, lun, port; - struct ctl_lun_io_stats *stats = ctx->cur_lun_stats; +ctlstat_dump(struct ctlstat_context *ctx) +{ + int iotype, i; + struct ctl_io_stats *stats = ctx->cur_stats; - for (lun = 0; lun < ctx->num_luns;lun++) { - if (F_LUNMASK(ctx) && bit_test(ctx->lun_mask, lun) == 0) + for (i = 0; i < ctx->cur_items;i++) { + if (F_MASK(ctx) && bit_test(ctx->item_mask, i) == 0) continue; - printf("lun %d\n", lun); - for (port = 0; port < CTL_MAX_PORTS; port++) { - if (F_PORTMASK(ctx) && - bit_test(ctx->port_mask, port) == 0) - continue; - printf(" port %d\n", - stats[lun].ports[port].targ_port); - for (iotype = 0; iotype < CTL_STATS_NUM_TYPES; - iotype++) { - printf(" io type %d (%s)\n", iotype, - iotypes[iotype]); - printf(" bytes %ju\n", (uintmax_t) - stats[lun].ports[port].bytes[iotype]); - printf(" operations %ju\n", (uintmax_t) - stats[lun].ports[port].operations[iotype]); - PRINT_BINTIME(" io time", - stats[lun].ports[port].time[iotype]); - printf(" num dmas %ju\n", (uintmax_t) - stats[lun].ports[port].num_dmas[iotype]); - PRINT_BINTIME(" dma time", - stats[lun].ports[port].dma_time[iotype]); - } + printf("%s %d\n", F_PORTS(ctx) ? "port" : "lun", stats[i].item); + for (iotype = 0; iotype < CTL_STATS_NUM_TYPES; iotype++) { + printf(" io type %d (%s)\n", iotype, iotypes[iotype]); + printf(" bytes %ju\n", (uintmax_t) + stats[i].bytes[iotype]); + printf(" operations %ju\n", (uintmax_t) + stats[i].operations[iotype]); + printf(" dmas %ju\n", (uintmax_t) + stats[i].dmas[iotype]); + PRINT_BINTIME(" io time", stats[i].time[iotype]); + PRINT_BINTIME(" dma time", stats[i].dma_time[iotype]); } } } @@ -378,63 +346,49 @@ ctlstat_dump(struct ctlstat_context *ctx (uintmax_t)(((bt).frac >> 32) * 1000000 >> 32)) static void ctlstat_json(struct ctlstat_context *ctx) { - int iotype, lun, port; - struct ctl_lun_io_stats *stats = ctx->cur_lun_stats; + int iotype, i; + struct ctl_io_stats *stats = ctx->cur_stats; - printf("{\"luns\":["); - for (lun = 0; lun < ctx->num_luns; lun++) { - if (F_LUNMASK(ctx) && bit_test(ctx->lun_mask, lun) == 0) + printf("{\"%s\":[", F_PORTS(ctx) ? "ports" : "luns"); + for (i = 0; i < ctx->cur_items; i++) { + if (F_MASK(ctx) && bit_test(ctx->item_mask, i) == 0) continue; - printf("{\"ports\":["); - for (port = 0; port < CTL_MAX_PORTS;port++) { - if (F_PORTMASK(ctx) && - bit_test(ctx->port_mask, port) == 0) - continue; - printf("{\"num\":%d,\"io\":[", - stats[lun].ports[port].targ_port); - for (iotype = 0; iotype < CTL_STATS_NUM_TYPES; - iotype++) { - printf("{\"type\":\"%s\",", iotypes[iotype]); - printf("\"bytes\":%ju,", (uintmax_t)stats[ - lun].ports[port].bytes[iotype]); - printf("\"operations\":%ju,", (uintmax_t)stats[ - lun].ports[port].operations[iotype]); - JSON_BINTIME("io time", - stats[lun].ports[port].time[iotype]); - JSON_BINTIME("dma time", - stats[lun].ports[port].dma_time[iotype]); - printf("\"num dmas\":%ju}", (uintmax_t) - stats[lun].ports[port].num_dmas[iotype]); - if (iotype < (CTL_STATS_NUM_TYPES - 1)) - printf(","); /* continue io array */ - } - printf("]}"); /* close port */ - if (port < (CTL_MAX_PORTS - 1)) - printf(","); /* continue port array */ + printf("{\"num\":%d,\"io\":[", + stats[i].item); + for (iotype = 0; iotype < CTL_STATS_NUM_TYPES; iotype++) { + printf("{\"type\":\"%s\",", iotypes[iotype]); + printf("\"bytes\":%ju,", (uintmax_t)stats[ + i].bytes[iotype]); + printf("\"operations\":%ju,", (uintmax_t)stats[ *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-head@freebsd.org Mon Jan 9 19:12:42 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A77FECA75FA; Mon, 9 Jan 2017 19:12:42 +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 748D1197E; Mon, 9 Jan 2017 19:12:42 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v09JCfg3040983; Mon, 9 Jan 2017 19:12:41 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v09JCfak040982; Mon, 9 Jan 2017 19:12:41 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201701091912.v09JCfak040982@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Mon, 9 Jan 2017 19:12:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r311806 - head X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 09 Jan 2017 19:12:42 -0000 Author: dim Date: Mon Jan 9 19:12:41 2017 New Revision: 311806 URL: https://svnweb.freebsd.org/changeset/base/311806 Log: After r311565, also remove llvm-ranlib from ObsoleteFiles.inc. Modified: head/ObsoleteFiles.inc Modified: head/ObsoleteFiles.inc ============================================================================== --- head/ObsoleteFiles.inc Mon Jan 9 18:35:41 2017 (r311805) +++ head/ObsoleteFiles.inc Mon Jan 9 19:12:41 2017 (r311806) @@ -2260,7 +2260,6 @@ OLD_LIBS+=usr/lib32/private/libyaml.so.1 OLD_FILES+=usr/lib32/private/libyaml_p.a # 20140216: new clang import which bumps version from 3.3 to 3.4. OLD_FILES+=usr/bin/llvm-prof -OLD_FILES+=usr/bin/llvm-ranlib OLD_FILES+=usr/include/clang/3.3/__wmmintrin_aes.h OLD_FILES+=usr/include/clang/3.3/__wmmintrin_pclmul.h OLD_FILES+=usr/include/clang/3.3/altivec.h From owner-svn-src-head@freebsd.org Mon Jan 9 19:22:30 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 87493CA795A; Mon, 9 Jan 2017 19:22:30 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6182510B8; Mon, 9 Jan 2017 19:22:30 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v09JMTP3045282; Mon, 9 Jan 2017 19:22:29 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v09JMTvO045281; Mon, 9 Jan 2017 19:22:29 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201701091922.v09JMTvO045281@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Mon, 9 Jan 2017 19:22:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r311807 - head/tools/build/mk X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 09 Jan 2017 19:22:30 -0000 Author: dim Date: Mon Jan 9 19:22:29 2017 New Revision: 311807 URL: https://svnweb.freebsd.org/changeset/base/311807 Log: Add recently added libc++ headers to OptionalObsoleteFiles.inc. MFC after: 3 days Modified: head/tools/build/mk/OptionalObsoleteFiles.inc Modified: head/tools/build/mk/OptionalObsoleteFiles.inc ============================================================================== --- head/tools/build/mk/OptionalObsoleteFiles.inc Mon Jan 9 19:12:41 2017 (r311806) +++ head/tools/build/mk/OptionalObsoleteFiles.inc Mon Jan 9 19:22:29 2017 (r311807) @@ -4438,6 +4438,8 @@ OLD_FILES+=usr/lib/libcxxrt.a OLD_FILES+=usr/lib/libcxxrt.so OLD_FILES+=usr/lib/libcxxrt_p.a OLD_FILES+=usr/include/c++/v1/__bit_reference +OLD_FILES+=usr/include/c++/v1/__bsd_locale_defaults.h +OLD_FILES+=usr/include/c++/v1/__bsd_locale_fallbacks.h OLD_FILES+=usr/include/c++/v1/__config OLD_FILES+=usr/include/c++/v1/__debug OLD_FILES+=usr/include/c++/v1/__functional_03 @@ -4446,10 +4448,12 @@ OLD_FILES+=usr/include/c++/v1/__function OLD_FILES+=usr/include/c++/v1/__hash_table OLD_FILES+=usr/include/c++/v1/__locale OLD_FILES+=usr/include/c++/v1/__mutex_base +OLD_FILES+=usr/include/c++/v1/__nullptr OLD_FILES+=usr/include/c++/v1/__refstring OLD_FILES+=usr/include/c++/v1/__split_buffer OLD_FILES+=usr/include/c++/v1/__sso_allocator OLD_FILES+=usr/include/c++/v1/__std_stream +OLD_FILES+=usr/include/c++/v1/__threading_support OLD_FILES+=usr/include/c++/v1/__tree OLD_FILES+=usr/include/c++/v1/__tuple OLD_FILES+=usr/include/c++/v1/__undef___deallocate @@ -4485,30 +4489,51 @@ OLD_FILES+=usr/include/c++/v1/cstdlib OLD_FILES+=usr/include/c++/v1/cstring OLD_FILES+=usr/include/c++/v1/ctgmath OLD_FILES+=usr/include/c++/v1/ctime +OLD_FILES+=usr/include/c++/v1/ctype.h OLD_FILES+=usr/include/c++/v1/cwchar OLD_FILES+=usr/include/c++/v1/cwctype OLD_FILES+=usr/include/c++/v1/cxxabi.h OLD_FILES+=usr/include/c++/v1/deque +OLD_FILES+=usr/include/c++/v1/errno.h OLD_FILES+=usr/include/c++/v1/exception OLD_FILES+=usr/include/c++/v1/experimental/__config +OLD_FILES+=usr/include/c++/v1/experimental/__memory +OLD_FILES+=usr/include/c++/v1/experimental/algorithm +OLD_FILES+=usr/include/c++/v1/experimental/any OLD_FILES+=usr/include/c++/v1/experimental/chrono +OLD_FILES+=usr/include/c++/v1/experimental/deque OLD_FILES+=usr/include/c++/v1/experimental/dynarray -OLD_FILES+=usr/include/c++/v1/experimental/dynarray +OLD_FILES+=usr/include/c++/v1/experimental/filesystem +OLD_FILES+=usr/include/c++/v1/experimental/forward_list +OLD_FILES+=usr/include/c++/v1/experimental/functional +OLD_FILES+=usr/include/c++/v1/experimental/iterator +OLD_FILES+=usr/include/c++/v1/experimental/list +OLD_FILES+=usr/include/c++/v1/experimental/map +OLD_FILES+=usr/include/c++/v1/experimental/memory_resource OLD_FILES+=usr/include/c++/v1/experimental/optional +OLD_FILES+=usr/include/c++/v1/experimental/propagate_const OLD_FILES+=usr/include/c++/v1/experimental/ratio +OLD_FILES+=usr/include/c++/v1/experimental/regex +OLD_FILES+=usr/include/c++/v1/experimental/set +OLD_FILES+=usr/include/c++/v1/experimental/string OLD_FILES+=usr/include/c++/v1/experimental/string_view OLD_FILES+=usr/include/c++/v1/experimental/system_error OLD_FILES+=usr/include/c++/v1/experimental/tuple OLD_FILES+=usr/include/c++/v1/experimental/type_traits +OLD_FILES+=usr/include/c++/v1/experimental/unordered_map +OLD_FILES+=usr/include/c++/v1/experimental/unordered_set OLD_FILES+=usr/include/c++/v1/experimental/utility +OLD_FILES+=usr/include/c++/v1/experimental/vector OLD_FILES+=usr/include/c++/v1/ext/__hash OLD_FILES+=usr/include/c++/v1/ext/hash_map OLD_FILES+=usr/include/c++/v1/ext/hash_set +OLD_FILES+=usr/include/c++/v1/float.h OLD_FILES+=usr/include/c++/v1/forward_list OLD_FILES+=usr/include/c++/v1/fstream OLD_FILES+=usr/include/c++/v1/functional OLD_FILES+=usr/include/c++/v1/future OLD_FILES+=usr/include/c++/v1/initializer_list +OLD_FILES+=usr/include/c++/v1/inttypes.h OLD_FILES+=usr/include/c++/v1/iomanip OLD_FILES+=usr/include/c++/v1/ios OLD_FILES+=usr/include/c++/v1/iosfwd @@ -4519,6 +4544,7 @@ OLD_FILES+=usr/include/c++/v1/limits OLD_FILES+=usr/include/c++/v1/list OLD_FILES+=usr/include/c++/v1/locale OLD_FILES+=usr/include/c++/v1/map +OLD_FILES+=usr/include/c++/v1/math.h OLD_FILES+=usr/include/c++/v1/memory OLD_FILES+=usr/include/c++/v1/mutex OLD_FILES+=usr/include/c++/v1/new @@ -4530,17 +4556,25 @@ OLD_FILES+=usr/include/c++/v1/ratio OLD_FILES+=usr/include/c++/v1/regex OLD_FILES+=usr/include/c++/v1/scoped_allocator OLD_FILES+=usr/include/c++/v1/set +OLD_FILES+=usr/include/c++/v1/setjmp.h OLD_FILES+=usr/include/c++/v1/shared_mutex OLD_FILES+=usr/include/c++/v1/sstream OLD_FILES+=usr/include/c++/v1/stack +OLD_FILES+=usr/include/c++/v1/stdbool.h +OLD_FILES+=usr/include/c++/v1/stddef.h OLD_FILES+=usr/include/c++/v1/stdexcept +OLD_FILES+=usr/include/c++/v1/stdio.h +OLD_FILES+=usr/include/c++/v1/stdlib.h OLD_FILES+=usr/include/c++/v1/streambuf OLD_FILES+=usr/include/c++/v1/string +OLD_FILES+=usr/include/c++/v1/string.h OLD_FILES+=usr/include/c++/v1/strstream OLD_FILES+=usr/include/c++/v1/system_error OLD_FILES+=usr/include/c++/v1/tgmath.h OLD_FILES+=usr/include/c++/v1/thread OLD_FILES+=usr/include/c++/v1/tr1/__bit_reference +OLD_FILES+=usr/include/c++/v1/tr1/__bsd_locale_defaults.h +OLD_FILES+=usr/include/c++/v1/tr1/__bsd_locale_fallbacks.h OLD_FILES+=usr/include/c++/v1/tr1/__config OLD_FILES+=usr/include/c++/v1/tr1/__debug OLD_FILES+=usr/include/c++/v1/tr1/__functional_03 @@ -4549,13 +4583,15 @@ OLD_FILES+=usr/include/c++/v1/tr1/__func OLD_FILES+=usr/include/c++/v1/tr1/__hash_table OLD_FILES+=usr/include/c++/v1/tr1/__locale OLD_FILES+=usr/include/c++/v1/tr1/__mutex_base +OLD_FILES+=usr/include/c++/v1/tr1/__nullptr OLD_FILES+=usr/include/c++/v1/tr1/__refstring OLD_FILES+=usr/include/c++/v1/tr1/__split_buffer OLD_FILES+=usr/include/c++/v1/tr1/__sso_allocator OLD_FILES+=usr/include/c++/v1/tr1/__std_stream +OLD_FILES+=usr/include/c++/v1/tr1/__threading_support OLD_FILES+=usr/include/c++/v1/tr1/__tree OLD_FILES+=usr/include/c++/v1/tr1/__tuple -OLD_FILES+=usr/include/c++/v1/tr1/__tuple_03 +OLD_FILES+=usr/include/c++/v1/tr1/__undef___deallocate OLD_FILES+=usr/include/c++/v1/tr1/__undef_min_max OLD_FILES+=usr/include/c++/v1/tr1/algorithm OLD_FILES+=usr/include/c++/v1/tr1/array @@ -4588,15 +4624,19 @@ OLD_FILES+=usr/include/c++/v1/tr1/cstdli OLD_FILES+=usr/include/c++/v1/tr1/cstring OLD_FILES+=usr/include/c++/v1/tr1/ctgmath OLD_FILES+=usr/include/c++/v1/tr1/ctime +OLD_FILES+=usr/include/c++/v1/tr1/ctype.h OLD_FILES+=usr/include/c++/v1/tr1/cwchar OLD_FILES+=usr/include/c++/v1/tr1/cwctype OLD_FILES+=usr/include/c++/v1/tr1/deque +OLD_FILES+=usr/include/c++/v1/tr1/errno.h OLD_FILES+=usr/include/c++/v1/tr1/exception +OLD_FILES+=usr/include/c++/v1/tr1/float.h OLD_FILES+=usr/include/c++/v1/tr1/forward_list OLD_FILES+=usr/include/c++/v1/tr1/fstream OLD_FILES+=usr/include/c++/v1/tr1/functional OLD_FILES+=usr/include/c++/v1/tr1/future OLD_FILES+=usr/include/c++/v1/tr1/initializer_list +OLD_FILES+=usr/include/c++/v1/tr1/inttypes.h OLD_FILES+=usr/include/c++/v1/tr1/iomanip OLD_FILES+=usr/include/c++/v1/tr1/ios OLD_FILES+=usr/include/c++/v1/tr1/iosfwd @@ -4607,6 +4647,7 @@ OLD_FILES+=usr/include/c++/v1/tr1/limits OLD_FILES+=usr/include/c++/v1/tr1/list OLD_FILES+=usr/include/c++/v1/tr1/locale OLD_FILES+=usr/include/c++/v1/tr1/map +OLD_FILES+=usr/include/c++/v1/tr1/math.h OLD_FILES+=usr/include/c++/v1/tr1/memory OLD_FILES+=usr/include/c++/v1/tr1/mutex OLD_FILES+=usr/include/c++/v1/tr1/new @@ -4618,12 +4659,18 @@ OLD_FILES+=usr/include/c++/v1/tr1/ratio OLD_FILES+=usr/include/c++/v1/tr1/regex OLD_FILES+=usr/include/c++/v1/tr1/scoped_allocator OLD_FILES+=usr/include/c++/v1/tr1/set +OLD_FILES+=usr/include/c++/v1/tr1/setjmp.h OLD_FILES+=usr/include/c++/v1/tr1/shared_mutex OLD_FILES+=usr/include/c++/v1/tr1/sstream OLD_FILES+=usr/include/c++/v1/tr1/stack +OLD_FILES+=usr/include/c++/v1/tr1/stdbool.h +OLD_FILES+=usr/include/c++/v1/tr1/stddef.h OLD_FILES+=usr/include/c++/v1/tr1/stdexcept +OLD_FILES+=usr/include/c++/v1/tr1/stdio.h +OLD_FILES+=usr/include/c++/v1/tr1/stdlib.h OLD_FILES+=usr/include/c++/v1/tr1/streambuf OLD_FILES+=usr/include/c++/v1/tr1/string +OLD_FILES+=usr/include/c++/v1/tr1/string.h OLD_FILES+=usr/include/c++/v1/tr1/strstream OLD_FILES+=usr/include/c++/v1/tr1/system_error OLD_FILES+=usr/include/c++/v1/tr1/tgmath.h @@ -4637,6 +4684,8 @@ OLD_FILES+=usr/include/c++/v1/tr1/unorde OLD_FILES+=usr/include/c++/v1/tr1/utility OLD_FILES+=usr/include/c++/v1/tr1/valarray OLD_FILES+=usr/include/c++/v1/tr1/vector +OLD_FILES+=usr/include/c++/v1/tr1/wchar.h +OLD_FILES+=usr/include/c++/v1/tr1/wctype.h OLD_FILES+=usr/include/c++/v1/tuple OLD_FILES+=usr/include/c++/v1/type_traits OLD_FILES+=usr/include/c++/v1/typeindex @@ -4649,6 +4698,8 @@ OLD_FILES+=usr/include/c++/v1/unwind.h OLD_FILES+=usr/include/c++/v1/utility OLD_FILES+=usr/include/c++/v1/valarray OLD_FILES+=usr/include/c++/v1/vector +OLD_FILES+=usr/include/c++/v1/wchar.h +OLD_FILES+=usr/include/c++/v1/wctype.h OLD_FILES+=usr/lib32/libc++.a OLD_FILES+=usr/lib32/libc++.so OLD_LIBS+=usr/lib32/libc++.so.1 From owner-svn-src-head@freebsd.org Mon Jan 9 19:39:37 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1B2E0CA61B9; Mon, 9 Jan 2017 19:39:37 +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 E0DA310A8; Mon, 9 Jan 2017 19:39:36 +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 v09JdaAB050295; Mon, 9 Jan 2017 19:39:36 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v09JdawM050294; Mon, 9 Jan 2017 19:39:36 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201701091939.v09JdawM050294@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Mon, 9 Jan 2017 19:39:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r311811 - head/usr.sbin/mfiutil X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 09 Jan 2017 19:39:37 -0000 Author: dim Date: Mon Jan 9 19:39:35 2017 New Revision: 311811 URL: https://svnweb.freebsd.org/changeset/base/311811 Log: Avoid taking the address of a packed struct member in mfiutil Fix a clang 4.0.0 warning about taking the address of a packed member of struct mfi_evt in mfiutil: usr.sbin/mfiutil/mfi_evt.c:583:30: error: taking address of packed member 'members' of class or structure 'mfi_evt' may result in an unaligned pointer value [-Werror,-Waddress-of-packed-member] if (parse_locale(optarg, &filter.members.locale) < 0) { ^~~~~~~~~~~~~~~~~~~~~ Use a local variable instead, and copy that into the struct. Reviewed by: jhb MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D9069 Modified: head/usr.sbin/mfiutil/mfi_evt.c Modified: head/usr.sbin/mfiutil/mfi_evt.c ============================================================================== --- head/usr.sbin/mfiutil/mfi_evt.c Mon Jan 9 19:37:17 2017 (r311810) +++ head/usr.sbin/mfiutil/mfi_evt.c Mon Jan 9 19:39:35 2017 (r311811) @@ -540,6 +540,7 @@ show_events(int ac, char **av) char *cp; ssize_t size; uint32_t seq, start, stop; + uint16_t locale; uint8_t status; int ch, error, fd, num_events, verbose; u_int i; @@ -580,12 +581,13 @@ show_events(int ac, char **av) } break; case 'l': - if (parse_locale(optarg, &filter.members.locale) < 0) { + if (parse_locale(optarg, &locale) < 0) { error = errno; warn("Error parsing event locale"); close(fd); return (error); } + filter.members.locale = locale; break; case 'n': val = strtol(optarg, &cp, 0); From owner-svn-src-head@freebsd.org Mon Jan 9 20:14:20 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 44B64CA75E6; Mon, 9 Jan 2017 20:14:20 +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 EB69C10BA; Mon, 9 Jan 2017 20:14:19 +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 v09KEJuf067072; Mon, 9 Jan 2017 20:14:19 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v09KEJIK067071; Mon, 9 Jan 2017 20:14:19 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201701092014.v09KEJIK067071@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Mon, 9 Jan 2017 20:14:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r311815 - head/sys/fs/pseudofs X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 09 Jan 2017 20:14:20 -0000 Author: kib Date: Mon Jan 9 20:14:18 2017 New Revision: 311815 URL: https://svnweb.freebsd.org/changeset/base/311815 Log: Forcibly remove the cached items from pseudofs vncache on module unload. If some process' nodes were accessed using procfs and the process cannot exit properly at the time modunload event is reported to the pseudofs-backed filesystem, the assertion in pfs_vncache_unload() is triggered. Assertion is correct, the cache should be cleaned. Approved by: des (pseudofs maintainer) Reported and tested by: pho Sponsored by: The FreeBSD Foundation MFC after: 1 week Modified: head/sys/fs/pseudofs/pseudofs_vncache.c Modified: head/sys/fs/pseudofs/pseudofs_vncache.c ============================================================================== --- head/sys/fs/pseudofs/pseudofs_vncache.c Mon Jan 9 20:14:02 2017 (r311814) +++ head/sys/fs/pseudofs/pseudofs_vncache.c Mon Jan 9 20:14:18 2017 (r311815) @@ -51,6 +51,7 @@ static struct mtx pfs_vncache_mutex; static struct pfs_vdata *pfs_vncache; static eventhandler_tag pfs_exit_tag; static void pfs_exit(void *arg, struct proc *p); +static void pfs_purge_locked(struct pfs_node *pn, bool force); static SYSCTL_NODE(_vfs_pfs, OID_AUTO, vncache, CTLFLAG_RW, 0, "pseudofs vnode cache"); @@ -97,6 +98,9 @@ pfs_vncache_unload(void) { EVENTHANDLER_DEREGISTER(process_exit, pfs_exit_tag); + mtx_lock(&pfs_vncache_mutex); + pfs_purge_locked(NULL, true); + mtx_unlock(&pfs_vncache_mutex); KASSERT(pfs_vncache_entries == 0, ("%d vncache entries remaining", pfs_vncache_entries)); mtx_destroy(&pfs_vncache_mutex); @@ -272,7 +276,7 @@ pfs_vncache_free(struct vnode *vp) * used to implement the cache. */ static void -pfs_purge_locked(struct pfs_node *pn) +pfs_purge_locked(struct pfs_node *pn, bool force) { struct pfs_vdata *pvd; struct vnode *vnp; @@ -280,7 +284,8 @@ pfs_purge_locked(struct pfs_node *pn) mtx_assert(&pfs_vncache_mutex, MA_OWNED); pvd = pfs_vncache; while (pvd != NULL) { - if (pvd->pvd_dead || (pn != NULL && pvd->pvd_pn == pn)) { + if (force || pvd->pvd_dead || + (pn != NULL && pvd->pvd_pn == pn)) { vnp = pvd->pvd_vnode; vhold(vnp); mtx_unlock(&pfs_vncache_mutex); @@ -301,7 +306,7 @@ pfs_purge(struct pfs_node *pn) { mtx_lock(&pfs_vncache_mutex); - pfs_purge_locked(pn); + pfs_purge_locked(pn, false); mtx_unlock(&pfs_vncache_mutex); } @@ -321,6 +326,6 @@ pfs_exit(void *arg, struct proc *p) if (pvd->pvd_pid == p->p_pid) dead = pvd->pvd_dead = 1; if (dead) - pfs_purge_locked(NULL); + pfs_purge_locked(NULL, false); mtx_unlock(&pfs_vncache_mutex); } From owner-svn-src-head@freebsd.org Mon Jan 9 20:51:52 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A9ABCCA7819; Mon, 9 Jan 2017 20:51:52 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6C2E11EC0; Mon, 9 Jan 2017 20:51:52 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v09Kpp0t080453; Mon, 9 Jan 2017 20:51:51 GMT (envelope-from marius@FreeBSD.org) Received: (from marius@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v09Kpp3D080452; Mon, 9 Jan 2017 20:51:51 GMT (envelope-from marius@FreeBSD.org) Message-Id: <201701092051.v09Kpp3D080452@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: marius set sender to marius@FreeBSD.org using -f From: Marius Strobl Date: Mon, 9 Jan 2017 20:51:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r311817 - head/sys/netpfil/ipfw X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 09 Jan 2017 20:51:52 -0000 Author: marius Date: Mon Jan 9 20:51:51 2017 New Revision: 311817 URL: https://svnweb.freebsd.org/changeset/base/311817 Log: In dummynet(4), random chunks of memory are casted to struct dn_*, potentially leading to fatal unaligned accesses on architectures with strict alignment requirements. This change fixes dummynet(4) as far as accesses to 64-bit members of struct dn_* are concerned, tripping up on sparc64 with accesses to 32-bit members happening to be correctly aligned there. In other words, this only fixes the tip of the iceberg; larger parts of dummynet(4) still need to be rewritten in order to properly work on all of !x86. In principle, considering the amount of code in dummynet(4) that needs this erroneous pattern corrected, an acceptable workaround would be to declare all struct dn_* packed, forcing compilers to do byte-accesses as a side-effect. However, given that the structs in question aren't laid out well either, this would break ABI/KBI. While at it, replace all existing bcopy(9) calls with memcpy(9) for performance reasons, as there is no need to check for overlap in these cases. PR: 189219 MFC after: 5 days Modified: head/sys/netpfil/ipfw/ip_dummynet.c Modified: head/sys/netpfil/ipfw/ip_dummynet.c ============================================================================== --- head/sys/netpfil/ipfw/ip_dummynet.c Mon Jan 9 20:14:20 2017 (r311816) +++ head/sys/netpfil/ipfw/ip_dummynet.c Mon Jan 9 20:51:51 2017 (r311817) @@ -931,29 +931,35 @@ delete_schk(int i) static int copy_obj(char **start, char *end, void *_o, const char *msg, int i) { - struct dn_id *o = _o; + struct dn_id o; + union { + struct dn_link l; + struct dn_schk s; + } dn; int have = end - *start; - if (have < o->len || o->len == 0 || o->type == 0) { + memcpy(&o, _o, sizeof(o)); + if (have < o.len || o.len == 0 || o.type == 0) { D("(WARN) type %d %s %d have %d need %d", - o->type, msg, i, have, o->len); + o.type, msg, i, have, o.len); return 1; } - ND("type %d %s %d len %d", o->type, msg, i, o->len); - bcopy(_o, *start, o->len); - if (o->type == DN_LINK) { + ND("type %d %s %d len %d", o.type, msg, i, o.len); + if (o.type == DN_LINK) { + memcpy(&dn.l, _o, sizeof(dn.l)); /* Adjust burst parameter for link */ - struct dn_link *l = (struct dn_link *)*start; - l->burst = div64(l->burst, 8 * hz); - l->delay = l->delay * 1000 / hz; - } else if (o->type == DN_SCH) { - /* Set id->id to the number of instances */ - struct dn_schk *s = _o; - struct dn_id *id = (struct dn_id *)(*start); - id->id = (s->sch.flags & DN_HAVE_MASK) ? - dn_ht_entries(s->siht) : (s->siht ? 1 : 0); - } - *start += o->len; + dn.l.burst = div64(dn.l.burst, 8 * hz); + dn.l.delay = dn.l.delay * 1000 / hz; + memcpy(*start, &dn.l, sizeof(dn.l)); + } else if (o.type == DN_SCH) { + /* Set dn.s.sch.oid.id to the number of instances */ + memcpy(&dn.s, _o, sizeof(dn.s)); + dn.s.sch.oid.id = (dn.s.sch.flags & DN_HAVE_MASK) ? + dn_ht_entries(dn.s.siht) : (dn.s.siht ? 1 : 0); + memcpy(*start, &dn.s, sizeof(dn.s)); + } else + memcpy(*start, _o, o.len); + *start += o.len; return 0; } @@ -974,7 +980,7 @@ copy_obj_q(char **start, char *end, void return 1; } ND("type %d %s %d len %d", o->type, msg, i, len); - bcopy(_o, *start, len); + memcpy(*start, _o, len); ((struct dn_id*)(*start))->len = len; *start += len; return 0; @@ -1022,7 +1028,7 @@ copy_profile(struct copy_args *a, struct D("error have %d need %d", have, profile_len); return 1; } - bcopy(p, *a->start, profile_len); + memcpy(*a->start, p, profile_len); ((struct dn_id *)(*a->start))->len = profile_len; *a->start += profile_len; return 0; @@ -1584,6 +1590,9 @@ config_fs(struct dn_fs *nfs, struct dn_i { int i; struct dn_fsk *fs; +#ifdef NEW_AQM + struct dn_extra_parms *ep; +#endif if (nfs->oid.len != sizeof(*nfs)) { D("invalid flowset len %d", nfs->oid.len); @@ -1592,6 +1601,15 @@ config_fs(struct dn_fs *nfs, struct dn_i i = nfs->fs_nr; if (i <= 0 || i >= 3*DN_MAX_ID) return NULL; +#ifdef NEW_AQM + ep = NULL; + if (arg != NULL) { + ep = malloc(sizeof(*ep), M_TEMP, locked ? M_NOWAIT : M_WAITOK); + if (ep == NULL) + return (NULL); + memcpy(ep, arg, sizeof(*ep)); + } +#endif ND("flowset %d", i); /* XXX other sanity checks */ if (nfs->flags & DN_QSIZE_BYTES) { @@ -1630,12 +1648,15 @@ config_fs(struct dn_fs *nfs, struct dn_i if (bcmp(&fs->fs, nfs, sizeof(*nfs)) == 0) { ND("flowset %d unchanged", i); #ifdef NEW_AQM - /* reconfigure AQM as the parameters can be changed. - * we consider the flowsetis busy if it has scheduler instance(s) - */ - s = locate_scheduler(nfs->sched_nr); - config_aqm(fs, (struct dn_extra_parms *) arg, - s != NULL && s->siht != NULL); + if (ep != NULL) { + /* + * Reconfigure AQM as the parameters can be changed. + * We consider the flowset as busy if it has scheduler + * instance(s). + */ + s = locate_scheduler(nfs->sched_nr); + config_aqm(fs, ep, s != NULL && s->siht != NULL); + } #endif break; /* no change, nothing to do */ } @@ -1657,13 +1678,19 @@ config_fs(struct dn_fs *nfs, struct dn_i fs->fs = *nfs; /* copy configuration */ #ifdef NEW_AQM fs->aqmfp = NULL; - config_aqm(fs, (struct dn_extra_parms *) arg, s != NULL && s->siht != NULL); + if (ep != NULL) + config_aqm(fs, ep, s != NULL && + s->siht != NULL); #endif if (s != NULL) fsk_attach(fs, s); } while (0); if (!locked) DN_BH_WUNLOCK(); +#ifdef NEW_AQM + if (ep != NULL) + free(ep, M_TEMP); +#endif return fs; } @@ -1773,7 +1800,7 @@ again: /* run twice, for wfq and fifo */ D("cannot allocate profile"); goto error; //XXX } - bcopy(pf, s->profile, sizeof(*pf)); + memcpy(s->profile, pf, sizeof(*pf)); } } p.link_nr = 0; @@ -1795,7 +1822,7 @@ again: /* run twice, for wfq and fifo */ pf = malloc(sizeof(*pf), M_DUMMYNET, M_NOWAIT | M_ZERO); if (pf) /* XXX should issue a warning otherwise */ - bcopy(s->profile, pf, sizeof(*pf)); + memcpy(pf, s->profile, sizeof(*pf)); } /* remove from the hash */ dn_ht_find(dn_cfg.schedhash, i, DNHT_REMOVE, NULL); @@ -1917,7 +1944,7 @@ config_profile(struct dn_profile *pf, st olen = s->profile->oid.len; if (olen < pf->oid.len) olen = pf->oid.len; - bcopy(pf, s->profile, pf->oid.len); + memcpy(s->profile, pf, pf->oid.len); s->profile->oid.len = olen; } DN_BH_WUNLOCK(); @@ -1953,30 +1980,35 @@ dummynet_flush(void) int do_config(void *p, int l) { - struct dn_id *next, *o; - int err = 0, err2 = 0; - struct dn_id *arg = NULL; - uintptr_t *a; - - o = p; - if (o->id != DN_API_VERSION) { - D("invalid api version got %d need %d", - o->id, DN_API_VERSION); + struct dn_id o; + union { + struct dn_profile profile; + struct dn_fs fs; + struct dn_link link; + struct dn_sch sched; + } *dn; + struct dn_id *arg; + uintptr_t a; + int err, err2, off; + + memcpy(&o, p, sizeof(o)); + if (o.id != DN_API_VERSION) { + D("invalid api version got %d need %d", o.id, DN_API_VERSION); return EINVAL; } - for (; l >= sizeof(*o); o = next) { - struct dn_id *prev = arg; - if (o->len < sizeof(*o) || l < o->len) { - D("bad len o->len %d len %d", o->len, l); + arg = NULL; + dn = NULL; + for (off = 0; l >= sizeof(o); memcpy(&o, (char *)p + off, sizeof(o))) { + if (o.len < sizeof(o) || l < o.len) { + D("bad len o.len %d len %d", o.len, l); err = EINVAL; break; } - l -= o->len; - next = (struct dn_id *)((char *)o + o->len); + l -= o.len; err = 0; - switch (o->type) { + switch (o.type) { default: - D("cmd %d not implemented", o->type); + D("cmd %d not implemented", o.type); break; #ifdef EMULATE_SYSCTL @@ -1994,31 +2026,30 @@ do_config(void *p, int l) case DN_CMD_DELETE: /* the argument is in the first uintptr_t after o */ - a = (uintptr_t *)(o+1); - if (o->len < sizeof(*o) + sizeof(*a)) { + if (o.len < sizeof(o) + sizeof(a)) { err = EINVAL; break; } - switch (o->subtype) { + memcpy(&a, (char *)p + off + sizeof(o), sizeof(a)); + switch (o.subtype) { case DN_LINK: /* delete base and derived schedulers */ DN_BH_WLOCK(); - err = delete_schk(*a); - err2 = delete_schk(*a + DN_MAX_ID); + err = delete_schk(a); + err2 = delete_schk(a + DN_MAX_ID); DN_BH_WUNLOCK(); if (!err) err = err2; break; default: - D("invalid delete type %d", - o->subtype); + D("invalid delete type %d", o.subtype); err = EINVAL; break; case DN_FS: - err = (*a <1 || *a >= DN_MAX_ID) ? - EINVAL : delete_fs(*a, 0) ; + err = (a < 1 || a >= DN_MAX_ID) ? + EINVAL : delete_fs(a, 0) ; break; } break; @@ -2028,28 +2059,47 @@ do_config(void *p, int l) dummynet_flush(); DN_BH_WUNLOCK(); break; - case DN_TEXT: /* store argument the next block */ - prev = NULL; - arg = o; + case DN_TEXT: /* store argument of next block */ + if (arg != NULL) + free(arg, M_TEMP); + arg = malloc(o.len, M_TEMP, M_WAITOK); + memcpy(arg, (char *)p + off, o.len); break; case DN_LINK: - err = config_link((struct dn_link *)o, arg); + if (dn == NULL) + dn = malloc(sizeof(*dn), M_TEMP, M_WAITOK); + memcpy(&dn->link, (char *)p + off, sizeof(dn->link)); + err = config_link(&dn->link, arg); break; case DN_PROFILE: - err = config_profile((struct dn_profile *)o, arg); + if (dn == NULL) + dn = malloc(sizeof(*dn), M_TEMP, M_WAITOK); + memcpy(&dn->profile, (char *)p + off, + sizeof(dn->profile)); + err = config_profile(&dn->profile, arg); break; case DN_SCH: - err = config_sched((struct dn_sch *)o, arg); + if (dn == NULL) + dn = malloc(sizeof(*dn), M_TEMP, M_WAITOK); + memcpy(&dn->sched, (char *)p + off, + sizeof(dn->sched)); + err = config_sched(&dn->sched, arg); break; case DN_FS: - err = (NULL==config_fs((struct dn_fs *)o, arg, 0)); + if (dn == NULL) + dn = malloc(sizeof(*dn), M_TEMP, M_WAITOK); + memcpy(&dn->fs, (char *)p + off, sizeof(dn->fs)); + err = (NULL == config_fs(&dn->fs, arg, 0)); break; } - if (prev) - arg = NULL; if (err != 0) break; + off += o.len; } + if (arg != NULL) + free(arg, M_TEMP); + if (dn != NULL) + free(dn, M_TEMP); return err; } @@ -2261,7 +2311,7 @@ dummynet_get(struct sockopt *sopt, void a.type = cmd->subtype; if (compat == NULL) { - bcopy(cmd, start, sizeof(*cmd)); + memcpy(start, cmd, sizeof(*cmd)); ((struct dn_id*)(start))->len = sizeof(struct dn_id); buf = start + sizeof(*cmd); } else From owner-svn-src-head@freebsd.org Mon Jan 9 21:46:25 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E3B36CA8C0B; Mon, 9 Jan 2017 21:46:25 +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 B329F1F57; Mon, 9 Jan 2017 21:46:25 +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 v09LkOT4004497; Mon, 9 Jan 2017 21:46:24 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v09LkOko004496; Mon, 9 Jan 2017 21:46:24 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201701092146.v09LkOko004496@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Mon, 9 Jan 2017 21:46:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r311830 - 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-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 09 Jan 2017 21:46:26 -0000 Author: adrian Date: Mon Jan 9 21:46:24 2017 New Revision: 311830 URL: https://svnweb.freebsd.org/changeset/base/311830 Log: [rsu] add support for the "green" rsu NICs. They're still a 1T2R NIC, so reuse the same rfconfig and nstream configuration. Submitted by: Idwer Vollering Modified: head/sys/dev/usb/wlan/if_rsu.c Modified: head/sys/dev/usb/wlan/if_rsu.c ============================================================================== --- head/sys/dev/usb/wlan/if_rsu.c Mon Jan 9 21:24:02 2017 (r311829) +++ head/sys/dev/usb/wlan/if_rsu.c Mon Jan 9 21:46:24 2017 (r311830) @@ -523,6 +523,12 @@ rsu_attach(device_t self) sc->sc_ntxstream = 2; rft = "2T2R"; break; + case 0x3: /* "green" NIC */ + sc->sc_rftype = RTL8712_RFCONFIG_1T2R; + sc->sc_nrxstream = 2; + sc->sc_ntxstream = 1; + rft = "1T2R ('green')"; + break; default: device_printf(sc->sc_dev, "%s: unknown board type (rfconfig=0x%02x)\n", From owner-svn-src-head@freebsd.org Mon Jan 9 22:18:09 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7C2FECA7824; Mon, 9 Jan 2017 22:18:09 +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 45D58165A; Mon, 9 Jan 2017 22:18:09 +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 v09MI8DJ017098; Mon, 9 Jan 2017 22:18:08 GMT (envelope-from np@FreeBSD.org) Received: (from np@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v09MI8Kb017097; Mon, 9 Jan 2017 22:18:08 GMT (envelope-from np@FreeBSD.org) Message-Id: <201701092218.v09MI8Kb017097@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: np set sender to np@FreeBSD.org using -f From: Navdeep Parhar Date: Mon, 9 Jan 2017 22:18:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r311831 - head/sys/dev/cxgbe X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 09 Jan 2017 22:18:09 -0000 Author: np Date: Mon Jan 9 22:18:08 2017 New Revision: 311831 URL: https://svnweb.freebsd.org/changeset/base/311831 Log: cxgbe(4): The wraparound logic in start_wrq_wr() should not get involved in work requests that end at the end of the descriptor ring, even though the pidx wraps around to 0. MFC after: 3 days Modified: head/sys/dev/cxgbe/t4_sge.c Modified: head/sys/dev/cxgbe/t4_sge.c ============================================================================== --- head/sys/dev/cxgbe/t4_sge.c Mon Jan 9 21:46:24 2017 (r311830) +++ head/sys/dev/cxgbe/t4_sge.c Mon Jan 9 22:18:08 2017 (r311831) @@ -2298,7 +2298,7 @@ slowpath: w = &eq->desc[eq->pidx]; IDXINCR(eq->pidx, ndesc, eq->sidx); - if (__predict_false(eq->pidx < ndesc - 1)) { + if (__predict_false(cookie->pidx + ndesc > eq->sidx)) { w = &wrq->ss[0]; wrq->ss_pidx = cookie->pidx; wrq->ss_len = len16 * 16; From owner-svn-src-head@freebsd.org Mon Jan 9 22:20:10 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B29C8CA792E; Mon, 9 Jan 2017 22:20:10 +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 8249D1877; Mon, 9 Jan 2017 22:20:10 +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 v09MK9Se017225; Mon, 9 Jan 2017 22:20:09 GMT (envelope-from np@FreeBSD.org) Received: (from np@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v09MK9eH017224; Mon, 9 Jan 2017 22:20:09 GMT (envelope-from np@FreeBSD.org) Message-Id: <201701092220.v09MK9eH017224@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: np set sender to np@FreeBSD.org using -f From: Navdeep Parhar Date: Mon, 9 Jan 2017 22:20:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r311832 - head/sys/dev/cxgbe X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 09 Jan 2017 22:20:10 -0000 Author: np Date: Mon Jan 9 22:20:09 2017 New Revision: 311832 URL: https://svnweb.freebsd.org/changeset/base/311832 Log: cxgbe(4): Enable automatic cidx flush for all control queues. MFC after: 3 days Modified: head/sys/dev/cxgbe/t4_sge.c Modified: head/sys/dev/cxgbe/t4_sge.c ============================================================================== --- head/sys/dev/cxgbe/t4_sge.c Mon Jan 9 22:18:08 2017 (r311831) +++ head/sys/dev/cxgbe/t4_sge.c Mon Jan 9 22:20:09 2017 (r311832) @@ -3305,12 +3305,13 @@ ctrl_eq_alloc(struct adapter *sc, struct c.cmpliqid_eqid = htonl(V_FW_EQ_CTRL_CMD_CMPLIQID(eq->iqid)); c.physeqid_pkd = htobe32(0); c.fetchszm_to_iqid = - htobe32(V_FW_EQ_CTRL_CMD_HOSTFCMODE(X_HOSTFCMODE_NONE) | + htobe32(V_FW_EQ_CTRL_CMD_HOSTFCMODE(X_HOSTFCMODE_STATUS_PAGE) | V_FW_EQ_CTRL_CMD_PCIECHN(eq->tx_chan) | F_FW_EQ_CTRL_CMD_FETCHRO | V_FW_EQ_CTRL_CMD_IQID(eq->iqid)); c.dcaen_to_eqsize = htobe32(V_FW_EQ_CTRL_CMD_FBMIN(X_FETCHBURSTMIN_64B) | V_FW_EQ_CTRL_CMD_FBMAX(X_FETCHBURSTMAX_512B) | + V_FW_EQ_CTRL_CMD_CIDXFTHRESH(X_CIDXFLUSHTHRESH_32) | V_FW_EQ_CTRL_CMD_EQSIZE(qsize)); c.eqaddr = htobe64(eq->ba); From owner-svn-src-head@freebsd.org Mon Jan 9 23:41:12 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3891CCA8EEC; Mon, 9 Jan 2017 23:41:12 +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 050751750; Mon, 9 Jan 2017 23:41:11 +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 v09NfBNa049759; Mon, 9 Jan 2017 23:41:11 GMT (envelope-from sbruno@FreeBSD.org) Received: (from sbruno@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v09NfBQr049758; Mon, 9 Jan 2017 23:41:11 GMT (envelope-from sbruno@FreeBSD.org) Message-Id: <201701092341.v09NfBQr049758@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: sbruno set sender to sbruno@FreeBSD.org using -f From: Sean Bruno Date: Mon, 9 Jan 2017 23:41:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r311837 - 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-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 09 Jan 2017 23:41:12 -0000 Author: sbruno Date: Mon Jan 9 23:41:10 2017 New Revision: 311837 URL: https://svnweb.freebsd.org/changeset/base/311837 Log: Remove unused mtx_held() macro. Modified: head/sys/net/iflib.c Modified: head/sys/net/iflib.c ============================================================================== --- head/sys/net/iflib.c Mon Jan 9 22:49:35 2017 (r311836) +++ head/sys/net/iflib.c Mon Jan 9 23:41:10 2017 (r311837) @@ -447,10 +447,6 @@ struct iflib_rxq { static int enable_msix = 1; -#define mtx_held(m) (((m)->mtx_lock & ~MTX_FLAGMASK) != (uintptr_t)0) - - - #define CTX_ACTIVE(ctx) ((if_getdrvflags((ctx)->ifc_ifp) & IFF_DRV_RUNNING)) #define CTX_LOCK_INIT(_sc, _name) mtx_init(&(_sc)->ifc_mtx, _name, "iflib ctx lock", MTX_DEF) From owner-svn-src-head@freebsd.org Mon Jan 9 23:42:04 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3CB7BCA8038; Mon, 9 Jan 2017 23:42:04 +0000 (UTC) (envelope-from avos@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E728B1A98; Mon, 9 Jan 2017 23:42:03 +0000 (UTC) (envelope-from avos@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v09Ng3Wk050703; Mon, 9 Jan 2017 23:42:03 GMT (envelope-from avos@FreeBSD.org) Received: (from avos@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v09Ng32n050702; Mon, 9 Jan 2017 23:42:03 GMT (envelope-from avos@FreeBSD.org) Message-Id: <201701092342.v09Ng32n050702@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avos set sender to avos@FreeBSD.org using -f From: Andriy Voskoboinyk Date: Mon, 9 Jan 2017 23:42:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r311838 - head/sys/dev/rtwn/usb X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 09 Jan 2017 23:42:04 -0000 Author: avos Date: Mon Jan 9 23:42:02 2017 New Revision: 311838 URL: https://svnweb.freebsd.org/changeset/base/311838 Log: rtwn_usb(4): do not try to modify global static structure. Use a local copy for modifications instead. Tested with RTL8821AU (AP) + RTL8188EU (STA). Reported by: hselasky Modified: head/sys/dev/rtwn/usb/rtwn_usb_ep.c Modified: head/sys/dev/rtwn/usb/rtwn_usb_ep.c ============================================================================== --- head/sys/dev/rtwn/usb/rtwn_usb_ep.c Mon Jan 9 23:41:10 2017 (r311837) +++ head/sys/dev/rtwn/usb/rtwn_usb_ep.c Mon Jan 9 23:42:02 2017 (r311838) @@ -58,7 +58,7 @@ __FBSDID("$FreeBSD$"); #include -static struct usb_config rtwn_config[RTWN_N_TRANSFER] = { +static const struct usb_config rtwn_config_common[RTWN_N_TRANSFER] = { [RTWN_BULK_RX] = { .type = UE_BULK, .endpoint = UE_ADDR_ANY, @@ -161,6 +161,7 @@ rtwn_usb_setup_queues(struct rtwn_usb_so int rtwn_usb_setup_endpoints(struct rtwn_usb_softc *uc) { + struct usb_config *rtwn_config; struct rtwn_softc *sc = &uc->uc_sc; const uint8_t iface_index = RTWN_IFACE_INDEX; struct usb_endpoint *ep, *ep_end; @@ -197,6 +198,9 @@ rtwn_usb_setup_endpoints(struct rtwn_usb return (EINVAL); } + rtwn_config = malloc(sizeof(rtwn_config_common), M_TEMP, M_WAITOK); + memcpy(rtwn_config, rtwn_config_common, sizeof(rtwn_config_common)); + /* NB: keep in sync with rtwn_dma_init(). */ rtwn_config[RTWN_BULK_TX_VO].endpoint = addr[0]; switch (uc->ntx) { @@ -224,6 +228,8 @@ rtwn_usb_setup_endpoints(struct rtwn_usb rtwn_config[RTWN_BULK_RX].bufsize = sc->rx_dma_size + 1024; error = usbd_transfer_setup(uc->uc_udev, &iface_index, uc->uc_xfer, rtwn_config, RTWN_N_TRANSFER, uc, &sc->sc_mtx); + free(rtwn_config, M_TEMP); + if (error) { device_printf(sc->sc_dev, "could not allocate USB transfers, " "err=%s\n", usbd_errstr(error)); From owner-svn-src-head@freebsd.org Mon Jan 9 23:45:41 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 40920CA8180; Mon, 9 Jan 2017 23:45:41 +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 129091F39; Mon, 9 Jan 2017 23:45:41 +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 v09Nje7v054059; Mon, 9 Jan 2017 23:45:40 GMT (envelope-from sbruno@FreeBSD.org) Received: (from sbruno@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v09Nje3H054058; Mon, 9 Jan 2017 23:45:40 GMT (envelope-from sbruno@FreeBSD.org) Message-Id: <201701092345.v09Nje3H054058@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: sbruno set sender to sbruno@FreeBSD.org using -f From: Sean Bruno Date: Mon, 9 Jan 2017 23:45:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r311840 - head/sys/conf X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 09 Jan 2017 23:45:41 -0000 Author: sbruno Date: Mon Jan 9 23:45:40 2017 New Revision: 311840 URL: https://svnweb.freebsd.org/changeset/base/311840 Log: White space cleanup from an cut-n-paste. Submitted by: mmacy@nextbsd.org Modified: head/sys/conf/files Modified: head/sys/conf/files ============================================================================== --- head/sys/conf/files Mon Jan 9 23:43:42 2017 (r311839) +++ head/sys/conf/files Mon Jan 9 23:45:40 2017 (r311840) @@ -3905,9 +3905,9 @@ net/if_tun.c optional tun net/if_tap.c optional tap net/if_vlan.c optional vlan net/if_vxlan.c optional vxlan inet | vxlan inet6 -net/ifdi_if.m optional ether pci -net/iflib.c optional ether pci -net/mp_ring.c optional ether +net/ifdi_if.m optional ether pci +net/iflib.c optional ether pci +net/mp_ring.c optional ether net/mppcc.c optional netgraph_mppc_compression net/mppcd.c optional netgraph_mppc_compression net/netisr.c standard From owner-svn-src-head@freebsd.org Mon Jan 9 23:51:32 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A00DDCA8328; Mon, 9 Jan 2017 23:51:32 +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 693B71302; Mon, 9 Jan 2017 23:51:32 +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 v09NpVpl055710; Mon, 9 Jan 2017 23:51:31 GMT (envelope-from cem@FreeBSD.org) Received: (from cem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v09NpVoa055709; Mon, 9 Jan 2017 23:51:31 GMT (envelope-from cem@FreeBSD.org) Message-Id: <201701092351.v09NpVoa055709@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cem set sender to cem@FreeBSD.org using -f From: "Conrad E. Meyer" Date: Mon, 9 Jan 2017 23:51:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r311841 - head/sys/fs/cd9660 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 09 Jan 2017 23:51:32 -0000 Author: cem Date: Mon Jan 9 23:51:31 2017 New Revision: 311841 URL: https://svnweb.freebsd.org/changeset/base/311841 Log: cd9660: Add a prototype for cd9660_vfs_hash_cmp GCC warns (and errors, with -Werror) about it otherwise. Clang doesn't care. Introduced in r311665. Reported by: np@ Modified: head/sys/fs/cd9660/cd9660_vfsops.c Modified: head/sys/fs/cd9660/cd9660_vfsops.c ============================================================================== --- head/sys/fs/cd9660/cd9660_vfsops.c Mon Jan 9 23:45:40 2017 (r311840) +++ head/sys/fs/cd9660/cd9660_vfsops.c Mon Jan 9 23:51:31 2017 (r311841) @@ -88,6 +88,7 @@ static struct vfsops cd9660_vfsops = { VFS_SET(cd9660_vfsops, cd9660, VFCF_READONLY); MODULE_VERSION(cd9660, 1); +static int cd9660_vfs_hash_cmp(struct vnode *vp, cd_ino_t *pino); static int iso_mountfs(struct vnode *devvp, struct mount *mp); /* From owner-svn-src-head@freebsd.org Mon Jan 9 23:56:47 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 41EDFCA83A7; Mon, 9 Jan 2017 23:56: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 05C461623; Mon, 9 Jan 2017 23:56: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 v09Nuk8o058022; Mon, 9 Jan 2017 23:56:46 GMT (envelope-from cem@FreeBSD.org) Received: (from cem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v09NuknP058021; Mon, 9 Jan 2017 23:56:46 GMT (envelope-from cem@FreeBSD.org) Message-Id: <201701092356.v09NuknP058021@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cem set sender to cem@FreeBSD.org using -f From: "Conrad E. Meyer" Date: Mon, 9 Jan 2017 23:56:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r311842 - head/sys/fs/cd9660 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 09 Jan 2017 23:56:47 -0000 Author: cem Date: Mon Jan 9 23:56:45 2017 New Revision: 311842 URL: https://svnweb.freebsd.org/changeset/base/311842 Log: cd9660: typedef cd_ino_t in preference to #define Suggested by: kib@ Modified: head/sys/fs/cd9660/iso.h Modified: head/sys/fs/cd9660/iso.h ============================================================================== --- head/sys/fs/cd9660/iso.h Mon Jan 9 23:51:31 2017 (r311841) +++ head/sys/fs/cd9660/iso.h Mon Jan 9 23:56:45 2017 (r311842) @@ -222,7 +222,7 @@ enum ISO_FTYPE { ISO_FTYPE_DEFAULT, ISO_ /* * When ino_t becomes 64-bit, we can remove this definition in favor of ino_t. */ -#define cd_ino_t uint64_t +typedef __uint64_t cd_ino_t; struct iso_mnt { uint64_t im_flags; From owner-svn-src-head@freebsd.org Tue Jan 10 00:03:44 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9A793CA8968; Tue, 10 Jan 2017 00:03: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 670051BE0; Tue, 10 Jan 2017 00:03: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 v0A03hAQ061913; Tue, 10 Jan 2017 00:03:43 GMT (envelope-from cem@FreeBSD.org) Received: (from cem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v0A03hp5061912; Tue, 10 Jan 2017 00:03:43 GMT (envelope-from cem@FreeBSD.org) Message-Id: <201701100003.v0A03hp5061912@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cem set sender to cem@FreeBSD.org using -f From: "Conrad E. Meyer" Date: Tue, 10 Jan 2017 00:03:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r311843 - head/sys/contrib/dev/acpica/components/tables X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 10 Jan 2017 00:03:44 -0000 Author: cem Date: Tue Jan 10 00:03:43 2017 New Revision: 311843 URL: https://svnweb.freebsd.org/changeset/base/311843 Log: Adjust ACPI_EXPORT_SYMBOL for AcpiGetTableWithSize Suggested by: jbeich@ Modified: head/sys/contrib/dev/acpica/components/tables/tbxface.c Modified: head/sys/contrib/dev/acpica/components/tables/tbxface.c ============================================================================== --- head/sys/contrib/dev/acpica/components/tables/tbxface.c Mon Jan 9 23:56:45 2017 (r311842) +++ head/sys/contrib/dev/acpica/components/tables/tbxface.c Tue Jan 10 00:03:43 2017 (r311843) @@ -386,7 +386,7 @@ AcpiGetTableWithSize ( return (Status); } -ACPI_EXPORT_SYMBOL (AcpiGetTable) +ACPI_EXPORT_SYMBOL (AcpiGetTableWithSize) /******************************************************************************* From owner-svn-src-head@freebsd.org Tue Jan 10 00:04:15 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id AF30DCA89C3; Tue, 10 Jan 2017 00:04:15 +0000 (UTC) (envelope-from andriyvos@gmail.com) Received: from mail-lf0-f65.google.com (mail-lf0-f65.google.com [209.85.215.65]) (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 607781D5F; Tue, 10 Jan 2017 00:04:15 +0000 (UTC) (envelope-from andriyvos@gmail.com) Received: by mail-lf0-f65.google.com with SMTP id q89so7082389lfi.1; Mon, 09 Jan 2017 16:04:15 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:to:subject:references:date:cc:mime-version :content-transfer-encoding:from:message-id:in-reply-to:user-agent; bh=NYbOCOXs0dFlQ4zdzfLIb+4RqOiUB8STOAM5cFLSSmQ=; b=VMAA4m7cpJDWKsz2opaNE4SfNlrmB1SMCCv0cPmsm+DU/6t8x55u2WCnq4YzhFmG/a LuCZ/POkyWwu/BnIBSpirr1RM2bGu9+en1xv1tXYpsw45gJv9qZVMohTU+OIsBJifmvV 3WVwgTLl1gq2CQHoi3jK7AAapsPOQ5aio+LHdnbzPiJqItUlTbDFDh7TM5jpZJYbNcrz o2xSGD2NDNRXU6VSQgNMwOHUi8V2rCD8sQk52Qxs4Gspas4i3HSp7TJChi5P9XHN2hu5 38YwUkq281hfjngGUNVNW0CDzx96L8UI1CLzD8WyR2Te+IL69aQPHkTy89OzKl1pYGNr 1jmA== X-Gm-Message-State: AIkVDXJX69HJ6WmJaOLMhHoMpkeTjBJXj7TBWYN+HhuAmHkMahrLQXa3NxN2NEu51sGd/Q== X-Received: by 10.25.40.211 with SMTP id o202mr69952lfo.183.1484006163710; Mon, 09 Jan 2017 15:56:03 -0800 (PST) Received: from localhost (host-176-37-109-22.la.net.ua. [176.37.109.22]) by smtp.gmail.com with ESMTPSA id s127sm17225lja.31.2017.01.09.15.56.02 (version=TLS1 cipher=AES128-SHA bits=128/128); Mon, 09 Jan 2017 15:56:03 -0800 (PST) Content-Type: text/plain; charset=utf-8; format=flowed; delsp=yes To: "Hans Petter Selasky" Subject: Re: svn commit: r311707 - in head/sys/dev/rtwn: . usb References: <201701082341.v08NfH4O046808@repo.freebsd.org> <83881095-b47e-facb-6bbe-a79f8e54209d@selasky.org> Date: Tue, 10 Jan 2017 01:56:10 +0200 Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org MIME-Version: 1.0 Content-Transfer-Encoding: Quoted-Printable From: "Andriy Voskoboinyk" Message-ID: In-Reply-To: <83881095-b47e-facb-6bbe-a79f8e54209d@selasky.org> User-Agent: Opera Mail/12.16 (FreeBSD) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 10 Jan 2017 00:04:15 -0000 Mon, 09 Jan 2017 10:08:13 +0200 =D0=B1=D1=83=D0=BB=D0=BE =D0=BD=D0=B0=D0= =BF=D0=B8=D1=81=D0=B0=D0=BD=D0=BE Hans Petter Selasky = : Hi, The race should be fixed in r311838. > On 01/09/17 00:41, Andriy Voskoboinyk wrote: >> Modified: head/sys/dev/rtwn/usb/rtwn_usb_ep.c >> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D >> --- head/sys/dev/rtwn/usb/rtwn_usb_ep.c Sun Jan 8 23:25:46 = >> 2017 (r311706) >> +++ head/sys/dev/rtwn/usb/rtwn_usb_ep.c Sun Jan 8 23:41:17 = >> 2017 (r311707) >> @@ -63,7 +63,6 @@ static struct usb_config rtwn_config[RTW >> .type =3D UE_BULK, >> .endpoint =3D UE_ADDR_ANY, >> .direction =3D UE_DIR_IN, >> - .bufsize =3D RTWN_RXBUFSZ, >> .flags =3D { >> .pipe_bof =3D 1, >> .short_xfer_ok =3D 1 >> @@ -222,6 +221,7 @@ rtwn_usb_setup_endpoints(struct rtwn_usb >> break; >> } >> >> + rtwn_config[RTWN_BULK_RX].bufsize =3D sc->rx_dma_size + 1024; > > Hi, > > You should copy the rtwn_config to the stack/softc, and not write to t= he = > static struct, which should be made "static const" after this change! > > This might lead to a race when multiple adapters are connecting at the= = > same time! Remember USB enumeration is multithreaded. > > Else your change looks good. > > --HPS From owner-svn-src-head@freebsd.org Tue Jan 10 00:28:02 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id CEFEECA63A0; Tue, 10 Jan 2017 00:28:02 +0000 (UTC) (envelope-from bms@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9EA341B30; Tue, 10 Jan 2017 00:28:02 +0000 (UTC) (envelope-from bms@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v0A0S1TO070436; Tue, 10 Jan 2017 00:28:01 GMT (envelope-from bms@FreeBSD.org) Received: (from bms@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v0A0S1ZU070435; Tue, 10 Jan 2017 00:28:01 GMT (envelope-from bms@FreeBSD.org) Message-Id: <201701100028.v0A0S1ZU070435@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bms set sender to bms@FreeBSD.org using -f From: Bruce M Simpson Date: Tue, 10 Jan 2017 00:28:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r311844 - head/sys/dev/usb X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 10 Jan 2017 00:28:02 -0000 Author: bms Date: Tue Jan 10 00:28:01 2017 New Revision: 311844 URL: https://svnweb.freebsd.org/changeset/base/311844 Log: Add PID for Belkin F5U258 "Windows Easy Transfer Cable", a udbp-like device. Modified: head/sys/dev/usb/usbdevs Modified: head/sys/dev/usb/usbdevs ============================================================================== --- head/sys/dev/usb/usbdevs Tue Jan 10 00:03:43 2017 (r311843) +++ head/sys/dev/usb/usbdevs Tue Jan 10 00:28:01 2017 (r311844) @@ -1318,6 +1318,7 @@ product BELKIN RTL8188CU 0x1102 RTL8188 product BELKIN F9L1103 0x1103 F9L1103 Wireless Adapter product BELKIN RTL8192CU 0x2102 RTL8192CU Wireless Adapter product BELKIN F7D2102 0x2103 F7D2102 Wireless Adapter +product BELKIN F5U258 0x258A F5U258 Host to Host cable product BELKIN ZD1211B 0x4050 ZD1211B product BELKIN F5D5055 0x5055 F5D5055 product BELKIN F5D7050 0x7050 F5D7050 Wireless Adapter From owner-svn-src-head@freebsd.org Tue Jan 10 01:09:40 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 69720CA6E0A; Tue, 10 Jan 2017 01:09:40 +0000 (UTC) (envelope-from avos@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1F18D1DFA; Tue, 10 Jan 2017 01:09:40 +0000 (UTC) (envelope-from avos@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v0A19duR086543; Tue, 10 Jan 2017 01:09:39 GMT (envelope-from avos@FreeBSD.org) Received: (from avos@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v0A19dTT086542; Tue, 10 Jan 2017 01:09:39 GMT (envelope-from avos@FreeBSD.org) Message-Id: <201701100109.v0A19dTT086542@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avos set sender to avos@FreeBSD.org using -f From: Andriy Voskoboinyk Date: Tue, 10 Jan 2017 01:09:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r311845 - head/sys/dev/rtwn/pci X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 10 Jan 2017 01:09:40 -0000 Author: avos Date: Tue Jan 10 01:09:39 2017 New Revision: 311845 URL: https://svnweb.freebsd.org/changeset/base/311845 Log: rtwn_pci(4): fix possible race while accessing 'matched_chip' variable. Modified: head/sys/dev/rtwn/pci/rtwn_pci_attach.c Modified: head/sys/dev/rtwn/pci/rtwn_pci_attach.c ============================================================================== --- head/sys/dev/rtwn/pci/rtwn_pci_attach.c Tue Jan 10 00:28:01 2017 (r311844) +++ head/sys/dev/rtwn/pci/rtwn_pci_attach.c Tue Jan 10 01:09:39 2017 (r311845) @@ -94,20 +94,31 @@ static void rtwn_pci_beacon_update_end(s static void rtwn_pci_attach_methods(struct rtwn_softc *); -static int matched_chip = RTWN_CHIP_MAX_PCI; +static const struct rtwn_pci_ident * +rtwn_pci_probe_sub(device_t dev) +{ + const struct rtwn_pci_ident *ident; + int vendor_id, device_id; + + vendor_id = pci_get_vendor(dev); + device_id = pci_get_device(dev); + + for (ident = rtwn_pci_ident_table; ident->name != NULL; ident++) + if (vendor_id == ident->vendor && device_id == ident->device) + return (ident); + + return (NULL); +} static int rtwn_pci_probe(device_t dev) { const struct rtwn_pci_ident *ident; - for (ident = rtwn_pci_ident_table; ident->name != NULL; ident++) { - if (pci_get_vendor(dev) == ident->vendor && - pci_get_device(dev) == ident->device) { - matched_chip = ident->chip; - device_set_desc(dev, ident->name); - return (BUS_PROBE_DEFAULT); - } + ident = rtwn_pci_probe_sub(dev); + if (ident != NULL) { + device_set_desc(dev, ident->name); + return (BUS_PROBE_DEFAULT); } return (ENXIO); } @@ -591,13 +602,15 @@ rtwn_pci_attach_methods(struct rtwn_soft static int rtwn_pci_attach(device_t dev) { + const struct rtwn_pci_ident *ident; struct rtwn_pci_softc *pc = device_get_softc(dev); struct rtwn_softc *sc = &pc->pc_sc; struct ieee80211com *ic = &sc->sc_ic; uint32_t lcsr; int cap_off, i, error, rid; - if (matched_chip >= RTWN_CHIP_MAX_PCI) + ident = rtwn_pci_probe_sub(dev); + if (ident == NULL) return (ENXIO); /* @@ -649,8 +662,7 @@ rtwn_pci_attach(device_t dev) mtx_init(&sc->sc_mtx, ic->ic_name, MTX_NETWORK_LOCK, MTX_DEF); rtwn_pci_attach_methods(sc); - /* XXX something similar to USB_GET_DRIVER_INFO() */ - rtwn_pci_attach_private(pc, matched_chip); + rtwn_pci_attach_private(pc, ident->chip); /* Allocate Tx/Rx buffers. */ error = rtwn_pci_alloc_rx_list(sc); From owner-svn-src-head@freebsd.org Tue Jan 10 01:30:42 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E122DCA603C; Tue, 10 Jan 2017 01:30:42 +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 A9C531062; Tue, 10 Jan 2017 01:30:42 +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 v0A1Uf8t095212; Tue, 10 Jan 2017 01:30:41 GMT (envelope-from np@FreeBSD.org) Received: (from np@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v0A1Uf9G095211; Tue, 10 Jan 2017 01:30:41 GMT (envelope-from np@FreeBSD.org) Message-Id: <201701100130.v0A1Uf9G095211@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: np set sender to np@FreeBSD.org using -f From: Navdeep Parhar Date: Tue, 10 Jan 2017 01:30:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r311846 - head/sys/dev/cxgbe/common X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 10 Jan 2017 01:30:43 -0000 Author: np Date: Tue Jan 10 01:30:41 2017 New Revision: 311846 URL: https://svnweb.freebsd.org/changeset/base/311846 Log: cxgbe(4): Refresh t4_msg.h, mainly for definitions related to the crypto engine. Obtained from: Chelsio Communications MFC after: 2 weeks Sponsored by: Chelsio Communications Modified: head/sys/dev/cxgbe/common/t4_msg.h Modified: head/sys/dev/cxgbe/common/t4_msg.h ============================================================================== --- head/sys/dev/cxgbe/common/t4_msg.h Tue Jan 10 01:09:39 2017 (r311845) +++ head/sys/dev/cxgbe/common/t4_msg.h Tue Jan 10 01:30:41 2017 (r311846) @@ -106,6 +106,7 @@ enum { CPL_RX_FCOE_DIF = 0x4A, CPL_RX_DATA_DIF = 0x4B, CPL_ERR_NOTIFY = 0x4D, + CPL_RX_TLS_CMP = 0x4E, CPL_RDMA_READ_REQ = 0x60, CPL_RX_ISCSI_DIF = 0x60, @@ -113,6 +114,11 @@ enum { CPL_SET_LE_REQ = 0x80, CPL_PASS_OPEN_REQ6 = 0x81, CPL_ACT_OPEN_REQ6 = 0x83, + CPL_TX_TLS_PDU = 0x88, + CPL_TX_TLS_SFO = 0x89, + + CPL_TX_SEC_PDU = 0x8A, + CPL_TX_TLS_ACK = 0x8B, CPL_RDMA_TERMINATE = 0xA2, CPL_RDMA_WRITE = 0xA4, @@ -129,6 +135,7 @@ enum { CPL_TRACE_PKT = 0xB0, CPL_RX2TX_DATA = 0xB1, + CPL_TLS_DATA = 0xB1, CPL_ISCSI_DATA = 0xB2, CPL_FCOE_DATA = 0xB3, @@ -136,6 +143,7 @@ enum { CPL_FW4_PLD = 0xC1, CPL_FW4_ACK = 0xC3, CPL_SRQ_TABLE_RPL = 0xCC, + CPL_RX_PHYS_DSGL = 0xD0, CPL_FW6_MSG = 0xE0, CPL_FW6_PLD = 0xE1, @@ -200,6 +208,7 @@ enum { ULP_MODE_RDMA = 4, ULP_MODE_TCPDDP = 5, ULP_MODE_FCOE = 6, + ULP_MODE_TLS = 8, }; enum { @@ -993,6 +1002,23 @@ struct cpl_abort_req_rss { __u8 status; }; +struct cpl_abort_req_rss6 { + RSS_HDR + union opcode_tid ot; + __u32 srqidx_status; +}; + +#define S_ABORT_RSS_STATUS 0 +#define M_ABORT_RSS_STATUS 0xff +#define V_ABORT_RSS_STATUS(x) ((x) << S_ABORT_RSS_STATUS) +#define G_ABORT_RSS_STATUS(x) (((x) >> S_ABORT_RSS_STATUS) & M_ABORT_RSS_STATUS) + +#define S_ABORT_RSS_SRQIDX 8 +#define M_ABORT_RSS_SRQIDX 0xffffff +#define V_ABORT_RSS_SRQIDX(x) ((x) << S_ABORT_RSS_SRQIDX) +#define G_ABORT_RSS_SRQIDX(x) (((x) >> S_ABORT_RSS_SRQIDX) & M_ABORT_RSS_SRQIDX) + + /* cpl_abort_req status command code in case of T6, * bit[0] specifies whether to send RST (0) to remote peer or suppress it (1) * bit[1] indicates ABORT_REQ was sent after a CLOSE_CON_REQ @@ -1014,6 +1040,12 @@ struct cpl_abort_rpl_rss { __u8 status; }; +struct cpl_abort_rpl_rss6 { + RSS_HDR + union opcode_tid ot; + __u32 srqidx_status; +}; + struct cpl_abort_rpl { WR_HDR; union opcode_tid ot; @@ -2612,6 +2644,7 @@ enum { FW_TYPE_RSSCPL = 4, FW_TYPE_WRERR_RPL = 5, FW_TYPE_PI_ERR = 6, + FW_TYPE_TLS_KEY = 7, }; struct cpl_fw2_pld { @@ -2712,7 +2745,8 @@ enum { ULP_TX_SC_IMM = 0x81, ULP_TX_SC_DSGL = 0x82, ULP_TX_SC_ISGL = 0x83, - ULP_TX_SC_PICTRL = 0x84 + ULP_TX_SC_PICTRL = 0x84, + ULP_TX_SC_MEMRD = 0x86 }; #define S_ULPTX_CMD 24 @@ -2763,6 +2797,12 @@ struct ulptx_idata { #define S_ULPTX_NSGE 0 #define M_ULPTX_NSGE 0xFFFF #define V_ULPTX_NSGE(x) ((x) << S_ULPTX_NSGE) +#define G_ULPTX_NSGE(x) (((x) >> S_ULPTX_NSGE) & M_ULPTX_NSGE) + +struct ulptx_sc_memrd { + __be32 cmd_to_len; + __be32 addr; +}; struct ulp_mem_io { WR_HDR; @@ -2817,6 +2857,21 @@ struct ulp_txpkt { }; /* ulp_txpkt.cmd_dest fields */ +#define S_ULP_TXPKT_DATAMODIFY 23 +#define M_ULP_TXPKT_DATAMODIFY 0x1 +#define V_ULP_TXPKT_DATAMODIFY(x) ((x) << S_ULP_TXPKT_DATAMODIFY) +#define G_ULP_TXPKT_DATAMODIFY(x) \ + (((x) >> S_ULP_TXPKT_DATAMODIFY) & M_ULP_TXPKT_DATAMODIFY_) +#define F_ULP_TXPKT_DATAMODIFY V_ULP_TXPKT_DATAMODIFY(1U) + +#define S_ULP_TXPKT_CHANNELID 22 +#define M_ULP_TXPKT_CHANNELID 0x1 +#define V_ULP_TXPKT_CHANNELID(x) ((x) << S_ULP_TXPKT_CHANNELID) +#define G_ULP_TXPKT_CHANNELID(x) \ + (((x) >> S_ULP_TXPKT_CHANNELID) & M_ULP_TXPKT_CHANNELID) +#define F_ULP_TXPKT_CHANNELID V_ULP_TXPKT_CHANNELID(1U) + +/* ulp_txpkt.cmd_dest fields */ #define S_ULP_TXPKT_DEST 16 #define M_ULP_TXPKT_DEST 0x3 #define V_ULP_TXPKT_DEST(x) ((x) << S_ULP_TXPKT_DEST) @@ -3044,4 +3099,542 @@ struct cpl_rx_mps_pkt { #define X_CPL_RX_MPS_PKT_TYPE_QFC (1 << 2) #define X_CPL_RX_MPS_PKT_TYPE_PTP (1 << 3) +struct cpl_tx_tls_sfo { + __be32 op_to_seg_len; + __be32 pld_len; + __be64 rsvd; + __be32 seqno_numivs; + __be32 ivgen_hdrlen; + __be64 scmd1; +}; + +/* cpl_tx_tls_sfo macros */ +#define S_CPL_TX_TLS_SFO_OPCODE 24 +#define M_CPL_TX_TLS_SFO_OPCODE 0xff +#define V_CPL_TX_TLS_SFO_OPCODE(x) ((x) << S_CPL_TX_TLS_SFO_OPCODE) +#define G_CPL_TX_TLS_SFO_OPCODE(x) \ + (((x) >> S_CPL_TX_TLS_SFO_OPCODE) & M_CPL_TX_TLS_SFO_OPCODE) + +#define S_CPL_TX_TLS_SFO_DATA_TYPE 20 +#define M_CPL_TX_TLS_SFO_DATA_TYPE 0xf +#define V_CPL_TX_TLS_SFO_DATA_TYPE(x) ((x) << S_CPL_TX_TLS_SFO_DATA_TYPE) +#define G_CPL_TX_TLS_SFO_DATA_TYPE(x) \ + (((x) >> S_CPL_TX_TLS_SFO_DATA_TYPE) & M_CPL_TX_TLS_SFO_DATA_TYPE) + +#define S_CPL_TX_TLS_SFO_CPL_LEN 16 +#define M_CPL_TX_TLS_SFO_CPL_LEN 0xf +#define V_CPL_TX_TLS_SFO_CPL_LEN(x) ((x) << S_CPL_TX_TLS_SFO_CPL_LEN) +#define G_CPL_TX_TLS_SFO_CPL_LEN(x) \ + (((x) >> S_CPL_TX_TLS_SFO_CPL_LEN) & M_CPL_TX_TLS_SFO_CPL_LEN) +#define S_CPL_TX_TLS_SFO_SEG_LEN 0 +#define M_CPL_TX_TLS_SFO_SEG_LEN 0xffff +#define V_CPL_TX_TLS_SFO_SEG_LEN(x) ((x) << S_CPL_TX_TLS_SFO_SEG_LEN) +#define G_CPL_TX_TLS_SFO_SEG_LEN(x) \ + (((x) >> S_CPL_TX_TLS_SFO_SEG_LEN) & M_CPL_TX_TLS_SFO_SEG_LEN) + +struct cpl_tls_data { + RSS_HDR + __be32 op_tid; + __be32 length_pkd; + __be32 seq; + __be32 r1; +}; + +#define S_CPL_TLS_DATA_OPCODE 24 +#define M_CPL_TLS_DATA_OPCODE 0xff +#define V_CPL_TLS_DATA_OPCODE(x) ((x) << S_CPL_TLS_DATA_OPCODE) +#define G_CPL_TLS_DATA_OPCODE(x) \ + (((x) >> S_CPL_TLS_DATA_OPCODE) & M_CPL_TLS_DATA_OPCODE) + +#define S_CPL_TLS_DATA_TID 0 +#define M_CPL_TLS_DATA_TID 0xffffff +#define V_CPL_TLS_DATA_TID(x) ((x) << S_CPL_TLS_DATA_TID) +#define G_CPL_TLS_DATA_TID(x) \ + (((x) >> S_CPL_TLS_DATA_TID) & M_CPL_TLS_DATA_TID) + +#define S_CPL_TLS_DATA_LENGTH 0 +#define M_CPL_TLS_DATA_LENGTH 0xffff +#define V_CPL_TLS_DATA_LENGTH(x) ((x) << S_CPL_TLS_DATA_LENGTH) +#define G_CPL_TLS_DATA_LENGTH(x) \ + (((x) >> S_CPL_TLS_DATA_LENGTH) & M_CPL_TLS_DATA_LENGTH) + +struct cpl_rx_tls_cmp { + RSS_HDR + __be32 op_tid; + __be32 pdulength_length; + __be32 seq; + __be32 ddp_report; + __be32 r; + __be32 ddp_valid; +}; + +#define S_CPL_RX_TLS_CMP_OPCODE 24 +#define M_CPL_RX_TLS_CMP_OPCODE 0xff +#define V_CPL_RX_TLS_CMP_OPCODE(x) ((x) << S_CPL_RX_TLS_CMP_OPCODE) +#define G_CPL_RX_TLS_CMP_OPCODE(x) \ + (((x) >> S_CPL_RX_TLS_CMP_OPCODE) & M_CPL_RX_TLS_CMP_OPCODE) + +#define S_CPL_RX_TLS_CMP_TID 0 +#define M_CPL_RX_TLS_CMP_TID 0xffffff +#define V_CPL_RX_TLS_CMP_TID(x) ((x) << S_CPL_RX_TLS_CMP_TID) +#define G_CPL_RX_TLS_CMP_TID(x) \ + (((x) >> S_CPL_RX_TLS_CMP_TID) & M_CPL_RX_TLS_CMP_TID) + +#define S_CPL_RX_TLS_CMP_PDULENGTH 16 +#define M_CPL_RX_TLS_CMP_PDULENGTH 0xffff +#define V_CPL_RX_TLS_CMP_PDULENGTH(x) ((x) << S_CPL_RX_TLS_CMP_PDULENGTH) +#define G_CPL_RX_TLS_CMP_PDULENGTH(x) \ + (((x) >> S_CPL_RX_TLS_CMP_PDULENGTH) & M_CPL_RX_TLS_CMP_PDULENGTH) + +#define S_CPL_RX_TLS_CMP_LENGTH 0 +#define M_CPL_RX_TLS_CMP_LENGTH 0xffff +#define V_CPL_RX_TLS_CMP_LENGTH(x) ((x) << S_CPL_RX_TLS_CMP_LENGTH) +#define G_CPL_RX_TLS_CMP_LENGTH(x) \ + (((x) >> S_CPL_RX_TLS_CMP_LENGTH) & M_CPL_RX_TLS_CMP_LENGTH) + +#define S_SCMD_SEQ_NO_CTRL 29 +#define M_SCMD_SEQ_NO_CTRL 0x3 +#define V_SCMD_SEQ_NO_CTRL(x) ((x) << S_SCMD_SEQ_NO_CTRL) +#define G_SCMD_SEQ_NO_CTRL(x) \ + (((x) >> S_SCMD_SEQ_NO_CTRL) & M_SCMD_SEQ_NO_CTRL) + +/* StsFieldPrsnt- Status field at the end of the TLS PDU */ +#define S_SCMD_STATUS_PRESENT 28 +#define M_SCMD_STATUS_PRESENT 0x1 +#define V_SCMD_STATUS_PRESENT(x) ((x) << S_SCMD_STATUS_PRESENT) +#define G_SCMD_STATUS_PRESENT(x) \ + (((x) >> S_SCMD_STATUS_PRESENT) & M_SCMD_STATUS_PRESENT) +#define F_SCMD_STATUS_PRESENT V_SCMD_STATUS_PRESENT(1U) + +/* ProtoVersion - Protocol Version 0: 1.2, 1:1.1, 2:DTLS, 3:Generic, + * 3-15: Reserved. */ +#define S_SCMD_PROTO_VERSION 24 +#define M_SCMD_PROTO_VERSION 0xf +#define V_SCMD_PROTO_VERSION(x) ((x) << S_SCMD_PROTO_VERSION) +#define G_SCMD_PROTO_VERSION(x) \ + (((x) >> S_SCMD_PROTO_VERSION) & M_SCMD_PROTO_VERSION) + +/* EncDecCtrl - Encryption/Decryption Control. 0: Encrypt, 1: Decrypt */ +#define S_SCMD_ENC_DEC_CTRL 23 +#define M_SCMD_ENC_DEC_CTRL 0x1 +#define V_SCMD_ENC_DEC_CTRL(x) ((x) << S_SCMD_ENC_DEC_CTRL) +#define G_SCMD_ENC_DEC_CTRL(x) \ + (((x) >> S_SCMD_ENC_DEC_CTRL) & M_SCMD_ENC_DEC_CTRL) +#define F_SCMD_ENC_DEC_CTRL V_SCMD_ENC_DEC_CTRL(1U) + +/* CipherAuthSeqCtrl - Cipher Authentication Sequence Control. */ +#define S_SCMD_CIPH_AUTH_SEQ_CTRL 22 +#define M_SCMD_CIPH_AUTH_SEQ_CTRL 0x1 +#define V_SCMD_CIPH_AUTH_SEQ_CTRL(x) \ + ((x) << S_SCMD_CIPH_AUTH_SEQ_CTRL) +#define G_SCMD_CIPH_AUTH_SEQ_CTRL(x) \ + (((x) >> S_SCMD_CIPH_AUTH_SEQ_CTRL) & M_SCMD_CIPH_AUTH_SEQ_CTRL) +#define F_SCMD_CIPH_AUTH_SEQ_CTRL V_SCMD_CIPH_AUTH_SEQ_CTRL(1U) + +/* CiphMode - Cipher Mode. 0: NOP, 1:AES-CBC, 2:AES-GCM, 3:AES-CTR, + * 4:Generic-AES, 5-15: Reserved. */ +#define S_SCMD_CIPH_MODE 18 +#define M_SCMD_CIPH_MODE 0xf +#define V_SCMD_CIPH_MODE(x) ((x) << S_SCMD_CIPH_MODE) +#define G_SCMD_CIPH_MODE(x) \ + (((x) >> S_SCMD_CIPH_MODE) & M_SCMD_CIPH_MODE) + +/* AuthMode - Auth Mode. 0: NOP, 1:SHA1, 2:SHA2-224, 3:SHA2-256 + * 4-15: Reserved */ +#define S_SCMD_AUTH_MODE 14 +#define M_SCMD_AUTH_MODE 0xf +#define V_SCMD_AUTH_MODE(x) ((x) << S_SCMD_AUTH_MODE) +#define G_SCMD_AUTH_MODE(x) \ + (((x) >> S_SCMD_AUTH_MODE) & M_SCMD_AUTH_MODE) + +/* HmacCtrl - HMAC Control. 0:NOP, 1:No truncation, 2:Support HMAC Truncation + * per RFC 4366, 3:IPSec 96 bits, 4-7:Reserved + */ +#define S_SCMD_HMAC_CTRL 11 +#define M_SCMD_HMAC_CTRL 0x7 +#define V_SCMD_HMAC_CTRL(x) ((x) << S_SCMD_HMAC_CTRL) +#define G_SCMD_HMAC_CTRL(x) \ + (((x) >> S_SCMD_HMAC_CTRL) & M_SCMD_HMAC_CTRL) + +/* IvSize - IV size in units of 2 bytes */ +#define S_SCMD_IV_SIZE 7 +#define M_SCMD_IV_SIZE 0xf +#define V_SCMD_IV_SIZE(x) ((x) << S_SCMD_IV_SIZE) +#define G_SCMD_IV_SIZE(x) \ + (((x) >> S_SCMD_IV_SIZE) & M_SCMD_IV_SIZE) + +/* NumIVs - Number of IVs */ +#define S_SCMD_NUM_IVS 0 +#define M_SCMD_NUM_IVS 0x7f +#define V_SCMD_NUM_IVS(x) ((x) << S_SCMD_NUM_IVS) +#define G_SCMD_NUM_IVS(x) \ + (((x) >> S_SCMD_NUM_IVS) & M_SCMD_NUM_IVS) + +/* EnbDbgId - If this is enabled upper 20 (63:44) bits if SeqNumber + * (below) are used as Cid (connection id for debug status), these + * bits are padded to zero for forming the 64 bit + * sequence number for TLS + */ +#define S_SCMD_ENB_DBGID 31 +#define M_SCMD_ENB_DBGID 0x1 +#define V_SCMD_ENB_DBGID(x) ((x) << S_SCMD_ENB_DBGID) +#define G_SCMD_ENB_DBGID(x) \ + (((x) >> S_SCMD_ENB_DBGID) & M_SCMD_ENB_DBGID) + +/* IV generation in SW. */ +#define S_SCMD_IV_GEN_CTRL 30 +#define M_SCMD_IV_GEN_CTRL 0x1 +#define V_SCMD_IV_GEN_CTRL(x) ((x) << S_SCMD_IV_GEN_CTRL) +#define G_SCMD_IV_GEN_CTRL(x) \ + (((x) >> S_SCMD_IV_GEN_CTRL) & M_SCMD_IV_GEN_CTRL) +#define F_SCMD_IV_GEN_CTRL V_SCMD_IV_GEN_CTRL(1U) + +/* More frags */ +#define S_SCMD_MORE_FRAGS 20 +#define M_SCMD_MORE_FRAGS 0x1 +#define V_SCMD_MORE_FRAGS(x) ((x) << S_SCMD_MORE_FRAGS) +#define G_SCMD_MORE_FRAGS(x) (((x) >> S_SCMD_MORE_FRAGS) & M_SCMD_MORE_FRAGS) + +/*last frag */ +#define S_SCMD_LAST_FRAG 19 +#define M_SCMD_LAST_FRAG 0x1 +#define V_SCMD_LAST_FRAG(x) ((x) << S_SCMD_LAST_FRAG) +#define G_SCMD_LAST_FRAG(x) (((x) >> S_SCMD_LAST_FRAG) & M_SCMD_LAST_FRAG) + +/* TlsCompPdu */ +#define S_SCMD_TLS_COMPPDU 18 +#define M_SCMD_TLS_COMPPDU 0x1 +#define V_SCMD_TLS_COMPPDU(x) ((x) << S_SCMD_TLS_COMPPDU) +#define G_SCMD_TLS_COMPPDU(x) (((x) >> S_SCMD_TLS_COMPPDU) & M_SCMD_TLS_COMPPDU) + +/* KeyCntxtInline - Key context inline after the scmd OR PayloadOnly*/ +#define S_SCMD_KEY_CTX_INLINE 17 +#define M_SCMD_KEY_CTX_INLINE 0x1 +#define V_SCMD_KEY_CTX_INLINE(x) ((x) << S_SCMD_KEY_CTX_INLINE) +#define G_SCMD_KEY_CTX_INLINE(x) \ + (((x) >> S_SCMD_KEY_CTX_INLINE) & M_SCMD_KEY_CTX_INLINE) +#define F_SCMD_KEY_CTX_INLINE V_SCMD_KEY_CTX_INLINE(1U) + +/* TLSFragEnable - 0: Host created TLS PDUs, 1: TLS Framgmentation in ASIC */ +#define S_SCMD_TLS_FRAG_ENABLE 16 +#define M_SCMD_TLS_FRAG_ENABLE 0x1 +#define V_SCMD_TLS_FRAG_ENABLE(x) ((x) << S_SCMD_TLS_FRAG_ENABLE) +#define G_SCMD_TLS_FRAG_ENABLE(x) \ + (((x) >> S_SCMD_TLS_FRAG_ENABLE) & M_SCMD_TLS_FRAG_ENABLE) +#define F_SCMD_TLS_FRAG_ENABLE V_SCMD_TLS_FRAG_ENABLE(1U) + +/* MacOnly - Only send the MAC and discard PDU. This is valid for hash only + * modes, in this case TLS_TX will drop the PDU and only + * send back the MAC bytes. */ +#define S_SCMD_MAC_ONLY 15 +#define M_SCMD_MAC_ONLY 0x1 +#define V_SCMD_MAC_ONLY(x) ((x) << S_SCMD_MAC_ONLY) +#define G_SCMD_MAC_ONLY(x) \ + (((x) >> S_SCMD_MAC_ONLY) & M_SCMD_MAC_ONLY) +#define F_SCMD_MAC_ONLY V_SCMD_MAC_ONLY(1U) + +/* AadIVDrop - Drop the AAD and IV fields. Useful in protocols + * which have complex AAD and IV formations Eg:AES-CCM + */ +#define S_SCMD_AADIVDROP 14 +#define M_SCMD_AADIVDROP 0x1 +#define V_SCMD_AADIVDROP(x) ((x) << S_SCMD_AADIVDROP) +#define G_SCMD_AADIVDROP(x) \ + (((x) >> S_SCMD_AADIVDROP) & M_SCMD_AADIVDROP) +#define F_SCMD_AADIVDROP V_SCMD_AADIVDROP(1U) + +/* HdrLength - Length of all headers excluding TLS header + * present before start of crypto PDU/payload. */ +#define S_SCMD_HDR_LEN 0 +#define M_SCMD_HDR_LEN 0x3fff +#define V_SCMD_HDR_LEN(x) ((x) << S_SCMD_HDR_LEN) +#define G_SCMD_HDR_LEN(x) \ + (((x) >> S_SCMD_HDR_LEN) & M_SCMD_HDR_LEN) + +struct cpl_tx_sec_pdu { + __be32 op_ivinsrtofst; + __be32 pldlen; + __be32 aadstart_cipherstop_hi; + __be32 cipherstop_lo_authinsert; + __be32 seqno_numivs; + __be32 ivgen_hdrlen; + __be64 scmd1; +}; + +#define S_CPL_TX_SEC_PDU_OPCODE 24 +#define M_CPL_TX_SEC_PDU_OPCODE 0xff +#define V_CPL_TX_SEC_PDU_OPCODE(x) ((x) << S_CPL_TX_SEC_PDU_OPCODE) +#define G_CPL_TX_SEC_PDU_OPCODE(x) \ + (((x) >> S_CPL_TX_SEC_PDU_OPCODE) & M_CPL_TX_SEC_PDU_OPCODE) + +/* RX Channel Id */ +#define S_CPL_TX_SEC_PDU_RXCHID 22 +#define M_CPL_TX_SEC_PDU_RXCHID 0x1 +#define V_CPL_TX_SEC_PDU_RXCHID(x) ((x) << S_CPL_TX_SEC_PDU_RXCHID) +#define G_CPL_TX_SEC_PDU_RXCHID(x) \ +(((x) >> S_CPL_TX_SEC_PDU_RXCHID) & M_CPL_TX_SEC_PDU_RXCHID) +#define F_CPL_TX_SEC_PDU_RXCHID V_CPL_TX_SEC_PDU_RXCHID(1U) + +/* Ack Follows */ +#define S_CPL_TX_SEC_PDU_ACKFOLLOWS 21 +#define M_CPL_TX_SEC_PDU_ACKFOLLOWS 0x1 +#define V_CPL_TX_SEC_PDU_ACKFOLLOWS(x) ((x) << S_CPL_TX_SEC_PDU_ACKFOLLOWS) +#define G_CPL_TX_SEC_PDU_ACKFOLLOWS(x) \ +(((x) >> S_CPL_TX_SEC_PDU_ACKFOLLOWS) & M_CPL_TX_SEC_PDU_ACKFOLLOWS) +#define F_CPL_TX_SEC_PDU_ACKFOLLOWS V_CPL_TX_SEC_PDU_ACKFOLLOWS(1U) + +/* Loopback bit in cpl_tx_sec_pdu */ +#define S_CPL_TX_SEC_PDU_ULPTXLPBK 20 +#define M_CPL_TX_SEC_PDU_ULPTXLPBK 0x1 +#define V_CPL_TX_SEC_PDU_ULPTXLPBK(x) ((x) << S_CPL_TX_SEC_PDU_ULPTXLPBK) +#define G_CPL_TX_SEC_PDU_ULPTXLPBK(x) \ +(((x) >> S_CPL_TX_SEC_PDU_ULPTXLPBK) & M_CPL_TX_SEC_PDU_ULPTXLPBK) +#define F_CPL_TX_SEC_PDU_ULPTXLPBK V_CPL_TX_SEC_PDU_ULPTXLPBK(1U) + +/* Length of cpl header encapsulated */ +#define S_CPL_TX_SEC_PDU_CPLLEN 16 +#define M_CPL_TX_SEC_PDU_CPLLEN 0xf +#define V_CPL_TX_SEC_PDU_CPLLEN(x) ((x) << S_CPL_TX_SEC_PDU_CPLLEN) +#define G_CPL_TX_SEC_PDU_CPLLEN(x) \ + (((x) >> S_CPL_TX_SEC_PDU_CPLLEN) & M_CPL_TX_SEC_PDU_CPLLEN) + +/* PlaceHolder */ +#define S_CPL_TX_SEC_PDU_PLACEHOLDER 10 +#define M_CPL_TX_SEC_PDU_PLACEHOLDER 0x1 +#define V_CPL_TX_SEC_PDU_PLACEHOLDER(x) ((x) << S_CPL_TX_SEC_PDU_PLACEHOLDER) +#define G_CPL_TX_SEC_PDU_PLACEHOLDER(x) \ + (((x) >> S_CPL_TX_SEC_PDU_PLACEHOLDER) & \ + M_CPL_TX_SEC_PDU_PLACEHOLDER) + +/* IvInsrtOffset: Insertion location for IV */ +#define S_CPL_TX_SEC_PDU_IVINSRTOFST 0 +#define M_CPL_TX_SEC_PDU_IVINSRTOFST 0x3ff +#define V_CPL_TX_SEC_PDU_IVINSRTOFST(x) ((x) << S_CPL_TX_SEC_PDU_IVINSRTOFST) +#define G_CPL_TX_SEC_PDU_IVINSRTOFST(x) \ + (((x) >> S_CPL_TX_SEC_PDU_IVINSRTOFST) & \ + M_CPL_TX_SEC_PDU_IVINSRTOFST) + +/* AadStartOffset: Offset in bytes for AAD start from + * the first byte following + * the pkt headers (0-255 + * bytes) */ +#define S_CPL_TX_SEC_PDU_AADSTART 24 +#define M_CPL_TX_SEC_PDU_AADSTART 0xff +#define V_CPL_TX_SEC_PDU_AADSTART(x) ((x) << S_CPL_TX_SEC_PDU_AADSTART) +#define G_CPL_TX_SEC_PDU_AADSTART(x) \ + (((x) >> S_CPL_TX_SEC_PDU_AADSTART) & \ + M_CPL_TX_SEC_PDU_AADSTART) + +/* AadStopOffset: offset in bytes for AAD stop/end from the first byte following + * the pkt headers (0-511 bytes) */ +#define S_CPL_TX_SEC_PDU_AADSTOP 15 +#define M_CPL_TX_SEC_PDU_AADSTOP 0x1ff +#define V_CPL_TX_SEC_PDU_AADSTOP(x) ((x) << S_CPL_TX_SEC_PDU_AADSTOP) +#define G_CPL_TX_SEC_PDU_AADSTOP(x) \ + (((x) >> S_CPL_TX_SEC_PDU_AADSTOP) & M_CPL_TX_SEC_PDU_AADSTOP) + +/* CipherStartOffset: offset in bytes for encryption/decryption start from the + * first byte following the pkt headers (0-1023 + * bytes) */ +#define S_CPL_TX_SEC_PDU_CIPHERSTART 5 +#define M_CPL_TX_SEC_PDU_CIPHERSTART 0x3ff +#define V_CPL_TX_SEC_PDU_CIPHERSTART(x) ((x) << S_CPL_TX_SEC_PDU_CIPHERSTART) +#define G_CPL_TX_SEC_PDU_CIPHERSTART(x) \ + (((x) >> S_CPL_TX_SEC_PDU_CIPHERSTART) & \ + M_CPL_TX_SEC_PDU_CIPHERSTART) + +/* CipherStopOffset: offset in bytes for encryption/decryption end + * from end of the payload of this command (0-511 bytes) */ +#define S_CPL_TX_SEC_PDU_CIPHERSTOP_HI 0 +#define M_CPL_TX_SEC_PDU_CIPHERSTOP_HI 0x1f +#define V_CPL_TX_SEC_PDU_CIPHERSTOP_HI(x) \ + ((x) << S_CPL_TX_SEC_PDU_CIPHERSTOP_HI) +#define G_CPL_TX_SEC_PDU_CIPHERSTOP_HI(x) \ + (((x) >> S_CPL_TX_SEC_PDU_CIPHERSTOP_HI) & \ + M_CPL_TX_SEC_PDU_CIPHERSTOP_HI) + +#define S_CPL_TX_SEC_PDU_CIPHERSTOP_LO 28 +#define M_CPL_TX_SEC_PDU_CIPHERSTOP_LO 0xf +#define V_CPL_TX_SEC_PDU_CIPHERSTOP_LO(x) \ + ((x) << S_CPL_TX_SEC_PDU_CIPHERSTOP_LO) +#define G_CPL_TX_SEC_PDU_CIPHERSTOP_LO(x) \ + (((x) >> S_CPL_TX_SEC_PDU_CIPHERSTOP_LO) & \ + M_CPL_TX_SEC_PDU_CIPHERSTOP_LO) + +/* AuthStartOffset: offset in bytes for authentication start from + * the first byte following the pkt headers (0-1023) + * */ +#define S_CPL_TX_SEC_PDU_AUTHSTART 18 +#define M_CPL_TX_SEC_PDU_AUTHSTART 0x3ff +#define V_CPL_TX_SEC_PDU_AUTHSTART(x) ((x) << S_CPL_TX_SEC_PDU_AUTHSTART) +#define G_CPL_TX_SEC_PDU_AUTHSTART(x) \ + (((x) >> S_CPL_TX_SEC_PDU_AUTHSTART) & \ + M_CPL_TX_SEC_PDU_AUTHSTART) + +/* AuthStopOffset: offset in bytes for authentication + * end from end of the payload of this command (0-511 Bytes) */ +#define S_CPL_TX_SEC_PDU_AUTHSTOP 9 +#define M_CPL_TX_SEC_PDU_AUTHSTOP 0x1ff +#define V_CPL_TX_SEC_PDU_AUTHSTOP(x) ((x) << S_CPL_TX_SEC_PDU_AUTHSTOP) +#define G_CPL_TX_SEC_PDU_AUTHSTOP(x) \ + (((x) >> S_CPL_TX_SEC_PDU_AUTHSTOP) & \ + M_CPL_TX_SEC_PDU_AUTHSTOP) + +/* AuthInsrtOffset: offset in bytes for authentication insertion + * from end of the payload of this command (0-511 bytes) */ +#define S_CPL_TX_SEC_PDU_AUTHINSERT 0 +#define M_CPL_TX_SEC_PDU_AUTHINSERT 0x1ff +#define V_CPL_TX_SEC_PDU_AUTHINSERT(x) ((x) << S_CPL_TX_SEC_PDU_AUTHINSERT) +#define G_CPL_TX_SEC_PDU_AUTHINSERT(x) \ + (((x) >> S_CPL_TX_SEC_PDU_AUTHINSERT) & \ + M_CPL_TX_SEC_PDU_AUTHINSERT) + +struct cpl_rx_phys_dsgl { + __be32 op_to_tid; + __be32 pcirlxorder_to_noofsgentr; + struct rss_header rss_hdr_int; +}; + +#define S_CPL_RX_PHYS_DSGL_OPCODE 24 +#define M_CPL_RX_PHYS_DSGL_OPCODE 0xff +#define V_CPL_RX_PHYS_DSGL_OPCODE(x) ((x) << S_CPL_RX_PHYS_DSGL_OPCODE) +#define G_CPL_RX_PHYS_DSGL_OPCODE(x) \ + (((x) >> S_CPL_RX_PHYS_DSGL_OPCODE) & M_CPL_RX_PHYS_DSGL_OPCODE) + +#define S_CPL_RX_PHYS_DSGL_ISRDMA 23 +#define M_CPL_RX_PHYS_DSGL_ISRDMA 0x1 +#define V_CPL_RX_PHYS_DSGL_ISRDMA(x) ((x) << S_CPL_RX_PHYS_DSGL_ISRDMA) +#define G_CPL_RX_PHYS_DSGL_ISRDMA(x) \ + (((x) >> S_CPL_RX_PHYS_DSGL_ISRDMA) & M_CPL_RX_PHYS_DSGL_ISRDMA) +#define F_CPL_RX_PHYS_DSGL_ISRDMA V_CPL_RX_PHYS_DSGL_ISRDMA(1U) + +#define S_CPL_RX_PHYS_DSGL_RSVD1 20 +#define M_CPL_RX_PHYS_DSGL_RSVD1 0x7 +#define V_CPL_RX_PHYS_DSGL_RSVD1(x) ((x) << S_CPL_RX_PHYS_DSGL_RSVD1) +#define G_CPL_RX_PHYS_DSGL_RSVD1(x) \ + (((x) >> S_CPL_RX_PHYS_DSGL_RSVD1) & M_CPL_RX_PHYS_DSGL_RSVD1) + +#define S_CPL_RX_PHYS_DSGL_PCIRLXORDER 31 +#define M_CPL_RX_PHYS_DSGL_PCIRLXORDER 0x1 +#define V_CPL_RX_PHYS_DSGL_PCIRLXORDER(x) \ + ((x) << S_CPL_RX_PHYS_DSGL_PCIRLXORDER) +#define G_CPL_RX_PHYS_DSGL_PCIRLXORDER(x) \ + (((x) >> S_CPL_RX_PHYS_DSGL_PCIRLXORDER) & \ + M_CPL_RX_PHYS_DSGL_PCIRLXORDER) +#define F_CPL_RX_PHYS_DSGL_PCIRLXORDER V_CPL_RX_PHYS_DSGL_PCIRLXORDER(1U) + +#define S_CPL_RX_PHYS_DSGL_PCINOSNOOP 30 +#define M_CPL_RX_PHYS_DSGL_PCINOSNOOP 0x1 +#define V_CPL_RX_PHYS_DSGL_PCINOSNOOP(x) \ + ((x) << S_CPL_RX_PHYS_DSGL_PCINOSNOOP) +#define G_CPL_RX_PHYS_DSGL_PCINOSNOOP(x) \ + (((x) >> S_CPL_RX_PHYS_DSGL_PCINOSNOOP) & \ + M_CPL_RX_PHYS_DSGL_PCINOSNOOP) +#define F_CPL_RX_PHYS_DSGL_PCINOSNOOP V_CPL_RX_PHYS_DSGL_PCINOSNOOP(1U) + +#define S_CPL_RX_PHYS_DSGL_PCITPHNTENB 29 +#define M_CPL_RX_PHYS_DSGL_PCITPHNTENB 0x1 +#define V_CPL_RX_PHYS_DSGL_PCITPHNTENB(x) \ + ((x) << S_CPL_RX_PHYS_DSGL_PCITPHNTENB) +#define G_CPL_RX_PHYS_DSGL_PCITPHNTENB(x) \ + (((x) >> S_CPL_RX_PHYS_DSGL_PCITPHNTENB) & \ + M_CPL_RX_PHYS_DSGL_PCITPHNTENB) +#define F_CPL_RX_PHYS_DSGL_PCITPHNTENB V_CPL_RX_PHYS_DSGL_PCITPHNTENB(1U) + +#define S_CPL_RX_PHYS_DSGL_PCITPHNT 27 +#define M_CPL_RX_PHYS_DSGL_PCITPHNT 0x3 +#define V_CPL_RX_PHYS_DSGL_PCITPHNT(x) ((x) << S_CPL_RX_PHYS_DSGL_PCITPHNT) +#define G_CPL_RX_PHYS_DSGL_PCITPHNT(x) \ + (((x) >> S_CPL_RX_PHYS_DSGL_PCITPHNT) & \ + M_CPL_RX_PHYS_DSGL_PCITPHNT) + +#define S_CPL_RX_PHYS_DSGL_DCAID 16 +#define M_CPL_RX_PHYS_DSGL_DCAID 0x7ff +#define V_CPL_RX_PHYS_DSGL_DCAID(x) ((x) << S_CPL_RX_PHYS_DSGL_DCAID) +#define G_CPL_RX_PHYS_DSGL_DCAID(x) \ + (((x) >> S_CPL_RX_PHYS_DSGL_DCAID) & \ + M_CPL_RX_PHYS_DSGL_DCAID) + +#define S_CPL_RX_PHYS_DSGL_NOOFSGENTR 0 +#define M_CPL_RX_PHYS_DSGL_NOOFSGENTR 0xffff +#define V_CPL_RX_PHYS_DSGL_NOOFSGENTR(x) \ + ((x) << S_CPL_RX_PHYS_DSGL_NOOFSGENTR) +#define G_CPL_RX_PHYS_DSGL_NOOFSGENTR(x) \ + (((x) >> S_CPL_RX_PHYS_DSGL_NOOFSGENTR) & \ + M_CPL_RX_PHYS_DSGL_NOOFSGENTR) + +/* CPL_TX_TLS_ACK */ +struct cpl_tx_tls_ack { + __be32 op_to_Rsvd2; + __be32 PldLen; + __be64 Rsvd3; +}; + +#define S_CPL_TX_TLS_ACK_OPCODE 24 +#define M_CPL_TX_TLS_ACK_OPCODE 0xff +#define V_CPL_TX_TLS_ACK_OPCODE(x) ((x) << S_CPL_TX_TLS_ACK_OPCODE) +#define G_CPL_TX_TLS_ACK_OPCODE(x) \ + (((x) >> S_CPL_TX_TLS_ACK_OPCODE) & M_CPL_TX_TLS_ACK_OPCODE) + +#define S_CPL_TX_TLS_ACK_RSVD1 23 +#define M_CPL_TX_TLS_ACK_RSVD1 0x1 +#define V_CPL_TX_TLS_ACK_RSVD1(x) ((x) << S_CPL_TX_TLS_ACK_RSVD1) +#define G_CPL_TX_TLS_ACK_RSVD1(x) \ + (((x) >> S_CPL_TX_TLS_ACK_RSVD1) & M_CPL_TX_TLS_ACK_RSVD1) +#define F_CPL_TX_TLS_ACK_RSVD1 V_CPL_TX_TLS_ACK_RSVD1(1U) + +#define S_CPL_TX_TLS_ACK_RXCHID 22 +#define M_CPL_TX_TLS_ACK_RXCHID 0x1 +#define V_CPL_TX_TLS_ACK_RXCHID(x) ((x) << S_CPL_TX_TLS_ACK_RXCHID) +#define G_CPL_TX_TLS_ACK_RXCHID(x) \ + (((x) >> S_CPL_TX_TLS_ACK_RXCHID) & M_CPL_TX_TLS_ACK_RXCHID) +#define F_CPL_TX_TLS_ACK_RXCHID V_CPL_TX_TLS_ACK_RXCHID(1U) + +#define S_CPL_TX_TLS_ACK_FWMSG 21 +#define M_CPL_TX_TLS_ACK_FWMSG 0x1 +#define V_CPL_TX_TLS_ACK_FWMSG(x) ((x) << S_CPL_TX_TLS_ACK_FWMSG) +#define G_CPL_TX_TLS_ACK_FWMSG(x) \ + (((x) >> S_CPL_TX_TLS_ACK_FWMSG) & M_CPL_TX_TLS_ACK_FWMSG) +#define F_CPL_TX_TLS_ACK_FWMSG V_CPL_TX_TLS_ACK_FWMSG(1U) + +#define S_CPL_TX_TLS_ACK_ULPTXLPBK 20 +#define M_CPL_TX_TLS_ACK_ULPTXLPBK 0x1 +#define V_CPL_TX_TLS_ACK_ULPTXLPBK(x) ((x) << S_CPL_TX_TLS_ACK_ULPTXLPBK) +#define G_CPL_TX_TLS_ACK_ULPTXLPBK(x) \ + (((x) >> S_CPL_TX_TLS_ACK_ULPTXLPBK) & M_CPL_TX_TLS_ACK_ULPTXLPBK) +#define F_CPL_TX_TLS_ACK_ULPTXLPBK V_CPL_TX_TLS_ACK_ULPTXLPBK(1U) + +#define S_CPL_TX_TLS_ACK_CPLLEN 16 +#define M_CPL_TX_TLS_ACK_CPLLEN 0xf +#define V_CPL_TX_TLS_ACK_CPLLEN(x) ((x) << S_CPL_TX_TLS_ACK_CPLLEN) +#define G_CPL_TX_TLS_ACK_CPLLEN(x) \ + (((x) >> S_CPL_TX_TLS_ACK_CPLLEN) & M_CPL_TX_TLS_ACK_CPLLEN) + +#define S_CPL_TX_TLS_ACK_COMPLONERR 15 +#define M_CPL_TX_TLS_ACK_COMPLONERR 0x1 +#define V_CPL_TX_TLS_ACK_COMPLONERR(x) ((x) << S_CPL_TX_TLS_ACK_COMPLONERR) +#define G_CPL_TX_TLS_ACK_COMPLONERR(x) \ + (((x) >> S_CPL_TX_TLS_ACK_COMPLONERR) & M_CPL_TX_TLS_ACK_COMPLONERR) +#define F_CPL_TX_TLS_ACK_COMPLONERR V_CPL_TX_TLS_ACK_COMPLONERR(1U) + +#define S_CPL_TX_TLS_ACK_LCB 14 +#define M_CPL_TX_TLS_ACK_LCB 0x1 +#define V_CPL_TX_TLS_ACK_LCB(x) ((x) << S_CPL_TX_TLS_ACK_LCB) +#define G_CPL_TX_TLS_ACK_LCB(x) \ + (((x) >> S_CPL_TX_TLS_ACK_LCB) & M_CPL_TX_TLS_ACK_LCB) +#define F_CPL_TX_TLS_ACK_LCB V_CPL_TX_TLS_ACK_LCB(1U) + +#define S_CPL_TX_TLS_ACK_PHASH 13 +#define M_CPL_TX_TLS_ACK_PHASH 0x1 +#define V_CPL_TX_TLS_ACK_PHASH(x) ((x) << S_CPL_TX_TLS_ACK_PHASH) +#define G_CPL_TX_TLS_ACK_PHASH(x) \ + (((x) >> S_CPL_TX_TLS_ACK_PHASH) & M_CPL_TX_TLS_ACK_PHASH) +#define F_CPL_TX_TLS_ACK_PHASH V_CPL_TX_TLS_ACK_PHASH(1U) + +#define S_CPL_TX_TLS_ACK_RSVD2 0 +#define M_CPL_TX_TLS_ACK_RSVD2 0x1fff +#define V_CPL_TX_TLS_ACK_RSVD2(x) ((x) << S_CPL_TX_TLS_ACK_RSVD2) +#define G_CPL_TX_TLS_ACK_RSVD2(x) \ + (((x) >> S_CPL_TX_TLS_ACK_RSVD2) & M_CPL_TX_TLS_ACK_RSVD2) + #endif /* T4_MSG_H */ From owner-svn-src-head@freebsd.org Tue Jan 10 01:31:27 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B7AC2CA62B2; Tue, 10 Jan 2017 01:31:27 +0000 (UTC) (envelope-from bms@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8668E13DE; Tue, 10 Jan 2017 01:31:27 +0000 (UTC) (envelope-from bms@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v0A1VQ3q096030; Tue, 10 Jan 2017 01:31:26 GMT (envelope-from bms@FreeBSD.org) Received: (from bms@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v0A1VQWu096029; Tue, 10 Jan 2017 01:31:26 GMT (envelope-from bms@FreeBSD.org) Message-Id: <201701100131.v0A1VQWu096029@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bms set sender to bms@FreeBSD.org using -f From: Bruce M Simpson Date: Tue, 10 Jan 2017 01:31:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r311847 - head/sys/dev/usb/misc X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 10 Jan 2017 01:31:27 -0000 Author: bms Date: Tue Jan 10 01:31:26 2017 New Revision: 311847 URL: https://svnweb.freebsd.org/changeset/base/311847 Log: Allow udbp(4) to claim Belkin "Windows Easy Transfer Cable" for Netgraph use. These have been tested back-to-back with Linux 3.x and a similar attachment at the other end; a CDC EEM-like encapsulation can be used for emulated Ethernet over udbp(4) with ng_ether. Modified: head/sys/dev/usb/misc/udbp.c Modified: head/sys/dev/usb/misc/udbp.c ============================================================================== --- head/sys/dev/usb/misc/udbp.c Tue Jan 10 01:30:41 2017 (r311846) +++ head/sys/dev/usb/misc/udbp.c Tue Jan 10 01:31:26 2017 (r311847) @@ -259,6 +259,7 @@ static driver_t udbp_driver = { }; static const STRUCT_USB_HOST_ID udbp_devs[] = { + {USB_VPI(USB_VENDOR_BELKIN, USB_PRODUCT_BELKIN_F5U258, 0)}, {USB_VPI(USB_VENDOR_NETCHIP, USB_PRODUCT_NETCHIP_TURBOCONNECT, 0)}, {USB_VPI(USB_VENDOR_NETCHIP, USB_PRODUCT_NETCHIP_GADGETZERO, 0)}, {USB_VPI(USB_VENDOR_PROLIFIC, USB_PRODUCT_PROLIFIC_PL2301, 0)}, From owner-svn-src-head@freebsd.org Tue Jan 10 01:36:52 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 26AEACA6591; Tue, 10 Jan 2017 01:36:52 +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 EA71218B2; Tue, 10 Jan 2017 01:36:51 +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 v0A1apZI098343; Tue, 10 Jan 2017 01:36:51 GMT (envelope-from np@FreeBSD.org) Received: (from np@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v0A1aprG098342; Tue, 10 Jan 2017 01:36:51 GMT (envelope-from np@FreeBSD.org) Message-Id: <201701100136.v0A1aprG098342@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: np set sender to np@FreeBSD.org using -f From: Navdeep Parhar Date: Tue, 10 Jan 2017 01:36:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r311848 - head/sys/dev/cxgbe X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 10 Jan 2017 01:36:52 -0000 Author: np Date: Tue Jan 10 01:36:50 2017 New Revision: 311848 URL: https://svnweb.freebsd.org/changeset/base/311848 Log: cxgbe(4): Attach to the 2x25 debug card. This is for internal use only. MFC after: 3 days Modified: head/sys/dev/cxgbe/t4_main.c Modified: head/sys/dev/cxgbe/t4_main.c ============================================================================== --- head/sys/dev/cxgbe/t4_main.c Tue Jan 10 01:31:26 2017 (r311847) +++ head/sys/dev/cxgbe/t4_main.c Tue Jan 10 01:36:50 2017 (r311848) @@ -623,6 +623,7 @@ struct { #endif }, t6_pciids[] = { {0xc006, "Chelsio Terminator 6 FPGA"}, /* T6 PE10K6 FPGA (PF0) */ + {0x6400, "Chelsio T6225-DBG"}, /* 2 x 10/25G, debug */ {0x6401, "Chelsio T6225-CR"}, /* 2 x 10/25G */ {0x6402, "Chelsio T6225-SO-CR"}, /* 2 x 10/25G, nomem */ {0x6407, "Chelsio T62100-LP-CR"}, /* 2 x 40/50/100G */ From owner-svn-src-head@freebsd.org Tue Jan 10 03:23:23 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E8615CA8DA6; Tue, 10 Jan 2017 03:23:23 +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 B08491A58; Tue, 10 Jan 2017 03:23:23 +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 v0A3NMVE045877; Tue, 10 Jan 2017 03:23:22 GMT (envelope-from sbruno@FreeBSD.org) Received: (from sbruno@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v0A3NMAI045868; Tue, 10 Jan 2017 03:23:22 GMT (envelope-from sbruno@FreeBSD.org) Message-Id: <201701100323.v0A3NMAI045868@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: sbruno set sender to sbruno@FreeBSD.org using -f From: Sean Bruno Date: Tue, 10 Jan 2017 03:23:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r311849 - in head: . sys/amd64/conf sys/arm64/conf sys/conf sys/dev/e1000 sys/i386/conf sys/mips/conf sys/modules sys/modules/em sys/modules/igb sys/powerpc/conf X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 10 Jan 2017 03:23:24 -0000 Author: sbruno Date: Tue Jan 10 03:23:22 2017 New Revision: 311849 URL: https://svnweb.freebsd.org/changeset/base/311849 Log: Migrate e1000 to the IFLIB framework: - em(4) igb(4) and lem(4) - deprecate the igb device from kernel configurations - create a symbolic link in /boot/kernel from if_em.ko to if_igb.ko Devices tested: - 82574L - I218-LM - 82546GB - 82579LM - I350 - I217 Please report problems to freebsd-net@freebsd.org Partial review from jhb and suggestions on how to *not* brick folks who originally would have lost their igbX device. Submitted by: mmacy@nextbsd.org MFC after: 2 weeks Relnotes: yes Sponsored by: Limelight Networks and Dell EMC Isilon Differential Revision: https://reviews.freebsd.org/D8299 Added: head/sys/dev/e1000/em_txrx.c (contents, props changed) head/sys/dev/e1000/igb_txrx.c (contents, props changed) Deleted: head/sys/dev/e1000/if_igb.c head/sys/dev/e1000/if_igb.h head/sys/dev/e1000/if_lem.c head/sys/dev/e1000/if_lem.h head/sys/modules/igb/ Modified: head/UPDATING head/sys/amd64/conf/GENERIC head/sys/arm64/conf/GENERIC head/sys/conf/NOTES head/sys/conf/files head/sys/conf/makeLINT.mk head/sys/dev/e1000/if_em.c head/sys/dev/e1000/if_em.h head/sys/i386/conf/GENERIC head/sys/mips/conf/OCTEON1 head/sys/modules/Makefile head/sys/modules/em/Makefile head/sys/powerpc/conf/GENERIC64 Modified: head/UPDATING ============================================================================== --- head/UPDATING Tue Jan 10 01:36:50 2017 (r311848) +++ head/UPDATING Tue Jan 10 03:23:22 2017 (r311849) @@ -51,6 +51,11 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 12 ****************************** SPECIAL WARNING: ****************************** +20170109: + The igb(4), em(4) and lem(4) ethernet drivers are now implemented via + IFLIB. If you have a custom kernel configuration that excludes em(4) + but you use igb(4), you need to re-add em(4) to your custom configuration. + 20161217: Clang, llvm, lldb, compiler-rt and libc++ have been upgraded to 3.9.1. Please see the 20141231 entry below for information about prerequisites Modified: head/sys/amd64/conf/GENERIC ============================================================================== --- head/sys/amd64/conf/GENERIC Tue Jan 10 01:36:50 2017 (r311848) +++ head/sys/amd64/conf/GENERIC Tue Jan 10 03:23:22 2017 (r311849) @@ -230,7 +230,6 @@ device puc # Multi I/O cards and mult device bxe # Broadcom NetXtreme II BCM5771X/BCM578XX 10GbE device de # DEC/Intel DC21x4x (``Tulip'') device em # Intel PRO/1000 Gigabit Ethernet Family -device igb # Intel PRO/1000 PCIE Server Gigabit Family device ix # Intel PRO/10GbE PCIE PF Ethernet device ixv # Intel PRO/10GbE PCIE VF Ethernet device ixl # Intel XL710 40Gbe PCIE Ethernet Modified: head/sys/arm64/conf/GENERIC ============================================================================== --- head/sys/arm64/conf/GENERIC Tue Jan 10 01:36:50 2017 (r311848) +++ head/sys/arm64/conf/GENERIC Tue Jan 10 03:23:22 2017 (r311849) @@ -120,7 +120,6 @@ device mii device miibus # MII bus support device awg # Allwinner EMAC Gigabit Ethernet device em # Intel PRO/1000 Gigabit Ethernet Family -device igb # Intel PRO/1000 PCIE Server Gigabit Family device ix # Intel 10Gb Ethernet Family device msk # Marvell/SysKonnect Yukon II Gigabit Ethernet device smc # SMSC LAN91C111 Modified: head/sys/conf/NOTES ============================================================================== --- head/sys/conf/NOTES Tue Jan 10 01:36:50 2017 (r311848) +++ head/sys/conf/NOTES Tue Jan 10 03:23:22 2017 (r311849) @@ -1972,7 +1972,6 @@ device xmphy # XaQti XMAC II # KNE110TX. # de: Digital Equipment DC21040 # em: Intel Pro/1000 Gigabit Ethernet 82542, 82543, 82544 based adapters. -# igb: Intel Pro/1000 PCI Express Gigabit Ethernet: 82575 and later adapters. # ep: 3Com 3C509, 3C529, 3C556, 3C562D, 3C563D, 3C572, 3C574X, 3C579, 3C589 # and PC Card devices using these chipsets. # ex: Intel EtherExpress Pro/10 and other i82595-based adapters, @@ -2145,7 +2144,6 @@ device cxgbe # Chelsio T4-T6 1/10/25/4 device cxgbev # Chelsio T4-T6 Virtual Functions device de # DEC/Intel DC21x4x (``Tulip'') device em # Intel Pro/1000 Gigabit Ethernet -device igb # Intel Pro/1000 PCIE Gigabit Ethernet device ixgb # Intel Pro/10Gbe PCI-X Ethernet device ix # Intel Pro/10Gbe PCIE Ethernet device ixv # Intel Pro/10Gbe PCIE Ethernet VF Modified: head/sys/conf/files ============================================================================== --- head/sys/conf/files Tue Jan 10 01:36:50 2017 (r311848) +++ head/sys/conf/files Tue Jan 10 03:23:22 2017 (r311849) @@ -1572,43 +1572,43 @@ dev/eisa/eisa_if.m standard dev/eisa/eisaconf.c optional eisa dev/e1000/if_em.c optional em \ compile-with "${NORMAL_C} -I$S/dev/e1000" -dev/e1000/if_lem.c optional em \ +dev/e1000/em_txrx.c optional em \ compile-with "${NORMAL_C} -I$S/dev/e1000" -dev/e1000/if_igb.c optional igb \ +dev/e1000/igb_txrx.c optional em \ compile-with "${NORMAL_C} -I$S/dev/e1000" -dev/e1000/e1000_80003es2lan.c optional em | igb \ +dev/e1000/e1000_80003es2lan.c optional em \ compile-with "${NORMAL_C} -I$S/dev/e1000" -dev/e1000/e1000_82540.c optional em | igb \ +dev/e1000/e1000_82540.c optional em \ compile-with "${NORMAL_C} -I$S/dev/e1000" -dev/e1000/e1000_82541.c optional em | igb \ +dev/e1000/e1000_82541.c optional em \ compile-with "${NORMAL_C} -I$S/dev/e1000" -dev/e1000/e1000_82542.c optional em | igb \ +dev/e1000/e1000_82542.c optional em \ compile-with "${NORMAL_C} -I$S/dev/e1000" -dev/e1000/e1000_82543.c optional em | igb \ +dev/e1000/e1000_82543.c optional em \ compile-with "${NORMAL_C} -I$S/dev/e1000" -dev/e1000/e1000_82571.c optional em | igb \ +dev/e1000/e1000_82571.c optional em \ compile-with "${NORMAL_C} -I$S/dev/e1000" -dev/e1000/e1000_82575.c optional em | igb \ +dev/e1000/e1000_82575.c optional em \ compile-with "${NORMAL_C} -I$S/dev/e1000" -dev/e1000/e1000_ich8lan.c optional em | igb \ +dev/e1000/e1000_ich8lan.c optional em \ compile-with "${NORMAL_C} -I$S/dev/e1000" -dev/e1000/e1000_i210.c optional em | igb \ +dev/e1000/e1000_i210.c optional em \ compile-with "${NORMAL_C} -I$S/dev/e1000" -dev/e1000/e1000_api.c optional em | igb \ +dev/e1000/e1000_api.c optional em \ compile-with "${NORMAL_C} -I$S/dev/e1000" -dev/e1000/e1000_mac.c optional em | igb \ +dev/e1000/e1000_mac.c optional em \ compile-with "${NORMAL_C} -I$S/dev/e1000" -dev/e1000/e1000_manage.c optional em | igb \ +dev/e1000/e1000_manage.c optional em \ compile-with "${NORMAL_C} -I$S/dev/e1000" -dev/e1000/e1000_nvm.c optional em | igb \ +dev/e1000/e1000_nvm.c optional em \ compile-with "${NORMAL_C} -I$S/dev/e1000" -dev/e1000/e1000_phy.c optional em | igb \ +dev/e1000/e1000_phy.c optional em \ compile-with "${NORMAL_C} -I$S/dev/e1000" -dev/e1000/e1000_vf.c optional em | igb \ +dev/e1000/e1000_vf.c optional em \ compile-with "${NORMAL_C} -I$S/dev/e1000" -dev/e1000/e1000_mbx.c optional em | igb \ +dev/e1000/e1000_mbx.c optional em \ compile-with "${NORMAL_C} -I$S/dev/e1000" -dev/e1000/e1000_osdep.c optional em | igb \ +dev/e1000/e1000_osdep.c optional em \ compile-with "${NORMAL_C} -I$S/dev/e1000" dev/et/if_et.c optional et dev/en/if_en_pci.c optional en pci Modified: head/sys/conf/makeLINT.mk ============================================================================== --- head/sys/conf/makeLINT.mk Tue Jan 10 01:36:50 2017 (r311848) +++ head/sys/conf/makeLINT.mk Tue Jan 10 03:23:22 2017 (r311849) @@ -38,7 +38,6 @@ LINT: ${NOTES} ../../conf/makeLINT.sed echo "nodevice bxe" >> ${.TARGET}-NOIP echo "nodevice em" >> ${.TARGET}-NOIP echo "nodevice fxp" >> ${.TARGET}-NOIP - echo "nodevice igb" >> ${.TARGET}-NOIP echo "nodevice jme" >> ${.TARGET}-NOIP echo "nodevice msk" >> ${.TARGET}-NOIP echo "nodevice mxge" >> ${.TARGET}-NOIP Added: head/sys/dev/e1000/em_txrx.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/dev/e1000/em_txrx.c Tue Jan 10 03:23:22 2017 (r311849) @@ -0,0 +1,720 @@ +/* $FreeBSD$ */ +#include "if_em.h" + +#ifdef RSS +#include +#include +#endif + +#ifdef VERBOSE_DEBUG +#define DPRINTF device_printf +#else +#define DPRINTF(...) +#endif + +/********************************************************************* + * Local Function prototypes + *********************************************************************/ +static int em_tso_setup(struct adapter *adapter, if_pkt_info_t pi, u32 *txd_upper, u32 *txd_lower); +static int em_transmit_checksum_setup(struct adapter *adapter, if_pkt_info_t pi, u32 *txd_upper, u32 *txd_lower); +static int em_isc_txd_encap(void *arg, if_pkt_info_t pi); +static void em_isc_txd_flush(void *arg, uint16_t txqid, uint32_t pidx); +static int em_isc_txd_credits_update(void *arg, uint16_t txqid, uint32_t cidx_init, bool clear); +static void em_isc_rxd_refill(void *arg, uint16_t rxqid, uint8_t flid __unused, + uint32_t pidx, uint64_t *paddrs, caddr_t *vaddrs __unused, uint16_t count, uint16_t buflen __unused); +static void em_isc_rxd_flush(void *arg, uint16_t rxqid, uint8_t flid __unused, uint32_t pidx); +static int em_isc_rxd_available(void *arg, uint16_t rxqid, uint32_t idx, + int budget); +static int em_isc_rxd_pkt_get(void *arg, if_rxd_info_t ri); + +static void lem_isc_rxd_refill(void *arg, uint16_t rxqid, uint8_t flid __unused, + uint32_t pidx, uint64_t *paddrs, caddr_t *vaddrs __unused, uint16_t count, uint16_t buflen __unused); + +static int lem_isc_rxd_available(void *arg, uint16_t rxqid, uint32_t idx, + int budget); +static int lem_isc_rxd_pkt_get(void *arg, if_rxd_info_t ri); + +static void lem_receive_checksum(int status, int errors, if_rxd_info_t ri); +static void em_receive_checksum(uint32_t status, if_rxd_info_t ri); +extern int em_intr(void *arg); + +struct if_txrx em_txrx = { + em_isc_txd_encap, + em_isc_txd_flush, + em_isc_txd_credits_update, + em_isc_rxd_available, + em_isc_rxd_pkt_get, + em_isc_rxd_refill, + em_isc_rxd_flush, + em_intr +}; + +struct if_txrx lem_txrx = { + em_isc_txd_encap, + em_isc_txd_flush, + em_isc_txd_credits_update, + lem_isc_rxd_available, + lem_isc_rxd_pkt_get, + lem_isc_rxd_refill, + em_isc_rxd_flush, + em_intr +}; + +extern if_shared_ctx_t em_sctx; + +/********************************************************************** + * + * Setup work for hardware segmentation offload (TSO) on + * adapters using advanced tx descriptors + * + **********************************************************************/ +static int +em_tso_setup(struct adapter *adapter, if_pkt_info_t pi, u32 *txd_upper, u32 *txd_lower) +{ + if_softc_ctx_t scctx = adapter->shared; + struct em_tx_queue *que = &adapter->tx_queues[pi->ipi_qsidx]; + struct tx_ring *txr = &que->txr; + struct e1000_context_desc *TXD; + struct em_txbuffer *tx_buffer; + int cur, hdr_len; + + hdr_len = pi->ipi_ehdrlen + pi->ipi_ip_hlen + pi->ipi_tcp_hlen; + *txd_lower = (E1000_TXD_CMD_DEXT | /* Extended descr type */ + E1000_TXD_DTYP_D | /* Data descr type */ + E1000_TXD_CMD_TSE); /* Do TSE on this packet */ + + /* IP and/or TCP header checksum calculation and insertion. */ + *txd_upper = (E1000_TXD_POPTS_IXSM | E1000_TXD_POPTS_TXSM) << 8; + + cur = pi->ipi_pidx; + TXD = (struct e1000_context_desc *)&txr->tx_base[cur]; + tx_buffer = &txr->tx_buffers[cur]; + + /* + * Start offset for header checksum calculation. + * End offset for header checksum calculation. + * Offset of place put the checksum. + */ + TXD->lower_setup.ip_fields.ipcss = pi->ipi_ehdrlen; + TXD->lower_setup.ip_fields.ipcse = + htole16(pi->ipi_ehdrlen + pi->ipi_ip_hlen - 1); + TXD->lower_setup.ip_fields.ipcso = pi->ipi_ehdrlen + offsetof(struct ip, ip_sum); + + /* + * Start offset for payload checksum calculation. + * End offset for payload checksum calculation. + * Offset of place to put the checksum. + */ + TXD->upper_setup.tcp_fields.tucss = pi->ipi_ehdrlen + pi->ipi_ip_hlen; + TXD->upper_setup.tcp_fields.tucse = 0; + TXD->upper_setup.tcp_fields.tucso = + pi->ipi_ehdrlen + pi->ipi_ip_hlen + offsetof(struct tcphdr, th_sum); + + /* + * Payload size per packet w/o any headers. + * Length of all headers up to payload. + */ + TXD->tcp_seg_setup.fields.mss = htole16(pi->ipi_tso_segsz); + TXD->tcp_seg_setup.fields.hdr_len = hdr_len; + + TXD->cmd_and_length = htole32(adapter->txd_cmd | + E1000_TXD_CMD_DEXT | /* Extended descr */ + E1000_TXD_CMD_TSE | /* TSE context */ + E1000_TXD_CMD_IP | /* Do IP csum */ + E1000_TXD_CMD_TCP | /* Do TCP checksum */ + (pi->ipi_len - hdr_len)); /* Total len */ + tx_buffer->eop = -1; + txr->tx_tso = TRUE; + + if (++cur == scctx->isc_ntxd[0]) { + cur = 0; + } + DPRINTF(iflib_get_dev(adapter->ctx), "%s: pidx: %d cur: %d\n", __FUNCTION__, pi->ipi_pidx, cur); + return (cur); +} + +#define TSO_WORKAROUND 4 +#define DONT_FORCE_CTX 1 + + +/********************************************************************* + * The offload context is protocol specific (TCP/UDP) and thus + * only needs to be set when the protocol changes. The occasion + * of a context change can be a performance detriment, and + * might be better just disabled. The reason arises in the way + * in which the controller supports pipelined requests from the + * Tx data DMA. Up to four requests can be pipelined, and they may + * belong to the same packet or to multiple packets. However all + * requests for one packet are issued before a request is issued + * for a subsequent packet and if a request for the next packet + * requires a context change, that request will be stalled + * until the previous request completes. This means setting up + * a new context effectively disables pipelined Tx data DMA which + * in turn greatly slow down performance to send small sized + * frames. + **********************************************************************/ + +static int +em_transmit_checksum_setup(struct adapter *adapter, if_pkt_info_t pi, u32 *txd_upper, u32 *txd_lower) +{ + struct e1000_context_desc *TXD = NULL; + if_softc_ctx_t scctx = adapter->shared; + struct em_tx_queue *que = &adapter->tx_queues[pi->ipi_qsidx]; + struct tx_ring *txr = &que->txr; + struct em_txbuffer *tx_buffer; + int csum_flags = pi->ipi_csum_flags; + int cur, hdr_len; + u32 cmd; + + cur = pi->ipi_pidx; + hdr_len = pi->ipi_ehdrlen + pi->ipi_ip_hlen; + cmd = adapter->txd_cmd; + + /* + * The 82574L can only remember the *last* context used + * regardless of queue that it was use for. We cannot reuse + * contexts on this hardware platform and must generate a new + * context every time. 82574L hardware spec, section 7.2.6, + * second note. + */ + if (DONT_FORCE_CTX && + adapter->tx_num_queues == 1 && + txr->csum_lhlen == pi->ipi_ehdrlen && + txr->csum_iphlen == pi->ipi_ip_hlen && + txr->csum_flags == csum_flags) { + /* + * Same csum offload context as the previous packets; + * just return. + */ + *txd_upper = txr->csum_txd_upper; + *txd_lower = txr->csum_txd_lower; + return (cur); + } + + TXD = (struct e1000_context_desc *)&txr->tx_base[cur]; + if (csum_flags & CSUM_IP) { + *txd_upper |= E1000_TXD_POPTS_IXSM << 8; + /* + * Start offset for header checksum calculation. + * End offset for header checksum calculation. + * Offset of place to put the checksum. + */ + TXD->lower_setup.ip_fields.ipcss = pi->ipi_ehdrlen; + TXD->lower_setup.ip_fields.ipcse = htole16(hdr_len); + TXD->lower_setup.ip_fields.ipcso = pi->ipi_ehdrlen + offsetof(struct ip, ip_sum); + cmd |= E1000_TXD_CMD_IP; + } + + if (csum_flags & (CSUM_TCP|CSUM_UDP)) { + uint8_t tucso; + + *txd_upper |= E1000_TXD_POPTS_TXSM << 8; + *txd_lower = E1000_TXD_CMD_DEXT | E1000_TXD_DTYP_D; + + if (csum_flags & CSUM_TCP) { + tucso = hdr_len + offsetof(struct tcphdr, th_sum); + cmd |= E1000_TXD_CMD_TCP; + } else + tucso = hdr_len + offsetof(struct udphdr, uh_sum); + TXD->upper_setup.tcp_fields.tucss = hdr_len; + TXD->upper_setup.tcp_fields.tucse = htole16(0); + TXD->upper_setup.tcp_fields.tucso = tucso; + } + + txr->csum_lhlen = pi->ipi_ehdrlen; + txr->csum_iphlen = pi->ipi_ip_hlen; + txr->csum_flags = csum_flags; + txr->csum_txd_upper = *txd_upper; + txr->csum_txd_lower = *txd_lower; + + TXD->tcp_seg_setup.data = htole32(0); + TXD->cmd_and_length = + htole32(E1000_TXD_CMD_IFCS | E1000_TXD_CMD_DEXT | cmd); + + tx_buffer = &txr->tx_buffers[cur]; + tx_buffer->eop = -1; + + if (++cur == scctx->isc_ntxd[0]) { + cur = 0; + } + DPRINTF(iflib_get_dev(adapter->ctx), "checksum_setup csum_flags=%x txd_upper=%x txd_lower=%x hdr_len=%d cmd=%x\n", + csum_flags, *txd_upper, *txd_lower, hdr_len, cmd); + return (cur); +} + +static int +em_isc_txd_encap(void *arg, if_pkt_info_t pi) +{ + struct adapter *sc = arg; + if_softc_ctx_t scctx = sc->shared; + struct em_tx_queue *que = &sc->tx_queues[pi->ipi_qsidx]; + struct tx_ring *txr = &que->txr; + bus_dma_segment_t *segs = pi->ipi_segs; + int nsegs = pi->ipi_nsegs; + int csum_flags = pi->ipi_csum_flags; + int i, j, first, pidx_last; + u32 txd_upper = 0, txd_lower = 0; + + struct em_txbuffer *tx_buffer; + struct e1000_tx_desc *ctxd = NULL; + bool do_tso, tso_desc; + + i = first = pi->ipi_pidx; + do_tso = (csum_flags & CSUM_TSO); + tso_desc = FALSE; + /* + * TSO Hardware workaround, if this packet is not + * TSO, and is only a single descriptor long, and + * it follows a TSO burst, then we need to add a + * sentinel descriptor to prevent premature writeback. + */ + if ((!do_tso) && (txr->tx_tso == TRUE)) { + if (nsegs == 1) + tso_desc = TRUE; + txr->tx_tso = FALSE; + } + + /* Do hardware assists */ + if (do_tso) { + i = em_tso_setup(sc, pi, &txd_upper, &txd_lower); + tso_desc = TRUE; + } else if (csum_flags & CSUM_OFFLOAD) { + i = em_transmit_checksum_setup(sc, pi, &txd_upper, &txd_lower); + } + + if (pi->ipi_mflags & M_VLANTAG) { + /* Set the vlan id. */ + txd_upper |= htole16(pi->ipi_vtag) << 16; + /* Tell hardware to add tag */ + txd_lower |= htole32(E1000_TXD_CMD_VLE); + } + + DPRINTF(iflib_get_dev(sc->ctx), "encap: set up tx: nsegs=%d first=%d i=%d\n", nsegs, first, i); + /* XXX adapter->pcix_82544 -- lem_fill_descriptors */ + + /* Set up our transmit descriptors */ + for (j = 0; j < nsegs; j++) { + bus_size_t seg_len; + bus_addr_t seg_addr; + uint32_t cmd; + + ctxd = &txr->tx_base[i]; + tx_buffer = &txr->tx_buffers[i]; + seg_addr = segs[j].ds_addr; + seg_len = segs[j].ds_len; + cmd = E1000_TXD_CMD_IFCS | sc->txd_cmd; + + /* + ** TSO Workaround: + ** If this is the last descriptor, we want to + ** split it so we have a small final sentinel + */ + if (tso_desc && (j == (nsegs - 1)) && (seg_len > 8)) { + seg_len -= TSO_WORKAROUND; + ctxd->buffer_addr = htole64(seg_addr); + ctxd->lower.data = htole32(cmd | txd_lower | seg_len); + ctxd->upper.data = htole32(txd_upper); + + if (++i == scctx->isc_ntxd[0]) + i = 0; + + /* Now make the sentinel */ + ctxd = &txr->tx_base[i]; + tx_buffer = &txr->tx_buffers[i]; + ctxd->buffer_addr = htole64(seg_addr + seg_len); + ctxd->lower.data = htole32(cmd | txd_lower | TSO_WORKAROUND); + ctxd->upper.data = htole32(txd_upper); + pidx_last = i; + if (++i == scctx->isc_ntxd[0]) + i = 0; + DPRINTF(iflib_get_dev(sc->ctx), "TSO path pidx_last=%d i=%d ntxd[0]=%d\n", pidx_last, i, scctx->isc_ntxd[0]); + } else { + ctxd->buffer_addr = htole64(seg_addr); + ctxd->lower.data = htole32(cmd | txd_lower | seg_len); + ctxd->upper.data = htole32(txd_upper); + pidx_last = i; + if (++i == scctx->isc_ntxd[0]) + i = 0; + DPRINTF(iflib_get_dev(sc->ctx), "pidx_last=%d i=%d ntxd[0]=%d\n", pidx_last, i, scctx->isc_ntxd[0]); + } + tx_buffer->eop = -1; + } + + /* + * Last Descriptor of Packet + * needs End Of Packet (EOP) + * and Report Status (RS) + */ + ctxd->lower.data |= + htole32(E1000_TXD_CMD_EOP | E1000_TXD_CMD_RS); + + tx_buffer = &txr->tx_buffers[first]; + tx_buffer->eop = pidx_last; + DPRINTF(iflib_get_dev(sc->ctx), "tx_buffers[%d]->eop = %d ipi_new_pidx=%d\n", first, pidx_last, i); + pi->ipi_new_pidx = i; + + return (0); +} + +static void +em_isc_txd_flush(void *arg, uint16_t txqid, uint32_t pidx) +{ + struct adapter *adapter = arg; + struct em_tx_queue *que = &adapter->tx_queues[txqid]; + struct tx_ring *txr = &que->txr; + + E1000_WRITE_REG(&adapter->hw, E1000_TDT(txr->me), pidx); +} + +static int +em_isc_txd_credits_update(void *arg, uint16_t txqid, uint32_t cidx_init, bool clear) +{ + struct adapter *adapter = arg; + if_softc_ctx_t scctx = adapter->shared; + struct em_tx_queue *que = &adapter->tx_queues[txqid]; + struct tx_ring *txr = &que->txr; + + u32 cidx, processed = 0; + int last, done; + struct em_txbuffer *buf; + struct e1000_tx_desc *tx_desc, *eop_desc; + + cidx = cidx_init; + buf = &txr->tx_buffers[cidx]; + tx_desc = &txr->tx_base[cidx]; + last = buf->eop; + eop_desc = &txr->tx_base[last]; + + DPRINTF(iflib_get_dev(adapter->ctx), "credits_update: cidx_init=%d clear=%d last=%d\n", + cidx_init, clear, last); + /* + * What this does is get the index of the + * first descriptor AFTER the EOP of the + * first packet, that way we can do the + * simple comparison on the inner while loop. + */ + if (++last == scctx->isc_ntxd[0]) + last = 0; + done = last; + + + while (eop_desc->upper.fields.status & E1000_TXD_STAT_DD) { + /* We clean the range of the packet */ + while (cidx != done) { + if (clear) { + tx_desc->upper.data = 0; + tx_desc->lower.data = 0; + tx_desc->buffer_addr = 0; + buf->eop = -1; + } + tx_desc++; + buf++; + processed++; + + /* wrap the ring ? */ + if (++cidx == scctx->isc_ntxd[0]) { + cidx = 0; + } + buf = &txr->tx_buffers[cidx]; + tx_desc = &txr->tx_base[cidx]; + } + /* See if we can continue to the next packet */ + last = buf->eop; + if (last == -1) + break; + eop_desc = &txr->tx_base[last]; + /* Get new done point */ + if (++last == scctx->isc_ntxd[0]) + last = 0; + done = last; + } + + DPRINTF(iflib_get_dev(adapter->ctx), "Processed %d credits update\n", processed); + return(processed); +} + +static void +lem_isc_rxd_refill(void *arg, uint16_t rxqid, uint8_t flid __unused, + uint32_t pidx, uint64_t *paddrs, caddr_t *vaddrs __unused, uint16_t count, uint16_t buflen __unused) +{ + struct adapter *sc = arg; + if_softc_ctx_t scctx = sc->shared; + struct em_rx_queue *que = &sc->rx_queues[rxqid]; + struct rx_ring *rxr = &que->rxr; + struct e1000_rx_desc *rxd; + int i; + uint32_t next_pidx; + + for (i = 0, next_pidx = pidx; i < count; i++) { + rxd = (struct e1000_rx_desc *)&rxr->rx_base[next_pidx]; + rxd->buffer_addr = htole64(paddrs[i]); + /* status bits must be cleared */ + rxd->status = 0; + + if (++next_pidx == scctx->isc_nrxd[0]) + next_pidx = 0; + } +} + +static void +em_isc_rxd_refill(void *arg, uint16_t rxqid, uint8_t flid __unused, + uint32_t pidx, uint64_t *paddrs, caddr_t *vaddrs __unused, uint16_t count, uint16_t buflen __unused) +{ + struct adapter *sc = arg; + if_softc_ctx_t scctx = sc->shared; + struct em_rx_queue *que = &sc->rx_queues[rxqid]; + struct rx_ring *rxr = &que->rxr; + union e1000_rx_desc_extended *rxd; + int i; + uint32_t next_pidx; + + for (i = 0, next_pidx = pidx; i < count; i++) { + rxd = &rxr->rx_base[next_pidx]; + rxd->read.buffer_addr = htole64(paddrs[i]); + /* DD bits must be cleared */ + rxd->wb.upper.status_error = 0; + + if (++next_pidx == scctx->isc_nrxd[0]) + next_pidx = 0; + } +} + +static void +em_isc_rxd_flush(void *arg, uint16_t rxqid, uint8_t flid __unused, uint32_t pidx) +{ + struct adapter *sc = arg; + struct em_rx_queue *que = &sc->rx_queues[rxqid]; + struct rx_ring *rxr = &que->rxr; + + E1000_WRITE_REG(&sc->hw, E1000_RDT(rxr->me), pidx); +} + +static int +lem_isc_rxd_available(void *arg, uint16_t rxqid, uint32_t idx, int budget) +{ + struct adapter *sc = arg; + if_softc_ctx_t scctx = sc->shared; + struct em_rx_queue *que = &sc->rx_queues[rxqid]; + struct rx_ring *rxr = &que->rxr; + struct e1000_rx_desc *rxd; + u32 staterr = 0; + int cnt, i; + + for (cnt = 0, i = idx; cnt < scctx->isc_nrxd[0] && cnt <= budget;) { + rxd = (struct e1000_rx_desc *)&rxr->rx_base[i]; + staterr = rxd->status; + + if ((staterr & E1000_RXD_STAT_DD) == 0) + break; + + if (++i == scctx->isc_nrxd[0]) + i = 0; + + if (staterr & E1000_RXD_STAT_EOP) + cnt++; + } + return (cnt); +} + +static int +em_isc_rxd_available(void *arg, uint16_t rxqid, uint32_t idx, int budget) +{ + struct adapter *sc = arg; + if_softc_ctx_t scctx = sc->shared; + struct em_rx_queue *que = &sc->rx_queues[rxqid]; + struct rx_ring *rxr = &que->rxr; + union e1000_rx_desc_extended *rxd; + u32 staterr = 0; + int cnt, i; + + for (cnt = 0, i = idx; cnt < scctx->isc_nrxd[0] && cnt <= budget;) { + rxd = &rxr->rx_base[i]; + staterr = le32toh(rxd->wb.upper.status_error); + + if ((staterr & E1000_RXD_STAT_DD) == 0) + break; + + if (++i == scctx->isc_nrxd[0]) { + i = 0; + } + + if (staterr & E1000_RXD_STAT_EOP) + cnt++; + + } + return (cnt); +} + +static int +lem_isc_rxd_pkt_get(void *arg, if_rxd_info_t ri) +{ + struct adapter *adapter = arg; + if_softc_ctx_t scctx = adapter->shared; + struct em_rx_queue *que = &adapter->rx_queues[ri->iri_qsidx]; + struct rx_ring *rxr = &que->rxr; + struct e1000_rx_desc *rxd; + u16 len; + u32 status, errors; + bool eop; + int i, cidx; + + status = errors = i = 0; + cidx = ri->iri_cidx; + + do { + rxd = (struct e1000_rx_desc *)&rxr->rx_base[cidx]; + status = rxd->status; + errors = rxd->errors; + + /* Error Checking then decrement count */ + MPASS ((status & E1000_RXD_STAT_DD) != 0); + + len = le16toh(rxd->length); + ri->iri_len += len; + + eop = (status & E1000_RXD_STAT_EOP) != 0; + + /* Make sure bad packets are discarded */ + if (errors & E1000_RXD_ERR_FRAME_ERR_MASK) { + adapter->dropped_pkts++; + /* XXX fixup if common */ + return (EBADMSG); + } + + ri->iri_frags[i].irf_flid = 0; + ri->iri_frags[i].irf_idx = cidx; + ri->iri_frags[i].irf_len = len; + /* Zero out the receive descriptors status. */ + rxd->status = 0; + + if (++cidx == scctx->isc_nrxd[0]) + cidx = 0; + i++; + } while (!eop); + + /* XXX add a faster way to look this up */ + if (adapter->hw.mac.type >= e1000_82543 && !(status & E1000_RXD_STAT_IXSM)) + lem_receive_checksum(status, errors, ri); + + if (status & E1000_RXD_STAT_VP) { + ri->iri_vtag = le16toh(rxd->special); + ri->iri_flags |= M_VLANTAG; + } + + ri->iri_nfrags = i; + + return (0); +} + +static int +em_isc_rxd_pkt_get(void *arg, if_rxd_info_t ri) +{ + struct adapter *adapter = arg; + if_softc_ctx_t scctx = adapter->shared; + struct em_rx_queue *que = &adapter->rx_queues[ri->iri_qsidx]; + struct rx_ring *rxr = &que->rxr; + union e1000_rx_desc_extended *rxd; + + u16 len; + u32 staterr = 0; + bool eop; + int i, cidx, vtag; + + i = vtag = 0; + cidx = ri->iri_cidx; + + do { + rxd = &rxr->rx_base[cidx]; + staterr = le32toh(rxd->wb.upper.status_error); + + /* Error Checking then decrement count */ + MPASS ((staterr & E1000_RXD_STAT_DD) != 0); + + len = le16toh(rxd->wb.upper.length); + ri->iri_len += len; + + eop = (staterr & E1000_RXD_STAT_EOP) != 0; + + /* Make sure bad packets are discarded */ + if (staterr & E1000_RXDEXT_ERR_FRAME_ERR_MASK) { + adapter->dropped_pkts++; + return EBADMSG; + } + + ri->iri_frags[i].irf_flid = 0; + ri->iri_frags[i].irf_idx = cidx; + ri->iri_frags[i].irf_len = len; + /* Zero out the receive descriptors status. */ + rxd->wb.upper.status_error &= htole32(~0xFF); + + if (++cidx == scctx->isc_nrxd[0]) + cidx = 0; + i++; + } while (!eop); + + /* XXX add a faster way to look this up */ + if (adapter->hw.mac.type >= e1000_82543) + em_receive_checksum(staterr, ri); + + if (staterr & E1000_RXD_STAT_VP) { + vtag = le16toh(rxd->wb.upper.vlan); + } + + ri->iri_vtag = vtag; + ri->iri_nfrags = i; + if (vtag) + ri->iri_flags |= M_VLANTAG; + + return (0); +} + +/********************************************************************* + * + * Verify that the hardware indicated that the checksum is valid. + * Inform the stack about the status of checksum so that stack + * doesn't spend time verifying the checksum. + * + *********************************************************************/ +static void +lem_receive_checksum(int status, int errors, if_rxd_info_t ri) +{ + /* Did it pass? */ + if (status & E1000_RXD_STAT_IPCS && !(errors & E1000_RXD_ERR_IPE)) + ri->iri_csum_flags = (CSUM_IP_CHECKED|CSUM_IP_VALID); + + if (status & E1000_RXD_STAT_TCPCS) { + /* Did it pass? */ + if (!(errors & E1000_RXD_ERR_TCPE)) { + ri->iri_csum_flags |= + (CSUM_DATA_VALID | CSUM_PSEUDO_HDR); + ri->iri_csum_data = htons(0xffff); + } + } +} + +static void +em_receive_checksum(uint32_t status, if_rxd_info_t ri) +{ + ri->iri_csum_flags = 0; + + /* Ignore Checksum bit is set */ + if (status & E1000_RXD_STAT_IXSM) + return; + + /* If the IP checksum exists and there is no IP Checksum error */ + if ((status & (E1000_RXD_STAT_IPCS | E1000_RXDEXT_STATERR_IPE)) == + E1000_RXD_STAT_IPCS) { + ri->iri_csum_flags = (CSUM_IP_CHECKED | CSUM_IP_VALID); + } + + /* TCP or UDP checksum */ + if ((status & (E1000_RXD_STAT_TCPCS | E1000_RXDEXT_STATERR_TCPE)) == + E1000_RXD_STAT_TCPCS) { + ri->iri_csum_flags |= (CSUM_DATA_VALID | CSUM_PSEUDO_HDR); + ri->iri_csum_data = htons(0xffff); + } + if (status & E1000_RXD_STAT_UDPCS) { + ri->iri_csum_flags |= (CSUM_DATA_VALID | CSUM_PSEUDO_HDR); + ri->iri_csum_data = htons(0xffff); + } +} Modified: head/sys/dev/e1000/if_em.c ============================================================================== --- head/sys/dev/e1000/if_em.c Tue Jan 10 01:36:50 2017 (r311848) +++ head/sys/dev/e1000/if_em.c Tue Jan 10 03:23:22 2017 (r311849) @@ -1,99 +1,10 @@ -/****************************************************************************** - - Copyright (c) 2001-2015, Intel Corporation - All rights reserved. - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - - 3. Neither the name of the Intel Corporation nor the names of its - contributors may be used to endorse or promote products derived from - this software without specific prior written permission. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE - LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - POSSIBILITY OF SUCH DAMAGE. - -******************************************************************************/ -/*$FreeBSD$*/ - -#include "opt_em.h" -#include "opt_ddb.h" -#include "opt_inet.h" -#include "opt_inet6.h" - -#ifdef HAVE_KERNEL_OPTION_HEADERS -#include "opt_device_polling.h" -#endif - -#include -#include -#ifdef DDB -#include -#include -#endif -#if __FreeBSD_version >= 800000 -#include -#endif -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include - -#include -#include - -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include -#include - -#include "e1000_api.h" -#include "e1000_82571.h" +/* $FreeBSD$ */ #include "if_em.h" +#include +#include + +#define em_mac_min e1000_82547 +#define igb_mac_min e1000_82575 /********************************************************************* * Driver version: @@ -110,184 +21,213 @@ char em_driver_version[] = "7.6.1-k"; * { Vendor ID, Device ID, SubVendor ID, SubDevice ID, String Index } *********************************************************************/ -static em_vendor_info_t em_vendor_info_array[] = +static pci_vendor_info_t em_vendor_info_array[] = { - /* Intel(R) PRO/1000 Network Connection */ - { 0x8086, E1000_DEV_ID_82571EB_COPPER, PCI_ANY_ID, PCI_ANY_ID, 0}, - { 0x8086, E1000_DEV_ID_82571EB_FIBER, PCI_ANY_ID, PCI_ANY_ID, 0}, - { 0x8086, E1000_DEV_ID_82571EB_SERDES, PCI_ANY_ID, PCI_ANY_ID, 0}, - { 0x8086, E1000_DEV_ID_82571EB_SERDES_DUAL, - PCI_ANY_ID, PCI_ANY_ID, 0}, - { 0x8086, E1000_DEV_ID_82571EB_SERDES_QUAD, - PCI_ANY_ID, PCI_ANY_ID, 0}, - { 0x8086, E1000_DEV_ID_82571EB_QUAD_COPPER, - PCI_ANY_ID, PCI_ANY_ID, 0}, - { 0x8086, E1000_DEV_ID_82571EB_QUAD_COPPER_LP, - PCI_ANY_ID, PCI_ANY_ID, 0}, - { 0x8086, E1000_DEV_ID_82571EB_QUAD_FIBER, - PCI_ANY_ID, PCI_ANY_ID, 0}, - { 0x8086, E1000_DEV_ID_82571PT_QUAD_COPPER, - PCI_ANY_ID, PCI_ANY_ID, 0}, - { 0x8086, E1000_DEV_ID_82572EI_COPPER, PCI_ANY_ID, PCI_ANY_ID, 0}, - { 0x8086, E1000_DEV_ID_82572EI_FIBER, PCI_ANY_ID, PCI_ANY_ID, 0}, - { 0x8086, E1000_DEV_ID_82572EI_SERDES, PCI_ANY_ID, PCI_ANY_ID, 0}, - { 0x8086, E1000_DEV_ID_82572EI, PCI_ANY_ID, PCI_ANY_ID, 0}, - - { 0x8086, E1000_DEV_ID_82573E, PCI_ANY_ID, PCI_ANY_ID, 0}, - { 0x8086, E1000_DEV_ID_82573E_IAMT, PCI_ANY_ID, PCI_ANY_ID, 0}, - { 0x8086, E1000_DEV_ID_82573L, PCI_ANY_ID, PCI_ANY_ID, 0}, - { 0x8086, E1000_DEV_ID_82583V, PCI_ANY_ID, PCI_ANY_ID, 0}, - { 0x8086, E1000_DEV_ID_80003ES2LAN_COPPER_SPT, - PCI_ANY_ID, PCI_ANY_ID, 0}, - { 0x8086, E1000_DEV_ID_80003ES2LAN_SERDES_SPT, - PCI_ANY_ID, PCI_ANY_ID, 0}, - { 0x8086, E1000_DEV_ID_80003ES2LAN_COPPER_DPT, - PCI_ANY_ID, PCI_ANY_ID, 0}, - { 0x8086, E1000_DEV_ID_80003ES2LAN_SERDES_DPT, - PCI_ANY_ID, PCI_ANY_ID, 0}, - { 0x8086, E1000_DEV_ID_ICH8_IGP_M_AMT, PCI_ANY_ID, PCI_ANY_ID, 0}, - { 0x8086, E1000_DEV_ID_ICH8_IGP_AMT, PCI_ANY_ID, PCI_ANY_ID, 0}, *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-head@freebsd.org Tue Jan 10 03:53:39 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7C4E7CA89EF; Tue, 10 Jan 2017 03:53:39 +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 494ED1DC5; Tue, 10 Jan 2017 03:53:39 +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 v0A3rcr5058378; Tue, 10 Jan 2017 03:53:38 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v0A3rcP3058377; Tue, 10 Jan 2017 03:53:38 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201701100353.v0A3rcP3058377@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Tue, 10 Jan 2017 03:53:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r311850 - head/sys/dev/usb/controller X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 10 Jan 2017 03:53:39 -0000 Author: ian Date: Tue Jan 10 03:53:38 2017 New Revision: 311850 URL: https://svnweb.freebsd.org/changeset/base/311850 Log: Use the post-reset hook to force the controller to host mode. This will make both usb ports work on imx6 systems (the OTG port of course will only work in host mode). Modified: head/sys/dev/usb/controller/ehci_imx.c Modified: head/sys/dev/usb/controller/ehci_imx.c ============================================================================== --- head/sys/dev/usb/controller/ehci_imx.c Tue Jan 10 03:23:22 2017 (r311849) +++ head/sys/dev/usb/controller/ehci_imx.c Tue Jan 10 03:53:38 2017 (r311850) @@ -157,6 +157,18 @@ struct imx_ehci_softc { struct resource *ehci_irq_res; /* EHCI core IRQ. */ }; +static void +imx_ehci_post_reset(struct ehci_softc *ehci_softc) +{ + uint32_t usbmode; + + /* Force HOST mode */ + usbmode = EOREAD4(ehci_softc, EHCI_USBMODE_NOLPM); + usbmode &= ~EHCI_UM_CM; + usbmode |= EHCI_UM_CM_HOST; + EOWRITE4(ehci_softc, EHCI_USBMODE_NOLPM, usbmode); +} + static int imx_ehci_probe(device_t dev) { @@ -282,8 +294,13 @@ imx_ehci_attach(device_t dev) esc->sc_id_vendor = USB_VENDOR_FREESCALE; strlcpy(esc->sc_vendor, "Freescale", sizeof(esc->sc_vendor)); - /* Set flags that affect ehci_init() behavior. */ - esc->sc_flags |= EHCI_SCFLG_DONTRESET | EHCI_SCFLG_NORESTERM; + /* + * Set flags that affect ehci_init() behavior, and hook our post-reset + * code into the standard controller code. + */ + esc->sc_flags |= EHCI_SCFLG_NORESTERM; + esc->sc_vendor_post_reset = imx_ehci_post_reset; + err = ehci_init(esc); if (err != 0) { device_printf(dev, "USB init failed, usb_err_t=%d\n", From owner-svn-src-head@freebsd.org Tue Jan 10 04:17:54 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 537CCCA863D; Tue, 10 Jan 2017 04:17:54 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 20A4B1A9A; Tue, 10 Jan 2017 04:17:54 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v0A4HreZ066682; Tue, 10 Jan 2017 04:17:53 GMT (envelope-from mjg@FreeBSD.org) Received: (from mjg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v0A4Hr7m066681; Tue, 10 Jan 2017 04:17:53 GMT (envelope-from mjg@FreeBSD.org) Message-Id: <201701100417.v0A4Hr7m066681@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mjg set sender to mjg@FreeBSD.org using -f From: Mateusz Guzik Date: Tue, 10 Jan 2017 04:17:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r311851 - head/sys/fs/cd9660 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 10 Jan 2017 04:17:54 -0000 Author: mjg Date: Tue Jan 10 04:17:53 2017 New Revision: 311851 URL: https://svnweb.freebsd.org/changeset/base/311851 Log: cd9660: fix up compilation on sparc after r311665 Reported by: linimon Modified: head/sys/fs/cd9660/cd9660_vfsops.c Modified: head/sys/fs/cd9660/cd9660_vfsops.c ============================================================================== --- head/sys/fs/cd9660/cd9660_vfsops.c Tue Jan 10 03:53:38 2017 (r311850) +++ head/sys/fs/cd9660/cd9660_vfsops.c Tue Jan 10 04:17:53 2017 (r311851) @@ -88,7 +88,7 @@ static struct vfsops cd9660_vfsops = { VFS_SET(cd9660_vfsops, cd9660, VFCF_READONLY); MODULE_VERSION(cd9660, 1); -static int cd9660_vfs_hash_cmp(struct vnode *vp, cd_ino_t *pino); +static int cd9660_vfs_hash_cmp(struct vnode *vp, void *pino); static int iso_mountfs(struct vnode *devvp, struct mount *mp); /* @@ -650,12 +650,14 @@ cd9660_vget(mp, ino, flags, vpp) static int cd9660_vfs_hash_cmp(vp, pino) struct vnode *vp; - cd_ino_t *pino; + void *pino; { struct iso_node *ip; + cd_ino_t ino; ip = VTOI(vp); - return (ip->i_number != *pino); + ino = *(cd_ino_t *)pino; + return (ip->i_number != ino); } int From owner-svn-src-head@freebsd.org Tue Jan 10 04:31:57 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 73697CA8D5E; Tue, 10 Jan 2017 04:31:57 +0000 (UTC) (envelope-from ler@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 43153152E; Tue, 10 Jan 2017 04:31:57 +0000 (UTC) (envelope-from ler@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v0A4VunN074444; Tue, 10 Jan 2017 04:31:56 GMT (envelope-from ler@FreeBSD.org) Received: (from ler@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v0A4Vufl074443; Tue, 10 Jan 2017 04:31:56 GMT (envelope-from ler@FreeBSD.org) Message-Id: <201701100431.v0A4Vufl074443@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ler set sender to ler@FreeBSD.org using -f From: Larry Rosenman Date: Tue, 10 Jan 2017 04:31:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r311852 - head/share/misc X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 10 Jan 2017 04:31:57 -0000 Author: ler (ports committer) Date: Tue Jan 10 04:31:56 2017 New Revision: 311852 URL: https://svnweb.freebsd.org/changeset/base/311852 Log: Add myself to committers-ports.dot Approved by: adamw (mentor) Differential Revision: https://reviews.freebsd.org/D9117 Modified: head/share/misc/committers-ports.dot Modified: head/share/misc/committers-ports.dot ============================================================================== --- head/share/misc/committers-ports.dot Tue Jan 10 04:17:53 2017 (r311851) +++ head/share/misc/committers-ports.dot Tue Jan 10 04:31:56 2017 (r311852) @@ -144,6 +144,7 @@ laszlof [label="Frank Laszlo\nlaszlof@Fr lawrance [label="Sam Lawrance\nlawrance@FreeBSD.org\n2005/04/11\n2007/02/21"] lbr [label="Lars Balker Rasmussen\nlbr@FreeBSD.org\n2006/04/30"] leeym [label="Yen-Ming Lee\nleeym@FreeBSD.org\n2002/08/14"] +ler [label="Larry Rosenman\nler@FreeBSD.org\n2017/01/09"] lev [label="Lev Serebryakov\nlev@FreeBSD.org\n2003/06/17"] lifanov [label="Nikolai Lifanov\nlifanov@FreeBSD.org\n2016/12/11"] linimon [label="Mark Linimon\nlinimon@FreeBSD.org\n2003/10/23"] @@ -252,6 +253,7 @@ znerd [label="Ernst de Haan\nznerd@FreeB adamw -> ahze adamw -> jylefort +adamw -> ler adamw -> mezz adamw -> pav adamw -> woodsb02 @@ -554,6 +556,7 @@ rene -> bar rene -> cmt rene -> crees rene -> jgh +rene -> ler rene -> olivierd rm -> koobs From owner-svn-src-head@freebsd.org Tue Jan 10 04:50:00 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D70E5CA85BA; Tue, 10 Jan 2017 04:50:00 +0000 (UTC) (envelope-from adamw@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A74131D92; Tue, 10 Jan 2017 04:50:00 +0000 (UTC) (envelope-from adamw@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v0A4nxwN078897; Tue, 10 Jan 2017 04:49:59 GMT (envelope-from adamw@FreeBSD.org) Received: (from adamw@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v0A4nxVO078896; Tue, 10 Jan 2017 04:49:59 GMT (envelope-from adamw@FreeBSD.org) Message-Id: <201701100449.v0A4nxVO078896@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: adamw set sender to adamw@FreeBSD.org using -f From: Adam Weinberger Date: Tue, 10 Jan 2017 04:49:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r311853 - head/share/misc X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 10 Jan 2017 04:50:00 -0000 Author: adamw (ports committer) Date: Tue Jan 10 04:49:59 2017 New Revision: 311853 URL: https://svnweb.freebsd.org/changeset/base/311853 Log: As much as I've enjoyed being listed as emeritus for the last 10+ years, it's probably time to admit that I am an active committer. Modified: head/share/misc/committers-ports.dot Modified: head/share/misc/committers-ports.dot ============================================================================== --- head/share/misc/committers-ports.dot Tue Jan 10 04:31:56 2017 (r311852) +++ head/share/misc/committers-ports.dot Tue Jan 10 04:49:59 2017 (r311853) @@ -29,7 +29,6 @@ node [color=grey62, style=filled, bgcolo # Alumni go here.. Try to keep things sorted. -adamw [label="Adam Weinberger\nadamw@FreeBSD.org\n2002/10/16\n2006/09/25"] asami [label="Satoshi Asami\nasami@FreeBSD.org\n1994/11/18\n2001/09/11"] billf [label="Bill Fumerola\nbillf@FreeBSD.org\n1998/11/11\n2006/12/14"] jmallett [label="Juli Mallett\njmallett@FreeBSD.org\n2003/01/16\n2006/08/10"] @@ -43,6 +42,7 @@ node [color=lightblue2, style=filled, bg ache [label="Andrey Chernov\nache@FreeBSD.org\n1994/11/15"] acm [label="Jose Alonso Cardenas Marquez\nacm@FreeBSD.org\n2006/07/18"] +adamw [label="Adam Weinberger\nadamw@FreeBSD.org\n2002/10/16"] ahze [label="Michael Johnson\nahze@FreeBSD.org\n2004/10/29"] ak [label="Alex Kozlov\nak@FreeBSD.org\n2012/02/29"] ale [label="Alex Dupre\nale@FreeBSD.org\n2004/01/12"] From owner-svn-src-head@freebsd.org Tue Jan 10 04:50:28 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 61391CA867A; Tue, 10 Jan 2017 04:50:28 +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 3ABF91F1E; Tue, 10 Jan 2017 04:50:28 +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 v0A4oRjG078984; Tue, 10 Jan 2017 04:50:27 GMT (envelope-from sbruno@FreeBSD.org) Received: (from sbruno@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v0A4oR2T078980; Tue, 10 Jan 2017 04:50:27 GMT (envelope-from sbruno@FreeBSD.org) Message-Id: <201701100450.v0A4oR2T078980@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: sbruno set sender to sbruno@FreeBSD.org using -f From: Sean Bruno Date: Tue, 10 Jan 2017 04:50:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r311854 - head/sys/dev/e1000 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 10 Jan 2017 04:50:28 -0000 Author: sbruno Date: Tue Jan 10 04:50:26 2017 New Revision: 311854 URL: https://svnweb.freebsd.org/changeset/base/311854 Log: Add copywrite notices, 2-clause BSD. Reported by: jmallett Modified: head/sys/dev/e1000/em_txrx.c head/sys/dev/e1000/if_em.c head/sys/dev/e1000/if_em.h head/sys/dev/e1000/igb_txrx.c Modified: head/sys/dev/e1000/em_txrx.c ============================================================================== --- head/sys/dev/e1000/em_txrx.c Tue Jan 10 04:49:59 2017 (r311853) +++ head/sys/dev/e1000/em_txrx.c Tue Jan 10 04:50:26 2017 (r311854) @@ -1,3 +1,29 @@ +/*- + * Copyright (c) 2016 Matt Macy + * 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 "if_em.h" Modified: head/sys/dev/e1000/if_em.c ============================================================================== --- head/sys/dev/e1000/if_em.c Tue Jan 10 04:49:59 2017 (r311853) +++ head/sys/dev/e1000/if_em.c Tue Jan 10 04:50:26 2017 (r311854) @@ -1,3 +1,29 @@ +/*- + * Copyright (c) 2016 Matt Macy + * 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 "if_em.h" #include Modified: head/sys/dev/e1000/if_em.h ============================================================================== --- head/sys/dev/e1000/if_em.h Tue Jan 10 04:49:59 2017 (r311853) +++ head/sys/dev/e1000/if_em.h Tue Jan 10 04:50:26 2017 (r311854) @@ -1,3 +1,29 @@ +/*- + * Copyright (c) 2016 Matt Macy + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + /*$FreeBSD$*/ #include "opt_em.h" #include "opt_ddb.h" Modified: head/sys/dev/e1000/igb_txrx.c ============================================================================== --- head/sys/dev/e1000/igb_txrx.c Tue Jan 10 04:49:59 2017 (r311853) +++ head/sys/dev/e1000/igb_txrx.c Tue Jan 10 04:50:26 2017 (r311854) @@ -1,3 +1,29 @@ +/*- + * Copyright (c) 2016 Matt Macy + * 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 "if_em.h" From owner-svn-src-head@freebsd.org Tue Jan 10 05:30:17 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0388BCA8955; Tue, 10 Jan 2017 05:30:17 +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 BFE4E145D; Tue, 10 Jan 2017 05:30: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 v0A5UGJu094899; Tue, 10 Jan 2017 05:30:16 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v0A5UF3H094897; Tue, 10 Jan 2017 05:30:15 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201701100530.v0A5UF3H094897@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Tue, 10 Jan 2017 05:30:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r311855 - head/sys/net80211 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 10 Jan 2017 05:30:17 -0000 Author: adrian Date: Tue Jan 10 05:30:15 2017 New Revision: 311855 URL: https://svnweb.freebsd.org/changeset/base/311855 Log: [net80211] create a helper function to calculate the station facing VHT capabilities. This is needed for two reasons: * Drivers will need to know what the negotiated set of VHT capabilities and rates are in order to configure (and reconfigure for opmode/chanwidth changes) how to speak to a given peer; and * Because some vendors are "special", we should be careful in what we announce to them during peer association. This isn't the complete solution, as I still need to make sure that when sending out probe requests before we know what we want, we don't limit the capabilities being announced. This is important for IBSS/mesh work later on as probe request/response exchanges are the first hint at what a peer supports. I'll look at adding that to the API soon. Modified: head/sys/net80211/ieee80211_vht.c head/sys/net80211/ieee80211_vht.h Modified: head/sys/net80211/ieee80211_vht.c ============================================================================== --- head/sys/net80211/ieee80211_vht.c Tue Jan 10 04:50:26 2017 (r311854) +++ head/sys/net80211/ieee80211_vht.c Tue Jan 10 05:30:15 2017 (r311855) @@ -71,6 +71,15 @@ __FBSDID("$FreeBSD$"); } while (0) /* + * Immediate TODO: + * + * + handle WLAN_ACTION_VHT_OPMODE_NOTIF and other VHT action frames + * + ensure vhtinfo/vhtcap parameters correctly use the negotiated + * capabilities and ratesets + * + group ID management operation + */ + +/* * XXX TODO: handle WLAN_ACTION_VHT_OPMODE_NOTIF * * Look at mac80211/vht.c:ieee80211_vht_handle_opmode() for further details. @@ -153,9 +162,9 @@ ieee80211_vht_announce(struct ieee80211c /* Channel width */ ic_printf(ic, "[VHT] Channel Widths: 20MHz, 40MHz, 80MHz"); - if (ic->ic_vhtcaps & IEEE80211_VHTCAP_SUPP_CHAN_WIDTH_160_80PLUS80MHZ) + if (MS(ic->ic_vhtcaps, IEEE80211_VHTCAP_SUPP_CHAN_WIDTH_MASK) == 2) printf(" 80+80MHz"); - if (ic->ic_vhtcaps & IEEE80211_VHTCAP_SUPP_CHAN_WIDTH_160MHZ) + if (MS(ic->ic_vhtcaps, IEEE80211_VHTCAP_SUPP_CHAN_WIDTH_MASK) >= 1) printf(" 160MHz"); printf("\n"); @@ -280,38 +289,357 @@ ieee80211_vht_node_leave(struct ieee8021 "%s: called", __func__); } -uint8_t * -ieee80211_add_vhtcap(uint8_t *frm, struct ieee80211_node *ni) +/* + * Calculate the VHTCAP IE for a given node. + * + * This includes calculating the capability intersection based on the + * current operating mode and intersection of the TX/RX MCS maps. + * + * The standard only makes it clear about MCS rate negotiation + * and MCS basic rates (which must be a subset of the general + * negotiated rates). It doesn't make it clear that the AP should + * figure out the minimum functional overlap with the STA and + * support that. + * + * Note: this is in host order, not in 802.11 endian order. + * + * TODO: ensure I re-read 9.7.11 Rate Selection for VHT STAs. + * + * TODO: investigate what we should negotiate for MU-MIMO beamforming + * options. + * + * opmode is '1' for "vhtcap as if I'm a STA", 0 otherwise. + */ +void +ieee80211_vht_get_vhtcap_ie(struct ieee80211_node *ni, + struct ieee80211_ie_vhtcap *vhtcap, int opmode) { - uint32_t cap; + struct ieee80211vap *vap = ni->ni_vap; +// struct ieee80211com *ic = vap->iv_ic; + uint32_t val, val1, val2; + uint32_t new_vhtcap; + int i; - memset(frm, '\0', sizeof(struct ieee80211_ie_vhtcap)); + vhtcap->ie = IEEE80211_ELEMID_VHT_CAP; + vhtcap->len = sizeof(struct ieee80211_ie_vhtcap) - 2; - frm[0] = IEEE80211_ELEMID_VHT_CAP; - frm[1] = sizeof(struct ieee80211_ie_vhtcap) - 2; - frm += 2; + /* + * Capabilities - it depends on whether we are a station + * or not. + */ + new_vhtcap = 0; /* - * For now, don't do any configuration. - * Just populate the node configuration. - * We can worry about making it configurable later. + * Station - use our desired configuration based on + * local config, local device bits and the already-learnt + * vhtcap/vhtinfo IE in the node. */ - cap = ni->ni_vhtcap; + /* Limit MPDU size to the smaller of the two */ + val2 = val1 = MS(vap->iv_vhtcaps, IEEE80211_VHTCAP_MAX_MPDU_MASK); + if (opmode == 1) { + val2 = MS(ni->ni_vhtcap, IEEE80211_VHTCAP_MAX_MPDU_MASK); + } + val = MIN(val1, val2); + new_vhtcap |= SM(val, IEEE80211_VHTCAP_MAX_MPDU_MASK); + + /* Limit supp channel config */ + val2 = val1 = MS(vap->iv_vhtcaps, + IEEE80211_VHTCAP_SUPP_CHAN_WIDTH_MASK); + if (opmode == 1) { + val2 = MS(ni->ni_vhtcap, + IEEE80211_VHTCAP_SUPP_CHAN_WIDTH_MASK); + } + if ((val2 == 2) && + ((vap->iv_flags_vht & IEEE80211_FVHT_USEVHT80P80) == 0)) + val2 = 1; + if ((val2 == 1) && + ((vap->iv_flags_vht & IEEE80211_FVHT_USEVHT160) == 0)) + val2 = 0; + val = MIN(val1, val2); + new_vhtcap |= SM(val, IEEE80211_VHTCAP_SUPP_CHAN_WIDTH_MASK); + + /* RX LDPC */ + val2 = val1 = MS(vap->iv_vhtcaps, IEEE80211_VHTCAP_RXLDPC); + if (opmode == 1) { + val2 = MS(ni->ni_vhtcap, IEEE80211_VHTCAP_RXLDPC); + } + val = MIN(val1, val2); + new_vhtcap |= SM(val, IEEE80211_VHTCAP_RXLDPC); + + /* Short-GI 80 */ + val2 = val1 = MS(vap->iv_vhtcaps, IEEE80211_VHTCAP_SHORT_GI_80); + if (opmode == 1) { + val2 = MS(ni->ni_vhtcap, IEEE80211_VHTCAP_SHORT_GI_80); + } + val = MIN(val1, val2); + new_vhtcap |= SM(val, IEEE80211_VHTCAP_SHORT_GI_80); + + /* Short-GI 160 */ + val2 = val1 = MS(vap->iv_vhtcaps, IEEE80211_VHTCAP_SHORT_GI_160); + if (opmode == 1) { + val2 = MS(ni->ni_vhtcap, IEEE80211_VHTCAP_SHORT_GI_160); + } + val = MIN(val1, val2); + new_vhtcap |= SM(val, IEEE80211_VHTCAP_SHORT_GI_160); + + /* + * STBC is slightly more complicated. + * + * In non-STA mode, we just announce our capabilities and that + * is that. + * + * In STA mode, we should calculate our capabilities based on + * local capabilities /and/ what the remote says. So: + * + * + Only TX STBC if we support it and the remote supports RX STBC; + * + Only announce RX STBC if we support it and the remote supports + * TX STBC; + * + RX STBC should be the minimum of local and remote RX STBC; + */ + + /* TX STBC */ + val2 = val1 = MS(vap->iv_vhtcaps, IEEE80211_VHTCAP_TXSTBC); + if (opmode == 1) { + /* STA mode - enable it only if node RXSTBC is non-zero */ + val2 = !! MS(ni->ni_vhtcap, IEEE80211_VHTCAP_RXSTBC_MASK); + } + val = MIN(val1, val2); + /* XXX For now, use the 11n config flag */ + if ((vap->iv_flags_ht & IEEE80211_FHT_STBC_TX) == 0) + val = 0; + new_vhtcap |= SM(val, IEEE80211_VHTCAP_TXSTBC); + + /* RX STBC1..4 */ + val2 = val1 = MS(vap->iv_vhtcaps, IEEE80211_VHTCAP_RXSTBC_MASK); + if (opmode == 1) { + /* STA mode - enable it only if node TXSTBC is non-zero */ + val2 = MS(ni->ni_vhtcap, IEEE80211_VHTCAP_TXSTBC); + } + val = MIN(val1, val2); + /* XXX For now, use the 11n config flag */ + if ((vap->iv_flags_ht & IEEE80211_FHT_STBC_RX) == 0) + val = 0; + new_vhtcap |= SM(val, IEEE80211_VHTCAP_RXSTBC_MASK); + + /* + * Finally - if RXSTBC is 0, then don't enable TXSTBC. + * Strictly speaking a device can TXSTBC and not RXSTBC, but + * it would be silly. + */ + if (val == 0) + new_vhtcap &= ~IEEE80211_VHTCAP_TXSTBC; + + /* + * Some of these fields require other fields to exist. + * So before using it, the parent field needs to be checked + * otherwise the overridden value may be wrong. + * + * For example, if SU beamformee is set to 0, then BF STS + * needs to be 0. + */ + + /* SU Beamformer capable */ + val2 = val1 = MS(vap->iv_vhtcaps, + IEEE80211_VHTCAP_SU_BEAMFORMER_CAPABLE); + if (opmode == 1) { + val2 = MS(ni->ni_vhtcap, + IEEE80211_VHTCAP_SU_BEAMFORMER_CAPABLE); + } + val = MIN(val1, val2); + new_vhtcap |= SM(val, IEEE80211_VHTCAP_SU_BEAMFORMER_CAPABLE); + + /* SU Beamformee capable */ + val2 = val1 = MS(vap->iv_vhtcaps, + IEEE80211_VHTCAP_SU_BEAMFORMEE_CAPABLE); + if (opmode == 1) { + val2 = MS(ni->ni_vhtcap, + IEEE80211_VHTCAP_SU_BEAMFORMEE_CAPABLE); + } + val = MIN(val1, val2); + new_vhtcap |= SM(val, IEEE80211_VHTCAP_SU_BEAMFORMEE_CAPABLE); + + /* Beamformee STS capability - only if SU beamformee capable */ + val2 = val1 = MS(vap->iv_vhtcaps, IEEE80211_VHTCAP_BEAMFORMEE_STS_MASK); + if (opmode == 1) { + val2 = MS(ni->ni_vhtcap, IEEE80211_VHTCAP_BEAMFORMEE_STS_MASK); + } + val = MIN(val1, val2); + if ((new_vhtcap & IEEE80211_VHTCAP_SU_BEAMFORMEE_CAPABLE) == 0) + val = 0; + new_vhtcap |= SM(val, IEEE80211_VHTCAP_BEAMFORMEE_STS_MASK); + + /* Sounding dimensions - only if SU beamformer capable */ + val2 = val1 = MS(vap->iv_vhtcaps, + IEEE80211_VHTCAP_SOUNDING_DIMENSIONS_MASK); + if (opmode == 1) + val2 = MS(ni->ni_vhtcap, + IEEE80211_VHTCAP_SOUNDING_DIMENSIONS_MASK); + val = MIN(val1, val2); + if ((new_vhtcap & IEEE80211_VHTCAP_SU_BEAMFORMER_CAPABLE) == 0) + val = 0; + new_vhtcap |= SM(val, IEEE80211_VHTCAP_SOUNDING_DIMENSIONS_MASK); /* - * XXX TODO: any capability changes required by - * configuration. + * MU Beamformer capable - only if SU BFF capable, MU BFF capable + * and STA (not AP) */ + val2 = val1 = MS(vap->iv_vhtcaps, + IEEE80211_VHTCAP_MU_BEAMFORMER_CAPABLE); + if (opmode == 1) + val2 = MS(ni->ni_vhtcap, + IEEE80211_VHTCAP_MU_BEAMFORMER_CAPABLE); + val = MIN(val1, val2); + if ((new_vhtcap & IEEE80211_VHTCAP_SU_BEAMFORMER_CAPABLE) == 0) + val = 0; + if (opmode != 1) /* Only enable for STA mode */ + val = 0; + new_vhtcap |= SM(val, IEEE80211_VHTCAP_SU_BEAMFORMER_CAPABLE); + + /* + * MU Beamformee capable - only if SU BFE capable, MU BFE capable + * and AP (not STA) + */ + val2 = val1 = MS(vap->iv_vhtcaps, + IEEE80211_VHTCAP_MU_BEAMFORMEE_CAPABLE); + if (opmode == 1) + val2 = MS(ni->ni_vhtcap, + IEEE80211_VHTCAP_MU_BEAMFORMEE_CAPABLE); + val = MIN(val1, val2); + if ((new_vhtcap & IEEE80211_VHTCAP_SU_BEAMFORMEE_CAPABLE) == 0) + val = 0; + if (opmode != 0) /* Only enable for AP mode */ + val = 0; + new_vhtcap |= SM(val, IEEE80211_VHTCAP_SU_BEAMFORMEE_CAPABLE); + + /* VHT TXOP PS */ + val2 = val1 = MS(vap->iv_vhtcaps, IEEE80211_VHTCAP_VHT_TXOP_PS); + if (opmode == 1) + val2 = MS(ni->ni_vhtcap, IEEE80211_VHTCAP_VHT_TXOP_PS); + val = MIN(val1, val2); + new_vhtcap |= SM(val, IEEE80211_VHTCAP_VHT_TXOP_PS); + + /* HTC_VHT */ + val2 = val1 = MS(vap->iv_vhtcaps, IEEE80211_VHTCAP_HTC_VHT); + if (opmode == 1) + val2 = MS(ni->ni_vhtcap, IEEE80211_VHTCAP_HTC_VHT); + val = MIN(val1, val2); + new_vhtcap |= SM(val, IEEE80211_VHTCAP_HTC_VHT); + + /* A-MPDU length max */ + /* XXX TODO: we need a userland config knob for this */ + val2 = val1 = MS(vap->iv_vhtcaps, + IEEE80211_VHTCAP_MAX_A_MPDU_LENGTH_EXPONENT_MASK); + if (opmode == 1) + val2 = MS(ni->ni_vhtcap, + IEEE80211_VHTCAP_MAX_A_MPDU_LENGTH_EXPONENT_MASK); + val = MIN(val1, val2); + new_vhtcap |= SM(val, IEEE80211_VHTCAP_MAX_A_MPDU_LENGTH_EXPONENT_MASK); + + /* + * Link adaptation is only valid if HTC-VHT capable is 1. + * Otherwise, always set it to 0. + */ + val2 = val1 = MS(vap->iv_vhtcaps, + IEEE80211_VHTCAP_VHT_LINK_ADAPTATION_VHT_MASK); + if (opmode == 1) + val2 = MS(ni->ni_vhtcap, + IEEE80211_VHTCAP_VHT_LINK_ADAPTATION_VHT_MASK); + val = MIN(val1, val2); + if ((new_vhtcap & IEEE80211_VHTCAP_HTC_VHT) == 0) + val = 0; + new_vhtcap |= SM(val, IEEE80211_VHTCAP_VHT_LINK_ADAPTATION_VHT_MASK); + + /* + * The following two options are 0 if the pattern may change, 1 if it + * does not change. So, downgrade to the higher value. + */ + + /* RX antenna pattern */ + val2 = val1 = MS(vap->iv_vhtcaps, IEEE80211_VHTCAP_RX_ANTENNA_PATTERN); + if (opmode == 1) + val2 = MS(ni->ni_vhtcap, IEEE80211_VHTCAP_RX_ANTENNA_PATTERN); + val = MAX(val1, val2); + new_vhtcap |= SM(val, IEEE80211_VHTCAP_RX_ANTENNA_PATTERN); + + /* TX antenna pattern */ + val2 = val1 = MS(vap->iv_vhtcaps, IEEE80211_VHTCAP_TX_ANTENNA_PATTERN); + if (opmode == 1) + val2 = MS(ni->ni_vhtcap, IEEE80211_VHTCAP_TX_ANTENNA_PATTERN); + val = MAX(val1, val2); + new_vhtcap |= SM(val, IEEE80211_VHTCAP_TX_ANTENNA_PATTERN); + + /* + * MCS set - again, we announce what we want to use + * based on configuration, device capabilities and + * already-learnt vhtcap/vhtinfo IE information. + */ + + /* MCS set - start with whatever the device supports */ + vhtcap->supp_mcs.rx_mcs_map = vap->iv_vht_mcsinfo.rx_mcs_map; + vhtcap->supp_mcs.rx_highest = 0; + vhtcap->supp_mcs.tx_mcs_map = vap->iv_vht_mcsinfo.tx_mcs_map; + vhtcap->supp_mcs.tx_highest = 0; + + vhtcap->vht_cap_info = new_vhtcap; + + /* + * Now, if we're a STA, mask off whatever the AP doesn't support. + * Ie, we continue to state we can receive whatever we can do, + * but we only announce that we will transmit rates that meet + * the AP requirement. + * + * Note: 0 - MCS0..7; 1 - MCS0..8; 2 - MCS0..9; 3 = not supported. + * We can't just use MIN() because '3' means "no", so special case it. + */ + if (opmode) { + for (i = 0; i < 8; i++) { + val1 = (vhtcap->supp_mcs.tx_mcs_map >> (i*2)) & 0x3; + val2 = (ni->ni_vht_mcsinfo.tx_mcs_map >> (i*2)) & 0x3; + val = MIN(val1, val2); + if (val1 == 3 || val2 == 3) + val = 3; + vhtcap->supp_mcs.tx_mcs_map &= ~(0x3 << (i*2)); + vhtcap->supp_mcs.tx_mcs_map |= (val << (i*2)); + } + } +} + +/* + * Add a VHTCAP field. + * + * If in station mode, we announce what we would like our + * desired configuration to be. + * + * Else, we announce our capabilities based on our current + * configuration. + */ +uint8_t * +ieee80211_add_vhtcap(uint8_t *frm, struct ieee80211_node *ni) +{ + struct ieee80211_ie_vhtcap vhtcap; + int opmode; + + opmode = 0; + if (ni->ni_vap->iv_opmode == IEEE80211_M_STA) + opmode = 1; + + ieee80211_vht_get_vhtcap_ie(ni, &vhtcap, opmode); + + memset(frm, '\0', sizeof(struct ieee80211_ie_vhtcap)); + + frm[0] = IEEE80211_ELEMID_VHT_CAP; + frm[1] = sizeof(struct ieee80211_ie_vhtcap) - 2; + frm += 2; /* 32-bit VHT capability */ - ADDWORD(frm, cap); + ADDWORD(frm, vhtcap.vht_cap_info); /* suppmcs */ - ADDSHORT(frm, ni->ni_vht_mcsinfo.rx_mcs_map); - ADDSHORT(frm, ni->ni_vht_mcsinfo.rx_highest); - ADDSHORT(frm, ni->ni_vht_mcsinfo.tx_mcs_map); - ADDSHORT(frm, ni->ni_vht_mcsinfo.tx_highest); + ADDSHORT(frm, vhtcap.supp_mcs.rx_mcs_map); + ADDSHORT(frm, vhtcap.supp_mcs.rx_highest); + ADDSHORT(frm, vhtcap.supp_mcs.tx_mcs_map); + ADDSHORT(frm, vhtcap.supp_mcs.tx_highest); return (frm); } @@ -370,17 +698,6 @@ ieee80211_add_vhtinfo(uint8_t *frm, stru frm[1] = sizeof(struct ieee80211_ie_vht_operation) - 2; frm += 2; - /* - * XXX if it's a station, then see if we have a node - * channel or ANYC. If it's ANYC then assume we're - * scanning, and announce our capabilities. - * - * This should set the "20/40/80/160MHz wide config"; - * the 80/80 or 160MHz wide config is done in VHTCAP. - * - * Other modes - just limit it to the channel. - */ - /* 8-bit chanwidth */ *frm++ = ieee80211_vht_get_chwidth_ie(ni->ni_chan); @@ -475,3 +792,19 @@ ieee80211_vht_adjust_channel(struct ieee #endif return (chan); } + +/* + * Calculate the VHT operation IE for a given node. + * + * This includes calculating the suitable channel width/parameters + * and basic MCS set. + * + * TODO: ensure I read 9.7.11 Rate Selection for VHT STAs. + * TODO: ensure I read 10.39.7 - BSS Basic VHT-MCS and NSS set operation. + */ +void +ieee80211_vht_get_vhtinfo_ie(struct ieee80211_node *ni, + struct ieee80211_ie_vht_operation *vhtop, int opmode) +{ + printf("%s: called; TODO!\n", __func__); +} Modified: head/sys/net80211/ieee80211_vht.h ============================================================================== --- head/sys/net80211/ieee80211_vht.h Tue Jan 10 04:50:26 2017 (r311854) +++ head/sys/net80211/ieee80211_vht.h Tue Jan 10 05:30:15 2017 (r311855) @@ -60,4 +60,9 @@ struct ieee80211_channel * ieee80211_vht_adjust_channel(struct ieee80211com *, struct ieee80211_channel *, int); +void ieee80211_vht_get_vhtcap_ie(struct ieee80211_node *ni, + struct ieee80211_ie_vhtcap *, int); +void ieee80211_vht_get_vhtinfo_ie(struct ieee80211_node *ni, + struct ieee80211_ie_vht_operation *, int); + #endif /* _NET80211_IEEE80211_VHT_H_ */ From owner-svn-src-head@freebsd.org Tue Jan 10 05:32:03 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B5D71CA8B67; Tue, 10 Jan 2017 05:32:03 +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 8F7BC1869; Tue, 10 Jan 2017 05:32:03 +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 v0A5W2Xd098665; Tue, 10 Jan 2017 05:32:02 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v0A5W2cH098664; Tue, 10 Jan 2017 05:32:02 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201701100532.v0A5W2cH098664@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Tue, 10 Jan 2017 05:32:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r311856 - head/sys/net80211 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 10 Jan 2017 05:32:03 -0000 Author: adrian Date: Tue Jan 10 05:32:02 2017 New Revision: 311856 URL: https://svnweb.freebsd.org/changeset/base/311856 Log: [net80211] add VHT EDCA parameters for WME/QoS mode. Modified: head/sys/net80211/ieee80211_proto.c Modified: head/sys/net80211/ieee80211_proto.c ============================================================================== --- head/sys/net80211/ieee80211_proto.c Tue Jan 10 05:30:15 2017 (r311855) +++ head/sys/net80211/ieee80211_proto.c Tue Jan 10 05:32:02 2017 (r311856) @@ -842,6 +842,9 @@ setbasicrates(struct ieee80211_rateset * [IEEE80211_MODE_11NA] = { 3, { 12, 24, 48 } }, /* NB: mixed b/g */ [IEEE80211_MODE_11NG] = { 4, { 2, 4, 11, 22 } }, + /* NB: mixed b/g */ + [IEEE80211_MODE_VHT_2GHZ] = { 4, { 2, 4, 11, 22 } }, + [IEEE80211_MODE_VHT_5GHZ] = { 3, { 12, 24, 48 } }, }; int i, j; @@ -906,6 +909,8 @@ static const struct phyParamType phyPara [IEEE80211_MODE_QUARTER]= { 3, 4, 6, 0, 0 }, [IEEE80211_MODE_11NA] = { 3, 4, 6, 0, 0 }, [IEEE80211_MODE_11NG] = { 3, 4, 6, 0, 0 }, + [IEEE80211_MODE_VHT_2GHZ] = { 3, 4, 6, 0, 0 }, + [IEEE80211_MODE_VHT_5GHZ] = { 3, 4, 6, 0, 0 }, }; static const struct phyParamType phyParamForAC_BK[IEEE80211_MODE_MAX] = { [IEEE80211_MODE_AUTO] = { 7, 4, 10, 0, 0 }, @@ -920,6 +925,8 @@ static const struct phyParamType phyPara [IEEE80211_MODE_QUARTER]= { 7, 4, 10, 0, 0 }, [IEEE80211_MODE_11NA] = { 7, 4, 10, 0, 0 }, [IEEE80211_MODE_11NG] = { 7, 4, 10, 0, 0 }, + [IEEE80211_MODE_VHT_2GHZ] = { 7, 4, 10, 0, 0 }, + [IEEE80211_MODE_VHT_5GHZ] = { 7, 4, 10, 0, 0 }, }; static const struct phyParamType phyParamForAC_VI[IEEE80211_MODE_MAX] = { [IEEE80211_MODE_AUTO] = { 1, 3, 4, 94, 0 }, @@ -934,6 +941,8 @@ static const struct phyParamType phyPara [IEEE80211_MODE_QUARTER]= { 1, 3, 4, 94, 0 }, [IEEE80211_MODE_11NA] = { 1, 3, 4, 94, 0 }, [IEEE80211_MODE_11NG] = { 1, 3, 4, 94, 0 }, + [IEEE80211_MODE_VHT_2GHZ] = { 1, 3, 4, 94, 0 }, + [IEEE80211_MODE_VHT_5GHZ] = { 1, 3, 4, 94, 0 }, }; static const struct phyParamType phyParamForAC_VO[IEEE80211_MODE_MAX] = { [IEEE80211_MODE_AUTO] = { 1, 2, 3, 47, 0 }, @@ -948,6 +957,8 @@ static const struct phyParamType phyPara [IEEE80211_MODE_QUARTER]= { 1, 2, 3, 47, 0 }, [IEEE80211_MODE_11NA] = { 1, 2, 3, 47, 0 }, [IEEE80211_MODE_11NG] = { 1, 2, 3, 47, 0 }, + [IEEE80211_MODE_VHT_2GHZ] = { 1, 2, 3, 47, 0 }, + [IEEE80211_MODE_VHT_5GHZ] = { 1, 2, 3, 47, 0 }, }; static const struct phyParamType bssPhyParamForAC_BE[IEEE80211_MODE_MAX] = { @@ -1123,6 +1134,8 @@ ieee80211_wme_updateparams_locked(struct [IEEE80211_MODE_QUARTER] = { 2, 4, 10, 64, 0 }, [IEEE80211_MODE_11NA] = { 2, 4, 10, 64, 0 }, /* XXXcheck*/ [IEEE80211_MODE_11NG] = { 2, 4, 10, 64, 0 }, /* XXXcheck*/ + [IEEE80211_MODE_VHT_2GHZ] = { 2, 4, 10, 64, 0 }, /* XXXcheck*/ + [IEEE80211_MODE_VHT_5GHZ] = { 2, 4, 10, 64, 0 }, /* XXXcheck*/ }; struct ieee80211com *ic = vap->iv_ic; struct ieee80211_wme_state *wme = &ic->ic_wme; @@ -1243,6 +1256,8 @@ ieee80211_wme_updateparams_locked(struct [IEEE80211_MODE_QUARTER] = 3, [IEEE80211_MODE_11NA] = 3, [IEEE80211_MODE_11NG] = 3, + [IEEE80211_MODE_VHT_2GHZ] = 3, + [IEEE80211_MODE_VHT_5GHZ] = 3, }; chanp = &wme->wme_chanParams.cap_wmeParams[WME_AC_BE]; bssp = &wme->wme_bssChanParams.cap_wmeParams[WME_AC_BE]; From owner-svn-src-head@freebsd.org Tue Jan 10 05:32:31 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C3564CA8BC7; Tue, 10 Jan 2017 05:32: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 902AA1A40; Tue, 10 Jan 2017 05:32: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 v0A5WU6J098726; Tue, 10 Jan 2017 05:32:30 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v0A5WU7a098725; Tue, 10 Jan 2017 05:32:30 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201701100532.v0A5WU7a098725@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Tue, 10 Jan 2017 05:32:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r311857 - head/sys/net80211 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 10 Jan 2017 05:32:31 -0000 Author: adrian Date: Tue Jan 10 05:32:30 2017 New Revision: 311857 URL: https://svnweb.freebsd.org/changeset/base/311857 Log: [net80211] add CHAN_VHT2G/CHAN_VHT5G macros. Modified: head/sys/net80211/_ieee80211.h Modified: head/sys/net80211/_ieee80211.h ============================================================================== --- head/sys/net80211/_ieee80211.h Tue Jan 10 05:32:02 2017 (r311856) +++ head/sys/net80211/_ieee80211.h Tue Jan 10 05:32:30 2017 (r311857) @@ -313,6 +313,12 @@ struct ieee80211_channel { #define IEEE80211_IS_CHAN_VHT(_c) \ (((_c)->ic_flags & IEEE80211_CHAN_VHT) != 0) +#define IEEE80211_IS_CHAN_VHT_2GHZ(_c) \ + (IEEE80211_IS_CHAN_2GHZ(_c) && \ + ((_c)->ic_flags & IEEE80211_CHAN_VHT) != 0) +#define IEEE80211_IS_CHAN_VHT_5GHZ(_c) \ + (IEEE80211_IS_CHAN_5GHZ(_c) && \ + ((_c)->ic_flags & IEEE80211_CHAN_VHT) != 0) #define IEEE80211_IS_CHAN_VHT20(_c) \ (((_c)->ic_flags & IEEE80211_CHAN_VHT20) != 0) #define IEEE80211_IS_CHAN_VHT40(_c) \ From owner-svn-src-head@freebsd.org Tue Jan 10 05:33:35 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id DCE75CA8C89; Tue, 10 Jan 2017 05:33:35 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B76C31BF9; Tue, 10 Jan 2017 05:33:35 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v0A5XYFQ098821; Tue, 10 Jan 2017 05:33:34 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v0A5XYEj098820; Tue, 10 Jan 2017 05:33:34 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201701100533.v0A5XYEj098820@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Tue, 10 Jan 2017 05:33:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r311858 - head/sys/net80211 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 10 Jan 2017 05:33:36 -0000 Author: adrian Date: Tue Jan 10 05:33:34 2017 New Revision: 311858 URL: https://svnweb.freebsd.org/changeset/base/311858 Log: [net80211] add missing VHTCAP declaration changes. These are required for the recent ieee80211_vht.[ch] changes - they make things start to work with MS() / SM() macros. Modified: head/sys/net80211/ieee80211.h Modified: head/sys/net80211/ieee80211.h ============================================================================== --- head/sys/net80211/ieee80211.h Tue Jan 10 05:32:30 2017 (r311857) +++ head/sys/net80211/ieee80211.h Tue Jan 10 05:33:34 2017 (r311858) @@ -798,37 +798,73 @@ struct ieee80211_ie_vht_operation { #define IEEE80211_VHTCAP_MAX_MPDU_LENGTH_7991 0x00000001 #define IEEE80211_VHTCAP_MAX_MPDU_LENGTH_11454 0x00000002 #define IEEE80211_VHTCAP_MAX_MPDU_MASK 0x00000003 -#define IEEE80211_VHTCAP_SUPP_CHAN_WIDTH_160MHZ 0x00000004 -#define IEEE80211_VHTCAP_SUPP_CHAN_WIDTH_160_80PLUS80MHZ 0x00000008 +#define IEEE80211_VHTCAP_MAX_MPDU_MASK_S 0 + #define IEEE80211_VHTCAP_SUPP_CHAN_WIDTH_MASK 0x0000000C +#define IEEE80211_VHTCAP_SUPP_CHAN_WIDTH_MASK_S 2 +#define IEEE80211_VHTCAP_SUPP_CHAN_WIDTH_NONE 0 +#define IEEE80211_VHTCAP_SUPP_CHAN_WIDTH_160MHZ 1 +#define IEEE80211_VHTCAP_SUPP_CHAN_WIDTH_160_80P80MHZ 2 +#define IEEE80211_VHTCAP_SUPP_CHAN_WIDTH_RESERVED 3 + #define IEEE80211_VHTCAP_RXLDPC 0x00000010 +#define IEEE80211_VHTCAP_RXLDPC_S 4 + #define IEEE80211_VHTCAP_SHORT_GI_80 0x00000020 +#define IEEE80211_VHTCAP_SHORT_GI_80_S 5 + #define IEEE80211_VHTCAP_SHORT_GI_160 0x00000040 +#define IEEE80211_VHTCAP_SHORT_GI_160_S 6 + #define IEEE80211_VHTCAP_TXSTBC 0x00000080 +#define IEEE80211_VHTCAP_TXSTBC_S 7 + #define IEEE80211_VHTCAP_RXSTBC_1 0x00000100 #define IEEE80211_VHTCAP_RXSTBC_2 0x00000200 #define IEEE80211_VHTCAP_RXSTBC_3 0x00000300 #define IEEE80211_VHTCAP_RXSTBC_4 0x00000400 #define IEEE80211_VHTCAP_RXSTBC_MASK 0x00000700 +#define IEEE80211_VHTCAP_RXSTBC_MASK_S 8 + #define IEEE80211_VHTCAP_SU_BEAMFORMER_CAPABLE 0x00000800 +#define IEEE80211_VHTCAP_SU_BEAMFORMER_CAPABLE_S 11 + #define IEEE80211_VHTCAP_SU_BEAMFORMEE_CAPABLE 0x00001000 +#define IEEE80211_VHTCAP_SU_BEAMFORMEE_CAPABLE_S 12 + #define IEEE80211_VHTCAP_BEAMFORMEE_STS_SHIFT 13 #define IEEE80211_VHTCAP_BEAMFORMEE_STS_MASK \ (7 << IEEE80211_VHTCAP_BEAMFORMEE_STS_SHIFT) +#define IEEE80211_VHTCAP_BEAMFORMEE_STS_MASK_S 13 + #define IEEE80211_VHTCAP_SOUNDING_DIMENSIONS_SHIFT 16 #define IEEE80211_VHTCAP_SOUNDING_DIMENSIONS_MASK \ (7 << IEEE80211_VHTCAP_SOUNDING_DIMENSIONS_SHIFT) +#define IEEE80211_VHTCAP_SOUNDING_DIMENSIONS_MASK_S 16 + #define IEEE80211_VHTCAP_MU_BEAMFORMER_CAPABLE 0x00080000 +#define IEEE80211_VHTCAP_MU_BEAMFORMER_CAPABLE_S 19 #define IEEE80211_VHTCAP_MU_BEAMFORMEE_CAPABLE 0x00100000 +#define IEEE80211_VHTCAP_MU_BEAMFORMEE_CAPABLE_S 20 #define IEEE80211_VHTCAP_VHT_TXOP_PS 0x00200000 +#define IEEE80211_VHTCAP_VHT_TXOP_PS_S 21 #define IEEE80211_VHTCAP_HTC_VHT 0x00400000 +#define IEEE80211_VHTCAP_HTC_VHT_S 22 + #define IEEE80211_VHTCAP_MAX_A_MPDU_LENGTH_EXPONENT_SHIFT 23 #define IEEE80211_VHTCAP_MAX_A_MPDU_LENGTH_EXPONENT_MASK \ (7 << IEEE80211_VHTCAP_MAX_A_MPDU_LENGTH_EXPONENT_SHIFT) +#define IEEE80211_VHTCAP_MAX_A_MPDU_LENGTH_EXPONENT_MASK_S 23 + +#define IEEE80211_VHTCAP_VHT_LINK_ADAPTATION_VHT_MASK 0x0c000000 #define IEEE80211_VHTCAP_VHT_LINK_ADAPTATION_VHT_UNSOL_MFB 0x08000000 #define IEEE80211_VHTCAP_VHT_LINK_ADAPTATION_VHT_MRQ_MFB 0x0c000000 +#define IEEE80211_VHTCAP_VHT_LINK_ADAPTATION_VHT_MASK_S 26 + #define IEEE80211_VHTCAP_RX_ANTENNA_PATTERN 0x10000000 +#define IEEE80211_VHTCAP_RX_ANTENNA_PATTERN_S 28 #define IEEE80211_VHTCAP_TX_ANTENNA_PATTERN 0x20000000 +#define IEEE80211_VHTCAP_TX_ANTENNA_PATTERN_S 29 /* * XXX TODO: add the rest of the bits From owner-svn-src-head@freebsd.org Tue Jan 10 05:37:54 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id BB61ACA8E39; Tue, 10 Jan 2017 05:37:54 +0000 (UTC) (envelope-from ler@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 880C61EF1; Tue, 10 Jan 2017 05:37:54 +0000 (UTC) (envelope-from ler@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v0A5briv099102; Tue, 10 Jan 2017 05:37:53 GMT (envelope-from ler@FreeBSD.org) Received: (from ler@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v0A5brp5099101; Tue, 10 Jan 2017 05:37:53 GMT (envelope-from ler@FreeBSD.org) Message-Id: <201701100537.v0A5brp5099101@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ler set sender to ler@FreeBSD.org using -f From: Larry Rosenman Date: Tue, 10 Jan 2017 05:37:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r311859 - head/usr.bin/calendar/calendars X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 10 Jan 2017 05:37:54 -0000 Author: ler (ports committer) Date: Tue Jan 10 05:37:53 2017 New Revision: 311859 URL: https://svnweb.freebsd.org/changeset/base/311859 Log: Add my birthday to calendar.freebsd Approved by: adamw (Mentor) Differential Revision: https://reviews.freebsd.org/D9119 Modified: head/usr.bin/calendar/calendars/calendar.freebsd Modified: head/usr.bin/calendar/calendars/calendar.freebsd ============================================================================== --- head/usr.bin/calendar/calendars/calendar.freebsd Tue Jan 10 05:33:34 2017 (r311858) +++ head/usr.bin/calendar/calendars/calendar.freebsd Tue Jan 10 05:37:53 2017 (r311859) @@ -310,6 +310,7 @@ 09/20 Kevin Lo born in Taipei, Taiwan, Republic of China, 1972 09/21 Gleb Kurtsou born in Minsk, Belarus, 1984 09/22 Bryan Drewery born in San Diego, California, United States, 1984 +09/24 Larry Rosenman born in Queens, New York, United States, 1957 09/27 Neil Blakey-Milner born in Port Elizabeth, South Africa, 1978 09/27 Renato Botelho born in Araras, Sao Paulo, Brazil, 1979 09/28 Greg Lehey born in Melbourne, Victoria, Australia, 1948 From owner-svn-src-head@freebsd.org Tue Jan 10 07:21:08 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9E5D8CA8A03; Tue, 10 Jan 2017 07:21:08 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5114E19BC; Tue, 10 Jan 2017 07:21:08 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v0A7L7fE039128; Tue, 10 Jan 2017 07:21:07 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v0A7L7ip039127; Tue, 10 Jan 2017 07:21:07 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201701100721.v0A7L7ip039127@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Tue, 10 Jan 2017 07:21:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r311860 - head/sys/net80211 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 10 Jan 2017 07:21:08 -0000 Author: adrian Date: Tue Jan 10 07:21:07 2017 New Revision: 311860 URL: https://svnweb.freebsd.org/changeset/base/311860 Log: [net80211] add VHT action frame placeholders for when it's time to implement. Modified: head/sys/net80211/ieee80211_vht.c Modified: head/sys/net80211/ieee80211_vht.c ============================================================================== --- head/sys/net80211/ieee80211_vht.c Tue Jan 10 05:37:53 2017 (r311859) +++ head/sys/net80211/ieee80211_vht.c Tue Jan 10 07:21:07 2017 (r311860) @@ -85,9 +85,49 @@ __FBSDID("$FreeBSD$"); * Look at mac80211/vht.c:ieee80211_vht_handle_opmode() for further details. */ +static int +vht_recv_action_placeholder(struct ieee80211_node *ni, + const struct ieee80211_frame *wh, + const uint8_t *frm, const uint8_t *efrm) +{ + + ieee80211_note(ni->ni_vap, "%s: called; fc=0x%.2x/0x%.2x", + __func__, + wh->i_fc[0], + wh->i_fc[1]); + + return (0); +} + +static int +vht_send_action_placeholder(struct ieee80211_node *ni, + int category, int action, void *arg0) +{ + + ieee80211_note(ni->ni_vap, "%s: called; category=%d, action=%d", + __func__, + category, + action); + return (EINVAL); +} + static void ieee80211_vht_init(void) { + + ieee80211_recv_action_register(IEEE80211_ACTION_CAT_VHT, + WLAN_ACTION_VHT_COMPRESSED_BF, vht_recv_action_placeholder); + ieee80211_recv_action_register(IEEE80211_ACTION_CAT_VHT, + WLAN_ACTION_VHT_GROUPID_MGMT, vht_recv_action_placeholder); + ieee80211_recv_action_register(IEEE80211_ACTION_CAT_VHT, + WLAN_ACTION_VHT_OPMODE_NOTIF, vht_recv_action_placeholder); + + ieee80211_send_action_register(IEEE80211_ACTION_CAT_VHT, + WLAN_ACTION_VHT_COMPRESSED_BF, vht_send_action_placeholder); + ieee80211_send_action_register(IEEE80211_ACTION_CAT_VHT, + WLAN_ACTION_VHT_GROUPID_MGMT, vht_send_action_placeholder); + ieee80211_send_action_register(IEEE80211_ACTION_CAT_VHT, + WLAN_ACTION_VHT_OPMODE_NOTIF, vht_send_action_placeholder); } SYSINIT(wlan_vht, SI_SUB_DRIVERS, SI_ORDER_FIRST, ieee80211_vht_init, NULL); From owner-svn-src-head@freebsd.org Tue Jan 10 07:24:30 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3F69CCA8BC8; Tue, 10 Jan 2017 07:24:30 +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 0EE661D77; Tue, 10 Jan 2017 07:24:29 +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 v0A7OTe9042969; Tue, 10 Jan 2017 07:24:29 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v0A7OTQB042968; Tue, 10 Jan 2017 07:24:29 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201701100724.v0A7OTQB042968@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Tue, 10 Jan 2017 07:24:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r311861 - head/sys/net80211 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 10 Jan 2017 07:24:30 -0000 Author: adrian Date: Tue Jan 10 07:24:29 2017 New Revision: 311861 URL: https://svnweb.freebsd.org/changeset/base/311861 Log: [net80211] Add default parameters for 11ac. I doubt TDMA code will ever work for 11ac, but you never know, someone may one day make it happen. Modified: head/sys/net80211/ieee80211_tdma.c Modified: head/sys/net80211/ieee80211_tdma.c ============================================================================== --- head/sys/net80211/ieee80211_tdma.c Tue Jan 10 07:21:07 2017 (r311860) +++ head/sys/net80211/ieee80211_tdma.c Tue Jan 10 07:24:29 2017 (r311861) @@ -176,6 +176,8 @@ ieee80211_tdma_vattach(struct ieee80211v settxparms(vap, IEEE80211_MODE_11NG, TDMA_TXRATE_11NG_DEFAULT); settxparms(vap, IEEE80211_MODE_HALF, TDMA_TXRATE_HALF_DEFAULT); settxparms(vap, IEEE80211_MODE_QUARTER, TDMA_TXRATE_QUARTER_DEFAULT); + settxparms(vap, IEEE80211_MODE_VHT_2GHZ, TDMA_TXRATE_11NG_DEFAULT); + settxparms(vap, IEEE80211_MODE_VHT_5GHZ, TDMA_TXRATE_11NA_DEFAULT); setackpolicy(vap->iv_ic, 1); /* disable ACK's */ From owner-svn-src-head@freebsd.org Tue Jan 10 07:50:22 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 487DBCA923A; Tue, 10 Jan 2017 07:50:22 +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 0AACA17E0; Tue, 10 Jan 2017 07:50:21 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v0A7oLWL051093; Tue, 10 Jan 2017 07:50:21 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v0A7oL4J051092; Tue, 10 Jan 2017 07:50:21 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201701100750.v0A7oL4J051092@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Tue, 10 Jan 2017 07:50:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r311862 - head/sys/net80211 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 10 Jan 2017 07:50:22 -0000 Author: adrian Date: Tue Jan 10 07:50:21 2017 New Revision: 311862 URL: https://svnweb.freebsd.org/changeset/base/311862 Log: [net80211] add VHT mediatype initialisation and update helper functions. Modified: head/sys/net80211/ieee80211.c Modified: head/sys/net80211/ieee80211.c ============================================================================== --- head/sys/net80211/ieee80211.c Tue Jan 10 07:24:29 2017 (r311861) +++ head/sys/net80211/ieee80211.c Tue Jan 10 07:50:21 2017 (r311862) @@ -70,6 +70,8 @@ const char *ieee80211_phymode_name[IEEE8 [IEEE80211_MODE_QUARTER] = "quarter", [IEEE80211_MODE_11NA] = "11na", [IEEE80211_MODE_11NG] = "11ng", + [IEEE80211_MODE_VHT_2GHZ] = "11acg", + [IEEE80211_MODE_VHT_5GHZ] = "11ac", }; /* map ieee80211_opmode to the corresponding capability bit */ const int ieee80211_opcap[IEEE80211_OPMODE_MAX] = { @@ -181,6 +183,10 @@ ieee80211_chan_init(struct ieee80211com setbit(ic->ic_modecaps, IEEE80211_MODE_11NA); if (IEEE80211_IS_CHAN_HTG(c)) setbit(ic->ic_modecaps, IEEE80211_MODE_11NG); + if (IEEE80211_IS_CHAN_VHTA(c)) + setbit(ic->ic_modecaps, IEEE80211_MODE_VHT_5GHZ); + if (IEEE80211_IS_CHAN_VHTG(c)) + setbit(ic->ic_modecaps, IEEE80211_MODE_VHT_2GHZ); } /* initialize candidate channels to all available */ memcpy(ic->ic_chan_active, ic->ic_chan_avail, @@ -208,6 +214,8 @@ ieee80211_chan_init(struct ieee80211com DEFAULTRATES(IEEE80211_MODE_QUARTER, ieee80211_rateset_quarter); DEFAULTRATES(IEEE80211_MODE_11NA, ieee80211_rateset_11a); DEFAULTRATES(IEEE80211_MODE_11NG, ieee80211_rateset_11g); + DEFAULTRATES(IEEE80211_MODE_VHT_2GHZ, ieee80211_rateset_11g); + DEFAULTRATES(IEEE80211_MODE_VHT_5GHZ, ieee80211_rateset_11a); /* * Setup required information to fill the mcsset field, if driver did @@ -1492,6 +1500,8 @@ addmedia(struct ifmedia *media, int caps [IEEE80211_MODE_QUARTER] = IFM_IEEE80211_11A, /* XXX */ [IEEE80211_MODE_11NA] = IFM_IEEE80211_11NA, [IEEE80211_MODE_11NG] = IFM_IEEE80211_11NG, + [IEEE80211_MODE_VHT_2GHZ] = IFM_IEEE80211_VHT2G, + [IEEE80211_MODE_VHT_5GHZ] = IFM_IEEE80211_VHT5G, }; u_int mopt; @@ -1604,6 +1614,19 @@ ieee80211_media_setup(struct ieee80211co if (rate > maxrate) maxrate = rate; } + + /* + * Add VHT media. + */ + for (; mode <= IEEE80211_MODE_VHT_5GHZ; mode++) { + if (isclr(ic->ic_modecaps, mode)) + continue; + addmedia(media, caps, addsta, mode, IFM_AUTO); + addmedia(media, caps, addsta, mode, IFM_IEEE80211_VHT); + + /* XXX TODO: VHT maxrate */ + } + return maxrate; } @@ -1883,7 +1906,11 @@ enum ieee80211_phymode ieee80211_chan2mode(const struct ieee80211_channel *chan) { - if (IEEE80211_IS_CHAN_HTA(chan)) + if (IEEE80211_IS_CHAN_VHT_2GHZ(chan)) + return IEEE80211_MODE_VHT_2GHZ; + else if (IEEE80211_IS_CHAN_VHT_5GHZ(chan)) + return IEEE80211_MODE_VHT_5GHZ; + else if (IEEE80211_IS_CHAN_HTA(chan)) return IEEE80211_MODE_11NA; else if (IEEE80211_IS_CHAN_HTG(chan)) return IEEE80211_MODE_11NG; From owner-svn-src-head@freebsd.org Tue Jan 10 07:56:58 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C8D43CA9468; Tue, 10 Jan 2017 07:56:58 +0000 (UTC) (envelope-from delphij@delphij.net) Received: from anubis.delphij.net (anubis.delphij.net [IPv6:2001:470:1:117::25]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "anubis.delphij.net", Issuer "StartCom Class 1 DV Server CA" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id AAED31C9B; Tue, 10 Jan 2017 07:56:58 +0000 (UTC) (envelope-from delphij@delphij.net) Received: from Xins-MBP.ut.rhv.delphij.net (unknown [IPv6:2601:646:8882:752a:e0b9:c9ec:8d0c:8aeb]) (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 4D67F1C3F1; Mon, 9 Jan 2017 23:56:58 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=delphij.net; s=anubis; t=1484035018; x=1484049418; bh=j8nOq8/Tab3liniIlW+0kkocCMB3foWzwhjQx9DBaX0=; h=Subject:To:References:Cc:From:Date:In-Reply-To; b=XL4u0/9aRxnF8wd5nJEeL1imMCTdaC5VdbGy2pi0Wv9LDX8RNXTi/cffiX39zyjtp FnIrRR3ee66D+dQTLXLvWc6BinjnjZwSq0H8oxtodzc2YqzOz83R1upzNF6gwrukOX 0ckpBYBOun5qMCvi4IpanNTW+A5THIT891m/CXwM= Subject: Re: svn commit: r311585 - in head: crypto/openssh secure/usr.sbin/sshd To: Ngie Cooper , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201701070808.v0788aEi064973@repo.freebsd.org> Cc: d@delphij.net, des@freebsd.org From: Xin Li Message-ID: Date: Mon, 9 Jan 2017 23:56:57 -0800 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:45.0) Gecko/20100101 Thunderbird/45.6.0 MIME-Version: 1.0 In-Reply-To: <201701070808.v0788aEi064973@repo.freebsd.org> Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="LlFPvvv0bgv2COB0vIOLCNP8IjPOkfqDX" X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 10 Jan 2017 07:56:58 -0000 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --LlFPvvv0bgv2COB0vIOLCNP8IjPOkfqDX Content-Type: multipart/mixed; boundary="A36V9bNgWLMlOjJTeLTQW4FSB7sDNGiEB"; protected-headers="v1" From: Xin Li To: Ngie Cooper , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Cc: d@delphij.net, des@freebsd.org Message-ID: Subject: Re: svn commit: r311585 - in head: crypto/openssh secure/usr.sbin/sshd References: <201701070808.v0788aEi064973@repo.freebsd.org> In-Reply-To: <201701070808.v0788aEi064973@repo.freebsd.org> --A36V9bNgWLMlOjJTeLTQW4FSB7sDNGiEB Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 1/7/17 00:08, Ngie Cooper wrote: > Author: ngie > Date: Sat Jan 7 08:08:35 2017 > New Revision: 311585 > URL: https://svnweb.freebsd.org/changeset/base/311585 >=20 > Log: > Conditionalize building libwrap support into sshd > =20 > Only build libwrap support into sshd if MK_TCP_WRAPPERS !=3D no > =20 > This will unbreak the build if libwrap has been removed from the syst= em > =20 > MFC after: 2 weeks > PR: 210141 > Submitted by: kpect@protonmail.com > Differential Revision: D9049 I didn't see this approved by maintainer, did you ping him? [delphij@saturn] /usr/src> grep ssh MAINTAINERS openssh des Pre-commit review requested. (Not that the change itself is bad, though, but it's important to keep everyone on the same page). > Modified: > head/crypto/openssh/config.h > head/secure/usr.sbin/sshd/Makefile >=20 > Modified: head/crypto/openssh/config.h > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D > --- head/crypto/openssh/config.h Sat Jan 7 07:54:23 2017 (r311584) > +++ head/crypto/openssh/config.h Sat Jan 7 08:08:35 2017 (r311585) > @@ -1408,7 +1408,7 @@ > /* #undef LASTLOG_WRITE_PUTUTXLINE */ > =20 > /* Define if you want TCP Wrappers support */ > -#define LIBWRAP 1 > +/* #undef LIBWRAP */ > =20 > /* Define to whatever link() returns for "not supported" if it doesn't= return > EOPNOTSUPP. */ >=20 > Modified: head/secure/usr.sbin/sshd/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/secure/usr.sbin/sshd/Makefile Sat Jan 7 07:54:23 2017 (r31158= 4) > +++ head/secure/usr.sbin/sshd/Makefile Sat Jan 7 08:08:35 2017 (r31158= 5) > @@ -27,7 +27,7 @@ CFLAGS+=3D-I${SSHDIR} -include ssh_namespa > SRCS+=3D ssh_namespace.h > =20 > # pam should always happen before ssh here for static linking > -LIBADD=3D pam ssh util wrap > +LIBADD=3D pam ssh util > =20 > .if ${MK_LDNS} !=3D "no" > CFLAGS+=3D -DHAVE_LDNS=3D1 > @@ -53,6 +53,11 @@ SRCS+=3D krb5_config.h > LIBADD+=3D gssapi_krb5 gssapi krb5 > .endif > =20 > +.if ${MK_TCP_WRAPPERS} !=3D "no" > +CFLAGS+=3D -DLIBWRAP > +LIBADD+=3D wrap > +.endif > + > LIBADD+=3D crypto > =20 > .if defined(LOCALBASE) >=20 --A36V9bNgWLMlOjJTeLTQW4FSB7sDNGiEB-- --LlFPvvv0bgv2COB0vIOLCNP8IjPOkfqDX Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- iQIcBAEBCgAGBQJYdJPJAAoJEJW2GBstM+nsJcIP/0aKl6wpYN7XQDfqY6N5fAhP nRGFmBtLlLid4DXX684FlQYTO5aIQhM4W+2X/lcJ8lktI/f2rr3/T4uRUYVgUo5/ eLt28vphZSRtVWKqaJes4RvubFK3JTqDpygmQ0ZDzr645MacCh3tsIjnvGsdPHq+ 9EBCbUrIadXjgEjNJ6yngZneRellxwAVAmw8T4TI+BATjraKimuaEgl7TkVSuA+4 jAfid0onhxbdxoY46x27MMGCqxHZO/PKwhEubxSHfpuJ1sexxfGamKD6Gy8nC82L /s6aQmmpz2e17CovHVJD2JoU2RBOMIWErxedESDhXz5gxvGNnb86xW6+AL3wc9ew WmxiaQQrF7i8u0F/9OyXsyvctIAleGJ98/lRc6inrHTARlgmmDw48ZeIn5PtLW72 IXubwqfKcbUObUpb/44dYtvvHbCiKTrNBtsgBBXfRYh8mK50LEB1aJlA/h4rCA5h iu734p3e79hMABXM+9ywadhLBgHGZGGZ0fhwArok7axCEuuimITa/RCnzGlGLRnD thVRbrPMTppW0LeFMZsUJKyfVpN94ZivKpEFR77ux+cIUxvEAC7oVUcbVBimtYxA qdE87+Dr+h/y0BrdhBAznMxzyL8hozTlTsVJMfbDO/xsFs/zoGBLUVF3CY4nwvkE EbQVGJYeVcnfu5AyiqXC =Ffbq -----END PGP SIGNATURE----- --LlFPvvv0bgv2COB0vIOLCNP8IjPOkfqDX-- From owner-svn-src-head@freebsd.org Tue Jan 10 07:58:58 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 00374CA9509; Tue, 10 Jan 2017 07:58:58 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: from mail-pf0-x231.google.com (mail-pf0-x231.google.com [IPv6:2607:f8b0:400e:c00::231]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id C1F531E2A; Tue, 10 Jan 2017 07:58:57 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: by mail-pf0-x231.google.com with SMTP id y143so22391855pfb.0; Mon, 09 Jan 2017 23:58:57 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:message-id:mime-version:subject:date:in-reply-to:cc:to :references; bh=/BJqKDsd9x9nKubbGuyrHeQlKQVzFGgnxPpExF4ohzU=; b=CpF8EOBEjf+a1nzIfQwTV15OD9FnvEq5Ol9OGdc1RkKdG4+1UbMrDFb0KzlRdQRuim h4O+iadfTf0u1hVrLt52tHMFzS9gZfWvGVCj3Tbfrm6gHpnsIIX672Vrna1Ilrw5fHnE zMxX0GZ9ODlbt9lINrGRX0SF0AgkwCjnCtt2mxHG24OM4A2sQ+s1gWrCDsPEqSsAnr4w neJCNQJV1VGrGAq7lvluVbwbBg1S6QaDZVrtW6VI/Xm2kDMEA4SyLusgogx86gOpN+cX h9keqE+najs7ai5CLcqaMZqFVYv47NaJ1N78N3YOn5im2recCZgSiXGKPan+/fF0tymu GGUg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:message-id:mime-version:subject:date :in-reply-to:cc:to:references; bh=/BJqKDsd9x9nKubbGuyrHeQlKQVzFGgnxPpExF4ohzU=; b=EfXYsWPxRF68tYFvzowliJgXY5YityVAPmFNozrcuw1vgsFzY+r7uxHKf4F/goJZat 5vAkcly6l2ENzdaW11S1pJawNRtIpvh9tO1+xGBOJIqfG1Mu3EAsOkQhWiyMVg0yxQog tSMn7daxR7eCdjYyGw3S300L1XCoFxnH6LOCke2Qa6620NVDiJRUyJiPRl+Rv0tDsTsG 22yxuE3PMkALP0SnXrxdMM+94JmNqjbzjLKyNMGON+Yd6uRblNiBEjNeMBavT+L5SW8T uViCzFNerWn+IXv7QhaNE4ZWOc4TssfgX+kzXvNNVhCgg7UmrkM7BYavB426GlfYb8cJ KweQ== X-Gm-Message-State: AIkVDXJUeuTvf2UJGvr4FdhzXHepWjaICdbTWP/ADA/O1VqE2ZkK7tlHxfgaZXx9QeTCUQ== X-Received: by 10.84.204.8 with SMTP id a8mr3101161ple.172.1484035137388; Mon, 09 Jan 2017 23:58:57 -0800 (PST) Received: from fuji-wireless.local (c-73-19-52-228.hsd1.wa.comcast.net. [73.19.52.228]) by smtp.gmail.com with ESMTPSA id n84sm2971684pfk.25.2017.01.09.23.58.56 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 09 Jan 2017 23:58:56 -0800 (PST) From: "Ngie Cooper (yaneurabeya)" Message-Id: <18D51B59-6985-49FA-83E6-225B560053B5@gmail.com> Mime-Version: 1.0 (Mac OS X Mail 10.2 \(3259\)) Subject: Re: svn commit: r311585 - in head: crypto/openssh secure/usr.sbin/sshd Date: Mon, 9 Jan 2017 23:58:55 -0800 In-Reply-To: Cc: Ngie Cooper , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org, d@delphij.net, des@freebsd.org To: Xin Li References: <201701070808.v0788aEi064973@repo.freebsd.org> X-Mailer: Apple Mail (2.3259) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.23 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 10 Jan 2017 07:58:58 -0000 > On Jan 9, 2017, at 11:56 PM, Xin Li wrote: >=20 >=20 > On 1/7/17 00:08, Ngie Cooper wrote: >> Author: ngie >> Date: Sat Jan 7 08:08:35 2017 >> New Revision: 311585 >> URL: https://svnweb.freebsd.org/changeset/base/311585 >>=20 >> Log: >> Conditionalize building libwrap support into sshd >>=20 >> Only build libwrap support into sshd if MK_TCP_WRAPPERS !=3D no >>=20 >> This will unbreak the build if libwrap has been removed from the = system >>=20 >> MFC after: 2 weeks >> PR: 210141 >> Submitted by: kpect@protonmail.com >> Differential Revision: D9049 >=20 > I didn't see this approved by maintainer, did you ping him? >=20 > [delphij@saturn] /usr/src> grep ssh MAINTAINERS > openssh des Pre-commit review requested. >=20 > (Not that the change itself is bad, though, but it's important to keep > everyone on the same page). I waited 3 days for a reply on the review: = https://reviews.freebsd.org/D9049 . = Admittedly, it was a bit short of a timeout. -Ngie= From owner-svn-src-head@freebsd.org Tue Jan 10 10:12:37 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 90B4ECA8FB6; Tue, 10 Jan 2017 10:12:37 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 60DBB1E27; Tue, 10 Jan 2017 10:12:37 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v0AACaOE011817; Tue, 10 Jan 2017 10:12:36 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v0AACaUd011816; Tue, 10 Jan 2017 10:12:36 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201701101012.v0AACaUd011816@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Tue, 10 Jan 2017 10:12:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r311870 - head/contrib/netbsd-tests/lib/libc/gen X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 10 Jan 2017 10:12:37 -0000 Author: ngie Date: Tue Jan 10 10:12:36 2017 New Revision: 311870 URL: https://svnweb.freebsd.org/changeset/base/311870 Log: Merge the grammar fix for lib/libc/gen/raise_test:raise_stress MFC after: 3 days Modified: head/contrib/netbsd-tests/lib/libc/gen/t_raise.c Directory Properties: head/contrib/netbsd-tests/ (props changed) Modified: head/contrib/netbsd-tests/lib/libc/gen/t_raise.c ============================================================================== --- head/contrib/netbsd-tests/lib/libc/gen/t_raise.c Tue Jan 10 10:09:12 2017 (r311869) +++ head/contrib/netbsd-tests/lib/libc/gen/t_raise.c Tue Jan 10 10:12:36 2017 (r311870) @@ -1,4 +1,4 @@ -/* $NetBSD: t_raise.c,v 1.5 2011/05/10 12:43:42 jruoho Exp $ */ +/* $NetBSD: t_raise.c,v 1.6 2016/11/03 22:08:31 kamil Exp $ */ /*- * Copyright (c) 2011 The NetBSD Foundation, Inc. @@ -29,7 +29,7 @@ * POSSIBILITY OF SUCH DAMAGE. */ #include -__RCSID("$NetBSD: t_raise.c,v 1.5 2011/05/10 12:43:42 jruoho Exp $"); +__RCSID("$NetBSD: t_raise.c,v 1.6 2016/11/03 22:08:31 kamil Exp $"); #include @@ -180,7 +180,7 @@ ATF_TC_BODY(raise_stress, tc) (void)raise(SIGUSR1); if (count != maxiter) - atf_tc_fail("not all signals were catched"); + atf_tc_fail("not all signals were caught"); } ATF_TP_ADD_TCS(tp) From owner-svn-src-head@freebsd.org Tue Jan 10 10:17:00 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7DF7BCA915A; Tue, 10 Jan 2017 10:17:00 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4E09B10F0; Tue, 10 Jan 2017 10:17:00 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v0AAGx5q012048; Tue, 10 Jan 2017 10:16:59 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v0AAGxxI012047; Tue, 10 Jan 2017 10:16:59 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201701101016.v0AAGxxI012047@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Tue, 10 Jan 2017 10:16:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r311871 - head/contrib/netbsd-tests/lib/libc/ttyio X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 10 Jan 2017 10:17:00 -0000 Author: ngie Date: Tue Jan 10 10:16:59 2017 New Revision: 311871 URL: https://svnweb.freebsd.org/changeset/base/311871 Log: Merge ^/vendor/NetBSD/tests/dist@r311868 This is the vendor accepted version of ^/head@r311245 MFC after: 3 days Modified: head/contrib/netbsd-tests/lib/libc/ttyio/t_ttyio.c Directory Properties: head/contrib/netbsd-tests/ (props changed) Modified: head/contrib/netbsd-tests/lib/libc/ttyio/t_ttyio.c ============================================================================== --- head/contrib/netbsd-tests/lib/libc/ttyio/t_ttyio.c Tue Jan 10 10:12:36 2017 (r311870) +++ head/contrib/netbsd-tests/lib/libc/ttyio/t_ttyio.c Tue Jan 10 10:16:59 2017 (r311871) @@ -1,4 +1,4 @@ -/* $NetBSD: t_ttyio.c,v 1.2 2011/04/19 20:07:53 martin Exp $ */ +/* $NetBSD: t_ttyio.c,v 1.3 2017/01/10 01:31:40 christos Exp $ */ /* * Copyright (c) 2001, 2008 The NetBSD Foundation, Inc. @@ -32,7 +32,7 @@ #include __COPYRIGHT("@(#) Copyright (c) 2008\ The NetBSD Foundation, inc. All rights reserved."); -__RCSID("$NetBSD: t_ttyio.c,v 1.2 2011/04/19 20:07:53 martin Exp $"); +__RCSID("$NetBSD: t_ttyio.c,v 1.3 2017/01/10 01:31:40 christos Exp $"); #include #include @@ -150,11 +150,9 @@ ATF_TC_BODY(ioctl, tc) /* wait for last child */ sa.sa_handler = SIG_DFL; REQUIRE_ERRNO(sigaction(SIGCHLD, &sa, NULL), -1); - (void) wait(NULL); + (void)wait(NULL); -#ifdef __FreeBSD__ (void)close(s); -#endif ATF_REQUIRE_EQ(rc, 0); } From owner-svn-src-head@freebsd.org Tue Jan 10 10:20:46 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 19A79CA930D; Tue, 10 Jan 2017 10:20:46 +0000 (UTC) (envelope-from hps@selasky.org) Received: from mail.turbocat.net (turbocat.net [88.99.82.50]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D504715D1; Tue, 10 Jan 2017 10:20:45 +0000 (UTC) (envelope-from hps@selasky.org) Received: from hps2016.home.selasky.org (unknown [62.141.129.119]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.turbocat.net (Postfix) with ESMTPSA id D94F61FE1B5; Tue, 10 Jan 2017 11:20:15 +0100 (CET) Subject: Re: svn commit: r311707 - in head/sys/dev/rtwn: . usb To: Andriy Voskoboinyk References: <201701082341.v08NfH4O046808@repo.freebsd.org> <83881095-b47e-facb-6bbe-a79f8e54209d@selasky.org> Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org From: Hans Petter Selasky Message-ID: Date: Tue, 10 Jan 2017 11:20:05 +0100 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:45.0) Gecko/20100101 Thunderbird/45.4.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 10 Jan 2017 10:20:46 -0000 On 01/10/17 00:56, Andriy Voskoboinyk wrote: > Mon, 09 Jan 2017 10:08:13 +0200 було напиÑано Hans Petter Selasky > : > > Hi, > > The race should be fixed in r311838. > Perfect :-) --HPS From owner-svn-src-head@freebsd.org Tue Jan 10 10:27:10 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id AE6B9CA94FB; Tue, 10 Jan 2017 10:27:10 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 734401A78; Tue, 10 Jan 2017 10:27:10 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v0AAR9oH016164; Tue, 10 Jan 2017 10:27:09 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v0AAR9UI016163; Tue, 10 Jan 2017 10:27:09 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201701101027.v0AAR9UI016163@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Tue, 10 Jan 2017 10:27:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r311872 - head/contrib/netbsd-tests/lib/libc/stdio X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 10 Jan 2017 10:27:10 -0000 Author: ngie Date: Tue Jan 10 10:27:09 2017 New Revision: 311872 URL: https://svnweb.freebsd.org/changeset/base/311872 Log: Diff reduce with upstream by removing signal.h #include MFC after: 3 days Modified: head/contrib/netbsd-tests/lib/libc/stdio/t_printf.c Modified: head/contrib/netbsd-tests/lib/libc/stdio/t_printf.c ============================================================================== --- head/contrib/netbsd-tests/lib/libc/stdio/t_printf.c Tue Jan 10 10:16:59 2017 (r311871) +++ head/contrib/netbsd-tests/lib/libc/stdio/t_printf.c Tue Jan 10 10:27:09 2017 (r311872) @@ -36,10 +36,6 @@ #include #include -#ifndef __NetBSD__ -#include -#endif - ATF_TC(snprintf_c99); ATF_TC_HEAD(snprintf_c99, tc) { From owner-svn-src-head@freebsd.org Tue Jan 10 10:33:38 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 489A7CA9A28; Tue, 10 Jan 2017 10:33:38 +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 F26E812CD; Tue, 10 Jan 2017 10:33: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 v0AAXbpJ020129; Tue, 10 Jan 2017 10:33:37 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v0AAXb90020128; Tue, 10 Jan 2017 10:33:37 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201701101033.v0AAXb90020128@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Tue, 10 Jan 2017 10:33:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r311873 - 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-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 10 Jan 2017 10:33:38 -0000 Author: mav Date: Tue Jan 10 10:33:36 2017 New Revision: 311873 URL: https://svnweb.freebsd.org/changeset/base/311873 Log: Fix malloc(M_WAITOK) under mutex, introduced at r311787. MFC after: 13 days Modified: head/sys/cam/ctl/ctl.c Modified: head/sys/cam/ctl/ctl.c ============================================================================== --- head/sys/cam/ctl/ctl.c Tue Jan 10 10:27:09 2017 (r311872) +++ head/sys/cam/ctl/ctl.c Tue Jan 10 10:33:36 2017 (r311873) @@ -4593,6 +4593,8 @@ ctl_alloc_lun(struct ctl_softc *ctl_soft printf("ctl: requested LUN ID %d is already " "in use\n", be_lun->req_lun_id); } +fail: + free(lun->lun_devid, M_CTL); if (lun->flags & CTL_LUN_MALLOCED) free(lun, M_CTL); be_lun->lun_config_status(be_lun->be_lun, @@ -4605,14 +4607,11 @@ ctl_alloc_lun(struct ctl_softc *ctl_soft if (lun_number == -1) { mtx_unlock(&ctl_softc->ctl_lock); printf("ctl: can't allocate LUN, out of LUNs\n"); - if (lun->flags & CTL_LUN_MALLOCED) - free(lun, M_CTL); - be_lun->lun_config_status(be_lun->be_lun, - CTL_LUN_CONFIG_FAILURE); - return (ENOSPC); + goto fail; } } ctl_set_mask(ctl_softc->ctl_lun_mask, lun_number); + mtx_unlock(&ctl_softc->ctl_lock); mtx_init(&lun->lun_lock, "CTL LUN", NULL, MTX_DEF); lun->lun = lun_number; @@ -4664,22 +4663,6 @@ ctl_alloc_lun(struct ctl_softc *ctl_soft ctl_init_page_index(lun); ctl_init_log_page_index(lun); - /* - * Now, before we insert this lun on the lun list, set the lun - * inventory changed UA for all other luns. - */ - STAILQ_FOREACH(nlun, &ctl_softc->lun_list, links) { - mtx_lock(&nlun->lun_lock); - ctl_est_ua_all(nlun, -1, CTL_UA_LUN_CHANGE); - mtx_unlock(&nlun->lun_lock); - } - - STAILQ_INSERT_TAIL(&ctl_softc->lun_list, lun, links); - - ctl_softc->ctl_luns[lun_number] = lun; - - ctl_softc->num_luns++; - /* Setup statistics gathering */ #ifdef CTL_LEGACY_STATS lun->legacy_stats.device_type = be_lun->lun_type; @@ -4692,6 +4675,19 @@ ctl_alloc_lun(struct ctl_softc *ctl_soft #endif /* CTL_LEGACY_STATS */ lun->stats.item = lun_number; + /* + * Now, before we insert this lun on the lun list, set the lun + * inventory changed UA for all other luns. + */ + mtx_lock(&ctl_softc->ctl_lock); + STAILQ_FOREACH(nlun, &ctl_softc->lun_list, links) { + mtx_lock(&nlun->lun_lock); + ctl_est_ua_all(nlun, -1, CTL_UA_LUN_CHANGE); + mtx_unlock(&nlun->lun_lock); + } + STAILQ_INSERT_TAIL(&ctl_softc->lun_list, lun, links); + ctl_softc->ctl_luns[lun_number] = lun; + ctl_softc->num_luns++; mtx_unlock(&ctl_softc->ctl_lock); lun->be_lun->lun_config_status(lun->be_lun->be_lun, CTL_LUN_CONFIG_OK); From owner-svn-src-head@freebsd.org Tue Jan 10 10:56:34 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8BDB5CA8139; Tue, 10 Jan 2017 10:56:34 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4DCE41FBB; Tue, 10 Jan 2017 10:56:34 +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 v0AAuXSD028224; Tue, 10 Jan 2017 10:56:33 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v0AAuXb7028222; Tue, 10 Jan 2017 10:56:33 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <201701101056.v0AAuXb7028222@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Tue, 10 Jan 2017 10:56:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r311874 - in head/sys: conf dev/ahci X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 10 Jan 2017 10:56:34 -0000 Author: andrew Date: Tue Jan 10 10:56:33 2017 New Revision: 311874 URL: https://svnweb.freebsd.org/changeset/base/311874 Log: Add an ACPI attachment to the existing ahci_generic driver. This is used in some arm64 hardware, for example the AMD Opteron A1100. Reviewed by: mav Obtained from: ABT Systems Ltd Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D8852 Modified: head/sys/conf/files.arm64 head/sys/dev/ahci/ahci_generic.c Modified: head/sys/conf/files.arm64 ============================================================================== --- head/sys/conf/files.arm64 Tue Jan 10 10:33:36 2017 (r311873) +++ head/sys/conf/files.arm64 Tue Jan 10 10:56:33 2017 (r311874) @@ -145,7 +145,7 @@ armv8_crypto_wrap.o optional armv8crypt crypto/blowfish/bf_enc.c optional crypto | ipsec crypto/des/des_enc.c optional crypto | ipsec | netsmb dev/acpica/acpi_if.m optional acpi -dev/ahci/ahci_generic.c optional ahci fdt +dev/ahci/ahci_generic.c optional ahci dev/cpufreq/cpufreq_dt.c optional cpufreq fdt dev/hwpmc/hwpmc_arm64.c optional hwpmc dev/hwpmc/hwpmc_arm64_md.c optional hwpmc Modified: head/sys/dev/ahci/ahci_generic.c ============================================================================== --- head/sys/dev/ahci/ahci_generic.c Tue Jan 10 10:33:36 2017 (r311873) +++ head/sys/dev/ahci/ahci_generic.c Tue Jan 10 10:56:33 2017 (r311874) @@ -27,6 +27,9 @@ #include __FBSDID("$FreeBSD$"); +#include "opt_acpi.h" +#include "opt_platform.h" + #include #include #include @@ -44,6 +47,15 @@ __FBSDID("$FreeBSD$"); #include +#ifdef DEV_ACPI +#include +#include + +#include +#include +#endif + +#ifdef FDT #include #include @@ -54,14 +66,7 @@ static struct ofw_compat_data compat_dat }; static int -ahci_gen_ctlr_reset(device_t dev) -{ - - return ahci_ctlr_reset(dev); -} - -static int -ahci_probe(device_t dev) +ahci_fdt_probe(device_t dev) { if (!ofw_bus_status_okay(dev)) @@ -73,6 +78,34 @@ ahci_probe(device_t dev) device_set_desc_copy(dev, "AHCI SATA controller"); return (BUS_PROBE_DEFAULT); } +#endif + +#ifdef DEV_ACPI +static int +ahci_acpi_probe(device_t dev) +{ + ACPI_HANDLE h; + + if ((h = acpi_get_handle(dev)) == NULL) + return (ENXIO); + + if (pci_get_class(dev) == PCIC_STORAGE && + pci_get_subclass(dev) == PCIS_STORAGE_SATA && + pci_get_progif(dev) == PCIP_STORAGE_SATA_AHCI_1_0) { + device_set_desc_copy(dev, "AHCI SATA controller"); + return (BUS_PROBE_DEFAULT); + } + + return (ENXIO); +} +#endif + +static int +ahci_gen_ctlr_reset(device_t dev) +{ + + return ahci_ctlr_reset(dev); +} static int ahci_gen_attach(device_t dev) @@ -109,9 +142,34 @@ ahci_gen_detach(device_t dev) return (0); } -static devclass_t ahci_gen_devclass; -static device_method_t ahci_methods[] = { - DEVMETHOD(device_probe, ahci_probe), +#ifdef FDT +static devclass_t ahci_gen_fdt_devclass; +static device_method_t ahci_fdt_methods[] = { + DEVMETHOD(device_probe, ahci_fdt_probe), + DEVMETHOD(device_attach, ahci_gen_attach), + DEVMETHOD(device_detach, ahci_gen_detach), + DEVMETHOD(bus_print_child, ahci_print_child), + DEVMETHOD(bus_alloc_resource, ahci_alloc_resource), + DEVMETHOD(bus_release_resource, ahci_release_resource), + DEVMETHOD(bus_setup_intr, ahci_setup_intr), + DEVMETHOD(bus_teardown_intr,ahci_teardown_intr), + DEVMETHOD(bus_child_location_str, ahci_child_location_str), + DEVMETHOD(bus_get_dma_tag, ahci_get_dma_tag), + DEVMETHOD_END +}; +static driver_t ahci_fdt_driver = { + "ahci", + ahci_fdt_methods, + sizeof(struct ahci_controller) +}; +DRIVER_MODULE(ahci_fdt, simplebus, ahci_fdt_driver, ahci_gen_fdt_devclass, + NULL, NULL); +#endif + +#ifdef DEV_ACPI +static devclass_t ahci_gen_acpi_devclass; +static device_method_t ahci_acpi_methods[] = { + DEVMETHOD(device_probe, ahci_acpi_probe), DEVMETHOD(device_attach, ahci_gen_attach), DEVMETHOD(device_detach, ahci_gen_detach), DEVMETHOD(bus_print_child, ahci_print_child), @@ -123,9 +181,11 @@ static device_method_t ahci_methods[] = DEVMETHOD(bus_get_dma_tag, ahci_get_dma_tag), DEVMETHOD_END }; -static driver_t ahci_driver = { +static driver_t ahci_acpi_driver = { "ahci", - ahci_methods, + ahci_acpi_methods, sizeof(struct ahci_controller) }; -DRIVER_MODULE(ahci, simplebus, ahci_driver, ahci_gen_devclass, NULL, NULL); +DRIVER_MODULE(ahci_acpi, acpi, ahci_acpi_driver, ahci_gen_acpi_devclass, + NULL, NULL); +#endif From owner-svn-src-head@freebsd.org Tue Jan 10 13:36:34 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5838ACA9923; Tue, 10 Jan 2017 13:36:34 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 278731CD3; Tue, 10 Jan 2017 13:36:34 +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 v0ADaXNN093922; Tue, 10 Jan 2017 13:36:33 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v0ADaXIv093921; Tue, 10 Jan 2017 13:36:33 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <201701101336.v0ADaXIv093921@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Tue, 10 Jan 2017 13:36:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r311875 - head/sys/modules/ahci X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 10 Jan 2017 13:36:34 -0000 Author: andrew Date: Tue Jan 10 13:36:33 2017 New Revision: 311875 URL: https://svnweb.freebsd.org/changeset/base/311875 Log: Add acpi_if.h to SRCS so we have it when building ahci_generic.c with ACPI. Obtained from: ABT Systems Ltd Sponsored by: The FreeBSD Foundation Modified: head/sys/modules/ahci/Makefile Modified: head/sys/modules/ahci/Makefile ============================================================================== --- head/sys/modules/ahci/Makefile Tue Jan 10 10:56:33 2017 (r311874) +++ head/sys/modules/ahci/Makefile Tue Jan 10 13:36:33 2017 (r311875) @@ -6,7 +6,7 @@ KMOD= ahci SRCS= ahci.c ahci_pci.c ahciem.c ahci.h device_if.h bus_if.h pci_if.h opt_cam.h .if ${MACHINE_CPUARCH} == "aarch64" -SRCS+= ahci_generic.c ofw_bus_if.h +SRCS+= ahci_generic.c acpi_if.h ofw_bus_if.h .endif .include From owner-svn-src-head@freebsd.org Tue Jan 10 13:58:48 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E972BCA8035; Tue, 10 Jan 2017 13:58:48 +0000 (UTC) (envelope-from kamikaze@bsdforen.de) Received: from bsdforen.de (bsdforen.de [82.193.243.115]) by mx1.freebsd.org (Postfix) with ESMTP id B51B01952; Tue, 10 Jan 2017 13:58:48 +0000 (UTC) (envelope-from kamikaze@bsdforen.de) Received: from localhost (iz-aix-213a.HS-Karlsruhe.DE [193.196.64.213]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by bsdforen.de (Postfix) with ESMTPSA id 9784291233; Tue, 10 Jan 2017 14:58:39 +0100 (CET) Message-ID: <1484056720.86242.8.camel@bsdforen.de> Subject: Re: svn commit: r310025 - head/libexec/rtld-elf From: Dominic Fandrey To: Bryan Drewery , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Date: Tue, 10 Jan 2017 14:58:40 +0100 In-Reply-To: <201612131805.uBDI5EDm054866@repo.freebsd.org> References: <201612131805.uBDI5EDm054866@repo.freebsd.org> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.18.5.1 FreeBSD GNOME Team Port Mime-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 10 Jan 2017 13:58:49 -0000 On Tue, 2016-12-13 at 18:05 +0000, Bryan Drewery wrote: > Author: bdrewery > Date: Tue Dec 13 18:05:14 2016 > New Revision: 310025 > URL: https://svnweb.freebsd.org/changeset/base/310025 > > Log: >   Take write lock for rtld_bind before modifying obj_list in dl_iterate_phdr(). This commit causes a regression in C++, where an exception smashes the sigprocmask, causing all signal handling to fail. See: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=215826 Look at #2 for a demonstration. Regards kami -- A: Because it fouls the order in which people normally read text. Q: Why is top-posting such a bad thing? A: Top-posting. Q: What is the most annoying thing on usenet and in e-mail? From owner-svn-src-head@freebsd.org Tue Jan 10 14:40:31 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id DA8F1CA96E5; Tue, 10 Jan 2017 14:40:31 +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 780B71690; Tue, 10 Jan 2017 14:40:31 +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 v0AEeUAu018246; Tue, 10 Jan 2017 14:40:30 GMT (envelope-from bz@FreeBSD.org) Received: (from bz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v0AEeUBW018245; Tue, 10 Jan 2017 14:40:30 GMT (envelope-from bz@FreeBSD.org) Message-Id: <201701101440.v0AEeUBW018245@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bz set sender to bz@FreeBSD.org using -f From: "Bjoern A. Zeeb" Date: Tue, 10 Jan 2017 14:40:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r311876 - head/usr.sbin/crunch/crunchide X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 10 Jan 2017 14:40:32 -0000 Author: bz Date: Tue Jan 10 14:40:30 2017 New Revision: 311876 URL: https://svnweb.freebsd.org/changeset/base/311876 Log: Teach crunchide about EM_S390 to make bootstrapping from future releases easier unless someone will fix the PR properly. MFC after: 3 days PR: 215940 Modified: head/usr.sbin/crunch/crunchide/exec_elf32.c Modified: head/usr.sbin/crunch/crunchide/exec_elf32.c ============================================================================== --- head/usr.sbin/crunch/crunchide/exec_elf32.c Tue Jan 10 13:36:33 2017 (r311875) +++ head/usr.sbin/crunch/crunchide/exec_elf32.c Tue Jan 10 14:40:30 2017 (r311876) @@ -191,6 +191,7 @@ ELFNAMEEND(check)(int fd, const char *fn #define EM_RISCV 243 #endif case EM_RISCV: break; + case EM_S390: break; case EM_SPARCV9: break; case EM_X86_64: break; /* ELFDEFNNAME(MACHDEP_ID_CASES) */ From owner-svn-src-head@freebsd.org Tue Jan 10 16:25:40 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 864D5CA9516; Tue, 10 Jan 2017 16:25:40 +0000 (UTC) (envelope-from arybchik@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 55694112C; Tue, 10 Jan 2017 16:25:40 +0000 (UTC) (envelope-from arybchik@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v0AGPdpB063783; Tue, 10 Jan 2017 16:25:39 GMT (envelope-from arybchik@FreeBSD.org) Received: (from arybchik@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v0AGPdkW063782; Tue, 10 Jan 2017 16:25:39 GMT (envelope-from arybchik@FreeBSD.org) Message-Id: <201701101625.v0AGPdkW063782@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: arybchik set sender to arybchik@FreeBSD.org using -f From: Andrew Rybchenko Date: Tue, 10 Jan 2017 16:25:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r311877 - head/sys/dev/sfxge X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 10 Jan 2017 16:25:40 -0000 Author: arybchik Date: Tue Jan 10 16:25:39 2017 New Revision: 311877 URL: https://svnweb.freebsd.org/changeset/base/311877 Log: sfxge(4): avoid unnecessary mbuf data prefetch Unnecessary prefetch just loads HW prefetcher and displaces other cache entries (which could be really useful). If we parse mbuf for TSO early and use firmware-assisted TSO, we do not expect mbuf data access when we compose firmware-assisted TSO (v1 or v2) option descriptors. If packet header needs to be linearized or finally FATSO cannot be used because of, for example, too big header, we do not care about a bit more performance degradation because of prefetch absence (it is better to optimize more common case). Reviewed by: gnn Sponsored by: Solarflare Communications, Inc. MFC after: 2 days Differential Revision: https://reviews.freebsd.org/D9120 Modified: head/sys/dev/sfxge/sfxge_tx.c Modified: head/sys/dev/sfxge/sfxge_tx.c ============================================================================== --- head/sys/dev/sfxge/sfxge_tx.c Tue Jan 10 14:40:30 2017 (r311876) +++ head/sys/dev/sfxge/sfxge_tx.c Tue Jan 10 16:25:39 2017 (r311877) @@ -363,8 +363,22 @@ static int sfxge_tx_queue_mbuf(struct sf KASSERT(!txq->blocked, ("txq->blocked")); +#if SFXGE_TX_PARSE_EARLY + /* + * If software TSO is used, we still need to copy packet header, + * even if we have already parsed it early before enqueue. + */ + if ((mbuf->m_pkthdr.csum_flags & CSUM_TSO) && + (txq->tso_fw_assisted == 0)) + prefetch_read_many(mbuf->m_data); +#else + /* + * Prefetch packet header since we need to parse it and extract + * IP ID, TCP sequence number and flags. + */ if (mbuf->m_pkthdr.csum_flags & CSUM_TSO) prefetch_read_many(mbuf->m_data); +#endif if (__predict_false(txq->init_state != SFXGE_TXQ_STARTED)) { rc = EINTR; From owner-svn-src-head@freebsd.org Tue Jan 10 17:05:35 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E4528CA98FD; Tue, 10 Jan 2017 17:05:35 +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 B3B2D1D41; Tue, 10 Jan 2017 17:05:35 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v0AH5Y07079709; Tue, 10 Jan 2017 17:05:34 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v0AH5YbM079708; Tue, 10 Jan 2017 17:05:34 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201701101705.v0AH5YbM079708@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Tue, 10 Jan 2017 17:05:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r311879 - 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-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 10 Jan 2017 17:05:36 -0000 Author: kib Date: Tue Jan 10 17:05:34 2017 New Revision: 311879 URL: https://svnweb.freebsd.org/changeset/base/311879 Log: Use ANSI C definitions, update comment. Sponsored by: The FreeBSD Foundation MFC after: 1 week Modified: head/libexec/rtld-elf/rtld_lock.c Modified: head/libexec/rtld-elf/rtld_lock.c ============================================================================== --- head/libexec/rtld-elf/rtld_lock.c Tue Jan 10 16:30:56 2017 (r311878) +++ head/libexec/rtld-elf/rtld_lock.c Tue Jan 10 17:05:34 2017 (r311879) @@ -38,8 +38,8 @@ * In this algorithm the lock is a single word. Its low-order bit is * set when a writer holds the lock. The remaining high-order bits * contain a count of readers desiring the lock. The algorithm requires - * atomic "compare_and_store" and "add" operations, which we implement - * using assembly language sequences in "rtld_start.S". + * atomic "compare_and_store" and "add" operations, which we take + * from machine/atomic.h. */ #include @@ -67,7 +67,7 @@ static sigset_t fullsigmask, oldsigmask; static int thread_flag; static void * -def_lock_create() +def_lock_create(void) { void *base; char *p; @@ -269,7 +269,7 @@ lock_restart_for_upgrade(RtldLockState * } void -lockdflt_init() +lockdflt_init(void) { int i; From owner-svn-src-head@freebsd.org Tue Jan 10 17:23:39 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D20C4CA9F6A for ; Tue, 10 Jan 2017 17:23:39 +0000 (UTC) (envelope-from shawn.webb@hardenedbsd.org) Received: from mail-qk0-x232.google.com (mail-qk0-x232.google.com [IPv6:2607:f8b0:400d:c09::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 89B9A1837 for ; Tue, 10 Jan 2017 17:23:39 +0000 (UTC) (envelope-from shawn.webb@hardenedbsd.org) Received: by mail-qk0-x232.google.com with SMTP id a20so182453689qkc.1 for ; Tue, 10 Jan 2017 09:23:39 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=hardenedbsd-org.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=KBIV9LRzDgXih2u6Rq9FxkQWKd/XNh1z07OrKxB7/wk=; b=bh0RRVJ32F8gnjpK8dXWUyY4cNinxM+N0V/joO/FqXgIgxhzbqCW+tmFUdChCGLdhN +mxGPTgK7govEVo5SZrQ3WfbhdgqE1qxVbZQNQA5dbJ5LKd/MnBKarIkkLn2+OZB5Z2k bl1++HpM4rLgnbD+SL4ohv7elHylKEHVGDX2JB2frxfDhpaSFFTFX4ZHoZwTG1qiADwS t4UAvW54IT7uy94t5Wpv4b2ErrpeitQdWXPgz5JCLZjFxcpA9m7JXQtLaQ/G4ev/kzSY 9iwrc7Q9B9Uksp1vwhiRKXvOPkqhVnin7dXKORL7aFR/NX4LP8bAoKeX9BhZ9PzvZIE+ liog== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=KBIV9LRzDgXih2u6Rq9FxkQWKd/XNh1z07OrKxB7/wk=; b=R7zI8xnSoiYLwnSSUMbLJt6CdsLi3elW8LcTr1l21HP983rb1AnK6kr941ZxikXQ53 zvO03pmFBXfAahe03fZORi8ZrUUV69Zg9TDokAp7eE8oNg7Vs+20v9jQwur+hPkpX+xB ProL0rOQXdnWJvXyg6zi+aXJ3ZKdpyeg9spJ3s3jfdGaUmavSCHDXHmIIeAW9RNNbrDK j5IZVnNEvChUeidc3yhkcwccjoKaIkPJpIUm7BxcZI6z2ZAXYLDDt4JMauKSP6SX6hlu URLLiinwZysEvHB4ew5cA/4rEBaqpF+0JJ7gakkcEwQUz+mbZLbsSsCAN/j5jmbQKdk+ qG4A== X-Gm-Message-State: AIkVDXL+kC1YInn0EIBV+NqmTh3U7P4PdEvWnOmaRs1BfqQgaDWdpqrqrGsImwG+c4iNSaLc X-Received: by 10.55.38.200 with SMTP id m69mr4361022qkm.100.1484069018666; Tue, 10 Jan 2017 09:23:38 -0800 (PST) Received: from mutt-hardenedbsd ([63.88.83.66]) by smtp.gmail.com with ESMTPSA id d67sm1884223qkg.17.2017.01.10.09.23.37 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 10 Jan 2017 09:23:37 -0800 (PST) Date: Tue, 10 Jan 2017 12:23:36 -0500 From: Shawn Webb To: Adrian Chadd Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r311860 - head/sys/net80211 Message-ID: <20170110172336.phqcy57zszifujaj@mutt-hardenedbsd> References: <201701100721.v0A7L7ip039127@repo.freebsd.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="clqiuqvuihafj6vh" Content-Disposition: inline In-Reply-To: <201701100721.v0A7L7ip039127@repo.freebsd.org> X-Operating-System: FreeBSD mutt-hardenedbsd 12.0-CURRENT-HBSD FreeBSD 12.0-CURRENT-HBSD X-PGP-Key: http://pgp.mit.edu/pks/lookup?op=vindex&search=0x6A84658F52456EEE User-Agent: NeoMutt/20161126 (1.7.1) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 10 Jan 2017 17:23:39 -0000 --clqiuqvuihafj6vh Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Jan 10, 2017 at 07:21:07AM +0000, Adrian Chadd wrote: > Author: adrian > Date: Tue Jan 10 07:21:07 2017 > New Revision: 311860 > URL: https://svnweb.freebsd.org/changeset/base/311860 >=20 > Log: > [net80211] add VHT action frame placeholders for when it's time to impl= ement. >=20 > Modified: > head/sys/net80211/ieee80211_vht.c >=20 > Modified: head/sys/net80211/ieee80211_vht.c > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D > --- head/sys/net80211/ieee80211_vht.c Tue Jan 10 05:37:53 2017 (r311859) > +++ head/sys/net80211/ieee80211_vht.c Tue Jan 10 07:21:07 2017 (r311860) > @@ -85,9 +85,49 @@ __FBSDID("$FreeBSD$"); > * Look at mac80211/vht.c:ieee80211_vht_handle_opmode() for further deta= ils. > */ > =20 > +static int > +vht_recv_action_placeholder(struct ieee80211_node *ni, > + const struct ieee80211_frame *wh, > + const uint8_t *frm, const uint8_t *efrm) > +{ > + > + ieee80211_note(ni->ni_vap, "%s: called; fc=3D0x%.2x/0x%.2x", > + __func__, > + wh->i_fc[0], > + wh->i_fc[1]); > + > + return (0); > +} > + > +static int > +vht_send_action_placeholder(struct ieee80211_node *ni, > + int category, int action, void *arg0) > +{ > + > + ieee80211_note(ni->ni_vap, "%s: called; category=3D%d, action=3D%d", > + __func__, > + category, > + action); > + return (EINVAL); > +} > + This broke the build for kernel configurations that don't have the IEEE80211_DEBUG option set. ieee80211_note is only a valid function when IEEE80211_DEBUG is defined. Thanks, --=20 Shawn Webb Cofounder and Security Engineer HardenedBSD GPG Key ID: 0x6A84658F52456EEE GPG Key Fingerprint: 2ABA B6BD EF6A F486 BE89 3D9E 6A84 658F 5245 6EEE --clqiuqvuihafj6vh Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEEKrq2ve9q9Ia+iT2eaoRlj1JFbu4FAlh1GJgACgkQaoRlj1JF bu4kVA/8D5yu2GTLmnntoRnrZjc8GKFK8Jzoph6DakrCTdE1m2/pHv7E12tHtEN6 13Aj5J73qUZqRB70ukB2MSbbLnFNE017fFOu0gV8UIZbkopzTVx7hOzKbVt1BB2T z4mz2Fn2V3cvx9DqeKsluM0JOh94uddL63SaTZb6vlFCGPHWtXuZRfkU8Q4T7KlU 52IAwywTFls50idCdYnD1GIZ/hWAnhPhqCA0rdi5EE+BSq/+XrdSbDnyJQosXO+7 IhF0fnh+CuTXOBnzpsiX3EtMa+q3jJB76DGmiXe80qQ2Av78XwhDOYyQJdZx0EHC WOlqk4tlQ7TRDjY3WJXhWrCyZzWCyTdeBVuc1+Ujlw9OinOpHn7FH9aZ85EihjoZ 6qKNg8SRP+v0wugfd/W6wn5cu8BJgNzObbsMxEfXj+jDe9hu8KJYO8X+Ea7GjAvO fSEYZGmO2OfucLm/3pfmsaAe9zoaDCl+ZACq3grmRFC2AQhYsUIE6NPjuZXt1b1x IfFq2A8CUIniImp4c9IJur92wvr7bT+LPYYm44Z7JAaTTJWviuz6fb2RDBiHfnBF His7QrsA5jRAO3PMgkUveTZWPq9M0oTM+XuVmfR3G1hdFwzmvmjyJ3aRXfFv1Cwc z4jpwd2ryuF7YI7Rte6L38JqvIefhWWwNMctzFgH6up3ssxlV24= =7MVb -----END PGP SIGNATURE----- --clqiuqvuihafj6vh-- From owner-svn-src-head@freebsd.org Tue Jan 10 18:39:55 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 673B0CA877C; Tue, 10 Jan 2017 18:39:55 +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 1DF0F1330; Tue, 10 Jan 2017 18:39:55 +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 v0AIdsCj018855; Tue, 10 Jan 2017 18:39:54 GMT (envelope-from np@FreeBSD.org) Received: (from np@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v0AIdss9018853; Tue, 10 Jan 2017 18:39:54 GMT (envelope-from np@FreeBSD.org) Message-Id: <201701101839.v0AIdss9018853@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: np set sender to np@FreeBSD.org using -f From: Navdeep Parhar Date: Tue, 10 Jan 2017 18:39:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r311880 - in head/sys/dev: cxgb/ulp/iw_cxgb cxgbe/iw_cxgbe X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 10 Jan 2017 18:39:55 -0000 Author: np Date: Tue Jan 10 18:39:53 2017 New Revision: 311880 URL: https://svnweb.freebsd.org/changeset/base/311880 Log: The iw_cxgb and iw_cxgbe drivers should not use a FreeBSD device_t where a linuxkpi style device is expected. If OFED/linuxkpi actually starts using this field then we'll have to figure out whether to create fake devices for these drivers or have linuxkpi deal with NULL device. This mismatch was first reported as part of D6585. Modified: head/sys/dev/cxgb/ulp/iw_cxgb/iw_cxgb_provider.c head/sys/dev/cxgbe/iw_cxgbe/provider.c Modified: head/sys/dev/cxgb/ulp/iw_cxgb/iw_cxgb_provider.c ============================================================================== --- head/sys/dev/cxgb/ulp/iw_cxgb/iw_cxgb_provider.c Tue Jan 10 17:05:34 2017 (r311879) +++ head/sys/dev/cxgb/ulp/iw_cxgb/iw_cxgb_provider.c Tue Jan 10 18:39:53 2017 (r311880) @@ -1094,7 +1094,7 @@ int iwch_register_device(struct iwch_dev memcpy(dev->ibdev.node_desc, IWCH_NODE_DESC, sizeof(IWCH_NODE_DESC)); dev->ibdev.phys_port_cnt = sc->params.nports; dev->ibdev.num_comp_vectors = 1; - dev->ibdev.dma_device = dev->rdev.adap->dev; + dev->ibdev.dma_device = NULL; dev->ibdev.query_device = iwch_query_device; dev->ibdev.query_port = iwch_query_port; dev->ibdev.modify_port = iwch_modify_port; Modified: head/sys/dev/cxgbe/iw_cxgbe/provider.c ============================================================================== --- head/sys/dev/cxgbe/iw_cxgbe/provider.c Tue Jan 10 17:05:34 2017 (r311879) +++ head/sys/dev/cxgbe/iw_cxgbe/provider.c Tue Jan 10 18:39:53 2017 (r311880) @@ -429,7 +429,7 @@ c4iw_register_device(struct c4iw_dev *de strlcpy(ibdev->node_desc, C4IW_NODE_DESC, sizeof(ibdev->node_desc)); ibdev->phys_port_cnt = sc->params.nports; ibdev->num_comp_vectors = 1; - ibdev->dma_device = sc->dev; + ibdev->dma_device = NULL; ibdev->query_device = c4iw_query_device; ibdev->query_port = c4iw_query_port; ibdev->modify_port = c4iw_modify_port; From owner-svn-src-head@freebsd.org Tue Jan 10 18:46:41 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7CC28CA8BFA; Tue, 10 Jan 2017 18:46:41 +0000 (UTC) (envelope-from lwhsu@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4B4D21DEF; Tue, 10 Jan 2017 18:46:41 +0000 (UTC) (envelope-from lwhsu@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v0AIkere022684; Tue, 10 Jan 2017 18:46:40 GMT (envelope-from lwhsu@FreeBSD.org) Received: (from lwhsu@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v0AIkea4022683; Tue, 10 Jan 2017 18:46:40 GMT (envelope-from lwhsu@FreeBSD.org) Message-Id: <201701101846.v0AIkea4022683@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: lwhsu set sender to lwhsu@FreeBSD.org using -f From: Li-Wen Hsu Date: Tue, 10 Jan 2017 18:46:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r311881 - head/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-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 10 Jan 2017 18:46:41 -0000 Author: lwhsu (ports committer) Date: Tue Jan 10 18:46:40 2017 New Revision: 311881 URL: https://svnweb.freebsd.org/changeset/base/311881 Log: Replace using of objdump with elfdump In-tree objdump is too old to dump new ELF headers. But for example if we use: `make CROSS_TOOLCHAIN=riscv64-gcc TARGET_ARCH=riscv64` and do not specify CROSS_BINUTILS_PREFIX in env, embed_mfs.sh cannot find the correct objdump. This patch just replaces using of objdump with elfdump to collect needed information. Later we may also put an ELFDUMP in CROSSENV and use it in embed_mfs.sh . Reviewed by: emaste, br MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D9062 Modified: head/sys/tools/embed_mfs.sh Modified: head/sys/tools/embed_mfs.sh ============================================================================== --- head/sys/tools/embed_mfs.sh Tue Jan 10 18:39:53 2017 (r311880) +++ head/sys/tools/embed_mfs.sh Tue Jan 10 18:46:40 2017 (r311881) @@ -36,12 +36,12 @@ mfs_size=`stat -f '%z' $2 2> /dev/null` # If we can't determine MFS image size - bail. [ -z ${mfs_size} ] && echo "Can't determine MFS image size" && exit 1 -sec_info=`${CROSS_BINUTILS_PREFIX}objdump -h $1 2> /dev/null | grep " oldmfs "` +sec_info=`elfdump -c $1 2> /dev/null | grep -A 5 -E "sh_name: oldmfs$"` # If we can't find the mfs section within the given kernel - bail. [ -z "${sec_info}" ] && echo "Can't locate mfs section within kernel" && exit 1 -sec_size=`echo ${sec_info} | awk '{printf("%d", "0x" $3)}' 2> /dev/null` -sec_start=`echo ${sec_info} | awk '{printf("%d", "0x" $6)}' 2> /dev/null` +sec_size=`echo "${sec_info}" | awk '/sh_size/ {print $2}' 2> /dev/null` +sec_start=`echo "${sec_info}" | awk '/sh_offset/ {print $2}' 2> /dev/null` # If the mfs section size is smaller than the mfs image - bail. [ ${sec_size} -lt ${mfs_size} ] && echo "MFS image too large" && exit 1 From owner-svn-src-head@freebsd.org Tue Jan 10 19:26:56 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D883DCAA245; Tue, 10 Jan 2017 19:26:56 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B08B712AB; Tue, 10 Jan 2017 19:26:56 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v0AJQtlB040416; Tue, 10 Jan 2017 19:26:55 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v0AJQtND040415; Tue, 10 Jan 2017 19:26:55 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201701101926.v0AJQtND040415@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Tue, 10 Jan 2017 19:26:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r311886 - 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-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 10 Jan 2017 19:26:56 -0000 Author: kib Date: Tue Jan 10 19:26:55 2017 New Revision: 311886 URL: https://svnweb.freebsd.org/changeset/base/311886 Log: Fix acquisition of nested write compat rtld locks. Obtaining compat rtld lock in write mode sets process signal mask to block all signals. Previous mask is stored in the global variable oldsigmask. If a lock is write-locked while another lock is already write-locked, oldsigmask is overwritten by the total mask and on the last unlock, all signals except traps appear to be blocked. Fix this by counting the write-lock nested level, and only storing to oldsigmask/restoring from it at the outermost level. Masking signals disables involuntary preemption for libc_r, and there could be no voluntary context switches in the locked code (dl_iterate_phdr(3) keeps a lock around user callback, but it was added long after libc_r was renounced). Due to this, remembering the level in the global variable after the lock is obtained should be safe, because no two libc_r threads can acquire different write locks in parallel. PR: 215826 Reported by: kami Tested by: yamagi@yamagi.org (previous version) To be reviewed by: kan Sponsored by: The FreeBSD Foundation MFC after: 2 weeks Modified: head/libexec/rtld-elf/rtld_lock.c Modified: head/libexec/rtld-elf/rtld_lock.c ============================================================================== --- head/libexec/rtld-elf/rtld_lock.c Tue Jan 10 19:16:50 2017 (r311885) +++ head/libexec/rtld-elf/rtld_lock.c Tue Jan 10 19:26:55 2017 (r311886) @@ -64,7 +64,7 @@ typedef struct Struct_Lock { } Lock; static sigset_t fullsigmask, oldsigmask; -static int thread_flag; +static int thread_flag, wnested; static void * def_lock_create(void) @@ -117,29 +117,34 @@ def_rlock_acquire(void *lock) static void def_wlock_acquire(void *lock) { - Lock *l = (Lock *)lock; - sigset_t tmp_oldsigmask; + Lock *l; + sigset_t tmp_oldsigmask; - for ( ; ; ) { - sigprocmask(SIG_BLOCK, &fullsigmask, &tmp_oldsigmask); - if (atomic_cmpset_acq_int(&l->lock, 0, WAFLAG)) - break; - sigprocmask(SIG_SETMASK, &tmp_oldsigmask, NULL); - } - oldsigmask = tmp_oldsigmask; + l = (Lock *)lock; + for (;;) { + sigprocmask(SIG_BLOCK, &fullsigmask, &tmp_oldsigmask); + if (atomic_cmpset_acq_int(&l->lock, 0, WAFLAG)) + break; + sigprocmask(SIG_SETMASK, &tmp_oldsigmask, NULL); + } + if (atomic_fetchadd_int(&wnested, 1) == 0) + oldsigmask = tmp_oldsigmask; } static void def_lock_release(void *lock) { - Lock *l = (Lock *)lock; + Lock *l; - if ((l->lock & WAFLAG) == 0) - atomic_add_rel_int(&l->lock, -RC_INCR); - else { - atomic_add_rel_int(&l->lock, -WAFLAG); - sigprocmask(SIG_SETMASK, &oldsigmask, NULL); - } + l = (Lock *)lock; + if ((l->lock & WAFLAG) == 0) + atomic_add_rel_int(&l->lock, -RC_INCR); + else { + assert(wnested > 0); + atomic_add_rel_int(&l->lock, -WAFLAG); + if (atomic_fetchadd_int(&wnested, -1) == 1) + sigprocmask(SIG_SETMASK, &oldsigmask, NULL); + } } static int @@ -373,12 +378,12 @@ _rtld_atfork_pre(int *locks) return; /* - * Warning: this does not work with the rtld compat locks - * above, since the thread signal mask is corrupted (set to - * all signals blocked) if two locks are taken in write mode. - * The caller of the _rtld_atfork_pre() must provide the - * working implementation of the locks, and libthr locks are - * fine. + * Warning: this did not worked well with the rtld compat + * locks above, when the thread signal mask was corrupted (set + * to all signals blocked) if two locks were taken + * simultaneously in the write mode. The caller of the + * _rtld_atfork_pre() must provide the working implementation + * of the locks anyway, and libthr locks are fine. */ wlock_acquire(rtld_phdr_lock, &ls[0]); wlock_acquire(rtld_bind_lock, &ls[1]); From owner-svn-src-head@freebsd.org Tue Jan 10 19:28:41 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9B015CAA318; Tue, 10 Jan 2017 19:28:41 +0000 (UTC) (envelope-from pluknet@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6A63E1527; Tue, 10 Jan 2017 19:28:41 +0000 (UTC) (envelope-from pluknet@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v0AJSe4l040526; Tue, 10 Jan 2017 19:28:40 GMT (envelope-from pluknet@FreeBSD.org) Received: (from pluknet@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v0AJSeqN040525; Tue, 10 Jan 2017 19:28:40 GMT (envelope-from pluknet@FreeBSD.org) Message-Id: <201701101928.v0AJSeqN040525@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: pluknet set sender to pluknet@FreeBSD.org using -f From: Sergey Kandaurov Date: Tue, 10 Jan 2017 19:28:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r311887 - head/sys/net80211 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 10 Jan 2017 19:28:41 -0000 Author: pluknet Date: Tue Jan 10 19:28:40 2017 New Revision: 311887 URL: https://svnweb.freebsd.org/changeset/base/311887 Log: Fix build without IEEE80211_DEBUG. Reported by: many Modified: head/sys/net80211/ieee80211_vht.c Modified: head/sys/net80211/ieee80211_vht.c ============================================================================== --- head/sys/net80211/ieee80211_vht.c Tue Jan 10 19:26:55 2017 (r311886) +++ head/sys/net80211/ieee80211_vht.c Tue Jan 10 19:28:40 2017 (r311887) @@ -91,11 +91,12 @@ vht_recv_action_placeholder(struct ieee8 const uint8_t *frm, const uint8_t *efrm) { +#ifdef IEEE80211_DEBUG ieee80211_note(ni->ni_vap, "%s: called; fc=0x%.2x/0x%.2x", __func__, wh->i_fc[0], wh->i_fc[1]); - +#endif return (0); } @@ -104,10 +105,12 @@ vht_send_action_placeholder(struct ieee8 int category, int action, void *arg0) { +#ifdef IEEE80211_DEBUG ieee80211_note(ni->ni_vap, "%s: called; category=%d, action=%d", __func__, category, action); +#endif return (EINVAL); } From owner-svn-src-head@freebsd.org Tue Jan 10 20:08:22 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 580FECA997C; Tue, 10 Jan 2017 20:08:22 +0000 (UTC) (envelope-from gonzo@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2A0D814DA; Tue, 10 Jan 2017 20:08:22 +0000 (UTC) (envelope-from gonzo@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v0AK8LdN057020; Tue, 10 Jan 2017 20:08:21 GMT (envelope-from gonzo@FreeBSD.org) Received: (from gonzo@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v0AK8Lh8057019; Tue, 10 Jan 2017 20:08:21 GMT (envelope-from gonzo@FreeBSD.org) Message-Id: <201701102008.v0AK8Lh8057019@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gonzo set sender to gonzo@FreeBSD.org using -f From: Oleksandr Tymoshenko Date: Tue, 10 Jan 2017 20:08:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r311888 - head/sys/boot/efi/loader/arch/arm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 10 Jan 2017 20:08:22 -0000 Author: gonzo Date: Tue Jan 10 20:08:21 2017 New Revision: 311888 URL: https://svnweb.freebsd.org/changeset/base/311888 Log: [efi] Fix off-by-one error in ARM .bss zeroing code in loader's _start __bss_end should not be included in .bss zeroing code. Otherwise first 4 bytes of the section that follows .bss (in loader's case it's .sdata) are overwritten by zero. Reviewed by: andrew MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D9108 Modified: head/sys/boot/efi/loader/arch/arm/start.S Modified: head/sys/boot/efi/loader/arch/arm/start.S ============================================================================== --- head/sys/boot/efi/loader/arch/arm/start.S Tue Jan 10 19:28:40 2017 (r311887) +++ head/sys/boot/efi/loader/arch/arm/start.S Tue Jan 10 20:08:21 2017 (r311888) @@ -161,7 +161,7 @@ _start: mov r2, #0 1: cmp r0, r1 - bgt 2f + bge 2f str r2, [r0], #4 b 1b 2: From owner-svn-src-head@freebsd.org Tue Jan 10 20:12:08 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 826F4CA9D99; Tue, 10 Jan 2017 20:12:08 +0000 (UTC) (envelope-from gonzo@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 529431B6C; Tue, 10 Jan 2017 20:12:08 +0000 (UTC) (envelope-from gonzo@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v0AKC7MA059368; Tue, 10 Jan 2017 20:12:07 GMT (envelope-from gonzo@FreeBSD.org) Received: (from gonzo@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v0AKC7IP059367; Tue, 10 Jan 2017 20:12:07 GMT (envelope-from gonzo@FreeBSD.org) Message-Id: <201701102012.v0AKC7IP059367@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gonzo set sender to gonzo@FreeBSD.org using -f From: Oleksandr Tymoshenko Date: Tue, 10 Jan 2017 20:12:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r311890 - head/sys/boot/efi/loader/arch/arm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 10 Jan 2017 20:12:08 -0000 Author: gonzo Date: Tue Jan 10 20:12:07 2017 New Revision: 311890 URL: https://svnweb.freebsd.org/changeset/base/311890 Log: [efi] Fix .rel.data.* being erroneously merged into .data on ARM Fix section pattern code to exclude .rel.data.* sections from being merged into .data. Otherwise relocations in those sections are lost in final binary Reviewed by: andrew MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D9108 Modified: head/sys/boot/efi/loader/arch/arm/ldscript.arm Modified: head/sys/boot/efi/loader/arch/arm/ldscript.arm ============================================================================== --- head/sys/boot/efi/loader/arch/arm/ldscript.arm Tue Jan 10 20:09:35 2017 (r311889) +++ head/sys/boot/efi/loader/arch/arm/ldscript.arm Tue Jan 10 20:12:07 2017 (r311890) @@ -18,7 +18,7 @@ SECTIONS . = ALIGN(16); .data : { - *(.data *.data.*) + *(.data .data.*) *(.gnu.linkonce.d*) *(.rodata) *(.rodata.*) From owner-svn-src-head@freebsd.org Tue Jan 10 20:15:25 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7CCE8CA9EDD; Tue, 10 Jan 2017 20:15:25 +0000 (UTC) (envelope-from gonzo@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4BF791E21; Tue, 10 Jan 2017 20:15:25 +0000 (UTC) (envelope-from gonzo@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v0AKFOYQ060915; Tue, 10 Jan 2017 20:15:24 GMT (envelope-from gonzo@FreeBSD.org) Received: (from gonzo@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v0AKFOa3060914; Tue, 10 Jan 2017 20:15:24 GMT (envelope-from gonzo@FreeBSD.org) Message-Id: <201701102015.v0AKFOa3060914@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gonzo set sender to gonzo@FreeBSD.org using -f From: Oleksandr Tymoshenko Date: Tue, 10 Jan 2017 20:15:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r311891 - head/sys/boot/efi X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 10 Jan 2017 20:15:25 -0000 Author: gonzo Date: Tue Jan 10 20:15:24 2017 New Revision: 311891 URL: https://svnweb.freebsd.org/changeset/base/311891 Log: [efi] Build EFI bits with -fPIC on ARM clang 3.9.0 without -fPIC generates absolute jump table for switch/case statement which trips boot1.efi and loader.efi on ARM platform. Reviewed by: andrew MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D9108 Modified: head/sys/boot/efi/Makefile.inc Modified: head/sys/boot/efi/Makefile.inc ============================================================================== --- head/sys/boot/efi/Makefile.inc Tue Jan 10 20:12:07 2017 (r311890) +++ head/sys/boot/efi/Makefile.inc Tue Jan 10 20:15:24 2017 (r311891) @@ -23,4 +23,8 @@ CFLAGS+= -fshort-wchar CFLAGS+= -fPIC .endif +.if ${MACHINE_CPUARCH} == "arm" +CFLAGS+= -fPIC +.endif + .include "../Makefile.inc" From owner-svn-src-head@freebsd.org Tue Jan 10 20:16:18 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1F91ECA9F7D; Tue, 10 Jan 2017 20:16:18 +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 E44391FC6; Tue, 10 Jan 2017 20:16:17 +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 v0AKGHq6060992; Tue, 10 Jan 2017 20:16:17 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v0AKGHTv060991; Tue, 10 Jan 2017 20:16:17 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201701102016.v0AKGHTv060991@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Tue, 10 Jan 2017 20:16:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r311892 - 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-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 10 Jan 2017 20:16:18 -0000 Author: mav Date: Tue Jan 10 20:16:16 2017 New Revision: 311892 URL: https://svnweb.freebsd.org/changeset/base/311892 Log: Do not wait for HA thread shutdown if scheduler is stopped. This wait loop made system hang on panic instead of reboot. MFC after: 1 week Modified: head/sys/cam/ctl/ctl_ha.c Modified: head/sys/cam/ctl/ctl_ha.c ============================================================================== --- head/sys/cam/ctl/ctl_ha.c Tue Jan 10 20:15:24 2017 (r311891) +++ head/sys/cam/ctl/ctl_ha.c Tue Jan 10 20:16:16 2017 (r311892) @@ -1001,7 +1001,7 @@ ctl_ha_msg_shutdown(struct ctl_softc *ct softc->ha_shutdown = 1; softc->ha_wakeup = 1; wakeup(&softc->ha_wakeup); - while (softc->ha_shutdown < 2) { + while (softc->ha_shutdown < 2 && !SCHEDULER_STOPPED()) { msleep(&softc->ha_wakeup, &softc->ha_lock, 0, "shutdown", hz); } From owner-svn-src-head@freebsd.org Tue Jan 10 20:35:10 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5C51DCAAB4A; Tue, 10 Jan 2017 20:35:10 +0000 (UTC) (envelope-from asomers@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 395531DBD; Tue, 10 Jan 2017 20:35:10 +0000 (UTC) (envelope-from asomers@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v0AKZ9rc068995; Tue, 10 Jan 2017 20:35:09 GMT (envelope-from asomers@FreeBSD.org) Received: (from asomers@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v0AKZ9B7068992; Tue, 10 Jan 2017 20:35:09 GMT (envelope-from asomers@FreeBSD.org) Message-Id: <201701102035.v0AKZ9B7068992@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: asomers set sender to asomers@FreeBSD.org using -f From: Alan Somers Date: Tue, 10 Jan 2017 20:35:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r311893 - in head: . tests/sys/geom/class/gate X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 10 Jan 2017 20:35:10 -0000 Author: asomers Date: Tue Jan 10 20:35:09 2017 New Revision: 311893 URL: https://svnweb.freebsd.org/changeset/base/311893 Log: ATFify the geom gate tests. This ensures their cleanup routines will be run even if they should timeout. tests/sys/geom/class/gate/ggate_test.sh tests/sys/geom/class/gate/Makefile Add an ATF test with three testcases, one for each TAP test. Use ATF-style cleanup functions, and convert sleeps to polling loops. ObsoleteFiles.inc tests/sys/geom/class/gate/conf.sh tests/sys/geom/class/gate/1_test.sh tests/sys/geom/class/gate/2_test.sh tests/sys/geom/class/gate/3_test.sh Delete TAP test files Reviewed by: ngie MFC after: 4 weeks Sponsored by: Spectra Logic Corp Differential Revision: https://reviews.freebsd.org/D8891 Added: head/tests/sys/geom/class/gate/ggate_test.sh (contents, props changed) Deleted: head/tests/sys/geom/class/gate/1_test.sh head/tests/sys/geom/class/gate/2_test.sh head/tests/sys/geom/class/gate/3_test.sh head/tests/sys/geom/class/gate/conf.sh Modified: head/ObsoleteFiles.inc head/tests/sys/geom/class/gate/Makefile Modified: head/ObsoleteFiles.inc ============================================================================== --- head/ObsoleteFiles.inc Tue Jan 10 20:16:16 2017 (r311892) +++ head/ObsoleteFiles.inc Tue Jan 10 20:35:09 2017 (r311893) @@ -38,6 +38,11 @@ # xargs -n1 | sort | uniq -d; # done +# 20170110: Four files from ggate tests consolidated into one +OLD_FILES+=usr/tests/sys/geom/class/gate/1_test +OLD_FILES+=usr/tests/sys/geom/class/gate/2_test +OLD_FILES+=usr/tests/sys/geom/class/gate/3_test +OLD_FILES+=usr/tests/sys/geom/class/gate/conf.sh # 20170103: libbsnmptools.so made into an INTERNALLIB OLD_FILES+=usr/lib/libbsnmptools.a OLD_FILES+=usr/lib/libbsnmptools_p.a Modified: head/tests/sys/geom/class/gate/Makefile ============================================================================== --- head/tests/sys/geom/class/gate/Makefile Tue Jan 10 20:16:16 2017 (r311892) +++ head/tests/sys/geom/class/gate/Makefile Tue Jan 10 20:35:09 2017 (r311893) @@ -4,14 +4,6 @@ PACKAGE= tests TESTSDIR= ${TESTSBASE}/sys/geom/class/${.CURDIR:T} -TAP_TESTS_SH+= 1_test -TAP_TESTS_SH+= 2_test -TAP_TESTS_SH+= 3_test - -${PACKAGE}FILES+= conf.sh - -.for t in ${TAP_TESTS_SH} -TEST_METADATA.$t+= required_user="root" -.endfor +ATF_TESTS_SH+= ggate_test .include Added: head/tests/sys/geom/class/gate/ggate_test.sh ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tests/sys/geom/class/gate/ggate_test.sh Tue Jan 10 20:35:09 2017 (r311893) @@ -0,0 +1,193 @@ +# $FreeBSD$ + +PIDFILE=ggated.pid +PLAINFILES=plainfiles +PORT=33080 +CONF=gg.exports +RETRIES=16 + +atf_test_case ggated cleanup +ggated_head() +{ + atf_set "descr" "ggated can proxy geoms" + atf_set "require.progs" "ggatec ggated" + atf_set "require.user" "root" + atf_set "timeout" 60 +} + +ggated_body() +{ + us=$(alloc_ggate_dev) + work=$(alloc_md) + src=$(alloc_md) + + dd if=/dev/random of=/dev/$work bs=1m count=1 conv=notrunc + dd if=/dev/random of=/dev/$src bs=1m count=1 conv=notrunc + + echo $CONF >> $PLAINFILES + echo "127.0.0.1 RW /dev/$work" > $CONF + + atf_check ggated -p $PORT -F $PIDFILE $CONF + for try in `jot $RETRIES`; do + ggatec create -p $PORT -u $us 127.0.0.1 /dev/$work && break + # wait for ggated to be ready + sleep 0.25 + done + if [ "$try" -eq "$RETRIES" ]; then + atf_fail "ggatec create failed" + fi + + for try in `jot $RETRIES`; do + dd if=/dev/${src} of=/dev/ggate${us} bs=1m count=1 conv=notrunc\ + && break + # Wait for /dev/ggate${us} to be ready + sleep 0.25 + done + if [ "$try" -eq "$RETRIES" ]; then + atf_fail "dd failed; /dev/ggate${us} isn't working" + fi + + checksum /dev/$src /dev/$work +} + +ggated_cleanup() +{ + common_cleanup +} + +atf_test_case ggatel_file cleanup +ggatel_file_head() +{ + atf_set "descr" "ggatel can proxy files" + atf_set "require.progs" "ggatel" + atf_set "require.user" "root" + atf_set "timeout" 15 +} + +ggatel_file_body() +{ + us=$(alloc_ggate_dev) + + echo src work >> ${PLAINFILES} + dd if=/dev/random of=work bs=1m count=1 + dd if=/dev/random of=src bs=1m count=1 + + atf_check ggatel create -u $us work + + dd if=src of=/dev/ggate${us} bs=1m count=1 conv=notrunc + + checksum src work +} + +ggatel_file_cleanup() +{ + common_cleanup +} + +atf_test_case ggatel_md cleanup +ggatel_md_head() +{ + atf_set "descr" "ggatel can proxy files" + atf_set "require.progs" "ggatel" + atf_set "require.user" "root" + atf_set "timeout" 15 +} + +ggatel_md_body() +{ + us=$(alloc_ggate_dev) + work=$(alloc_md) + src=$(alloc_md) + + dd if=/dev/random of=$work bs=1m count=1 conv=notrunc + dd if=/dev/random of=$src bs=1m count=1 conv=notrunc + + atf_check ggatel create -u $us /dev/$work + + dd if=/dev/$src of=/dev/ggate${us} bs=1m count=1 conv=notrunc + + checksum /dev/$src /dev/$work +} + +ggatel_md_cleanup() +{ + common_cleanup +} + +atf_init_test_cases() +{ + atf_add_test_case ggated + atf_add_test_case ggatel_file + atf_add_test_case ggatel_md +} + +alloc_ggate_dev() +{ + local us + + us=0 + while [ -c /dev/ggate${us} ]; do + : $(( us += 1 )) + done + echo ${us} > ggate.devs + echo ${us} +} + +alloc_md() +{ + local md + + md=$(mdconfig -a -t malloc -s 1M) || \ + atf_fail "failed to allocate md device" + echo ${md} >> md.devs + echo ${md} +} + +checksum() +{ + local src work + src=$1 + work=$2 + + src_checksum=$(md5 -q $src) + work_checksum=$(md5 -q $work) + + if [ "$work_checksum" != "$src_checksum" ]; then + atf_fail "work md5 checksum didn't match" + fi + + ggate_checksum=$(md5 -q /dev/ggate${us}) + if [ "$ggate_checksum" != "$src_checksum" ]; then + atf_fail "ggate md5 checksum didn't match" + fi +} + +common_cleanup() +{ + if [ -f "ggate.devs" ]; then + while read test_ggate; do + ggatec destroy -f -u $test_ggate >/dev/null + done < ggate.devs + rm ggate.devs + fi + + if [ -f "$PIDFILE" ]; then + pkill -F "$PIDFILE" + rm $PIDFILE + fi + + if [ -f "PLAINFILES" ]; then + while read f; do + rm -f ${f} + done < ${PLAINFILES} + rm ${PLAINFILES} + fi + + if [ -f "md.devs" ]; then + while read test_md; do + mdconfig -d -u $test_md 2>/dev/null + done < md.devs + rm md.devs + fi + true +} From owner-svn-src-head@freebsd.org Tue Jan 10 20:37:46 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2A1CBCAAD2F; Tue, 10 Jan 2017 20:37:46 +0000 (UTC) (envelope-from asomers@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id EDE791F95; Tue, 10 Jan 2017 20:37:45 +0000 (UTC) (envelope-from asomers@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v0AKbjWQ069137; Tue, 10 Jan 2017 20:37:45 GMT (envelope-from asomers@FreeBSD.org) Received: (from asomers@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v0AKbj8f069136; Tue, 10 Jan 2017 20:37:45 GMT (envelope-from asomers@FreeBSD.org) Message-Id: <201701102037.v0AKbj8f069136@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: asomers set sender to asomers@FreeBSD.org using -f From: Alan Somers Date: Tue, 10 Jan 2017 20:37:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r311894 - head X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 10 Jan 2017 20:37:46 -0000 Author: asomers Date: Tue Jan 10 20:37:44 2017 New Revision: 311894 URL: https://svnweb.freebsd.org/changeset/base/311894 Log: Fix typo from change 310985 in ObsoleteFiles.inc MFC after: 16 days X-MFC-With: 310803 Sponsored by: Spectra Logic Corp Modified: head/ObsoleteFiles.inc Modified: head/ObsoleteFiles.inc ============================================================================== --- head/ObsoleteFiles.inc Tue Jan 10 20:35:09 2017 (r311893) +++ head/ObsoleteFiles.inc Tue Jan 10 20:37:44 2017 (r311894) @@ -53,8 +53,8 @@ OLD_FILES+=usr/share/man/man3/sysdecode_ # 20161230: libarchive ACL pax test renamed to test_acl_pax_posix1e.tar.uu OLD_FILES+=usr/tests/lib/libarchive/test_acl_pax.tar.uu # 20161229: Three files from gnop tests consolidated into one -OLD_FILES+=usr/tests/sys/geom/class/nop/1_test.sh -OLD_FILES+=usr/tests/sys/geom/class/nop/2_test.sh +OLD_FILES+=usr/tests/sys/geom/class/nop/1_test +OLD_FILES+=usr/tests/sys/geom/class/nop/2_test OLD_FILES+=usr/tests/sys/geom/class/nop/conf.sh # 20161217: new clang import which bumps version from 3.9.0 to 3.9.1. OLD_FILES+=usr/lib/clang/3.9.0/include/sanitizer/allocator_interface.h From owner-svn-src-head@freebsd.org Tue Jan 10 20:43:34 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 09E8FCA9126; Tue, 10 Jan 2017 20:43:34 +0000 (UTC) (envelope-from asomers@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id CF34B14D2; Tue, 10 Jan 2017 20:43:33 +0000 (UTC) (envelope-from asomers@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v0AKhXQx073174; Tue, 10 Jan 2017 20:43:33 GMT (envelope-from asomers@FreeBSD.org) Received: (from asomers@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v0AKhWuv073169; Tue, 10 Jan 2017 20:43:32 GMT (envelope-from asomers@FreeBSD.org) Message-Id: <201701102043.v0AKhWuv073169@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: asomers set sender to asomers@FreeBSD.org using -f From: Alan Somers Date: Tue, 10 Jan 2017 20:43:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r311895 - in head: etc/mtree usr.bin/tail usr.bin/tail/tests X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 10 Jan 2017 20:43:34 -0000 Author: asomers Date: Tue Jan 10 20:43:32 2017 New Revision: 311895 URL: https://svnweb.freebsd.org/changeset/base/311895 Log: Fix memory leaks during "tail -r" of an irregular file * Rewrite r_buf to use standard tail queues instead of a hand-rolled circular linked list. Free dynamic allocations when done. * Remove an optimization for the case where the file is a multiple of 128KB in size and there is a scarcity of memory. * Add ATF tests for "tail -r" and its variants. Reported by: Valgrind Reviewed by: ngie MFC after: 4 weeks Sponsored by: Spectra Logic Corp Differential Revision: https://reviews.freebsd.org/D9067 Added: head/usr.bin/tail/tests/ head/usr.bin/tail/tests/Makefile (contents, props changed) head/usr.bin/tail/tests/tail_test.sh (contents, props changed) Modified: head/etc/mtree/BSD.tests.dist head/usr.bin/tail/Makefile head/usr.bin/tail/reverse.c Modified: head/etc/mtree/BSD.tests.dist ============================================================================== --- head/etc/mtree/BSD.tests.dist Tue Jan 10 20:37:44 2017 (r311894) +++ head/etc/mtree/BSD.tests.dist Tue Jan 10 20:43:32 2017 (r311895) @@ -644,6 +644,8 @@ .. soelim .. + tail + .. tar .. timeout Modified: head/usr.bin/tail/Makefile ============================================================================== --- head/usr.bin/tail/Makefile Tue Jan 10 20:37:44 2017 (r311894) +++ head/usr.bin/tail/Makefile Tue Jan 10 20:43:32 2017 (r311895) @@ -1,7 +1,13 @@ # $FreeBSD$ # @(#)Makefile 8.1 (Berkeley) 6/6/93 +.include + PROG= tail SRCS= forward.c misc.c read.c reverse.c tail.c +.if ${MK_TESTS} != "no" +SUBDIR+= tests +.endif + .include Modified: head/usr.bin/tail/reverse.c ============================================================================== --- head/usr.bin/tail/reverse.c Tue Jan 10 20:37:44 2017 (r311894) +++ head/usr.bin/tail/reverse.c Tue Jan 10 20:43:32 2017 (r311895) @@ -40,6 +40,7 @@ static char sccsid[] = "@(#)reverse.c 8. __FBSDID("$FreeBSD$"); #include +#include #include #include @@ -169,12 +170,12 @@ r_reg(FILE *fp, const char *fn, enum STY ierr(fn); } -typedef struct bf { - struct bf *next; - struct bf *prev; - int len; - char *l; -} BF; +static const size_t bsz = 128 * 1024; +typedef struct bfelem { + TAILQ_ENTRY(bfelem) entries; + size_t len; + char l[bsz]; +} bfelem_t; /* * r_buf -- display a non-regular file in reverse order by line. @@ -189,64 +190,42 @@ typedef struct bf { static void r_buf(FILE *fp, const char *fn) { - BF *mark, *tl, *tr; - int ch, len, llen; + struct bfelem *tl, *temp, *first = NULL; + size_t len, llen; char *p; - off_t enomem; + off_t enomem = 0; + TAILQ_HEAD(bfhead, bfelem) head; - tl = NULL; -#define BSZ (128 * 1024) - for (mark = NULL, enomem = 0;;) { + TAILQ_INIT(&head); + + while (!feof(fp)) { /* * Allocate a new block and link it into place in a doubly * linked list. If out of memory, toss the LRU block and * keep going. */ - if (enomem || (tl = malloc(sizeof(BF))) == NULL || - (tl->l = malloc(BSZ)) == NULL) { - if (!mark) + while ((tl = malloc(sizeof(bfelem_t))) == NULL) { + first = TAILQ_FIRST(&head); + if (TAILQ_EMPTY(&head)) err(1, "malloc"); - if (enomem) - tl = tl->next; - else { - if (tl) - free(tl); - tl = mark; - } - enomem += tl->len; - } else if (mark) { - tl->next = mark; - tl->prev = mark->prev; - mark->prev->next = tl; - mark->prev = tl; - } else { - mark = tl; - mark->next = mark->prev = mark; + enomem += first->len; + TAILQ_REMOVE(&head, first, entries); + free(first); } + TAILQ_INSERT_TAIL(&head, tl, entries); /* Fill the block with input data. */ - for (p = tl->l, len = 0; - len < BSZ && (ch = getc(fp)) != EOF; ++len) - *p++ = ch; - - if (ferror(fp)) { - ierr(fn); - return; - } - - /* - * If no input data for this block and we tossed some data, - * recover it. - */ - if (!len && enomem) { - enomem -= tl->len; - tl = tl->prev; - break; + len = 0; + while ((!feof(fp)) && len < bsz) { + p = tl->l + len; + len += fread(p, 1, bsz - len, fp); + if (ferror(fp)) { + ierr(fn); + return; + } } tl->len = len; - if (ch == EOF) - break; } if (enomem) { @@ -255,37 +234,44 @@ r_buf(FILE *fp, const char *fn) } /* - * Step through the blocks in the reverse order read. The last char - * is special, ignore whether newline or not. + * Now print the lines in reverse order + * Outline: + * Scan backward for "\n", + * print forward to the end of the buffers + * free any buffers that start after the "\n" just found + * Loop */ - for (mark = tl;;) { - for (p = tl->l + (len = tl->len) - 1, llen = 0; len--; - --p, ++llen) - if (*p == '\n') { - if (llen) { + tl = TAILQ_LAST(&head, bfhead); + first = TAILQ_FIRST(&head); + while (tl != NULL) { + for (p = tl->l + tl->len - 1, llen = 0; p >= tl->l; + --p, ++llen) { + int start = (tl == first && p == tl->l); + + if ((*p == '\n') || start) { + struct bfelem *tr; + + if (start && len) + WR(p, llen + 1); + else if (llen) WR(p + 1, llen); - llen = 0; - } - if (tl == mark) - continue; - for (tr = tl->next; tr->len; tr = tr->next) { - WR(tr->l, tr->len); - tr->len = 0; - if (tr == mark) - break; + tr = TAILQ_NEXT(tl, entries); + llen = 0; + if (tr != NULL) { + TAILQ_FOREACH_FROM_SAFE(tr, &head, + entries, temp) { + if (tr->len) + WR(&tr->l, tr->len); + TAILQ_REMOVE(&head, tr, + entries); + free(tr); + } } } + } tl->len = llen; - if ((tl = tl->prev) == mark) - break; - } - tl = tl->next; - if (tl->len) { - WR(tl->l, tl->len); - tl->len = 0; - } - while ((tl = tl->next)->len) { - WR(tl->l, tl->len); - tl->len = 0; + tl = TAILQ_PREV(tl, bfhead, entries); } + TAILQ_REMOVE(&head, first, entries); + free(first); } Added: head/usr.bin/tail/tests/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/usr.bin/tail/tests/Makefile Tue Jan 10 20:43:32 2017 (r311895) @@ -0,0 +1,7 @@ +# $FreeBSD$ + +PACKAGE= tests + +ATF_TESTS_SH= tail_test + +.include Added: head/usr.bin/tail/tests/tail_test.sh ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/usr.bin/tail/tests/tail_test.sh Tue Jan 10 20:43:32 2017 (r311895) @@ -0,0 +1,233 @@ +# Copyright (c) 2016 Alan Somers +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# +# THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +# ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +# SUCH DAMAGE. +# +# $FreeBSD$ + +atf_test_case empty_r +empty_r_head() +{ + atf_set "descr" "Reverse an empty file" +} +empty_r_body() +{ + touch infile expectfile + tail -r infile > outfile + tail -r < infile > outpipe + atf_check cmp expectfile outfile + atf_check cmp expectfile outpipe +} + +atf_test_case file_r +file_r_head() +{ + atf_set "descr" "Reverse a file" +} +file_r_body() +{ + cat > infile < expectfile << HERE +This is the third line +This is the second line +This is the first line +HERE + tail -r infile > outfile + tail -r < infile > outpipe + atf_check cmp expectfile outfile + atf_check cmp expectfile outpipe +} + +atf_test_case file_rn2 +file_rn2_head() +{ + atf_set "descr" "Reverse the last two lines of a file" +} +file_rn2_body() +{ + cat > infile < expectfile << HERE +This is the third line +This is the second line +HERE + tail -rn2 infile > outfile + tail -rn2 < infile > outpipe + atf_check cmp expectfile outfile + atf_check cmp expectfile outpipe +} + +atf_test_case file_rc28 +file_rc28_head() +{ + atf_set "descr" "Reverse a file and display the last 28 characters" +} +file_rc28_body() +{ + cat > infile < expectfile << HERE +This is the third line +line +HERE + tail -rc28 infile > outfile + tail -rc28 < infile > outpipe + atf_check cmp expectfile outfile + atf_check cmp expectfile outpipe +} + +atf_test_case longfile_r +longfile_r_head() +{ + atf_set "descr" "Reverse a long file" +} +longfile_r_body() +{ + jot -w "%0511d" 1030 0 > infile + jot -w "%0511d" 1030 1029 0 -1 > expectfile + tail -r infile > outfile + tail -r < infile > outpipe + atf_check cmp expectfile outfile + atf_check cmp expectfile outpipe +} + +atf_test_case longfile_r_enomem +longfile_r_enomem_head() +{ + atf_set "descr" "Reverse a file that's too long to store in RAM" +} +longfile_r_enomem_body() +{ + # When we reverse a file that's too long for RAM, tail should drop the + # first part and just print what it can. We'll check that the last + # part is ok + { + ulimit -v 32768 || atf_skip "Can't adjust ulimit" + jot -w "%01023d" 32768 0 | tail -r > outfile ; + } + if [ "$?" -ne 1 ]; then + atf_skip "Didn't get ENOMEM. Adjust test parameters" + fi + # We don't know how much of the input we dropped. So just check that + # the first ten lines of tail's output are the same as the last ten of + # the input + jot -w "%01023d" 10 32767 0 -1 > expectfile + head -n 10 outfile > outtrunc + diff expectfile outtrunc + atf_check cmp expectfile outtrunc +} + +atf_test_case longfile_r_longlines +longfile_r_longlines_head() +{ + atf_set "descr" "Reverse a long file with extremely long lines" +} +longfile_r_longlines_body() +{ + jot -s " " -w "%07d" 18000 0 > infile + jot -s " " -w "%07d" 18000 18000 >> infile + jot -s " " -w "%07d" 18000 36000 >> infile + jot -s " " -w "%07d" 18000 36000 > expectfile + jot -s " " -w "%07d" 18000 18000 >> expectfile + jot -s " " -w "%07d" 18000 0 >> expectfile + tail -r infile > outfile + tail -r < infile > outpipe + atf_check cmp expectfile outfile + atf_check cmp expectfile outpipe +} + +atf_test_case longfile_rc135782 +longfile_rc135782_head() +{ + atf_set "descr" "Reverse a long file and print the last 135,782 bytes" +} +longfile_rc135782_body() +{ + jot -w "%063d" 9000 0 > infile + jot -w "%063d" 2121 8999 0 -1 > expectfile + echo "0000000000000000000000000000000006878" >> expectfile + tail -rc135782 infile > outfile + tail -rc135782 < infile > outpipe + atf_check cmp expectfile outfile + atf_check cmp expectfile outpipe +} + +atf_test_case longfile_rc145782_longlines +longfile_rc145782_longlines_head() +{ + atf_set "descr" "Reverse a long file with extremely long lines and print the last 145,782 bytes" +} +longfile_rc145782_longlines_body() +{ + jot -s " " -w "%07d" 18000 0 > infile + jot -s " " -w "%07d" 18000 18000 >> infile + jot -s " " -w "%07d" 18000 36000 >> infile + jot -s " " -w "%07d" 18000 36000 > expectfile + echo -n "35777 " >> expectfile + jot -s " " -w "%07d" 222 35778 >> expectfile + tail -rc145782 infile > outfile + tail -rc145782 < infile > outpipe + atf_check cmp expectfile outfile + atf_check cmp expectfile outpipe +} + +atf_test_case longfile_rn2500 +longfile_rn2500_head() +{ + atf_set "descr" "Reverse a long file and print the last 2,500 lines" +} +longfile_rn2500_body() +{ + jot -w "%063d" 9000 0 > infile + jot -w "%063d" 2500 8999 0 -1 > expectfile + tail -rn2500 infile > outfile + tail -rn2500 < infile > outpipe + atf_check cmp expectfile outfile + atf_check cmp expectfile outpipe +} + + +atf_init_test_cases() +{ + atf_add_test_case empty_r + atf_add_test_case file_r + atf_add_test_case file_rc28 + atf_add_test_case file_rn2 + # The longfile tests are designed to exercise behavior in r_buf(), + # which operates on 128KB blocks + atf_add_test_case longfile_r + atf_add_test_case longfile_r_enomem + atf_add_test_case longfile_r_longlines + atf_add_test_case longfile_rc135782 + atf_add_test_case longfile_rc145782_longlines + atf_add_test_case longfile_rn2500 +} From owner-svn-src-head@freebsd.org Tue Jan 10 20:44:33 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 04CE0CA91C1; Tue, 10 Jan 2017 20:44:33 +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 CB21E1687; Tue, 10 Jan 2017 20:44:32 +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 v0AKiWxT073267; Tue, 10 Jan 2017 20:44:32 GMT (envelope-from pfg@FreeBSD.org) Received: (from pfg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v0AKiWl9073266; Tue, 10 Jan 2017 20:44:32 GMT (envelope-from pfg@FreeBSD.org) Message-Id: <201701102044.v0AKiWl9073266@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: pfg set sender to pfg@FreeBSD.org using -f From: "Pedro F. Giffuni" Date: Tue, 10 Jan 2017 20:44:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r311896 - head/sys/sys X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 10 Jan 2017 20:44:33 -0000 Author: pfg Date: Tue Jan 10 20:44:31 2017 New Revision: 311896 URL: https://svnweb.freebsd.org/changeset/base/311896 Log: Remove unused __gnu_inline() attribute. This was meant to be used by a future FORTIFY_SOURCE implementation. Probably for good, FORTIFY_SOURCE and this particular GCCism were never well supported by clang or other compilers. Furthermore, the technology has long since been replaced by either static checkers, sanitizers, or even just the strong stack protector that was enabled by default. Drop __gnu_inline to avoid cluttering the headers. MFC after: 5 days Modified: head/sys/sys/cdefs.h Modified: head/sys/sys/cdefs.h ============================================================================== --- head/sys/sys/cdefs.h Tue Jan 10 20:43:32 2017 (r311895) +++ head/sys/sys/cdefs.h Tue Jan 10 20:44:31 2017 (r311896) @@ -543,22 +543,6 @@ __attribute__((__format__ (__strftime__, fmtarg, firstvararg))) #endif -/* - * FORTIFY_SOURCE, and perhaps other compiler-specific features, require - * the use of non-standard inlining. In general we should try to avoid - * using these but GCC-compatible compilers tend to support the extensions - * well enough to use them in limited cases. - */ -#if defined(__GNUC_GNU_INLINE__) || defined(__GNUC_STDC_INLINE__) -#if __GNUC_PREREQ__(4, 3) || __has_attribute(__artificial__) -#define __gnu_inline __attribute__((__gnu_inline__, __artificial__)) -#else -#define __gnu_inline __attribute__((__gnu_inline__)) -#endif /* artificial */ -#else -#define __gnu_inline -#endif - /* Compiler-dependent macros that rely on FreeBSD-specific extensions. */ #if defined(__FreeBSD_cc_version) && __FreeBSD_cc_version >= 300001 && \ defined(__GNUC__) && !defined(__INTEL_COMPILER) From owner-svn-src-head@freebsd.org Tue Jan 10 20:52:45 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7F442CA9567; Tue, 10 Jan 2017 20:52: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 351E610D9; Tue, 10 Jan 2017 20:52: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 v0AKqiTw077568; Tue, 10 Jan 2017 20:52:44 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v0AKqikj077567; Tue, 10 Jan 2017 20:52:44 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201701102052.v0AKqikj077567@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Tue, 10 Jan 2017 20:52:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r311897 - head/sbin/camcontrol X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 10 Jan 2017 20:52:45 -0000 Author: mav Date: Tue Jan 10 20:52:44 2017 New Revision: 311897 URL: https://svnweb.freebsd.org/changeset/base/311897 Log: Add checks for received mode page length. If our buffer is too small, we may receive part of the page, and should not try read/write past the end of the buffer. Reported by: Coverity CID: 1368374, 1368375 MFC after: 1 week Modified: head/sbin/camcontrol/modeedit.c Modified: head/sbin/camcontrol/modeedit.c ============================================================================== --- head/sbin/camcontrol/modeedit.c Tue Jan 10 20:44:31 2017 (r311896) +++ head/sbin/camcontrol/modeedit.c Tue Jan 10 20:52:44 2017 (r311897) @@ -557,7 +557,7 @@ editlist_populate(struct cam_device *dev struct scsi_mode_header_6 *mh; /* Location of mode header. */ struct scsi_mode_page_header *mph; struct scsi_mode_page_header_sp *mphsp; - int len; + size_t len; STAILQ_INIT(&editlist); @@ -575,6 +575,7 @@ editlist_populate(struct cam_device *dev mode_pars = (uint8_t *)(mphsp + 1); len = scsi_2btoul(mphsp->page_length); } + len = MIN(len, sizeof(data) - (mode_pars - data)); /* Decode the value data, creating edit_entries for each value. */ buff_decode_visit(mode_pars, len, format, editentry_create, 0); @@ -594,7 +595,7 @@ editlist_save(struct cam_device *device, struct scsi_mode_header_6 *mh; /* Location of mode header. */ struct scsi_mode_page_header *mph; struct scsi_mode_page_header_sp *mphsp; - int len, hlen; + size_t len, hlen; /* Make sure that something changed before continuing. */ if (! editlist_changed) @@ -617,6 +618,7 @@ editlist_save(struct cam_device *device, mode_pars = (uint8_t *)(mphsp + 1); len = scsi_2btoul(mphsp->page_length); } + len = MIN(len, sizeof(data) - (mode_pars - data)); /* Encode the value data to be passed back to the device. */ buff_encode_visit(mode_pars, len, format, editentry_save, 0); @@ -814,7 +816,7 @@ modepage_dump(struct cam_device *device, struct scsi_mode_header_6 *mh; /* Location of mode header. */ struct scsi_mode_page_header *mph; struct scsi_mode_page_header_sp *mphsp; - int indx, len; + size_t indx, len; mode_sense(device, dbd, pc, page, subpage, retries, timeout, data, sizeof(data)); @@ -829,6 +831,7 @@ modepage_dump(struct cam_device *device, mode_pars = (uint8_t *)(mphsp + 1); len = scsi_2btoul(mphsp->page_length); } + len = MIN(len, sizeof(data) - (mode_pars - data)); /* Print the raw mode page data with newlines each 8 bytes. */ for (indx = 0; indx < len; indx++) { From owner-svn-src-head@freebsd.org Tue Jan 10 21:10:21 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D59B3CA9D99; Tue, 10 Jan 2017 21:10:21 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A4F971A9E; Tue, 10 Jan 2017 21:10:21 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v0ALAKiv082228; Tue, 10 Jan 2017 21:10:20 GMT (envelope-from mjg@FreeBSD.org) Received: (from mjg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v0ALAKQw082227; Tue, 10 Jan 2017 21:10:20 GMT (envelope-from mjg@FreeBSD.org) Message-Id: <201701102110.v0ALAKQw082227@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mjg set sender to mjg@FreeBSD.org using -f From: Mateusz Guzik Date: Tue, 10 Jan 2017 21:10:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r311898 - head/sys/sparc64/include X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 10 Jan 2017 21:10:21 -0000 Author: mjg Date: Tue Jan 10 21:10:20 2017 New Revision: 311898 URL: https://svnweb.freebsd.org/changeset/base/311898 Log: sparc64: add atomic_fcmpset Tested on hardware provided by feld. Reviewed by: marius Modified: head/sys/sparc64/include/atomic.h Modified: head/sys/sparc64/include/atomic.h ============================================================================== --- head/sys/sparc64/include/atomic.h Tue Jan 10 20:52:44 2017 (r311897) +++ head/sys/sparc64/include/atomic.h Tue Jan 10 21:10:20 2017 (r311898) @@ -219,6 +219,40 @@ atomic_cmpset_rel_ ## name(volatile ptyp return (((vtype)atomic_cas_rel((p), (e), (s), sz)) == (e)); \ } \ \ +static __inline int \ +atomic_fcmpset_ ## name(volatile ptype p, vtype *ep, vtype s) \ +{ \ + vtype t; \ + \ + t = (vtype)atomic_cas((p), (*ep), (s), sz); \ + if (t == (*ep)) \ + return (1); \ + *ep = t; \ + return (0); \ +} \ +static __inline int \ +atomic_fcmpset_acq_ ## name(volatile ptype p, vtype *ep, vtype s) \ +{ \ + vtype t; \ + \ + t = (vtype)atomic_cas_acq((p), (*ep), (s), sz); \ + if (t == (*ep)) \ + return (1); \ + *ep = t; \ + return (0); \ +} \ +static __inline int \ +atomic_fcmpset_rel_ ## name(volatile ptype p, vtype *ep, vtype s) \ +{ \ + vtype t; \ + \ + t = (vtype)atomic_cas_rel((p), (*ep), (s), sz); \ + if (t == (*ep)) \ + return (1); \ + *ep = t; \ + return (0); \ +} \ + \ static __inline vtype \ atomic_load_ ## name(volatile ptype p) \ { \ From owner-svn-src-head@freebsd.org Tue Jan 10 21:21:01 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 35D19CAA7C8; Tue, 10 Jan 2017 21:21:01 +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 06328163D; Tue, 10 Jan 2017 21:21:00 +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 v0ALL0LW087509; Tue, 10 Jan 2017 21:21:00 GMT (envelope-from sbruno@FreeBSD.org) Received: (from sbruno@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v0ALL0xp087505; Tue, 10 Jan 2017 21:21:00 GMT (envelope-from sbruno@FreeBSD.org) Message-Id: <201701102121.v0ALL0xp087505@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: sbruno set sender to sbruno@FreeBSD.org using -f From: Sean Bruno Date: Tue, 10 Jan 2017 21:21:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r311900 - head/sys/modules/em X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 10 Jan 2017 21:21:01 -0000 Author: sbruno Date: Tue Jan 10 21:21:00 2017 New Revision: 311900 URL: https://svnweb.freebsd.org/changeset/base/311900 Log: Set CFLAGS correctly for sys/modules/em Unbreak gcc sparc64 builds (or any gcc build that uses em(4)). Reported by: lidl@freebsd.org Modified: head/sys/modules/em/Makefile Modified: head/sys/modules/em/Makefile ============================================================================== --- head/sys/modules/em/Makefile Tue Jan 10 21:18:32 2017 (r311899) +++ head/sys/modules/em/Makefile Tue Jan 10 21:21:00 2017 (r311900) @@ -17,7 +17,7 @@ PCIE_SHARED = e1000_80003es2lan.c e1000_ LEGACY_SHARED = e1000_82540.c e1000_82542.c e1000_82541.c e1000_82543.c -CFLAGS += -I${.CURDIR}/../../../dev/e1000 +CFLAGS += -I${.CURDIR}/../../dev/e1000 # DEVICE_POLLING for a non-interrupt-driven method #CFLAGS += -DDEVICE_POLLING From owner-svn-src-head@freebsd.org Tue Jan 10 21:41:30 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 18997CA9608; Tue, 10 Jan 2017 21:41:30 +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 DA5E1160B; Tue, 10 Jan 2017 21:41:29 +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 v0ALfThg095224; Tue, 10 Jan 2017 21:41:29 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v0ALfTqW095223; Tue, 10 Jan 2017 21:41:29 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201701102141.v0ALfTqW095223@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Tue, 10 Jan 2017 21:41:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r311901 - head/sys/kern X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 10 Jan 2017 21:41:30 -0000 Author: markj Date: Tue Jan 10 21:41:28 2017 New Revision: 311901 URL: https://svnweb.freebsd.org/changeset/base/311901 Log: Do not set BIO_DONE if the BIO specifies a completion handler. biowait() will otherwise race with completions of such BIOs. In-tree code only calls biowait() on BIOs that do not specify a handler, so this change should not have any functional impact. Reviewed by: mav MFC after: 1 month Sponsored by: Dell EMC Isilon Differential Revision: https://reviews.freebsd.org/D9070 Modified: head/sys/kern/vfs_bio.c Modified: head/sys/kern/vfs_bio.c ============================================================================== --- head/sys/kern/vfs_bio.c Tue Jan 10 21:21:00 2017 (r311900) +++ head/sys/kern/vfs_bio.c Tue Jan 10 21:41:28 2017 (r311901) @@ -3905,10 +3905,8 @@ biodone(struct bio *bp) bp->bio_flags |= BIO_DONE; wakeup(bp); mtx_unlock(mtxp); - } else { - bp->bio_flags |= BIO_DONE; + } else done(bp); - } } /* From owner-svn-src-head@freebsd.org Tue Jan 10 21:52:49 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B7ED7CA9D74; Tue, 10 Jan 2017 21:52:49 +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 9500F1E84; Tue, 10 Jan 2017 21:52:49 +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 v0ALqmUa002932; Tue, 10 Jan 2017 21:52:48 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v0ALqmSR002930; Tue, 10 Jan 2017 21:52:48 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201701102152.v0ALqmSR002930@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Tue, 10 Jan 2017 21:52:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r311902 - in head/sys: amd64/amd64 i386/i386 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 10 Jan 2017 21:52:49 -0000 Author: markj Date: Tue Jan 10 21:52:48 2017 New Revision: 311902 URL: https://svnweb.freebsd.org/changeset/base/311902 Log: Coalesce TLB shootdowns of global PTEs in pmap_advise() on x86. We would previously invalidate such entries individually, resulting in more IPIs than necessary. Reviewed by: alc, kib MFC after: 3 weeks Differential Revision: https://reviews.freebsd.org/D9094 Modified: head/sys/amd64/amd64/pmap.c head/sys/i386/i386/pmap.c Modified: head/sys/amd64/amd64/pmap.c ============================================================================== --- head/sys/amd64/amd64/pmap.c Tue Jan 10 21:41:28 2017 (r311901) +++ head/sys/amd64/amd64/pmap.c Tue Jan 10 21:52:48 2017 (r311902) @@ -6010,7 +6010,7 @@ pmap_advise(pmap_t pmap, vm_offset_t sva pdp_entry_t *pdpe; pd_entry_t oldpde, *pde; pt_entry_t *pte, PG_A, PG_G, PG_M, PG_RW, PG_V; - vm_offset_t va_next; + vm_offset_t va, va_next; vm_page_t m; boolean_t anychanged; @@ -6090,11 +6090,11 @@ pmap_advise(pmap_t pmap, vm_offset_t sva } if (va_next > eva) va_next = eva; + va = va_next; for (pte = pmap_pde_to_pte(pde, sva); sva != va_next; pte++, sva += PAGE_SIZE) { - if ((*pte & (PG_MANAGED | PG_V)) != (PG_MANAGED | - PG_V)) - continue; + if ((*pte & (PG_MANAGED | PG_V)) != (PG_MANAGED | PG_V)) + goto maybe_invlrng; else if ((*pte & (PG_M | PG_RW)) == (PG_M | PG_RW)) { if (advice == MADV_DONTNEED) { /* @@ -6109,12 +6109,22 @@ pmap_advise(pmap_t pmap, vm_offset_t sva } else if ((*pte & PG_A) != 0) atomic_clear_long(pte, PG_A); else - continue; - if ((*pte & PG_G) != 0) - pmap_invalidate_page(pmap, sva); - else + goto maybe_invlrng; + + if ((*pte & PG_G) != 0) { + if (va == va_next) + va = sva; + } else anychanged = TRUE; + continue; +maybe_invlrng: + if (va != va_next) { + pmap_invalidate_range(pmap, va, sva); + va = va_next; + } } + if (va != va_next) + pmap_invalidate_range(pmap, va, sva); } if (anychanged) pmap_invalidate_all(pmap); Modified: head/sys/i386/i386/pmap.c ============================================================================== --- head/sys/i386/i386/pmap.c Tue Jan 10 21:41:28 2017 (r311901) +++ head/sys/i386/i386/pmap.c Tue Jan 10 21:52:48 2017 (r311902) @@ -4905,7 +4905,7 @@ pmap_advise(pmap_t pmap, vm_offset_t sva { pd_entry_t oldpde, *pde; pt_entry_t *pte; - vm_offset_t pdnxt; + vm_offset_t va, pdnxt; vm_page_t m; boolean_t anychanged, pv_lists_locked; @@ -4966,11 +4966,11 @@ resume: } if (pdnxt > eva) pdnxt = eva; + va = pdnxt; for (pte = pmap_pte_quick(pmap, sva); sva != pdnxt; pte++, sva += PAGE_SIZE) { - if ((*pte & (PG_MANAGED | PG_V)) != (PG_MANAGED | - PG_V)) - continue; + if ((*pte & (PG_MANAGED | PG_V)) != (PG_MANAGED | PG_V)) + goto maybe_invlrng; else if ((*pte & (PG_M | PG_RW)) == (PG_M | PG_RW)) { if (advice == MADV_DONTNEED) { /* @@ -4985,12 +4985,21 @@ resume: } else if ((*pte & PG_A) != 0) atomic_clear_int((u_int *)pte, PG_A); else - continue; - if ((*pte & PG_G) != 0) - pmap_invalidate_page(pmap, sva); - else + goto maybe_invlrng; + if ((*pte & PG_G) != 0) { + if (va == pdnxt) + va = sva; + } else anychanged = TRUE; + continue; +maybe_invlrng: + if (va != pdnxt) { + pmap_invalidate_range(pmap, va, sva); + va = pdnxt; + } } + if (va != pdnxt) + pmap_invalidate_range(pmap, va, sva); } if (anychanged) pmap_invalidate_all(pmap); From owner-svn-src-head@freebsd.org Tue Jan 10 21:59:39 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 72147CAA068; Tue, 10 Jan 2017 21:59:39 +0000 (UTC) (envelope-from mm@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1C245110A; Tue, 10 Jan 2017 21:59:39 +0000 (UTC) (envelope-from mm@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v0ALxc2A003397; Tue, 10 Jan 2017 21:59:38 GMT (envelope-from mm@FreeBSD.org) Received: (from mm@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v0ALxZmc003365; Tue, 10 Jan 2017 21:59:35 GMT (envelope-from mm@FreeBSD.org) Message-Id: <201701102159.v0ALxZmc003365@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mm set sender to mm@FreeBSD.org using -f From: Martin Matuska Date: Tue, 10 Jan 2017 21:59:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r311903 - in head/contrib/libarchive/libarchive: . test X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 10 Jan 2017 21:59:39 -0000 Author: mm Date: Tue Jan 10 21:59:35 2017 New Revision: 311903 URL: https://svnweb.freebsd.org/changeset/base/311903 Log: MFV r311899: Sync libarchive with vendor. Vendor bugfixes: #691: Support for SCHILY.xattr extended attributes #854: Spelling fixes Multiple fixes in ACL code: - prefer acl_set_fd_np() to acl_set_fd() - if acl_set_fd_np() fails, do no fallback to acl_set_file() - do not warn if trying to write ACLs to a filesystem without ACL support - fix id handling in archive_acl_(from_to)_text*() for NFSv4 ACLs MFC after: 1 week X-MFC with: r310866 Added: head/contrib/libarchive/libarchive/test/test_read_pax_schily_xattr.c - copied unchanged from r311899, vendor/libarchive/dist/libarchive/test/test_read_pax_schily_xattr.c head/contrib/libarchive/libarchive/test/test_read_pax_schily_xattr.tar.uu - copied unchanged from r311899, vendor/libarchive/dist/libarchive/test/test_read_pax_schily_xattr.tar.uu Modified: head/contrib/libarchive/libarchive/archive_acl.c head/contrib/libarchive/libarchive/archive_read_disk_entry_from_file.c head/contrib/libarchive/libarchive/archive_read_disk_posix.c head/contrib/libarchive/libarchive/archive_read_support_filter_lz4.c head/contrib/libarchive/libarchive/archive_read_support_filter_lzop.c head/contrib/libarchive/libarchive/archive_read_support_format_7zip.c head/contrib/libarchive/libarchive/archive_read_support_format_iso9660.c head/contrib/libarchive/libarchive/archive_read_support_format_lha.c head/contrib/libarchive/libarchive/archive_read_support_format_rar.c head/contrib/libarchive/libarchive/archive_read_support_format_tar.c head/contrib/libarchive/libarchive/archive_read_support_format_warc.c head/contrib/libarchive/libarchive/archive_read_support_format_zip.c head/contrib/libarchive/libarchive/archive_string.c head/contrib/libarchive/libarchive/archive_string.h head/contrib/libarchive/libarchive/archive_string_composition.h head/contrib/libarchive/libarchive/archive_write.c head/contrib/libarchive/libarchive/archive_write_add_filter_xz.c head/contrib/libarchive/libarchive/archive_write_disk_acl.c head/contrib/libarchive/libarchive/archive_write_set_format_7zip.c head/contrib/libarchive/libarchive/archive_write_set_format_pax.c head/contrib/libarchive/libarchive/archive_write_set_format_xar.c head/contrib/libarchive/libarchive/archive_write_set_format_zip.c head/contrib/libarchive/libarchive/test/test_archive_read_add_passphrase.c head/contrib/libarchive/libarchive/test/test_compat_uudecode.c head/contrib/libarchive/libarchive/test/test_read_format_cpio_afio.c head/contrib/libarchive/libarchive/test/test_read_format_zip_traditional_encryption_data.c head/contrib/libarchive/libarchive/test/test_read_format_zip_winzip_aes.c head/contrib/libarchive/libarchive/test/test_read_format_zip_winzip_aes_large.c head/contrib/libarchive/libarchive/test/test_sparse_basic.c head/contrib/libarchive/libarchive/xxhash.c Directory Properties: head/contrib/libarchive/ (props changed) Modified: head/contrib/libarchive/libarchive/archive_acl.c ============================================================================== --- head/contrib/libarchive/libarchive/archive_acl.c Tue Jan 10 21:52:48 2017 (r311902) +++ head/contrib/libarchive/libarchive/archive_acl.c Tue Jan 10 21:59:35 2017 (r311903) @@ -786,7 +786,8 @@ append_entry_w(wchar_t **wp, const wchar } else if (tag == ARCHIVE_ENTRY_ACL_USER || tag == ARCHIVE_ENTRY_ACL_GROUP) { append_id_w(wp, id); - id = -1; + if ((type & ARCHIVE_ENTRY_ACL_TYPE_NFS4) == 0) + id = -1; } /* Solaris style has no second colon after other and mask */ if (((flags & ARCHIVE_ENTRY_ACL_STYLE_SOLARIS) == 0) @@ -1042,7 +1043,8 @@ append_entry(char **p, const char *prefi } else if (tag == ARCHIVE_ENTRY_ACL_USER || tag == ARCHIVE_ENTRY_ACL_GROUP) { append_id(p, id); - id = -1; + if ((type & ARCHIVE_ENTRY_ACL_TYPE_NFS4) == 0) + id = -1; } /* Solaris style has no second colon after other and mask */ if (((flags & ARCHIVE_ENTRY_ACL_STYLE_SOLARIS) == 0) @@ -1328,6 +1330,7 @@ archive_acl_from_text_w(struct archive_a tag == ARCHIVE_ENTRY_ACL_GROUP) { n = 1; name = field[1]; + isint_w(name.start, name.end, &id); } else n = 0; @@ -1799,6 +1802,7 @@ archive_acl_from_text_l(struct archive_a tag == ARCHIVE_ENTRY_ACL_GROUP) { n = 1; name = field[1]; + isint(name.start, name.end, &id); } else n = 0; Modified: head/contrib/libarchive/libarchive/archive_read_disk_entry_from_file.c ============================================================================== --- head/contrib/libarchive/libarchive/archive_read_disk_entry_from_file.c Tue Jan 10 21:52:48 2017 (r311902) +++ head/contrib/libarchive/libarchive/archive_read_disk_entry_from_file.c Tue Jan 10 21:59:35 2017 (r311903) @@ -526,6 +526,11 @@ setup_acls(struct archive_read_disk *a, /* Only directories can have default ACLs. */ if (S_ISDIR(archive_entry_mode(entry))) { +#if HAVE_ACL_GET_FD_NP + if (*fd >= 0) + acl = acl_get_fd_np(*fd, ACL_TYPE_DEFAULT); + else +#endif acl = acl_get_file(accpath, ACL_TYPE_DEFAULT); if (acl != NULL) { r = translate_acl(a, entry, acl, @@ -581,7 +586,10 @@ static struct { {ARCHIVE_ENTRY_ACL_ENTRY_FILE_INHERIT, ACL_ENTRY_FILE_INHERIT}, {ARCHIVE_ENTRY_ACL_ENTRY_DIRECTORY_INHERIT, ACL_ENTRY_DIRECTORY_INHERIT}, {ARCHIVE_ENTRY_ACL_ENTRY_NO_PROPAGATE_INHERIT, ACL_ENTRY_NO_PROPAGATE_INHERIT}, - {ARCHIVE_ENTRY_ACL_ENTRY_INHERIT_ONLY, ACL_ENTRY_INHERIT_ONLY} + {ARCHIVE_ENTRY_ACL_ENTRY_INHERIT_ONLY, ACL_ENTRY_INHERIT_ONLY}, + {ARCHIVE_ENTRY_ACL_ENTRY_SUCCESSFUL_ACCESS, ACL_ENTRY_SUCCESSFUL_ACCESS}, + {ARCHIVE_ENTRY_ACL_ENTRY_FAILED_ACCESS, ACL_ENTRY_FAILED_ACCESS}, + {ARCHIVE_ENTRY_ACL_ENTRY_INHERITED, ACL_ENTRY_INHERITED} }; #endif static int Modified: head/contrib/libarchive/libarchive/archive_read_disk_posix.c ============================================================================== --- head/contrib/libarchive/libarchive/archive_read_disk_posix.c Tue Jan 10 21:52:48 2017 (r311902) +++ head/contrib/libarchive/libarchive/archive_read_disk_posix.c Tue Jan 10 21:59:35 2017 (r311903) @@ -675,7 +675,7 @@ setup_suitable_read_buffer(struct archiv asize = cf->min_xfer_size; /* Increase a buffer size up to 64K bytes in - * a proper incremant size. */ + * a proper increment size. */ while (asize < 1024*64) asize += incr; /* Take a margin to adjust to the filesystem @@ -1656,7 +1656,7 @@ setup_current_filesystem(struct archive_ archive_set_error(&a->archive, errno, "statvfs failed"); return (ARCHIVE_FAILED); } else if (xr == 1) { - /* Usuall come here unless NetBSD supports _PC_REC_XFER_ALIGN + /* Usually come here unless NetBSD supports _PC_REC_XFER_ALIGN * for pathconf() function. */ t->current_filesystem->xfer_align = sfs.f_frsize; t->current_filesystem->max_xfer_size = -1; @@ -1944,7 +1944,7 @@ setup_current_filesystem(struct archive_ if (nm == -1) # endif /* _PC_NAME_MAX */ /* - * Some sysmtes (HP-UX or others?) incorrectly defined + * Some systems (HP-UX or others?) incorrectly defined * NAME_MAX macro to be a smaller value. */ # if defined(NAME_MAX) && NAME_MAX >= 255 Modified: head/contrib/libarchive/libarchive/archive_read_support_filter_lz4.c ============================================================================== --- head/contrib/libarchive/libarchive/archive_read_support_filter_lz4.c Tue Jan 10 21:52:48 2017 (r311902) +++ head/contrib/libarchive/libarchive/archive_read_support_filter_lz4.c Tue Jan 10 21:59:35 2017 (r311903) @@ -180,7 +180,7 @@ lz4_reader_bid(struct archive_read_filte return (0); bits_checked += 8; BD = buffer[5]; - /* A block maximum size shuld be more than 3. */ + /* A block maximum size should be more than 3. */ if (((BD & 0x70) >> 4) < 4) return (0); /* Reserved bits must be "0". */ @@ -417,7 +417,7 @@ lz4_filter_read_descriptor(struct archiv /* Reserved bits must be zero. */ if (bd & 0x8f) goto malformed_error; - /* Get a maxinum block size. */ + /* Get a maximum block size. */ switch (read_buf[1] >> 4) { case 4: /* 64 KB */ state->flags.block_maximum_size = 64 * 1024; @@ -627,7 +627,7 @@ lz4_filter_read_default_stream(struct ar if (state->stage == SELECT_STREAM) { state->stage = READ_DEFAULT_STREAM; - /* First, read a desciprtor. */ + /* First, read a descriptor. */ if((ret = lz4_filter_read_descriptor(self)) != ARCHIVE_OK) return (ret); state->stage = READ_DEFAULT_BLOCK; Modified: head/contrib/libarchive/libarchive/archive_read_support_filter_lzop.c ============================================================================== --- head/contrib/libarchive/libarchive/archive_read_support_filter_lzop.c Tue Jan 10 21:52:48 2017 (r311902) +++ head/contrib/libarchive/libarchive/archive_read_support_filter_lzop.c Tue Jan 10 21:59:35 2017 (r311903) @@ -436,7 +436,7 @@ lzop_filter_read(struct archive_read_fil } /* - * Drive lzo uncompresison. + * Drive lzo uncompression. */ out_size = (lzo_uint)state->uncompressed_size; r = lzo1x_decompress_safe(b, (lzo_uint)state->compressed_size, Modified: head/contrib/libarchive/libarchive/archive_read_support_format_7zip.c ============================================================================== --- head/contrib/libarchive/libarchive/archive_read_support_format_7zip.c Tue Jan 10 21:52:48 2017 (r311902) +++ head/contrib/libarchive/libarchive/archive_read_support_format_7zip.c Tue Jan 10 21:59:35 2017 (r311903) @@ -552,7 +552,7 @@ skip_sfx(struct archive_read *a, ssize_t /* * If bytes_avail > SFX_MIN_ADDR we do not have to call * __archive_read_seek() at this time since we have - * alredy had enough data. + * already had enough data. */ if (bytes_avail > SFX_MIN_ADDR) __archive_read_consume(a, SFX_MIN_ADDR); @@ -760,7 +760,7 @@ archive_read_format_7zip_read_header(str symsize += size; } if (symsize == 0) { - /* If there is no synname, handle it as a regular + /* If there is no symname, handle it as a regular * file. */ zip_entry->mode &= ~AE_IFMT; zip_entry->mode |= AE_IFREG; @@ -3288,7 +3288,7 @@ read_stream(struct archive_read *a, cons return (r); /* - * Skip the bytes we alrady has skipped in skip_stream(). + * Skip the bytes we already has skipped in skip_stream(). */ while (skip_bytes) { ssize_t skipped; @@ -3506,7 +3506,7 @@ setup_decode_folder(struct archive_read return (ARCHIVE_FATAL); } - /* Allocate memory for the decorded data of a sub + /* Allocate memory for the decoded data of a sub * stream. */ b[i] = malloc((size_t)zip->folder_outbytes_remaining); if (b[i] == NULL) { @@ -3591,7 +3591,7 @@ skip_stream(struct archive_read *a, size if (zip->folder_index == 0) { /* * Optimization for a list mode. - * Avoid unncecessary decoding operations. + * Avoid unnecessary decoding operations. */ zip->si.ci.folders[zip->entry->folderIndex].skipped_bytes += skip_bytes; Modified: head/contrib/libarchive/libarchive/archive_read_support_format_iso9660.c ============================================================================== --- head/contrib/libarchive/libarchive/archive_read_support_format_iso9660.c Tue Jan 10 21:52:48 2017 (r311902) +++ head/contrib/libarchive/libarchive/archive_read_support_format_iso9660.c Tue Jan 10 21:59:35 2017 (r311903) @@ -322,7 +322,7 @@ struct iso9660 { struct archive_string pathname; char seenRockridge; /* Set true if RR extensions are used. */ - char seenSUSP; /* Set true if SUSP is beging used. */ + char seenSUSP; /* Set true if SUSP is being used. */ char seenJoliet; unsigned char suspOffset; Modified: head/contrib/libarchive/libarchive/archive_read_support_format_lha.c ============================================================================== --- head/contrib/libarchive/libarchive/archive_read_support_format_lha.c Tue Jan 10 21:52:48 2017 (r311902) +++ head/contrib/libarchive/libarchive/archive_read_support_format_lha.c Tue Jan 10 21:59:35 2017 (r311903) @@ -1711,7 +1711,7 @@ lha_crc16(uint16_t crc, const void *pp, */ for (;len >= 8; len -= 8) { /* This if statement expects compiler optimization will - * remove the stament which will not be executed. */ + * remove the statement which will not be executed. */ #undef bswap16 #if defined(_MSC_VER) && _MSC_VER >= 1400 /* Visual Studio */ # define bswap16(x) _byteswap_ushort(x) Modified: head/contrib/libarchive/libarchive/archive_read_support_format_rar.c ============================================================================== --- head/contrib/libarchive/libarchive/archive_read_support_format_rar.c Tue Jan 10 21:52:48 2017 (r311902) +++ head/contrib/libarchive/libarchive/archive_read_support_format_rar.c Tue Jan 10 21:59:35 2017 (r311903) @@ -906,7 +906,7 @@ archive_read_format_rar_read_header(stru sizeof(rar->reserved2)); } - /* Main header is password encrytped, so we cannot read any + /* Main header is password encrypted, so we cannot read any file names or any other info about files from the header. */ if (rar->main_flags & MHD_PASSWORD) { Modified: head/contrib/libarchive/libarchive/archive_read_support_format_tar.c ============================================================================== --- head/contrib/libarchive/libarchive/archive_read_support_format_tar.c Tue Jan 10 21:52:48 2017 (r311902) +++ head/contrib/libarchive/libarchive/archive_read_support_format_tar.c Tue Jan 10 21:59:35 2017 (r311903) @@ -204,13 +204,14 @@ static int archive_read_format_tar_read_ struct archive_entry *); static int checksum(struct archive_read *, const void *); static int pax_attribute(struct archive_read *, struct tar *, - struct archive_entry *, const char *key, const char *value); + struct archive_entry *, const char *key, const char *value, + size_t value_length); static int pax_attribute_acl(struct archive_read *, struct tar *, struct archive_entry *, const char *, int); static int pax_attribute_xattr(struct archive_entry *, const char *, const char *); static int pax_header(struct archive_read *, struct tar *, - struct archive_entry *, char *attr); + struct archive_entry *, struct archive_string *); static void pax_time(const char *, int64_t *sec, long *nanos); static ssize_t readline(struct archive_read *, struct tar *, const char **, ssize_t limit, size_t *); @@ -1483,7 +1484,7 @@ header_pax_extensions(struct archive_rea * and then skip any fields in the standard header that were * defined in the pax header. */ - err2 = pax_header(a, tar, entry, tar->pax_header.s); + err2 = pax_header(a, tar, entry, &tar->pax_header); err = err_combine(err, err2); tar->entry_padding = 0x1ff & (-tar->entry_bytes_remaining); return (err); @@ -1564,16 +1565,17 @@ header_ustar(struct archive_read *a, str */ static int pax_header(struct archive_read *a, struct tar *tar, - struct archive_entry *entry, char *attr) + struct archive_entry *entry, struct archive_string *in_as) { - size_t attr_length, l, line_length; + size_t attr_length, l, line_length, value_length; char *p; char *key, *value; struct archive_string *as; struct archive_string_conv *sconv; int err, err2; + char *attr = in_as->s; - attr_length = strlen(attr); + attr_length = in_as->length; tar->pax_hdrcharset_binary = 0; archive_string_empty(&(tar->entry_gname)); archive_string_empty(&(tar->entry_linkpath)); @@ -1638,11 +1640,13 @@ pax_header(struct archive_read *a, struc } *p = '\0'; - /* Identify null-terminated 'value' portion. */ value = p + 1; + /* Some values may be binary data */ + value_length = attr + line_length - 1 - value; + /* Identify this attribute and set it in the entry. */ - err2 = pax_attribute(a, tar, entry, key, value); + err2 = pax_attribute(a, tar, entry, key, value, value_length); if (err2 == ARCHIVE_FATAL) return (err2); err = err_combine(err, err2); @@ -1764,6 +1768,20 @@ pax_attribute_xattr(struct archive_entry } static int +pax_attribute_schily_xattr(struct archive_entry *entry, + const char *name, const char *value, size_t value_length) +{ + if (strlen(name) < 14 || (memcmp(name, "SCHILY.xattr.", 13)) != 0) + return 1; + + name += 13; + + archive_entry_xattr_add_entry(entry, name, value, value_length); + + return 0; +} + +static int pax_attribute_acl(struct archive_read *a, struct tar *tar, struct archive_entry *entry, const char *value, int type) { @@ -1824,7 +1842,7 @@ pax_attribute_acl(struct archive_read *a */ static int pax_attribute(struct archive_read *a, struct tar *tar, - struct archive_entry *entry, const char *key, const char *value) + struct archive_entry *entry, const char *key, const char *value, size_t value_length) { int64_t s; long n; @@ -1961,6 +1979,9 @@ pax_attribute(struct archive_read *a, st } else if (strcmp(key, "SCHILY.realsize") == 0) { tar->realsize = tar_atol10(value, strlen(value)); archive_entry_set_size(entry, tar->realsize); + } else if (strncmp(key, "SCHILY.xattr.", 13) == 0) { + pax_attribute_schily_xattr(entry, key, value, + value_length); } else if (strcmp(key, "SUN.holesdata") == 0) { /* A Solaris extension for sparse. */ r = solaris_sparse_parse(a, tar, entry, value); Modified: head/contrib/libarchive/libarchive/archive_read_support_format_warc.c ============================================================================== --- head/contrib/libarchive/libarchive/archive_read_support_format_warc.c Tue Jan 10 21:52:48 2017 (r311902) +++ head/contrib/libarchive/libarchive/archive_read_support_format_warc.c Tue Jan 10 21:59:35 2017 (r311903) @@ -88,7 +88,7 @@ typedef enum { WT_RVIS, /* conversion, unsupported */ WT_CONV, - /* continutation, unsupported at the moment */ + /* continuation, unsupported at the moment */ WT_CONT, /* invalid type */ LAST_WT @@ -562,7 +562,7 @@ xstrpisotime(const char *s, char **endpt goto out; } - /* massage TM to fulfill some of POSIX' contraints */ + /* massage TM to fulfill some of POSIX' constraints */ tm.tm_year -= 1900; tm.tm_mon--; Modified: head/contrib/libarchive/libarchive/archive_read_support_format_zip.c ============================================================================== --- head/contrib/libarchive/libarchive/archive_read_support_format_zip.c Tue Jan 10 21:52:48 2017 (r311902) +++ head/contrib/libarchive/libarchive/archive_read_support_format_zip.c Tue Jan 10 21:59:35 2017 (r311903) @@ -199,7 +199,7 @@ struct zip { struct trad_enc_ctx tctx; char tctx_valid; - /* WinZip AES decyption. */ + /* WinZip AES decryption. */ /* Contexts used for AES decryption. */ archive_crypto_ctx cctx; char cctx_valid; @@ -242,7 +242,7 @@ trad_enc_update_keys(struct trad_enc_ctx } static uint8_t -trad_enc_decypt_byte(struct trad_enc_ctx *ctx) +trad_enc_decrypt_byte(struct trad_enc_ctx *ctx) { unsigned temp = ctx->keys[2] | 2; return (uint8_t)((temp * (temp ^ 1)) >> 8) & 0xff; @@ -257,7 +257,7 @@ trad_enc_decrypt_update(struct trad_enc_ max = (unsigned)((in_len < out_len)? in_len: out_len); for (i = 0; i < max; i++) { - uint8_t t = in[i] ^ trad_enc_decypt_byte(ctx); + uint8_t t = in[i] ^ trad_enc_decrypt_byte(ctx); out[i] = t; trad_enc_update_keys(ctx, t); } @@ -710,7 +710,7 @@ process_extra(struct archive_read *a, co break; } case 0x9901: - /* WinZIp AES extra data field. */ + /* WinZip AES extra data field. */ if (p[offset + 2] == 'A' && p[offset + 3] == 'E') { /* Vendor version. */ zip_entry->aes_extra.vendor = @@ -1518,7 +1518,7 @@ read_decryption_header(struct archive_re case 0x6720:/* Blowfish */ case 0x6721:/* Twofish */ case 0x6801:/* RC4 */ - /* Suuported encryption algorithm. */ + /* Supported encryption algorithm. */ break; default: archive_set_error(&a->archive, @@ -1627,7 +1627,7 @@ read_decryption_header(struct archive_re __archive_read_consume(a, 4); /*return (ARCHIVE_OK); - * This is not fully implemnted yet.*/ + * This is not fully implemented yet.*/ archive_set_error(&a->archive, ARCHIVE_ERRNO_FILE_FORMAT, "Encrypted file is unsupported"); return (ARCHIVE_FAILED); @@ -1709,7 +1709,7 @@ init_traditional_PKWARE_decryption(struc } /* - * Initialize ctx for Traditional PKWARE Decyption. + * Initialize ctx for Traditional PKWARE Decryption. */ r = trad_enc_init(&zip->tctx, passphrase, strlen(passphrase), p, ENC_HEADER_SIZE, &crcchk); Modified: head/contrib/libarchive/libarchive/archive_string.c ============================================================================== --- head/contrib/libarchive/libarchive/archive_string.c Tue Jan 10 21:52:48 2017 (r311902) +++ head/contrib/libarchive/libarchive/archive_string.c Tue Jan 10 21:59:35 2017 (r311903) @@ -219,6 +219,12 @@ archive_wstring_append(struct archive_ws return (as); } +struct archive_string * +archive_array_append(struct archive_string *as, const char *p, size_t s) +{ + return archive_string_append(as, p, s); +} + void archive_string_concat(struct archive_string *dest, struct archive_string *src) { @@ -597,7 +603,7 @@ archive_wstring_append_from_mbs(struct a wcs = dest->s + dest->length; /* * We cannot use mbsrtowcs/mbstowcs here because those may convert - * extra MBS when strlen(p) > len and one wide character consis of + * extra MBS when strlen(p) > len and one wide character consists of * multi bytes. */ while (*mbs && mbs_length > 0) { @@ -1248,7 +1254,7 @@ create_sconv_object(const char *fc, cons sc->cd = iconv_open(tc, fc); if (sc->cd == (iconv_t)-1 && (sc->flag & SCONV_BEST_EFFORT)) { /* - * Unfortunaly, all of iconv implements do support + * Unfortunately, all of iconv implements do support * "CP932" character-set, so we should use "SJIS" * instead if iconv_open failed. */ @@ -1261,7 +1267,7 @@ create_sconv_object(const char *fc, cons /* * archive_mstring on Windows directly convert multi-bytes * into archive_wstring in order not to depend on locale - * so that you can do a I18N programing. This will be + * so that you can do a I18N programming. This will be * used only in archive_mstring_copy_mbs_len_l so far. */ if (flag & SCONV_FROM_CHARSET) { @@ -1726,7 +1732,7 @@ archive_string_conversion_from_charset(s * in tar or zip files. But mbstowcs/wcstombs(CRT) usually use CP_ACP * unless you use setlocale(LC_ALL, ".OCP")(specify CP_OEMCP). * So we should make a string conversion between CP_ACP and CP_OEMCP - * for compatibillty. + * for compatibility. */ #if defined(_WIN32) && !defined(__CYGWIN__) struct archive_string_conv * @@ -2220,7 +2226,7 @@ best_effort_strncat_in_locale(struct arc /* * If a character is ASCII, this just copies it. If not, this - * assigns '?' charater instead but in UTF-8 locale this assigns + * assigns '?' character instead but in UTF-8 locale this assigns * byte sequence 0xEF 0xBD 0xBD, which are code point U+FFFD, * a Replacement Character in Unicode. */ @@ -2554,7 +2560,7 @@ utf16_to_unicode(uint32_t *pwc, const ch /* * Surrogate pair values(0xd800 through 0xdfff) are only - * used by UTF-16, so, after above culculation, the code + * used by UTF-16, so, after above calculation, the code * must not be surrogate values, and Unicode has no codes * larger than 0x10ffff. Thus, those are not legal Unicode * values. @@ -2903,7 +2909,7 @@ get_nfc(uint32_t uc, uint32_t uc2) /* * Normalize UTF-8/UTF-16BE characters to Form C and copy the result. * - * TODO: Convert composition exclusions,which are never converted + * TODO: Convert composition exclusions, which are never converted * from NFC,NFD,NFKC and NFKD, to Form C. */ static int @@ -3437,7 +3443,7 @@ strncat_from_utf8_libarchive2(struct arc } /* - * As libarchie 2.x, translates the UTF-8 characters into + * As libarchive 2.x, translates the UTF-8 characters into * wide-characters in the assumption that WCS is Unicode. */ if (n < 0) { @@ -3947,7 +3953,7 @@ archive_mstring_get_mbs_l(struct archive #if defined(_WIN32) && !defined(__CYGWIN__) /* - * Internationalization programing on Windows must use Wide + * Internationalization programming on Windows must use Wide * characters because Windows platform cannot make locale UTF-8. */ if (sc != NULL && (aes->aes_set & AES_SET_WCS) != 0) { @@ -4079,7 +4085,7 @@ archive_mstring_copy_mbs_len_l(struct ar archive_string_empty(&(aes->aes_utf8)); #if defined(_WIN32) && !defined(__CYGWIN__) /* - * Internationalization programing on Windows must use Wide + * Internationalization programming on Windows must use Wide * characters because Windows platform cannot make locale UTF-8. */ if (sc == NULL) { Modified: head/contrib/libarchive/libarchive/archive_string.h ============================================================================== --- head/contrib/libarchive/libarchive/archive_string.h Tue Jan 10 21:52:48 2017 (r311902) +++ head/contrib/libarchive/libarchive/archive_string.h Tue Jan 10 21:59:35 2017 (r311903) @@ -81,6 +81,10 @@ archive_strappend_char(struct archive_st struct archive_wstring * archive_wstrappend_wchar(struct archive_wstring *, wchar_t); +/* Append a raw array to an archive_string, resizing as necessary */ +struct archive_string * +archive_array_append(struct archive_string *, const char *, size_t); + /* Convert a Unicode string to current locale and append the result. */ /* Returns -1 if conversion fails. */ int Modified: head/contrib/libarchive/libarchive/archive_string_composition.h ============================================================================== --- head/contrib/libarchive/libarchive/archive_string_composition.h Tue Jan 10 21:52:48 2017 (r311902) +++ head/contrib/libarchive/libarchive/archive_string_composition.h Tue Jan 10 21:59:35 2017 (r311903) @@ -1009,7 +1009,7 @@ static const char u_decomposable_blocks[ (((uc) > 0x1D244)?0:\ ccc_val[ccc_val_index[ccc_index[(uc)>>8]][((uc)>>4)&0x0F]][(uc)&0x0F]) -/* The table of the value of Canonical Cimbining Class */ +/* The table of the value of Canonical Combining Class */ static const unsigned char ccc_val[][16] = { /* idx=0: XXXX0 - XXXXF */ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, Modified: head/contrib/libarchive/libarchive/archive_write.c ============================================================================== --- head/contrib/libarchive/libarchive/archive_write.c Tue Jan 10 21:52:48 2017 (r311902) +++ head/contrib/libarchive/libarchive/archive_write.c Tue Jan 10 21:59:35 2017 (r311903) @@ -231,7 +231,7 @@ __archive_write_filter(struct archive_wr if (length == 0) return(ARCHIVE_OK); if (f->write == NULL) - /* If unset, a fatal error has already ocuured, so this filter + /* If unset, a fatal error has already occurred, so this filter * didn't open. We cannot write anything. */ return(ARCHIVE_FATAL); r = (f->write)(f, buff, length); Modified: head/contrib/libarchive/libarchive/archive_write_add_filter_xz.c ============================================================================== --- head/contrib/libarchive/libarchive/archive_write_add_filter_xz.c Tue Jan 10 21:52:48 2017 (r311902) +++ head/contrib/libarchive/libarchive/archive_write_add_filter_xz.c Tue Jan 10 21:59:35 2017 (r311903) @@ -233,7 +233,7 @@ archive_compressor_xz_init_stream(struct if (f->code == ARCHIVE_FILTER_XZ) { #ifdef HAVE_LZMA_STREAM_ENCODER_MT if (data->threads != 1) { - bzero(&mt_options, sizeof(mt_options)); + memset(&mt_options, 0, sizeof(mt_options)); mt_options.threads = data->threads; mt_options.timeout = 300; mt_options.filters = data->lzmafilters; Modified: head/contrib/libarchive/libarchive/archive_write_disk_acl.c ============================================================================== --- head/contrib/libarchive/libarchive/archive_write_disk_acl.c Tue Jan 10 21:52:48 2017 (r311902) +++ head/contrib/libarchive/libarchive/archive_write_disk_acl.c Tue Jan 10 21:59:35 2017 (r311903) @@ -124,7 +124,10 @@ static struct { {ARCHIVE_ENTRY_ACL_ENTRY_FILE_INHERIT, ACL_ENTRY_FILE_INHERIT}, {ARCHIVE_ENTRY_ACL_ENTRY_DIRECTORY_INHERIT, ACL_ENTRY_DIRECTORY_INHERIT}, {ARCHIVE_ENTRY_ACL_ENTRY_NO_PROPAGATE_INHERIT, ACL_ENTRY_NO_PROPAGATE_INHERIT}, - {ARCHIVE_ENTRY_ACL_ENTRY_INHERIT_ONLY, ACL_ENTRY_INHERIT_ONLY} + {ARCHIVE_ENTRY_ACL_ENTRY_INHERIT_ONLY, ACL_ENTRY_INHERIT_ONLY}, + {ARCHIVE_ENTRY_ACL_ENTRY_SUCCESSFUL_ACCESS, ACL_ENTRY_SUCCESSFUL_ACCESS}, + {ARCHIVE_ENTRY_ACL_ENTRY_FAILED_ACCESS, ACL_ENTRY_FAILED_ACCESS}, + {ARCHIVE_ENTRY_ACL_ENTRY_INHERITED, ACL_ENTRY_INHERITED} }; #endif @@ -292,29 +295,41 @@ set_acl(struct archive *a, int fd, const } /* Try restoring the ACL through 'fd' if we can. */ -#if HAVE_ACL_SET_FD - if (fd >= 0 && acl_type == ACL_TYPE_ACCESS && acl_set_fd(fd, acl) == 0) - ret = ARCHIVE_OK; - else -#else +#if HAVE_ACL_SET_FD_NP || HAVE_ACL_SET_FD #if HAVE_ACL_SET_FD_NP - if (fd >= 0 && acl_set_fd_np(fd, acl, acl_type) == 0) - ret = ARCHIVE_OK; - else -#endif -#endif + if (fd >= 0) { + if (acl_set_fd_np(fd, acl, acl_type) == 0) +#else /* HAVE_ACL_SET_FD */ + if (fd >= 0 && acl_type == ACL_TYPE_ACCESS) { + if (acl_set_fd(fd, acl) == 0) +#endif + ret = ARCHIVE_OK; + else { + if (errno == EOPNOTSUPP) { + /* Filesystem doesn't support ACLs */ + ret = ARCHIVE_OK; + } else { + archive_set_error(a, errno, + "Failed to set %s acl on fd", tname); + } + } + } else +#endif /* HAVE_ACL_SET_FD_NP || HAVE_ACL_SET_FD */ #if HAVE_ACL_SET_LINK_NP - if (acl_set_link_np(name, acl_type, acl) != 0) { - archive_set_error(a, errno, "Failed to set %s acl", tname); - ret = ARCHIVE_WARN; - } + if (acl_set_link_np(name, acl_type, acl) != 0) { #else /* TODO: Skip this if 'name' is a symlink. */ if (acl_set_file(name, acl_type, acl) != 0) { - archive_set_error(a, errno, "Failed to set %s acl", tname); - ret = ARCHIVE_WARN; - } #endif + if (errno == EOPNOTSUPP) { + /* Filesystem doesn't support ACLs */ + ret = ARCHIVE_OK; + } else { + archive_set_error(a, errno, "Failed to set %s acl", + tname); + ret = ARCHIVE_WARN; + } + } exit_free: acl_free(acl); return (ret); Modified: head/contrib/libarchive/libarchive/archive_write_set_format_7zip.c ============================================================================== --- head/contrib/libarchive/libarchive/archive_write_set_format_7zip.c Tue Jan 10 21:52:48 2017 (r311902) +++ head/contrib/libarchive/libarchive/archive_write_set_format_7zip.c Tue Jan 10 21:59:35 2017 (r311903) @@ -1358,7 +1358,7 @@ make_header(struct archive_write *a, uin if (r < 0) return (r); - /* Write Nume size. */ + /* Write Name size. */ r = enc_uint64(a, zip->total_bytes_entry_name+1); if (r < 0) return (r); Modified: head/contrib/libarchive/libarchive/archive_write_set_format_pax.c ============================================================================== --- head/contrib/libarchive/libarchive/archive_write_set_format_pax.c Tue Jan 10 21:52:48 2017 (r311902) +++ head/contrib/libarchive/libarchive/archive_write_set_format_pax.c Tue Jan 10 21:59:35 2017 (r311903) @@ -62,10 +62,17 @@ struct pax { struct sparse_block *sparse_tail; struct archive_string_conv *sconv_utf8; int opt_binary; + + unsigned flags; +#define WRITE_SCHILY_XATTR (1 << 0) +#define WRITE_LIBARCHIVE_XATTR (1 << 1) }; static void add_pax_attr(struct archive_string *, const char *key, const char *value); +static void add_pax_attr_binary(struct archive_string *, + const char *key, + const char *value, size_t value_len); static void add_pax_attr_int(struct archive_string *, const char *key, int64_t value); static void add_pax_attr_time(struct archive_string *, @@ -136,6 +143,8 @@ archive_write_set_format_pax(struct arch "Can't allocate pax data"); return (ARCHIVE_FATAL); } + pax->flags = WRITE_LIBARCHIVE_XATTR | WRITE_SCHILY_XATTR; + a->format_data = pax; a->format_name = "pax"; a->format_options = archive_write_pax_options; @@ -275,6 +284,17 @@ add_pax_attr_int(struct archive_string * static void add_pax_attr(struct archive_string *as, const char *key, const char *value) { + add_pax_attr_binary(as, key, value, strlen(value)); +} + +/* + * Add a key/value attribute to the pax header. This function handles + * binary values. + */ +static void +add_pax_attr_binary(struct archive_string *as, const char *key, + const char *value, size_t value_len) +{ int digits, i, len, next_ten; char tmp[1 + 3 * sizeof(int)]; /* < 3 base-10 digits per byte */ @@ -282,7 +302,7 @@ add_pax_attr(struct archive_string *as, * PAX attributes have the following layout: * <=> */ - len = 1 + (int)strlen(key) + 1 + (int)strlen(value) + 1; + len = 1 + (int)strlen(key) + 1 + (int)value_len + 1; /* * The field includes the length of the field, so @@ -313,21 +333,47 @@ add_pax_attr(struct archive_string *as, archive_strappend_char(as, ' '); archive_strcat(as, key); archive_strappend_char(as, '='); - archive_strcat(as, value); + archive_array_append(as, value, value_len); archive_strappend_char(as, '\n'); } +static void +archive_write_pax_header_xattr(struct pax *pax, const char *encoded_name, + const void *value, size_t value_len) +{ + struct archive_string s; + char *encoded_value; + + if (pax->flags & WRITE_LIBARCHIVE_XATTR) { + encoded_value = base64_encode((const char *)value, value_len); + + if (encoded_name != NULL && encoded_value != NULL) { + archive_string_init(&s); + archive_strcpy(&s, "LIBARCHIVE.xattr."); + archive_strcat(&s, encoded_name); + add_pax_attr(&(pax->pax_header), s.s, encoded_value); + archive_string_free(&s); + } + free(encoded_value); + } + if (pax->flags & WRITE_SCHILY_XATTR) { + archive_string_init(&s); + archive_strcpy(&s, "SCHILY.xattr."); + archive_strcat(&s, encoded_name); + add_pax_attr_binary(&(pax->pax_header), s.s, value, value_len); + archive_string_free(&s); + } +} + static int archive_write_pax_header_xattrs(struct archive_write *a, struct pax *pax, struct archive_entry *entry) { - struct archive_string s; int i = archive_entry_xattr_reset(entry); while (i--) { const char *name; const void *value; - char *encoded_value; char *url_encoded_name = NULL, *encoded_name = NULL; size_t size; int r; @@ -348,16 +394,9 @@ archive_write_pax_header_xattrs(struct a } } - encoded_value = base64_encode((const char *)value, size); + archive_write_pax_header_xattr(pax, encoded_name, + value, size); - if (encoded_name != NULL && encoded_value != NULL) { - archive_string_init(&s); - archive_strcpy(&s, "LIBARCHIVE.xattr."); - archive_strcat(&s, encoded_name); - add_pax_attr(&(pax->pax_header), s.s, encoded_value); - archive_string_free(&s); - } - free(encoded_value); } return (ARCHIVE_OK); } Modified: head/contrib/libarchive/libarchive/archive_write_set_format_xar.c ============================================================================== --- head/contrib/libarchive/libarchive/archive_write_set_format_xar.c Tue Jan 10 21:52:48 2017 (r311902) +++ head/contrib/libarchive/libarchive/archive_write_set_format_xar.c Tue Jan 10 21:59:35 2017 (r311903) @@ -2913,7 +2913,7 @@ compression_init_encoder_xz(struct archi *strm = lzma_init_data; #ifdef HAVE_LZMA_STREAM_ENCODER_MT if (threads > 1) { - bzero(&mt_options, sizeof(mt_options)); + memset(&mt_options, 0, sizeof(mt_options)); mt_options.threads = threads; mt_options.timeout = 300; mt_options.filters = lzmafilters; Modified: head/contrib/libarchive/libarchive/archive_write_set_format_zip.c ============================================================================== --- head/contrib/libarchive/libarchive/archive_write_set_format_zip.c Tue Jan 10 21:52:48 2017 (r311902) +++ head/contrib/libarchive/libarchive/archive_write_set_format_zip.c Tue Jan 10 21:59:35 2017 (r311903) @@ -878,7 +878,7 @@ archive_write_zip_header(struct archive_ || zip->entry_encryption == ENCRYPTION_WINZIP_AES256)) { memcpy(e, "\001\231\007\000\001\000AE", 8); - /* AES vendoer version AE-2 does not store a CRC. + /* AES vendor version AE-2 does not store a CRC. * WinZip 11 uses AE-1, which does store the CRC, * but it does not store the CRC when the file size * is less than 20 bytes. So we simulate what @@ -1013,7 +1013,7 @@ archive_write_zip_data(struct archive_wr if (zip->entry_flags & ZIP_ENTRY_FLAG_ENCRYPTED) { switch (zip->entry_encryption) { case ENCRYPTION_TRADITIONAL: - /* Initialize traditoinal PKWARE encryption context. */ + /* Initialize traditional PKWARE encryption context. */ if (!zip->tctx_valid) { ret = init_traditional_pkware_encryption(a); if (ret != ARCHIVE_OK) @@ -1499,7 +1499,7 @@ trad_enc_update_keys(struct trad_enc_ctx } static uint8_t -trad_enc_decypt_byte(struct trad_enc_ctx *ctx) +trad_enc_decrypt_byte(struct trad_enc_ctx *ctx) { unsigned temp = ctx->keys[2] | 2; return (uint8_t)((temp * (temp ^ 1)) >> 8) & 0xff; @@ -1515,7 +1515,7 @@ trad_enc_encrypt_update(struct trad_enc_ for (i = 0; i < max; i++) { uint8_t t = in[i]; - out[i] = t ^ trad_enc_decypt_byte(ctx); + out[i] = t ^ trad_enc_decrypt_byte(ctx); trad_enc_update_keys(ctx, t); } return i; @@ -1626,7 +1626,7 @@ init_winzip_aes_encryption(struct archiv return (ARCHIVE_FAILED); } - /* Set a passowrd verification value after the 'salt'. */ + /* Set a password verification value after the 'salt'. */ salt[salt_len] = derived_key[key_len * 2]; salt[salt_len + 1] = derived_key[key_len * 2 + 1]; Modified: head/contrib/libarchive/libarchive/test/test_archive_read_add_passphrase.c ============================================================================== --- head/contrib/libarchive/libarchive/test/test_archive_read_add_passphrase.c Tue Jan 10 21:52:48 2017 (r311902) +++ head/contrib/libarchive/libarchive/test/test_archive_read_add_passphrase.c Tue Jan 10 21:59:35 2017 (r311903) @@ -191,7 +191,7 @@ DEFINE_TEST(test_archive_read_add_passph /* Fist call, we should get "passCallBack" as a passphrase. */ assertEqualString("passCallBack", __archive_read_next_passphrase(ar)); __archive_read_reset_passphrase(ar); - /* After reset passphrase, we should get "passCallBack"passphrase. */ + /* After reset passphrase, we should get "passCallBack" passphrase. */ assertEqualString("passCallBack", __archive_read_next_passphrase(ar)); /* Second call, we should get NULL which means all the passphrases * are passed already. */ Modified: head/contrib/libarchive/libarchive/test/test_compat_uudecode.c ============================================================================== --- head/contrib/libarchive/libarchive/test/test_compat_uudecode.c Tue Jan 10 21:52:48 2017 (r311902) +++ head/contrib/libarchive/libarchive/test/test_compat_uudecode.c Tue Jan 10 21:59:35 2017 (r311903) @@ -40,7 +40,7 @@ static char archive_data[] = { }; /* - * Compatibility: uudecode command ignores junk data placed ater the "end" + * Compatibility: uudecode command ignores junk data placed after the "end" * marker. */ DEFINE_TEST(test_compat_uudecode) Modified: head/contrib/libarchive/libarchive/test/test_read_format_cpio_afio.c ============================================================================== --- head/contrib/libarchive/libarchive/test/test_read_format_cpio_afio.c Tue Jan 10 21:52:48 2017 (r311902) +++ head/contrib/libarchive/libarchive/test/test_read_format_cpio_afio.c Tue Jan 10 21:59:35 2017 (r311903) @@ -27,7 +27,7 @@ __FBSDID("$FreeBSD$"); /* -ecute the following to rebuild the data for this program: +execute the following to rebuild the data for this program: tail -n +33 test_read_format_cpio_afio.c | /bin/sh # How to make a sample data. Modified: head/contrib/libarchive/libarchive/test/test_read_format_zip_traditional_encryption_data.c ============================================================================== --- head/contrib/libarchive/libarchive/test/test_read_format_zip_traditional_encryption_data.c Tue Jan 10 21:52:48 2017 (r311902) +++ head/contrib/libarchive/libarchive/test/test_read_format_zip_traditional_encryption_data.c Tue Jan 10 21:59:35 2017 (r311903) @@ -28,7 +28,7 @@ __FBSDID("$FreeBSD$"); DEFINE_TEST(test_read_format_zip_traditional_encryption_data) { - /* This file is password protected (Traditional PKWARE Enctypted). + /* This file is password protected (Traditional PKWARE Encrypted). The headers are NOT encrypted. Password is "12345678". */ const char *refname = "test_read_format_zip_traditional_encryption_data.zip"; @@ -36,7 +36,7 @@ DEFINE_TEST(test_read_format_zip_traditi struct archive *a; char buff[512]; - /* Check if running system has cryptographic functionarity. */ + /* Check if running system has cryptographic functionality. */ assert((a = archive_write_new()) != NULL); assertEqualIntA(a, ARCHIVE_OK, archive_write_set_format_zip(a)); assertEqualIntA(a, ARCHIVE_OK, archive_write_add_filter_none(a)); Modified: head/contrib/libarchive/libarchive/test/test_read_format_zip_winzip_aes.c ============================================================================== --- head/contrib/libarchive/libarchive/test/test_read_format_zip_winzip_aes.c Tue Jan 10 21:52:48 2017 (r311902) +++ head/contrib/libarchive/libarchive/test/test_read_format_zip_winzip_aes.c Tue Jan 10 21:59:35 2017 (r311903) @@ -33,7 +33,7 @@ test_winzip_aes(const char *refname, int struct archive *a; char buff[512]; - /* Check if running system has cryptographic functionarity. */ + /* Check if running system has cryptographic functionality. */ assert((a = archive_write_new()) != NULL); assertEqualIntA(a, ARCHIVE_OK, archive_write_set_format_zip(a)); assertEqualIntA(a, ARCHIVE_OK, archive_write_add_filter_none(a)); Modified: head/contrib/libarchive/libarchive/test/test_read_format_zip_winzip_aes_large.c ============================================================================== --- head/contrib/libarchive/libarchive/test/test_read_format_zip_winzip_aes_large.c Tue Jan 10 21:52:48 2017 (r311902) +++ head/contrib/libarchive/libarchive/test/test_read_format_zip_winzip_aes_large.c Tue Jan 10 21:59:35 2017 (r311903) @@ -34,7 +34,7 @@ DEFINE_TEST(test_read_format_zip_winzip_ char buff[512]; - /* Check if running system has cryptographic functionarity. */ + /* Check if running system has cryptographic functionality. */ assert((a = archive_write_new()) != NULL); assertEqualIntA(a, ARCHIVE_OK, archive_write_set_format_zip(a)); assertEqualIntA(a, ARCHIVE_OK, archive_write_add_filter_none(a)); Copied: head/contrib/libarchive/libarchive/test/test_read_pax_schily_xattr.c (from r311899, vendor/libarchive/dist/libarchive/test/test_read_pax_schily_xattr.c) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/contrib/libarchive/libarchive/test/test_read_pax_schily_xattr.c Tue Jan 10 21:59:35 2017 (r311903, copy of r311899, vendor/libarchive/dist/libarchive/test/test_read_pax_schily_xattr.c) @@ -0,0 +1,70 @@ +/*- + * Copyright (c) 2016 IBM Corporation + * Copyright (c) 2003-2007 Tim Kientzle + * + * 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. + * + * This test case's code has been derived from test_entry.c + */ +#include "test.h" + +DEFINE_TEST(test_schily_xattr_pax) +{ + struct archive *a; + struct archive_entry *ae; + const char *refname = "test_read_pax_schily_xattr.tar"; + const char *xname; /* For xattr tests. */ + const void *xval; /* For xattr tests. */ + size_t xsize; /* For xattr tests. */ + const char *string, *array; + + assert((a = archive_read_new()) != NULL); + assertEqualIntA(a, ARCHIVE_OK, archive_read_support_filter_all(a)); + assertEqualIntA(a, ARCHIVE_OK, archive_read_support_format_all(a)); + + extract_reference_file(refname); + assertEqualIntA(a, ARCHIVE_OK, + archive_read_open_filename(a, refname, 10240)); + + assertEqualInt(ARCHIVE_OK, archive_read_next_header(a, &ae)); + assertEqualInt(2, archive_entry_xattr_count(ae)); + assertEqualInt(2, archive_entry_xattr_reset(ae)); + + assertEqualInt(0, archive_entry_xattr_next(ae, &xname, &xval, &xsize)); + assertEqualString(xname, "security.selinux"); + string = "system_u:object_r:unlabeled_t:s0"; + assertEqualString(xval, string); + /* the xattr's value also contains the terminating \0 */ + assertEqualInt((int)xsize, strlen(string) + 1); + + assertEqualInt(0, archive_entry_xattr_next(ae, &xname, &xval, &xsize)); + assertEqualString(xname, "security.ima"); + assertEqualInt((int)xsize, 265); + /* we only compare the first 12 bytes */ + array = "\x03\x02\x04\xb0\xe9\xd6\x79\x01\x00\x2b\xad\x1e"; + assertEqualMem(xval, array, 12); + + /* Close the archive. */ + assertEqualInt(ARCHIVE_OK, archive_read_close(a)); + assertEqualInt(ARCHIVE_OK, archive_read_free(a)); +} Copied: head/contrib/libarchive/libarchive/test/test_read_pax_schily_xattr.tar.uu (from r311899, vendor/libarchive/dist/libarchive/test/test_read_pax_schily_xattr.tar.uu) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/contrib/libarchive/libarchive/test/test_read_pax_schily_xattr.tar.uu Tue Jan 10 21:59:35 2017 (r311903, copy of r311899, vendor/libarchive/dist/libarchive/test/test_read_pax_schily_xattr.tar.uu) @@ -0,0 +1,231 @@ +begin 644 test_schily_xattr_pax.tar +M+B]087A(96%D97)S+C$U,C4O8V]N9F9I;&5S```````````````````````` +M```````````````````````````````````````````````````````````` +M`````````````#`P,#`V-#0`,#`P,#`P,``P,#`P,#`P`#`P,#`P,#`P-C0W +M`#$R-S$R,C$P-3`V`#`Q,C4V-@`@>``````````````````````````````` +M```````````````````````````````````````````````````````````` +M``````````````````````````````````````````!UW6X5O?Y6: +M9^':P2MZR[4)$@W?)B6GX0U@<,0M%6YNMO%OG+IS%/.< +M,"A(N&S.F9]=!*5=\).X."2$GUGJ,0C:@+G#$M_E8UQP,LU-G(8IKW^K^<8* +M*3_.N0'%8.^$8S$`D9XOF+DK<<)U34U'_"O5/22YS96QI;G5X +M/7-Y Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9068BCAA230; Tue, 10 Jan 2017 22:00:50 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2610:1c1:1:6074::16:84]) by mx1.freebsd.org (Postfix) with ESMTP id 003441301; Tue, 10 Jan 2017 22:00:49 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Subject: Re: svn commit: r311667 - in head/sys/contrib/dev/acpica: components/namespace components/tables include To: John Baldwin , "Conrad E. Meyer" References: <201701080626.v086QXDx022252@repo.freebsd.org> <7685799.RHuinLcsJW@ralph.baldwin.cx> <53d948ef-9e7e-422f-aead-39437abc8352@FreeBSD.org> Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org From: Jung-uk Kim Message-ID: <0e8abb94-160a-7ca2-1c67-3d3ef8fa522e@FreeBSD.org> Date: Tue, 10 Jan 2017 17:00:49 -0500 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:45.0) Gecko/20100101 Thunderbird/45.6.0 MIME-Version: 1.0 In-Reply-To: <53d948ef-9e7e-422f-aead-39437abc8352@FreeBSD.org> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 10 Jan 2017 22:00:50 -0000 On 01/09/2017 13:01, Jung-uk Kim wrote: > On 01/09/2017 12:08, John Baldwin wrote: >> On Sunday, January 08, 2017 06:26:33 AM Conrad E. Meyer wrote: >>> Author: cem >>> Date: Sun Jan 8 06:26:33 2017 >>> New Revision: 311667 >>> URL: https://svnweb.freebsd.org/changeset/base/311667 >>> >>> Log: >>> Add some additional ACPI methods for DRM >>> >>> Add AcpiGetDataFull and AcpiGetTableWithSize. >>> >>> Submitted by: Matt Macy >> >> Have these been submitted upstream? The Intel folks are generally quite >> responsive on freebsd-acpi@FreeBSD.org and this codebase is actively >> maintained externally. > > Please submit upstream first. > > https://github.com/acpica/acpica Since nobody responded, I just googled about it. It seems these two functions, AcpiGetDataFull() (aka. acpi_get_data_full() in Linux) and AcpiGetTableWithSize() (aka. acpi_get_table_with_size() in Linux), were only added in linux-pm tree and we only need them for "Graphics" repository. - AcpiGetDataFull() This function is only called by acpi_get_device_data(), which is, in turn, only called by acpi_bus_get_device() with *NULL* callback. Therefore, I don't see any reason to pollute contrib code for this. - AcpiGetTableWithSize() This API is now deprecated by the upstream: http://marc.info/?l=linux-acpi&m=148169906815835 http://marc.info/?l=linux-acpi&m=148169907615836 http://marc.info/?l=linux-acpi&m=148169908115837 http://marc.info/?l=linux-acpi&m=148169908615838 http://marc.info/?l=linux-acpi&m=148169909215840 The code changes were committed to both ACPICA: https://github.com/acpica/acpica/commit/cac67909 and committed to linux-pm tree: https://git.kernel.org/cgit/linux/kernel/git/rafael/linux-pm.git/commit?id=6b11d1d677132816252004426ef220ccd3c92d2f This means it will be removed from future Linux kernel. Therefore, we should NOT implement the deprecated API. Please back out r311667 and r311843 and let me know if you need any help in resolving this matter. Jung-uk Kim From owner-svn-src-head@freebsd.org Tue Jan 10 22:01:39 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2B9D8CAA2CA; Tue, 10 Jan 2017 22:01:39 +0000 (UTC) (envelope-from mm@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id F1BA0170B; Tue, 10 Jan 2017 22:01:38 +0000 (UTC) (envelope-from mm@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v0AM1cD5004247; Tue, 10 Jan 2017 22:01:38 GMT (envelope-from mm@FreeBSD.org) Received: (from mm@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v0AM1cUX004246; Tue, 10 Jan 2017 22:01:38 GMT (envelope-from mm@FreeBSD.org) Message-Id: <201701102201.v0AM1cUX004246@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mm set sender to mm@FreeBSD.org using -f From: Martin Matuska Date: Tue, 10 Jan 2017 22:01:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r311904 - head/lib/libarchive/tests X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 10 Jan 2017 22:01:39 -0000 Author: mm Date: Tue Jan 10 22:01:37 2017 New Revision: 311904 URL: https://svnweb.freebsd.org/changeset/base/311904 Log: Build libarchive tests missing in r311899 MFC after: 1 week X-MFC with: r311899 Modified: head/lib/libarchive/tests/Makefile Modified: head/lib/libarchive/tests/Makefile ============================================================================== --- head/lib/libarchive/tests/Makefile Tue Jan 10 21:59:35 2017 (r311903) +++ head/lib/libarchive/tests/Makefile Tue Jan 10 22:01:37 2017 (r311904) @@ -196,6 +196,7 @@ TESTS_SRCS= \ test_read_format_zip_winzip_aes_large.c \ test_read_format_zip_zip64.c \ test_read_large.c \ + test_read_pax_schily_xattr.c \ test_read_pax_truncated.c \ test_read_position.c \ test_read_set_format.c \ @@ -549,6 +550,7 @@ ${PACKAGE}FILES+= test_read_large_splitt ${PACKAGE}FILES+= test_read_large_splitted_rar_ac.uu ${PACKAGE}FILES+= test_read_large_splitted_rar_ad.uu ${PACKAGE}FILES+= test_read_large_splitted_rar_ae.uu +${PACKAGE}FILES+= test_read_pax_schily_xattr.tar.uu ${PACKAGE}FILES+= test_read_splitted_rar_aa.uu ${PACKAGE}FILES+= test_read_splitted_rar_ab.uu ${PACKAGE}FILES+= test_read_splitted_rar_ac.uu From owner-svn-src-head@freebsd.org Tue Jan 10 23:14:13 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C995CCA97A5; Tue, 10 Jan 2017 23:14:13 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: from mail-wm0-x242.google.com (mail-wm0-x242.google.com [IPv6:2a00:1450:400c:c09::242]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 5FBF5101C; Tue, 10 Jan 2017 23:14:13 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: by mail-wm0-x242.google.com with SMTP id r144so24393337wme.0; Tue, 10 Jan 2017 15:14:13 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=UpNuHVgeqMsT2Mq8GPzbfer4xL7RvC7CMabmXaXLgSU=; b=TU+icee8yK5Hw4dybjdgR1ebvS3ZVuu27NtbAwchHYw3lwHN4IeTwuaqDzIro8YSMx UKV9XGjEjuTnTHUITapw1HCunOmlRm49i5839M7k858FOgbclW0efyuT/OZYBHEgFFaR zkeM/sm8NLlTkp6/M5LaX3pvCwORImEbJDfIp/XKmB6HOMr+i9HkfOyjI4YXEVaS50ER mvXMXB1IVWm0PI6N7FbjXkL9i2VqrDhkDhA5npbHgh2d2HM0DjVZsTeEsqI9hfCauWgG D3osjhOgyNiKVpZ5k7E7Mo9BN7e35y0WLxDxKnSJdS4qkfh/UcXE2rLOpQ1r0IZL//AR jABQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc; bh=UpNuHVgeqMsT2Mq8GPzbfer4xL7RvC7CMabmXaXLgSU=; b=IDuTmtYFgldBkAx7HvOfAIZfS3lZE1bTs2ngmZt2QArFuwcOvJEvrHchafFkkpcrMv ywvl87dGlRessWTAoir1arACr6kji4h6JKkTx2iOwyZhOGc4wC17uOTJ6uBjwn+AU50b epbF17vs1wVC7HCPjmytPwq6D6Bmqvdxa6qi2hkwStg9VYONl7i035tU6GklvRzWsaxW nSZxvrRPVYPB57tb92oAlw2Ein4ptDKsR2lDjQ4HV4EhN8hJEK/GDG7QHvjDLOMkbV8W ue6dpR7A1070EOIgbWu45NqQ3tuS/cTA9UHQ5tlOP7y+gvhCsQexvxEHEgI2l0kQ7S6i tJGQ== X-Gm-Message-State: AIkVDXJn1LSoovZzxfFod5mZLKWGSl1kLUJnPJaxKZNzZL/tB6C6ym06lNCO8iinc9nNejmXPr/m+8gtZBTg8g== X-Received: by 10.28.139.131 with SMTP id n125mr1208353wmd.116.1484090051387; Tue, 10 Jan 2017 15:14:11 -0800 (PST) MIME-Version: 1.0 Sender: adrian.chadd@gmail.com Received: by 10.194.82.162 with HTTP; Tue, 10 Jan 2017 15:14:10 -0800 (PST) In-Reply-To: <20170110172336.phqcy57zszifujaj@mutt-hardenedbsd> References: <201701100721.v0A7L7ip039127@repo.freebsd.org> <20170110172336.phqcy57zszifujaj@mutt-hardenedbsd> From: Adrian Chadd Date: Tue, 10 Jan 2017 15:14:10 -0800 X-Google-Sender-Auth: Rq0o6j5g0NsNXFtyZWQjtO3qJ8I Message-ID: Subject: Re: svn commit: r311860 - head/sys/net80211 To: Shawn Webb Cc: "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Content-Type: text/plain; charset=UTF-8 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 10 Jan 2017 23:14:13 -0000 Yeah, oops! Thanks for getting it fixed! -adrian On 10 January 2017 at 09:23, Shawn Webb wrote: > On Tue, Jan 10, 2017 at 07:21:07AM +0000, Adrian Chadd wrote: >> Author: adrian >> Date: Tue Jan 10 07:21:07 2017 >> New Revision: 311860 >> URL: https://svnweb.freebsd.org/changeset/base/311860 >> >> Log: >> [net80211] add VHT action frame placeholders for when it's time to implement. >> >> Modified: >> head/sys/net80211/ieee80211_vht.c >> >> Modified: head/sys/net80211/ieee80211_vht.c >> ============================================================================== >> --- head/sys/net80211/ieee80211_vht.c Tue Jan 10 05:37:53 2017 (r311859) >> +++ head/sys/net80211/ieee80211_vht.c Tue Jan 10 07:21:07 2017 (r311860) >> @@ -85,9 +85,49 @@ __FBSDID("$FreeBSD$"); >> * Look at mac80211/vht.c:ieee80211_vht_handle_opmode() for further details. >> */ >> >> +static int >> +vht_recv_action_placeholder(struct ieee80211_node *ni, >> + const struct ieee80211_frame *wh, >> + const uint8_t *frm, const uint8_t *efrm) >> +{ >> + >> + ieee80211_note(ni->ni_vap, "%s: called; fc=0x%.2x/0x%.2x", >> + __func__, >> + wh->i_fc[0], >> + wh->i_fc[1]); >> + >> + return (0); >> +} >> + >> +static int >> +vht_send_action_placeholder(struct ieee80211_node *ni, >> + int category, int action, void *arg0) >> +{ >> + >> + ieee80211_note(ni->ni_vap, "%s: called; category=%d, action=%d", >> + __func__, >> + category, >> + action); >> + return (EINVAL); >> +} >> + > > This broke the build for kernel configurations that don't have the > IEEE80211_DEBUG option set. ieee80211_note is only a valid function when > IEEE80211_DEBUG is defined. > > Thanks, > > -- > Shawn Webb > Cofounder and Security Engineer > HardenedBSD > > GPG Key ID: 0x6A84658F52456EEE > GPG Key Fingerprint: 2ABA B6BD EF6A F486 BE89 3D9E 6A84 658F 5245 6EEE From owner-svn-src-head@freebsd.org Tue Jan 10 23:15:03 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8849DCA984F; Tue, 10 Jan 2017 23:15:03 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: from mail-wm0-x244.google.com (mail-wm0-x244.google.com [IPv6:2a00:1450:400c:c09::244]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 1FBEB119D; Tue, 10 Jan 2017 23:15:03 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: by mail-wm0-x244.google.com with SMTP id l2so33299470wml.2; Tue, 10 Jan 2017 15:15:03 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=vimiJXlCgOgHqAbNQMlndjXnk8Mhdkn0XIze0+ulatg=; b=r1GCWGuOAVw0ALaw59txCBykrSXILDxOPp6EDE1rP3JzyzTj4X4qEDoBNObMPER1px Vm1ae5HtEdVuB+TzZ0tMXWImrZCHj5oDyyRsPUTtA6DYCDgr6qLuaDHP0DOBIZ2uK609 F5B1NZ/NKsXXKro+EIDJWDULRuKzNuJDp7k6cag+cHalb7qAtq03FIwLrrJpBynBN5BY ix5peVhDfv4XmU59hGF9gAbW6nGmoWibvpOJsL1ORFrwRofVJ5VEvqUPMLPE/DTi4LY0 6KXFzzTZujPdO2VAcxupQeNOUeocZg3KLaDNshaz4R7pe1ZY7KdMFULRGzkjB1ABVgWp giuw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=vimiJXlCgOgHqAbNQMlndjXnk8Mhdkn0XIze0+ulatg=; b=pLS6BR7WRtt1zTPkTBa9cHfR/mxcOFbLPzO5qtLNaRK7Qf3uav1GUuM4jVTZXQx844 4E2wP8wRlaMpThCm3ymEbiEnob/tv+2E3dmW6z7U4viTna1phF3XAjxLvEltTlhgq5Wu hT9BcSjaT/jVkd5dqbYO2VNHghXnpOScvkvLDDivlQR9PE6M/aMN4MEssQwhVowtJSnu mTJaE8HrOfIJjmvzbtXlFDUeHdl+Y0DA/f5l5kuzECmtSz3ITFH7XpnlrMvEld8LMKWg +MUzzMcfATocKzxwGZLpVMp1OfMZ/rh1T2ntGf97tSkVFm/m6HCA+JmuGIL6lZ8RClLe 4DaA== X-Gm-Message-State: AIkVDXIMKCk4PiUAJviBj++vTmgGORAm45USdbAKRno1T//w1pCe9LEgOOgHDSMaYKpxKxq8uKKCEUmndwQGFg== X-Received: by 10.28.100.132 with SMTP id y126mr3110320wmb.116.1484090100987; Tue, 10 Jan 2017 15:15:00 -0800 (PST) MIME-Version: 1.0 Received: by 10.194.82.162 with HTTP; Tue, 10 Jan 2017 15:14:59 -0800 (PST) In-Reply-To: <201701101928.v0AJSeqN040525@repo.freebsd.org> References: <201701101928.v0AJSeqN040525@repo.freebsd.org> From: Adrian Chadd Date: Tue, 10 Jan 2017 15:14:59 -0800 Message-ID: Subject: Re: svn commit: r311887 - head/sys/net80211 To: Sergey Kandaurov Cc: "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Content-Type: text/plain; charset=UTF-8 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 10 Jan 2017 23:15:03 -0000 Thanks! (I should make a debug vap printf that doesn't include the MAC/node requirements so this stuff is easier..) -adrian On 10 January 2017 at 11:28, Sergey Kandaurov wrote: > Author: pluknet > Date: Tue Jan 10 19:28:40 2017 > New Revision: 311887 > URL: https://svnweb.freebsd.org/changeset/base/311887 > > Log: > Fix build without IEEE80211_DEBUG. > > Reported by: many > > Modified: > head/sys/net80211/ieee80211_vht.c > > Modified: head/sys/net80211/ieee80211_vht.c > ============================================================================== > --- head/sys/net80211/ieee80211_vht.c Tue Jan 10 19:26:55 2017 (r311886) > +++ head/sys/net80211/ieee80211_vht.c Tue Jan 10 19:28:40 2017 (r311887) > @@ -91,11 +91,12 @@ vht_recv_action_placeholder(struct ieee8 > const uint8_t *frm, const uint8_t *efrm) > { > > +#ifdef IEEE80211_DEBUG > ieee80211_note(ni->ni_vap, "%s: called; fc=0x%.2x/0x%.2x", > __func__, > wh->i_fc[0], > wh->i_fc[1]); > - > +#endif > return (0); > } > > @@ -104,10 +105,12 @@ vht_send_action_placeholder(struct ieee8 > int category, int action, void *arg0) > { > > +#ifdef IEEE80211_DEBUG > ieee80211_note(ni->ni_vap, "%s: called; category=%d, action=%d", > __func__, > category, > action); > +#endif > return (EINVAL); > } > > From owner-svn-src-head@freebsd.org Tue Jan 10 23:17:28 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B23F6CA9A26; Tue, 10 Jan 2017 23:17:28 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: from mail-qt0-x235.google.com (mail-qt0-x235.google.com [IPv6:2607:f8b0:400d:c0d::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 6F8191487; Tue, 10 Jan 2017 23:17:28 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: by mail-qt0-x235.google.com with SMTP id v23so180416273qtb.0; Tue, 10 Jan 2017 15:17:28 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=+vmPkFbmtzTTaUIsk/jGlyevV57EAey3u3aemUgLM94=; b=JTKQOlrUx0Fh5zFiHrWPX6Iftbj4nzJye/SbrDp+C2I4plPg11ghGwEx/3+evfZDk0 F2FwdeZKsnDWtNFZGcitR+o9/32yNmYAJTTuCUbwjkrQBdDE8oJbamFhv39ISkhJouOL Lmo2T85wFxOhtOL3SZVzPxOx/+2UadQd2XY+hrg0zCe9zvs357tZJ8eusDsc+4LvrZWh OgykdVcgKZYsQB593mPMlkngkXYBExAj0Wt6zAWgaCtQJUlxLbdvdODmTIw4hmq7ICQ5 rwzSOHG9TefMNv4Eo/6wi+N5J4O704Ffrx1r9OoilyjuvE8HxSiTcbm1Q3Hs1GBn7PO1 k/3w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=+vmPkFbmtzTTaUIsk/jGlyevV57EAey3u3aemUgLM94=; b=f8pYy6NKsytO2H+E67nrF/yHyMnlLc6uILCufNBM4BU5jlH1zGeNDxgr2BkoEST3Ca 4GsszLljJsvWc/gKodcuIbyhDlegIKfSpdXsw7GmXxKqTS0VMKnieyMSZZDzOpO0+QXH OETkaB7gCrJMAIl7DdKgO5Xu3zmUVSiibImvECT6Vj04QVAsInw8vGquKb6Tm57EHg1X tfIq5ZLEC15HzPzOTemjaXmfDyWXpKWDF/Cuik99w0T5PCWZsj0Vfop7cRmG7Yzdq6go VPRv6sY9o3qOjyPBAsFgYIz0byheus0BZ9Hym8goGtbOL2VtVfWOLlRkFaaAEkQ4QutL +Hdw== X-Gm-Message-State: AIkVDXI83BUTsvjC5Hk2azW3pGHqD5ux1h2SHiv6E4vaXYOgrhc+k9RawyGl3G3RLJtoR/qurchcO10bk/Lumw== X-Received: by 10.200.42.179 with SMTP id b48mr5492581qta.246.1484090247503; Tue, 10 Jan 2017 15:17:27 -0800 (PST) MIME-Version: 1.0 Received: by 10.140.83.133 with HTTP; Tue, 10 Jan 2017 15:17:27 -0800 (PST) In-Reply-To: <201701101928.v0AJSeqN040525@repo.freebsd.org> References: <201701101928.v0AJSeqN040525@repo.freebsd.org> From: Ngie Cooper Date: Tue, 10 Jan 2017 15:17:27 -0800 Message-ID: Subject: Re: svn commit: r311887 - head/sys/net80211 To: Sergey Kandaurov Cc: "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Content-Type: text/plain; charset=UTF-8 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 10 Jan 2017 23:17:28 -0000 On Tue, Jan 10, 2017 at 11:28 AM, Sergey Kandaurov wrote: > Author: pluknet > Date: Tue Jan 10 19:28:40 2017 > New Revision: 311887 > URL: https://svnweb.freebsd.org/changeset/base/311887 > > Log: > Fix build without IEEE80211_DEBUG. This may fix clang builds, but I anticipate gcc failures now because the parameters are unused. I think stub functions/macros should be added to workaround this issue. Thanks, -Ngie From owner-svn-src-head@freebsd.org Tue Jan 10 23:20:04 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C5105CA9BCA; Tue, 10 Jan 2017 23:20:04 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: from mail-wj0-x233.google.com (mail-wj0-x233.google.com [IPv6:2a00:1450:400c:c01::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 55035165B; Tue, 10 Jan 2017 23:20:04 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: by mail-wj0-x233.google.com with SMTP id i20so90996234wjn.2; Tue, 10 Jan 2017 15:20:04 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=SgG38Mv0giydJoJ0lAcqEkzmrR1tzNAxo3Cr+eUSA4E=; b=iwwFdibWDTVCnRq5QAHfTBANJe2bQHmYrp12qSiES2oBNmxZRYPGHugKGnCMN2v5yl yD0jW4RoYXVzGZs0GQJ8U5dPkG6diwcM8ReKlUb5945SSd88CQP4qPBSNfjbmEVq+1Im nkNs5qoXzLnA9KcOm02OsKnGUuLoe8kmMPWxMb8xH7XDgXQ/MfRhvnydZIFSpeYPblV2 UM3P6NKBhf20G/CSNwf6FqrkkvsAnTilUNAkKo5xv3mYGlX37L9oIS755gFViOMmBfCI lzHPG5CMUp+VWvPSalF8swffUq2NUrErt2aXS8AayyuHDjITB3SOUkfc6NjI2EimFMKZ 5UwQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=SgG38Mv0giydJoJ0lAcqEkzmrR1tzNAxo3Cr+eUSA4E=; b=ZFrXYKqqnWRpECxMUECn3tLNAIc5m/GpmohPSWWvMzC9UTQB7anSptklG1LC+rpTSN 8JTleSWKg5csBhISZT26VZkrTXFrk0Lo+tF0g+wWo7Jai/1wRilPu/QF/r1T2G8xdtY9 Z7kSMcA5cxer+naMxEE884ZdPjiSD3+H4l+61Jm67TJE+9vp3Pf2NKAbTveADyXrf90x s5Lucy7yeuDN3//zm4tyQqKEtVO8RO/LI81ylCmWPM/NH1RaDl+0Guii/Ee2d75/U48F 5esyCV5amYmW5dxWMmkghE/DsYc9IPsb+B5VYTTwcgH799xOv5MDamzFMvxHeGNZJYZ9 IDmQ== X-Gm-Message-State: AIkVDXIKaHeCaCmFkO+VeZFy68+uC0MPLuT/svnsfNRqxMMYaOUGFWks3K+HfhvoIv4LxF9HEOZA7YNaCaa+0Q== X-Received: by 10.194.67.67 with SMTP id l3mr3414194wjt.151.1484090402796; Tue, 10 Jan 2017 15:20:02 -0800 (PST) MIME-Version: 1.0 Received: by 10.194.82.162 with HTTP; Tue, 10 Jan 2017 15:20:01 -0800 (PST) In-Reply-To: References: <201701101928.v0AJSeqN040525@repo.freebsd.org> From: Adrian Chadd Date: Tue, 10 Jan 2017 15:20:01 -0800 Message-ID: Subject: Re: svn commit: r311887 - head/sys/net80211 To: Ngie Cooper Cc: Sergey Kandaurov , "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Content-Type: text/plain; charset=UTF-8 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 10 Jan 2017 23:20:04 -0000 Yeah, give me a little while. I'm knee deep in water. -a On 10 January 2017 at 15:17, Ngie Cooper wrote: > On Tue, Jan 10, 2017 at 11:28 AM, Sergey Kandaurov wrote: >> Author: pluknet >> Date: Tue Jan 10 19:28:40 2017 >> New Revision: 311887 >> URL: https://svnweb.freebsd.org/changeset/base/311887 >> >> Log: >> Fix build without IEEE80211_DEBUG. > > This may fix clang builds, but I anticipate gcc failures now because > the parameters are unused. > > I think stub functions/macros should be added to workaround this issue. > > Thanks, > -Ngie > From owner-svn-src-head@freebsd.org Wed Jan 11 00:02:52 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id DF457CAAA08; Wed, 11 Jan 2017 00:02:52 +0000 (UTC) (envelope-from cem@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id BC43919D8; Wed, 11 Jan 2017 00:02:52 +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 v0B02pcI056941; Wed, 11 Jan 2017 00:02:51 GMT (envelope-from cem@FreeBSD.org) Received: (from cem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v0B02pBP056938; Wed, 11 Jan 2017 00:02:51 GMT (envelope-from cem@FreeBSD.org) Message-Id: <201701110002.v0B02pBP056938@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cem set sender to cem@FreeBSD.org using -f From: "Conrad E. Meyer" Date: Wed, 11 Jan 2017 00:02:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r311906 - in head/sys/contrib/dev/acpica: components/namespace components/tables include X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 11 Jan 2017 00:02:53 -0000 Author: cem Date: Wed Jan 11 00:02:51 2017 New Revision: 311906 URL: https://svnweb.freebsd.org/changeset/base/311906 Log: Revert r311843, r311667 As jkim@ points out, it isn't needed. Modified: head/sys/contrib/dev/acpica/components/namespace/nsxfeval.c head/sys/contrib/dev/acpica/components/tables/tbxface.c head/sys/contrib/dev/acpica/include/acpixf.h Modified: head/sys/contrib/dev/acpica/components/namespace/nsxfeval.c ============================================================================== --- head/sys/contrib/dev/acpica/components/namespace/nsxfeval.c Tue Jan 10 22:13:44 2017 (r311905) +++ head/sys/contrib/dev/acpica/components/namespace/nsxfeval.c Wed Jan 11 00:02:51 2017 (r311906) @@ -1022,25 +1022,23 @@ ACPI_EXPORT_SYMBOL (AcpiDetachData) /******************************************************************************* * - * FUNCTION: AcpiGetDataFull + * FUNCTION: AcpiGetData * * PARAMETERS: ObjHandle - Namespace node - * Handle - Handler used in call to attach_data + * Handler - Handler used in call to AttachData * Data - Where the data is returned - * Callback - function to execute before returning * * RETURN: Status * - * DESCRIPTION: Retrieve data that was previously attached to a namespace node - * and execute a callback before returning. + * DESCRIPTION: Retrieve data that was previously attached to a namespace node. * ******************************************************************************/ + ACPI_STATUS -AcpiGetDataFull ( +AcpiGetData ( ACPI_HANDLE ObjHandle, ACPI_OBJECT_HANDLER Handler, - void **Data, - void (*Callback)(void *)) + void **Data) { ACPI_NAMESPACE_NODE *Node; ACPI_STATUS Status; @@ -1071,34 +1069,10 @@ AcpiGetDataFull ( } Status = AcpiNsGetAttachedData (Node, Handler, Data); - if (ACPI_SUCCESS(Status) && Callback) { - Callback(*Data); - } + UnlockAndExit: (void) AcpiUtReleaseMutex (ACPI_MTX_NAMESPACE); return (Status); } -ACPI_EXPORT_SYMBOL (AcpiGetDataFull) -/******************************************************************************* - * - * FUNCTION: AcpiGetData - * - * PARAMETERS: ObjHandle - Namespace node - * Handler - Handler used in call to AttachData - * Data - Where the data is returned - * - * RETURN: Status - * - * DESCRIPTION: Retrieve data that was previously attached to a namespace node. - * - ******************************************************************************/ -ACPI_STATUS -AcpiGetData ( - ACPI_HANDLE ObjHandle, - ACPI_OBJECT_HANDLER Handler, - void **Data) -{ - return (AcpiGetDataFull(ObjHandle, Handler, Data, NULL)); -} ACPI_EXPORT_SYMBOL (AcpiGetData) Modified: head/sys/contrib/dev/acpica/components/tables/tbxface.c ============================================================================== --- head/sys/contrib/dev/acpica/components/tables/tbxface.c Tue Jan 10 22:13:44 2017 (r311905) +++ head/sys/contrib/dev/acpica/components/tables/tbxface.c Wed Jan 11 00:02:51 2017 (r311906) @@ -314,12 +314,11 @@ ACPI_EXPORT_SYMBOL (AcpiGetTableHeader) /******************************************************************************* * - * FUNCTION: AcpiGetTableWithSize + * FUNCTION: AcpiGetTable * * PARAMETERS: Signature - ACPI signature of needed table * Instance - Which instance (for SSDTs) * OutTable - Where the pointer to the table is returned - * TblSize - Size of the table * * RETURN: Status and pointer to the requested table * @@ -334,11 +333,10 @@ ACPI_EXPORT_SYMBOL (AcpiGetTableHeader) ******************************************************************************/ ACPI_STATUS -AcpiGetTableWithSize ( +AcpiGetTable ( char *Signature, UINT32 Instance, - ACPI_TABLE_HEADER **OutTable, - ACPI_SIZE *TblSize) + ACPI_TABLE_HEADER **OutTable) { UINT32 i; UINT32 j; @@ -386,7 +384,7 @@ AcpiGetTableWithSize ( return (Status); } -ACPI_EXPORT_SYMBOL (AcpiGetTableWithSize) +ACPI_EXPORT_SYMBOL (AcpiGetTable) /******************************************************************************* @@ -436,36 +434,8 @@ AcpiPutTable ( (void) AcpiUtReleaseMutex (ACPI_MTX_TABLES); return_VOID; } -ACPI_EXPORT_SYMBOL (AcpiPutTable) - - -/******************************************************************************* - * - * FUNCTION: AcpiGetTable - * - * PARAMETERS: Signature - ACPI signature of needed table - * Instance - Which instance (for SSDTs) - * OutTable - Where the pointer to the table is returned - * - * RETURN: Status and pointer to the requested table - * - * DESCRIPTION: Finds and verifies an ACPI table. Table must be in the - * RSDT/XSDT. - * - ******************************************************************************/ - -ACPI_STATUS -AcpiGetTable ( - char *Signature, - UINT32 Instance, - ACPI_TABLE_HEADER **OutTable) -{ - ACPI_SIZE Size; - - return (AcpiGetTableWithSize(Signature, Instance, OutTable, &Size)); -} -ACPI_EXPORT_SYMBOL (AcpiGetTable) +ACPI_EXPORT_SYMBOL (AcpiPutTable) /******************************************************************************* Modified: head/sys/contrib/dev/acpica/include/acpixf.h ============================================================================== --- head/sys/contrib/dev/acpica/include/acpixf.h Tue Jan 10 22:13:44 2017 (r311905) +++ head/sys/contrib/dev/acpica/include/acpixf.h Wed Jan 11 00:02:51 2017 (r311906) @@ -586,14 +586,6 @@ AcpiGetTableHeader ( ACPI_EXTERNAL_RETURN_STATUS ( ACPI_STATUS -AcpiGetTableWithSize ( - ACPI_STRING Signature, - UINT32 Instance, - ACPI_TABLE_HEADER **OutTable, - ACPI_SIZE *TblSize)) - -ACPI_EXTERNAL_RETURN_STATUS ( -ACPI_STATUS AcpiGetTable ( ACPI_STRING Signature, UINT32 Instance, @@ -680,14 +672,6 @@ AcpiGetData ( ACPI_EXTERNAL_RETURN_STATUS ( ACPI_STATUS -AcpiGetDataFull ( - ACPI_HANDLE Object, - ACPI_OBJECT_HANDLER Handler, - void **Data, - void (*Callback)(void *))) - -ACPI_EXTERNAL_RETURN_STATUS ( -ACPI_STATUS AcpiDebugTrace ( const char *Name, UINT32 DebugLevel, From owner-svn-src-head@freebsd.org Wed Jan 11 00:14:48 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 45CF2CAAF0C; Wed, 11 Jan 2017 00:14:48 +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 153B51036; Wed, 11 Jan 2017 00:14:48 +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 v0B0El7e061199; Wed, 11 Jan 2017 00:14:47 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v0B0ElS9061198; Wed, 11 Jan 2017 00:14:47 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201701110014.v0B0ElS9061198@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Wed, 11 Jan 2017 00:14:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r311907 - 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-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 11 Jan 2017 00:14:48 -0000 Author: ian Date: Wed Jan 11 00:14:47 2017 New Revision: 311907 URL: https://svnweb.freebsd.org/changeset/base/311907 Log: Follow r311103: add "pool" to the keywords that rc.d/ntpdate examines to find a server address in ntp.conf. Submitted by: Ronald Klop Pointy hat to: ian Modified: head/etc/rc.d/ntpdate Modified: head/etc/rc.d/ntpdate ============================================================================== --- head/etc/rc.d/ntpdate Wed Jan 11 00:02:51 2017 (r311906) +++ head/etc/rc.d/ntpdate Wed Jan 11 00:14:47 2017 (r311907) @@ -20,7 +20,7 @@ ntpdate_start() if [ -z "$ntpdate_hosts" -a -f "$ntpdate_config" ]; then ntpdate_hosts=`awk ' /^server[ \t]*127.127/ {next} - /^(server|peer)/ { + /^(server|peer|pool)/ { if ($2 ~/^-/) {print $3} else {print $2}} ' < "$ntpdate_config"` From owner-svn-src-head@freebsd.org Wed Jan 11 01:15:56 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 65790CA72BF; Wed, 11 Jan 2017 01:15:56 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 340E21FB7; Wed, 11 Jan 2017 01:15:56 +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 v0B1Ftp9085607; Wed, 11 Jan 2017 01:15:55 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v0B1FtwP085606; Wed, 11 Jan 2017 01:15:55 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201701110115.v0B1FtwP085606@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Wed, 11 Jan 2017 01:15:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r311909 - head/sys/cddl/contrib/opensolaris/uts/common/dtrace X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 11 Jan 2017 01:15:56 -0000 Author: markj Date: Wed Jan 11 01:15:55 2017 New Revision: 311909 URL: https://svnweb.freebsd.org/changeset/base/311909 Log: Ignore LC_SLEEPABLE when testing whether a mutex is adaptive. MFC after: 1 week Modified: head/sys/cddl/contrib/opensolaris/uts/common/dtrace/dtrace.c Modified: head/sys/cddl/contrib/opensolaris/uts/common/dtrace/dtrace.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/dtrace/dtrace.c Wed Jan 11 00:50:19 2017 (r311908) +++ head/sys/cddl/contrib/opensolaris/uts/common/dtrace/dtrace.c Wed Jan 11 01:15:55 2017 (r311909) @@ -4356,9 +4356,7 @@ dtrace_dif_subr(uint_t subr, uint_t rd, break; } l.lx = dtrace_loadptr((uintptr_t)&tupregs[0].dttk_value); - /* XXX - should be only LC_SLEEPABLE? */ - regs[rd] = (LOCK_CLASS(l.li)->lc_flags & - (LC_SLEEPLOCK | LC_SLEEPABLE)) != 0; + regs[rd] = (LOCK_CLASS(l.li)->lc_flags & LC_SLEEPLOCK) != 0; break; case DIF_SUBR_MUTEX_TYPE_SPIN: From owner-svn-src-head@freebsd.org Wed Jan 11 01:18:07 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C2902CA744F; Wed, 11 Jan 2017 01:18:07 +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 8379311B3; Wed, 11 Jan 2017 01:18:07 +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 v0B1I61B085731; Wed, 11 Jan 2017 01:18:06 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v0B1I6HL085730; Wed, 11 Jan 2017 01:18:06 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201701110118.v0B1I6HL085730@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Wed, 11 Jan 2017 01:18:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r311910 - head/sys/cddl/contrib/opensolaris/uts/common/dtrace X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 11 Jan 2017 01:18:07 -0000 Author: markj Date: Wed Jan 11 01:18:06 2017 New Revision: 311910 URL: https://svnweb.freebsd.org/changeset/base/311910 Log: Have DTrace handle faults when dereferencing a lock object pointer. MFC after: 1 week Modified: head/sys/cddl/contrib/opensolaris/uts/common/dtrace/dtrace.c Modified: head/sys/cddl/contrib/opensolaris/uts/common/dtrace/dtrace.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/dtrace/dtrace.c Wed Jan 11 01:15:55 2017 (r311909) +++ head/sys/cddl/contrib/opensolaris/uts/common/dtrace/dtrace.c Wed Jan 11 01:18:06 2017 (r311910) @@ -4335,7 +4335,9 @@ dtrace_dif_subr(uint_t subr, uint_t rd, break; } l.lx = dtrace_loadptr((uintptr_t)&tupregs[0].dttk_value); + DTRACE_CPUFLAG_SET(CPU_DTRACE_NOFAULT); regs[rd] = LOCK_CLASS(l.li)->lc_owner(l.li, &lowner); + DTRACE_CPUFLAG_CLEAR(CPU_DTRACE_NOFAULT); break; case DIF_SUBR_MUTEX_OWNER: @@ -4345,7 +4347,9 @@ dtrace_dif_subr(uint_t subr, uint_t rd, break; } l.lx = dtrace_loadptr((uintptr_t)&tupregs[0].dttk_value); + DTRACE_CPUFLAG_SET(CPU_DTRACE_NOFAULT); LOCK_CLASS(l.li)->lc_owner(l.li, &lowner); + DTRACE_CPUFLAG_CLEAR(CPU_DTRACE_NOFAULT); regs[rd] = (uintptr_t)lowner; break; @@ -4356,7 +4360,9 @@ dtrace_dif_subr(uint_t subr, uint_t rd, break; } l.lx = dtrace_loadptr((uintptr_t)&tupregs[0].dttk_value); + DTRACE_CPUFLAG_SET(CPU_DTRACE_NOFAULT); regs[rd] = (LOCK_CLASS(l.li)->lc_flags & LC_SLEEPLOCK) != 0; + DTRACE_CPUFLAG_CLEAR(CPU_DTRACE_NOFAULT); break; case DIF_SUBR_MUTEX_TYPE_SPIN: @@ -4366,7 +4372,9 @@ dtrace_dif_subr(uint_t subr, uint_t rd, break; } l.lx = dtrace_loadptr((uintptr_t)&tupregs[0].dttk_value); + DTRACE_CPUFLAG_SET(CPU_DTRACE_NOFAULT); regs[rd] = (LOCK_CLASS(l.li)->lc_flags & LC_SPINLOCK) != 0; + DTRACE_CPUFLAG_CLEAR(CPU_DTRACE_NOFAULT); break; case DIF_SUBR_RW_READ_HELD: @@ -4377,8 +4385,10 @@ dtrace_dif_subr(uint_t subr, uint_t rd, break; } l.lx = dtrace_loadptr((uintptr_t)&tupregs[0].dttk_value); + DTRACE_CPUFLAG_SET(CPU_DTRACE_NOFAULT); regs[rd] = LOCK_CLASS(l.li)->lc_owner(l.li, &lowner) && lowner == NULL; + DTRACE_CPUFLAG_CLEAR(CPU_DTRACE_NOFAULT); break; case DIF_SUBR_RW_WRITE_HELD: @@ -4389,8 +4399,10 @@ dtrace_dif_subr(uint_t subr, uint_t rd, break; } l.lx = dtrace_loadptr(tupregs[0].dttk_value); + DTRACE_CPUFLAG_SET(CPU_DTRACE_NOFAULT); regs[rd] = LOCK_CLASS(l.li)->lc_owner(l.li, &lowner) && lowner != NULL; + DTRACE_CPUFLAG_CLEAR(CPU_DTRACE_NOFAULT); break; case DIF_SUBR_RW_ISWRITER: @@ -4401,7 +4413,9 @@ dtrace_dif_subr(uint_t subr, uint_t rd, break; } l.lx = dtrace_loadptr(tupregs[0].dttk_value); + DTRACE_CPUFLAG_SET(CPU_DTRACE_NOFAULT); LOCK_CLASS(l.li)->lc_owner(l.li, &lowner); + DTRACE_CPUFLAG_CLEAR(CPU_DTRACE_NOFAULT); regs[rd] = (lowner == curthread); break; #endif /* illumos */ From owner-svn-src-head@freebsd.org Wed Jan 11 01:53:55 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id EC8E6CA95ED; Wed, 11 Jan 2017 01:53:55 +0000 (UTC) (envelope-from gonzo@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C614C18A9; Wed, 11 Jan 2017 01:53:55 +0000 (UTC) (envelope-from gonzo@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v0B1rs0v002131; Wed, 11 Jan 2017 01:53:54 GMT (envelope-from gonzo@FreeBSD.org) Received: (from gonzo@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v0B1rsws002127; Wed, 11 Jan 2017 01:53:54 GMT (envelope-from gonzo@FreeBSD.org) Message-Id: <201701110153.v0B1rsws002127@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gonzo set sender to gonzo@FreeBSD.org using -f From: Oleksandr Tymoshenko Date: Wed, 11 Jan 2017 01:53:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r311911 - in head/sys: conf dev/sdhci modules modules/sdhci_acpi X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 11 Jan 2017 01:53:56 -0000 Author: gonzo Date: Wed Jan 11 01:53:54 2017 New Revision: 311911 URL: https://svnweb.freebsd.org/changeset/base/311911 Log: [sdhci] Add ACPI platform support for SDHCI driver - Create ACPI version of SDHCI attach/detach/accessors logic. Some platforms (e.g. BayTrail-based Minnowboard) expose SDHCI devices via ACPI, not PCI - Add sdchi_acpi kernel module Reviewed by: ian, imp MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D9112 Added: head/sys/dev/sdhci/sdhci_acpi.c (contents, props changed) head/sys/modules/sdhci_acpi/ head/sys/modules/sdhci_acpi/Makefile (contents, props changed) Modified: head/sys/conf/files head/sys/modules/Makefile Modified: head/sys/conf/files ============================================================================== --- head/sys/conf/files Wed Jan 11 01:18:06 2017 (r311910) +++ head/sys/conf/files Wed Jan 11 01:53:54 2017 (r311911) @@ -2826,6 +2826,7 @@ dev/scc/scc_dev_z8530.c optional scc dev/sdhci/sdhci.c optional sdhci dev/sdhci/sdhci_fdt_gpio.c optional sdhci fdt gpio dev/sdhci/sdhci_if.m optional sdhci +dev/sdhci/sdhci_acpi.c optional sdhci acpi dev/sdhci/sdhci_pci.c optional sdhci pci dev/sf/if_sf.c optional sf pci dev/sge/if_sge.c optional sge pci Added: head/sys/dev/sdhci/sdhci_acpi.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/dev/sdhci/sdhci_acpi.c Wed Jan 11 01:53:54 2017 (r311911) @@ -0,0 +1,370 @@ +/*- + * Copyright (c) 2017 Oleksandr Tymoshenko + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include +__FBSDID("$FreeBSD$"); + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include + +#include +#include + +#include +#include +#include + +#include "sdhci.h" +#include "mmcbr_if.h" +#include "sdhci_if.h" + +static const struct sdhci_acpi_device { + const char* hid; + int uid; + const char *desc; + u_int quirks; +} sdhci_acpi_devices[] = { + { "80860F14", 1, "Intel Bay Trail eMMC 4.5 Controller", + SDHCI_QUIRK_ALL_SLOTS_NON_REMOVABLE | + SDHCI_QUIRK_INTEL_POWER_UP_RESET }, + { "80860F16", 0, "Intel Bay Trail SD Host Controller", + 0 }, + { NULL, 0, NULL, 0} +}; + +static char *sdhci_ids[] = { + "80860F14", + "80860F16", + NULL +}; + +struct sdhci_acpi_softc { + u_int quirks; /* Chip specific quirks */ + struct resource *irq_res; /* IRQ resource */ + void *intrhand; /* Interrupt handle */ + + struct sdhci_slot slot; + struct resource *mem_res; /* Memory resource */ +}; + +static void sdhci_acpi_intr(void *arg); +static int sdhci_acpi_detach(device_t dev); + +static uint8_t +sdhci_acpi_read_1(device_t dev, struct sdhci_slot *slot, bus_size_t off) +{ + struct sdhci_acpi_softc *sc = device_get_softc(dev); + + bus_barrier(sc->mem_res, 0, 0xFF, + BUS_SPACE_BARRIER_READ | BUS_SPACE_BARRIER_WRITE); + return bus_read_1(sc->mem_res, off); +} + +static void +sdhci_acpi_write_1(device_t dev, struct sdhci_slot *slot, bus_size_t off, uint8_t val) +{ + struct sdhci_acpi_softc *sc = device_get_softc(dev); + + bus_barrier(sc->mem_res, 0, 0xFF, + BUS_SPACE_BARRIER_READ | BUS_SPACE_BARRIER_WRITE); + bus_write_1(sc->mem_res, off, val); +} + +static uint16_t +sdhci_acpi_read_2(device_t dev, struct sdhci_slot *slot, bus_size_t off) +{ + struct sdhci_acpi_softc *sc = device_get_softc(dev); + + bus_barrier(sc->mem_res, 0, 0xFF, + BUS_SPACE_BARRIER_READ | BUS_SPACE_BARRIER_WRITE); + return bus_read_2(sc->mem_res, off); +} + +static void +sdhci_acpi_write_2(device_t dev, struct sdhci_slot *slot, bus_size_t off, uint16_t val) +{ + struct sdhci_acpi_softc *sc = device_get_softc(dev); + + bus_barrier(sc->mem_res, 0, 0xFF, + BUS_SPACE_BARRIER_READ | BUS_SPACE_BARRIER_WRITE); + bus_write_2(sc->mem_res, off, val); +} + +static uint32_t +sdhci_acpi_read_4(device_t dev, struct sdhci_slot *slot, bus_size_t off) +{ + struct sdhci_acpi_softc *sc = device_get_softc(dev); + + bus_barrier(sc->mem_res, 0, 0xFF, + BUS_SPACE_BARRIER_READ | BUS_SPACE_BARRIER_WRITE); + return bus_read_4(sc->mem_res, off); +} + +static void +sdhci_acpi_write_4(device_t dev, struct sdhci_slot *slot, bus_size_t off, uint32_t val) +{ + struct sdhci_acpi_softc *sc = device_get_softc(dev); + + bus_barrier(sc->mem_res, 0, 0xFF, + BUS_SPACE_BARRIER_READ | BUS_SPACE_BARRIER_WRITE); + bus_write_4(sc->mem_res, off, val); +} + +static void +sdhci_acpi_read_multi_4(device_t dev, struct sdhci_slot *slot, + bus_size_t off, uint32_t *data, bus_size_t count) +{ + struct sdhci_acpi_softc *sc = device_get_softc(dev); + + bus_read_multi_stream_4(sc->mem_res, off, data, count); +} + +static void +sdhci_acpi_write_multi_4(device_t dev, struct sdhci_slot *slot, + bus_size_t off, uint32_t *data, bus_size_t count) +{ + struct sdhci_acpi_softc *sc = device_get_softc(dev); + + bus_write_multi_stream_4(sc->mem_res, off, data, count); +} + +static const struct sdhci_acpi_device * +sdhci_acpi_find_device(device_t dev) +{ + const char *hid; + int i, uid; + ACPI_HANDLE handle; + ACPI_STATUS status; + + hid = ACPI_ID_PROBE(device_get_parent(dev), dev, sdhci_ids); + if (hid == NULL) + return (NULL); + + handle = acpi_get_handle(dev); + status = acpi_GetInteger(handle, "_UID", &uid); + if (ACPI_FAILURE(status)) + uid = 0; + + for (i = 0; sdhci_acpi_devices[i].hid != NULL; i++) { + if (strcmp(sdhci_acpi_devices[i].hid, hid) != 0) + continue; + if ((sdhci_acpi_devices[i].uid != 0) && + (sdhci_acpi_devices[i].uid != uid)) + continue; + return &sdhci_acpi_devices[i]; + } + + return (NULL); +} + +static int +sdhci_acpi_probe(device_t dev) +{ + const struct sdhci_acpi_device *acpi_dev; + + acpi_dev = sdhci_acpi_find_device(dev); + if (acpi_dev == NULL) + return (ENXIO); + + device_set_desc(dev, acpi_dev->desc); + + return (BUS_PROBE_DEFAULT); +} + +static int +sdhci_acpi_attach(device_t dev) +{ + struct sdhci_acpi_softc *sc = device_get_softc(dev); + int rid, err; + const struct sdhci_acpi_device *acpi_dev; + + acpi_dev = sdhci_acpi_find_device(dev); + if (acpi_dev == NULL) + return (ENXIO); + + sc->quirks = acpi_dev->quirks; + + /* Allocate IRQ. */ + rid = 0; + sc->irq_res = bus_alloc_resource_any(dev, SYS_RES_IRQ, &rid, + RF_ACTIVE); + if (sc->irq_res == NULL) { + device_printf(dev, "can't allocate IRQ\n"); + return (ENOMEM); + } + + rid = 0; + sc->mem_res = bus_alloc_resource_any(dev, SYS_RES_MEMORY, + &rid, RF_ACTIVE); + if (sc->mem_res == NULL) { + device_printf(dev, "can't allocate memory resource for slot\n"); + sdhci_acpi_detach(dev); + return (ENOMEM); + } + + sc->slot.quirks = sc->quirks; + + err = sdhci_init_slot(dev, &sc->slot, 0); + if (err) { + device_printf(dev, "failed to init slot\n"); + sdhci_acpi_detach(dev); + return (err); + } + + /* Activate the interrupt */ + err = bus_setup_intr(dev, sc->irq_res, INTR_TYPE_MISC | INTR_MPSAFE, + NULL, sdhci_acpi_intr, sc, &sc->intrhand); + if (err) { + device_printf(dev, "can't setup IRQ\n"); + sdhci_acpi_detach(dev); + return (err); + } + + /* Process cards detection. */ + sdhci_start_slot(&sc->slot); + + return (0); +} + +static int +sdhci_acpi_detach(device_t dev) +{ + struct sdhci_acpi_softc *sc = device_get_softc(dev); + + if (sc->intrhand) + bus_teardown_intr(dev, sc->irq_res, sc->intrhand); + if (sc->irq_res) + bus_release_resource(dev, SYS_RES_IRQ, + rman_get_rid(sc->irq_res), sc->irq_res); + + if (sc->mem_res) { + sdhci_cleanup_slot(&sc->slot); + bus_release_resource(dev, SYS_RES_MEMORY, + rman_get_rid(sc->mem_res), sc->mem_res); + } + + return (0); +} + +static int +sdhci_acpi_shutdown(device_t dev) +{ + + return (0); +} + +static int +sdhci_acpi_suspend(device_t dev) +{ + struct sdhci_acpi_softc *sc = device_get_softc(dev); + int err; + + err = bus_generic_suspend(dev); + if (err) + return (err); + sdhci_generic_suspend(&sc->slot); + return (0); +} + +static int +sdhci_acpi_resume(device_t dev) +{ + struct sdhci_acpi_softc *sc = device_get_softc(dev); + int err; + + sdhci_generic_resume(&sc->slot); + err = bus_generic_resume(dev); + if (err) + return (err); + return (0); +} + +static void +sdhci_acpi_intr(void *arg) +{ + struct sdhci_acpi_softc *sc = (struct sdhci_acpi_softc *)arg; + + sdhci_generic_intr(&sc->slot); +} + +static device_method_t sdhci_methods[] = { + /* device_if */ + DEVMETHOD(device_probe, sdhci_acpi_probe), + DEVMETHOD(device_attach, sdhci_acpi_attach), + DEVMETHOD(device_detach, sdhci_acpi_detach), + DEVMETHOD(device_shutdown, sdhci_acpi_shutdown), + DEVMETHOD(device_suspend, sdhci_acpi_suspend), + DEVMETHOD(device_resume, sdhci_acpi_resume), + + /* Bus interface */ + DEVMETHOD(bus_read_ivar, sdhci_generic_read_ivar), + DEVMETHOD(bus_write_ivar, sdhci_generic_write_ivar), + + /* mmcbr_if */ + DEVMETHOD(mmcbr_update_ios, sdhci_generic_update_ios), + DEVMETHOD(mmcbr_request, sdhci_generic_request), + DEVMETHOD(mmcbr_get_ro, sdhci_generic_get_ro), + DEVMETHOD(mmcbr_acquire_host, sdhci_generic_acquire_host), + DEVMETHOD(mmcbr_release_host, sdhci_generic_release_host), + + /* SDHCI registers accessors */ + DEVMETHOD(sdhci_read_1, sdhci_acpi_read_1), + DEVMETHOD(sdhci_read_2, sdhci_acpi_read_2), + DEVMETHOD(sdhci_read_4, sdhci_acpi_read_4), + DEVMETHOD(sdhci_read_multi_4, sdhci_acpi_read_multi_4), + DEVMETHOD(sdhci_write_1, sdhci_acpi_write_1), + DEVMETHOD(sdhci_write_2, sdhci_acpi_write_2), + DEVMETHOD(sdhci_write_4, sdhci_acpi_write_4), + DEVMETHOD(sdhci_write_multi_4, sdhci_acpi_write_multi_4), + + DEVMETHOD_END +}; + +static driver_t sdhci_acpi_driver = { + "sdhci_acpi", + sdhci_methods, + sizeof(struct sdhci_acpi_softc), +}; +static devclass_t sdhci_acpi_devclass; + +DRIVER_MODULE(sdhci_acpi, acpi, sdhci_acpi_driver, sdhci_acpi_devclass, NULL, + NULL); +MODULE_DEPEND(sdhci_acpi, sdhci, 1, 1, 1); +DRIVER_MODULE(mmc, sdhci_acpi, mmc_driver, mmc_devclass, NULL, NULL); +MODULE_DEPEND(sdhci_acpi, mmc, 1, 1, 1); Modified: head/sys/modules/Makefile ============================================================================== --- head/sys/modules/Makefile Wed Jan 11 01:18:06 2017 (r311910) +++ head/sys/modules/Makefile Wed Jan 11 01:53:54 2017 (r311911) @@ -332,6 +332,7 @@ SUBDIR= \ scc \ ${_scsi_low} \ sdhci \ + ${_sdhci_acpi} \ sdhci_pci \ sem \ send \ @@ -665,6 +666,7 @@ _padlock_rng= padlock_rng _rdrand_rng= rdrand_rng .endif _s3= s3 +_sdhci_acpi= sdhci_acpi _tpm= tpm _twa= twa _vesa= vesa Added: head/sys/modules/sdhci_acpi/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/modules/sdhci_acpi/Makefile Wed Jan 11 01:53:54 2017 (r311911) @@ -0,0 +1,8 @@ +# $FreeBSD$ + +.PATH: ${.CURDIR}/../../dev/sdhci + +KMOD= sdhci_acpi +SRCS= sdhci_acpi.c sdhci.h sdhci_if.h device_if.h bus_if.h pci_if.h mmcbr_if.h + +.include From owner-svn-src-head@freebsd.org Wed Jan 11 02:21:36 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 488E5CAA3FC; Wed, 11 Jan 2017 02:21:36 +0000 (UTC) (envelope-from jhibbits@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 14F911575; Wed, 11 Jan 2017 02:21:36 +0000 (UTC) (envelope-from jhibbits@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v0B2LZ1v010287; Wed, 11 Jan 2017 02:21:35 GMT (envelope-from jhibbits@FreeBSD.org) Received: (from jhibbits@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v0B2LZCV010286; Wed, 11 Jan 2017 02:21:35 GMT (envelope-from jhibbits@FreeBSD.org) Message-Id: <201701110221.v0B2LZCV010286@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhibbits set sender to jhibbits@FreeBSD.org using -f From: Justin Hibbits Date: Wed, 11 Jan 2017 02:21:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r311912 - head/sys/powerpc/include X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 11 Jan 2017 02:21:36 -0000 Author: jhibbits Date: Wed Jan 11 02:21:34 2017 New Revision: 311912 URL: https://svnweb.freebsd.org/changeset/base/311912 Log: Force all TOC references in asm to include '@toc' This reportedly fixes one problem with booting a clang kernel. PR: kern/215819 Submitted by: Mark Millard MFC after: 2 weeks Modified: head/sys/powerpc/include/asm.h Modified: head/sys/powerpc/include/asm.h ============================================================================== --- head/sys/powerpc/include/asm.h Wed Jan 11 01:53:54 2017 (r311911) +++ head/sys/powerpc/include/asm.h Wed Jan 11 02:21:34 2017 (r311912) @@ -89,10 +89,11 @@ name: #ifdef __powerpc64__ -#define TOC_REF(name) __CONCAT(.L,name) +#define TOC_NAME_FOR_REF(name) __CONCAT(.L,name) +#define TOC_REF(name) TOC_NAME_FOR_REF(name)@toc #define TOC_ENTRY(name) \ .section ".toc","aw"; \ - TOC_REF(name): \ + TOC_NAME_FOR_REF(name): \ .tc name[TC],name #endif From owner-svn-src-head@freebsd.org Wed Jan 11 05:49:41 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6DFFDCAA6C1; Wed, 11 Jan 2017 05:49:41 +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 4ABC11509; Wed, 11 Jan 2017 05:49:41 +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 v0B5neNN095118; Wed, 11 Jan 2017 05:49:40 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v0B5ndVp095110; Wed, 11 Jan 2017 05:49:39 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <201701110549.v0B5ndVp095110@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Wed, 11 Jan 2017 05:49:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r311914 - head/crypto/openssh X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 11 Jan 2017 05:49:41 -0000 Author: delphij Date: Wed Jan 11 05:49:39 2017 New Revision: 311914 URL: https://svnweb.freebsd.org/changeset/base/311914 Log: MFV r311913: Fix multiple OpenSSH vulnerabilities. Submitted by: des Approved by: so Modified: head/crypto/openssh/serverloop.c head/crypto/openssh/ssh-agent.1 head/crypto/openssh/ssh-agent.c head/crypto/openssh/ssh_config head/crypto/openssh/ssh_config.5 head/crypto/openssh/sshd_config head/crypto/openssh/sshd_config.5 head/crypto/openssh/version.h Directory Properties: head/crypto/openssh/ (props changed) Modified: head/crypto/openssh/serverloop.c ============================================================================== --- head/crypto/openssh/serverloop.c Wed Jan 11 05:42:06 2017 (r311913) +++ head/crypto/openssh/serverloop.c Wed Jan 11 05:49:39 2017 (r311914) @@ -995,7 +995,7 @@ server_request_direct_streamlocal(void) /* XXX fine grained permissions */ if ((options.allow_streamlocal_forwarding & FORWARD_LOCAL) != 0 && - !no_port_forwarding_flag) { + !no_port_forwarding_flag && use_privsep) { c = channel_connect_to_path(target, "direct-streamlocal@openssh.com", "direct-streamlocal"); } else { @@ -1279,7 +1279,7 @@ server_input_global_request(int type, u_ /* check permissions */ if ((options.allow_streamlocal_forwarding & FORWARD_REMOTE) == 0 - || no_port_forwarding_flag) { + || no_port_forwarding_flag || !use_privsep) { success = 0; packet_send_debug("Server has disabled port forwarding."); } else { Modified: head/crypto/openssh/ssh-agent.1 ============================================================================== --- head/crypto/openssh/ssh-agent.1 Wed Jan 11 05:42:06 2017 (r311913) +++ head/crypto/openssh/ssh-agent.1 Wed Jan 11 05:49:39 2017 (r311914) @@ -1,4 +1,4 @@ -.\" $OpenBSD: ssh-agent.1,v 1.62 2015/11/15 23:54:15 jmc Exp $ +.\" $OpenBSD: ssh-agent.1,v 1.63 2016/11/30 03:07:37 djm Exp $ .\" $FreeBSD$ .\" .\" Author: Tatu Ylonen @@ -48,6 +48,7 @@ .Op Fl a Ar bind_address .Op Fl E Ar fingerprint_hash .Op Fl t Ar life +.Op Fl P Ar pkcs11_whitelist .Op Ar command Op Ar arg ... .Nm ssh-agent .Op Fl c | s @@ -122,6 +123,18 @@ The default is Kill the current agent (given by the .Ev SSH_AGENT_PID environment variable). +.It Fl P +Specify a pattern-list of acceptable paths for PKCS#11 shared libraries +that may be added using the +.Fl s +option to +.Xr ssh-add 1 . +The default is to allow loading PKCS#11 libraries from +.Dq /usr/lib/*,/usr/local/lib/* . +PKCS#11 libraries that do not match the whitelist will be refused. +See PATTERNS in +.Xr ssh_config 5 +for a description of pattern-list syntax. .It Fl s Generate Bourne shell commands on .Dv stdout . Modified: head/crypto/openssh/ssh-agent.c ============================================================================== --- head/crypto/openssh/ssh-agent.c Wed Jan 11 05:42:06 2017 (r311913) +++ head/crypto/openssh/ssh-agent.c Wed Jan 11 05:49:39 2017 (r311914) @@ -84,11 +84,16 @@ __RCSID("$FreeBSD$"); #include "misc.h" #include "digest.h" #include "ssherr.h" +#include "match.h" #ifdef ENABLE_PKCS11 #include "ssh-pkcs11.h" #endif +#ifndef DEFAULT_PKCS11_WHITELIST +# define DEFAULT_PKCS11_WHITELIST "/usr/lib/*,/usr/local/lib/*" +#endif + #if defined(HAVE_SYS_PRCTL_H) #include /* For prctl() and PR_SET_DUMPABLE */ #endif @@ -140,6 +145,9 @@ pid_t cleanup_pid = 0; char socket_name[PATH_MAX]; char socket_dir[PATH_MAX]; +/* PKCS#11 path whitelist */ +static char *pkcs11_whitelist; + /* locking */ #define LOCK_SIZE 32 #define LOCK_SALT_SIZE 16 @@ -761,7 +769,7 @@ no_identities(SocketEntry *e, u_int type static void process_add_smartcard_key(SocketEntry *e) { - char *provider = NULL, *pin; + char *provider = NULL, *pin, canonical_provider[PATH_MAX]; int r, i, version, count = 0, success = 0, confirm = 0; u_int seconds; time_t death = 0; @@ -793,10 +801,21 @@ process_add_smartcard_key(SocketEntry *e goto send; } } + if (realpath(provider, canonical_provider) == NULL) { + verbose("failed PKCS#11 add of \"%.100s\": realpath: %s", + provider, strerror(errno)); + goto send; + } + if (match_pattern_list(canonical_provider, pkcs11_whitelist, 0) != 1) { + verbose("refusing PKCS#11 add of \"%.100s\": " + "provider not whitelisted", canonical_provider); + goto send; + } + debug("%s: add %.100s", __func__, canonical_provider); if (lifetime && !death) death = monotime() + lifetime; - count = pkcs11_add_provider(provider, pin, &keys); + count = pkcs11_add_provider(canonical_provider, pin, &keys); for (i = 0; i < count; i++) { k = keys[i]; version = k->type == KEY_RSA1 ? 1 : 2; @@ -804,8 +823,8 @@ process_add_smartcard_key(SocketEntry *e if (lookup_identity(k, version) == NULL) { id = xcalloc(1, sizeof(Identity)); id->key = k; - id->provider = xstrdup(provider); - id->comment = xstrdup(provider); /* XXX */ + id->provider = xstrdup(canonical_provider); + id->comment = xstrdup(canonical_provider); /* XXX */ id->death = death; id->confirm = confirm; TAILQ_INSERT_TAIL(&tab->idlist, id, next); @@ -1200,7 +1219,7 @@ usage(void) { fprintf(stderr, "usage: ssh-agent [-c | -s] [-Dd] [-a bind_address] [-E fingerprint_hash]\n" - " [-t life] [command [arg ...]]\n" + " [-P pkcs11_whitelist] [-t life] [command [arg ...]]\n" " ssh-agent [-c | -s] -k\n"); fprintf(stderr, " -x Exit when the last client disconnects.\n"); exit(1); @@ -1246,7 +1265,7 @@ main(int ac, char **av) __progname = ssh_get_progname(av[0]); seed_rng(); - while ((ch = getopt(ac, av, "cDdksE:a:t:x")) != -1) { + while ((ch = getopt(ac, av, "cDdksE:a:P:t:x")) != -1) { switch (ch) { case 'E': fingerprint_hash = ssh_digest_alg_by_name(optarg); @@ -1261,6 +1280,11 @@ main(int ac, char **av) case 'k': k_flag++; break; + case 'P': + if (pkcs11_whitelist != NULL) + fatal("-P option already specified"); + pkcs11_whitelist = xstrdup(optarg); + break; case 's': if (c_flag) usage(); @@ -1298,6 +1322,9 @@ main(int ac, char **av) if (ac > 0 && (c_flag || k_flag || s_flag || d_flag || D_flag)) usage(); + if (pkcs11_whitelist == NULL) + pkcs11_whitelist = xstrdup(DEFAULT_PKCS11_WHITELIST); + if (ac == 0 && !c_flag && !s_flag) { shell = getenv("SHELL"); if (shell != NULL && (len = strlen(shell)) > 2 && @@ -1445,7 +1472,7 @@ skip: signal(SIGTERM, cleanup_handler); nalloc = 0; - if (pledge("stdio cpath unix id proc exec", NULL) == -1) + if (pledge("stdio rpath cpath unix id proc exec", NULL) == -1) fatal("%s: pledge: %s", __progname, strerror(errno)); platform_pledge_agent(); Modified: head/crypto/openssh/ssh_config ============================================================================== --- head/crypto/openssh/ssh_config Wed Jan 11 05:42:06 2017 (r311913) +++ head/crypto/openssh/ssh_config Wed Jan 11 05:49:39 2017 (r311914) @@ -50,4 +50,4 @@ # ProxyCommand ssh -q -W %h:%p gateway.example.com # RekeyLimit 1G 1h # VerifyHostKeyDNS yes -# VersionAddendum FreeBSD-20160310 +# VersionAddendum FreeBSD-20161230 Modified: head/crypto/openssh/ssh_config.5 ============================================================================== --- head/crypto/openssh/ssh_config.5 Wed Jan 11 05:42:06 2017 (r311913) +++ head/crypto/openssh/ssh_config.5 Wed Jan 11 05:49:39 2017 (r311914) @@ -1727,7 +1727,7 @@ See also VERIFYING HOST KEYS in Specifies a string to append to the regular version string to identify OS- or site-specific modifications. The default is -.Dq FreeBSD-20160310 . +.Dq FreeBSD-20161230 . The value .Dq none may be used to disable this. Modified: head/crypto/openssh/sshd_config ============================================================================== --- head/crypto/openssh/sshd_config Wed Jan 11 05:42:06 2017 (r311913) +++ head/crypto/openssh/sshd_config Wed Jan 11 05:49:39 2017 (r311914) @@ -121,7 +121,7 @@ #PermitTunnel no #ChrootDirectory none #UseBlacklist no -#VersionAddendum FreeBSD-20160310 +#VersionAddendum FreeBSD-20161230 # no default banner path #Banner none Modified: head/crypto/openssh/sshd_config.5 ============================================================================== --- head/crypto/openssh/sshd_config.5 Wed Jan 11 05:42:06 2017 (r311913) +++ head/crypto/openssh/sshd_config.5 Wed Jan 11 05:49:39 2017 (r311914) @@ -1634,7 +1634,7 @@ The default is Optionally specifies additional text to append to the SSH protocol banner sent by the server upon connection. The default is -.Dq FreeBSD-20160310 . +.Dq FreeBSD-20161230 . The value .Dq none may be used to disable this. Modified: head/crypto/openssh/version.h ============================================================================== --- head/crypto/openssh/version.h Wed Jan 11 05:42:06 2017 (r311913) +++ head/crypto/openssh/version.h Wed Jan 11 05:49:39 2017 (r311914) @@ -6,7 +6,7 @@ #define SSH_PORTABLE "p2" #define SSH_RELEASE SSH_VERSION SSH_PORTABLE -#define SSH_VERSION_FREEBSD "FreeBSD-20160310" +#define SSH_VERSION_FREEBSD "FreeBSD-20161230" #ifdef WITH_OPENSSL #define OPENSSL_VERSION SSLeay_version(SSLEAY_VERSION) From owner-svn-src-head@freebsd.org Wed Jan 11 07:17:04 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6E554CAA5B1; Wed, 11 Jan 2017 07:17:04 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2F9771FF6; Wed, 11 Jan 2017 07:17:04 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v0B7H3QO031631; Wed, 11 Jan 2017 07:17:03 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v0B7H30W031630; Wed, 11 Jan 2017 07:17:03 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201701110717.v0B7H30W031630@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Wed, 11 Jan 2017 07:17:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r311917 - head/contrib/netbsd-tests/lib/libc/gen X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 11 Jan 2017 07:17:04 -0000 Author: ngie Date: Wed Jan 11 07:17:03 2017 New Revision: 311917 URL: https://svnweb.freebsd.org/changeset/base/311917 Log: Fix up r311227 Check for creat returning a value != -1, not a non-zero value MFC after: 3 days Pointyhat to: ngie Reported by: Coverity CID: 1368366 Modified: head/contrib/netbsd-tests/lib/libc/gen/t_dir.c Modified: head/contrib/netbsd-tests/lib/libc/gen/t_dir.c ============================================================================== --- head/contrib/netbsd-tests/lib/libc/gen/t_dir.c Wed Jan 11 06:01:23 2017 (r311916) +++ head/contrib/netbsd-tests/lib/libc/gen/t_dir.c Wed Jan 11 07:17:03 2017 (r311917) @@ -59,12 +59,12 @@ ATF_TC_BODY(seekdir_basic, tc) long here; #ifdef __FreeBSD__ -#define CREAT(x, m) do { \ - int _creat_fd; \ - ATF_REQUIRE_MSG((_creat_fd = creat((x), (m))), \ - "creat(%s, %x) failed: %s", (x), (m), \ - strerror(errno)); \ - (void)close(_creat_fd); \ +#define CREAT(x, m) do { \ + int _creat_fd; \ + ATF_REQUIRE_MSG((_creat_fd = creat((x), (m))) != -1, \ + "creat(%s, %x) failed: %s", (x), (m), \ + strerror(errno)); \ + (void)close(_creat_fd); \ } while(0); ATF_REQUIRE_MSG(mkdir("t", 0755) == 0, From owner-svn-src-head@freebsd.org Wed Jan 11 07:22:01 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id F4037CAA703; Wed, 11 Jan 2017 07:22:00 +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 AC633143E; Wed, 11 Jan 2017 07:22:00 +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 v0B7Lx8l034644; Wed, 11 Jan 2017 07:21:59 GMT (envelope-from hrs@FreeBSD.org) Received: (from hrs@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v0B7LxDm034643; Wed, 11 Jan 2017 07:21:59 GMT (envelope-from hrs@FreeBSD.org) Message-Id: <201701110721.v0B7LxDm034643@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hrs set sender to hrs@FreeBSD.org using -f From: Hiroki Sato Date: Wed, 11 Jan 2017 07:21:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r311918 - head/usr.sbin/syslogd X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 11 Jan 2017 07:22:01 -0000 Author: hrs Date: Wed Jan 11 07:21:59 2017 New Revision: 311918 URL: https://svnweb.freebsd.org/changeset/base/311918 Log: Add more #ifdef INET and INET6. Modified: head/usr.sbin/syslogd/syslogd.c Modified: head/usr.sbin/syslogd/syslogd.c ============================================================================== --- head/usr.sbin/syslogd/syslogd.c Wed Jan 11 07:17:03 2017 (r311917) +++ head/usr.sbin/syslogd/syslogd.c Wed Jan 11 07:21:59 2017 (r311918) @@ -89,9 +89,11 @@ __FBSDID("$FreeBSD$"); #include #include +#if defined(INET) || defined(INET6) #include -#include #include +#endif +#include #include #include @@ -127,8 +129,11 @@ static const char include_ext[] = ".conf #define MAXUNAMES 20 /* maximum number of user names */ #define sstosa(ss) ((struct sockaddr *)(ss)) +#ifdef INET #define sstosin(ss) ((struct sockaddr_in *)(void *)(ss)) #define satosin(sa) ((struct sockaddr_in *)(void *)(sa)) +#endif +#ifdef INET6 #define sstosin6(ss) ((struct sockaddr_in6 *)(void *)(ss)) #define satosin6(sa) ((struct sockaddr_in6 *)(void *)(sa)) #define s6_addr32 __u6_addr.__u6_addr32 @@ -137,6 +142,7 @@ static const char include_ext[] = ".conf (((d)->s6_addr32[1] ^ (a)->s6_addr32[1]) & (m)->s6_addr32[1]) == 0 && \ (((d)->s6_addr32[2] ^ (a)->s6_addr32[2]) & (m)->s6_addr32[2]) == 0 && \ (((d)->s6_addr32[3] ^ (a)->s6_addr32[3]) & (m)->s6_addr32[3]) == 0 ) +#endif /* * List of peers and sockets for binding. */ @@ -1305,10 +1311,12 @@ fprintlog(struct filed *f, int flags, co case F_FORW: dprintf(" %s", f->fu_forw_hname); switch (f->fu_forw_addr->ai_addr->sa_family) { +#ifdef INET case AF_INET: dprintf(":%d\n", ntohs(satosin(f->fu_forw_addr->ai_addr)->sin_port)); break; +#endif #ifdef INET6 case AF_INET6: dprintf(":%d\n", @@ -1929,7 +1937,20 @@ init(int signo) break; case F_FORW: - port = ntohs(satosin(f->fu_forw_addr->ai_addr)->sin_port); + switch (f->fu_forw_addr->ai_addr->sa_family) { +#ifdef INET + case AF_INET: + port = ntohs(satosin(f->fu_forw_addr->ai_addr)->sin_port); + break; +#endif +#ifdef INET6 + case AF_INET6: + port = ntohs(satosin6(f->fu_forw_addr->ai_addr)->sin6_port); + break; +#endif + default: + port = 0; + } if (port != 514) { printf("%s:%d", f->fu_forw_hname, port); @@ -2410,6 +2431,7 @@ timedout(int sig __unused) static int allowaddr(char *s) { +#if defined(INET) || defined(INET6) char *cp1, *cp2; struct allowedpeer *ap; struct servent *se; @@ -2571,6 +2593,7 @@ allowaddr(char *s) } printf("port = %d\n", ap->port); } +#endif return (0); } From owner-svn-src-head@freebsd.org Wed Jan 11 07:22:22 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7545ACAA888; Wed, 11 Jan 2017 07:22:22 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 423011621; Wed, 11 Jan 2017 07:22: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 v0B7MLxQ035454; Wed, 11 Jan 2017 07:22:21 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v0B7MLGi035453; Wed, 11 Jan 2017 07:22:21 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201701110722.v0B7MLGi035453@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Wed, 11 Jan 2017 07:22:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r311919 - head/contrib/netbsd-tests/lib/libc/sys X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 11 Jan 2017 07:22:22 -0000 Author: ngie Date: Wed Jan 11 07:22:21 2017 New Revision: 311919 URL: https://svnweb.freebsd.org/changeset/base/311919 Log: Partially revert r311236 There's no sense in trying to close a file descriptor from the negative cases with unlink_test; it's best to ignore these cases. The mkfifo case does make sense to keep though. MFC after: 3 days Modified: head/contrib/netbsd-tests/lib/libc/sys/t_unlink.c Modified: head/contrib/netbsd-tests/lib/libc/sys/t_unlink.c ============================================================================== --- head/contrib/netbsd-tests/lib/libc/sys/t_unlink.c Wed Jan 11 07:21:59 2017 (r311918) +++ head/contrib/netbsd-tests/lib/libc/sys/t_unlink.c Wed Jan 11 07:22:21 2017 (r311919) @@ -63,12 +63,7 @@ ATF_TC_BODY(unlink_basic, tc) ATF_REQUIRE(unlink(path) == 0); errno = 0; -#ifdef __FreeBSD__ - ATF_REQUIRE_ERRNO(ENOENT, (fd = open(path, O_RDONLY)) == -1); - (void)close(fd); -#else ATF_REQUIRE_ERRNO(ENOENT, open(path, O_RDONLY) == -1); -#endif } } @@ -128,12 +123,7 @@ ATF_TC_BODY(unlink_fifo, tc) ATF_REQUIRE(unlink(path) == 0); errno = 0; -#ifdef __FreeBSD__ - ATF_REQUIRE_ERRNO(ENOENT, (fd = open(path, O_RDONLY)) == -1); - (void)close(fd); -#else ATF_REQUIRE_ERRNO(ENOENT, open(path, O_RDONLY) == -1); -#endif } ATF_TC_CLEANUP(unlink_fifo, tc) From owner-svn-src-head@freebsd.org Wed Jan 11 08:43:59 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7C8B5CA96BE; Wed, 11 Jan 2017 08:43:59 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4937E123B; Wed, 11 Jan 2017 08:43:59 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v0B8hwQB068148; Wed, 11 Jan 2017 08:43:58 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v0B8hwlR068147; Wed, 11 Jan 2017 08:43:58 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201701110843.v0B8hwlR068147@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Wed, 11 Jan 2017 08:43:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r311923 - head/sys/modules/sdhci_acpi X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 11 Jan 2017 08:43:59 -0000 Author: ngie Date: Wed Jan 11 08:43:58 2017 New Revision: 311923 URL: https://svnweb.freebsd.org/changeset/base/311923 Log: Add acpi_if.h and opt_acpi.h to Makefile to unbreak "make depend" with sys/modules/sdhci_acpi MFC after: 6 days X-MFC with: r311911 Reported by: Jenkins Modified: head/sys/modules/sdhci_acpi/Makefile Modified: head/sys/modules/sdhci_acpi/Makefile ============================================================================== --- head/sys/modules/sdhci_acpi/Makefile Wed Jan 11 08:15:18 2017 (r311922) +++ head/sys/modules/sdhci_acpi/Makefile Wed Jan 11 08:43:58 2017 (r311923) @@ -3,6 +3,7 @@ .PATH: ${.CURDIR}/../../dev/sdhci KMOD= sdhci_acpi -SRCS= sdhci_acpi.c sdhci.h sdhci_if.h device_if.h bus_if.h pci_if.h mmcbr_if.h +SRCS= sdhci_acpi.c sdhci.h sdhci_if.h +SRCS+= acpi_if.h device_if.h bus_if.h opt_acpi.h pci_if.h mmcbr_if.h .include From owner-svn-src-head@freebsd.org Wed Jan 11 08:45:43 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 692B7CA975A; Wed, 11 Jan 2017 08:45:43 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: from mail-pg0-x242.google.com (mail-pg0-x242.google.com [IPv6:2607:f8b0:400e:c05::242]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 34DE11418; Wed, 11 Jan 2017 08:45:43 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: by mail-pg0-x242.google.com with SMTP id b1so53146603pgc.1; Wed, 11 Jan 2017 00:45:43 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=MzW3R7ThjonW9VaBZ9ZePLrbEzg480rxXv/M0dkUjB0=; b=uE7pMQffTWlj+Ub54Wfi6a1YCPEXHznDsCesQPzY822B1/dE76LQWR4tOpKFBM/jF0 zooSY7NcU2238RaRmNztXojF4MWoXDZQJLeGJWVKV+8oHt/DroVPBOcfABCg4WRRzrbL BvqvAAqT+80AEZAH1KeKYbvsHj5OHe8mW4IdYTPMuHYCSKqp0fy2omyhtZule94HYjKM HAgJg7LKasXR7T2kWkE2oS2ihM079WheACVg/+2IRADjCC68R/8CWu6IMHrvOMPyQRNh 9FTnS4lt30TDDalOgNIUWsHNzDUb57tWcqZonDkep6JkFFuvbjUUvowa6GR7rlj+wE2I JVyw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=MzW3R7ThjonW9VaBZ9ZePLrbEzg480rxXv/M0dkUjB0=; b=F/qz7T3Zm+C0URtiRuNXVNJT7Jdc6X9OVnbUbH9uChDgTw41kRtPSnhY6qvdIyn5EC uIAPfUb1XFg9TSqRnIRSYFgjpD/qpTB0nafNF0xFgZsQ4TImA5/rgCL3bsScRXT5BHql d0dWiTA+CS9+GUURWlUw8Grx9rTlJluFNOoQiiNulbmmeihH2a9nKMsD0/JFQMiPFx3P KeF26YtsYHa+UE4znE1+K5Xv1rki9KGBT1mJPC3lVY8DZTjX0TOLNoS3w9+uZRZLkq+C kCfzim5hjOKWBs4Me4v3569uQRe+3fpFf4N9MoXTSbyxbL+NalPRfhMW3zJozAurBn30 5XlQ== X-Gm-Message-State: AIkVDXKLG5EIhDXYkb6EaIP6ybu/ifX+7J3WXYoAZp+yZKUSVeWl8sxO8X2PAtpi4KwFcw== X-Received: by 10.84.232.78 with SMTP id f14mr11717627pln.27.1484124342653; Wed, 11 Jan 2017 00:45:42 -0800 (PST) Received: from fuji-wireless.local (c-73-19-52-228.hsd1.wa.comcast.net. [73.19.52.228]) by smtp.gmail.com with ESMTPSA id t15sm11594408pgn.18.2017.01.11.00.45.41 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 11 Jan 2017 00:45:42 -0800 (PST) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 10.2 \(3259\)) Subject: Re: svn commit: r311911 - in head/sys: conf dev/sdhci modules modules/sdhci_acpi From: "Ngie Cooper (yaneurabeya)" In-Reply-To: <201701110153.v0B1rsws002127@repo.freebsd.org> Date: Wed, 11 Jan 2017 00:45:40 -0800 Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Transfer-Encoding: quoted-printable Message-Id: <388FCCEE-8999-4DAD-9689-1C50D1F045FE@gmail.com> References: <201701110153.v0B1rsws002127@repo.freebsd.org> To: Oleksandr Tymoshenko X-Mailer: Apple Mail (2.3259) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 11 Jan 2017 08:45:43 -0000 > On Jan 10, 2017, at 5:53 PM, Oleksandr Tymoshenko = wrote: >=20 > Author: gonzo > Date: Wed Jan 11 01:53:54 2017 > New Revision: 311911 > URL: https://svnweb.freebsd.org/changeset/base/311911 >=20 > Log: > [sdhci] Add ACPI platform support for SDHCI driver >=20 > - Create ACPI version of SDHCI attach/detach/accessors logic. Some > platforms (e.g. BayTrail-based Minnowboard) expose SDHCI devices > via ACPI, not PCI > - Add sdchi_acpi kernel module >=20 > Reviewed by: ian, imp > MFC after: 1 week > Differential Revision: https://reviews.freebsd.org/D9112 Hi, This broke the build for a bit because of missing headers in = SRCS. Please MFC r311923 too. Thank you! -Ngie= From owner-svn-src-head@freebsd.org Wed Jan 11 09:34:43 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 72BEFCAAABA; Wed, 11 Jan 2017 09:34: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 413231089; Wed, 11 Jan 2017 09:34: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 v0B9YgZK088667; Wed, 11 Jan 2017 09:34:42 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v0B9YgGW088665; Wed, 11 Jan 2017 09:34:42 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201701110934.v0B9YgGW088665@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Wed, 11 Jan 2017 09:34:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r311924 - head/contrib/netbsd-tests/lib/libc/gen X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 11 Jan 2017 09:34:43 -0000 Author: ngie Date: Wed Jan 11 09:34:42 2017 New Revision: 311924 URL: https://svnweb.freebsd.org/changeset/base/311924 Log: Fix whitespace in comment MFC after: 3 days Modified: head/contrib/netbsd-tests/lib/libc/gen/t_setdomainname.c head/contrib/netbsd-tests/lib/libc/gen/t_sethostname.c Modified: head/contrib/netbsd-tests/lib/libc/gen/t_setdomainname.c ============================================================================== --- head/contrib/netbsd-tests/lib/libc/gen/t_setdomainname.c Wed Jan 11 08:43:58 2017 (r311923) +++ head/contrib/netbsd-tests/lib/libc/gen/t_setdomainname.c Wed Jan 11 09:34:42 2017 (r311924) @@ -64,7 +64,7 @@ ATF_TC_BODY(setdomainname_basic, tc) (void)memset(name, 0, sizeof(name)); #ifdef __FreeBSD__ - /* + /* * Sanity checks to ensure that the wrong invariant isn't being * tested for per PR # 181127 */ Modified: head/contrib/netbsd-tests/lib/libc/gen/t_sethostname.c ============================================================================== --- head/contrib/netbsd-tests/lib/libc/gen/t_sethostname.c Wed Jan 11 08:43:58 2017 (r311923) +++ head/contrib/netbsd-tests/lib/libc/gen/t_sethostname.c Wed Jan 11 09:34:42 2017 (r311924) @@ -66,7 +66,7 @@ ATF_TC_BODY(sethostname_basic, tc) (void)memset(name, 0, sizeof(name)); #ifdef __FreeBSD__ - /* + /* * Sanity checks to ensure that the wrong invariant isn't being * tested for per PR # 181127 */ From owner-svn-src-head@freebsd.org Wed Jan 11 09:51:38 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5AAC9CAA20B; Wed, 11 Jan 2017 09:51: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 230701A77; Wed, 11 Jan 2017 09:51: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 v0B9pbOK094495; Wed, 11 Jan 2017 09:51:37 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v0B9pYPl094461; Wed, 11 Jan 2017 09:51:34 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201701110951.v0B9pYPl094461@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Wed, 11 Jan 2017 09:51:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r311925 - in head/contrib/netbsd-tests/lib/libc: . c063 gen gen/posix_spawn string sys X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 11 Jan 2017 09:51:38 -0000 Author: ngie Date: Wed Jan 11 09:51:34 2017 New Revision: 311925 URL: https://svnweb.freebsd.org/changeset/base/311925 Log: Import testcase updates with code contributed back to NetBSD This also (inadvertently) contains an update to contrib/netbsd-tests/lib/libc/sys/t_wait.c (new testcases). MFC after: 2 weeks In collaboration with: christos@NetBSD.org Modified: head/contrib/netbsd-tests/lib/libc/c063/t_faccessat.c head/contrib/netbsd-tests/lib/libc/c063/t_fchmodat.c head/contrib/netbsd-tests/lib/libc/c063/t_fchownat.c head/contrib/netbsd-tests/lib/libc/c063/t_fexecve.c head/contrib/netbsd-tests/lib/libc/c063/t_fstatat.c head/contrib/netbsd-tests/lib/libc/c063/t_mkfifoat.c head/contrib/netbsd-tests/lib/libc/c063/t_mknodat.c head/contrib/netbsd-tests/lib/libc/c063/t_o_search.c head/contrib/netbsd-tests/lib/libc/c063/t_openat.c head/contrib/netbsd-tests/lib/libc/c063/t_readlinkat.c head/contrib/netbsd-tests/lib/libc/c063/t_unlinkat.c head/contrib/netbsd-tests/lib/libc/c063/t_utimensat.c head/contrib/netbsd-tests/lib/libc/gen/posix_spawn/t_fileactions.c head/contrib/netbsd-tests/lib/libc/gen/t_assert.c head/contrib/netbsd-tests/lib/libc/gen/t_dir.c head/contrib/netbsd-tests/lib/libc/gen/t_ftok.c head/contrib/netbsd-tests/lib/libc/gen/t_humanize_number.c head/contrib/netbsd-tests/lib/libc/gen/t_sleep.c head/contrib/netbsd-tests/lib/libc/gen/t_time.c head/contrib/netbsd-tests/lib/libc/gen/t_ttyname.c head/contrib/netbsd-tests/lib/libc/gen/t_vis.c head/contrib/netbsd-tests/lib/libc/string/t_strchr.c head/contrib/netbsd-tests/lib/libc/string/t_strerror.c head/contrib/netbsd-tests/lib/libc/sys/t_access.c head/contrib/netbsd-tests/lib/libc/sys/t_chroot.c head/contrib/netbsd-tests/lib/libc/sys/t_mincore.c head/contrib/netbsd-tests/lib/libc/sys/t_mmap.c head/contrib/netbsd-tests/lib/libc/sys/t_wait.c head/contrib/netbsd-tests/lib/libc/t_cdb.c Directory Properties: head/contrib/netbsd-tests/ (props changed) Modified: head/contrib/netbsd-tests/lib/libc/c063/t_faccessat.c ============================================================================== --- head/contrib/netbsd-tests/lib/libc/c063/t_faccessat.c Wed Jan 11 09:34:42 2017 (r311924) +++ head/contrib/netbsd-tests/lib/libc/c063/t_faccessat.c Wed Jan 11 09:51:34 2017 (r311925) @@ -1,4 +1,4 @@ -/* $NetBSD: t_faccessat.c,v 1.2 2013/03/17 04:46:06 jmmv Exp $ */ +/* $NetBSD: t_faccessat.c,v 1.3 2017/01/10 15:13:56 christos Exp $ */ /*- * Copyright (c) 2012 The NetBSD Foundation, Inc. @@ -29,8 +29,10 @@ * POSSIBILITY OF SUCH DAMAGE. */ #include -__RCSID("$NetBSD: t_faccessat.c,v 1.2 2013/03/17 04:46:06 jmmv Exp $"); +__RCSID("$NetBSD: t_faccessat.c,v 1.3 2017/01/10 15:13:56 christos Exp $"); +#include +#include #include #include #include @@ -39,10 +41,6 @@ __RCSID("$NetBSD: t_faccessat.c,v 1.2 20 #include #include #include -#include -#ifdef __FreeBSD__ -#include -#endif #define DIR "dir" #define FILE "dir/faccessat" Modified: head/contrib/netbsd-tests/lib/libc/c063/t_fchmodat.c ============================================================================== --- head/contrib/netbsd-tests/lib/libc/c063/t_fchmodat.c Wed Jan 11 09:34:42 2017 (r311924) +++ head/contrib/netbsd-tests/lib/libc/c063/t_fchmodat.c Wed Jan 11 09:51:34 2017 (r311925) @@ -1,4 +1,4 @@ -/* $NetBSD: t_fchmodat.c,v 1.2 2013/03/17 04:46:06 jmmv Exp $ */ +/* $NetBSD: t_fchmodat.c,v 1.3 2017/01/10 15:13:56 christos Exp $ */ /*- * Copyright (c) 2012 The NetBSD Foundation, Inc. @@ -29,8 +29,10 @@ * POSSIBILITY OF SUCH DAMAGE. */ #include -__RCSID("$NetBSD: t_fchmodat.c,v 1.2 2013/03/17 04:46:06 jmmv Exp $"); +__RCSID("$NetBSD: t_fchmodat.c,v 1.3 2017/01/10 15:13:56 christos Exp $"); +#include +#include #include #include #include @@ -39,10 +41,6 @@ __RCSID("$NetBSD: t_fchmodat.c,v 1.2 201 #include #include #include -#include -#ifdef __FreeBSD__ -#include -#endif #define DIR "dir" #define FILE "dir/fchmodat" Modified: head/contrib/netbsd-tests/lib/libc/c063/t_fchownat.c ============================================================================== --- head/contrib/netbsd-tests/lib/libc/c063/t_fchownat.c Wed Jan 11 09:34:42 2017 (r311924) +++ head/contrib/netbsd-tests/lib/libc/c063/t_fchownat.c Wed Jan 11 09:51:34 2017 (r311925) @@ -1,4 +1,4 @@ -/* $NetBSD: t_fchownat.c,v 1.3 2013/03/17 04:46:06 jmmv Exp $ */ +/* $NetBSD: t_fchownat.c,v 1.4 2017/01/10 15:13:56 christos Exp $ */ /*- * Copyright (c) 2012 The NetBSD Foundation, Inc. @@ -29,8 +29,10 @@ * POSSIBILITY OF SUCH DAMAGE. */ #include -__RCSID("$NetBSD: t_fchownat.c,v 1.3 2013/03/17 04:46:06 jmmv Exp $"); +__RCSID("$NetBSD: t_fchownat.c,v 1.4 2017/01/10 15:13:56 christos Exp $"); +#include +#include #include #include #include @@ -40,10 +42,6 @@ __RCSID("$NetBSD: t_fchownat.c,v 1.3 201 #include #include #include -#include -#ifdef __FreeBSD__ -#include -#endif #define DIR "dir" #define FILE "dir/fchownat" Modified: head/contrib/netbsd-tests/lib/libc/c063/t_fexecve.c ============================================================================== --- head/contrib/netbsd-tests/lib/libc/c063/t_fexecve.c Wed Jan 11 09:34:42 2017 (r311924) +++ head/contrib/netbsd-tests/lib/libc/c063/t_fexecve.c Wed Jan 11 09:51:34 2017 (r311925) @@ -1,4 +1,4 @@ -/* $NetBSD: t_fexecve.c,v 1.2 2013/03/17 04:35:59 jmmv Exp $ */ +/* $NetBSD: t_fexecve.c,v 1.3 2017/01/10 15:15:09 christos Exp $ */ /*- * Copyright (c) 2012 The NetBSD Foundation, Inc. @@ -29,7 +29,7 @@ * POSSIBILITY OF SUCH DAMAGE. */ #include -__RCSID("$NetBSD: t_fexecve.c,v 1.2 2013/03/17 04:35:59 jmmv Exp $"); +__RCSID("$NetBSD: t_fexecve.c,v 1.3 2017/01/10 15:15:09 christos Exp $"); #include @@ -70,9 +70,7 @@ ATF_TC_BODY(fexecve, tc) error = 76; else error = EXIT_FAILURE; -#ifdef __FreeBSD__ (void)close(fd); -#endif err(error, "fexecve"); } } Modified: head/contrib/netbsd-tests/lib/libc/c063/t_fstatat.c ============================================================================== --- head/contrib/netbsd-tests/lib/libc/c063/t_fstatat.c Wed Jan 11 09:34:42 2017 (r311924) +++ head/contrib/netbsd-tests/lib/libc/c063/t_fstatat.c Wed Jan 11 09:51:34 2017 (r311925) @@ -1,4 +1,4 @@ -/* $NetBSD: t_fstatat.c,v 1.2 2013/03/17 04:46:06 jmmv Exp $ */ +/* $NetBSD: t_fstatat.c,v 1.3 2017/01/10 15:13:56 christos Exp $ */ /*- * Copyright (c) 2012 The NetBSD Foundation, Inc. @@ -29,8 +29,10 @@ * POSSIBILITY OF SUCH DAMAGE. */ #include -__RCSID("$NetBSD: t_fstatat.c,v 1.2 2013/03/17 04:46:06 jmmv Exp $"); +__RCSID("$NetBSD: t_fstatat.c,v 1.3 2017/01/10 15:13:56 christos Exp $"); +#include +#include #include #include #include @@ -39,10 +41,6 @@ __RCSID("$NetBSD: t_fstatat.c,v 1.2 2013 #include #include #include -#include -#ifdef __FreeBSD__ -#include -#endif #define DIR "dir" #define FILE "dir/fstatat" Modified: head/contrib/netbsd-tests/lib/libc/c063/t_mkfifoat.c ============================================================================== --- head/contrib/netbsd-tests/lib/libc/c063/t_mkfifoat.c Wed Jan 11 09:34:42 2017 (r311924) +++ head/contrib/netbsd-tests/lib/libc/c063/t_mkfifoat.c Wed Jan 11 09:51:34 2017 (r311925) @@ -1,4 +1,4 @@ -/* $NetBSD: t_mkfifoat.c,v 1.2 2013/03/17 04:46:06 jmmv Exp $ */ +/* $NetBSD: t_mkfifoat.c,v 1.3 2017/01/10 15:15:09 christos Exp $ */ /*- * Copyright (c) 2012 The NetBSD Foundation, Inc. @@ -29,7 +29,7 @@ * POSSIBILITY OF SUCH DAMAGE. */ #include -__RCSID("$NetBSD: t_mkfifoat.c,v 1.2 2013/03/17 04:46:06 jmmv Exp $"); +__RCSID("$NetBSD: t_mkfifoat.c,v 1.3 2017/01/10 15:15:09 christos Exp $"); #include #include @@ -63,9 +63,7 @@ ATF_TC_BODY(mkfifoat_fd, tc) ATF_REQUIRE((fd = mkfifoat(dfd, BASEFIFO, mode)) != -1); ATF_REQUIRE(close(fd) == 0); ATF_REQUIRE(access(FIFO, F_OK) == 0); -#ifdef __FreeBSD__ (void)close(dfd); -#endif } ATF_TC(mkfifoat_fdcwd); Modified: head/contrib/netbsd-tests/lib/libc/c063/t_mknodat.c ============================================================================== --- head/contrib/netbsd-tests/lib/libc/c063/t_mknodat.c Wed Jan 11 09:34:42 2017 (r311924) +++ head/contrib/netbsd-tests/lib/libc/c063/t_mknodat.c Wed Jan 11 09:51:34 2017 (r311925) @@ -1,4 +1,4 @@ -/* $NetBSD: t_mknodat.c,v 1.3 2013/03/17 04:46:06 jmmv Exp $ */ +/* $NetBSD: t_mknodat.c,v 1.4 2017/01/10 15:15:09 christos Exp $ */ /*- * Copyright (c) 2012 The NetBSD Foundation, Inc. @@ -29,7 +29,7 @@ * POSSIBILITY OF SUCH DAMAGE. */ #include -__RCSID("$NetBSD: t_mknodat.c,v 1.3 2013/03/17 04:46:06 jmmv Exp $"); +__RCSID("$NetBSD: t_mknodat.c,v 1.4 2017/01/10 15:15:09 christos Exp $"); #include #include @@ -80,9 +80,7 @@ ATF_TC_BODY(mknodat_fd, tc) ATF_REQUIRE((fd = mknodat(dfd, BASEFILE, mode, dev)) != -1); ATF_REQUIRE(close(fd) == 0); ATF_REQUIRE(access(FILE, F_OK) == 0); -#ifdef __FreeBSD__ (void)close(dfd); -#endif } ATF_TC(mknodat_fdcwd); Modified: head/contrib/netbsd-tests/lib/libc/c063/t_o_search.c ============================================================================== --- head/contrib/netbsd-tests/lib/libc/c063/t_o_search.c Wed Jan 11 09:34:42 2017 (r311924) +++ head/contrib/netbsd-tests/lib/libc/c063/t_o_search.c Wed Jan 11 09:51:34 2017 (r311925) @@ -1,4 +1,4 @@ -/* $NetBSD: t_o_search.c,v 1.4 2013/03/17 04:46:06 jmmv Exp $ */ +/* $NetBSD: t_o_search.c,v 1.5 2017/01/10 22:25:01 christos Exp $ */ /*- * Copyright (c) 2012 The NetBSD Foundation, Inc. @@ -29,9 +29,13 @@ * POSSIBILITY OF SUCH DAMAGE. */ #include -__RCSID("$NetBSD: t_o_search.c,v 1.4 2013/03/17 04:46:06 jmmv Exp $"); +__RCSID("$NetBSD: t_o_search.c,v 1.5 2017/01/10 22:25:01 christos Exp $"); #include + +#include +#include + #include #include #include @@ -40,7 +44,6 @@ __RCSID("$NetBSD: t_o_search.c,v 1.4 201 #include #include #include -#include /* * dholland 20130112: disable tests that require O_SEARCH semantics Modified: head/contrib/netbsd-tests/lib/libc/c063/t_openat.c ============================================================================== --- head/contrib/netbsd-tests/lib/libc/c063/t_openat.c Wed Jan 11 09:34:42 2017 (r311924) +++ head/contrib/netbsd-tests/lib/libc/c063/t_openat.c Wed Jan 11 09:51:34 2017 (r311925) @@ -1,4 +1,4 @@ -/* $NetBSD: t_openat.c,v 1.2 2013/03/17 04:46:06 jmmv Exp $ */ +/* $NetBSD: t_openat.c,v 1.3 2017/01/10 15:13:56 christos Exp $ */ /*- * Copyright (c) 2012 The NetBSD Foundation, Inc. @@ -29,8 +29,10 @@ * POSSIBILITY OF SUCH DAMAGE. */ #include -__RCSID("$NetBSD: t_openat.c,v 1.2 2013/03/17 04:46:06 jmmv Exp $"); +__RCSID("$NetBSD: t_openat.c,v 1.3 2017/01/10 15:13:56 christos Exp $"); +#include +#include #include #include #include @@ -39,10 +41,6 @@ __RCSID("$NetBSD: t_openat.c,v 1.2 2013/ #include #include #include -#include -#ifdef __FreeBSD__ -#include -#endif #define DIR "dir" #define FILE "dir/openat" Modified: head/contrib/netbsd-tests/lib/libc/c063/t_readlinkat.c ============================================================================== --- head/contrib/netbsd-tests/lib/libc/c063/t_readlinkat.c Wed Jan 11 09:34:42 2017 (r311924) +++ head/contrib/netbsd-tests/lib/libc/c063/t_readlinkat.c Wed Jan 11 09:51:34 2017 (r311925) @@ -1,4 +1,4 @@ -/* $NetBSD: t_readlinkat.c,v 1.3 2013/03/17 04:46:06 jmmv Exp $ */ +/* $NetBSD: t_readlinkat.c,v 1.4 2017/01/10 15:13:56 christos Exp $ */ /*- * Copyright (c) 2012 The NetBSD Foundation, Inc. @@ -29,8 +29,10 @@ * POSSIBILITY OF SUCH DAMAGE. */ #include -__RCSID("$NetBSD: t_readlinkat.c,v 1.3 2013/03/17 04:46:06 jmmv Exp $"); +__RCSID("$NetBSD: t_readlinkat.c,v 1.4 2017/01/10 15:13:56 christos Exp $"); +#include +#include #include #include #include @@ -39,10 +41,6 @@ __RCSID("$NetBSD: t_readlinkat.c,v 1.3 2 #include #include #include -#include -#ifdef __FreeBSD__ -#include -#endif #define DIR "dir" #define FILE "dir/readlinkat" Modified: head/contrib/netbsd-tests/lib/libc/c063/t_unlinkat.c ============================================================================== --- head/contrib/netbsd-tests/lib/libc/c063/t_unlinkat.c Wed Jan 11 09:34:42 2017 (r311924) +++ head/contrib/netbsd-tests/lib/libc/c063/t_unlinkat.c Wed Jan 11 09:51:34 2017 (r311925) @@ -1,4 +1,4 @@ -/* $NetBSD: t_unlinkat.c,v 1.2 2013/03/17 04:46:06 jmmv Exp $ */ +/* $NetBSD: t_unlinkat.c,v 1.3 2017/01/10 15:13:56 christos Exp $ */ /*- * Copyright (c) 2012 The NetBSD Foundation, Inc. @@ -29,8 +29,10 @@ * POSSIBILITY OF SUCH DAMAGE. */ #include -__RCSID("$NetBSD: t_unlinkat.c,v 1.2 2013/03/17 04:46:06 jmmv Exp $"); +__RCSID("$NetBSD: t_unlinkat.c,v 1.3 2017/01/10 15:13:56 christos Exp $"); +#include +#include #include #include #include @@ -39,10 +41,6 @@ __RCSID("$NetBSD: t_unlinkat.c,v 1.2 201 #include #include #include -#include -#ifdef __FreeBSD__ -#include -#endif #define DIR "dir" #define FILE "dir/unlinkat" Modified: head/contrib/netbsd-tests/lib/libc/c063/t_utimensat.c ============================================================================== --- head/contrib/netbsd-tests/lib/libc/c063/t_utimensat.c Wed Jan 11 09:34:42 2017 (r311924) +++ head/contrib/netbsd-tests/lib/libc/c063/t_utimensat.c Wed Jan 11 09:51:34 2017 (r311925) @@ -1,4 +1,4 @@ -/* $NetBSD: t_utimensat.c,v 1.5 2013/03/17 04:46:06 jmmv Exp $ */ +/* $NetBSD: t_utimensat.c,v 1.6 2017/01/10 15:13:56 christos Exp $ */ /*- * Copyright (c) 2012 The NetBSD Foundation, Inc. @@ -29,8 +29,11 @@ * POSSIBILITY OF SUCH DAMAGE. */ #include -__RCSID("$NetBSD: t_utimensat.c,v 1.5 2013/03/17 04:46:06 jmmv Exp $"); +__RCSID("$NetBSD: t_utimensat.c,v 1.6 2017/01/10 15:13:56 christos Exp $"); +#include +#include +#include #include #include #include @@ -39,11 +42,6 @@ __RCSID("$NetBSD: t_utimensat.c,v 1.5 20 #include #include #include -#include -#ifdef __FreeBSD__ -#include -#endif -#include #define DIR "dir" #define FILE "dir/utimensat" Modified: head/contrib/netbsd-tests/lib/libc/gen/posix_spawn/t_fileactions.c ============================================================================== --- head/contrib/netbsd-tests/lib/libc/gen/posix_spawn/t_fileactions.c Wed Jan 11 09:34:42 2017 (r311924) +++ head/contrib/netbsd-tests/lib/libc/gen/posix_spawn/t_fileactions.c Wed Jan 11 09:51:34 2017 (r311925) @@ -1,4 +1,4 @@ -/* $NetBSD: t_fileactions.c,v 1.5 2012/04/09 19:42:07 martin Exp $ */ +/* $NetBSD: t_fileactions.c,v 1.6 2017/01/10 22:36:29 christos Exp $ */ /*- * Copyright (c) 2012 The NetBSD Foundation, Inc. @@ -31,10 +31,11 @@ */ -#ifdef __FreeBSD__ -#include -#endif #include + +#include +#include + #include #include #include @@ -42,7 +43,6 @@ #include #include #include -#include ATF_TC(t_spawn_openmode); Modified: head/contrib/netbsd-tests/lib/libc/gen/t_assert.c ============================================================================== --- head/contrib/netbsd-tests/lib/libc/gen/t_assert.c Wed Jan 11 09:34:42 2017 (r311924) +++ head/contrib/netbsd-tests/lib/libc/gen/t_assert.c Wed Jan 11 09:51:34 2017 (r311925) @@ -1,4 +1,4 @@ -/* $NetBSD: t_assert.c,v 1.2 2011/06/14 05:28:00 jruoho Exp $ */ +/* $NetBSD: t_assert.c,v 1.3 2017/01/10 15:17:57 christos Exp $ */ /*- * Copyright (c) 2011 The NetBSD Foundation, Inc. @@ -29,8 +29,11 @@ * POSSIBILITY OF SUCH DAMAGE. */ #include -__RCSID("$NetBSD: t_assert.c,v 1.2 2011/06/14 05:28:00 jruoho Exp $"); +__RCSID("$NetBSD: t_assert.c,v 1.3 2017/01/10 15:17:57 christos Exp $"); +#include +#include +#include #include #include @@ -40,11 +43,6 @@ __RCSID("$NetBSD: t_assert.c,v 1.2 2011/ #include #include -#ifdef __FreeBSD__ -#include -#include -#include - static void disable_corefile(void) { @@ -55,7 +53,6 @@ disable_corefile(void) ATF_REQUIRE(setrlimit(RLIMIT_CORE, &limits) == 0); } -#endif static void handler(int); @@ -82,9 +79,7 @@ ATF_TC_BODY(assert_false, tc) if (pid == 0) { -#ifdef __FreeBSD__ disable_corefile(); -#endif (void)closefrom(0); (void)memset(&sa, 0, sizeof(struct sigaction)); @@ -122,9 +117,7 @@ ATF_TC_BODY(assert_true, tc) if (pid == 0) { -#ifdef __FreeBSD__ disable_corefile(); -#endif (void)closefrom(0); (void)memset(&sa, 0, sizeof(struct sigaction)); Modified: head/contrib/netbsd-tests/lib/libc/gen/t_dir.c ============================================================================== --- head/contrib/netbsd-tests/lib/libc/gen/t_dir.c Wed Jan 11 09:34:42 2017 (r311924) +++ head/contrib/netbsd-tests/lib/libc/gen/t_dir.c Wed Jan 11 09:51:34 2017 (r311925) @@ -1,4 +1,4 @@ -/* $NetBSD: t_dir.c,v 1.6 2013/10/19 17:45:00 christos Exp $ */ +/* $NetBSD: t_dir.c,v 1.8 2017/01/11 07:26:17 christos Exp $ */ /*- * Copyright (c) 2010 The NetBSD Foundation, Inc. @@ -26,22 +26,19 @@ * POSSIBILITY OF SUCH DAMAGE. */ -#include - +#include #include +#include #include #include +#include #include #include #include #include #include -#include -#ifdef __FreeBSD__ -#include -#endif ATF_TC(seekdir_basic); ATF_TC_HEAD(seekdir_basic, tc) @@ -58,7 +55,6 @@ ATF_TC_BODY(seekdir_basic, tc) struct dirent *entry; long here; -#ifdef __FreeBSD__ #define CREAT(x, m) do { \ int _creat_fd; \ ATF_REQUIRE_MSG((_creat_fd = creat((x), (m))) != -1, \ @@ -72,12 +68,6 @@ ATF_TC_BODY(seekdir_basic, tc) CREAT("t/a", 0600); CREAT("t/b", 0600); CREAT("t/c", 0600); -#else - mkdir("t", 0755); - creat("t/a", 0600); - creat("t/b", 0600); - creat("t/c", 0600); -#endif dp = opendir("t"); if ( dp == NULL) @@ -90,10 +80,8 @@ ATF_TC_BODY(seekdir_basic, tc) /* get first entry */ entry = readdir(dp); here = telldir(dp); -#ifdef __FreeBSD__ ATF_REQUIRE_MSG(here != -1, "telldir failed: %s", strerror(errno)); -#endif /* get second entry */ entry = readdir(dp); @@ -137,9 +125,7 @@ ATF_TC_BODY(seekdir_basic, tc) atf_tc_fail("3rd seekdir found wrong name"); closedir(dp); -#ifdef __FreeBSD__ free(wasname); -#endif } /* There is no sbrk on AArch64 and RISC-V */ Modified: head/contrib/netbsd-tests/lib/libc/gen/t_ftok.c ============================================================================== --- head/contrib/netbsd-tests/lib/libc/gen/t_ftok.c Wed Jan 11 09:34:42 2017 (r311924) +++ head/contrib/netbsd-tests/lib/libc/gen/t_ftok.c Wed Jan 11 09:51:34 2017 (r311925) @@ -1,4 +1,4 @@ -/* $NetBSD: t_ftok.c,v 1.1 2011/11/08 05:47:00 jruoho Exp $ */ +/* $NetBSD: t_ftok.c,v 1.2 2017/01/10 15:19:52 christos Exp $ */ /*- * Copyright (c) 2011 The NetBSD Foundation, Inc. @@ -29,7 +29,7 @@ * POSSIBILITY OF SUCH DAMAGE. */ #include -__RCSID("$NetBSD: t_ftok.c,v 1.1 2011/11/08 05:47:00 jruoho Exp $"); +__RCSID("$NetBSD: t_ftok.c,v 1.2 2017/01/10 15:19:52 christos Exp $"); #include #include @@ -68,9 +68,7 @@ ATF_TC_BODY(ftok_link, tc) fd = open(path, O_RDONLY | O_CREAT); ATF_REQUIRE(fd >= 0); -#ifdef __FreeBSD__ (void)close(fd); -#endif ATF_REQUIRE(link(path, hlnk) == 0); ATF_REQUIRE(symlink(path, slnk) == 0); Modified: head/contrib/netbsd-tests/lib/libc/gen/t_humanize_number.c ============================================================================== --- head/contrib/netbsd-tests/lib/libc/gen/t_humanize_number.c Wed Jan 11 09:34:42 2017 (r311924) +++ head/contrib/netbsd-tests/lib/libc/gen/t_humanize_number.c Wed Jan 11 09:51:34 2017 (r311925) @@ -1,4 +1,4 @@ -/* $NetBSD: t_humanize_number.c,v 1.8 2012/03/18 07:14:08 jruoho Exp $ */ +/* $NetBSD: t_humanize_number.c,v 1.9 2017/01/10 15:20:44 christos Exp $ */ /*- * Copyright (c) 2010, 2011 The NetBSD Foundation, Inc. @@ -247,9 +247,7 @@ ATF_TC_BODY(humanize_number_basic, tc) newline(); atf_tc_fail_nonfatal("Failed for table entry %d", i); } -#ifdef __FreeBSD__ free(buf); -#endif } ATF_TC(humanize_number_big); Modified: head/contrib/netbsd-tests/lib/libc/gen/t_sleep.c ============================================================================== --- head/contrib/netbsd-tests/lib/libc/gen/t_sleep.c Wed Jan 11 09:34:42 2017 (r311924) +++ head/contrib/netbsd-tests/lib/libc/gen/t_sleep.c Wed Jan 11 09:51:34 2017 (r311925) @@ -1,4 +1,4 @@ -/* $NetBSD: t_sleep.c,v 1.9 2016/08/11 21:34:11 kre Exp $ */ +/* $NetBSD: t_sleep.c,v 1.11 2017/01/10 15:43:59 maya Exp $ */ /*- * Copyright (c) 2006 Frank Kardel @@ -26,8 +26,17 @@ * POSSIBILITY OF SUCH DAMAGE. */ +#ifdef __FreeBSD__ +#include +#endif +#include +#include +#include +#include /* for TIMESPEC_TO_TIMEVAL on FreeBSD */ + #include #include +#include #include #include #include @@ -35,10 +44,6 @@ #include #include -#include -#include -#include - #include "isqemu.h" #define BILLION 1000000000LL /* nano-seconds per second */ @@ -49,11 +54,6 @@ #define KEVNT_TIMEOUT 10300 /* measured in milli-seconds */ #define FUZZ (40 * MILLION) /* scheduling fuzz accepted - 40 ms */ -#ifdef __FreeBSD__ -#include -#include -#endif - /* * Timer notes * Modified: head/contrib/netbsd-tests/lib/libc/gen/t_time.c ============================================================================== --- head/contrib/netbsd-tests/lib/libc/gen/t_time.c Wed Jan 11 09:34:42 2017 (r311924) +++ head/contrib/netbsd-tests/lib/libc/gen/t_time.c Wed Jan 11 09:51:34 2017 (r311925) @@ -1,4 +1,4 @@ -/* $NetBSD: t_time.c,v 1.3 2014/10/31 12:22:38 justin Exp $ */ +/* $NetBSD: t_time.c,v 1.4 2017/01/10 15:32:46 christos Exp $ */ /*- * Copyright (c) 2011 The NetBSD Foundation, Inc. @@ -29,11 +29,8 @@ * POSSIBILITY OF SUCH DAMAGE. */ #include -__RCSID("$NetBSD: t_time.c,v 1.3 2014/10/31 12:22:38 justin Exp $"); +__RCSID("$NetBSD: t_time.c,v 1.4 2017/01/10 15:32:46 christos Exp $"); -#ifdef __FreeBSD__ -#include -#endif #include #include #include @@ -41,6 +38,7 @@ __RCSID("$NetBSD: t_time.c,v 1.3 2014/10 #include #include #include +#include #include ATF_TC(time_copy); Modified: head/contrib/netbsd-tests/lib/libc/gen/t_ttyname.c ============================================================================== --- head/contrib/netbsd-tests/lib/libc/gen/t_ttyname.c Wed Jan 11 09:34:42 2017 (r311924) +++ head/contrib/netbsd-tests/lib/libc/gen/t_ttyname.c Wed Jan 11 09:51:34 2017 (r311925) @@ -1,4 +1,4 @@ -/* $NetBSD: t_ttyname.c,v 1.3 2011/05/01 18:14:01 jruoho Exp $ */ +/* $NetBSD: t_ttyname.c,v 1.4 2017/01/10 15:33:40 christos Exp $ */ /*- * Copyright (c) 2011 The NetBSD Foundation, Inc. @@ -29,7 +29,7 @@ * POSSIBILITY OF SUCH DAMAGE. */ #include -__RCSID("$NetBSD: t_ttyname.c,v 1.3 2011/05/01 18:14:01 jruoho Exp $"); +__RCSID("$NetBSD: t_ttyname.c,v 1.4 2017/01/10 15:33:40 christos Exp $"); #include #include @@ -78,9 +78,7 @@ ATF_TC_BODY(ttyname_err, tc) ATF_REQUIRE(ttyname(fd) == NULL); ATF_REQUIRE(errno == ENOTTY); -#ifdef __FreeBSD__ (void)close(fd); -#endif } } Modified: head/contrib/netbsd-tests/lib/libc/gen/t_vis.c ============================================================================== --- head/contrib/netbsd-tests/lib/libc/gen/t_vis.c Wed Jan 11 09:34:42 2017 (r311924) +++ head/contrib/netbsd-tests/lib/libc/gen/t_vis.c Wed Jan 11 09:51:34 2017 (r311925) @@ -1,4 +1,4 @@ -/* $NetBSD: t_vis.c,v 1.8 2015/05/23 14:02:11 christos Exp $ */ +/* $NetBSD: t_vis.c,v 1.9 2017/01/10 15:16:57 christos Exp $ */ /*- * Copyright (c) 2002 The NetBSD Foundation, Inc. @@ -144,9 +144,7 @@ ATF_TC_BODY(strunvis_hex, tc) } } -/* Begin FreeBSD: ^/stable/10 doesn't have VIS_NOLOCALE */ #ifdef VIS_NOLOCALE -/* End FreeBSD */ ATF_TC(strvis_locale); ATF_TC_HEAD(strvis_locale, tc) { @@ -175,9 +173,7 @@ ATF_TC_BODY(strvis_locale, tc) setlocale(LC_CTYPE, ol); free(ol); } -/* Begin FreeBSD: ^/stable/10 doesn't have VIS_NOLOCALE */ #endif /* VIS_NOLOCALE */ -/* End FreeBSD */ ATF_TP_ADD_TCS(tp) { @@ -186,13 +182,9 @@ ATF_TP_ADD_TCS(tp) ATF_TP_ADD_TC(tp, strvis_null); ATF_TP_ADD_TC(tp, strvis_empty); ATF_TP_ADD_TC(tp, strunvis_hex); -/* Begin FreeBSD: ^/stable/10 doesn't have VIS_NOLOCALE */ #ifdef VIS_NOLOCALE -/* End FreeBSD */ ATF_TP_ADD_TC(tp, strvis_locale); -/* Begin FreeBSD: ^/stable/10 doesn't have VIS_NOLOCALE */ #endif /* VIS_NOLOCALE */ -/* End FreeBSD */ return atf_no_error(); } Modified: head/contrib/netbsd-tests/lib/libc/string/t_strchr.c ============================================================================== --- head/contrib/netbsd-tests/lib/libc/string/t_strchr.c Wed Jan 11 09:34:42 2017 (r311924) +++ head/contrib/netbsd-tests/lib/libc/string/t_strchr.c Wed Jan 11 09:51:34 2017 (r311925) @@ -1,4 +1,4 @@ -/* $NetBSD: t_strchr.c,v 1.1 2011/07/07 08:59:33 jruoho Exp $ */ +/* $NetBSD: t_strchr.c,v 1.2 2017/01/10 15:34:49 christos Exp $ */ /* * Written by J.T. Conklin @@ -58,12 +58,10 @@ ATF_TC_HEAD(strchr_basic, tc) ATF_TC_BODY(strchr_basic, tc) { -#ifdef __FreeBSD__ void *dl_handle; -#endif - unsigned int t, a; char *off; char buf[32]; + unsigned int t, a; const char *tab[] = { "", @@ -248,12 +246,8 @@ ATF_TC_BODY(strchr_basic, tc) "abcdefgh/abcdefgh/", }; -#ifdef __FreeBSD__ dl_handle = dlopen(NULL, RTLD_LAZY); strchr_fn = dlsym(dl_handle, "test_strlen"); -#else - strchr_fn = dlsym(dlopen(0, RTLD_LAZY), "test_strchr"); -#endif if (!strchr_fn) strchr_fn = strchr; @@ -288,9 +282,7 @@ ATF_TC_BODY(strchr_basic, tc) verify_strchr(buf + a, 0xff, t, a); } } -#ifdef __FreeBSD__ (void)dlclose(dl_handle); -#endif } ATF_TP_ADD_TCS(tp) Modified: head/contrib/netbsd-tests/lib/libc/string/t_strerror.c ============================================================================== --- head/contrib/netbsd-tests/lib/libc/string/t_strerror.c Wed Jan 11 09:34:42 2017 (r311924) +++ head/contrib/netbsd-tests/lib/libc/string/t_strerror.c Wed Jan 11 09:51:34 2017 (r311925) @@ -1,4 +1,4 @@ -/* $NetBSD: t_strerror.c,v 1.3 2011/05/10 06:55:27 jruoho Exp $ */ +/* $NetBSD: t_strerror.c,v 1.4 2017/01/10 20:35:49 christos Exp $ */ /*- * Copyright (c) 2011 The NetBSD Foundation, Inc. @@ -29,18 +29,15 @@ * POSSIBILITY OF SUCH DAMAGE. */ #include -__RCSID("$NetBSD: t_strerror.c,v 1.3 2011/05/10 06:55:27 jruoho Exp $"); +__RCSID("$NetBSD: t_strerror.c,v 1.4 2017/01/10 20:35:49 christos Exp $"); #include #include +#include /* Needed for sys_nerr on FreeBSD */ #include #include #include -#ifdef __FreeBSD__ -#include -#endif - ATF_TC(strerror_basic); ATF_TC_HEAD(strerror_basic, tc) { Modified: head/contrib/netbsd-tests/lib/libc/sys/t_access.c ============================================================================== --- head/contrib/netbsd-tests/lib/libc/sys/t_access.c Wed Jan 11 09:34:42 2017 (r311924) +++ head/contrib/netbsd-tests/lib/libc/sys/t_access.c Wed Jan 11 09:51:34 2017 (r311925) @@ -1,4 +1,4 @@ -/* $NetBSD: t_access.c,v 1.1 2011/07/07 06:57:53 jruoho Exp $ */ +/* $NetBSD: t_access.c,v 1.2 2017/01/10 22:36:29 christos Exp $ */ /*- * Copyright (c) 2011 The NetBSD Foundation, Inc. @@ -29,7 +29,11 @@ * POSSIBILITY OF SUCH DAMAGE. */ #include -__RCSID("$NetBSD: t_access.c,v 1.1 2011/07/07 06:57:53 jruoho Exp $"); +__RCSID("$NetBSD: t_access.c,v 1.2 2017/01/10 22:36:29 christos Exp $"); + +#include + +#include #include #include @@ -38,13 +42,6 @@ __RCSID("$NetBSD: t_access.c,v 1.1 2011/ #include #include -#include - -#ifdef __FreeBSD__ -#include -#include -#endif - static const char path[] = "access"; static const int mode[4] = { R_OK, W_OK, X_OK, F_OK }; Modified: head/contrib/netbsd-tests/lib/libc/sys/t_chroot.c ============================================================================== --- head/contrib/netbsd-tests/lib/libc/sys/t_chroot.c Wed Jan 11 09:34:42 2017 (r311924) +++ head/contrib/netbsd-tests/lib/libc/sys/t_chroot.c Wed Jan 11 09:51:34 2017 (r311925) @@ -1,4 +1,4 @@ -/* $NetBSD: t_chroot.c,v 1.1 2011/07/07 06:57:53 jruoho Exp $ */ +/* $NetBSD: t_chroot.c,v 1.2 2017/01/10 22:36:29 christos Exp $ */ /*- * Copyright (c) 2011 The NetBSD Foundation, Inc. @@ -29,9 +29,10 @@ * POSSIBILITY OF SUCH DAMAGE. */ #include -__RCSID("$NetBSD: t_chroot.c,v 1.1 2011/07/07 06:57:53 jruoho Exp $"); +__RCSID("$NetBSD: t_chroot.c,v 1.2 2017/01/10 22:36:29 christos Exp $"); #include +#include #include #include @@ -42,10 +43,6 @@ __RCSID("$NetBSD: t_chroot.c,v 1.1 2011/ #include #include -#ifdef __FreeBSD__ -#include -#endif - ATF_TC(chroot_basic); ATF_TC_HEAD(chroot_basic, tc) { Modified: head/contrib/netbsd-tests/lib/libc/sys/t_mincore.c ============================================================================== --- head/contrib/netbsd-tests/lib/libc/sys/t_mincore.c Wed Jan 11 09:34:42 2017 (r311924) +++ head/contrib/netbsd-tests/lib/libc/sys/t_mincore.c Wed Jan 11 09:51:34 2017 (r311925) @@ -1,4 +1,4 @@ -/* $NetBSD: t_mincore.c,v 1.8 2012/06/08 07:18:58 martin Exp $ */ +/* $NetBSD: t_mincore.c,v 1.9 2017/01/10 22:36:29 christos Exp $ */ /*- * Copyright (c) 2011 The NetBSD Foundation, Inc. @@ -59,9 +59,10 @@ * POSSIBILITY OF SUCH DAMAGE. */ #include -__RCSID("$NetBSD: t_mincore.c,v 1.8 2012/06/08 07:18:58 martin Exp $"); +__RCSID("$NetBSD: t_mincore.c,v 1.9 2017/01/10 22:36:29 christos Exp $"); #include +#include #include #include @@ -74,10 +75,6 @@ __RCSID("$NetBSD: t_mincore.c,v 1.8 2012 #include #include -#ifdef __FreeBSD__ -#include -#endif - static long page = 0; static const char path[] = "mincore"; static size_t check_residency(void *, size_t); Modified: head/contrib/netbsd-tests/lib/libc/sys/t_mmap.c ============================================================================== --- head/contrib/netbsd-tests/lib/libc/sys/t_mmap.c Wed Jan 11 09:34:42 2017 (r311924) +++ head/contrib/netbsd-tests/lib/libc/sys/t_mmap.c Wed Jan 11 09:51:34 2017 (r311925) @@ -1,4 +1,4 @@ -/* $NetBSD: t_mmap.c,v 1.9 2015/02/28 13:57:08 martin Exp $ */ +/* $NetBSD: t_mmap.c,v 1.10 2017/01/10 22:36:29 christos Exp $ */ /*- * Copyright (c) 2011 The NetBSD Foundation, Inc. @@ -55,10 +55,11 @@ * SUCH DAMAGE. */ #include -__RCSID("$NetBSD: t_mmap.c,v 1.9 2015/02/28 13:57:08 martin Exp $"); +__RCSID("$NetBSD: t_mmap.c,v 1.10 2017/01/10 22:36:29 christos Exp $"); #include #include +#include #include #include #include @@ -78,7 +79,6 @@ __RCSID("$NetBSD: t_mmap.c,v 1.9 2015/02 #ifdef __FreeBSD__ #include -#include #include #endif Modified: head/contrib/netbsd-tests/lib/libc/sys/t_wait.c ============================================================================== --- head/contrib/netbsd-tests/lib/libc/sys/t_wait.c Wed Jan 11 09:34:42 2017 (r311924) +++ head/contrib/netbsd-tests/lib/libc/sys/t_wait.c Wed Jan 11 09:51:34 2017 (r311925) @@ -1,4 +1,4 @@ -/* $NetBSD: t_wait.c,v 1.4 2016/04/27 21:14:24 christos Exp $ */ +/* $NetBSD: t_wait.c,v 1.7 2016/11/06 15:04:14 kamil Exp $ */ /*- * Copyright (c) 2016 The NetBSD Foundation, Inc. @@ -29,7 +29,7 @@ * POSSIBILITY OF SUCH DAMAGE. */ #include -__RCSID("$NetBSD: t_wait.c,v 1.4 2016/04/27 21:14:24 christos Exp $"); +__RCSID("$NetBSD: t_wait.c,v 1.7 2016/11/06 15:04:14 kamil Exp $"); #include #include @@ -64,22 +64,6 @@ ATF_TC_BODY(wait6_invalid, tc) && errno == EINVAL); } -ATF_TC(wait6_noproc); -ATF_TC_HEAD(wait6_noproc, tc) -{ - atf_tc_set_md_var(tc, "descr", - "Test that wait6(2) returns ECHILD with for no processes"); -} - -ATF_TC_BODY(wait6_noproc, tc) -{ - siginfo_t si; - struct wrusage wru; - int st; - ATF_REQUIRE(wait6(P_ALL, 0, &st, WEXITED, &wru, &si) == -1 - && errno == ECHILD); -} - ATF_TC(wait6_exited); ATF_TC_HEAD(wait6_exited, tc) { @@ -96,12 +80,12 @@ ATF_TC_BODY(wait6_exited, tc) switch (pid = fork()) { case -1: - ATF_REQUIRE(pid > 0); + ATF_REQUIRE(pid > 0); case 0: exit(0x5a5a5a5a); /*NOTREACHED*/ default: - ATF_REQUIRE(wait6(P_PID, pid, &st, WEXITED, &wru, &si) == pid); + ATF_REQUIRE(wait6(P_PID, pid, &st, WEXITED, &wru, &si) == pid); ATF_REQUIRE(WIFEXITED(st) && WEXITSTATUS(st) == 0x5a); ATF_REQUIRE(si.si_status = 0x5a5a5a5a); ATF_REQUIRE(si.si_pid == pid); @@ -134,10 +118,10 @@ ATF_TC_BODY(wait6_terminated, tc) sleep(100); /*FALLTHROUGH*/ case -1: - ATF_REQUIRE(pid > 0); + ATF_REQUIRE(pid > 0); default: ATF_REQUIRE(kill(pid, SIGTERM) == 0); - ATF_REQUIRE(wait6(P_PID, pid, &st, WEXITED, &wru, &si) == pid); + ATF_REQUIRE(wait6(P_PID, pid, &st, WEXITED, &wru, &si) == pid); ATF_REQUIRE(WIFSIGNALED(st) && WTERMSIG(st) == SIGTERM); ATF_REQUIRE(si.si_status == SIGTERM); ATF_REQUIRE(si.si_pid == pid); @@ -172,9 +156,9 @@ ATF_TC_BODY(wait6_coredumped, tc) *(char *)8 = 0; /*FALLTHROUGH*/ case -1: - ATF_REQUIRE(pid > 0); + ATF_REQUIRE(pid > 0); default: - ATF_REQUIRE(wait6(P_PID, pid, &st, WEXITED, &wru, &si) == pid); + ATF_REQUIRE(wait6(P_PID, pid, &st, WEXITED, &wru, &si) == pid); ATF_REQUIRE(WIFSIGNALED(st) && WTERMSIG(st) == SIGSEGV *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-head@freebsd.org Wed Jan 11 10:14:15 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id CE77DCAAA2A; Wed, 11 Jan 2017 10:14:15 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: from mail-pg0-x243.google.com (mail-pg0-x243.google.com [IPv6:2607:f8b0:400e:c05::243]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 90A671882; Wed, 11 Jan 2017 10:14:15 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: by mail-pg0-x243.google.com with SMTP id b1so53367402pgc.1; Wed, 11 Jan 2017 02:14:15 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:message-id:mime-version:subject:date:in-reply-to:cc:to :references; bh=3847aWVjL1Wq5gTtXMY/Qy5Pw88qLcI8cSJgXyWuJLs=; b=aQWOIwkox89U3PNP2Z6fSQVxBClNvvEQ1WMLNlF3yoUbwU/cYjvMvhZL5K0qoo7GE9 ehLoVDENNUzvqaOE555l1mnpgtWEGFnCvyg4/dlSpg3QDNifAKVc+65xev8eYO9JbaSx Tq6D3wlmME+o3TlRSIm7Mc1YFKuW6x7n/9UNpDk220yK7nCde5pRG+aeBxJA6jWoLwq5 r8P63kWq5If34SeedAH7ia/DtyFmk/DI6H0Tk8aodBVKSTxQ/A8KHYYIZJxTTxbMMZcR ICLGjbsOZqJDqs+INq98gMsGTcXs4O64NNoCYyhW09tBCHM0P65Ev+4yu066Jnxso+eQ NFzw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:message-id:mime-version:subject:date :in-reply-to:cc:to:references; bh=3847aWVjL1Wq5gTtXMY/Qy5Pw88qLcI8cSJgXyWuJLs=; b=bRV9s6ncM4QrcwArp33QpVsCNJCDt14K4oODBCbJIvrlr4HjvkBH6mwylRNO357iMR UfXDvZzgKr5YPQSB48udge2rTWIuZxFf4UoMUCvhIxYUiCj/luYRHpoL+5bysYjRRtIv 9ryoMjqAuy66qyXju+Jb2X8W9Sg2hIaoaIjNrhXgbSbWeBFiJW+X7lfpkGUURJF74iQM VLhmPB6rF0VJE+0zD0rhEWj56A+J+f8k0Kq55nk457ZYFVORChfh+lJaOORhkBHf9rv2 62abXB3qcEXGa5lOIJ18dxl6IXfDV6b2uuJ/4TrXmcmK5NOuoItVDOY6e+6G5oXgsNQ0 LIsg== X-Gm-Message-State: AIkVDXLZMAPLYvp0DnnRS0KZ5zEPX/vOR5NxCTNRQuTknUxacmzwie/i2xnAheiAlcIW0Q== X-Received: by 10.99.126.27 with SMTP id z27mr9592105pgc.177.1484129655154; Wed, 11 Jan 2017 02:14:15 -0800 (PST) Received: from fuji-wireless.local (c-73-19-52-228.hsd1.wa.comcast.net. [73.19.52.228]) by smtp.gmail.com with ESMTPSA id q27sm12373229pfd.49.2017.01.11.02.14.14 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 11 Jan 2017 02:14:14 -0800 (PST) From: "Ngie Cooper (yaneurabeya)" Message-Id: <681075F8-78D1-43FF-A75D-71D5CDBA3AB4@gmail.com> Mime-Version: 1.0 (Mac OS X Mail 10.2 \(3259\)) Subject: Re: svn commit: r286649 - in head: contrib/netbsd-tests/lib/libc/locale lib/libc/tests/locale Date: Wed, 11 Jan 2017 02:14:13 -0800 In-Reply-To: Cc: Jilles Tjoelker , "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" To: Craig Rodrigues References: <201508112159.t7BLxa6U057950@repo.freebsd.org> X-Mailer: Apple Mail (2.3259) Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.23 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 11 Jan 2017 10:14:15 -0000 > On Aug 11, 2015, at 6:45 PM, Craig Rodrigues = wrote: >=20 > On Tue, Aug 11, 2015 at 2:59 PM, Jilles Tjoelker > wrote: > Author: jilles > Date: Tue Aug 11 21:59:36 2015 > New Revision: 286649 > URL: https://svnweb.freebsd.org/changeset/base/286649 = >=20 > Log: > Fix and re-enable UTF-8 tests. >=20 > Modified: > head/contrib/netbsd-tests/lib/libc/locale/t_mbrtowc.c > head/contrib/netbsd-tests/lib/libc/locale/t_mbstowcs.c > head/lib/libc/tests/locale/Makefile >=20 >=20 > Thanks for fixing this. What is the procedure that FreeBSD developers = need to follow > to push this kind of change upstream to NetBSD? I=E2=80=99m submitting PRs with NetBSD as needed. To be frank, = I=E2=80=99m not sure that this change is needed upstream (I=E2=80=99m = probably going to #ifdef the code =E2=80=94 some things I found when = trying to push things back). Thanks, -Ngie= From owner-svn-src-head@freebsd.org Wed Jan 11 10:20:36 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 88791CAAC18; Wed, 11 Jan 2017 10:20:36 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 58B841CBF; Wed, 11 Jan 2017 10:20:36 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v0BAKZ4S006131; Wed, 11 Jan 2017 10:20:35 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v0BAKZ4E006130; Wed, 11 Jan 2017 10:20:35 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201701111020.v0BAKZ4E006130@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Wed, 11 Jan 2017 10:20:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r311926 - head/contrib/netbsd-tests/lib/libc/regex X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 11 Jan 2017 10:20:36 -0000 Author: ngie Date: Wed Jan 11 10:20:35 2017 New Revision: 311926 URL: https://svnweb.freebsd.org/changeset/base/311926 Log: Consolidate __NetBSD__ #ifdef MFC after: 3 days Modified: head/contrib/netbsd-tests/lib/libc/regex/debug.c Modified: head/contrib/netbsd-tests/lib/libc/regex/debug.c ============================================================================== --- head/contrib/netbsd-tests/lib/libc/regex/debug.c Wed Jan 11 09:51:34 2017 (r311925) +++ head/contrib/netbsd-tests/lib/libc/regex/debug.c Wed Jan 11 10:20:35 2017 (r311926) @@ -48,9 +48,7 @@ #ifdef __NetBSD__ static void s_print(struct re_guts *, FILE *); static char *regchar(int); -#endif -#ifdef __NetBSD__ /* * regprint - print a regexp for debugging */ From owner-svn-src-head@freebsd.org Wed Jan 11 12:53:32 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A429BCA8CCF; Wed, 11 Jan 2017 12:53:32 +0000 (UTC) (envelope-from pluknet@gmail.com) Received: from mail-qk0-x233.google.com (mail-qk0-x233.google.com [IPv6:2607:f8b0:400d:c09::233]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 5C9D8167C; Wed, 11 Jan 2017 12:53:32 +0000 (UTC) (envelope-from pluknet@gmail.com) Received: by mail-qk0-x233.google.com with SMTP id u25so591144645qki.2; Wed, 11 Jan 2017 04:53:32 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=VLtTGN6SQis6cnoNnQy/ZAIp0Fi7AKYRBAORyQqSHEs=; b=Aqca+DwZkP6MGZ/vd2Z866vW88B0gH9kStzzP7bOYrq1N538aLe6+GJc3Y1vwMGUW5 uwKrtclaCKb8JUCWiEHQpv3gNDuiDG9vBNG5VA/74QbncpGQVLjG8t+v6q3x0gOeiBWZ U1v3FdfQAHNKOQifMr3aVsTymFDxbjOUmnZufTUFl4czLy4jcuJ6HZubv5etAVRG0dBH esmrU20IVm6iXC9ptfDNtj4eaS+9D4XLJnnho3pAzalk7a456hmJ0S7GF7N2Su0iPAq8 oqB0DHstzW4T62y2nETWLQicnF6tSL8yBqhSHyWQ2z3bNvPQ1g0tP7Vg1u/B+mopa3Cm 2ANg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=VLtTGN6SQis6cnoNnQy/ZAIp0Fi7AKYRBAORyQqSHEs=; b=hW+jptfeKY3An1NbJ+ruOBjshUZKZc9dQNqHTsPz3wxL6+EZRVW7BvotKLF8bpUbjz vRgwxab3HhvSfr4weT41nLEFk06smDFxz+K/z9d3spLDVe4OHQZuT0JzV0AM0E8WMQWw HKJljA6CQYFtbZocRSpky0muqx7oR+qyNyMAzhbLFVpHmDYWTxUm7pYGgT5r/UxynTYf gv3c3Re/DXBN0UIueFVAZTtpSlNd+aMB4pwjSH6vv0LW6t0xeqnmCNLZqBchEBCgfQBV 0JN0KUDffRVfcZH7rALaeKFKwsagDhJTINiaC8DFcMAXhOVqLbPz7/NSUBJmlux5hh05 sL1g== X-Gm-Message-State: AIkVDXIA3gJoLSHYqnMNgttGeq7UlYfshlr1Bq/Rcil83YdxU2VihXegRAHqmFFvvpgHtLJHozFK+SS/irwFJw== X-Received: by 10.55.159.206 with SMTP id i197mr7179303qke.175.1484139211363; Wed, 11 Jan 2017 04:53:31 -0800 (PST) MIME-Version: 1.0 Received: by 10.12.150.188 with HTTP; Wed, 11 Jan 2017 04:53:31 -0800 (PST) In-Reply-To: <201701102043.v0AKhWuv073169@repo.freebsd.org> References: <201701102043.v0AKhWuv073169@repo.freebsd.org> From: Sergey Kandaurov Date: Wed, 11 Jan 2017 15:53:31 +0300 Message-ID: Subject: Re: svn commit: r311895 - in head: etc/mtree usr.bin/tail usr.bin/tail/tests To: Alan Somers Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Type: text/plain; charset=UTF-8 X-Content-Filtered-By: Mailman/MimeDel 2.1.23 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 11 Jan 2017 12:53:32 -0000 On 10 January 2017 at 23:43, Alan Somers wrote: > Author: asomers > Date: Tue Jan 10 20:43:32 2017 > New Revision: 311895 > URL: https://svnweb.freebsd.org/changeset/base/311895 > > Log: > Fix memory leaks during "tail -r" of an irregular file > [..] -typedef struct bf { > - struct bf *next; > - struct bf *prev; > - int len; > - char *l; > -} BF; > +static const size_t bsz = 128 * 1024; > +typedef struct bfelem { > + TAILQ_ENTRY(bfelem) entries; > + size_t len; > + char l[bsz]; > +} bfelem_t; > > This breaks on gcc that doesn't respect const for some reason: reverse.c:177: error: variably modified 'l' at file scope > /* > * r_buf -- display a non-regular file in reverse order by line. > @@ -189,64 +190,42 @@ typedef struct bf { > static void > r_buf(FILE *fp, const char *fn) > { > - BF *mark, *tl, *tr; > - int ch, len, llen; > + struct bfelem *tl, *temp, *first = NULL; > + size_t len, llen; > reverse.c:194: warning: 'len' may be used uninitialized in this function I suspect this is due to a typo on line 254. [..] > /* > - * Step through the blocks in the reverse order read. The last > char > - * is special, ignore whether newline or not. > + * Now print the lines in reverse order > + * Outline: > + * Scan backward for "\n", > + * print forward to the end of the buffers > + * free any buffers that start after the "\n" just found > + * Loop > */ > - for (mark = tl;;) { > - for (p = tl->l + (len = tl->len) - 1, llen = 0; len--; > - --p, ++llen) > - if (*p == '\n') { > - if (llen) { > + tl = TAILQ_LAST(&head, bfhead); > + first = TAILQ_FIRST(&head); > + while (tl != NULL) { > + for (p = tl->l + tl->len - 1, llen = 0; p >= tl->l; > + --p, ++llen) { > + int start = (tl == first && p == tl->l); > + > + if ((*p == '\n') || start) { > + struct bfelem *tr; > + > + if (start && len) > here joint patch to fix build on gcc (not tested, although tests pass) Index: reverse.c =================================================================== --- reverse.c (revision 311927) +++ reverse.c (working copy) @@ -170,11 +170,11 @@ ierr(fn); } -static const size_t bsz = 128 * 1024; +#define BSZ (128 * 1024) typedef struct bfelem { TAILQ_ENTRY(bfelem) entries; size_t len; - char l[bsz]; + char l[BSZ]; } bfelem_t; /* @@ -216,9 +216,9 @@ /* Fill the block with input data. */ len = 0; - while ((!feof(fp)) && len < bsz) { + while ((!feof(fp)) && len < BSZ) { p = tl->l + len; - len += fread(p, 1, bsz - len, fp); + len += fread(p, 1, BSZ - len, fp); if (ferror(fp)) { ierr(fn); return; @@ -251,7 +251,7 @@ if ((*p == '\n') || start) { struct bfelem *tr; - if (start && len) + if (start && llen) WR(p, llen + 1); else if (llen) WR(p + 1, llen); -- wbr, pluknet From owner-svn-src-head@freebsd.org Wed Jan 11 16:09:26 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 79383CAB8C1; Wed, 11 Jan 2017 16:09:26 +0000 (UTC) (envelope-from asomers@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 316231966; Wed, 11 Jan 2017 16:09:26 +0000 (UTC) (envelope-from asomers@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v0BG9P6q048943; Wed, 11 Jan 2017 16:09:25 GMT (envelope-from asomers@FreeBSD.org) Received: (from asomers@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v0BG9Pce048942; Wed, 11 Jan 2017 16:09:25 GMT (envelope-from asomers@FreeBSD.org) Message-Id: <201701111609.v0BG9Pce048942@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: asomers set sender to asomers@FreeBSD.org using -f From: Alan Somers Date: Wed, 11 Jan 2017 16:09:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r311928 - head/usr.bin/tail X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 11 Jan 2017 16:09:26 -0000 Author: asomers Date: Wed Jan 11 16:09:25 2017 New Revision: 311928 URL: https://svnweb.freebsd.org/changeset/base/311928 Log: Fix build of usr.bin/tail with GCC Submitted by: pluknet Reported by: pluknet MFC after: 27 days X-MFC-with: 311895 Sponsored by: Spectra Logic Corp Modified: head/usr.bin/tail/reverse.c Modified: head/usr.bin/tail/reverse.c ============================================================================== --- head/usr.bin/tail/reverse.c Wed Jan 11 11:25:18 2017 (r311927) +++ head/usr.bin/tail/reverse.c Wed Jan 11 16:09:25 2017 (r311928) @@ -170,11 +170,11 @@ r_reg(FILE *fp, const char *fn, enum STY ierr(fn); } -static const size_t bsz = 128 * 1024; +#define BSZ (128 * 1024) typedef struct bfelem { TAILQ_ENTRY(bfelem) entries; size_t len; - char l[bsz]; + char l[BSZ]; } bfelem_t; /* @@ -190,8 +190,8 @@ typedef struct bfelem { static void r_buf(FILE *fp, const char *fn) { - struct bfelem *tl, *temp, *first = NULL; - size_t len, llen; + struct bfelem *tl, *first = NULL; + size_t llen; char *p; off_t enomem = 0; TAILQ_HEAD(bfhead, bfelem) head; @@ -199,6 +199,8 @@ r_buf(FILE *fp, const char *fn) TAILQ_INIT(&head); while (!feof(fp)) { + size_t len; + /* * Allocate a new block and link it into place in a doubly * linked list. If out of memory, toss the LRU block and @@ -216,9 +218,9 @@ r_buf(FILE *fp, const char *fn) /* Fill the block with input data. */ len = 0; - while ((!feof(fp)) && len < bsz) { + while ((!feof(fp)) && len < BSZ) { p = tl->l + len; - len += fread(p, 1, bsz - len, fp); + len += fread(p, 1, BSZ - len, fp); if (ferror(fp)) { ierr(fn); return; @@ -244,6 +246,8 @@ r_buf(FILE *fp, const char *fn) tl = TAILQ_LAST(&head, bfhead); first = TAILQ_FIRST(&head); while (tl != NULL) { + struct bfelem *temp; + for (p = tl->l + tl->len - 1, llen = 0; p >= tl->l; --p, ++llen) { int start = (tl == first && p == tl->l); @@ -251,7 +255,7 @@ r_buf(FILE *fp, const char *fn) if ((*p == '\n') || start) { struct bfelem *tr; - if (start && len) + if (start && llen) WR(p, llen + 1); else if (llen) WR(p + 1, llen); From owner-svn-src-head@freebsd.org Wed Jan 11 16:09:59 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9F19ACAB91C; Wed, 11 Jan 2017 16:09:59 +0000 (UTC) (envelope-from asomers@gmail.com) Received: from mail-yw0-x243.google.com (mail-yw0-x243.google.com [IPv6:2607:f8b0:4002:c05::243]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 58F681AF2; Wed, 11 Jan 2017 16:09:59 +0000 (UTC) (envelope-from asomers@gmail.com) Received: by mail-yw0-x243.google.com with SMTP id k6so16577356ywk.0; Wed, 11 Jan 2017 08:09:59 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=V6A/QHQ3s+vseQCt0ws9lSoKaoAsJSJ72HIyxHhKBu4=; b=aPExZkzkmllwlIh2hXbzmn4DuWhtV9vyEIPNZp5aaen7+Ds8eQZJqCgOcVOamvG5R8 ZCqJ7l32n8Rb1/U6RNEp01efJ2agCBd/yzlTtrqjiVul3KbIXbvfWPHX4QZ+5d7K3Poy plR5L+H5a3QGClH+R64rHw+TqEpIw0TgAzWO3Z8TMEukPAJR9/jt5J19TqlXNKILidgp A7uWSulSSWwiVz1K265qeiVIs4ewBBlpklzZxWAzGR/23uRxSXHeDoCA/DtUhHb90WlS xpXkTFKbZSnq4+zuC/P9O6vc3DUUYBtzMku0vxQBkvIEt6Tjkf6SGzszFKLJZv2Dlou+ P7GA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc; bh=V6A/QHQ3s+vseQCt0ws9lSoKaoAsJSJ72HIyxHhKBu4=; b=dLLf9kNoxK+OL6I3Rm+3cOzXkmFX6AvFcowfxR7mM9hC6HCn1HR5Ola+gSS1PtfPva K62Z+uCwU/lTIBdzqoZqutKAhOjYRZX/fI/bjujT3upGrh5mABtyKdY8yfs5KPhvA353 KO9hhCe508TZismwyfpTtSB/Oj9G/y4flBepbCjZuCtFZBEkNBsvoNUUJhlUN+Ze/qYZ j0n3C4MXIXPZ2CMGU7vTQW+jjR9JVy6Nju3nTdkBL04TAU4xmWlTigkcz+K8aSdJMHE2 TH/gDAARqhKoIW3zqhGh9bpQ++vgA42/+barUcw3YR43JPaaTj8Ei/geYn9oZamwFpjs VyOA== X-Gm-Message-State: AIkVDXK/P5m6p1Yen5SgUU3wUwqBfJ4sTzyffmY2dieJPWovYYCDRCRDO7wiPhn+13ZJIDJlopVt1N+sr7nUCw== X-Received: by 10.129.90.67 with SMTP id o64mr7677531ywb.188.1484150998221; Wed, 11 Jan 2017 08:09:58 -0800 (PST) MIME-Version: 1.0 Sender: asomers@gmail.com Received: by 10.129.137.135 with HTTP; Wed, 11 Jan 2017 08:09:57 -0800 (PST) In-Reply-To: References: <201701102043.v0AKhWuv073169@repo.freebsd.org> From: Alan Somers Date: Wed, 11 Jan 2017 09:09:57 -0700 X-Google-Sender-Auth: SrQNADLRjgHE72LM8US3c4KxXKY Message-ID: Subject: Re: svn commit: r311895 - in head: etc/mtree usr.bin/tail usr.bin/tail/tests To: Sergey Kandaurov Cc: "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Content-Type: text/plain; charset=UTF-8 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 11 Jan 2017 16:09:59 -0000 On Wed, Jan 11, 2017 at 5:53 AM, Sergey Kandaurov wrote: > On 10 January 2017 at 23:43, Alan Somers wrote: >> >> Author: asomers >> Date: Tue Jan 10 20:43:32 2017 >> New Revision: 311895 >> URL: https://svnweb.freebsd.org/changeset/base/311895 >> >> Log: >> Fix memory leaks during "tail -r" of an irregular file >> [..] >> >> -typedef struct bf { >> - struct bf *next; >> - struct bf *prev; >> - int len; >> - char *l; >> -} BF; >> +static const size_t bsz = 128 * 1024; >> +typedef struct bfelem { >> + TAILQ_ENTRY(bfelem) entries; >> + size_t len; >> + char l[bsz]; >> +} bfelem_t; >> > > This breaks on gcc that doesn't respect const for some reason: > reverse.c:177: error: variably modified 'l' at file scope > >> >> /* >> * r_buf -- display a non-regular file in reverse order by line. >> @@ -189,64 +190,42 @@ typedef struct bf { >> static void >> r_buf(FILE *fp, const char *fn) >> { >> - BF *mark, *tl, *tr; >> - int ch, len, llen; >> + struct bfelem *tl, *temp, *first = NULL; >> + size_t len, llen; > > > reverse.c:194: warning: 'len' may be used uninitialized in this function > > I suspect this is due to a typo on line 254. > > [..] > >> >> /* >> - * Step through the blocks in the reverse order read. The last >> char >> - * is special, ignore whether newline or not. >> + * Now print the lines in reverse order >> + * Outline: >> + * Scan backward for "\n", >> + * print forward to the end of the buffers >> + * free any buffers that start after the "\n" just found >> + * Loop >> */ >> - for (mark = tl;;) { >> - for (p = tl->l + (len = tl->len) - 1, llen = 0; len--; >> - --p, ++llen) >> - if (*p == '\n') { >> - if (llen) { >> + tl = TAILQ_LAST(&head, bfhead); >> + first = TAILQ_FIRST(&head); >> + while (tl != NULL) { >> + for (p = tl->l + tl->len - 1, llen = 0; p >= tl->l; >> + --p, ++llen) { >> + int start = (tl == first && p == tl->l); >> + >> + if ((*p == '\n') || start) { >> + struct bfelem *tr; >> + >> + if (start && len) > > > here > > joint patch to fix build on gcc (not tested, although tests pass) > > Index: reverse.c > =================================================================== > --- reverse.c (revision 311927) > +++ reverse.c (working copy) > @@ -170,11 +170,11 @@ > ierr(fn); > } > > -static const size_t bsz = 128 * 1024; > +#define BSZ (128 * 1024) > typedef struct bfelem { > TAILQ_ENTRY(bfelem) entries; > size_t len; > - char l[bsz]; > + char l[BSZ]; > } bfelem_t; > > /* > @@ -216,9 +216,9 @@ > > /* Fill the block with input data. */ > len = 0; > - while ((!feof(fp)) && len < bsz) { > + while ((!feof(fp)) && len < BSZ) { > p = tl->l + len; > - len += fread(p, 1, bsz - len, fp); > + len += fread(p, 1, BSZ - len, fp); > if (ferror(fp)) { > ierr(fn); > return; > @@ -251,7 +251,7 @@ > if ((*p == '\n') || start) { > struct bfelem *tr; > > - if (start && len) > + if (start && llen) > WR(p, llen + 1); > else if (llen) > WR(p + 1, llen); > > -- > wbr, > pluknet Thanks for the tip, Sergey. Fixed in 311928. From owner-svn-src-head@freebsd.org Wed Jan 11 17:34:17 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 720C4CAB48A; Wed, 11 Jan 2017 17:34:17 +0000 (UTC) (envelope-from gonzo@bluezbox.com) Received: from id.bluezbox.com (id.bluezbox.com [45.55.20.155]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 527A41702; Wed, 11 Jan 2017 17:34:16 +0000 (UTC) (envelope-from gonzo@bluezbox.com) Received: from [127.0.0.1] (helo=id.bluezbox.com) by id.bluezbox.com with esmtps (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.87 (FreeBSD)) (envelope-from ) id 1cRMmt-000CsH-PV; Wed, 11 Jan 2017 09:34:16 -0800 Received: (from gonzo@localhost) by id.bluezbox.com (8.15.2/8.15.2/Submit) id v0BHYFWM049492; Wed, 11 Jan 2017 09:34:15 -0800 (PST) (envelope-from gonzo@bluezbox.com) X-Authentication-Warning: id.bluezbox.com: gonzo set sender to gonzo@bluezbox.com using -f Date: Wed, 11 Jan 2017 09:34:15 -0800 From: Oleksandr Tymoshenko To: "Ngie Cooper (yaneurabeya)" Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r311911 - in head/sys: conf dev/sdhci modules modules/sdhci_acpi Message-ID: <20170111173415.GA49467@bluezbox.com> References: <201701110153.v0B1rsws002127@repo.freebsd.org> <388FCCEE-8999-4DAD-9689-1C50D1F045FE@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <388FCCEE-8999-4DAD-9689-1C50D1F045FE@gmail.com> X-Operating-System: FreeBSD/11.0-RELEASE-p2 (amd64) User-Agent: Mutt/1.6.1 (2016-04-27) X-Spam-Level: -- X-Spam-Report: Spam detection software, running on the system "id.bluezbox.com", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see The administrator of that system for details. Content preview: Ngie Cooper (yaneurabeya) (yaneurabeya@gmail.com) wrote: > > > On Jan 10, 2017, at 5:53 PM, Oleksandr Tymoshenko wrote: > > > > Author: gonzo > > Date: Wed Jan 11 01:53:54 2017 > > New Revision: 311911 > > URL: https://svnweb.freebsd.org/changeset/base/311911 > > > > Log: > > [sdhci] Add ACPI platform support for SDHCI driver > > > > - Create ACPI version of SDHCI attach/detach/accessors logic. Some > > platforms (e.g. BayTrail-based Minnowboard) expose SDHCI devices > > via ACPI, not PCI > > - Add sdchi_acpi kernel module > > > > Reviewed by: ian, imp > > MFC after: 1 week > > Differential Revision: https://reviews.freebsd.org/D9112 > > > Hi, > This broke the build for a bit because of missing headers in SRCS. Please MFC r311923 too. > Thank you! [...] Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 11 Jan 2017 17:34:17 -0000 Ngie Cooper (yaneurabeya) (yaneurabeya@gmail.com) wrote: > > > On Jan 10, 2017, at 5:53 PM, Oleksandr Tymoshenko wrote: > > > > Author: gonzo > > Date: Wed Jan 11 01:53:54 2017 > > New Revision: 311911 > > URL: https://svnweb.freebsd.org/changeset/base/311911 > > > > Log: > > [sdhci] Add ACPI platform support for SDHCI driver > > > > - Create ACPI version of SDHCI attach/detach/accessors logic. Some > > platforms (e.g. BayTrail-based Minnowboard) expose SDHCI devices > > via ACPI, not PCI > > - Add sdchi_acpi kernel module > > > > Reviewed by: ian, imp > > MFC after: 1 week > > Differential Revision: https://reviews.freebsd.org/D9112 > > > Hi, > This broke the build for a bit because of missing headers in SRCS. Please MFC r311923 too. > Thank you! Oops. My apologies. Thanks for fixing. -- gonzo From owner-svn-src-head@freebsd.org Wed Jan 11 18:47:01 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 73C2DCABAA0; Wed, 11 Jan 2017 18:47:01 +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 435421F25; Wed, 11 Jan 2017 18:47:01 +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 v0BIl0ek013955; Wed, 11 Jan 2017 18:47:00 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v0BIl0Mg013954; Wed, 11 Jan 2017 18:47:00 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201701111847.v0BIl0Mg013954@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Wed, 11 Jan 2017 18:47:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r311929 - head/sys/boot/common X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 11 Jan 2017 18:47:01 -0000 Author: dim Date: Wed Jan 11 18:47:00 2017 New Revision: 311929 URL: https://svnweb.freebsd.org/changeset/base/311929 Log: Don't include in reloc_elf.c, as it includes just after it, which has a conflicting definition of errno. This leads to the following warning with clang 4.0.0: In file included from sys/boot/common/reloc_elf32.c:6: In file included from sys/boot/common/reloc_elf.c:37: /usr/obj/usr/src/tmp/usr/include/stand.h:155:12: error: this function declaration is not a prototype [-Werror,-Wstrict-prototypes] extern int errno; ^ sys/sys/errno.h:46:26: note: expanded from macro 'errno' #define errno (* __error()) ^ MFC after: 3 days Modified: head/sys/boot/common/reloc_elf.c Modified: head/sys/boot/common/reloc_elf.c ============================================================================== --- head/sys/boot/common/reloc_elf.c Wed Jan 11 16:09:25 2017 (r311928) +++ head/sys/boot/common/reloc_elf.c Wed Jan 11 18:47:00 2017 (r311929) @@ -33,7 +33,6 @@ __FBSDID("$FreeBSD$"); #include #include -#include #include #define FREEBSD_ELF From owner-svn-src-head@freebsd.org Wed Jan 11 19:29:29 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6DA7CCAAE29; Wed, 11 Jan 2017 19:29:29 +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 3CB661C41; Wed, 11 Jan 2017 19:29:29 +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 v0BJTSJh030233; Wed, 11 Jan 2017 19:29:28 GMT (envelope-from dumbbell@FreeBSD.org) Received: (from dumbbell@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v0BJTSJh030232; Wed, 11 Jan 2017 19:29:28 GMT (envelope-from dumbbell@FreeBSD.org) Message-Id: <201701111929.v0BJTSJh030232@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: Wed, 11 Jan 2017 19:29:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r311930 - head/share/misc X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 11 Jan 2017 19:29:29 -0000 Author: dumbbell Date: Wed Jan 11 19:29:28 2017 New Revision: 311930 URL: https://svnweb.freebsd.org/changeset/base/311930 Log: committers-ports.dot: Add myself Approved by: antoine (mentor) Differential Revision: https://reviews.freebsd.org/D9143 Modified: head/share/misc/committers-ports.dot Modified: head/share/misc/committers-ports.dot ============================================================================== --- head/share/misc/committers-ports.dot Wed Jan 11 18:47:00 2017 (r311929) +++ head/share/misc/committers-ports.dot Wed Jan 11 19:29:28 2017 (r311930) @@ -90,6 +90,7 @@ delphij [label="Xin Li\ndelphij@FreeBSD. demon [label="Dmitry Sivachenko\ndemon@FreeBSD.org\n2000/11/13"] dhn [label="Dennis Herrmann\ndhn@FreeBSD.org\n2009/03/03"] dryice [label="Dryice Dong Liu\ndryice@FreeBSD.org\n2006/12/25"] +dumbbell [label="Jean-Sebastien Pedron\ndumbbell@FreeBSD.org\n2017/01/10"] dvl [label="Dan Langille\ndvl@FreeBSD.org\n2014/08/10"] eadler [label="Eitan Adler\neadler@FreeBSD.org\n2011/08/17"] edwin [label="Edwin Groothuis\nedwin@FreeBSD.org\n2002/10/22"] @@ -265,6 +266,8 @@ ahze -> tmclaugh amdmi3 -> jrm +antoine -> dumbbell + araujo -> lippe araujo -> pclin araujo -> pgollucci @@ -283,6 +286,7 @@ bdrewery -> trociny bapt -> bdrewery bapt -> bofh +bapt -> dumbbell bapt -> eadler bapt -> grembo bapt -> jbeich From owner-svn-src-head@freebsd.org Wed Jan 11 19:29:34 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C18CECAAE5F; Wed, 11 Jan 2017 19:29:34 +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 78BED1C6D; Wed, 11 Jan 2017 19:29:34 +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 v0BJTXFg030282; Wed, 11 Jan 2017 19:29:33 GMT (envelope-from sbruno@FreeBSD.org) Received: (from sbruno@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v0BJTX4m030279; Wed, 11 Jan 2017 19:29:33 GMT (envelope-from sbruno@FreeBSD.org) Message-Id: <201701111929.v0BJTX4m030279@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: sbruno set sender to sbruno@FreeBSD.org using -f From: Sean Bruno Date: Wed, 11 Jan 2017 19:29:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r311931 - head/sys/dev/e1000 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 11 Jan 2017 19:29:34 -0000 Author: sbruno Date: Wed Jan 11 19:29:33 2017 New Revision: 311931 URL: https://svnweb.freebsd.org/changeset/base/311931 Log: Restore v6 offload caps for igb(4) class devices. Reported by: tuxen Modified: head/sys/dev/e1000/em_txrx.c head/sys/dev/e1000/if_em.h head/sys/dev/e1000/igb_txrx.c Modified: head/sys/dev/e1000/em_txrx.c ============================================================================== --- head/sys/dev/e1000/em_txrx.c Wed Jan 11 19:29:28 2017 (r311930) +++ head/sys/dev/e1000/em_txrx.c Wed Jan 11 19:29:33 2017 (r311931) @@ -304,7 +304,7 @@ em_isc_txd_encap(void *arg, if_pkt_info_ if (do_tso) { i = em_tso_setup(sc, pi, &txd_upper, &txd_lower); tso_desc = TRUE; - } else if (csum_flags & CSUM_OFFLOAD) { + } else if (csum_flags & EM_CSUM_OFFLOAD) { i = em_transmit_checksum_setup(sc, pi, &txd_upper, &txd_lower); } Modified: head/sys/dev/e1000/if_em.h ============================================================================== --- head/sys/dev/e1000/if_em.h Wed Jan 11 19:29:28 2017 (r311930) +++ head/sys/dev/e1000/if_em.h Wed Jan 11 19:29:33 2017 (r311931) @@ -330,7 +330,8 @@ #define EM_MSIX_LINK 0x01000000 /* For 82574 use */ #define ETH_ZLEN 60 #define ETH_ADDR_LEN 6 -#define CSUM_OFFLOAD 7 /* Offload bits in mbuf flag */ +#define EM_CSUM_OFFLOAD 7 /* Offload bits in mbuf flag */ +#define IGB_CSUM_OFFLOAD 0x0E0F /* Offload bits in mbuf flag */ #define IGB_PKTTYPE_MASK 0x0000FFF0 #define IGB_DMCTLX_DCFLUSH_DIS 0x80000000 /* Disable DMA Coalesce Flush */ Modified: head/sys/dev/e1000/igb_txrx.c ============================================================================== --- head/sys/dev/e1000/igb_txrx.c Wed Jan 11 19:29:28 2017 (r311930) +++ head/sys/dev/e1000/igb_txrx.c Wed Jan 11 19:29:33 2017 (r311931) @@ -171,7 +171,7 @@ igb_tx_ctx_setup(struct tx_ring *txr, if */ if (pi->ipi_mflags & M_VLANTAG) { vlan_macip_lens |= (pi->ipi_vtag << E1000_ADVTXD_VLAN_SHIFT); - } else if ((pi->ipi_csum_flags & CSUM_OFFLOAD) == 0) { + } else if ((pi->ipi_csum_flags & IGB_CSUM_OFFLOAD) == 0) { return (0); } From owner-svn-src-head@freebsd.org Wed Jan 11 19:55:53 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8F03CCABDC0; Wed, 11 Jan 2017 19:55:53 +0000 (UTC) (envelope-from bu7cher@yandex.ru) Received: from forward2o.cmail.yandex.net (forward2o.cmail.yandex.net [IPv6:2a02:6b8:0:1a72::287]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "forwards.mail.yandex.net", Issuer "Yandex CA" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 421481F90; Wed, 11 Jan 2017 19:55:53 +0000 (UTC) (envelope-from bu7cher@yandex.ru) Received: from smtp1m.mail.yandex.net (smtp1m.mail.yandex.net [IPv6:2a02:6b8:0:2519::121]) by forward2o.cmail.yandex.net (Yandex) with ESMTP id 3D527211C5; Wed, 11 Jan 2017 22:55:49 +0300 (MSK) Received: from smtp1m.mail.yandex.net (localhost.localdomain [127.0.0.1]) by smtp1m.mail.yandex.net (Yandex) with ESMTP id D0CDB63C0E22; Wed, 11 Jan 2017 22:55:47 +0300 (MSK) Received: by smtp1m.mail.yandex.net (nwsmtp/Yandex) with ESMTPSA id Vlj57T8Rnw-tl3WHPPh; Wed, 11 Jan 2017 22:55:47 +0300 (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client certificate not present) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yandex.ru; s=mail; t=1484164547; bh=jTVXT12OrQGGk8wZIRHCzgG/SZ7+zGTVvrcA74azIto=; h=Subject:To:References:From:Message-ID:Date:In-Reply-To; b=mXSOvG/0TVU68/4XbDOWNrddLDjTcyYbog6r7gvc3vRRW5gQzgzV3/twgT1eyap5n Ex/pdaiY5Bhs7LCH9N5oTfpNPcsNsBbJnNp8ylEAgrfsjvOxyKXHzJUEu5xp0LcOm0 Fo8msXLQCI741N4NdX4DC2cjWTbPDO/V2AvK4UyU= Authentication-Results: smtp1m.mail.yandex.net; dkim=pass header.i=@yandex.ru X-Yandex-Suid-Status: 1 0,1 0,1 0,1 0 Subject: Re: svn commit: r311931 - head/sys/dev/e1000 To: Sean Bruno , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201701111929.v0BJTX4m030279@repo.freebsd.org> From: "Andrey V. Elsukov" Message-ID: <821fe1c5-8173-1f2d-f691-2d89eb8b0e69@yandex.ru> Date: Wed, 11 Jan 2017 22:54:58 +0300 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:45.0) Gecko/20100101 Thunderbird/45.5.1 MIME-Version: 1.0 In-Reply-To: <201701111929.v0BJTX4m030279@repo.freebsd.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 11 Jan 2017 19:55:53 -0000 On 11.01.2017 22:29, Sean Bruno wrote: > Author: sbruno > Date: Wed Jan 11 19:29:33 2017 > New Revision: 311931 > URL: https://svnweb.freebsd.org/changeset/base/311931 > > Log: > Restore v6 offload caps for igb(4) class devices. > Modified: head/sys/dev/e1000/if_em.h > ============================================================================== > --- head/sys/dev/e1000/if_em.h Wed Jan 11 19:29:28 2017 (r311930) > +++ head/sys/dev/e1000/if_em.h Wed Jan 11 19:29:33 2017 (r311931) > @@ -330,7 +330,8 @@ > #define EM_MSIX_LINK 0x01000000 /* For 82574 use */ > #define ETH_ZLEN 60 > #define ETH_ADDR_LEN 6 > -#define CSUM_OFFLOAD 7 /* Offload bits in mbuf flag */ > +#define EM_CSUM_OFFLOAD 7 /* Offload bits in mbuf flag */ > +#define IGB_CSUM_OFFLOAD 0x0E0F /* Offload bits in mbuf flag */ Hi, Sean, why did you not define these masks using macros from sys/mbuf.h? It seems it would be more readable. -- WBR, Andrey V. Elsukov From owner-svn-src-head@freebsd.org Wed Jan 11 19:59:29 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 01EF7CABFA1; Wed, 11 Jan 2017 19:59:29 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C5AFD13AB; Wed, 11 Jan 2017 19:59:28 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v0BJxRmi043499; Wed, 11 Jan 2017 19:59:27 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v0BJxRTO043498; Wed, 11 Jan 2017 19:59:27 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201701111959.v0BJxRTO043498@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Wed, 11 Jan 2017 19:59:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r311932 - head/sys/boot/efi/include X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 11 Jan 2017 19:59:29 -0000 Author: dim Date: Wed Jan 11 19:59:27 2017 New Revision: 311932 URL: https://svnweb.freebsd.org/changeset/base/311932 Log: Make EFI_RESERVED_SERVICE a proper prototype With clang 4.0.0, the EFI API header causes the following warning: In file included from sys/boot/efi/loader/bootinfo.c:43: In file included from sys/boot/efi/loader/../include/efi.h:52: sys/boot/efi/include/efiapi.h:534:32: error: this function declaration is not a prototype [-Werror,-Wstrict-prototypes] (EFIAPI *EFI_RESERVED_SERVICE) ( ^ Add VOID to make it into a real prototype. Reviewed by: imp, emaste, tsoome MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D9132 Modified: head/sys/boot/efi/include/efiapi.h Modified: head/sys/boot/efi/include/efiapi.h ============================================================================== --- head/sys/boot/efi/include/efiapi.h Wed Jan 11 19:29:33 2017 (r311931) +++ head/sys/boot/efi/include/efiapi.h Wed Jan 11 19:59:27 2017 (r311932) @@ -532,6 +532,7 @@ EFI_STATUS typedef EFI_STATUS (EFIAPI *EFI_RESERVED_SERVICE) ( + VOID ); typedef From owner-svn-src-head@freebsd.org Wed Jan 11 20:00:26 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 30546CAB040; Wed, 11 Jan 2017 20:00:26 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D3855166C; Wed, 11 Jan 2017 20:00:25 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v0BK0PeD043616; Wed, 11 Jan 2017 20:00:25 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v0BK0Pd0043615; Wed, 11 Jan 2017 20:00:25 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201701112000.v0BK0Pd0043615@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Wed, 11 Jan 2017 20:00:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r311933 - head/sys/boot/efi/boot1 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 11 Jan 2017 20:00:26 -0000 Author: dim Date: Wed Jan 11 20:00:24 2017 New Revision: 311933 URL: https://svnweb.freebsd.org/changeset/base/311933 Log: Use proper prototypes in struct boot_module_t With clang 4.0.0, we are getting the following warnings about struct boot_module_t in efi's boot_module.h: In file included from sys/boot/efi/boot1/ufs_module.c:41: sys/boot/efi/boot1/boot_module.h:67:14: error: this function declaration is not a prototype [-Werror,-Wstrict-prototypes] void (*init)(); ^ void sys/boot/efi/boot1/boot_module.h:92:16: error: this function declaration is not a prototype [-Werror,-Wstrict-prototypes] void (*status)(); ^ void sys/boot/efi/boot1/boot_module.h:95:24: error: this function declaration is not a prototype [-Werror,-Wstrict-prototypes] dev_info_t *(*devices)(); ^ void 3 errors generated. Fix this by adding 'void' to the parameter lists. No functional change. Reviewed by: emaste, imp, smh MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D9144 Modified: head/sys/boot/efi/boot1/boot_module.h Modified: head/sys/boot/efi/boot1/boot_module.h ============================================================================== --- head/sys/boot/efi/boot1/boot_module.h Wed Jan 11 19:59:27 2017 (r311932) +++ head/sys/boot/efi/boot1/boot_module.h Wed Jan 11 20:00:24 2017 (r311933) @@ -64,7 +64,7 @@ typedef struct boot_module_t const char *name; /* init is the optional initialiser for the module. */ - void (*init)(); + void (*init)(void); /* * probe checks to see if the module can handle dev. @@ -89,10 +89,10 @@ typedef struct boot_module_t void **buf, size_t *bufsize); /* status outputs information about the probed devices. */ - void (*status)(); + void (*status)(void); /* valid devices as found by probe. */ - dev_info_t *(*devices)(); + dev_info_t *(*devices)(void); } boot_module_t; /* Standard boot modules. */ From owner-svn-src-head@freebsd.org Wed Jan 11 20:23:46 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D5EDCCABD83; Wed, 11 Jan 2017 20:23: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 A5D5A1F4B; Wed, 11 Jan 2017 20:23: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 v0BKNjqv055797; Wed, 11 Jan 2017 20:23:45 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v0BKNjcq055796; Wed, 11 Jan 2017 20:23:45 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201701112023.v0BKNjcq055796@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Wed, 11 Jan 2017 20:23:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r311935 - head/sys/dev/ntb/if_ntb X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 11 Jan 2017 20:23:46 -0000 Author: mav Date: Wed Jan 11 20:23:45 2017 New Revision: 311935 URL: https://svnweb.freebsd.org/changeset/base/311935 Log: Pretend we support some IOCTLs to not scary upper layers. MFC after: 2 weeks 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 Jan 11 20:21:05 2017 (r311934) +++ head/sys/dev/ntb/if_ntb/if_ntb.c Wed Jan 11 20:23:45 2017 (r311935) @@ -237,6 +237,11 @@ ntb_ioctl(if_t ifp, u_long command, cadd int error = 0; switch (command) { + case SIOCSIFFLAGS: + case SIOCADDMULTI: + case SIOCDELMULTI: + break; + case SIOCSIFMTU: { if (ifr->ifr_mtu > sc->mtu - ETHER_HDR_LEN) { From owner-svn-src-head@freebsd.org Wed Jan 11 21:18:16 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1D69DCAA8E8; Wed, 11 Jan 2017 21:18: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 D253012A0; Wed, 11 Jan 2017 21:18: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 v0BLIFjW076396; Wed, 11 Jan 2017 21:18:15 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v0BLIF8n076395; Wed, 11 Jan 2017 21:18:15 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201701112118.v0BLIF8n076395@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Wed, 11 Jan 2017 21:18:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r311941 - head/contrib/elftoolchain/libelftc X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 11 Jan 2017 21:18:16 -0000 Author: emaste Date: Wed Jan 11 21:18:14 2017 New Revision: 311941 URL: https://svnweb.freebsd.org/changeset/base/311941 Log: readelf: add PPC64 relocation types Reported by: Mark Millard MFC after: 2 weeks Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D9146 Modified: head/contrib/elftoolchain/libelftc/elftc_reloc_type_str.c Modified: head/contrib/elftoolchain/libelftc/elftc_reloc_type_str.c ============================================================================== --- head/contrib/elftoolchain/libelftc/elftc_reloc_type_str.c Wed Jan 11 21:05:13 2017 (r311940) +++ head/contrib/elftoolchain/libelftc/elftc_reloc_type_str.c Wed Jan 11 21:18:14 2017 (r311941) @@ -501,6 +501,114 @@ elftc_reloc_type_str(unsigned int mach, case 116: return "R_PPC_EMB_RELSDA"; } break; + case EM_PPC64: + switch(type) { + case 0: return "R_PPC64_NONE"; + case 1: return "R_PPC64_ADDR32"; + case 2: return "R_PPC64_ADDR24"; + case 3: return "R_PPC64_ADDR16"; + case 4: return "R_PPC64_ADDR16_LO"; + case 5: return "R_PPC64_ADDR16_HI"; + case 6: return "R_PPC64_ADDR16_HA"; + case 7: return "R_PPC64_ADDR14"; + case 8: return "R_PPC64_ADDR14_BRTAKEN"; + case 9: return "R_PPC64_ADDR14_BRNTAKEN"; + case 10: return "R_PPC64_REL24"; + case 11: return "R_PPC64_REL14"; + case 12: return "R_PPC64_REL14_BRTAKEN"; + case 13: return "R_PPC64_REL14_BRNTAKEN"; + case 14: return "R_PPC64_GOT16"; + case 15: return "R_PPC64_GOT16_LO"; + case 16: return "R_PPC64_GOT16_HI"; + case 17: return "R_PPC64_GOT16_HA"; + case 19: return "R_PPC64_COPY"; + case 20: return "R_PPC64_GLOB_DAT"; + case 21: return "R_PPC64_JMP_SLOT"; + case 22: return "R_PPC64_RELATIVE"; + case 24: return "R_PPC64_UADDR32"; + case 25: return "R_PPC64_UADDR16"; + case 26: return "R_PPC64_REL32"; + case 27: return "R_PPC64_PLT32"; + case 28: return "R_PPC64_PLTREL32"; + case 29: return "R_PPC64_PLT16_LO"; + case 30: return "R_PPC64_PLT16_HI"; + case 31: return "R_PPC64_PLT16_HA"; + case 33: return "R_PPC64_SECTOFF"; + case 34: return "R_PPC64_SECTOFF_LO"; + case 35: return "R_PPC64_SECTOFF_HI"; + case 36: return "R_PPC64_SECTOFF_HA"; + case 37: return "R_PPC64_ADDR30"; + case 38: return "R_PPC64_ADDR64"; + case 39: return "R_PPC64_ADDR16_HIGHER"; + case 40: return "R_PPC64_ADDR16_HIGHERA"; + case 41: return "R_PPC64_ADDR16_HIGHEST"; + case 42: return "R_PPC64_ADDR16_HIGHESTA"; + case 43: return "R_PPC64_UADDR64"; + case 44: return "R_PPC64_REL64"; + case 45: return "R_PPC64_PLT64"; + case 46: return "R_PPC64_PLTREL64"; + case 47: return "R_PPC64_TOC16"; + case 48: return "R_PPC64_TOC16_LO"; + case 49: return "R_PPC64_TOC16_HI"; + case 50: return "R_PPC64_TOC16_HA"; + case 51: return "R_PPC64_TOC"; + case 52: return "R_PPC64_PLTGOT16"; + case 53: return "R_PPC64_PLTGOT16_LO"; + case 54: return "R_PPC64_PLTGOT16_HI"; + case 55: return "R_PPC64_PLTGOT16_HA"; + case 56: return "R_PPC64_ADDR16_DS"; + case 57: return "R_PPC64_ADDR16_LO_DS"; + case 58: return "R_PPC64_GOT16_DS"; + case 59: return "R_PPC64_GOT16_LO_DS"; + case 60: return "R_PPC64_PLT16_LO_DS"; + case 61: return "R_PPC64_SECTOFF_DS"; + case 62: return "R_PPC64_SECTOFF_LO_DS"; + case 63: return "R_PPC64_TOC16_DS"; + case 64: return "R_PPC64_TOC16_LO_DS"; + case 65: return "R_PPC64_PLTGOT16_DS"; + case 66: return "R_PPC64_PLTGOT16_LO_DS"; + case 67: return "R_PPC64_TLS"; + case 68: return "R_PPC64_DTPMOD64"; + case 69: return "R_PPC64_TPREL16"; + case 70: return "R_PPC64_TPREL16_LO"; + case 71: return "R_PPC64_TPREL16_HI"; + case 72: return "R_PPC64_TPREL16_HA"; + case 73: return "R_PPC64_TPREL64"; + case 74: return "R_PPC64_DTPREL16"; + case 75: return "R_PPC64_DTPREL16_LO"; + case 76: return "R_PPC64_DTPREL16_HI"; + case 77: return "R_PPC64_DTPREL16_HA"; + case 78: return "R_PPC64_DTPREL64"; + case 79: return "R_PPC64_GOT_TLSGD16"; + case 80: return "R_PPC64_GOT_TLSGD16_LO"; + case 81: return "R_PPC64_GOT_TLSGD16_HI"; + case 82: return "R_PPC64_GOT_TLSGD16_HA"; + case 83: return "R_PPC64_GOT_TLSLD16"; + case 84: return "R_PPC64_GOT_TLSLD16_LO"; + case 85: return "R_PPC64_GOT_TLSLD16_HI"; + case 86: return "R_PPC64_GOT_TLSLD16_HA"; + case 87: return "R_PPC64_GOT_TPREL16_DS"; + case 88: return "R_PPC64_GOT_TPREL16_LO_DS"; + case 89: return "R_PPC64_GOT_TPREL16_HI"; + case 90: return "R_PPC64_GOT_TPREL16_HA"; + case 91: return "R_PPC64_GOT_DTPREL16_DS"; + case 92: return "R_PPC64_GOT_DTPREL16_LO_DS"; + case 93: return "R_PPC64_GOT_DTPREL16_HI"; + case 94: return "R_PPC64_GOT_DTPREL16_HA"; + case 95: return "R_PPC64_TPREL16_DS"; + case 96: return "R_PPC64_TPREL16_LO_DS"; + case 97: return "R_PPC64_TPREL16_HIGHER"; + case 98: return "R_PPC64_TPREL16_HIGHERA"; + case 99: return "R_PPC64_TPREL16_HIGHEST"; + case 100: return "R_PPC64_TPREL16_HIGHESTA"; + case 101: return "R_PPC64_DTPREL16_DS"; + case 102: return "R_PPC64_DTPREL16_LO_DS"; + case 103: return "R_PPC64_DTPREL16_HIGHER"; + case 104: return "R_PPC64_DTPREL16_HIGHERA"; + case 105: return "R_PPC64_DTPREL16_HIGHEST"; + case 106: return "R_PPC64_DTPREL16_HIGHESTA"; + } + break; case EM_RISCV: switch(type) { case 0: return "R_RISCV_NONE"; From owner-svn-src-head@freebsd.org Wed Jan 11 21:28:24 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 24600CAACC1; Wed, 11 Jan 2017 21:28:24 +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 E80B919EF; Wed, 11 Jan 2017 21:28:23 +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 v0BLSNvf080276; Wed, 11 Jan 2017 21:28:23 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v0BLSNUV080275; Wed, 11 Jan 2017 21:28:23 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201701112128.v0BLSNUV080275@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Wed, 11 Jan 2017 21:28:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r311942 - head/contrib/elftoolchain/libelftc X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 11 Jan 2017 21:28:24 -0000 Author: emaste Date: Wed Jan 11 21:28:22 2017 New Revision: 311942 URL: https://svnweb.freebsd.org/changeset/base/311942 Log: readelf: add more PPC64 relocation types found in LLVM MFC after: 2 weeks MFC with: r311941 Sponsored by: The FreeBSD Foundation Modified: head/contrib/elftoolchain/libelftc/elftc_reloc_type_str.c Modified: head/contrib/elftoolchain/libelftc/elftc_reloc_type_str.c ============================================================================== --- head/contrib/elftoolchain/libelftc/elftc_reloc_type_str.c Wed Jan 11 21:18:14 2017 (r311941) +++ head/contrib/elftoolchain/libelftc/elftc_reloc_type_str.c Wed Jan 11 21:28:22 2017 (r311942) @@ -607,6 +607,12 @@ elftc_reloc_type_str(unsigned int mach, case 104: return "R_PPC64_DTPREL16_HIGHERA"; case 105: return "R_PPC64_DTPREL16_HIGHEST"; case 106: return "R_PPC64_DTPREL16_HIGHESTA"; + case 107: return "R_PPC64_TLSGD"; + case 108: return "R_PPC64_TLSLD"; + case 249: return "R_PPC64_REL16"; + case 250: return "R_PPC64_REL16_LO"; + case 251: return "R_PPC64_REL16_HI"; + case 252: return "R_PPC64_REL16_HA"; } break; case EM_RISCV: From owner-svn-src-head@freebsd.org Wed Jan 11 21:35:51 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D7295CAB01C; Wed, 11 Jan 2017 21:35:51 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: from mail-qk0-x22e.google.com (mail-qk0-x22e.google.com [IPv6:2607:f8b0:400d:c09::22e]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 944F01F5B; Wed, 11 Jan 2017 21:35:51 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: by mail-qk0-x22e.google.com with SMTP id u25so874396qki.2; Wed, 11 Jan 2017 13:35:51 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=BE8eQvUP8jTYsWD4AQKL84vg7Cw6QT1v2I0rczonWbA=; b=fOxchh1gkreZvX82dCzLvfhlrmjP7WPFAP3UuFZpf+BorbjFzDfm7IQPukm4qGvpkV XDGRk/BdVYQhxKXW1kKz3ba648heKblyOyq895wP+I6yAmcFlFM0x8VXgSKRtS8dQIwc wLPjxfMbP9CiGqwdZO/dYCKpSXZkO7VXp6r/EwGPY5qa2MNVaIc0TQwmv3JR/L1FeBDB JMVXnuUoOx9qngqsllzo/PLgeufXwVJSbmEym3mOG7C6QUbXDDmgcUWDwU6AZYa3wudY XS4Oc+MYv4xe7qdgGO20Y/m8PpAn38I5VkfKsZCu31emYOWcmQORfu44nR6k+G0bL/Aj A8bA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=BE8eQvUP8jTYsWD4AQKL84vg7Cw6QT1v2I0rczonWbA=; b=b/rc9LM7OPaASqN2ga6KKbZIZvSkKPVxnra18oMrvN51U3KmKQL2jJ27ObVIZXunve smsf6a4QdIdosIos5uMWU3FzhPzPdoT20JfTen/DL6icstQQWEy5n8evdMqfxfRY+aaB 2XM34mLFrUmqVwAhfeYnVobQ9NJvWLeEZpxTdINHHoCN4PI05q2z47/upG0pPXoSZeB3 dhxVE/jH6Vw2iyyChBaT2PDuG0/+tL0s3oszA8Y8UpfEWddfOCNuQ7/fO6ujGbZ1j+Jd Z4ZuyBzbo1hYYWbh6jl9vfOBEUmBehzwPSxc+73N/5oFGqsc81w64OLzVk4jfkdbIKPp gXaw== X-Gm-Message-State: AIkVDXIUQ2opTEBbF51+pmKFJ3lfOmtBxxoDqEDjfy9GxGY/oQkzh5U5HkEvwjiITFNz22CSNrd7OFDPO3IIGg== X-Received: by 10.55.112.65 with SMTP id l62mr11729959qkc.76.1484170550648; Wed, 11 Jan 2017 13:35:50 -0800 (PST) MIME-Version: 1.0 Received: by 10.140.83.133 with HTTP; Wed, 11 Jan 2017 13:35:50 -0800 (PST) In-Reply-To: <201701111847.v0BIl0Mg013954@repo.freebsd.org> References: <201701111847.v0BIl0Mg013954@repo.freebsd.org> From: Ngie Cooper Date: Wed, 11 Jan 2017 13:35:50 -0800 Message-ID: Subject: Re: svn commit: r311929 - head/sys/boot/common To: Dimitry Andric Cc: "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Content-Type: text/plain; charset=UTF-8 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 11 Jan 2017 21:35:51 -0000 On Wed, Jan 11, 2017 at 10:47 AM, Dimitry Andric wrote: > Author: dim > Date: Wed Jan 11 18:47:00 2017 > New Revision: 311929 > URL: https://svnweb.freebsd.org/changeset/base/311929 > > Log: > Don't include in reloc_elf.c, as it includes just > after it, which has a conflicting definition of errno. This leads to > the following warning with clang 4.0.0: > > In file included from sys/boot/common/reloc_elf32.c:6: > In file included from sys/boot/common/reloc_elf.c:37: > /usr/obj/usr/src/tmp/usr/include/stand.h:155:12: error: this function declaration is not a prototype [-Werror,-Wstrict-prototypes] > extern int errno; > ^ > sys/sys/errno.h:46:26: note: expanded from macro 'errno' > #define errno (* __error()) It seems like libstand (once again) should be fixed, not the "offending code". -Ngie From owner-svn-src-head@freebsd.org Wed Jan 11 21:42:45 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 10D11CAB1F8 for ; Wed, 11 Jan 2017 21:42:45 +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 E2838143E for ; Wed, 11 Jan 2017 21:42:44 +0000 (UTC) (envelope-from ian@freebsd.org) X-MHO-User: ec1eae4e-d846-11e6-8c89-112185c90658 X-Report-Abuse-To: https://support.duocircle.com/support/solutions/articles/5000540958-duocircle-standard-smtp-abuse-information X-Originating-IP: 73.78.92.27 X-Mail-Handler: DuoCircle Outbound SMTP Received: from ilsoft.org (unknown [73.78.92.27]) by outbound1.ore.mailhop.org (Halon) with ESMTPSA id ec1eae4e-d846-11e6-8c89-112185c90658; Wed, 11 Jan 2017 21:43:00 +0000 (UTC) Received: from rev (rev [172.22.42.240]) by ilsoft.org (8.15.2/8.15.2) with ESMTP id v0BLgahN001909; Wed, 11 Jan 2017 14:42:36 -0700 (MST) (envelope-from ian@freebsd.org) Message-ID: <1484170956.86335.17.camel@freebsd.org> Subject: Re: svn commit: r311929 - head/sys/boot/common From: Ian Lepore To: Ngie Cooper , Dimitry Andric Cc: "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Date: Wed, 11 Jan 2017 14:42:36 -0700 In-Reply-To: References: <201701111847.v0BIl0Mg013954@repo.freebsd.org> Content-Type: text/plain; charset="ISO-8859-1" X-Mailer: Evolution 3.18.5.1 FreeBSD GNOME Team Port Mime-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 11 Jan 2017 21:42:45 -0000 On Wed, 2017-01-11 at 13:35 -0800, Ngie Cooper wrote: > On Wed, Jan 11, 2017 at 10:47 AM, Dimitry Andric > wrote: > > > > Author: dim > > Date: Wed Jan 11 18:47:00 2017 > > New Revision: 311929 > > URL: https://svnweb.freebsd.org/changeset/base/311929 > > > > Log: > >   Don't include in reloc_elf.c, as it includes > > just > >   after it, which has a conflicting definition of errno.  This > > leads to > >   the following warning with clang 4.0.0: > > > >       In file included from sys/boot/common/reloc_elf32.c:6: > >       In file included from sys/boot/common/reloc_elf.c:37: > >       /usr/obj/usr/src/tmp/usr/include/stand.h:155:12: error: this > > function declaration is not a prototype [-Werror,-Wstrict- > > prototypes] > >       extern int errno; > >                  ^ > >       sys/sys/errno.h:46:26: note: expanded from macro 'errno' > >       #define errno           (* __error()) > It seems like libstand (once again) should be fixed, not the > "offending code". > -Ngie > In this case it's not the library that's in error.  Libstand is the thing that implements errno, so it's the thing that must define it. The code that includes both errno.h and libstand.h was wrong.  errno.h is a standard header file used with libc, and the loader code doesn't link with libc. The thing that amazes me is the usual:  how did this ever work with gcc 4.2? -- Ian From owner-svn-src-head@freebsd.org Wed Jan 11 22:11:07 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6D566CABB34; Wed, 11 Jan 2017 22:11:07 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from tensor.andric.com (tensor.andric.com [87.251.56.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "tensor.andric.com", Issuer "COMODO RSA Domain Validation Secure Server CA" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 311751723; Wed, 11 Jan 2017 22:11:06 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from [IPv6:2001:7b8:3a7::7049:d69d:d97f:c66f] (unknown [IPv6:2001:7b8:3a7:0:7049:d69d:d97f:c66f]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by tensor.andric.com (Postfix) with ESMTPSA id DBF14254B8; Wed, 11 Jan 2017 23:11:03 +0100 (CET) Content-Type: multipart/signed; boundary="Apple-Mail=_96E7DCCF-5558-4B57-AE01-E03A43495047"; protocol="application/pgp-signature"; micalg=pgp-sha1 Mime-Version: 1.0 (Mac OS X Mail 9.3 \(3124\)) Subject: Re: svn commit: r311929 - head/sys/boot/common From: Dimitry Andric In-Reply-To: <1484170956.86335.17.camel@freebsd.org> Date: Wed, 11 Jan 2017 23:10:55 +0100 Cc: Ngie Cooper , "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Message-Id: <8EF36240-8CD0-449E-AA9C-EFFB7BF0C111@FreeBSD.org> References: <201701111847.v0BIl0Mg013954@repo.freebsd.org> <1484170956.86335.17.camel@freebsd.org> To: Ian Lepore X-Mailer: Apple Mail (2.3124) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 11 Jan 2017 22:11:07 -0000 --Apple-Mail=_96E7DCCF-5558-4B57-AE01-E03A43495047 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=iso-8859-1 On 11 Jan 2017, at 22:42, Ian Lepore wrote: > > On Wed, 2017-01-11 at 13:35 -0800, Ngie Cooper wrote: >> On Wed, Jan 11, 2017 at 10:47 AM, Dimitry Andric >> wrote: >>> >>> Author: dim >>> Date: Wed Jan 11 18:47:00 2017 >>> New Revision: 311929 >>> URL: https://svnweb.freebsd.org/changeset/base/311929 >>> >>> Log: >>> Don't include in reloc_elf.c, as it includes >>> just >>> after it, which has a conflicting definition of errno. This >>> leads to >>> the following warning with clang 4.0.0: >>> >>> In file included from sys/boot/common/reloc_elf32.c:6: >>> In file included from sys/boot/common/reloc_elf.c:37: >>> /usr/obj/usr/src/tmp/usr/include/stand.h:155:12: error: this >>> function declaration is not a prototype [-Werror,-Wstrict- >>> prototypes] >>> extern int errno; >>> ^ >>> sys/sys/errno.h:46:26: note: expanded from macro 'errno' >>> #define errno (* __error()) >> It seems like libstand (once again) should be fixed, not the >> "offending code". >> -Ngie >> > > In this case it's not the library that's in error. Libstand is the > thing that implements errno, so it's the thing that must define it. > > The code that includes both errno.h and libstand.h was wrong. errno.h > is a standard header file used with libc, and the loader code doesn't > link with libc. > > The thing that amazes me is the usual: how did this ever work with gcc > 4.2? The line: extern int errno; expanded to: extern int (* __error()); which is a declaration of an external function pointer called __error (albeit with an empty parameter list). Since nobody actually refers to this symbol in libstand, there are no later complaints. Interestingly, reloc_elf.c does not use errno at all, so I have no idea why the include was originally added. -Dimitry --Apple-Mail=_96E7DCCF-5558-4B57-AE01-E03A43495047 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----- Version: GnuPG/MacGPG2 v2.0.30 iEYEARECAAYFAlh2rXcACgkQsF6jCi4glqP8zQCeINInEOUVS5IPMGmWXEYQ5zon wR0AoMw7WEJJOqE8t3in9Fe5L35F87Ll =lVEX -----END PGP SIGNATURE----- --Apple-Mail=_96E7DCCF-5558-4B57-AE01-E03A43495047-- From owner-svn-src-head@freebsd.org Wed Jan 11 22:32:15 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4E4F8CAB8EE; Wed, 11 Jan 2017 22:32:15 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: from mail-qk0-x244.google.com (mail-qk0-x244.google.com [IPv6:2607:f8b0:400d:c09::244]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 09C171E0B; Wed, 11 Jan 2017 22:32:15 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: by mail-qk0-x244.google.com with SMTP id a20so282366qkc.3; Wed, 11 Jan 2017 14:32:15 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=iO8aak/MljmzY9Q9kk//8m856HWViNaypMWfsNBHR3E=; b=K1U+dgr6i/OohhyEOW0fRDAe3NowCuPxbdCTnIudlWztcfh/XT/sqF+XH0YVSUNatV EHsjNDbvlmeY0PYCSuqrjXqv2TWwi9M5Y9dzI4bdv+GgBPNqP+q2ORDCiI24bsCaFoKJ 36UZv4CQAFO5VMYPmyrONPkwuyAZMzWSeT+tC76S1eKLQTBUy/feJbg8tBQoqdvdOITM W8wCdkdAhQNUKDfNUZyKWh9yhMMFF1tRMsv8ZTOQtWFX7OOyj3VF1YemT9CGALMZRQlo QcujcfMj7T1FLa9kdmmc9VQuxOr6BdFwQckNElQouem2B1R8Ke9fYMqIeWl6FAJANT2/ UUsA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=iO8aak/MljmzY9Q9kk//8m856HWViNaypMWfsNBHR3E=; b=MWj7Ctd59g/wyEp8K6s6wVaYewu7WAb1Uyv3p0L+dzNJuclE5k+y7ZP+P9ON2FlN/x q8ykb7HD5GJ5QKWDroz8v5SDGcM/9geadEO1W9WZ4Yywx2fJOe/K9siioEPbOXX504J3 L8E+o6HIU3sb0KSIIdVnOrZ/ucnY2Bq0AHiZ9dv7b2MHCiXXPVQtUkAL3uEhpB3Rcwtv vo5NEtQ8FBepw3l3DAPxwq15YERpe7a8v1EHGdVGZEnYRrt0lsLSKYWYsn0C5Wxte+HD cQypGVTpkV7ftmZP0phjL16ZrKZAw7R+QpbdUvGX0sWeH6VtbkaMAZMbxi+hC/zUUwNY Lqvg== X-Gm-Message-State: AIkVDXLbx73N28/Or09MEsuri506+gG4u3CyZ7s3yKFZI6fB/Kq7aH8XW5hwrNn5smqZ9OiWFe5E7R552Ml93Q== X-Received: by 10.55.16.11 with SMTP id a11mr11756614qkh.3.1484173934201; Wed, 11 Jan 2017 14:32:14 -0800 (PST) MIME-Version: 1.0 Received: by 10.140.83.133 with HTTP; Wed, 11 Jan 2017 14:32:13 -0800 (PST) In-Reply-To: <8EF36240-8CD0-449E-AA9C-EFFB7BF0C111@FreeBSD.org> References: <201701111847.v0BIl0Mg013954@repo.freebsd.org> <1484170956.86335.17.camel@freebsd.org> <8EF36240-8CD0-449E-AA9C-EFFB7BF0C111@FreeBSD.org> From: Ngie Cooper Date: Wed, 11 Jan 2017 14:32:13 -0800 Message-ID: Subject: Re: svn commit: r311929 - head/sys/boot/common To: Dimitry Andric Cc: Ian Lepore , "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Content-Type: text/plain; charset=UTF-8 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 11 Jan 2017 22:32:15 -0000 On Wed, Jan 11, 2017 at 2:10 PM, Dimitry Andric wrote: ... > The line: > > extern int errno; > > expanded to: > > extern int (* __error()); > > which is a declaration of an external function pointer called __error > (albeit with an empty parameter list). Since nobody actually refers to > this symbol in libstand, there are no later complaints. > > Interestingly, reloc_elf.c does not use errno at all, so I have no idea > why the include was originally added. This is why: 95dd728f5ca86 (iedowse 2004-08-28 23:03:05 +0000 221) #else 95dd728f5ca86 (iedowse 2004-08-28 23:03:05 +0000 222) return (EOPNOTSUPP); 95dd728f5ca86 (iedowse 2004-08-28 23:03:05 +0000 223) #endif You probably just broke tinderbox on non-x86/-powerpc. Cheers, -Ngie From owner-svn-src-head@freebsd.org Wed Jan 11 22:33:09 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 34995CAB9F5; Wed, 11 Jan 2017 22:33:09 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: from mail-qt0-x241.google.com (mail-qt0-x241.google.com [IPv6:2607:f8b0:400d:c0d::241]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id E13F71167; Wed, 11 Jan 2017 22:33:08 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: by mail-qt0-x241.google.com with SMTP id n13so277613qtc.0; Wed, 11 Jan 2017 14:33:08 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=DWh9+iV8nbm+W/nPWZDkDyBkQR9lQ9s/dKeXLNvSTSE=; b=K7bXvz0NPlh3wYkCy+GpMk678gFbUSyJwhKb7PX1edrFW1LoK6p0YWzgQlAHCvLwNf co0TJn54qb6WAUtHGrSb72RmM5jvPWL/9N41LttXElbzG4UOfK+hj2UdJy4ChE4gNLuD vO9EWdb39FlfzdBQsoqh5gDDfl+fyLKkE8zeK4CqMNIhUojWDFVsoTrLitXvVNJyOYN4 u6PfvXpQPBeqL9iS5+Fkjv/qTWT8kmXuoGgK3/rTGUh603LbAcWkhO80E35GGytdGbdm SRjnStwPC/Qm6Vsqh0dxljN1YdkbpmDVe1YJM4SNAWLgxUiPs3JZanCYCb/s43Pk+ABF SgZg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=DWh9+iV8nbm+W/nPWZDkDyBkQR9lQ9s/dKeXLNvSTSE=; b=eApSMy3aJlTgq80MAPwZ5jzqc/bECIDadx7JGoxeFnxs/fXwuld7+sxNHwsOzEw4Sc 53rFxeHreai2g4mr7fGUwOv2Rrv8KyfTh35/3/TCcQl4ij+h7o8VVduN7djBk2EWOkTj rf9b4EfaGu0S1tnPWief3/iY1lZu1ajmvw6XTgN5CQwpXXiPN/Eabja5Nei+7tjOBylq fUv2cAad46rxypDN3aqdv8McFga07I7zmjDFIy6kQwhf/dTc5OGy+TYKszE2DcZxtAZP BlgUKojaJ3KpNj6VsHwu5GDJmsw0QIkKX/NSKHjVp9y7WzguyncyL2LM42Zpiof7yCHl zu5w== X-Gm-Message-State: AIkVDXK7mynpa0nhx/yn0KdEmDFL0DsAAX36ZzDdu5/jRqn0Fhow+j6lubgcH9kQd0EXiBgRA5yGo3f2Ddm9Hg== X-Received: by 10.237.45.71 with SMTP id h65mr9702685qtd.244.1484173988060; Wed, 11 Jan 2017 14:33:08 -0800 (PST) MIME-Version: 1.0 Received: by 10.140.83.133 with HTTP; Wed, 11 Jan 2017 14:33:07 -0800 (PST) In-Reply-To: References: <201701111847.v0BIl0Mg013954@repo.freebsd.org> <1484170956.86335.17.camel@freebsd.org> <8EF36240-8CD0-449E-AA9C-EFFB7BF0C111@FreeBSD.org> From: Ngie Cooper Date: Wed, 11 Jan 2017 14:33:07 -0800 Message-ID: Subject: Re: svn commit: r311929 - head/sys/boot/common To: Dimitry Andric Cc: Ian Lepore , "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Content-Type: text/plain; charset=UTF-8 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 11 Jan 2017 22:33:09 -0000 On Wed, Jan 11, 2017 at 2:32 PM, Ngie Cooper wrote: > On Wed, Jan 11, 2017 at 2:10 PM, Dimitry Andric wrote: > > ... > >> The line: >> >> extern int errno; >> >> expanded to: >> >> extern int (* __error()); >> >> which is a declaration of an external function pointer called __error >> (albeit with an empty parameter list). Since nobody actually refers to >> this symbol in libstand, there are no later complaints. >> >> Interestingly, reloc_elf.c does not use errno at all, so I have no idea >> why the include was originally added. > > This is why: > > 95dd728f5ca86 (iedowse 2004-08-28 23:03:05 +0000 221) #else > 95dd728f5ca86 (iedowse 2004-08-28 23:03:05 +0000 222) return (EOPNOTSUPP); > 95dd728f5ca86 (iedowse 2004-08-28 23:03:05 +0000 223) #endif Oh... sparc64's ok too. Talk about #ifdef soup. Thanks, -Ngie From owner-svn-src-head@freebsd.org Wed Jan 11 22:37:04 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id AE0DFCABCA3; Wed, 11 Jan 2017 22:37:04 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from tensor.andric.com (tensor.andric.com [IPv6:2001:7b8:3a7:1:2d0:b7ff:fea0:8c26]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "tensor.andric.com", Issuer "COMODO RSA Domain Validation Secure Server CA" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 72260159F; Wed, 11 Jan 2017 22:37:04 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from [IPv6:2001:7b8:3a7::7049:d69d:d97f:c66f] (unknown [IPv6:2001:7b8:3a7:0:7049:d69d:d97f:c66f]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by tensor.andric.com (Postfix) with ESMTPSA id D76E425530; Wed, 11 Jan 2017 23:37:02 +0100 (CET) Content-Type: multipart/signed; boundary="Apple-Mail=_4FED3BA0-1148-4DE5-A65D-4E8CF6CE1323"; protocol="application/pgp-signature"; micalg=pgp-sha1 Mime-Version: 1.0 (Mac OS X Mail 9.3 \(3124\)) Subject: Re: svn commit: r311929 - head/sys/boot/common From: Dimitry Andric In-Reply-To: Date: Wed, 11 Jan 2017 23:36:55 +0100 Cc: Ian Lepore , "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Message-Id: <0ADFDAAC-3858-49B1-BB37-E179D55AF6CE@FreeBSD.org> References: <201701111847.v0BIl0Mg013954@repo.freebsd.org> <1484170956.86335.17.camel@freebsd.org> <8EF36240-8CD0-449E-AA9C-EFFB7BF0C111@FreeBSD.org> To: Ngie Cooper X-Mailer: Apple Mail (2.3124) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 11 Jan 2017 22:37:04 -0000 --Apple-Mail=_4FED3BA0-1148-4DE5-A65D-4E8CF6CE1323 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii On 11 Jan 2017, at 23:32, Ngie Cooper wrote: >=20 > On Wed, Jan 11, 2017 at 2:10 PM, Dimitry Andric = wrote: >=20 > ... >=20 >> The line: >>=20 >> extern int errno; >>=20 >> expanded to: >>=20 >> extern int (* __error()); >>=20 >> which is a declaration of an external function pointer called __error >> (albeit with an empty parameter list). Since nobody actually refers = to >> this symbol in libstand, there are no later complaints. >>=20 >> Interestingly, reloc_elf.c does not use errno at all, so I have no = idea >> why the include was originally added. >=20 > This is why: >=20 > 95dd728f5ca86 (iedowse 2004-08-28 23:03:05 +0000 221) #else > 95dd728f5ca86 (iedowse 2004-08-28 23:03:05 +0000 222) return = (EOPNOTSUPP); > 95dd728f5ca86 (iedowse 2004-08-28 23:03:05 +0000 223) #endif >=20 > You probably just broke tinderbox on non-x86/-powerpc. Not very likely, since includes . -Dimitry --Apple-Mail=_4FED3BA0-1148-4DE5-A65D-4E8CF6CE1323 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----- Version: GnuPG/MacGPG2 v2.0.30 iEYEARECAAYFAlh2s44ACgkQsF6jCi4glqOlvACgz3TmtZNnUB6yjD8oiithWfpX aBEAoNSklFcZWVQLRQnK5jPYmMTSgfuK =W3s1 -----END PGP SIGNATURE----- --Apple-Mail=_4FED3BA0-1148-4DE5-A65D-4E8CF6CE1323-- From owner-svn-src-head@freebsd.org Wed Jan 11 22:50:59 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2194DCAB6C1; Wed, 11 Jan 2017 22:50:59 +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 E37BF1387; Wed, 11 Jan 2017 22:50:58 +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 v0BMowJG014059; Wed, 11 Jan 2017 22:50:58 GMT (envelope-from cperciva@FreeBSD.org) Received: (from cperciva@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v0BMowUA014058; Wed, 11 Jan 2017 22:50:58 GMT (envelope-from cperciva@FreeBSD.org) Message-Id: <201701112250.v0BMowUA014058@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cperciva set sender to cperciva@FreeBSD.org using -f From: Colin Percival Date: Wed, 11 Jan 2017 22:50:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r311945 - head/usr.bin/fortune/fortune X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 11 Jan 2017 22:50:59 -0000 Author: cperciva Date: Wed Jan 11 22:50:57 2017 New Revision: 311945 URL: https://svnweb.freebsd.org/changeset/base/311945 Log: Remove obsolete path from fortune(6). This was inadvertantly left over when fortune and other games moved from /usr/games to /usr/bin; I am removing rather than correcting it since we normally do not mention in the FILES section the paths to programs in /usr/bin/. PR: 215962 Reported by: Andras Farkas Modified: head/usr.bin/fortune/fortune/fortune.6 Modified: head/usr.bin/fortune/fortune/fortune.6 ============================================================================== --- head/usr.bin/fortune/fortune/fortune.6 Wed Jan 11 22:10:56 2017 (r311944) +++ head/usr.bin/fortune/fortune/fortune.6 Wed Jan 11 22:50:57 2017 (r311945) @@ -176,7 +176,6 @@ it was up to on disk. .El .Sh FILES .Bl -tag -width ".Pa /usr/share/games/fortune/*" -.It Pa /usr/games/fortune .It Pa /usr/share/games/fortune/* the fortunes databases (those files ending .Dq Pa -o From owner-svn-src-head@freebsd.org Wed Jan 11 22:54:05 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8155BCAB90B; Wed, 11 Jan 2017 22:54:05 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 380381A5A; Wed, 11 Jan 2017 22:54:05 +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 v0BMs4XT017132; Wed, 11 Jan 2017 22:54:04 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v0BMs4pc017131; Wed, 11 Jan 2017 22:54:04 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201701112254.v0BMs4pc017131@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Wed, 11 Jan 2017 22:54:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r311946 - head/contrib/elftoolchain/libelftc X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 11 Jan 2017 22:54:05 -0000 Author: emaste Date: Wed Jan 11 22:54:04 2017 New Revision: 311946 URL: https://svnweb.freebsd.org/changeset/base/311946 Log: readelf: add S390 relocation types From https://refspecs.linuxfoundation.org/ELF/zSeries/lzsabi0_zSeries.html Reviewed by: bz MFC after: 1 month Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D9149 Modified: head/contrib/elftoolchain/libelftc/elftc_reloc_type_str.c Modified: head/contrib/elftoolchain/libelftc/elftc_reloc_type_str.c ============================================================================== --- head/contrib/elftoolchain/libelftc/elftc_reloc_type_str.c Wed Jan 11 22:50:57 2017 (r311945) +++ head/contrib/elftoolchain/libelftc/elftc_reloc_type_str.c Wed Jan 11 22:54:04 2017 (r311946) @@ -664,6 +664,37 @@ elftc_reloc_type_str(unsigned int mach, case 48: return "R_RISCV_GPREL_S"; } break; + case EM_S390: + switch (type) { + case 0: return "R_390_NONE"; + case 1: return "R_390_8"; + case 2: return "R_390_12"; + case 3: return "R_390_16"; + case 4: return "R_390_32"; + case 5: return "R_390_PC32"; + case 6: return "R_390_GOT12"; + case 7: return "R_390_GOT32"; + case 8: return "R_390_PLT32"; + case 9: return "R_390_COPY"; + case 10: return "R_390_GLOB_DAT"; + case 11: return "R_390_JMP_SLOT"; + case 12: return "R_390_RELATIVE"; + case 13: return "R_390_GOTOFF"; + case 14: return "R_390_GOTPC"; + case 15: return "R_390_GOT16"; + case 16: return "R_390_PC16"; + case 17: return "R_390_PC16DBL"; + case 18: return "R_390_PLT16DBL"; + case 19: return "R_390_PC32DBL"; + case 20: return "R_390_PLT32DBL"; + case 21: return "R_390_GOTPCDBL"; + case 22: return "R_390_64"; + case 23: return "R_390_PC64"; + case 24: return "R_390_GOT64"; + case 25: return "R_390_PLT64"; + case 26: return "R_390_GOTENT"; + } + break; case EM_SPARC: case EM_SPARCV9: switch(type) { From owner-svn-src-head@freebsd.org Wed Jan 11 23:05:30 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id BC90BCABDED; Wed, 11 Jan 2017 23:05:30 +0000 (UTC) (envelope-from pfg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8C2981184; Wed, 11 Jan 2017 23:05:30 +0000 (UTC) (envelope-from pfg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v0BN5T4d021076; Wed, 11 Jan 2017 23:05:29 GMT (envelope-from pfg@FreeBSD.org) Received: (from pfg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v0BN5Tsp021075; Wed, 11 Jan 2017 23:05:29 GMT (envelope-from pfg@FreeBSD.org) Message-Id: <201701112305.v0BN5Tsp021075@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: pfg set sender to pfg@FreeBSD.org using -f From: "Pedro F. Giffuni" Date: Wed, 11 Jan 2017 23:05:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r311947 - head/usr.bin/rpcgen X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 11 Jan 2017 23:05:30 -0000 Author: pfg Date: Wed Jan 11 23:05:29 2017 New Revision: 311947 URL: https://svnweb.freebsd.org/changeset/base/311947 Log: rpcgen(1): Avoid unused variable warning on generated code. Avoid "unused variable 'i'" warnings in generated .c files by only emitting the "int i;" for non-opaque arrays. Opaque arrays use xdr_opaque() rather than iterating over the array. Obtained from: OpenBSD (CVS rev 1.28) MFC after: 1 week Modified: head/usr.bin/rpcgen/rpc_cout.c Modified: head/usr.bin/rpcgen/rpc_cout.c ============================================================================== --- head/usr.bin/rpcgen/rpc_cout.c Wed Jan 11 22:54:04 2017 (r311946) +++ head/usr.bin/rpcgen/rpc_cout.c Wed Jan 11 23:05:29 2017 (r311947) @@ -551,7 +551,8 @@ emit_struct(definition *def) } for (dl = def->def.st.decls; dl != NULL; dl = dl->next) - if (dl->decl.rel == REL_VECTOR){ + if (dl->decl.rel == REL_VECTOR && + strcmp(dl->decl.type, "opaque") != 0){ f_print(fout, "\tint i;\n"); break; } From owner-svn-src-head@freebsd.org Wed Jan 11 23:32:41 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9AE58CAB586; Wed, 11 Jan 2017 23:32:41 +0000 (UTC) (envelope-from avos@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6A7E81FC0; Wed, 11 Jan 2017 23:32:41 +0000 (UTC) (envelope-from avos@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v0BNWeNW033026; Wed, 11 Jan 2017 23:32:40 GMT (envelope-from avos@FreeBSD.org) Received: (from avos@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v0BNWejq033025; Wed, 11 Jan 2017 23:32:40 GMT (envelope-from avos@FreeBSD.org) Message-Id: <201701112332.v0BNWejq033025@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avos set sender to avos@FreeBSD.org using -f From: Andriy Voskoboinyk Date: Wed, 11 Jan 2017 23:32:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r311948 - head/sys/dev/rtwn/rtl8192c X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 11 Jan 2017 23:32:41 -0000 Author: avos Date: Wed Jan 11 23:32:40 2017 New Revision: 311948 URL: https://svnweb.freebsd.org/changeset/base/311948 Log: rtwn: fix R92C_TXDW4_RTSRATE_M definition (0x3f -> 0x1f) Submitted by: kevlo Modified: head/sys/dev/rtwn/rtl8192c/r92c_tx_desc.h Modified: head/sys/dev/rtwn/rtl8192c/r92c_tx_desc.h ============================================================================== --- head/sys/dev/rtwn/rtl8192c/r92c_tx_desc.h Wed Jan 11 23:05:29 2017 (r311947) +++ head/sys/dev/rtwn/rtl8192c/r92c_tx_desc.h Wed Jan 11 23:32:40 2017 (r311948) @@ -68,7 +68,7 @@ struct r92c_tx_desc { uint16_t txdseq; uint32_t txdw4; -#define R92C_TXDW4_RTSRATE_M 0x0000003f +#define R92C_TXDW4_RTSRATE_M 0x0000001f #define R92C_TXDW4_RTSRATE_S 0 #define R92C_TXDW4_SEQ_SEL_M 0x00000040 #define R92C_TXDW4_SEQ_SEL_S 6 From owner-svn-src-head@freebsd.org Wed Jan 11 23:48:19 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 024A0CABB3B; Wed, 11 Jan 2017 23:48:18 +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 B7C6016D1; Wed, 11 Jan 2017 23:48:18 +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 v0BNmHOb037280; Wed, 11 Jan 2017 23:48:17 GMT (envelope-from np@FreeBSD.org) Received: (from np@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v0BNmHWu037273; Wed, 11 Jan 2017 23:48:17 GMT (envelope-from np@FreeBSD.org) Message-Id: <201701112348.v0BNmHWu037273@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: np set sender to np@FreeBSD.org using -f From: Navdeep Parhar Date: Wed, 11 Jan 2017 23:48:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r311949 - head/sys/dev/cxgbe/tom X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 11 Jan 2017 23:48:19 -0000 Author: np Date: Wed Jan 11 23:48:17 2017 New Revision: 311949 URL: https://svnweb.freebsd.org/changeset/base/311949 Log: cxgbe/tom: Add VIMAGE support to the TOE driver. Active Open: - Save the socket's vnet at the time of the active open (t4_connect) and switch to it when processing the reply (do_act_open_rpl or do_act_establish). Passive Open: - Save the listening socket's vnet in the driver's listen_ctx and switch to it when processing incoming SYNs for the socket. - Reject SYNs that arrive on an ifnet that's not in the same vnet as the listening socket. CLIP (Compressed Local IPv6) table: - Add only those IPv6 addresses to the CLIP that are in a vnet associated with one of the card's ifnets. Misc: - Set vnet from the toepcb when processing TCP state transitions. - The kernel sets the vnet when calling the driver's output routine so t4_push_frames runs in proper vnet context already. One exception is when incoming credits trigger tx within the driver's ithread. Set the vnet explicitly in do_fw4_ack for that case. MFC after: 3 days Sponsored by: Chelsio Communications Modified: head/sys/dev/cxgbe/tom/t4_connect.c head/sys/dev/cxgbe/tom/t4_cpl_io.c head/sys/dev/cxgbe/tom/t4_ddp.c head/sys/dev/cxgbe/tom/t4_listen.c head/sys/dev/cxgbe/tom/t4_tom.c head/sys/dev/cxgbe/tom/t4_tom.h Modified: head/sys/dev/cxgbe/tom/t4_connect.c ============================================================================== --- head/sys/dev/cxgbe/tom/t4_connect.c Wed Jan 11 23:32:40 2017 (r311948) +++ head/sys/dev/cxgbe/tom/t4_connect.c Wed Jan 11 23:48:17 2017 (r311949) @@ -126,6 +126,7 @@ do_act_establish(struct sge_iq *iq, cons CTR3(KTR_CXGBE, "%s: atid %u, tid %u", __func__, atid, tid); free_atid(sc, atid); + CURVNET_SET(toep->vnet); INP_WLOCK(inp); toep->tid = tid; insert_tid(sc, tid, toep, inp->inp_vflag & INP_IPV6 ? 2 : 1); @@ -141,6 +142,7 @@ do_act_establish(struct sge_iq *iq, cons make_established(toep, cpl->snd_isn, cpl->rcv_isn, cpl->tcp_opt); done: INP_WUNLOCK(inp); + CURVNET_RESTORE(); return (0); } @@ -178,6 +180,7 @@ act_open_failure_cleanup(struct adapter free_atid(sc, atid); toep->tid = -1; + CURVNET_SET(toep->vnet); if (status != EAGAIN) INP_INFO_RLOCK(&V_tcbinfo); INP_WLOCK(inp); @@ -185,6 +188,7 @@ act_open_failure_cleanup(struct adapter final_cpl_received(toep); /* unlocks inp */ if (status != EAGAIN) INP_INFO_RUNLOCK(&V_tcbinfo); + CURVNET_RESTORE(); } /* @@ -360,6 +364,7 @@ t4_connect(struct toedev *tod, struct so if (wr == NULL) DONT_OFFLOAD_ACTIVE_OPEN(ENOMEM); + toep->vnet = so->so_vnet; if (sc->tt.ddp && (so->so_options & SO_NO_DDP) == 0) set_tcpddp_ulp_mode(toep); else Modified: head/sys/dev/cxgbe/tom/t4_cpl_io.c ============================================================================== --- head/sys/dev/cxgbe/tom/t4_cpl_io.c Wed Jan 11 23:32:40 2017 (r311948) +++ head/sys/dev/cxgbe/tom/t4_cpl_io.c Wed Jan 11 23:48:17 2017 (r311949) @@ -306,7 +306,6 @@ make_established(struct toepcb *toep, ui uint16_t tcpopt = be16toh(opt); struct flowc_tx_params ftxp; - CURVNET_SET(so->so_vnet); INP_WLOCK_ASSERT(inp); KASSERT(tp->t_state == TCPS_SYN_SENT || tp->t_state == TCPS_SYN_RECEIVED, @@ -357,7 +356,6 @@ make_established(struct toepcb *toep, ui send_flowc_wr(toep, &ftxp); soisconnected(so); - CURVNET_RESTORE(); } static int @@ -1146,6 +1144,7 @@ do_peer_close(struct sge_iq *iq, const s KASSERT(toep->tid == tid, ("%s: toep tid mismatch", __func__)); + CURVNET_SET(toep->vnet); INP_INFO_RLOCK(&V_tcbinfo); INP_WLOCK(inp); tp = intotcpcb(inp); @@ -1191,6 +1190,7 @@ do_peer_close(struct sge_iq *iq, const s tcp_twstart(tp); INP_UNLOCK_ASSERT(inp); /* safe, we have a ref on the inp */ INP_INFO_RUNLOCK(&V_tcbinfo); + CURVNET_RESTORE(); INP_WLOCK(inp); final_cpl_received(toep); @@ -1203,6 +1203,7 @@ do_peer_close(struct sge_iq *iq, const s done: INP_WUNLOCK(inp); INP_INFO_RUNLOCK(&V_tcbinfo); + CURVNET_RESTORE(); return (0); } @@ -1229,6 +1230,7 @@ do_close_con_rpl(struct sge_iq *iq, cons KASSERT(m == NULL, ("%s: wasn't expecting payload", __func__)); KASSERT(toep->tid == tid, ("%s: toep tid mismatch", __func__)); + CURVNET_SET(toep->vnet); INP_INFO_RLOCK(&V_tcbinfo); INP_WLOCK(inp); tp = intotcpcb(inp); @@ -1248,6 +1250,7 @@ do_close_con_rpl(struct sge_iq *iq, cons release: INP_UNLOCK_ASSERT(inp); /* safe, we have a ref on the inp */ INP_INFO_RUNLOCK(&V_tcbinfo); + CURVNET_RESTORE(); INP_WLOCK(inp); final_cpl_received(toep); /* no more CPLs expected */ @@ -1272,6 +1275,7 @@ release: done: INP_WUNLOCK(inp); INP_INFO_RUNLOCK(&V_tcbinfo); + CURVNET_RESTORE(); return (0); } @@ -1345,6 +1349,7 @@ do_abort_req(struct sge_iq *iq, const st } inp = toep->inp; + CURVNET_SET(toep->vnet); INP_INFO_RLOCK(&V_tcbinfo); /* for tcp_close */ INP_WLOCK(inp); @@ -1380,6 +1385,7 @@ do_abort_req(struct sge_iq *iq, const st final_cpl_received(toep); done: INP_INFO_RUNLOCK(&V_tcbinfo); + CURVNET_RESTORE(); send_abort_rpl(sc, ofld_txq, tid, CPL_ABORT_NO_RST); return (0); } @@ -1501,18 +1507,21 @@ do_rx_data(struct sge_iq *iq, const stru DDP_UNLOCK(toep); INP_WUNLOCK(inp); + CURVNET_SET(toep->vnet); INP_INFO_RLOCK(&V_tcbinfo); INP_WLOCK(inp); tp = tcp_drop(tp, ECONNRESET); if (tp) INP_WUNLOCK(inp); INP_INFO_RUNLOCK(&V_tcbinfo); + CURVNET_RESTORE(); return (0); } /* receive buffer autosize */ - CURVNET_SET(so->so_vnet); + MPASS(toep->vnet == so->so_vnet); + CURVNET_SET(toep->vnet); if (sb->sb_flags & SB_AUTOSIZE && V_tcp_do_autorcvbuf && sb->sb_hiwat < V_tcp_autorcvbuf_max && @@ -1713,10 +1722,12 @@ do_fw4_ack(struct sge_iq *iq, const stru tid); #endif toep->flags &= ~TPF_TX_SUSPENDED; + CURVNET_SET(toep->vnet); if (toep->ulp_mode == ULP_MODE_ISCSI) t4_push_pdus(sc, toep, plen); else t4_push_frames(sc, toep, plen); + CURVNET_RESTORE(); } else if (plen > 0) { struct sockbuf *sb = &so->so_snd; int sbu; @@ -2143,7 +2154,7 @@ t4_aiotx_task(void *context, int pending struct socket *so = inp->inp_socket; struct kaiocb *job; - CURVNET_SET(so->so_vnet); + CURVNET_SET(toep->vnet); SOCKBUF_LOCK(&so->so_snd); while (!TAILQ_EMPTY(&toep->aiotx_jobq) && sowriteable(so)) { job = TAILQ_FIRST(&toep->aiotx_jobq); Modified: head/sys/dev/cxgbe/tom/t4_ddp.c ============================================================================== --- head/sys/dev/cxgbe/tom/t4_ddp.c Wed Jan 11 23:32:40 2017 (r311948) +++ head/sys/dev/cxgbe/tom/t4_ddp.c Wed Jan 11 23:48:17 2017 (r311949) @@ -546,7 +546,8 @@ handle_ddp_data(struct toepcb *toep, __b #endif /* receive buffer autosize */ - CURVNET_SET(so->so_vnet); + MPASS(toep->vnet == so->so_vnet); + CURVNET_SET(toep->vnet); SOCKBUF_LOCK(sb); if (sb->sb_flags & SB_AUTOSIZE && V_tcp_do_autorcvbuf && Modified: head/sys/dev/cxgbe/tom/t4_listen.c ============================================================================== --- head/sys/dev/cxgbe/tom/t4_listen.c Wed Jan 11 23:32:40 2017 (r311948) +++ head/sys/dev/cxgbe/tom/t4_listen.c Wed Jan 11 23:48:17 2017 (r311949) @@ -222,6 +222,7 @@ alloc_lctx(struct adapter *sc, struct in TAILQ_INIT(&lctx->synq); lctx->inp = inp; + lctx->vnet = inp->inp_socket->so_vnet; in_pcbref(inp); return (lctx); @@ -1200,6 +1201,8 @@ do_pass_accept_req(struct sge_iq *iq, co pi = sc->port[G_SYN_INTF(be16toh(cpl->l2info))]; + CURVNET_SET(lctx->vnet); + /* * Use the MAC index to lookup the associated VI. If this SYN * didn't match a perfect MAC filter, punt. @@ -1274,6 +1277,13 @@ found: ntids = 1; } + /* + * Don't offload if the ifnet that the SYN came in on is not in the same + * vnet as the listening socket. + */ + if (lctx->vnet != ifp->if_vnet) + REJECT_PASS_ACCEPT(); + e = get_l2te_for_nexthop(pi, ifp, &inc); if (e == NULL) REJECT_PASS_ACCEPT(); @@ -1313,7 +1323,6 @@ found: REJECT_PASS_ACCEPT(); } so = inp->inp_socket; - CURVNET_SET(so->so_vnet); mtu_idx = find_best_mtu_idx(sc, &inc, be16toh(cpl->tcpopt.mss)); rscale = cpl->tcpopt.wsf && V_tcp_do_rfc1323 ? select_rcv_wscale() : 0; @@ -1360,7 +1369,6 @@ found: */ toe_syncache_add(&inc, &to, &th, inp, tod, synqe); INP_UNLOCK_ASSERT(inp); /* ok to assert, we have a ref on the inp */ - CURVNET_RESTORE(); /* * If we replied during syncache_add (synqe->wr has been consumed), @@ -1415,10 +1423,12 @@ found: return (__LINE__); } INP_WUNLOCK(inp); + CURVNET_RESTORE(); release_synqe(synqe); /* extra hold */ return (0); reject: + CURVNET_RESTORE(); CTR4(KTR_CXGBE, "%s: stid %u, tid %u, REJECT (%d)", __func__, stid, tid, reject_reason); @@ -1490,6 +1500,7 @@ do_pass_establish(struct sge_iq *iq, con KASSERT(synqe->flags & TPF_SYNQE, ("%s: tid %u (ctx %p) not a synqe", __func__, tid, synqe)); + CURVNET_SET(lctx->vnet); INP_INFO_RLOCK(&V_tcbinfo); /* for syncache_expand */ INP_WLOCK(inp); @@ -1507,6 +1518,7 @@ do_pass_establish(struct sge_iq *iq, con INP_WUNLOCK(inp); INP_INFO_RUNLOCK(&V_tcbinfo); + CURVNET_RESTORE(); return (0); } @@ -1532,6 +1544,7 @@ reset: send_reset_synqe(TOEDEV(ifp), synqe); INP_WUNLOCK(inp); INP_INFO_RUNLOCK(&V_tcbinfo); + CURVNET_RESTORE(); return (0); } toep->tid = tid; @@ -1568,6 +1581,8 @@ reset: /* New connection inpcb is already locked by syncache_expand(). */ new_inp = sotoinpcb(so); INP_WLOCK_ASSERT(new_inp); + MPASS(so->so_vnet == lctx->vnet); + toep->vnet = lctx->vnet; /* * This is for the unlikely case where the syncache entry that we added @@ -1591,6 +1606,7 @@ reset: if (inp != NULL) INP_WUNLOCK(inp); INP_INFO_RUNLOCK(&V_tcbinfo); + CURVNET_RESTORE(); release_synqe(synqe); return (0); Modified: head/sys/dev/cxgbe/tom/t4_tom.c ============================================================================== --- head/sys/dev/cxgbe/tom/t4_tom.c Wed Jan 11 23:32:40 2017 (r311948) +++ head/sys/dev/cxgbe/tom/t4_tom.c Wed Jan 11 23:48:17 2017 (r311949) @@ -799,74 +799,96 @@ update_clip_table(struct adapter *sc, st struct in6_addr *lip, tlip; struct clip_head stale; struct clip_entry *ce, *ce_temp; - int rc, gen = atomic_load_acq_int(&in6_ifaddr_gen); + struct vi_info *vi; + int rc, gen, i, j; + uintptr_t last_vnet; ASSERT_SYNCHRONIZED_OP(sc); IN6_IFADDR_RLOCK(&in6_ifa_tracker); mtx_lock(&td->clip_table_lock); + gen = atomic_load_acq_int(&in6_ifaddr_gen); if (gen == td->clip_gen) goto done; TAILQ_INIT(&stale); TAILQ_CONCAT(&stale, &td->clip_table, link); - TAILQ_FOREACH(ia, &V_in6_ifaddrhead, ia_link) { - lip = &ia->ia_addr.sin6_addr; + /* + * last_vnet optimizes the common cases where all if_vnet = NULL (no + * VIMAGE) or all if_vnet = vnet0. + */ + last_vnet = (uintptr_t)(-1); + for_each_port(sc, i) + for_each_vi(sc->port[i], j, vi) { + if (last_vnet == (uintptr_t)vi->ifp->if_vnet) + continue; - KASSERT(!IN6_IS_ADDR_MULTICAST(lip), - ("%s: mcast address in in6_ifaddr list", __func__)); + /* XXX: races with if_vmove */ + CURVNET_SET(vi->ifp->if_vnet); + TAILQ_FOREACH(ia, &V_in6_ifaddrhead, ia_link) { + lip = &ia->ia_addr.sin6_addr; + + KASSERT(!IN6_IS_ADDR_MULTICAST(lip), + ("%s: mcast address in in6_ifaddr list", __func__)); + + if (IN6_IS_ADDR_LOOPBACK(lip)) + continue; + if (IN6_IS_SCOPE_EMBED(lip)) { + /* Remove the embedded scope */ + tlip = *lip; + lip = &tlip; + in6_clearscope(lip); + } + /* + * XXX: how to weed out the link local address for the + * loopback interface? It's fe80::1 usually (always?). + */ + + /* + * If it's in the main list then we already know it's + * not stale. + */ + TAILQ_FOREACH(ce, &td->clip_table, link) { + if (IN6_ARE_ADDR_EQUAL(&ce->lip, lip)) + goto next; + } - if (IN6_IS_ADDR_LOOPBACK(lip)) - continue; - if (IN6_IS_SCOPE_EMBED(lip)) { - /* Remove the embedded scope */ - tlip = *lip; - lip = &tlip; - in6_clearscope(lip); - } - /* - * XXX: how to weed out the link local address for the loopback - * interface? It's fe80::1 usually (always?). - */ - - /* - * If it's in the main list then we already know it's not stale. - */ - TAILQ_FOREACH(ce, &td->clip_table, link) { - if (IN6_ARE_ADDR_EQUAL(&ce->lip, lip)) - goto next; - } + /* + * If it's in the stale list we should move it to the + * main list. + */ + TAILQ_FOREACH(ce, &stale, link) { + if (IN6_ARE_ADDR_EQUAL(&ce->lip, lip)) { + TAILQ_REMOVE(&stale, ce, link); + TAILQ_INSERT_TAIL(&td->clip_table, ce, + link); + goto next; + } + } - /* - * If it's in the stale list we should move it to the main list. - */ - TAILQ_FOREACH(ce, &stale, link) { - if (IN6_ARE_ADDR_EQUAL(&ce->lip, lip)) { - TAILQ_REMOVE(&stale, ce, link); + /* A new IP6 address; add it to the CLIP table */ + ce = malloc(sizeof(*ce), M_CXGBE, M_NOWAIT); + memcpy(&ce->lip, lip, sizeof(ce->lip)); + ce->refcount = 0; + rc = add_lip(sc, lip); + if (rc == 0) TAILQ_INSERT_TAIL(&td->clip_table, ce, link); - goto next; - } - } + else { + char ip[INET6_ADDRSTRLEN]; - /* A new IP6 address; add it to the CLIP table */ - ce = malloc(sizeof(*ce), M_CXGBE, M_NOWAIT); - memcpy(&ce->lip, lip, sizeof(ce->lip)); - ce->refcount = 0; - rc = add_lip(sc, lip); - if (rc == 0) - TAILQ_INSERT_TAIL(&td->clip_table, ce, link); - else { - char ip[INET6_ADDRSTRLEN]; - - inet_ntop(AF_INET6, &ce->lip, &ip[0], sizeof(ip)); - log(LOG_ERR, "%s: could not add %s (%d)\n", - __func__, ip, rc); - free(ce, M_CXGBE); - } + inet_ntop(AF_INET6, &ce->lip, &ip[0], + sizeof(ip)); + log(LOG_ERR, "%s: could not add %s (%d)\n", + __func__, ip, rc); + free(ce, M_CXGBE); + } next: - continue; + continue; + } + CURVNET_RESTORE(); + last_vnet = (uintptr_t)vi->ifp->if_vnet; } /* Modified: head/sys/dev/cxgbe/tom/t4_tom.h ============================================================================== --- head/sys/dev/cxgbe/tom/t4_tom.h Wed Jan 11 23:32:40 2017 (r311948) +++ head/sys/dev/cxgbe/tom/t4_tom.h Wed Jan 11 23:48:17 2017 (r311949) @@ -141,6 +141,7 @@ struct toepcb { int refcount; struct tom_data *td; struct inpcb *inp; /* backpointer to host stack's PCB */ + struct vnet *vnet; struct vi_info *vi; /* virtual interface */ struct sge_wrq *ofld_txq; struct sge_ofld_rxq *ofld_rxq; @@ -232,6 +233,7 @@ struct listen_ctx { struct stid_region stid_region; int flags; struct inpcb *inp; /* listening socket's inp */ + struct vnet *vnet; struct sge_wrq *ctrlq; struct sge_ofld_rxq *ofld_rxq; struct clip_entry *ce; From owner-svn-src-head@freebsd.org Thu Jan 12 00:01:03 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A0D9CCAB0CF; Thu, 12 Jan 2017 00:01:03 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 70AFB1DA2; Thu, 12 Jan 2017 00:01:03 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v0C012du041490; Thu, 12 Jan 2017 00:01:02 GMT (envelope-from bz@FreeBSD.org) Received: (from bz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v0C012XL041489; Thu, 12 Jan 2017 00:01:02 GMT (envelope-from bz@FreeBSD.org) Message-Id: <201701120001.v0C012XL041489@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bz set sender to bz@FreeBSD.org using -f From: "Bjoern A. Zeeb" Date: Thu, 12 Jan 2017 00:01:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r311950 - head/sys/contrib/ipfilter/netinet X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 12 Jan 2017 00:01:03 -0000 Author: bz Date: Thu Jan 12 00:01:02 2017 New Revision: 311950 URL: https://svnweb.freebsd.org/changeset/base/311950 Log: Get rid of a compiler warning which I saw too often. Include netinet/in.h before ip_compat.t which will then check if IPPROTO_IPIP is defined or not. Doing it the other way round, ip_compat.h would not find it defined and netinet/in.h then redefine it. Modified: head/sys/contrib/ipfilter/netinet/ip_fil.h Modified: head/sys/contrib/ipfilter/netinet/ip_fil.h ============================================================================== --- head/sys/contrib/ipfilter/netinet/ip_fil.h Wed Jan 11 23:48:17 2017 (r311949) +++ head/sys/contrib/ipfilter/netinet/ip_fil.h Thu Jan 12 00:01:02 2017 (r311950) @@ -11,6 +11,10 @@ #ifndef __IP_FIL_H__ #define __IP_FIL_H__ +#if !defined(linux) || !defined(_KERNEL) +# include +#endif + #include "netinet/ip_compat.h" #include "netinet/ipf_rb.h" #if NETBSD_GE_REV(104040000) @@ -24,10 +28,6 @@ # endif #endif -#if !defined(linux) || !defined(_KERNEL) -# include -#endif - #ifndef SOLARIS # if defined(sun) && (defined(__svr4__) || defined(__SVR4)) # define SOLARIS 1 From owner-svn-src-head@freebsd.org Thu Jan 12 00:09:32 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6E0DECAB37E; Thu, 12 Jan 2017 00:09:32 +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 3A6DE12A4; Thu, 12 Jan 2017 00:09:32 +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 v0C09VUp045394; Thu, 12 Jan 2017 00:09:31 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v0C09VsD045393; Thu, 12 Jan 2017 00:09:31 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201701120009.v0C09VsD045393@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Thu, 12 Jan 2017 00:09:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r311951 - 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-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 12 Jan 2017 00:09:32 -0000 Author: ian Date: Thu Jan 12 00:09:31 2017 New Revision: 311951 URL: https://svnweb.freebsd.org/changeset/base/311951 Log: Include sys/systm.h for use of bootverbose. Fixes powerpc MPC85XXSPE build. Modified: head/sys/dev/sdhci/sdhci_fdt_gpio.c Modified: head/sys/dev/sdhci/sdhci_fdt_gpio.c ============================================================================== --- head/sys/dev/sdhci/sdhci_fdt_gpio.c Thu Jan 12 00:01:02 2017 (r311950) +++ head/sys/dev/sdhci/sdhci_fdt_gpio.c Thu Jan 12 00:09:31 2017 (r311951) @@ -35,6 +35,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include From owner-svn-src-head@freebsd.org Thu Jan 12 00:22:38 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 033BBCABB82; Thu, 12 Jan 2017 00:22:38 +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 C6F8E1E2F; Thu, 12 Jan 2017 00:22:37 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v0C0Ma7p053077; Thu, 12 Jan 2017 00:22:36 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v0C0MaHq053076; Thu, 12 Jan 2017 00:22:36 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201701120022.v0C0MaHq053076@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Thu, 12 Jan 2017 00:22:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r311952 - head/sys/ddb X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 12 Jan 2017 00:22:38 -0000 Author: markj Date: Thu Jan 12 00:22:36 2017 New Revision: 311952 URL: https://svnweb.freebsd.org/changeset/base/311952 Log: Enable the use of ^C and ^S/^Q in DDB. This lets one interrupt DDB's output, which is useful if paging is disabled and the output device is slow. Submitted by: Anton Rang Reviewed by: jhb MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D9138 Modified: head/sys/ddb/db_input.c Modified: head/sys/ddb/db_input.c ============================================================================== --- head/sys/ddb/db_input.c Thu Jan 12 00:09:31 2017 (r311951) +++ head/sys/ddb/db_input.c Thu Jan 12 00:22:36 2017 (r311952) @@ -63,7 +63,6 @@ static int db_lhist_nlines; #define BLANK ' ' #define BACKUP '\b' -static int cnmaygetc(void); static void db_delete(int n, int bwd); static int db_inputchar(int c); static void db_putnchars(int c, int count); @@ -291,12 +290,6 @@ db_inputchar(c) return (0); } -static int -cnmaygetc() -{ - return (-1); -} - int db_readline(lstart, lsize) char * lstart; @@ -350,7 +343,7 @@ db_check_interrupt(void) { int c; - c = cnmaygetc(); + c = cncheckc(); switch (c) { case -1: /* no character */ return; @@ -361,7 +354,7 @@ db_check_interrupt(void) case CTRL('s'): do { - c = cnmaygetc(); + c = cncheckc(); if (c == CTRL('c')) db_error((char *)0); } while (c != CTRL('q')); From owner-svn-src-head@freebsd.org Thu Jan 12 00:34:38 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 96A14CA90C5; Thu, 12 Jan 2017 00:34: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 664DB162B; Thu, 12 Jan 2017 00:34: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 v0C0YbVX057239; Thu, 12 Jan 2017 00:34:37 GMT (envelope-from cem@FreeBSD.org) Received: (from cem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v0C0Ybt3057238; Thu, 12 Jan 2017 00:34:37 GMT (envelope-from cem@FreeBSD.org) Message-Id: <201701120034.v0C0Ybt3057238@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cem set sender to cem@FreeBSD.org using -f From: "Conrad E. Meyer" Date: Thu, 12 Jan 2017 00:34:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r311953 - head/usr.sbin/pciconf X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 12 Jan 2017 00:34:38 -0000 Author: cem Date: Thu Jan 12 00:34:37 2017 New Revision: 311953 URL: https://svnweb.freebsd.org/changeset/base/311953 Log: pciconf(8): Reallow trailing colon in selectors Reallow device selectors to have a trailing colon, as documented in the manual page. This was broken along with some unrelated cleanups in r295806. PR: 215979 Reported by: David Boyd Sponsored by: Dell EMC Isilon Modified: head/usr.sbin/pciconf/pciconf.c Modified: head/usr.sbin/pciconf/pciconf.c ============================================================================== --- head/usr.sbin/pciconf/pciconf.c Thu Jan 12 00:22:36 2017 (r311952) +++ head/usr.sbin/pciconf/pciconf.c Thu Jan 12 00:34:37 2017 (r311953) @@ -917,11 +917,8 @@ parsesel(const char *str) while (isdigit(*ep) && i < 4) { selarr[i++] = strtoul(ep, &eppos, 10); ep = eppos; - if (*ep == ':') { + if (*ep == ':') ep++; - if (*ep == '\0') - i = 0; - } } if (i > 0 && *ep == '\0') { sel.pc_func = (i > 2) ? selarr[--i] : 0; From owner-svn-src-head@freebsd.org Thu Jan 12 00:48:08 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 53411CA95FF; Thu, 12 Jan 2017 00:48:08 +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 2D17F1D48; Thu, 12 Jan 2017 00:48:08 +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 v0C0m7pH061350; Thu, 12 Jan 2017 00:48:07 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v0C0m7I2061346; Thu, 12 Jan 2017 00:48:07 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201701120048.v0C0m7I2061346@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Thu, 12 Jan 2017 00:48:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r311954 - in head: lib/libc/gen share/man/man4 sys/kern sys/sys X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 12 Jan 2017 00:48:08 -0000 Author: ian Date: Thu Jan 12 00:48:06 2017 New Revision: 311954 URL: https://svnweb.freebsd.org/changeset/base/311954 Log: Rework tty_drain() to poll the hardware for completion, and restore drain timeout handling to historical freebsd behavior. The primary reason for these changes is the need to have tty_drain() call ttydevsw_busy() at some reasonable sub-second rate, to poll hardware that doesn't signal an interrupt when the transmit shift register becomes empty (which includes virtually all USB serial hardware). Such hardware hangs in a ttyout wait, because it never gets an opportunity to trigger a wakeup from the sleep in tty_drain() by calling ttydisc_getc() again, after handing the last of the buffered data to the hardware. While researching the history of changes to tty_drain() I stumbled across some email describing the historical BSD behavior of tcdrain() and close() on serial ports, and the ability of comcontrol(1) to control timeout behavior. Using that and some advice from Bruce Evans as a guide, I've put together these changes to implement the hardware polling and restore the historical timeout behaviors... - tty_drain() now calls ttydevsw_busy() in a loop at 10 Hz to accomodate hardware that requires polling for busy state. - The "new historical" behavior for draining during close(2) is retained: the drain timeout is "1 second without making any progress". When the 1-second timeout expires, if the count of bytes remaining in the tty layer buffer is smaller than last time, the timeout is extended for another second. Unfortunately, the same logic cannot be extended all the way down to the hardware, because the interface to that layer is a simple busy/not-busy indication. - Due to the previous point, an application that needs a guarantee that all data has been transmitted must use TIOCDRAIN/tcdrain(3) before calling close(2). - The historical behavior of honoring the drainwait setting for TIOCDRAIN (used by tcdrain(3)) is restored. - The historical kern.drainwait sysctl to control the global default drainwait time is restored, but is now named kern.tty_drainwait. - The historical default drainwait timeout of 300 seconds is restored. - Handling of TIOCGDRAINWAIT and TIOCSDRAINWAIT ioctls is restored (this also makes the comcontrol(1) drainwait verb work again). - Manpages are updated to document these behaviors. Reviewed by: bde (prior version) Modified: head/lib/libc/gen/tcsendbreak.3 head/share/man/man4/tty.4 head/sys/kern/tty.c head/sys/sys/tty.h Modified: head/lib/libc/gen/tcsendbreak.3 ============================================================================== --- head/lib/libc/gen/tcsendbreak.3 Thu Jan 12 00:34:37 2017 (r311953) +++ head/lib/libc/gen/tcsendbreak.3 Thu Jan 12 00:48:06 2017 (r311954) @@ -28,7 +28,7 @@ .\" @(#)tcsendbreak.3 8.1 (Berkeley) 6/4/93 .\" $FreeBSD$ .\" -.Dd June 4, 1993 +.Dd January 11, 2017 .Dt TCSENDBREAK 3 .Os .Sh NAME @@ -137,17 +137,44 @@ is not a terminal. A signal interrupted the .Fn tcdrain function. +.It Bq Er EWOULDBLOCK +The configured timeout expired before the +.Fn tcdrain +function could write all buffered output. .El .Sh SEE ALSO .Xr tcsetattr 3 , -.Xr termios 4 +.Xr termios 4 , +.Xr tty 4 , +.Xr comcontrol 8 .Sh STANDARDS The .Fn tcsendbreak , -.Fn tcdrain , .Fn tcflush and .Fn tcflow functions are expected to be compliant with the .St -p1003.1-88 specification. +.Pp +The +.Fn tcdrain +function is expected to be compliant with +.St -p1003.1-88 +when the drain wait value is set to zero with +.Xr comcontrol 8 , +or with +.Xr ioctl 2 +.Va TIOCSDRAINWAIT , +or with +.Xr sysctl 8 +.Va kern.tty_drainwait . +A non-zero drain wait value can result in +.Fn tcdrain +returning +.Va EWOULDBLOCK +without writing all output. +The default value for +.Va kern.tty_drainwait +is 300 seconds. + Modified: head/share/man/man4/tty.4 ============================================================================== --- head/share/man/man4/tty.4 Thu Jan 12 00:34:37 2017 (r311953) +++ head/share/man/man4/tty.4 Thu Jan 12 00:48:06 2017 (r311954) @@ -28,7 +28,7 @@ .\" @(#)tty.4 8.3 (Berkeley) 4/19/94 .\" $FreeBSD$ .\" -.Dd December 26, 2009 +.Dd January 11, 2017 .Dt TTY 4 .Os .Sh NAME @@ -238,7 +238,16 @@ Start output on the terminal (like typin Make the terminal the controlling terminal for the process (the process must not currently have a controlling terminal). .It Dv TIOCDRAIN Fa void -Wait until all output is drained. +Wait until all output is drained, or until the drain wait timeout expires. +.It Dv TIOCGDRAINWAIT Fa int *timeout +Return the current drain wait timeout in seconds. +.It Dv TIOCSDRAINWAIT Fa int *timeout +Set the drain wait timeout in seconds. +A value of zero disables timeouts. +The default drain wait timeout is controlled by the tunable +.Xr sysctl 8 +OID +.Va kern.tty_drainwait . .It Dv TIOCEXCL Fa void Set exclusive use on the terminal. No further opens are permitted except by root. Modified: head/sys/kern/tty.c ============================================================================== --- head/sys/kern/tty.c Thu Jan 12 00:34:37 2017 (r311953) +++ head/sys/kern/tty.c Thu Jan 12 00:48:06 2017 (r311954) @@ -95,6 +95,10 @@ static const char *dev_console_filename; #define TTY_CALLOUT(tp,d) (dev2unit(d) & TTYUNIT_CALLOUT) +static int tty_drainwait = 5 * 60; +SYSCTL_INT(_kern, OID_AUTO, tty_drainwait, CTLFLAG_RWTUN, + &tty_drainwait, 0, "Default output drain timeout in seconds"); + /* * Set TTY buffer sizes. */ @@ -125,34 +129,56 @@ tty_watermarks(struct tty *tp) static int tty_drain(struct tty *tp, int leaving) { - size_t bytesused; + sbintime_t timeout_at; + size_t bytes; int error; if (ttyhook_hashook(tp, getc_inject)) /* buffer is inaccessible */ return (0); - while (ttyoutq_bytesused(&tp->t_outq) > 0 || ttydevsw_busy(tp)) { - ttydevsw_outwakeup(tp); - /* Could be handled synchronously. */ - bytesused = ttyoutq_bytesused(&tp->t_outq); - if (bytesused == 0 && !ttydevsw_busy(tp)) - return (0); - - /* Wait for data to be drained. */ - if (leaving) { - error = tty_timedwait(tp, &tp->t_outwait, hz); - if (error == EWOULDBLOCK && - ttyoutq_bytesused(&tp->t_outq) < bytesused) - error = 0; - } else - error = tty_wait(tp, &tp->t_outwait); + /* + * For close(), use the recent historic timeout of "1 second without + * making progress". For tcdrain(), use t_drainwait as the timeout, + * with zero meaning "no timeout" which gives POSIX behavior. + */ + if (leaving) + timeout_at = getsbinuptime() + SBT_1S; + else if (tp->t_drainwait != 0) + timeout_at = getsbinuptime() + SBT_1S * tp->t_drainwait; + else + timeout_at = 0; - if (error) + /* + * Poll the output buffer and the hardware for completion, at 10 Hz. + * Polling is required for devices which are not able to signal an + * interrupt when the transmitter becomes idle (most USB serial devs). + * The unusual structure of this loop ensures we check for busy one more + * time after tty_timedwait() returns EWOULDBLOCK, so that success has + * higher priority than timeout if the IO completed in the last 100mS. + */ + error = 0; + bytes = ttyoutq_bytesused(&tp->t_outq); + for (;;) { + if (ttyoutq_bytesused(&tp->t_outq) == 0 && !ttydevsw_busy(tp)) + return (0); + if (error != 0) return (error); + ttydevsw_outwakeup(tp); + error = tty_timedwait(tp, &tp->t_outwait, hz / 10); + if (timeout_at == 0 && error == EWOULDBLOCK) + error = 0; + if (error != EWOULDBLOCK) + continue; + if (getsbinuptime() < timeout_at) + error = 0; + else if (leaving && ttyoutq_bytesused(&tp->t_outq) < bytes) { + /* In close, making progress, grant an extra second. */ + error = 0; + timeout_at += SBT_1S; + bytes = ttyoutq_bytesused(&tp->t_outq); + } } - - return (0); } /* @@ -1015,6 +1041,7 @@ tty_alloc_mutex(struct ttydevsw *tsw, vo tp->t_devsw = tsw; tp->t_devswsoftc = sc; tp->t_flags = tsw->tsw_flags; + tp->t_drainwait = tty_drainwait; tty_init_termios(tp); @@ -1755,6 +1782,14 @@ tty_generic_ioctl(struct tty *tp, u_long case TIOCDRAIN: /* Drain TTY output. */ return tty_drain(tp, 0); + case TIOCGDRAINWAIT: + *(int *)data = tp->t_drainwait; + return (0); + case TIOCSDRAINWAIT: + error = priv_check(td, PRIV_TTY_DRAINWAIT); + if (error == 0) + tp->t_drainwait = *(int *)data; + return (error); case TIOCCONS: /* Set terminal as console TTY. */ if (*(int *)data) { Modified: head/sys/sys/tty.h ============================================================================== --- head/sys/sys/tty.h Thu Jan 12 00:34:37 2017 (r311953) +++ head/sys/sys/tty.h Thu Jan 12 00:48:06 2017 (r311954) @@ -62,6 +62,7 @@ struct tty { struct mtx *t_mtx; /* TTY lock. */ struct mtx t_mtxobj; /* Per-TTY lock (when not borrowing). */ TAILQ_ENTRY(tty) t_list; /* (l) TTY list entry. */ + int t_drainwait; /* (t) TIOCDRAIN timeout seconds. */ unsigned int t_flags; /* (t) Terminal option flags. */ /* Keep flags in sync with db_show_tty and pstat(8). */ #define TF_NOPREFIX 0x00001 /* Don't prepend "tty" to device name. */ From owner-svn-src-head@freebsd.org Thu Jan 12 01:13:06 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id AC17CCAA30E; Thu, 12 Jan 2017 01:13:06 +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 7BAD6144B; Thu, 12 Jan 2017 01:13:06 +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 v0C1D5ks073486; Thu, 12 Jan 2017 01:13:05 GMT (envelope-from scottl@FreeBSD.org) Received: (from scottl@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v0C1D5gP073484; Thu, 12 Jan 2017 01:13:05 GMT (envelope-from scottl@FreeBSD.org) Message-Id: <201701120113.v0C1D5gP073484@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: scottl set sender to scottl@FreeBSD.org using -f From: Scott Long Date: Thu, 12 Jan 2017 01:13:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r311958 - 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-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 12 Jan 2017 01:13:06 -0000 Author: scottl Date: Thu Jan 12 01:13:05 2017 New Revision: 311958 URL: https://svnweb.freebsd.org/changeset/base/311958 Log: Print out the number of queues/MSIx vectors. Sponsored by: Netflix Modified: head/sys/dev/mpr/mpr_table.c head/sys/dev/mps/mps_table.c Modified: head/sys/dev/mpr/mpr_table.c ============================================================================== --- head/sys/dev/mpr/mpr_table.c Thu Jan 12 01:09:15 2017 (r311957) +++ head/sys/dev/mpr/mpr_table.c Thu Jan 12 01:13:05 2017 (r311958) @@ -209,6 +209,7 @@ mpr_print_iocfacts(struct mpr_softc *sc, mpr_dprint_field(sc, MPR_XINFO, "WhoInit: %s\n", mpr_describe_table(mpr_whoinit_names, facts->WhoInit)); MPR_PRINTFIELD(sc, facts, NumberOfPorts, %d); + MPR_PRINTFIELD(sc, facts, MaxMSIxVectors, %d); MPR_PRINTFIELD(sc, facts, RequestCredit, %d); MPR_PRINTFIELD(sc, facts, ProductID, 0x%x); mpr_dprint_field(sc, MPR_XINFO, "IOCCapabilities: %b\n", Modified: head/sys/dev/mps/mps_table.c ============================================================================== --- head/sys/dev/mps/mps_table.c Thu Jan 12 01:09:15 2017 (r311957) +++ head/sys/dev/mps/mps_table.c Thu Jan 12 01:13:05 2017 (r311958) @@ -208,6 +208,7 @@ mps_print_iocfacts(struct mps_softc *sc, mps_dprint_field(sc, MPS_XINFO, "WhoInit: %s\n", mps_describe_table(mps_whoinit_names, facts->WhoInit)); MPS_PRINTFIELD(sc, facts, NumberOfPorts, %d); + MPS_PRINTFIELD(sc, facts, MaxMSIxVectors, %d); MPS_PRINTFIELD(sc, facts, RequestCredit, %d); MPS_PRINTFIELD(sc, facts, ProductID, 0x%x); mps_dprint_field(sc, MPS_XINFO, "IOCCapabilities: %b\n", From owner-svn-src-head@freebsd.org Thu Jan 12 01:18:48 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id F19F2CAA3D3; Thu, 12 Jan 2017 01:18:47 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from mail.baldwin.cx (bigwig.baldwin.cx [IPv6:2001:470:1f11:75::1]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C726916A2; Thu, 12 Jan 2017 01:18:47 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from ralph.baldwin.cx (c-73-231-226-104.hsd1.ca.comcast.net [73.231.226.104]) by mail.baldwin.cx (Postfix) with ESMTPSA id 965FF10B5CF; Wed, 11 Jan 2017 20:18:46 -0500 (EST) From: John Baldwin To: "Bjoern A. Zeeb" Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r311950 - head/sys/contrib/ipfilter/netinet Date: Wed, 11 Jan 2017 17:13:48 -0800 Message-ID: <2784897.3xYUuiBYOU@ralph.baldwin.cx> User-Agent: KMail/4.14.10 (FreeBSD/11.0-STABLE; KDE/4.14.10; amd64; ; ) In-Reply-To: <201701120001.v0C012XL041489@repo.freebsd.org> References: <201701120001.v0C012XL041489@repo.freebsd.org> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.4.3 (mail.baldwin.cx); Wed, 11 Jan 2017 20:18:46 -0500 (EST) X-Virus-Scanned: clamav-milter 0.99.2 at mail.baldwin.cx X-Virus-Status: Clean X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 12 Jan 2017 01:18:48 -0000 On Thursday, January 12, 2017 12:01:02 AM Bjoern A. Zeeb wrote: > Author: bz > Date: Thu Jan 12 00:01:02 2017 > New Revision: 311950 > URL: https://svnweb.freebsd.org/changeset/base/311950 > > Log: > Get rid of a compiler warning which I saw too often. > Include netinet/in.h before ip_compat.t which will then check if > IPPROTO_IPIP is defined or not. Doing it the other way round, > ip_compat.h would not find it defined and netinet/in.h then > redefine it. Thank you! -- John Baldwin From owner-svn-src-head@freebsd.org Thu Jan 12 05:32:20 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8B3E2CAC572; Thu, 12 Jan 2017 05:32:20 +0000 (UTC) (envelope-from cse.cem@gmail.com) Received: from mail-wm0-f53.google.com (mail-wm0-f53.google.com [74.125.82.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 214A91C10; Thu, 12 Jan 2017 05:32:19 +0000 (UTC) (envelope-from cse.cem@gmail.com) Received: by mail-wm0-f53.google.com with SMTP id r126so6417153wmr.0; Wed, 11 Jan 2017 21:32:19 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:reply-to:in-reply-to:references :from:date:message-id:subject:to:cc; bh=nA+6zgtr45/CefNQ0au2JWyhyAEbQds5+M7Z0P5qMQc=; b=UW5MJlalslcgT3/0aAd03PMLtqYovWDDgWLdzh+WOCPi8YDJyGXhdMlRanedbyY6LZ +1K48/5McupnemHB8vZHuoY9Z7aSfRdpd5nGEl2wbJym0P2KBMX8UA0fV16KsYs1Iwao Jr8iN0qXCdMquJoSGRZooEO/ZWThw4dgaZT5joaJcwLHmIEq4rkRrWQ8xyz8Rg++VU38 uL+pFKUpbuY5vrgewJ5LuXzfDIjeIoHoMCVmk+2s5iXR3XlpZnH7uWfACWFlw1grACQw yaXkd5Wxqa7cB6CPuIiyynVOkBS15OLEG21ILrISsWPdw0Yh8Ep5oENOvOaN9IonGnQ9 /V4w== X-Gm-Message-State: AIkVDXKTcD8GsAs8sVANlfBeMR2zuVaLFeMyx8sY3grUYFJzh+6LLmVCQWKJmNPiT3huUA== X-Received: by 10.223.139.19 with SMTP id n19mr6337836wra.5.1484189456037; Wed, 11 Jan 2017 18:50:56 -0800 (PST) Received: from mail-wm0-f46.google.com (mail-wm0-f46.google.com. [74.125.82.46]) by smtp.gmail.com with ESMTPSA id 14sm828280wmk.1.2017.01.11.18.50.55 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 11 Jan 2017 18:50:55 -0800 (PST) Received: by mail-wm0-f46.google.com with SMTP id c206so4348991wme.0; Wed, 11 Jan 2017 18:50:55 -0800 (PST) X-Received: by 10.28.182.6 with SMTP id g6mr6183033wmf.11.1484189455701; Wed, 11 Jan 2017 18:50:55 -0800 (PST) MIME-Version: 1.0 Reply-To: cem@freebsd.org Received: by 10.194.29.72 with HTTP; Wed, 11 Jan 2017 18:50:55 -0800 (PST) In-Reply-To: References: <201611242254.uAOMswkb081748@repo.freebsd.org> From: Conrad Meyer Date: Wed, 11 Jan 2017 18:50:55 -0800 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: svn commit: r309124 - in head: . contrib/compiler-rt contrib/compiler-rt/include/sanitizer contrib/compiler-rt/lib/asan contrib/compiler-rt/lib/builtins contrib/compiler-rt/lib/builtins/arm contrib... To: svn-src-head@freebsd.org Cc: Dimitry Andric , svn-src-all@freebsd.org, src-committers Content-Type: text/plain; charset=UTF-8 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 12 Jan 2017 05:32:20 -0000 More context and fix here: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=214654 Best, Conrad On Wed, Jan 11, 2017 at 6:35 PM, Conrad Meyer wrote: > This appears to have broken Chromium[0]: > > FAILED: obj/services/ui/ws/lib/window_manager_display_root.o > clang++39 -MMD -MF > obj/services/ui/ws/lib/window_manager_display_root.o.d > -D_LIBCPP_TRIVIAL_PAIR_COPY_CTOR=1 -DV8_DEPRECATION_WARNINGS > -DENABLE_MDNS=1 -DENABLE_NOTIFICATIONS -DENABLE_PEPPER_CDMS > -DENABLE_PLUGINS=1 -DENABLE_PDF=1 -DENABLE_PRINTING=1 > -DENABLE_BASIC_PRINTING=1 -DENABLE_PRINT_PREVIEW=1 > -DENABLE_SPELLCHECK=1 -DUI_COMPOSITOR_IMAGE_TRANSPORT -DUSE_AURA=1 > -DUSE_PANGO=1 -DUSE_CAIRO=1 -DUSE_CLIPBOARD_AURAX11=1 > -DUSE_DEFAULT_RENDER_THEME=1 -DUSE_GLIB=1 -DUSE_NSS_CERTS=1 > -DUSE_X11=1 -DNO_TCMALLOC -DENABLE_WEBRTC=1 -DDISABLE_NACL > -DENABLE_EXTENSIONS=1 -DENABLE_TASK_MANAGER=1 -DENABLE_THEMES=1 > -DENABLE_CAPTIVE_PORTAL_DETECTION=1 -DENABLE_SESSION_SERVICE=1 > -DENABLE_SUPERVISED_USERS=1 -DENABLE_SERVICE_DISCOVERY=1 > -DUSE_PROPRIETARY_CODECS -DFULL_SAFE_BROWSING -DSAFE_BROWSING_CSD > -DSAFE_BROWSING_DB_LOCAL -DCHROMIUM_BUILD -DENABLE_MEDIA_ROUTER=1 > -DFIELDTRIAL_TESTING_ENABLED -DCR_CLANG_REVISION=278861-1 > -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE > -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D_FORTIFY_SOURCE=2 > -DNDEBUG -DNVALGRIND -DDYNAMIC_ANNOTATIONS_ENABLED=0 > -DGL_GLEXT_PROTOTYPES -DUSE_GLX -DUSE_EGL -DSK_IGNORE_DW_GRAY_FIX > -DSK_IGNORE_LINEONLY_AA_CONVEX_PATH_OPTS -DSK_SUPPORT_GPU=1 > -DU_USING_ICU_NAMESPACE=0 -DU_ENABLE_DYLOAD=0 -DU_NOEXCEPT= > -DU_STATIC_IMPLEMENTATION -DICU_UTIL_DATA_IMPL=ICU_UTIL_DATA_FILE > -I../.. -Igen -I/usr/local/include/glib-2.0 > -I/usr/local/lib/glib-2.0/include -I/usr/local/include > -Igen/shim_headers/harfbuzz_shim -I../../third_party/khronos > -I../../gpu -I../../skia/config -I../../skia/ext > -I../../third_party/skia/include/c > -I../../third_party/skia/include/config > -I../../third_party/skia/include/core > -I../../third_party/skia/include/effects > -I../../third_party/skia/include/images > -I../../third_party/skia/include/lazy > -I../../third_party/skia/include/pathops > -I../../third_party/skia/include/pdf > -I../../third_party/skia/include/pipe > -I../../third_party/skia/include/ports > -I../../third_party/skia/include/utils > -I../../third_party/skia/include/gpu -I../../third_party/skia/src/gpu > -I../../third_party/icu/source/common > -I../../third_party/icu/source/i18n > -I../../third_party/mesa/src/include -fno-strict-aliasing > --param=ssp-buffer-size=4 -fstack-protector -funwind-tables -fPIC > -pipe -fcolor-diagnostics > -fdebug-prefix-map=/wrkdirs/usr/ports/www/chromium/work/chromium-54.0.2840.100=. > -pthread -m64 -march=x86-64 -Wall -Wextra > -Wno-missing-field-initializers -Wno-unused-parameter > -Wno-c++11-narrowing -Wno-covered-switch-default > -Wno-deprecated-register -Wno-unneeded-internal-declaration > -Wno-inconsistent-missing-override -Wno-shift-negative-value > -Wno-undefined-var-template -Wno-nonportable-include-path -O2 > -fno-ident -fdata-sections -ffunction-sections -g0 -fvisibility=hidden > -Wheader-hygiene -Wstring-conversion -fno-threadsafe-statics > -fvisibility-inlines-hidden -std=gnu++11 -fno-rtti -fno-exceptions -c > ../../services/ui/ws/window_manager_display_root.cc -o > obj/services/ui/ws/lib/window_manager_display_root.o > In file included from ../../services/ui/ws/window_manager_display_root.cc:5: > In file included from ../../services/ui/ws/window_manager_display_root.h:10: > In file included from /usr/include/c++/v1/memory:599: > /usr/include/c++/v1/__config:58:2: error: > "_LIBCPP_TRIVIAL_PAIR_COPY_CTOR" is no longer supported. use > _LIBCPP_DEPRECATED_ABI_DISABLE_PAIR_TRIVIAL_COPY_CTOR instead > #error "_LIBCPP_TRIVIAL_PAIR_COPY_CTOR" is no longer supported. \ > ^ > 1 error generated. > > > contrib/libc++/include/__config: > 309124 dim #ifdef _LIBCPP_TRIVIAL_PAIR_COPY_CTOR > 309124 dim #error "_LIBCPP_TRIVIAL_PAIR_COPY_CTOR" is no longer > supported. \ > 309124 dim use > _LIBCPP_DEPRECATED_ABI_DISABLE_PAIR_TRIVIAL_COPY_CTOR instead > 309124 dim #endif > > Best, > Conrad > > > [0]: http://beefy12.nyi.freebsd.org/data/head-amd64-default/p431044_s311844/logs/errors/chromium-54.0.2840.100_1.log > (warning: BIG) > > On Thu, Nov 24, 2016 at 2:54 PM, Dimitry Andric wrote: >> Author: dim >> Date: Thu Nov 24 22:54:55 2016 >> New Revision: 309124 >> URL: https://svnweb.freebsd.org/changeset/base/309124 >> >> Log: >> Upgrade our copies of clang, llvm, lldb, compiler-rt and libc++ to 3.9.0 >> release, and add lld 3.9.0. Also completely revamp the build system for >> clang, llvm, lldb and their related tools. >> >> Please note that from 3.5.0 onwards, clang, llvm and lldb require C++11 >> support to build; see UPDATING for more information. >> >> Release notes for llvm, clang and lld are available here: >> >> >> >> >> Thanks to Ed Maste, Bryan Drewery, Andrew Turner, Antoine Brodin and Jan >> Beich for their help. From owner-svn-src-head@freebsd.org Thu Jan 12 06:29:15 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id BBB64CACF63; Thu, 12 Jan 2017 06:29:15 +0000 (UTC) (envelope-from arybchik@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 88DDA149E; Thu, 12 Jan 2017 06:29:15 +0000 (UTC) (envelope-from arybchik@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v0C6TEoH098750; Thu, 12 Jan 2017 06:29:14 GMT (envelope-from arybchik@FreeBSD.org) Received: (from arybchik@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v0C6TEMw098748; Thu, 12 Jan 2017 06:29:14 GMT (envelope-from arybchik@FreeBSD.org) Message-Id: <201701120629.v0C6TEMw098748@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: arybchik set sender to arybchik@FreeBSD.org using -f From: Andrew Rybchenko Date: Thu, 12 Jan 2017 06:29:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r311961 - head/sys/dev/sfxge/common X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 12 Jan 2017 06:29:15 -0000 Author: arybchik Date: Thu Jan 12 06:29:14 2017 New Revision: 311961 URL: https://svnweb.freebsd.org/changeset/base/311961 Log: sfxge(4): do not ignore requested MAC stats update period Firmware version which takes PERIOD_MS parameter into account is required. Reviewed by: philip Sponsored by: Solarflare Communications, Inc. MFC after: 2 days Differential Revision: https://reviews.freebsd.org/D9129 Modified: head/sys/dev/sfxge/common/efx_mcdi.c head/sys/dev/sfxge/common/efx_mcdi.h Modified: head/sys/dev/sfxge/common/efx_mcdi.c ============================================================================== --- head/sys/dev/sfxge/common/efx_mcdi.c Thu Jan 12 03:34:29 2017 (r311960) +++ head/sys/dev/sfxge/common/efx_mcdi.c Thu Jan 12 06:29:14 2017 (r311961) @@ -1725,7 +1725,8 @@ static __checkReturn efx_rc_t efx_mcdi_mac_stats( __in efx_nic_t *enp, __in_opt efsys_mem_t *esmp, - __in efx_stats_action_t action) + __in efx_stats_action_t action, + __in uint16_t period_ms) { efx_mcdi_req_t req; uint8_t payload[MAX(MC_CMD_MAC_STATS_IN_LEN, @@ -1750,7 +1751,7 @@ efx_mcdi_mac_stats( MAC_STATS_IN_PERIODIC_CHANGE, enable | events | disable, MAC_STATS_IN_PERIODIC_ENABLE, enable | events, MAC_STATS_IN_PERIODIC_NOEVENT, !events, - MAC_STATS_IN_PERIOD_MS, (enable | events) ? 1000 : 0); + MAC_STATS_IN_PERIOD_MS, (enable | events) ? period_ms : 0); if (esmp != NULL) { int bytes = MC_CMD_MAC_NSTATS * sizeof (uint64_t); @@ -1800,7 +1801,7 @@ efx_mcdi_mac_stats_clear( { efx_rc_t rc; - if ((rc = efx_mcdi_mac_stats(enp, NULL, EFX_STATS_CLEAR)) != 0) + if ((rc = efx_mcdi_mac_stats(enp, NULL, EFX_STATS_CLEAR, 0)) != 0) goto fail1; return (0); @@ -1823,7 +1824,7 @@ efx_mcdi_mac_stats_upload( * avoid having to pull the statistics buffer into the cache to * maintain cumulative statistics. */ - if ((rc = efx_mcdi_mac_stats(enp, esmp, EFX_STATS_UPLOAD)) != 0) + if ((rc = efx_mcdi_mac_stats(enp, esmp, EFX_STATS_UPLOAD, 0)) != 0) goto fail1; return (0); @@ -1838,7 +1839,7 @@ fail1: efx_mcdi_mac_stats_periodic( __in efx_nic_t *enp, __in efsys_mem_t *esmp, - __in uint16_t period, + __in uint16_t period_ms, __in boolean_t events) { efx_rc_t rc; @@ -1847,14 +1848,17 @@ efx_mcdi_mac_stats_periodic( * The MC DMAs aggregate statistics for our convenience, so we can * avoid having to pull the statistics buffer into the cache to * maintain cumulative statistics. - * Huntington uses a fixed 1sec period, so use that on Siena too. + * Huntington uses a fixed 1sec period. + * Medford uses a fixed 1sec period before v6.2.1.1033 firmware. */ - if (period == 0) - rc = efx_mcdi_mac_stats(enp, NULL, EFX_STATS_DISABLE); + if (period_ms == 0) + rc = efx_mcdi_mac_stats(enp, NULL, EFX_STATS_DISABLE, 0); else if (events) - rc = efx_mcdi_mac_stats(enp, esmp, EFX_STATS_ENABLE_EVENTS); + rc = efx_mcdi_mac_stats(enp, esmp, EFX_STATS_ENABLE_EVENTS, + period_ms); else - rc = efx_mcdi_mac_stats(enp, esmp, EFX_STATS_ENABLE_NOEVENTS); + rc = efx_mcdi_mac_stats(enp, esmp, EFX_STATS_ENABLE_NOEVENTS, + period_ms); if (rc != 0) goto fail1; Modified: head/sys/dev/sfxge/common/efx_mcdi.h ============================================================================== --- head/sys/dev/sfxge/common/efx_mcdi.h Thu Jan 12 03:34:29 2017 (r311960) +++ head/sys/dev/sfxge/common/efx_mcdi.h Thu Jan 12 06:29:14 2017 (r311961) @@ -218,7 +218,7 @@ extern __checkReturn efx_rc_t efx_mcdi_mac_stats_periodic( __in efx_nic_t *enp, __in efsys_mem_t *esmp, - __in uint16_t period, + __in uint16_t period_ms, __in boolean_t events); From owner-svn-src-head@freebsd.org Thu Jan 12 06:30:46 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4753ECAC079; Thu, 12 Jan 2017 06:30:46 +0000 (UTC) (envelope-from arybchik@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id F11E016DC; Thu, 12 Jan 2017 06:30:45 +0000 (UTC) (envelope-from arybchik@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v0C6UjOX098877; Thu, 12 Jan 2017 06:30:45 GMT (envelope-from arybchik@FreeBSD.org) Received: (from arybchik@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v0C6UjrO098875; Thu, 12 Jan 2017 06:30:45 GMT (envelope-from arybchik@FreeBSD.org) Message-Id: <201701120630.v0C6UjrO098875@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: arybchik set sender to arybchik@FreeBSD.org using -f From: Andrew Rybchenko Date: Thu, 12 Jan 2017 06:30:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r311962 - head/sys/dev/sfxge X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 12 Jan 2017 06:30:46 -0000 Author: arybchik Date: Thu Jan 12 06:30:44 2017 New Revision: 311962 URL: https://svnweb.freebsd.org/changeset/base/311962 Log: sfxge(4): stats refresh in SW should depend on HW update period The period should be taken into account by the function which refreshes driver stats. Reviewed by: philip Sponsored by: Solarflare Communications, Inc. MFC after: 2 days Differential Revision: https://reviews.freebsd.org/D9130 Modified: head/sys/dev/sfxge/sfxge.h head/sys/dev/sfxge/sfxge_port.c Modified: head/sys/dev/sfxge/sfxge.h ============================================================================== --- head/sys/dev/sfxge/sfxge.h Thu Jan 12 06:29:14 2017 (r311961) +++ head/sys/dev/sfxge/sfxge.h Thu Jan 12 06:30:44 2017 (r311962) @@ -159,6 +159,8 @@ enum sfxge_evq_state { #define SFXGE_EV_BATCH 16384 +#define SFXGE_STATS_UPDATE_PERIOD_MS 1000 + struct sfxge_evq { /* Structure members below are sorted by usage order */ struct sfxge_softc *sc; Modified: head/sys/dev/sfxge/sfxge_port.c ============================================================================== --- head/sys/dev/sfxge/sfxge_port.c Thu Jan 12 06:29:14 2017 (r311961) +++ head/sys/dev/sfxge/sfxge_port.c Thu Jan 12 06:30:44 2017 (r311962) @@ -51,6 +51,7 @@ sfxge_mac_stat_update(struct sfxge_softc struct sfxge_port *port = &sc->port; efsys_mem_t *esmp = &(port->mac_stats.dma_buf); clock_t now; + unsigned int min_ticks; unsigned int count; int rc; @@ -61,8 +62,10 @@ sfxge_mac_stat_update(struct sfxge_softc goto out; } + min_ticks = (unsigned int)hz * SFXGE_STATS_UPDATE_PERIOD_MS / 1000; + now = ticks; - if ((unsigned int)(now - port->mac_stats.update_time) < (unsigned int)hz) { + if ((unsigned int)(now - port->mac_stats.update_time) < min_ticks) { rc = 0; goto out; } @@ -510,9 +513,10 @@ sfxge_port_start(struct sfxge_softc *sc) sfxge_mac_filter_set_locked(sc); - /* Update MAC stats by DMA every second */ + /* Update MAC stats by DMA every period */ if ((rc = efx_mac_stats_periodic(enp, &port->mac_stats.dma_buf, - 1000, B_FALSE)) != 0) + SFXGE_STATS_UPDATE_PERIOD_MS, + B_FALSE)) != 0) goto fail6; if ((rc = efx_mac_drain(enp, B_FALSE)) != 0) From owner-svn-src-head@freebsd.org Thu Jan 12 06:38:04 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 44600CAC295; Thu, 12 Jan 2017 06:38:04 +0000 (UTC) (envelope-from rpokala@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 13CC11BCB; Thu, 12 Jan 2017 06:38:04 +0000 (UTC) (envelope-from rpokala@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v0C6c3FA002957; Thu, 12 Jan 2017 06:38:03 GMT (envelope-from rpokala@FreeBSD.org) Received: (from rpokala@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v0C6c3qW002956; Thu, 12 Jan 2017 06:38:03 GMT (envelope-from rpokala@FreeBSD.org) Message-Id: <201701120638.v0C6c3qW002956@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: rpokala set sender to rpokala@FreeBSD.org using -f From: Ravi Pokala Date: Thu, 12 Jan 2017 06:38:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r311963 - head/sys/kern X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 12 Jan 2017 06:38:04 -0000 Author: rpokala Date: Thu Jan 12 06:38:03 2017 New Revision: 311963 URL: https://svnweb.freebsd.org/changeset/base/311963 Log: Remove writability requirement for single-mbuf, contiguous-range m_pulldown() m_pulldown() only needs to determine if a mbuf is writable if it is going to copy data into the data region of an existing mbuf. It does this to create a contiguous data region in a single mbuf from multiple mbufs in the chain. If the requested memory region is already contiguous and nothing needs to change, the mbuf does not need to be writeable. Submitted by: Brian Mueller Reviewed by: bz MFC after: 1 week Sponsored by: Panasas Differential Revision: https://reviews.freebsd.org/D9053 Modified: head/sys/kern/uipc_mbuf2.c Modified: head/sys/kern/uipc_mbuf2.c ============================================================================== --- head/sys/kern/uipc_mbuf2.c Thu Jan 12 06:30:44 2017 (r311962) +++ head/sys/kern/uipc_mbuf2.c Thu Jan 12 06:38:03 2017 (r311963) @@ -159,7 +159,7 @@ m_pulldown(struct mbuf *m, int off, int * the target data is on . * if we got enough data on the mbuf "n", we're done. */ - if ((off == 0 || offp) && len <= n->m_len - off && writable) + if ((off == 0 || offp) && len <= n->m_len - off) goto ok; /* From owner-svn-src-head@freebsd.org Thu Jan 12 06:58:33 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 33E02CAC69B; Thu, 12 Jan 2017 06:58:33 +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 D06441658; Thu, 12 Jan 2017 06:58:32 +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 v0C6wWig010967; Thu, 12 Jan 2017 06:58:32 GMT (envelope-from cem@FreeBSD.org) Received: (from cem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v0C6wVrU010965; Thu, 12 Jan 2017 06:58:31 GMT (envelope-from cem@FreeBSD.org) Message-Id: <201701120658.v0C6wVrU010965@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cem set sender to cem@FreeBSD.org using -f From: "Conrad E. Meyer" Date: Thu, 12 Jan 2017 06:58:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r311964 - head/sys/geom/raid X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 12 Jan 2017 06:58:33 -0000 Author: cem Date: Thu Jan 12 06:58:31 2017 New Revision: 311964 URL: https://svnweb.freebsd.org/changeset/base/311964 Log: g_raid: Prevent tasters from attempting excessively large reads Some g_raid tasters attempt metadata reads in multiples of the provider sectorsize. Reads larger than MAXPHYS are invalid, so detect and abort in such situations. Spiritually similar to r217305 / PR 147851. PR: 214721 Sponsored by: Dell EMC Isilon Modified: head/sys/geom/raid/md_ddf.c head/sys/geom/raid/md_promise.c Modified: head/sys/geom/raid/md_ddf.c ============================================================================== --- head/sys/geom/raid/md_ddf.c Thu Jan 12 06:38:03 2017 (r311963) +++ head/sys/geom/raid/md_ddf.c Thu Jan 12 06:58:31 2017 (r311964) @@ -1161,6 +1161,16 @@ hdrerror: (GET16(meta, hdr->Configuration_Record_Length) * ss - 512) / 12)); } + if (GET32(meta, hdr->cd_length) * ss >= MAXPHYS || + GET32(meta, hdr->pdr_length) * ss >= MAXPHYS || + GET32(meta, hdr->vdr_length) * ss >= MAXPHYS || + GET32(meta, hdr->cr_length) * ss >= MAXPHYS || + GET32(meta, hdr->pdd_length) * ss >= MAXPHYS || + GET32(meta, hdr->bbmlog_length) * ss >= MAXPHYS) { + G_RAID_DEBUG(1, "%s: Blocksize is too big.", pp->name); + goto hdrerror; + } + /* Read controller data. */ buf = g_read_data(cp, (lba + GET32(meta, hdr->cd_section)) * ss, GET32(meta, hdr->cd_length) * ss, &error); Modified: head/sys/geom/raid/md_promise.c ============================================================================== --- head/sys/geom/raid/md_promise.c Thu Jan 12 06:38:03 2017 (r311963) +++ head/sys/geom/raid/md_promise.c Thu Jan 12 06:58:31 2017 (r311964) @@ -341,6 +341,11 @@ promise_meta_read(struct g_consumer *cp, pp = cp->provider; subdisks = 0; + + if (pp->sectorsize * 4 > MAXPHYS) { + G_RAID_DEBUG(1, "%s: Blocksize is too big.", pp->name); + return (subdisks); + } next: /* Read metadata block. */ buf = g_read_data(cp, pp->mediasize - pp->sectorsize * From owner-svn-src-head@freebsd.org Thu Jan 12 08:31:43 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 985BFCAA706; Thu, 12 Jan 2017 08:31: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 67D2517B1; Thu, 12 Jan 2017 08:31: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 v0C8Vgs0053351; Thu, 12 Jan 2017 08:31:42 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v0C8VgJJ053350; Thu, 12 Jan 2017 08:31:42 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201701120831.v0C8VgJJ053350@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Thu, 12 Jan 2017 08:31:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r311968 - head/contrib/netbsd-tests/lib/libc/sys X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 12 Jan 2017 08:31:43 -0000 Author: ngie Date: Thu Jan 12 08:31:42 2017 New Revision: 311968 URL: https://svnweb.freebsd.org/changeset/base/311968 Log: Fix lib/libc/sys/access_test after r311925 sys/param.h needs to be #included in order for __FreeBSD_version to be checked MFC after: 13 days Modified: head/contrib/netbsd-tests/lib/libc/sys/t_access.c Modified: head/contrib/netbsd-tests/lib/libc/sys/t_access.c ============================================================================== --- head/contrib/netbsd-tests/lib/libc/sys/t_access.c Thu Jan 12 08:12:11 2017 (r311967) +++ head/contrib/netbsd-tests/lib/libc/sys/t_access.c Thu Jan 12 08:31:42 2017 (r311968) @@ -1,4 +1,4 @@ -/* $NetBSD: t_access.c,v 1.2 2017/01/10 22:36:29 christos Exp $ */ +/* $NetBSD: t_access.c,v 2.2 2017/01/10 22:36:29 christos Exp $ */ /*- * Copyright (c) 2011 The NetBSD Foundation, Inc. @@ -31,6 +31,10 @@ #include __RCSID("$NetBSD: t_access.c,v 1.2 2017/01/10 22:36:29 christos Exp $"); +#ifdef __FreeBSD__ +#include /* For __FreeBSD_version */ +#endif + #include #include From owner-svn-src-head@freebsd.org Thu Jan 12 08:40:54 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0A58BCAA986; Thu, 12 Jan 2017 08:40:54 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id CDD841C59; Thu, 12 Jan 2017 08:40:53 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v0C8erR4053869; Thu, 12 Jan 2017 08:40:53 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v0C8eqOV053867; Thu, 12 Jan 2017 08:40:52 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201701120840.v0C8eqOV053867@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Thu, 12 Jan 2017 08:40:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r311969 - in head: contrib/netbsd-tests/lib/libc/stdlib lib/libc/tests/stdlib X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 12 Jan 2017 08:40:54 -0000 Author: ngie Date: Thu Jan 12 08:40:52 2017 New Revision: 311969 URL: https://svnweb.freebsd.org/changeset/base/311969 Log: Remove __HAVE_LONG_DOUBLE #define from t_strtod.c and place it in Makefile This is to enable support in other testcases Inspired by lib/msun/tests/Makefile . MFC after: 1 week Modified: head/contrib/netbsd-tests/lib/libc/stdlib/t_strtod.c head/lib/libc/tests/stdlib/Makefile Modified: head/contrib/netbsd-tests/lib/libc/stdlib/t_strtod.c ============================================================================== --- head/contrib/netbsd-tests/lib/libc/stdlib/t_strtod.c Thu Jan 12 08:31:42 2017 (r311968) +++ head/contrib/netbsd-tests/lib/libc/stdlib/t_strtod.c Thu Jan 12 08:40:52 2017 (r311969) @@ -51,10 +51,6 @@ static const char * const inf_strings[] const char *nan_string = "NaN(x)y"; #endif -#ifdef __FreeBSD__ -#define __HAVE_LONG_DOUBLE -#endif - ATF_TC(strtod_basic); ATF_TC_HEAD(strtod_basic, tc) { Modified: head/lib/libc/tests/stdlib/Makefile ============================================================================== --- head/lib/libc/tests/stdlib/Makefile Thu Jan 12 08:31:42 2017 (r311968) +++ head/lib/libc/tests/stdlib/Makefile Thu Jan 12 08:40:52 2017 (r311969) @@ -11,6 +11,14 @@ ATF_TESTS_CXX+= cxa_thread_atexit_test ATF_TESTS_CXX+= cxa_thread_atexit_nothr_test .endif +# Not sure why this isn't defined for all architectures, since most +# have long double. +.if ${MACHINE_CPUARCH} == "aarch64" || \ + ${MACHINE_CPUARCH} == "amd64" || \ + ${MACHINE_CPUARCH} == "i386" +CFLAGS+= -D__HAVE_LONG_DOUBLE +.endif + # TODO: t_getenv_thread, t_mi_vector_hash, t_strtoi NETBSD_ATF_TESTS_C+= abs_test NETBSD_ATF_TESTS_C+= atoi_test From owner-svn-src-head@freebsd.org Thu Jan 12 08:53:11 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D5D30CAC0CD; Thu, 12 Jan 2017 08:53:11 +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 9689A17C2; Thu, 12 Jan 2017 08:53:11 +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 v0C8rAIm061816; Thu, 12 Jan 2017 08:53:10 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v0C8rAF3061809; Thu, 12 Jan 2017 08:53:10 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201701120853.v0C8rAF3061809@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Thu, 12 Jan 2017 08:53:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r311971 - in head/sys: cam/nvme dev/mmc dev/nand dev/nvd geom X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 12 Jan 2017 08:53:11 -0000 Author: mav Date: Thu Jan 12 08:53:10 2017 New Revision: 311971 URL: https://svnweb.freebsd.org/changeset/base/311971 Log: Report random flash storage as non-rotating to GEOM_DISK. While doing it, introduce respective constants in geom_disk.h. MFC after: 1 week Modified: head/sys/cam/nvme/nvme_da.c head/sys/dev/mmc/mmcsd.c head/sys/dev/nand/nand_geom.c head/sys/dev/nvd/nvd.c head/sys/geom/geom_disk.c head/sys/geom/geom_disk.h Modified: head/sys/cam/nvme/nvme_da.c ============================================================================== --- head/sys/cam/nvme/nvme_da.c Thu Jan 12 08:46:19 2017 (r311970) +++ head/sys/cam/nvme/nvme_da.c Thu Jan 12 08:53:10 2017 (r311971) @@ -761,7 +761,7 @@ ndaregister(struct cam_periph *periph, v MIN(sizeof(softc->disk->d_descr), sizeof(cd->mn))); strlcpy(softc->disk->d_ident, cd->sn, MIN(sizeof(softc->disk->d_ident), sizeof(cd->sn))); - disk->d_rotation_rate = 0; /* Spinning rust need not apply */ + disk->d_rotation_rate = DISK_RR_NON_ROTATING; disk->d_open = ndaopen; disk->d_close = ndaclose; disk->d_strategy = ndastrategy; Modified: head/sys/dev/mmc/mmcsd.c ============================================================================== --- head/sys/dev/mmc/mmcsd.c Thu Jan 12 08:46:19 2017 (r311970) +++ head/sys/dev/mmc/mmcsd.c Thu Jan 12 08:53:10 2017 (r311971) @@ -170,6 +170,7 @@ mmcsd_attach(device_t dev) d->d_delmaxsize = mmc_get_erase_sector(dev) * d->d_sectorsize; strlcpy(d->d_ident, mmc_get_card_sn_string(dev), sizeof(d->d_ident)); strlcpy(d->d_descr, mmc_get_card_id_string(dev), sizeof(d->d_descr)); + d->d_rotation_rate = DISK_RR_NON_ROTATING; /* * Display in most natural units. There's no cards < 1MB. The SD Modified: head/sys/dev/nand/nand_geom.c ============================================================================== --- head/sys/dev/nand/nand_geom.c Thu Jan 12 08:46:19 2017 (r311970) +++ head/sys/dev/nand/nand_geom.c Thu Jan 12 08:53:10 2017 (r311971) @@ -394,6 +394,7 @@ create_geom_disk(struct nand_chip *chip) snprintf(ndisk->d_ident, sizeof(ndisk->d_ident), "nand: Man:0x%02x Dev:0x%02x", chip->id.man_id, chip->id.dev_id); + ndisk->d_rotation_rate = DISK_RR_NON_ROTATING; disk_create(ndisk, DISK_VERSION); @@ -415,6 +416,7 @@ create_geom_disk(struct nand_chip *chip) snprintf(rdisk->d_ident, sizeof(rdisk->d_ident), "nand_raw: Man:0x%02x Dev:0x%02x", chip->id.man_id, chip->id.dev_id); + disk->d_rotation_rate = DISK_RR_NON_ROTATING; disk_create(rdisk, DISK_VERSION); Modified: head/sys/dev/nvd/nvd.c ============================================================================== --- head/sys/dev/nvd/nvd.c Thu Jan 12 08:46:19 2017 (r311970) +++ head/sys/dev/nvd/nvd.c Thu Jan 12 08:53:10 2017 (r311971) @@ -352,13 +352,11 @@ nvd_new_disk(struct nvme_namespace *ns, */ nvme_strvis(disk->d_ident, nvme_ns_get_serial_number(ns), sizeof(disk->d_ident), NVME_SERIAL_NUMBER_LENGTH); - nvme_strvis(descr, nvme_ns_get_model_number(ns), sizeof(descr), NVME_MODEL_NUMBER_LENGTH); - -#if __FreeBSD_version >= 900034 strlcpy(disk->d_descr, descr, sizeof(descr)); -#endif + + disk->d_rotation_rate = DISK_RR_NON_ROTATING; ndisk->ns = ns; ndisk->disk = disk; Modified: head/sys/geom/geom_disk.c ============================================================================== --- head/sys/geom/geom_disk.c Thu Jan 12 08:46:19 2017 (r311970) +++ head/sys/geom/geom_disk.c Thu Jan 12 08:53:10 2017 (r311971) @@ -588,12 +588,12 @@ g_disk_dumpconf(struct sbuf *sb, const c * special cases, and there's also a valid range. */ sbuf_printf(sb, "%s", indent); - if (dp->d_rotation_rate == 0) /* Old drives don't */ - sbuf_printf(sb, "unknown"); /* report RPM. */ - else if (dp->d_rotation_rate == 1) /* Since 0 is used */ - sbuf_printf(sb, "0"); /* above, SSDs use 1. */ - else if ((dp->d_rotation_rate >= 0x041) && - (dp->d_rotation_rate <= 0xfffe)) + if (dp->d_rotation_rate == DISK_RR_UNKNOWN) /* Old drives */ + sbuf_printf(sb, "unknown"); /* don't report RPM. */ + else if (dp->d_rotation_rate == DISK_RR_NON_ROTATING) + sbuf_printf(sb, "0"); + else if ((dp->d_rotation_rate >= DISK_RR_MIN) && + (dp->d_rotation_rate <= DISK_RR_MAX)) sbuf_printf(sb, "%u", dp->d_rotation_rate); else sbuf_printf(sb, "invalid"); Modified: head/sys/geom/geom_disk.h ============================================================================== --- head/sys/geom/geom_disk.h Thu Jan 12 08:46:19 2017 (r311970) +++ head/sys/geom/geom_disk.h Thu Jan 12 08:53:10 2017 (r311971) @@ -119,6 +119,11 @@ struct disk { #define DISKFLAG_DIRECT_COMPLETION 0x20 #define DISKFLAG_CANZONE 0x80 +#define DISK_RR_UNKNOWN 0 +#define DISK_RR_NON_ROTATING 1 +#define DISK_RR_MIN 0x0401 +#define DISK_RR_MAX 0xfffe + struct disk *disk_alloc(void); void disk_create(struct disk *disk, int version); void disk_destroy(struct disk *disk); From owner-svn-src-head@freebsd.org Thu Jan 12 09:01:15 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8C0CBCAC467; Thu, 12 Jan 2017 09:01:15 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5BABA1AB3; Thu, 12 Jan 2017 09:01:15 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v0C91Ehn065112; Thu, 12 Jan 2017 09:01:14 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v0C91ExE065111; Thu, 12 Jan 2017 09:01:14 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201701120901.v0C91ExE065111@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Thu, 12 Jan 2017 09:01:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r311972 - head/lib/libnetbsd/sys X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 12 Jan 2017 09:01:15 -0000 Author: ngie Date: Thu Jan 12 09:01:14 2017 New Revision: 311972 URL: https://svnweb.freebsd.org/changeset/base/311972 Log: Add __BIT and __BITS macros from NetBSD to help support new testcases MFC after: 1 week Modified: head/lib/libnetbsd/sys/cdefs.h Modified: head/lib/libnetbsd/sys/cdefs.h ============================================================================== --- head/lib/libnetbsd/sys/cdefs.h Thu Jan 12 08:53:10 2017 (r311971) +++ head/lib/libnetbsd/sys/cdefs.h Thu Jan 12 09:01:14 2017 (r311972) @@ -71,4 +71,13 @@ */ #define __arraycount(__x) (sizeof(__x) / sizeof(__x[0])) +/* __BIT(n): nth bit, where __BIT(0) == 0x1. */ +#define __BIT(__n) \ + (((uintmax_t)(__n) >= NBBY * sizeof(uintmax_t)) ? 0 : \ + ((uintmax_t)1 << (uintmax_t)((__n) & (NBBY * sizeof(uintmax_t) - 1)))) + +/* __BITS(m, n): bits m through n, m < n. */ +#define __BITS(__m, __n) \ + ((__BIT(MAX((__m), (__n)) + 1) - 1) ^ (__BIT(MIN((__m), (__n))) - 1)) + #endif /* _LIBNETBSD_SYS_CDEFS_H_ */ From owner-svn-src-head@freebsd.org Thu Jan 12 10:14:55 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B41D9CABC53; Thu, 12 Jan 2017 10:14:55 +0000 (UTC) (envelope-from sobomax@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 83B891488; Thu, 12 Jan 2017 10:14:55 +0000 (UTC) (envelope-from sobomax@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v0CAEsZT094864; Thu, 12 Jan 2017 10:14:54 GMT (envelope-from sobomax@FreeBSD.org) Received: (from sobomax@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v0CAEs6j094863; Thu, 12 Jan 2017 10:14:54 GMT (envelope-from sobomax@FreeBSD.org) Message-Id: <201701121014.v0CAEs6j094863@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: sobomax set sender to sobomax@FreeBSD.org using -f From: Maxim Sobolev Date: Thu, 12 Jan 2017 10:14:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r311974 - 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-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 12 Jan 2017 10:14:55 -0000 Author: sobomax Date: Thu Jan 12 10:14:54 2017 New Revision: 311974 URL: https://svnweb.freebsd.org/changeset/base/311974 Log: Fix slight type mismatch between so_options defined in sys/socketvar.h and tw_so_options defined here which is supposed to be a copy of the former (short vs u_short respectively). Switch tw_so_options to be "signed short" to match the type of the field it's inherited from. Modified: head/sys/netinet/tcp_var.h Modified: head/sys/netinet/tcp_var.h ============================================================================== --- head/sys/netinet/tcp_var.h Thu Jan 12 09:38:14 2017 (r311973) +++ head/sys/netinet/tcp_var.h Thu Jan 12 10:14:54 2017 (r311974) @@ -452,7 +452,7 @@ struct tcptw { tcp_seq iss; tcp_seq irs; u_short last_win; /* cached window value */ - u_short tw_so_options; /* copy of so_options */ + short tw_so_options; /* copy of so_options */ struct ucred *tw_cred; /* user credentials */ u_int32_t t_recent; u_int32_t ts_offset; /* our timestamp offset */ From owner-svn-src-head@freebsd.org Thu Jan 12 11:25:01 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id BDB81CABF70; Thu, 12 Jan 2017 11:25:01 +0000 (UTC) (envelope-from cse.cem@gmail.com) Received: from mail-wj0-f179.google.com (mail-wj0-f179.google.com [209.85.210.179]) (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 5CBE31665; Thu, 12 Jan 2017 11:25:00 +0000 (UTC) (envelope-from cse.cem@gmail.com) Received: by mail-wj0-f179.google.com with SMTP id i20so9619529wjn.2; Thu, 12 Jan 2017 03:25:00 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:reply-to:in-reply-to:references :from:date:message-id:subject:to:cc; bh=OqmkezCn5czMvr1EoOGZOaGptIBgKuoZ8jQ716rWpg8=; b=bnhydUK4e5+FvZZrg2kFEJHZNLTlE1K6QbI5pU2ZNZ55JNaVbycF3OrBMr33XczIcY VdZEC/uLMUBibV4meIOXSARph6gs/oPMQvfXlUG7FQ+m2z3ktyr4nkb12DER/8Og20n2 e8RK9awO00SuHAxP/SX2yDKxY0kV25iqnRS3ZKGoqwLVlwNNghkkDxw6y4TCHi31HOR2 l6JsCEfvWgEPPI+Ts0+9gVZasSdpJk01oJhfPoNM8MimSC0YA7ZXe9h7843parPcESjV mdgzsCE/BoB/6QQ9TW5xk2AIgfOsEiT1pza3oNRzP4DdSBNX+pSY/XCpc+TKgfznwI9m puDQ== X-Gm-Message-State: AIkVDXJQcdvZqoMMJl7QH5jT4OWVCjk0WvLge1gHbsqOvlLQvAcMeCxVtY4WPL/d+muGIA== X-Received: by 10.194.67.67 with SMTP id l3mr7752173wjt.151.1484188545618; Wed, 11 Jan 2017 18:35:45 -0800 (PST) Received: from mail-wj0-f182.google.com (mail-wj0-f182.google.com. [209.85.210.182]) by smtp.gmail.com with ESMTPSA id a186sm776372wmh.1.2017.01.11.18.35.44 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 11 Jan 2017 18:35:44 -0800 (PST) Received: by mail-wj0-f182.google.com with SMTP id kq3so3397584wjc.0; Wed, 11 Jan 2017 18:35:44 -0800 (PST) X-Received: by 10.194.122.231 with SMTP id lv7mr2859274wjb.231.1484188544666; Wed, 11 Jan 2017 18:35:44 -0800 (PST) MIME-Version: 1.0 Reply-To: cem@freebsd.org Received: by 10.194.29.72 with HTTP; Wed, 11 Jan 2017 18:35:44 -0800 (PST) In-Reply-To: <201611242254.uAOMswkb081748@repo.freebsd.org> References: <201611242254.uAOMswkb081748@repo.freebsd.org> From: Conrad Meyer Date: Wed, 11 Jan 2017 18:35:44 -0800 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: svn commit: r309124 - in head: . contrib/compiler-rt contrib/compiler-rt/include/sanitizer contrib/compiler-rt/lib/asan contrib/compiler-rt/lib/builtins contrib/compiler-rt/lib/builtins/arm contrib... To: Dimitry Andric Cc: src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Type: text/plain; charset=UTF-8 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 12 Jan 2017 11:25:01 -0000 This appears to have broken Chromium[0]: FAILED: obj/services/ui/ws/lib/window_manager_display_root.o clang++39 -MMD -MF obj/services/ui/ws/lib/window_manager_display_root.o.d -D_LIBCPP_TRIVIAL_PAIR_COPY_CTOR=1 -DV8_DEPRECATION_WARNINGS -DENABLE_MDNS=1 -DENABLE_NOTIFICATIONS -DENABLE_PEPPER_CDMS -DENABLE_PLUGINS=1 -DENABLE_PDF=1 -DENABLE_PRINTING=1 -DENABLE_BASIC_PRINTING=1 -DENABLE_PRINT_PREVIEW=1 -DENABLE_SPELLCHECK=1 -DUI_COMPOSITOR_IMAGE_TRANSPORT -DUSE_AURA=1 -DUSE_PANGO=1 -DUSE_CAIRO=1 -DUSE_CLIPBOARD_AURAX11=1 -DUSE_DEFAULT_RENDER_THEME=1 -DUSE_GLIB=1 -DUSE_NSS_CERTS=1 -DUSE_X11=1 -DNO_TCMALLOC -DENABLE_WEBRTC=1 -DDISABLE_NACL -DENABLE_EXTENSIONS=1 -DENABLE_TASK_MANAGER=1 -DENABLE_THEMES=1 -DENABLE_CAPTIVE_PORTAL_DETECTION=1 -DENABLE_SESSION_SERVICE=1 -DENABLE_SUPERVISED_USERS=1 -DENABLE_SERVICE_DISCOVERY=1 -DUSE_PROPRIETARY_CODECS -DFULL_SAFE_BROWSING -DSAFE_BROWSING_CSD -DSAFE_BROWSING_DB_LOCAL -DCHROMIUM_BUILD -DENABLE_MEDIA_ROUTER=1 -DFIELDTRIAL_TESTING_ENABLED -DCR_CLANG_REVISION=278861-1 -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D_FORTIFY_SOURCE=2 -DNDEBUG -DNVALGRIND -DDYNAMIC_ANNOTATIONS_ENABLED=0 -DGL_GLEXT_PROTOTYPES -DUSE_GLX -DUSE_EGL -DSK_IGNORE_DW_GRAY_FIX -DSK_IGNORE_LINEONLY_AA_CONVEX_PATH_OPTS -DSK_SUPPORT_GPU=1 -DU_USING_ICU_NAMESPACE=0 -DU_ENABLE_DYLOAD=0 -DU_NOEXCEPT= -DU_STATIC_IMPLEMENTATION -DICU_UTIL_DATA_IMPL=ICU_UTIL_DATA_FILE -I../.. -Igen -I/usr/local/include/glib-2.0 -I/usr/local/lib/glib-2.0/include -I/usr/local/include -Igen/shim_headers/harfbuzz_shim -I../../third_party/khronos -I../../gpu -I../../skia/config -I../../skia/ext -I../../third_party/skia/include/c -I../../third_party/skia/include/config -I../../third_party/skia/include/core -I../../third_party/skia/include/effects -I../../third_party/skia/include/images -I../../third_party/skia/include/lazy -I../../third_party/skia/include/pathops -I../../third_party/skia/include/pdf -I../../third_party/skia/include/pipe -I../../third_party/skia/include/ports -I../../third_party/skia/include/utils -I../../third_party/skia/include/gpu -I../../third_party/skia/src/gpu -I../../third_party/icu/source/common -I../../third_party/icu/source/i18n -I../../third_party/mesa/src/include -fno-strict-aliasing --param=ssp-buffer-size=4 -fstack-protector -funwind-tables -fPIC -pipe -fcolor-diagnostics -fdebug-prefix-map=/wrkdirs/usr/ports/www/chromium/work/chromium-54.0.2840.100=. -pthread -m64 -march=x86-64 -Wall -Wextra -Wno-missing-field-initializers -Wno-unused-parameter -Wno-c++11-narrowing -Wno-covered-switch-default -Wno-deprecated-register -Wno-unneeded-internal-declaration -Wno-inconsistent-missing-override -Wno-shift-negative-value -Wno-undefined-var-template -Wno-nonportable-include-path -O2 -fno-ident -fdata-sections -ffunction-sections -g0 -fvisibility=hidden -Wheader-hygiene -Wstring-conversion -fno-threadsafe-statics -fvisibility-inlines-hidden -std=gnu++11 -fno-rtti -fno-exceptions -c ../../services/ui/ws/window_manager_display_root.cc -o obj/services/ui/ws/lib/window_manager_display_root.o In file included from ../../services/ui/ws/window_manager_display_root.cc:5: In file included from ../../services/ui/ws/window_manager_display_root.h:10: In file included from /usr/include/c++/v1/memory:599: /usr/include/c++/v1/__config:58:2: error: "_LIBCPP_TRIVIAL_PAIR_COPY_CTOR" is no longer supported. use _LIBCPP_DEPRECATED_ABI_DISABLE_PAIR_TRIVIAL_COPY_CTOR instead #error "_LIBCPP_TRIVIAL_PAIR_COPY_CTOR" is no longer supported. \ ^ 1 error generated. contrib/libc++/include/__config: 309124 dim #ifdef _LIBCPP_TRIVIAL_PAIR_COPY_CTOR 309124 dim #error "_LIBCPP_TRIVIAL_PAIR_COPY_CTOR" is no longer supported. \ 309124 dim use _LIBCPP_DEPRECATED_ABI_DISABLE_PAIR_TRIVIAL_COPY_CTOR instead 309124 dim #endif Best, Conrad [0]: http://beefy12.nyi.freebsd.org/data/head-amd64-default/p431044_s311844/logs/errors/chromium-54.0.2840.100_1.log (warning: BIG) On Thu, Nov 24, 2016 at 2:54 PM, Dimitry Andric wrote: > Author: dim > Date: Thu Nov 24 22:54:55 2016 > New Revision: 309124 > URL: https://svnweb.freebsd.org/changeset/base/309124 > > Log: > Upgrade our copies of clang, llvm, lldb, compiler-rt and libc++ to 3.9.0 > release, and add lld 3.9.0. Also completely revamp the build system for > clang, llvm, lldb and their related tools. > > Please note that from 3.5.0 onwards, clang, llvm and lldb require C++11 > support to build; see UPDATING for more information. > > Release notes for llvm, clang and lld are available here: > > > > > Thanks to Ed Maste, Bryan Drewery, Andrew Turner, Antoine Brodin and Jan > Beich for their help. From owner-svn-src-head@freebsd.org Thu Jan 12 13:00:19 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1C3D1CABD90; Thu, 12 Jan 2017 13:00:19 +0000 (UTC) (envelope-from arybchik@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id EB09914EE; Thu, 12 Jan 2017 13:00:18 +0000 (UTC) (envelope-from arybchik@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v0CD0I63062598; Thu, 12 Jan 2017 13:00:18 GMT (envelope-from arybchik@FreeBSD.org) Received: (from arybchik@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v0CD0HpJ062595; Thu, 12 Jan 2017 13:00:17 GMT (envelope-from arybchik@FreeBSD.org) Message-Id: <201701121300.v0CD0HpJ062595@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: arybchik set sender to arybchik@FreeBSD.org using -f From: Andrew Rybchenko Date: Thu, 12 Jan 2017 13:00:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r311977 - in head: share/man/man4 sys/dev/sfxge X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 12 Jan 2017 13:00:19 -0000 Author: arybchik Date: Thu Jan 12 13:00:17 2017 New Revision: 311977 URL: https://svnweb.freebsd.org/changeset/base/311977 Log: sfxge(4): add tunable to configure MAC stats update period Reviewed by: philip Sponsored by: Solarflare Communications, Inc. MFC after: 2 days Differential Revision: https://reviews.freebsd.org/D9151 Modified: head/share/man/man4/sfxge.4 head/sys/dev/sfxge/sfxge.h head/sys/dev/sfxge/sfxge_port.c Modified: head/share/man/man4/sfxge.4 ============================================================================== --- head/share/man/man4/sfxge.4 Thu Jan 12 11:53:33 2017 (r311976) +++ head/share/man/man4/sfxge.4 Thu Jan 12 13:00:17 2017 (r311977) @@ -158,6 +158,14 @@ The default for each port will be the va .Va hw.sfxge.mcdi_logging. The logging may also be enabled or disabled after the driver is loaded using the sysctl .Va dev.sfxge.%d.mcdi_logging. +.It Va hw.sfxge.stats_update_period_ms +Period in milliseconds to refresh interface statistics from hardware. +The accepted range is 0 to 65535, the default is 1000 (1 second). +Use zero value to disable periodic statistics update. +Supported on SFN8xxx series adapters with firmware v6.2.1.1033 and later and +SFN5xxx and SFN6xxx series adapters. +SFN7xxx series adapters and SFN8xxx series with earlier firmware use a +fixed 1000 milliseconds statistics update period. .El .Sh SUPPORT For general information and support, Modified: head/sys/dev/sfxge/sfxge.h ============================================================================== --- head/sys/dev/sfxge/sfxge.h Thu Jan 12 11:53:33 2017 (r311976) +++ head/sys/dev/sfxge/sfxge.h Thu Jan 12 13:00:17 2017 (r311977) @@ -248,6 +248,7 @@ struct sfxge_port { #endif struct sfxge_hw_stats phy_stats; struct sfxge_hw_stats mac_stats; + uint16_t stats_update_period_ms; efx_link_mode_t link_mode; uint8_t mcast_addrs[EFX_MAC_MULTICAST_LIST_MAX * EFX_MAC_ADDR_LEN]; Modified: head/sys/dev/sfxge/sfxge_port.c ============================================================================== --- head/sys/dev/sfxge/sfxge_port.c Thu Jan 12 11:53:33 2017 (r311976) +++ head/sys/dev/sfxge/sfxge_port.c Thu Jan 12 13:00:17 2017 (r311977) @@ -43,6 +43,15 @@ __FBSDID("$FreeBSD$"); #include "sfxge.h" +#define SFXGE_PARAM_STATS_UPDATE_PERIOD_MS \ + SFXGE_PARAM(stats_update_period_ms) +static int sfxge_stats_update_period_ms = SFXGE_STATS_UPDATE_PERIOD_MS; +TUNABLE_INT(SFXGE_PARAM_STATS_UPDATE_PERIOD_MS, + &sfxge_stats_update_period_ms); +SYSCTL_INT(_hw_sfxge, OID_AUTO, stats_update_period_ms, CTLFLAG_RDTUN, + &sfxge_stats_update_period_ms, 0, + "netstat interface statistics update period in milliseconds"); + static int sfxge_phy_cap_mask(struct sfxge_softc *, int, uint32_t *); static int @@ -62,7 +71,7 @@ sfxge_mac_stat_update(struct sfxge_softc goto out; } - min_ticks = (unsigned int)hz * SFXGE_STATS_UPDATE_PERIOD_MS / 1000; + min_ticks = (unsigned int)hz * port->stats_update_period_ms / 1000; now = ticks; if ((unsigned int)(now - port->mac_stats.update_time) < min_ticks) { @@ -515,7 +524,7 @@ sfxge_port_start(struct sfxge_softc *sc) /* Update MAC stats by DMA every period */ if ((rc = efx_mac_stats_periodic(enp, &port->mac_stats.dma_buf, - SFXGE_STATS_UPDATE_PERIOD_MS, + port->stats_update_period_ms, B_FALSE)) != 0) goto fail6; @@ -673,6 +682,26 @@ sfxge_port_fini(struct sfxge_softc *sc) port->sc = NULL; } +static uint16_t +sfxge_port_stats_update_period_ms(struct sfxge_softc *sc) +{ + int period_ms = sfxge_stats_update_period_ms; + + if (period_ms < 0) { + device_printf(sc->dev, + "treat negative stats update period %d as 0 (disable)\n", + period_ms); + period_ms = 0; + } else if (period_ms > UINT16_MAX) { + device_printf(sc->dev, + "treat too big stats update period %d as %u\n", + period_ms, UINT16_MAX); + period_ms = UINT16_MAX; + } + + return period_ms; +} + int sfxge_port_init(struct sfxge_softc *sc) { @@ -721,6 +750,7 @@ sfxge_port_init(struct sfxge_softc *sc) M_SFXGE, M_WAITOK | M_ZERO); if ((rc = sfxge_dma_alloc(sc, EFX_MAC_STATS_SIZE, mac_stats_buf)) != 0) goto fail2; + port->stats_update_period_ms = sfxge_port_stats_update_period_ms(sc); sfxge_mac_stat_init(sc); port->init_state = SFXGE_PORT_INITIALIZED; From owner-svn-src-head@freebsd.org Thu Jan 12 14:18:53 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8B6ECCACEEB; Thu, 12 Jan 2017 14:18:53 +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 5AF99191C; Thu, 12 Jan 2017 14:18:53 +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 v0CEIqIH095433; Thu, 12 Jan 2017 14:18:52 GMT (envelope-from sbruno@FreeBSD.org) Received: (from sbruno@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v0CEIq2N095432; Thu, 12 Jan 2017 14:18:52 GMT (envelope-from sbruno@FreeBSD.org) Message-Id: <201701121418.v0CEIq2N095432@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: sbruno set sender to sbruno@FreeBSD.org using -f From: Sean Bruno Date: Thu, 12 Jan 2017 14:18:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r311978 - head/sys/dev/e1000 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 12 Jan 2017 14:18:53 -0000 Author: sbruno Date: Thu Jan 12 14:18:52 2017 New Revision: 311978 URL: https://svnweb.freebsd.org/changeset/base/311978 Log: Attempt to use the "new" BAR address for newer igb(4) devices. This code was dropped during the IFLIB migration. Reported by: olivier Reviewed by: mmacy@nextbsd.org Modified: head/sys/dev/e1000/if_em.c Modified: head/sys/dev/e1000/if_em.c ============================================================================== --- head/sys/dev/e1000/if_em.c Thu Jan 12 13:00:17 2017 (r311977) +++ head/sys/dev/e1000/if_em.c Thu Jan 12 14:18:52 2017 (r311978) @@ -770,6 +770,8 @@ em_if_attach_pre(if_ctx_t ctx) if (adapter->hw.mac.type >= igb_mac_min) { + int try_second_bar; + scctx->isc_txqsizes[0] = roundup2(scctx->isc_ntxd[0] * sizeof(union e1000_adv_tx_desc), EM_DBA_ALIGN); scctx->isc_rxqsizes[0] = roundup2(scctx->isc_nrxd[0] * sizeof(union e1000_adv_rx_desc), EM_DBA_ALIGN); scctx->isc_txrx = &igb_txrx; @@ -779,6 +781,15 @@ em_if_attach_pre(if_ctx_t ctx) if (adapter->hw.mac.type != e1000_82575) scctx->isc_tx_csum_flags |= CSUM_SCTP | CSUM_IP6_SCTP; + /* + ** Some new devices, as with ixgbe, now may + ** use a different BAR, so we need to keep + ** track of which is used. + */ + try_second_bar = pci_read_config(dev, scctx->isc_msix_bar, 4); + if (try_second_bar == 0) + scctx->isc_msix_bar += 4; + } else if (adapter->hw.mac.type >= em_mac_min) { scctx->isc_txqsizes[0] = roundup2(scctx->isc_ntxd[0]* sizeof(struct e1000_tx_desc), EM_DBA_ALIGN); scctx->isc_rxqsizes[0] = roundup2(scctx->isc_nrxd[0] * sizeof(union e1000_rx_desc_extended), EM_DBA_ALIGN); From owner-svn-src-head@freebsd.org Thu Jan 12 14:28:33 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 76D2BCAB45F; Thu, 12 Jan 2017 14:28:33 +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 4654F1161; Thu, 12 Jan 2017 14:28:33 +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 v0CESW37099813; Thu, 12 Jan 2017 14:28:32 GMT (envelope-from sbruno@FreeBSD.org) Received: (from sbruno@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v0CESWxp099812; Thu, 12 Jan 2017 14:28:32 GMT (envelope-from sbruno@FreeBSD.org) Message-Id: <201701121428.v0CESWxp099812@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: sbruno set sender to sbruno@FreeBSD.org using -f From: Sean Bruno Date: Thu, 12 Jan 2017 14:28:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r311979 - head/sys/dev/e1000 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 12 Jan 2017 14:28:33 -0000 Author: sbruno Date: Thu Jan 12 14:28:32 2017 New Revision: 311979 URL: https://svnweb.freebsd.org/changeset/base/311979 Log: Reset the EIAC register to include the LINK status bit and restore link up/down notifications. Submitted by: Franco Fichtner Modified: head/sys/dev/e1000/if_em.c Modified: head/sys/dev/e1000/if_em.c ============================================================================== --- head/sys/dev/e1000/if_em.c Thu Jan 12 14:18:52 2017 (r311978) +++ head/sys/dev/e1000/if_em.c Thu Jan 12 14:28:32 2017 (r311979) @@ -3117,7 +3117,7 @@ em_if_enable_intr(if_ctx_t ctx) u32 ims_mask = IMS_ENABLE_MASK; if (hw->mac.type == e1000_82574) { - E1000_WRITE_REG(hw, EM_EIAC, adapter->ims); + E1000_WRITE_REG(hw, EM_EIAC, EM_MSIX_MASK); ims_mask |= adapter->ims; } if (adapter->intr_type == IFLIB_INTR_MSIX && hw->mac.type >= igb_mac_min) { u32 mask = (adapter->que_mask | adapter->link_mask); From owner-svn-src-head@freebsd.org Thu Jan 12 14:38:20 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5776ACAB906; Thu, 12 Jan 2017 14:38: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 322AF1A82; Thu, 12 Jan 2017 14:38:20 +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 v0CEcJp5004194; Thu, 12 Jan 2017 14:38:19 GMT (envelope-from sbruno@FreeBSD.org) Received: (from sbruno@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v0CEcItI004188; Thu, 12 Jan 2017 14:38:18 GMT (envelope-from sbruno@FreeBSD.org) Message-Id: <201701121438.v0CEcItI004188@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: sbruno set sender to sbruno@FreeBSD.org using -f From: Sean Bruno Date: Thu, 12 Jan 2017 14:38:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r311980 - in head: . sys/conf sys/dev/e1000 sys/modules/em X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 12 Jan 2017 14:38:20 -0000 Author: sbruno Date: Thu Jan 12 14:38:18 2017 New Revision: 311980 URL: https://svnweb.freebsd.org/changeset/base/311980 Log: Deprecate kernel configuration option EM_MULTIQUEUE now that the em(4) driver conforms to iflib. Modified: head/UPDATING head/sys/conf/NOTES head/sys/conf/files head/sys/conf/options head/sys/dev/e1000/if_em.h head/sys/modules/em/Makefile Modified: head/UPDATING ============================================================================== --- head/UPDATING Thu Jan 12 14:28:32 2017 (r311979) +++ head/UPDATING Thu Jan 12 14:38:18 2017 (r311980) @@ -51,6 +51,10 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 12 ****************************** SPECIAL WARNING: ****************************** +20170112: + The EM_MULTIQUEUE kernel configuration option is deprecated now that + the em(4) driver conforms to iflib specifications. + 20170109: The igb(4), em(4) and lem(4) ethernet drivers are now implemented via IFLIB. If you have a custom kernel configuration that excludes em(4) Modified: head/sys/conf/NOTES ============================================================================== --- head/sys/conf/NOTES Thu Jan 12 14:28:32 2017 (r311979) +++ head/sys/conf/NOTES Thu Jan 12 14:38:18 2017 (r311980) @@ -3055,9 +3055,6 @@ options RANDOM_ENABLE_UMA # slab alloca # Module to enable execution of application via emulators like QEMU options IMAGACT_BINMISC -# Intel em(4) driver -options EM_MULTIQUEUE # Activate multiqueue features/disable MSI-X - # zlib I/O stream support # This enables support for compressed core dumps. options GZIO Modified: head/sys/conf/files ============================================================================== --- head/sys/conf/files Thu Jan 12 14:28:32 2017 (r311979) +++ head/sys/conf/files Thu Jan 12 14:38:18 2017 (r311980) @@ -2139,6 +2139,8 @@ dev/ixgbe/ix_txrx.c optional ix inet | compile-with "${NORMAL_C} -I$S/dev/ixgbe" dev/ixgbe/ixgbe_osdep.c optional ix inet | ixv inet \ compile-with "${NORMAL_C} -I$S/dev/ixgbe" +dev/ixgbe/ixgbe_sysctl.c optional ix inet | ixv inet \ + compile-with "${NORMAL_C} -I$S/dev/ixgbe" dev/ixgbe/ixgbe_phy.c optional ix inet | ixv inet \ compile-with "${NORMAL_C} -I$S/dev/ixgbe" dev/ixgbe/ixgbe_api.c optional ix inet | ixv inet \ Modified: head/sys/conf/options ============================================================================== --- head/sys/conf/options Thu Jan 12 14:28:32 2017 (r311979) +++ head/sys/conf/options Thu Jan 12 14:38:18 2017 (r311980) @@ -986,9 +986,6 @@ RANDOM_LOADABLE opt_global.h # the uma slab allocator. RANDOM_ENABLE_UMA opt_global.h -# Intel em(4) driver -EM_MULTIQUEUE opt_em.h - # BHND(4) driver BHND_LOGLEVEL opt_global.h Modified: head/sys/dev/e1000/if_em.h ============================================================================== --- head/sys/dev/e1000/if_em.h Thu Jan 12 14:28:32 2017 (r311979) +++ head/sys/dev/e1000/if_em.h Thu Jan 12 14:38:18 2017 (r311980) @@ -25,7 +25,6 @@ */ /*$FreeBSD$*/ -#include "opt_em.h" #include "opt_ddb.h" #include "opt_inet.h" #include "opt_inet6.h" @@ -176,11 +175,7 @@ * restoring the network connection. To eliminate the potential * for the hang ensure that EM_RDTR is set to 0. */ -#ifdef EM_MULTIQUEUE -#define EM_RDTR 64 -#else #define EM_RDTR 0 -#endif /* * Receive Interrupt Absolute Delay Timer (Not valid for 82542/82543/82544) @@ -193,11 +188,7 @@ * along with EM_RDTR, may improve traffic throughput in specific network * conditions. */ -#ifdef EM_MULTIQUEUE -#define EM_RADV 128 -#else #define EM_RADV 64 -#endif /* * This parameter controls whether or not autonegotation is enabled. Modified: head/sys/modules/em/Makefile ============================================================================== --- head/sys/modules/em/Makefile Thu Jan 12 14:28:32 2017 (r311979) +++ head/sys/modules/em/Makefile Thu Jan 12 14:38:18 2017 (r311980) @@ -3,7 +3,7 @@ .PATH: ${.CURDIR}/../../dev/e1000 KMOD = if_em -SRCS = device_if.h bus_if.h pci_if.h opt_ddb.h opt_em.h opt_inet.h \ +SRCS = device_if.h bus_if.h pci_if.h opt_ddb.h opt_inet.h \ opt_inet6.h ifdi_if.h SRCS += $(CORE_SRC) $(LEGACY_SRC) SRCS += $(COMMON_SHARED) $(LEGACY_SHARED) $(PCIE_SHARED) From owner-svn-src-head@freebsd.org Thu Jan 12 14:44:43 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1D5FBCABD9A; Thu, 12 Jan 2017 14:44:43 +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 E157D11B1; Thu, 12 Jan 2017 14:44:42 +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 v0CEiggD008357; Thu, 12 Jan 2017 14:44:42 GMT (envelope-from pfg@FreeBSD.org) Received: (from pfg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v0CEigj8008356; Thu, 12 Jan 2017 14:44:42 GMT (envelope-from pfg@FreeBSD.org) Message-Id: <201701121444.v0CEigj8008356@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: pfg set sender to pfg@FreeBSD.org using -f From: "Pedro F. Giffuni" Date: Thu, 12 Jan 2017 14:44:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r311981 - head/usr.bin/rpcgen X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 12 Jan 2017 14:44:43 -0000 Author: pfg Date: Thu Jan 12 14:44:41 2017 New Revision: 311981 URL: https://svnweb.freebsd.org/changeset/base/311981 Log: rpcgen(1): Check getrlimit() return for generated code. Obtained from: NetBSD (CVS rev 1.27, 1.28) MFC after: 1 week Modified: head/usr.bin/rpcgen/rpc_svcout.c Modified: head/usr.bin/rpcgen/rpc_svcout.c ============================================================================== --- head/usr.bin/rpcgen/rpc_svcout.c Thu Jan 12 14:38:18 2017 (r311980) +++ head/usr.bin/rpcgen/rpc_svcout.c Thu Jan 12 14:44:41 2017 (r311981) @@ -728,7 +728,8 @@ write_timeout_func(void) if (tirpcflag) { f_print(fout, "\t\t\tstruct rlimit rl;\n\n"); f_print(fout, "\t\t\trl.rlim_max = 0;\n"); - f_print(fout, "\t\t\tgetrlimit(RLIMIT_NOFILE, &rl);\n"); + f_print(fout, "\t\t\tif (getrlimit(RLIMIT_NOFILE, &rl) == -1)\n"); + f_print(fout, "\t\t\t\treturn;\n"); f_print(fout, "\t\t\tif ((size = rl.rlim_max) == 0) {\n"); if (mtflag) @@ -902,7 +903,11 @@ write_rpc_svc_fg(const char *infile, con /* get number of file descriptors */ if (tirpcflag) { f_print(fout, "%srl.rlim_max = 0;\n", sp); - f_print(fout, "%sgetrlimit(RLIMIT_NOFILE, &rl);\n", sp); + f_print(fout, "%sif (getrlimit(RLIMIT_NOFILE, &rl) == -1) {\n", + sp); + f_print(fout, "%s\tperror(\"getrlimit\");\n", sp); + f_print(fout, "%s\texit(1);\n", sp); + f_print(fout, "%s}\n", sp); f_print(fout, "%sif ((size = rl.rlim_max) == 0)\n", sp); f_print(fout, "%s\texit(1);\n", sp); } else { From owner-svn-src-head@freebsd.org Thu Jan 12 14:47:45 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 81F7CCABEB1; Thu, 12 Jan 2017 14:47:45 +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 3376A14A1; Thu, 12 Jan 2017 14:47:45 +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 v0CEli1j008694; Thu, 12 Jan 2017 14:47:44 GMT (envelope-from sbruno@FreeBSD.org) Received: (from sbruno@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v0CElih0008693; Thu, 12 Jan 2017 14:47:44 GMT (envelope-from sbruno@FreeBSD.org) Message-Id: <201701121447.v0CElih0008693@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: sbruno set sender to sbruno@FreeBSD.org using -f From: Sean Bruno Date: Thu, 12 Jan 2017 14:47:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r311982 - head/sys/dev/e1000 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 12 Jan 2017 14:47:45 -0000 Author: sbruno Date: Thu Jan 12 14:47:44 2017 New Revision: 311982 URL: https://svnweb.freebsd.org/changeset/base/311982 Log: Restore fixup for newer em(4) devices WOL capabilities post iflib integration. PR: 208343 Modified: head/sys/dev/e1000/if_em.c Modified: head/sys/dev/e1000/if_em.c ============================================================================== --- head/sys/dev/e1000/if_em.c Thu Jan 12 14:44:41 2017 (r311981) +++ head/sys/dev/e1000/if_em.c Thu Jan 12 14:47:44 2017 (r311982) @@ -3308,6 +3308,8 @@ em_get_wakeup(if_ctx_t ctx) case e1000_ich10lan: case e1000_pchlan: case e1000_pch2lan: + case e1000_pch_lpt: + case e1000_pch_spt: apme_mask = E1000_WUC_APME; adapter->has_amt = TRUE; eeprom_data = E1000_READ_REG(&adapter->hw, E1000_WUC); @@ -3376,7 +3378,7 @@ em_enable_wakeup(if_ctx_t ctx) struct adapter *adapter = iflib_get_softc(ctx); device_t dev = iflib_get_dev(ctx); if_t ifp = iflib_get_ifp(ctx); - u32 pmc, ctrl, ctrl_ext, rctl; + u32 pmc, ctrl, ctrl_ext, rctl, wuc; u16 status; if ((pci_find_cap(dev, PCIY_PMG, &pmc) != 0)) @@ -3386,7 +3388,9 @@ em_enable_wakeup(if_ctx_t ctx) ctrl = E1000_READ_REG(&adapter->hw, E1000_CTRL); ctrl |= (E1000_CTRL_SWDPIN2 | E1000_CTRL_SWDPIN3); E1000_WRITE_REG(&adapter->hw, E1000_CTRL, ctrl); - E1000_WRITE_REG(&adapter->hw, E1000_WUC, E1000_WUC_PME_EN); + wuc = E1000_READ_REG(&adapter->hw, E1000_WUC); + wuc |= E1000_WUC_PME_EN ; + E1000_WRITE_REG(&adapter->hw, E1000_WUC, wuc); if ((adapter->hw.mac.type == e1000_ich8lan) || (adapter->hw.mac.type == e1000_pchlan) || @@ -3418,7 +3422,9 @@ em_enable_wakeup(if_ctx_t ctx) } if ((adapter->hw.mac.type == e1000_pchlan) || - (adapter->hw.mac.type == e1000_pch2lan)) { + (adapter->hw.mac.type == e1000_pch2lan) || + (adapter->hw.mac.type == e1000_pch_lpt) || + (adapter->hw.mac.type == e1000_pch_spt)) { if (em_enable_phy_wakeup(adapter)) return; } else { From owner-svn-src-head@freebsd.org Thu Jan 12 15:26:25 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5859BCACC61; Thu, 12 Jan 2017 15:26:25 +0000 (UTC) (envelope-from arybchik@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 19C211CEA; Thu, 12 Jan 2017 15:26:25 +0000 (UTC) (envelope-from arybchik@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v0CFQORt025505; Thu, 12 Jan 2017 15:26:24 GMT (envelope-from arybchik@FreeBSD.org) Received: (from arybchik@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v0CFQOTD025502; Thu, 12 Jan 2017 15:26:24 GMT (envelope-from arybchik@FreeBSD.org) Message-Id: <201701121526.v0CFQOTD025502@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: arybchik set sender to arybchik@FreeBSD.org using -f From: Andrew Rybchenko Date: Thu, 12 Jan 2017 15:26:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r311983 - in head: share/man/man4 sys/dev/sfxge X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 12 Jan 2017 15:26:25 -0000 Author: arybchik Date: Thu Jan 12 15:26:23 2017 New Revision: 311983 URL: https://svnweb.freebsd.org/changeset/base/311983 Log: sfxge(4): add sysctl to change MAC stats update period The sysctl controls the period per interface. Reviewed by: gnn Sponsored by: Solarflare Communications, Inc. MFC after: 2 days Differential Revision: https://reviews.freebsd.org/D9153 Modified: head/share/man/man4/sfxge.4 head/sys/dev/sfxge/sfxge_port.c Modified: head/share/man/man4/sfxge.4 ============================================================================== --- head/share/man/man4/sfxge.4 Thu Jan 12 14:47:44 2017 (r311982) +++ head/share/man/man4/sfxge.4 Thu Jan 12 15:26:23 2017 (r311983) @@ -166,6 +166,8 @@ Supported on SFN8xxx series adapters wit SFN5xxx and SFN6xxx series adapters. SFN7xxx series adapters and SFN8xxx series with earlier firmware use a fixed 1000 milliseconds statistics update period. +The period may also be changed after the driver is loaded using the sysctl +.Va dev.sfxge.%d.stats_update_period_ms . .El .Sh SUPPORT For general information and support, Modified: head/sys/dev/sfxge/sfxge_port.c ============================================================================== --- head/sys/dev/sfxge/sfxge_port.c Thu Jan 12 14:47:44 2017 (r311982) +++ head/sys/dev/sfxge/sfxge_port.c Thu Jan 12 15:26:23 2017 (r311983) @@ -702,6 +702,48 @@ sfxge_port_stats_update_period_ms(struct return period_ms; } +static int +sfxge_port_stats_update_period_ms_handler(SYSCTL_HANDLER_ARGS) +{ + struct sfxge_softc *sc; + struct sfxge_port *port; + unsigned int period_ms; + int error; + + sc = arg1; + port = &sc->port; + + if (req->newptr != NULL) { + error = SYSCTL_IN(req, &period_ms, sizeof(period_ms)); + if (error != 0) + return (error); + + if (period_ms > UINT16_MAX) + return (EINVAL); + + SFXGE_PORT_LOCK(port); + + if (port->stats_update_period_ms != period_ms) { + if (port->init_state == SFXGE_PORT_STARTED) + error = efx_mac_stats_periodic(sc->enp, + &port->mac_stats.dma_buf, + period_ms, B_FALSE); + if (error == 0) + port->stats_update_period_ms = period_ms; + } + + SFXGE_PORT_UNLOCK(port); + } else { + SFXGE_PORT_LOCK(port); + period_ms = port->stats_update_period_ms; + SFXGE_PORT_UNLOCK(port); + + error = SYSCTL_OUT(req, &period_ms, sizeof(period_ms)); + } + + return (error); +} + int sfxge_port_init(struct sfxge_softc *sc) { @@ -753,6 +795,11 @@ sfxge_port_init(struct sfxge_softc *sc) port->stats_update_period_ms = sfxge_port_stats_update_period_ms(sc); sfxge_mac_stat_init(sc); + SYSCTL_ADD_PROC(sysctl_ctx, SYSCTL_CHILDREN(sysctl_tree), OID_AUTO, + "stats_update_period_ms", CTLTYPE_UINT|CTLFLAG_RW, sc, 0, + sfxge_port_stats_update_period_ms_handler, "IU", + "interface statistics refresh period"); + port->init_state = SFXGE_PORT_INITIALIZED; DBGPRINT(sc->dev, "success"); From owner-svn-src-head@freebsd.org Thu Jan 12 15:54:04 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A6820CAC6E0; Thu, 12 Jan 2017 15:54:04 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5C5831CFD; Thu, 12 Jan 2017 15:54:04 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v0CFs3bk037305; Thu, 12 Jan 2017 15:54:03 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v0CFs3eN037304; Thu, 12 Jan 2017 15:54:03 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201701121554.v0CFs3eN037304@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Thu, 12 Jan 2017 15:54:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r311984 - 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-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 12 Jan 2017 15:54:04 -0000 Author: kib Date: Thu Jan 12 15:54:03 2017 New Revision: 311984 URL: https://svnweb.freebsd.org/changeset/base/311984 Log: For the main binary, postpone enforcing relro read-only protection until copy relocations are done. Newer binutils and lld seems to output copy into relro-protected range. Reported by: Rafael Espц╜ndola via emaste Sponsored by: The FreeBSD Foundation MFC after: 1 week Modified: head/libexec/rtld-elf/rtld.c Modified: head/libexec/rtld-elf/rtld.c ============================================================================== --- head/libexec/rtld-elf/rtld.c Thu Jan 12 15:26:23 2017 (r311983) +++ head/libexec/rtld-elf/rtld.c Thu Jan 12 15:54:03 2017 (r311984) @@ -103,6 +103,7 @@ static int load_needed_objects(Obj_Entry static int load_preload_objects(void); static Obj_Entry *load_object(const char *, int fd, const Obj_Entry *, int); static void map_stacks_exec(RtldLockState *); +static int obj_enforce_relro(Obj_Entry *); static Obj_Entry *obj_from_addr(const void *); static void objlist_call_fini(Objlist *, Obj_Entry *, RtldLockState *); static void objlist_call_init(Objlist *, RtldLockState *); @@ -617,6 +618,10 @@ _rtld(Elf_Addr *sp, func_ptr_type *exit_ if (do_copy_relocations(obj_main) == -1) rtld_die(); + dbg("enforcing main obj relro"); + if (obj_enforce_relro(obj_main) == -1) + rtld_die(); + if (getenv(_LD("DUMP_REL_POST")) != NULL) { dump_relocations(obj_main); exit (0); @@ -2746,14 +2751,8 @@ relocate_object(Obj_Entry *obj, bool bin reloc_non_plt(obj, rtldobj, flags | SYMLOOK_IFUNC, lockstate)) return (-1); - if (obj->relro_size > 0) { - if (mprotect(obj->relro_page, obj->relro_size, - PROT_READ) == -1) { - _rtld_error("%s: Cannot enforce relro protection: %s", - obj->path, rtld_strerror(errno)); - return (-1); - } - } + if (!obj->mainprog && obj_enforce_relro(obj) == -1) + return (-1); /* * Set up the magic number and version in the Obj_Entry. These @@ -5124,6 +5123,19 @@ _rtld_is_dlopened(void *arg) return (res); } +int +obj_enforce_relro(Obj_Entry *obj) +{ + + if (obj->relro_size > 0 && mprotect(obj->relro_page, obj->relro_size, + PROT_READ) == -1) { + _rtld_error("%s: Cannot enforce relro protection: %s", + obj->path, rtld_strerror(errno)); + return (-1); + } + return (0); +} + static void map_stacks_exec(RtldLockState *lockstate) { From owner-svn-src-head@freebsd.org Thu Jan 12 16:16:10 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 97140CACCA2; Thu, 12 Jan 2017 16:16:10 +0000 (UTC) (envelope-from carpeddiem@gmail.com) Received: from mail-io0-x243.google.com (mail-io0-x243.google.com [IPv6:2607:f8b0:4001:c06::243]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 60E281719; Thu, 12 Jan 2017 16:16:10 +0000 (UTC) (envelope-from carpeddiem@gmail.com) Received: by mail-io0-x243.google.com with SMTP id 101so2876870iom.0; Thu, 12 Jan 2017 08:16:10 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=lFUeJKoh9lakCvIT/OC6wlL6qZ/bVUvYzFwXT6Cv2m0=; b=Y08t+84bCW4OXk15apbO/BmY+Lx77Jo/KUlTFO209IQ85L8fSHJm/BBIl2V5oR9n7I pGAj5T1fh5NpNaM8Syy0NHYR1MtS75TB9rz/MYxLpFTl0rgG/Ozx/ECnWJB7oAKOVUbE 4XzU+E2cEcJphQqoYW53YBHkSY3ySAxx62LddBGuQnBX9JxYBEsG60Z26VtRzBkO3EcL x6aaPQ38ZQ2jf36AVKOgDuCthA3LYWSFk6dsmSBTWy75MH0lINF6HDoDeT7RobBUd8fe IWEEGAySNMypPCa/hjLmLozvR1Ji4dKDgEJz8iq7cDgtcmWv+UWZ3i29BEB/lp2gaB/3 d0oQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc; bh=lFUeJKoh9lakCvIT/OC6wlL6qZ/bVUvYzFwXT6Cv2m0=; b=lK3aj4K6HBFHaawOoQCKVZvQFTq7UkVKapgrPqYnfcsM70nD2ey+KHJZq43vbREzMg ZOXmZe7f61bd/XaJD1qzm/jvtzVUyfmZpfnF4s9fUthpQ4K65LMUr2ot+7XihCMnunmf rUKO+2FQF4PNdk4KBq3d3BIQzuhjPk+OlBagamsEd5jB7jdmwEViirRLRGl25iuMp8nV rvWXyOXsj+Yn+d9hHepQfedg+tmihIfdfOC9hAh8VsnsjJnchY87VVlaWs80PYU9SpCY vePBUh+7mH3/+MWLg2L7RUJoiJkGr5VMaBWjJQshxLfskUG+AiI2fg4GFTQj+TPzwh5I a8lg== X-Gm-Message-State: AIkVDXJ4zYAuzFgJGhYU13k8y5PUL+JXsVU+iWQXLrzTNxsZNAwmsf5rpdvRWmVeUwNnO7YXvRB6b36555f1kQ== X-Received: by 10.107.23.198 with SMTP id 189mr7104283iox.162.1484237769373; Thu, 12 Jan 2017 08:16:09 -0800 (PST) MIME-Version: 1.0 Sender: carpeddiem@gmail.com Received: by 10.107.175.159 with HTTP; Thu, 12 Jan 2017 08:15:48 -0800 (PST) In-Reply-To: <201701121554.v0CFs3eN037304@repo.freebsd.org> References: <201701121554.v0CFs3eN037304@repo.freebsd.org> From: Ed Maste Date: Thu, 12 Jan 2017 11:15:48 -0500 X-Google-Sender-Auth: jfffV0ArA5YABXCibfE46pBmtYc Message-ID: Subject: Re: svn commit: r311984 - head/libexec/rtld-elf To: Konstantin Belousov Cc: "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Content-Type: text/plain; charset=UTF-8 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 12 Jan 2017 16:16:10 -0000 On 12 January 2017 at 10:54, Konstantin Belousov wrote: > Author: kib > Date: Thu Jan 12 15:54:03 2017 > New Revision: 311984 > URL: https://svnweb.freebsd.org/changeset/base/311984 > > Log: > For the main binary, postpone enforcing relro read-only protection > until copy relocations are done. > > Newer binutils and lld seems to output copy into relro-protected range. AFAIK no released version of GNU BFD ld or gold have this change yet, but it has been committed to both. There's a long thread with details at https://sourceware.org/ml/libc-alpha/2016-12/msg00914.html From owner-svn-src-head@freebsd.org Thu Jan 12 16:22:29 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E9CAACACF0D; Thu, 12 Jan 2017 16:22:29 +0000 (UTC) (envelope-from asomers@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B829F1C1A; Thu, 12 Jan 2017 16:22:29 +0000 (UTC) (envelope-from asomers@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v0CGMSmQ048585; Thu, 12 Jan 2017 16:22:28 GMT (envelope-from asomers@FreeBSD.org) Received: (from asomers@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v0CGMSTQ048584; Thu, 12 Jan 2017 16:22:28 GMT (envelope-from asomers@FreeBSD.org) Message-Id: <201701121622.v0CGMSTQ048584@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: asomers set sender to asomers@FreeBSD.org using -f From: Alan Somers Date: Thu, 12 Jan 2017 16:22:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r311985 - head/usr.sbin/route6d X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 12 Jan 2017 16:22:30 -0000 Author: asomers Date: Thu Jan 12 16:22:28 2017 New Revision: 311985 URL: https://svnweb.freebsd.org/changeset/base/311985 Log: Fix uninitialized variable CIDs in route6d The variables in question are actually return arguments, but it's still good form to initialize them. Reported by: Coverity CID: 979679 979680 MFC after: 4 weeks Sponsored by: Spectra Logic Corp Modified: head/usr.sbin/route6d/route6d.c Modified: head/usr.sbin/route6d/route6d.c ============================================================================== --- head/usr.sbin/route6d/route6d.c Thu Jan 12 15:54:03 2017 (r311984) +++ head/usr.sbin/route6d/route6d.c Thu Jan 12 16:22:28 2017 (r311985) @@ -1062,6 +1062,7 @@ sendpacket(struct sockaddr_in6 *sin6, in iov[0].iov_len = len; m.msg_iov = iov; m.msg_iovlen = 1; + m.msg_flags = 0; if (!idx) { m.msg_control = NULL; m.msg_controllen = 0; @@ -1126,6 +1127,7 @@ riprecv(void) cm = (struct cmsghdr *)cmsgbuf; m.msg_control = (caddr_t)cm; m.msg_controllen = sizeof(cmsgbuf); + m.msg_flags = 0; if ((len = recvmsg(ripsock, &m, 0)) < 0) { fatal("recvmsg"); /*NOTREACHED*/ From owner-svn-src-head@freebsd.org Thu Jan 12 16:24:11 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id EFBE6CACFE9; Thu, 12 Jan 2017 16:24:11 +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 BF6181DF2; Thu, 12 Jan 2017 16:24:11 +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 v0CGOAJ8049350; Thu, 12 Jan 2017 16:24:10 GMT (envelope-from sbruno@FreeBSD.org) Received: (from sbruno@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v0CGOApg049349; Thu, 12 Jan 2017 16:24:10 GMT (envelope-from sbruno@FreeBSD.org) Message-Id: <201701121624.v0CGOApg049349@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: sbruno set sender to sbruno@FreeBSD.org using -f From: Sean Bruno Date: Thu, 12 Jan 2017 16:24:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r311986 - head/sys/dev/netmap X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 12 Jan 2017 16:24:12 -0000 Author: sbruno Date: Thu Jan 12 16:24:10 2017 New Revision: 311986 URL: https://svnweb.freebsd.org/changeset/base/311986 Log: Fix panic on mb_free_ext() due to NULL destructor. This used to happen because of the SET_MBUF_DESTRUCTOR() called on unregif. Submitted by: Vincenzo Maffione Modified: head/sys/dev/netmap/netmap_generic.c Modified: head/sys/dev/netmap/netmap_generic.c ============================================================================== --- head/sys/dev/netmap/netmap_generic.c Thu Jan 12 16:22:28 2017 (r311985) +++ head/sys/dev/netmap/netmap_generic.c Thu Jan 12 16:24:10 2017 (r311986) @@ -165,12 +165,12 @@ nm_os_get_mbuf(struct ifnet *ifp, int le * has a KASSERT(), checking that the mbuf dtor function is not NULL. */ +static void void_mbuf_dtor(struct mbuf *m, void *arg1, void *arg2) { } + #define SET_MBUF_DESTRUCTOR(m, fn) do { \ - (m)->m_ext.ext_free = (void *)fn; \ + (m)->m_ext.ext_free = fn ? (void *)fn : (void *)void_mbuf_dtor; \ } while (0) -static void void_mbuf_dtor(struct mbuf *m, void *arg1, void *arg2) { } - static inline struct mbuf * nm_os_get_mbuf(struct ifnet *ifp, int len) { From owner-svn-src-head@freebsd.org Thu Jan 12 16:30:28 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 96DFDCAC085; Thu, 12 Jan 2017 16:30:28 +0000 (UTC) (envelope-from bms@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4A0C1101E; Thu, 12 Jan 2017 16:30:28 +0000 (UTC) (envelope-from bms@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v0CGURUo049621; Thu, 12 Jan 2017 16:30:27 GMT (envelope-from bms@FreeBSD.org) Received: (from bms@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v0CGURes049619; Thu, 12 Jan 2017 16:30:27 GMT (envelope-from bms@FreeBSD.org) Message-Id: <201701121630.v0CGURes049619@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bms set sender to bms@FreeBSD.org using -f From: Bruce M Simpson Date: Thu, 12 Jan 2017 16:30:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r311987 - head/sys/dev/uart X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 12 Jan 2017 16:30:28 -0000 Author: bms Date: Thu Jan 12 16:30:27 2017 New Revision: 311987 URL: https://svnweb.freebsd.org/changeset/base/311987 Log: Allow uart(4) to use MSI interrupts on single-port PCI instances. Do this here as puc(4) disallows single-port instances; at least one multi-port PCIe UART chip (in this case, the ASIX MCS9922) present separate PCI configuration space (functions) for each UART. Tested using lrzsz and a null-modem cable. The ExpressCard/34 variants containing the MCS9922 should also use MSI with this change. Reviewed by: jhb, imp, rpokala MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D9123 Modified: head/sys/dev/uart/uart_bus_pci.c head/sys/dev/uart/uart_core.c Modified: head/sys/dev/uart/uart_bus_pci.c ============================================================================== --- head/sys/dev/uart/uart_bus_pci.c Thu Jan 12 16:24:10 2017 (r311986) +++ head/sys/dev/uart/uart_bus_pci.c Thu Jan 12 16:30:27 2017 (r311987) @@ -45,12 +45,14 @@ __FBSDID("$FreeBSD$"); #define DEFAULT_RCLK 1843200 static int uart_pci_probe(device_t dev); +static int uart_pci_attach(device_t dev); +static int uart_pci_detach(device_t dev); static device_method_t uart_pci_methods[] = { /* Device interface */ DEVMETHOD(device_probe, uart_pci_probe), - DEVMETHOD(device_attach, uart_bus_attach), - DEVMETHOD(device_detach, uart_bus_detach), + DEVMETHOD(device_attach, uart_pci_attach), + DEVMETHOD(device_detach, uart_pci_detach), DEVMETHOD(device_resume, uart_bus_resume), DEVMETHOD_END }; @@ -209,4 +211,40 @@ uart_pci_probe(device_t dev) return (result); } +static int +uart_pci_attach(device_t dev) +{ + struct uart_softc *sc; + int count; + + sc = device_get_softc(dev); + + /* + * Use MSI in preference to legacy IRQ if available. + * Whilst some PCIe UARTs support >1 MSI vector, use only the first. + */ + if (pci_msi_count(dev) > 0) { + count = 1; + if (pci_alloc_msi(dev, &count) == 0) { + sc->sc_irid = 1; + device_printf(dev, "Using %d MSI message\n", count); + } + } + + return (uart_bus_attach(dev)); +} + +static int +uart_pci_detach(device_t dev) +{ + struct uart_softc *sc; + + sc = device_get_softc(dev); + + if (sc->sc_irid != 0) + pci_release_msi(dev); + + return (uart_bus_detach(dev)); +} + DRIVER_MODULE(uart, pci, uart_pci_driver, uart_devclass, NULL, NULL); Modified: head/sys/dev/uart/uart_core.c ============================================================================== --- head/sys/dev/uart/uart_core.c Thu Jan 12 16:24:10 2017 (r311986) +++ head/sys/dev/uart/uart_core.c Thu Jan 12 16:30:27 2017 (r311987) @@ -677,7 +677,6 @@ uart_bus_attach(device_t dev) * safest thing to do. */ if (filt != FILTER_SCHEDULE_THREAD && !uart_force_poll) { - sc->sc_irid = 0; sc->sc_ires = bus_alloc_resource_any(dev, SYS_RES_IRQ, &sc->sc_irid, RF_ACTIVE | RF_SHAREABLE); } From owner-svn-src-head@freebsd.org Thu Jan 12 16:44:41 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id BC04ACAC72E; Thu, 12 Jan 2017 16:44:41 +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 8B94D1C2D; Thu, 12 Jan 2017 16:44:41 +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 v0CGie9C057778; Thu, 12 Jan 2017 16:44:40 GMT (envelope-from sbruno@FreeBSD.org) Received: (from sbruno@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v0CGielQ057777; Thu, 12 Jan 2017 16:44:40 GMT (envelope-from sbruno@FreeBSD.org) Message-Id: <201701121644.v0CGielQ057777@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: sbruno set sender to sbruno@FreeBSD.org using -f From: Sean Bruno Date: Thu, 12 Jan 2017 16:44:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r311988 - 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-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 12 Jan 2017 16:44:41 -0000 Author: sbruno Date: Thu Jan 12 16:44:40 2017 New Revision: 311988 URL: https://svnweb.freebsd.org/changeset/base/311988 Log: Purge EM_MULTIQUEUE references from the man page for em(4). Modified: head/share/man/man4/em.4 Modified: head/share/man/man4/em.4 ============================================================================== --- head/share/man/man4/em.4 Thu Jan 12 16:30:27 2017 (r311987) +++ head/share/man/man4/em.4 Thu Jan 12 16:44:40 2017 (r311988) @@ -31,7 +31,7 @@ .\" .\" $FreeBSD$ .\" -.Dd August 16, 2015 +.Dd January 12, 2016 .Dt EM 4 .Os .Sh NAME @@ -45,14 +45,6 @@ kernel configuration file: .Cd "device em" .Ed .Pp -Optional multiqueue support is available via the following kernel -compile options: -.Bd -ragged -offset indent -.Cd "options EM_MULTIQUEUE" -.Ed -.Pp -Note: Activating EM_MULTIQUEUE support is not supported by Intel. -.Pp Alternatively, to load the driver as a module at boot time, place the following line in .Xr loader.conf 5 : @@ -253,12 +245,6 @@ If .Va hw.em.tx_int_delay is non-zero, this tunable limits the maximum delay in which a transmit interrupt is generated. -.It Va hw.em.num_queues -Number of hardware queues that will be configured on this adapter (maximum of 2) -Defaults to 1. -Only valid with kernel configuration -.Cd "options EM_MULTIQUEUE". -.El .Sh FILES .Bl -tag -width /dev/led/em* .It Pa /dev/led/em* @@ -311,5 +297,3 @@ The .Nm driver was written by .An Intel Corporation Aq Mt freebsd@intel.com . -.Sh BUGS -Activating EM_MULTIQUEUE support requires MSI-X features. From owner-svn-src-head@freebsd.org Thu Jan 12 17:02:31 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 92D0ACAC124; Thu, 12 Jan 2017 17:02:31 +0000 (UTC) (envelope-from cem@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 53B031976; Thu, 12 Jan 2017 17:02:31 +0000 (UTC) (envelope-from cem@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v0CH2U3D065441; Thu, 12 Jan 2017 17:02:30 GMT (envelope-from cem@FreeBSD.org) Received: (from cem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v0CH2Twi065431; Thu, 12 Jan 2017 17:02:29 GMT (envelope-from cem@FreeBSD.org) Message-Id: <201701121702.v0CH2Twi065431@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cem set sender to cem@FreeBSD.org using -f From: "Conrad E. Meyer" Date: Thu, 12 Jan 2017 17:02:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r311989 - head/sys/libkern X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 12 Jan 2017 17:02:31 -0000 Author: cem Date: Thu Jan 12 17:02:29 2017 New Revision: 311989 URL: https://svnweb.freebsd.org/changeset/base/311989 Log: libkern: Remove obsolete 'register' keyword Sponsored by: Dell EMC Isilon Modified: head/sys/libkern/bcmp.c head/sys/libkern/bsearch.c head/sys/libkern/iconv_ucs.c head/sys/libkern/iconv_xlat16.c head/sys/libkern/memmem.c head/sys/libkern/qdivrem.c head/sys/libkern/qsort.c head/sys/libkern/random.c head/sys/libkern/scanc.c head/sys/libkern/strcmp.c head/sys/libkern/strncpy.c Modified: head/sys/libkern/bcmp.c ============================================================================== --- head/sys/libkern/bcmp.c Thu Jan 12 16:44:40 2017 (r311988) +++ head/sys/libkern/bcmp.c Thu Jan 12 17:02:29 2017 (r311989) @@ -44,7 +44,7 @@ typedef const unsigned long *culp; int bcmp(b1, b2, length) const void *b1, *b2; - register size_t length; + size_t length; { #if BYTE_ORDER == LITTLE_ENDIAN /* Modified: head/sys/libkern/bsearch.c ============================================================================== --- head/sys/libkern/bsearch.c Thu Jan 12 16:44:40 2017 (r311988) +++ head/sys/libkern/bsearch.c Thu Jan 12 17:02:29 2017 (r311989) @@ -54,16 +54,16 @@ __FBSDID("$FreeBSD$"); */ void * bsearch(key, base0, nmemb, size, compar) - register const void *key; + const void *key; const void *base0; size_t nmemb; - register size_t size; - register int (*compar)(const void *, const void *); + size_t size; + int (*compar)(const void *, const void *); { - register const char *base = base0; - register size_t lim; - register int cmp; - register const void *p; + const char *base = base0; + size_t lim; + int cmp; + const void *p; for (lim = nmemb; lim != 0; lim >>= 1) { p = base + (lim >> 1) * size; Modified: head/sys/libkern/iconv_ucs.c ============================================================================== --- head/sys/libkern/iconv_ucs.c Thu Jan 12 16:44:40 2017 (r311988) +++ head/sys/libkern/iconv_ucs.c Thu Jan 12 17:02:29 2017 (r311989) @@ -523,14 +523,14 @@ ucs4_to_utf8(uint32_t ucs4, char *dst, s } static uint32_t -encode_surrogate(register uint32_t code) +encode_surrogate(uint32_t code) { return ((((code - 0x10000) << 6) & 0x3ff0000) | ((code - 0x10000) & 0x3ff) | 0xd800dc00); } static uint32_t -decode_surrogate(register const u_char *ucs) +decode_surrogate(const u_char *ucs) { return ((((ucs[0] & 0x3) << 18) | (ucs[1] << 10) | ((ucs[2] & 0x3) << 8) | ucs[3]) + 0x10000); Modified: head/sys/libkern/iconv_xlat16.c ============================================================================== --- head/sys/libkern/iconv_xlat16.c Thu Jan 12 16:44:40 2017 (r311988) +++ head/sys/libkern/iconv_xlat16.c Thu Jan 12 17:02:29 2017 (r311989) @@ -298,10 +298,10 @@ iconv_xlat16_name(struct iconv_converter } static int -iconv_xlat16_tolower(void *d2p, register int c) +iconv_xlat16_tolower(void *d2p, int c) { struct iconv_xlat16 *dp = (struct iconv_xlat16*)d2p; - register int c1, c2, out; + int c1, c2, out; if (c < 0x100) { c1 = C2I1(c << 8); @@ -323,10 +323,10 @@ iconv_xlat16_tolower(void *d2p, register } static int -iconv_xlat16_toupper(void *d2p, register int c) +iconv_xlat16_toupper(void *d2p, int c) { struct iconv_xlat16 *dp = (struct iconv_xlat16*)d2p; - register int c1, c2, out; + int c1, c2, out; if (c < 0x100) { c1 = C2I1(c << 8); Modified: head/sys/libkern/memmem.c ============================================================================== --- head/sys/libkern/memmem.c Thu Jan 12 16:44:40 2017 (r311988) +++ head/sys/libkern/memmem.c Thu Jan 12 17:02:29 2017 (r311989) @@ -35,7 +35,7 @@ __FBSDID("$FreeBSD$"); void * memmem(const void *l, size_t l_len, const void *s, size_t s_len) { - register char *cur, *last; + char *cur, *last; const char *cl = (const char *)l; const char *cs = (const char *)s; Modified: head/sys/libkern/qdivrem.c ============================================================================== --- head/sys/libkern/qdivrem.c Thu Jan 12 16:44:40 2017 (r311988) +++ head/sys/libkern/qdivrem.c Thu Jan 12 17:02:29 2017 (r311989) @@ -59,9 +59,9 @@ typedef u_long digit; * We may assume len >= 0. NOTE THAT THIS WRITES len+1 DIGITS. */ static void -__shl(register digit *p, register int len, register int sh) +__shl(digit *p, int len, int sh) { - register int i; + int i; for (i = 0; i < len; i++) p[i] = LHALF(p[i] << sh) | (p[i + 1] >> (HALF_BITS - sh)); @@ -82,7 +82,7 @@ __qdivrem(uq, vq, arq) { union uu tmp; digit *u, *v, *q; - register digit v1, v2; + digit v1, v2; u_long qhat, rhat, t; int m, n, d, j, i; digit uspace[5], vspace[5], qspace[5]; @@ -192,7 +192,7 @@ __qdivrem(uq, vq, arq) v1 = v[1]; /* for D3 -- note that v[1..n] are constant */ v2 = v[2]; /* for D3 */ do { - register digit uj0, uj1, uj2; + digit uj0, uj1, uj2; /* * D3: Calculate qhat (\^q, in TeX notation). Modified: head/sys/libkern/qsort.c ============================================================================== --- head/sys/libkern/qsort.c Thu Jan 12 16:44:40 2017 (r311988) +++ head/sys/libkern/qsort.c Thu Jan 12 17:02:29 2017 (r311989) @@ -48,10 +48,10 @@ static __inline void swapfunc(char *, c */ #define swapcode(TYPE, parmi, parmj, n) { \ long i = (n) / sizeof (TYPE); \ - register TYPE *pi = (TYPE *) (parmi); \ - register TYPE *pj = (TYPE *) (parmj); \ + TYPE *pi = (TYPE *) (parmi); \ + TYPE *pj = (TYPE *) (parmj); \ do { \ - register TYPE t = *pi; \ + TYPE t = *pi; \ *pi++ = *pj; \ *pj++ = t; \ } while (--i > 0); \ Modified: head/sys/libkern/random.c ============================================================================== --- head/sys/libkern/random.c Thu Jan 12 16:44:40 2017 (r311988) +++ head/sys/libkern/random.c Thu Jan 12 17:02:29 2017 (r311989) @@ -57,7 +57,7 @@ srandom(seed) u_long random() { - register long x, hi, lo, t; + long x, hi, lo, t; /* * Compute x[n + 1] = (7^5 * x[n]) mod (2^31 - 1). Modified: head/sys/libkern/scanc.c ============================================================================== --- head/sys/libkern/scanc.c Thu Jan 12 16:44:40 2017 (r311988) +++ head/sys/libkern/scanc.c Thu Jan 12 17:02:29 2017 (r311989) @@ -37,11 +37,11 @@ __FBSDID("$FreeBSD$"); int scanc(size, cp, table, mask0) u_int size; - register const u_char *cp, table[]; + const u_char *cp, table[]; int mask0; { - register const u_char *end; - register u_char mask; + const u_char *end; + u_char mask; mask = mask0; for (end = &cp[size]; cp < end; ++cp) { Modified: head/sys/libkern/strcmp.c ============================================================================== --- head/sys/libkern/strcmp.c Thu Jan 12 16:44:40 2017 (r311988) +++ head/sys/libkern/strcmp.c Thu Jan 12 17:02:29 2017 (r311989) @@ -40,7 +40,7 @@ __FBSDID("$FreeBSD$"); */ int strcmp(s1, s2) - register const char *s1, *s2; + const char *s1, *s2; { while (*s1 == *s2++) if (*s1++ == 0) Modified: head/sys/libkern/strncpy.c ============================================================================== --- head/sys/libkern/strncpy.c Thu Jan 12 16:44:40 2017 (r311988) +++ head/sys/libkern/strncpy.c Thu Jan 12 17:02:29 2017 (r311989) @@ -43,8 +43,8 @@ char * strncpy(char * __restrict dst, const char * __restrict src, size_t n) { if (n != 0) { - register char *d = dst; - register const char *s = src; + char *d = dst; + const char *s = src; do { if ((*d++ = *s++) == 0) { From owner-svn-src-head@freebsd.org Thu Jan 12 17:18:26 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 58188CAC872; Thu, 12 Jan 2017 17:18:26 +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 27C86195E; Thu, 12 Jan 2017 17:18:26 +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 v0CHIPOt070727; Thu, 12 Jan 2017 17:18:25 GMT (envelope-from sbruno@FreeBSD.org) Received: (from sbruno@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v0CHIPnL070726; Thu, 12 Jan 2017 17:18:25 GMT (envelope-from sbruno@FreeBSD.org) Message-Id: <201701121718.v0CHIPnL070726@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: sbruno set sender to sbruno@FreeBSD.org using -f From: Sean Bruno Date: Thu, 12 Jan 2017 17:18:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r311990 - head/sys/conf X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 12 Jan 2017 17:18:26 -0000 Author: sbruno Date: Thu Jan 12 17:18:25 2017 New Revision: 311990 URL: https://svnweb.freebsd.org/changeset/base/311990 Log: Purge surprise change to sys/conf/files for ixgbe(4). Reported by: imp Modified: head/sys/conf/files Modified: head/sys/conf/files ============================================================================== --- head/sys/conf/files Thu Jan 12 17:02:29 2017 (r311989) +++ head/sys/conf/files Thu Jan 12 17:18:25 2017 (r311990) @@ -2139,8 +2139,6 @@ dev/ixgbe/ix_txrx.c optional ix inet | compile-with "${NORMAL_C} -I$S/dev/ixgbe" dev/ixgbe/ixgbe_osdep.c optional ix inet | ixv inet \ compile-with "${NORMAL_C} -I$S/dev/ixgbe" -dev/ixgbe/ixgbe_sysctl.c optional ix inet | ixv inet \ - compile-with "${NORMAL_C} -I$S/dev/ixgbe" dev/ixgbe/ixgbe_phy.c optional ix inet | ixv inet \ compile-with "${NORMAL_C} -I$S/dev/ixgbe" dev/ixgbe/ixgbe_api.c optional ix inet | ixv inet \ From owner-svn-src-head@freebsd.org Thu Jan 12 18:05:13 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D146ECADB27; Thu, 12 Jan 2017 18:05:13 +0000 (UTC) (envelope-from kan@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A0D711D99; Thu, 12 Jan 2017 18:05:13 +0000 (UTC) (envelope-from kan@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v0CI5CjU090737; Thu, 12 Jan 2017 18:05:12 GMT (envelope-from kan@FreeBSD.org) Received: (from kan@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v0CI5CYg090736; Thu, 12 Jan 2017 18:05:12 GMT (envelope-from kan@FreeBSD.org) Message-Id: <201701121805.v0CI5CYg090736@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kan set sender to kan@FreeBSD.org using -f From: Alexander Kabaev Date: Thu, 12 Jan 2017 18:05:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r311993 - head/sys/dev/nand X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 12 Jan 2017 18:05:13 -0000 Author: kan Date: Thu Jan 12 18:05:12 2017 New Revision: 311993 URL: https://svnweb.freebsd.org/changeset/base/311993 Log: Fix typo in r311971. Reported by: ohartmann at walstatt.org Modified: head/sys/dev/nand/nand_geom.c Modified: head/sys/dev/nand/nand_geom.c ============================================================================== --- head/sys/dev/nand/nand_geom.c Thu Jan 12 17:54:55 2017 (r311992) +++ head/sys/dev/nand/nand_geom.c Thu Jan 12 18:05:12 2017 (r311993) @@ -416,7 +416,7 @@ create_geom_disk(struct nand_chip *chip) snprintf(rdisk->d_ident, sizeof(rdisk->d_ident), "nand_raw: Man:0x%02x Dev:0x%02x", chip->id.man_id, chip->id.dev_id); - disk->d_rotation_rate = DISK_RR_NON_ROTATING; + rdisk->d_rotation_rate = DISK_RR_NON_ROTATING; disk_create(rdisk, DISK_VERSION); From owner-svn-src-head@freebsd.org Thu Jan 12 18:44:59 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D2A84CAB7BF; Thu, 12 Jan 2017 18:44:59 +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 A240714C5; Thu, 12 Jan 2017 18:44:59 +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 v0CIiwRZ006943; Thu, 12 Jan 2017 18:44:58 GMT (envelope-from hrs@FreeBSD.org) Received: (from hrs@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v0CIiw5v006942; Thu, 12 Jan 2017 18:44:58 GMT (envelope-from hrs@FreeBSD.org) Message-Id: <201701121844.v0CIiw5v006942@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hrs set sender to hrs@FreeBSD.org using -f From: Hiroki Sato Date: Thu, 12 Jan 2017 18:44:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r311994 - head/usr.sbin/route6d X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 12 Jan 2017 18:44:59 -0000 Author: hrs Date: Thu Jan 12 18:44:58 2017 New Revision: 311994 URL: https://svnweb.freebsd.org/changeset/base/311994 Log: - Fix dereference of NULL pointer which could cause a crash [1] - Fix memory leak due to lack of freeaddrinfo() [2] CID: 1018281 [1] CID: 1225057 [2] MFC after: 3 days Modified: head/usr.sbin/route6d/route6d.c Modified: head/usr.sbin/route6d/route6d.c ============================================================================== --- head/usr.sbin/route6d/route6d.c Thu Jan 12 18:05:12 2017 (r311993) +++ head/usr.sbin/route6d/route6d.c Thu Jan 12 18:44:58 2017 (r311994) @@ -684,6 +684,7 @@ init(void) /*NOTREACHED*/ } #endif + freeaddrinfo(res); memset(&hints, 0, sizeof(hints)); hints.ai_family = PF_INET6; @@ -699,6 +700,7 @@ init(void) /*NOTREACHED*/ } memcpy(&ripsin, res->ai_addr, res->ai_addrlen); + freeaddrinfo(res); #ifdef HAVE_POLL_H set[0].fd = ripsock; @@ -788,10 +790,17 @@ ripflush(struct ifc *ifcp, struct sockad error = sendpacket(sin6, RIPSIZE(nrt)); if (error == EAFNOSUPPORT) { /* Protocol not supported */ - tracet(1, "Could not send info to %s (%s): " - "set IFF_UP to 0\n", - ifcp->ifc_name, inet6_n2p(&ifcp->ifc_ripsin.sin6_addr)); - ifcp->ifc_flags &= ~IFF_UP; /* As if down for AF_INET6 */ + if (ifcp != NULL) { + tracet(1, "Could not send info to %s (%s): " + "set IFF_UP to 0\n", + ifcp->ifc_name, + inet6_n2p(&ifcp->ifc_ripsin.sin6_addr)); + /* As if down for AF_INET6 */ + ifcp->ifc_flags &= ~IFF_UP; + } else { + tracet(1, "Could not send info to %s\n", + inet6_n2p(&sin6->sin6_addr)); + } } } From owner-svn-src-head@freebsd.org Thu Jan 12 20:26:03 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4B241CACE7F; Thu, 12 Jan 2017 20:26:03 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1ACE71A38; Thu, 12 Jan 2017 20:26:03 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v0CKQ2pf050396; Thu, 12 Jan 2017 20:26:02 GMT (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v0CKQ2eO050395; Thu, 12 Jan 2017 20:26:02 GMT (envelope-from glebius@FreeBSD.org) Message-Id: <201701122026.v0CKQ2eO050395@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: glebius set sender to glebius@FreeBSD.org using -f From: Gleb Smirnoff Date: Thu, 12 Jan 2017 20:26:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r311995 - head/sys/vm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 12 Jan 2017 20:26:03 -0000 Author: glebius Date: Thu Jan 12 20:26:02 2017 New Revision: 311995 URL: https://svnweb.freebsd.org/changeset/base/311995 Log: Fix the contiguity once more. Modified: head/sys/vm/vnode_pager.c Modified: head/sys/vm/vnode_pager.c ============================================================================== --- head/sys/vm/vnode_pager.c Thu Jan 12 18:44:58 2017 (r311994) +++ head/sys/vm/vnode_pager.c Thu Jan 12 20:26:02 2017 (r311995) @@ -974,7 +974,7 @@ vnode_pager_generic_getpages(struct vnod #ifdef INVARIANTS KASSERT(bp->b_npages <= nitems(bp->b_pages), ("%s: buf %p overflowed", __func__, bp)); - for (int j = 1, prev = 1; j < bp->b_npages; j++) { + for (int j = 1, prev = 0; j < bp->b_npages; j++) { if (bp->b_pages[j] == bogus_page) continue; KASSERT(bp->b_pages[j]->pindex - bp->b_pages[prev]->pindex == From owner-svn-src-head@freebsd.org Thu Jan 12 21:18:45 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 062FDCAC5A6; Thu, 12 Jan 2017 21:18:45 +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 CA173143C; Thu, 12 Jan 2017 21:18:44 +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 v0CLIh3w070476; Thu, 12 Jan 2017 21:18:43 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v0CLIhVN070475; Thu, 12 Jan 2017 21:18:43 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201701122118.v0CLIhVN070475@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Thu, 12 Jan 2017 21:18:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r311996 - head/sys/kern X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 12 Jan 2017 21:18:45 -0000 Author: ian Date: Thu Jan 12 21:18:43 2017 New Revision: 311996 URL: https://svnweb.freebsd.org/changeset/base/311996 Log: Restructure the tty_drain loop so that device-busy is checked one more time after tty_timedwait() returns an error only if the error is EWOULDBLOCK; other errors cause an immediate return. This fixes the case of the tty disappearing while in tty_drain(). Reported by: pho Modified: head/sys/kern/tty.c Modified: head/sys/kern/tty.c ============================================================================== --- head/sys/kern/tty.c Thu Jan 12 20:26:02 2017 (r311995) +++ head/sys/kern/tty.c Thu Jan 12 21:18:43 2017 (r311996) @@ -166,11 +166,9 @@ tty_drain(struct tty *tp, int leaving) return (error); ttydevsw_outwakeup(tp); error = tty_timedwait(tp, &tp->t_outwait, hz / 10); - if (timeout_at == 0 && error == EWOULDBLOCK) - error = 0; - if (error != EWOULDBLOCK) - continue; - if (getsbinuptime() < timeout_at) + if (error != 0 && error != EWOULDBLOCK) + return (error); + else if (timeout_at == 0 || getsbinuptime() < timeout_at) error = 0; else if (leaving && ttyoutq_bytesused(&tp->t_outq) < bytes) { /* In close, making progress, grant an extra second. */ From owner-svn-src-head@freebsd.org Fri Jan 13 01:39:20 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8862DCACFE6; Fri, 13 Jan 2017 01:39:20 +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 3E1F21599; Fri, 13 Jan 2017 01:39:20 +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 v0D1dJDE076921; Fri, 13 Jan 2017 01:39:19 GMT (envelope-from pfg@FreeBSD.org) Received: (from pfg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v0D1dJiR076920; Fri, 13 Jan 2017 01:39:19 GMT (envelope-from pfg@FreeBSD.org) Message-Id: <201701130139.v0D1dJiR076920@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: pfg set sender to pfg@FreeBSD.org using -f From: "Pedro F. Giffuni" Date: Fri, 13 Jan 2017 01:39:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r312001 - 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-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 13 Jan 2017 01:39:20 -0000 Author: pfg Date: Fri Jan 13 01:39:19 2017 New Revision: 312001 URL: https://svnweb.freebsd.org/changeset/base/312001 Log: Remove __nonnull() attributes from x86 machine check architecture. These are of the few cases where we use the GCC non-null attributes in non-header code. As part of a review [1] of our use of such attributes we are replacing such uses of the overly aggressive GCC attribute with clang's _Nonnull attribute. In this case the attributes serve little purpose as they just don't enforce run time checks, If anything the attributes would cause NULL pointer checks to be ignored but there are no such checks so only effect is cosmetic. The references appear to be left over from code development and likely already fulfilled their purpose. Reference [1]: https://reviews.freebsd.org/D9004 Reviewed by: jhb MFC after: 3 weeks Modified: head/sys/x86/x86/mca.c Modified: head/sys/x86/x86/mca.c ============================================================================== --- head/sys/x86/x86/mca.c Thu Jan 12 22:36:25 2017 (r312000) +++ head/sys/x86/x86/mca.c Fri Jan 13 01:39:19 2017 (r312001) @@ -247,7 +247,7 @@ mca_error_mmtype(uint16_t mca_error) return ("???"); } -static int __nonnull(1) +static int mca_mute(const struct mca_record *rec) { @@ -276,7 +276,7 @@ mca_mute(const struct mca_record *rec) } /* Dump details about a single machine check. */ -static void __nonnull(1) +static void mca_log(const struct mca_record *rec) { uint16_t mca_error; @@ -415,7 +415,7 @@ mca_log(const struct mca_record *rec) printf("MCA: Misc 0x%llx\n", (long long)rec->mr_misc); } -static int __nonnull(2) +static int mca_check_status(int bank, struct mca_record *rec) { uint64_t status; @@ -482,7 +482,7 @@ mca_refill(void *context, int pending) mca_fill_freelist(); } -static void __nonnull(2) +static void mca_record_entry(enum scan_mode mode, const struct mca_record *record) { struct mca_internal *rec; From owner-svn-src-head@freebsd.org Fri Jan 13 02:11:17 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C0DA5CADB7D; Fri, 13 Jan 2017 02:11:17 +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 6A76B1529; Fri, 13 Jan 2017 02:11:17 +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 v0D2BGvR092766; Fri, 13 Jan 2017 02:11:16 GMT (envelope-from kevlo@FreeBSD.org) Received: (from kevlo@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v0D2BGUq092764; Fri, 13 Jan 2017 02:11:16 GMT (envelope-from kevlo@FreeBSD.org) Message-Id: <201701130211.v0D2BGUq092764@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kevlo set sender to kevlo@FreeBSD.org using -f From: Kevin Lo Date: Fri, 13 Jan 2017 02:11:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r312002 - in head/sys/dev/rtwn: rtl8188e rtl8192c X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 13 Jan 2017 02:11:17 -0000 Author: kevlo Date: Fri Jan 13 02:11:16 2017 New Revision: 312002 URL: https://svnweb.freebsd.org/changeset/base/312002 Log: Increase retry count to 100 in r88e_fw_cmd() and r92c_fw_cmd(). Modified: head/sys/dev/rtwn/rtl8188e/r88e_fw.c head/sys/dev/rtwn/rtl8192c/r92c_fw.c Modified: head/sys/dev/rtwn/rtl8188e/r88e_fw.c ============================================================================== --- head/sys/dev/rtwn/rtl8188e/r88e_fw.c Fri Jan 13 01:39:19 2017 (r312001) +++ head/sys/dev/rtwn/rtl8188e/r88e_fw.c Fri Jan 13 02:11:16 2017 (r312002) @@ -69,7 +69,7 @@ r88e_fw_cmd(struct rtwn_softc *sc, uint8 } /* Wait for current FW box to be empty. */ - for (ntries = 0; ntries < 50; ntries++) { + for (ntries = 0; ntries < 100; ntries++) { if (!(rtwn_read_1(sc, R92C_HMETFR) & (1 << sc->fwcur))) break; rtwn_delay(sc, 2000); Modified: head/sys/dev/rtwn/rtl8192c/r92c_fw.c ============================================================================== --- head/sys/dev/rtwn/rtl8192c/r92c_fw.c Fri Jan 13 01:39:19 2017 (r312001) +++ head/sys/dev/rtwn/rtl8192c/r92c_fw.c Fri Jan 13 02:11:16 2017 (r312002) @@ -80,7 +80,7 @@ r92c_fw_cmd(struct rtwn_softc *sc, uint8 } /* Wait for current FW box to be empty. */ - for (ntries = 0; ntries < 50; ntries++) { + for (ntries = 0; ntries < 100; ntries++) { if (!(rtwn_read_1(sc, R92C_HMETFR) & (1 << sc->fwcur))) break; rtwn_delay(sc, 2000); From owner-svn-src-head@freebsd.org Fri Jan 13 02:12:59 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id EF2C3CADD17; Fri, 13 Jan 2017 02:12: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 AFE7F19DE; Fri, 13 Jan 2017 02:12: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 v0D2CwOK092857; Fri, 13 Jan 2017 02:12:58 GMT (envelope-from cem@FreeBSD.org) Received: (from cem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v0D2Cw0j092852; Fri, 13 Jan 2017 02:12:58 GMT (envelope-from cem@FreeBSD.org) Message-Id: <201701130212.v0D2Cw0j092852@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cem set sender to cem@FreeBSD.org using -f From: "Conrad E. Meyer" Date: Fri, 13 Jan 2017 02:12:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r312003 - head/usr.sbin/fstyp X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 13 Jan 2017 02:13:00 -0000 Author: cem Date: Fri Jan 13 02:12:58 2017 New Revision: 312003 URL: https://svnweb.freebsd.org/changeset/base/312003 Log: fstyp(8): Detect exFAT filesystems Simply detect the exFAT filesystem name in the Volume Boot Record (superblock). PR: 214908 Reported by: Added: head/usr.sbin/fstyp/exfat.c (contents, props changed) Modified: head/usr.sbin/fstyp/Makefile head/usr.sbin/fstyp/fstyp.8 head/usr.sbin/fstyp/fstyp.c head/usr.sbin/fstyp/fstyp.h Modified: head/usr.sbin/fstyp/Makefile ============================================================================== --- head/usr.sbin/fstyp/Makefile Fri Jan 13 02:11:16 2017 (r312002) +++ head/usr.sbin/fstyp/Makefile Fri Jan 13 02:12:58 2017 (r312003) @@ -3,7 +3,7 @@ .include PROG= fstyp -SRCS= cd9660.c ext2fs.c fstyp.c geli.c msdosfs.c ntfs.c ufs.c +SRCS= cd9660.c exfat.c ext2fs.c fstyp.c geli.c msdosfs.c ntfs.c ufs.c .if ${MK_ZFS} != "no" SRCS += zfs.c Added: head/usr.sbin/fstyp/exfat.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/usr.sbin/fstyp/exfat.c Fri Jan 13 02:12:58 2017 (r312003) @@ -0,0 +1,77 @@ +/* + * Copyright (c) 2017 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. + */ + +#include +__FBSDID("$FreeBSD$"); + +#include +#include +#include +#include + +#include "fstyp.h" + +struct exfat_vbr { + char ev_jmp[3]; + char ev_fsname[8]; + char ev_zeros[53]; + uint64_t ev_part_offset; + uint64_t ev_vol_length; + uint32_t ev_fat_offset; + uint32_t ev_fat_length; + uint32_t ev_cluster_offset; + uint32_t ev_cluster_count; + uint32_t ev_rootdir_cluster; + uint32_t ev_vol_serial; + uint16_t ev_fs_revision; + uint16_t ev_vol_flags; + uint8_t ev_log_bytes_per_sect; + uint8_t ev_log_sect_per_clust; + uint8_t ev_num_fats; + uint8_t ev_drive_sel; + uint8_t ev_percent_used; +} __packed; + +int +fstyp_exfat(FILE *fp, char *label, size_t size) +{ + struct exfat_vbr *ev; + + ev = (struct exfat_vbr *)read_buf(fp, 0, 512); + if (ev == NULL || strncmp(ev->ev_fsname, "EXFAT ", 8) != 0) + goto fail; + + /* + * Reading the volume label requires walking the root directory to look + * for a special label file. Left as an exercise for the reader. + */ + free(ev); + return (0); + +fail: + free(ev); + return (1); +} Modified: head/usr.sbin/fstyp/fstyp.8 ============================================================================== --- head/usr.sbin/fstyp/fstyp.8 Fri Jan 13 02:11:16 2017 (r312002) +++ head/usr.sbin/fstyp/fstyp.8 Fri Jan 13 02:12:58 2017 (r312003) @@ -27,7 +27,7 @@ .\" .\" $FreeBSD$ .\" -.Dd February 28, 2016 +.Dd January 12, 2017 .Dt FSTYP 8 .Os .Sh NAME @@ -43,7 +43,7 @@ The .Nm utility is used to determine the filesystem type on a given device. -It can recognize ISO-9660, Ext2, FAT, NTFS, and UFS filesystems. +It can recognize ISO-9660, exFAT, Ext2, FAT, NTFS, and UFS filesystems. When the .Fl u flag is specified, @@ -61,6 +61,8 @@ as, respectively: .It cd9660 .It +exfat +.It ext2fs .It geli Modified: head/usr.sbin/fstyp/fstyp.c ============================================================================== --- head/usr.sbin/fstyp/fstyp.c Fri Jan 13 02:11:16 2017 (r312002) +++ head/usr.sbin/fstyp/fstyp.c Fri Jan 13 02:12:58 2017 (r312003) @@ -57,6 +57,7 @@ static struct { bool unmountable; } fstypes[] = { { "cd9660", &fstyp_cd9660, false }, + { "exfat", &fstyp_exfat, true }, { "ext2fs", &fstyp_ext2fs, false }, { "geli", &fstyp_geli, true }, { "msdosfs", &fstyp_msdosfs, false }, Modified: head/usr.sbin/fstyp/fstyp.h ============================================================================== --- head/usr.sbin/fstyp/fstyp.h Fri Jan 13 02:11:16 2017 (r312002) +++ head/usr.sbin/fstyp/fstyp.h Fri Jan 13 02:12:58 2017 (r312003) @@ -39,6 +39,7 @@ char *checked_strdup(const char *s); void rtrim(char *label, size_t size); int fstyp_cd9660(FILE *fp, char *label, size_t size); +int fstyp_exfat(FILE *fp, char *label, size_t size); int fstyp_ext2fs(FILE *fp, char *label, size_t size); int fstyp_geli(FILE *fp, char *label, size_t size); int fstyp_msdosfs(FILE *fp, char *label, size_t size); From owner-svn-src-head@freebsd.org Fri Jan 13 02:14:34 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B2FE5CADE7B; Fri, 13 Jan 2017 02:14:34 +0000 (UTC) (envelope-from cse.cem@gmail.com) Received: from mail-wm0-f67.google.com (mail-wm0-f67.google.com [74.125.82.67]) (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 4DBC71D22; Fri, 13 Jan 2017 02:14:33 +0000 (UTC) (envelope-from cse.cem@gmail.com) Received: by mail-wm0-f67.google.com with SMTP id l2so8152421wml.2; Thu, 12 Jan 2017 18:14:33 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:reply-to:in-reply-to:references :from:date:message-id:subject:to:cc; bh=V6OhUDID8fGQshKAzzuBzrTiN26ycTptzCvZYOl2mDs=; b=E2c9t+nKRn4xFU8YAtOr17xahS8hz7uSvP/zvgFIgaD14B4pYytNtG52lQJlUYHBqI lPtrOXsz1Ag0JQGrD1nzB5qwEaV8fk9C0B+6TFlPrKyO7uaoUJUNkc6bnH75KBOSymfH MwIMkIeA9O06X/B7QfeBx4cyrPpA7gQEkY36F7aDfg3TjcvxzPLiOTbv5gvWF63WC7rK R4YAjz84LwfzLJNRLoSIFqDB+Q5FXlEUTHxhB/bJgAqsDsOxX+9K6LvJNjtpaaWKHmcl hIZ5irVLKZeC8zU6SPAU0RPfe9amPAp17THujQVd4lED4DRtw5cQ9P9EFD6OXIKkztuq kgbg== X-Gm-Message-State: AIkVDXKMsT3hZ4sZjFESdsi7xC0pbCcgn0vTe2LG9iLhUl7dqc6h1Kxz2/xWk7BIwa2rRw== X-Received: by 10.223.151.138 with SMTP id s10mr9594601wrb.65.1484273671947; Thu, 12 Jan 2017 18:14:31 -0800 (PST) Received: from mail-wm0-f54.google.com (mail-wm0-f54.google.com. [74.125.82.54]) by smtp.gmail.com with ESMTPSA id e14sm516447wmd.14.2017.01.12.18.14.31 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 12 Jan 2017 18:14:31 -0800 (PST) Received: by mail-wm0-f54.google.com with SMTP id c85so45758897wmi.1; Thu, 12 Jan 2017 18:14:31 -0800 (PST) X-Received: by 10.28.6.210 with SMTP id 201mr223428wmg.85.1484273671619; Thu, 12 Jan 2017 18:14:31 -0800 (PST) MIME-Version: 1.0 Reply-To: cem@freebsd.org Received: by 10.194.29.72 with HTTP; Thu, 12 Jan 2017 18:14:31 -0800 (PST) In-Reply-To: <201701130212.v0D2Cw0j092852@repo.freebsd.org> References: <201701130212.v0D2Cw0j092852@repo.freebsd.org> From: Conrad Meyer Date: Thu, 12 Jan 2017 18:14:31 -0800 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: svn commit: r312003 - head/usr.sbin/fstyp To: svn-src-head@freebsd.org Cc: src-committers , svn-src-all@freebsd.org Content-Type: text/plain; charset=UTF-8 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 13 Jan 2017 02:14:34 -0000 Forgot to mention: Documentation: https://www.sans.org/reading-room/whitepapers/forensics/reverse-engineering-microsoft-exfat-file-system-33274 Images for testing: http://www.cfreds.nist.gov/dfr-test-images.html (raw disk images, include partition tables) On Thu, Jan 12, 2017 at 6:12 PM, Conrad E. Meyer wrote: > Author: cem > Date: Fri Jan 13 02:12:58 2017 > New Revision: 312003 > URL: https://svnweb.freebsd.org/changeset/base/312003 > > Log: > fstyp(8): Detect exFAT filesystems > > Simply detect the exFAT filesystem name in the Volume Boot Record > (superblock). > > PR: 214908 > Reported by: > > Added: > head/usr.sbin/fstyp/exfat.c (contents, props changed) > Modified: > head/usr.sbin/fstyp/Makefile > head/usr.sbin/fstyp/fstyp.8 > head/usr.sbin/fstyp/fstyp.c > head/usr.sbin/fstyp/fstyp.h > > Modified: head/usr.sbin/fstyp/Makefile > ============================================================================== > --- head/usr.sbin/fstyp/Makefile Fri Jan 13 02:11:16 2017 (r312002) > +++ head/usr.sbin/fstyp/Makefile Fri Jan 13 02:12:58 2017 (r312003) > @@ -3,7 +3,7 @@ > .include > > PROG= fstyp > -SRCS= cd9660.c ext2fs.c fstyp.c geli.c msdosfs.c ntfs.c ufs.c > +SRCS= cd9660.c exfat.c ext2fs.c fstyp.c geli.c msdosfs.c ntfs.c ufs.c > > .if ${MK_ZFS} != "no" > SRCS += zfs.c > > Added: head/usr.sbin/fstyp/exfat.c > ============================================================================== > --- /dev/null 00:00:00 1970 (empty, because file is newly added) > +++ head/usr.sbin/fstyp/exfat.c Fri Jan 13 02:12:58 2017 (r312003) > @@ -0,0 +1,77 @@ > +/* > + * Copyright (c) 2017 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. > + */ > + > +#include > +__FBSDID("$FreeBSD$"); > + > +#include > +#include > +#include > +#include > + > +#include "fstyp.h" > + > +struct exfat_vbr { > + char ev_jmp[3]; > + char ev_fsname[8]; > + char ev_zeros[53]; > + uint64_t ev_part_offset; > + uint64_t ev_vol_length; > + uint32_t ev_fat_offset; > + uint32_t ev_fat_length; > + uint32_t ev_cluster_offset; > + uint32_t ev_cluster_count; > + uint32_t ev_rootdir_cluster; > + uint32_t ev_vol_serial; > + uint16_t ev_fs_revision; > + uint16_t ev_vol_flags; > + uint8_t ev_log_bytes_per_sect; > + uint8_t ev_log_sect_per_clust; > + uint8_t ev_num_fats; > + uint8_t ev_drive_sel; > + uint8_t ev_percent_used; > +} __packed; > + > +int > +fstyp_exfat(FILE *fp, char *label, size_t size) > +{ > + struct exfat_vbr *ev; > + > + ev = (struct exfat_vbr *)read_buf(fp, 0, 512); > + if (ev == NULL || strncmp(ev->ev_fsname, "EXFAT ", 8) != 0) > + goto fail; > + > + /* > + * Reading the volume label requires walking the root directory to look > + * for a special label file. Left as an exercise for the reader. > + */ > + free(ev); > + return (0); > + > +fail: > + free(ev); > + return (1); > +} > > Modified: head/usr.sbin/fstyp/fstyp.8 > ============================================================================== > --- head/usr.sbin/fstyp/fstyp.8 Fri Jan 13 02:11:16 2017 (r312002) > +++ head/usr.sbin/fstyp/fstyp.8 Fri Jan 13 02:12:58 2017 (r312003) > @@ -27,7 +27,7 @@ > .\" > .\" $FreeBSD$ > .\" > -.Dd February 28, 2016 > +.Dd January 12, 2017 > .Dt FSTYP 8 > .Os > .Sh NAME > @@ -43,7 +43,7 @@ > The > .Nm > utility is used to determine the filesystem type on a given device. > -It can recognize ISO-9660, Ext2, FAT, NTFS, and UFS filesystems. > +It can recognize ISO-9660, exFAT, Ext2, FAT, NTFS, and UFS filesystems. > When the > .Fl u > flag is specified, > @@ -61,6 +61,8 @@ as, respectively: > .It > cd9660 > .It > +exfat > +.It > ext2fs > .It > geli > > Modified: head/usr.sbin/fstyp/fstyp.c > ============================================================================== > --- head/usr.sbin/fstyp/fstyp.c Fri Jan 13 02:11:16 2017 (r312002) > +++ head/usr.sbin/fstyp/fstyp.c Fri Jan 13 02:12:58 2017 (r312003) > @@ -57,6 +57,7 @@ static struct { > bool unmountable; > } fstypes[] = { > { "cd9660", &fstyp_cd9660, false }, > + { "exfat", &fstyp_exfat, true }, > { "ext2fs", &fstyp_ext2fs, false }, > { "geli", &fstyp_geli, true }, > { "msdosfs", &fstyp_msdosfs, false }, > > Modified: head/usr.sbin/fstyp/fstyp.h > ============================================================================== > --- head/usr.sbin/fstyp/fstyp.h Fri Jan 13 02:11:16 2017 (r312002) > +++ head/usr.sbin/fstyp/fstyp.h Fri Jan 13 02:12:58 2017 (r312003) > @@ -39,6 +39,7 @@ char *checked_strdup(const char *s); > void rtrim(char *label, size_t size); > > int fstyp_cd9660(FILE *fp, char *label, size_t size); > +int fstyp_exfat(FILE *fp, char *label, size_t size); > int fstyp_ext2fs(FILE *fp, char *label, size_t size); > int fstyp_geli(FILE *fp, char *label, size_t size); > int fstyp_msdosfs(FILE *fp, char *label, size_t size); > From owner-svn-src-head@freebsd.org Fri Jan 13 03:33:59 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6F940CADF75; Fri, 13 Jan 2017 03:33:59 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D90E51301; Fri, 13 Jan 2017 03:33:58 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v0D3XwKJ026404; Fri, 13 Jan 2017 03:33:58 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v0D3XvWJ026399; Fri, 13 Jan 2017 03:33:57 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201701130333.v0D3XvWJ026399@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Fri, 13 Jan 2017 03:33:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r312008 - in head: contrib/netbsd-tests contrib/netbsd-tests/crypto/libcrypto contrib/netbsd-tests/dev/audio contrib/netbsd-tests/dev/cgd contrib/netbsd-tests/fs/ffs contrib/netbsd-test... X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 13 Jan 2017 03:33:59 -0000 Author: ngie Date: Fri Jan 13 03:33:57 2017 New Revision: 312008 URL: https://svnweb.freebsd.org/changeset/base/312008 Log: Upgrade NetBSD tests to 01.11.2017_23.20 snapshot This contains some new testcases in /usr/tests/...: - .../lib/libc - .../lib/libthr - .../lib/msun - .../sys/kern Tested on: amd64, i386 MFC after: 1 month Added: head/contrib/netbsd-tests/dev/cgd/t_cgd_3des.c - copied unchanged from r311966, vendor/NetBSD/tests/dist/dev/cgd/t_cgd_3des.c head/contrib/netbsd-tests/dev/cgd/t_cgd_aes.c - copied unchanged from r311966, vendor/NetBSD/tests/dist/dev/cgd/t_cgd_aes.c head/contrib/netbsd-tests/dev/cgd/t_cgd_blowfish.c - copied unchanged from r311966, vendor/NetBSD/tests/dist/dev/cgd/t_cgd_blowfish.c head/contrib/netbsd-tests/kernel/msg.h - copied unchanged from r311966, vendor/NetBSD/tests/dist/kernel/msg.h head/contrib/netbsd-tests/kernel/t_ptrace.c - copied unchanged from r311966, vendor/NetBSD/tests/dist/kernel/t_ptrace.c head/contrib/netbsd-tests/kernel/t_ptrace_wait.c - copied unchanged from r311966, vendor/NetBSD/tests/dist/kernel/t_ptrace_wait.c head/contrib/netbsd-tests/kernel/t_ptrace_wait.h - copied unchanged from r311966, vendor/NetBSD/tests/dist/kernel/t_ptrace_wait.h head/contrib/netbsd-tests/kernel/t_ptrace_wait3.c - copied unchanged from r311966, vendor/NetBSD/tests/dist/kernel/t_ptrace_wait3.c head/contrib/netbsd-tests/kernel/t_ptrace_wait4.c - copied unchanged from r311966, vendor/NetBSD/tests/dist/kernel/t_ptrace_wait4.c head/contrib/netbsd-tests/kernel/t_ptrace_wait6.c - copied unchanged from r311966, vendor/NetBSD/tests/dist/kernel/t_ptrace_wait6.c head/contrib/netbsd-tests/kernel/t_ptrace_waitid.c - copied unchanged from r311966, vendor/NetBSD/tests/dist/kernel/t_ptrace_waitid.c head/contrib/netbsd-tests/kernel/t_ptrace_waitpid.c - copied unchanged from r311966, vendor/NetBSD/tests/dist/kernel/t_ptrace_waitpid.c head/contrib/netbsd-tests/lib/libc/sys/t_clock_nanosleep.c - copied unchanged from r311966, vendor/NetBSD/tests/dist/lib/libc/sys/t_clock_nanosleep.c head/contrib/netbsd-tests/lib/libc/sys/t_wait_noproc.c - copied, changed from r311966, vendor/NetBSD/tests/dist/lib/libc/sys/t_wait_noproc.c head/contrib/netbsd-tests/lib/libc/sys/t_wait_noproc_wnohang.c - copied unchanged from r311966, vendor/NetBSD/tests/dist/lib/libc/sys/t_wait_noproc_wnohang.c head/contrib/netbsd-tests/lib/libm/t_casinh.c - copied unchanged from r311970, vendor/NetBSD/tests/dist/lib/libm/t_casinh.c head/contrib/netbsd-tests/lib/libm/t_fe_round.c - copied unchanged from r311970, vendor/NetBSD/tests/dist/lib/libm/t_fe_round.c head/contrib/netbsd-tests/lib/libm/t_ilogb.c - copied, changed from r311970, vendor/NetBSD/tests/dist/lib/libm/t_ilogb.c head/contrib/netbsd-tests/lib/libpthread/t_timedmutex.c - copied unchanged from r311970, vendor/NetBSD/tests/dist/lib/libpthread/t_timedmutex.c head/contrib/netbsd-tests/net/net/t_mtudisc.sh - copied unchanged from r311966, vendor/NetBSD/tests/dist/net/net/t_mtudisc.sh head/contrib/netbsd-tests/net/net/t_mtudisc6.sh - copied unchanged from r311966, vendor/NetBSD/tests/dist/net/net/t_mtudisc6.sh head/contrib/netbsd-tests/net/net/t_ping6_opts.sh - copied unchanged from r311966, vendor/NetBSD/tests/dist/net/net/t_ping6_opts.sh head/contrib/netbsd-tests/net/net_common.sh - copied unchanged from r311966, vendor/NetBSD/tests/dist/net/net_common.sh head/contrib/netbsd-tests/usr.bin/xlint/lint1/d_c99_anon_union.c - copied unchanged from r311966, vendor/NetBSD/tests/dist/usr.bin/xlint/lint1/d_c99_anon_union.c head/contrib/netbsd-tests/usr.bin/xlint/lint1/d_c99_union_cast.c - copied unchanged from r311966, vendor/NetBSD/tests/dist/usr.bin/xlint/lint1/d_c99_union_cast.c Modified: head/contrib/netbsd-tests/crypto/libcrypto/t_libcrypto.sh head/contrib/netbsd-tests/crypto/libcrypto/t_pubkey.sh head/contrib/netbsd-tests/dev/audio/h_pad.c head/contrib/netbsd-tests/dev/audio/t_pad_output.bz2.uue head/contrib/netbsd-tests/fs/ffs/ffs_common.sh head/contrib/netbsd-tests/fs/fifofs/t_fifo.c head/contrib/netbsd-tests/fs/psshfs/t_psshfs.sh head/contrib/netbsd-tests/fs/puffs/t_basic.c head/contrib/netbsd-tests/fs/vfs/t_vnops.c head/contrib/netbsd-tests/h_macros.h head/contrib/netbsd-tests/kernel/t_mqueue.c head/contrib/netbsd-tests/lib/libc/arch/sparc64/exec_prot_support.c head/contrib/netbsd-tests/lib/libc/arch/sparc64/return_one.S head/contrib/netbsd-tests/lib/libc/db/h_db.c head/contrib/netbsd-tests/lib/libc/db/t_db.sh head/contrib/netbsd-tests/lib/libc/gen/t_dir.c head/contrib/netbsd-tests/lib/libc/gen/t_fnmatch.c head/contrib/netbsd-tests/lib/libc/rpc/t_rpc.c head/contrib/netbsd-tests/lib/libc/string/t_memcpy.c head/contrib/netbsd-tests/lib/libc/string/t_memmem.c head/contrib/netbsd-tests/lib/libc/sync/cpp_atomic_ops_linkable.cc head/contrib/netbsd-tests/lib/libc/sys/t_getrusage.c head/contrib/netbsd-tests/lib/libm/t_ldexp.c head/contrib/netbsd-tests/lib/libm/t_precision.c head/contrib/netbsd-tests/lib/libpthread/h_common.h head/contrib/netbsd-tests/lib/libpthread/t_mutex.c head/contrib/netbsd-tests/lib/librumpclient/h_execthr.c head/contrib/netbsd-tests/lib/librumphijack/t_tcpip.sh head/contrib/netbsd-tests/lib/libusbhid/t_usbhid.c head/contrib/netbsd-tests/net/arp/t_arp.sh head/contrib/netbsd-tests/net/arp/t_dad.sh head/contrib/netbsd-tests/net/icmp/t_icmp6_redirect.sh head/contrib/netbsd-tests/net/icmp/t_icmp_redirect.sh head/contrib/netbsd-tests/net/if/t_compat.c head/contrib/netbsd-tests/net/if/t_ifconfig.sh head/contrib/netbsd-tests/net/if_bridge/t_bridge.sh head/contrib/netbsd-tests/net/if_gif/t_gif.sh head/contrib/netbsd-tests/net/if_pppoe/t_pppoe.sh head/contrib/netbsd-tests/net/if_tap/t_tap.sh head/contrib/netbsd-tests/net/mcast/t_mcast.sh head/contrib/netbsd-tests/net/ndp/t_dad.sh head/contrib/netbsd-tests/net/ndp/t_ndp.sh head/contrib/netbsd-tests/net/ndp/t_ra.sh head/contrib/netbsd-tests/net/net/t_forwarding.sh head/contrib/netbsd-tests/net/net/t_ipaddress.sh head/contrib/netbsd-tests/net/net/t_ipv6_lifetime.sh head/contrib/netbsd-tests/net/net/t_ipv6address.sh head/contrib/netbsd-tests/net/route/t_change.sh head/contrib/netbsd-tests/net/route/t_flags.sh head/contrib/netbsd-tests/net/route/t_flags6.sh head/contrib/netbsd-tests/net/route/t_route.sh head/contrib/netbsd-tests/rump/modautoload/t_modautoload.c head/contrib/netbsd-tests/rump/rumpkern/t_lwproc.c head/contrib/netbsd-tests/sys/net/t_print.c head/contrib/netbsd-tests/usr.bin/config/t_config.sh head/contrib/netbsd-tests/usr.bin/netpgpverify/t_netpgpverify.sh head/lib/libc/tests/db/Makefile head/lib/libc/tests/gen/Makefile head/lib/libc/tests/sys/Makefile head/lib/libthr/tests/Makefile head/lib/msun/tests/Makefile Directory Properties: head/contrib/netbsd-tests/ (props changed) Modified: head/contrib/netbsd-tests/crypto/libcrypto/t_libcrypto.sh ============================================================================== --- head/contrib/netbsd-tests/crypto/libcrypto/t_libcrypto.sh Fri Jan 13 03:30:29 2017 (r312007) +++ head/contrib/netbsd-tests/crypto/libcrypto/t_libcrypto.sh Fri Jan 13 03:33:57 2017 (r312008) @@ -1,4 +1,4 @@ -# $NetBSD: t_libcrypto.sh,v 1.3 2010/11/08 19:06:12 pooka Exp $ +# $NetBSD: t_libcrypto.sh,v 1.4 2016/10/13 09:25:37 martin Exp $ # # Copyright (c) 2008, 2009, 2010 The NetBSD Foundation, Inc. # All rights reserved. @@ -49,7 +49,7 @@ atf_test_case bn bn_head() { atf_set "descr" "Checks BIGNUM library" - atf_set "timeout" "300" + atf_set "timeout" "360" } bn_body() { Modified: head/contrib/netbsd-tests/crypto/libcrypto/t_pubkey.sh ============================================================================== --- head/contrib/netbsd-tests/crypto/libcrypto/t_pubkey.sh Fri Jan 13 03:30:29 2017 (r312007) +++ head/contrib/netbsd-tests/crypto/libcrypto/t_pubkey.sh Fri Jan 13 03:33:57 2017 (r312008) @@ -1,4 +1,4 @@ -# $NetBSD: t_pubkey.sh,v 1.3 2011/06/09 05:25:21 spz Exp $ +# $NetBSD: t_pubkey.sh,v 1.4 2016/10/13 09:25:37 martin Exp $ # # Copyright (c) 2008, 2009, 2010 The NetBSD Foundation, Inc. # All rights reserved. @@ -49,7 +49,7 @@ atf_test_case rsa rsa_head() { atf_set "descr" "Checks RSA" - atf_set "timeout" "300" + atf_set "timeout" "420" } rsa_body() { @@ -60,7 +60,7 @@ atf_test_case ec ec_head() { atf_set "descr" "Checks EC cipher" - atf_set "timeout" "300" + atf_set "timeout" "480" } ec_body() { @@ -81,7 +81,7 @@ atf_test_case ecdsa ecdsa_head() { atf_set "descr" "Checks ECDSA algorithm" - atf_set "timeout" "300" + atf_set "timeout" "480" } ecdsa_body() { Modified: head/contrib/netbsd-tests/dev/audio/h_pad.c ============================================================================== --- head/contrib/netbsd-tests/dev/audio/h_pad.c Fri Jan 13 03:30:29 2017 (r312007) +++ head/contrib/netbsd-tests/dev/audio/h_pad.c Fri Jan 13 03:33:57 2017 (r312008) @@ -1,4 +1,4 @@ -/* $NetBSD: h_pad.c,v 1.1 2010/08/04 13:15:15 pooka Exp $ */ +/* $NetBSD: h_pad.c,v 1.2 2016/10/15 07:08:06 nat Exp $ */ /* * Copyright (c) 2010 Antti Kantee. All Rights Reserved. @@ -56,14 +56,14 @@ main(int argc, char *argv[]) ssize_t n; rump_init(); - audiofd = rump_sys_open("/dev/audio0", O_RDWR); - if (audiofd == -1) - err(1, "open audio"); - padfd = rump_sys_open("/dev/pad0", O_RDONLY); if (padfd == -1) err(1, "open pad"); + audiofd = rump_sys_open("/dev/audio0", O_RDWR); + if (audiofd == -1) + err(1, "open audio"); + if ((n = rump_sys_write(audiofd, musa, sizeof(musa))) != sizeof(musa)) err(1, "write"); Modified: head/contrib/netbsd-tests/dev/audio/t_pad_output.bz2.uue ============================================================================== --- head/contrib/netbsd-tests/dev/audio/t_pad_output.bz2.uue Fri Jan 13 03:30:29 2017 (r312007) +++ head/contrib/netbsd-tests/dev/audio/t_pad_output.bz2.uue Fri Jan 13 03:33:57 2017 (r312008) @@ -1,1035 +1,1040 @@ begin 644 t_pad_output.bz2 -M0EIH.3%!629369%IQ#X`MT#FU'+1O7<;MT;NYNNYW<[N[OO;K>W7+>^Y[M;[LV]??=M] -MYZ[MMMO>WO;6=W.KIOKNUF:EFEJVK5I"+:J;8:B5K1JJIJVUJV,K6IK5MJJ6 -M--%5FJLS55K158M5K:U5FU4RVMJ(K0BK-6Q0-L+6JVLJ6MK559M5556*M54J -MJMIMFS-"U6LJRUBRJJRV;55::M6U[G=0JI5-4W66J=KVZ]LNW=]W=FW=S;YM -MDO<]LW>Z[WW%E@WUOD-[G!SN<'=W$CD8@[KN<36:PVO=W;*I*E%4SC -MV]XE)5!54*"@*JJMH)J0H*`4&V4`!11(``!4BJI27O>Z(]5()`22)**%4``I -M0`!*B5`D(DB*5@:5``AH`"8F3"8`F0#3(Q,FF@#1H&(&C)H-#3330!ID,C`C -M!-,F)IIA`TQ-,!,33$831@@R9&$T`!,`@TD@FC$``````&@```:-`3`F$P0T -M,$!@`$``#03T!H-`U,`33$TTQJ-,$P$P%/$R8",!-02FDI"!$QJ>S,`0`$!H -M:!#":$Q-,28$V@0-`34]$:;*:>D]1I[0H'HGDRC:AD&@]0&@/4`]0R`R,AH- -M!H`VHS2`:`(4E)*)&R>J-^GBGL!2,:::2;48GI$IO%)Y)Y)[3TE/U1^FFC*C -MQ&H>IZC$T,AIZAZF31H>4``'J!DTTT---```#U```-`9#0T``T!(I((28-)B -M>A3TTF>14]3VT&IJ>R,@F$TQ'DT3&@FU3\4GFDT>J>333&IBFTPF$T]$-,32 -MGM-4]IDTR)ZI^1I3V332;(93-4_5/R>D#":GDU-D:FIZ>IM3U-HTH)-25)%1 -MM3:3]L/-2$FWD4S4U-B:::FB;4V3"4_4R4>H>U0;4]JGJ&33T]4T`#(T-&0] -M0!HT-`_5`!Z@T````9!IH:```````_Q$/Z:,D&8X$&L.'B.D00+!M12TQ2"> -MGH4)$$U776'(,NA5T"`@H&+#%`;<'^;2<4$`CK#I>?6\SY]KTOQX,LDD%=#] -M=K=W[.S5.*PD:9EE+#8V,8RRL@"_3]+%\'Y\OE<[XY25)9,&QL(&#!(B3@T. -MCTYNF5=LVA0D0'QD+"T]J]AX/R0)P"P$\13QX$Q,/GR(O5_U5.R7J.DE`0K( -MEC0PL$_ONQ0)A@@60_";^_OE&;Q_:\_3BPGL8?\=O:KUNG!-MF0A03X9PPMX -MF'WE;&SK)O(N2J"`80_J9Y6*=6(?DZ7*_=I%;(JB,Q$/X5S@P$*M6IZ6$>F. -M&L;Y&C($S\KC'O`Q#')%M:;\FTP-4ET5[;UV7JU<$0D7*H[&KC\]MFO+$`\& -MK%L^,?8,8N-=10VF1`%ZT<0V#-6C#OCSQ<+:D1!\*'M+14@>!P\/!T&+LDA` -MM>S!`Y))"PU-A7RRF1#XLD2TAAXFXPES0HB!="\G,MI5;+<6\:#8!?:^9F[% -ME',L8MFO;T)7.GR!;_`/D0:1+;UF7Y[3=J&V"``O/U.NE!"#*9$.X86#N,8I -M`#2>Y2VR.+WM3?[`$7UIE`R.12-/ADE3=;A$1!:]O_:**7`0NS1[]JFWB&;, -M9H]?3J1$29(D`##!T*ZI]K?Y2?W`!+<"-:V[)FM&)64CY`27=R&1(43Q0:.3 -M57.RL\G5'0B!%DUBC6R2:/8GH36'00V/_3FF$$BHG7;+O%I3X!8&S2LK'/>1 -M8OS=Z#;4Y$43X>>W=G@!;JCZJXZ+CG@"_SV[O7ZI=P8DJ:+_5D',I4)`;G=/ -M'LMX@K6`@UZ4;>CQD0!>G1L^>LPH@:>W<=.CS^7@)?+I``+POTESZ]3/ZA2! -M75?3@*BYG9V,AZN4Q4&IJ@(<=6[N*2:B4T)ITB]VC:@%[*8[4SK5EZR_]5WDD@B*BP]Z -MM&`(P"9NX?<(%_4:IX/(`!5M=`Y*J0ALV/=9UEH,?/)])PN4S.3Q*JX(OE@. -M2:Z?"+C-^RQK#(AH^YZF'"(N4H(.K.`QOV&@=HI"`,-P0@1,W5)#ZE916Z/V -MDMCV8^`4YS\-7R*L!D&Y@OT/@[O\HB+8?+K:EP*>6KQIHI#9&]*\I@AOG`B[ -ME!(1^\3.":TV[8($^"X\PV,D"7'@5IA -M_&HS5?4^K5(@17-'D>"%FJ8^%HE-%-GP07=Y"M@$+JL?O=<_H_;+X"$$)/+$ -M(#&Y%>VSVDIS6@!!PH[W&3U(!SXV;RV<\".VZ\"A!%NDZM&LY*JMTR0+GH5% -M-UD0(OWQ1PM=G=;!V2D>(AEP2@)MH6&EBU77QS:R7B0`5P)?N)=]4'"%!``L -M6>;IEY>3]?^J#F8Y((@VJ'9(3=(Y;EL/U*W3_M""&*6LOPA)`2G2\;XHZ?,1 -MN@9?--I!`7BU)`)6&?V2\RV=GPPO_+AI`13_]&!9NI8WF&D8=EAD>=1@A]-M -M2*,@.#^UP_^]`1,'Y@7\>&O=GPWW86]K`46*"9"107H9R&2FIS4QC(C9?S9E -M0`/+,`K\G03>F3F0D&K]O^I"WC##9]90$6;P/K*\,L":#V^TRY\OGS?!Z.>D -M($R4A>S*K^+BN!7^#D(`!):^.YO0(#Y_7L:3*O#7:[G5>S#2DD#:[ZDW8'GX -M2)284[['@*/]+TCLR$C2\R=8*W5,5CI?!P%6`2B(:+04!>;6K6S6]](_;T]*B(`QH.-:D+F0Y(DOX[O8A^D&ZOMFWV'@4'P8^/`G6' -M4MT7D&'K95`"'TM;8HC'LCRM8)T%MM8^D+N/=;2(V#3NCX`4ISMR_2ZY!(<< -MODMH/*.`-_8\FLT9T`6L6N;B -ML+\].#\V8R;3BE920@#2V1+PA(E.R3ONAYKUN//A^GSGB+*OAX\D`:G4 -M:N6A>'`4Q\%%^V;+*\"K@=4D2`OFKMZ-$0*_[`*>S-)N7WOTB9UK:P8!A_-* -M!#IK6Q(LWF_4F>(UJO>>(9:Z7`0D,+EMF0/N3>?#*1()V)O8Z86&8^!<^ZRS=X!-^V>ZVP;`ZT!\%Z,_M4O]>(!*Q -M%78V.MY[N[_RBAL(JLA?)W_"-+S/ZED0 -M;/3I;2@T6N\'?(;S])2EU,C6-+$@`&SZ+)688"[5QVM98;-GB%YN\`AY&9IE -MW6!=**T2J@+$5]."ANQ]8K\>S;J0'=Q541?&&5H]>H.:O/8H/BC(H+5TL-!% -MC&+N0$H<`3/0LN='R;P@R<.!'<-C*;7FPP#W3-Z"8=_X,P_=A -MXHKO&(2"G=D,QU$C((T6%6GP&!#S"XF5-4V6YAT`'5EB!2_H5R+\+"TB'N$` -M+T%X4&3]-]G#I0>*@2%GIH7 -MSW9O]0D`OIGB+^\1)&P36=Y]RD/%JD1%"5@`[_O_LUM7*JV1\K6;+I3/![/Q -M.#`S2;N_U[:(B>+8XRN,SF.'J%WW8:0"&DUMP7D:"XONX&O-1"LFTT^RG -MR+S^5?!8/;3Y9K[##DDM+1(B+E*B/MD%:Y4H%W4-P>!,]+^'3!:;H\PZRRFC -M,*N]1$`Y3OHLIC/@I?18G7MEW5J04*WZE9NVEJCX]O3A@!"*.^XTQR#K_H+B -MK`_GST-]:GHOXGP6;!7_\>WC/V4[-<>[Y"(A'>SUX`+BNS=W40.$/SF;@#%7 -M/G9ZN`.E)(9E.O"`OX'_/=0TANWS\@%ZGZ"Q`@[-KB[#G4C"?(+B9O2!?3V? -MU(RWC7&#H]VG6T@"3_+P0#-+4"/+:-K195`'/]=0!>5EY/E\%"0EO%WYN;I\ -M,!92L^L[-@(=H^*F`-%2+>M'^T?2W -M'C:U,6=Z7MD- -M!S,3Y&RP>BX!RT^M!(O4_R)^"A]\?+TU4;M'@"5;;:ZIS@]DEP@`GW#)=.K] -MO\7W&3'^J?:TH`>FSXA%M?%/2O67]%.K"6EKOD22)U:K(B^/TNND%OAGR,>$A17>EHS;U89'SEZ,TK*[C@G2H>W_/QJP2&S5GGO -MJE2]X=O]U=K22`\/)G.A*\;1D5Y8TB9-1"S]]V@!)?#_OC6ZNP(-L@?M71N) -MF5SY`+]]\X//8((6RI`6'=Q>`,79HH,_*7BDQ5B$ -MF#C;\$,9E\_=O%KQ8180+*XJ:0$1[TM:]]/]?3>UY$I,\SDOR,#I1E=JFS"! -M)D6KO$6H8D4OU,[!)!$>B\C[>U3$!Z^KJW(<\.5K:U&!G41!!%$5_Y/6QC+5MNVCN4"&]Z]DJO`(9_'6]7?*ZF8/$&+R1H`D$,1>.+._G@W*)DDB;]VG`*5YF7 -MWD]IU[X\&5T,-")):A_]LR"]=;MJN5!LX6;D=]@@KQ`@^-G`>;-=H$6+3?0; -MYG3YLP?<=K)H?)5`"JW_5R6!`Q9OZ8Z#_17/+4<,$0*_:]M -M['1B(#.(QC+-;7CH'N\LREOH(>W0-/OY\=&_S[F9)"7_77XA@06;X>OJ&IOK -M]_"/D$]\6"(#S']/.AK:OAKS"CC7-%WN:`*S+_$Q\,^Z5>:9-EA;.ZD`(GSF -MIQ:L*`\3U-]F](KQ2F<&;.+!Y/Y?&`$JI5%RF94'0/-]9,`:CO;'C<7'S6Y/ -MC(IK?C@3Z*)/UJ'6-^%6!`"074SY(^7^GX$0[^K\-)/;:';#_=4R9TB+O0^G -M[]]7D3#&W$Q$WJ'_>WZV-KK`!WGEP^O)3UHKSY6'>%*ZJN$_$'M>40"Y'4TKT[6!UHFC)`&?/)6ALNE4_=YKB+#=*OU0?%/4DSB6RY5I(*1T -MBS_(D<8`16E0,O"KK9W:_/'P9`7LW2]VZ=L6P&CX1W4GLP1+"_P[R>#N[U"/ -M6WJ(6I\K#MUC,*=$& -M1:KI+^\1_-\P/5`$`\H[779:X^25NX"RC<8`-!NW(+E)7#8<-$0NNC.=8%;Y -M""W5''H1A\USP=7IXRZHLP`5SU[KII-+72^YR&2"Z82`/&[YW!C^'UK5S(MO -MW&B.-PG"G%8BH=8XL2#/=7#/E$X>/AR(5Z^AT]%#>CG.$(E5&]2?[<@D>*0/ -MLZ<&PTK&10ST<\S7A0!X<3B>_3^EJE_\RHP"TFVYCEX^77UK9&C9T20A*]99 -M7K6E``:<-TKEE8"N>WK92J@43N+VH+CGZ#],-YHU(37CX]<0)-RJOCFS%/>< -MAQN%3[ZBT6R(:O24[5N6@(0PW=6K8XBYT._;F*0;7N`AGO:TU&>^N%)?1CJ+ -MGA$!F/HR`O_,-OQ]:S+*EE+7F; -M)8:Y8$Z23!0[=.AU<55;Y+G00EZ:%X+;4.QH1$7K^V(=S>;QJF5!%*(66:M6 -M[]<2>?+NA5:@B'.L/3K#D=IF8CCD"I:=]2]C(V:VB`Z -MOS\_5M\P`2K/>9)C:#G,^D1A32(@7>9.&JW(0D0'@NOJ*)ZVW.3&/)46P09QKXZA5D`53`!D=\)LX*R1 -M!$VM(PTC]$J02F,8P,".;C\K*?9X_7%;MH6>P6<2HYV8U=JFL3)L0P;&-M=6 -MQ"QWM=K46:O@8B=]_\<9C+E\'NRM?3;$*AU\"9&FVFFQH!@"],<7:RQP[:(X -M(.&1#:N&(>`2H-SY3E0:Q```RU<;/1R="%-3!('Y%^`@'U3/^:?U'4DDD^2K -M_QSJ>F@<3(!_5_39XX%+[S0)3Q!$2G$(CR,W5,0ALWVR5@^PNW\Z?G(" -M`E5V)'F?/MYL@H'05?I>U/0;5$JNX(9@PLAMWF/]5Y=G2)KZA/W]\6KGP7TW -M=W;`93G$(W[@47APG.]9PXDV619K+/GQ=Y"H#*8MA2K<.U0:]J -M:[P_S0(`0S@3L$R/6W=-GT;+A'"+='OL8`Z36_XSN)T+M;(@*I\0Q$P[W.QU -M75`U^S3T[*WDD"J.S-BXH)4"-NVA`QPE7A^H`7^G#K^Y#]GW?Z@6;MLN!LH;Y8V[TBAUSY!77`-3DZ).?CA%NN(3U]N[8L)PO7=2[[? -MK?+IP4G)+./7E[L39T%%XY?YT$-0U[8TLY4Z3UDGQ6P.(=`BEAE9/#\#15F/ -M`>_ME9OM"".@E3DR84IGAU)L@Y9W1:M_[OX_)?[G)6:Y=`;!--*(GTMVGOC@ -M"M.:85V$\*TYC78\0T]2+KO*6=_-F75H3!"RI[5E%MF-L:((=8,M2&70#ZW- -M$O9J/0@H[BV!#T_DCO-3-M>J1$32[58X'"UIXHV&4I<18I##UHY6XXEJN&P/ -M[+_)I,DH:BVYVQQZ_O,X=!-]/8)XA,][37V[KG"[%TA.S(Y(\1:.1<'+8>P! -MTC2B]U(SYL#9%1^*\-#T-R]I/8`]M.T2RK3'>,$!HM`\3#=>9@\`-?GY`S\] -M'^7GF;T%I/11:4V6BU8@[1!]C9"PV\A^?P9`WL8!?79D"YCUK:`64G<=<^![ -MM#C.5F/_>8BBW!5>]G?,QPK`MOE8>+$X\S@'%B3EB66;K,\3Q-+A\#K:&\@;TVTVP'I=^: -MY=HX3U'3"E-E/-<7;]7*'2RO(T-)_@5+]/#*EW,7;/R1#'2:/\X@06H4X2+? -M`);^=S>ZPX(A-FAP#!KYMMM\W+;4D_I/>>`'+KI;G\$G;W7IKB3!)@6L?=9B -M8*,D]4:LO-(+-(:$GC_"'/22E/38XZ!EYB]IL#7&,F0SV+_9H#_L$NH_NN$; -M`YY;>`WRW)2(R_EGS0Y>4R/2%0UT!H>XOSJ#,5UEL#1:S819LJ2Y9YXR$;:* -M+2R9H5&H;4'TW\@&]O?C08ZIYG"M.?O$WF_L;$_+KZ/I@,;.8VO8-DAQLE_@ -M*F+&8>S(8K^[BR.2[.:J/%0B[B^IOZ/H"=7ELT(5Z3P-M%;0Y0'"PW0%B^-L -M^CHCB]9>CRF/0VMBJ084\S(]"?`EVGY&D]WJF)<7_849]9\T%NQU1^_WH&,_ -M5^:^K6L2FR(J\PH/W*3)P.C^9',6$)OO0-%D1.;GY>Z%(/[H^5!\IJCTY>TVV!=^XZ] -M/D?;R_(6)'WW?`>S2].TI:(%$?*%L3XD%Z`_[1*CVU3[S"EBV,S3O&V(D7C? -MCX7#((A-/5OOM."4.=)P3%-$'!ZQ;SBG8+&8(;Y]WO/QB!8>_ -M1`09PN#_L;#77^>^Z%CSS_RF*D%4_LM6Y\0W(7R&+SJ10?Z[!0X^R(2VMM<7 -MZ#@QIZ_ML697.F[D/>_WWC^,Z;,J'`[$<)J(QAJ.R^W['JQ@*YSF!LV#'(0G -MINP0WMHSPE6@)+;2#N0I#RQP\XZOY8'[VWX$,"E;-W,?+W,3.!;[=@838['X -MN'5^;;`/^,,G%+:5H+V&^EX>L`)7RZ=4\T.LI[4M4,2"M_G>?%I`_EHW'7=U -M+'\NP(?YXV&)GD&EZ'@@71ZH48<^!BD^E^U2EAOE3@"A4:9C6">_N/?-+AH: -MV$R>6I6S($%7H_C2_"R$&>,CKU`#E3X^\=.6!@_1^I.?=:Q_$04>S+1J?7[P -MOT8K<\G7.YV1#T(@W_3_Y[^,B6: -MEF)6-335TB(-Y'S(@B&TWK?H@"KS3:49A_AC%$T#$SB3$_&C7A%PGX%@U%E# -MH3OAQ,#V+C%%TJMF6WRU[G>I.+H?NE^<7ZO7[4$JNYWJ7W[J"60W_3]NLWF+ -MRZ7*TDY,V)/9C`GOL=[=+.]8$$0`E5TIH!H:),G*`Y\F'SZ6&"/IHYD84M7- -MB@SK9"-\W8^A%&3A-3T0L_8UBV6.(/_'+6Y_4<_W0:X/95G9K[]6,VW;)RW[BL&"4QI*+FQIL3-;]0MTG,P&5];4I-/<#MZ[$G6F\QXH3/S1?6PP?`?+Q$ -M]R*YE='TQ>X[,Z+H34N>&#L0FK==ON$!U>%8>&^_LQ7N:&03DMT_&/"P/5EL4ZUQPD"B_ -M&<%C2OQET?ZHSC`WFH*3S?D6R3B,6V'?[-W>B$Q@W>M,_N;\<`M2)=NG;C07 -M>9]X%OU`=]09"9P(UX,A^TM<,V7&O82A?MG/#`EKFD#9CS(HRZ_O6S(@.2:6 -M92'[SCA]-D@A0XX!P&6[(P'*M+1[4=/><0R]>^8MH)B>5ZXD?R9(8"OG#+]/ -MXU#^`[.XMGMC-!X*,,;J-L\ZJ[9JT&"-'.[P5%`A]1L53J-Z8O^1B&F(?/F? -MEZ6-.7H;)E,M&+ISG+`U?ZT)VCVXY'G]3\C'Y&&]UV(.+R!'\3#[M"',]^NSG/W!-`R+(=B;KN?>=B0!7YM]TGPN?R]6>&E? -M2\]9^5R5!!-?`^QG\F?HCEEH)^F(2RF_6)I0OS;,8,&8'4?ISN> -M4>5)YWW/\][[2T/#PW\^+!DC(RF'_+C\3NG0WN\FGH(:C?6_:G#U_-QO`]/L -MS0O9V;_2/OARD3*]*Q#?(@?>WP$_1TUJX%51#[8U%HU5L747&5+ST6H,!2 -M$X;-DZ;MV/:X!CJ#M-XM6U]D;/`Z@0PP% -MF8::)8Q5B+;K[!7`EGD7FR+Y68,^N&P?O`G.GY'PAY'?!EACMOFL9%XRW$LB -M2'AGMOZ+&XPU;+URN9\?W'D-6+ZHR5Y\[7_/)CNNL@J\UM&A5Q%+NN]]&.=% -M$U4\8`_>`>'`,HH/SN[`*'XE]#\?44AD&_N:@Q(@E("%]S%59Y!(SB/1:].4 -MW5K]Z+_CFN-\O"ZRF5<<61,*,QBBQXIKL0[ZB\?,S(&W)JZN4#'B-$WN"P)EZU%:7!\\_ -MG(CG+4Z09+L97)['"&1WNL:^#0DW7G*"RRF!3,OP,:)>2;LNA)RV"3ZU,^R* -M4.IG6(!CK#(+B8.'T2_W^NROX2A*1LH=*[VT&VU\\HRN/SG/#=KGH['/O<.# -M:MD,GO^/']`S!X]Q"]Y&MNP8FX^)U,5ME6[+T>)FM#Q2_S3_%VXB)5LUEX -M>+7;'D@[U-(:=6'&SD-&)[Z=DZAX<8/0;,9:/#^/J'9@J"U5#Z%&CSR(T0)V -MS.Y84,1>/W<3VO2T.].F:1;VG!XQH@Z)_,\(KV&\\PX%;;=Y/2.8S_ZS4_/=LX2 -MVN:NW,>H7RAPLCFW?KW"Q0#G0^A/!= -MP<([\FPL?J-D>"ZJB[,K_26\6@VQVD7L_`CR2IQ76S4JX\.6S6#&)2VE,7G+ -M3%:>?-AUK$ZV[*N&],3ZW.J+FV#:*#KV,^YD]6>2I*C$JJL2\7L&MZ:5Y\?> -MFZC=+!FI!PQTM68V@V7$888RN<*)`:TP=[R\]U$&_C;4F:,-':'75;7BZ?)[ -M:->K&P^#J_ZP.M(R$//!/IKX:D:#WJ/O*#T_!J)VF3#.,JZ\9GIRTY"\23IL -M[7GQWV+W#DZXJ?S*:M^Z^94<4.IJO:%]CN=[Q=&N1;J5O3Q6`BS@%]",K!&? -M;D]5YWW9KDY8FPV5)@E1M^=X="Z=95@N+B?B8A2[V.&;T3V!F^:R\7J"K&^5 -M>B4GI=!W*.@Q0$I:WC\K%/[R=-92FE"N;C72E0_U$DRCA%.MAXU7G#%G=*5W -MI'''Q@<"!KUFH=&EX?'G-2+BX\H72GD2#6;J3 -M[M!IO)0^%X\.1R"A\;JB^=/["Q?9"(*5_A_;RO;D:8MIG2$S]>8SN=@NGQZ!RY9'U7`WG;M>";K1[:9B$VB\<#)XCYV; -M=D8C`ZWY0NRS5^#$]6^RGZ#%!X6[A\IPI9-IA:KV)FG'(/%)6F0^4=H#ORE_ -M*0>K[,L;Z_OVL8YXT+^_I!BDS)"A]8R=)C$#HPW9[!%AT8K$*`W/?%^($=7/ -M/-ZT&8!)T'',A*Z_B'#V'B]3DQ^DB%LP^Q@P=[K[VNN&\-&V'3QK#)OQF7R\ -MFB_T=B?K>K6-_0.T;6*KK4E4X#0C.>C4:EL'),%X?6]^.;BY*,:3(RVI;K0V -MI[FDQ7J;,?GN#^M[3F%'KBU\L#)1LG0X1[*W:)RE3#6CW,.?@//J)#2\"S.7 -M\V1XS`6JQ\L>$'K==I'+F\KS.N7_RHPC6R$*9!3;CI.^%Q=1UM%9F-Q?P-S> -M(&DQZ8'4\=.>PAJ9Y&'[81 -MBU!XS]NLQK6PEH;8R@A[%F-;+C15JNUH\4:WSVWW3D58ZQC'T*'*;JUU&XJ] -M#N=&QG:27'&21/0F)\3F"IFV').61IE7[!M*A;^'0B$[B$\*?;3:B4PT!,MM -MV]HA%3>-R?[A1Y@YT&.I$4SEF+:OI;\2-Z= -ML]CLQ!48G=#\+[HFA=8$Z`M'\!.(#Y[H%J!SPR$VV6OSF^<;N#%^;%&+/.9X -M<1/#3.YW.`TMZ^`)[L%G??@EE0P*+I1[JR1HX-+>6VK/.YF!JF1=*7EX2< -M&\7:DPEVSXTW??#PV/G7),\&,=;;=K]5#?].'AT6,RM<:`P/@U)IC%WH198Q -MC8S]Z`=Z<\:7=5](-56M?`RKAS^Z6_U>.S9=BA> -M)FZ)9&HQ^$]0W`M`C@`MH[9.[]RRC`@'1U3UI.T)PQ?1`T>:%K'RVC:S61OF -M96XXV.DU^PY,-S60)MG3"YC3OQ1/0^5!`.$YAEIHL@@R(=G'A:'QT<;8&&6B0)61_[4IJ!K'%5).TB*[WJ(['O&K_"$ -MP$-C#YE/FZP?AHLWGK#.ZO)7=WF;NSUC]+%,.U^W9IENONCJG0L,UFK*QS+I -M%S&LUI;]C3FAE2]T<$T!A,?%YRAGK\H[/*_Q)?;TJN)Q11Z^0ZXM@CO`,Q7B1->Q(S2S3NE6Q,$\^N-[]M -M1#Z^YM_X?!J&J"7*?,7LP:X$1;"MH6LVCJPR95[HKIT&G2N8VCU_J>[:,:=I -MJ#/6K>VTNSHABWO(Z7/Y-";,/35L^NXO69)D49Q#L]CE5QHC(,4+Q,T.9E6@ -M:5,#D!PM!]1[$]'\A\OH^![X>_)[X(P_1H3YA^>2:6T0BP#\<`OX=I&,1(?2 -ML7WQ4]NC\&D])_,[`,]4^F]_R_(,!I-!(`.QYJ5Y<\^:0[1&>5F:=3<86763 -M!N/,2PEV>JAC'AO9<=`8_-=]Z#%(C&5/W9CQ+BE0`- -M.9S0/H5)3M.4S:$9%/._OL]QH;?'^,3RS')<,<\?MF9[#C7.+@:5Z]ZEO,KR -ME&C4<'I%0M]O&,0GL[;V9P,XS?P2[@;&REA!(_8PSB01DFHU7")L([$DQ&<\`-5A(EH'/YZ& -M=,[$\]=\SCN#4*CN^;=T#K3V883?\TMN,R.2\4'>;]@ZS_72Y[?)_"W>'L7< -M6S9N9LKFPQX5>+Q[H."G=U6,'0O>D]RQTDUN/$"'[M9/W[T+`N8A!'?APTSB -MUX-PK>+,MGQ&37<+7?8)Z6O:AA4LBV5&3&998%K7DR'LO32L%#.]P:9?V-WN -M5F"FOXC?#\V_(()7\#XSU)[\7J,M%BE,%9#(/;5&H!5ML6(*M/+*UHXU]<#U(GFTE* -MIAIAV7%BBJF6EJ'QU#M"4C4X343C7D\K6(DS]"^KIX/PIJ;[N]&0_;AO"[MW -M1YGT_YZW*_/\5:_R -M@.?#1+X.-.[U4RU-((0^J_)?%17?S*GO@H5/`-LFI3L]0&&\"&M>> -MK3+DQ&F*>4+\=]-4F,H*JJJBEFR,^VJH-*J&VQ55U?=10H7!N*"'0$E,@8?D -M0<]8&>G6D=/Z?+9K_1DT?J-A(F!@1WXT)R4QD1AT^U7G946<)I]*P]2=QG[4 -M?J*3?,"%^*QR;#>]SV6%A?:S4VEMRJA.W1CV!+^`G?']ZBKBM1MXM7@4U,X7 -M^:-=#C%L<>8VH1\Y*&+2%M12J_`ALFD'S9_^S,=]FY3N?\74R_+_6+D#0K`- -MT996(1ZC!"&>_NE(M;>W#?"*WR<\F;P<:,$==RB8?65C6S-",BY")BF^G<*: -M^01=&:?=^"];C^^CO_V)=K"JHI^[6K87'QF7-<+]9E -MCXU-JIP89K=QN6ZV+HZJ_%\\^ZQ7M^RFI@CRYG!])\`F+C>`TK]HQSK*WYW_ -M>S(4V@?L.P5IF"2+BJF^D/-8"SE.1BXW,+[-XL."9%:OKI%"RDF>VR>>GEH; -MJ-?AXUC\+B)TS7N7IZ#^P-1^*8PYL\([&0QD6L0FR7W80IY-&(ZM/`O,#(,4 -M6$\C/6FHI[\5ZAU=1J\#V.K?;26[DZ>H3IZAJEA3*FI@(S%>X"@T/W6W\/55 -M`'U`*B3[R1_OYH+QC?'/MQM2M -MQ]E>Y&()C1, -M\JZ-O^KYF1&Y,L$N+Z-X3L\`PK+H\0ZT.LH>'D]K/._PL&MQ<:^N;K`\:%B# -MTD?I(+1L#TB/'3T_.P$4R3L[AY8GZWWZ50??!-3]]JQ`@BB;PX*,5L-A_:I(TIALLN=V?KPE63I3Z#68#WDT#*0 -M""I&=IDJE4$?6:_-4$-UWUDY -M*LR^RI'^7TO'-RPH'381J9M:5V>Z9<8O,$<U!QB!YP79`\>/!3-*Q(*#Z09/T@DE/A&J@HD#Z26L< -MOI9`2@,:;2Y+2P6<1@FE7QM7:*,N'"&"P:9@Y8N_>Y[!6`,1X6X5Z>`?TE3R -MY1ZJN(Y7N3UKJF)57>OWMAGD^E4O_?+VRJ+/(,4H!@;)1&PSZRR(6S4(/UPV -M;NN+-;=)77]FW -M85FS>;!F.S)_5")LW'2CW'RZ+IT="*+5:Z.N.'/D1=]'H;B2'AN<37AXKL+T*Z_9KOR7,/I=-+1_+?NCBO&6NVI^-ITR6QVBZC:97@K&2^6_JV -MF(2A@,"Q3<7%_SXJ]:P2%4H0:7CG#')";RDM,^?+9U3#21D':*7=*RJD5"M# -MDON*3<,;#HE^;A9%@<$+2BA7Q_=E_-IH9B+CM%)'22X<(N=-F[]F?L[WOYX^ -MO?%_!^NE$>+PX_@TQ)T?7#W1=_=&I%:&,*DV$-(EQ.[TY7,RU-I&A+".'68<*R6U[G4 -M:5"4/:5=4B@_RNQWM>EV[4%*:3QRUOC+JW@I=MUU#N,:Q'I/Q/FNY@-'+Q_8 -MR6*,8YE^C@U[.O5SL)H='FT^/@HDZ,USGWLF+\^GYGM-#M&W)Y/:@;7M)W/) -M\EH6.PR'"TEJ\TE>8J,\T6"*(0L`QD/,0Q@8XX1YB!HX""!C0XCK0TJ\ON9Y -M\5(R-SU;YR3\Q]Y$JLKBM(_QAL[!@JXPGA2V[E=JERN_#Q'E;N+I]?/:]@6% -MAA1K*L;7+:TJ/M^##4LS[3&8#C4S\$V'J/!ZMGJLQO%\LE/<^6:M2?+JHHA/ -M?6UBQM&TG,"'$F`@EJ)MH;$_K-Y9]34,[\_V#^#G9M7H$N;ZVK=M6JKM3YJO -M!K?P@3RYE3#I+LIJ?3:K9]?8+;UL&UG%32(SZRQ'VE7_&3LJO -M]_Q^4\@4UA'UVW>L;TP*ZNKJR\KZC3+J1_7%PT^@K>'[+8F1;+%/4TVS'*LPR@H4,,L,PQCU0 -M/[63`H)YB@X!.SR@X!/3S+F=\.DWUABBNIU7.WE`4%W[QV(N_'T>2R*0?+4Q -M7AB5@(3UN?\ND$VJ3-H[MZS.LJ_^_[P#2N+JU[UI>>.N%5@A&1?782V0H>K\ -M[?:VO.OZS7J>I.KO+/30Z83I#NT5"=,!G2T+(`J`&(Q`!`1\!Z3!,8)CB/GP -M>ERR"9^?CGUN?*E\M#JG.R/YK_^4Y6WWV[5I+[QQF6NE&L07E;V/:A-($MF3 -M9[U)?V,DI+">K(3JDLIZB;Z0;YC&2-\$D)54AWP[]5$12!1$8I#OC&3X0=^3UCUL4UC;:C\Y,UE'G^ -MKGAV>S_PO?Q#-AO2[I3XQ__(=FP6?24:T(+8Y8(?"E)E:J*2@E*6=HR<[Z]C -M@]B/I0EK2Q19]?G:7RMI;7WAKMKLMA/OU>)K<>WYZD26[Z5M"]ZLHGC[_'QA -MY7:SZEFD_7S'S/BHNK*)5\?HYVAT>?XGC^1T?'[?17R-3'[O%6R`^3"-A,1B -M<@[LR=,[IQ5(^<"AH0\X$D>>!\^M:)="><^[/J8.=0Z#OL[N-4'2UY7;2)_: -MXWALJV0D`I0N^IUIW;-EI104$;71QVZ.34/"R'/J]-R.!94"2UYVVQ:'*;-,?2HT"5(>+SNAT/%Y_/. -MAT?]W.^?^J1]UZM[%B/44&QH$D8PY^/$C$F!\9WZQ#2$,5$@;!G9:T9"'H39 -MKOQ&0F,`F0B#)GF6XS^?]^^^59,<^4OO!UJ+GN_??DI,1+/0$:84$A`C.(D1 -M])26$[,^I]H^]>UR>;S3FY:.:C<:>8.8YN8G-(C!!('(![D&665K,E#220ON -M20_(`]S,Q/<`Z.X=CHX6P?%YX#OPLAJZ;.JM\?K*C3FU3W90Z58.0*7O4S*Z -M155T:O9/+-$/7D:GH6,.,,=]\)BAB/$Q0$V)H`03H8Q,"$(3,W>!)44#WMY\ -MPS%\^N]-FR'8?,_6?XV?Q9];Y!YOK<>LX$LX,YI#3_JX_^6)E.0AADV+C"-QT$ -M%OWF[P_3;0AL^+S. -M=[:MM[;<\+(K+6K*+53L[0$DDF"TP)`-@!B1233`1DS(LTG!14X(:=(L:SD( -M?@UOHG!'#1X":+-3?:_.8/5R>NIH3FM`CZB0R)--34;-"M#8X'!P;VV:R*A>@297S%1F!T4'F^"[C#R7W67;^\U\' -M^[_&=_]I^A_Y_V]G\WYW,SL^'@^=X;_VY:*BAKEEV03E0E2G3.#4C"$0E>0, -M30/,:/;UH-49*'B6CQ2E4F20;0]DL[:VW>VK1R6_?W-S[#_/K?@^1G?1T/MS -M0S_QO4S]@RJK+GZ)G,UK-3,BS@EJRM*'882TFTE(@R`[,A,%10AT/2FJI"F?9,_R_V!^Z-#SNU;^#[K*^)]E(N7B_X\"\7AKI -M>82&+PD-:S**:$.T*I8A3M&[;"(UCBA$AMQX`-%K+87$T/4R=]RCY-9A8W-( -MV^C..RYZNN43Z_P9HFJ+V?9B/@.SCG)X\.08E!R62-2,+,%`'GS_*R<]J(99 -M5*A0+D(SQ9AXU/5]5/6/'W_F?+_*_TN?]OKD/Q>E9SXWKBYL'9@O(/UG[ -MWJZS:-JYH.%LR6[0K;F>]M"4>.@]H?'X]:-9B&EO'K0&#!-`'Q%/#!P:VQ;: -MU;!%NVXY;A;A`M'@J%U;]^^7;PK8@5ZZG -M"\$"XBXAQKS`D$$Y6IZ+9L$(`BI4\H>5HI/+W';YO;_5GZWU]SXGW3IM6BV. -MA+X7,+JEAM>S%,+T#>J\ZJ(6`&"(K)#8DET*5D*EJHN@)@S%6'@LB<=Q-CV< -M9O[_\C?^M_@]A_DD(;W^'EX/3+=NWAJZ:LEE#52R+F9JHB!D!F(1@,51DF89 -ML*4$"@6`YE.:"0H0,O7,O7];OGP^Q8AN]3\DG.665-)DER23*"":#"&F=W:6 -M9IG=,.S$%E)MQ'@B:@RUC@!P'4AA4+A/#.@PY,3.+'!G,A`X:)Z.W1_:R?6^ -M/A^B.\.YAZ6&S245550/%G+'Q&.O$\XYQ)XEU?'UB!H#Q892FQ!*HA:#25(9 -M994J;^4XS)JIQYZ.[I/-JU>;L>F&3\;\3?7YKKQ/+U![MXNW++%PMW&>Y`0D -M)!<&=!:@SS41IV+0#L`+%).I(,0FD>P2LLV.>71:6I^AJB_![$F:+J]7:CDC -MD(H1R00.!([C.,))),&Y&J:!W`[H##+%<-UE,IC[EFM0$VI+"P:DPIG1@^T^ -MJ\=R.WL7$;"'!Y%$.I"*1VDGA_`?SFLUFSPKM3T-FD*@H;(4RA(;,#9 -M84BR%2,8I#9BJ39V:H*ZLX=DV=7PML>]_*YO1[1MF_A-S?Q*)B"K,8.+02B& -M+`&&*2HPE28I!I#%PQ5%](ZVBX7T3W#7WT^O^G^57L:].E*HY]O/ESNWFC'GS(RH<1H38!0$U`:8$I@FD<&=F+A5A,@8K1,AV+1%0AP:`Z%,#S -M7Y^ILH2HZB]QP^'\CR^]DEEDRS#K*G>>>=W=)IB8.`L,+P%FS,%X)$02/!R$ -MWE,PDTS2J9H;%81BG6OS=[?HW_.ZVK_6_\^O^5N^'=N]E];=WGV%>O":[2CR -M%>[=N)VAVE4O:">50F![4.-0:UA2NA[2(\C)'E[=9VGSK+#R'D\??]#P]_A] -M<0JB;8[=1FW!2;<@]5H#;(BC(;9%),=)CVZ`6>[MTNDZQ:*-%\0ZV3!?KOL' -MA[511Q6)&D,W1N#<;@I-U!1&W`=R153,4)B,SMC)3"D[-V9MUV'I]C[;[GN[ -M>GU_#AY'1FM:RCIZ;,/7Z8]>RI.D=`TA$"=*!0$2'3`DI3EC"=(=,Y4A@69E -M#;-S*80X(0ROV,]T@I0%F>8A\4^/['C\?UWQOOA\TX3J^=[GFR\<1XR]JS/' -MX\#Q^,\9XPU/V?C1R#QK3*2%B2S(:IJ2A)0"PU!JRF@\/9[>YMG5V?0*.J=4 -M39LU):+$9U06*;+5JD+2'50*!"&R0LBQHJ`5#9#9.(VN'A-.K5Y/KNYZ_Q#B -M_2?*]ST]I],XG&X''3@8\`<4XV;,30IQ6XXG&<4I]_,B!T''#%X\L -MG8-%#, -M:@?M$*-XN\"MX5O-V_?1ORW-JC[>'CO?28:=GOTWRNGVCZ6'T/5_#'R#L]CU?-/0:=QXG=F9NL@S=E@1 -MNS*#!;=@;A"J0P'=A@.)MW;C=J/B;MQN\7Z'T;SD-LW-L]_[C-@))YLF/+A$ -M*IREZ2D8B9A)(&I9AY`PD>:ERQ.99''2<9V!SN9AT'/P5R-\S9I9M2_$2)F% -MK(&1?4HI94AB6M(]\FDFA`F8UF.Q`B.!(PL0)P#=..L`X-$H::99XXTPE*3% -MZ_1J4G7U*L'=>UP8.N<%JBIBJ:A4.J'4/%"8#D)L@,I@I`Y#J=1J$*`2H"BA -MWH>!0034$RG)YY\M&KAK82(B%$6[DD,PW1%!NC]%%$=QV=D9G9J.S69V)V02G -ML&8)V`'7&0.)%I`-B7T6M*L+IOIT\^[W<,*VC:-J;2S:-H-DE#0GA$I\,F$# -M@>&$PDJE?CU[.SQ:K_3W^K\7)9[^SLFRK(6=NFI% -M44,I,D!@9-"LA1!9,F%,A02DPE\04AS&(.>S6/,\3WYZ.'?]C^5ZNF/>ZNH[ -MO27P1=YV=C2=G9F8TT=@/7AB!@!V9@&(TP10GL#[$=CAWSE[!EHVY>?WN_M\ -MW[?HHI34SO0]`4!0[NT[!0AJ&9D@*&`2!J&)T,)4.BB>=(WM -MC"074X>#'P1UU%%%?C:-1D<84FU`B#9`[5:VP$@;8)R"MI''?@)G:33:27@E -M,V*PF':/:[7F'5-_?V+$S[CS\.!Y_B5QQN/"XV&5)Q7A. -MR'B)PCC:8#H1JD8B,P324)QJ@Z*'C<>.LM;?Z'K'9[_/HT:+F*7:I#$PPHQM -M:J7"JA6%J,4(=63B/7!Z\]$;"I=B4]<&69@F`QG)TP5S2KK2R"LY2)6MK(?5 -M_`^%>EEM)I`DM(BE4JU!@&\[)#?&R'!**!6(7>"1B<8K`)DS2!+*[I,X26I2 -M5\`1YD2/U+>\<9=TWS;XLP-#H=`:`T(H"30P*40E%TFBIT2!@FNC,M5`8!9A -MG98Y=F7EA@THPCC2+I<-N]-BFVR;S_!W35*2B_1?TPI*54D.U"(XWB?$63B> -M*;,4P79(85`&(9#5!4BM!V(#4U.R9W03U4E)=IH[L_8KV+$5?%&8B!M#;Z^W -M&-N&+B-#M!:3:!6V*`(0D@SW42(V=KHDT1BED5V]!Y9I;LO%K<&_RX<.'-BS -M7;A=OJO-Z#ROC\KY4P"E\H^2!\MJ!Q/+)080F+,)L"O+EF$'EC3E'E\KY#T= -MN9XO%\O^/EC[IEUY"6/3FU-6,9HV&2`C9@2",8C3,($(-4&@N8'$>7L[7QO@ -M_!,WT,PS.JKF%06/H5*51(;,$8L1`L0ALDV4A20J.=0&;5JA0YT[66YGT8_> -M>UOF]OX8"WQ,;8VCB@ABLK9B'6E!U%UFL`-*Z)"=1T]4#MO"?O]S-KZNOB>FJFI%105"35`5#,Z!U0,B3*JIA%("`LG`JAP91][FYRW+N]PJ&R/W?N7?ZURY[OO79['RH._;M-M-=^6$;B(W.Z('=F#@!NS!,$HW5& -M29FW6C=`6XV?)WWHST7HS@=]&7.0YR'?W?#^IWO1M'+M7,=TLU6K>\D0$BV[ -MN6RVG3.>.D]KQZT&*Y!H#4^.1E/'!E11@!;3""TK:<=EC+@0>FYM4[NWL<(D -M19(H\.31EHPW&49CB[LQ<4H=PKN1R-VL!V2$FD2"0C"/$^.52CUL9R -M[\K\,_6V?8_A>7O;V"S9JWH6L].DJ.FDTR:4C!RHI-(&ED$!=A"4,"@AI0I) -M41%)IFEJJB+F<>>FDK/O>KZ?XO9YSW._.PW[]V[:;C=6Z"MSNB$-UNLD)"W8 -M@Z&D<2C<5N*=V;MV[N+=N[[W#O\_VWU?>UM8GIN[\**A5((D544,E0P]#IFH -M3"$:"!V8H#("S$<4Y60YPUF$$5'(Y&XWW:M^4XNL;'6S38,2DCEDDP2X1Y@4 -MT$TR$,3`),PTJE`G`:2DWA54[^&_/: -MM6IRW&_VN'M7O9GO\MG+T_8^GS\F_LH[#KZNO'*,&"NO,#$ZX**`E.N,D<%R -M7J'KDEZ]=.!U7P&CKT;5O9ZZ-$]/U]?P]8O2<1=DT[UYDB<=VG@B<0F2)F%) -MQAD*WYB&"4<;(,`B.)7;QCB4+65+TE_4LC\'A]SI7C(\=C1B'B,Z#Q$0T2<0 -M:#,R3J"%>P"D*0[$J@["*@[-=G1I"KZ)?1QUTFHTXZ#&[>U2K4 -M5+X5)0*"DPD610+`7O04142I=ED*+E8E#A=J] -M%WM%5O*&\19L4J@:0W4FV+,B1P3LW80&62XD1HD'=/&\CH)&DP/>O]G?J]?3 -M.#M12J5WE4I(T$ -MO+9Q=_:DX)!0;HJ<7/B=Z7SJ$J!S$4I@1R`.8%`IEX*;$:45@PQ1HVL]EAM%ITE+MC)'$*:-LA(I! -M&$8J[@\<5:Q'A>0>&O'N'F:NJ2;UV]J6DIQ5^J9(M..,C:.*-1NXY&$8Q2;5VSDY#`4+0F -MU`VP$!V"2C:VA*,MRJ.0P+=VL1W.6V1S3#S2RRJ4E4J3L*44YF.^2#?8VZ34 -M4++0IO"ET--.\WY8;H,WQ&ZV:]K*+A=![A[GCW?H.X][?>7K+MRXL,2XQ27( -MI%"%X"S%"Y%`4H0$)A>(+-P,>IJV^+7PGNGI]WDT7Y#DU<0\1Y3><.#OUAPW -M[*.`.`7#!]B5P%RR0Q8F3,E,X"9Y(3#JZ.IT(U\E*>Q`""`0,ZL/7.EB1?.EPYN+E+N_?[=Z]=)&E=Y -M;LG!X!PF#?OA#A++5)9B2IOA.`-2;\ZRQ0X3A/2[7A[S[>[X^4W>7><9BF+4 -M*Q#:MA:K$ZHZNO#0FO!K2NA"ET]5UR%`0U#&6F-<5!Q:#I$Z=WR^#OZL,W3A -M>Y>]ZHPJ@L799DHEV2#)%4;T>YR=RO/K0:S;ZVX< -M/%A2XTN.*8T&&-+#B=<9+@-'39`/6!J,@ZR$^U,S!:$H92D-0TLE'L!Z -MQ>MAJU)H(GUHD*%]8;9A\>U(&"GK#]F'K7K?:>MF9LQS#CQFPDEB.SAQ=KN; -MG%:M;F6Y;MA;II*6HH=J0$F'8I=V'&&*6!T,%*I!TU%-%-%#VF@$*JLK(JX> -MWR=B68FPSF&4$)*4G@Y,$PD$KIQD!,[H09`P$0+P1VPO`'@[,,.#T.\X%;22 -M7J[F%^0V_*E+$A'(6[DI+,TR221+,FE0$PR3$TP!2;YV0ZAQ#A-#&RM_#,R# -MR<=W#P[W6Y.R8F[C>L+LNWBW-QN1$EV,(WJ`A%D-@A>&+3>FE"]38*B51@'! -MCP8+PZ/#V.]YVOU>3DQ;>9[-ZBFJF#JH2*G14DJL^`[-4[L5)F@TR01L,819 -M"DC)E5`B!9(6)E64&$!`J80@NWK5IK0M;6N'%FB]MHM?B?I5])AW=QM&8>KI -MP<0H0^R"BCJ"Z>AUU9!J;/7^3TFP[AXCU.][7LNG2XUS&6C/&KV-CIS:O'[7'R<$\'!6OO^IISSZAQ -M]=R3(TLV(4AF&8"A,LZC+KV<0-@&0%`0>S,>SD'H[\##9KQZPU.KTLWIU:N] -MO[VO=Q*;IHN8J"PN!BA+)+DLP62)%-BJEF2\4QO+U11>]ZKJ8%SBUE^V>CV^ -MO?%QV\<>O2I4O30,<;V$)/.)"S")%DNQ:8%03:HC%+MS%P/1-M];GU\_N?=O -MI?)[?+]N.GEZ3@/!EGEV3,SS0SI,Z0I4S'IRST^]/5R\WAZ?2WC#6G5O,;I,1;-K0HA=NEF%D$A9DB!YU4I* -M%A<,871V+6O>[YV/%K^&?/_'[^G/+`PF$<4*(F-1),80Q0$`PM03%DL%("D2 -M8CAMEDW*J8XY<"Y2]]'9[7E^Y]S@WNX]SSAY_E<3E%RM-N\/3Y>I8-+1TC2$C11I#LD-I)+IM2FE>HLE3`(NDFD -MDHI.ANDH3!:VZW-O2,CM7<[?O=WE\L\E^SK;INO4561:]H. -M--.K5*SU1-0B:5`U*$4U)$FG502U.,(&@F$R06W1;M,ZP-KW,2(/6850&20<6RY'+9OX% -MW\.[._O*39R]/(9.UYOKU&GO;.S/+.\Z<<@E.)A,$Z9(81"R'&$9#C+D&)OB -M/?LGB\BX]%=V'9 -MDA)IYT(E,I)+,^7?Y>2[VXRN:1L5_=S6:?-GL9V-LS9&P'LF0NLUFA.Q#80& -M1*`NAH2%$4-"6==]!KW9T;V]T6X^@[AXGA-/3;3=V/7M=VLPW6X#H1W9C0%! -MB[BS=FY=34ZG4-4LX5EGIJLC-3,, -MZI2I)FD9#-(1A'@SL2E#.G'=#50(/!D69Z<.&K!O:I:Y)Y8XT16(E@>.-HU# -MMU@8.W;CJ-2]$CB)L@90VPP;5&F<3)\`21R.\F"(\/L6-B+>NO%92C(FC0B- -M((FZMNI=ILP3%-L(2!2&V!A?!F68B8TG=HV2(V49''H&1HZM:6S[SYE_!EQ9 -MB\KVQ*TJ!22N6(;Y,C!-X1OEP`S,6AR&@88)20)22,5C8BZ]:O>KV+%LM -MW'N$5B)E!X*P,Q8$ZO8]CLV"FAU(RQ;'LUFK3V9KQ^38;KQ^2.'!>[W_-\KI -MW[F.Z,N7#07`T--:**)*A-"+`$#&J4"F1DO12E!L-F:#`QNZ+%%]C1K5L^!B -M.38WEZ_ON]Z/GO/ZG:S;FYL[ES*9+H[O=+MVZ@97+KH,'QR0ODO+(4LIY81A -MU&&8$4>5"9U=:RPKCJU;M]-]DW;TDLFL9IL>:AZTY.MBB`XZH;D\GE$W)Y1` -M3R6!*Y%;7I=3KWJY=(BS:%(6;1-*TS5G9PD4Q -M!5H,X;))3?(4,!NM^8#(4#2&+OG$2J`SDC8732P@^&3"_%-Q=[W$]<.D:)HM -MHH0:+,:)*R'3(9#B'3"$O2GM)TDW5F=/KGAZ?:T'PZ6[BR9-6HJ:J-Q$1%&X -M[$97K0:`"591IDS1K*@<1VUF/L2AH#XL?%@,#;09S#=""NTBYKJ-Z:V"MPQ& -M]O6]0L11#Q(2NMHM$D$:9$8&ZD4!@*!NDEV$$#=9NL*8D-TW1&;NDOEUST=> -MX;2FV[4V6SM(J6VD&*;0&T)3(5`#902;(@A6U0L-FIM*;4KK:LY]&A$M[M9. -MQU/6Z??\GP>AEWZ>79M6K]J^)%M[5M-2BV-;9.G":8A%!A-40+,*"=29I$>I -M1J.!S-1J-<=8-A;'?-3NYI8S(5Y(FBC=AVC0FC`KI(83,[9R3HDU#"[0S$`P -M=GD)C?/`<)WQB/ -M`E"`T30,!P(,G@F:#.[RIB#30K.#LE-=N2%R@GVJ?7W\9TM)%P\?2'0=2'5& -MR-0Z'J"&1V0E)#U&8N2P@TDYI#FD8:XA>/O^Z]YV>3O[&S@X2XKUV%X=%UY& -MEEK6H-6\B"MY$AO@LUOV!L##AT7ICM?-K -MJ0()SBPWRK"C?/`4%_S-2FE3$LSN[*4F@F:-3(0VL*-D;5=Q`=&L4-">`LER -M$@=\P*5#(E2$I3`387=R,DCDPMYO&W7.P98R3+>DD16XRK<;G=MQU.D-T&2X -MH4[(6`(02$2DA)6@[OW)'7"OI.]<"#U=>)#C-($-' -MQH!A>N:2E)-%)W*Z"%=W:"1!(M6[<Y#DG.'+6LUNN4ZU02"ZXBJ"CY@FC+S0Z$,)-0Y+`'FD)\V92FLUJ<.OL' -MGZ\O;W>,\7:[FY?$QQQIF`LQIH2&*,2#)Z#%BA$)3),8&*.PF)CA,3`R6!TG -M?6T\AC@NW,Y>2X\^9AF6%+R -M8"$YSSD.4II71%`LO.B6'EG1HV0;-5S/0'EO0>^?H^]N]OHY./T=\IPQ2Z71 -M,=BB\ED278%"2B1$)C)<8L(R&-5+B4R47"_43CJY3=8'OZV;'P][T?4]3V-[ -M?T\<^/&U.)Z1ZG!-4#U.PBH"IE(P,A@)#)%)3(5"9"(U14C,N"IE:THR%4[O -M@^%VL=''HQ,3%QQQG->K72T+K5AL4+:`WIH:`2%UC)&!=A%(D+HI!`NA25+H -MP2]`\VM->LX=?I^GX?:Z.CWO[V;OT]+;-G%CVML@/=K.[7;;%UU=>Z7;HURZ -M"2'=V+KXX!Y925\L'VLC`%+28/EK,*P+B=0NU@NM=%L[5O3O*Z=;COKDS=VXAQJI@>)-`P(;UXYB&+Q>)QH]^"8G((U#9U#'U>M%BCQ0>*.,2L!%$XXS. -MS$43.DDPR8&<&$$-`D2*:$B;DT=GLF'P^/#V/,?<##`<,\7$QF>/4L6ES8D+ -ME502ZL(D"XJ0$A+@6$R$]F%@B51&T:(JI.KK]O\[S?>[GO:V;=TZJ=RBEJ6I -MH#EPUSV#L4YP%+*=%1$#('T^Q[ -M[T3;-AF*N:JD#/1`R`RF2Y5*A41F0Q@*"PR@+UTDR(4,4`23@.YG0AT63,TN -M?K<_1US]__O?7[5KXW/2-$T:)?1!00#0*D$DT(BB`P*ZB2(.SH9!$-62KQ.A -M%@Y%CBWCN8ML_E%KM]HY/T7RS/5YO5SN8#F_.W<):X:SVNYQ']XYEOO]4[-K8M54U,J2@*$U+` -M[)W&*44ZS"@)3G$0)"SQ\9Q>E^/II>3'&-DCTW1 -M*2A*DTJ$U9$H[EWQ2$`6_'(`P4W5OL6MELM!6R.XY#'D%,1[6/3VIINM\'M5 -M_PSSO<9#U=,T[74JM<\M-:69T)O&'M>T.>UEK,B!,CVB$H2!*4>:%I#(!U:+ -M6FF?4+E8S0<@)75;3U/4X>=UBH\&>?!DY=O/(>O#@!F3*`,F#"<" -M*!P6HI(%B!DL6,A$DL'`!E5%&67`=O-[QWN?7Z=[P_;'^MUR>?J4ST\F["BR -MZJ*K)G)&JK3LK36F23)K0!>T>UFM0L)HD-D!@'M&S$P/:G),]I&:1TG`?\B_ -M#?AG?^)NUO&]NM;SO;"7EZ2]Z2E%Q"7&"D$DO54R*`P+F#0*1DJ#N5Q)J]^Q -M=MG>][H'9Y9HIGZQ8W(BU%;MRRC2LTHA,2DDANB(20W;\I&`RI"6\>'`Q-I? -M%G)X(2XTA(*6_N;9M'5ZF_A]+V7O7Y9>;(T1&A$9&-'$XSC1IEE#1$04%*0O8 -M42$.V2VE$3*)U&W34FOP%92S;$^*CZ7USR.O\/L[7?T-G0VGWQ<4,HFI%@D.(03B8AQ4TJ'$CPTG8.QPZ?C?E3Z -M_ZDNSY_NFT]W;V.LVEM3LVA=ED&MJ[&0A=I020#M*)2E@=M[$N;8C069M#Y& -M2>.+36,\SX7F:_K=7R]AZ_JUO>OW.(ZGJ\5;X6Y#F&VC*9S(ZDT,H4F_O`-]V11)-$9`9"XBA$DT#'0,.6"P6$E8;>-D7)ZLG!*?5 -M^ELEGW?Z8K?[\_ZG#!<4%]QMYOX/1[//Q>0UTZYQ=R+PZ]8:Y#7$@L!8)#7$ -M#4&*^:(BD(1\R^;Y.:\&!I-AGF\W=LSY/G7'R6S!/*R]48IY8@A(3R20'ELC@9L;FX- -MP@QBH."A#CA!P2@1<)"RASENG2ON,!Q^AC(3W8&4A)^C//5EF,7M?:O/[LA\'@X.PFE2)=^932\V8'9E,Z9/F$?'D@#@Q10[)3%=Q&0F -M(%!,)G0.$Q,!O%A1R2%.WV.WER_47+!Q,BB>1WGH>>M8<]G/[CT'V_MF?/_4_OOW -M-]?/IY;MWR'>;]YO@S`WVYH#%=VLP8)`MV4TY(&#^/.ZU#O#1OMYM=>_PK>3 -M9%V3WZJF/M38F1(&9F/(PT6K9 -M)B&^Z(AY&N,4)$*U:?L^8N9O]R[Q=?M<>UMP16(GW6>/64 -MD<4@%4RNZAIDD:-U5&Z,7"6`D@FL($TC.[B3<+1+6#64%8DUMZ7XWRN/ZAC_ -M$K<_P_4^SSGYO.SNO]-?`Y_0_2^S[[P:]YB_>:^=&Z%Y)7B\RO.DF9KB$DDP -M23AMQ!9CR4=2T*).H(`S64AQ37SO/SEG`N=WSVOP_R?E_,A?SOZ?TK3\S.K5 -MN9S.IZONKO`6^FBU::S9W!QVM%2;2V&B66`78(Y,"I`J(Q",CG0B9`64BET6 -M0LJH[9NEE[6;=?=6X=KZ'T^]_M\D]SUU6K>A>YF;WOK=IWYS>)\;>P>,K^ZV -M&_@;!A@-?AA0L,`%A3NS&%DWF@<0\]LUK12,)L)/^F<3O)([I[PPG*`!@XF< -MS1Z>;9,S80K*?Y?)8UO+]U$RJ:+E(3(>8J-34IAI2DT,QYI/-#2"9)#H@,L0 -M/$5XLR3KG$#X\)L_#L`$,%E`BR9\'++.GLAN)6FS=Z7TZJH?SOW'X7S?Q=WY -MSZ&A^9\W._7_CZ-;@YU;0S_O?D^)H>=P8/.;"8,`L`Q@#!:08`>"9BZ24A`U -MTRLAY6"?)%Y/+!Y?T?J^Z/5W9]S_&][DY?]O=M7.'YGC^+^)E)20T:)#MCUO -MD9*T<3I%Q<0XPH1N0C*3T2![:VHQ3VX38&;,]NT)D21('MQ1[>&4TDJY,FJ/->7D7W>;F^B\BOE>`<[A7LU:R[O3-Z-%FD!O#F#3?N4DWL -M0JZ`^J,SUO&)79@XJKDY*SC%!R<`Y.0/'9#C(=6"*,`XT4C).L"*?BF%=#25 -MMB+=S30?'OM3BO?&;,H21HTG? -M$1G,@XF%HZ1I^-,Z!U/68=XP^[!V,:9I*W[I17!U1X9;3JN9'Y+:%\/\R_HO -M6V(0SNAT.9G\_Q.=@PX7\3R/6.)L38C2383$R98G0"1B=#RG?+1DAB!WQ7?+ -MDC"&40R.9@1@H/@]3ZC[2E]54!ZE]50DC[_JS/PMFE1(48;;30PGE%%"=?@PM -MU%@L!DIJQ3WL457XVUUGV:DI])L.PU&12:I2OU)R>OT8WI4YZ1=G=X?9LDO: -MWJXXS#_;.O,:18>$*LMKB:##2S,:RLLZ$*3>R;?HYGMT:O[+;^!_$?@?.!@SLME -ME:CC/#<\M9AQXQAYCX7:BS?J7/[1,R^P0"7P3.74$F&AU.\M<_P/=&PX\V%` -MYY56;R<0JMXU;+X)%QH94;'PCA4ZRJ:V2P5]$RQ+`IL3E`LS9L7K'E,KM/E`XYY"\H\IOA -MI^$'X:\D`9.14$2A\,I(_>990,0$H86IP.,>YZCSRJ@E!E"A1M%#GH,P^<]- -M]^NQN\BMKF>GUEI]YOD86)25S9RJK%S]]QZ^\8/S(SZ;%)?18KRVTJ21A4V+ -MJ3/#.64OG;6!D9T3FW,AP\(L/3.FJNF -MQT_&882=#.R$;SM@)JU/XF.+LAP&^<&?5C']/!]`Q]5F/S_G^%;U2"//6FI= -M#TBXF\S%[9UTQCN>U*0A;_R9^71"DS$SD(<(DJ53_YF7O6*VNVWO64NMAL!X -M[:+60#:TH#[7UD>;K'@-RZLKRVA95MR:E^+S+,X$KM=,&=SQXV3'#Q#-MIG7$GW'@F@NLF<8WD&RX/!SK\IJ'WWP.8+S>P9G'0[LLWQ<]GA"YO)2,B@T5E";(XDXC@^W\"ZA4= -M_*FR5:S3UC)*'N@U5%T6]*Y/H#%Z,:I+C`SKBVRJ3$P\)5R4Y`[-Y;&40[&2 -M`Y>18#,NMB6,=V)9:&IN;$BRP!I6&`^=GE\?C/5\1X8=92'B62>PB,1!).YX -M*+,I4D80\]@@HA$D\#3*$9X/!/D8>'U_#ZGK^`G]MFI/PH]O1J*!E8>]MY7< -M^;?2L5JM%M$` -MUIEBVI5O;M'1<5M*DADH\GW+-6Q)65H:EL-+HE=FI?6`Y+OSQ[';Z_/S^][W -MO>3+M^,^K[)PP\3Y)-;Y!&/DZA`5&**+!)/(J)^QK]8DM`\"##V5#V3OD\IY -M?9]XXS9IBCHB/]AFKP>(]T-C#(>-V=_#^R6#U0QGO,XY7L:NK\>A2[;]5]LY -MK'%L-3RJD,OVP]$N+0/SYS)F6C[+_<;F)F56U)--:PZ34&O-:^WN#>QI,TNH -MW=68'!J:41\,+EQ=GR>3C\?C\6Z3PU7AW=@GL69&54HD\"(BD8$?G8?/B8*$ -MA;,^59#`8_//G:_WOH?0=G#Y_Y7SC]KF%:V!J#N#%!M6^I$,=U-[MJP_ZS)S -M;=M'2=Z(^+3P$_<&ZNP/4&\5F^)F<5]TY9Y\;!*(4T*9*F^O1,OO01REU(M; -MGD$-I4@P?"BC3T*HJ(QDE==T*6GF4_@+[&TL"H_Z9NG"=CD4S?1)Y0QWQ?$:2NUZA0+'[Q -M2WE,5H[QJ-SV#H0KK1I(_!U>5\PC6JA;Z:NONJ@HCNL31S5E.VK//!>S43^^ -MR:G/V=^_ENZ.YXVV48/&K_>GP^B&AKU=?L[:#L]ANR;-9,=E*6^['Q`!3SWS -M*/FJI!`*9OI0L(OF&#-@^<>[)W]R*"%.-(VF@DS6!X'OZ:_W%KHAB:OA969S -M43C,9<4%@/VOPR9?>0.73_BPZJ<*RU'6/5:.F6N`O^-2-5.QYYEKO0*M\U):WF"?[[.^=I&L+ZP)EMG? -MLWAK<7Q7#4M1#$_C^$CLMGO,T%^!SOL]Z3I_4WL._N^-9D-?>U]K`W[?ZQT] -MDN7/(/Y/N3TDN%JU@(>@_F'H+5@?-^L?5UAB'WTS40A]68AOWN9!3(E2-T1` -M1!"I!HN\!%(-D&,\/$&(C^O$&MD/M\4'X3XG_16SOGH`=);1T?75?BY]_:6& -M+FT%^Z7W?9-_TK0D!];^AB(/R$=CHKZG26/T]%JW+P:6,Y;4V!Z9H".;EJ:?'Z((@VO%,U>X;6FAG:!56R'M;Z-1.7$=[KMNMM?QEYO]G -M.23COHYBZ8K$`\0'9#&B?I%>6P.^/OR^;@&6D7/T631$10L+]]'U/O=:#IC! -M?D=&!F&5[MEY(Q-@_4_A,^'9L#'\/9GT#][F4@2E(Q^+B#_N+0>),Y^3&RNR -MTEOQ!36APMM+HG37+@P^']\4WP-Q\M3*\%<:K60_' -MX&92+LOS&'>.-V;AT>LW.$9O,.=#??D*RGB_/JMQLG+2YH[&A,/>+7Y1,[M9\0-6^1R -M=\<18SVQ_.37F&$E#9OEL-/`!-=-9Y@^,BLSX6C4\8*6:F5]6+LNCM*+4O5+ -M-!1;X2L+,S([83MX-/ORULE>KRMN+@'R;*MM*JM2LK,B%H1B,=K-(D".BJJ" -MA`2D2E"*D%D9"(A&)`60(L)!@?+3\:C_%6+*[-!@2?&)#(^/!$9!A^0_^-_+ -M)^0EM+4\/&_6S!O;;[7!WNN!>*/;%10]_#V'\1AW2D5J,2S/.;^=,.1A"W2E/8#J -MU<+M<9^A7F3E:$+HXG7J9#2=3J0LK^'$6[*5[%\W_37+S4\TGP7=4;)Q2G!4 -M[H:@D;6!MZYW)/:/N.CKS'X^3<0OU/H=FT.E(=!X[36&2D71[KW@7KJ!/U,/ -MH%%!+43UF'D/=5]8QF:7PH%;RM<'V#K5RA:>6RZ&MBF"J/QNAT-7CIJN.@+8 -MP=DP8+AH8QF@,[57.7F?R/@6)BSPX?I/TVCX:0^]:H_.0/Y=4444"?EIA9?# -M!0$>(R(;J?H[?SS5'0VKOH-CZ$=;4H^*? -M"[MQL#Y9)--Y>*2_R6J21P'OI\#!W_AUJ;7-<5<'2A -M'99R]BXQ^PX;JA;M@*[+''S>!!B('((BA"E*-OZ4`/"X>AI(>M@8]3^9B(3[-?IA(ILD?>:: -MBTU0QTOE3ACA<3-X]WG,T5@84>:!41KR]1H:A"[/B65Y]) -MYA?BS'ZZ!*JD_6R!@CRB#]=GZ_64C/QHJE_SIUX,\%&K']I^PPT'V1)?"QHS -M#6\-%HC11X$-"RLRD7S?.M(?;XF)Q?`@J0L[?4H)>P4FM]7.)WW$*03=!N;& -MH.\SF62KS\5R.\L&6GG1U2KT2?6A-EFIS>HXVO@KWIM+?5&1G;MA.3_ -MKK%.P8PT^S^^"U[O&\.`D@WRQS]Y.Y_3UPXZY"JV1HU+Z;XL/K%_K81C&^KM -M\(-\_\W[Y[A->IF?X*G[C>^P;B(`D\?#86,8L_49PPR4+W<.:RTM!Y"0W;^Z -MKJH?`TSS%NUNX[G$G8@9]G%^K5&4?Y*&PJZ>EQ-9.:JIZ).3QYJ1\^6+2BI6 -MR8A1O)[5D`J)QBK":D8BB&;;H497&3G-9!2MVQFLA<:ZRD9Z/#[9/F.NUAI= -M89JD73,B4>S6E>H%***JG9%]R,!&9-J,=6Y'-`N4G,9P;GNT,5EE!H9$\6=! -M@8OHY^,+^4U1NE#\H*D)$_*JJ_)S*OU__5FF)R[;$3;2&CVW.UE97,#'JXX0 -M:D!6!PV9,;SR]F,&1WFK[,5,Q!C*.JEX1\BQ-W%K2XV5%2^+"]UE\5?Q@.1R -M7AMH?+G?LX#[#Z'RTG\Y0?6>!L?/1S:AJVAK[W^Q_W8&8:AU#:1JD;&=U6=C -M]^8.L[WM?U=@^VZVWMVF9?[([7+#0RR&(-.A'PY/B1LUK?C'+O]+\MS;UC$\ -MC"P9J'55NY$"%/R:-]XIA6)N+#[E\H9VKW/6S,YXQ_YC29"^>*,X:5N1)R?H.=D99V8:*BQ -M&1X$BSEJSC08#0^O&/7UFON42L(?^ESRY6[E)<; -MQ`\22F?CL?53^ZCZ@4VF8EL-DG.+=:F[8A1FIMB?=9J:CJ948&DL5H:."K'9 -MA?"TKWG8@*98\D%\HV?6ZT@%=RLFC/,<5;F9+7.G:CU"KM6>7+(+6.+J--FN -M@:'6[%W`7TT'LV>XUX!XXM9>2Z8I\^"&R5MG;H#^S*"E/Y_\S]9\0V3$`?&C -M]A\M-F@P1TWGD<$]:/RZB*G_LP,@_-_8I^QUAL_5;#7[+#_/VPPX1NCM;^O. -M./FQFA`\C#(/L[G<'I1^WV>P.U?--D5VQYJ!.G_:CNPOP9QHQ?Z!O[+S<%@W -MSR_\K>C>BD21,8<73+]&G9[W>>H+OXPP6'5H,!XQ.TEVW68%@LB9N.`*G'/7 -M',''2,O[HH]LOF3>YUE+>,4SG$!C!M@`J3*TP>F,WZU@5HT2UX#`7+OD%%1S -MGM&G3OJP4F[?#(MN]=GU#"V37 -M>@Y^KD/)A\V6ZC/;7N3@5FZY+/UQ]9M$D1>Z!/`HACQH),ZXT.GQE?`%M&)6*Q -MGB[K)O(/[7^B/1+>'\ORT(FI(X15F$)FJ&7ETPM:O`3(F[C7',=(OA4TU7O5 -M3A9E46C7^0UM%K\P+^V>[!MG*II`;MC^28+)M&_[LU[G+C);'%*-/N-?48%\ -MZ@+$,[T^PNE]K"^G#]27F;OHO1,>,#X6=XV5GS7^U.4M)HQ1A1E8N_M-F'?: -M'#`FF.DO`4:@"&U-96>9`BO^NAJ,^UV;"0Z]_#;K;N4@+SXQ!H"CB4&."_K( -MP4_;0.?W@8T_J8<5*#P2?N>N\A:UW$B/%HGX']HQZ^:8@!I'^8_"U:$A^NK?^FH3;_B$@',-)T7HUOJ -MR'OHLBT-NOL?QBZ* -M2\K*O]D?*2NH\EG+J_VO\,8N>SJMIQ7ZQ$L<*#W,E<<,:_]N?CCY`4SU@;]AZN!@#8 -MST"]\>`6B[#B1_&GND-DZEK[G?FIUOHH_,Y,P1#8>@4RKE7^RD*VPF^"(D^7 -MS2C(K#ZN7:X'D-!I@=ZVG/"X`6:K$^!M*,Z<2-9TJW#@'SA)Y\E;:U1HF`H^?J!4]X'N5?YPS@2Z:\&47!)R -M;`O'Q@BOUO"VV@%U]3LW$3PRK5K^\$!2$FO]U6QO#7#+X^\\:DN*R=\^0SF^K]!&)CR* -MJ9:0"%H8S"ES>QI*V.L'8K%<$@!(K^5?,CO_/@KJT1I7T/C/9]!5N98:,>O@&8L,K$% -MT;,6P14,DMM-#&!/YZ$^2SB?):D2?C$J'SS%A/YWLT?U7^'>H'VQA?H7R*.I -M5DD'O6?PB-NU@E&",KSPR)J,8>ZFO-D^*V]0@IA!R#L: -M=/2Q)OU,.<=Q)[3ES\%G\I00Y<'`O14"#2IKA1IPWLK^:2_O>KJ6,ZQPZN;A -M>\8L[8X[M]@>WDR5X-;MG74S_3FY\94&,;)R5S2Y%%1^[M;@6ERKAVJ3-=S8$MJDF!!N79% -MY;)^J\4OQ^_TU:TFFG/?6/UOU&-QE^-^0]K73^@ACQ&4S -M;U5T\D`Y(\(I4^??LG"[V(?O!:,]?=&@]^MI!- -M<5;CW_8;$X"`@!J#?W5P\N<'&N\PA?-FK+S6WWQ/0FOUL_%]RWOF9KC?39=C -M\4[VEL)C#P.9DEP,'?'UNI>.@6S=],^GF954%[U-%P]YE,KRS`Z;6F$DP+'[ -M]:]'DT?%&JG2:9#99+;O_JOMM9TN9WI\"G432$RQ^',Q+3LF`YR_]]J5#*M* -MCYIOXMDEZRX=.+ENC30F-'OI%BZV6G3(S`$F8BAH>AU6XLDD;;SA%V<&XYXJ -MG[CX\V,FM5N@#'J_W?2&D,.5/1&$W47ENY8^\#DU* -MW^7!6WE=H9KI;VRU>&TT,O0'"[>SQ*C[;T?H9+A9'L5@(]857IY"E -ME!+ZZ[L6P<+G%,F'R:]@=X=7I-Q*&1T^W(F';ZNA)A@+FY&A"Z8G:J6)MZER -M>6667-Y[#9#7=,[BE`:],6]^APSV;K17V8XQNT*!1$;0M2:-V1?J'Y5"Z;*1 -MW)Z*G)G%85!"-,/VYG`*22+'*W_Z9B-56GBC,*BU?EJG,5/17G,K%D.$I4NL -M'B]:5_BNA%-1SK&I>E_#KI!G(("'^^WZF2V=X!U%4Y/6%N37P%'AI*RA+CU1 -MSI7%F^O/G'233ENB&KG=[@TVDF$_Z=AE8YXHJSY&*?BE\@=TM"5`M_QQ*S97 -M)>O+:FMPE[SR52T'!:";XB\^1L?5W^2MWG\#E3VL#?O*YLQN=*'W.)V"[FPB -M"";-H\>8()>Y)$)4\!S,67%8P[WM5;]]?,5M>LGKBF,&9PR&%^A#!%%+3/<* -M+X0XX>.UL3=\6`HL7P06+OOIQ+K0'IX4W50$>0PV1-4#]6']SJP@G[V#/CM2 -M_JF/S?Q<#;L3N4#A98H\*TQ0_WN^>::P?R>Z)Y.ZXF$F[@":SV/;2B#M0\1G -M^S.$[LW1Z:`"AU#\?V_Y0@8[!/J4SF'YJ7M^KSVJM;_]T,,;`X?&M*6A(*.Z -M8_>S&2SWAL^:N[X\)#`J&8?8-(]G@R22Q&=Z-AF"-T<7$=MUENMN;%QX[3#Q!1X.;X?\CI_.SUND2BB2MH&VOM;Q!4MA$D&>E%S;?+"<+A4_H&H.6Y@L_6VO]T&AH?HE:3M$_QV.I -M7CD&A&FY09.`6:_CI!I&W9G@MC<_X@_HO\AKSYF\W85]A'&'\36-&)U -MN\.;4'`<"%XOX\C27J^^/-*^& -M1C9ZP>S(S57HHXR.W7Y%X4M;F2B/Z^ONZ.%)SOH_#]2UBT8$Q4P1AML^*(`P -M3?1#"T^C&/'OSK3_9Y1VRM>9XS>S_W]D-9C,^R]TPJ -MJ_U]_:'P\0@_77#*89PU,(.M^75TGODAXWKTL6( -M43O0)-!Q.UJ/8P6($A8#P&KUA,"XQ4Z(R8,EYJ^;'P2;#W?,_#V=O(@:OR;8 -MT(8?OA&>J%#)F1IG>Y&&ZF=-TKVG,6]I+X>R?!?I$?F:&&!XP(*%IMMUSSE> -M6:08]B85"[?]'_KU)->WH'(,"!I[[O.X++S$$Z(CA4.!Z!=?;TP'7?3*N%)_O!V-O2RY9OTYD]H(&8+B4.'[>/;$/(WR9XMG8"<,2B77@ -MNIH6E_BZ)7<#LR!6=&<@3?`Q-#H,?J2#E&.IKU=I6QY0600$A(=#!G+P=M.S -M*.77NX!J="T;<:)U._N6(OY@#APKYP."LPX`'?,F`D,Y[#`+W)B5`7779$!"8F=YFP]@5ZL\L" -M6(S/CAF"$Y=[;W_*Y'F^M!*?T>#L>F8COJ'O]G&0CQ^(T%FYF`^7Z8![7%TT -M%F?9`\7G8FM1<<7\/L!PJ6Y=_!=#2WR`5+#WB.TBI:7NC;,B]^L_)L40_-_; -M?\.A?!`%(00K7[*``7(II^+9$2`4A$BE115143,55%1(@%04P`T(20[K]`R! -ML*"?ZD_K-G7_9HGUNP?!BQ40156;A?)],0$@,6Y]!P)_9*LU-SVO,_^ -M(./;XT4O]EGOL_.;@DN4W2G\KL$=9A0X`E-LEVGHNYD`'W -M&/U;K3J21`0'%AU-C%?^\Y[=(YG2&2.`]4U\L;`D\IKY!S%;Q[@T,XY&*9"E -MN)*XGE5]]^2DAW_!P'%F#>9(,CD>,5NFJNQ7=![`4%KOW,/B?4AJM=Q-OBAZ,-*@!: -MK/QWF-@ZG'XXZX@VJ:1$038,#*I<](GB*(R&3`@(RVDRD=6.4>"9AW$JA3P)W6R?X(2+O=A -M@3`N0PJIXEW+$IWLL*B(.)!2_\>+;<"M9/-K+";R6&"QO5_"<#[`N- -M6CO$)`/:[\A"]R@Y3U1Y\M,C,@:M\D55@1$"R1'C:?,^=M@I -M@-TS`N%,RGR-E:=UU>*HE]AYM47(;-^>*CWOJJ2;XSFQ9\"4 -M((-2.U];6QH%(DR:I,`:;1#S]5?3#876*V=OK*,W8,@46MC<;5N'W(1QE/X@ -MXF)KS13VED"LJV1.&QO.6][>K'!X.;-%FH73.AHJZ-SLL*/Z\"KU1P"]7+Q: -MFS8&'F/^UIE(HM;;&(W^$.SER>O^WU=KD7J/$(2MLL*M+^"O,BGWO.H"]5OL -M5$V);;U8'([XHC07/E5[?*\O198X0RQ0[;KCV.Q6G/`EILZU[067?=S($/AS -M)@@#MT9!?3'LU)"UE_]#(W\-5F@1U0H\B+Z^,EV//:=I+SIHA'LSB,N9@>R_ -M.'&/`MQ+(%*R>>FSZ)2!>QLTET0C(BE:U7AH_M9WYXA&&YCP?$V3O@J?#B"]TM,Z'F'"#WVJ>\H3!4FP^$T,Z8W/H@XL -MR&*U42.(G[5)@[5+CM#Y8?OY+E:1G@TE#\2&>8^47]9#-G -M@,/[KE1+D/6]6[1>'"Y-3W0-'GFC\XR8Y%.?(0GK!K7^8T1#A9F*(2O+F/=2 -MNAWHF`'Z&YLJFQ)!?_?SXR5CSH%,I3X#:FZS9&R^34`P>T:!NLL<=`NE^,L! -M)4G[-FR&'O^#9-?7!NGUM4;+0.TX!=AXV!S$.!V:IK$G/P9+RIKRX$4=4>O. -M!GC:KP?.`]*(%;9&!S*\0WZ=M#1J=K1''-FX/)PAV_^Z-&N&B8X/REJL['>L -MV!`=O!V0&5F=*P'P'^YYA>%E.'[U>M`QN^OSP/Z,"5A<3^/'WD)6J81UNW+Y -ML%O?S\W^G#RP3RU=G`&/2`L27L=<]<`Z6G+AN@.!L.]XC9&J6"5"GS&HKRZ/Z.+2)R.D2FO%E -M[_4V!L3>[B@4HWOQHK)>CRS\354Z/@*IX#;KGAY@6<9RS0<_N2=%%8Q/=IUW -MN'2'8_%0!4;"YD.@<`ZRYP`.M.XBX;=YD@R1^.V!MP=]%S/FNZTR75+SRIG2 -MTQ"HJ7.U&F;3I4?:4(R)2O\`I,''>P%ONF5O=E[,IJI\V5#1RQ%[-DQ=5CSL -M^I%^63(O1ZN[Z4>3OU(3\L1/SMOO0?D,T!2^;$^Z.0#4C3P9TAZQ#&&1Y\-6 -M@3D&JZ4VJ9X5]GF\"=!>[[>>RFS@W'`F@`S?4(O,,W/+E0?`>-%>#%,AGO\L -M@"AUJU>GBVE[0@"WDD -MI[K)\Z2-\G88%LUR@AS8M:@IC6'31(SW)*XGKHT%Y%$D!L5'UZR4LSI2ZK?T -M:(E1CQR`(ZUT1KX`4 -M%WG30=OSMB&:S<33<\`=*DQKV;+H0440NM<99Y4OA8.>:FZ$'0/3C9D7AJ<<^;8N' -MX%KS;XA'QQPVS/[<&%`":VX.0H^..E2!$4SM;]QHK`I:YMJ-=OB'>.Y -MMR-TW*(O+Y,6H1D8=WQ#40F-WS\<'.]TR`L[=X;EZ*!.'9X$'0:!"7^?B16. -MXQ.,".%]>$7X8QX/`@M&(">,`W)XTA%8*GF&AL!/':@X&G)^X?X%4<=W:=?!"TNG?&TR#(PH`9X>!X\3OYH^QDQ^4; -ME9,Z=R=R`ZT@XY0WAPX`X$IIL(^+_'D4TRXT\.\V5N"`'?\,ZROLG!EZ,1_@ -M#]GL+8$\S3SE-%^-!:D7NMO-8<(#A:#PXKL#\BR?8)L`*JTGSTR>\,FI.GQ1 -M^8>$OG%D34U8K_M5/`$OFS0_3Y?)7L+^RLJ!KT5T0$\SQ[_HD'#I/&!5]];I -MC]KZ]:;,)0`"L3%VZ.XB$@1A::%Q:$&2:0EG6))&0K[>:/I -M1Q!UJ%^ZT9[A7J.@-NQ(ZUB=^@04'C931XJU$<$>A6^UL[[_GRI*`KO]_Y0_ -M4XR7I,[*7E]KJK_*%D0VVFV-L;8VBA;>D>AWVCO/EZ:S1<9R@E8?]_1[K.Q6 -M!6`;3?(LN#B;/].ET_D@F/^N,\CD[CDY^2A2YM-![A._OKRDS)+S- -M'I^FGGP0A%G>_'[=5)/73K][:X,'0"5-U8[EZJG/:I.\_/MN'SAZ9AS>00D1 -M(DR*[G9VT+@?*`^,!4Y.`S5>`7->J5=J55(>ZG8]N8-:2@\#KZ&>'K-] -MM[W2QEP>!!-3,XF\?FWDIV\#<;F*6'0QO>0=(" -M0ZSIW'^)X?!0?PQ\C@(*EET/SX-GS_?TD&*8E#XZSHH2(+:XTSTMP_MTT.JR -M.K;6Z"HY1``5#L7/PZ3'8]8?/8_,=/3'@"5]A+.*1CV?V;NIW&] -M*[2``8MS0:)O)__$>-^F-`MX%G]=ZC(%V:#/ED1QV/GPJPYT$<(!4!!N8QSF -MPI<*M:)_A_WIG@0TFU^W$?RVU)MF%LFTRP:K):V:0`4SW83`H-:3[&<^R -MN>!"'O_#OO-OA.063TC[^V3F]#QDUHB`$WT?.TO4T-$T)D%OO/)\L^`2_YHA -MVF0)''_)?TT?S%B"G7*)2"(..*V7^01SSEKZF;Z2\(A7??Y^*@97!K6):OL\4=E6)R:I0Z"CWG/M:UEI#\@D'(W^U^E@Z[AM]['T_4`&ZL^U9 -MN^HSR+W7#B[Q^!G.;?]NYX@'&Y7NUT]/%HP2Y,:H)VBL$YM/D0V26U_CM"SY -M[CQ1-J,!M.]O50`KE\>_,XUPO]+$Y'S)!@ZE$1#!^GQNOY`0Z0U!$;B]-7*0 -M`ZN9?%/RA(?W&?Y*1CAF)Y_0D"2(R_@U,AMFO+*LUE_G.9VRHD1`6+[@!*G8 -M-6LTG*'@!IVC`"`/NXH[?SG0`P8W<$WY;=S&4B>JH^NIQ:(@$=A3RFZSU3TR -MCI:N2XEODORF<="1#0)\1UBZ>&/W/)#[FYJO:4(`$&XZ3MV0':I[3>[R29DV -M3'M0D"W*.)P5,N'T9/?\#=)(@OL@(OUL]KS)HJSFFX/P0#\VGP`I^S>!S=Z# -M7?B\SG^`)H=X5!M.;O-MDIPZ>!#&T&'<5N(=(*_D?TB%@B&15G'?4FQW]2IH`!GN3>E -M=:J8DP3OOYW,MNW>+X^`K(/M*DLRJ#>[MHGQ$T:XA!!=4O2V$4!%><'SFR@0 -MXJP\.]1D07GJ5P$(`PN:;=/(74ROQ-P?W,)->)U`0'T[F$!'J2TH<6[G(2+S7F'ZNN7]C=[P\A221X"AWT -MY_U:0[1,-127"0=`"\UOL/##L^DOE[56D-EP82X\LP0&%UOSS_%U\@1JJN:B -M-G20`"TOC4BK\6N:%A/;ZGVQ;L,K]^JE)GP^YKO8S:>]2`%4SLQ,+)>[Q[K) -M\[M)PI`#:^M,S-W``BW+0QW6SC]E]NI@N!P03AD,U'5]I4;&#EK>S_*RE$0= -M75L*\X:O!2+L8.&WX\`.;4D)_SR2^A4,$\11U&!*4W%=Z8,?IUQKY("`QE0] -M+IF!"2Y;/09[,?&J/D7&NB+RUN'#]XS@92:5DV#1@#AP(+S>H3J:@1_*QM%, -M%EWCS@(ZT)W/8OFT]"(`/_TB5;[P!\/--HQ7O/)HDMN0@M!`@8/I;A1)Q\'0 -M7'A?."->7=[3'X*WA6R`#1>D%GCZ+(M10U]R]7!-'(Y/Q0$3E5?W -MM]H`9L-]33<1;SFQG=]Z>,D`#+=7CD5`.FNJ'(UQT"9<78`6GW0J"^G??IC( -M">4J=3.KJ4"$1A1`*!SSS'O>ZHG/R^+;6/Z^_H1@B8.)Z"#!#7*=J@]9@SWC -MY%9(\R"US[ZPVZ;63M)&NA!RA5B2A$8`'XYU002QX>;>>W)L!X$N>:>`_NBL -M.4B1BO.^!ZVW?W78TJ(\1*7( -MF>D012>Y;[XX+_JN6U!"P$XM[QI:F>/26/3+H^I]$DD78`%+DS@M>7":?Z/E -M0-;L60)=::9DLB)>QE\`L6#?33Z&=VNPW[=5)!$&:1Z!)76;M<-S-G2&S5/F -M14_\U?=_[8QB@?`@\S4$6%]GUL_<8)&65,01J(BSG.O""G_.]_LG;;')GP4% -M:J_E`N^#F*++HMMP>:Y;QRBQ[THB"7^M7/`#TW[E -MAM3?&42,-3EY$@`?2.E%7P$)U-#.:#-!R7F(1Z)(GM%.+DNE$`U0DHMLBP5.TUT;J'.II@!D(2A -M94I0T'JM<%"1/.[R9#^)\NZ5JD=*1PX_C$43SA:VF20O[Y!(""^922+\:=HV -M3J<+QUUQZ02+6XJ9R9S(R@)E@9,]NG7)W=]QXJ&2`!FH<`?50]2P.0C?JND? -MU=&188`PI,4DV_'>48+^[*!(!^_YB51V!T6[,-EEM7A(06,^0%+A(] -MJY[8Q1;JF2>\%ZX200V'8E`5O%6*6T,&KGCX&$]Z>.4_."$M2=OZ8B7>ME.@ -M*1(M%BNT>&B4V5E&4RCGOD@`51$HC-+45]:EED,?4(05K5Q:.>!<#,;)22%% -M^]I\$O^2EJ`!EWV47;\5-X*+)H`51)R&7\H'OKOHB"-D2/[1$7N;%:_(1+NQ -M/L9O*FHY"F"^='1D01[^DC<1F?L?1*8%O@W&](MWWW2D/4VBBLY`$,A[D9`N -MR`/QMQOA6A/R?.I!P_F_(!!AH05%,=4FMRB -MYGC#-'0,C?S`()(@OMJ:H;*4XKNW9@(B*AO"*FN8%(LOD=#YZ90@/WU;_RM_ -M8:%-_K)CHLNW2@4GJXN^QX`YZA(064OA.]*F#6A!:T@%KG4\G(0GPB( -M@S];2D30M_45-;R64'B'OA4[3D&O^:%O2]2MH@$N^2].0*$R,@'F*KO3UJE='8:(1)!?:-,0<'9$0 -MT'G?][N@NQZE;4<")2C206+O@4/JA#@*262!=[[5&K2%5 -MWVN59(CLOH:\KX'IG300X-!0@!E\]F3B_.Z2>)#D(\ARG:($`Z4#43J?!"?K -MFF:_J;SB(2VF=O#G]UD>3W4!"VR/5!#V\+\1@G>XAG3Y*%CY)SM\4B'6:G-G -MRW".WDY9_:+`#!4U>\X:YT*-Q;$)",BVC_HT@.K8^>SE*1+C-'C$UN6=`_(R -M`D(TB&LQB5J!$]7S_M83O,B+M>*ZX!%CKU$$2+9\\\7P?N#F^,"'EO?(O=56 -MW![SJ6W-$*N>(G=%QW->Y5HYLB`F#GZA)("EE1VMZE(TI^9('S(@5_S2(6'A -MS]FN#(]#O/'0HC"`BVO=G`0U6OBFW/Z.@JN;:2&B2`$+>"%- -MX)1A\239!5UT@JH@%TQ_2',7-?]HYW:[8?S\]-<<-B$O2.OP@!5,*1 -M;6,@7-FFK&-/E[=K_R/$96($!LL]D]#BMFYU^JZ#&>X'2SO?9T>\3""^\PP! -M8S$RMV\!03.LX.]DO7B802@"VEIMIX@6@1C/[:GS,TC>JM"!8ZX@&SC7GU8A -MN91JAI=)1`IN_Q.B0#7190>6/G$A>/E]\F"T3G7]CH=)K/#AO2H"8''))S?B -MG<)DBF0[)%KLORUMBC@A+F+-8=_I$+$_G(SMJV54@K7/H\J^"'5?*F_T*=^I -M'.]\,5OR(?3=/VW9#(2]'J9*MJ0B!0^(C^>.R9`3S=U!GWM>Y!T\!L%@@%I< -MG[Z[IGWJH@Q)[_UY8B#)45W18%;6Z#.UT5DQ4)0!,01B!+:Y<8]6@#E;'-%# -M$A64Z5*`,PSD0/JM7OY^&F4&0B#RF0S]>0*2Z.VVJ1J0\>MX;^1!]:S:#@JA -MUVSW">?Q^;-?D%@$`]1&+OQ`27&QKIC=&[,"2%R29X2*(DBX^N3Y#5ISL2?( -M:NQ<_UQ2(MJW.VP9J<[-KT?I@"XE)UHE4L,CZ-)VT(>-W%RBIHP1/7F>,?]@ -MF.,)N^5"9%(+^.I`>+H3"1M5_IK`D5!""W?LH(@@5?Z"^NFT_#D`P(BR&F[U -MB`*_V^:!O-C%A#LK93!02&:``K*"T8+9D;74T^./JD8Z$1_7^7O\T:X=!$MI -M]!IU77]E.-K.I,H0-E41\7787$.@ABM#':CU(K[-S#G#1Z07VHO\D*K^L60& -M_FOO^L$UR2D578:+-D06K*AN<.G1RM;&BOTJ0A$$2N[N]?$R*)J/EC9O.D1: -MK9X'5-1=ZI#JGQXZO+<\B+RR=?O9_PYJSV+[/&00#0XY^5C?'4?!I2W46D=$ -MX(MBV*OIZ?YS[[FX=4+2XKC44PQ@B;*%^_:,J&(;*/"F&$81P"K]^$"*$R'` -MNZ-)GC`RBR>0`9SHKOFX.,`)>2Z3`2H@PE+SH@#5):^HB;1:(`1HD7=0IDO= -M'3*8ZKJNB"B[`B=MOV4MYN^NA&75TU$0C-;[+.XPE$$!S6GC,*NCQC](^[+Q -M[C$*I-+>8B((?VA%."V6X6;$P8O#`N(9G(.*N"]G@I[_/^=>5TKZ7=,99KIW -MDHF,^QKSX)ZE_NR1J!W/XT@.WU44%G5IEWA\NW_4Y[VF!.9?)@` -MH/1?W^?@?/=E"(F=';L*D<O7,&Y2%2N.MM_)SWER%]2H@":=@QZSN-*%"*1OCY;ZJ-A7+-:J`B#( -M9U56UH,+TV=ZU%"'ZM$FJSD:0HI5GOK_QX`@R.%94^3^%)+;#Y9.JU"[?0:W -MX7M`""(O=553(ZNYT)+MG>P;(@0%&8!,!@`EXPO]'">>%47\GMYU:^+(!^%! -M]:[I_CI%/P8U=15T0?HVQIC;6P:X=3+\"CI\!\_&Y4L!!UK,#O0/%Q,SIU4_.H@" -M"B1%>=6T4D!P1)@B('T&8,>[-W6G/$"$*VFS00@=%Q-110A5WC(_OC'@,-E' -MVW'NTSLOD_+;:SMI6]Z-Y#544T4-3*X*C[F%'F:_:,?7>WK8]!)N]-F-M9+C -M'BE^OM:;$VFQV6$&6P80@7RT=JJ^)'>3'/L_>=7U;33 -M$PY[K;)#P-WI_,SKB=(@]L3WOIEVT=OU]_L@6*,%T$U9O(K`T`/``-FFZ?EO -M^W[*/LK-NG$N<:._G+1;K_1ROO=BD$`'9-V@]9]C\)A-$V*!>]:#WS^C\B'[TLBW0&38H``"*E\]\EL%DN5PAHV.P4H;]VD0Q- -M[>U.*60`YV^^;MT,/6C@37+I&L;4`LI.3J>)V*VR:";D4$0ZJ_%P1NCX(KRT[&SOUN"RY*SU.,6G[*)B<"! -M3]#\:?1&\U/?!J9\:D;D0`"2R[FR_:9RF:G0]V4E=9WZ^+XD`-+SW5V4"-GZ -M^26[/5SR(`57$Y-OWTXG:>LW8QLXW-+ *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-head@freebsd.org Fri Jan 13 03:42:53 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 32299CAD27B; Fri, 13 Jan 2017 03:42:53 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E050F1907; Fri, 13 Jan 2017 03:42:52 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v0D3gqB3030750; Fri, 13 Jan 2017 03:42:52 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v0D3gqdX030749; Fri, 13 Jan 2017 03:42:52 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201701130342.v0D3gqdX030749@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Fri, 13 Jan 2017 03:42:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r312009 - head/usr.sbin/fstyp/tests X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 13 Jan 2017 03:42:53 -0000 Author: ngie Date: Fri Jan 13 03:42:51 2017 New Revision: 312009 URL: https://svnweb.freebsd.org/changeset/base/312009 Log: Add license preamble for r286964; credit to asomers While here, clean up trailing whitespace MFC after: 3 days Sponsored by: Dell EMC Isilon Modified: head/usr.sbin/fstyp/tests/fstyp_test.sh Modified: head/usr.sbin/fstyp/tests/fstyp_test.sh ============================================================================== --- head/usr.sbin/fstyp/tests/fstyp_test.sh Fri Jan 13 03:33:57 2017 (r312008) +++ head/usr.sbin/fstyp/tests/fstyp_test.sh Fri Jan 13 03:42:51 2017 (r312009) @@ -1,3 +1,29 @@ +#!/bin/sh +# +# Copyright (c) 2015 Alan Somers +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# +# THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +# ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +# SUCH DAMAGE. + # $FreeBSD$ atf_test_case cd9660 @@ -9,7 +35,7 @@ cd9660_body() { atf_check -s exit:0 -o ignore makefs -t cd9660 -Z -s 64m cd9660.img dir atf_check -s exit:0 -o inline:"cd9660\n" fstyp cd9660.img atf_check -s exit:0 -o inline:"cd9660\n" fstyp -l cd9660.img -} +} atf_test_case cd9660_label cd9660_label_head() { @@ -21,7 +47,7 @@ cd9660_label_body() { atf_check -s exit:0 -o inline:"cd9660\n" fstyp cd9660.img # Note: cd9660 labels are always upper case atf_check -s exit:0 -o inline:"cd9660 FOO\n" fstyp -l cd9660.img -} +} atf_test_case dir dir_head() { @@ -177,7 +203,7 @@ ufs2_label_body() { atf_check -s exit:0 mkdir dir atf_check -s exit:0 -o ignore makefs -o version=2,label="foo" -Z -s 64m ufs.img dir atf_check -s exit:0 -o inline:"ufs foo\n" fstyp -l ufs.img -} +} atf_test_case ufs_on_device cleanup ufs_on_device_head() { From owner-svn-src-head@freebsd.org Fri Jan 13 03:57:37 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 41381CAD503; Fri, 13 Jan 2017 03:57:37 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: from mail-pf0-x242.google.com (mail-pf0-x242.google.com [IPv6:2607:f8b0:400e:c00::242]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 0E31E1EBC; Fri, 13 Jan 2017 03:57:37 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: by mail-pf0-x242.google.com with SMTP id 127so6283928pfg.0; Thu, 12 Jan 2017 19:57:37 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:mime-version:from:in-reply-to:date:cc:message-id:references :to; bh=EyawoXSejkhKj/5DPm3wZUR/Bcrh2cO67KQsyph2DgY=; b=lBG2vUiJfsFFrjMu2ZZpG6UgOOLuF6IkxH4saDjJ4dGOE1twwJZY2VPs8aUhE0cKZa 4V9dBu+88jr6ZV6SjCPJsFH0/xXHUI718Rlx1yKkWx6e/Bhm2oaMJww72mwTF1P7GyOd lp2Uzs4onysZ5h/ljs5mgg/RXgb7FecNVCpLB8BOw4zMT+6Ln0pdHA0QcrBUAFCCBgJI DXyPOV+uQ3iK5s2AbxmKMSsoQ1CLUtxOIOOkDcLxR7yn4w1yB4RvbdUsU4M/nOdq1fSD dJHE2WIIdEmSMvzUTLOZToWfIsZXwO7Lvg67uRgz3hfMPI2HqGleqrIozLAh9/JsInvQ ssSg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:mime-version:from:in-reply-to:date:cc :message-id:references:to; bh=EyawoXSejkhKj/5DPm3wZUR/Bcrh2cO67KQsyph2DgY=; b=jG+1oIulbszl/9l49nvrInLpART91NMoiQSbiD3v9+Xt53uvaRn1nSg6bAY1njHX/7 Af8fUU3UKWaWPhzeI/bY8FMiMfbOsG/M3ffMjPQOrqzdo6r0e4EIUO2Q3nmW2PD1kAS9 Mgrd9Vs5pIrNh64J8hDEnFXjiUXM36lPq25kY5YcvP37YG5zRs3Fy/U+lascm3lETTcU 20iKJ+HAgiA1GPycZnfLXUFAYgmcXVoPLMQ9/BCWnYuoBe5HzGMkhSFDYipdKptQ97xB UH4HyxnVSm0Czu4e0n/yFFMLAoVUTqTHZuLpG0lMBfzzdBEmkxSCPWdzuZaZSFmARn2j R+pA== X-Gm-Message-State: AIkVDXLvg7un37qW/7Cvrsw2v13k7rhrAe6HzfoqDxoVHqf7ZvKFL4sXdQd6Mv7u+zKDZA== X-Received: by 10.84.210.107 with SMTP id z98mr26589943plh.171.1484279856380; Thu, 12 Jan 2017 19:57:36 -0800 (PST) Received: from pinklady.local (c-73-19-52-228.hsd1.wa.comcast.net. [73.19.52.228]) by smtp.gmail.com with ESMTPSA id t129sm24980253pgc.32.2017.01.12.19.57.35 (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 12 Jan 2017 19:57:35 -0800 (PST) Subject: Re: svn commit: r312003 - head/usr.sbin/fstyp Mime-Version: 1.0 (Mac OS X Mail 9.3 \(3124\)) Content-Type: multipart/signed; boundary="Apple-Mail=_53F30B36-DB56-4B19-9AD9-4A405802F80B"; protocol="application/pgp-signature"; micalg=pgp-sha512 X-Pgp-Agent: GPGMail From: "Ngie Cooper (yaneurabeya)" In-Reply-To: Date: Thu, 12 Jan 2017 19:57:34 -0800 Cc: svn-src-head@freebsd.org, src-committers , svn-src-all@freebsd.org Message-Id: <5DFBA40B-3B06-448A-9AD3-A70D3EC8BB16@gmail.com> References: <201701130212.v0D2Cw0j092852@repo.freebsd.org> To: cem@freebsd.org X-Mailer: Apple Mail (2.3124) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 13 Jan 2017 03:57:37 -0000 --Apple-Mail=_53F30B36-DB56-4B19-9AD9-4A405802F80B Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 > On Jan 12, 2017, at 18:14, Conrad Meyer wrote: >=20 > Forgot to mention: >=20 > Documentation: = https://www.sans.org/reading-room/whitepapers/forensics/reverse-engineerin= g-microsoft-exfat-file-system-33274 >=20 > Images for testing: http://www.cfreds.nist.gov/dfr-test-images.html > (raw disk images, include partition tables) This commit doesn=E2=80=99t work as advertised: $ fstyp dfr-01-xfat.img fstyp: dfr-01-xfat.img: filesystem not recognized $ grep exfat `which fstyp` Binary file /usr/sbin/fstyp matches -Ngie --Apple-Mail=_53F30B36-DB56-4B19-9AD9-4A405802F80B 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 iQIcBAEBCgAGBQJYeFAuAAoJEPWDqSZpMIYV2U8P/2B0Ex223y70EZbX4XD/AiA1 1BE+/JAdmfiJp3ZYGTM052LIbvwJ7QhiMzXQ1FaShzwOtbP2gY+Y6hA/bXw1D+Us 4SfD3HEts3cK1iptRZOiYpOU/hXygxbEUFxCyXdhLZ111K9xdsNvN4zcK1F5V/Nq YETV6jU6RkB8j/QnhEOGeLB5KOc+az7iHqKqLP9OZ2RFgbZkC2+5mEpkIaxvTsrl DW9YgPVltpo6hLAfs03URqAcfSDHoI71maRWIFRAkh9JuJrqV0CZ/dyfe9an+1ju SirmFmApHB1sQkDOYreZo+luXJD1cNlgPosb/hqvdrgwNZ3qdnMSAwvXqgMAtiZ8 4O9YbM7D0nZXZvQsEbUlLyO/fZf6eodUvwbyf4qQ1csbaUDIJWhLCWOY2wRBIKb8 o1pEMfBU+eNeuiKdQvIT+DbqMZISqv9YGB3QYRIAEpW9aXNJUFW+ISwhuijwo+KH 5nlwGQuMYOKLxAjNEMjpM1y5TF6BcawSXd2PLVZ7L7xr4MpDwZrziyA593ipyrME JhPMWRTaWcFUi/gCS/BYrdBpMUH+NX4I2Svfse8FTI103sTNG47sD/pVK/UefEOM xIIdqOVRqqhWJEvc9SKHjP5R6D0epOht0QbI4fcIM1OoNIT6p75zyAvVNFyI5Sa5 Mnyveb0jIG9S/vEKgh+A =+wTi -----END PGP SIGNATURE----- --Apple-Mail=_53F30B36-DB56-4B19-9AD9-4A405802F80B-- From owner-svn-src-head@freebsd.org Fri Jan 13 03:58:24 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 60283CAD5A0; Fri, 13 Jan 2017 03:58:24 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: from mail-pf0-x243.google.com (mail-pf0-x243.google.com [IPv6:2607:f8b0:400e:c00::243]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 2CBBC105E; Fri, 13 Jan 2017 03:58:24 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: by mail-pf0-x243.google.com with SMTP id y143so6307117pfb.1; Thu, 12 Jan 2017 19:58:24 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:mime-version:from:in-reply-to:date:cc:message-id:references :to; bh=luHXc5ZrrJyeKxDZfu34BVI0elyDiFTKOT9liu/O+zA=; b=tEIkRW3uNXdjMRK3njr8z5ewhRTG2eLIChpAYGcYM28pjPP8qtx7NMWmHKj2vBypN0 9ZjtqpqecNNI/FFwQ85PzqRqHpLV3oCcrMlAr/QanKE3EHiAtaG0w1ZZDvpbrbsJBWmr kw310cQlqJBGVnkqBtkwW4GYCdPzvrFnmRsSNumd3BYLaAbVfTep6ksSGEGH4cs+aJvc qMZU9LVLG3eE9juN942ZBKhQJZyw/3fs250qE5kZAivifGq+6kvL3unMifBQkN5wQANl X/vS0hZH5vyiw+AnES0qiaibT+Z80wtIjiWZ98xxXVTcH5gP0C1VNDuRBikNupMwrppM u3jg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:mime-version:from:in-reply-to:date:cc :message-id:references:to; bh=luHXc5ZrrJyeKxDZfu34BVI0elyDiFTKOT9liu/O+zA=; b=MikiejyFiE+2zeclyUNBh887jwPMSVc4Rd9iAjixSArdrXvE7b0cLlpMt8qm4zYy/w 2tBPLcszUBswvBRLeKmxBY9yC+Ga5YqbLqK9dvebTZYfbKKVB8DZLoJVNSm1HKynS0+S AorZTyLT0Q0GDmea/zyltvtuokzcxHc1WxeVJVJwWUBufM0jPGzmPe2G8Oow3Iuvp/Gk VQy4h2xTMHRdnjn/U42se1kc58zBv6CCCPrp7rOqOpQ4mNInq4ULVB7m2bJw1tNfCRR0 NbK4oun+LsgufZcYuJne75lmT+8h0cvFeXgezw8LRZpeB3ap6jL3wscyiCfgUGEV4VNr 4RgQ== X-Gm-Message-State: AIkVDXKwaBL/SU7DGCQs5LSJ6Za6EqZ36M96JsJxLBk/iDMeQvSbRsJ6TtFkngVZrB5FZQ== X-Received: by 10.84.142.70 with SMTP id 64mr26543117plw.177.1484279903581; Thu, 12 Jan 2017 19:58:23 -0800 (PST) Received: from pinklady.local (c-73-19-52-228.hsd1.wa.comcast.net. [73.19.52.228]) by smtp.gmail.com with ESMTPSA id t129sm24980253pgc.32.2017.01.12.19.58.22 (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 12 Jan 2017 19:58:23 -0800 (PST) Subject: Re: svn commit: r312003 - head/usr.sbin/fstyp Mime-Version: 1.0 (Mac OS X Mail 9.3 \(3124\)) Content-Type: multipart/signed; boundary="Apple-Mail=_DEEAEC0F-D73D-4634-9005-ADA91E7ABE26"; protocol="application/pgp-signature"; micalg=pgp-sha512 X-Pgp-Agent: GPGMail From: "Ngie Cooper (yaneurabeya)" In-Reply-To: <5DFBA40B-3B06-448A-9AD3-A70D3EC8BB16@gmail.com> Date: Thu, 12 Jan 2017 19:58:22 -0800 Cc: svn-src-head@freebsd.org, src-committers , svn-src-all@freebsd.org Message-Id: <6F52AA68-EBD4-4FD1-B2BB-D5831D5B0777@gmail.com> References: <201701130212.v0D2Cw0j092852@repo.freebsd.org> <5DFBA40B-3B06-448A-9AD3-A70D3EC8BB16@gmail.com> To: cem@freebsd.org X-Mailer: Apple Mail (2.3124) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 13 Jan 2017 03:58:24 -0000 --Apple-Mail=_DEEAEC0F-D73D-4634-9005-ADA91E7ABE26 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 > On Jan 12, 2017, at 19:57, Ngie Cooper (yaneurabeya) = wrote: >=20 >=20 >> On Jan 12, 2017, at 18:14, Conrad Meyer wrote: >>=20 >> Forgot to mention: >>=20 >> Documentation: = https://www.sans.org/reading-room/whitepapers/forensics/reverse-engineerin= g-microsoft-exfat-file-system-33274 >>=20 >> Images for testing: http://www.cfreds.nist.gov/dfr-test-images.html >> (raw disk images, include partition tables) >=20 > This commit doesn=E2=80=99t work as advertised: >=20 > $ fstyp dfr-01-xfat.img > fstyp: dfr-01-xfat.img: filesystem not recognized > $ grep exfat `which fstyp` > Binary file /usr/sbin/fstyp matches >=20 > -Ngie Also: $ file dfr-01-xfat.img dfr-01-xfat.img: DOS/MBR boot sector $ hexdump -C dfr-01-xfat.img | head -n 2 00000000 eb 76 90 45 58 46 41 54 20 20 20 00 00 00 00 00 |.v.EXFAT = .....| 00000010 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 = |................| --Apple-Mail=_DEEAEC0F-D73D-4634-9005-ADA91E7ABE26 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 iQIcBAEBCgAGBQJYeFBeAAoJEPWDqSZpMIYVERgQAIsNLsk4eY7fUOhnyG1UNPmr Dw3gVpxvm/6W0VEzr+nqpyHC5D9As0PAuBKmiIhaw+ysF3OEG0UKNkBEkgcIzM5P dJJY5xH0W1HqIwWMXi4h+smc801sBggN7jRnLXTXm3cj8bi+R5W2wTVFL9SFzR9a maLObOo3jPDVVYXBIp5rasokcfkBDGN8+0HY63mR84tzK8ujs0NzNvC+LwuXxmu9 iyG/57i4CNnEQa22+Ht03IdmMSpSwd57S9Cl6DfJ0/QrTX6amlNWA+SOQEWeMD6C HLScGnL8KJPYQe7KHLrXor+DKdTLjbPe+sKjITk0n+Q7H719OegDdvQukw3iQb0A xI57giswATtkKPNqDp3iECj56VClHgZJsaP1lI2lYjxSx2q2SP67S/mqXVzd+J75 4aXJOybfDy2Rb7A//GRnDJR36aNvI8CfoPEy31jvmcfSVOzCYBt4X93JP2frroiB rSt4ptbM+f8T1uYNRgv8zj+Ljowpng+f6+A4hFhPZj+CG7O3Mm8BH+/t2pgaVz4q ZLwYBzwV0fE3LTO6CNTEIzBniVxEXBU6TXZKhdjU6Ylg/ArGcAeiEfKjsb8ohgoW KWk7EGmIIi2ymyusvUVjYCxhLpyUNXwkxLn83zo26ncPx4Fa/f+xgKtWTnQ0eBZu 9IHF2EYRmjIS5YX0R6LP =A/0V -----END PGP SIGNATURE----- --Apple-Mail=_DEEAEC0F-D73D-4634-9005-ADA91E7ABE26-- From owner-svn-src-head@freebsd.org Fri Jan 13 04:02:10 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6EC18CAD7E2; Fri, 13 Jan 2017 04:02:10 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 252C115C3; Fri, 13 Jan 2017 04:02:10 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v0D429qn038497; Fri, 13 Jan 2017 04:02:09 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v0D429BI038495; Fri, 13 Jan 2017 04:02:09 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201701130402.v0D429BI038495@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Fri, 13 Jan 2017 04:02:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r312010 - head/usr.sbin/fstyp/tests X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 13 Jan 2017 04:02:10 -0000 Author: ngie Date: Fri Jan 13 04:02:09 2017 New Revision: 312010 URL: https://svnweb.freebsd.org/changeset/base/312010 Log: Add testcase for exFAT that currently fails Disk image obtained from: http://www.cfreds.nist.gov/dfr-images/dfr-01-xfat.dd.bz2 -- was ripped off the first GPT partition and verified to be a FAT-like partition with file(1)/hexdump. This testcase currently fails PR: 214908 Sponsored by: Dell EMC Isilon Added: head/usr.sbin/fstyp/tests/dfr-01-xfat.img.bz2 (contents, props changed) Modified: head/usr.sbin/fstyp/tests/Makefile head/usr.sbin/fstyp/tests/fstyp_test.sh Modified: head/usr.sbin/fstyp/tests/Makefile ============================================================================== --- head/usr.sbin/fstyp/tests/Makefile Fri Jan 13 03:42:51 2017 (r312009) +++ head/usr.sbin/fstyp/tests/Makefile Fri Jan 13 04:02:09 2017 (r312010) @@ -4,6 +4,7 @@ PACKAGE= tests ATF_TESTS_SH= fstyp_test +${PACKAGE}FILES+= dfr-01-xfat.img.bz2 ${PACKAGE}FILES+= ext2.img.bz2 ${PACKAGE}FILES+= ext3.img.bz2 ${PACKAGE}FILES+= ext4.img.bz2 Added: head/usr.sbin/fstyp/tests/dfr-01-xfat.img.bz2 ============================================================================== Binary file. No diff available. Modified: head/usr.sbin/fstyp/tests/fstyp_test.sh ============================================================================== --- head/usr.sbin/fstyp/tests/fstyp_test.sh Fri Jan 13 03:42:51 2017 (r312009) +++ head/usr.sbin/fstyp/tests/fstyp_test.sh Fri Jan 13 04:02:09 2017 (r312010) @@ -58,6 +58,15 @@ dir_body() { atf_check -s exit:1 -e match:"not a disk" fstyp dir } +atf_test_case exfat +exfat_head() { + atf_set "descr" "fstyp(8) can detect exFAT filesystems" +} +exfat_body() { + bzcat $(atf_get_srcdir)/dfr-01-xfat.dd.bz2 > exfat.img + atf_check -s exit:0 -o inline:"exfat\n" fstyp exfat.img +} + atf_test_case empty empty_head() { atf_set "descr" "fstyp(8) should fail on an empty file" @@ -242,6 +251,7 @@ atf_init_test_cases() { atf_add_test_case cd9660_label atf_add_test_case dir atf_add_test_case empty + atf_add_test_case exfat atf_add_test_case ext2 atf_add_test_case ext3 atf_add_test_case ext4 From owner-svn-src-head@freebsd.org Fri Jan 13 04:04:49 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 481B2CAD8F8; Fri, 13 Jan 2017 04:04:49 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 178FF183E; Fri, 13 Jan 2017 04:04:49 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v0D44mOi038636; Fri, 13 Jan 2017 04:04:48 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v0D44mjX038635; Fri, 13 Jan 2017 04:04:48 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201701130404.v0D44mjX038635@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Fri, 13 Jan 2017 04:04:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r312011 - head/usr.sbin/fstyp/tests X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 13 Jan 2017 04:04:49 -0000 Author: ngie Date: Fri Jan 13 04:04:48 2017 New Revision: 312011 URL: https://svnweb.freebsd.org/changeset/base/312011 Log: Use dfr-01-xfat.img.bz2, not dfr-01-xfat.dd.bz2 (the latter case was the full disk image from the website, which was never checked in to svn) Regardless, the testcase still fails PR: 214908 Sponsored by: Dell EMC Isilon Modified: head/usr.sbin/fstyp/tests/fstyp_test.sh Modified: head/usr.sbin/fstyp/tests/fstyp_test.sh ============================================================================== --- head/usr.sbin/fstyp/tests/fstyp_test.sh Fri Jan 13 04:02:09 2017 (r312010) +++ head/usr.sbin/fstyp/tests/fstyp_test.sh Fri Jan 13 04:04:48 2017 (r312011) @@ -63,7 +63,7 @@ exfat_head() { atf_set "descr" "fstyp(8) can detect exFAT filesystems" } exfat_body() { - bzcat $(atf_get_srcdir)/dfr-01-xfat.dd.bz2 > exfat.img + bzcat $(atf_get_srcdir)/dfr-01-xfat.img.bz2 > exfat.img atf_check -s exit:0 -o inline:"exfat\n" fstyp exfat.img } From owner-svn-src-head@freebsd.org Fri Jan 13 04:08:33 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A48D2CAD9DF; Fri, 13 Jan 2017 04:08:33 +0000 (UTC) (envelope-from cy.schubert@komquats.com) Received: from smtp-out-so.shaw.ca (smtp-out-so.shaw.ca [64.59.136.138]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "Client", Issuer "CA" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 5AE381A4F; Fri, 13 Jan 2017 04:08:32 +0000 (UTC) (envelope-from cy.schubert@komquats.com) Received: from spqr.komquats.com ([96.50.22.10]) by shaw.ca with SMTP id RtA7cHDVlrvfERtA8c9FPJ; Thu, 12 Jan 2017 21:08:25 -0700 X-Authority-Analysis: v=2.2 cv=UeUhcOaN c=1 sm=1 tr=0 a=jvE2nwUzI0ECrNeyr98KWA==:117 a=jvE2nwUzI0ECrNeyr98KWA==:17 a=kj9zAlcOel0A:10 a=IgFoBzBjUZAA:10 a=6I5d2MoRAAAA:8 a=YxBL1-UpAAAA:8 a=rYTwfTTU08m81dicfpcA:9 a=CjuIK1q_8ugA:10 a=IjZwj45LgO3ly-622nXo:22 a=Ia-lj3WSrqcvXOmTRaiG:22 Received: from slippy.cwsent.com (slippy [10.1.1.91]) by spqr.komquats.com (Postfix) with ESMTPS id 2D33D250; Thu, 12 Jan 2017 20:08:23 -0800 (PST) Received: from slippy (localhost [127.0.0.1]) by slippy.cwsent.com (8.15.2/8.15.2) with ESMTP id v0D48MKN097520; Thu, 12 Jan 2017 20:08:22 -0800 (PST) (envelope-from Cy.Schubert@cschubert.com) Message-Id: <201701130408.v0D48MKN097520@slippy.cwsent.com> X-Mailer: exmh version 2.8.0 04/21/2012 with nmh-1.6 Reply-to: Cy Schubert From: Cy Schubert X-os: FreeBSD X-Sender: cy@cwsent.com X-URL: http://www.cschubert.com/ To: "Bjoern A. Zeeb" cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r311950 - head/sys/contrib/ipfilter/netinet In-Reply-To: Message from "Bjoern A. Zeeb" of "Thu, 12 Jan 2017 00:01:02 +0000." <201701120001.v0C012XL041489@repo.freebsd.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Thu, 12 Jan 2017 20:08:22 -0800 X-CMAE-Envelope: MS4wfLj2JEkSZx+OD0se8wmAaBLxej+KooLTWaan7ti+fdJWUxevYKJ8gAAb48TKXB7xrzQlTbdK9eNGx6rg0wksj5L8Sm/H/bDtudcwbG8vq/uCj5J1esmc SBBclOY6xTlHohC2qqTbQBO9wYkinpYLBcB9mv77XtH9YcWVorbE04zg+JfItItU9IZC8EoJWUAW6qN7Lg7U3yG6ElXZdN2HYPqDxL6SEQTbdo+ZSBdq4Tg6 cIC6O5nyLQWb9eyePU4B8ZjobKjpgQsJCIoMYeiG1MuAKQx8epoxivTeEfp0Uz4H X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 13 Jan 2017 04:08:33 -0000 In message <201701120001.v0C012XL041489@repo.freebsd.org>, "Bjoern A. Zeeb" wri tes: > Author: bz > Date: Thu Jan 12 00:01:02 2017 > New Revision: 311950 > URL: https://svnweb.freebsd.org/changeset/base/311950 > > Log: > Get rid of a compiler warning which I saw too often. > Include netinet/in.h before ip_compat.t which will then check if > IPPROTO_IPIP is defined or not. Doing it the other way round, > ip_compat.h would not find it defined and netinet/in.h then > redefine it. > > Modified: > head/sys/contrib/ipfilter/netinet/ip_fil.h > > Modified: head/sys/contrib/ipfilter/netinet/ip_fil.h > ============================================================================= > = > --- head/sys/contrib/ipfilter/netinet/ip_fil.h Wed Jan 11 23:48:17 201 > 7 (r311949) > +++ head/sys/contrib/ipfilter/netinet/ip_fil.h Thu Jan 12 00:01:02 201 > 7 (r311950) > @@ -11,6 +11,10 @@ > #ifndef __IP_FIL_H__ > #define __IP_FIL_H__ > > +#if !defined(linux) || !defined(_KERNEL) > +# include > +#endif > + > #include "netinet/ip_compat.h" > #include "netinet/ipf_rb.h" > #if NETBSD_GE_REV(104040000) > @@ -24,10 +28,6 @@ > # endif > #endif > > -#if !defined(linux) || !defined(_KERNEL) > -# include > -#endif > - > #ifndef SOLARIS > # if defined(sun) && (defined(__svr4__) || defined(__SVR4)) > # define SOLARIS 1 > > Thanks Bjoern. Would you mind MFCing this at some point? -- Cheers, Cy Schubert FreeBSD UNIX: Web: http://www.FreeBSD.org The need of the many outweighs the greed of the few. From owner-svn-src-head@freebsd.org Fri Jan 13 04:14:28 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C1881CADCF8; Fri, 13 Jan 2017 04:14:28 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from mail107.syd.optusnet.com.au (mail107.syd.optusnet.com.au [211.29.132.53]) by mx1.freebsd.org (Postfix) with ESMTP id 6B8701F3D; Fri, 13 Jan 2017 04:14:27 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from besplex.bde.org (c122-106-153-191.carlnfd1.nsw.optusnet.com.au [122.106.153.191]) by mail107.syd.optusnet.com.au (Postfix) with ESMTPS id C2568D42035; Fri, 13 Jan 2017 14:51:05 +1100 (AEDT) Date: Fri, 13 Jan 2017 14:51:04 +1100 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: Mark Johnston cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r311952 - head/sys/ddb In-Reply-To: <201701120022.v0C0MaHq053076@repo.freebsd.org> Message-ID: <20170113131948.P1465@besplex.bde.org> References: <201701120022.v0C0MaHq053076@repo.freebsd.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Optus-CM-Score: 0 X-Optus-CM-Analysis: v=2.2 cv=BKLDlBYG c=1 sm=1 tr=0 a=Tj3pCpwHnMupdyZSltBt7Q==:117 a=Tj3pCpwHnMupdyZSltBt7Q==:17 a=kj9zAlcOel0A:10 a=o77a8znaaZYo2PnXqRUA:9 a=CjuIK1q_8ugA:10 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 13 Jan 2017 04:14:28 -0000 On Thu, 12 Jan 2017, Mark Johnston wrote: > Log: > Enable the use of ^C and ^S/^Q in DDB. > > This lets one interrupt DDB's output, which is useful if paging is > disabled and the output device is slow. This is quite broken. It removes the code that was necessary for avoiding loss of input. > Modified: head/sys/ddb/db_input.c > ============================================================================== > --- head/sys/ddb/db_input.c Thu Jan 12 00:09:31 2017 (r311951) > +++ head/sys/ddb/db_input.c Thu Jan 12 00:22:36 2017 (r311952) > @@ -63,7 +63,6 @@ static int db_lhist_nlines; > #define BLANK ' ' > #define BACKUP '\b' > > -static int cnmaygetc(void); > static void db_delete(int n, int bwd); > static int db_inputchar(int c); > static void db_putnchars(int c, int count); > @@ -291,12 +290,6 @@ db_inputchar(c) > return (0); > } > > -static int > -cnmaygetc() > -{ > - return (-1); > -} > - BSD never had a usable console API (function) for checking for input. cncheckc() is the correct name for such a function. The actual cncheckc() returns any input that it finds. This is not the main problem here. The input will have to be read here anyway to determine what it is. The problems are that there is no console API at all for ungetting characters in the input stream, and this function doesn't even use a stub cnungetc(), but drops the input on the floor. It does document this behaviour in a comment, but doesn't say that it is wrong. > int > db_readline(lstart, lsize) > char * lstart; > @@ -350,7 +343,7 @@ db_check_interrupt(void) > { > int c; > > - c = cnmaygetc(); > + c = cncheckc(); > switch (c) { > case -1: /* no character */ > return; The stub function always returns -1, so db_check_interrupt() is turned into a no-op. db_check_interrupt() now eats the first byte of any input on every call. > @@ -361,7 +354,7 @@ db_check_interrupt(void) > > case CTRL('s'): > do { > - c = cnmaygetc(); > + c = cncheckc(); > if (c == CTRL('c')) > db_error((char *)0); > } while (c != CTRL('q')); This is now a bad implementation of xon/xoff. It doesn't support ixany, but busy-waits for ^Q or ^C using cncheckc(). It should at least busy-wait using cngetc(), since that might be do a smarter busy wait. cngetc() is actually only slightly smarter -- it uses busy-waiting too, but with cpu_spinwait() in the loop. This cpu_spinwait() makes little difference since cncheckc() tends to be a heavyweight function. Only cpu_spinwait()s in the innermost loops of cncheckc(), if any, are likely to have much effect. Multiple consoles complicate this a bit. db_check_interrupt() is called after every db_putc() of a newline. So the breakage is mainly for type-ahead while writing many lines. Control processing belongs in the lowest level of console drivers, and at least the xon/xoff part is very easy to do. This makes it work for contexts like boot messages -- this can only be controlled now by booting with -p, which gives something like an automatic ^S after every line, but the control characters for this mode are unusual and there is no way to get back to -p mode after turning it off or not starting with it. -p mode also crashes if you don't turn it off before the (syscons) keyboard is attached, since attachment temporarily breaks the input needed to control the mode. ddb control should worry about this even more. Multiple consoles complicate this more than a bit. For console driver development/debugging, I needed xon-xoff type control and more (discard) at the driver level, especially when i/o to one of the multiple consoles is unreachable to avoid deadlock, or too active. It was easy to write primitive xon/xoff but not to avoid deadlocks in this. Hackish code looks like this: diff -u2 syscons.c~ syscons.c X --- syscons.c~ 2016-09-01 19:20:38.263745000 +0000 X +++ syscons.c 2016-10-14 07:12:18.947461000 +0000 X ... X +static void X +ec_wait(void) ec_wait() is called to give time to read transient output about certain errors (mainly in near-deadlock conditions). The error message is written directly to the frame buffer and will be overwritten if the deadlock condition clears enough to allow normal output. X +{ X + int c; X + int timeout; X + X + if (ec_kill_ec_wait) X + return; X + c = inb(0xe060); 0xe060 is an otherwise-unused serial port which I can write control characters too. X + if (ec_wait_verbose) X + ec_puts("\r\nec: hit any key to abort wait of 10 seconds..."); X + for (timeout = 0; timeout < ec_wait_delay; timeout++) { X + // if (cncheckc() != -1) X + // break; Early versions used simply cncheckc(). This checks all consoles, so can deadlock too easily, and it doesn't keep the input streams separate enough for easy control of the per-console output streams. X + if (inb(0xe060) != c) X + break; X + if (sc_consptr != NULL) X + DELAY(1000); X + cn_progress++; X + } X + if (ec_wait_verbose) X + ec_puts("done\r\n"); X +} X ... X @@ -1896,5 +2025,8 @@ X sizeof(sc_cnputc_log)) X continue; X + if (inb(0xe060) == 'O' - '@') X + continue; X sc_puts(scp, buf, 1, 1); X + cn_progress++; X } X This uses ^O (default termios VDISCARD) to enter a mode in which all output is dropped (input is sticky in the serial port, so this mode is sticky and is left by typing any other character which should be chosen to be non-control to avoid controlling other operations). Another driver uses ^P instead of ^Q. xon/xoff is normally per-char in termios, but buffering tends to make it per-buffer. In ddb, it is per-line, and this is better than per-char for kernel uses. I have used and implemented a weird ^S mode for scrolling system messages, where ^S works like the "any" character in -p mode -- ^S stops output, and subsequent ^S's restart output and then stop it after 1 more line. This is convenient for scrolling by holding down the ^S key -- much easier than typing ^S/^Q. This was on a 1980's 8-bit system, and is even more needed now -- you cannot type ^S/^Q fast enough to prevent a few thousand lines from scrolling past between the characters, except with slow output devices or pessimized console drivers. Simple xon/xoff at the cnputc() level would work well enough ones the deadlock problems are fixed. It allows the sysadmin to stop all printf()s on the system for arbitrarily long just by typing ^S (^S might also be in line noise). This looks as bad as deadlock to threads trying to do the printf()s, though it is only actual deadlock for certain i/o in console drivers. The cn_progress++ lines in the above are to tell my version of printf() to not time out and blow open its locks when console output is making progress or just stopped. Bruce From owner-svn-src-head@freebsd.org Fri Jan 13 04:21:10 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6289ECADE2A; Fri, 13 Jan 2017 04:21:10 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2E50512AE; Fri, 13 Jan 2017 04:21:10 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v0D4L9cq045254; Fri, 13 Jan 2017 04:21:09 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v0D4L93f045253; Fri, 13 Jan 2017 04:21:09 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201701130421.v0D4L93f045253@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Fri, 13 Jan 2017 04:21:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r312012 - head/lib/msun/tests X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 13 Jan 2017 04:21:10 -0000 Author: ngie Date: Fri Jan 13 04:21:09 2017 New Revision: 312012 URL: https://svnweb.freebsd.org/changeset/base/312012 Log: fmaxmin_test still fails with clang 3.9.x.. bypass the test MFC after: 3 days PR: 208703 Sponsored by: Dell EMC Isilon Modified: head/lib/msun/tests/Makefile Modified: head/lib/msun/tests/Makefile ============================================================================== --- head/lib/msun/tests/Makefile Fri Jan 13 04:04:48 2017 (r312011) +++ head/lib/msun/tests/Makefile Fri Jan 13 04:21:09 2017 (r312012) @@ -56,7 +56,7 @@ TAP_TESTS_C+= exponential_test TAP_TESTS_C+= fenv_test TAP_TESTS_C+= fma_test # clang 3.8.0 fails always fails this test. See: bug 208703 -.if ! (${COMPILER_TYPE} == "clang" && ${COMPILER_VERSION} == 30800) +.if ! (${COMPILER_TYPE} == "clang" && ${COMPILER_VERSION} >= 30800) TAP_TESTS_C+= fmaxmin_test .endif TAP_TESTS_C+= ilogb2_test From owner-svn-src-head@freebsd.org Fri Jan 13 06:22:50 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A2A52CADCDC; Fri, 13 Jan 2017 06:22:50 +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 5205A137C; Fri, 13 Jan 2017 06:22:50 +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 v0D6MnD4094764; Fri, 13 Jan 2017 06:22:49 GMT (envelope-from hrs@FreeBSD.org) Received: (from hrs@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v0D6Mnnc094763; Fri, 13 Jan 2017 06:22:49 GMT (envelope-from hrs@FreeBSD.org) Message-Id: <201701130622.v0D6Mnnc094763@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hrs set sender to hrs@FreeBSD.org using -f From: Hiroki Sato Date: Fri, 13 Jan 2017 06:22:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r312013 - head/usr.sbin/route6d X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 13 Jan 2017 06:22:50 -0000 Author: hrs Date: Fri Jan 13 06:22:49 2017 New Revision: 312013 URL: https://svnweb.freebsd.org/changeset/base/312013 Log: - Add static for functions and variables with internal linkage. - Quiet down -Wcast-align warnings. - Remove dead code. There is no functionality change. Modified: head/usr.sbin/route6d/route6d.c Modified: head/usr.sbin/route6d/route6d.c ============================================================================== --- head/usr.sbin/route6d/route6d.c Fri Jan 13 04:21:09 2017 (r312012) +++ head/usr.sbin/route6d/route6d.c Fri Jan 13 06:22:49 2017 (r312013) @@ -100,7 +100,7 @@ struct ifc { /* Configuration of an in TAILQ_HEAD(, iff) ifc_iff_head; /* list of filters */ int ifc_joined; /* joined to ff02::9 */ }; -TAILQ_HEAD(, ifc) ifc_head = TAILQ_HEAD_INITIALIZER(ifc_head); +static TAILQ_HEAD(, ifc) ifc_head = TAILQ_HEAD_INITIALIZER(ifc_head); struct ifac { /* Adddress associated to an interface */ TAILQ_ENTRY(ifac) ifac_next; @@ -120,21 +120,21 @@ struct iff { /* Filters for an interfa int iff_plen; }; -struct ifc **index2ifc; -unsigned int nindex2ifc; -struct ifc *loopifcp = NULL; /* pointing to loopback */ +static struct ifc **index2ifc; +static unsigned int nindex2ifc; +static struct ifc *loopifcp = NULL; /* pointing to loopback */ #ifdef HAVE_POLL_H -struct pollfd set[2]; +static struct pollfd set[2]; #else -fd_set *sockvecp; /* vector to select() for receiving */ -fd_set *recvecp; -int fdmasks; -int maxfd; /* maximum fd for select() */ +static fd_set *sockvecp; /* vector to select() for receiving */ +static fd_set *recvecp; +static int fdmasks; +static int maxfd; /* maximum fd for select() */ #endif -int rtsock; /* the routing socket */ -int ripsock; /* socket to send/receive RIP datagram */ +static int rtsock; /* the routing socket */ +static int ripsock; /* socket to send/receive RIP datagram */ -struct rip6 *ripbuf; /* packet buffer for sending */ +static struct rip6 *ripbuf; /* packet buffer for sending */ /* * Maintain the routes in a linked list. When the number of the routes @@ -159,41 +159,43 @@ struct riprt { time_t rrt_t; /* when the route validated */ int rrt_index; /* ifindex from which this route got */ }; -TAILQ_HEAD(, riprt) riprt_head = TAILQ_HEAD_INITIALIZER(riprt_head); +static TAILQ_HEAD(, riprt) riprt_head = TAILQ_HEAD_INITIALIZER(riprt_head); -int dflag = 0; /* debug flag */ -int qflag = 0; /* quiet flag */ -int nflag = 0; /* don't update kernel routing table */ -int aflag = 0; /* age out even the statically defined routes */ -int hflag = 0; /* don't split horizon */ -int lflag = 0; /* exchange site local routes */ -int Pflag = 0; /* don't age out routes with RTF_PROTO[123] */ -int Qflag = RTF_PROTO2; /* set RTF_PROTO[123] flag to routes by RIPng */ -int sflag = 0; /* announce static routes w/ split horizon */ -int Sflag = 0; /* announce static routes to every interface */ -unsigned long routetag = 0; /* route tag attached on originating case */ - -char *filter[MAXFILTER]; -int filtertype[MAXFILTER]; -int nfilter = 0; - -pid_t pid; - -struct sockaddr_storage ripsin; - -int interval = 1; -time_t nextalarm = 0; -time_t sup_trig_update = 0; +static int dflag = 0; /* debug flag */ +static int qflag = 0; /* quiet flag */ +static int nflag = 0; /* don't update kernel routing table */ +static int aflag = 0; /* age out even the statically defined routes */ +static int hflag = 0; /* don't split horizon */ +static int lflag = 0; /* exchange site local routes */ +static int Pflag = 0; /* don't age out routes with RTF_PROTO[123] */ +static int Qflag = RTF_PROTO2; /* set RTF_PROTO[123] flag to routes by RIPng */ +static int sflag = 0; /* announce static routes w/ split horizon */ +static int Sflag = 0; /* announce static routes to every interface */ +static unsigned long routetag = 0; /* route tag attached on originating case */ + +static char *filter[MAXFILTER]; +static int filtertype[MAXFILTER]; +static int nfilter = 0; -FILE *rtlog = NULL; +static pid_t pid; -int logopened = 0; +static struct sockaddr_storage ripsin; + +static int interval = 1; +static time_t nextalarm = 0; +#if 0 +static time_t sup_trig_update = 0; +#endif + +static FILE *rtlog = NULL; + +static int logopened = 0; static int seq = 0; -volatile sig_atomic_t seenalrm; -volatile sig_atomic_t seenquit; -volatile sig_atomic_t seenusr1; +static volatile sig_atomic_t seenalrm; +static volatile sig_atomic_t seenquit; +static volatile sig_atomic_t seenusr1; #define RRTF_AGGREGATE 0x08000000 #define RRTF_NOADVERTISE 0x10000000 @@ -202,66 +204,67 @@ volatile sig_atomic_t seenusr1; #define RRTF_CHANGED 0x80000000 int main(int, char **); -void sighandler(int); -void ripalarm(void); -void riprecv(void); -void ripsend(struct ifc *, struct sockaddr_in6 *, int); -int out_filter(struct riprt *, struct ifc *); -void init(void); -void sockopt(struct ifc *); -void ifconfig(void); -int ifconfig1(const char *, const struct sockaddr *, struct ifc *, int); -void rtrecv(void); -int rt_del(const struct sockaddr_in6 *, const struct sockaddr_in6 *, +static void sighandler(int); +static void ripalarm(void); +static void riprecv(void); +static void ripsend(struct ifc *, struct sockaddr_in6 *, int); +static int out_filter(struct riprt *, struct ifc *); +static void init(void); +static void ifconfig(void); +static int ifconfig1(const char *, const struct sockaddr *, struct ifc *, int); +static void rtrecv(void); +static int rt_del(const struct sockaddr_in6 *, const struct sockaddr_in6 *, const struct sockaddr_in6 *); -int rt_deladdr(struct ifc *, const struct sockaddr_in6 *, +static int rt_deladdr(struct ifc *, const struct sockaddr_in6 *, const struct sockaddr_in6 *); -void filterconfig(void); -int getifmtu(int); -const char *rttypes(struct rt_msghdr *); -const char *rtflags(struct rt_msghdr *); -const char *ifflags(int); -int ifrt(struct ifc *, int); -void ifrt_p2p(struct ifc *, int); -void applymask(struct in6_addr *, struct in6_addr *); -void applyplen(struct in6_addr *, int); -void ifrtdump(int); -void ifdump(int); -void ifdump0(FILE *, const struct ifc *); -void ifremove(int); -void rtdump(int); -void rt_entry(struct rt_msghdr *, int); -void rtdexit(void); -void riprequest(struct ifc *, struct netinfo6 *, int, +static void filterconfig(void); +static int getifmtu(int); +static const char *rttypes(struct rt_msghdr *); +static const char *rtflags(struct rt_msghdr *); +static const char *ifflags(int); +static int ifrt(struct ifc *, int); +static void ifrt_p2p(struct ifc *, int); +static void applyplen(struct in6_addr *, int); +static void ifrtdump(int); +static void ifdump(int); +static void ifdump0(FILE *, const struct ifc *); +static void ifremove(int); +static void rtdump(int); +static void rt_entry(struct rt_msghdr *, int); +static void rtdexit(void); +static void riprequest(struct ifc *, struct netinfo6 *, int, struct sockaddr_in6 *); -void ripflush(struct ifc *, struct sockaddr_in6 *, int, struct netinfo6 *np); -void sendrequest(struct ifc *); -int sin6mask2len(const struct sockaddr_in6 *); -int mask2len(const struct in6_addr *, int); -int sendpacket(struct sockaddr_in6 *, int); -int addroute(struct riprt *, const struct in6_addr *, struct ifc *); -int delroute(struct netinfo6 *, struct in6_addr *); -struct in6_addr *getroute(struct netinfo6 *, struct in6_addr *); -void krtread(int); -int tobeadv(struct riprt *, struct ifc *); -char *allocopy(char *); -char *hms(void); -const char *inet6_n2p(const struct in6_addr *); -struct ifac *ifa_match(const struct ifc *, const struct in6_addr *, int); -struct in6_addr *plen2mask(int); -struct riprt *rtsearch(struct netinfo6 *); -int ripinterval(int); -time_t ripsuptrig(void); -void fatal(const char *, ...) +static void ripflush(struct ifc *, struct sockaddr_in6 *, int, struct netinfo6 *np); +static void sendrequest(struct ifc *); +static int sin6mask2len(const struct sockaddr_in6 *); +static int mask2len(const struct in6_addr *, int); +static int sendpacket(struct sockaddr_in6 *, int); +static int addroute(struct riprt *, const struct in6_addr *, struct ifc *); +static int delroute(struct netinfo6 *, struct in6_addr *); +#if 0 +static struct in6_addr *getroute(struct netinfo6 *, struct in6_addr *); +#endif +static void krtread(int); +static int tobeadv(struct riprt *, struct ifc *); +static char *allocopy(char *); +static char *hms(void); +static const char *inet6_n2p(const struct in6_addr *); +static struct ifac *ifa_match(const struct ifc *, const struct in6_addr *, int); +static struct in6_addr *plen2mask(int); +static struct riprt *rtsearch(struct netinfo6 *); +static int ripinterval(int); +#if 0 +static time_t ripsuptrig(void); +#endif +static void fatal(const char *, ...) __attribute__((__format__(__printf__, 1, 2))); -void trace(int, const char *, ...) +static void trace(int, const char *, ...) __attribute__((__format__(__printf__, 2, 3))); -void tracet(int, const char *, ...) +static void tracet(int, const char *, ...) __attribute__((__format__(__printf__, 2, 3))); -unsigned int if_maxindex(void); -struct ifc *ifc_find(char *); -struct iff *iff_find(struct ifc *, int); -void setindex2ifc(int, struct ifc *); +static struct ifc *ifc_find(char *); +static struct iff *iff_find(struct ifc *, int); +static void setindex2ifc(int, struct ifc *); #define MALLOC(type) ((type *)malloc(sizeof(type))) @@ -523,7 +526,7 @@ main(int argc, char *argv[]) } } -void +static void sighandler(int signo) { @@ -547,7 +550,7 @@ sighandler(int signo) * gracefully exits after resetting sockopts. */ /* ARGSUSED */ -void +static void rtdexit(void) { struct riprt *rrt; @@ -574,7 +577,7 @@ rtdexit(void) * routes more precisely. */ /* ARGSUSED */ -void +static void ripalarm(void) { struct ifc *ifcp; @@ -602,7 +605,7 @@ ripalarm(void) alarm(ripinterval(SUPPLY_INTERVAL6)); } -void +static void init(void) { int error; @@ -752,7 +755,7 @@ init(void) /* * ripflush flushes the rip datagram stored in the rip buffer */ -void +static void ripflush(struct ifc *ifcp, struct sockaddr_in6 *sin6, int nrt, struct netinfo6 *np) { int i; @@ -807,7 +810,7 @@ ripflush(struct ifc *ifcp, struct sockad /* * Generate RIP6_RESPONSE packets and send them. */ -void +static void ripsend(struct ifc *ifcp, struct sockaddr_in6 *sin6, int flag) { struct riprt *rrt; @@ -948,7 +951,7 @@ ripsend(struct ifc *ifcp, struct sockadd /* * outbound filter logic, per-route/interface. */ -int +static int out_filter(struct riprt *rrt, struct ifc *ifcp) { struct iff *iffp; @@ -1019,7 +1022,7 @@ out_filter(struct riprt *rrt, struct ifc * Determine if the route is to be advertised on the specified interface. * It checks options specified in the arguments and the split horizon rule. */ -int +static int tobeadv(struct riprt *rrt, struct ifc *ifcp) { @@ -1044,14 +1047,14 @@ tobeadv(struct riprt *rrt, struct ifc *i /* * Send a rip packet actually. */ -int +static int sendpacket(struct sockaddr_in6 *sin6, int len) { struct msghdr m; struct cmsghdr *cm; struct iovec iov[2]; - u_char cmsgbuf[256]; struct in6_pktinfo *pi; + u_char cmsgbuf[256]; int idx; struct sockaddr_in6 sincopy; @@ -1077,14 +1080,14 @@ sendpacket(struct sockaddr_in6 *sin6, in m.msg_controllen = 0; } else { memset(cmsgbuf, 0, sizeof(cmsgbuf)); - cm = (struct cmsghdr *)cmsgbuf; + cm = (struct cmsghdr *)(void *)cmsgbuf; m.msg_control = (caddr_t)cm; m.msg_controllen = CMSG_SPACE(sizeof(struct in6_pktinfo)); cm->cmsg_len = CMSG_LEN(sizeof(struct in6_pktinfo)); cm->cmsg_level = IPPROTO_IPV6; cm->cmsg_type = IPV6_PKTINFO; - pi = (struct in6_pktinfo *)CMSG_DATA(cm); + pi = (struct in6_pktinfo *)(void *)CMSG_DATA(cm); memset(&pi->ipi6_addr, 0, sizeof(pi->ipi6_addr)); /*::*/ pi->ipi6_ifindex = idx; } @@ -1101,7 +1104,7 @@ sendpacket(struct sockaddr_in6 *sin6, in * Receive and process RIP packets. Update the routes/kernel forwarding * table if necessary. */ -void +static void riprecv(void) { struct ifc *ifcp, *ic; @@ -1133,7 +1136,7 @@ riprecv(void) iov[0].iov_len = sizeof(buf); m.msg_iov = iov; m.msg_iovlen = 1; - cm = (struct cmsghdr *)cmsgbuf; + cm = (struct cmsghdr *)(void *)cmsgbuf; m.msg_control = (caddr_t)cm; m.msg_controllen = sizeof(cmsgbuf); m.msg_flags = 0; @@ -1154,7 +1157,7 @@ riprecv(void) "invalid cmsg length for IPV6_PKTINFO\n"); return; } - pi = (struct in6_pktinfo *)(CMSG_DATA(cm)); + pi = (struct in6_pktinfo *)(void *)CMSG_DATA(cm); idx = pi->ipi6_ifindex; break; case IPV6_HOPLIMIT: @@ -1163,7 +1166,7 @@ riprecv(void) "invalid cmsg length for IPV6_HOPLIMIT\n"); return; } - hlimp = (int *)CMSG_DATA(cm); + hlimp = (int *)(void *)CMSG_DATA(cm); break; } } @@ -1188,7 +1191,7 @@ riprecv(void) nh = fsock.sin6_addr; nn = (len - sizeof(struct rip6) + sizeof(struct netinfo6)) / sizeof(struct netinfo6); - rp = (struct rip6 *)buf; + rp = (struct rip6 *)(void *)buf; np = rp->rip6_nets; if (rp->rip6_vers != RIP6_VERSION) { @@ -1449,7 +1452,7 @@ riprecv(void) /* * Send all routes request packet to the specified interface. */ -void +static void sendrequest(struct ifc *ifcp) { struct netinfo6 *np; @@ -1477,7 +1480,7 @@ sendrequest(struct ifc *ifcp) /* * Process a RIP6_REQUEST packet. */ -void +static void riprequest(struct ifc *ifcp, struct netinfo6 *np, int nn, @@ -1508,7 +1511,7 @@ riprequest(struct ifc *ifcp, /* * Get information of each interface. */ -void +static void ifconfig(void) { struct ifaddrs *ifap, *ifa; @@ -1583,7 +1586,7 @@ ifconfig(void) freeifaddrs(ifap); } -int +static int ifconfig1(const char *name, const struct sockaddr *sa, struct ifc *ifcp, @@ -1595,7 +1598,7 @@ ifconfig1(const char *name, int plen; char buf[BUFSIZ]; - sin6 = (const struct sockaddr_in6 *)sa; + sin6 = (const struct sockaddr_in6 *)(const void *)sa; if (IN6_IS_ADDR_SITELOCAL(&sin6->sin6_addr) && !lflag) return (-1); ifr.ifr_addr = *sin6; @@ -1663,7 +1666,7 @@ ifconfig1(const char *name, return 0; } -void +static void ifremove(int ifindex) { struct ifc *ifcp; @@ -1691,7 +1694,7 @@ ifremove(int ifindex) * Receive and process routing messages. * Update interface information as necesssary. */ -void +static void rtrecv(void) { char buf[BUFSIZ]; @@ -1730,33 +1733,34 @@ rtrecv(void) fprintf(stderr, "\n"); } - for (p = buf; p - buf < len; p += ((struct rt_msghdr *)p)->rtm_msglen) { - if (((struct rt_msghdr *)p)->rtm_version != RTM_VERSION) + for (p = buf; p - buf < len; p += + ((struct rt_msghdr *)(void *)p)->rtm_msglen) { + if (((struct rt_msghdr *)(void *)p)->rtm_version != RTM_VERSION) continue; /* safety against bogus message */ - if (((struct rt_msghdr *)p)->rtm_msglen <= 0) { + if (((struct rt_msghdr *)(void *)p)->rtm_msglen <= 0) { trace(1, "bogus rtmsg: length=%d\n", - ((struct rt_msghdr *)p)->rtm_msglen); + ((struct rt_msghdr *)(void *)p)->rtm_msglen); break; } rtm = NULL; ifam = NULL; ifm = NULL; - switch (((struct rt_msghdr *)p)->rtm_type) { + switch (((struct rt_msghdr *)(void *)p)->rtm_type) { case RTM_NEWADDR: case RTM_DELADDR: - ifam = (struct ifa_msghdr *)p; + ifam = (struct ifa_msghdr *)(void *)p; addrs = ifam->ifam_addrs; q = (char *)(ifam + 1); break; case RTM_IFINFO: - ifm = (struct if_msghdr *)p; + ifm = (struct if_msghdr *)(void *)p; addrs = ifm->ifm_addrs; q = (char *)(ifm + 1); break; case RTM_IFANNOUNCE: - ifan = (struct if_announcemsghdr *)p; + ifan = (struct if_announcemsghdr *)(void *)p; switch (ifan->ifan_what) { case IFAN_ARRIVAL: iface++; @@ -1768,7 +1772,7 @@ rtrecv(void) } break; default: - rtm = (struct rt_msghdr *)p; + rtm = (struct rt_msghdr *)(void *)p; addrs = rtm->rtm_addrs; q = (char *)(rtm + 1); if (rtm->rtm_version != RTM_VERSION) { @@ -1788,16 +1792,16 @@ rtrecv(void) memset(&rta, 0, sizeof(rta)); for (i = 0; i < RTAX_MAX; i++) { if (addrs & (1 << i)) { - rta[i] = (struct sockaddr_in6 *)q; + rta[i] = (struct sockaddr_in6 *)(void *)q; q += ROUNDUP(rta[i]->sin6_len); } } trace(1, "rtsock: %s (addrs=%x)\n", - rttypes((struct rt_msghdr *)p), addrs); + rttypes((struct rt_msghdr *)(void *)p), addrs); if (dflag >= 2) { for (i = 0; - i < ((struct rt_msghdr *)p)->rtm_msglen; + i < ((struct rt_msghdr *)(void *)p)->rtm_msglen; i++) { fprintf(stderr, "%02x ", p[i] & 0xff); if (i % 16 == 15) fprintf(stderr, "\n"); @@ -1811,7 +1815,7 @@ rtrecv(void) * We may be able to optimize by using ifm->ifm_index or * ifam->ifam_index. For simplicity we don't do that here. */ - switch (((struct rt_msghdr *)p)->rtm_type) { + switch (((struct rt_msghdr *)(void *)p)->rtm_type) { case RTM_NEWADDR: case RTM_IFINFO: iface++; @@ -1852,7 +1856,7 @@ rtrecv(void) #endif /* hard ones */ - switch (((struct rt_msghdr *)p)->rtm_type) { + switch (((struct rt_msghdr *)(void *)p)->rtm_type) { case RTM_NEWADDR: case RTM_IFINFO: case RTM_ADD: @@ -1940,7 +1944,7 @@ rtrecv(void) /* * remove specified route from the internal routing table. */ -int +static int rt_del(const struct sockaddr_in6 *sdst, const struct sockaddr_in6 *sgw, const struct sockaddr_in6 *smask) @@ -2038,7 +2042,7 @@ rt_del(const struct sockaddr_in6 *sdst, /* * remove specified address from internal interface/routing table. */ -int +static int rt_deladdr(struct ifc *ifcp, const struct sockaddr_in6 *sifa, const struct sockaddr_in6 *smask) @@ -2139,7 +2143,7 @@ rt_deladdr(struct ifc *ifcp, * Get each interface address and put those interface routes to the route * list. */ -int +static int ifrt(struct ifc *ifcp, int again) { struct ifac *ifac; @@ -2250,7 +2254,7 @@ ifrt(struct ifc *ifcp, int again) * you pick one. it looks that gated behavior fits best with BSDs, * since BSD kernels do not look at prefix length on p2p interfaces. */ -void +static void ifrt_p2p(struct ifc *ifcp, int again) { struct ifac *ifac; @@ -2414,7 +2418,7 @@ ifrt_p2p(struct ifc *ifcp, int again) #undef P2PADVERT_MAX } -int +static int getifmtu(int ifindex) { int mib[6]; @@ -2441,7 +2445,7 @@ getifmtu(int ifindex) fatal("sysctl NET_RT_IFLIST"); /*NOTREACHED*/ } - ifm = (struct if_msghdr *)buf; + ifm = (struct if_msghdr *)(void *)buf; mtu = ifm->ifm_data.ifi_mtu; if (ifindex != ifm->ifm_index) { fatal("ifindex does not match with ifm_index"); @@ -2451,7 +2455,7 @@ getifmtu(int ifindex) return mtu; } -const char * +static const char * rttypes(struct rt_msghdr *rtm) { #define RTTYPE(s, f) \ @@ -2486,7 +2490,7 @@ do { \ return NULL; } -const char * +static const char * rtflags(struct rt_msghdr *rtm) { static char buf[BUFSIZ]; @@ -2546,7 +2550,7 @@ do { \ return buf; } -const char * +static const char * ifflags(int flags) { static char buf[BUFSIZ]; @@ -2582,7 +2586,7 @@ do { \ return buf; } -void +static void krtread(int again) { int mib[6]; @@ -2631,13 +2635,13 @@ krtread(int again) lim = buf + msize; for (p = buf; p < lim; p += rtm->rtm_msglen) { - rtm = (struct rt_msghdr *)p; + rtm = (struct rt_msghdr *)(void *)p; rt_entry(rtm, again); } free(buf); } -void +static void rt_entry(struct rt_msghdr *rtm, int again) { struct sockaddr_in6 *sin6_dst, *sin6_gw, *sin6_mask; @@ -2674,22 +2678,22 @@ rt_entry(struct rt_msghdr *rtm, int agai /* Destination */ if ((rtm->rtm_addrs & RTA_DST) == 0) return; /* ignore routes without destination address */ - sin6_dst = (struct sockaddr_in6 *)rtmp; + sin6_dst = (struct sockaddr_in6 *)(void *)rtmp; rtmp += ROUNDUP(sin6_dst->sin6_len); if (rtm->rtm_addrs & RTA_GATEWAY) { - sin6_gw = (struct sockaddr_in6 *)rtmp; + sin6_gw = (struct sockaddr_in6 *)(void *)rtmp; rtmp += ROUNDUP(sin6_gw->sin6_len); } if (rtm->rtm_addrs & RTA_NETMASK) { - sin6_mask = (struct sockaddr_in6 *)rtmp; + sin6_mask = (struct sockaddr_in6 *)(void *)rtmp; rtmp += ROUNDUP(sin6_mask->sin6_len); } if (rtm->rtm_addrs & RTA_GENMASK) { - sin6_genmask = (struct sockaddr_in6 *)rtmp; + sin6_genmask = (struct sockaddr_in6 *)(void *)rtmp; rtmp += ROUNDUP(sin6_genmask->sin6_len); } if (rtm->rtm_addrs & RTA_IFP) { - sin6_ifp = (struct sockaddr_in6 *)rtmp; + sin6_ifp = (struct sockaddr_in6 *)(void *)rtmp; rtmp += ROUNDUP(sin6_ifp->sin6_len); } @@ -2798,7 +2802,7 @@ rt_entry(struct rt_msghdr *rtm, int agai TAILQ_INSERT_HEAD(&riprt_head, rrt, rrt_next); } -int +static int addroute(struct riprt *rrt, const struct in6_addr *gw, struct ifc *ifcp) @@ -2823,7 +2827,7 @@ addroute(struct riprt *rrt, return 0; memset(buf, 0, sizeof(buf)); - rtm = (struct rt_msghdr *)buf; + rtm = (struct rt_msghdr *)(void *)buf; rtm->rtm_type = RTM_ADD; rtm->rtm_version = RTM_VERSION; rtm->rtm_seq = ++seq; @@ -2833,24 +2837,24 @@ addroute(struct riprt *rrt, rtm->rtm_addrs = RTA_DST | RTA_GATEWAY | RTA_NETMASK; rtm->rtm_rmx.rmx_hopcount = np->rip6_metric - 1; rtm->rtm_inits = RTV_HOPCOUNT; - sin6 = (struct sockaddr_in6 *)&buf[sizeof(struct rt_msghdr)]; + sin6 = (struct sockaddr_in6 *)(void *)&buf[sizeof(struct rt_msghdr)]; /* Destination */ sin6->sin6_len = sizeof(struct sockaddr_in6); sin6->sin6_family = AF_INET6; sin6->sin6_addr = np->rip6_dest; - sin6 = (struct sockaddr_in6 *)((char *)sin6 + ROUNDUP(sin6->sin6_len)); + sin6 = (struct sockaddr_in6 *)(void *)((char *)sin6 + ROUNDUP(sin6->sin6_len)); /* Gateway */ sin6->sin6_len = sizeof(struct sockaddr_in6); sin6->sin6_family = AF_INET6; sin6->sin6_addr = *gw; if (IN6_IS_ADDR_LINKLOCAL(&sin6->sin6_addr)) sin6->sin6_scope_id = ifcp->ifc_index; - sin6 = (struct sockaddr_in6 *)((char *)sin6 + ROUNDUP(sin6->sin6_len)); + sin6 = (struct sockaddr_in6 *)(void *)((char *)sin6 + ROUNDUP(sin6->sin6_len)); /* Netmask */ sin6->sin6_len = sizeof(struct sockaddr_in6); sin6->sin6_family = AF_INET6; sin6->sin6_addr = *(plen2mask(np->rip6_plen)); - sin6 = (struct sockaddr_in6 *)((char *)sin6 + ROUNDUP(sin6->sin6_len)); + sin6 = (struct sockaddr_in6 *)(void *)((char *)sin6 + ROUNDUP(sin6->sin6_len)); len = (char *)sin6 - (char *)buf; rtm->rtm_msglen = len; @@ -2873,7 +2877,7 @@ addroute(struct riprt *rrt, return -1; } -int +static int delroute(struct netinfo6 *np, struct in6_addr *gw) { u_char buf[BUFSIZ], buf2[BUFSIZ]; @@ -2891,7 +2895,7 @@ delroute(struct netinfo6 *np, struct in6 return 0; memset(buf, 0, sizeof(buf)); - rtm = (struct rt_msghdr *)buf; + rtm = (struct rt_msghdr *)(void *)buf; rtm->rtm_type = RTM_DELETE; rtm->rtm_version = RTM_VERSION; rtm->rtm_seq = ++seq; @@ -2901,22 +2905,22 @@ delroute(struct netinfo6 *np, struct in6 if (np->rip6_plen == sizeof(struct in6_addr) * 8) rtm->rtm_flags |= RTF_HOST; rtm->rtm_addrs = RTA_DST | RTA_GATEWAY | RTA_NETMASK; - sin6 = (struct sockaddr_in6 *)&buf[sizeof(struct rt_msghdr)]; + sin6 = (struct sockaddr_in6 *)(void *)&buf[sizeof(struct rt_msghdr)]; /* Destination */ sin6->sin6_len = sizeof(struct sockaddr_in6); sin6->sin6_family = AF_INET6; sin6->sin6_addr = np->rip6_dest; - sin6 = (struct sockaddr_in6 *)((char *)sin6 + ROUNDUP(sin6->sin6_len)); + sin6 = (struct sockaddr_in6 *)(void *)((char *)sin6 + ROUNDUP(sin6->sin6_len)); /* Gateway */ sin6->sin6_len = sizeof(struct sockaddr_in6); sin6->sin6_family = AF_INET6; sin6->sin6_addr = *gw; - sin6 = (struct sockaddr_in6 *)((char *)sin6 + ROUNDUP(sin6->sin6_len)); + sin6 = (struct sockaddr_in6 *)(void *)((char *)sin6 + ROUNDUP(sin6->sin6_len)); /* Netmask */ sin6->sin6_len = sizeof(struct sockaddr_in6); sin6->sin6_family = AF_INET6; sin6->sin6_addr = *(plen2mask(np->rip6_plen)); - sin6 = (struct sockaddr_in6 *)((char *)sin6 + ROUNDUP(sin6->sin6_len)); + sin6 = (struct sockaddr_in6 *)(void *)((char *)sin6 + ROUNDUP(sin6->sin6_len)); len = (char *)sin6 - (char *)buf; rtm->rtm_msglen = len; @@ -2939,7 +2943,8 @@ delroute(struct netinfo6 *np, struct in6 return -1; } -struct in6_addr * +#if 0 +static struct in6_addr * getroute(struct netinfo6 *np, struct in6_addr *gw) { u_char buf[BUFSIZ]; @@ -2948,7 +2953,7 @@ getroute(struct netinfo6 *np, struct in6 struct rt_msghdr *rtm; struct sockaddr_in6 *sin6; - rtm = (struct rt_msghdr *)buf; + rtm = (struct rt_msghdr *)(void *)buf; len = sizeof(struct rt_msghdr) + sizeof(struct sockaddr_in6); memset(rtm, 0, len); rtm->rtm_type = RTM_GET; @@ -2957,7 +2962,7 @@ getroute(struct netinfo6 *np, struct in6 rtm->rtm_seq = myseq; rtm->rtm_addrs = RTA_DST; rtm->rtm_msglen = len; - sin6 = (struct sockaddr_in6 *)&buf[sizeof(struct rt_msghdr)]; + sin6 = (struct sockaddr_in6 *)(void *)&buf[sizeof(struct rt_msghdr)]; sin6->sin6_len = sizeof(struct sockaddr_in6); sin6->sin6_family = AF_INET6; sin6->sin6_addr = np->rip6_dest; @@ -2972,11 +2977,11 @@ getroute(struct netinfo6 *np, struct in6 perror("read from rtsock"); exit(1); } - rtm = (struct rt_msghdr *)buf; + rtm = (struct rt_msghdr *)(void *)buf; } while (rtm->rtm_seq != myseq || rtm->rtm_pid != pid); - sin6 = (struct sockaddr_in6 *)&buf[sizeof(struct rt_msghdr)]; + sin6 = (struct sockaddr_in6 *)(void *)&buf[sizeof(struct rt_msghdr)]; if (rtm->rtm_addrs & RTA_DST) { - sin6 = (struct sockaddr_in6 *) + sin6 = (struct sockaddr_in6 *)(void *) ((char *)sin6 + ROUNDUP(sin6->sin6_len)); } if (rtm->rtm_addrs & RTA_GATEWAY) { @@ -2985,8 +2990,9 @@ getroute(struct netinfo6 *np, struct in6 } return NULL; } +#endif -const char * +static const char * inet6_n2p(const struct in6_addr *p) { static char buf[BUFSIZ]; @@ -2994,7 +3000,7 @@ inet6_n2p(const struct in6_addr *p) return inet_ntop(AF_INET6, (const void *)p, buf, sizeof(buf)); } -void +static void ifrtdump(int sig) { @@ -3002,7 +3008,7 @@ ifrtdump(int sig) rtdump(sig); } -void +static void ifdump(int sig) { struct ifc *ifcp; @@ -3041,7 +3047,7 @@ ifdump(int sig) fclose(dump); } -void +static void ifdump0(FILE *dump, const struct ifc *ifcp) { struct ifac *ifac; @@ -3097,7 +3103,7 @@ ifdump0(FILE *dump, const struct ifc *if fprintf(dump, "\n"); } -void +static void rtdump(int sig) { struct riprt *rrt; @@ -3146,7 +3152,7 @@ rtdump(int sig) * syntax: -A 5f09:c400::/32,ef0,ef1 (aggregate) * -O 5f09:c400::/32,ef0,ef1 (only when match) */ -void +static void filterconfig(void) { int i; @@ -3277,7 +3283,7 @@ ifonly: * Returns a pointer to ifac whose address and prefix length matches * with the address and prefix length specified in the arguments. */ -struct ifac * +static struct ifac * ifa_match(const struct ifc *ifcp, const struct in6_addr *ia, int plen) @@ -3298,7 +3304,7 @@ ifa_match(const struct ifc *ifcp, * matches with the address and prefix length found in the argument. * Note: This is not a rtalloc(). Therefore exact match is necessary. */ -struct riprt * +static struct riprt * rtsearch(struct netinfo6 *np) { struct riprt *rrt; @@ -3313,7 +3319,7 @@ rtsearch(struct netinfo6 *np) return (rrt); } -int +static int sin6mask2len(const struct sockaddr_in6 *sin6) { @@ -3321,7 +3327,7 @@ sin6mask2len(const struct sockaddr_in6 * sin6->sin6_len - offsetof(struct sockaddr_in6, sin6_addr)); } -int +static int mask2len(const struct in6_addr *addr, int lenlim) { int i = 0, j; @@ -3348,22 +3354,11 @@ mask2len(const struct in6_addr *addr, in return i; } -void -applymask(struct in6_addr *addr, struct in6_addr *mask) -{ - int i; - u_long *p, *q; - - p = (u_long *)addr; q = (u_long *)mask; - for (i = 0; i < 4; i++) - *p++ &= *q++; -} - static const u_char plent[8] = { 0x00, 0x80, 0xc0, 0xe0, 0xf0, 0xf8, 0xfc, 0xfe }; -void +static void applyplen(struct in6_addr *ia, int plen) { u_char *p; @@ -3383,7 +3378,7 @@ static const int pl2m[9] = { 0x00, 0x80, 0xc0, 0xe0, 0xf0, 0xf8, 0xfc, 0xfe, 0xff }; -struct in6_addr * +static struct in6_addr * plen2mask(int n) { static struct in6_addr ia; @@ -3403,7 +3398,7 @@ plen2mask(int n) return &ia; } -char * +static char * allocopy(char *p) { int len = strlen(p) + 1; @@ -3418,7 +3413,7 @@ allocopy(char *p) return q; } -char * +static char * hms(void) { static char buf[BUFSIZ]; @@ -3437,7 +3432,7 @@ hms(void) #define RIPRANDDEV 1.0 /* 30 +- 15, max - min = 30 */ -int +static int ripinterval(int timer) { double r = rand(); @@ -3447,7 +3442,8 @@ ripinterval(int timer) return interval; } -time_t +#if 0 +static time_t ripsuptrig(void) { time_t t; @@ -3458,8 +3454,9 @@ ripsuptrig(void) sup_trig_update = time(NULL) + t; return t; } +#endif -void +static void #ifdef __STDC__ fatal(const char *fmt, ...) #else @@ -3486,7 +3483,7 @@ fatal(fmt, va_alist) rtdexit(); } -void +static void #ifdef __STDC__ tracet(int level, const char *fmt, ...) #else @@ -3522,7 +3519,7 @@ tracet(level, fmt, va_alist) } } -void +static void *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-head@freebsd.org Fri Jan 13 06:53:57 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6D5B9CAC669; Fri, 13 Jan 2017 06:53: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 365A811B8; Fri, 13 Jan 2017 06:53: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 v0D6ruqu007085; Fri, 13 Jan 2017 06:53:56 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v0D6ruDn007084; Fri, 13 Jan 2017 06:53:56 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201701130653.v0D6ruDn007084@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Fri, 13 Jan 2017 06:53:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r312014 - head/sys/net80211 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 13 Jan 2017 06:53:57 -0000 Author: adrian Date: Fri Jan 13 06:53:56 2017 New Revision: 312014 URL: https://svnweb.freebsd.org/changeset/base/312014 Log: [net80211] initial, somewhat incomplete VHT channel setup code and attach path. This sets up: * vht capabilities in vaps; * calls vht_announce to announce VHT capabilities if any; * sets up vht20, vht40 and vht80 channels, assuming the regulatory code does the right thing with 80MHz available ranges; * adds support to the ieee80211_add_channel_list_5ghz() code to populate VHT channels, as this is the API my ath10k driver is using; * add support for the freq1/freq2 field population and lookup that VHT channels require. The VHT80 code assumes that the regulatory domain already has limited VHT80 bands to, well, 80MHz wide chunks. Modified: head/sys/net80211/ieee80211.c Modified: head/sys/net80211/ieee80211.c ============================================================================== --- head/sys/net80211/ieee80211.c Fri Jan 13 06:22:49 2017 (r312013) +++ head/sys/net80211/ieee80211.c Fri Jan 13 06:53:56 2017 (r312014) @@ -54,6 +54,7 @@ __FBSDID("$FreeBSD$"); #include #endif #include +#include #include @@ -119,6 +120,8 @@ static const struct ieee80211_rateset ie { 12, { B(2), B(4), B(11), B(22), 12, 18, 24, 36, 48, 72, 96, 108 } }; #undef B +static int set_vht_extchan(struct ieee80211_channel *c); + /* * Fill in 802.11 available channel set, mark * all available channels as active, and pick @@ -150,10 +153,23 @@ ieee80211_chan_init(struct ieee80211com */ if (c->ic_ieee == 0) c->ic_ieee = ieee80211_mhz2ieee(c->ic_freq,c->ic_flags); + + /* + * Setup the HT40/VHT40 upper/lower bits. + * The VHT80 math is done elsewhere. + */ if (IEEE80211_IS_CHAN_HT40(c) && c->ic_extieee == 0) c->ic_extieee = ieee80211_mhz2ieee(c->ic_freq + (IEEE80211_IS_CHAN_HT40U(c) ? 20 : -20), c->ic_flags); + + /* Update VHT math */ + /* + * XXX VHT again, note that this assumes VHT80 channels + * are legit already + */ + set_vht_extchan(c); + /* default max tx power to max regulatory */ if (c->ic_maxpower == 0) c->ic_maxpower = 2*c->ic_maxregpower; @@ -343,6 +359,7 @@ ieee80211_ifattach(struct ieee80211com * ieee80211_superg_attach(ic); #endif ieee80211_ht_attach(ic); + ieee80211_vht_attach(ic); ieee80211_scan_attach(ic); ieee80211_regdomain_attach(ic); ieee80211_dfs_attach(ic); @@ -386,6 +403,7 @@ ieee80211_ifdetach(struct ieee80211com * #ifdef IEEE80211_SUPPORT_SUPERG ieee80211_superg_detach(ic); #endif + ieee80211_vht_detach(ic); ieee80211_ht_detach(ic); /* NB: must be called before ieee80211_node_detach */ ieee80211_proto_detach(ic); @@ -515,8 +533,15 @@ ieee80211_vap_setup(struct ieee80211com vap->iv_flags_ext = ic->ic_flags_ext; vap->iv_flags_ven = ic->ic_flags_ven; vap->iv_caps = ic->ic_caps &~ IEEE80211_C_OPMODE; + + /* 11n capabilities - XXX methodize */ vap->iv_htcaps = ic->ic_htcaps; vap->iv_htextcaps = ic->ic_htextcaps; + + /* 11ac capabilities - XXX methodize */ + vap->iv_vhtcaps = ic->ic_vhtcaps; + vap->iv_vhtextcaps = ic->ic_vhtextcaps; + vap->iv_opmode = opmode; vap->iv_caps |= ieee80211_opcap[opmode]; IEEE80211_ADDR_COPY(vap->iv_myaddr, ic->ic_macaddr); @@ -601,6 +626,7 @@ ieee80211_vap_setup(struct ieee80211com ieee80211_superg_vattach(vap); #endif ieee80211_ht_vattach(vap); + ieee80211_vht_vattach(vap); ieee80211_scan_vattach(vap); ieee80211_regdomain_vattach(vap); ieee80211_radiotap_vattach(vap); @@ -737,6 +763,7 @@ ieee80211_vap_detach(struct ieee80211vap #ifdef IEEE80211_SUPPORT_SUPERG ieee80211_superg_vdetach(vap); #endif + ieee80211_vht_vdetach(vap); ieee80211_ht_vdetach(vap); /* NB: must be before ieee80211_node_vdetach */ ieee80211_proto_vdetach(vap); @@ -1081,6 +1108,110 @@ set_extchan(struct ieee80211_channel *c) c->ic_extieee = 0; } +/* + * Populate the freq1/freq2 fields as appropriate for VHT channels. + * + * This for now uses a hard-coded list of 80MHz wide channels. + * + * For HT20/HT40, freq1 just is the centre frequency of the 40MHz + * wide channel we've already decided upon. + * + * For VHT80 and VHT160, there are only a small number of fixed + * 80/160MHz wide channels, so we just use those. + * + * This is all likely very very wrong - both the regulatory code + * and this code needs to ensure that all four channels are + * available and valid before the VHT80 (and eight for VHT160) channel + * is created. + */ + +struct vht_chan_range { + uint16_t freq_start; + uint16_t freq_end; +}; + +struct vht_chan_range vht80_chan_ranges[] = { + { 5170, 5250 }, + { 5250, 5330 }, + { 5490, 5570 }, + { 5570, 5650 }, + { 5650, 5730 }, + { 5735, 5815 }, + { 0, 0, } +}; + +static int +set_vht_extchan(struct ieee80211_channel *c) +{ + int i; + + if (! IEEE80211_IS_CHAN_VHT(c)) { + return (0); + } + + if (IEEE80211_IS_CHAN_VHT20(c)) { + c->ic_vht_ch_freq1 = c->ic_ieee; + return (1); + } + + if (IEEE80211_IS_CHAN_VHT40(c)) { + if (IEEE80211_IS_CHAN_HT40U(c)) + c->ic_vht_ch_freq1 = c->ic_ieee + 2; + else if (IEEE80211_IS_CHAN_HT40D(c)) + c->ic_vht_ch_freq1 = c->ic_ieee - 2; + else + return (0); + return (1); + } + + if (IEEE80211_IS_CHAN_VHT80(c)) { + for (i = 0; vht80_chan_ranges[i].freq_start != 0; i++) { + if (c->ic_freq >= vht80_chan_ranges[i].freq_start && + c->ic_freq < vht80_chan_ranges[i].freq_end) { + int midpoint; + + midpoint = vht80_chan_ranges[i].freq_start + 40; + c->ic_vht_ch_freq1 = + ieee80211_mhz2ieee(midpoint, c->ic_flags); + c->ic_vht_ch_freq2 = 0; +#if 0 + printf("%s: %d, freq=%d, midpoint=%d, freq1=%d, freq2=%d\n", + __func__, c->ic_ieee, c->ic_freq, midpoint, + c->ic_vht_ch_freq1, c->ic_vht_ch_freq2); +#endif + return (1); + } + } + return (0); + } + + printf("%s: unknown VHT channel type (ieee=%d, flags=0x%08x)\n", + __func__, + c->ic_ieee, + c->ic_flags); + + return (0); +} + +/* + * Return whether the current channel could possibly be a part of + * a VHT80 channel. + * + * This doesn't check that the whole range is in the allowed list + * according to regulatory. + */ +static int +is_vht80_valid_freq(uint16_t freq) +{ + int i; + for (i = 0; vht80_chan_ranges[i].freq_start != 0; i++) { + if (freq >= vht80_chan_ranges[i].freq_start && + freq < vht80_chan_ranges[i].freq_end) + return (1); + } + return (0); +} + static int addchan(struct ieee80211_channel chans[], int maxchans, int *nchans, uint8_t ieee, uint16_t freq, int8_t maxregpower, uint32_t flags) @@ -1090,13 +1221,25 @@ addchan(struct ieee80211_channel chans[] if (*nchans >= maxchans) return (ENOBUFS); +#if 0 + printf("%s: %d: ieee=%d, freq=%d, flags=0x%08x\n", + __func__, + *nchans, + ieee, + freq, + flags); +#endif + c = &chans[(*nchans)++]; c->ic_ieee = ieee; c->ic_freq = freq != 0 ? freq : ieee80211_ieee2mhz(ieee, flags); c->ic_maxregpower = maxregpower; c->ic_maxpower = 2 * maxregpower; c->ic_flags = flags; + c->ic_vht_ch_freq1 = 0; + c->ic_vht_ch_freq2 = 0; set_extchan(c); + set_vht_extchan(c); return (0); } @@ -1112,14 +1255,27 @@ copychan_prev(struct ieee80211_channel c if (*nchans >= maxchans) return (ENOBUFS); +#if 0 + printf("%s: %d: flags=0x%08x\n", + __func__, + *nchans, + flags); +#endif + c = &chans[(*nchans)++]; c[0] = c[-1]; c->ic_flags = flags; + c->ic_vht_ch_freq1 = 0; + c->ic_vht_ch_freq2 = 0; set_extchan(c); + set_vht_extchan(c); return (0); } +/* + * XXX VHT-2GHz + */ static void getflags_2ghz(const uint8_t bands[], uint32_t flags[], int ht40) { @@ -1140,35 +1296,73 @@ getflags_2ghz(const uint8_t bands[], uin } static void -getflags_5ghz(const uint8_t bands[], uint32_t flags[], int ht40) +getflags_5ghz(const uint8_t bands[], uint32_t flags[], int ht40, int vht80) { int nmodes; + /* + * the addchan_list function seems to expect the flags array to + * be in channel width order, so the VHT bits are interspersed + * as appropriate to maintain said order. + * + * It also assumes HT40U is before HT40D. + */ nmodes = 0; + + /* 20MHz */ if (isset(bands, IEEE80211_MODE_11A)) flags[nmodes++] = IEEE80211_CHAN_A; if (isset(bands, IEEE80211_MODE_11NA)) flags[nmodes++] = IEEE80211_CHAN_A | IEEE80211_CHAN_HT20; + if (isset(bands, IEEE80211_MODE_VHT_5GHZ)) { + flags[nmodes++] = IEEE80211_CHAN_A | IEEE80211_CHAN_HT20 | + IEEE80211_CHAN_VHT20; + + /* 40MHz */ if (ht40) { flags[nmodes++] = IEEE80211_CHAN_A | IEEE80211_CHAN_HT40U; + } + if (ht40 && isset(bands, IEEE80211_MODE_VHT_5GHZ)) { + flags[nmodes++] = IEEE80211_CHAN_A | IEEE80211_CHAN_HT40U + | IEEE80211_CHAN_VHT40U; + } + if (ht40) { flags[nmodes++] = IEEE80211_CHAN_A | IEEE80211_CHAN_HT40D; } + if (ht40 && isset(bands, IEEE80211_MODE_VHT_5GHZ)) { + flags[nmodes++] = IEEE80211_CHAN_A | IEEE80211_CHAN_HT40D + | IEEE80211_CHAN_VHT40D; + } + + /* 80MHz */ + if (vht80 && isset(bands, IEEE80211_MODE_VHT_5GHZ)) { + flags[nmodes++] = IEEE80211_CHAN_A | + IEEE80211_CHAN_HT40U | IEEE80211_CHAN_VHT80; + flags[nmodes++] = IEEE80211_CHAN_A | + IEEE80211_CHAN_HT40D | IEEE80211_CHAN_VHT80; + } + } + + /* XXX VHT80+80 */ + /* XXX VHT160 */ flags[nmodes] = 0; } static void -getflags(const uint8_t bands[], uint32_t flags[], int ht40) +getflags(const uint8_t bands[], uint32_t flags[], int ht40, int vht80) { flags[0] = 0; if (isset(bands, IEEE80211_MODE_11A) || - isset(bands, IEEE80211_MODE_11NA)) { + isset(bands, IEEE80211_MODE_11NA) || + isset(bands, IEEE80211_MODE_VHT_5GHZ)) { if (isset(bands, IEEE80211_MODE_11B) || isset(bands, IEEE80211_MODE_11G) || - isset(bands, IEEE80211_MODE_11NG)) + isset(bands, IEEE80211_MODE_11NG) || + isset(bands, IEEE80211_MODE_VHT_2GHZ)) return; - getflags_5ghz(bands, flags, ht40); + getflags_5ghz(bands, flags, ht40, vht80); } else getflags_2ghz(bands, flags, ht40); } @@ -1176,6 +1370,7 @@ getflags(const uint8_t bands[], uint32_t /* * Add one 20 MHz channel into specified channel list. */ +/* XXX VHT */ int ieee80211_add_channel(struct ieee80211_channel chans[], int maxchans, int *nchans, uint8_t ieee, uint16_t freq, int8_t maxregpower, @@ -1184,7 +1379,7 @@ ieee80211_add_channel(struct ieee80211_c uint32_t flags[IEEE80211_MODE_MAX]; int i, error; - getflags(bands, flags, 0); + getflags(bands, flags, 0, 0); KASSERT(flags[0] != 0, ("%s: no correct mode provided\n", __func__)); error = addchan(chans, maxchans, nchans, ieee, freq, maxregpower, @@ -1218,6 +1413,7 @@ findchannel(struct ieee80211_channel cha /* * Add 40 MHz channel pair into specified channel list. */ +/* XXX VHT */ int ieee80211_add_channel_ht40(struct ieee80211_channel chans[], int maxchans, int *nchans, uint8_t ieee, int8_t maxregpower, uint32_t flags) @@ -1275,11 +1471,17 @@ ieee80211_get_channel_center_freq(const * For 80+80MHz channels this will be the centre of the primary * 80MHz channel; the secondary 80MHz channel will be center_freq2(). */ - uint32_t ieee80211_get_channel_center_freq1(const struct ieee80211_channel *c) { + /* + * VHT - use the pre-calculated centre frequency + * of the given channel. + */ + if (IEEE80211_IS_CHAN_VHT(c)) + return (ieee80211_ieee2mhz(c->ic_vht_ch_freq1, c->ic_flags)); + if (IEEE80211_IS_CHAN_HT40U(c)) { return (c->ic_freq + 10); } @@ -1291,12 +1493,15 @@ ieee80211_get_channel_center_freq1(const } /* - * For now, no 80+80 support; this is zero. + * For now, no 80+80 support; it will likely always return 0. */ uint32_t ieee80211_get_channel_center_freq2(const struct ieee80211_channel *c) { + if (IEEE80211_IS_CHAN_VHT(c) && (c->ic_vht_ch_freq2 != 0)) + return (ieee80211_ieee2mhz(c->ic_vht_ch_freq2, c->ic_flags)); + return (0); } @@ -1310,16 +1515,70 @@ add_chanlist(struct ieee80211_channel ch { uint16_t freq; int i, j, error; + int is_vht; for (i = 0; i < nieee; i++) { freq = ieee80211_ieee2mhz(ieee[i], flags[0]); for (j = 0; flags[j] != 0; j++) { + /* + * Notes: + * + HT40 and VHT40 channels occur together, so + * we need to be careful that we actually allow that. + * + VHT80, VHT160 will coexist with HT40/VHT40, so + * make sure it's not skipped because of the overlap + * check used for (V)HT40. + */ + is_vht = !! (flags[j] & IEEE80211_CHAN_VHT); + + /* + * Test for VHT80. + * XXX This is all very broken right now. + * What we /should/ do is: + * + * + check that the frequency is in the list of + * allowed VHT80 ranges; and + * + the other 3 channels in the list are actually + * also available. + */ + if (is_vht && flags[j] & IEEE80211_CHAN_VHT80) + if (! is_vht80_valid_freq(freq)) + continue; + + /* + * Test for (V)HT40. + * + * This is also a fall through from VHT80; as we only + * allow a VHT80 channel if the VHT40 combination is + * also valid. If the VHT40 form is not valid then + * we certainly can't do VHT80.. + */ if (flags[j] & IEEE80211_CHAN_HT40D) + /* + * Can't have a "lower" channel if we are the + * first channel. + * + * Can't have a "lower" channel if it's below/ + * within 20MHz of the first channel. + * + * Can't have a "lower" channel if the channel + * below it is not 20MHz away. + */ if (i == 0 || ieee[i] < ieee[0] + 4 || freq - 20 != ieee80211_ieee2mhz(ieee[i] - 4, flags[j])) continue; if (flags[j] & IEEE80211_CHAN_HT40U) + /* + * Can't have an "upper" channel if we are + * the last channel. + * + * Can't have an "upper" channel be above the + * last channel in the list. + * + * Can't have an "upper" channel if the next + * channel according to the math isn't 20MHz + * away. (Likely for channel 13/14.) + */ if (i == nieee - 1 || ieee[i] + 4 > ieee[nieee - 1] || freq + 20 != @@ -1348,6 +1607,7 @@ ieee80211_add_channel_list_2ghz(struct i { uint32_t flags[IEEE80211_MODE_MAX]; + /* XXX no VHT for now */ getflags_2ghz(bands, flags, ht40); KASSERT(flags[0] != 0, ("%s: no correct mode provided\n", __func__)); @@ -1360,8 +1620,15 @@ ieee80211_add_channel_list_5ghz(struct i int ht40) { uint32_t flags[IEEE80211_MODE_MAX]; + int vht80 = 0; + + /* + * For now, assume VHT == VHT80 support as a minimum. + */ + if (isset(bands, IEEE80211_MODE_VHT_5GHZ)) + vht80 = 1; - getflags_5ghz(bands, flags, ht40); + getflags_5ghz(bands, flags, ht40, vht80); KASSERT(flags[0] != 0, ("%s: no correct mode provided\n", __func__)); return (add_chanlist(chans, maxchans, nchans, ieee, nieee, flags)); @@ -1662,6 +1929,7 @@ ieee80211_announce(struct ieee80211com * printf("\n"); } ieee80211_ht_announce(ic); + ieee80211_vht_announce(ic); } void From owner-svn-src-head@freebsd.org Fri Jan 13 07:02:06 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7A332CAC9CE; Fri, 13 Jan 2017 07:02: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 4643D18F4; Fri, 13 Jan 2017 07:02:06 +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 v0D7257u009018; Fri, 13 Jan 2017 07:02:05 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v0D724S1009010; Fri, 13 Jan 2017 07:02:04 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201701130702.v0D724S1009010@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Fri, 13 Jan 2017 07:02:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r312015 - head/sys/net80211 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 13 Jan 2017 07:02:06 -0000 Author: adrian Date: Fri Jan 13 07:02:04 2017 New Revision: 312015 URL: https://svnweb.freebsd.org/changeset/base/312015 Log: [net80211] Initial VHT node upgrade/downgrade support and initial IE parsing. This is the bulk of the magic to start enabling VHT channel negotiation. It is absolutely, positively not yet even a complete VHT wave-1 implementation. * parse IEs in scan, assoc req/resp, probe req/resp; * break apart the channel upgrade from the HT IE parsing - do it after the VHT IEs are parsed; * (dirty! sigh) add channel width decision making in ieee80211_ht.c htinfo_update_chw(). This is the main bit where negotiated channel promotion through IEs occur. * Shoehorn in VHT node init ,teardown, rate control, etc calls like the HT versions; * Do VHT channel adjustment where appropriate Tested: * monitor mode, ath10k port * STA mode, ath10k port - VHT20, VHT40, VHT80 modes TODO: * IBSS; * hostap; * (ignore mesh, wds for now); * finish 11n state engine - channel width change, opmode notifications, SMPS, etc; * VHT basic rate negotiation and acceptance criteria when scanning, associating, etc; * VHT control/management frame handling (group managment and operating mode being the two big ones); * Verify TX/RX VHT rate negotiation is actually working correctly. Whilst here, add some comments about seqno allocation and locking. To achieve the full VHT rates I need to push seqno allocation into the drivers and finally remove the IEEE80211_TX_LOCK() I added years ago to fix issues. :/ Modified: head/sys/net80211/ieee80211_adhoc.c head/sys/net80211/ieee80211_hostap.c head/sys/net80211/ieee80211_ht.c head/sys/net80211/ieee80211_ht.h head/sys/net80211/ieee80211_input.c head/sys/net80211/ieee80211_node.c head/sys/net80211/ieee80211_output.c head/sys/net80211/ieee80211_scan_sta.c head/sys/net80211/ieee80211_sta.c Modified: head/sys/net80211/ieee80211_adhoc.c ============================================================================== --- head/sys/net80211/ieee80211_adhoc.c Fri Jan 13 06:53:56 2017 (r312014) +++ head/sys/net80211/ieee80211_adhoc.c Fri Jan 13 07:02:04 2017 (r312015) @@ -822,10 +822,14 @@ adhoc_recv_mgmt(struct ieee80211_node *n #if 0 if (scan.htcap != NULL && scan.htinfo != NULL && (vap->iv_flags_ht & IEEE80211_FHT_HT)) { - if (ieee80211_ht_updateparams(ni, + ieee80211_ht_updateparams(ni, + scan.htcap, scan.htinfo)); + if (ieee80211_ht_updateparams_final(ni, scan.htcap, scan.htinfo)) ht_state_change = 1; } + + /* XXX same for VHT? */ #endif if (ni != NULL) { IEEE80211_RSSI_LPF(ni->ni_avgrssi, rssi); Modified: head/sys/net80211/ieee80211_hostap.c ============================================================================== --- head/sys/net80211/ieee80211_hostap.c Fri Jan 13 06:53:56 2017 (r312014) +++ head/sys/net80211/ieee80211_hostap.c Fri Jan 13 07:02:04 2017 (r312015) @@ -62,6 +62,7 @@ __FBSDID("$FreeBSD$"); #include #endif #include +#include #define IEEE80211_RATE2MBS(r) (((r) & IEEE80211_RATE_VAL) / 2) @@ -1745,6 +1746,7 @@ hostap_recv_mgmt(struct ieee80211_node * struct ieee80211_frame *wh; uint8_t *frm, *efrm, *sfrm; uint8_t *ssid, *rates, *xrates, *wpa, *rsn, *wme, *ath, *htcap; + uint8_t *vhtcap, *vhtinfo; int reassoc, resp; uint8_t rate; @@ -2042,6 +2044,7 @@ hostap_recv_mgmt(struct ieee80211_node * if (reassoc) frm += 6; /* ignore current AP info */ ssid = rates = xrates = wpa = rsn = wme = ath = htcap = NULL; + vhtcap = vhtinfo = NULL; sfrm = frm; while (efrm - frm > 1) { IEEE80211_VERIFY_LENGTH(efrm - frm, frm[1] + 2, return); @@ -2061,6 +2064,12 @@ hostap_recv_mgmt(struct ieee80211_node * case IEEE80211_ELEMID_HTCAP: htcap = frm; break; + case IEEE80211_ELEMID_VHT_CAP: + vhtcap = frm; + break; + case IEEE80211_ELEMID_VHT_OPMODE: + vhtinfo = frm; + break; case IEEE80211_ELEMID_VENDOR: if (iswpaoui(frm)) wpa = frm; @@ -2135,10 +2144,22 @@ hostap_recv_mgmt(struct ieee80211_node * vap->iv_stats.is_rx_assoc_norate++; return; } + /* * Do HT rate set handling and setup HT node state. */ ni->ni_chan = vap->iv_bss->ni_chan; + + /* VHT */ + if (IEEE80211_IS_CHAN_VHT(ni->ni_chan)) { + /* XXX TODO; see below */ + printf("%s: VHT TODO!\n", __func__); + ieee80211_vht_node_init(ni); + ieee80211_vht_update_cap(ni, vhtcap, vhtinfo); + } else if (ni->ni_flags & IEEE80211_NODE_VHT) + ieee80211_vht_node_cleanup(ni); + + /* HT */ if (IEEE80211_IS_CHAN_HT(ni->ni_chan) && htcap != NULL) { rate = ieee80211_setup_htrates(ni, htcap, IEEE80211_F_DOFMCS | IEEE80211_F_DONEGO | @@ -2153,6 +2174,12 @@ hostap_recv_mgmt(struct ieee80211_node * ieee80211_ht_updatehtcap(ni, htcap); } else if (ni->ni_flags & IEEE80211_NODE_HT) ieee80211_ht_node_cleanup(ni); + + /* Finally - this will use HT/VHT info to change node channel */ + if (IEEE80211_IS_CHAN_HT(ni->ni_chan) && htcap != NULL) { + ieee80211_ht_updatehtcap_final(ni); + } + #ifdef IEEE80211_SUPPORT_SUPERG /* Always do ff node cleanup; for A-MSDU */ ieee80211_ff_node_cleanup(ni); Modified: head/sys/net80211/ieee80211_ht.c ============================================================================== --- head/sys/net80211/ieee80211_ht.c Fri Jan 13 06:53:56 2017 (r312014) +++ head/sys/net80211/ieee80211_ht.c Fri Jan 13 07:02:04 2017 (r312015) @@ -1490,52 +1490,117 @@ ieee80211_parse_htinfo(struct ieee80211_ } /* - * Handle 11n channel switch. Use the received HT ie's to - * identify the right channel to use. If we cannot locate it - * in the channel table then fallback to legacy operation. + * Handle 11n/11ac channel switch. + * + * Use the received HT/VHT ie's to identify the right channel to use. + * If we cannot locate it in the channel table then fallback to + * legacy operation. + * * Note that we use this information to identify the node's * channel only; the caller is responsible for insuring any * required channel change is done (e.g. in sta mode when * parsing the contents of a beacon frame). */ static int -htinfo_update_chw(struct ieee80211_node *ni, int htflags) +htinfo_update_chw(struct ieee80211_node *ni, int htflags, int vhtflags) { struct ieee80211com *ic = ni->ni_ic; struct ieee80211_channel *c; int chanflags; int ret = 0; - chanflags = (ni->ni_chan->ic_flags &~ IEEE80211_CHAN_HT) | htflags; - if (chanflags != ni->ni_chan->ic_flags) { - /* XXX not right for ht40- */ - c = ieee80211_find_channel(ic, ni->ni_chan->ic_freq, chanflags); - if (c == NULL && (htflags & IEEE80211_CHAN_HT40)) { - /* - * No HT40 channel entry in our table; fall back - * to HT20 operation. This should not happen. - */ - c = findhtchan(ic, ni->ni_chan, IEEE80211_CHAN_HT20); + /* + * First step - do HT/VHT only channel lookup based on operating mode + * flags. This involves masking out the VHT flags as well. + * Otherwise we end up doing the full channel walk each time + * we trigger this, which is expensive. + */ + chanflags = (ni->ni_chan->ic_flags &~ + (IEEE80211_CHAN_HT | IEEE80211_CHAN_VHT)) | htflags | vhtflags; + + if (chanflags == ni->ni_chan->ic_flags) + goto done; + + /* + * If HT /or/ VHT flags have changed then check both. + * We need to start by picking a HT channel anyway. + */ + + c = NULL; + chanflags = (ni->ni_chan->ic_flags &~ + (IEEE80211_CHAN_HT | IEEE80211_CHAN_VHT)) | htflags; + /* XXX not right for ht40- */ + c = ieee80211_find_channel(ic, ni->ni_chan->ic_freq, chanflags); + if (c == NULL && (htflags & IEEE80211_CHAN_HT40)) { + /* + * No HT40 channel entry in our table; fall back + * to HT20 operation. This should not happen. + */ + c = findhtchan(ic, ni->ni_chan, IEEE80211_CHAN_HT20); #if 0 - IEEE80211_NOTE(ni->ni_vap, - IEEE80211_MSG_ASSOC | IEEE80211_MSG_11N, ni, - "no HT40 channel (freq %u), falling back to HT20", - ni->ni_chan->ic_freq); + IEEE80211_NOTE(ni->ni_vap, + IEEE80211_MSG_ASSOC | IEEE80211_MSG_11N, ni, + "no HT40 channel (freq %u), falling back to HT20", + ni->ni_chan->ic_freq); #endif - /* XXX stat */ - } - if (c != NULL && c != ni->ni_chan) { - IEEE80211_NOTE(ni->ni_vap, - IEEE80211_MSG_ASSOC | IEEE80211_MSG_11N, ni, - "switch station to HT%d channel %u/0x%x", - IEEE80211_IS_CHAN_HT40(c) ? 40 : 20, - c->ic_freq, c->ic_flags); - ni->ni_chan = c; - ret = 1; - } - /* NB: caller responsible for forcing any channel change */ + /* XXX stat */ } - /* update node's tx channel width */ + + /* Nothing found - leave it alone; move onto VHT */ + if (c == NULL) + c = ni->ni_chan; + + /* + * If it's non-HT, then bail out now. + */ + if (! IEEE80211_IS_CHAN_HT(c)) { + IEEE80211_NOTE(ni->ni_vap, + IEEE80211_MSG_ASSOC | IEEE80211_MSG_11N, ni, + "not HT; skipping VHT check (%u/0x%x)", + c->ic_freq, c->ic_flags); + goto done; + } + + /* + * Next step - look at the current VHT flags and determine + * if we need to upgrade. Mask out the VHT and HT flags since + * the vhtflags field will already have the correct HT + * flags to use. + */ + if (IEEE80211_CONF_VHT(ic) && ni->ni_vhtcap != 0 && vhtflags != 0) { + chanflags = (c->ic_flags + &~ (IEEE80211_CHAN_HT | IEEE80211_CHAN_VHT)) + | vhtflags; + IEEE80211_NOTE(ni->ni_vap, + IEEE80211_MSG_ASSOC | IEEE80211_MSG_11N, + ni, + "%s: VHT; chanwidth=0x%02x; vhtflags=0x%08x", + __func__, ni->ni_vht_chanwidth, vhtflags); + + IEEE80211_NOTE(ni->ni_vap, + IEEE80211_MSG_ASSOC | IEEE80211_MSG_11N, + ni, + "%s: VHT; trying lookup for %d/0x%08x", + __func__, c->ic_freq, chanflags); + c = ieee80211_find_channel(ic, c->ic_freq, chanflags); + } + + /* Finally, if it's changed */ + if (c != NULL && c != ni->ni_chan) { + IEEE80211_NOTE(ni->ni_vap, + IEEE80211_MSG_ASSOC | IEEE80211_MSG_11N, ni, + "switch station to %s%d channel %u/0x%x", + IEEE80211_IS_CHAN_VHT(c) ? "VHT" : "HT", + IEEE80211_IS_CHAN_VHT80(c) ? 80 : + (IEEE80211_IS_CHAN_HT40(c) ? 40 : 20), + c->ic_freq, c->ic_flags); + ni->ni_chan = c; + ret = 1; + } + /* NB: caller responsible for forcing any channel change */ + +done: + /* update node's (11n) tx channel width */ ni->ni_chw = IEEE80211_IS_CHAN_HT40(ni->ni_chan)? 40 : 20; return (ret); } @@ -1587,15 +1652,18 @@ htcap_update_shortgi(struct ieee80211_no /* * Parse and update HT-related state extracted from * the HT cap and info ie's. + * + * This is called from the STA management path and + * the ieee80211_node_join() path. It will take into + * account the IEs discovered during scanning and + * adjust things accordingly. */ -int +void ieee80211_ht_updateparams(struct ieee80211_node *ni, const uint8_t *htcapie, const uint8_t *htinfoie) { struct ieee80211vap *vap = ni->ni_vap; const struct ieee80211_ie_htinfo *htinfo; - int htflags; - int ret = 0; ieee80211_parse_htcap(ni, htcapie); if (vap->iv_htcaps & IEEE80211_HTCAP_SMPS) @@ -1607,8 +1675,115 @@ ieee80211_ht_updateparams(struct ieee802 htinfo = (const struct ieee80211_ie_htinfo *) htinfoie; htinfo_parse(ni, htinfo); + /* + * Defer the node channel change; we need to now + * update VHT parameters before we do it. + */ + + if ((htinfo->hi_byte1 & IEEE80211_HTINFO_RIFSMODE_PERM) && + (vap->iv_flags_ht & IEEE80211_FHT_RIFS)) + ni->ni_flags |= IEEE80211_NODE_RIFS; + else + ni->ni_flags &= ~IEEE80211_NODE_RIFS; +} + +static uint32_t +ieee80211_vht_get_vhtflags(struct ieee80211_node *ni, uint32_t htflags) +{ + struct ieee80211vap *vap = ni->ni_vap; + uint32_t vhtflags = 0; + + vhtflags = 0; + if (ni->ni_flags & IEEE80211_NODE_VHT && vap->iv_flags_vht & IEEE80211_FVHT_VHT) { + if ((ni->ni_vht_chanwidth == IEEE80211_VHT_CHANWIDTH_160MHZ) && + /* XXX 2 means "160MHz and 80+80MHz", 1 means "160MHz" */ + (MS(vap->iv_vhtcaps, + IEEE80211_VHTCAP_SUPP_CHAN_WIDTH_MASK) >= 1) && + (vap->iv_flags_vht & IEEE80211_FVHT_USEVHT160)) { + vhtflags = IEEE80211_CHAN_VHT160; + /* Mirror the HT40 flags */ + if (htflags == IEEE80211_CHAN_HT40U) { + vhtflags |= IEEE80211_CHAN_HT40U; + } else if (htflags == IEEE80211_CHAN_HT40D) { + vhtflags |= IEEE80211_CHAN_HT40D; + } + } else if ((ni->ni_vht_chanwidth == IEEE80211_VHT_CHANWIDTH_80P80MHZ) && + /* XXX 2 means "160MHz and 80+80MHz" */ + (MS(vap->iv_vhtcaps, + IEEE80211_VHTCAP_SUPP_CHAN_WIDTH_MASK) == 2) && + (vap->iv_flags_vht & IEEE80211_FVHT_USEVHT80P80)) { + vhtflags = IEEE80211_CHAN_VHT80_80; + /* Mirror the HT40 flags */ + if (htflags == IEEE80211_CHAN_HT40U) { + vhtflags |= IEEE80211_CHAN_HT40U; + } else if (htflags == IEEE80211_CHAN_HT40D) { + vhtflags |= IEEE80211_CHAN_HT40D; + } + } else if ((ni->ni_vht_chanwidth == IEEE80211_VHT_CHANWIDTH_80MHZ) && + (vap->iv_flags_vht & IEEE80211_FVHT_USEVHT80)) { + vhtflags = IEEE80211_CHAN_VHT80; + /* Mirror the HT40 flags */ + if (htflags == IEEE80211_CHAN_HT40U) { + vhtflags |= IEEE80211_CHAN_HT40U; + } else if (htflags == IEEE80211_CHAN_HT40D) { + vhtflags |= IEEE80211_CHAN_HT40D; + } + } else if (ni->ni_vht_chanwidth == IEEE80211_VHT_CHANWIDTH_USE_HT) { + /* Mirror the HT40 flags */ + /* + * XXX TODO: if ht40 is disabled, but vht40 isn't + * disabled then this logic will get very, very sad. + * It's quite possible the only sane thing to do is + * to not have vht40 as an option, and just obey + * 'ht40' as that flag. + */ + if ((htflags == IEEE80211_CHAN_HT40U) && + (vap->iv_flags_vht & IEEE80211_FVHT_USEVHT40)) { + vhtflags = IEEE80211_CHAN_VHT40U + | IEEE80211_CHAN_HT40U; + } else if (htflags == IEEE80211_CHAN_HT40D && + (vap->iv_flags_vht & IEEE80211_FVHT_USEVHT40)) { + vhtflags = IEEE80211_CHAN_VHT40D + | IEEE80211_CHAN_HT40D; + } else if (htflags == IEEE80211_CHAN_HT20) { + vhtflags = IEEE80211_CHAN_VHT20 + | IEEE80211_CHAN_HT20; + } + } else { + vhtflags = IEEE80211_CHAN_VHT20; + } + } + return (vhtflags); +} + +/* + * Final part of updating the HT parameters. + * + * This is called from the STA management path and + * the ieee80211_node_join() path. It will take into + * account the IEs discovered during scanning and + * adjust things accordingly. + * + * This is done after a call to ieee80211_ht_updateparams() + * because it (and the upcoming VHT version of updateparams) + * needs to ensure everything is parsed before htinfo_update_chw() + * is called - which will change the channel config for the + * node for us. + */ +int +ieee80211_ht_updateparams_final(struct ieee80211_node *ni, + const uint8_t *htcapie, const uint8_t *htinfoie) +{ + struct ieee80211vap *vap = ni->ni_vap; + const struct ieee80211_ie_htinfo *htinfo; + int htflags, vhtflags; + int ret = 0; + + htinfo = (const struct ieee80211_ie_htinfo *) htinfoie; + htflags = (vap->iv_flags_ht & IEEE80211_FHT_HT) ? IEEE80211_CHAN_HT20 : 0; + /* NB: honor operating mode constraint */ if ((htinfo->hi_byte1 & IEEE80211_HTINFO_TXWIDTH_2040) && (vap->iv_flags_ht & IEEE80211_FHT_USEHT40)) { @@ -1617,14 +1792,16 @@ ieee80211_ht_updateparams(struct ieee802 else if (ni->ni_ht2ndchan == IEEE80211_HTINFO_2NDCHAN_BELOW) htflags = IEEE80211_CHAN_HT40D; } - if (htinfo_update_chw(ni, htflags)) - ret = 1; - if ((htinfo->hi_byte1 & IEEE80211_HTINFO_RIFSMODE_PERM) && - (vap->iv_flags_ht & IEEE80211_FHT_RIFS)) - ni->ni_flags |= IEEE80211_NODE_RIFS; - else - ni->ni_flags &= ~IEEE80211_NODE_RIFS; + /* + * VHT flags - do much the same; check whether VHT is available + * and if so, what our ideal channel use would be based on our + * capabilities and the (pre-parsed) VHT info IE. + */ + vhtflags = ieee80211_vht_get_vhtflags(ni, htflags); + + if (htinfo_update_chw(ni, htflags, vhtflags)) + ret = 1; return (ret); } @@ -1632,17 +1809,31 @@ ieee80211_ht_updateparams(struct ieee802 /* * Parse and update HT-related state extracted from the HT cap ie * for a station joining an HT BSS. + * + * This is called from the hostap path for each station. */ void ieee80211_ht_updatehtcap(struct ieee80211_node *ni, const uint8_t *htcapie) { struct ieee80211vap *vap = ni->ni_vap; - int htflags; ieee80211_parse_htcap(ni, htcapie); if (vap->iv_htcaps & IEEE80211_HTCAP_SMPS) htcap_update_mimo_ps(ni); htcap_update_shortgi(ni); +} + +/* + * Called once HT and VHT capabilities are parsed in hostap mode - + * this will adjust the channel configuration of the given node + * based on the configuration and capabilities. + */ +void +ieee80211_ht_updatehtcap_final(struct ieee80211_node *ni) +{ + struct ieee80211vap *vap = ni->ni_vap; + int htflags; + int vhtflags; /* NB: honor operating mode constraint */ /* XXX 40 MHz intolerant */ @@ -1655,7 +1846,14 @@ ieee80211_ht_updatehtcap(struct ieee8021 else if (IEEE80211_IS_CHAN_HT40D(vap->iv_bss->ni_chan)) htflags = IEEE80211_CHAN_HT40D; } - (void) htinfo_update_chw(ni, htflags); + /* + * VHT flags - do much the same; check whether VHT is available + * and if so, what our ideal channel use would be based on our + * capabilities and the (pre-parsed) VHT info IE. + */ + vhtflags = ieee80211_vht_get_vhtflags(ni, htflags); + + (void) htinfo_update_chw(ni, htflags, vhtflags); } /* @@ -2135,6 +2333,7 @@ ht_recv_action_ht_txchwidth(struct ieee8 "%s: HT txchwidth, width %d%s", __func__, chw, ni->ni_chw != chw ? "*" : ""); if (chw != ni->ni_chw) { + /* XXX does this need to change the ht40 station count? */ ni->ni_chw = chw; /* XXX notify on change */ } @@ -2229,6 +2428,10 @@ ieee80211_ampdu_request(struct ieee80211 dialogtoken = (tokens+1) % 63; /* XXX */ tid = tap->txa_tid; + + /* + * XXX TODO: This is racy with any other parallel TX going on. :( + */ tap->txa_start = ni->ni_txseqs[tid]; args[0] = dialogtoken; Modified: head/sys/net80211/ieee80211_ht.h ============================================================================== --- head/sys/net80211/ieee80211_ht.h Fri Jan 13 06:53:56 2017 (r312014) +++ head/sys/net80211/ieee80211_ht.h Fri Jan 13 07:02:04 2017 (r312015) @@ -201,9 +201,12 @@ void ieee80211_htprot_update(struct ieee void ieee80211_ht_timeout(struct ieee80211com *); void ieee80211_parse_htcap(struct ieee80211_node *, const uint8_t *); void ieee80211_parse_htinfo(struct ieee80211_node *, const uint8_t *); -int ieee80211_ht_updateparams(struct ieee80211_node *, const uint8_t *, +void ieee80211_ht_updateparams(struct ieee80211_node *, const uint8_t *, const uint8_t *); +int ieee80211_ht_updateparams_final(struct ieee80211_node *, + const uint8_t *, const uint8_t *); void ieee80211_ht_updatehtcap(struct ieee80211_node *, const uint8_t *); +void ieee80211_ht_updatehtcap_final(struct ieee80211_node *); int ieee80211_ampdu_request(struct ieee80211_node *, struct ieee80211_tx_ampdu *); void ieee80211_ampdu_stop(struct ieee80211_node *, Modified: head/sys/net80211/ieee80211_input.c ============================================================================== --- head/sys/net80211/ieee80211_input.c Fri Jan 13 06:53:56 2017 (r312014) +++ head/sys/net80211/ieee80211_input.c Fri Jan 13 07:02:04 2017 (r312015) @@ -494,6 +494,8 @@ ieee80211_parse_beacon(struct ieee80211_ scan->status = 0; /* * beacon/probe response frame format + * + * XXX Update from 802.11-2012 - eg where HT is * [8] time stamp * [2] beacon interval * [2] capability information @@ -508,6 +510,8 @@ ieee80211_parse_beacon(struct ieee80211_ * [tlv] WPA or RSN * [tlv] HT capabilities * [tlv] HT information + * [tlv] VHT capabilities + * [tlv] VHT information * [tlv] Atheros capabilities * [tlv] Mesh ID * [tlv] Mesh Configuration @@ -585,6 +589,12 @@ ieee80211_parse_beacon(struct ieee80211_ case IEEE80211_ELEMID_HTCAP: scan->htcap = frm; break; + case IEEE80211_ELEMID_VHT_CAP: + scan->vhtcap = frm; + break; + case IEEE80211_ELEMID_VHT_OPMODE: + scan->vhtopmode = frm; + break; case IEEE80211_ELEMID_RSN: scan->rsn = frm; break; @@ -718,6 +728,19 @@ ieee80211_parse_beacon(struct ieee80211_ sizeof(struct ieee80211_ie_htinfo)-2, scan->htinfo = NULL); } + + /* Process VHT IEs */ + if (scan->vhtcap != NULL) { + IEEE80211_VERIFY_LENGTH(scan->vhtcap[1], + sizeof(struct ieee80211_ie_vhtcap) - 2, + scan->vhtcap = NULL); + } + if (scan->vhtopmode != NULL) { + IEEE80211_VERIFY_LENGTH(scan->vhtopmode[1], + sizeof(struct ieee80211_ie_vht_operation) - 2, + scan->vhtopmode = NULL); + } + return scan->status; } @@ -838,6 +861,9 @@ ieee80211_parse_action(struct ieee80211_ } break; #endif + case IEEE80211_ACTION_CAT_VHT: + printf("%s: TODO: VHT handling!\n", __func__); + break; } return 0; } Modified: head/sys/net80211/ieee80211_node.c ============================================================================== --- head/sys/net80211/ieee80211_node.c Fri Jan 13 06:53:56 2017 (r312014) +++ head/sys/net80211/ieee80211_node.c Fri Jan 13 07:02:04 2017 (r312015) @@ -53,6 +53,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include @@ -412,7 +413,11 @@ ieee80211_create_ibss(struct ieee80211va /* XXX TODO: other bits and pieces - eg fast-frames? */ /* If we're an 11n channel then initialise the 11n bits */ - if (IEEE80211_IS_CHAN_HT(ni->ni_chan)) { + if (IEEE80211_IS_CHAN_VHT(ni->ni_chan)) { + /* XXX what else? */ + ieee80211_ht_node_init(ni); + ieee80211_vht_node_init(ni); + } else if (IEEE80211_IS_CHAN_HT(ni->ni_chan)) { /* XXX what else? */ ieee80211_ht_node_init(ni); } @@ -708,9 +713,42 @@ gethtadjustflags(struct ieee80211com *ic } /* + * Calculate VHT channel promotion flags for all vaps. + * This assumes ni_chan have been setup for each vap. + */ +static int +getvhtadjustflags(struct ieee80211com *ic) +{ + struct ieee80211vap *vap; + int flags; + + flags = 0; + /* XXX locking */ + TAILQ_FOREACH(vap, &ic->ic_vaps, iv_next) { + if (vap->iv_state < IEEE80211_S_RUN) + continue; + switch (vap->iv_opmode) { + case IEEE80211_M_WDS: + case IEEE80211_M_STA: + case IEEE80211_M_AHDEMO: + case IEEE80211_M_HOSTAP: + case IEEE80211_M_IBSS: + case IEEE80211_M_MBSS: + flags |= ieee80211_vhtchanflags(vap->iv_bss->ni_chan); + break; + default: + break; + } + } + return flags; +} + +/* * Check if the current channel needs to change based on whether * any vap's are using HT20/HT40. This is used to sync the state * of ic_curchan after a channel width change on a running vap. + * + * Same applies for VHT. */ void ieee80211_sync_curchan(struct ieee80211com *ic) @@ -718,6 +756,8 @@ ieee80211_sync_curchan(struct ieee80211c struct ieee80211_channel *c; c = ieee80211_ht_adjust_channel(ic, ic->ic_curchan, gethtadjustflags(ic)); + c = ieee80211_vht_adjust_channel(ic, c, getvhtadjustflags(ic)); + if (c != ic->ic_curchan) { ic->ic_curchan = c; ic->ic_curmode = ieee80211_chan2mode(ic->ic_curchan); @@ -743,10 +783,23 @@ ieee80211_setupcurchan(struct ieee80211c * set of running vap's. This assumes we are called * after ni_chan is setup for each vap. */ + /* XXX VHT? */ /* NB: this assumes IEEE80211_FHT_USEHT40 > IEEE80211_FHT_HT */ if (flags > ieee80211_htchanflags(c)) c = ieee80211_ht_adjust_channel(ic, c, flags); } + + /* + * VHT promotion - this will at least promote to VHT20/40 + * based on what HT has done; it may further promote the + * channel to VHT80 or above. + */ + if (ic->ic_vhtcaps != 0) { + int flags = getvhtadjustflags(ic); + if (flags > ieee80211_vhtchanflags(c)) + c = ieee80211_vht_adjust_channel(ic, c, flags); + } + ic->ic_bsschan = ic->ic_curchan = c; ic->ic_curmode = ieee80211_chan2mode(ic->ic_curchan); ic->ic_rt = ieee80211_get_ratetable(ic->ic_curchan); @@ -849,6 +902,7 @@ ieee80211_sta_join(struct ieee80211vap * { struct ieee80211com *ic = vap->iv_ic; struct ieee80211_node *ni; + int do_ht = 0; ni = ieee80211_alloc_node(&ic->ic_sta, vap, se->se_macaddr); if (ni == NULL) { @@ -896,9 +950,13 @@ ieee80211_sta_join(struct ieee80211vap * if (ni->ni_ies.tdma_ie != NULL) ieee80211_parse_tdma(ni, ni->ni_ies.tdma_ie); #endif + if (ni->ni_ies.vhtcap_ie != NULL) + ieee80211_parse_vhtcap(ni, ni->ni_ies.vhtcap_ie); + if (ni->ni_ies.vhtopmode_ie != NULL) + ieee80211_parse_vhtopmode(ni, ni->ni_ies.vhtopmode_ie); - /* XXX parse VHT IEs */ /* XXX parse BSSLOAD IE */ + /* XXX parse TXPWRENV IE */ /* XXX parse APCHANREP IE */ } @@ -926,10 +984,43 @@ ieee80211_sta_join(struct ieee80211vap * ieee80211_ht_updateparams(ni, ni->ni_ies.htcap_ie, ni->ni_ies.htinfo_ie); + do_ht = 1; + } + + /* + * Setup VHT state for this node if it's available. + * Same as the above. + * + * For now, don't allow 2GHz VHT operation. + */ + if (ni->ni_ies.vhtopmode_ie != NULL && + ni->ni_ies.vhtcap_ie != NULL && + vap->iv_flags_vht & IEEE80211_FVHT_VHT) { + if (IEEE80211_IS_CHAN_2GHZ(ni->ni_chan)) { + printf("%s: BSS %6D: 2GHz channel, VHT info; ignoring\n", + __func__, + ni->ni_macaddr, + ":"); + } else { + ieee80211_vht_node_init(ni); + ieee80211_vht_updateparams(ni, + ni->ni_ies.vhtcap_ie, + ni->ni_ies.vhtopmode_ie); + ieee80211_setup_vht_rates(ni, ni->ni_ies.vhtcap_ie, + ni->ni_ies.vhtopmode_ie); + do_ht = 1; + } + } + + /* Finally do the node channel change */ + if (do_ht) { + ieee80211_ht_updateparams_final(ni, ni->ni_ies.htcap_ie, + ni->ni_ies.htinfo_ie); ieee80211_setup_htrates(ni, ni->ni_ies.htcap_ie, IEEE80211_F_JOIN | IEEE80211_F_DOBRS); ieee80211_setup_basic_htrates(ni, ni->ni_ies.htinfo_ie); } + /* XXX else check for ath FF? */ /* XXX QoS? Difficult given that WME config is specific to a master */ @@ -1102,8 +1193,10 @@ node_cleanup(struct ieee80211_node *ni) "power save mode off, %u sta's in ps mode", vap->iv_ps_sta); } /* - * Cleanup any HT-related state. + * Cleanup any VHT and HT-related state. */ + if (ni->ni_flags & IEEE80211_NODE_VHT) + ieee80211_vht_node_cleanup(ni); if (ni->ni_flags & IEEE80211_NODE_HT) ieee80211_ht_node_cleanup(ni); #ifdef IEEE80211_SUPPORT_SUPERG @@ -1423,6 +1516,7 @@ ieee80211_node_create_wds(struct ieee802 if (vap->iv_flags & IEEE80211_F_FF) ni->ni_flags |= IEEE80211_NODE_FF; #endif + /* XXX VHT */ if ((ic->ic_htcaps & IEEE80211_HTC_HT) && (vap->iv_flags_ht & IEEE80211_FHT_HT)) { /* @@ -1431,6 +1525,9 @@ ieee80211_node_create_wds(struct ieee802 * ni_chan will be adjusted to an HT channel. */ ieee80211_ht_wds_init(ni); + if (vap->iv_flags_vht & IEEE80211_FVHT_VHT) { + printf("%s: TODO: vht_wds_init\n", __func__); + } } else { struct ieee80211_channel *c = ni->ni_chan; /* @@ -1638,7 +1735,7 @@ ieee80211_init_neighbor(struct ieee80211 const struct ieee80211_frame *wh, const struct ieee80211_scanparams *sp) { - int do_ht_setup = 0; + int do_ht_setup = 0, do_vht_setup = 0; ni->ni_esslen = sp->ssid[1]; memcpy(ni->ni_essid, sp->ssid + 2, sp->ssid[1]); @@ -1670,11 +1767,23 @@ ieee80211_init_neighbor(struct ieee80211 if (ni->ni_ies.htinfo_ie != NULL) ieee80211_parse_htinfo(ni, ni->ni_ies.htinfo_ie); + if (ni->ni_ies.vhtcap_ie != NULL) + ieee80211_parse_vhtcap(ni, ni->ni_ies.vhtcap_ie); + if (ni->ni_ies.vhtopmode_ie != NULL) + ieee80211_parse_vhtopmode(ni, ni->ni_ies.vhtopmode_ie); + if ((ni->ni_ies.htcap_ie != NULL) && (ni->ni_ies.htinfo_ie != NULL) && (ni->ni_vap->iv_flags_ht & IEEE80211_FHT_HT)) { do_ht_setup = 1; } + + if ((ni->ni_ies.vhtcap_ie != NULL) && + (ni->ni_ies.vhtopmode_ie != NULL) && + (ni->ni_vap->iv_flags_vht & IEEE80211_FVHT_VHT)) { + do_vht_setup = 1; + } + } /* NB: must be after ni_chan is setup */ @@ -1692,15 +1801,40 @@ ieee80211_init_neighbor(struct ieee80211 ieee80211_ht_updateparams(ni, ni->ni_ies.htcap_ie, ni->ni_ies.htinfo_ie); + + if (do_vht_setup) { + if (IEEE80211_IS_CHAN_2GHZ(ni->ni_chan)) { + printf("%s: BSS %6D: 2GHz channel, VHT info; ignoring\n", + __func__, + ni->ni_macaddr, + ":"); + } else { + ieee80211_vht_node_init(ni); + ieee80211_vht_updateparams(ni, + ni->ni_ies.vhtcap_ie, + ni->ni_ies.vhtopmode_ie); + ieee80211_setup_vht_rates(ni, + ni->ni_ies.vhtcap_ie, + ni->ni_ies.vhtopmode_ie); + } + } + + /* + * Finally do the channel upgrade/change based + * on the HT/VHT configuration. + */ + ieee80211_ht_updateparams_final(ni, ni->ni_ies.htcap_ie, + ni->ni_ies.htinfo_ie); ieee80211_setup_htrates(ni, ni->ni_ies.htcap_ie, IEEE80211_F_JOIN | IEEE80211_F_DOBRS); ieee80211_setup_basic_htrates(ni, ni->ni_ies.htinfo_ie); + ieee80211_node_setuptxparms(ni); ieee80211_ratectl_node_init(ni); - /* Reassociate; we're now 11n */ + /* Reassociate; we're now 11n/11ac */ /* * XXX TODO: this is the wrong thing to do - * we're calling it with isnew=1 so the ath(4) @@ -2365,6 +2499,7 @@ ieee80211_node_timeout(void *arg) IEEE80211_LOCK(ic); ieee80211_erp_timeout(ic); ieee80211_ht_timeout(ic); + ieee80211_vht_timeout(ic); IEEE80211_UNLOCK(ic); } callout_reset(&ic->ic_inact, IEEE80211_INACT_WAIT*hz, @@ -2462,8 +2597,12 @@ ieee80211_dump_node(struct ieee80211_nod printf("\thtcap %x htparam %x htctlchan %u ht2ndchan %u\n", ni->ni_htcap, ni->ni_htparam, ni->ni_htctlchan, ni->ni_ht2ndchan); - printf("\thtopmode %x htstbc %x chw %u\n", + printf("\thtopmode %x htstbc %x htchw %u\n", ni->ni_htopmode, ni->ni_htstbc, ni->ni_chw); + printf("\tvhtcap %x freq1 %d freq2 %d vhtbasicmcs %x\n", + ni->ni_vhtcap, (int) ni->ni_vht_chan1, (int) ni->ni_vht_chan2, + (int) ni->ni_vht_basicmcs); + /* XXX VHT state */ } void @@ -2594,6 +2733,8 @@ ieee80211_node_join(struct ieee80211_nod if (IEEE80211_IS_CHAN_HT(ic->ic_bsschan)) ieee80211_ht_node_join(ni); + if (IEEE80211_IS_CHAN_VHT(ic->ic_bsschan)) + ieee80211_vht_node_join(ni); if (IEEE80211_IS_CHAN_ANYG(ic->ic_bsschan) && IEEE80211_IS_CHAN_FULL(ic->ic_bsschan)) ieee80211_node_join_11g(ni); @@ -2603,6 +2744,9 @@ ieee80211_node_join(struct ieee80211_nod } else newassoc = 0; + /* + * XXX VHT - should log VHT channel width, etc + */ IEEE80211_NOTE(vap, IEEE80211_MSG_ASSOC | IEEE80211_MSG_DEBUG, ni, "station associated at aid %d: %s preamble, %s slot time%s%s%s%s%s%s%s%s", IEEE80211_NODE_AID(ni), @@ -2610,6 +2754,7 @@ ieee80211_node_join(struct ieee80211_nod ic->ic_flags & IEEE80211_F_SHSLOT ? "short" : "long", ic->ic_flags & IEEE80211_F_USEPROT ? ", protection" : "", ni->ni_flags & IEEE80211_NODE_QOS ? ", QoS" : "", + /* XXX update for VHT string */ ni->ni_flags & IEEE80211_NODE_HT ? (ni->ni_chw == 40 ? ", HT40" : ", HT20") : "", ni->ni_flags & IEEE80211_NODE_AMPDU ? " (+AMPDU)" : "", @@ -2774,6 +2919,8 @@ ieee80211_node_leave(struct ieee80211_no vap->iv_sta_assoc--; ic->ic_sta_assoc--; + if (IEEE80211_IS_CHAN_VHT(ic->ic_bsschan)) + ieee80211_vht_node_leave(ni); if (IEEE80211_IS_CHAN_HT(ic->ic_bsschan)) ieee80211_ht_node_leave(ni); if (IEEE80211_IS_CHAN_ANYG(ic->ic_bsschan) && Modified: head/sys/net80211/ieee80211_output.c ============================================================================== --- head/sys/net80211/ieee80211_output.c Fri Jan 13 06:53:56 2017 (r312014) +++ head/sys/net80211/ieee80211_output.c Fri Jan 13 07:02:04 2017 (r312015) @@ -58,6 +58,7 @@ __FBSDID("$FreeBSD$"); #endif #include #include +#include #if defined(INET) || defined(INET6) #include @@ -764,6 +765,16 @@ ieee80211_send_setup( } *(uint16_t *)&wh->i_dur[0] = 0; + /* + * XXX TODO: this is what the TX lock is for. + * Here we're incrementing sequence numbers, and they + * need to be in lock-step with what the driver is doing + * both in TX ordering and crypto encap (IV increment.) + * + * If the driver does seqno itself, then we can skip + * assigning sequence numbers here, and we can avoid + * requiring the TX lock. + */ tap = &ni->ni_tx_ampdu[tid]; if (tid != IEEE80211_NONQOS_TID && IEEE80211_AMPDU_RUNNING(tap)) m->m_flags |= M_AMPDU_MPDU; @@ -1542,6 +1553,11 @@ ieee80211_encap(struct ieee80211vap *vap if (is_amsdu) qos[0] |= IEEE80211_QOS_AMSDU; + /* + * XXX TODO TX lock is needed for atomic updates of sequence + * numbers. If the driver does it, then don't do it here; + * and we don't need the TX lock held. + */ if ((m->m_flags & M_AMPDU_MPDU) == 0) { /* * NB: don't assign a sequence # to potential @@ -1561,6 +1577,11 @@ ieee80211_encap(struct ieee80211vap *vap M_SEQNO_SET(m, seqno); } } else { + /* + * XXX TODO TX lock is needed for atomic updates of sequence + * numbers. If the driver does it, then don't do it here; + * and we don't need the TX lock held. + */ seqno = ni->ni_txseqs[IEEE80211_NONQOS_TID]++; *(uint16_t *)wh->i_seq = htole16(seqno << IEEE80211_SEQ_SEQ_SHIFT); @@ -2065,6 +2086,7 @@ ieee80211_add_qos(uint8_t *frm, const st * Send a probe request frame with the specified ssid * and any optional information element data. */ +/* XXX VHT? */ int ieee80211_send_probereq(struct ieee80211_node *ni, const uint8_t sa[IEEE80211_ADDR_LEN], @@ -2111,6 +2133,7 @@ ieee80211_send_probereq(struct ieee80211 * [tlv] RSN (optional) * [tlv] extended supported rates * [tlv] HT cap (optional) + * [tlv] VHT cap (optional) * [tlv] WPA (optional) * [tlv] user-specified ie's */ @@ -2119,7 +2142,8 @@ ieee80211_send_probereq(struct ieee80211 2 + IEEE80211_NWID_LEN + 2 + IEEE80211_RATE_SIZE + sizeof(struct ieee80211_ie_htcap) - + sizeof(struct ieee80211_ie_htinfo) + + sizeof(struct ieee80211_ie_vhtcap) + + sizeof(struct ieee80211_ie_htinfo) /* XXX not needed? */ + sizeof(struct ieee80211_ie_wpa) + 2 + (IEEE80211_RATE_MAXSIZE - IEEE80211_RATE_SIZE) + sizeof(struct ieee80211_ie_wpa) @@ -2159,6 +2183,21 @@ ieee80211_send_probereq(struct ieee80211 frm = ieee80211_add_htcap_ch(frm, vap, c); } + /* + * XXX TODO: need to figure out what/how to update the + * VHT channel. + */ +#if 0 + (vap->iv_flags_vht & IEEE80211_FVHT_VHT) { + struct ieee80211_channel *c; + + c = ieee80211_ht_adjust_channel(ic, ic->ic_curchan, + vap->iv_flags_ht); + c = ieee80211_vht_adjust_channel(ic, c, vap->iv_flags_vht); + frm = ieee80211_add_vhtcap_ch(frm, vap, c); + } +#endif + frm = ieee80211_add_wpa(frm, vap); if (vap->iv_appie_probereq != NULL) frm = add_appie(frm, vap->iv_appie_probereq); @@ -2357,6 +2396,7 @@ ieee80211_send_mgmt(struct ieee80211_nod case IEEE80211_FC0_SUBTYPE_ASSOC_REQ: case IEEE80211_FC0_SUBTYPE_REASSOC_REQ: + /* XXX VHT? */ /* * asreq frame format * [2] capability information @@ -2368,6 +2408,7 @@ ieee80211_send_mgmt(struct ieee80211_nod * [4] power capability (optional) * [28] supported channels (optional) * [tlv] HT capabilities + * [tlv] VHT capabilities * [tlv] WME (optional) * [tlv] Vendor OUI HT capabilities (optional) * [tlv] Atheros capabilities (if negotiated) @@ -2385,6 +2426,7 @@ ieee80211_send_mgmt(struct ieee80211_nod + 2 + 26 + sizeof(struct ieee80211_wme_info) *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-head@freebsd.org Fri Jan 13 07:08:15 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A3966CACAA8; Fri, 13 Jan 2017 07:08:15 +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 70A131B35; Fri, 13 Jan 2017 07:08:15 +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 v0D78EZ9011578; Fri, 13 Jan 2017 07:08:14 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v0D78EPw011577; Fri, 13 Jan 2017 07:08:14 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201701130708.v0D78EPw011577@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Fri, 13 Jan 2017 07:08:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r312016 - head/sys/net80211 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 13 Jan 2017 07:08:15 -0000 Author: adrian Date: Fri Jan 13 07:08:14 2017 New Revision: 312016 URL: https://svnweb.freebsd.org/changeset/base/312016 Log: [net80211] begin laying the groundwork for drivers to do their own sequence number management. I added IEEE80211_TX_LOCK() a few years ago because there were races between seqno allocation, driver queuing and crypto IV allocation. This meant that they'd appear out of sequence and the receiver would drop them, leading to terrible performance or flat out traffic hangs. This flag should be set by drivers that do their own sequence number allocation for all frames it needs to happen for, including beacon frames. Eventually this should lead to the driver taking care of locking for allocating seqno and other traffic-triggered events (eg addba setup.) Modified: head/sys/net80211/ieee80211_var.h Modified: head/sys/net80211/ieee80211_var.h ============================================================================== --- head/sys/net80211/ieee80211_var.h Fri Jan 13 07:02:04 2017 (r312015) +++ head/sys/net80211/ieee80211_var.h Fri Jan 13 07:08:14 2017 (r312016) @@ -629,11 +629,12 @@ MALLOC_DECLARE(M_80211_VAP); #define IEEE80211_FEXT_PROBECHAN 0x00020000 /* CONF: probe passive channel*/ #define IEEE80211_FEXT_UNIQMAC 0x00040000 /* CONF: user or computed mac */ #define IEEE80211_FEXT_SCAN_OFFLOAD 0x00080000 /* CONF: scan is fully offloaded */ +#define IEEE80211_FEXT_SEQNO_OFFLOAD 0x00100000 /* CONF: driver does seqno insertion/allocation */ #define IEEE80211_FEXT_BITS \ "\20\2INACT\3SCANWAIT\4BGSCAN\5WPS\6TSN\7SCANREQ\10RESUME" \ "\0114ADDR\12NONEPR_PR\13SWBMISS\14DFS\15DOTD\16STATEWAIT\17REINIT" \ - "\20BPF\21WDSLEGACY\22PROBECHAN\23UNIQMAC\24SCAN_OFFLOAD" + "\20BPF\21WDSLEGACY\22PROBECHAN\23UNIQMAC\24SCAN_OFFLOAD\25SEQNO_OFFLOAD" /* ic_flags_ht/iv_flags_ht */ #define IEEE80211_FHT_NONHT_PR 0x00000001 /* STATUS: non-HT sta present */ From owner-svn-src-head@freebsd.org Fri Jan 13 07:24:59 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 79006CAD143; Fri, 13 Jan 2017 07:24:59 +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 4944A1697; Fri, 13 Jan 2017 07:24:59 +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 v0D7Owji020247; Fri, 13 Jan 2017 07:24:58 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v0D7OwkD020246; Fri, 13 Jan 2017 07:24:58 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201701130724.v0D7OwkD020246@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Fri, 13 Jan 2017 07:24:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r312017 - head/sys/net80211 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 13 Jan 2017 07:24:59 -0000 Author: adrian Date: Fri Jan 13 07:24:58 2017 New Revision: 312017 URL: https://svnweb.freebsd.org/changeset/base/312017 Log: [net80211] add a macro to check this configuration option. Modified: head/sys/net80211/ieee80211_var.h Modified: head/sys/net80211/ieee80211_var.h ============================================================================== --- head/sys/net80211/ieee80211_var.h Fri Jan 13 07:08:14 2017 (r312016) +++ head/sys/net80211/ieee80211_var.h Fri Jan 13 07:24:58 2017 (r312017) @@ -95,6 +95,9 @@ */ #define IEEE80211_CONF_VHT(ic) ((ic)->ic_vhtcaps != 0) +#define IEEE80211_CONF_SEQNO_OFFLOAD(ic) \ + ((ic)->ic_flags_ext & IEEE80211_FEXT_SEQNO_OFFLOAD) + /* * 802.11 control state is split into a common portion that maps * 1-1 to a physical device and one or more "Virtual AP's" (VAP) From owner-svn-src-head@freebsd.org Fri Jan 13 08:01:28 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 832D2CAD324; Fri, 13 Jan 2017 08:01:28 +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 31D911A02; Fri, 13 Jan 2017 08:01:28 +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 v0D81R1e034099; Fri, 13 Jan 2017 08:01:27 GMT (envelope-from hrs@FreeBSD.org) Received: (from hrs@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v0D81RME034098; Fri, 13 Jan 2017 08:01:27 GMT (envelope-from hrs@FreeBSD.org) Message-Id: <201701130801.v0D81RME034098@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hrs set sender to hrs@FreeBSD.org using -f From: Hiroki Sato Date: Fri, 13 Jan 2017 08:01:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r312018 - head/usr.sbin/route6d X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 13 Jan 2017 08:01:28 -0000 Author: hrs Date: Fri Jan 13 08:01:27 2017 New Revision: 312018 URL: https://svnweb.freebsd.org/changeset/base/312018 Log: Purge varargs.h in favor of stdarg.h. Modified: head/usr.sbin/route6d/route6d.c Modified: head/usr.sbin/route6d/route6d.c ============================================================================== --- head/usr.sbin/route6d/route6d.c Fri Jan 13 07:24:58 2017 (r312017) +++ head/usr.sbin/route6d/route6d.c Fri Jan 13 08:01:27 2017 (r312018) @@ -57,11 +57,7 @@ static const char _rcsid[] = "$KAME: rou #endif #include #include -#ifdef __STDC__ #include -#else -#include -#endif #include #include #include @@ -203,7 +199,6 @@ static volatile sig_atomic_t seenusr1; #define RRTF_SENDANYWAY 0x40000000 #define RRTF_CHANGED 0x80000000 -int main(int, char **); static void sighandler(int); static void ripalarm(void); static void riprecv(void); @@ -3457,22 +3452,12 @@ ripsuptrig(void) #endif static void -#ifdef __STDC__ fatal(const char *fmt, ...) -#else -fatal(fmt, va_alist) - char *fmt; - va_dcl -#endif { va_list ap; char buf[1024]; -#ifdef __STDC__ va_start(ap, fmt); -#else - va_start(ap); -#endif vsnprintf(buf, sizeof(buf), fmt, ap); va_end(ap); perror(buf); @@ -3484,33 +3469,18 @@ fatal(fmt, va_alist) } static void -#ifdef __STDC__ tracet(int level, const char *fmt, ...) -#else -tracet(level, fmt, va_alist) - int level; - char *fmt; - va_dcl -#endif { va_list ap; if (level <= dflag) { -#ifdef __STDC__ va_start(ap, fmt); -#else - va_start(ap); -#endif fprintf(stderr, "%s: ", hms()); vfprintf(stderr, fmt, ap); va_end(ap); } if (dflag) { -#ifdef __STDC__ va_start(ap, fmt); -#else - va_start(ap); -#endif if (level > 0) vsyslog(LOG_DEBUG, fmt, ap); else @@ -3520,32 +3490,17 @@ tracet(level, fmt, va_alist) } static void -#ifdef __STDC__ trace(int level, const char *fmt, ...) -#else -trace(level, fmt, va_alist) - int level; - char *fmt; - va_dcl -#endif { va_list ap; if (level <= dflag) { -#ifdef __STDC__ va_start(ap, fmt); -#else - va_start(ap); -#endif vfprintf(stderr, fmt, ap); va_end(ap); } if (dflag) { -#ifdef __STDC__ va_start(ap, fmt); -#else - va_start(ap); -#endif if (level > 0) vsyslog(LOG_DEBUG, fmt, ap); else From owner-svn-src-head@freebsd.org Fri Jan 13 08:31:57 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id AAAC7CA539F; Fri, 13 Jan 2017 08:31: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 838991657; Fri, 13 Jan 2017 08:31: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 v0D8VuOj048899; Fri, 13 Jan 2017 08:31:56 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v0D8VuFa048892; Fri, 13 Jan 2017 08:31:56 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201701130831.v0D8VuFa048892@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Fri, 13 Jan 2017 08:31:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r312026 - in head/sys/cam: . ctl scsi X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 13 Jan 2017 08:31:57 -0000 Author: mav Date: Fri Jan 13 08:31:55 2017 New Revision: 312026 URL: https://svnweb.freebsd.org/changeset/base/312026 Log: Improve CAM_CDB_POINTER support. MFC after: 2 weeks Modified: head/sys/cam/cam_ccb.h head/sys/cam/cam_periph.c head/sys/cam/ctl/ctl_frontend_cam_sim.c head/sys/cam/ctl/scsi_ctl.c head/sys/cam/scsi/scsi_all.c head/sys/cam/scsi/scsi_xpt.c Modified: head/sys/cam/cam_ccb.h ============================================================================== --- head/sys/cam/cam_ccb.h Fri Jan 13 08:29:43 2017 (r312025) +++ head/sys/cam/cam_ccb.h Fri Jan 13 08:31:55 2017 (r312026) @@ -784,6 +784,13 @@ struct ccb_accept_tio { struct scsi_sense_data sense_data; }; +static __inline uint8_t * +atio_cdb_ptr(struct ccb_accept_tio *ccb) +{ + return ((ccb->ccb_h.flags & CAM_CDB_POINTER) ? + ccb->cdb_io.cdb_ptr : ccb->cdb_io.cdb_bytes); +} + /* Release SIM Queue */ struct ccb_relsim { struct ccb_hdr ccb_h; Modified: head/sys/cam/cam_periph.c ============================================================================== --- head/sys/cam/cam_periph.c Fri Jan 13 08:29:43 2017 (r312025) +++ head/sys/cam/cam_periph.c Fri Jan 13 08:31:55 2017 (r312026) @@ -1930,10 +1930,7 @@ cam_periph_devctl_notify(union ccb *ccb) if (ccb->ccb_h.func_code == XPT_SCSI_IO) { sbuf_printf(&sb, "CDB=\""); - if ((ccb->ccb_h.flags & CAM_CDB_POINTER) != 0) - scsi_cdb_sbuf(ccb->csio.cdb_io.cdb_ptr, &sb); - else - scsi_cdb_sbuf(ccb->csio.cdb_io.cdb_bytes, &sb); + scsi_cdb_sbuf(scsiio_cdb_ptr(&ccb->csio), &sb); sbuf_printf(&sb, "\" "); } else if (ccb->ccb_h.func_code == XPT_ATA_IO) { sbuf_printf(&sb, "ACB=\""); Modified: head/sys/cam/ctl/ctl_frontend_cam_sim.c ============================================================================== --- head/sys/cam/ctl/ctl_frontend_cam_sim.c Fri Jan 13 08:29:43 2017 (r312025) +++ head/sys/cam/ctl/ctl_frontend_cam_sim.c Fri Jan 13 08:31:55 2017 (r312026) @@ -587,8 +587,7 @@ cfcs_action(struct cam_sim *sim, union c __func__, csio->cdb_len, sizeof(io->scsiio.cdb)); } io->scsiio.cdb_len = min(csio->cdb_len, sizeof(io->scsiio.cdb)); - bcopy(csio->cdb_io.cdb_bytes, io->scsiio.cdb, - io->scsiio.cdb_len); + bcopy(scsiio_cdb_ptr(csio), io->scsiio.cdb, io->scsiio.cdb_len); ccb->ccb_h.status |= CAM_SIM_QUEUED; err = ctl_queue(io); Modified: head/sys/cam/ctl/scsi_ctl.c ============================================================================== --- head/sys/cam/ctl/scsi_ctl.c Fri Jan 13 08:29:43 2017 (r312025) +++ head/sys/cam/ctl/scsi_ctl.c Fri Jan 13 08:31:55 2017 (r312026) @@ -941,7 +941,7 @@ ctlfestart(struct cam_periph *periph, un && (csio->sglist_cnt != 0))) { printf("%s: tag %04x cdb %02x flags %#x dxfer_len " "%d sg %u\n", __func__, atio->tag_id, - atio->cdb_io.cdb_bytes[0], flags, dxfer_len, + atio_cdb_ptr(atio)[0], flags, dxfer_len, csio->sglist_cnt); printf("%s: tag %04x io status %#x\n", __func__, atio->tag_id, io->io_hdr.status); @@ -1027,8 +1027,7 @@ ctlfe_adjust_cdb(struct ccb_accept_tio * { uint64_t lba; uint32_t num_blocks, nbc; - uint8_t *cmdbyt = (atio->ccb_h.flags & CAM_CDB_POINTER)? - atio->cdb_io.cdb_ptr : atio->cdb_io.cdb_bytes; + uint8_t *cmdbyt = atio_cdb_ptr(atio); nbc = offset >> 9; /* ASSUMING 512 BYTE BLOCKS */ @@ -1206,8 +1205,7 @@ ctlfedone(struct cam_periph *periph, uni __func__, atio->cdb_len, sizeof(io->scsiio.cdb)); } io->scsiio.cdb_len = min(atio->cdb_len, sizeof(io->scsiio.cdb)); - bcopy(atio->cdb_io.cdb_bytes, io->scsiio.cdb, - io->scsiio.cdb_len); + bcopy(atio_cdb_ptr(atio), io->scsiio.cdb, io->scsiio.cdb_len); #ifdef CTLFEDEBUG printf("%s: %u:%u:%u: tag %04x CDB %02x\n", __func__, @@ -1388,7 +1386,7 @@ ctlfedone(struct cam_periph *periph, uni printf("%s: tag %04x no status or " "len cdb = %02x\n", __func__, atio->tag_id, - atio->cdb_io.cdb_bytes[0]); + atio_cdb_ptr(atio)[0]); printf("%s: tag %04x io status %#x\n", __func__, atio->tag_id, io->io_hdr.status); Modified: head/sys/cam/scsi/scsi_all.c ============================================================================== --- head/sys/cam/scsi/scsi_all.c Fri Jan 13 08:29:43 2017 (r312025) +++ head/sys/cam/scsi/scsi_all.c Fri Jan 13 08:31:55 2017 (r312026) @@ -3617,15 +3617,9 @@ scsi_command_string(struct cam_device *d #endif /* _KERNEL/!_KERNEL */ - if ((csio->ccb_h.flags & CAM_CDB_POINTER) != 0) { - sbuf_printf(sb, "%s. CDB: ", - scsi_op_desc(csio->cdb_io.cdb_ptr[0], inq_data)); - scsi_cdb_sbuf(csio->cdb_io.cdb_ptr, sb); - } else { - sbuf_printf(sb, "%s. CDB: ", - scsi_op_desc(csio->cdb_io.cdb_bytes[0], inq_data)); - scsi_cdb_sbuf(csio->cdb_io.cdb_bytes, sb); - } + sbuf_printf(sb, "%s. CDB: ", + scsi_op_desc(scsiio_cdb_ptr(csio)[0], inq_data)); + scsi_cdb_sbuf(scsiio_cdb_ptr(csio), sb); #ifdef _KERNEL xpt_free_ccb((union ccb *)cgd); @@ -5030,7 +5024,6 @@ scsi_sense_sbuf(struct cam_device *devic struct ccb_getdev *cgd; #endif /* _KERNEL */ char path_str[64]; - uint8_t *cdb; #ifndef _KERNEL if (device == NULL) @@ -5128,14 +5121,9 @@ scsi_sense_sbuf(struct cam_device *devic sense = &csio->sense_data; } - if (csio->ccb_h.flags & CAM_CDB_POINTER) - cdb = csio->cdb_io.cdb_ptr; - else - cdb = csio->cdb_io.cdb_bytes; - scsi_sense_only_sbuf(sense, csio->sense_len - csio->sense_resid, sb, - path_str, inq_data, cdb, csio->cdb_len); - + path_str, inq_data, scsiio_cdb_ptr(csio), csio->cdb_len); + #ifdef _KERNEL xpt_free_ccb((union ccb*)cgd); #endif /* _KERNEL/!_KERNEL */ Modified: head/sys/cam/scsi/scsi_xpt.c ============================================================================== --- head/sys/cam/scsi/scsi_xpt.c Fri Jan 13 08:29:43 2017 (r312025) +++ head/sys/cam/scsi/scsi_xpt.c Fri Jan 13 08:31:55 2017 (r312026) @@ -3139,6 +3139,6 @@ scsi_proto_debug_out(union ccb *ccb) device = ccb->ccb_h.path->device; CAM_DEBUG(ccb->ccb_h.path, CAM_DEBUG_CDB,("%s. CDB: %s\n", - scsi_op_desc(ccb->csio.cdb_io.cdb_bytes[0], &device->inq_data), - scsi_cdb_string(ccb->csio.cdb_io.cdb_bytes, cdb_str, sizeof(cdb_str)))); + scsi_op_desc(scsiio_cdb_ptr(&ccb->csio)[0], &device->inq_data), + scsi_cdb_string(scsiio_cdb_ptr(&ccb->csio), cdb_str, sizeof(cdb_str)))); } From owner-svn-src-head@freebsd.org Fri Jan 13 08:40:30 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 13B4ACA59DB; Fri, 13 Jan 2017 08:40:30 +0000 (UTC) (envelope-from julien.charbon@gmail.com) Received: from mail-lf0-f68.google.com (mail-lf0-f68.google.com [209.85.215.68]) (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 BC33914AE; Fri, 13 Jan 2017 08:40:29 +0000 (UTC) (envelope-from julien.charbon@gmail.com) Received: by mail-lf0-f68.google.com with SMTP id q89so4622335lfi.1; Fri, 13 Jan 2017 00:40:29 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:references:cc:from:message-id:date :user-agent:mime-version:in-reply-to; bh=TmS09Q20QEsG1oDwQ/Z0U9o88LW1G3KSo3gj5ZANfeU=; b=dujVq1GkW9eUFld6mvICFpOg8u06RaArJsAF46QD95bnmzXzToQ1c7b9xzVE81QBpW RYZdne9F19bxUjFvThTN4T5S8UKQl54XR4iIDdD+OLlzJ9UYKb6q1eOvJyZTZPxJ5Lra JzsIxa1OtJe7+YVl1wqqvsTUxGEKN0DQCCTgL72Z+sSuiI8lf3Oe5ooK2g6nsEBErAHJ 1M8V/zZE6/hwnfZtfwSr+81vjY26JOWOLjH7Tgw971mJkmZ/v60WqxT27XXlenNkU2kw eCC6ts78CEHRqfBC0dJJkzm220OmBJwisSiq5fZ4XJxcKgg3+CNU8jfHU1xbRN1l8JBo dO8g== X-Gm-Message-State: AIkVDXINSr3BAGzP4yJCeb3ZBZw+QiiKeCb9FHemuNdOLDKvk1b0B2P+qaBQzrq3DesxmQ== X-Received: by 10.25.13.18 with SMTP id 18mr5869116lfn.43.1484295060010; Fri, 13 Jan 2017 00:11:00 -0800 (PST) Received: from [10.5.50.241] (125.226.200.213.static.wline.lns.sme.cust.swisscom.ch. [213.200.226.125]) by smtp.gmail.com with ESMTPSA id d135sm3355982lfg.12.2017.01.13.00.10.58 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 13 Jan 2017 00:10:59 -0800 (PST) Subject: Re: svn commit: r304218 - head/sys/netinet To: Randall Stewart , Slawa Olhovchenkov References: <201608161240.u7GCeuWS082118@repo.freebsd.org> <20160816131805.GK22212@zxy.spb.ru> <16561701-B1C6-4BE3-B9BA-3535F564620F@netflix.com> Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org From: Julien Charbon Message-ID: <88223427-eb42-d741-033b-6b1d0d284719@freebsd.org> Date: Fri, 13 Jan 2017 09:10:51 +0100 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.11; rv:45.0) Gecko/20100101 Thunderbird/45.6.0 MIME-Version: 1.0 In-Reply-To: <16561701-B1C6-4BE3-B9BA-3535F564620F@netflix.com> Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="v5q95kLA2MG3UGQnr9Wm3FREm9TTM72q0" X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 13 Jan 2017 08:40:30 -0000 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --v5q95kLA2MG3UGQnr9Wm3FREm9TTM72q0 Content-Type: multipart/mixed; boundary="o1BMqbN0huGTO6ooXGSso8MQ2pX0qqNUK"; protected-headers="v1" From: Julien Charbon To: Randall Stewart , Slawa Olhovchenkov Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Message-ID: <88223427-eb42-d741-033b-6b1d0d284719@freebsd.org> Subject: Re: svn commit: r304218 - head/sys/netinet References: <201608161240.u7GCeuWS082118@repo.freebsd.org> <20160816131805.GK22212@zxy.spb.ru> <16561701-B1C6-4BE3-B9BA-3535F564620F@netflix.com> In-Reply-To: <16561701-B1C6-4BE3-B9BA-3535F564620F@netflix.com> --o1BMqbN0huGTO6ooXGSso8MQ2pX0qqNUK Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Hi, On 8/16/16 3:21 PM, Randall Stewart via svn-src-all wrote: >=20 > In theory it *could* be MFC=E2=80=99d to stable-10 and 11 but I am not = sure we want to do that. I am > told by Drew that it does improve performance since in stable-10 you ar= e getting the INFO_WLOCK() > but I am not sure if folks want it MFC=E2=80=99d=E2=80=A6 > > R A bit late in the game but for information: Since r309108,in stable-10 you are getting the INFO_RLOCK instead of the INFO_WLOCK like in stable-11 and HEAD: https://svnweb.freebsd.org/base?view=3Drevision&revision=3D309108 In summary the same TCP INP_INFO lock logic is used in stable-10, 11 and HEAD which simplify MFC if needed. My 2 cents. -- Julien --o1BMqbN0huGTO6ooXGSso8MQ2pX0qqNUK-- --v5q95kLA2MG3UGQnr9Wm3FREm9TTM72q0 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Comment: GPGTools - https://gpgtools.org iQEcBAEBCgAGBQJYeIuTAAoJEKVlQ5Je6dhxu9AIALpWPKK82sL+XIdcO3xrmQFk 8doYfqGAtGu4veESWpcamDFvYmgFDii5VebxMWda3nQ++2U6c1GP9C68bGhj6dyI wV58qs1eDA1+uAb+p1X5kI7RgRGsbwcJvJ1KCx8h4M1huPPQ+4gwzwl9cjPhL1UC jOgIaD43/SNnc2bVc2RsFkrlKUv0JD5sHHq8sgzv1UvVMIRCqYib9RBhKhwccDIb FZfJY8nMxVPSXdYRlyetRnjdg1i+NOxLZLZeA++b3ZeeMloITcaeygkWj9Kb96K5 BhWTvqhTWqy216234+6JY9C2KK4xwFUAajdQti6KegoyKPU/fbEeFWx6Nj2+6do= =EuF1 -----END PGP SIGNATURE----- --v5q95kLA2MG3UGQnr9Wm3FREm9TTM72q0-- From owner-svn-src-head@freebsd.org Fri Jan 13 10:55:28 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 04540CAC995; Fri, 13 Jan 2017 10:55:28 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C7ECF18BE; Fri, 13 Jan 2017 10:55:27 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v0DAtQh2011130; Fri, 13 Jan 2017 10:55:26 GMT (envelope-from tuexen@FreeBSD.org) Received: (from tuexen@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v0DAtQ6X011129; Fri, 13 Jan 2017 10:55:26 GMT (envelope-from tuexen@FreeBSD.org) Message-Id: <201701131055.v0DAtQ6X011129@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: tuexen set sender to tuexen@FreeBSD.org using -f From: Michael Tuexen Date: Fri, 13 Jan 2017 10:55:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r312063 - 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-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 13 Jan 2017 10:55:28 -0000 Author: tuexen Date: Fri Jan 13 10:55:26 2017 New Revision: 312063 URL: https://svnweb.freebsd.org/changeset/base/312063 Log: Ensure that the buffer length and the length provided in the IPv4 header match when using a raw socket to send IPv4 packets and providing the header. If they don't match, let send return -1 and set errno to EINVAL. Before this patch is was only enforced that the length in the header is not larger then the buffer length. PR: 212283 Reviewed by: ae, gnn MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D9161 Modified: head/sys/netinet/raw_ip.c Modified: head/sys/netinet/raw_ip.c ============================================================================== --- head/sys/netinet/raw_ip.c Fri Jan 13 10:28:26 2017 (r312062) +++ head/sys/netinet/raw_ip.c Fri Jan 13 10:55:26 2017 (r312063) @@ -508,7 +508,7 @@ rip_output(struct mbuf *m, struct socket * and don't allow packet length sizes that will crash. */ if (((ip->ip_hl != (sizeof (*ip) >> 2)) && inp->inp_options) - || (ntohs(ip->ip_len) > m->m_pkthdr.len) + || (ntohs(ip->ip_len) != m->m_pkthdr.len) || (ntohs(ip->ip_len) < (ip->ip_hl << 2))) { INP_RUNLOCK(inp); m_freem(m); From owner-svn-src-head@freebsd.org Fri Jan 13 12:47:48 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 28A46CAEC1B; Fri, 13 Jan 2017 12:47:48 +0000 (UTC) (envelope-from jilles@stack.nl) Received: from mailout.stack.nl (mailout05.stack.nl [IPv6:2001:610:1108:5010::202]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mailout.stack.nl", Issuer "CA Cert Signing Authority" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id E7A451C88; Fri, 13 Jan 2017 12:47:47 +0000 (UTC) (envelope-from jilles@stack.nl) Received: from snail.stack.nl (snail.stack.nl [IPv6:2001:610:1108:5010::131]) by mailout.stack.nl (Postfix) with ESMTP id D471F35; Fri, 13 Jan 2017 13:47:36 +0100 (CET) Received: by snail.stack.nl (Postfix, from userid 1677) id C389128494; Fri, 13 Jan 2017 13:47:36 +0100 (CET) Date: Fri, 13 Jan 2017 13:47:36 +0100 From: Jilles Tjoelker To: "Ngie Cooper (yaneurabeya)" Cc: Craig Rodrigues , "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Subject: Re: svn commit: r286649 - in head: contrib/netbsd-tests/lib/libc/locale lib/libc/tests/locale Message-ID: <20170113124736.GA91713@stack.nl> References: <201508112159.t7BLxa6U057950@repo.freebsd.org> <681075F8-78D1-43FF-A75D-71D5CDBA3AB4@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <681075F8-78D1-43FF-A75D-71D5CDBA3AB4@gmail.com> User-Agent: Mutt/1.5.21 (2010-09-15) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 13 Jan 2017 12:47:48 -0000 On Wed, Jan 11, 2017 at 02:14:13AM -0800, Ngie Cooper (yaneurabeya) wrote: > > On Aug 11, 2015, at 6:45 PM, Craig Rodrigues wrote: > > > > On Tue, Aug 11, 2015 at 2:59 PM, Jilles Tjoelker > wrote: > > Author: jilles > > Date: Tue Aug 11 21:59:36 2015 > > New Revision: 286649 > > URL: https://svnweb.freebsd.org/changeset/base/286649 > > Log: > > Fix and re-enable UTF-8 tests. > > Modified: > > head/contrib/netbsd-tests/lib/libc/locale/t_mbrtowc.c > > head/contrib/netbsd-tests/lib/libc/locale/t_mbstowcs.c > > head/lib/libc/tests/locale/Makefile > > Thanks for fixing this. What is the procedure that FreeBSD > > developers need to follow to push this kind of change upstream to > > NetBSD? > I’m submitting PRs with NetBSD as needed. To be frank, I’m not > sure that this change is needed upstream (I’m probably going to #ifdef > the code — some things I found when trying to push things back). I think the change is required upstream as well, since UTF-8 no longer includes code points greater than 0x10ffff per RFC 3629 (this change made the code point ranges of UTF-8 and UTF-16 the same). The sequences that used to correspond to code points greater than 0x10ffff shall be treated as invalid. See also SVN r286490, r286491, r287125. I suppose I should have included this reasoning in the original commit message. -- Jilles Tjoelker From owner-svn-src-head@freebsd.org Fri Jan 13 15:17:26 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id BD08ECAE8BC; Fri, 13 Jan 2017 15:17:26 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7E1131ECC; Fri, 13 Jan 2017 15:17:26 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v0DFHPt2019465; Fri, 13 Jan 2017 15:17:25 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v0DFHPFU019464; Fri, 13 Jan 2017 15:17:25 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201701131517.v0DFHPFU019464@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Fri, 13 Jan 2017 15:17:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r312076 - head/lib/libgcc_s X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 13 Jan 2017 15:17:26 -0000 Author: emaste Date: Fri Jan 13 15:17:25 2017 New Revision: 312076 URL: https://svnweb.freebsd.org/changeset/base/312076 Log: libgcc_s: add libc DT_NEEDED to fix underlinking PR: 216012 Reported by: jbeich MFC after: 1 week Sponsored by: The FreeBSD Foundation Modified: head/lib/libgcc_s/Makefile Modified: head/lib/libgcc_s/Makefile ============================================================================== --- head/lib/libgcc_s/Makefile Fri Jan 13 13:50:44 2017 (r312075) +++ head/lib/libgcc_s/Makefile Fri Jan 13 15:17:25 2017 (r312076) @@ -8,6 +8,7 @@ MK_SSP= no WARNS?= 2 LDFLAGS+= -nodefaultlibs +LIBADD+= c VERSION_MAP= ${.CURDIR}/Version.map .include "../libcompiler_rt/Makefile.inc" From owner-svn-src-head@freebsd.org Fri Jan 13 16:37:40 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 01453CAE4C9; Fri, 13 Jan 2017 16:37:40 +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 B5E911D97; Fri, 13 Jan 2017 16:37:39 +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 v0DGbcsM051794; Fri, 13 Jan 2017 16:37:38 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v0DGbcrX051790; Fri, 13 Jan 2017 16:37:38 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201701131637.v0DGbcrX051790@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Fri, 13 Jan 2017 16:37:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r312077 - in head/sys: kern sys X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 13 Jan 2017 16:37:40 -0000 Author: ian Date: Fri Jan 13 16:37:38 2017 New Revision: 312077 URL: https://svnweb.freebsd.org/changeset/base/312077 Log: Check tty_gone() after allocating IO buffers. The tty lock has to be dropped then reacquired due to using M_WAITOK, which opens a window in which the tty device can disappear. Check for this and return ENXIO back up the call chain so that callers can cope. This closes a race where TF_GONE would get set while buffers were being allocated as part of ttydev_open(), causing a subsequent call to ttydevsw_modem() later in ttydev_open() to assert. Reported by: pho Reviewed by: kib Modified: head/sys/kern/tty.c head/sys/kern/tty_inq.c head/sys/kern/tty_outq.c head/sys/sys/ttyqueue.h Modified: head/sys/kern/tty.c ============================================================================== --- head/sys/kern/tty.c Fri Jan 13 15:17:25 2017 (r312076) +++ head/sys/kern/tty.c Fri Jan 13 16:37:38 2017 (r312077) @@ -105,25 +105,38 @@ SYSCTL_INT(_kern, OID_AUTO, tty_drainwai #define TTYBUF_MAX 65536 -static void +/* + * Allocate buffer space if necessary, and set low watermarks, based on speed. + * Note that the ttyxxxq_setsize() functions may drop and then reacquire the tty + * lock during memory allocation. They will return ENXIO if the tty disappears + * while unlocked. + */ +static int tty_watermarks(struct tty *tp) { size_t bs = 0; + int error; /* Provide an input buffer for 0.2 seconds of data. */ if (tp->t_termios.c_cflag & CREAD) bs = MIN(tp->t_termios.c_ispeed / 5, TTYBUF_MAX); - ttyinq_setsize(&tp->t_inq, tp, bs); + error = ttyinq_setsize(&tp->t_inq, tp, bs); + if (error != 0) + return (error); /* Set low watermark at 10% (when 90% is available). */ tp->t_inlow = (ttyinq_getallocatedsize(&tp->t_inq) * 9) / 10; /* Provide an output buffer for 0.2 seconds of data. */ bs = MIN(tp->t_termios.c_ospeed / 5, TTYBUF_MAX); - ttyoutq_setsize(&tp->t_outq, tp, bs); + error = ttyoutq_setsize(&tp->t_outq, tp, bs); + if (error != 0) + return (error); /* Set low watermark at 10% (when 90% is available). */ tp->t_outlow = (ttyoutq_getallocatedsize(&tp->t_outq) * 9) / 10; + + return (0); } static int @@ -318,7 +331,9 @@ ttydev_open(struct cdev *dev, int oflags goto done; ttydisc_open(tp); - tty_watermarks(tp); /* XXXGL: drops lock */ + error = tty_watermarks(tp); + if (error != 0) + goto done; } /* Wait for Carrier Detect. */ @@ -1627,7 +1642,9 @@ tty_generic_ioctl(struct tty *tp, u_long tp->t_termios.c_ospeed = t->c_ospeed; /* Baud rate has changed - update watermarks. */ - tty_watermarks(tp); + error = tty_watermarks(tp); + if (error) + return (error); } /* Copy new non-device driver parameters. */ Modified: head/sys/kern/tty_inq.c ============================================================================== --- head/sys/kern/tty_inq.c Fri Jan 13 15:17:25 2017 (r312076) +++ head/sys/kern/tty_inq.c Fri Jan 13 16:37:38 2017 (r312077) @@ -112,7 +112,7 @@ static uma_zone_t ttyinq_zone; TTYINQ_INSERT_TAIL(ti, tib); \ } while (0) -void +int ttyinq_setsize(struct ttyinq *ti, struct tty *tp, size_t size) { struct ttyinq_block *tib; @@ -134,8 +134,14 @@ ttyinq_setsize(struct ttyinq *ti, struct tib = uma_zalloc(ttyinq_zone, M_WAITOK); tty_lock(tp); + if (tty_gone(tp)) { + uma_zfree(ttyinq_zone, tib); + return (ENXIO); + } + TTYINQ_INSERT_TAIL(ti, tib); } + return (0); } void Modified: head/sys/kern/tty_outq.c ============================================================================== --- head/sys/kern/tty_outq.c Fri Jan 13 15:17:25 2017 (r312076) +++ head/sys/kern/tty_outq.c Fri Jan 13 16:37:38 2017 (r312077) @@ -89,7 +89,7 @@ ttyoutq_flush(struct ttyoutq *to) to->to_end = 0; } -void +int ttyoutq_setsize(struct ttyoutq *to, struct tty *tp, size_t size) { struct ttyoutq_block *tob; @@ -111,8 +111,14 @@ ttyoutq_setsize(struct ttyoutq *to, stru tob = uma_zalloc(ttyoutq_zone, M_WAITOK); tty_lock(tp); + if (tty_gone(tp)) { + uma_zfree(ttyoutq_zone, tob); + return (ENXIO); + } + TTYOUTQ_INSERT_TAIL(to, tob); } + return (0); } void Modified: head/sys/sys/ttyqueue.h ============================================================================== --- head/sys/sys/ttyqueue.h Fri Jan 13 15:17:25 2017 (r312076) +++ head/sys/sys/ttyqueue.h Fri Jan 13 16:37:38 2017 (r312077) @@ -69,7 +69,7 @@ struct ttyoutq { #ifdef _KERNEL /* Input queue handling routines. */ -void ttyinq_setsize(struct ttyinq *ti, struct tty *tp, size_t len); +int ttyinq_setsize(struct ttyinq *ti, struct tty *tp, size_t len); void ttyinq_free(struct ttyinq *ti); int ttyinq_read_uio(struct ttyinq *ti, struct tty *tp, struct uio *uio, size_t readlen, size_t flushlen); @@ -136,7 +136,7 @@ void ttyinq_line_iterate_from_reprintpos /* Output queue handling routines. */ void ttyoutq_flush(struct ttyoutq *to); -void ttyoutq_setsize(struct ttyoutq *to, struct tty *tp, size_t len); +int ttyoutq_setsize(struct ttyoutq *to, struct tty *tp, size_t len); void ttyoutq_free(struct ttyoutq *to); size_t ttyoutq_read(struct ttyoutq *to, void *buf, size_t len); int ttyoutq_read_uio(struct ttyoutq *to, struct tty *tp, struct uio *uio); From owner-svn-src-head@freebsd.org Fri Jan 13 16:46:02 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id DF390CAE854; Fri, 13 Jan 2017 16:46:02 +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 B14D114E6; Fri, 13 Jan 2017 16:46:02 +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 v0DGk1FU055808; Fri, 13 Jan 2017 16:46:01 GMT (envelope-from cem@FreeBSD.org) Received: (from cem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v0DGk1uD055807; Fri, 13 Jan 2017 16:46:01 GMT (envelope-from cem@FreeBSD.org) Message-Id: <201701131646.v0DGk1uD055807@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cem set sender to cem@FreeBSD.org using -f From: "Conrad E. Meyer" Date: Fri, 13 Jan 2017 16:46:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r312078 - head/usr.sbin/fstyp X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 13 Jan 2017 16:46:03 -0000 Author: cem Date: Fri Jan 13 16:46:01 2017 New Revision: 312078 URL: https://svnweb.freebsd.org/changeset/base/312078 Log: fstyp.8: Move initial exFAT blurb to the -u section Didn't notice the second list in r312003. Reported by: trasz@ Modified: head/usr.sbin/fstyp/fstyp.8 Modified: head/usr.sbin/fstyp/fstyp.8 ============================================================================== --- head/usr.sbin/fstyp/fstyp.8 Fri Jan 13 16:37:38 2017 (r312077) +++ head/usr.sbin/fstyp/fstyp.8 Fri Jan 13 16:46:01 2017 (r312078) @@ -27,7 +27,7 @@ .\" .\" $FreeBSD$ .\" -.Dd January 12, 2017 +.Dd January 13, 2017 .Dt FSTYP 8 .Os .Sh NAME @@ -43,7 +43,7 @@ The .Nm utility is used to determine the filesystem type on a given device. -It can recognize ISO-9660, exFAT, Ext2, FAT, NTFS, and UFS filesystems. +It can recognize ISO-9660, Ext2, FAT, NTFS, and UFS filesystems. When the .Fl u flag is specified, @@ -51,9 +51,10 @@ flag is specified, also recognizes certain additional metadata formats that cannot be handled using .Xr mount 8 , -such as ZFS pools and +such as exFAT filesystems, .Xr geli 8 -providers. +providers, and +ZFS pools. .Pp The filesystem name is printed to the standard output as, respectively: From owner-svn-src-head@freebsd.org Fri Jan 13 16:54:46 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 08002CAEB82; Fri, 13 Jan 2017 16:54:46 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C8C011CAB; Fri, 13 Jan 2017 16:54:45 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v0DGsilM059831; Fri, 13 Jan 2017 16:54:44 GMT (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v0DGsiYX059830; Fri, 13 Jan 2017 16:54:44 GMT (envelope-from glebius@FreeBSD.org) Message-Id: <201701131654.v0DGsiYX059830@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: glebius set sender to glebius@FreeBSD.org using -f From: Gleb Smirnoff Date: Fri, 13 Jan 2017 16:54:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r312079 - 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-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 13 Jan 2017 16:54:46 -0000 Author: glebius Date: Fri Jan 13 16:54:44 2017 New Revision: 312079 URL: https://svnweb.freebsd.org/changeset/base/312079 Log: Use getsock_cap() instead of deprecated fgetsock(). Reviewed by: tuexen Modified: head/sys/netinet/sctp_syscalls.c Modified: head/sys/netinet/sctp_syscalls.c ============================================================================== --- head/sys/netinet/sctp_syscalls.c Fri Jan 13 16:46:01 2017 (r312078) +++ head/sys/netinet/sctp_syscalls.c Fri Jan 13 16:54:44 2017 (r312079) @@ -121,17 +121,18 @@ sys_sctp_peeloff(td, uap) } */ *uap; { #if (defined(INET) || defined(INET6)) && defined(SCTP) - struct file *nfp = NULL; + struct file *headfp, *nfp = NULL; struct socket *head, *so; cap_rights_t rights; u_int fflag; int error, fd; AUDIT_ARG_FD(uap->sd); - error = fgetsock(td, uap->sd, cap_rights_init(&rights, CAP_PEELOFF), - &head, &fflag); + error = getsock_cap(td, uap->sd, cap_rights_init(&rights, CAP_PEELOFF), + &headfp, &fflag, NULL); if (error != 0) goto done2; + head = headfp->f_data; if (head->so_proto->pr_protocol != IPPROTO_SCTP) { error = EOPNOTSUPP; goto done; @@ -196,7 +197,7 @@ noconnection: done: if (nfp != NULL) fdrop(nfp, td); - fputsock(head); + fdrop(headfp, td); done2: return (error); #else /* SCTP */ From owner-svn-src-head@freebsd.org Fri Jan 13 17:03:24 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 571CACAE004; Fri, 13 Jan 2017 17:03:24 +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 25C7813BC; Fri, 13 Jan 2017 17:03:24 +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 v0DH3Nq6064547; Fri, 13 Jan 2017 17:03:23 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v0DH3N7j064546; Fri, 13 Jan 2017 17:03:23 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201701131703.v0DH3N7j064546@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Fri, 13 Jan 2017 17:03:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r312080 - head/sys/kern X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 13 Jan 2017 17:03:24 -0000 Author: ian Date: Fri Jan 13 17:03:23 2017 New Revision: 312080 URL: https://svnweb.freebsd.org/changeset/base/312080 Log: Correct the comments about how much buffer is allocated. Modified: head/sys/kern/tty.c Modified: head/sys/kern/tty.c ============================================================================== --- head/sys/kern/tty.c Fri Jan 13 16:54:44 2017 (r312079) +++ head/sys/kern/tty.c Fri Jan 13 17:03:23 2017 (r312080) @@ -117,7 +117,7 @@ tty_watermarks(struct tty *tp) size_t bs = 0; int error; - /* Provide an input buffer for 0.2 seconds of data. */ + /* Provide an input buffer for 2 seconds of data. */ if (tp->t_termios.c_cflag & CREAD) bs = MIN(tp->t_termios.c_ispeed / 5, TTYBUF_MAX); error = ttyinq_setsize(&tp->t_inq, tp, bs); @@ -127,7 +127,7 @@ tty_watermarks(struct tty *tp) /* Set low watermark at 10% (when 90% is available). */ tp->t_inlow = (ttyinq_getallocatedsize(&tp->t_inq) * 9) / 10; - /* Provide an output buffer for 0.2 seconds of data. */ + /* Provide an output buffer for 2 seconds of data. */ bs = MIN(tp->t_termios.c_ospeed / 5, TTYBUF_MAX); error = ttyoutq_setsize(&tp->t_outq, tp, bs); if (error != 0) From owner-svn-src-head@freebsd.org Fri Jan 13 18:36:48 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1A3F3CAEE5E; Fri, 13 Jan 2017 18:36:48 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D06AB102B; Fri, 13 Jan 2017 18:36:47 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v0DIak9L001974; Fri, 13 Jan 2017 18:36:46 GMT (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v0DIaklV001972; Fri, 13 Jan 2017 18:36:46 GMT (envelope-from glebius@FreeBSD.org) Message-Id: <201701131836.v0DIaklV001972@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: glebius set sender to glebius@FreeBSD.org using -f From: Gleb Smirnoff Date: Fri, 13 Jan 2017 18:36:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r312081 - head/sys/dev/iscsi_initiator X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 13 Jan 2017 18:36:48 -0000 Author: glebius Date: Fri Jan 13 18:36:46 2017 New Revision: 312081 URL: https://svnweb.freebsd.org/changeset/base/312081 Log: Use getsock_cap() instead of deprecated fgetsock(). Reviewed by: Daniel Braniss Modified: head/sys/dev/iscsi_initiator/isc_soc.c head/sys/dev/iscsi_initiator/iscsi.c Modified: head/sys/dev/iscsi_initiator/isc_soc.c ============================================================================== --- head/sys/dev/iscsi_initiator/isc_soc.c Fri Jan 13 17:03:23 2017 (r312080) +++ head/sys/dev/iscsi_initiator/isc_soc.c Fri Jan 13 18:36:46 2017 (r312081) @@ -680,7 +680,6 @@ isc_stop_receiver(isc_session_t *sp) if(sp->fp != NULL) fdrop(sp->fp, sp->td); - fputsock(sp->soc); sp->soc = NULL; sp->fp = NULL; Modified: head/sys/dev/iscsi_initiator/iscsi.c ============================================================================== --- head/sys/dev/iscsi_initiator/iscsi.c Fri Jan 13 17:03:23 2017 (r312080) +++ head/sys/dev/iscsi_initiator/iscsi.c Fri Jan 13 18:36:46 2017 (r312081) @@ -388,20 +388,14 @@ i_setsoc(isc_session_t *sp, int fd, stru if(sp->soc != NULL) isc_stop_receiver(sp); - error = fget(td, fd, cap_rights_init(&rights, CAP_SOCK_CLIENT), &sp->fp); + error = getsock_cap(td, fd, cap_rights_init(&rights, CAP_SOCK_CLIENT), + &sp->fp, NULL, NULL); if(error) return error; - error = fgetsock(td, fd, cap_rights_init(&rights, CAP_SOCK_CLIENT), - &sp->soc, 0); - if(error == 0) { - sp->td = td; - isc_start_receiver(sp); - } - else { - fdrop(sp->fp, td); - sp->fp = NULL; - } + sp->soc = sp->fp->f_data; + sp->td = td; + isc_start_receiver(sp); return error; } From owner-svn-src-head@freebsd.org Fri Jan 13 19:41:03 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6D488CAE66E; Fri, 13 Jan 2017 19:41:03 +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 306CF1712; Fri, 13 Jan 2017 19:41:03 +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 v0DJf2T2028363; Fri, 13 Jan 2017 19:41:02 GMT (envelope-from wblock@FreeBSD.org) Received: (from wblock@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v0DJf20j028362; Fri, 13 Jan 2017 19:41:02 GMT (envelope-from wblock@FreeBSD.org) Message-Id: <201701131941.v0DJf20j028362@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: wblock set sender to wblock@FreeBSD.org using -f From: Warren Block Date: Fri, 13 Jan 2017 19:41:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r312083 - head/lib/libc/sys X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 13 Jan 2017 19:41:03 -0000 Author: wblock (doc committer) Date: Fri Jan 13 19:41:02 2017 New Revision: 312083 URL: https://svnweb.freebsd.org/changeset/base/312083 Log: Update the shm_open.2 man page to reflect objective reality. PR: 215612 Submitted by: rwatson MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D9066 Modified: head/lib/libc/sys/shm_open.2 Modified: head/lib/libc/sys/shm_open.2 ============================================================================== --- head/lib/libc/sys/shm_open.2 Fri Jan 13 19:22:22 2017 (r312082) +++ head/lib/libc/sys/shm_open.2 Fri Jan 13 19:41:02 2017 (r312083) @@ -28,7 +28,7 @@ .\" .\" $FreeBSD$ .\" -.Dd December 18, 2013 +.Dd January 13, 2017 .Dt SHM_OPEN 2 .Os .Sh NAME @@ -171,7 +171,8 @@ and .Dv O_TRUNC flags may be used in portable programs. .Pp -The result of using +.Tn POSIX +specifications state that the result of using .Xr open 2 , .Xr read 2 , or @@ -179,19 +180,43 @@ or on a shared memory object, or on the descriptor returned by .Fn shm_open , is undefined. -It is also undefined whether the shared memory object itself, or its -contents, persist across reboots. -.Pp -In FreeBSD, +However, the +.Fx +kernel implementation explicitly includes support for .Xr read 2 and -.Xr write 2 -on a shared memory object will fail with -.Er EOPNOTSUPP -and neither shared memory objects nor their contents persist across reboots. +.Xr write 2 . +.Pp +Neither shared memory objects nor their contents persist across reboots. +.Pp +Writes do not extend shared memory objects, so +.Xr ftruncate 2 +must be called before any data can be written. +See +.Sx EXAMPLES . +.Sh EXAMPLES +This example fails without the call to +.Xr ftruncate 2 : +.Bd -literal -compact + + uint8_t buffer[getpagesize()]; + ssize_t len; + int fd; + + fd = shm_open(SHM_ANON, O_RDWR | O_CREAT, 0600); + if (fd < 0) + err(EX_OSERR, "%s: shm_open", __func__); + if (ftruncate(fd, getpagesize()) < 0) + err(EX_IOERR, "%s: ftruncate", __func__); + len = pwrite(fd, buffer, getpagesize(), 0); + if (len < 0) + err(EX_IOERR, "%s: pwrite", __func__); + if (len != getpagesize()) + errx(EX_IOERR, "%s: pwrite length mismatch", __func__); +.Ed .Sh ERRORS -The following errors are defined for -.Fn shm_open : +.Fn shm_open +fails with these error codes for these conditions: .Bl -tag -width Er .It Bq Er EINVAL A flag other than @@ -235,8 +260,8 @@ are specified and the named shared memor The required permissions (for reading or reading and writing) are denied. .El .Pp -The following errors are defined for -.Fn shm_unlink : +.Fn shm_unlink +fails with these error codes for these conditions: .Bl -tag -width Er .It Bq Er EFAULT The From owner-svn-src-head@freebsd.org Fri Jan 13 21:52:54 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 94807CAE225; Fri, 13 Jan 2017 21:52:54 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5B8981B22; Fri, 13 Jan 2017 21:52:54 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v0DLqrC3087963; Fri, 13 Jan 2017 21:52:53 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v0DLqrMg087961; Fri, 13 Jan 2017 21:52:53 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201701132152.v0DLqrMg087961@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Fri, 13 Jan 2017 21:52:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r312086 - in head/sys: mips/mips sparc64/sparc64 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 13 Jan 2017 21:52:54 -0000 Author: jhb Date: Fri Jan 13 21:52:53 2017 New Revision: 312086 URL: https://svnweb.freebsd.org/changeset/base/312086 Log: Trim a few comments on platforms that did not implement mmap of /dev/kmem. After r307332, no platforms implement mmap for /dev/kmem, so the lack of it for these platforms is no longer unique. Modified: head/sys/mips/mips/mem.c head/sys/sparc64/sparc64/mem.c Modified: head/sys/mips/mips/mem.c ============================================================================== --- head/sys/mips/mips/mem.c Fri Jan 13 21:42:36 2017 (r312085) +++ head/sys/mips/mips/mem.c Fri Jan 13 21:52:53 2017 (r312086) @@ -151,12 +151,6 @@ int memmmap(struct cdev *dev, vm_ooffset_t offset, vm_paddr_t *paddr, int prot, vm_memattr_t *memattr) { - /* - * /dev/mem is the only one that makes sense through this - * interface. For /dev/kmem any physaddr we return here - * could be transient and hence incorrect or invalid at - * a later time. - */ if (dev2unit(dev) != CDEV_MINOR_MEM) return (-1); Modified: head/sys/sparc64/sparc64/mem.c ============================================================================== --- head/sys/sparc64/sparc64/mem.c Fri Jan 13 21:42:36 2017 (r312085) +++ head/sys/sparc64/sparc64/mem.c Fri Jan 13 21:52:53 2017 (r312086) @@ -43,7 +43,7 @@ __FBSDID("$FreeBSD$"); /* * Memory special file * - * NOTE: other architectures support mmap()'ing the mem and kmem devices; this + * NOTE: other architectures support mmap()'ing the mem device; this * might cause illegal aliases to be created for the locked kernel page(s), so * it is not implemented. */ From owner-svn-src-head@freebsd.org Fri Jan 13 22:16:42 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E8515CAE79A; Fri, 13 Jan 2017 22:16:42 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C2BEF1606; Fri, 13 Jan 2017 22:16:42 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v0DMGfnw096201; Fri, 13 Jan 2017 22:16:41 GMT (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v0DMGfpV096197; Fri, 13 Jan 2017 22:16:41 GMT (envelope-from glebius@FreeBSD.org) Message-Id: <201701132216.v0DMGfpV096197@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: glebius set sender to glebius@FreeBSD.org using -f From: Gleb Smirnoff Date: Fri, 13 Jan 2017 22:16:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r312087 - in head/sys: kern sys X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 13 Jan 2017 22:16:43 -0000 Author: glebius Date: Fri Jan 13 22:16:41 2017 New Revision: 312087 URL: https://svnweb.freebsd.org/changeset/base/312087 Log: Remove deprecated fgetsock() and fputsock(). Modified: head/sys/kern/kern_descrip.c head/sys/sys/file.h head/sys/sys/param.h Modified: head/sys/kern/kern_descrip.c ============================================================================== --- head/sys/kern/kern_descrip.c Fri Jan 13 21:52:53 2017 (r312086) +++ head/sys/kern/kern_descrip.c Fri Jan 13 22:16:41 2017 (r312087) @@ -67,7 +67,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include #include #include @@ -2840,61 +2839,6 @@ fgetvp_write(struct thread *td, int fd, #endif /* - * Like fget() but loads the underlying socket, or returns an error if the - * descriptor does not represent a socket. - * - * We bump the ref count on the returned socket. XXX Also obtain the SX lock - * in the future. - * - * Note: fgetsock() and fputsock() are deprecated, as consumers should rely - * on their file descriptor reference to prevent the socket from being free'd - * during use. - */ -int -fgetsock(struct thread *td, int fd, cap_rights_t *rightsp, struct socket **spp, - u_int *fflagp) -{ - struct file *fp; - int error; - - *spp = NULL; - if (fflagp != NULL) - *fflagp = 0; - if ((error = _fget(td, fd, &fp, 0, rightsp, NULL)) != 0) - return (error); - if (fp->f_type != DTYPE_SOCKET) { - error = ENOTSOCK; - } else { - *spp = fp->f_data; - if (fflagp) - *fflagp = fp->f_flag; - SOCK_LOCK(*spp); - soref(*spp); - SOCK_UNLOCK(*spp); - } - fdrop(fp, td); - - return (error); -} - -/* - * Drop the reference count on the socket and XXX release the SX lock in the - * future. The last reference closes the socket. - * - * Note: fputsock() is deprecated, see comment for fgetsock(). - */ -void -fputsock(struct socket *so) -{ - - ACCEPT_LOCK(); - SOCK_LOCK(so); - CURVNET_SET(so->so_vnet); - sorele(so); - CURVNET_RESTORE(); -} - -/* * Handle the last reference to a file being closed. */ int Modified: head/sys/sys/file.h ============================================================================== --- head/sys/sys/file.h Fri Jan 13 21:52:53 2017 (r312086) +++ head/sys/sys/file.h Fri Jan 13 22:16:41 2017 (r312087) @@ -50,8 +50,6 @@ struct thread; struct uio; struct knote; struct vnode; -struct socket; - #endif /* _KERNEL */ @@ -267,10 +265,6 @@ int fgetvp_read(struct thread *td, int f int fgetvp_write(struct thread *td, int fd, cap_rights_t *rightsp, struct vnode **vpp); -int fgetsock(struct thread *td, int fd, cap_rights_t *rightsp, - struct socket **spp, u_int *fflagp); -void fputsock(struct socket *sp); - static __inline int _fnoop(void) { Modified: head/sys/sys/param.h ============================================================================== --- head/sys/sys/param.h Fri Jan 13 21:52:53 2017 (r312086) +++ head/sys/sys/param.h Fri Jan 13 22:16:41 2017 (r312087) @@ -58,7 +58,7 @@ * in the range 5 to 9. */ #undef __FreeBSD_version -#define __FreeBSD_version 1200019 /* Master, propagated to newvers */ +#define __FreeBSD_version 1200020 /* Master, propagated to newvers */ /* * __FreeBSD_kernel__ indicates that this system uses the kernel of FreeBSD, From owner-svn-src-head@freebsd.org Sat Jan 14 00:37:00 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6A0E8CAD7EE; Sat, 14 Jan 2017 00:37:00 +0000 (UTC) (envelope-from cse.cem@gmail.com) Received: from mail-wm0-f48.google.com (mail-wm0-f48.google.com [74.125.82.48]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 08F5C1B02; Sat, 14 Jan 2017 00:36:59 +0000 (UTC) (envelope-from cse.cem@gmail.com) Received: by mail-wm0-f48.google.com with SMTP id n129so15746221wmn.0; Fri, 13 Jan 2017 16:36:59 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:reply-to:in-reply-to:references :from:date:message-id:subject:to:cc; bh=rIJcztu5sNA0lB898Q1sD+P9a0YpUOOLCP6QpYOHSUY=; b=mG+2BsPkxaXRK0/r6DCq3TrmeCTwzaokZEFFmlKsxEDeNXYjcGAFYN9wW9YcsTRsHg RNzaEJDK6ddabaAF+j3dnyRTOHTgxxRCqcJpgcFvnfZ0X2TwCdMeglkW8oUszKglqCV4 y2YbGFYiIPMdaMCalp9OBwpejaJxxumI1umEeQh4dLqrpSR4wrChm87F+7JyAOxcxVo5 ufFcaruTIWVx+G8mMC22eCssPr86hqlp2jViAkoPAN11HpjhCTW3xT3VXU0igSlCQlHT XJVUecOG5iGCK6XMJwKxGwvZiw3UQK9/CtGOnOKUXfOUQQQ10NBgQlZa5iPiIbZPylJo t90A== X-Gm-Message-State: AIkVDXKa4NRv4AYTG3EC4875RG8zFML5M9Rpz/OE/GUKMpvb2y6AxxsxeeMMEAKvo2gB3Q== X-Received: by 10.28.147.147 with SMTP id v141mr4471032wmd.110.1484352559816; Fri, 13 Jan 2017 16:09:19 -0800 (PST) Received: from mail-wm0-f41.google.com (mail-wm0-f41.google.com. [74.125.82.41]) by smtp.gmail.com with ESMTPSA id s20sm7968534wmb.9.2017.01.13.16.09.19 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 13 Jan 2017 16:09:19 -0800 (PST) Received: by mail-wm0-f41.google.com with SMTP id c206so93684413wme.0; Fri, 13 Jan 2017 16:09:19 -0800 (PST) X-Received: by 10.223.154.132 with SMTP id a4mr15826415wrc.188.1484352559430; Fri, 13 Jan 2017 16:09:19 -0800 (PST) MIME-Version: 1.0 Reply-To: cem@freebsd.org Received: by 10.194.29.72 with HTTP; Fri, 13 Jan 2017 16:09:18 -0800 (PST) In-Reply-To: <201701010401.v0141RpZ072608@repo.freebsd.org> References: <201701010401.v0141RpZ072608@repo.freebsd.org> From: Conrad Meyer Date: Fri, 13 Jan 2017 16:09:18 -0800 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: svn commit: r310994 - head/tests/sys/vfs To: Ngie Cooper Cc: src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Type: text/plain; charset=UTF-8 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 14 Jan 2017 00:37:00 -0000 Um, this is garbage and ruins the entire point of using a standardized framework like ATF. Please revert it. Instead, just have the Kyua framework preopen its output files before running tests. The diff will be an order of magnitude smaller than this one is and it will fix the problem generally instead of adding fork/wait cruft and undetailed assert()s to every test. Conrad On Sat, Dec 31, 2016 at 8:01 PM, Ngie Cooper wrote: > Author: ngie > Date: Sun Jan 1 04:01:27 2017 > New Revision: 310994 > URL: https://svnweb.freebsd.org/changeset/base/310994 > > Log: > Make sys/vfs/lookup_cap_dotdot actually work with "kyua test" > > The tests don't work when reading/writing to file descriptors in the > sandbox after entering capability mode (and wouldn't have, regardless > of the framework), so adjust the tests so they function within the > framework. > > For tests that enter capability mode over the course of the test, the > following is now done: > > 1. Fork child process for capability mode test. > 2. In child... > i. Enter capability mode. > ii. Test invariants. > iii. Exit after calling test function. > 3. Collect status for child and determine whether or not it completed > successfully. > > In order to test the invariants in the child process, they now use assert(3) > instead of ATF_REQUIRE*, as the atf-c-api functions right to results files > in the directories in order to determine where and how tests fail. > > While in the area, fix several -Wshadow and -Wunused warnings found when I > bumped WARNS up to 6, and fix some minor style(9) issues with indentation > and type alignment. > > PR: 215690 > > Modified: > head/tests/sys/vfs/lookup_cap_dotdot.c > > Modified: head/tests/sys/vfs/lookup_cap_dotdot.c > ============================================================================== > --- head/tests/sys/vfs/lookup_cap_dotdot.c Sun Jan 1 00:43:20 2017 (r310993) > +++ head/tests/sys/vfs/lookup_cap_dotdot.c Sun Jan 1 04:01:27 2017 (r310994) > @@ -31,23 +31,27 @@ __FBSDID("$FreeBSD$"); > #include > #include > #include > +#include > > #include > +#include > #include > #include > #include > > #include "freebsd_test_suite/macros.h" > > -static int dirfd = -1; > -static char *abspath; > +static char *abspath; > +static int dirfd = -1; > + > +typedef void (*child_test_fn_t)(void); > > static void > -touchat(int dirfd, const char *name) > +touchat(int _dirfd, const char *name) > { > int fd; > > - ATF_REQUIRE((fd = openat(dirfd, name, O_CREAT | O_TRUNC | O_WRONLY, > + ATF_REQUIRE((fd = openat(_dirfd, name, O_CREAT | O_TRUNC | O_WRONLY, > 0777)) >= 0); > ATF_REQUIRE(close(fd) == 0); > } > @@ -78,10 +82,43 @@ prepare_dotdot_tests(void) > static void > check_capsicum(void) > { > + > ATF_REQUIRE_FEATURE("security_capabilities"); > ATF_REQUIRE_FEATURE("security_capability_mode"); > } > > +static void > +run_capsicum_test(child_test_fn_t test_func) > +{ > + int child_exit_code, child_status; > + pid_t child_pid; > + > + check_capsicum(); > + prepare_dotdot_tests(); > + > + ATF_REQUIRE_MSG((child_pid = fork()) != -1, > + "fork failed: %s", strerror(errno)); > + > + if (child_pid == 0) { > + test_func(); > + _exit(0); > + } > + > + ATF_REQUIRE_MSG(waitpid(child_pid, &child_status, 0) != -1, > + "waitpid failed: %s", strerror(errno)); > + if (WIFEXITED(child_status)) { > + child_exit_code = WEXITSTATUS(child_status); > + ATF_REQUIRE_MSG(child_exit_code == 0, > + "child exited with non-zero exit code: %d", > + child_exit_code); > + } else if (WIFSIGNALED(child_status)) > + atf_tc_fail("child exited with signal: %d", > + WTERMSIG(child_status)); > + else > + atf_tc_fail("child exited with unexpected status: %d", > + child_status); > +} > + > /* > * Positive tests > */ > @@ -93,6 +130,7 @@ ATF_TC_HEAD(openat__basic_positive, tc) > > ATF_TC_BODY(openat__basic_positive, tc) > { > + > prepare_dotdot_tests(); > > ATF_REQUIRE(openat(dirfd, "d1/d2/d3/f3", O_RDONLY) >= 0); > @@ -114,21 +152,22 @@ ATF_TC_HEAD(lookup_cap_dotdot__basic, tc > "Validate cap-mode (testdir)/d1/.. lookup"); > } > > -ATF_TC_BODY(lookup_cap_dotdot__basic, tc) > +static void > +lookup_cap_dotdot__basic_child(void) > { > cap_rights_t rights; > - int fd; > - > - check_capsicum(); > - prepare_dotdot_tests(); > > cap_rights_init(&rights, CAP_LOOKUP, CAP_READ); > - ATF_REQUIRE(cap_rights_limit(dirfd, &rights) >= 0); > > - ATF_REQUIRE(cap_enter() >= 0); > + assert(cap_rights_limit(dirfd, &rights) >= 0); > + assert(cap_enter() >= 0); > + assert(openat(dirfd, "d1/..", O_RDONLY) >= 0); > +} > + > +ATF_TC_BODY(lookup_cap_dotdot__basic, tc) > +{ > > - ATF_REQUIRE_MSG(openat(dirfd, "d1/..", O_RDONLY) >= 0, "%s", > - strerror(errno)); > + run_capsicum_test(lookup_cap_dotdot__basic_child); > } > > ATF_TC(lookup_cap_dotdot__advanced); > @@ -138,23 +177,26 @@ ATF_TC_HEAD(lookup_cap_dotdot__advanced, > "Validate cap-mode (testdir)/d1/.. lookup"); > } > > -ATF_TC_BODY(lookup_cap_dotdot__advanced, tc) > +static void > +lookup_cap_dotdot__advanced_child(void) > { > cap_rights_t rights; > - int fd; > - > - check_capsicum(); > - prepare_dotdot_tests(); > > cap_rights_init(&rights, CAP_LOOKUP, CAP_READ); > - ATF_REQUIRE(cap_rights_limit(dirfd, &rights) >= 0); > + assert(cap_rights_limit(dirfd, &rights) >= 0); > > - ATF_REQUIRE(cap_enter() >= 0); > + assert(cap_enter() >= 0); > > - ATF_REQUIRE(openat(dirfd, "d1/d2/d3/../../f1", O_RDONLY) >= 0); > - ATF_REQUIRE(openat(dirfd, "l3/../../f1", O_RDONLY) >= 0); > - ATF_REQUIRE(openat(dirfd, "l3/ld1", O_RDONLY) >= 0); > - ATF_REQUIRE(openat(dirfd, "l3/lf1", O_RDONLY) >= 0); > + assert(openat(dirfd, "d1/d2/d3/../../f1", O_RDONLY) >= 0); > + assert(openat(dirfd, "l3/../../f1", O_RDONLY) >= 0); > + assert(openat(dirfd, "l3/ld1", O_RDONLY) >= 0); > + assert(openat(dirfd, "l3/lf1", O_RDONLY) >= 0); > +} > + > +ATF_TC_BODY(lookup_cap_dotdot__advanced, tc) > +{ > + > + run_capsicum_test(lookup_cap_dotdot__advanced_child); > } > > /* > @@ -168,6 +210,7 @@ ATF_TC_HEAD(openat__basic_negative, tc) > > ATF_TC_BODY(openat__basic_negative, tc) > { > + > prepare_dotdot_tests(); > > ATF_REQUIRE_ERRNO(ENOENT, > @@ -182,32 +225,43 @@ ATF_TC_HEAD(capmode__negative, tc) > atf_tc_set_md_var(tc, "descr", "Negative Capability mode testcases"); > } > > -ATF_TC_BODY(capmode__negative, tc) > +static void > +capmode__negative_child(void) > { > int subdirfd; > > - check_capsicum(); > - prepare_dotdot_tests(); > - > - ATF_REQUIRE(cap_enter() == 0); > + assert(cap_enter() == 0); > > /* open() not permitted in capability mode */ > - ATF_REQUIRE_ERRNO(ECAPMODE, open("testdir", O_RDONLY) < 0); > + assert(open("testdir", O_RDONLY) < 0); > + assert(errno == ECAPMODE); > > /* AT_FDCWD not permitted in capability mode */ > - ATF_REQUIRE_ERRNO(ECAPMODE, openat(AT_FDCWD, "d1/f1", O_RDONLY) < 0); > + assert(openat(AT_FDCWD, "d1/f1", O_RDONLY) < 0); > + assert(errno == ECAPMODE); > > /* Relative path above dirfd not capable */ > - ATF_REQUIRE_ERRNO(ENOTCAPABLE, openat(dirfd, "..", O_RDONLY) < 0); > - ATF_REQUIRE((subdirfd = openat(dirfd, "l3", O_RDONLY)) >= 0); > - ATF_REQUIRE_ERRNO(ENOTCAPABLE, > - openat(subdirfd, "../../f1", O_RDONLY) < 0); > + assert(openat(dirfd, "..", O_RDONLY) < 0); > + assert(errno == ENOTCAPABLE); > + > + assert((subdirfd = openat(dirfd, "l3", O_RDONLY)) >= 0); > + assert(openat(subdirfd, "../../f1", O_RDONLY) < 0); > + assert(errno == ENOTCAPABLE); > + (void)close(subdirfd); > > /* Absolute paths not capable */ > - ATF_REQUIRE_ERRNO(ENOTCAPABLE, openat(dirfd, abspath, O_RDONLY) < 0); > + assert(openat(dirfd, abspath, O_RDONLY) < 0); > + assert(errno == ENOTCAPABLE); > > /* Symlink above dirfd */ > - ATF_REQUIRE_ERRNO(ENOTCAPABLE, openat(dirfd, "lup/f1", O_RDONLY) < 0); > + assert(openat(dirfd, "lup/f1", O_RDONLY) < 0); > + assert(errno == ENOTCAPABLE); > +} > + > +ATF_TC_BODY(capmode__negative, tc) > +{ > + > + run_capsicum_test(capmode__negative_child); > } > > ATF_TC(lookup_cap_dotdot__negative); > @@ -217,22 +271,30 @@ ATF_TC_HEAD(lookup_cap_dotdot__negative, > "Validate cap-mode (testdir)/.. lookup fails"); > } > > -ATF_TC_BODY(lookup_cap_dotdot__negative, tc) > +static void > +lookup_cap_dotdot__negative_child(void) > { > cap_rights_t rights; > - int fd; > - > - check_capsicum(); > - prepare_dotdot_tests(); > > cap_rights_init(&rights, CAP_LOOKUP, CAP_READ); > - ATF_REQUIRE(cap_rights_limit(dirfd, &rights) >= 0); > + assert(cap_rights_limit(dirfd, &rights) >= 0); > > - ATF_REQUIRE(cap_enter() >= 0); > + assert(cap_enter() >= 0); > + > + assert(openat(dirfd, "..", O_RDONLY) < 0); > + assert(errno == ENOTCAPABLE); > + > + assert(openat(dirfd, "d1/../..", O_RDONLY) < 0); > + assert(errno == ENOTCAPABLE); > + > + assert(openat(dirfd, "../testdir/d1/f1", O_RDONLY) < 0); > + assert(errno == ENOTCAPABLE); > +} > + > +ATF_TC_BODY(lookup_cap_dotdot__negative, tc) > +{ > > - ATF_REQUIRE_ERRNO(ENOTCAPABLE, openat(dirfd, "..", O_RDONLY) < 0); > - ATF_REQUIRE_ERRNO(ENOTCAPABLE, openat(dirfd, "d1/../..", O_RDONLY) < 0); > - ATF_REQUIRE_ERRNO(ENOTCAPABLE, openat(dirfd, "../testdir/d1/f1", O_RDONLY) < 0); > + run_capsicum_test(lookup_cap_dotdot__negative_child); > } > > ATF_TP_ADD_TCS(tp) > From owner-svn-src-head@freebsd.org Sat Jan 14 00:38:40 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 377F0CAD959; Sat, 14 Jan 2017 00:38:40 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: from mail-io0-x244.google.com (mail-io0-x244.google.com [IPv6:2607:f8b0:4001:c06::244]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id EFBDD1F29; Sat, 14 Jan 2017 00:38:39 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: by mail-io0-x244.google.com with SMTP id 101so7204632iom.0; Fri, 13 Jan 2017 16:38:39 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:mime-version:from:in-reply-to:date:cc:message-id:references :to; bh=d/5pIV9j4E0kBYOhUrStrAwvLY8T5Zeqm9NWFHPE2sI=; b=XMDECWIO9Rgw2xN0CuJV1EGrQH7x1rMC+CQxY6w6bZpdGvhxqF2MeIFjGVwDiv+CgZ ePS8PlpBEHr9ZEsJE+WViYNlqtoTzUmLHgHICiC15TLR/EBYxQipzDfcDneCJU/N+bvf R8Q3of2hSrjB4JmSjA++2u5GB0tZE1koF8fXBWRNX2go14LY3WTHGJQJ30AtGJlIasFF m+g3Y5r2+Hbbtgyd9sQr+Re5kzp/znJqwACiyBMMD7V4JVJjHC066nLmP+KfT6EiowtT Lwisrdtq1dAR0BGVQiY3OQ6B5TcsTHyOt2WnRAdeKJxQr9yUgG41sT7bXKK47f/vbAXt B9qQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:mime-version:from:in-reply-to:date:cc :message-id:references:to; bh=d/5pIV9j4E0kBYOhUrStrAwvLY8T5Zeqm9NWFHPE2sI=; b=H+G0qIt4gcgkyaA7AhXBcJ0bWIiekAjr2uqFHbBueFE6ZG4c7aKgOvWXFDsKxAQMe+ kwT2OqG7JhInQbbNu0dEVJjJ33xMCsJS64Om7nrEQCyHN/H2wybvgi0+svXjyXa9kfco qaDuGLBS0V9bNR0FSxT6BpplC/strM268n6+OD6R3beghH+6BL9665Cq5Q98TQzjY7C4 6hgqp5Tkx5nfAwONcboiy6IBOGY2erfbyVu+0qLtlb6d0WFMNaaEXvISFVamJVCm/IQv NKpvbjy9Bgz3kEp7yXKd2VTgJGd74mK+uHAEF/rnJ6gPxqE6NHMhaod5jyJB0xyGenIO Z/tQ== X-Gm-Message-State: AIkVDXKg5ThsU8E6pDlaHZg0E8W1aacZzihttb8zJyYIzQjIOst2i3mDM33bDe1WNbzcJA== X-Received: by 10.107.41.20 with SMTP id p20mr22282321iop.124.1484354319218; Fri, 13 Jan 2017 16:38:39 -0800 (PST) Received: from pinklady.local (c-73-19-52-228.hsd1.wa.comcast.net. [73.19.52.228]) by smtp.gmail.com with ESMTPSA id n134sm1727793itg.19.2017.01.13.16.38.38 (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 13 Jan 2017 16:38:38 -0800 (PST) Subject: Re: svn commit: r310994 - head/tests/sys/vfs Mime-Version: 1.0 (Mac OS X Mail 9.3 \(3124\)) Content-Type: multipart/signed; boundary="Apple-Mail=_065C1C5B-5885-40D2-ABF2-54EDF51C8BA0"; protocol="application/pgp-signature"; micalg=pgp-sha512 X-Pgp-Agent: GPGMail From: "Ngie Cooper (yaneurabeya)" In-Reply-To: Date: Fri, 13 Jan 2017 16:38:36 -0800 Cc: Ngie Cooper , src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Message-Id: <0C3A305C-F089-4014-8548-60B33887423F@gmail.com> References: <201701010401.v0141RpZ072608@repo.freebsd.org> To: cem@freebsd.org X-Mailer: Apple Mail (2.3124) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 14 Jan 2017 00:38:40 -0000 --Apple-Mail=_065C1C5B-5885-40D2-ABF2-54EDF51C8BA0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii > On Jan 13, 2017, at 16:09, Conrad Meyer wrote: >=20 > Um, this is garbage and ruins the entire point of using a standardized > framework like ATF. Please revert it. >=20 > Instead, just have the Kyua framework preopen its output files before > running tests. The diff will be an order of magnitude smaller than > this one is and it will fix the problem generally instead of adding > fork/wait cruft and undetailed assert()s to every test. If you know how to fix it to work with kyua and make it work more = optimally, please be my guest. Thanks, -Ngie --Apple-Mail=_065C1C5B-5885-40D2-ABF2-54EDF51C8BA0 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 iQIcBAEBCgAGBQJYeXMNAAoJEPWDqSZpMIYVn2MP/RCgoxo1dGYnT3OiIumIKIh2 RcfliuE5ekCEUF5TSYMdvoT8iCJWxInyq4GFB8a6/XieTc0empo4eu+t1JntDXis 7r6zAZQNglTZs2JeOgYS3IxRulNK+m55B3QEiNE/nfZ1WJVh3t6kZbnmJhtSMZkT tICfa0hYcMXWxqNUJIOdn80Wzw1DERfeM410XnDcLrplDQA7JzQ25j1jOPOwIlvG WHvLz2h6RGKfoR1fZusKdNkauSdTTqz/i70ocsUeTp+YEZBTzajdwqSv6JFXQMro bYI1Exj6FJAicMh+DzNtM7TEpqffKz5SNVCFsxw6JDlCHWMXHjDQdc5Qo5nar9hi 4oInLDYIc6wqTt841jeZI3cgZwBAEKOwgaBTeV+OoD1T6dd5QpMh2GDXch1pa5Id HDSYicZZ7OqNW97UQRy1rB9TcAfLGqn6cpRWPhp7a9w4v+3TjfTk+g238M9qzoHC arnqnwpjZ5wArh/Hn94ZgZwxDDWmamrz6CkooN6EHC4GfzIg6fC9+a1OVIzfp+G8 Cg9PnyYM/bLxXWXlBFq9ajwnVAmdPVSowAqXkEbIxf+L8uCFeaF7YNJHkXLEYvsA Z0ZHPrDNPM7O7cflGkHJ9Cug4zbus0rDV/LIFPhMlwP52m2jfqKEVcuOAsrj8cFf WozmnzOfcMd7qjZvNBEA =JOE9 -----END PGP SIGNATURE----- --Apple-Mail=_065C1C5B-5885-40D2-ABF2-54EDF51C8BA0-- From owner-svn-src-head@freebsd.org Sat Jan 14 01:01:03 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B9874CADF1E; Sat, 14 Jan 2017 01:01:03 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 899481A81; Sat, 14 Jan 2017 01:01:03 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v0E11205067892; Sat, 14 Jan 2017 01:01:02 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v0E112Hs067891; Sat, 14 Jan 2017 01:01:02 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201701140101.v0E112Hs067891@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Sat, 14 Jan 2017 01:01:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r312102 - head/contrib/netbsd-tests/lib/libc/gen X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 14 Jan 2017 01:01:03 -0000 Author: ngie Date: Sat Jan 14 01:01:02 2017 New Revision: 312102 URL: https://svnweb.freebsd.org/changeset/base/312102 Log: Note that sys/types.h is required on FreeBSD for kqueue(2), unlike NetBSD MFC after: 12 days X-MFC with: r305358 Sponsored by: Dell EMC Isilon Modified: head/contrib/netbsd-tests/lib/libc/gen/t_sleep.c Modified: head/contrib/netbsd-tests/lib/libc/gen/t_sleep.c ============================================================================== --- head/contrib/netbsd-tests/lib/libc/gen/t_sleep.c Sat Jan 14 00:39:58 2017 (r312101) +++ head/contrib/netbsd-tests/lib/libc/gen/t_sleep.c Sat Jan 14 01:01:02 2017 (r312102) @@ -27,6 +27,7 @@ */ #ifdef __FreeBSD__ +/* kqueue(2) on FreeBSD requires sys/types.h for uintptr_t; NetBSD doesn't. */ #include #endif #include From owner-svn-src-head@freebsd.org Sat Jan 14 01:03:21 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 875BCCAE15D; Sat, 14 Jan 2017 01:03:21 +0000 (UTC) (envelope-from cem@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 48BA31E32; Sat, 14 Jan 2017 01:03:21 +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 v0E13Kd0068875; Sat, 14 Jan 2017 01:03:20 GMT (envelope-from cem@FreeBSD.org) Received: (from cem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v0E13K8b068874; Sat, 14 Jan 2017 01:03:20 GMT (envelope-from cem@FreeBSD.org) Message-Id: <201701140103.v0E13K8b068874@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cem set sender to cem@FreeBSD.org using -f From: "Conrad E. Meyer" Date: Sat, 14 Jan 2017 01:03:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r312103 - head/tests/sys/vfs X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 14 Jan 2017 01:03:21 -0000 Author: cem Date: Sat Jan 14 01:03:20 2017 New Revision: 312103 URL: https://svnweb.freebsd.org/changeset/base/312103 Log: Revert r310994 Don't implement some terrible hack on a test by test basis. The framework fix is straightforward and can be chased up in the original bug. Reviewed by: ngie ("be my guest") Modified: head/tests/sys/vfs/lookup_cap_dotdot.c Modified: head/tests/sys/vfs/lookup_cap_dotdot.c ============================================================================== --- head/tests/sys/vfs/lookup_cap_dotdot.c Sat Jan 14 01:01:02 2017 (r312102) +++ head/tests/sys/vfs/lookup_cap_dotdot.c Sat Jan 14 01:03:20 2017 (r312103) @@ -31,27 +31,23 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include -#include #include #include #include #include "freebsd_test_suite/macros.h" -static char *abspath; -static int dirfd = -1; - -typedef void (*child_test_fn_t)(void); +static int dirfd = -1; +static char *abspath; static void -touchat(int _dirfd, const char *name) +touchat(int dirfd, const char *name) { int fd; - ATF_REQUIRE((fd = openat(_dirfd, name, O_CREAT | O_TRUNC | O_WRONLY, + ATF_REQUIRE((fd = openat(dirfd, name, O_CREAT | O_TRUNC | O_WRONLY, 0777)) >= 0); ATF_REQUIRE(close(fd) == 0); } @@ -82,43 +78,10 @@ prepare_dotdot_tests(void) static void check_capsicum(void) { - ATF_REQUIRE_FEATURE("security_capabilities"); ATF_REQUIRE_FEATURE("security_capability_mode"); } -static void -run_capsicum_test(child_test_fn_t test_func) -{ - int child_exit_code, child_status; - pid_t child_pid; - - check_capsicum(); - prepare_dotdot_tests(); - - ATF_REQUIRE_MSG((child_pid = fork()) != -1, - "fork failed: %s", strerror(errno)); - - if (child_pid == 0) { - test_func(); - _exit(0); - } - - ATF_REQUIRE_MSG(waitpid(child_pid, &child_status, 0) != -1, - "waitpid failed: %s", strerror(errno)); - if (WIFEXITED(child_status)) { - child_exit_code = WEXITSTATUS(child_status); - ATF_REQUIRE_MSG(child_exit_code == 0, - "child exited with non-zero exit code: %d", - child_exit_code); - } else if (WIFSIGNALED(child_status)) - atf_tc_fail("child exited with signal: %d", - WTERMSIG(child_status)); - else - atf_tc_fail("child exited with unexpected status: %d", - child_status); -} - /* * Positive tests */ @@ -130,7 +93,6 @@ ATF_TC_HEAD(openat__basic_positive, tc) ATF_TC_BODY(openat__basic_positive, tc) { - prepare_dotdot_tests(); ATF_REQUIRE(openat(dirfd, "d1/d2/d3/f3", O_RDONLY) >= 0); @@ -152,22 +114,21 @@ ATF_TC_HEAD(lookup_cap_dotdot__basic, tc "Validate cap-mode (testdir)/d1/.. lookup"); } -static void -lookup_cap_dotdot__basic_child(void) +ATF_TC_BODY(lookup_cap_dotdot__basic, tc) { cap_rights_t rights; + int fd; - cap_rights_init(&rights, CAP_LOOKUP, CAP_READ); + check_capsicum(); + prepare_dotdot_tests(); - assert(cap_rights_limit(dirfd, &rights) >= 0); - assert(cap_enter() >= 0); - assert(openat(dirfd, "d1/..", O_RDONLY) >= 0); -} + cap_rights_init(&rights, CAP_LOOKUP, CAP_READ); + ATF_REQUIRE(cap_rights_limit(dirfd, &rights) >= 0); -ATF_TC_BODY(lookup_cap_dotdot__basic, tc) -{ + ATF_REQUIRE(cap_enter() >= 0); - run_capsicum_test(lookup_cap_dotdot__basic_child); + ATF_REQUIRE_MSG(openat(dirfd, "d1/..", O_RDONLY) >= 0, "%s", + strerror(errno)); } ATF_TC(lookup_cap_dotdot__advanced); @@ -177,26 +138,23 @@ ATF_TC_HEAD(lookup_cap_dotdot__advanced, "Validate cap-mode (testdir)/d1/.. lookup"); } -static void -lookup_cap_dotdot__advanced_child(void) +ATF_TC_BODY(lookup_cap_dotdot__advanced, tc) { cap_rights_t rights; + int fd; - cap_rights_init(&rights, CAP_LOOKUP, CAP_READ); - assert(cap_rights_limit(dirfd, &rights) >= 0); - - assert(cap_enter() >= 0); + check_capsicum(); + prepare_dotdot_tests(); - assert(openat(dirfd, "d1/d2/d3/../../f1", O_RDONLY) >= 0); - assert(openat(dirfd, "l3/../../f1", O_RDONLY) >= 0); - assert(openat(dirfd, "l3/ld1", O_RDONLY) >= 0); - assert(openat(dirfd, "l3/lf1", O_RDONLY) >= 0); -} + cap_rights_init(&rights, CAP_LOOKUP, CAP_READ); + ATF_REQUIRE(cap_rights_limit(dirfd, &rights) >= 0); -ATF_TC_BODY(lookup_cap_dotdot__advanced, tc) -{ + ATF_REQUIRE(cap_enter() >= 0); - run_capsicum_test(lookup_cap_dotdot__advanced_child); + ATF_REQUIRE(openat(dirfd, "d1/d2/d3/../../f1", O_RDONLY) >= 0); + ATF_REQUIRE(openat(dirfd, "l3/../../f1", O_RDONLY) >= 0); + ATF_REQUIRE(openat(dirfd, "l3/ld1", O_RDONLY) >= 0); + ATF_REQUIRE(openat(dirfd, "l3/lf1", O_RDONLY) >= 0); } /* @@ -210,7 +168,6 @@ ATF_TC_HEAD(openat__basic_negative, tc) ATF_TC_BODY(openat__basic_negative, tc) { - prepare_dotdot_tests(); ATF_REQUIRE_ERRNO(ENOENT, @@ -225,43 +182,32 @@ ATF_TC_HEAD(capmode__negative, tc) atf_tc_set_md_var(tc, "descr", "Negative Capability mode testcases"); } -static void -capmode__negative_child(void) +ATF_TC_BODY(capmode__negative, tc) { int subdirfd; - assert(cap_enter() == 0); + check_capsicum(); + prepare_dotdot_tests(); + + ATF_REQUIRE(cap_enter() == 0); /* open() not permitted in capability mode */ - assert(open("testdir", O_RDONLY) < 0); - assert(errno == ECAPMODE); + ATF_REQUIRE_ERRNO(ECAPMODE, open("testdir", O_RDONLY) < 0); /* AT_FDCWD not permitted in capability mode */ - assert(openat(AT_FDCWD, "d1/f1", O_RDONLY) < 0); - assert(errno == ECAPMODE); + ATF_REQUIRE_ERRNO(ECAPMODE, openat(AT_FDCWD, "d1/f1", O_RDONLY) < 0); /* Relative path above dirfd not capable */ - assert(openat(dirfd, "..", O_RDONLY) < 0); - assert(errno == ENOTCAPABLE); - - assert((subdirfd = openat(dirfd, "l3", O_RDONLY)) >= 0); - assert(openat(subdirfd, "../../f1", O_RDONLY) < 0); - assert(errno == ENOTCAPABLE); - (void)close(subdirfd); + ATF_REQUIRE_ERRNO(ENOTCAPABLE, openat(dirfd, "..", O_RDONLY) < 0); + ATF_REQUIRE((subdirfd = openat(dirfd, "l3", O_RDONLY)) >= 0); + ATF_REQUIRE_ERRNO(ENOTCAPABLE, + openat(subdirfd, "../../f1", O_RDONLY) < 0); /* Absolute paths not capable */ - assert(openat(dirfd, abspath, O_RDONLY) < 0); - assert(errno == ENOTCAPABLE); + ATF_REQUIRE_ERRNO(ENOTCAPABLE, openat(dirfd, abspath, O_RDONLY) < 0); /* Symlink above dirfd */ - assert(openat(dirfd, "lup/f1", O_RDONLY) < 0); - assert(errno == ENOTCAPABLE); -} - -ATF_TC_BODY(capmode__negative, tc) -{ - - run_capsicum_test(capmode__negative_child); + ATF_REQUIRE_ERRNO(ENOTCAPABLE, openat(dirfd, "lup/f1", O_RDONLY) < 0); } ATF_TC(lookup_cap_dotdot__negative); @@ -271,30 +217,22 @@ ATF_TC_HEAD(lookup_cap_dotdot__negative, "Validate cap-mode (testdir)/.. lookup fails"); } -static void -lookup_cap_dotdot__negative_child(void) +ATF_TC_BODY(lookup_cap_dotdot__negative, tc) { cap_rights_t rights; + int fd; - cap_rights_init(&rights, CAP_LOOKUP, CAP_READ); - assert(cap_rights_limit(dirfd, &rights) >= 0); - - assert(cap_enter() >= 0); - - assert(openat(dirfd, "..", O_RDONLY) < 0); - assert(errno == ENOTCAPABLE); - - assert(openat(dirfd, "d1/../..", O_RDONLY) < 0); - assert(errno == ENOTCAPABLE); + check_capsicum(); + prepare_dotdot_tests(); - assert(openat(dirfd, "../testdir/d1/f1", O_RDONLY) < 0); - assert(errno == ENOTCAPABLE); -} + cap_rights_init(&rights, CAP_LOOKUP, CAP_READ); + ATF_REQUIRE(cap_rights_limit(dirfd, &rights) >= 0); -ATF_TC_BODY(lookup_cap_dotdot__negative, tc) -{ + ATF_REQUIRE(cap_enter() >= 0); - run_capsicum_test(lookup_cap_dotdot__negative_child); + ATF_REQUIRE_ERRNO(ENOTCAPABLE, openat(dirfd, "..", O_RDONLY) < 0); + ATF_REQUIRE_ERRNO(ENOTCAPABLE, openat(dirfd, "d1/../..", O_RDONLY) < 0); + ATF_REQUIRE_ERRNO(ENOTCAPABLE, openat(dirfd, "../testdir/d1/f1", O_RDONLY) < 0); } ATF_TP_ADD_TCS(tp) From owner-svn-src-head@freebsd.org Sat Jan 14 01:06:54 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 751E6CAE1EF; Sat, 14 Jan 2017 01:06:54 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: from mail-io0-x243.google.com (mail-io0-x243.google.com [IPv6:2607:f8b0:4001:c06::243]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 37F671046; Sat, 14 Jan 2017 01:06:54 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: by mail-io0-x243.google.com with SMTP id c80so7261285iod.1; Fri, 13 Jan 2017 17:06:54 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:mime-version:from:in-reply-to:date:cc:message-id:references :to; bh=o+uKsnFtG4/OiG9NJ90ey4glRCodwuAR9EneF9yXBHI=; b=vKbWOElmmP/d4+6JsFqW1zqH0f4+GeGesl1b9Actr4wBts3pQfqDknASMgljZpYAbe MeNhpX9VoyRxfV/Mo/rKEriKCwsUNWAyhnP9hFmO21wwvyISeD8CxU2fZpEZDrNcE3+b Ut9shh70ZDeqknz2Nr9uIG1UZ43qooJQIDWLCM+wSQnhxkguk4/kltULAja2ecEIygGc 4MMdEycA43S6tJn5emTy+bfpaG5u8CMLH5vfEwLxU1m6A2rpOx0YH8VTPsqS9JJoaUWX O+4vnwZjYKQ+xG7KRzEazntRhBOG/GghRhmA5Zs6ypjI/WHZgmNslzt2fwXUn0xs8Uda tetA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:mime-version:from:in-reply-to:date:cc :message-id:references:to; bh=o+uKsnFtG4/OiG9NJ90ey4glRCodwuAR9EneF9yXBHI=; b=CUT8zQNcwjIp6bY5b2nJW1fj18Z5vnCdq3eCX7jVUqlpi/L3tO1U2iJzCyYml6AErq braAcxC4rtxd1lTdJAqubrnecNHb0I91d4Yq3QNPf7kBIQCihtvqAwEUVh2N19r8aBH2 XBIGXnlzaLrBufc5ennOe0wutt0lkJTVdVLARN/615iK/lX+t7AcVzUU7qmfN5d/fMF2 VPYO3YxEk7aXktTTIQ7cuZq6/Rh6FCCUNHAhPJUwrmQFxodN1dc8ONK2Vsx4ksDT0FjE OND6b1iD3Ojth2OIBHA5CzYW02ifndJ4yfwH3Jh4RoEZvgUPvi15vX1z3diVjV7zArba R2hQ== X-Gm-Message-State: AIkVDXIOh5UNSQLXnlftmb8tuQMOMvTEMzmOgZUEET6BcJC9FmUZN++cFLoSAcxsQnjmHw== X-Received: by 10.107.180.8 with SMTP id d8mr21653739iof.101.1484356013375; Fri, 13 Jan 2017 17:06:53 -0800 (PST) Received: from pinklady.local (c-73-19-52-228.hsd1.wa.comcast.net. [73.19.52.228]) by smtp.gmail.com with ESMTPSA id o191sm7528254iod.11.2017.01.13.17.06.52 (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 13 Jan 2017 17:06:52 -0800 (PST) Subject: Re: svn commit: r312103 - head/tests/sys/vfs Mime-Version: 1.0 (Mac OS X Mail 9.3 \(3124\)) Content-Type: multipart/signed; boundary="Apple-Mail=_1003B9C2-2D3A-4750-8B02-E47163CDD77D"; protocol="application/pgp-signature"; micalg=pgp-sha512 X-Pgp-Agent: GPGMail From: "Ngie Cooper (yaneurabeya)" In-Reply-To: <201701140103.v0E13K8b068874@repo.freebsd.org> Date: Fri, 13 Jan 2017 17:06:51 -0800 Cc: src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org, Julio Merino Message-Id: <07802033-D072-404C-8920-3E598C1C567F@gmail.com> References: <201701140103.v0E13K8b068874@repo.freebsd.org> To: "Conrad E. Meyer" X-Mailer: Apple Mail (2.3124) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 14 Jan 2017 01:06:54 -0000 --Apple-Mail=_1003B9C2-2D3A-4750-8B02-E47163CDD77D Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 > On Jan 13, 2017, at 17:03, Conrad E. Meyer wrote: >=20 > Author: cem > Date: Sat Jan 14 01:03:20 2017 > New Revision: 312103 > URL: https://svnweb.freebsd.org/changeset/base/312103 >=20 > Log: > Revert r310994 >=20 > Don't implement some terrible hack on a test by test basis. The > framework fix is straightforward and can be chased up in the original > bug. >=20 > Reviewed by: ngie ("be my guest") You should have filed an issue with atf/kyua, had the fix done, then = done the necessary parts in releasing a new port/package. Please disable = the test because it doesn=E2=80=99t work at all right now on CURRENT and = it will ping the sh=E2=80=99t out of the jenkins email until fixed. -Ngie --Apple-Mail=_1003B9C2-2D3A-4750-8B02-E47163CDD77D 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 iQIcBAEBCgAGBQJYeXmrAAoJEPWDqSZpMIYV/OEP/1M5f3HRF+KVSviwAj7DSpdb hBZq0JHZbINJ4QlkbG7aE+DuSGjLihiOipmp4cD5ujT0xP/K89Bp5XeXP7iEbeAv J5hMToxN6QjtY9hPMeIalWSH15oNV2Hi81tHjYMqZ2FH6Ed1EjQFPhOemkXH+XJp sZ3VqwujYgX9GNdInQ2JnAbYiUa+WOh58sBl1/GsoG70AwTc9D138W/W9w9uKC3F 4EZO8v1VvYES5v34UKeAb2avsJiI3k9XhqNSNjA/PvDxoLmZMPryfCWmI8Kx3Gg5 hJ4Zp+BQqLFtPNvZJttjHSfPSHOEWmkih+9tzlHwvY+hYVu/Bknb5QYYaL8sbV1/ hWA49OWT+63bQKGJLN5HGPSxHw2WHg2LJq+bTyQV7DmqA16XjSLqO6QyE9PmKgbk i8TtgoulI3WMeQYRJnX4cGM4mRL44wv0GQAzBM/pu+HKnmUcMykUgHv++NQPpwxm txnvaOg2P8xwiaU8vIE4Sf9SoKPnxr5mbfRvMqvCblpvZVpKBMwJlls9DYhbKuyN TGcurhT8+vJSElhfRrljjtvZ3lwikNnNwKWmt+u4UWiziyteRjhCuGZmX4HFc1SQ rQ1Xcy/qHyWFkWChD83mGTH9CwL9M7aPvJWyQnnI4ogQQXr/UVtgBVEwIRLGSmeo Pe/t7Pw7sSjXhOI1HL+P =AVus -----END PGP SIGNATURE----- --Apple-Mail=_1003B9C2-2D3A-4750-8B02-E47163CDD77D-- From owner-svn-src-head@freebsd.org Sat Jan 14 01:07:46 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 08401CAE276; Sat, 14 Jan 2017 01:07:46 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: from mail-it0-x244.google.com (mail-it0-x244.google.com [IPv6:2607:f8b0:4001:c0b::244]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id C05F011DD; Sat, 14 Jan 2017 01:07:45 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: by mail-it0-x244.google.com with SMTP id v14so6790952itb.0; Fri, 13 Jan 2017 17:07:45 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:mime-version:from:in-reply-to:date:cc:message-id:references :to; bh=Dn0ClkKHdgpBVyLE91BDh1Pi0lPFleJOnzMZ3Y5/3Go=; b=CyAgQQh6Bsfrv/eLYPkayj0StVYe0+Rgm/tMdt1ogYb0wbjKYNNo7ryVxS4lVeKmLL k9bUxaEoZqIhgv35UJYQOeHMzzM86R5pic+vXQtG+Z6WhWxHM0MeVxbnOSWP+gSuffDl v5ifnSwEQnseX0FRpw2vdYDgLDn1c0r/yGgjYaf6j/l/XrtdpIk81XR9RgZVuQa2tuFV IP8Y94pdWixhHH/kcP6AYjt6szyHSPND1bmgZRRkftRJjZo/vBV9PnXy0vrjrXPEAHsL jNPWXrMyaEE7H/PqvpEbgMyHqilZ5ViyKNBwzTNUcBgg2QrpnfJGUsZsQZWTRz0wkO0A ZFsA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:mime-version:from:in-reply-to:date:cc :message-id:references:to; bh=Dn0ClkKHdgpBVyLE91BDh1Pi0lPFleJOnzMZ3Y5/3Go=; b=LKosaXXuSQdAxR94/XFHJ6aJjoBuorLEbi6w8ltCH6bBcpaNktO4RT+hDZP8yRwvhe j8eWGoe4GFnjff2edytA+SYUNtVj47To01c35f9gXxdUi+0J5WcHDaW0Z9gyW1GSNP9x qYe9oQmaQWUeFVFkOm86zQH2ZE31yzg1rqPUtBLZy/bvRUZzxInyk2fnLLafr+JqMvkC Fn3+OhkaFPUlF1Y0CrI3FqMjGs7wOuPYEX/QQuK2hIQjakJPAJv5NC0Q6/U6UYkx6w82 4ubQltF8nwEMsxUvhWJD2PDafJnGKTro+occ08hbvtTsqq4xkDP0/7UDnIVpu29m++f5 XoqA== X-Gm-Message-State: AIkVDXKss3jMZkYBYgrlwz6kFlvZnAUlRTKeUW84yO7sS4kLwGPlGjQ/J2o3wqAtDDwkow== X-Received: by 10.36.219.196 with SMTP id c187mr5638944itg.23.1484356065156; Fri, 13 Jan 2017 17:07:45 -0800 (PST) Received: from pinklady.local (c-73-19-52-228.hsd1.wa.comcast.net. [73.19.52.228]) by smtp.gmail.com with ESMTPSA id o191sm7528254iod.11.2017.01.13.17.07.44 (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 13 Jan 2017 17:07:44 -0800 (PST) Subject: Re: svn commit: r312103 - head/tests/sys/vfs Mime-Version: 1.0 (Mac OS X Mail 9.3 \(3124\)) Content-Type: multipart/signed; boundary="Apple-Mail=_9FB67D4B-B074-433D-A279-02DD43310508"; protocol="application/pgp-signature"; micalg=pgp-sha512 X-Pgp-Agent: GPGMail From: "Ngie Cooper (yaneurabeya)" In-Reply-To: <07802033-D072-404C-8920-3E598C1C567F@gmail.com> Date: Fri, 13 Jan 2017 17:07:43 -0800 Cc: src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org, Julio Merino Message-Id: <73E9CEF8-F9B4-4108-9421-CD8A456BB32D@gmail.com> References: <201701140103.v0E13K8b068874@repo.freebsd.org> <07802033-D072-404C-8920-3E598C1C567F@gmail.com> To: "Conrad E. Meyer" X-Mailer: Apple Mail (2.3124) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 14 Jan 2017 01:07:46 -0000 --Apple-Mail=_9FB67D4B-B074-433D-A279-02DD43310508 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 > On Jan 13, 2017, at 17:06, Ngie Cooper (yaneurabeya) = wrote: >=20 >>=20 >> On Jan 13, 2017, at 17:03, Conrad E. Meyer wrote: >>=20 >> Author: cem >> Date: Sat Jan 14 01:03:20 2017 >> New Revision: 312103 >> URL: https://svnweb.freebsd.org/changeset/base/312103 >>=20 >> Log: >> Revert r310994 >>=20 >> Don't implement some terrible hack on a test by test basis. The >> framework fix is straightforward and can be chased up in the original >> bug. >>=20 >> Reviewed by: ngie ("be my guest") >=20 > You should have filed an issue with atf/kyua, had the fix done, then = done the necessary parts in releasing a new port/package. Please disable = the test because it doesn=E2=80=99t work at all right now on CURRENT and = it will ping the sh=E2=80=99t out of the jenkins email until fixed. > -Ngie PS Saying =E2=80=9Cbe my guest=E2=80=9D isn=E2=80=99t review in any = shape or form, nor is it my consent towards your change being = implemented now. --Apple-Mail=_9FB67D4B-B074-433D-A279-02DD43310508 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 iQIcBAEBCgAGBQJYeXnfAAoJEPWDqSZpMIYVWc8P/i185FJjveEFoFytxIDKMQ66 pzAsTqF/F6mYEc7sixFm8TVtrf7I0e2fw+Uy2DMThiZ/rrplD3k9twj68RzVTIFn I2ENq8ZaxLi7vEIBAKz7YnojcK1R8Ag9D8Z7BpBtlVTqVdKHyPqD4/bbDlJ8Du8Q tp6x1/awYzak5sbkS0JlcTiTqTDiX02vckI0tBHFyPv0Sj+6O5hrLCzwA/xgp0yv Peql/vW0xuFwGcYj2XEdUReFkloH8ypmQrw2bD2Yp+o6sVTV1jkXjFkjCEY6hDJj 443fGQquxGHWMEZF4PpPLZh8o5dUVbqFi0pPTL7+xJwJmCyT9MmQFIRemwZm/stO Lxj459OuAoe3YlPemuggLfiBQEW9V+V73Xbx3g3jITPM29GMlxCcf/vSljMwmoPt tFrxBKCj3Cmvi3BB6dOGXQK73Uo7DxwQwr2SbbSDZlQrRt5X/0XLUc4ACQXxzkuX o0KHApRWlyenzwyaKUO8SFruIIEElZgcp0z5ID7yHhYky7tvMVltVX+bGtQY1ofC C6WgYDlRxi7Z5DQqzLWI7aZM52rn5972/3/9TvaSpsUgD3aB/2wiEmKABzO0U+5E 3k1zHsxv7+C3XFoAG66nOUkFzaBhiAitHNL7EuBQ2NQBkzEja0Aw1q2TAhjWu3t+ n4W4lxvGvs4NKcn0VLAe =J65u -----END PGP SIGNATURE----- --Apple-Mail=_9FB67D4B-B074-433D-A279-02DD43310508-- From owner-svn-src-head@freebsd.org Sat Jan 14 01:08:06 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1C01BCAE2F3; Sat, 14 Jan 2017 01:08:06 +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 DF80B1363; Sat, 14 Jan 2017 01:08: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 v0E185Xk069082; Sat, 14 Jan 2017 01:08:05 GMT (envelope-from cem@FreeBSD.org) Received: (from cem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v0E185DE069081; Sat, 14 Jan 2017 01:08:05 GMT (envelope-from cem@FreeBSD.org) Message-Id: <201701140108.v0E185DE069081@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cem set sender to cem@FreeBSD.org using -f From: "Conrad E. Meyer" Date: Sat, 14 Jan 2017 01:08:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r312104 - head/usr.sbin/fstyp/tests X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 14 Jan 2017 01:08:06 -0000 Author: cem Date: Sat Jan 14 01:08:04 2017 New Revision: 312104 URL: https://svnweb.freebsd.org/changeset/base/312104 Log: Fix broken fstyp exfat testcase Introduced in r312010. It helps to read the documentation before trying to test something. Modified: head/usr.sbin/fstyp/tests/fstyp_test.sh Modified: head/usr.sbin/fstyp/tests/fstyp_test.sh ============================================================================== --- head/usr.sbin/fstyp/tests/fstyp_test.sh Sat Jan 14 01:03:20 2017 (r312103) +++ head/usr.sbin/fstyp/tests/fstyp_test.sh Sat Jan 14 01:08:04 2017 (r312104) @@ -64,7 +64,7 @@ exfat_head() { } exfat_body() { bzcat $(atf_get_srcdir)/dfr-01-xfat.img.bz2 > exfat.img - atf_check -s exit:0 -o inline:"exfat\n" fstyp exfat.img + atf_check -s exit:0 -o inline:"exfat\n" fstyp -u exfat.img } atf_test_case empty From owner-svn-src-head@freebsd.org Sat Jan 14 01:10:22 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id F2681CAE5E5; Sat, 14 Jan 2017 01:10:22 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: from mail-it0-x244.google.com (mail-it0-x244.google.com [IPv6:2607:f8b0:4001:c0b::244]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id B71BC1682; Sat, 14 Jan 2017 01:10:22 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: by mail-it0-x244.google.com with SMTP id 203so6774727ith.2; Fri, 13 Jan 2017 17:10:22 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:mime-version:from:in-reply-to:date:cc:message-id:references :to; bh=ywdxr4JO0REHLAa1q/46NQCMU23LcJI2IkZba/DAI+Y=; b=TUdHdMBaA807XFiIbVc88MWCNGzBYta8iBIhxjzc6hPvcLQ5BhRqjSZtNsj5/K5h4w ofLjbLKtX9OvxtqY9YF8eEVr6aBnU8mZ1ARwgWfznzaqtPheMtbsmrkfxsRkL+KcBYdE hCs+m+eQ922WO+oSFrnUcyJIYMq3LEwPO2P3qZHE3uJ2d/p3+BQ7SG0y2yBZAfvALpvQ vznflW6RZ7Yo+cy5K2vPGANdbY7ZunewbVels33VjVsPBXeH4P6SCY4+7Jv6Wf+EHB6t o9wC/lrEjMK7HJrWyoZzgPzhT4FVhYlJp299cWqL5Qac8WrauPvUJbix51NPVHc969XJ WAaA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:mime-version:from:in-reply-to:date:cc :message-id:references:to; bh=ywdxr4JO0REHLAa1q/46NQCMU23LcJI2IkZba/DAI+Y=; b=sAizMwN781pGl6NvYgn+PvkqiQfFamG39RJ1kDQpqItKedEDjcsFBVqz6Yo0yH0G6r oC45dlBkpkXFv9WLuLvovtIj6SZZLxwwF/0ZpOoGnYqs6Cxb4/5CwAajkKpWdWaLsq8w P4+khJJBMCrrX/vGaVZIGlH9pcT65yzojgqNtF2UljGYc8egAyXueS4loqfApel6hOuH EHd2ZoTNaOGT2rZbbbqTAmVEMz9bWBT2MGvVARvkZI6Y0rcRwC0zu595e5uKgPJxgNry EiGhN/bIqO76M5ky1t5qB1MfV212ugjSGKjcWB6xuEDcN2yjlBggv59lP/AJaUeVrsEu zIXw== X-Gm-Message-State: AIkVDXIY0biPLLFZrT4tz5J8qBhwhTkfMPrH3U1EgbUbPPQds3MF7hMbD9l9oUNfAvma5w== X-Received: by 10.36.51.143 with SMTP id k137mr5546277itk.11.1484356222053; Fri, 13 Jan 2017 17:10:22 -0800 (PST) Received: from pinklady.local (c-73-19-52-228.hsd1.wa.comcast.net. [73.19.52.228]) by smtp.gmail.com with ESMTPSA id y125sm1820860ity.13.2017.01.13.17.10.21 (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 13 Jan 2017 17:10:21 -0800 (PST) Subject: Re: svn commit: r312104 - head/usr.sbin/fstyp/tests Mime-Version: 1.0 (Mac OS X Mail 9.3 \(3124\)) Content-Type: multipart/signed; boundary="Apple-Mail=_4D4E6DEE-2FCA-4367-A78F-01F468CC120A"; protocol="application/pgp-signature"; micalg=pgp-sha512 X-Pgp-Agent: GPGMail From: "Ngie Cooper (yaneurabeya)" In-Reply-To: <201701140108.v0E185DE069081@repo.freebsd.org> Date: Fri, 13 Jan 2017 17:10:20 -0800 Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Message-Id: <022BCAAB-CB93-49A6-BDE1-C7449EE180E9@gmail.com> References: <201701140108.v0E185DE069081@repo.freebsd.org> To: "Conrad E. Meyer" X-Mailer: Apple Mail (2.3124) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 14 Jan 2017 01:10:23 -0000 --Apple-Mail=_4D4E6DEE-2FCA-4367-A78F-01F468CC120A Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=us-ascii > On Jan 13, 2017, at 17:08, Conrad E. Meyer wrote: > > Author: cem > Date: Sat Jan 14 01:08:04 2017 > New Revision: 312104 > URL: https://svnweb.freebsd.org/changeset/base/312104 > > Log: > Fix broken fstyp exfat testcase > > Introduced in r312010. > > It helps to read the documentation before trying to test something. It helps when the documentation is correct as well. Not fixed until r312078. -Ngie --Apple-Mail=_4D4E6DEE-2FCA-4367-A78F-01F468CC120A 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 iQIcBAEBCgAGBQJYeXp8AAoJEPWDqSZpMIYVLXAP/AmM5XNlVfS8E/ak53qRbhm3 6uM0PlOgC5lVp4D8lEoQDYk6QT0z+HGgwkawy46biey0HyuYPm2BfsX2+5QYgt1K 8pOzIePRa/LD6chWTZMrBPml3N0GB13WWzoqLFUGs6H0Qw2tTDeya60WZkDjMddf m8FLfP6OeZFYYC0ae5TnuSIzq8EkHANgY+gDkPhw5JzYg4WAMgAAkHIqYT7l+316 K6EIcdsjwGg/jappVU0XWMeaoC4GlULZXfVSK8uBcgU8lgo3J1izZW4VyopXljbp 4/DIxR74og0r0pxVmGvC4VhOuqlRGj6C4ueqi6TRoB0Huqj67wTVc2G/dQCYjSDw YQ4vRjDvjnU3PpMMfF6bxH50taJxErdxqEdHEKYQFOGaDK2R6clNJFF4TvP3ll/j XPBOUZH1hEwamySNnb3WmWvBpD4VWpMAlvNfL982MnkpETAq5gz5SBowtUnZjq41 a55YzJS1IzR+ZtNLGDJwyOYgGu0o4w6IuRSTIWryVVrb2Fv1U3cyBmIRuDE109l/ NS6M4+/Lt/1JoPq01GhqArfSybDUyUe0Xu7WXOCnwfDpbiBrBNsDPDORGBXX1N7S e+VsihW0qUUIzNlhyqSZA49DzRQsYdJQZKmtduGSnKLsE4e59ZywlWXKlyXT035o AkSXcCzA94nQXbKoZ0zc =ehE4 -----END PGP SIGNATURE----- --Apple-Mail=_4D4E6DEE-2FCA-4367-A78F-01F468CC120A-- From owner-svn-src-head@freebsd.org Sat Jan 14 01:37:04 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id EF8C0CAF81B; Sat, 14 Jan 2017 01:37:04 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A1CB41880; Sat, 14 Jan 2017 01:37:04 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v0E1b3w2081267; Sat, 14 Jan 2017 01:37:03 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v0E1b3cK081265; Sat, 14 Jan 2017 01:37:03 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201701140137.v0E1b3cK081265@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Sat, 14 Jan 2017 01:37:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r312105 - head/usr.sbin/inetd X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 14 Jan 2017 01:37:05 -0000 Author: ngie Date: Sat Jan 14 01:37:03 2017 New Revision: 312105 URL: https://svnweb.freebsd.org/changeset/base/312105 Log: Conditionalize libwrap support into inetd based on MK_TCP_WRAPPERS This will allow inetd to stand by itself without libwrap. MFC after: 2 weeks Relnotes: yes Reviewed by: hrs (earlier version) Sponsored by: Dell EMC Isilon Differential Revision: https://reviews.freebsd.org/D9056 Modified: head/usr.sbin/inetd/Makefile head/usr.sbin/inetd/inetd.c Modified: head/usr.sbin/inetd/Makefile ============================================================================== --- head/usr.sbin/inetd/Makefile Sat Jan 14 01:08:04 2017 (r312104) +++ head/usr.sbin/inetd/Makefile Sat Jan 14 01:37:03 2017 (r312105) @@ -16,7 +16,12 @@ CFLAGS+= -DLOGIN_CAP CFLAGS+= -DINET6 .endif -LIBADD= util wrap +LIBADD= util + +.if ${MK_TCP_WRAPPERS} != "no" +CFLAGS+= -DLIBWRAP +LIBADD+= wrap +.endif # XXX for src/release/picobsd .if !defined(RELEASE_CRUNCH) Modified: head/usr.sbin/inetd/inetd.c ============================================================================== --- head/usr.sbin/inetd/inetd.c Sat Jan 14 01:08:04 2017 (r312104) +++ head/usr.sbin/inetd/inetd.c Sat Jan 14 01:37:03 2017 (r312105) @@ -336,9 +336,11 @@ main(int argc, char **argv) #ifdef LOGIN_CAP login_cap_t *lc = NULL; #endif +#ifdef LIBWRAP struct request_info req; int denied; char *service = NULL; +#endif struct sockaddr_storage peer; int i; struct addrinfo hints, *res; @@ -748,6 +750,7 @@ main(int argc, char **argv) _exit(0); } } +#ifdef LIBWRAP if (ISWRAP(sep)) { inetd_setproctitle("wrapping", ctrl); service = sep->se_server_name ? @@ -776,6 +779,7 @@ main(int argc, char **argv) (whichaf(&req) == AF_INET6) ? "6" : ""); } } +#endif if (sep->se_bi) { (*sep->se_bi->bi_fn)(ctrl, sep); } else { From owner-svn-src-head@freebsd.org Sat Jan 14 02:19:40 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C0B0FCAF0CA; Sat, 14 Jan 2017 02:19:40 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: from mail-it0-x242.google.com (mail-it0-x242.google.com [IPv6:2607:f8b0:4001:c0b::242]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 8469718DD; Sat, 14 Jan 2017 02:19:40 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: by mail-it0-x242.google.com with SMTP id v14so6920132itb.0; Fri, 13 Jan 2017 18:19:40 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:mime-version:from:in-reply-to:date:cc:message-id:references :to; bh=6oWCGMklvfw5wOtWb94p8Q8mOq8opE/AART3nYZajqY=; b=N+d1m7NtFxUQ+oxYlHSfr5j05wk5Y9rdzSkfE8lHj73PiW9y3fMoWKabhiRrfgJIl2 4gDQh5DhKMsVtQcx0WYzRNsd7z9sOACHbZKdB20Kcuq/3Nu4U5ZqDWhTihfU7EBmZ27/ 1ZJwyVjiZeYlsDhi9nZkT29XQPBOZOHs+xi9ceCGLsWwywgxKugxiRYSifPPO5zbPn6T ChnrDsU1ZMr8NNuyGh7P7N8q9KeTk3jrCFVl1KrIj4vHhXGDPEos3rPom33wqtt4J4uE E2HtembzfG5/wTTAiDU1BGi3gIOn6+QIn5sKRzx++0hPHSio7yp49G9b2vHf8jJPvfwJ 5c6w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:mime-version:from:in-reply-to:date:cc :message-id:references:to; bh=6oWCGMklvfw5wOtWb94p8Q8mOq8opE/AART3nYZajqY=; b=fiftvZbKSFEW8rCXH/Lhq+rQElFQvmtxUIANAGh8ziHbNX8xih2d1pDJRvSk2YakYm K2A+rFxIxMxHWmI+QHNHaYZgpsVB/aZxvo8riqA1Kp12r9c7PI5k8Ab1kEp432BCyEXb HHyEAlWVmh0CKt6lF6+DhxdFCsjJ/nJTNqDHY6CLdzoVh1JvHw9+bpLnsQLYRVXUcFFa teWdYHzqDcVyFW/mmB1PdTfIKJoex0F6+QJgON6r4irj3JGlaKe1mB/Q6MTAHXmDd3Su gIGDHHun93pz7k8QZysU75Xfuofthaaw6be7hbFjNnpJ7JCJ/ZZ1k1pM1n036V4pbH93 LpRQ== X-Gm-Message-State: AIkVDXJcblaCaECtBZKx5xDMvsL/8d3pnqdDmAmFGWyZoPtWoPGO6dCa7gj9004PljGdpw== X-Received: by 10.36.120.5 with SMTP id p5mr5695221itc.5.1484360379827; Fri, 13 Jan 2017 18:19:39 -0800 (PST) Received: from pinklady.local (c-73-19-52-228.hsd1.wa.comcast.net. [73.19.52.228]) by smtp.gmail.com with ESMTPSA id 7sm7662939iox.39.2017.01.13.18.19.38 (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 13 Jan 2017 18:19:39 -0800 (PST) Subject: Re: svn commit: r312103 - head/tests/sys/vfs Mime-Version: 1.0 (Mac OS X Mail 9.3 \(3124\)) Content-Type: multipart/signed; boundary="Apple-Mail=_EAEE4433-B736-49EB-A2F5-7D8E03FA31CF"; protocol="application/pgp-signature"; micalg=pgp-sha512 X-Pgp-Agent: GPGMail From: "Ngie Cooper (yaneurabeya)" In-Reply-To: <73E9CEF8-F9B4-4108-9421-CD8A456BB32D@gmail.com> Date: Fri, 13 Jan 2017 18:19:37 -0800 Cc: src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org, Julio Merino Message-Id: References: <201701140103.v0E13K8b068874@repo.freebsd.org> <07802033-D072-404C-8920-3E598C1C567F@gmail.com> <73E9CEF8-F9B4-4108-9421-CD8A456BB32D@gmail.com> To: "Conrad E. Meyer" X-Mailer: Apple Mail (2.3124) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 14 Jan 2017 02:19:40 -0000 --Apple-Mail=_EAEE4433-B736-49EB-A2F5-7D8E03FA31CF Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 > On Jan 13, 2017, at 17:07, Ngie Cooper (yaneurabeya) = wrote: >=20 >=20 >> On Jan 13, 2017, at 17:06, Ngie Cooper (yaneurabeya) = wrote: >>=20 >>>=20 >>> On Jan 13, 2017, at 17:03, Conrad E. Meyer wrote: >>>=20 >>> Author: cem >>> Date: Sat Jan 14 01:03:20 2017 >>> New Revision: 312103 >>> URL: https://svnweb.freebsd.org/changeset/base/312103 >>>=20 >>> Log: >>> Revert r310994 >>>=20 >>> Don't implement some terrible hack on a test by test basis. The >>> framework fix is straightforward and can be chased up in the = original >>> bug. >>>=20 >>> Reviewed by: ngie ("be my guest") >>=20 >> You should have filed an issue with atf/kyua, had the fix done, then = done the necessary parts in releasing a new port/package. Please disable = the test because it doesn=E2=80=99t work at all right now on CURRENT and = it will ping the sh=E2=80=99t out of the jenkins email until fixed. >> -Ngie >=20 > PS Saying =E2=80=9Cbe my guest=E2=80=9D isn=E2=80=99t review in any = shape or form, nor is it my consent towards your change being = implemented now. Oh yeah=E2=80=A6 this commit broke the build too because I turned on = WARNS: https://jenkins.freebsd.org/job/FreeBSD_HEAD_i386/4653/ Cheers, -Ngie --Apple-Mail=_EAEE4433-B736-49EB-A2F5-7D8E03FA31CF 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 iQIcBAEBCgAGBQJYeYq6AAoJEPWDqSZpMIYV4UYQAI2ugY5zQzbQZydGNxZ2Sgfw vnmtZ8hougZEbRYrbQrLOYrY+sB0l0sCZ925l0dpVSosKBO2YQdwrutkFvUTpFk0 XjAbfc+s9M42oB6s3jB6krK9lUw70P4e9C9GAG0W14+q3RbeLXfUnay5ez5mz61W bn/ETmFhbZOEyXJ/m8VldyN2eYeig9JwMaPzV8C6TMl6Ez+2tH1OeUOYDFRhR186 M7UdLz8gVLUYENYypLOAbK+rhyO4x+jN8VDWQhpE3brSv5yflu76c9v/s+Xhz4nG UsRoiV8Z1TNrHpIRi9AhP/26wZtIWR4fInePv+Q9CgsNXQYErUasmA15F7g317iQ DDsEOsWLgWwaE56CiR59pAIf6ynxPOxIx6nKDCL+w5bwQHaz9UK1sWHubSr8ws9h DgODqmzcjRmkQVtkjQHLaeKaWAgDNYwBYPw9+xUD8qbn9wRmC3jWujX4QQ5RhnqE n+EV8i9hOZRc9ojneXNYyn3lDh5PEKdRv4Q4R/dycrAEBMjfHubH6zRwMHMwRP8s cBqJL81yDJ+9Vzph7romzEXXASMUU0pgSBo30ta8bhK2LGuR8Ghi3OTnmZX2C3RB L3XsxeIRgCtY8PSRoX7a2dFLYcckahHWvki2E7jGzu08tPIZoMSP3H1L7dqAbHiI oijHFccXKWU3BITJ1i1m =KTRg -----END PGP SIGNATURE----- --Apple-Mail=_EAEE4433-B736-49EB-A2F5-7D8E03FA31CF-- From owner-svn-src-head@freebsd.org Sat Jan 14 02:29:27 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2584ECAF5C6; Sat, 14 Jan 2017 02:29:27 +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 E93581172; Sat, 14 Jan 2017 02:29: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 v0E2TQcc001709; Sat, 14 Jan 2017 02:29:26 GMT (envelope-from cem@FreeBSD.org) Received: (from cem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v0E2TQrd001708; Sat, 14 Jan 2017 02:29:26 GMT (envelope-from cem@FreeBSD.org) Message-Id: <201701140229.v0E2TQrd001708@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cem set sender to cem@FreeBSD.org using -f From: "Conrad E. Meyer" Date: Sat, 14 Jan 2017 02:29:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r312107 - head/tests/sys/vfs X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 14 Jan 2017 02:29:27 -0000 Author: cem Date: Sat Jan 14 02:29:25 2017 New Revision: 312107 URL: https://svnweb.freebsd.org/changeset/base/312107 Log: Follow-up to r312103: Revert r310995 as well. Modified: head/tests/sys/vfs/Makefile Modified: head/tests/sys/vfs/Makefile ============================================================================== --- head/tests/sys/vfs/Makefile Sat Jan 14 02:26:46 2017 (r312106) +++ head/tests/sys/vfs/Makefile Sat Jan 14 02:29:25 2017 (r312107) @@ -9,6 +9,4 @@ CFLAGS.lookup_cap_dotdot.c+= -I${SRCTOP} PLAIN_TESTS_SH+= trailing_slash -WARNS?= 6 - .include From owner-svn-src-head@freebsd.org Sat Jan 14 02:30:50 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 79077CAF637; Sat, 14 Jan 2017 02:30:50 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: from mail-it0-x243.google.com (mail-it0-x243.google.com [IPv6:2607:f8b0:4001:c0b::243]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 3E5791342; Sat, 14 Jan 2017 02:30:50 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: by mail-it0-x243.google.com with SMTP id v14so6939419itb.0; Fri, 13 Jan 2017 18:30:50 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:mime-version:from:in-reply-to:date:cc:message-id:references :to; bh=FPr7S0ByEzI4mhUNp12nhaNIdPOO97QCKI2t8WdG0TU=; b=BSS7pJf/caHsWiKDS+vh2ACLuuxitRGot7OvVgu7TJbYLWhHfekCpY+rweySaxUyoR KeqilqqoN6+YV8C5e8aKg1F5yjc67W+WKIF2RTyAgWFqqBu2QnBoUTgv1rk4cxYcJgH8 ffPlRgfIKZjoqfz2kYjmnl2l4BxxBh3Efphw+D/rqU+h+GLiCDVrRz+j58FlfW7Z7ZuY Gy/nYau48SGHaawWNzZQ5+23QQTt+0FPFoF1Yoa7R8bXd1S2E9T00t7dNzjUvSQSOJ3S zrQVbCKWolHkpiEbcB2Un6Rkf2jO8LxVyizpWUoZ/sxVS6fUYNf0o0zA698u+Z6U8f93 2XcQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:mime-version:from:in-reply-to:date:cc :message-id:references:to; bh=FPr7S0ByEzI4mhUNp12nhaNIdPOO97QCKI2t8WdG0TU=; b=kuiksA4Speg7xAf0gBlorwPQYFKUopnh2oZSKP/N7KPbPM5DmPmMyVPt5FvpuGrKlQ WtxviyvV3acsqX2mmHnzFsk2w1rmLXd6gxWk4QmbAptnpKLdkqOmn6dNmJ3/5OrQ7oat 46rXf/234ndHsaUV6dxdHRJxLxAAaBvYSRuE5dlal6Qi6OfMHjUi3qHCg5np9HHC/g9r pwSdGoG40ssdB7m9NqLfU0ujVR1+VUINvSAe1MOs6N5wt/UyjEkKgJYNFFBvgB7rXLFY XFbX2UjYi9BeOwAnyMuc2QDvEixbQkKW/ZLLEhPQdjTl/+As+C1hqoNbXtZxtC80huWf 9IGw== X-Gm-Message-State: AIkVDXJQu1A07DvX1pFJMxqUMBFZk9ueyoaoYNMWUv0s8A/9xjnNB6xF8mVbjoxtcsLp1g== X-Received: by 10.36.79.71 with SMTP id c68mr6076853itb.47.1484361049499; Fri, 13 Jan 2017 18:30:49 -0800 (PST) Received: from pinklady.local (c-73-19-52-228.hsd1.wa.comcast.net. [73.19.52.228]) by smtp.gmail.com with ESMTPSA id i200sm2009359itb.0.2017.01.13.18.30.48 (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 13 Jan 2017 18:30:48 -0800 (PST) Subject: Re: svn commit: r312107 - head/tests/sys/vfs Mime-Version: 1.0 (Mac OS X Mail 9.3 \(3124\)) Content-Type: multipart/signed; boundary="Apple-Mail=_55FE3218-5D95-4A0C-90D5-6E6E5061D16A"; protocol="application/pgp-signature"; micalg=pgp-sha512 X-Pgp-Agent: GPGMail From: "Ngie Cooper (yaneurabeya)" In-Reply-To: <201701140229.v0E2TQrd001708@repo.freebsd.org> Date: Fri, 13 Jan 2017 18:30:47 -0800 Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Message-Id: <14F9D1E0-B4A1-4B9A-80E0-10C9EBDCBD12@gmail.com> References: <201701140229.v0E2TQrd001708@repo.freebsd.org> To: "Conrad E. Meyer" X-Mailer: Apple Mail (2.3124) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 14 Jan 2017 02:30:50 -0000 --Apple-Mail=_55FE3218-5D95-4A0C-90D5-6E6E5061D16A Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 > On Jan 13, 2017, at 18:29, Conrad E. Meyer wrote: >=20 > Author: cem > Date: Sat Jan 14 02:29:25 2017 > New Revision: 312107 > URL: https://svnweb.freebsd.org/changeset/base/312107 >=20 > Log: > Follow-up to r312103: >=20 > Revert r310995 as well. >=20 > Modified: > head/tests/sys/vfs/Makefile >=20 > Modified: head/tests/sys/vfs/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/tests/sys/vfs/Makefile Sat Jan 14 02:26:46 2017 = (r312106) > +++ head/tests/sys/vfs/Makefile Sat Jan 14 02:29:25 2017 = (r312107) > @@ -9,6 +9,4 @@ CFLAGS.lookup_cap_dotdot.c+=3D -I${SRCTOP} >=20 > PLAIN_TESTS_SH+=3D trailing_slash >=20 > -WARNS?=3D 6 > - > .include Why don=E2=80=99t you fix the test code to be -Werror clean instead with = WARNS? --Apple-Mail=_55FE3218-5D95-4A0C-90D5-6E6E5061D16A 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 iQIcBAEBCgAGBQJYeY1XAAoJEPWDqSZpMIYVs/MP/Rptl71BVpDDGJPtYdBJh3a7 aJ2QOcy+wyXddo+0p7OBq2KTeaiKYWsoYmYeCVIoIjKGToWHwagK79Yalot17tv0 F7J7Lh4A6vdnZ7LJu8hI9i3LKT5l89LW0I6SXsfaIUnZMvmYi4VV5mXTmuEm65jd E7ZsSBAAopZMIe29d1niek2NH4ofRLNsCk2j1WNuHsMn6uKeyNncfAV4LIY0bW9B wU2+ATHUMApmdIrGCYjLJLkinlU+f+OyQhSG+MzvXNed+OpJxZAD5HxiwUfqGcVO fqXSDxnfG+hTOt42WrORK5qMgGD7CpWcMUezLUb0B/jzCMGHJIbP5Rdu39xZq/P5 T2OF9ULmZWRrwPpul+ZfonL7Er9smVBj3wWZ+4lXv7cgmRchSSXSxpK78BO1C6W3 q2domabdgOteYG04EVEoGZPCZ8bxnPlUAUVCrjXZM0F0KMrS21ZZOvzEdMiexVv3 IBJu0jHzHMPGFaZoa197zU7Co2vlrIxc61CXcuIKzym345LTsC8lD0eu6Qzr3l+p T+RTwl0QcTIX9I61pe+hruDcJpM9HupvIfILcIa+llmnsEbpYUckpJuNGw9Jwg26 xQpGlJDJGN4+VobhjOAzyTyqr4McCZRi6tDaXJmXvCy+i9kMxsaKlSvjfCPkBbEl zcdPfvNgNMoPlcpN/ukA =qrZL -----END PGP SIGNATURE----- --Apple-Mail=_55FE3218-5D95-4A0C-90D5-6E6E5061D16A-- From owner-svn-src-head@freebsd.org Sat Jan 14 02:40:02 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id DA01DCAF833; Sat, 14 Jan 2017 02:40:02 +0000 (UTC) (envelope-from cy.schubert@komquats.com) Received: from smtp-out-no.shaw.ca (smtp-out-no.shaw.ca [64.59.134.12]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "Client", Issuer "CA" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 90A5D1830; Sat, 14 Jan 2017 02:40:01 +0000 (UTC) (envelope-from cy.schubert@komquats.com) Received: from spqr.komquats.com ([96.50.22.10]) by shaw.ca with SMTP id SEFzcIwwMC8pGSEG0cIVkb; Fri, 13 Jan 2017 19:39:53 -0700 X-Authority-Analysis: v=2.2 cv=WoZbCZXv c=1 sm=1 tr=0 a=jvE2nwUzI0ECrNeyr98KWA==:117 a=jvE2nwUzI0ECrNeyr98KWA==:17 a=kj9zAlcOel0A:10 a=IgFoBzBjUZAA:10 a=6I5d2MoRAAAA:8 a=YxBL1-UpAAAA:8 a=rNrjpBi0COSOxzXsiRMA:9 a=CjuIK1q_8ugA:10 a=IjZwj45LgO3ly-622nXo:22 a=Ia-lj3WSrqcvXOmTRaiG:22 Received: from slippy.cwsent.com (slippy [10.1.1.91]) by spqr.komquats.com (Postfix) with ESMTPS id 0DCD49F5; Fri, 13 Jan 2017 18:39:51 -0800 (PST) Received: from slippy (localhost [127.0.0.1]) by slippy.cwsent.com (8.15.2/8.15.2) with ESMTP id v0E2doD2069898; Fri, 13 Jan 2017 18:39:50 -0800 (PST) (envelope-from Cy.Schubert@cschubert.com) Message-Id: <201701140239.v0E2doD2069898@slippy.cwsent.com> X-Mailer: exmh version 2.8.0 04/21/2012 with nmh-1.6 Reply-to: Cy Schubert From: Cy Schubert X-os: FreeBSD X-Sender: cy@cwsent.com X-URL: http://www.cschubert.com/ To: "Conrad E. Meyer" cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r312103 - head/tests/sys/vfs In-Reply-To: Message from "Conrad E. Meyer" of "Sat, 14 Jan 2017 01:03:20 +0000." <201701140103.v0E13K8b068874@repo.freebsd.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Fri, 13 Jan 2017 18:39:50 -0800 X-CMAE-Envelope: MS4wfDDEuTijvSGHAP2nOZnWRvwn04c9ETwG33S5TwAtXmsyhKvGbHEx8ipiHSpJHCIJ7ekE+XYt8pGbT+xs7dpiw7UHtnnTjrlmxLbpqj1K2menz6ZdN4EL 3hQIiTvICqueLfo23X7v347gIe3945MYzW2QqQB2h/bbxLNTUPY90x/bFNUc+PChmISZ4oSLl6kmOXvorpOD2wKzvkqOBNK7aJ5QOjfjyzM9eIJkeMo6O4xy k/dSF/959Yn/Dd0RyKvYDGLc+vQ10/LbI+IXmCc61LAZoahvb9w7kOnJUEGcJnHW X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 14 Jan 2017 02:40:03 -0000 In message <201701140103.v0E13K8b068874@repo.freebsd.org>, "Conrad E. Meyer" wr ites: > Author: cem > Date: Sat Jan 14 01:03:20 2017 > New Revision: 312103 > URL: https://svnweb.freebsd.org/changeset/base/312103 > > Log: > Revert r310994 > > Don't implement some terrible hack on a test by test basis. The > framework fix is straightforward and can be chased up in the original > bug. > > Reviewed by: ngie ("be my guest") > > Modified: > head/tests/sys/vfs/lookup_cap_dotdot.c > > Modified: head/tests/sys/vfs/lookup_cap_dotdot.c > ============================================================================= > = > --- head/tests/sys/vfs/lookup_cap_dotdot.c Sat Jan 14 01:01:02 2017 > (r312102) > +++ head/tests/sys/vfs/lookup_cap_dotdot.c Sat Jan 14 01:03:20 2017 > (r312103) > @@ -31,27 +31,23 @@ __FBSDID("$FreeBSD$"); > #include > #include > #include > -#include > > #include > -#include > #include > #include > #include > > #include "freebsd_test_suite/macros.h" > > -static char *abspath; > -static int dirfd = -1; > - > -typedef void (*child_test_fn_t)(void); > +static int dirfd = -1; > +static char *abspath; > > static void > -touchat(int _dirfd, const char *name) > +touchat(int dirfd, const char *name) Buildworld is busted right here. It's probably best to leave the underbar here and in the ATF_REQIRE below. > { > int fd; > > - ATF_REQUIRE((fd = openat(_dirfd, name, O_CREAT | O_TRUNC | O_WRONLY, > + ATF_REQUIRE((fd = openat(dirfd, name, O_CREAT | O_TRUNC | O_WRONLY, Here too. > 0777)) >= 0); > ATF_REQUIRE(close(fd) == 0); > } -- Cheers, Cy Schubert FreeBSD UNIX: Web: http://www.FreeBSD.org The need of the many outweighs the greed of the few. From owner-svn-src-head@freebsd.org Sat Jan 14 03:50:31 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4C087CAEA5C; Sat, 14 Jan 2017 03:50:31 +0000 (UTC) (envelope-from cse.cem@gmail.com) Received: from mail-wm0-f68.google.com (mail-wm0-f68.google.com [74.125.82.68]) (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 C92D01A85; Sat, 14 Jan 2017 03:50:30 +0000 (UTC) (envelope-from cse.cem@gmail.com) Received: by mail-wm0-f68.google.com with SMTP id l2so16083131wml.2; Fri, 13 Jan 2017 19:50:30 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:reply-to:in-reply-to:references :from:date:message-id:subject:to:cc; bh=IkxXkYWnZf6HDwhA/IL5MWaOVlO3bqy9+2Tds24WA/Y=; b=GjuA/UpmFVb8/2aysAZEFsWjRZIAu/jPKFkOWD8uPOYkqzxnrQWM3OdAhHnLJc5VQR ZqrGLpNrHE4JciqcTdEVXVtzqFZ8AfymGMpOiBpF0r9ygDL2dwwYznOiAeY0rDZX3jv9 Fz54cxjrDpmx9tnZVXpVLBJCHzD+bo4P6h3aUMEMJe4QeXKGV6cuKGTXb6yleAVzeQA0 mPLHc5t6md6Z/0HUydakhj+GeoLDp8BMtE+r78VGh3cInHFxahPDI2Y/Va9of/8UZjhY jLjzeULuzG3kXahcsS7kCdk4x8KQifSFJOkFdXG9B3raR5GCBmTYi5uyU/SVcH8nD+16 K7og== X-Gm-Message-State: AIkVDXJQJav+1ISVkYWzYMG5sAn+79XrG0ao3fG8kXWPUIRyaQr0boQBmOtSX5hhrYbMWA== X-Received: by 10.223.171.141 with SMTP id s13mr55707wrc.23.1484365823076; Fri, 13 Jan 2017 19:50:23 -0800 (PST) Received: from mail-wm0-f53.google.com (mail-wm0-f53.google.com. [74.125.82.53]) by smtp.gmail.com with ESMTPSA id u81sm9086258wmu.10.2017.01.13.19.50.22 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 13 Jan 2017 19:50:22 -0800 (PST) Received: by mail-wm0-f53.google.com with SMTP id c85so89661027wmi.1; Fri, 13 Jan 2017 19:50:22 -0800 (PST) X-Received: by 10.28.6.210 with SMTP id 201mr4794665wmg.85.1484365822219; Fri, 13 Jan 2017 19:50:22 -0800 (PST) MIME-Version: 1.0 Reply-To: cem@freebsd.org Received: by 10.194.29.72 with HTTP; Fri, 13 Jan 2017 19:50:21 -0800 (PST) In-Reply-To: <201701140239.v0E2doD2069898@slippy.cwsent.com> References: <201701140103.v0E13K8b068874@repo.freebsd.org> <201701140239.v0E2doD2069898@slippy.cwsent.com> From: Conrad Meyer Date: Fri, 13 Jan 2017 19:50:21 -0800 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: svn commit: r312103 - head/tests/sys/vfs To: Cy Schubert Cc: src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Type: text/plain; charset=UTF-8 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 14 Jan 2017 03:50:31 -0000 Hi Cy, r312107 fixes it. If the warning-cleanups and major changes were committed separately, the more major changes could then have been reverted independently. Unfortunately, they were not. The warnings are harmless, though, so just turning them down again is fine. Best, Conrad On Fri, Jan 13, 2017 at 6:39 PM, Cy Schubert wrote: > In message <201701140103.v0E13K8b068874@repo.freebsd.org>, "Conrad E. > Meyer" wr > ites: >> Author: cem >> Date: Sat Jan 14 01:03:20 2017 >> New Revision: 312103 >> URL: https://svnweb.freebsd.org/changeset/base/312103 >> >> Log: >> Revert r310994 >> >> Don't implement some terrible hack on a test by test basis. The >> framework fix is straightforward and can be chased up in the original >> bug. >> >> Reviewed by: ngie ("be my guest") >> >> Modified: >> head/tests/sys/vfs/lookup_cap_dotdot.c >> >> Modified: head/tests/sys/vfs/lookup_cap_dotdot.c >> ============================================================================= >> = >> --- head/tests/sys/vfs/lookup_cap_dotdot.c Sat Jan 14 01:01:02 2017 >> (r312102) >> +++ head/tests/sys/vfs/lookup_cap_dotdot.c Sat Jan 14 01:03:20 2017 >> (r312103) >> @@ -31,27 +31,23 @@ __FBSDID("$FreeBSD$"); >> #include >> #include >> #include >> -#include >> >> #include >> -#include >> #include >> #include >> #include >> >> #include "freebsd_test_suite/macros.h" >> >> -static char *abspath; >> -static int dirfd = -1; >> - >> -typedef void (*child_test_fn_t)(void); >> +static int dirfd = -1; >> +static char *abspath; >> >> static void >> -touchat(int _dirfd, const char *name) >> +touchat(int dirfd, const char *name) > > Buildworld is busted right here. It's probably best to leave the underbar > here and in the ATF_REQIRE below. > >> { >> int fd; >> >> - ATF_REQUIRE((fd = openat(_dirfd, name, O_CREAT | O_TRUNC | O_WRONLY, >> + ATF_REQUIRE((fd = openat(dirfd, name, O_CREAT | O_TRUNC | O_WRONLY, > > Here too. > >> 0777)) >= 0); >> ATF_REQUIRE(close(fd) == 0); >> } > > > -- > Cheers, > Cy Schubert > FreeBSD UNIX: Web: http://www.FreeBSD.org > > The need of the many outweighs the greed of the few. > > From owner-svn-src-head@freebsd.org Sat Jan 14 03:54:24 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B1107CAEC99; Sat, 14 Jan 2017 03:54:24 +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 7F7221EEF; Sat, 14 Jan 2017 03:54:24 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v0E3sNSO038813; Sat, 14 Jan 2017 03:54:23 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v0E3sNKA038812; Sat, 14 Jan 2017 03:54:23 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201701140354.v0E3sNKA038812@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Sat, 14 Jan 2017 03:54:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r312108 - head/contrib/netbsd-tests/lib/libc/gen/posix_spawn X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 14 Jan 2017 03:54:24 -0000 Author: ngie Date: Sat Jan 14 03:54:23 2017 New Revision: 312108 URL: https://svnweb.freebsd.org/changeset/base/312108 Log: Delete trailing whitespace and use __arraycount instead of nitems in contrib code MFC after: 1 week Modified: head/contrib/netbsd-tests/lib/libc/gen/posix_spawn/t_spawnattr.c Modified: head/contrib/netbsd-tests/lib/libc/gen/posix_spawn/t_spawnattr.c ============================================================================== --- head/contrib/netbsd-tests/lib/libc/gen/posix_spawn/t_spawnattr.c Sat Jan 14 02:29:25 2017 (r312107) +++ head/contrib/netbsd-tests/lib/libc/gen/posix_spawn/t_spawnattr.c Sat Jan 14 03:54:23 2017 (r312108) @@ -60,16 +60,16 @@ get_different_scheduler(void) /* get current schedule policy */ scheduler = sched_getscheduler(0); - for (i = 0; i < nitems(schedulers); i++) { + for (i = 0; i < __arraycount(schedulers); i++) { if (schedulers[i] == scheduler) break; } - ATF_REQUIRE_MSG(i < nitems(schedulers), + ATF_REQUIRE_MSG(i < __arraycount(schedulers), "Unknown current scheduler %d", scheduler); - + /* new scheduler */ i++; - if (i >= nitems(schedulers)) + if (i >= __arraycount(schedulers)) i = 0; return schedulers[i]; } @@ -85,7 +85,7 @@ get_different_priority(int scheduler) sched_getparam(0, ¶m); priority = param.sched_priority; - + /* * Change numerical value of the priority, to ensure that it * was set for the spawned child. @@ -127,7 +127,7 @@ ATF_TC_BODY(t_spawnattr, tc) scheduler = get_different_scheduler(); priority = get_different_priority(scheduler); sp.sched_priority = priority; - + sigemptyset(&sig); sigaddset(&sig, SIGUSR1); From owner-svn-src-head@freebsd.org Sat Jan 14 04:00:27 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A8B38CAED7E; Sat, 14 Jan 2017 04:00:27 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 60DD110F7; Sat, 14 Jan 2017 04:00:27 +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 v0E40QIq039148; Sat, 14 Jan 2017 04:00:26 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v0E40QZQ039146; Sat, 14 Jan 2017 04:00:26 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201701140400.v0E40QZQ039146@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Sat, 14 Jan 2017 04:00:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r312109 - head/tests/sys/vfs X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 14 Jan 2017 04:00:27 -0000 Author: ngie Date: Sat Jan 14 04:00:26 2017 New Revision: 312109 URL: https://svnweb.freebsd.org/changeset/base/312109 Log: Bump WARNS up to 6 again Has not been tested (can't be after r312103 without cem's hacks to atf/kyua)! Modified: head/tests/sys/vfs/Makefile head/tests/sys/vfs/lookup_cap_dotdot.c Modified: head/tests/sys/vfs/Makefile ============================================================================== --- head/tests/sys/vfs/Makefile Sat Jan 14 03:54:23 2017 (r312108) +++ head/tests/sys/vfs/Makefile Sat Jan 14 04:00:26 2017 (r312109) @@ -9,4 +9,6 @@ CFLAGS.lookup_cap_dotdot.c+= -I${SRCTOP} PLAIN_TESTS_SH+= trailing_slash +WARNS?= 6 + .include Modified: head/tests/sys/vfs/lookup_cap_dotdot.c ============================================================================== --- head/tests/sys/vfs/lookup_cap_dotdot.c Sat Jan 14 03:54:23 2017 (r312108) +++ head/tests/sys/vfs/lookup_cap_dotdot.c Sat Jan 14 04:00:26 2017 (r312109) @@ -43,11 +43,11 @@ static int dirfd = -1; static char *abspath; static void -touchat(int dirfd, const char *name) +touchat(int _dirfd, const char *name) { int fd; - ATF_REQUIRE((fd = openat(dirfd, name, O_CREAT | O_TRUNC | O_WRONLY, + ATF_REQUIRE((fd = openat(_dirfd, name, O_CREAT | O_TRUNC | O_WRONLY, 0777)) >= 0); ATF_REQUIRE(close(fd) == 0); } @@ -117,7 +117,6 @@ ATF_TC_HEAD(lookup_cap_dotdot__basic, tc ATF_TC_BODY(lookup_cap_dotdot__basic, tc) { cap_rights_t rights; - int fd; check_capsicum(); prepare_dotdot_tests(); @@ -141,7 +140,6 @@ ATF_TC_HEAD(lookup_cap_dotdot__advanced, ATF_TC_BODY(lookup_cap_dotdot__advanced, tc) { cap_rights_t rights; - int fd; check_capsicum(); prepare_dotdot_tests(); @@ -220,7 +218,6 @@ ATF_TC_HEAD(lookup_cap_dotdot__negative, ATF_TC_BODY(lookup_cap_dotdot__negative, tc) { cap_rights_t rights; - int fd; check_capsicum(); prepare_dotdot_tests(); From owner-svn-src-head@freebsd.org Sat Jan 14 04:07:52 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9C4CECAF039; Sat, 14 Jan 2017 04:07:52 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: from mail-pg0-x241.google.com (mail-pg0-x241.google.com [IPv6:2607:f8b0:400e:c05::241]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 6B2891685; Sat, 14 Jan 2017 04:07:52 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: by mail-pg0-x241.google.com with SMTP id b1so159367pgc.1; Fri, 13 Jan 2017 20:07:52 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=XDJwGUlzmWW4a+SyDLvoIoiKJPH2ri0I+mk6ejACE6o=; b=NUvFza+jBK9ReOvbT84ZSXmyCO9D55L+E1W2SXo0v0OAsk8m2MOkIH3of6JBCzXGVu 7jIkBaLvZ7BEP4nEsv4kp7JEnNXjIGWcYdluguSMXt/YAL85vPbFVr2+6PdaWvZWj0yq WgOHBtVr1eOerIRhxcPfGkKGPHLmk0rozxcUrm8vuXHmOb6hLPx/08dw5Z3C55zQNL+m 4pImozSjj7mV7LnbThHCqvzKUjjHMJ6JmwvMBqxg2zGP8vWwmxR0cSTkGnZ8lY1mkMbE KcUpBXxV0vPmYLGU0i0yFy1TKPMKJkcVL5NEkZM5AI70ZpUgnPNv1J56oLitXqTqyoSH i5qg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=XDJwGUlzmWW4a+SyDLvoIoiKJPH2ri0I+mk6ejACE6o=; b=Ozxh25uvyaMjauMyFYoQwwz0iXob8WQaf3Lm+SC0BY0ww1QTJp0TyEtG60re4BsPBd nrWaLUX7iqzMWf6pPRqKGxr7CeB69ZfJlZ/uOV++EcfqWzHsJWhsWAnLSPLprLPdXW4Z z1+TgSXhmx1GJgW4phH+ijnN+K6GYG2qU8W0mL08ym3u/9sbW1Gsfb19+9NAOHeqdM2e DKO8WQnffAljhmKX2y9/P8sL5Etw2nGdc88EhiFQUxFHa2lFdcubaRwxG33H/fWdTJ4h qo3vIRlldqXL1ZDUeWCmJiVJseDlINpS+UocYJxuairZnuJ/2ybOttyqGctVQKig2k/Q 2rng== X-Gm-Message-State: AIkVDXKYpXMLJOmHvzW5hp+NnNHWmAVY5B7amgRf9TWJmGMdtJcIiaNMe0Hs0WzaUOgt/Q== X-Received: by 10.84.205.69 with SMTP id o5mr33632992plh.70.1484366871709; Fri, 13 Jan 2017 20:07:51 -0800 (PST) Received: from fuji-wireless.local (c-73-19-52-228.hsd1.wa.comcast.net. [73.19.52.228]) by smtp.gmail.com with ESMTPSA id t21sm32226704pfa.1.2017.01.13.20.07.50 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 13 Jan 2017 20:07:51 -0800 (PST) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 10.2 \(3259\)) Subject: Re: svn commit: r312103 - head/tests/sys/vfs From: "Ngie Cooper (yaneurabeya)" In-Reply-To: Date: Fri, 13 Jan 2017 20:07:50 -0800 Cc: Cy Schubert , src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Transfer-Encoding: 7bit Message-Id: <822E173E-C5FE-4E1C-9012-38A48A9E3703@gmail.com> References: <201701140103.v0E13K8b068874@repo.freebsd.org> <201701140239.v0E2doD2069898@slippy.cwsent.com> To: cem@freebsd.org X-Mailer: Apple Mail (2.3259) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 14 Jan 2017 04:07:52 -0000 > On Jan 13, 2017, at 7:50 PM, Conrad Meyer wrote: > > Hi Cy, > > r312107 fixes it. If the warning-cleanups and major changes were > committed separately, the more major changes could then have been > reverted independently. Unfortunately, they were not. The warnings > are harmless, though, so just turning them down again is fine. Trivial fixes reapplied in r312109. From owner-svn-src-head@freebsd.org Sat Jan 14 04:09:02 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A61F5CAF0AA; Sat, 14 Jan 2017 04:09:02 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 78599181C; Sat, 14 Jan 2017 04:09:02 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v0E49113043298; Sat, 14 Jan 2017 04:09:01 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v0E4914j043297; Sat, 14 Jan 2017 04:09:01 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201701140409.v0E4914j043297@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Sat, 14 Jan 2017 04:09:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r312110 - head/tests/sys/vm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 14 Jan 2017 04:09:02 -0000 Author: ngie Date: Sat Jan 14 04:09:01 2017 New Revision: 312110 URL: https://svnweb.freebsd.org/changeset/base/312110 Log: Fix -Wsign-compare warnings The loop index (i) doesn't need to be size_t as its comparison is signed MFC after: 1 week Sponsored by: Dell EMC Isilon Modified: head/tests/sys/vm/mmap_test.c Modified: head/tests/sys/vm/mmap_test.c ============================================================================== --- head/tests/sys/vm/mmap_test.c Sat Jan 14 04:00:26 2017 (r312109) +++ head/tests/sys/vm/mmap_test.c Sat Jan 14 04:09:01 2017 (r312110) @@ -184,8 +184,7 @@ ATF_TC_WITHOUT_HEAD(mmap__dev_zero_priva ATF_TC_BODY(mmap__dev_zero_private, tc) { char *p1, *p2, *p3; - size_t i; - int fd, pagesize; + int fd, i, pagesize; ATF_REQUIRE((pagesize = getpagesize()) > 0); ATF_REQUIRE((fd = open("/dev/zero", O_RDONLY)) >= 0); @@ -197,7 +196,7 @@ ATF_TC_BODY(mmap__dev_zero_private, tc) ATF_REQUIRE(p2 != MAP_FAILED); for (i = 0; i < pagesize; i++) - ATF_REQUIRE_EQ_MSG(0, p1[i], "byte at p1[%zu] is %x", i, p1[i]); + ATF_REQUIRE_EQ_MSG(0, p1[i], "byte at p1[%d] is %x", i, p1[i]); ATF_REQUIRE(memcmp(p1, p2, pagesize) == 0); @@ -224,8 +223,7 @@ ATF_TC_WITHOUT_HEAD(mmap__dev_zero_share ATF_TC_BODY(mmap__dev_zero_shared, tc) { char *p1, *p2, *p3; - size_t i; - int fd, pagesize; + int fd, i, pagesize; ATF_REQUIRE((pagesize = getpagesize()) > 0); ATF_REQUIRE((fd = open("/dev/zero", O_RDWR)) >= 0); @@ -237,7 +235,7 @@ ATF_TC_BODY(mmap__dev_zero_shared, tc) ATF_REQUIRE(p2 != MAP_FAILED); for (i = 0; i < pagesize; i++) - ATF_REQUIRE_EQ_MSG(0, p1[i], "byte at p1[%zu] is %x", i, p1[i]); + ATF_REQUIRE_EQ_MSG(0, p1[i], "byte at p1[%d] is %x", i, p1[i]); ATF_REQUIRE(memcmp(p1, p2, pagesize) == 0); From owner-svn-src-head@freebsd.org Sat Jan 14 04:10:05 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 60E28CAF123; Sat, 14 Jan 2017 04:10:05 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3078519A9; Sat, 14 Jan 2017 04:10:05 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v0E4A44v043400; Sat, 14 Jan 2017 04:10:04 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v0E4A4P0043399; Sat, 14 Jan 2017 04:10:04 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201701140410.v0E4A4P0043399@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Sat, 14 Jan 2017 04:10:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r312111 - head/tests/sys/file X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 14 Jan 2017 04:10:05 -0000 Author: ngie Date: Sat Jan 14 04:10:04 2017 New Revision: 312111 URL: https://svnweb.freebsd.org/changeset/base/312111 Log: Remove unused vars to fix -Wunused issues MFC after: 3 days Sponsored by: Dell EMC Isilon Modified: head/tests/sys/file/ftruncate_test.c Modified: head/tests/sys/file/ftruncate_test.c ============================================================================== --- head/tests/sys/file/ftruncate_test.c Sat Jan 14 04:09:01 2017 (r312110) +++ head/tests/sys/file/ftruncate_test.c Sat Jan 14 04:10:04 2017 (r312111) @@ -57,7 +57,7 @@ static off_t lengths[] = {0, 1, 2, 3, 4, static int lengths_count = sizeof(lengths) / sizeof(off_t); int -main(int argc, char *argv[]) +main(void) { int error, fd, fds[2], i, read_only_fd; char path[PATH_MAX]; From owner-svn-src-head@freebsd.org Sat Jan 14 04:13:29 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 49467CAF2AE; Sat, 14 Jan 2017 04:13: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 19B791DD1; Sat, 14 Jan 2017 04:13:29 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v0E4DSKg047070; Sat, 14 Jan 2017 04:13:28 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v0E4DSrq047069; Sat, 14 Jan 2017 04:13:28 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201701140413.v0E4DSrq047069@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Sat, 14 Jan 2017 04:13:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r312112 - head/sys/kern X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 14 Jan 2017 04:13:29 -0000 Author: ngie Date: Sat Jan 14 04:13:28 2017 New Revision: 312112 URL: https://svnweb.freebsd.org/changeset/base/312112 Log: Fix -Wunused on gcc 4.9 (x was set but not used) MFC after: 3 days Sponsored by: Dell EMC Isilon Modified: head/sys/kern/subr_unit.c Modified: head/sys/kern/subr_unit.c ============================================================================== --- head/sys/kern/subr_unit.c Sat Jan 14 04:10:04 2017 (r312111) +++ head/sys/kern/subr_unit.c Sat Jan 14 04:13:28 2017 (r312112) @@ -986,7 +986,7 @@ main(int argc, char **argv) long count = 10000; /* Number of unrs to test */ long reps = 1, m; int ch; - u_int i, x, j; + u_int i, j; verbose = false; @@ -999,7 +999,7 @@ main(int argc, char **argv) usage(argv); exit(2); } - + break; case 'v': verbose = true; @@ -1026,7 +1026,6 @@ main(int argc, char **argv) printf("sizeof(struct unrb) %zu\n", sizeof(struct unrb)); printf("sizeof(struct unrhdr) %zu\n", sizeof(struct unrhdr)); printf("NBITS %lu\n", (unsigned long)NBITS); - x = 1; for (m = 0; m < count * reps; m++) { j = random(); i = (j >> 1) % count; From owner-svn-src-head@freebsd.org Sat Jan 14 04:16:15 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4DA57CAF356; Sat, 14 Jan 2017 04:16:15 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0439D10DC; Sat, 14 Jan 2017 04:16:14 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v0E4GENW047589; Sat, 14 Jan 2017 04:16:14 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v0E4GEju047588; Sat, 14 Jan 2017 04:16:14 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201701140416.v0E4GEju047588@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Sat, 14 Jan 2017 04:16:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r312113 - head/sys/kern X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 14 Jan 2017 04:16:15 -0000 Author: ngie Date: Sat Jan 14 04:16:13 2017 New Revision: 312113 URL: https://svnweb.freebsd.org/changeset/base/312113 Log: Clean up trailing whitespace MFC after: 3 days Sponsored by: Dell EMC Isilon Modified: head/sys/kern/subr_unit.c Modified: head/sys/kern/subr_unit.c ============================================================================== --- head/sys/kern/subr_unit.c Sat Jan 14 04:13:28 2017 (r312112) +++ head/sys/kern/subr_unit.c Sat Jan 14 04:16:13 2017 (r312113) @@ -216,7 +216,7 @@ ub_full(struct unrb *ub, int len) * Consistency check function. * * Checks the internal consistency as well as we can. - * + * * Called at all boundaries of this API. */ static void @@ -240,7 +240,7 @@ check_unrhdr(struct unrhdr *uh, int line w = 0; bit_count(ub->map, 0, up->len, &w); y += w; - } else if (up->ptr != NULL) + } else if (up->ptr != NULL) y += up->len; } KASSERT (y == uh->busy, @@ -375,7 +375,7 @@ is_bitmap(struct unrhdr *uh, struct unr /* * Look for sequence of items which can be combined into a bitmap, if * multiple are present, take the one which saves most memory. - * + * * Return (1) if a sequence was found to indicate that another call * might be able to do more. Return (0) if we found no suitable sequence. * @@ -591,7 +591,7 @@ alloc_unrl(struct unrhdr *uh) } /* - * We can always allocate from the first list element, so if we have + * We can always allocate from the first list element, so if we have * nothing on the list, we must have run out of unit numbers. */ if (up == NULL) @@ -803,7 +803,7 @@ free_unrl(struct unrhdr *uh, u_int item, /* Handle bitmap items */ if (is_bitmap(uh, up)) { ub = up->ptr; - + KASSERT(bit_test(ub->map, item) != 0, ("UNR: Freeing free item %d (bitmap)\n", item)); bit_clear(ub->map, item); @@ -909,7 +909,7 @@ print_unr(struct unrhdr *uh, struct unr for (x = 0; x < up->len; x++) { if (bit_test(ub->map, x)) printf("#"); - else + else printf(" "); } printf("]\n"); From owner-svn-src-head@freebsd.org Sat Jan 14 04:20:07 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 66F09CAF434; Sat, 14 Jan 2017 04:20:07 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 33D7C1397; Sat, 14 Jan 2017 04:20:07 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v0E4K6qJ047793; Sat, 14 Jan 2017 04:20:06 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v0E4K61u047792; Sat, 14 Jan 2017 04:20:06 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201701140420.v0E4K61u047792@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Sat, 14 Jan 2017 04:20:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r312114 - head/tests/sys X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 14 Jan 2017 04:20:07 -0000 Author: ngie Date: Sat Jan 14 04:20:06 2017 New Revision: 312114 URL: https://svnweb.freebsd.org/changeset/base/312114 Log: Enable WARNS?= 6 across all of tests/sys MFC after: 1 week Sponsored by: Dell EMC Isilon Added: head/tests/sys/Makefile.inc (contents, props changed) Added: head/tests/sys/Makefile.inc ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tests/sys/Makefile.inc Sat Jan 14 04:20:06 2017 (r312114) @@ -0,0 +1,3 @@ +# $FreeBSD$ + +WARNS?= 6 From owner-svn-src-head@freebsd.org Sat Jan 14 04:20:44 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 22CFECAF4AC; Sat, 14 Jan 2017 04:20:44 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E6A1E15D0; Sat, 14 Jan 2017 04:20: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 v0E4Khaj047865; Sat, 14 Jan 2017 04:20:43 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v0E4Khg0047864; Sat, 14 Jan 2017 04:20:43 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201701140420.v0E4Khg0047864@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Sat, 14 Jan 2017 04:20:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r312115 - head/tests/sys/vfs X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 14 Jan 2017 04:20:44 -0000 Author: ngie Date: Sat Jan 14 04:20:42 2017 New Revision: 312115 URL: https://svnweb.freebsd.org/changeset/base/312115 Log: Remove WARNS set globally by ../Makefile.inc now Sponsored by: Dell EMC Isilon Modified: head/tests/sys/vfs/Makefile Modified: head/tests/sys/vfs/Makefile ============================================================================== --- head/tests/sys/vfs/Makefile Sat Jan 14 04:20:06 2017 (r312114) +++ head/tests/sys/vfs/Makefile Sat Jan 14 04:20:42 2017 (r312115) @@ -9,6 +9,4 @@ CFLAGS.lookup_cap_dotdot.c+= -I${SRCTOP} PLAIN_TESTS_SH+= trailing_slash -WARNS?= 6 - .include From owner-svn-src-head@freebsd.org Sat Jan 14 04:23:42 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id BE954CAF61C; Sat, 14 Jan 2017 04:23:42 +0000 (UTC) (envelope-from cy.schubert@komquats.com) Received: from smtp-out-no.shaw.ca (smtp-out-no.shaw.ca [64.59.134.9]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "Client", Issuer "CA" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 74AB71A07; Sat, 14 Jan 2017 04:23:42 +0000 (UTC) (envelope-from cy.schubert@komquats.com) Received: from spqr.komquats.com ([96.50.22.10]) by shaw.ca with SMTP id SFsKcbKFKcWiHSFsLc9Bcy; Fri, 13 Jan 2017 21:23:34 -0700 X-Authority-Analysis: v=2.2 cv=JLBLi4Cb c=1 sm=1 tr=0 a=jvE2nwUzI0ECrNeyr98KWA==:117 a=jvE2nwUzI0ECrNeyr98KWA==:17 a=kj9zAlcOel0A:10 a=IgFoBzBjUZAA:10 a=YxBL1-UpAAAA:8 a=6I5d2MoRAAAA:8 a=BWvPGDcYAAAA:8 a=Ot_gtzyipYd0_Kvi8l8A:9 a=CjuIK1q_8ugA:10 a=Ia-lj3WSrqcvXOmTRaiG:22 a=IjZwj45LgO3ly-622nXo:22 a=pxhY87DP9d2VeQe4joPk:22 Received: from slippy.cwsent.com (slippy [10.1.1.91]) by spqr.komquats.com (Postfix) with ESMTPS id 72DBCABE; Fri, 13 Jan 2017 20:23:32 -0800 (PST) Received: from slippy (localhost [127.0.0.1]) by slippy.cwsent.com (8.15.2/8.15.2) with ESMTP id v0E4NVuC090024; Fri, 13 Jan 2017 20:23:31 -0800 (PST) (envelope-from Cy.Schubert@cschubert.com) Message-Id: <201701140423.v0E4NVuC090024@slippy.cwsent.com> X-Mailer: exmh version 2.8.0 04/21/2012 with nmh-1.6 Reply-to: Cy Schubert From: Cy Schubert X-os: FreeBSD X-Sender: cy@cwsent.com X-URL: http://www.cschubert.com/ To: cem@freebsd.org cc: Cy Schubert , src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r312103 - head/tests/sys/vfs In-Reply-To: Message from Conrad Meyer of "Fri, 13 Jan 2017 19:50:21 -0800." Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Fri, 13 Jan 2017 20:23:31 -0800 X-CMAE-Envelope: MS4wfNc9jXqM3oNrPwzlDMKndgzCb+OZXX3Zyj1IcammmeLRTZRhd7pheUywhcLQb8M2Klv7oyyBH/xTl83jnpfg4EHOKx5HIm5A6bSjsprQmbtHt8ZP18/n UOk7ZjuBmPi65qCfAQfXZPaPY/PIZt4/MUc/cImVhWfqBqAvwOLX5OD/zUGEIRIBTlyohuxZQfvqZoWJwUw0EI5CruNn5EubG4OU7cE5UWimjQSN4OgDvfoS P4KuIdQnkaai//6RmX1Lqij+gbcb2igT6A58HSPv2fBOQUe/IP0/2y4JN8lSTow4 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 14 Jan 2017 04:23:42 -0000 No problem. My make.conf doesn't adjust any warning levels, they're vanilla so, the build barfed at that line. -- Cheers, Cy Schubert FreeBSD UNIX: Web: http://www.FreeBSD.org The need of the many outweighs the greed of the few. In message , Conrad Meyer writes: > Hi Cy, > > r312107 fixes it. If the warning-cleanups and major changes were > committed separately, the more major changes could then have been > reverted independently. Unfortunately, they were not. The warnings > are harmless, though, so just turning them down again is fine. > > Best, > Conrad > > On Fri, Jan 13, 2017 at 6:39 PM, Cy Schubert wrote > : > > In message <201701140103.v0E13K8b068874@repo.freebsd.org>, "Conrad E. > > Meyer" wr > > ites: > >> Author: cem > >> Date: Sat Jan 14 01:03:20 2017 > >> New Revision: 312103 > >> URL: https://svnweb.freebsd.org/changeset/base/312103 > >> > >> Log: > >> Revert r310994 > >> > >> Don't implement some terrible hack on a test by test basis. The > >> framework fix is straightforward and can be chased up in the original > >> bug. > >> > >> Reviewed by: ngie ("be my guest") > >> > >> Modified: > >> head/tests/sys/vfs/lookup_cap_dotdot.c > >> > >> Modified: head/tests/sys/vfs/lookup_cap_dotdot.c > >> ========================================================================== > === > >> = > >> --- head/tests/sys/vfs/lookup_cap_dotdot.c Sat Jan 14 01:01:02 2017 > >> (r312102) > >> +++ head/tests/sys/vfs/lookup_cap_dotdot.c Sat Jan 14 01:03:20 2017 > >> (r312103) > >> @@ -31,27 +31,23 @@ __FBSDID("$FreeBSD$"); > >> #include > >> #include > >> #include > >> -#include > >> > >> #include > >> -#include > >> #include > >> #include > >> #include > >> > >> #include "freebsd_test_suite/macros.h" > >> > >> -static char *abspath; > >> -static int dirfd = -1; > >> - > >> -typedef void (*child_test_fn_t)(void); > >> +static int dirfd = -1; > >> +static char *abspath; > >> > >> static void > >> -touchat(int _dirfd, const char *name) > >> +touchat(int dirfd, const char *name) > > > > Buildworld is busted right here. It's probably best to leave the underbar > > here and in the ATF_REQIRE below. > > > >> { > >> int fd; > >> > >> - ATF_REQUIRE((fd = openat(_dirfd, name, O_CREAT | O_TRUNC | O_WRONLY, > >> + ATF_REQUIRE((fd = openat(dirfd, name, O_CREAT | O_TRUNC | O_WRONLY, > > > > Here too. > > > >> 0777)) >= 0); > >> ATF_REQUIRE(close(fd) == 0); > >> } > > > > > > -- > > Cheers, > > Cy Schubert > > FreeBSD UNIX: Web: http://www.FreeBSD.org > > > > The need of the many outweighs the greed of the few. > > > > > From owner-svn-src-head@freebsd.org Sat Jan 14 05:02:54 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7D46BCAF2EC; Sat, 14 Jan 2017 05:02:54 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 46BA213E5; Sat, 14 Jan 2017 05:02: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 v0E52r4f068114; Sat, 14 Jan 2017 05:02:53 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v0E52rED068113; Sat, 14 Jan 2017 05:02:53 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201701140502.v0E52rED068113@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Sat, 14 Jan 2017 05:02:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r312118 - head/tests/sys/kern/execve X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 14 Jan 2017 05:02:54 -0000 Author: ngie Date: Sat Jan 14 05:02:53 2017 New Revision: 312118 URL: https://svnweb.freebsd.org/changeset/base/312118 Log: Fix -Wformat issue with zero-length format string passed to err(3) MFC after: 3 days Tested with: clang, gcc 4.2.1, gcc 4.9 Sponsored by: Dell EMC Isilon Modified: head/tests/sys/kern/execve/execve_helper.c Modified: head/tests/sys/kern/execve/execve_helper.c ============================================================================== --- head/tests/sys/kern/execve/execve_helper.c Sat Jan 14 04:34:30 2017 (r312117) +++ head/tests/sys/kern/execve/execve_helper.c Sat Jan 14 05:02:53 2017 (r312118) @@ -50,5 +50,5 @@ main(int argc, char **argv) } execve(argv[1], &argv[1], NULL); - err(1, ""); + err(1, "%s", ""); } From owner-svn-src-head@freebsd.org Sat Jan 14 05:06:15 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7931FCAF373; Sat, 14 Jan 2017 05:06:15 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 537031625; Sat, 14 Jan 2017 05:06:15 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v0E56Ef8068276; Sat, 14 Jan 2017 05:06:14 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v0E56EHT068275; Sat, 14 Jan 2017 05:06:14 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201701140506.v0E56EHT068275@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Sat, 14 Jan 2017 05:06:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r312119 - head/sys/kern X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 14 Jan 2017 05:06:15 -0000 Author: ngie Date: Sat Jan 14 05:06:14 2017 New Revision: 312119 URL: https://svnweb.freebsd.org/changeset/base/312119 Log: encode_long, encode_timeval: mechanically replace `exp` with `exponent` This helps fix a -Wshadow issue with exp(3) with tests/sys/acct/acct_test, which include math.h, which in turn defines exp(3) MFC after: 2 weeks Tested with: clang, gcc 4.2.1, gcc 4.9 Sponsored by: Dell EMC Isilon Modified: head/sys/kern/kern_acct.c Modified: head/sys/kern/kern_acct.c ============================================================================== --- head/sys/kern/kern_acct.c Sat Jan 14 05:02:53 2017 (r312118) +++ head/sys/kern/kern_acct.c Sat Jan 14 05:06:14 2017 (r312119) @@ -469,8 +469,8 @@ static uint32_t encode_timeval(struct timeval tv) { int log2_s; - int val, exp; /* Unnormalized value and exponent */ - int norm_exp; /* Normalized exponent */ + int val, exponent; /* Unnormalized value and exponent */ + int norm_exponent; /* Normalized exponent */ int shift; /* @@ -481,7 +481,7 @@ encode_timeval(struct timeval tv) if (tv.tv_sec == 0) { if (tv.tv_usec == 0) return (0); - exp = 0; + exponent = 0; val = tv.tv_usec; } else { /* @@ -490,24 +490,24 @@ encode_timeval(struct timeval tv) */ log2_s = fls(tv.tv_sec) - 1; if (log2_s + LOG2_1M < CALC_BITS) { - exp = 0; + exponent = 0; val = 1000000 * tv.tv_sec + tv.tv_usec; } else { - exp = log2_s + LOG2_1M - CALC_BITS; + exponent = log2_s + LOG2_1M - CALC_BITS; val = (unsigned int)(((uint64_t)1000000 * tv.tv_sec + - tv.tv_usec) >> exp); + tv.tv_usec) >> exponent); } } /* Now normalize and pack the value into an IEEE-754 float. */ - norm_exp = fls(val) - 1; - shift = FLT_MANT_DIG - norm_exp - 1; + norm_exponent = fls(val) - 1; + shift = FLT_MANT_DIG - norm_exponent - 1; #ifdef ACCT_DEBUG printf("val=%d exp=%d shift=%d log2(val)=%d\n", - val, exp, shift, norm_exp); - printf("exp=%x mant=%x\n", FLT_MAX_EXP - 1 + exp + norm_exp, + val, exponent, shift, norm_exponent); + printf("exp=%x mant=%x\n", FLT_MAX_EXP - 1 + exponent + norm_exponent, ((shift > 0 ? (val << shift) : (val >> -shift)) & MANT_MASK)); #endif - return (((FLT_MAX_EXP - 1 + exp + norm_exp) << (FLT_MANT_DIG - 1)) | + return (((FLT_MAX_EXP - 1 + exponent + norm_exponent) << (FLT_MANT_DIG - 1)) | ((shift > 0 ? val << shift : val >> -shift) & MANT_MASK)); } @@ -518,7 +518,7 @@ encode_timeval(struct timeval tv) static uint32_t encode_long(long val) { - int norm_exp; /* Normalized exponent */ + int norm_exponent; /* Normalized exponent */ int shift; if (val == 0) @@ -529,15 +529,15 @@ encode_long(long val) val); val = LONG_MAX; } - norm_exp = fls(val) - 1; - shift = FLT_MANT_DIG - norm_exp - 1; + norm_exponent = fls(val) - 1; + shift = FLT_MANT_DIG - norm_exponent - 1; #ifdef ACCT_DEBUG printf("val=%d shift=%d log2(val)=%d\n", - val, shift, norm_exp); - printf("exp=%x mant=%x\n", FLT_MAX_EXP - 1 + exp + norm_exp, + val, shift, norm_exponent); + printf("exp=%x mant=%x\n", FLT_MAX_EXP - 1 + exp + norm_exponent, ((shift > 0 ? (val << shift) : (val >> -shift)) & MANT_MASK)); #endif - return (((FLT_MAX_EXP - 1 + norm_exp) << (FLT_MANT_DIG - 1)) | + return (((FLT_MAX_EXP - 1 + norm_exponent) << (FLT_MANT_DIG - 1)) | ((shift > 0 ? val << shift : val >> -shift) & MANT_MASK)); } From owner-svn-src-head@freebsd.org Sat Jan 14 05:18:19 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id CCEA2CAF6AC; Sat, 14 Jan 2017 05:18: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 9574B1C95; Sat, 14 Jan 2017 05:18:19 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v0E5IIBv072226; Sat, 14 Jan 2017 05:18:18 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v0E5IIj6072225; Sat, 14 Jan 2017 05:18:18 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201701140518.v0E5IIj6072225@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Sat, 14 Jan 2017 05:18:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r312120 - head/tests/sys/mac/bsdextended X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 14 Jan 2017 05:18:19 -0000 Author: ngie Date: Sat Jan 14 05:18:18 2017 New Revision: 312120 URL: https://svnweb.freebsd.org/changeset/base/312120 Log: Fix warnings - Staticize test_num - Promote i to size_t to deal with -Wsign-compare issues Tested with: clang, gcc, gcc49 MFC after: 1 week Sponsored by: Dell EMC Isilon Modified: head/tests/sys/mac/bsdextended/ugidfw_test.c Modified: head/tests/sys/mac/bsdextended/ugidfw_test.c ============================================================================== --- head/tests/sys/mac/bsdextended/ugidfw_test.c Sat Jan 14 05:06:14 2017 (r312119) +++ head/tests/sys/mac/bsdextended/ugidfw_test.c Sat Jan 14 05:18:18 2017 (r312120) @@ -71,7 +71,7 @@ static const char *test_groups[] = { "bin", }; -int test_num; +static int test_num; /* * List of test strings that must go in (and come out) of libugidfw intact. @@ -149,7 +149,8 @@ test_libugidfw_strings(void) struct mac_bsdextended_rule rule; char errorstr[256]; char rulestr[256]; - int error, i; + size_t i; + int error; for (i = 0; i < nitems(test_users); i++, test_num++) { if (getpwnam(test_users[i]) == NULL) @@ -171,7 +172,7 @@ test_libugidfw_strings(void) error = bsde_parse_rule_string(test_strings[i], &rule, sizeof(errorstr), errorstr); if (error == -1) - printf("not ok %d # bsde_parse_rule_string: '%s' (%d) " + printf("not ok %d # bsde_parse_rule_string: '%s' (%zu) " "failed: %s\n", test_num, test_strings[i], i, errorstr); else printf("ok %d\n", test_num); From owner-svn-src-head@freebsd.org Sat Jan 14 05:24:37 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 25E09CAF853; Sat, 14 Jan 2017 05:24:37 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id DE05810AB; Sat, 14 Jan 2017 05:24:36 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v0E5Oa8i076170; Sat, 14 Jan 2017 05:24:36 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v0E5Oass076169; Sat, 14 Jan 2017 05:24:36 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201701140524.v0E5Oass076169@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Sat, 14 Jan 2017 05:24:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r312121 - head/tests/sys/kern/execve X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 14 Jan 2017 05:24:37 -0000 Author: ngie Date: Sat Jan 14 05:24:35 2017 New Revision: 312121 URL: https://svnweb.freebsd.org/changeset/base/312121 Log: Follow up to r312118 State that execve failed instead of just printing out the program name and strerror(errno) via err(3). MFC after: 3 days X-MFC with: r312118 Sponsored by: Dell EMC Isilon Modified: head/tests/sys/kern/execve/execve_helper.c Modified: head/tests/sys/kern/execve/execve_helper.c ============================================================================== --- head/tests/sys/kern/execve/execve_helper.c Sat Jan 14 05:18:18 2017 (r312120) +++ head/tests/sys/kern/execve/execve_helper.c Sat Jan 14 05:24:35 2017 (r312121) @@ -50,5 +50,5 @@ main(int argc, char **argv) } execve(argv[1], &argv[1], NULL); - err(1, "%s", ""); + err(1, "execve failed"); } From owner-svn-src-head@freebsd.org Sat Jan 14 06:16:59 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 20FB5CAF48A; Sat, 14 Jan 2017 06:16:59 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C49661749; Sat, 14 Jan 2017 06:16:58 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v0E6GwPH096108; Sat, 14 Jan 2017 06:16:58 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v0E6Gw4C096107; Sat, 14 Jan 2017 06:16:58 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201701140616.v0E6Gw4C096107@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Sat, 14 Jan 2017 06:16:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r312122 - head/contrib/netbsd-tests/fs/nfs/nfsservice/rpcbind X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 14 Jan 2017 06:16:59 -0000 Author: ngie Date: Sat Jan 14 06:16:57 2017 New Revision: 312122 URL: https://svnweb.freebsd.org/changeset/base/312122 Log: Remove contrib/netbsd-tests/fs/nfs/nfsservice/rpcbind This should have been pruned in r305358 MFC after: 3 days Sponsored by: Dell EMC Isilon Deleted: head/contrib/netbsd-tests/fs/nfs/nfsservice/rpcbind/ From owner-svn-src-head@freebsd.org Sat Jan 14 06:20:38 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 267B0CAF79C; Sat, 14 Jan 2017 06:20:38 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D9F471B33; Sat, 14 Jan 2017 06:20:37 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v0E6KbU9098450; Sat, 14 Jan 2017 06:20:37 GMT (envelope-from mjg@FreeBSD.org) Received: (from mjg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v0E6Kada098447; Sat, 14 Jan 2017 06:20:36 GMT (envelope-from mjg@FreeBSD.org) Message-Id: <201701140620.v0E6Kada098447@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mjg set sender to mjg@FreeBSD.org using -f From: Mateusz Guzik Date: Sat, 14 Jan 2017 06:20:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r312124 - head/sys/fs/tmpfs X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 14 Jan 2017 06:20:38 -0000 Author: mjg Date: Sat Jan 14 06:20:36 2017 New Revision: 312124 URL: https://svnweb.freebsd.org/changeset/base/312124 Log: tmpfs: manage tm_pages_used with atomics Reviewed by: kib (previous version) Modified: head/sys/fs/tmpfs/tmpfs.h head/sys/fs/tmpfs/tmpfs_subr.c head/sys/fs/tmpfs/tmpfs_vfsops.c Modified: head/sys/fs/tmpfs/tmpfs.h ============================================================================== --- head/sys/fs/tmpfs/tmpfs.h Sat Jan 14 06:18:54 2017 (r312123) +++ head/sys/fs/tmpfs/tmpfs.h Sat Jan 14 06:20:36 2017 (r312124) @@ -312,12 +312,12 @@ struct tmpfs_mount { /* Maximum number of memory pages available for use by the file * system, set during mount time. This variable must never be * used directly as it may be bigger than the current amount of - * free memory; in the extreme case, it will hold the SIZE_MAX + * free memory; in the extreme case, it will hold the ULONG_MAX * value. */ - size_t tm_pages_max; + u_long tm_pages_max; /* Number of pages in use by the file system. */ - size_t tm_pages_used; + u_long tm_pages_used; /* Pointer to the node representing the root directory of this * file system. */ Modified: head/sys/fs/tmpfs/tmpfs_subr.c ============================================================================== --- head/sys/fs/tmpfs/tmpfs_subr.c Sat Jan 14 06:18:54 2017 (r312123) +++ head/sys/fs/tmpfs/tmpfs_subr.c Sat Jan 14 06:20:36 2017 (r312124) @@ -129,7 +129,7 @@ tmpfs_pages_check_avail(struct tmpfs_mou if (tmpfs_mem_avail() < req_pages) return (0); - if (tmp->tm_pages_max != SIZE_MAX && + if (tmp->tm_pages_max != ULONG_MAX && tmp->tm_pages_max < req_pages + tmpfs_pages_used(tmp)) return (0); @@ -327,9 +327,7 @@ tmpfs_free_node(struct tmpfs_mount *tmp, case VREG: uobj = node->tn_reg.tn_aobj; if (uobj != NULL) { - TMPFS_LOCK(tmp); - tmp->tm_pages_used -= uobj->size; - TMPFS_UNLOCK(tmp); + atomic_subtract_long(&tmp->tm_pages_used, uobj->size); KASSERT((uobj->flags & OBJ_TMPFS) == 0, ("leaked OBJ_TMPFS node %p vm_obj %p", node, uobj)); vm_object_deallocate(uobj); @@ -1417,9 +1415,7 @@ retry: uobj->size = newpages; VM_OBJECT_WUNLOCK(uobj); - TMPFS_LOCK(tmp); - tmp->tm_pages_used += (newpages - oldpages); - TMPFS_UNLOCK(tmp); + atomic_add_long(&tmp->tm_pages_used, newpages - oldpages); node->tn_size = newsize; return (0); Modified: head/sys/fs/tmpfs/tmpfs_vfsops.c ============================================================================== --- head/sys/fs/tmpfs/tmpfs_vfsops.c Sat Jan 14 06:18:54 2017 (r312123) +++ head/sys/fs/tmpfs/tmpfs_vfsops.c Sat Jan 14 06:20:36 2017 (r312124) @@ -397,7 +397,7 @@ tmpfs_statfs(struct mount *mp, struct st sbp->f_bsize = PAGE_SIZE; used = tmpfs_pages_used(tmp); - if (tmp->tm_pages_max != SIZE_MAX) + if (tmp->tm_pages_max != ULONG_MAX) sbp->f_blocks = tmp->tm_pages_max; else sbp->f_blocks = used + tmpfs_mem_avail(); From owner-svn-src-head@freebsd.org Sat Jan 14 09:56:02 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4EC9BCAD890; Sat, 14 Jan 2017 09:56:02 +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 10B5C1536; Sat, 14 Jan 2017 09:56:01 +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 v0E9u1q1088365; Sat, 14 Jan 2017 09:56:01 GMT (envelope-from jah@FreeBSD.org) Received: (from jah@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v0E9u1DU088364; Sat, 14 Jan 2017 09:56:01 GMT (envelope-from jah@FreeBSD.org) Message-Id: <201701140956.v0E9u1DU088364@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jah set sender to jah@FreeBSD.org using -f From: "Jason A. Harmening" Date: Sat, 14 Jan 2017 09:56:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r312153 - head/sys/i386/i386 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 14 Jan 2017 09:56:02 -0000 Author: jah Date: Sat Jan 14 09:56:01 2017 New Revision: 312153 URL: https://svnweb.freebsd.org/changeset/base/312153 Log: For i386 temporary mappings, unpin the thread before releasing the cmap lock. Releasing the lock first may result in the thread being immediately rescheduled and bound to the same CPU, only to unpin itself upon resuming execution. Noted by: skra (in review for armv6 equivalent) MFC after: 1 week Modified: head/sys/i386/i386/pmap.c Modified: head/sys/i386/i386/pmap.c ============================================================================== --- head/sys/i386/i386/pmap.c Sat Jan 14 09:47:06 2017 (r312152) +++ head/sys/i386/i386/pmap.c Sat Jan 14 09:56:01 2017 (r312153) @@ -4216,8 +4216,8 @@ pmap_zero_page(vm_page_t m) invlcaddr(pc->pc_cmap_addr2); pagezero(pc->pc_cmap_addr2); *cmap_pte2 = 0; - mtx_unlock(&pc->pc_cmap_lock); sched_unpin(); + mtx_unlock(&pc->pc_cmap_lock); } /* @@ -4244,8 +4244,8 @@ pmap_zero_page_area(vm_page_t m, int off else bzero(pc->pc_cmap_addr2 + off, size); *cmap_pte2 = 0; - mtx_unlock(&pc->pc_cmap_lock); sched_unpin(); + mtx_unlock(&pc->pc_cmap_lock); } /* @@ -4275,8 +4275,8 @@ pmap_copy_page(vm_page_t src, vm_page_t bcopy(pc->pc_cmap_addr1, pc->pc_cmap_addr2, PAGE_SIZE); *cmap_pte1 = 0; *cmap_pte2 = 0; - mtx_unlock(&pc->pc_cmap_lock); sched_unpin(); + mtx_unlock(&pc->pc_cmap_lock); } int unmapped_buf_allowed = 1; @@ -4323,8 +4323,8 @@ pmap_copy_pages(vm_page_t ma[], vm_offse } *cmap_pte1 = 0; *cmap_pte2 = 0; - mtx_unlock(&pc->pc_cmap_lock); sched_unpin(); + mtx_unlock(&pc->pc_cmap_lock); } /* @@ -5310,8 +5310,8 @@ pmap_flush_page(vm_page_t m) if (useclflushopt || cpu_vendor_id != CPU_VENDOR_INTEL) mfence(); *cmap_pte2 = 0; - mtx_unlock(&pc->pc_cmap_lock); sched_unpin(); + mtx_unlock(&pc->pc_cmap_lock); } else pmap_invalidate_cache(); } From owner-svn-src-head@freebsd.org Sat Jan 14 10:20:39 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D3D95CA716B; Sat, 14 Jan 2017 10:20:39 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A2F6C19F1; Sat, 14 Jan 2017 10:20:39 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v0EAKc4C097483; Sat, 14 Jan 2017 10:20:38 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v0EAKcrx097482; Sat, 14 Jan 2017 10:20:38 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201701141020.v0EAKcrx097482@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Sat, 14 Jan 2017 10:20:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r312162 - head/usr.sbin/inetd X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 14 Jan 2017 10:20:39 -0000 Author: ngie Date: Sat Jan 14 10:20:38 2017 New Revision: 312162 URL: https://svnweb.freebsd.org/changeset/base/312162 Log: Fix up r312105 - Only #include tcpd.h when LIBWRAP is true to avoid header include errors - Only define whichaf when LIBWRAP is true to avoid -Wunused warning and to avoid issues with structs being defined that should only be defined when tcpd.h is included. MFC after: 2 weeks X-MFC with: r312105 Pointyhat to: ngie Reported by: gcc tinderbox Sponsored by: Dell EMC Isilon Modified: head/usr.sbin/inetd/inetd.c Modified: head/usr.sbin/inetd/inetd.c ============================================================================== --- head/usr.sbin/inetd/inetd.c Sat Jan 14 10:20:27 2017 (r312161) +++ head/usr.sbin/inetd/inetd.c Sat Jan 14 10:20:38 2017 (r312162) @@ -138,7 +138,9 @@ __FBSDID("$FreeBSD$"); #include #include #include +#ifdef LIBWRAP #include +#endif #include #include "inetd.h" @@ -307,6 +309,7 @@ getvalue(const char *arg, int *value, co return 0; /* success */ } +#ifdef LIBWRAP static sa_family_t whichaf(struct request_info *req) { @@ -322,6 +325,7 @@ whichaf(struct request_info *req) #endif return sa->sa_family; } +#endif int main(int argc, char **argv) From owner-svn-src-head@freebsd.org Sat Jan 14 10:38:41 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0399FCA7876; Sat, 14 Jan 2017 10:38:41 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C82F91720; Sat, 14 Jan 2017 10:38:40 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v0EAceON005626; Sat, 14 Jan 2017 10:38:40 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v0EAcdBT005625; Sat, 14 Jan 2017 10:38:39 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201701141038.v0EAcdBT005625@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Sat, 14 Jan 2017 10:38:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r312164 - head/tests/sys/mac/bsdextended X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 14 Jan 2017 10:38:41 -0000 Author: ngie Date: Sat Jan 14 10:38:39 2017 New Revision: 312164 URL: https://svnweb.freebsd.org/changeset/base/312164 Log: Fix -Wformat issue Use %zu for printing out results from nitems, as it's size_t based MFC after: 1 week X-MFC with: r312120 Reported by: gcc (mips:mipsel tinderbox) Sponsored by: Dell EMC Isilon Modified: head/tests/sys/mac/bsdextended/ugidfw_test.c Modified: head/tests/sys/mac/bsdextended/ugidfw_test.c ============================================================================== --- head/tests/sys/mac/bsdextended/ugidfw_test.c Sat Jan 14 10:23:05 2017 (r312163) +++ head/tests/sys/mac/bsdextended/ugidfw_test.c Sat Jan 14 10:38:39 2017 (r312164) @@ -222,7 +222,7 @@ main(void) return (0); } - printf("1..%lu\n", nitems(test_users) + nitems(test_groups) + + printf("1..%zu\n", nitems(test_users) + nitems(test_groups) + 3 * nitems(test_strings) + 2); test_libugidfw_strings(); From owner-svn-src-head@freebsd.org Sat Jan 14 13:43:33 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 49DEBCAF9C2; Sat, 14 Jan 2017 13:43:33 +0000 (UTC) (envelope-from manu@bidouilliste.com) Received: from mail.blih.net (mail.blih.net [212.83.177.182]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mail.blih.net", Issuer "mail.blih.net" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 3854B12E4; Sat, 14 Jan 2017 13:43:31 +0000 (UTC) (envelope-from manu@bidouilliste.com) Received: from mail.blih.net (mail.blih.net [212.83.177.182]) by mail.blih.net (OpenSMTPD) with ESMTP id 1bb024b7; Sat, 14 Jan 2017 14:43:28 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=bidouilliste.com; h=date :from:to:cc:subject:message-id:in-reply-to:references :mime-version:content-type:content-transfer-encoding; s=mail; bh=MNue7/HkTKxDvLE5qfqaeYhXHNI=; b=PuG+8WuGUOPzRAMfk0CWWAh9Ptbf uF8DfvTX4fAkCD8HHXWditzb7QYknC1mEkEBGlfyQEvhvYuS64fS/NEE26Yr/3mX JAPqZg6wJ4qDtBdmnhz5DBq2gnH6dZuIfOxINLMUdM67IDA+G7i+ht0+A3lnDnr8 KpJEVvp5Fu3rKho= DomainKey-Signature: a=rsa-sha1; c=nofws; d=bidouilliste.com; h=date :from:to:cc:subject:message-id:in-reply-to:references :mime-version:content-type:content-transfer-encoding; q=dns; s= mail; b=kk2rMbewNcHXnqZNq+O0tKL4Y3GXsUGW/cAgVokJ+TLleJVUhT02wmBQ 0IfDZtgOKqIk6Ewafru81QkPrMhPVpaZFxZIxDEA2cOUHMWc9Tke/zstU0rjWPRS czNXmmkBnj9wGgCWYsr2YhPNj/OC5h+62OeGw7vWZrWkXy0XFcU= Received: from knuckles.blih.net (ip-54.net-82-216-203.roubaix.rev.numericable.fr [82.216.203.54]) by mail.blih.net (OpenSMTPD) with ESMTPSA id 0029f9fd TLS version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO; Sat, 14 Jan 2017 14:43:28 +0100 (CET) Date: Sat, 14 Jan 2017 14:43:28 +0100 From: Emmanuel Vadot To: Zbigniew Bodek Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r311455 - head/sys/boot/fdt/dts/arm Message-Id: <20170114144328.1b9e0b3fdfe34b3ae1365798@bidouilliste.com> In-Reply-To: <201701051727.v05HRoup098984@repo.freebsd.org> References: <201701051727.v05HRoup098984@repo.freebsd.org> X-Mailer: Sylpheed 3.5.1 (GTK+ 2.24.29; amd64-portbld-freebsd12.0) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 14 Jan 2017 13:43:33 -0000 Hello zbb, On Thu, 5 Jan 2017 17:27:50 +0000 (UTC) Zbigniew Bodek wrote: > Author: zbb > Date: Thu Jan 5 17:27:50 2017 > New Revision: 311455 > URL: https://svnweb.freebsd.org/changeset/base/311455 > > Log: > Add DTS file for Armada 385 DB-AP board > > Armada38x is already supported in the tree. > This commit adds support for DB-AP board. > File was taken from Linux v4.8 and accustomed to FreeBSD > in minimal possible way. > > Submitted by: Bartosz Szczepanek > Obtained from: Semihalf > Sponsored by: Stormshield > Differential revision: https://reviews.freebsd.org/D7327 > > Added: > head/sys/boot/fdt/dts/arm/armada-385-db-ap.dts (contents, props changed) This file is already present in sys/gnu/dts (from an earlier version of Linux, 4.7-rcX). As I said in the review I'm not sure that we want multiple version of DTS in the tree. Could you use the upstream dts as base (include it in our DTS) and add the FreeBSD needed nodes in it like we do for Allwinner and BeagleBone ? Thanks. > Added: head/sys/boot/fdt/dts/arm/armada-385-db-ap.dts > ============================================================================== > --- /dev/null 00:00:00 1970 (empty, because file is newly added) > +++ head/sys/boot/fdt/dts/arm/armada-385-db-ap.dts Thu Jan 5 17:27:50 2017 (r311455) > @@ -0,0 +1,271 @@ > +/* > + * Device Tree file for Marvell Armada 385 Access Point Development board > + * (DB-88F6820-AP) > + * > + * Copyright (C) 2014 Marvell > + * > + * Nadav Haklai > + * > + * This file is dual-licensed: you can use it either under the terms > + * of the GPL or the X11 license, at your option. Note that this dual > + * licensing only applies to this file, and not this project as a > + * whole. > + * > + * a) This file is licensed under the terms of the GNU General Public > + * License version 2. This program is licensed "as is" without > + * any warranty of any kind, whether express or implied. > + * > + * Or, alternatively, > + * > + * b) Permission is hereby granted, free of charge, to any person > + * obtaining a copy of this software and associated documentation > + * files (the "Software"), to deal in the Software without > + * restriction, including without limitation the rights to use, > + * copy, modify, merge, publish, distribute, sublicense, and/or > + * sell copies of the Software, and to permit persons to whom the > + * Software is furnished to do so, subject to the following > + * conditions: > + * > + * The above copyright notice and this permission notice shall be > + * included in all copies or substantial portions of the Software. > + * > + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, > + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES > + * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND > + * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT > + * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, > + * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING > + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR > + * OTHER DEALINGS IN THE SOFTWARE. > + * > + * $FreeBSD$ > + */ > + > +/dts-v1/; > +#include "armada-385.dtsi" > + > +#include > + > +/ { > + model = "Marvell Armada 385 Access Point Development Board"; > + compatible = "marvell,a385-db-ap", "marvell,armada385", "marvell,armada380"; > + > + chosen { > + stdout-path = "serial1"; > + }; > + > + memory { > + device_type = "memory"; > + reg = <0x00000000 0x80000000>; /* 2GB */ > + }; > + > + soc { > + ranges = ; > + > + internal-regs { > + i2c0: i2c@11000 { > + pinctrl-names = "default"; > + pinctrl-0 = <&i2c0_pins>; > + status = "okay"; > + > + /* > + * This bus is wired to two EEPROM > + * sockets, one of which holding the > + * board ID used by the bootloader. > + * Erasing this EEPROM's content will > + * brick the board. > + * Use this bus with caution. > + */ > + }; > + > + mdio@72004 { > + pinctrl-names = "default"; > + pinctrl-0 = <&mdio_pins>; > + > + phy0: ethernet-phy@1 { > + reg = <1>; > + }; > + > + phy1: ethernet-phy@4 { > + reg = <4>; > + }; > + > + phy2: ethernet-phy@6 { > + reg = <6>; > + }; > + }; > + > + /* UART0 is exposed through the JP8 connector */ > + uart0: serial@12000 { > + pinctrl-names = "default"; > + pinctrl-0 = <&uart0_pins>; > + status = "okay"; > + }; > + > + /* > + * UART1 is exposed through a FTDI chip > + * wired to the mini-USB connector > + */ > + uart1: serial@12100 { > + pinctrl-names = "default"; > + pinctrl-0 = <&uart1_pins>; > + status = "okay"; > + }; > + > + pinctrl@18000 { > + xhci0_vbus_pins: xhci0-vbus-pins { > + marvell,pins = "mpp44"; > + marvell,function = "gpio"; > + }; > + }; > + > + /* CON3 */ > + ethernet@30000 { > + status = "okay"; > + phy = <&phy2>; > + phy-mode = "sgmii"; > + buffer-manager = <&bm>; > + bm,pool-long = <1>; > + bm,pool-short = <3>; > + }; > + > + /* CON2 */ > + ethernet@34000 { > + status = "okay"; > + phy = <&phy1>; > + phy-mode = "sgmii"; > + buffer-manager = <&bm>; > + bm,pool-long = <2>; > + bm,pool-short = <3>; > + }; > + > + usb@58000 { > + status = "okay"; > + }; > + > + /* CON4 */ > + ethernet@70000 { > + pinctrl-names = "default"; > + > + /* > + * The Reference Clock 0 is used to > + * provide a clock to the PHY > + */ > + pinctrl-0 = <&ge0_rgmii_pins>, <&ref_clk0_pins>; > + status = "okay"; > + phy = <&phy0>; > + phy-mode = "rgmii-id"; > + buffer-manager = <&bm>; > + bm,pool-long = <0>; > + bm,pool-short = <3>; > + }; > + > + crypto@90000 { > + status = "okay"; > + }; > + > + crypto@92000 { > + status = "okay"; > + }; > + > + bm@c8000 { > + status = "okay"; > + }; > + > + nfc: flash@d0000 { > + status = "okay"; > + num-cs = <1>; > + nand-ecc-strength = <4>; > + nand-ecc-step-size = <512>; > + marvell,nand-keep-config; > + marvell,nand-enable-arbiter; > + nand-on-flash-bbt; > + > + partitions { > + compatible = "fixed-partitions"; > + #address-cells = <1>; > + #size-cells = <1>; > + > + partition@0 { > + label = "U-Boot"; > + reg = <0x00000000 0x00800000>; > + read-only; > + }; > + > + partition@800000 { > + label = "uImage"; > + reg = <0x00800000 0x00400000>; > + read-only; > + }; > + > + partition@c00000 { > + label = "Root"; > + reg = <0x00c00000 0x3f400000>; > + }; > + }; > + }; > + > + usb3@f0000 { > + status = "okay"; > + usb-phy = <&usb3_phy>; > + }; > + }; > + > + bm-bppi { > + status = "okay"; > + }; > + > + pcie-controller { > + status = "okay"; > + > + /* > + * The three PCIe units are accessible through > + * standard mini-PCIe slots on the board. > + */ > + pcie@1,0 { > + /* Port 0, Lane 0 */ > + status = "okay"; > + }; > + > + pcie@2,0 { > + /* Port 1, Lane 0 */ > + status = "okay"; > + }; > + > + pcie@3,0 { > + /* Port 2, Lane 0 */ > + status = "okay"; > + }; > + }; > + }; > + > + usb3_phy: usb3_phy { > + compatible = "usb-nop-xceiv"; > + vcc-supply = <®_xhci0_vbus>; > + }; > + > + reg_xhci0_vbus: xhci0-vbus { > + compatible = "regulator-fixed"; > + pinctrl-names = "default"; > + pinctrl-0 = <&xhci0_vbus_pins>; > + regulator-name = "xhci0-vbus"; > + regulator-min-microvolt = <5000000>; > + regulator-max-microvolt = <5000000>; > + enable-active-high; > + gpio = <&gpio1 12 GPIO_ACTIVE_HIGH>; > + }; > +}; > + > +&spi1 { > + pinctrl-names = "default"; > + pinctrl-0 = <&spi1_pins>; > + status = "okay"; > + > + spi-flash@0 { > + #address-cells = <1>; > + #size-cells = <1>; > + compatible = "st,m25p128", "jedec,spi-nor"; > + reg = <0>; /* Chip select 0 */ > + spi-max-frequency = <54000000>; > + }; > +}; -- Emmanuel Vadot From owner-svn-src-head@freebsd.org Sat Jan 14 18:04:14 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2DE87CAF25D; Sat, 14 Jan 2017 18:04:14 +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 087351DC2; Sat, 14 Jan 2017 18:04:13 +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 v0EI4Dwg089683; Sat, 14 Jan 2017 18:04:13 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v0EI4CS8089680; Sat, 14 Jan 2017 18:04:12 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201701141804.v0EI4CS8089680@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Sat, 14 Jan 2017 18:04:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r312190 - head/usr.sbin/ctld X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 14 Jan 2017 18:04:14 -0000 Author: mav Date: Sat Jan 14 18:04:12 2017 New Revision: 312190 URL: https://svnweb.freebsd.org/changeset/base/312190 Log: Decouple iSCSI connection limits from defaults. If initiator does not negotiate some parameter, it expects one to get default value, not some unknown remote hardware limit. On the side side, if some parameter is negotiated, its default value from RFC should not be used for anything. Modified: head/usr.sbin/ctld/ctld.c head/usr.sbin/ctld/ctld.h head/usr.sbin/ctld/login.c Modified: head/usr.sbin/ctld/ctld.c ============================================================================== --- head/usr.sbin/ctld/ctld.c Sat Jan 14 16:58:49 2017 (r312189) +++ head/usr.sbin/ctld/ctld.c Sat Jan 14 18:04:12 2017 (r312190) @@ -1582,6 +1582,7 @@ connection_new(struct portal *portal, in * Default values, from RFC 3720, section 12. */ conn->conn_max_recv_data_segment_length = 8192; + conn->conn_max_send_data_segment_length = 8192; conn->conn_max_burst_length = 262144; conn->conn_first_burst_length = 65536; conn->conn_immediate_data = true; Modified: head/usr.sbin/ctld/ctld.h ============================================================================== --- head/usr.sbin/ctld/ctld.h Sat Jan 14 16:58:49 2017 (r312189) +++ head/usr.sbin/ctld/ctld.h Sat Jan 14 18:04:12 2017 (r312190) @@ -48,8 +48,6 @@ #define MAX_LUNS 1024 #define MAX_NAME_LEN 223 #define MAX_DATA_SEGMENT_LENGTH (128 * 1024) -#define MAX_BURST_LENGTH 16776192 -#define FIRST_BURST_LENGTH (128 * 1024) #define SOCKBUF_SIZE 1048576 struct auth { @@ -242,6 +240,10 @@ struct connection { struct sockaddr_storage conn_initiator_sa; uint32_t conn_cmdsn; uint32_t conn_statsn; + int conn_max_recv_data_segment_limit; + int conn_max_send_data_segment_limit; + int conn_max_burst_limit; + int conn_first_burst_limit; int conn_max_recv_data_segment_length; int conn_max_send_data_segment_length; int conn_max_burst_length; Modified: head/usr.sbin/ctld/login.c ============================================================================== --- head/usr.sbin/ctld/login.c Sat Jan 14 16:58:49 2017 (r312189) +++ head/usr.sbin/ctld/login.c Sat Jan 14 18:04:12 2017 (r312190) @@ -557,13 +557,15 @@ login_negotiate_key(struct pdu *request, * our MaxRecvDataSegmentLength is not influenced by the * initiator in any way. */ - if ((int)tmp > conn->conn_max_send_data_segment_length) { - log_debugx("capping max_send_data_segment_length " + if ((int)tmp > conn->conn_max_send_data_segment_limit) { + log_debugx("capping MaxRecvDataSegmentLength " "from %zd to %d", tmp, - conn->conn_max_send_data_segment_length); - tmp = conn->conn_max_send_data_segment_length; + conn->conn_max_send_data_segment_limit); + tmp = conn->conn_max_send_data_segment_limit; } conn->conn_max_send_data_segment_length = tmp; + conn->conn_max_recv_data_segment_length = + conn->conn_max_recv_data_segment_limit; keys_add_int(response_keys, name, conn->conn_max_recv_data_segment_length); } else if (strcmp(name, "MaxBurstLength") == 0) { @@ -572,10 +574,10 @@ login_negotiate_key(struct pdu *request, login_send_error(request, 0x02, 0x00); log_errx(1, "received invalid MaxBurstLength"); } - if ((int)tmp > conn->conn_max_burst_length) { + if ((int)tmp > conn->conn_max_burst_limit) { log_debugx("capping MaxBurstLength from %zd to %d", - tmp, conn->conn_max_burst_length); - tmp = conn->conn_max_burst_length; + tmp, conn->conn_max_burst_limit); + tmp = conn->conn_max_burst_limit; } conn->conn_max_burst_length = tmp; keys_add_int(response_keys, name, tmp); @@ -585,10 +587,10 @@ login_negotiate_key(struct pdu *request, login_send_error(request, 0x02, 0x00); log_errx(1, "received invalid FirstBurstLength"); } - if ((int)tmp > conn->conn_first_burst_length) { + if ((int)tmp > conn->conn_first_burst_limit) { log_debugx("capping FirstBurstLength from %zd to %d", - tmp, conn->conn_first_burst_length); - tmp = conn->conn_first_burst_length; + tmp, conn->conn_first_burst_limit); + tmp = conn->conn_first_burst_limit; } conn->conn_first_burst_length = tmp; keys_add_int(response_keys, name, tmp); @@ -694,25 +696,42 @@ login_negotiate(struct connection *conn, * offload, it depends on hardware capabilities. */ assert(conn->conn_target != NULL); + conn->conn_max_recv_data_segment_limit = (1 << 24) - 1; + conn->conn_max_send_data_segment_limit = (1 << 24) - 1; + conn->conn_max_burst_limit = (1 << 24) - 1; + conn->conn_first_burst_limit = (1 << 24) - 1; kernel_limits(conn->conn_portal->p_portal_group->pg_offload, - &conn->conn_max_recv_data_segment_length, - &conn->conn_max_send_data_segment_length, - &conn->conn_max_burst_length, - &conn->conn_first_burst_length); + &conn->conn_max_recv_data_segment_limit, + &conn->conn_max_send_data_segment_limit, + &conn->conn_max_burst_limit, + &conn->conn_first_burst_limit); /* We expect legal, usable values at this point. */ - assert(conn->conn_max_recv_data_segment_length >= 512); - assert(conn->conn_max_recv_data_segment_length < (1 << 24)); - assert(conn->conn_max_burst_length >= 512); - assert(conn->conn_max_burst_length < (1 << 24)); - assert(conn->conn_first_burst_length >= 512); - assert(conn->conn_first_burst_length < (1 << 24)); - assert(conn->conn_first_burst_length <= - conn->conn_max_burst_length); + assert(conn->conn_max_recv_data_segment_limit >= 512); + assert(conn->conn_max_recv_data_segment_limit < (1 << 24)); + assert(conn->conn_max_send_data_segment_limit >= 512); + assert(conn->conn_max_send_data_segment_limit < (1 << 24)); + assert(conn->conn_max_burst_limit >= 512); + assert(conn->conn_max_burst_limit < (1 << 24)); + assert(conn->conn_first_burst_limit >= 512); + assert(conn->conn_first_burst_limit < (1 << 24)); + assert(conn->conn_first_burst_limit <= + conn->conn_max_burst_limit); + + /* + * Limit default send length in case it won't be negotiated. + * We can't do it for other limits, since they may affect both + * sender and receiver operation, and we must obey defaults. + */ + if (conn->conn_max_send_data_segment_limit < + conn->conn_max_send_data_segment_length) { + conn->conn_max_send_data_segment_limit = + conn->conn_max_send_data_segment_length; + } } else { - conn->conn_max_recv_data_segment_length = + conn->conn_max_recv_data_segment_limit = MAX_DATA_SEGMENT_LENGTH; - conn->conn_max_send_data_segment_length = + conn->conn_max_send_data_segment_limit = MAX_DATA_SEGMENT_LENGTH; } From owner-svn-src-head@freebsd.org Sat Jan 14 19:35:37 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9CAD7CAFDC6; Sat, 14 Jan 2017 19:35:37 +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 6B4681AFC; Sat, 14 Jan 2017 19:35:37 +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 v0EJZabh026286; Sat, 14 Jan 2017 19:35:36 GMT (envelope-from jah@FreeBSD.org) Received: (from jah@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v0EJZaew026285; Sat, 14 Jan 2017 19:35:36 GMT (envelope-from jah@FreeBSD.org) Message-Id: <201701141935.v0EJZaew026285@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jah set sender to jah@FreeBSD.org using -f From: "Jason A. Harmening" Date: Sat, 14 Jan 2017 19:35:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r312191 - head/sys/i386/i386 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 14 Jan 2017 19:35:37 -0000 Author: jah Date: Sat Jan 14 19:35:36 2017 New Revision: 312191 URL: https://svnweb.freebsd.org/changeset/base/312191 Log: Add comment explaining relative order of sched_unpin() and mtx_unlock(). Suggested by: alc MFC after: 1 week Modified: head/sys/i386/i386/pmap.c Modified: head/sys/i386/i386/pmap.c ============================================================================== --- head/sys/i386/i386/pmap.c Sat Jan 14 18:04:12 2017 (r312190) +++ head/sys/i386/i386/pmap.c Sat Jan 14 19:35:36 2017 (r312191) @@ -4216,6 +4216,12 @@ pmap_zero_page(vm_page_t m) invlcaddr(pc->pc_cmap_addr2); pagezero(pc->pc_cmap_addr2); *cmap_pte2 = 0; + + /* + * Unpin the thread before releasing the lock. Otherwise the thread + * could be rescheduled while still bound to the current CPU, only + * to unpin itself immediately upon resuming execution. + */ sched_unpin(); mtx_unlock(&pc->pc_cmap_lock); } From owner-svn-src-head@freebsd.org Sat Jan 14 19:58:52 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id CD29ECAE47C; Sat, 14 Jan 2017 19:58: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 9A2A618B4; Sat, 14 Jan 2017 19:58:52 +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 v0EJwp5v034963; Sat, 14 Jan 2017 19:58:51 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v0EJwpql034962; Sat, 14 Jan 2017 19:58:51 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201701141958.v0EJwpql034962@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Sat, 14 Jan 2017 19:58:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r312192 - head/usr.sbin/ctld X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 14 Jan 2017 19:58:52 -0000 Author: mav Date: Sat Jan 14 19:58:51 2017 New Revision: 312192 URL: https://svnweb.freebsd.org/changeset/base/312192 Log: Fix wrong way assignment in r312190. Modified: head/usr.sbin/ctld/login.c Modified: head/usr.sbin/ctld/login.c ============================================================================== --- head/usr.sbin/ctld/login.c Sat Jan 14 19:35:36 2017 (r312191) +++ head/usr.sbin/ctld/login.c Sat Jan 14 19:58:51 2017 (r312192) @@ -725,8 +725,8 @@ login_negotiate(struct connection *conn, */ if (conn->conn_max_send_data_segment_limit < conn->conn_max_send_data_segment_length) { - conn->conn_max_send_data_segment_limit = - conn->conn_max_send_data_segment_length; + conn->conn_max_send_data_segment_length = + conn->conn_max_send_data_segment_limit; } } else { conn->conn_max_recv_data_segment_limit = From owner-svn-src-head@freebsd.org Sat Jan 14 20:29:27 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9BE8BCAF014; Sat, 14 Jan 2017 20:29:27 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5E88118FA; Sat, 14 Jan 2017 20:29:27 +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 v0EKTQbj047126; Sat, 14 Jan 2017 20:29:26 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v0EKTQ2f047122; Sat, 14 Jan 2017 20:29:26 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201701142029.v0EKTQ2f047122@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Sat, 14 Jan 2017 20:29:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r312194 - in head/tests/sys: fs kern kqueue mac X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 14 Jan 2017 20:29:27 -0000 Author: ngie Date: Sat Jan 14 20:29:26 2017 New Revision: 312194 URL: https://svnweb.freebsd.org/changeset/base/312194 Log: Add include Makefiles for tests/sys/{fs,kern,kqueue,mac}/... The primary goal for doing this is to leverage the work done in r312114 for enabling WARNS to address trivial code quality issues with new tests MFC after: 6 days Tested with: make tinderbox Sponsored by: Dell EMC Isilon Added: head/tests/sys/fs/Makefile.inc - copied unchanged from r312193, projects/netbsd-tests-upstream-01-2017/tests/sys/fs/Makefile.inc head/tests/sys/kern/Makefile.inc - copied unchanged from r312193, projects/netbsd-tests-upstream-01-2017/tests/sys/kern/Makefile.inc head/tests/sys/kqueue/Makefile.inc - copied unchanged from r312193, projects/netbsd-tests-upstream-01-2017/tests/sys/kqueue/Makefile.inc head/tests/sys/mac/Makefile.inc - copied unchanged from r312193, projects/netbsd-tests-upstream-01-2017/tests/sys/mac/Makefile.inc Modified: Directory Properties: head/ (props changed) Copied: head/tests/sys/fs/Makefile.inc (from r312193, projects/netbsd-tests-upstream-01-2017/tests/sys/fs/Makefile.inc) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tests/sys/fs/Makefile.inc Sat Jan 14 20:29:26 2017 (r312194, copy of r312193, projects/netbsd-tests-upstream-01-2017/tests/sys/fs/Makefile.inc) @@ -0,0 +1,3 @@ +# $FreeBSD$ + +.include "../Makefile.inc" Copied: head/tests/sys/kern/Makefile.inc (from r312193, projects/netbsd-tests-upstream-01-2017/tests/sys/kern/Makefile.inc) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tests/sys/kern/Makefile.inc Sat Jan 14 20:29:26 2017 (r312194, copy of r312193, projects/netbsd-tests-upstream-01-2017/tests/sys/kern/Makefile.inc) @@ -0,0 +1,3 @@ +# $FreeBSD$ + +.include "../Makefile.inc" Copied: head/tests/sys/kqueue/Makefile.inc (from r312193, projects/netbsd-tests-upstream-01-2017/tests/sys/kqueue/Makefile.inc) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tests/sys/kqueue/Makefile.inc Sat Jan 14 20:29:26 2017 (r312194, copy of r312193, projects/netbsd-tests-upstream-01-2017/tests/sys/kqueue/Makefile.inc) @@ -0,0 +1,3 @@ +# $FreeBSD$ + +.include "../Makefile.inc" Copied: head/tests/sys/mac/Makefile.inc (from r312193, projects/netbsd-tests-upstream-01-2017/tests/sys/mac/Makefile.inc) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tests/sys/mac/Makefile.inc Sat Jan 14 20:29:26 2017 (r312194, copy of r312193, projects/netbsd-tests-upstream-01-2017/tests/sys/mac/Makefile.inc) @@ -0,0 +1,3 @@ +# $FreeBSD$ + +.include "../Makefile.inc" From owner-svn-src-head@freebsd.org Sat Jan 14 20:41:46 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4E016CAF3E6; Sat, 14 Jan 2017 20:41: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 2852E1F87; Sat, 14 Jan 2017 20:41: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 v0EKfjaL054736; Sat, 14 Jan 2017 20:41:45 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v0EKfjg1054733; Sat, 14 Jan 2017 20:41:45 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201701142041.v0EKfjg1054733@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Sat, 14 Jan 2017 20:41:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r312195 - head/usr.sbin/iscsid X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 14 Jan 2017 20:41:46 -0000 Author: mav Date: Sat Jan 14 20:41:44 2017 New Revision: 312195 URL: https://svnweb.freebsd.org/changeset/base/312195 Log: Alike to r312190 decouple iSCSI connection limits from defaults. Connection parameters should remain at defaults until negotiated. While there, remove sythetic limits, applied if kernel provided none. iscsid has no own limitations, no configuration and no any idea what values are good. Assume kernel knows what it requests. Modified: head/usr.sbin/iscsid/iscsid.c head/usr.sbin/iscsid/iscsid.h head/usr.sbin/iscsid/login.c Modified: head/usr.sbin/iscsid/iscsid.c ============================================================================== --- head/usr.sbin/iscsid/iscsid.c Sat Jan 14 20:29:26 2017 (r312194) +++ head/usr.sbin/iscsid/iscsid.c Sat Jan 14 20:41:44 2017 (r312195) @@ -172,8 +172,10 @@ connection_new(int iscsi_fd, const struc conn->conn_data_digest = CONN_DIGEST_NONE; conn->conn_initial_r2t = true; conn->conn_immediate_data = true; - conn->conn_max_burst_length = MAX_BURST_LENGTH; - conn->conn_first_burst_length = FIRST_BURST_LENGTH; + conn->conn_max_recv_data_segment_length = 8192; + conn->conn_max_send_data_segment_length = 8192; + conn->conn_max_burst_length = 262144; + conn->conn_first_burst_length = 65536; conn->conn_iscsi_fd = iscsi_fd; conn->conn_session_id = request->idr_session_id; @@ -190,31 +192,28 @@ connection_new(int iscsi_fd, const struc */ isl = &conn->conn_limits; memcpy(isl, &request->idr_limits, sizeof(*isl)); - if (isl->isl_max_recv_data_segment_length == 0) { - conn->conn_max_recv_data_segment_length = 8192; - conn->conn_max_send_data_segment_length = 8192; - isl->isl_max_recv_data_segment_length = 8192; - } else { - conn->conn_max_recv_data_segment_length = - isl->isl_max_recv_data_segment_length; - conn->conn_max_send_data_segment_length = - isl->isl_max_recv_data_segment_length; - } - if (isl->isl_max_send_data_segment_length == 0) { + if (isl->isl_max_recv_data_segment_length == 0) + isl->isl_max_recv_data_segment_length = (1 << 24) - 1; + if (isl->isl_max_send_data_segment_length == 0) isl->isl_max_send_data_segment_length = isl->isl_max_recv_data_segment_length; - } else { + if (isl->isl_max_burst_length == 0) + isl->isl_max_burst_length = (1 << 24) - 1; + if (isl->isl_first_burst_length == 0) + isl->isl_first_burst_length = (1 << 24) - 1; + if (isl->isl_first_burst_length > isl->isl_max_burst_length) + isl->isl_first_burst_length = isl->isl_max_burst_length; + + /* + * Limit default send length in case it won't be negotiated. + * We can't do it for other limits, since they may affect both + * sender and receiver operation, and we must obey defaults. + */ + if (conn->conn_max_send_data_segment_length > + isl->isl_max_send_data_segment_length) { conn->conn_max_send_data_segment_length = isl->isl_max_send_data_segment_length; } - if (isl->isl_max_burst_length == 0) - isl->isl_max_burst_length = conn->conn_max_burst_length; - if (isl->isl_first_burst_length == 0) { - if (isl->isl_max_burst_length < (int)conn->conn_first_burst_length) - isl->isl_first_burst_length = isl->isl_max_burst_length; - else - isl->isl_first_burst_length = conn->conn_first_burst_length; - } from_addr = conn->conn_conf.isc_initiator_addr; to_addr = conn->conn_conf.isc_target_addr; Modified: head/usr.sbin/iscsid/iscsid.h ============================================================================== --- head/usr.sbin/iscsid/iscsid.h Sat Jan 14 20:29:26 2017 (r312194) +++ head/usr.sbin/iscsid/iscsid.h Sat Jan 14 20:41:44 2017 (r312195) @@ -44,8 +44,6 @@ #define CONN_MUTUAL_CHALLENGE_LEN 1024 #define SOCKBUF_SIZE 1048576 -#define MAX_BURST_LENGTH (256 * 1024) -#define FIRST_BURST_LENGTH (128 * 1024) struct connection { int conn_iscsi_fd; Modified: head/usr.sbin/iscsid/login.c ============================================================================== --- head/usr.sbin/iscsid/login.c Sat Jan 14 20:29:26 2017 (r312194) +++ head/usr.sbin/iscsid/login.c Sat Jan 14 20:41:44 2017 (r312195) @@ -397,6 +397,9 @@ login_negotiate_key(struct connection *c tmp = isl->isl_max_send_data_segment_length; } conn->conn_max_send_data_segment_length = tmp; + /* We received target's limit, that means it accepted our's. */ + conn->conn_max_recv_data_segment_length = + isl->isl_max_recv_data_segment_length; } else if (strcmp(name, "MaxBurstLength") == 0) { tmp = strtoul(value, NULL, 10); if (tmp <= 0) From owner-svn-src-head@freebsd.org Sat Jan 14 22:06:26 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C036ACAFB33; Sat, 14 Jan 2017 22:06:26 +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 8AB1E15B3; Sat, 14 Jan 2017 22:06:26 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v0EM6PAD088572; Sat, 14 Jan 2017 22:06:25 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v0EM6PqT088571; Sat, 14 Jan 2017 22:06:25 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201701142206.v0EM6PqT088571@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Sat, 14 Jan 2017 22:06:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r312196 - head/sys/ddb X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 14 Jan 2017 22:06:26 -0000 Author: markj Date: Sat Jan 14 22:06:25 2017 New Revision: 312196 URL: https://svnweb.freebsd.org/changeset/base/312196 Log: Revert r311952. It broke DDB type-ahead since it caused db_check_interrupt() to drop unrecognized characters. Reported by: bde Modified: head/sys/ddb/db_input.c Modified: head/sys/ddb/db_input.c ============================================================================== --- head/sys/ddb/db_input.c Sat Jan 14 20:41:44 2017 (r312195) +++ head/sys/ddb/db_input.c Sat Jan 14 22:06:25 2017 (r312196) @@ -63,6 +63,7 @@ static int db_lhist_nlines; #define BLANK ' ' #define BACKUP '\b' +static int cnmaygetc(void); static void db_delete(int n, int bwd); static int db_inputchar(int c); static void db_putnchars(int c, int count); @@ -290,6 +291,12 @@ db_inputchar(c) return (0); } +static int +cnmaygetc() +{ + return (-1); +} + int db_readline(lstart, lsize) char * lstart; @@ -343,7 +350,7 @@ db_check_interrupt(void) { int c; - c = cncheckc(); + c = cnmaygetc(); switch (c) { case -1: /* no character */ return; @@ -354,7 +361,7 @@ db_check_interrupt(void) case CTRL('s'): do { - c = cncheckc(); + c = cnmaygetc(); if (c == CTRL('c')) db_error((char *)0); } while (c != CTRL('q')); From owner-svn-src-head@freebsd.org Sat Jan 14 22:06:32 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3EAF0CAFB5D; Sat, 14 Jan 2017 22:06:32 +0000 (UTC) (envelope-from markjdb@gmail.com) Received: from mail-pg0-x241.google.com (mail-pg0-x241.google.com [IPv6:2607:f8b0:400e:c05::241]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 0FBA315DA; Sat, 14 Jan 2017 22:06:32 +0000 (UTC) (envelope-from markjdb@gmail.com) Received: by mail-pg0-x241.google.com with SMTP id 75so1745349pgf.3; Sat, 14 Jan 2017 14:06:32 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=B5dJHvF93BbMFgelc7PVnVp1eaL6j1kxIVieN2bMiTg=; b=sn1DxRSqWP5n7X3edZNmdXykfyTqO1ZQ0n+426nyHsR8rqvIpSMq3bebaO/90zSTm1 ty9VyN7w9HnmMK73SMjHzQ5bSORdFA6HL5UpxgV10amgybJGloVoXMVGXxzZr14FlTxM NHyp1EXLXoXIT2RE2wrWhEBz5HoxHK6EXCcxxKeUFA0LXskOGjVzQziaJm7xnqsleyv1 TDphm3n33WlFQmDwpSJl4v1MKNadhVZOHrUEwRFEB64Rb40ru/HZXPvV9uiFKRjeYnhP oooCi3PSbanksH2FbOj0P5USeowPJf/djnwC4kt2Qu/ke7PviuPaz6bCUz1yWsrjn1qT M3tQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:date:from:to:cc:subject:message-id :references:mime-version:content-disposition:in-reply-to:user-agent; bh=B5dJHvF93BbMFgelc7PVnVp1eaL6j1kxIVieN2bMiTg=; b=s12QDqFZJI/bOC3M2VSJz46bV091BHzUalXrrCpqQj166vENm+gX/HGIPZklz7MkFC 0FMPc0kHSkFZVMC+i8zCatIruij5cVszbxQRBHZe4sILAwYinYHkiVEEfUQINJrDFbIc Ux4SeLdiUt0v1qEHOgnydXiLgxtA7vJrUU2OuYAjUMdD063bz39BVIf+9wUXArkNc0qd 4uQHQOvvs1m2A3dxVRyDWt+JtUHTnIfEnEnu8b0VnZq3VVZU+tAvBk8ty9dDg+BfXMYh 4A2krjFiW/iEK3ojnMdsAWvGv1qjpGmbwIm4oPKDtX3MvKFRiH/n7UeEMp0zcRXruXAT DyCQ== X-Gm-Message-State: AIkVDXLEz33WnBkScInay96fHldRocsPhVESsa9b9s/x0I+8favsJWou6NH8YOFbOTM0BQ== X-Received: by 10.84.199.194 with SMTP id d2mr39369975plh.134.1484431591543; Sat, 14 Jan 2017 14:06:31 -0800 (PST) Received: from raichu ([2604:4080:1102:0:ca60:ff:fe9d:3963]) by smtp.gmail.com with ESMTPSA id r1sm37534060pgn.48.2017.01.14.14.06.30 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 14 Jan 2017 14:06:30 -0800 (PST) Sender: Mark Johnston Date: Sat, 14 Jan 2017 14:06:29 -0800 From: Mark Johnston To: Bruce Evans Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org, rang@acm.org Subject: Re: svn commit: r311952 - head/sys/ddb Message-ID: <20170114220629.GB18065@raichu> References: <201701120022.v0C0MaHq053076@repo.freebsd.org> <20170113131948.P1465@besplex.bde.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20170113131948.P1465@besplex.bde.org> User-Agent: Mutt/1.7.2 (2016-11-26) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 14 Jan 2017 22:06:32 -0000 On Fri, Jan 13, 2017 at 02:51:04PM +1100, Bruce Evans wrote: > On Thu, 12 Jan 2017, Mark Johnston wrote: > > > Log: > > Enable the use of ^C and ^S/^Q in DDB. > > > > This lets one interrupt DDB's output, which is useful if paging is > > disabled and the output device is slow. > > This is quite broken. It removes the code that was necessary for avoiding > loss of input. Hi Bruce, I've reverted this for now. I haven't thought much about how db_check_interrupt() might losslessly poll the console driver for ctrl-C, but I do think it's a valuable feature to have - just this morning I absent-mindedly dumped a 128K-entry KTR ring from a DDB prompt after having set $lines = 0, and had to wait for quite a while to get my prompt back. > > > Modified: head/sys/ddb/db_input.c > > ============================================================================== > > --- head/sys/ddb/db_input.c Thu Jan 12 00:09:31 2017 (r311951) > > +++ head/sys/ddb/db_input.c Thu Jan 12 00:22:36 2017 (r311952) > > @@ -63,7 +63,6 @@ static int db_lhist_nlines; > > #define BLANK ' ' > > #define BACKUP '\b' > > > > -static int cnmaygetc(void); > > static void db_delete(int n, int bwd); > > static int db_inputchar(int c); > > static void db_putnchars(int c, int count); > > @@ -291,12 +290,6 @@ db_inputchar(c) > > return (0); > > } > > > > -static int > > -cnmaygetc() > > -{ > > - return (-1); > > -} > > - > > BSD never had a usable console API (function) for checking for input. > cncheckc() is the correct name for such a function. The actual > cncheckc() returns any input that it finds. This is not the main > problem here. The input will have to be read here anyway to determine > what it is. The problems are that there is no console API at all for > ungetting characters in the input stream, and this function doesn't > even use a stub cnungetc(), but drops the input on the floor. It does > document this behaviour in a comment, but doesn't say that it is wrong. > > > int > > db_readline(lstart, lsize) > > char * lstart; > > @@ -350,7 +343,7 @@ db_check_interrupt(void) > > { > > int c; > > > > - c = cnmaygetc(); > > + c = cncheckc(); > > switch (c) { > > case -1: /* no character */ > > return; > > The stub function always returns -1, so db_check_interrupt() is turned into > a no-op. > > db_check_interrupt() now eats the first byte of any input on every call. > > > @@ -361,7 +354,7 @@ db_check_interrupt(void) > > > > case CTRL('s'): > > do { > > - c = cnmaygetc(); > > + c = cncheckc(); > > if (c == CTRL('c')) > > db_error((char *)0); > > } while (c != CTRL('q')); > > This is now a bad implementation of xon/xoff. It doesn't support ixany, > but busy-waits for ^Q or ^C using cncheckc(). It should at least > busy-wait using cngetc(), since that might be do a smarter busy wait. > cngetc() is actually only slightly smarter -- it uses busy-waiting too, > but with cpu_spinwait() in the loop. This cpu_spinwait() makes little > difference since cncheckc() tends to be a heavyweight function. Only > cpu_spinwait()s in the innermost loops of cncheckc(), if any, are likely > to have much effect. > > Multiple consoles complicate this a bit. > > db_check_interrupt() is called after every db_putc() of a newline. So > the breakage is mainly for type-ahead while writing many lines. I'll note that type-ahead interacts rather poorly with DDB's behaviour of repeating the previous command upon reading an empty input line: entering a carriage return at any point while "show ktr" is working will cause it to be started again once it's finished. > > Control processing belongs in the lowest level of console drivers, and > at least the xon/xoff part is very easy to do. This makes it work for > contexts like boot messages -- this can only be controlled now by booting > with -p, which gives something like an automatic ^S after every line, > but the control characters for this mode are unusual and there is no > way to get back to -p mode after turning it off or not starting with it. > > [...] From owner-svn-src-head@freebsd.org Sat Jan 14 22:16:04 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 63F54CAFF0D; Sat, 14 Jan 2017 22:16:04 +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 33A6B1EBD; Sat, 14 Jan 2017 22:16:04 +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 v0EMG3EX093071; Sat, 14 Jan 2017 22:16:03 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v0EMG3rN093070; Sat, 14 Jan 2017 22:16:03 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201701142216.v0EMG3rN093070@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Sat, 14 Jan 2017 22:16:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r312199 - head/sys/kern X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 14 Jan 2017 22:16:04 -0000 Author: markj Date: Sat Jan 14 22:16:03 2017 New Revision: 312199 URL: https://svnweb.freebsd.org/changeset/base/312199 Log: Stop the scheduler upon panic even in non-SMP kernels. This is needed for kernel dumps to work, as the panicking thread will call into code that makes use of kernel locks. Reported and tested by: Eugene Grosbein MFC after: 1 week Modified: head/sys/kern/kern_shutdown.c Modified: head/sys/kern/kern_shutdown.c ============================================================================== --- head/sys/kern/kern_shutdown.c Sat Jan 14 22:16:01 2017 (r312198) +++ head/sys/kern/kern_shutdown.c Sat Jan 14 22:16:03 2017 (r312199) @@ -733,13 +733,13 @@ vpanic(const char *fmt, va_list ap) CPU_CLR(PCPU_GET(cpuid), &other_cpus); stop_cpus_hard(other_cpus); } +#endif /* * Ensure that the scheduler is stopped while panicking, even if panic * has been entered from kdb. */ td->td_stopsched = 1; -#endif bootopt = RB_AUTOBOOT; newpanic = 0; From owner-svn-src-head@freebsd.org Sat Jan 14 22:56:21 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9F8C1CB0D76; Sat, 14 Jan 2017 22:56:21 +0000 (UTC) (envelope-from mizhka@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 575521AE6; Sat, 14 Jan 2017 22:56:21 +0000 (UTC) (envelope-from mizhka@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v0EMuKKa010401; Sat, 14 Jan 2017 22:56:20 GMT (envelope-from mizhka@FreeBSD.org) Received: (from mizhka@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v0EMuKBp010400; Sat, 14 Jan 2017 22:56:20 GMT (envelope-from mizhka@FreeBSD.org) Message-Id: <201701142256.v0EMuKBp010400@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mizhka set sender to mizhka@FreeBSD.org using -f From: Michael Zhilin Date: Sat, 14 Jan 2017 22:56:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r312203 - 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-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 14 Jan 2017 22:56:21 -0000 Author: mizhka Date: Sat Jan 14 22:56:20 2017 New Revision: 312203 URL: https://svnweb.freebsd.org/changeset/base/312203 Log: [mips/onionomega] WiFi & gpio kernel configuration bits This patch adds missing hints for ath0 (eepromaddr) and GPIO (mask & leds). ath0 doesn't work without eeprom hints, so this commit should make wifi works on Onion Omega. GPIO mask is required if you want to use gpiobus and GPIO pins on your board. Onion Omega has several leds connected to gpio pins (one on board, one color on dock). This commit adds mask for gpiobus and allow you to turn off/on leds via /dev/leds/{board,blue,green,red} (on by default). Tested on Onion Omega 1. Reviewed by: adrian Approved by: adrian (mentor) Differential Revision: https://reviews.freebsd.org/D9107 Modified: head/sys/mips/conf/ONIONOMEGA.hints Modified: head/sys/mips/conf/ONIONOMEGA.hints ============================================================================== --- head/sys/mips/conf/ONIONOMEGA.hints Sat Jan 14 22:27:31 2017 (r312202) +++ head/sys/mips/conf/ONIONOMEGA.hints Sat Jan 14 22:56:20 2017 (r312203) @@ -31,6 +31,10 @@ hint.arge.1.media=1000 hint.arge.1.fduplex=1 hint.arge.1.eeprommac=0x1fff0006 +# ath0 +hint.ath.0.eepromaddr=0x1fff0000 +hint.ath.0.eepromsize=16384 + # 16MB flash layout: # [ 0.510000] 5 tp-link partitions found on MTD device spi0.0 # [ 0.510000] Creating 5 MTD partitions on "spi0.0": @@ -92,3 +96,30 @@ hint.map.6.start=0x00ff0000 hint.map.6.end=0x01000000 hint.map.6.name="ART" hint.map.6.readonly=1 + +# GPIO +hint.gpio.0.pinmask=0x0c8ff1c3 + +hint.gpioled.0.at="gpiobus0" +hint.gpioled.0.pins=0x08000000 +hint.gpioled.0.name="board" +hint.gpioled.0.invert=0 + +#Red +hint.gpioled.1.at="gpiobus0" +hint.gpioled.1.pins=0x00020000 +hint.gpioled.1.name="red" +hint.gpioled.1.invert=0 + +#Green +hint.gpioled.2.at="gpiobus0" +hint.gpioled.2.pins=0x00010000 +hint.gpioled.2.name="green" +hint.gpioled.2.invert=0 + +#Blue +hint.gpioled.3.at="gpiobus0" +hint.gpioled.3.pins=0x00008000 +hint.gpioled.3.name="blue" +hint.gpioled.3.invert=0 + From owner-svn-src-head@freebsd.org Sat Jan 14 23:24:51 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4961CCAF5D8; Sat, 14 Jan 2017 23:24:51 +0000 (UTC) (envelope-from mizhka@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0E3CD19DF; Sat, 14 Jan 2017 23:24:50 +0000 (UTC) (envelope-from mizhka@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v0ENOo9C022798; Sat, 14 Jan 2017 23:24:50 GMT (envelope-from mizhka@FreeBSD.org) Received: (from mizhka@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v0ENOoSO022797; Sat, 14 Jan 2017 23:24:50 GMT (envelope-from mizhka@FreeBSD.org) Message-Id: <201701142324.v0ENOoSO022797@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mizhka set sender to mizhka@FreeBSD.org using -f From: Michael Zhilin Date: Sat, 14 Jan 2017 23:24:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r312204 - head/sys/dev/etherswitch/micrel X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 14 Jan 2017 23:24:51 -0000 Author: mizhka Date: Sat Jan 14 23:24:50 2017 New Revision: 312204 URL: https://svnweb.freebsd.org/changeset/base/312204 Log: [etherswitch] Support Micrel KSZ8995MA switch chip This is Micrel KSZ8995MA driver code. KSZ8995MA uses SPI bus to control. This code is written & tested on @SRCHACK's ksz8995ma board and FON2100 with gpiospi. etherswitchcfg support commands: addtag, ingress, striptag, dropuntagged. Submitted by: Hiroki Mori Reviewed by: mizhka, adrian Approved by: adrian (mentor) Differential Revision: https://reviews.freebsd.org/D8790 Added: head/sys/dev/etherswitch/micrel/ head/sys/dev/etherswitch/micrel/ksz8995ma.c (contents, props changed) Added: head/sys/dev/etherswitch/micrel/ksz8995ma.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/dev/etherswitch/micrel/ksz8995ma.c Sat Jan 14 23:24:50 2017 (r312204) @@ -0,0 +1,960 @@ +/*- + * Copyright (c) 2016 Hiroki Mori + * Copyright (c) 2013 Luiz Otavio O Souza. + * Copyright (c) 2011-2012 Stefan Bethke. + * Copyright (c) 2012 Adrian Chadd. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * $FreeBSD$ + */ + +/* + * This is Micrel KSZ8995MA driver code. KSZ8995MA use SPI bus on control. + * This code development on @SRCHACK's ksz8995ma board and FON2100 with + * gpiospi. + * etherswitchcfg command port option support addtag, ingress, striptag, + * dropuntagged. + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include + +#include +#include +#include + +#include + +#include + +#include "spibus_if.h" +#include "miibus_if.h" +#include "etherswitch_if.h" + +#define KSZ8995MA_SPI_READ 0x03 +#define KSZ8995MA_SPI_WRITE 0x02 + +#define KSZ8995MA_CID0 0x00 +#define KSZ8995MA_CID1 0x01 + +#define KSZ8995MA_GC0 0x02 +#define KSZ8995MA_GC1 0x03 +#define KSZ8995MA_GC2 0x04 +#define KSZ8995MA_GC3 0x05 + +#define KSZ8995MA_PORT_SIZE 0x10 + +#define KSZ8995MA_PC0_BASE 0x10 +#define KSZ8995MA_PC1_BASE 0x11 +#define KSZ8995MA_PC2_BASE 0x12 +#define KSZ8995MA_PC3_BASE 0x13 +#define KSZ8995MA_PC4_BASE 0x14 +#define KSZ8995MA_PC5_BASE 0x15 +#define KSZ8995MA_PC6_BASE 0x16 +#define KSZ8995MA_PC7_BASE 0x17 +#define KSZ8995MA_PC8_BASE 0x18 +#define KSZ8995MA_PC9_BASE 0x19 +#define KSZ8995MA_PC10_BASE 0x1a +#define KSZ8995MA_PC11_BASE 0x1b +#define KSZ8995MA_PC12_BASE 0x1c +#define KSZ8995MA_PC13_BASE 0x1d + +#define KSZ8995MA_PS0_BASE 0x1e + +#define KSZ8995MA_PC14_BASE 0x1f + +#define KSZ8995MA_IAC0 0x6e +#define KSZ8995MA_IAC1 0x6f +#define KSZ8995MA_IDR8 0x70 +#define KSZ8995MA_IDR7 0x71 +#define KSZ8995MA_IDR6 0x72 +#define KSZ8995MA_IDR5 0x73 +#define KSZ8995MA_IDR4 0x74 +#define KSZ8995MA_IDR3 0x75 +#define KSZ8995MA_IDR2 0x76 +#define KSZ8995MA_IDR1 0x77 +#define KSZ8995MA_IDR0 0x78 + +#define KSZ8995MA_FAMILI_ID 0x95 +#define KSZ8995MA_CHIP_ID 0x00 +#define KSZ8995MA_CHIP_ID_MASK 0xf0 +#define KSZ8995MA_START 0x01 +#define KSZ8995MA_VLAN_ENABLE 0x80 +#define KSZ8995MA_TAG_INS 0x04 +#define KSZ8995MA_TAG_RM 0x02 +#define KSZ8995MA_INGR_FILT 0x40 +#define KSZ8995MA_DROP_NONPVID 0x20 + +#define KSZ8995MA_PDOWN 0x08 +#define KSZ8995MA_STARTNEG 0x20 + +#define KSZ8995MA_MII_STAT 0x7808 +#define KSZ8995MA_MII_PHYID_H 0x0022 +#define KSZ8995MA_MII_PHYID_L 0x1450 +#define KSZ8995MA_MII_AA 0x0401 + +#define KSZ8995MA_VLAN_TABLE_VALID 0x20 +#define KSZ8995MA_VLAN_TABLE_READ 0x14 +#define KSZ8995MA_VLAN_TABLE_WRITE 0x04 + +#define KSZ8995MA_MAX_PORT 5 + +MALLOC_DECLARE(M_KSZ8995MA); +MALLOC_DEFINE(M_KSZ8995MA, "ksz8995ma", "ksz8995ma data structures"); + +struct ksz8995ma_softc { + struct mtx sc_mtx; /* serialize access to softc */ + device_t sc_dev; + int vlan_mode; + int media; /* cpu port media */ + int cpuport; /* which PHY is connected to the CPU */ + int phymask; /* PHYs we manage */ + int numports; /* number of ports */ + int ifpport[KSZ8995MA_MAX_PORT]; + int *portphy; + char **ifname; + device_t **miibus; + struct ifnet **ifp; + struct callout callout_tick; + etherswitch_info_t info; +}; + +#define KSZ8995MA_LOCK(_sc) \ + mtx_lock(&(_sc)->sc_mtx) +#define KSZ8995MA_UNLOCK(_sc) \ + mtx_unlock(&(_sc)->sc_mtx) +#define KSZ8995MA_LOCK_ASSERT(_sc, _what) \ + mtx_assert(&(_sc)->sc_mtx, (_what)) +#define KSZ8995MA_TRYLOCK(_sc) \ + mtx_trylock(&(_sc)->sc_mtx) + +#if defined(DEBUG) +#define DPRINTF(dev, args...) device_printf(dev, args) +#else +#define DPRINTF(dev, args...) +#endif + +static inline int ksz8995ma_portforphy(struct ksz8995ma_softc *, int); +static void ksz8995ma_tick(void *); +static int ksz8995ma_ifmedia_upd(struct ifnet *); +static void ksz8995ma_ifmedia_sts(struct ifnet *, struct ifmediareq *); +static int ksz8995ma_readreg(device_t dev, int addr); +static int ksz8995ma_writereg(device_t dev, int addr, int value); +static void ksz8995ma_portvlanreset(device_t dev); + +static int +ksz8995ma_probe(device_t dev) +{ + int id0, id1; + struct ksz8995ma_softc *sc; + + sc = device_get_softc(dev); + bzero(sc, sizeof(*sc)); + + id0 = ksz8995ma_readreg(dev, KSZ8995MA_CID0); + id1 = ksz8995ma_readreg(dev, KSZ8995MA_CID1); + if (bootverbose) + device_printf(dev,"Chip Identifier Register %x %x\n", id0, id1); + + /* check Product Code */ + if (id0 != KSZ8995MA_FAMILI_ID || (id1 & KSZ8995MA_CHIP_ID_MASK) != + KSZ8995MA_CHIP_ID) { + return (ENXIO); + } + + device_set_desc_copy(dev, "Micrel KSZ8995MA SPI switch driver"); + return (BUS_PROBE_DEFAULT); +} + +static int +ksz8995ma_attach_phys(struct ksz8995ma_softc *sc) +{ + int phy, port, err; + char name[IFNAMSIZ]; + + port = 0; + err = 0; + /* PHYs need an interface, so we generate a dummy one */ + snprintf(name, IFNAMSIZ, "%sport", device_get_nameunit(sc->sc_dev)); + for (phy = 0; phy < sc->numports; phy++) { + if (phy == sc->cpuport) + continue; + if (((1 << phy) & sc->phymask) == 0) + continue; + sc->ifpport[phy] = port; + sc->portphy[port] = phy; + sc->ifp[port] = if_alloc(IFT_ETHER); + sc->ifp[port]->if_softc = sc; + sc->ifp[port]->if_flags |= IFF_UP | IFF_BROADCAST | + IFF_DRV_RUNNING | IFF_SIMPLEX; + if_initname(sc->ifp[port], name, port); + sc->miibus[port] = malloc(sizeof(device_t), M_KSZ8995MA, + M_WAITOK | M_ZERO); + if (sc->miibus[port] == NULL) { + err = ENOMEM; + goto failed; + } + err = mii_attach(sc->sc_dev, sc->miibus[port], sc->ifp[port], + ksz8995ma_ifmedia_upd, ksz8995ma_ifmedia_sts, \ + BMSR_DEFCAPMASK, phy, MII_OFFSET_ANY, 0); + DPRINTF(sc->sc_dev, "%s attached to pseudo interface %s\n", + device_get_nameunit(*sc->miibus[port]), + sc->ifp[port]->if_xname); + if (err != 0) { + device_printf(sc->sc_dev, + "attaching PHY %d failed\n", + phy); + goto failed; + } + ++port; + } + sc->info.es_nports = port; + if (sc->cpuport != -1) { + /* cpu port is MAC5 on ksz8995ma */ + sc->ifpport[sc->cpuport] = port; + sc->portphy[port] = sc->cpuport; + ++sc->info.es_nports; + } + + return (0); + +failed: + for (phy = 0; phy < sc->numports; phy++) { + if (((1 << phy) & sc->phymask) == 0) + continue; + port = ksz8995ma_portforphy(sc, phy); + if (sc->miibus[port] != NULL) + device_delete_child(sc->sc_dev, (*sc->miibus[port])); + if (sc->ifp[port] != NULL) + if_free(sc->ifp[port]); + if (sc->ifname[port] != NULL) + free(sc->ifname[port], M_KSZ8995MA); + if (sc->miibus[port] != NULL) + free(sc->miibus[port], M_KSZ8995MA); + } + return (err); +} + +static int +ksz8995ma_attach(device_t dev) +{ + struct ksz8995ma_softc *sc; + int err, reg; + + err = 0; + sc = device_get_softc(dev); + + sc->sc_dev = dev; + mtx_init(&sc->sc_mtx, "ksz8995ma", NULL, MTX_DEF); + strlcpy(sc->info.es_name, device_get_desc(dev), + sizeof(sc->info.es_name)); + + /* KSZ8995MA Defaults */ + sc->numports = KSZ8995MA_MAX_PORT; + sc->phymask = (1 << (KSZ8995MA_MAX_PORT + 1)) - 1; + sc->cpuport = -1; + sc->media = 100; + + (void) resource_int_value(device_get_name(dev), device_get_unit(dev), + "cpuport", &sc->cpuport); + + sc->info.es_nvlangroups = 16; + sc->info.es_vlan_caps = ETHERSWITCH_VLAN_PORT | ETHERSWITCH_VLAN_DOT1Q; + + sc->ifp = malloc(sizeof(struct ifnet *) * sc->numports, M_KSZ8995MA, + M_WAITOK | M_ZERO); + sc->ifname = malloc(sizeof(char *) * sc->numports, M_KSZ8995MA, + M_WAITOK | M_ZERO); + sc->miibus = malloc(sizeof(device_t *) * sc->numports, M_KSZ8995MA, + M_WAITOK | M_ZERO); + sc->portphy = malloc(sizeof(int) * sc->numports, M_KSZ8995MA, + M_WAITOK | M_ZERO); + + if (sc->ifp == NULL || sc->ifname == NULL || sc->miibus == NULL || + sc->portphy == NULL) { + err = ENOMEM; + goto failed; + } + + /* + * Attach the PHYs and complete the bus enumeration. + */ + err = ksz8995ma_attach_phys(sc); + if (err != 0) + goto failed; + + bus_generic_probe(dev); + bus_enumerate_hinted_children(dev); + err = bus_generic_attach(dev); + if (err != 0) + goto failed; + + callout_init(&sc->callout_tick, 0); + + ksz8995ma_tick(sc); + + /* start switch */ + sc->vlan_mode = 0; + reg = ksz8995ma_readreg(dev, KSZ8995MA_GC3); + ksz8995ma_writereg(dev, KSZ8995MA_GC3, + reg & ~KSZ8995MA_VLAN_ENABLE); + ksz8995ma_portvlanreset(dev); + ksz8995ma_writereg(dev, KSZ8995MA_CID1, KSZ8995MA_START); + + return (0); + +failed: + if (sc->portphy != NULL) + free(sc->portphy, M_KSZ8995MA); + if (sc->miibus != NULL) + free(sc->miibus, M_KSZ8995MA); + if (sc->ifname != NULL) + free(sc->ifname, M_KSZ8995MA); + if (sc->ifp != NULL) + free(sc->ifp, M_KSZ8995MA); + + return (err); +} + +static int +ksz8995ma_detach(device_t dev) +{ + struct ksz8995ma_softc *sc; + int i, port; + + sc = device_get_softc(dev); + + callout_drain(&sc->callout_tick); + + for (i = 0; i < KSZ8995MA_MAX_PORT; i++) { + if (((1 << i) & sc->phymask) == 0) + continue; + port = ksz8995ma_portforphy(sc, i); + if (sc->miibus[port] != NULL) + device_delete_child(dev, (*sc->miibus[port])); + if (sc->ifp[port] != NULL) + if_free(sc->ifp[port]); + free(sc->ifname[port], M_KSZ8995MA); + free(sc->miibus[port], M_KSZ8995MA); + } + + free(sc->portphy, M_KSZ8995MA); + free(sc->miibus, M_KSZ8995MA); + free(sc->ifname, M_KSZ8995MA); + free(sc->ifp, M_KSZ8995MA); + + bus_generic_detach(dev); + mtx_destroy(&sc->sc_mtx); + + return (0); +} + +/* + * Convert PHY number to port number. + */ +static inline int +ksz8995ma_portforphy(struct ksz8995ma_softc *sc, int phy) +{ + + return (sc->ifpport[phy]); +} + +static inline struct mii_data * +ksz8995ma_miiforport(struct ksz8995ma_softc *sc, int port) +{ + + if (port < 0 || port > sc->numports) + return (NULL); + if (port == sc->cpuport) + return (NULL); + return (device_get_softc(*sc->miibus[port])); +} + +static inline struct ifnet * +ksz8995ma_ifpforport(struct ksz8995ma_softc *sc, int port) +{ + + if (port < 0 || port > sc->numports) + return (NULL); + return (sc->ifp[port]); +} + +/* + * Poll the status for all PHYs. + */ +static void +ksz8995ma_miipollstat(struct ksz8995ma_softc *sc) +{ + int i, port; + struct mii_data *mii; + struct mii_softc *miisc; + + KSZ8995MA_LOCK_ASSERT(sc, MA_NOTOWNED); + + for (i = 0; i < KSZ8995MA_MAX_PORT; i++) { + if (i == sc->cpuport) + continue; + if (((1 << i) & sc->phymask) == 0) + continue; + port = ksz8995ma_portforphy(sc, i); + if ((*sc->miibus[port]) == NULL) + continue; + mii = device_get_softc(*sc->miibus[port]); + LIST_FOREACH(miisc, &mii->mii_phys, mii_list) { + if (IFM_INST(mii->mii_media.ifm_cur->ifm_media) != + miisc->mii_inst) + continue; + ukphy_status(miisc); + mii_phy_update(miisc, MII_POLLSTAT); + } + } +} + +static void +ksz8995ma_tick(void *arg) +{ + struct ksz8995ma_softc *sc; + + sc = arg; + + ksz8995ma_miipollstat(sc); + callout_reset(&sc->callout_tick, hz, ksz8995ma_tick, sc); +} + +static void +ksz8995ma_lock(device_t dev) +{ + struct ksz8995ma_softc *sc; + + sc = device_get_softc(dev); + + KSZ8995MA_LOCK_ASSERT(sc, MA_NOTOWNED); + KSZ8995MA_LOCK(sc); +} + +static void +ksz8995ma_unlock(device_t dev) +{ + struct ksz8995ma_softc *sc; + + sc = device_get_softc(dev); + + KSZ8995MA_LOCK_ASSERT(sc, MA_OWNED); + KSZ8995MA_UNLOCK(sc); +} + +static etherswitch_info_t * +ksz8995ma_getinfo(device_t dev) +{ + struct ksz8995ma_softc *sc; + + sc = device_get_softc(dev); + + return (&sc->info); +} + +static int +ksz8995ma_getport(device_t dev, etherswitch_port_t *p) +{ + struct ksz8995ma_softc *sc; + struct mii_data *mii; + struct ifmediareq *ifmr; + int phy, err; + int tag1, tag2, portreg; + + sc = device_get_softc(dev); + ifmr = &p->es_ifmr; + + if (p->es_port < 0 || p->es_port >= sc->numports) + return (ENXIO); + + if (sc->vlan_mode == ETHERSWITCH_VLAN_DOT1Q) { + tag1 = ksz8995ma_readreg(dev, KSZ8995MA_PC3_BASE + + KSZ8995MA_PORT_SIZE * p->es_port); + tag2 = ksz8995ma_readreg(dev, KSZ8995MA_PC4_BASE + + KSZ8995MA_PORT_SIZE * p->es_port); + p->es_pvid = (tag1 & 0x0f) << 8 | tag2; + + portreg = ksz8995ma_readreg(dev, KSZ8995MA_PC0_BASE + + KSZ8995MA_PORT_SIZE * p->es_port); + if (portreg & KSZ8995MA_TAG_INS) + p->es_flags |= ETHERSWITCH_PORT_ADDTAG; + if (portreg & KSZ8995MA_TAG_RM) + p->es_flags |= ETHERSWITCH_PORT_STRIPTAG; + + portreg = ksz8995ma_readreg(dev, KSZ8995MA_PC2_BASE + + KSZ8995MA_PORT_SIZE * p->es_port); + if (portreg & KSZ8995MA_DROP_NONPVID) + p->es_flags |= ETHERSWITCH_PORT_DROPUNTAGGED; + if (portreg & KSZ8995MA_INGR_FILT) + p->es_flags |= ETHERSWITCH_PORT_INGRESS; + } + + phy = sc->portphy[p->es_port]; + mii = ksz8995ma_miiforport(sc, p->es_port); + if (sc->cpuport != -1 && phy == sc->cpuport) { + /* fill in fixed values for CPU port */ + p->es_flags |= ETHERSWITCH_PORT_CPU; + ifmr->ifm_count = 0; + if (sc->media == 100) + ifmr->ifm_current = ifmr->ifm_active = + IFM_ETHER | IFM_100_TX | IFM_FDX; + else + ifmr->ifm_current = ifmr->ifm_active = + IFM_ETHER | IFM_1000_T | IFM_FDX; + ifmr->ifm_mask = 0; + ifmr->ifm_status = IFM_ACTIVE | IFM_AVALID; + } else if (mii != NULL) { + err = ifmedia_ioctl(mii->mii_ifp, &p->es_ifr, + &mii->mii_media, SIOCGIFMEDIA); + if (err) + return (err); + } else { + return (ENXIO); + } + + return (0); +} + +static int +ksz8995ma_setport(device_t dev, etherswitch_port_t *p) +{ + struct ksz8995ma_softc *sc; + struct mii_data *mii; + struct ifmedia *ifm; + struct ifnet *ifp; + int phy, err; + int portreg; + + sc = device_get_softc(dev); + + if (p->es_port < 0 || p->es_port >= sc->numports) + return (ENXIO); + + if (sc->vlan_mode == ETHERSWITCH_VLAN_DOT1Q) { + ksz8995ma_writereg(dev, KSZ8995MA_PC4_BASE + + KSZ8995MA_PORT_SIZE * p->es_port, p->es_pvid & 0xff); + portreg = ksz8995ma_readreg(dev, KSZ8995MA_PC3_BASE + + KSZ8995MA_PORT_SIZE * p->es_port); + ksz8995ma_writereg(dev, KSZ8995MA_PC3_BASE + + KSZ8995MA_PORT_SIZE * p->es_port, + (portreg & 0xf0) | ((p->es_pvid >> 8) & 0x0f)); + + portreg = ksz8995ma_readreg(dev, KSZ8995MA_PC0_BASE + + KSZ8995MA_PORT_SIZE * p->es_port); + if (p->es_flags & ETHERSWITCH_PORT_ADDTAG) + portreg |= KSZ8995MA_TAG_INS; + else + portreg &= ~KSZ8995MA_TAG_INS; + if (p->es_flags & ETHERSWITCH_PORT_STRIPTAG) + portreg |= KSZ8995MA_TAG_RM; + else + portreg &= ~KSZ8995MA_TAG_RM; + ksz8995ma_writereg(dev, KSZ8995MA_PC0_BASE + + KSZ8995MA_PORT_SIZE * p->es_port, portreg); + + portreg = ksz8995ma_readreg(dev, KSZ8995MA_PC2_BASE + + KSZ8995MA_PORT_SIZE * p->es_port); + if (p->es_flags & ETHERSWITCH_PORT_DROPUNTAGGED) + portreg |= KSZ8995MA_DROP_NONPVID; + else + portreg &= ~KSZ8995MA_DROP_NONPVID; + if (p->es_flags & ETHERSWITCH_PORT_INGRESS) + portreg |= KSZ8995MA_INGR_FILT; + else + portreg &= ~KSZ8995MA_INGR_FILT; + ksz8995ma_writereg(dev, KSZ8995MA_PC2_BASE + + KSZ8995MA_PORT_SIZE * p->es_port, portreg); + } + + phy = sc->portphy[p->es_port]; + mii = ksz8995ma_miiforport(sc, p->es_port); + if (phy != sc->cpuport) { + if (mii == NULL) + return (ENXIO); + ifp = ksz8995ma_ifpforport(sc, p->es_port); + ifm = &mii->mii_media; + err = ifmedia_ioctl(ifp, &p->es_ifr, ifm, SIOCSIFMEDIA); + } + return (0); +} + +static int +ksz8995ma_getvgroup(device_t dev, etherswitch_vlangroup_t *vg) +{ + int data0, data1, data2; + int vlantab; + struct ksz8995ma_softc *sc; + + sc = device_get_softc(dev); + + if (sc->vlan_mode == ETHERSWITCH_VLAN_PORT) { + if (vg->es_vlangroup < sc->numports) { + vg->es_vid = ETHERSWITCH_VID_VALID; + vg->es_vid |= vg->es_vlangroup; + data0 = ksz8995ma_readreg(dev, KSZ8995MA_PC1_BASE + + KSZ8995MA_PORT_SIZE * vg->es_vlangroup); + vg->es_member_ports = data0 & 0x1f; + vg->es_untagged_ports = vg->es_member_ports; + vg->es_fid = 0; + } else { + vg->es_vid = 0; + } + } else if (sc->vlan_mode == ETHERSWITCH_VLAN_DOT1Q) { + ksz8995ma_writereg(dev, KSZ8995MA_IAC0, + KSZ8995MA_VLAN_TABLE_READ); + ksz8995ma_writereg(dev, KSZ8995MA_IAC1, vg->es_vlangroup); + data2 = ksz8995ma_readreg(dev, KSZ8995MA_IDR2); + data1 = ksz8995ma_readreg(dev, KSZ8995MA_IDR1); + data0 = ksz8995ma_readreg(dev, KSZ8995MA_IDR0); + vlantab = data2 << 16 | data1 << 8 | data0; + if (data2 & KSZ8995MA_VLAN_TABLE_VALID) { + vg->es_vid = ETHERSWITCH_VID_VALID; + vg->es_vid |= vlantab & 0xfff; + vg->es_member_ports = (vlantab >> 16) & 0x1f; + vg->es_untagged_ports = vg->es_member_ports; + vg->es_fid = (vlantab >> 12) & 0x0f; + } else { + vg->es_fid = 0; + } + } + + return (0); +} + +static int +ksz8995ma_setvgroup(device_t dev, etherswitch_vlangroup_t *vg) +{ + struct ksz8995ma_softc *sc; + int data0; + + sc = device_get_softc(dev); + + if (sc->vlan_mode == ETHERSWITCH_VLAN_PORT) { + data0 = ksz8995ma_readreg(dev, KSZ8995MA_PC1_BASE + + KSZ8995MA_PORT_SIZE * vg->es_vlangroup); + ksz8995ma_writereg(dev, KSZ8995MA_PC1_BASE + + KSZ8995MA_PORT_SIZE * vg->es_vlangroup, + (data0 & 0xe0) | (vg->es_member_ports & 0x1f)); + } else if (sc->vlan_mode == ETHERSWITCH_VLAN_DOT1Q) { + if (vg->es_member_ports != 0) { + ksz8995ma_writereg(dev, KSZ8995MA_IDR2, + KSZ8995MA_VLAN_TABLE_VALID | + (vg->es_member_ports & 0x1f)); + ksz8995ma_writereg(dev, KSZ8995MA_IDR1, + vg->es_fid << 4 | vg->es_vid >> 8); + ksz8995ma_writereg(dev, KSZ8995MA_IDR0, + vg->es_vid & 0xff); + } else { + ksz8995ma_writereg(dev, KSZ8995MA_IDR2, 0); + ksz8995ma_writereg(dev, KSZ8995MA_IDR1, 0); + ksz8995ma_writereg(dev, KSZ8995MA_IDR0, 0); + } + ksz8995ma_writereg(dev, KSZ8995MA_IAC0, + KSZ8995MA_VLAN_TABLE_WRITE); + ksz8995ma_writereg(dev, KSZ8995MA_IAC1, vg->es_vlangroup); + } + + return (0); +} + +static int +ksz8995ma_getconf(device_t dev, etherswitch_conf_t *conf) +{ + struct ksz8995ma_softc *sc; + + sc = device_get_softc(dev); + + /* Return the VLAN mode. */ + conf->cmd = ETHERSWITCH_CONF_VLAN_MODE; + conf->vlan_mode = sc->vlan_mode; + + return (0); +} + +static void +ksz8995ma_portvlanreset(device_t dev) +{ + int i, data; + struct ksz8995ma_softc *sc; + + sc = device_get_softc(dev); + + for (i = 0; i < sc->numports; ++i) { + data = ksz8995ma_readreg(dev, KSZ8995MA_PC1_BASE + + KSZ8995MA_PORT_SIZE * i); + ksz8995ma_writereg(dev, KSZ8995MA_PC1_BASE + + KSZ8995MA_PORT_SIZE * i, (data & 0xe0) | 0x1f); + } +} + +static int +ksz8995ma_setconf(device_t dev, etherswitch_conf_t *conf) +{ + int reg; + struct ksz8995ma_softc *sc; + + sc = device_get_softc(dev); + + if ((conf->cmd & ETHERSWITCH_CONF_VLAN_MODE) == 0) + return (0); + + if (conf->vlan_mode == ETHERSWITCH_VLAN_PORT) { + sc->vlan_mode = ETHERSWITCH_VLAN_PORT; + reg = ksz8995ma_readreg(dev, KSZ8995MA_GC3); + ksz8995ma_writereg(dev, KSZ8995MA_GC3, + reg & ~KSZ8995MA_VLAN_ENABLE); + ksz8995ma_portvlanreset(dev); + } else if (conf->vlan_mode == ETHERSWITCH_VLAN_DOT1Q) { + sc->vlan_mode = ETHERSWITCH_VLAN_DOT1Q; + reg = ksz8995ma_readreg(dev, KSZ8995MA_GC3); + ksz8995ma_writereg(dev, KSZ8995MA_GC3, + reg | KSZ8995MA_VLAN_ENABLE); + } else { + sc->vlan_mode = 0; + reg = ksz8995ma_readreg(dev, KSZ8995MA_GC3); + ksz8995ma_writereg(dev, KSZ8995MA_GC3, + reg & ~KSZ8995MA_VLAN_ENABLE); + ksz8995ma_portvlanreset(dev); + } + return (0); +} + +static void +ksz8995ma_statchg(device_t dev) +{ + + DPRINTF(dev, "%s\n", __func__); +} + +static int +ksz8995ma_ifmedia_upd(struct ifnet *ifp) +{ + struct ksz8995ma_softc *sc; + struct mii_data *mii; + + sc = ifp->if_softc; + mii = ksz8995ma_miiforport(sc, ifp->if_dunit); + + DPRINTF(sc->sc_dev, "%s\n", __func__); + if (mii == NULL) + return (ENXIO); + mii_mediachg(mii); + return (0); +} + +static void +ksz8995ma_ifmedia_sts(struct ifnet *ifp, struct ifmediareq *ifmr) +{ + struct ksz8995ma_softc *sc; + struct mii_data *mii; + + sc = ifp->if_softc; + mii = ksz8995ma_miiforport(sc, ifp->if_dunit); + + DPRINTF(sc->sc_dev, "%s\n", __func__); + + if (mii == NULL) + return; + mii_pollstat(mii); + ifmr->ifm_active = mii->mii_media_active; + ifmr->ifm_status = mii->mii_media_status; +} + +static int +ksz8995ma_readphy(device_t dev, int phy, int reg) +{ +int portreg; + + /* + * This is no mdio/mdc connection code. + * simulate MIIM Registers via the SPI interface + */ + if (reg == MII_BMSR) { + portreg = ksz8995ma_readreg(dev, KSZ8995MA_PS0_BASE + + KSZ8995MA_PORT_SIZE * phy); + return (KSZ8995MA_MII_STAT | + (portreg & 0x20 ? BMSR_LINK : 0x00) | + (portreg & 0x40 ? BMSR_ACOMP : 0x00)); + } else if (reg == MII_PHYIDR1) { + return (KSZ8995MA_MII_PHYID_H); + } else if (reg == MII_PHYIDR2) { + return (KSZ8995MA_MII_PHYID_L); + } else if (reg == MII_ANAR) { + portreg = ksz8995ma_readreg(dev, KSZ8995MA_PC12_BASE + + KSZ8995MA_PORT_SIZE * phy); + return (KSZ8995MA_MII_AA | (portreg & 0x0f) << 5); + } else if (reg == MII_ANLPAR) { + portreg = ksz8995ma_readreg(dev, KSZ8995MA_PS0_BASE + + KSZ8995MA_PORT_SIZE * phy); + return (((portreg & 0x0f) << 5) | 0x01); + } + + return (0); +} + +static int +ksz8995ma_writephy(device_t dev, int phy, int reg, int data) +{ +int portreg; + + /* + * This is no mdio/mdc connection code. + * simulate MIIM Registers via the SPI interface + */ + if (reg == MII_BMCR) { + portreg = ksz8995ma_readreg(dev, KSZ8995MA_PC13_BASE + + KSZ8995MA_PORT_SIZE * phy); + if (data & BMCR_PDOWN) + portreg |= KSZ8995MA_PDOWN; + else + portreg &= ~KSZ8995MA_PDOWN; + if (data & BMCR_STARTNEG) + portreg |= KSZ8995MA_STARTNEG; + else + portreg &= ~KSZ8995MA_STARTNEG; + ksz8995ma_writereg(dev, KSZ8995MA_PC13_BASE + + KSZ8995MA_PORT_SIZE * phy, portreg); + } else if (reg == MII_ANAR) { + portreg = ksz8995ma_readreg(dev, KSZ8995MA_PC12_BASE + + KSZ8995MA_PORT_SIZE * phy); + portreg &= 0xf; + portreg |= ((data >> 5) & 0x0f); + ksz8995ma_writereg(dev, KSZ8995MA_PC12_BASE + + KSZ8995MA_PORT_SIZE * phy, portreg); + } + return (0); +} + +static int +ksz8995ma_readreg(device_t dev, int addr) +{ + uint8_t txBuf[8], rxBuf[8]; + struct spi_command cmd; + int err; + + memset(&cmd, 0, sizeof(cmd)); + memset(txBuf, 0, sizeof(txBuf)); + memset(rxBuf, 0, sizeof(rxBuf)); + + /* read spi */ + txBuf[0] = KSZ8995MA_SPI_READ; + txBuf[1] = addr; + cmd.tx_cmd = &txBuf; + cmd.rx_cmd = &rxBuf; + cmd.tx_cmd_sz = 3; + cmd.rx_cmd_sz = 3; + err = SPIBUS_TRANSFER(device_get_parent(dev), dev, &cmd); + if (err) + return(0); + + return (rxBuf[2]); +} + +static int +ksz8995ma_writereg(device_t dev, int addr, int value) +{ + uint8_t txBuf[8], rxBuf[8]; + struct spi_command cmd; + int err; + + memset(&cmd, 0, sizeof(cmd)); + memset(txBuf, 0, sizeof(txBuf)); + memset(rxBuf, 0, sizeof(rxBuf)); + + /* write spi */ + txBuf[0] = KSZ8995MA_SPI_WRITE; + txBuf[1] = addr; + txBuf[2] = value; + cmd.tx_cmd = &txBuf; + cmd.rx_cmd = &rxBuf; + cmd.tx_cmd_sz = 3; + cmd.rx_cmd_sz = 3; + err = SPIBUS_TRANSFER(device_get_parent(dev), dev, &cmd); + if (err) + return(0); + + return (0); +} + +static device_method_t ksz8995ma_methods[] = { + /* Device interface */ + DEVMETHOD(device_probe, ksz8995ma_probe), + DEVMETHOD(device_attach, ksz8995ma_attach), + DEVMETHOD(device_detach, ksz8995ma_detach), + + /* bus interface */ + DEVMETHOD(bus_add_child, device_add_child_ordered), + + /* MII interface */ + DEVMETHOD(miibus_readreg, ksz8995ma_readphy), + DEVMETHOD(miibus_writereg, ksz8995ma_writephy), + DEVMETHOD(miibus_statchg, ksz8995ma_statchg), + + /* etherswitch interface */ + DEVMETHOD(etherswitch_lock, ksz8995ma_lock), + DEVMETHOD(etherswitch_unlock, ksz8995ma_unlock), + DEVMETHOD(etherswitch_getinfo, ksz8995ma_getinfo), + DEVMETHOD(etherswitch_readreg, ksz8995ma_readreg), + DEVMETHOD(etherswitch_writereg, ksz8995ma_writereg), + DEVMETHOD(etherswitch_readphyreg, ksz8995ma_readphy), + DEVMETHOD(etherswitch_writephyreg, ksz8995ma_writephy), + DEVMETHOD(etherswitch_getport, ksz8995ma_getport), + DEVMETHOD(etherswitch_setport, ksz8995ma_setport), + DEVMETHOD(etherswitch_getvgroup, ksz8995ma_getvgroup), + DEVMETHOD(etherswitch_setvgroup, ksz8995ma_setvgroup), + DEVMETHOD(etherswitch_setconf, ksz8995ma_setconf), + DEVMETHOD(etherswitch_getconf, ksz8995ma_getconf), + + DEVMETHOD_END +}; + +DEFINE_CLASS_0(ksz8995ma, ksz8995ma_driver, ksz8995ma_methods, + sizeof(struct ksz8995ma_softc)); +static devclass_t ksz8995ma_devclass; + +DRIVER_MODULE(ksz8995ma, spibus, ksz8995ma_driver, ksz8995ma_devclass, 0, 0); +DRIVER_MODULE(miibus, ksz8995ma, miibus_driver, miibus_devclass, 0, 0); +DRIVER_MODULE(etherswitch, ksz8995ma, etherswitch_driver, etherswitch_devclass, + 0, 0); +MODULE_VERSION(ksz8995ma, 1); +MODULE_DEPEND(ksz8995ma, spibus, 1, 1, 1); /* XXX which versions? */ +MODULE_DEPEND(ksz8995ma, miibus, 1, 1, 1); /* XXX which versions? */ +MODULE_DEPEND(ksz8995ma, etherswitch, 1, 1, 1); /* XXX which versions? */